From 194f5810ea49c9fb5307085330e6964ece337281 Mon Sep 17 00:00:00 2001 From: spaaaacccee Date: Mon, 16 Dec 2024 05:42:33 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20Shortest?= =?UTF-8?q?PathLab/posthoc-app@336b43c81aa7346313c7b9a9350ef8d392f92c3a=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../{index-DpDXPyDz.js => index-DhuwtzJ0.js} | 8 ++--- assets/parseGrid.worker-CTnsDGUU.js | 27 -------------- assets/parseGrid.worker-CoX8qlO4.js | 27 ++++++++++++++ assets/parseMesh.worker-BqXfsHv6.js | 27 -------------- assets/parseMesh.worker-Dr4cls8w.js | 27 ++++++++++++++ assets/parseTrace.worker-BQa4x7DA.js | 27 ++++++++++++++ assets/parseTrace.worker-DDV8yRvx.js | 27 -------------- assets/parseTrace.worker-DWVEnv8C.js | 27 ++++++++++++++ assets/parseTrace.worker-y8dm9SDW.js | 27 -------------- assets/parseTraceSlave.worker-BXEGFQQZ.js | 35 ------------------- assets/parseTraceSlave.worker-DaoiSWpC.js | 28 --------------- assets/parseTraceSlave.worker-R8bZvGE3.js | 28 +++++++++++++++ assets/parseTraceSlave.worker-_UCrsWXU.js | 35 +++++++++++++++++++ assets/parseYaml.worker-CXyNYLS1.js | 17 --------- assets/parseYaml.worker-D2goq2pP.js | 17 +++++++++ assets/tree.worker-CpBXS68a.js | 27 ++++++++++++++ assets/tree.worker-w3km_BXF.js | 27 -------------- assets/treeLegacy.worker-Cn1QySOo.js | 27 ++++++++++++++ assets/treeLegacy.worker-DG30Do5a.js | 27 -------------- index.html | 2 +- 20 files changed, 247 insertions(+), 247 deletions(-) rename assets/{index-DpDXPyDz.js => index-DhuwtzJ0.js} (99%) delete mode 100644 assets/parseGrid.worker-CTnsDGUU.js create mode 100644 assets/parseGrid.worker-CoX8qlO4.js delete mode 100644 assets/parseMesh.worker-BqXfsHv6.js create mode 100644 assets/parseMesh.worker-Dr4cls8w.js create mode 100644 assets/parseTrace.worker-BQa4x7DA.js delete mode 100644 assets/parseTrace.worker-DDV8yRvx.js create mode 100644 assets/parseTrace.worker-DWVEnv8C.js delete mode 100644 assets/parseTrace.worker-y8dm9SDW.js delete mode 100644 assets/parseTraceSlave.worker-BXEGFQQZ.js delete mode 100644 assets/parseTraceSlave.worker-DaoiSWpC.js create mode 100644 assets/parseTraceSlave.worker-R8bZvGE3.js create mode 100644 assets/parseTraceSlave.worker-_UCrsWXU.js delete mode 100644 assets/parseYaml.worker-CXyNYLS1.js create mode 100644 assets/parseYaml.worker-D2goq2pP.js create mode 100644 assets/tree.worker-CpBXS68a.js delete mode 100644 assets/tree.worker-w3km_BXF.js create mode 100644 assets/treeLegacy.worker-Cn1QySOo.js delete mode 100644 assets/treeLegacy.worker-DG30Do5a.js diff --git a/assets/index-DpDXPyDz.js b/assets/index-DhuwtzJ0.js similarity index 99% rename from assets/index-DpDXPyDz.js rename to assets/index-DhuwtzJ0.js index 150c764..00eb56b 100644 --- a/assets/index-DpDXPyDz.js +++ b/assets/index-DhuwtzJ0.js @@ -455,7 +455,7 @@ PERFORMANCE OF THIS SOFTWARE. ${me.palette.background.default} 8px )`},textAlign:"center",vertical:!0,...pe,children:[oe,jsxRuntimeExports.jsx(Typography,{component:"div",children:ne}),!!ce&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"caption",sx:{px:8,maxWidth:480},children:ce}),!!ue&&jsxRuntimeExports.jsx(Box,{pt:2,children:ue})]})}function Button(ne){const oe=compilerRuntimeExports.c(17);let ce,ue,pe;oe[0]!==ne?({children:ce,sx:pe,...ue}=ne,oe[0]=ne,oe[1]=ce,oe[2]=ue,oe[3]=pe):(ce=oe[1],ue=oe[2],pe=oe[3]);const me=usePaper();let ge;oe[4]!==me||oe[5]!==ue.variant?(ge=ue.variant==="text"?void 0:me(1),oe[4]=me,oe[5]=ue.variant,oe[6]=ge):ge=oe[6];let ye;oe[7]!==pe||oe[8]!==ge?(ye={minWidth:0,borderColor:_temp$u,...ge,...pe},oe[7]=pe,oe[8]=ge,oe[9]=ye):ye=oe[9];let xe;oe[10]===Symbol.for("react.memo_cache_sentinel")?(xe={color:"text.primary",textOverflow:"ellipsis",overflow:"hidden",whiteSpace:"nowrap"},oe[10]=xe):xe=oe[10];let ve;oe[11]!==ce?(ve=jsxRuntimeExports.jsx(Box,{sx:xe,children:ce}),oe[11]=ce,oe[12]=ve):ve=oe[12];let _e;return oe[13]!==ue||oe[14]!==ye||oe[15]!==ve?(_e=jsxRuntimeExports.jsx(Button$1,{disableElevation:!0,variant:"outlined",color:"primary",...ue,sx:ye,children:ve}),oe[13]=ue,oe[14]=ye,oe[15]=ve,oe[16]=_e):_e=oe[16],_e}function _temp$u(ne){return alpha$2(ne.palette.text.primary,ne.palette.action.activatedOpacity)}const isTraceLayer=ne=>{var oe;return((oe=ne.source)==null?void 0:oe.type)==="trace"};var download$1={exports:{}};(function(ne,oe){(function(ce,ue){ne.exports=ue()})(commonjsGlobal$1,function(){return function ce(ue,pe,me){var ge=window,ye="application/octet-stream",xe=me||ye,ve=ue,_e=!pe&&!me&&ve,we=document.createElement("a"),Se=function(Ue){return String(Ue)},$e=ge.Blob||ge.MozBlob||ge.WebKitBlob||Se,Te=pe||"download",Re,Ae;if($e=$e.call?$e.bind(ge):Blob,String(this)==="true"&&(ve=[ve,xe],xe=ve[0],ve=ve[1]),_e&&_e.length<2048&&(Te=_e.split("/").pop().split("?")[0],we.href=_e,we.href.indexOf(_e)!==-1)){var ke=new XMLHttpRequest;return ke.open("GET",_e,!0),ke.responseType="blob",ke.onload=function(Ue){ce(Ue.target.response,Te,ye)},setTimeout(function(){ke.send()},0),ke}if(/^data:([\w+-]+\/[\w+.-]+)?[,;]/.test(ve))if(ve.length>1024*1024*1.999&&$e!==Se)ve=je(ve),xe=ve.type||ye;else return navigator.msSaveBlob?navigator.msSaveBlob(je(ve),Te):ze(ve);else if(/([\x80-\xff])/.test(ve)){var Be=0,Ie=new Uint8Array(ve.length),Ne=Ie.length;for(Be;Bene.join(oe),l$4={accept:"*",multiple:!1,strict:!1},r$4=ne=>{const{accept:oe,multiple:ce,strict:ue}={...l$4,...ne},pe=p$6({multiple:ce,accept:Array.isArray(oe)?c$5(oe):oe});return new Promise(me=>{pe.onchange=()=>{me(s$4(pe.files,ce,ue)),pe.remove()},pe.click()})},s$4=(ne,oe,ce)=>new Promise((ue,pe)=>{if(!ne)return pe(new t$4);const me=i$5(ne,oe,ce);if(!me)return pe(new n$4);ue(me)}),i$5=(ne,oe,ce)=>!oe&&ce?ne.length===1?ne[0]:null:ne.length?ne:null,p$6=({accept:ne,multiple:oe})=>{const ce=document.createElement("input");return ce.type="file",ce.multiple=oe,ce.accept=ne,ce};function isPlainObject$2(ne){return(ne==null?void 0:ne.constructor)===Object}var validPathRegex=/^[^.[\]]+(?:\.[^.[\]]+)*(?:\[\d+])*(?:\.[^.[\]]+(?:\[\d+])*)*$/,pathSplitRegex=/\.|(?=\[)/g,matchBracketsRegex=/[[\]]/g;function set$4(ne,oe,ce){if(!validPathRegex.test(oe))throw new Error("Invalid path, look at the examples for the correct format.");const ue=oe.split(pathSplitRegex);let pe=ne;for(let me=0;melodashExports.omitBy(merge$6(ne,oe),lodashExports.isUndefined)});function wait$1(ne){return new Promise(oe=>lodashExports.delay(oe,ne))}function useBusyState(ne){const oe=compilerRuntimeExports.c(3),[,ce]=useBusy();let ue;return oe[0]!==ce||oe[1]!==ne?(ue=async(pe,me)=>{ce(()=>({[ne]:me})),wait$1(300);const ge=await pe();return ce(()=>({[ne]:void 0})),ge},oe[0]=ce,oe[1]=ne,oe[2]=ue):ue=oe[2],ue}function formatByte(ne){return`${(ne/(1024*1024)).toFixed(2)} MB`}const[useConnections,ConnectionsProvider]=createSlice([],{reduce:replace$1}),[useFeatures,FeaturesProvider]=createSlice({algorithms:[],maps:[],formats:[],traces:[]}),[useLoading,LoadingProvider]=createSlice({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(ne,{action:oe,key:ce})=>produce(ne,ue=>{switch(oe){case"start":ue[ce]+=1;break;case"end":ue[ce]-=1}return ue})});function useAnyLoading(){const ne=compilerRuntimeExports.c(2),[oe]=useLoading();let ce;return ne[0]!==oe?(ce=lodashExports.some(lodashExports.values(oe)),ne[0]=oe,ne[1]=ce):ce=ne[1],ce}function useLoadingState(ne){const oe=compilerRuntimeExports.c(3),ce=ne===void 0?"general":ne,[,ue]=useLoading();let pe;return oe[0]!==ue||oe[1]!==ce?(pe=async me=>{ue(()=>({action:"start",key:ce}));const ge=await me();return ue(()=>({action:"end",key:ce})),ge},oe[0]=ue,oe[1]=ce,oe[2]=pe):pe=oe[2],pe}const hashWorkerUrl=""+new URL("hash.worker-B5ThNeUw.js",import.meta.url).href,ipcWorkerUrl=""+new URL("ipc.worker-BX5xrXZT.js",import.meta.url).href,compressWorkerUrl=""+new URL("compress.worker-BDIAOI0k.js",import.meta.url).href,compressBinaryWorkerUrl=""+new URL("compressBinary.worker-DBtqfVRd.js",import.meta.url).href,decompressBinaryWorkerUrl=""+new URL("decompressBinary.worker-DZ-PtwiT.js",import.meta.url).href,yamlWorkerUrl=""+new URL("parseYaml.worker-CXyNYLS1.js",import.meta.url).href;class HashWorker extends Worker{constructor(){super(hashWorkerUrl,{type:"module"})}}class CompressWorker extends Worker{constructor(){super(compressWorkerUrl,{type:"module"})}}class CompressBinaryWorker extends Worker{constructor(){super(compressBinaryWorkerUrl,{type:"module"})}}class DecompressBinaryWorker extends Worker{constructor(){super(decompressBinaryWorkerUrl,{type:"module"})}}class IPCWorker extends Worker{constructor(){super(ipcWorkerUrl,{type:"module"})}}class ParseYamlWorker extends Worker{constructor(){super(yamlWorkerUrl,{type:"module"})}}var noop$8=function(){},_undefined$1=noop$8(),isValue$7=function(ne){return ne!==_undefined$1&&ne!==null},isValue$6=isValue$7,forEach$2=Array.prototype.forEach,create$3=Object.create,process$1=function(ne,oe){var ce;for(ce in ne)oe[ce]=ne[ce]},normalizeOptions$1=function(ne){var oe=create$3(null);return forEach$2.call(arguments,function(ce){isValue$6(ce)&&process$1(Object(ce),oe)}),oe},isImplemented$7=function(){var ne=Math.sign;return typeof ne!="function"?!1:ne(10)===1&&ne(-20)===-1},shim$5,hasRequiredShim$5;function requireShim$5(){return hasRequiredShim$5||(hasRequiredShim$5=1,shim$5=function(ne){return ne=Number(ne),isNaN(ne)||ne===0?ne:ne>0?1:-1}),shim$5}var sign$3=isImplemented$7()?Math.sign:requireShim$5(),sign$2=sign$3,abs=Math.abs,floor$1=Math.floor,toInteger$1=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign$2(ne)*floor$1(abs(ne)))},toInteger=toInteger$1,max$6=Math.max,toPosInteger=function(ne){return max$6(0,toInteger(ne))},toPosInt$1=toPosInteger,resolveLength$2=function(ne,oe,ce){var ue;return isNaN(ne)?(ue=oe,ue>=0?ce&&ue?ue-1:ue:1):ne===!1?!1:toPosInt$1(ne)},validCallable=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$5=isValue$7,validValue=function(ne){if(!isValue$5(ne))throw new TypeError("Cannot use null or undefined");return ne},callable$3=validCallable,value$2=validValue,bind$2=Function.prototype.bind,call$4=Function.prototype.call,keys$1=Object.keys,objPropertyIsEnumerable=Object.prototype.propertyIsEnumerable,_iterate=function(ne,oe){return function(ce,ue){var pe,me=arguments[2],ge=arguments[3];return ce=Object(value$2(ce)),callable$3(ue),pe=keys$1(ce),ge&&pe.sort(typeof ge=="function"?bind$2.call(ge,ce):void 0),typeof ne!="function"&&(ne=pe[ne]),call$4.call(ne,pe,function(ye,xe){return objPropertyIsEnumerable.call(ce,ye)?call$4.call(ue,me,ce[ye],ye,ce,xe):oe})}},forEach$1=_iterate("forEach"),registeredExtensions={},custom$2={exports:{}},isImplemented$6=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$5,hasRequiredIsImplemented$4;function requireIsImplemented$4(){return hasRequiredIsImplemented$4||(hasRequiredIsImplemented$4=1,isImplemented$5=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$5}var shim$4,hasRequiredShim$4;function requireShim$4(){if(hasRequiredShim$4)return shim$4;hasRequiredShim$4=1;var ne=isValue$7,oe=Object.keys;return shim$4=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$4}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireIsImplemented$4()()?Object.keys:requireShim$4()),keys}var shim$3,hasRequiredShim$3;function requireShim$3(){if(hasRequiredShim$3)return shim$3;hasRequiredShim$3=1;var ne=requireKeys(),oe=validValue,ce=Math.max;return shim$3=function(ue,pe){var me,ge,ye=ce(arguments.length,2),xe;for(ue=Object(oe(ue)),xe=function(ve){try{ue[ve]=pe[ve]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$2}var contains$2=isImplemented$4()?String.prototype.contains:requireShim$2(),isValue$2=is$6,isPlainFunction=is$2,assign$4=assign$5,normalizeOpts$1=normalizeOptions$1,contains$1=contains$2,d$4=d$5.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$2(ne)?(ce=contains$1.call(ne,"c"),ue=contains$1.call(ne,"e"),pe=contains$1.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$4(normalizeOpts$1(me),ge):ge};d$4.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$2(oe)?isPlainFunction(oe)?isValue$2(ce)?isPlainFunction(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$2(ne)?(ue=contains$1.call(ne,"c"),pe=contains$1.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$4(normalizeOpts$1(me),ge):ge};var dExports=d$5.exports,eventEmitter={exports:{}};(function(ne,oe){var ce=dExports,ue=validCallable,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,xe=Object.defineProperties,ve=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},we,Se,$e,Te,Re,Ae,ke;we=function(Be,Ie){var Ne;return ue(Ie),ve.call(this,"__ee__")?Ne=this.__ee__:(Ne=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ne[Be]?typeof Ne[Be]=="object"?Ne[Be].push(Ie):Ne[Be]=[Ne[Be],Ie]:Ne[Be]=Ie,this},Se=function(Be,Ie){var Ne,je;return ue(Ie),je=this,we.call(this,Be,Ne=function(){$e.call(je,Be,Ne),pe.call(Ie,this,arguments)}),Ne.__eeOnceListener__=Ie,this},$e=function(Be,Ie){var Ne,je,ze,Ue;if(ue(Ie),!ve.call(this,"__ee__"))return this;if(Ne=this.__ee__,!Ne[Be])return this;if(je=Ne[Be],typeof je=="object")for(Ue=0;ze=je[Ue];++Ue)(ze===Ie||ze.__eeOnceListener__===Ie)&&(je.length===2?Ne[Be]=je[Ue?0:1]:je.splice(Ue,1));else(je===Ie||je.__eeOnceListener__===Ie)&&delete Ne[Be];return this},Te=function(Be){var Ie,Ne,je,ze,Ue;if(ve.call(this,"__ee__")&&(ze=this.__ee__[Be],!!ze))if(typeof ze=="object"){for(Ne=arguments.length,Ue=new Array(Ne-1),Ie=1;Ie=55296&&Ne<=56319&&(qe+=Se[++Ae])),qe=$e?ve.call($e,Te,qe,ke):qe,Re?(_e.value=qe,we(Be,ke,_e)):Be[ke]=qe,++ke;Ie=ke}}if(Ie===void 0)for(Ie=ue(Se.length),Re&&(Be=new Re(Ie)),Ae=0;Ae=0?_e=ge(_e):_e=oe(this.length)-ge(me(_e)),xe=_e;xe"}},safeToString}var toShortStringRepresentation,hasRequiredToShortStringRepresentation;function requireToShortStringRepresentation(){if(hasRequiredToShortStringRepresentation)return toShortStringRepresentation;hasRequiredToShortStringRepresentation=1;var ne=requireSafeToString(),oe=/[\n\r\u2028\u2029]/g;return toShortStringRepresentation=function(ce){var ue=ne(ce);return ue.length>100&&(ue=ue.slice(0,99)+"…"),ue=ue.replace(oe,function(pe){return JSON.stringify(pe).slice(1,-1)}),ue},toShortStringRepresentation}var isPromise={exports:{}},hasRequiredIsPromise;function requireIsPromise(){if(hasRequiredIsPromise)return isPromise.exports;hasRequiredIsPromise=1,isPromise.exports=ne,isPromise.exports.default=ne;function ne(oe){return!!oe&&(typeof oe=="object"||typeof oe=="function")&&typeof oe.then=="function"}return isPromise.exports}var hasRequiredPromise;function requirePromise(){if(hasRequiredPromise)return promise;hasRequiredPromise=1;var ne=requireMap(),oe=requirePrimitiveSet(),ce=requireValidateStringifiableValue(),ue=requireToShortStringRepresentation(),pe=requireIsPromise(),me=requireNextTick(),ge=Object.create,ye=oe("then","then:finally","done","done:finally");return registeredExtensions.promise=function(xe,ve){var _e=ge(null),we=ge(null),Se=ge(null);if(xe===!0)xe=null;else if(xe=ce(xe),!ye[xe])throw new TypeError("'"+ue(xe)+"' is not valid promise mode");ve.on("set",function($e,Te,Re){var Ae=!1;if(!pe(Re)){we[$e]=Re,ve.emit("setasync",$e,1);return}_e[$e]=1,Se[$e]=Re;var ke=function(je){var ze=_e[$e];if(Ae)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Use Save As... to download, then click back to return to this page.`)&&(location.href=Ue),!0;var Ke=document.createElement("iframe");document.body.appendChild(Ke),!qe&&/^data:/.test(Ue)&&(Ue="data:"+Ue.replace(/^data:([\w\/\-\+]+)/,ye)),Ke.src=Ue,setTimeout(function(){document.body.removeChild(Ke)},333)}if(navigator.msSaveBlob)return navigator.msSaveBlob(Re,Te);if(ge.URL)ze(ge.URL.createObjectURL(Re),!0);else{if(typeof Re=="string"||Re.constructor===Se)try{return ze("data:"+xe+";base64,"+ge.btoa(Re))}catch{return ze("data:"+xe+","+encodeURIComponent(Re))}Ae=new FileReader,Ae.onload=function(Ue){ze(this.result)},Ae.readAsDataURL(Re)}return!0}})})(download$1);var downloadExports=download$1.exports;const download=getDefaultExportFromCjs$1(downloadExports);let e$3=class extends Error{},t$4=class extends e$3{},n$4=class extends e$3{};const c$5=(ne,oe=",")=>ne.join(oe),l$4={accept:"*",multiple:!1,strict:!1},r$4=ne=>{const{accept:oe,multiple:ce,strict:ue}={...l$4,...ne},pe=p$6({multiple:ce,accept:Array.isArray(oe)?c$5(oe):oe});return new Promise(me=>{pe.onchange=()=>{me(s$4(pe.files,ce,ue)),pe.remove()},pe.click()})},s$4=(ne,oe,ce)=>new Promise((ue,pe)=>{if(!ne)return pe(new t$4);const me=i$5(ne,oe,ce);if(!me)return pe(new n$4);ue(me)}),i$5=(ne,oe,ce)=>!oe&&ce?ne.length===1?ne[0]:null:ne.length?ne:null,p$6=({accept:ne,multiple:oe})=>{const ce=document.createElement("input");return ce.type="file",ce.multiple=oe,ce.accept=ne,ce};function isPlainObject$2(ne){return(ne==null?void 0:ne.constructor)===Object}var validPathRegex=/^[^.[\]]+(?:\.[^.[\]]+)*(?:\[\d+])*(?:\.[^.[\]]+(?:\[\d+])*)*$/,pathSplitRegex=/\.|(?=\[)/g,matchBracketsRegex=/[[\]]/g;function set$4(ne,oe,ce){if(!validPathRegex.test(oe))throw new Error("Invalid path, look at the examples for the correct format.");const ue=oe.split(pathSplitRegex);let pe=ne;for(let me=0;melodashExports.omitBy(merge$6(ne,oe),lodashExports.isUndefined)});function wait$1(ne){return new Promise(oe=>lodashExports.delay(oe,ne))}function useBusyState(ne){const oe=compilerRuntimeExports.c(3),[,ce]=useBusy();let ue;return oe[0]!==ce||oe[1]!==ne?(ue=async(pe,me)=>{ce(()=>({[ne]:me})),wait$1(300);const ge=await pe();return ce(()=>({[ne]:void 0})),ge},oe[0]=ce,oe[1]=ne,oe[2]=ue):ue=oe[2],ue}function formatByte(ne){return`${(ne/(1024*1024)).toFixed(2)} MB`}const[useConnections,ConnectionsProvider]=createSlice([],{reduce:replace$1}),[useFeatures,FeaturesProvider]=createSlice({algorithms:[],maps:[],formats:[],traces:[]}),[useLoading,LoadingProvider]=createSlice({specimen:0,connections:0,features:0,map:0,general:0},{reduce:(ne,{action:oe,key:ce})=>produce(ne,ue=>{switch(oe){case"start":ue[ce]+=1;break;case"end":ue[ce]-=1}return ue})});function useAnyLoading(){const ne=compilerRuntimeExports.c(2),[oe]=useLoading();let ce;return ne[0]!==oe?(ce=lodashExports.some(lodashExports.values(oe)),ne[0]=oe,ne[1]=ce):ce=ne[1],ce}function useLoadingState(ne){const oe=compilerRuntimeExports.c(3),ce=ne===void 0?"general":ne,[,ue]=useLoading();let pe;return oe[0]!==ue||oe[1]!==ce?(pe=async me=>{ue(()=>({action:"start",key:ce}));const ge=await me();return ue(()=>({action:"end",key:ce})),ge},oe[0]=ue,oe[1]=ce,oe[2]=pe):pe=oe[2],pe}const hashWorkerUrl=""+new URL("hash.worker-B5ThNeUw.js",import.meta.url).href,ipcWorkerUrl=""+new URL("ipc.worker-BX5xrXZT.js",import.meta.url).href,compressWorkerUrl=""+new URL("compress.worker-BDIAOI0k.js",import.meta.url).href,compressBinaryWorkerUrl=""+new URL("compressBinary.worker-DBtqfVRd.js",import.meta.url).href,decompressBinaryWorkerUrl=""+new URL("decompressBinary.worker-DZ-PtwiT.js",import.meta.url).href,yamlWorkerUrl=""+new URL("parseYaml.worker-D2goq2pP.js",import.meta.url).href;class HashWorker extends Worker{constructor(){super(hashWorkerUrl,{type:"module"})}}class CompressWorker extends Worker{constructor(){super(compressWorkerUrl,{type:"module"})}}class CompressBinaryWorker extends Worker{constructor(){super(compressBinaryWorkerUrl,{type:"module"})}}class DecompressBinaryWorker extends Worker{constructor(){super(decompressBinaryWorkerUrl,{type:"module"})}}class IPCWorker extends Worker{constructor(){super(ipcWorkerUrl,{type:"module"})}}class ParseYamlWorker extends Worker{constructor(){super(yamlWorkerUrl,{type:"module"})}}var noop$8=function(){},_undefined$1=noop$8(),isValue$7=function(ne){return ne!==_undefined$1&&ne!==null},isValue$6=isValue$7,forEach$2=Array.prototype.forEach,create$3=Object.create,process$1=function(ne,oe){var ce;for(ce in ne)oe[ce]=ne[ce]},normalizeOptions$1=function(ne){var oe=create$3(null);return forEach$2.call(arguments,function(ce){isValue$6(ce)&&process$1(Object(ce),oe)}),oe},isImplemented$7=function(){var ne=Math.sign;return typeof ne!="function"?!1:ne(10)===1&&ne(-20)===-1},shim$5,hasRequiredShim$5;function requireShim$5(){return hasRequiredShim$5||(hasRequiredShim$5=1,shim$5=function(ne){return ne=Number(ne),isNaN(ne)||ne===0?ne:ne>0?1:-1}),shim$5}var sign$3=isImplemented$7()?Math.sign:requireShim$5(),sign$2=sign$3,abs=Math.abs,floor$1=Math.floor,toInteger$1=function(ne){return isNaN(ne)?0:(ne=Number(ne),ne===0||!isFinite(ne)?ne:sign$2(ne)*floor$1(abs(ne)))},toInteger=toInteger$1,max$6=Math.max,toPosInteger=function(ne){return max$6(0,toInteger(ne))},toPosInt$1=toPosInteger,resolveLength$2=function(ne,oe,ce){var ue;return isNaN(ne)?(ue=oe,ue>=0?ce&&ue?ue-1:ue:1):ne===!1?!1:toPosInt$1(ne)},validCallable=function(ne){if(typeof ne!="function")throw new TypeError(ne+" is not a function");return ne},isValue$5=isValue$7,validValue=function(ne){if(!isValue$5(ne))throw new TypeError("Cannot use null or undefined");return ne},callable$3=validCallable,value$2=validValue,bind$2=Function.prototype.bind,call$4=Function.prototype.call,keys$1=Object.keys,objPropertyIsEnumerable=Object.prototype.propertyIsEnumerable,_iterate=function(ne,oe){return function(ce,ue){var pe,me=arguments[2],ge=arguments[3];return ce=Object(value$2(ce)),callable$3(ue),pe=keys$1(ce),ge&&pe.sort(typeof ge=="function"?bind$2.call(ge,ce):void 0),typeof ne!="function"&&(ne=pe[ne]),call$4.call(ne,pe,function(ye,xe){return objPropertyIsEnumerable.call(ce,ye)?call$4.call(ue,me,ce[ye],ye,ce,xe):oe})}},forEach$1=_iterate("forEach"),registeredExtensions={},custom$2={exports:{}},isImplemented$6=function(){var ne=Object.assign,oe;return typeof ne!="function"?!1:(oe={foo:"raz"},ne(oe,{bar:"dwa"},{trzy:"trzy"}),oe.foo+oe.bar+oe.trzy==="razdwatrzy")},isImplemented$5,hasRequiredIsImplemented$4;function requireIsImplemented$4(){return hasRequiredIsImplemented$4||(hasRequiredIsImplemented$4=1,isImplemented$5=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),isImplemented$5}var shim$4,hasRequiredShim$4;function requireShim$4(){if(hasRequiredShim$4)return shim$4;hasRequiredShim$4=1;var ne=isValue$7,oe=Object.keys;return shim$4=function(ce){return oe(ne(ce)?Object(ce):ce)},shim$4}var keys,hasRequiredKeys;function requireKeys(){return hasRequiredKeys||(hasRequiredKeys=1,keys=requireIsImplemented$4()()?Object.keys:requireShim$4()),keys}var shim$3,hasRequiredShim$3;function requireShim$3(){if(hasRequiredShim$3)return shim$3;hasRequiredShim$3=1;var ne=requireKeys(),oe=validValue,ce=Math.max;return shim$3=function(ue,pe){var me,ge,ye=ce(arguments.length,2),xe;for(ue=Object(oe(ue)),xe=function(ve){try{ue[ve]=pe[ve]}catch(_e){me||(me=_e)}},ge=1;ge-1},shim$2}var contains$2=isImplemented$4()?String.prototype.contains:requireShim$2(),isValue$2=is$6,isPlainFunction=is$2,assign$4=assign$5,normalizeOpts$1=normalizeOptions$1,contains$1=contains$2,d$4=d$5.exports=function(ne,oe){var ce,ue,pe,me,ge;return arguments.length<2||typeof ne!="string"?(me=oe,oe=ne,ne=null):me=arguments[2],isValue$2(ne)?(ce=contains$1.call(ne,"c"),ue=contains$1.call(ne,"e"),pe=contains$1.call(ne,"w")):(ce=pe=!0,ue=!1),ge={value:oe,configurable:ce,enumerable:ue,writable:pe},me?assign$4(normalizeOpts$1(me),ge):ge};d$4.gs=function(ne,oe,ce){var ue,pe,me,ge;return typeof ne!="string"?(me=ce,ce=oe,oe=ne,ne=null):me=arguments[3],isValue$2(oe)?isPlainFunction(oe)?isValue$2(ce)?isPlainFunction(ce)||(me=ce,ce=void 0):ce=void 0:(me=oe,oe=ce=void 0):oe=void 0,isValue$2(ne)?(ue=contains$1.call(ne,"c"),pe=contains$1.call(ne,"e")):(ue=!0,pe=!1),ge={get:oe,set:ce,configurable:ue,enumerable:pe},me?assign$4(normalizeOpts$1(me),ge):ge};var dExports=d$5.exports,eventEmitter={exports:{}};(function(ne,oe){var ce=dExports,ue=validCallable,pe=Function.prototype.apply,me=Function.prototype.call,ge=Object.create,ye=Object.defineProperty,xe=Object.defineProperties,ve=Object.prototype.hasOwnProperty,_e={configurable:!0,enumerable:!1,writable:!0},we,Se,$e,Te,Re,Ae,ke;we=function(Be,Ie){var Ne;return ue(Ie),ve.call(this,"__ee__")?Ne=this.__ee__:(Ne=_e.value=ge(null),ye(this,"__ee__",_e),_e.value=null),Ne[Be]?typeof Ne[Be]=="object"?Ne[Be].push(Ie):Ne[Be]=[Ne[Be],Ie]:Ne[Be]=Ie,this},Se=function(Be,Ie){var Ne,je;return ue(Ie),je=this,we.call(this,Be,Ne=function(){$e.call(je,Be,Ne),pe.call(Ie,this,arguments)}),Ne.__eeOnceListener__=Ie,this},$e=function(Be,Ie){var Ne,je,ze,Ue;if(ue(Ie),!ve.call(this,"__ee__"))return this;if(Ne=this.__ee__,!Ne[Be])return this;if(je=Ne[Be],typeof je=="object")for(Ue=0;ze=je[Ue];++Ue)(ze===Ie||ze.__eeOnceListener__===Ie)&&(je.length===2?Ne[Be]=je[Ue?0:1]:je.splice(Ue,1));else(je===Ie||je.__eeOnceListener__===Ie)&&delete Ne[Be];return this},Te=function(Be){var Ie,Ne,je,ze,Ue;if(ve.call(this,"__ee__")&&(ze=this.__ee__[Be],!!ze))if(typeof ze=="object"){for(Ne=arguments.length,Ue=new Array(Ne-1),Ie=1;Ie=55296&&Ne<=56319&&(qe+=Se[++Ae])),qe=$e?ve.call($e,Te,qe,ke):qe,Re?(_e.value=qe,we(Be,ke,_e)):Be[ke]=qe,++ke;Ie=ke}}if(Ie===void 0)for(Ie=ue(Se.length),Re&&(Be=new Re(Ie)),Ae=0;Ae=0?_e=ge(_e):_e=oe(this.length)-ge(me(_e)),xe=_e;xe"}},safeToString}var toShortStringRepresentation,hasRequiredToShortStringRepresentation;function requireToShortStringRepresentation(){if(hasRequiredToShortStringRepresentation)return toShortStringRepresentation;hasRequiredToShortStringRepresentation=1;var ne=requireSafeToString(),oe=/[\n\r\u2028\u2029]/g;return toShortStringRepresentation=function(ce){var ue=ne(ce);return ue.length>100&&(ue=ue.slice(0,99)+"…"),ue=ue.replace(oe,function(pe){return JSON.stringify(pe).slice(1,-1)}),ue},toShortStringRepresentation}var isPromise={exports:{}},hasRequiredIsPromise;function requireIsPromise(){if(hasRequiredIsPromise)return isPromise.exports;hasRequiredIsPromise=1,isPromise.exports=ne,isPromise.exports.default=ne;function ne(oe){return!!oe&&(typeof oe=="object"||typeof oe=="function")&&typeof oe.then=="function"}return isPromise.exports}var hasRequiredPromise;function requirePromise(){if(hasRequiredPromise)return promise;hasRequiredPromise=1;var ne=requireMap(),oe=requirePrimitiveSet(),ce=requireValidateStringifiableValue(),ue=requireToShortStringRepresentation(),pe=requireIsPromise(),me=requireNextTick(),ge=Object.create,ye=oe("then","then:finally","done","done:finally");return registeredExtensions.promise=function(xe,ve){var _e=ge(null),we=ge(null),Se=ge(null);if(xe===!0)xe=null;else if(xe=ce(xe),!ye[xe])throw new TypeError("'"+ue(xe)+"' is not valid promise mode");ve.on("set",function($e,Te,Re){var Ae=!1;if(!pe(Re)){we[$e]=Re,ve.emit("setasync",$e,1);return}_e[$e]=1,Se[$e]=Re;var ke=function(je){var ze=_e[$e];if(Ae)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) Consider to rely on 'then' or 'done' mode instead.`);ze&&(delete _e[$e],we[$e]=je,ve.emit("setasync",$e,ze))},Be=function(){Ae=!0,_e[$e]&&(delete _e[$e],delete Se[$e],ve.delete($e))},Ie=xe;if(Ie||(Ie="then"),Ie==="then"){var Ne=function(){me(Be)};Re=Re.then(function(je){me(ke.bind(this,je))},Ne),typeof Re.finally=="function"&&Re.finally(Ne)}else if(Ie==="done"){if(typeof Re.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");Re.done(ke,Be)}else if(Ie==="done:finally"){if(typeof Re.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof Re.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");Re.done(ke),Re.finally(Be)}}),ve.on("get",function($e,Te,Re){var Ae;if(_e[$e]){++_e[$e];return}Ae=Se[$e];var ke=function(){ve.emit("getasync",$e,Te,Re)};pe(Ae)?typeof Ae.done=="function"?Ae.done(ke):Ae.then(function(){me(ke)}):ke()}),ve.on("delete",function($e){if(delete Se[$e],_e[$e]){delete _e[$e];return}if(hasOwnProperty.call(we,$e)){var Te=we[$e];delete we[$e],ve.emit("deleteasync",$e,[Te])}}),ve.on("clear",function(){var $e=we;we=ge(null),_e=ge(null),Se=ge(null),ve.emit("clearasync",ne($e,function(Te){return[Te]}))})},promise}var dispose={},hasRequiredDispose;function requireDispose(){if(hasRequiredDispose)return dispose;hasRequiredDispose=1;var ne=validCallable,oe=forEach$1,ce=registeredExtensions,ue=Function.prototype.apply;return ce.dispose=function(pe,me,ge){var ye;if(ne(pe),ge.async&&ce.async||ge.promise&&ce.promise){me.on("deleteasync",ye=function(xe,ve){ue.call(pe,null,ve)}),me.on("clearasync",function(xe){oe(xe,function(ve,_e){ye(_e,ve)})});return}me.on("delete",ye=function(xe,ve){pe(ve)}),me.on("clear",function(xe){oe(xe,function(ve,_e){ye(_e,ve)})})},dispose}var maxAge={},maxTimeout,hasRequiredMaxTimeout;function requireMaxTimeout(){return hasRequiredMaxTimeout||(hasRequiredMaxTimeout=1,maxTimeout=2147483647),maxTimeout}var validTimeout,hasRequiredValidTimeout;function requireValidTimeout(){if(hasRequiredValidTimeout)return validTimeout;hasRequiredValidTimeout=1;var ne=toPosInteger,oe=requireMaxTimeout();return validTimeout=function(ce){if(ce=ne(ce),ce>oe)throw new TypeError(ce+" exceeds maximum possible timeout");return ce},validTimeout}var hasRequiredMaxAge;function requireMaxAge(){if(hasRequiredMaxAge)return maxAge;hasRequiredMaxAge=1;var ne=requireFrom(),oe=forEach$1,ce=requireNextTick(),ue=requireIsPromise(),pe=requireValidTimeout(),me=registeredExtensions,ge=Function.prototype,ye=Math.max,xe=Math.min,ve=Object.create;return me.maxAge=function(_e,we,Se){var $e,Te,Re,Ae;_e=pe(_e),_e&&($e=ve(null),Te=Se.async&&me.async||Se.promise&&me.promise?"async":"",we.on("set"+Te,function(ke){$e[ke]=setTimeout(function(){we.delete(ke)},_e),typeof $e[ke].unref=="function"&&$e[ke].unref(),Ae&&(Ae[ke]&&Ae[ke]!=="nextTick"&&clearTimeout(Ae[ke]),Ae[ke]=setTimeout(function(){delete Ae[ke]},Re),typeof Ae[ke].unref=="function"&&Ae[ke].unref())}),we.on("delete"+Te,function(ke){clearTimeout($e[ke]),delete $e[ke],Ae&&(Ae[ke]!=="nextTick"&&clearTimeout(Ae[ke]),delete Ae[ke])}),Se.preFetch&&(Se.preFetch===!0||isNaN(Se.preFetch)?Re=.333:Re=ye(xe(Number(Se.preFetch),1),0),Re&&(Ae={},Re=(1-Re)*_e,we.on("get"+Te,function(ke,Be,Ie){Ae[ke]||(Ae[ke]="nextTick",ce(function(){var Ne;Ae[ke]==="nextTick"&&(delete Ae[ke],we.delete(ke),Se.async&&(Be=ne(Be),Be.push(ge)),Ne=we.memoized.apply(Ie,Be),Se.promise&&ue(Ne)&&(typeof Ne.done=="function"?Ne.done(ge,ge):Ne.then(ge,ge)))}))}))),we.on("clear"+Te,function(){oe($e,function(ke){clearTimeout(ke)}),$e={},Ae&&(oe(Ae,function(ke){ke!=="nextTick"&&clearTimeout(ke)}),Ae={})}))},maxAge}var max$5={},lruQueue,hasRequiredLruQueue;function requireLruQueue(){if(hasRequiredLruQueue)return lruQueue;hasRequiredLruQueue=1;var ne=toPosInteger,oe=Object.create,ce=Object.prototype.hasOwnProperty;return lruQueue=function(ue){var pe=0,me=1,ge=oe(null),ye=oe(null),xe=0,ve;return ue=ne(ue),{hit:function(_e){var we=ye[_e],Se=++xe;if(ge[Se]=_e,ye[_e]=Se,!we)return++pe,pe<=ue?void 0:(_e=ge[me],ve(_e),_e);if(delete ge[we],me===we)for(;!ce.call(ge,++me););},delete:ve=function(_e){var we=ye[_e];if(we&&(delete ge[we],delete ye[_e],--pe,me===we)){if(!pe){xe=0,me=1;return}for(;!ce.call(ge,++me););}},clear:function(){pe=0,me=1,ge=oe(null),ye=oe(null),xe=0}}},lruQueue}var hasRequiredMax;function requireMax(){if(hasRequiredMax)return max$5;hasRequiredMax=1;var ne=toPosInteger,oe=requireLruQueue(),ce=registeredExtensions;return ce.max=function(ue,pe,me){var ge,ye,xe;ue=ne(ue),ue&&(ye=oe(ue),ge=me.async&&ce.async||me.promise&&ce.promise?"async":"",pe.on("set"+ge,xe=function(ve){ve=ye.hit(ve),ve!==void 0&&pe.delete(ve)}),pe.on("get"+ge,xe),pe.on("delete"+ge,ye.delete),pe.on("clear"+ge,ye.clear))},max$5}var refCounter={},hasRequiredRefCounter;function requireRefCounter(){if(hasRequiredRefCounter)return refCounter;hasRequiredRefCounter=1;var ne=dExports,oe=registeredExtensions,ce=Object.create,ue=Object.defineProperties;return oe.refCounter=function(pe,me,ge){var ye,xe;ye=ce(null),xe=ge.async&&oe.async||ge.promise&&oe.promise?"async":"",me.on("set"+xe,function(ve,_e){ye[ve]=_e||1}),me.on("get"+xe,function(ve){++ye[ve]}),me.on("delete"+xe,function(ve){delete ye[ve]}),me.on("clear"+xe,function(){ye={}}),ue(me.memoized,{deleteRef:ne(function(){var ve=me.get(arguments);return ve===null||!ye[ve]?null:--ye[ve]?!1:(me.delete(ve),!0)}),getRefCount:ne(function(){var ve=me.get(arguments);return ve===null||!ye[ve]?0:ye[ve]})})},refCounter}var normalizeOpts=normalizeOptions$1,resolveLength=resolveLength$2,plain=plain$1,memoizee=function(ne){var oe=normalizeOpts(arguments[1]),ce;return oe.normalizer||(ce=oe.length=resolveLength(oe.length,ne.length,oe.async),ce!==0&&(oe.primitive?ce===!1?oe.normalizer=requirePrimitive():ce>1&&(oe.normalizer=requireGetPrimitiveFixed()(ce)):ce===!1?oe.normalizer=requireGet()():ce===1?oe.normalizer=requireGet1()():oe.normalizer=requireGetFixed()(ce))),oe.async&&requireAsync(),oe.promise&&requirePromise(),oe.dispose&&requireDispose(),oe.maxAge&&requireMaxAge(),oe.max&&requireMax(),oe.refCounter&&requireRefCounter(),plain(ne,oe)};const memoizee$1=getDefaultExportFromCjs$1(memoizee),usingWorker=ne=>async oe=>{const ce=new ne,ue=await oe(ce);if("error"in ue)throw console.error(ue.error),new Error(ue.error);return ce.terminate(),ue.result},usingWorkerTask=ne=>oe=>usingWorker(ne)(ce=>(ce.postMessage(oe),new Promise((ue,pe)=>{ce.onmessage=me=>{ue(me.data)},ce.onerror=me=>{console.error(me),pe(me)}}))),usingMemoizedWorkerTask=(ne,oe={async:!0,length:1})=>memoizee$1(usingWorkerTask(ne),oe);lodashExports.memoize(usingWorkerTask(HashWorker));lodashExports.memoize(usingWorkerTask(CompressWorker));const compressBinaryAsync=lodashExports.memoize(usingWorkerTask(CompressBinaryWorker)),decompressBinaryAsync=lodashExports.memoize(usingWorkerTask(DecompressBinaryWorker)),parseYamlAsync=lodashExports.memoize(usingWorkerTask(ParseYamlWorker));function ext$1(ne){return ne.split(".").pop()}function name$2(ne){return ne.split(".").shift()}const customId="internal/custom",custom$1=(ne,oe="resource")=>({name:(ne==null?void 0:ne.id)===customId?`Imported ${lodashExports.startCase(oe)} - ${ne==null?void 0:ne.name}`:`Import ${lodashExports.startCase(oe)}`,description:"Internal",id:customId}),EXTENSIONS=["json","yaml","yml"],FORMATS$1=EXTENSIONS.map(ne=>`.trace.${ne}`);async function uploadTrace(){const ne=await r$4({accept:EXTENSIONS.map(oe=>`.${oe}`),strict:!0});if(ne)return readUploadedTrace(ne)}function readUploadedTrace(ne){return{file:ne,read:async()=>{if(isTraceFormat(ne)){const oe=await ne.text(),ce=await parseYamlAsync(oe);return{...custom$1(),format:ce==null?void 0:ce.format,content:ce,name:lodashExports.startCase(name$2(ne.name)),type:customId,key:nanoid()}}else throw new Error(`The file should have one of these extensions: ${FORMATS$1.join(", ")}`)}}}function isTraceFormat(ne){return!!lodashExports.find(FORMATS$1,oe=>ne.name.endsWith(oe))}async function uploadMap(ne){const oe=await r$4({accept:ne.map(({id:ce})=>`.${ce}`),strict:!0});if(oe)return readUploadedMap(oe,ne)}function readUploadedMap(ne,oe){return{file:ne,read:async()=>{if(lodashExports.find(oe,{id:ext$1(ne.name)}))return{...custom$1(),format:ext$1(ne.name),content:await ne.text(),name:lodashExports.startCase(name$2(ne.name))};throw new Error(`The format (${ext$1(ne.name)}) is unsupported.`)}}}function name$1(ne){return ne.split(".").shift()}function MapPicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("map"),[{features:pe,connections:me}]=useLoading(),ge=useBusyState("map"),[ye]=useConnections(),[{maps:xe,formats:ve}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,arrow:!0,paper:!0,disabled:!!pe||!!me,ellipsis:25,icon:jsxRuntimeExports.jsx(SvgIcon$J,{}),label:"Choose Map",value:oe==null?void 0:oe.id,items:[custom$1(oe,"map"),...xe.map(_e=>{var we;return{..._e,description:(we=lodashExports.find(ye,{url:_e.source}))==null?void 0:we.name}})],onChange:async _e=>{switch(_e){case custom$1().id:try{const we=await uploadMap(ve);we&&ue(async()=>{ce("Opening map...");const Se=we.file.size>LARGE_FILE_B?await ge(we.read,`Opening map (${formatByte(we.file.size)})`):await we.read();Se&&(ne==null||ne(Se))})}catch(we){ce(`${we}`)}break;default:ne==null||ne(lodashExports.find(xe,{id:_e}));break}}})}function TracePicker({onChange:ne,value:oe}){const ce=useSnackbar(),ue=useLoadingState("specimen"),pe=useBusyState("specimen"),[me]=useConnections(),[{features:ge,connections:ye}]=useLoading(),[{traces:xe}]=useFeatures();return jsxRuntimeExports.jsx(FeaturePicker,{showTooltip:!0,paper:!0,arrow:!0,ellipsis:25,disabled:!!ge||!!ye,icon:jsxRuntimeExports.jsx(SvgIcon$J,{}),label:"Choose Trace",value:oe==null?void 0:oe.id,items:[custom$1(oe,"trace"),...xe.map(ve=>{var _e;return{...ve,description:(_e=lodashExports.find(me,{url:ve.source}))==null?void 0:_e.name}})],onChange:async ve=>{switch(ve){case custom$1().id:try{const _e=await uploadTrace();_e&&ue(async()=>{ce("Opening trace...");try{const we=_e.file.size>LARGE_FILE_B?await pe(_e.read,`Opening trace (${formatByte(_e.file.size)})`):await _e.read();we&&(ne==null||ne(we))}catch(we){console.error(we),ce(`Error opening, ${lodashExports.get(we,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports.get(we,"message"),name:lodashExports.startCase(name$1(_e.file.name))})}})}catch(_e){console.error(_e),ce(`Error opening, ${lodashExports.get(_e,"message")}`),ne==null||ne({id:custom$1().id,error:lodashExports.get(_e,"message"),name:"File"})}break;default:ne==null||ne(lodashExports.find(xe,{id:ve}));break}}})}const Heading=({label:ne})=>jsxRuntimeExports.jsx(Typography,{component:"div",variant:"overline",color:"text.secondary",sx:{pt:1},children:ne}),Label=({label:ne})=>jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body1",children:ne}),Option=({label:ne,content:oe})=>jsxRuntimeExports.jsxs(Flex,{alignItems:"center",children:[jsxRuntimeExports.jsx(Label,{label:ne}),jsxRuntimeExports.jsx(Space,{flex:1}),oe]});var hexRgb$1=function(ne){if(typeof ne!="string")throw new TypeError("Expected a string");ne=ne.replace(/^#/,""),ne.length===3&&(ne=ne[0]+ne[0]+ne[1]+ne[1]+ne[2]+ne[2]);var oe=parseInt(ne,16);return[oe>>16,oe>>8&255,oe&255]},rgbHex$1=(ne,oe,ce,ue)=>{const pe=(ne+(ue||"")).toString().includes("%");if(typeof ne=="string"){const me=ne.match(/(0?\.?\d{1,3})%?\b/g).map(Number);ne=me[0],oe=me[1],ce=me[2],ue=me[3]}else ue!==void 0&&(ue=parseFloat(ue));if(typeof ne!="number"||typeof oe!="number"||typeof ce!="number"||ne>255||oe>255||ce>255)throw new TypeError("Expected three numbers below 256");if(typeof ue=="number"){if(!pe&&ue>=0&&ue<=1)ue=Math.round(255*ue);else if(pe&&ue>=0&&ue<=100)ue=Math.round(255*ue/100);else throw new TypeError(`Expected alpha value (${ue}) as a fraction or percentage`);ue=(ue|256).toString(16).slice(1)}else ue="";return(ce|oe<<8|ne<<16|1<<24).toString(16).slice(1)+ue},colorDiff$1={};/** * @author Markus Ekholm * @copyright 2012-2023 (c) Markus Ekholm @@ -534,7 +534,7 @@ Consider to rely on 'then' or 'done' mode instead.`);ze&&(delete _e[$e],we[$e]=j * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */function paletteMapKey(ne){return ne=normalize$2(ne),ne.A!==1?`rgba(${ne.R}, ${ne.G}, ${ne.B}, ${ne.A})`:`rgb(${ne.R}, ${ne.G}, ${ne.B})`}function labPaletteMapKey(ne){return`lab(${ne.L}, ${ne.a}, ${ne.b})`}function mapPalette(ne,oe,ce,ue){const pe={};ue=ue||{R:255,G:255,B:255},ce=ce||"closest";for(let me=0;mexe){ye=_e,xe=we;continue}}ye&&(pe[paletteMapKey(ge)]=ye)}return pe}function matchPaletteLab(ne,oe,ce){let ue,pe,me=oe[0],ge=ciede2000(ne,me);for(let ye=1,xe=oe.length;yege)&&(me=ue,ge=pe);return me}function mapPaletteLab(ne,oe,ce){const ue={},pe=ce==="furthest";for(let me=0;me{let oe=hexRgb(ne);return{R:oe[0],G:oe[1],B:oe[2]}},pantoneRGBList=pantones.map(ne=>get_rgbObject(ne.hex));var getClosestColor=ne=>{const oe=get_rgbObject(ne),ce=diff.closest(oe,pantoneRGBList),ue=rgbHex(ce.R,ce.G,ce.B),pe=pantones.findIndex(ge=>ge.hex==`#${ue}`);return pantones[pe]};function u$4(){return(u$4=Object.assign||function(ne){for(var oe=1;oe=0||(pe[ce]=ne[ce]);return pe}function i$4(ne){var oe=reactExports.useRef(ne),ce=reactExports.useRef(function(ue){oe.current&&oe.current(ue)});return oe.current=ne,ce.current}var s$3=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=1),ne>ce?ce:ne0:Ae.buttons>0)&&pe.current?me(d$2(pe.current,Ae,ye.current)):Re(!1)},Te=function(){return Re(!1)};function Re(Ae){var ke=xe.current,Be=v$6(pe.current),Ie=Ae?Be.addEventListener:Be.removeEventListener;Ie(ke?"touchmove":"mousemove",$e),Ie(ke?"touchend":"mouseup",Te)}return[function(Ae){var ke=Ae.nativeEvent,Be=pe.current;if(Be&&(h$5(ke),!function(Ne,je){return je&&!f$5(Ne)}(ke,xe.current)&&Be)){if(f$5(ke)){xe.current=!0;var Ie=ke.changedTouches||[];Ie.length&&(ye.current=Ie[0].identifier)}Be.focus(),me(d$2(Be,ke,ye.current)),Re(!0)}},function(Ae){var ke=Ae.which||Ae.keyCode;ke<37||ke>40||(Ae.preventDefault(),ge({left:ke===39?.05:ke===37?-.05:0,top:ke===40?.05:ke===38?-.05:0}))},Re]},[ge,me]),_e=ve[0],we=ve[1],Se=ve[2];return reactExports.useEffect(function(){return Se},[Se]),React$2.createElement("div",u$4({},ue,{onTouchStart:_e,onMouseDown:_e,className:"react-colorful__interactive",ref:pe,onKeyDown:we,tabIndex:0,role:"slider"}))}),g$4=function(ne){return ne.filter(Boolean).join(" ")},p$5=function(ne){var oe=ne.color,ce=ne.left,ue=ne.top,pe=ue===void 0?.5:ue,me=g$4(["react-colorful__pointer",ne.className]);return React$2.createElement("div",{className:me,style:{top:100*pe+"%",left:100*ce+"%"}},React$2.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:oe}}))},b$5=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=Math.pow(10,oe)),Math.round(ce*ne)/ce},x$5=function(ne){return L$3(C$3(ne))},C$3=function(ne){return ne[0]==="#"&&(ne=ne.substring(1)),ne.length<6?{r:parseInt(ne[0]+ne[0],16),g:parseInt(ne[1]+ne[1],16),b:parseInt(ne[2]+ne[2],16),a:ne.length===4?b$5(parseInt(ne[3]+ne[3],16)/255,2):1}:{r:parseInt(ne.substring(0,2),16),g:parseInt(ne.substring(2,4),16),b:parseInt(ne.substring(4,6),16),a:ne.length===8?b$5(parseInt(ne.substring(6,8),16)/255,2):1}},w$4=function(ne){return K$2(I$2(ne))},y$6=function(ne){var oe=ne.s,ce=ne.v,ue=ne.a,pe=(200-oe)*ce/100;return{h:b$5(ne.h),s:b$5(pe>0&&pe<200?oe*ce/100/(pe<=100?pe:200-pe)*100:0),l:b$5(pe/2),a:b$5(ue,2)}},q$3=function(ne){var oe=y$6(ne);return"hsl("+oe.h+", "+oe.s+"%, "+oe.l+"%)"},I$2=function(ne){var oe=ne.h,ce=ne.s,ue=ne.v,pe=ne.a;oe=oe/360*6,ce/=100,ue/=100;var me=Math.floor(oe),ge=ue*(1-ce),ye=ue*(1-(oe-me)*ce),xe=ue*(1-(1-oe+me)*ce),ve=me%6;return{r:b$5(255*[ue,ye,ge,ge,xe,ue][ve]),g:b$5(255*[xe,ue,ue,ye,ge,ge][ve]),b:b$5(255*[ge,ge,xe,ue,ue,ye][ve]),a:b$5(pe,2)}},D$3=function(ne){var oe=ne.toString(16);return oe.length<2?"0"+oe:oe},K$2=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=pe<1?D$3(b$5(255*pe)):"";return"#"+D$3(oe)+D$3(ce)+D$3(ue)+me},L$3=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=Math.max(oe,ce,ue),ge=me-Math.min(oe,ce,ue),ye=ge?me===oe?(ce-ue)/ge:me===ce?2+(ue-oe)/ge:4+(oe-ce)/ge:0;return{h:b$5(60*(ye<0?ye+6:ye)),s:b$5(me?ge/me*100:0),v:b$5(me/255*100),a:pe}},S$5=React$2.memo(function(ne){var oe=ne.hue,ce=ne.onChange,ue=g$4(["react-colorful__hue",ne.className]);return React$2.createElement("div",{className:ue},React$2.createElement(m$3,{onMove:function(pe){ce({h:360*pe.left})},onKey:function(pe){ce({h:s$3(oe+360*pe.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$5(oe),"aria-valuemax":"360","aria-valuemin":"0"},React$2.createElement(p$5,{className:"react-colorful__hue-pointer",left:oe/360,color:q$3({h:oe,s:100,v:100,a:1})})))}),T$3=React$2.memo(function(ne){var oe=ne.hsva,ce=ne.onChange,ue={backgroundColor:q$3({h:oe.h,s:100,v:100,a:1})};return React$2.createElement("div",{className:"react-colorful__saturation",style:ue},React$2.createElement(m$3,{onMove:function(pe){ce({s:100*pe.left,v:100-100*pe.top})},onKey:function(pe){ce({s:s$3(oe.s+100*pe.left,0,100),v:s$3(oe.v-100*pe.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$5(oe.s)+"%, Brightness "+b$5(oe.v)+"%"},React$2.createElement(p$5,{className:"react-colorful__saturation-pointer",top:1-oe.v/100,left:oe.s/100,color:q$3(oe)})))}),F$2=function(ne,oe){if(ne===oe)return!0;for(var ce in ne)if(ne[ce]!==oe[ce])return!1;return!0},X$2=function(ne,oe){return ne.toLowerCase()===oe.toLowerCase()||F$2(C$3(ne),C$3(oe))};function Y$5(ne,oe,ce){var ue=i$4(ce),pe=reactExports.useState(function(){return ne.toHsva(oe)}),me=pe[0],ge=pe[1],ye=reactExports.useRef({color:oe,hsva:me});reactExports.useEffect(function(){if(!ne.equal(oe,ye.current.color)){var ve=ne.toHsva(oe);ye.current={hsva:ve,color:oe},ge(ve)}},[oe,ne]),reactExports.useEffect(function(){var ve;F$2(me,ye.current.hsva)||ne.equal(ve=ne.fromHsva(me),ye.current.color)||(ye.current={hsva:me,color:ve},ue(ve))},[me,ne,ue]);var xe=reactExports.useCallback(function(ve){ge(function(_e){return Object.assign({},_e,ve)})},[]);return[me,xe]}var V$2=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$4=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$2=new Map,Q$2=function(ne){V$2(function(){var oe=ne.current?ne.current.ownerDocument:document;if(oe!==void 0&&!J$2.has(oe)){var ce=oe.createElement("style");ce.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$2.set(oe,ce);var ue=$$4();ue&&ce.setAttribute("nonce",ue),oe.head.appendChild(ce)}},[])},U$2=function(ne){var oe=ne.className,ce=ne.colorModel,ue=ne.color,pe=ue===void 0?ce.defaultColor:ue,me=ne.onChange,ge=c$4(ne,["className","colorModel","color","onChange"]),ye=reactExports.useRef(null);Q$2(ye);var xe=Y$5(ce,pe,me),ve=xe[0],_e=xe[1],we=g$4(["react-colorful",oe]);return React$2.createElement("div",u$4({},ge,{ref:ye,className:we}),React$2.createElement(T$3,{hsva:ve,onChange:_e}),React$2.createElement(S$5,{hue:ve.h,onChange:_e,className:"react-colorful__last-control"}))},W$2={defaultColor:"000",toHsva:x$5,fromHsva:function(ne){return w$4({h:ne.h,s:ne.s,v:ne.v,a:1})},equal:X$2},Z$3=function(ne){return React$2.createElement(U$2,u$4({},ne,{colorModel:W$2}))};const byPoint=({variables:ne},{x:oe,y:ce})=>(ne==null?void 0:ne.x)===oe&&(ne==null?void 0:ne.y)===ce,getGridSymbolsUrl=""+new URL("getGridSymbols.worker-BM9IxXsn.js",import.meta.url).href;class GetGridSymbolsWorker extends Worker{constructor(){super(getGridSymbolsUrl,{type:"module"})}}const getGridSymbolsAsync=usingWorkerTask(GetGridSymbolsWorker),parseGridWorkerUrl=""+new URL("parseGrid.worker-CTnsDGUU.js",import.meta.url).href;class ParseGridWorker extends Worker{constructor(){super(parseGridWorkerUrl,{type:"module"})}}const parseGridAsync=usingMemoizedWorkerTask(ParseGridWorker);function useDebouncedState(ne,oe=lodashExports.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports.now());return[ue,ge=>{const ye=lodashExports.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge)}]}function useDebouncedState2(ne,oe=lodashExports.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports.now());return[ue,ge=>{const ye=lodashExports.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge(ue))}]}function between(ne,oe,ce){return ne>=oe&&ne({content:ne,...await parseGridAsync({map:ne,options:oe})}),{normalizer:JSON.stringify});function SymbolColorPicker(ne){const oe=compilerRuntimeExports.c(5),{onChange:ce,value:ue,autoValue:pe}=ne,[me,ge]=useDebouncedState(ue,ce),ye=me??pe;let xe;return oe[0]!==pe||oe[1]!==ye||oe[2]!==ge||oe[3]!==me?(xe=jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ve=>{var _e;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger(ve),children:jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:1,alignItems:"center",children:[jsxRuntimeExports.jsx(Box,{sx:{width:16,height:16,backgroundColor:ye,outline:_temp$t,borderRadius:4}}),me?lodashExports.startCase(((_e=getClosestColor(me))==null?void 0:_e.name)??"Custom"):"Auto"]})}),jsxRuntimeExports.jsxs(Popover,{transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},...bindPopover(ve),slotProps:{paper:{sx:{overflow:"visible"}}},children:[jsxRuntimeExports.jsx(Box,{sx:{px:2,py:1},children:jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{defaultChecked:!me,onChange:(we,Se)=>ge==null?void 0:ge(Se?void 0:pe)}),label:"Choose Automatically"})}),jsxRuntimeExports.jsx(Box,{sx:{p:2,pt:0,...!me&&{opacity:_temp2$l,pointerEvents:"none"}},children:jsxRuntimeExports.jsx(Z$3,{color:me??pe,onChange:ge})})]})]})}}),oe[0]=pe,oe[1]=ye,oe[2]=ge,oe[3]=me,oe[4]=xe):xe=oe[4],xe}function _temp2$l(ne){return ne.palette.action.disabledOpacity}function _temp$t(ne){return`1px solid ${ne.palette.divider}`}const editor$3=async ne=>{if(ne){const{symbols:oe}=await getGridSymbolsAsync({map:ne});return withProduce(({produce:ce,value:ue})=>{const{palette:pe}=useTheme(),me=lodashExports.flow(interpolate$1([pe.background.paper,pe.text.primary]),rgbToHex$3);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports.sortBy(oe,"value").map(({symbol:ge})=>{var ye,xe;return jsxRuntimeExports.jsx(Option,{label:`Tile color for "${ge}"`,content:jsxRuntimeExports.jsx(SymbolColorPicker,{value:(ye=ue==null?void 0:ue.symbols)==null?void 0:ye[ge],autoValue:me(((xe=lodashExports.find(oe,{symbol:ge}))==null?void 0:xe.value)??0),onChange:ve=>ce(_e=>{lodashExports.set(_e,`symbols["${ge}"]`,ve)})})},ge)})})})}else return()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},hydrate$3=ne=>{const{width:oe,height:ce}=ne.bounds;return{...ne,snap:({x:ue,y:pe},me=1)=>{const[ge,ye]=[lodashExports.round(-1+ue+me/2),lodashExports.round(-1+pe+me/2)];if(between(ge,0,oe)&&between(ye,0,ce))return{x:ge,y:ye}},nodeAt:ue=>{const{x:pe,y:me}=ue;return me*oe+pe},pointOf:ue=>({x:ue%oe,y:~~(ue/oe)}),matchNode:byPoint}},grid=Object.freeze(Object.defineProperty({__proto__:null,SymbolColorPicker,editor:editor$3,hydrate:hydrate$3,parse:parse$9},Symbol.toStringTag,{value:"Module"})),parseMeshWorkerUrl=""+new URL("parseMesh.worker-BqXfsHv6.js",import.meta.url).href;class ParseMeshWorker extends Worker{constructor(){super(parseMeshWorkerUrl,{type:"module"})}}const parseMeshAsync=usingMemoizedWorkerTask(ParseMeshWorker),parse$8=memoizee$1(async(ne="",oe)=>await parseMeshAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$2=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor$2=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),mesh=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$2,hydrate:hydrate$2,parse:parse$8},Symbol.toStringTag,{value:"Module"})),parseNetworkWorkerUrl=""+new URL("parseNetwork.worker-CBxoD6o6.js",import.meta.url).href;class ParseNetworkWorker extends Worker{constructor(){super(parseNetworkWorkerUrl,{type:"module"})}}const parseNetworkAsync=usingMemoizedWorkerTask(ParseNetworkWorker),parse$7=memoizee$1(async(ne="",oe)=>await parseNetworkAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$1=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor$1=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),xy=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$1,hydrate:hydrate$1,parse:parse$7},Symbol.toStringTag,{value:"Module"})),parsePolyWorkerUrl=""+new URL("parsePoly.worker-CFQGo0UP.js",import.meta.url).href;class ParsePolyWorker extends Worker{constructor(){super(parsePolyWorkerUrl,{type:"module"})}}const parsePolyAsync=usingMemoizedWorkerTask(ParsePolyWorker),parse$6=memoizee$1(async(ne="",oe)=>await parsePolyAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),poly=Object.freeze(Object.defineProperty({__proto__:null,editor,hydrate,parse:parse$6},Symbol.toStringTag,{value:"Module"})),mapParsers={grid,map:grid,xy,mesh,poly};function getParser(ne=""){return mapParsers[ne]}const defaultGuard=lodashExports.constant(!0),[useLayers,LayersProvider]=createSlice({layers:[]});function useLayer(ne,oe){const ce=compilerRuntimeExports.c(21),ue=oe===void 0?defaultGuard:oe,[pe,me]=reactExports.useState(ne),[ge,ye]=useLayers(),{layers:xe}=ge;let ve,_e;ce[0]!==ue||ce[1]!==pe||ce[2]!==xe?(ve=lodashExports.filter(xe,ue),_e=pe?lodashExports.find(ve,{key:pe})??lodashExports.head(ve):lodashExports.head(ve),ce[0]=ue,ce[1]=pe,ce[2]=xe,ce[3]=ve,ce[4]=_e):(ve=ce[3],_e=ce[4]);const we=_e;let Se,$e;ce[5]!==ne?(Se=()=>{me(ne)},$e=[ne],ce[5]=ne,ce[6]=Se,ce[7]=$e):(Se=ce[6],$e=ce[7]),reactExports.useEffect(Se,$e);let Te,Re;ce[8]!==pe||ce[9]!==we?(Te=()=>{we&&we.key!==pe&&me(we.key)},Re=[we,pe,me],ce[8]=pe,ce[9]=we,ce[10]=Te,ce[11]=Re):(Te=ce[10],Re=ce[11]),reactExports.useEffect(Te,Re);let Ae;const ke=we==null?void 0:we.key;let Be;ce[12]!==we||ce[13]!==ye?(Be=Ne=>{const je={...we,...Ne};ye(ze=>{const{layers:Ue}=ze;return{layers:lodashExports.map(Ue,qe=>qe.key===je.key?je:qe)}})},ce[12]=we,ce[13]=ye,ce[14]=Be):Be=ce[14];let Ie;return ce[15]!==ve||ce[16]!==we||ce[17]!==xe||ce[18]!==ke||ce[19]!==Be?(Ie={key:ke,setKey:me,layer:we,setLayer:Be,layers:ve,allLayers:xe},ce[15]=ve,ce[16]=we,ce[17]=xe,ce[18]=ke,ce[19]=Be,ce[20]=Ie):Ie=ce[20],Ae=Ie,Ae}const shouldBreak={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"},{name:"parent",type:"any"},{name:"children",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},templates={shouldBreak},fn=memoizee$1((ne,oe)=>new Function("params",`${ne}; return ${oe}.apply(null, params);`));function call$2(ne,oe,ce){try{return fn(ne,oe)(ce)}catch{return templates[oe].defaultReturnValue}}function _extends(){return _extends=Object.assign||function(ne){for(var oe=1;oeawait treeAsync$1(ne),ue=[ne],oe[0]=ne,oe[1]=ce,oe[2]=ue):(ce=oe[1],ue=oe[2]),useAsync(ce,ue)}function useTreeMemo$1(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree$1(ce)}function useBreakpoints(ne){var _e;const{layer:oe}=useLayer(ne),{isTrusted:ce}=useUntrustedLayers(),{monotonicF:ue,monotonicG:pe,breakpoints:me,code:ge,trace:ye}=(oe==null?void 0:oe.source)??{},xe=ye==null?void 0:ye.content,{result:ve}=useTreeMemo$1({trace:xe,step:(_e=xe==null?void 0:xe.events)==null?void 0:_e.length,radius:void 0},[xe]);return reactExports.useMemo(()=>{const we=(xe==null?void 0:xe.events)??[],Se=treeToDict((ve==null?void 0:ve.tree)??[]);return memoizee$1($e=>{var Re,Ae;const Te=we[$e];if(Te)try{for(const{active:ke,condition:Be,type:Ie,property:Ne="",reference:je=0}of me??[]){const ze=!Ie||Ie===Te.type;if(ke&&ze&&(()=>{var qe;return(qe=Be==null?void 0:Be.apply)==null?void 0:qe.call(Be,{type:Ie,event:Te,property:Ne,value:lodashExports.get(Te,Ne),reference:je,step:$e,events:we,node:Se[$e]})})())return Be!=null&&Be.needsReference?{result:`${Ne} ${lodashExports.toLower(lodashExports.startCase(Be==null?void 0:Be.key))} ${je}`}:{result:`${Ne} ${lodashExports.toLower(lodashExports.startCase(Be==null?void 0:Be.key))}`}}if(ce&&call$2(ge??"","shouldBreak",[$e,Te,we,(Re=Se[$e])==null?void 0:Re.parent,((Ae=Se[$e])==null?void 0:Ae.children)??[]]))return{result:"Script editor"}}catch(ke){return{error:`${ke}`}}return{result:""}})},[ce,ge,xe,me,ue,pe,ve])}function treeToDict(ne=[],oe={}){for(const ce of ne){for(const ue of ce.events)oe[ue.step]=ce;treeToDict(ce.children,oe)}return oe}function cancellable(ne,oe){let ce=!1;return requestAnimationFrame(async()=>{const ue=await ne();ce||oe(ue)}),()=>{ce=!0}}function usePlaybackState(ne){const{layer:oe,setLayer:ce,setKey:ue}=useLayer(ne),pe=useSnackbar(),me=useBreakpoints(ne);reactExports.useEffect(()=>{ne&&ue(ne)},[ne]);const{playback:ge,playbackTo:ye,step:xe=0}=(oe==null?void 0:oe.source)??{},ve=lodashExports.min([ye,xe])??0,_e=!!ye,we=ge==="playing",[Se,$e]=[0,(ye??1)-1];return reactExports.useMemo(()=>{function Te(ze){ce(produce(oe,Ue=>lodashExports.set(Ue,"source",{...Ue==null?void 0:Ue.source,...ze})))}const Re={start:Se,end:$e,step:ve,canPlay:_e&&!we&&ve<$e,canPause:_e&&we,canStop:_e&&ve,canStepForward:_e&&!we&&ve<$e,canStepBackward:_e&&!we&&ve>0},Ae=(ze=0)=>{Te({playback:"paused",step:Ne(ze)})},ke=(ze=1)=>Te({playback:"playing",step:Ne(ze)}),Be=(ze,Ue=0)=>cancellable(async()=>{for(const qe of lodashExports.range(Ue,ze)){const Ke=me(ve+qe);if(Ke.result||Ke.error)return{...Ke,offset:qe}}return{result:"",offset:0,error:void 0}},({result:qe,offset:Ke,error:Ge})=>{Ge?(pe(`${lodashExports.trimEnd(Ge,".")}`,`Step ${ve+Ke}`),Ae()):qe?(pe(`Breakpoint hit: ${qe}`,`Step ${ve+Ke}`),Ae(Ke)):ke(ze)}),Ie=(ze=1)=>{var qe;let Ue;for(Ue=ve+ze;Ue<=$e&&Ue>=0&&!((qe=me(Ue))!=null&&qe.result);Ue+=ze);return Ue},Ne=ze=>lodashExports.clamp(ve+ze,Se,$e);return{playing:ge==="playing",...Re,...{play:()=>{Te({playback:"playing",step:Ne(1)})},pause:Ae,stepTo:(ze=0)=>Te({step:lodashExports.clamp(ze,Se,$e)}),stop:()=>Te({step:Se,playback:"paused"}),stepForward:()=>Te({step:Ne(1)}),stepBackward:()=>Te({step:Ne(-1)}),tick:ke,findBreakpoint:Ie,stepWithBreakpointCheck:Be}}},[$e,ge,we,_e,Se,ve,ce])}function RenderLayer(ne){var ge;const oe=compilerRuntimeExports.c(5),{layer:ce,index:ue}=ne;let pe;oe[0]!==ue||oe[1]!==ce?(pe=ce&&reactExports.createElement((ge=getController(ce))==null?void 0:ge.renderer,{layer:ce,index:ue}),oe[0]=ue,oe[1]=ce,oe[2]=pe):pe=oe[2];let me;return oe[3]!==pe?(me=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:pe}),oe[3]=pe,oe[4]=me):me=oe[4],me}const[useRenderers,RendererProvider]=createSlice([],{reduce:replace$1}),removeUndefinedValues=ne=>lodashExports.omit(ne,lodashExports.filter(lodashExports.keys(ne),oe=>lodashExports.isUndefined(ne[oe]))),[useScreenshots,ScreenshotsProvider]=createSlice({},{reduce:lodashExports.flow(merge$6,removeUndefinedValues)});var events={exports:{}},R$3=typeof Reflect=="object"?Reflect:null,ReflectApply=R$3&&typeof R$3.apply=="function"?R$3.apply:function(oe,ce,ue){return Function.prototype.apply.call(oe,ce,ue)},ReflectOwnKeys;R$3&&typeof R$3.ownKeys=="function"?ReflectOwnKeys=R$3.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe).concat(Object.getOwnPropertySymbols(oe))}:ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe)};function ProcessEmitWarning(ne){console&&console.warn&&console.warn(ne)}var NumberIsNaN=Number.isNaN||function(oe){return oe!==oe};function EventEmitter$3(){EventEmitter$3.init.call(this)}events.exports=EventEmitter$3;events.exports.once=once;EventEmitter$3.EventEmitter=EventEmitter$3;EventEmitter$3.prototype._events=void 0;EventEmitter$3.prototype._eventsCount=0;EventEmitter$3.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(ne){if(typeof ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ne)}Object.defineProperty(EventEmitter$3,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(ne){if(typeof ne!="number"||ne<0||NumberIsNaN(ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ne+".");defaultMaxListeners=ne}});EventEmitter$3.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$3.prototype.setMaxListeners=function(oe){if(typeof oe!="number"||oe<0||NumberIsNaN(oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+oe+".");return this._maxListeners=oe,this};function _getMaxListeners(ne){return ne._maxListeners===void 0?EventEmitter$3.defaultMaxListeners:ne._maxListeners}EventEmitter$3.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$3.prototype.emit=function(oe){for(var ce=[],ue=1;ue0&&(ge=ce[0]),ge instanceof Error)throw ge;var ye=new Error("Unhandled error."+(ge?" ("+ge.message+")":""));throw ye.context=ge,ye}var xe=me[oe];if(xe===void 0)return!1;if(typeof xe=="function")ReflectApply(xe,this,ce);else for(var ve=xe.length,_e=arrayClone(xe,ve),ue=0;ue0&&ge.length>pe&&!ge.warned){ge.warned=!0;var ye=new Error("Possible EventEmitter memory leak detected. "+ge.length+" "+String(oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");ye.name="MaxListenersExceededWarning",ye.emitter=ne,ye.type=oe,ye.count=ge.length,ProcessEmitWarning(ye)}return ne}EventEmitter$3.prototype.addListener=function(oe,ce){return _addListener(this,oe,ce,!1)};EventEmitter$3.prototype.on=EventEmitter$3.prototype.addListener;EventEmitter$3.prototype.prependListener=function(oe,ce){return _addListener(this,oe,ce,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(ne,oe,ce){var ue={fired:!1,wrapFn:void 0,target:ne,type:oe,listener:ce},pe=onceWrapper.bind(ue);return pe.listener=ce,ue.wrapFn=pe,pe}EventEmitter$3.prototype.once=function(oe,ce){return checkListener(ce),this.on(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.prependOnceListener=function(oe,ce){return checkListener(ce),this.prependListener(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.removeListener=function(oe,ce){var ue,pe,me,ge,ye;if(checkListener(ce),pe=this._events,pe===void 0)return this;if(ue=pe[oe],ue===void 0)return this;if(ue===ce||ue.listener===ce)--this._eventsCount===0?this._events=Object.create(null):(delete pe[oe],pe.removeListener&&this.emit("removeListener",oe,ue.listener||ce));else if(typeof ue!="function"){for(me=-1,ge=ue.length-1;ge>=0;ge--)if(ue[ge]===ce||ue[ge].listener===ce){ye=ue[ge].listener,me=ge;break}if(me<0)return this;me===0?ue.shift():spliceOne(ue,me),ue.length===1&&(pe[oe]=ue[0]),pe.removeListener!==void 0&&this.emit("removeListener",oe,ye||ce)}return this};EventEmitter$3.prototype.off=EventEmitter$3.prototype.removeListener;EventEmitter$3.prototype.removeAllListeners=function(oe){var ce,ue,pe;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[oe]),this;if(arguments.length===0){var me=Object.keys(ue),ge;for(pe=0;pe=0;pe--)this.removeListener(oe,ce[pe]);return this};function _listeners(ne,oe,ce){var ue=ne._events;if(ue===void 0)return[];var pe=ue[oe];return pe===void 0?[]:typeof pe=="function"?ce?[pe.listener||pe]:[pe]:ce?unwrapListeners(pe):arrayClone(pe,pe.length)}EventEmitter$3.prototype.listeners=function(oe){return _listeners(this,oe,!0)};EventEmitter$3.prototype.rawListeners=function(oe){return _listeners(this,oe,!1)};EventEmitter$3.listenerCount=function(ne,oe){return typeof ne.listenerCount=="function"?ne.listenerCount(oe):listenerCount.call(ne,oe)};EventEmitter$3.prototype.listenerCount=listenerCount;function listenerCount(ne){var oe=this._events;if(oe!==void 0){var ce=oe[ne];if(typeof ce=="function")return 1;if(ce!==void 0)return ce.length}return 0}EventEmitter$3.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(ne,oe){for(var ce=new Array(oe),ue=0;ue=oe?{done:!0}:{done:!1,value:ne[ce++]}})};Iterator$2.empty=function(){var ne=new Iterator$2(function(){return{done:!0}});return ne};Iterator$2.fromSequence=function(ne){var oe=0,ce=ne.length;return new Iterator$2(function(){return oe>=ce?{done:!0}:{done:!1,value:ne[oe++]}})};Iterator$2.is=function(ne){return ne instanceof Iterator$2?!0:typeof ne=="object"&&ne!==null&&typeof ne.next=="function"};var iterator=Iterator$2;const Iterator$3=getDefaultExportFromCjs$1(iterator);var support$1={};support$1.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";support$1.SYMBOL_SUPPORT=typeof Symbol<"u";var Iterator$1=iterator,support=support$1,ARRAY_BUFFER_SUPPORT=support.ARRAY_BUFFER_SUPPORT,SYMBOL_SUPPORT=support.SYMBOL_SUPPORT;function iterOrNull(ne){return typeof ne=="string"||Array.isArray(ne)||ARRAY_BUFFER_SUPPORT&&ArrayBuffer.isView(ne)?Iterator$1.fromSequence(ne):typeof ne!="object"||ne===null?null:SYMBOL_SUPPORT&&typeof ne[Symbol.iterator]=="function"?ne[Symbol.iterator]():typeof ne.next=="function"?ne:null}var iter$2=function(oe){var ce=iterOrNull(oe);if(!ce)throw new Error("obliterator: target is not iterable nor a valid iterator.");return ce},iter$1=iter$2,take=function(oe,ce){for(var ue=arguments.length>1?ce:1/0,pe=ue!==1/0?new Array(ue):[],me,ge=0,ye=iter$1(oe);;){if(ge===ue)return pe;if(me=ye.next(),me.done)return ge!==ce&&(pe.length=ge),pe;pe[ge++]=me.value}};const take$1=getDefaultExportFromCjs$1(take);var Iterator=iterator,iter=iter$2,chain=function(){var oe=arguments,ce=null,ue=-1;return new Iterator(function(){var me=null;do{if(ce===null){if(ue++,ue>=oe.length)return{done:!0};ce=iter(oe[ue])}if(me=ce.next(),me.done===!0){ce=null;continue}break}while(!0);return me})};const chain$1=getDefaultExportFromCjs$1(chain);function assignPolyfill(){const ne=arguments[0];for(let oe=1,ce=arguments.length;oene++}class GraphError extends Error{constructor(oe){super(),this.name="GraphError",this.message=oe}}class InvalidArgumentsGraphError extends GraphError{constructor(oe){super(oe),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,InvalidArgumentsGraphError.prototype.constructor)}}class NotFoundGraphError extends GraphError{constructor(oe){super(oe),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,NotFoundGraphError.prototype.constructor)}}class UsageGraphError extends GraphError{constructor(oe){super(oe),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,UsageGraphError.prototype.constructor)}}function MixedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}MixedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function DirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}DirectedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function UndirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}UndirectedNodeData.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function EdgeData(ne,oe,ce,ue,pe){this.key=oe,this.attributes=pe,this.undirected=ne,this.source=ce,this.target=ue}EdgeData.prototype.attach=function(){let ne="out",oe="in";this.undirected&&(ne=oe="undirected");const ce=this.source.key,ue=this.target.key;this.source[ne][ue]=this,!(this.undirected&&ce===ue)&&(this.target[oe][ce]=this)};EdgeData.prototype.attachMulti=function(){let ne="out",oe="in";const ce=this.source.key,ue=this.target.key;this.undirected&&(ne=oe="undirected");const pe=this.source[ne],me=pe[ue];if(typeof me>"u"){pe[ue]=this,this.undirected&&ce===ue||(this.target[oe][ce]=this);return}me.previous=this,this.next=me,pe[ue]=this,this.target[oe][ce]=this};EdgeData.prototype.detach=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),delete this.source[ce][oe],delete this.target[ue][ne]};EdgeData.prototype.detachMulti=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[ce][oe],delete this.target[ue][ne]):(this.next.previous=void 0,this.source[ce][oe]=this.next,this.target[ue][ne]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const NODE=0,SOURCE=1,TARGET=2,OPPOSITE=3;function findRelevantNodeData(ne,oe,ce,ue,pe,me,ge){let ye,xe,ve,_e;if(ue=""+ue,ce===NODE){if(ye=ne._nodes.get(ue),!ye)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" node in the graph.`);ve=pe,_e=me}else if(ce===OPPOSITE){if(pe=""+pe,xe=ne._edges.get(pe),!xe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${pe}" edge in the graph.`);const we=xe.source.key,Se=xe.target.key;if(ue===we)ye=xe.target;else if(ue===Se)ye=xe.source;else throw new NotFoundGraphError(`Graph.${oe}: the "${ue}" node is not attached to the "${pe}" edge (${we}, ${Se}).`);ve=me,_e=ge}else{if(xe=ne._edges.get(ue),!xe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`);ce===SOURCE?ye=xe.source:ye=xe.target,ve=pe,_e=me}return[ye,ve,_e]}function attachNodeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes[ye]}}function attachNodeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){const[me]=findRelevantNodeData(this,oe,ce,ue,pe);return me.attributes}}function attachNodeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes.hasOwnProperty(ye)}}function attachNodeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,xe,ve]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);return ye.attributes[xe]=ve,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:xe}),this}}function attachNodeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,xe,ve]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);if(typeof ve!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);const _e=ye.attributes,we=ve(_e[xe]);return _e[xe]=we,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:xe}),this}}function attachNodeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return delete ge.attributes[ye],this.emit("nodeAttributesUpdated",{key:ge.key,type:"remove",attributes:ge.attributes,name:ye}),this}}function attachNodeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return ge.attributes=ye,this.emit("nodeAttributesUpdated",{key:ge.key,type:"replace",attributes:ge.attributes}),this}}function attachNodeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$3(ge.attributes,ye),this.emit("nodeAttributesUpdated",{key:ge.key,type:"merge",attributes:ge.attributes,data:ye}),this}}function attachNodeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return ge.attributes=ye(ge.attributes),this.emit("nodeAttributesUpdated",{key:ge.key,type:"update",attributes:ge.attributes}),this}}const NODE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachNodeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachNodeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachNodeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachNodeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachNodeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachNodeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachNodeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachNodeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachNodeAttributesUpdater}];function attachNodeAttributesMethods(ne){NODE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Node"),NODE),ce(ne,oe("Source"),SOURCE),ce(ne,oe("Target"),TARGET),ce(ne,oe("Opposite"),OPPOSITE)})}function attachEdgeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes[pe]}}function attachEdgeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue){let pe;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const me=""+ue,ge=""+arguments[1];if(pe=getMatchingEdge(this,me,ge,ce),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${me}" - "${ge}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,pe=this._edges.get(ue),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return pe.attributes}}function attachEdgeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes.hasOwnProperty(pe)}}function attachEdgeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,xe=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,xe,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${xe}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return ge.attributes[pe]=me,this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,xe=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,xe,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${xe}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof me!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);return ge.attributes[pe]=me(ge.attributes[pe]),this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return delete me.attributes[pe],this.emit("edgeAttributesUpdated",{key:me.key,type:"remove",attributes:me.attributes,name:pe}),this}}function attachEdgeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$1(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return me.attributes=pe,this.emit("edgeAttributesUpdated",{key:me.key,type:"replace",attributes:me.attributes}),this}}function attachEdgeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$1(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$3(me.attributes,pe),this.emit("edgeAttributesUpdated",{key:me.key,type:"merge",attributes:me.attributes,data:pe}),this}}function attachEdgeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof pe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return me.attributes=pe(me.attributes),this.emit("edgeAttributesUpdated",{key:me.key,type:"update",attributes:me.attributes}),this}}const EDGE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachEdgeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachEdgeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachEdgeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachEdgeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachEdgeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachEdgeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachEdgeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachEdgeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachEdgeAttributesUpdater}];function attachEdgeAttributesMethods(ne){EDGE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Edge"),"mixed"),ce(ne,oe("DirectedEdge"),"directed"),ce(ne,oe("UndirectedEdge"),"undirected")})}const EDGES_ITERATION=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function forEachSimple(ne,oe,ce,ue){let pe=!1;for(const me in oe){if(me===ue)continue;const ge=oe[me];if(pe=ce(ge.key,ge.attributes,ge.source.key,ge.target.key,ge.source.attributes,ge.target.attributes,ge.undirected),ne&&pe)return ge.key}}function forEachMulti(ne,oe,ce,ue){let pe,me,ge,ye=!1;for(const xe in oe)if(xe!==ue){pe=oe[xe];do{if(me=pe.source,ge=pe.target,ye=ce(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected),ne&&ye)return pe.key;pe=pe.next}while(pe!==void 0)}}function createIterator(ne,oe){const ce=Object.keys(ne),ue=ce.length;let pe,me=0;return new Iterator$3(function(){do if(pe)pe=pe.next;else{if(me>=ue)return{done:!0};const ye=ce[me++];if(ye===oe){pe=void 0;continue}pe=ne[ye]}while(!pe);return{done:!1,value:{edge:pe.key,attributes:pe.attributes,source:pe.source.key,target:pe.target.key,sourceAttributes:pe.source.attributes,targetAttributes:pe.target.attributes,undirected:pe.undirected}}})}function forEachForKeySimple(ne,oe,ce,ue){const pe=oe[ce];if(!pe)return;const me=pe.source,ge=pe.target;if(ue(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected)&&ne)return pe.key}function forEachForKeyMulti(ne,oe,ce,ue){let pe=oe[ce];if(!pe)return;let me=!1;do{if(me=ue(pe.key,pe.attributes,pe.source.key,pe.target.key,pe.source.attributes,pe.target.attributes,pe.undirected),ne&&me)return pe.key;pe=pe.next}while(pe!==void 0)}function createIteratorForKey(ne,oe){let ce=ne[oe];return ce.next!==void 0?new Iterator$3(function(){if(!ce)return{done:!0};const ue={edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected};return ce=ce.next,{done:!1,value:ue}}):Iterator$3.of({edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected})}function createEdgeArray(ne,oe){if(ne.size===0)return[];if(oe==="mixed"||oe===ne.type)return typeof Array.from=="function"?Array.from(ne._edges.keys()):take$1(ne._edges.keys(),ne._edges.size);const ce=oe==="undirected"?ne.undirectedSize:ne.directedSize,ue=new Array(ce),pe=oe==="undirected",me=ne._edges.values();let ge=0,ye,xe;for(;ye=me.next(),ye.done!==!0;)xe=ye.value,xe.undirected===pe&&(ue[ge++]=xe.key);return ue}function forEachEdge(ne,oe,ce,ue){if(oe.size===0)return;const pe=ce!=="mixed"&&ce!==oe.type,me=ce==="undirected";let ge,ye,xe=!1;const ve=oe._edges.values();for(;ge=ve.next(),ge.done!==!0;){if(ye=ge.value,pe&&ye.undirected!==me)continue;const{key:_e,attributes:we,source:Se,target:$e}=ye;if(xe=ue(_e,we,Se.key,$e.key,Se.attributes,$e.attributes,ye.undirected),ne&&xe)return _e}}function createEdgeIterator(ne,oe){if(ne.size===0)return Iterator$3.empty();const ce=oe!=="mixed"&&oe!==ne.type,ue=oe==="undirected",pe=ne._edges.values();return new Iterator$3(function(){let ge,ye;for(;;){if(ge=pe.next(),ge.done)return ge;if(ye=ge.value,!(ce&&ye.undirected!==ue))break}return{value:{edge:ye.key,attributes:ye.attributes,source:ye.source.key,target:ye.target.key,sourceAttributes:ye.source.attributes,targetAttributes:ye.target.attributes,undirected:ye.undirected},done:!1}})}function forEachEdgeForNode(ne,oe,ce,ue,pe,me){const ge=oe?forEachMulti:forEachSimple;let ye;if(ce!=="undirected"&&(ue!=="out"&&(ye=ge(ne,pe.in,me),ne&&ye)||ue!=="in"&&(ye=ge(ne,pe.out,me,ue?void 0:pe.key),ne&&ye))||ce!=="directed"&&(ye=ge(ne,pe.undirected,me),ne&&ye))return ye}function createEdgeArrayForNode(ne,oe,ce,ue){const pe=[];return forEachEdgeForNode(!1,ne,oe,ce,ue,function(me){pe.push(me)}),pe}function createEdgeIteratorForNode(ne,oe,ce){let ue=Iterator$3.empty();return ne!=="undirected"&&(oe!=="out"&&typeof ce.in<"u"&&(ue=chain$1(ue,createIterator(ce.in))),oe!=="in"&&typeof ce.out<"u"&&(ue=chain$1(ue,createIterator(ce.out,oe?void 0:ce.key)))),ne!=="directed"&&typeof ce.undirected<"u"&&(ue=chain$1(ue,createIterator(ce.undirected))),ue}function forEachEdgeForPath(ne,oe,ce,ue,pe,me,ge){const ye=ce?forEachForKeyMulti:forEachForKeySimple;let xe;if(oe!=="undirected"&&(typeof pe.in<"u"&&ue!=="out"&&(xe=ye(ne,pe.in,me,ge),ne&&xe)||typeof pe.out<"u"&&ue!=="in"&&(ue||pe.key!==me)&&(xe=ye(ne,pe.out,me,ge),ne&&xe))||oe!=="directed"&&typeof pe.undirected<"u"&&(xe=ye(ne,pe.undirected,me,ge),ne&&xe))return xe}function createEdgeArrayForPath(ne,oe,ce,ue,pe){const me=[];return forEachEdgeForPath(!1,ne,oe,ce,ue,pe,function(ge){me.push(ge)}),me}function createEdgeIteratorForPath(ne,oe,ce,ue){let pe=Iterator$3.empty();return ne!=="undirected"&&(typeof ce.in<"u"&&oe!=="out"&&ue in ce.in&&(pe=chain$1(pe,createIteratorForKey(ce.in,ue))),typeof ce.out<"u"&&oe!=="in"&&ue in ce.out&&(oe||ce.key!==ue)&&(pe=chain$1(pe,createIteratorForKey(ce.out,ue)))),ne!=="directed"&&typeof ce.undirected<"u"&&ue in ce.undirected&&(pe=chain$1(pe,createIteratorForKey(ce.undirected,ue))),pe}function attachEdgeArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me,ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];if(!arguments.length)return createEdgeArray(this,ue);if(arguments.length===1){me=""+me;const ye=this._nodes.get(me);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createEdgeArrayForNode(this.multi,ue==="mixed"?this.type:ue,pe,ye)}if(arguments.length===2){me=""+me,ge=""+ge;const ye=this._nodes.get(me);if(!ye)throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" source node in the graph.`);if(!this._nodes.has(ge))throw new NotFoundGraphError(`Graph.${ce}: could not find the "${ge}" target node in the graph.`);return createEdgeArrayForPath(ue,this.multi,pe,ye,ge)}throw new InvalidArgumentsGraphError(`Graph.${ce}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachForEachEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,_e,we){if(!(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)){if(arguments.length===1)return we=ve,forEachEdge(!1,this,ue,we);if(arguments.length===2){ve=""+ve,we=_e;const Se=this._nodes.get(ve);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);return forEachEdgeForNode(!1,this.multi,ue==="mixed"?this.type:ue,pe,Se,we)}if(arguments.length===3){ve=""+ve,_e=""+_e;const Se=this._nodes.get(ve);if(!Se)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" source node in the graph.`);if(!this._nodes.has(_e))throw new NotFoundGraphError(`Graph.${me}: could not find the "${_e}" target node in the graph.`);return forEachEdgeForPath(!1,ue,this.multi,pe,Se,_e,we)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(){const ve=Array.prototype.slice.call(arguments),_e=ve.pop();let we;if(ve.length===0){let Se=0;ue!=="directed"&&(Se+=this.undirectedSize),ue!=="undirected"&&(Se+=this.directedSize),we=new Array(Se);let $e=0;ve.push((Te,Re,Ae,ke,Be,Ie,Ne)=>{we[$e++]=_e(Te,Re,Ae,ke,Be,Ie,Ne)})}else we=[],ve.push((Se,$e,Te,Re,Ae,ke,Be)=>{we.push(_e(Se,$e,Te,Re,Ae,ke,Be))});return this[me].apply(this,ve),we};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(){const ve=Array.prototype.slice.call(arguments),_e=ve.pop(),we=[];return ve.push((Se,$e,Te,Re,Ae,ke,Be)=>{_e(Se,$e,Te,Re,Ae,ke,Be)&&we.push(Se)}),this[me].apply(this,ve),we};const xe="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[xe]=function(){let ve=Array.prototype.slice.call(arguments);if(ve.length<2||ve.length>4)throw new InvalidArgumentsGraphError(`Graph.${xe}: invalid number of arguments (expecting 2, 3 or 4 and got ${ve.length}).`);if(typeof ve[ve.length-1]=="function"&&typeof ve[ve.length-2]!="function")throw new InvalidArgumentsGraphError(`Graph.${xe}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let _e,we;ve.length===2?(_e=ve[0],we=ve[1],ve=[]):ve.length===3?(_e=ve[1],we=ve[2],ve=[ve[0]]):ve.length===4&&(_e=ve[2],we=ve[3],ve=[ve[0],ve[1]]);let Se=we;return ve.push(($e,Te,Re,Ae,ke,Be,Ie)=>{Se=_e(Se,$e,Te,Re,Ae,ke,Be,Ie)}),this[me].apply(this,ve),Se}}function attachFindEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="find"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return!1;if(arguments.length===1)return _e=xe,forEachEdge(!0,this,ue,_e);if(arguments.length===2){xe=""+xe,_e=ve;const we=this._nodes.get(xe);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);return forEachEdgeForNode(!0,this.multi,ue==="mixed"?this.type:ue,pe,we,_e)}if(arguments.length===3){xe=""+xe,ve=""+ve;const we=this._nodes.get(xe);if(!we)throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" source node in the graph.`);if(!this._nodes.has(ve))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" target node in the graph.`);return forEachEdgeForPath(!0,ue,this.multi,pe,we,ve,_e)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const ge="some"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ge]=function(){const xe=Array.prototype.slice.call(arguments),ve=xe.pop();return xe.push((we,Se,$e,Te,Re,Ae,ke)=>ve(we,Se,$e,Te,Re,Ae,ke)),!!this[me].apply(this,xe)};const ye="every"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ye]=function(){const xe=Array.prototype.slice.call(arguments),ve=xe.pop();return xe.push((we,Se,$e,Te,Re,Ae,ke)=>!ve(we,Se,$e,Te,Re,Ae,ke)),!this[me].apply(this,xe)}}function attachEdgeIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge,ye){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();if(!arguments.length)return createEdgeIterator(this,ue);if(arguments.length===1){ge=""+ge;const xe=this._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createEdgeIteratorForNode(ue,pe,xe)}if(arguments.length===2){ge=""+ge,ye=""+ye;const xe=this._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" source node in the graph.`);if(!this._nodes.has(ye))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ye}" target node in the graph.`);return createEdgeIteratorForPath(ue,pe,xe,ye)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachEdgeIterationMethods(ne){EDGES_ITERATION.forEach(oe=>{attachEdgeArrayCreator(ne,oe),attachForEachEdge(ne,oe),attachFindEdge(ne,oe),attachEdgeIteratorCreator(ne,oe)})}const NEIGHBORS_ITERATION=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function CompositeSetWrapper(){this.A=null,this.B=null}CompositeSetWrapper.prototype.wrap=function(ne){this.A===null?this.A=ne:this.B===null&&(this.B=ne)};CompositeSetWrapper.prototype.has=function(ne){return this.A!==null&&ne in this.A||this.B!==null&&ne in this.B};function forEachInObjectOnce(ne,oe,ce,ue,pe){for(const me in ue){const ge=ue[me],ye=ge.source,xe=ge.target,ve=ye===ce?xe:ye;if(oe&&oe.has(ve.key))continue;const _e=pe(ve.key,ve.attributes);if(ne&&_e)return ve.key}}function forEachNeighbor(ne,oe,ce,ue,pe){if(oe!=="mixed"){if(oe==="undirected")return forEachInObjectOnce(ne,null,ue,ue.undirected,pe);if(typeof ce=="string")return forEachInObjectOnce(ne,null,ue,ue[ce],pe)}const me=new CompositeSetWrapper;let ge;if(oe!=="undirected"){if(ce!=="out"){if(ge=forEachInObjectOnce(ne,null,ue,ue.in,pe),ne&&ge)return ge;me.wrap(ue.in)}if(ce!=="in"){if(ge=forEachInObjectOnce(ne,me,ue,ue.out,pe),ne&&ge)return ge;me.wrap(ue.out)}}if(oe!=="directed"&&(ge=forEachInObjectOnce(ne,me,ue,ue.undirected,pe),ne&&ge))return ge}function createNeighborArrayForNode(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return Object.keys(ce.undirected);if(typeof oe=="string")return Object.keys(ce[oe])}const ue=[];return forEachNeighbor(!1,ne,oe,ce,function(pe){ue.push(pe)}),ue}function createDedupedObjectIterator(ne,oe,ce){const ue=Object.keys(ce),pe=ue.length;let me=0;return new Iterator$3(function(){let ye=null;do{if(me>=pe)return ne&&ne.wrap(ce),{done:!0};const xe=ce[ue[me++]],ve=xe.source,_e=xe.target;if(ye=ve===oe?_e:ve,ne&&ne.has(ye.key)){ye=null;continue}}while(ye===null);return{done:!1,value:{neighbor:ye.key,attributes:ye.attributes}}})}function createNeighborIterator(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return createDedupedObjectIterator(null,ce,ce.undirected);if(typeof oe=="string")return createDedupedObjectIterator(null,ce,ce[oe])}let ue=Iterator$3.empty();const pe=new CompositeSetWrapper;return ne!=="undirected"&&(oe!=="out"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.in))),oe!=="in"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.out)))),ne!=="directed"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.undirected))),ue}function attachNeighborArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];me=""+me;const ge=this._nodes.get(me);if(typeof ge>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createNeighborArrayForNode(ue==="mixed"?this.type:ue,pe,ge)}}function attachForEachNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;ve=""+ve;const we=this._nodes.get(ve);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);forEachNeighbor(!1,ue==="mixed"?this.type:ue,pe,we,_e)};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(ve,_e){const we=[];return this[me](ve,(Se,$e)=>{we.push(_e(Se,$e))}),we};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(ve,_e){const we=[];return this[me](ve,(Se,$e)=>{_e(Se,$e)&&we.push(Se)}),we};const xe="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[xe]=function(ve,_e,we){if(arguments.length<3)throw new InvalidArgumentsGraphError(`Graph.${xe}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let Se=we;return this[me](ve,($e,Te)=>{Se=_e(Se,$e,Te)}),Se}}function attachFindNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce[0].toUpperCase()+ce.slice(1,-1),ge="find"+me;ne.prototype[ge]=function(ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;ve=""+ve;const we=this._nodes.get(ve);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${ge}: could not find the "${ve}" node in the graph.`);return forEachNeighbor(!0,ue==="mixed"?this.type:ue,pe,we,_e)};const ye="some"+me;ne.prototype[ye]=function(ve,_e){return!!this[ge](ve,_e)};const xe="every"+me;ne.prototype[xe]=function(ve,_e){return!this[ge](ve,(Se,$e)=>!_e(Se,$e))}}function attachNeighborIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();ge=""+ge;const ye=this._nodes.get(ge);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createNeighborIterator(ue==="mixed"?this.type:ue,pe,ye)}}function attachNeighborIterationMethods(ne){NEIGHBORS_ITERATION.forEach(oe=>{attachNeighborArrayCreator(ne,oe),attachForEachNeighbor(ne,oe),attachFindNeighbor(ne,oe),attachNeighborIteratorCreator(ne,oe)})}function forEachAdjacency(ne,oe,ce,ue,pe){const me=ue._nodes.values(),ge=ue.type;let ye,xe,ve,_e,we,Se;for(;ye=me.next(),ye.done!==!0;){let $e=!1;if(xe=ye.value,ge!=="undirected"){_e=xe.out;for(ve in _e){we=_e[ve];do Se=we.target,$e=!0,pe(xe.key,Se.key,xe.attributes,Se.attributes,we.key,we.attributes,we.undirected),we=we.next;while(we)}}if(ge!=="directed"){_e=xe.undirected;for(ve in _e)if(!(oe&&xe.key>ve)){we=_e[ve];do Se=we.target,Se.key!==ve&&(Se=we.source),$e=!0,pe(xe.key,Se.key,xe.attributes,Se.attributes,we.key,we.attributes,we.undirected),we=we.next;while(we)}}ce&&!$e&&pe(xe.key,null,xe.attributes,null,null,null,null)}}function serializeNode(ne,oe){const ce={key:ne};return isEmpty$2(oe.attributes)||(ce.attributes=assign$3({},oe.attributes)),ce}function serializeEdge(ne,oe,ce){const ue={key:oe,source:ce.source.key,target:ce.target.key};return isEmpty$2(ce.attributes)||(ue.attributes=assign$3({},ce.attributes)),ne==="mixed"&&ce.undirected&&(ue.undirected=!0),ue}function validateSerializedNode(ne){if(!isPlainObject$1(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized node is missing its key.");if("attributes"in ne&&(!isPlainObject$1(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function validateSerializedEdge(ne){if(!isPlainObject$1(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its source.");if(!("target"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its target.");if("attributes"in ne&&(!isPlainObject$1(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in ne&&typeof ne.undirected!="boolean")throw new InvalidArgumentsGraphError("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const INSTANCE_ID=incrementalIdStartingFromRandomByte(),TYPES$1=new Set(["directed","undirected","mixed"]),EMITTER_PROPS=new Set(["domain","_events","_eventsCount","_maxListeners"]),EDGE_ADD_METHODS=[{name:ne=>`${ne}Edge`,generateKey:!0},{name:ne=>`${ne}DirectedEdge`,generateKey:!0,type:"directed"},{name:ne=>`${ne}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:ne=>`${ne}EdgeWithKey`},{name:ne=>`${ne}DirectedEdgeWithKey`,type:"directed"},{name:ne=>`${ne}UndirectedEdgeWithKey`,type:"undirected"}],DEFAULTS={allowSelfLoops:!0,multi:!1,type:"mixed"};function addNode(ne,oe,ce){if(ce&&!isPlainObject$1(ce))throw new InvalidArgumentsGraphError(`Graph.addNode: invalid attributes. Expecting an object but got "${ce}"`);if(oe=""+oe,ce=ce||{},ne._nodes.has(oe))throw new UsageGraphError(`Graph.addNode: the "${oe}" node already exist in the graph.`);const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function unsafeAddNode(ne,oe,ce){const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function addEdge(ne,oe,ce,ue,pe,me,ge,ye){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(ye&&!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`);if(me=""+me,ge=""+ge,ye=ye||{},!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const xe=ne._nodes.get(me),ve=ne._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${oe}: source node "${me}" not found.`);if(!ve)throw new NotFoundGraphError(`Graph.${oe}: target node "${ge}" not found.`);const _e={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);if(!ne.multi&&(ue?typeof xe.undirected[ge]<"u":typeof xe.out[ge]<"u"))throw new UsageGraphError(`Graph.${oe}: an edge linking "${me}" to "${ge}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const we=new EdgeData(ue,pe,xe,ve,ye);ne._edges.set(pe,we);const Se=me===ge;return ue?(xe.undirectedDegree++,ve.undirectedDegree++,Se&&(xe.undirectedLoops++,ne._undirectedSelfLoopCount++)):(xe.outDegree++,ve.inDegree++,Se&&(xe.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?we.attachMulti():we.attach(),ue?ne._undirectedSize++:ne._directedSize++,_e.key=pe,ne.emit("edgeAdded",_e),pe}function mergeEdge(ne,oe,ce,ue,pe,me,ge,ye,xe){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(ye){if(xe){if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid updater function. Expecting a function but got "${ye}"`)}else if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`)}me=""+me,ge=""+ge;let ve;if(xe&&(ve=ye,ye=void 0),!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let _e=ne._nodes.get(me),we=ne._nodes.get(ge),Se,$e;if(!ce&&(Se=ne._edges.get(pe),Se)){if((Se.source.key!==me||Se.target.key!==ge)&&(!ue||Se.source.key!==ge||Se.target.key!==me))throw new UsageGraphError(`Graph.${oe}: inconsistency detected when attempting to merge the "${pe}" edge with "${me}" source & "${ge}" target vs. ("${Se.source.key}", "${Se.target.key}").`);$e=Se}if(!$e&&!ne.multi&&_e&&($e=ue?_e.undirected[ge]:_e.out[ge]),$e){const Be=[$e.key,!1,!1,!1];if(xe?!ve:!ye)return Be;if(xe){const Ie=$e.attributes;$e.attributes=ve(Ie),ne.emit("edgeAttributesUpdated",{type:"replace",key:$e.key,attributes:$e.attributes})}else assign$3($e.attributes,ye),ne.emit("edgeAttributesUpdated",{type:"merge",key:$e.key,attributes:$e.attributes,data:ye});return Be}ye=ye||{},xe&&ve&&(ye=ve(ye));const Te={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);let Re=!1,Ae=!1;_e||(_e=unsafeAddNode(ne,me,{}),Re=!0,me===ge&&(we=_e,Ae=!0)),we||(we=unsafeAddNode(ne,ge,{}),Ae=!0),Se=new EdgeData(ue,pe,_e,we,ye),ne._edges.set(pe,Se);const ke=me===ge;return ue?(_e.undirectedDegree++,we.undirectedDegree++,ke&&(_e.undirectedLoops++,ne._undirectedSelfLoopCount++)):(_e.outDegree++,we.inDegree++,ke&&(_e.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?Se.attachMulti():Se.attach(),ue?ne._undirectedSize++:ne._directedSize++,Te.key=pe,ne.emit("edgeAdded",Te),[pe,!0,Re,Ae]}function dropEdgeFromData(ne,oe){ne._edges.delete(oe.key);const{source:ce,target:ue,attributes:pe}=oe,me=oe.undirected,ge=ce===ue;me?(ce.undirectedDegree--,ue.undirectedDegree--,ge&&(ce.undirectedLoops--,ne._undirectedSelfLoopCount--)):(ce.outDegree--,ue.inDegree--,ge&&(ce.directedLoops--,ne._directedSelfLoopCount--)),ne.multi?oe.detachMulti():oe.detach(),me?ne._undirectedSize--:ne._directedSize--,ne.emit("edgeDropped",{key:oe.key,attributes:pe,source:ce.key,target:ue.key,undirected:me})}class Graph extends eventsExports.EventEmitter{constructor(oe){if(super(),oe=assign$3({},DEFAULTS,oe),typeof oe.multi!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${oe.multi}".`);if(!TYPES$1.has(oe.type))throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${oe.type}".`);if(typeof oe.allowSelfLoops!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${oe.allowSelfLoops}".`);const ce=oe.type==="mixed"?MixedNodeData:oe.type==="directed"?DirectedNodeData:UndirectedNodeData;privateProperty(this,"NodeDataClass",ce);const ue="geid_"+INSTANCE_ID()+"_";let pe=0;const me=()=>{let ge;do ge=ue+pe++;while(this._edges.has(ge));return ge};privateProperty(this,"_attributes",{}),privateProperty(this,"_nodes",new Map),privateProperty(this,"_edges",new Map),privateProperty(this,"_directedSize",0),privateProperty(this,"_undirectedSize",0),privateProperty(this,"_directedSelfLoopCount",0),privateProperty(this,"_undirectedSelfLoopCount",0),privateProperty(this,"_edgeKeyGenerator",me),privateProperty(this,"_options",oe),EMITTER_PROPS.forEach(ge=>privateProperty(this,ge,this[ge])),readOnlyProperty(this,"order",()=>this._nodes.size),readOnlyProperty(this,"size",()=>this._edges.size),readOnlyProperty(this,"directedSize",()=>this._directedSize),readOnlyProperty(this,"undirectedSize",()=>this._undirectedSize),readOnlyProperty(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),readOnlyProperty(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),readOnlyProperty(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),readOnlyProperty(this,"multi",this._options.multi),readOnlyProperty(this,"type",this._options.type),readOnlyProperty(this,"allowSelfLoops",this._options.allowSelfLoops),readOnlyProperty(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(oe){return this._nodes.has(""+oe)}hasDirectedEdge(oe,ce){if(this.type==="undirected")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&!pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.out.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(oe,ce){if(this.type==="directed")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(oe,ce){if(arguments.length===1){const ue=""+oe;return this._edges.has(ue)}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?typeof ue.out<"u"&&ue.out.hasOwnProperty(ce)||typeof ue.undirected<"u"&&ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(oe,ce){if(this.type==="undirected")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||void 0;if(pe)return pe.key}undirectedEdge(oe,ce){if(this.type==="directed")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}edge(oe,ce){if(this.multi)throw new UsageGraphError("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.edge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.edge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}areDirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areDirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in||ce in ue.out}areOutNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.out}areInNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in}areUndirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areUndirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="directed"?!1:ce in ue.undirected}areNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&(ce in ue.in||ce in ue.out)||this.type!=="directed"&&ce in ue.undirected}areInboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.in||this.type!=="directed"&&ce in ue.undirected}areOutboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.out||this.type!=="directed"&&ce in ue.undirected}inDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree}outDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree}directedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree}undirectedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegree: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree}inboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree),ue}outboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.outDegree),ue}degree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree),ue}inDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree-ce.directedLoops}outDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree-ce.directedLoops}directedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree-ce.directedLoops*2}undirectedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree-ce.undirectedLoops*2}inboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree,pe+=ce.directedLoops),ue-pe}outboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.outDegree,pe+=ce.directedLoops),ue-pe}degreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree,pe+=ce.directedLoops*2),ue-pe}source(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.source: could not find the "${oe}" edge in the graph.`);return ce.source.key}target(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.target: could not find the "${oe}" edge in the graph.`);return ce.target.key}extremities(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.extremities: could not find the "${oe}" edge in the graph.`);return[ce.source.key,ce.target.key]}opposite(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(ce);if(!ue)throw new NotFoundGraphError(`Graph.opposite: could not find the "${ce}" edge in the graph.`);const pe=ue.source.key,me=ue.target.key;if(oe===pe)return me;if(oe===me)return pe;throw new NotFoundGraphError(`Graph.opposite: the "${oe}" node is not attached to the "${ce}" edge (${pe}, ${me}).`)}hasExtremity(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.hasExtremity: could not find the "${oe}" edge in the graph.`);return ue.source.key===ce||ue.target.key===ce}isUndirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isUndirected: could not find the "${oe}" edge in the graph.`);return ce.undirected}isDirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isDirected: could not find the "${oe}" edge in the graph.`);return!ce.undirected}isSelfLoop(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isSelfLoop: could not find the "${oe}" edge in the graph.`);return ce.source===ce.target}addNode(oe,ce){return addNode(this,oe,ce).key}mergeNode(oe,ce){if(ce&&!isPlainObject$1(ce))throw new InvalidArgumentsGraphError(`Graph.mergeNode: invalid attributes. Expecting an object but got "${ce}"`);oe=""+oe,ce=ce||{};let ue=this._nodes.get(oe);return ue?(ce&&(assign$3(ue.attributes,ce),this.emit("nodeAttributesUpdated",{type:"merge",key:oe,attributes:ue.attributes,data:ce})),[oe,!1]):(ue=new this.NodeDataClass(oe,ce),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:ce}),[oe,!0])}updateNode(oe,ce){if(ce&&typeof ce!="function")throw new InvalidArgumentsGraphError(`Graph.updateNode: invalid updater function. Expecting a function but got "${ce}"`);oe=""+oe;let ue=this._nodes.get(oe);if(ue){if(ce){const me=ue.attributes;ue.attributes=ce(me),this.emit("nodeAttributesUpdated",{type:"replace",key:oe,attributes:ue.attributes})}return[oe,!1]}const pe=ce?ce({}):{};return ue=new this.NodeDataClass(oe,pe),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:pe}),[oe,!0]}dropNode(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.dropNode: could not find the "${oe}" node in the graph.`);let ue;if(this.type!=="undirected"){for(const pe in ce.out){ue=ce.out[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}for(const pe in ce.in){ue=ce.in[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}}if(this.type!=="directed")for(const pe in ce.undirected){ue=ce.undirected[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}this._nodes.delete(oe),this.emit("nodeDropped",{key:oe,attributes:ce.attributes})}dropEdge(oe){let ce;if(arguments.length>1){const ue=""+arguments[0],pe=""+arguments[1];if(ce=getMatchingEdge(this,ue,pe,this.type),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${ue}" -> "${pe}" edge in the graph.`)}else if(oe=""+oe,ce=this._edges.get(oe),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${oe}" edge in the graph.`);return dropEdgeFromData(this,ce),this}dropDirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");oe=""+oe,ce=""+ce;const ue=getMatchingEdge(this,oe,ce,"directed");if(!ue)throw new NotFoundGraphError(`Graph.dropDirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}dropUndirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const ue=getMatchingEdge(this,oe,ce,"undirected");if(!ue)throw new NotFoundGraphError(`Graph.dropUndirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const oe=this._nodes.values();let ce;for(;ce=oe.next(),ce.done!==!0;)ce.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(oe){return this._attributes[oe]}getAttributes(){return this._attributes}hasAttribute(oe){return this._attributes.hasOwnProperty(oe)}setAttribute(oe,ce){return this._attributes[oe]=ce,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}updateAttribute(oe,ce){if(typeof ce!="function")throw new InvalidArgumentsGraphError("Graph.updateAttribute: updater should be a function.");const ue=this._attributes[oe];return this._attributes[oe]=ce(ue),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}removeAttribute(oe){return delete this._attributes[oe],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:oe}),this}replaceAttributes(oe){if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=oe,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(oe){if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.mergeAttributes: provided attributes are not a plain object.");return assign$3(this._attributes,oe),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:oe}),this}updateAttributes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateAttributes: provided updater is not a function.");return this._attributes=oe(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._nodes.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,me.attributes=oe(me.key,me.attributes);this.emit("eachNodeAttributesUpdated",{hints:ce||null})}updateEachEdgeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._edges.values();let pe,me,ge,ye;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,ge=me.source,ye=me.target,me.attributes=oe(me.key,me.attributes,ge.key,ye.key,ge.attributes,ye.attributes,me.undirected);this.emit("eachEdgeAttributesUpdated",{hints:ce||null})}forEachAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!1,!1,this,oe)}forEachAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!1,!0,this,oe)}forEachAssymetricAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!0,!1,this,oe)}forEachAssymetricAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!0,!0,this,oe)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):take$1(this._nodes.keys(),this._nodes.size)}forEachNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)}findNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.findNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return pe.key}mapNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.mapNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=new Array(this.order);let ge=0;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,me[ge++]=oe(pe.key,pe.attributes);return me}someNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.someNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return!0;return!1}everyNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.everyNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,!oe(pe.key,pe.attributes))return!1;return!0}filterNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.filterNodes: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=[];for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)&&me.push(pe.key);return me}reduceNodes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new InvalidArgumentsGraphError("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let ue=ce;const pe=this._nodes.values();let me,ge;for(;me=pe.next(),me.done!==!0;)ge=me.value,ue=oe(ue,ge.key,ge.attributes);return ue}nodeEntries(){const oe=this._nodes.values();return new Iterator$3(()=>{const ce=oe.next();if(ce.done)return ce;const ue=ce.value;return{value:{node:ue.key,attributes:ue.attributes},done:!1}})}export(){const oe=new Array(this._nodes.size);let ce=0;this._nodes.forEach((pe,me)=>{oe[ce++]=serializeNode(me,pe)});const ue=new Array(this._edges.size);return ce=0,this._edges.forEach((pe,me)=>{ue[ce++]=serializeEdge(this.type,me,pe)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:oe,edges:ue}}import(oe,ce=!1){if(oe instanceof Graph)return oe.forEachNode((xe,ve)=>{ce?this.mergeNode(xe,ve):this.addNode(xe,ve)}),oe.forEachEdge((xe,ve,_e,we,Se,$e,Te)=>{ce?Te?this.mergeUndirectedEdgeWithKey(xe,_e,we,ve):this.mergeDirectedEdgeWithKey(xe,_e,we,ve):Te?this.addUndirectedEdgeWithKey(xe,_e,we,ve):this.addDirectedEdgeWithKey(xe,_e,we,ve)}),this;if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(oe.attributes){if(!isPlainObject$1(oe.attributes))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Expecting a plain object.");ce?this.mergeAttributes(oe.attributes):this.replaceAttributes(oe.attributes)}let ue,pe,me,ge,ye;if(oe.nodes){if(me=oe.nodes,!Array.isArray(me))throw new InvalidArgumentsGraphError("Graph.import: invalid nodes. Expecting an array.");for(ue=0,pe=me.length;ue{const me=assign$3({},ue.attributes);ue=new ce.NodeDataClass(pe,me),ce._nodes.set(pe,ue)}),ce}copy(oe){if(oe=oe||{},typeof oe.type=="string"&&oe.type!==this.type&&oe.type!=="mixed")throw new UsageGraphError(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${oe.type}" because this would mean losing information about the current graph.`);if(typeof oe.multi=="boolean"&&oe.multi!==this.multi&&oe.multi!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof oe.allowSelfLoops=="boolean"&&oe.allowSelfLoops!==this.allowSelfLoops&&oe.allowSelfLoops!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const ce=this.emptyCopy(oe),ue=this._edges.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,addEdge(ce,"copy",!1,me.undirected,me.key,me.source.key,me.target.key,assign$3({},me.attributes));return ce}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const oe={};this._nodes.forEach((me,ge)=>{oe[ge]=me.attributes});const ce={},ue={};this._edges.forEach((me,ge)=>{const ye=me.undirected?"--":"->";let xe="",ve=me.source.key,_e=me.target.key,we;me.undirected&&ve>_e&&(we=ve,ve=_e,_e=we);const Se=`(${ve})${ye}(${_e})`;ge.startsWith("geid_")?this.multi&&(typeof ue[Se]>"u"?ue[Se]=0:ue[Se]++,xe+=`${ue[Se]}. `):xe+=`[${ge}]: `,xe+=Se,ce[xe]=me.attributes});const pe={};for(const me in this)this.hasOwnProperty(me)&&!EMITTER_PROPS.has(me)&&typeof this[me]!="function"&&typeof me!="symbol"&&(pe[me]=this[me]);return pe.attributes=this._attributes,pe.nodes=oe,pe.edges=ce,privateProperty(pe,"constructor",this.constructor),pe}}typeof Symbol<"u"&&(Graph.prototype[Symbol.for("nodejs.util.inspect.custom")]=Graph.prototype.inspect);EDGE_ADD_METHODS.forEach(ne=>{["add","merge","update"].forEach(oe=>{const ce=ne.name(oe),ue=oe==="add"?addEdge:mergeEdge;ne.generateKey?Graph.prototype[ce]=function(pe,me,ge){return ue(this,ce,!0,(ne.type||this.type)==="undirected",null,pe,me,ge,oe==="update")}:Graph.prototype[ce]=function(pe,me,ge,ye){return ue(this,ce,!1,(ne.type||this.type)==="undirected",pe,me,ge,ye,oe==="update")}})});attachNodeAttributesMethods(Graph);attachEdgeAttributesMethods(Graph);attachEdgeIterationMethods(Graph);attachNeighborIterationMethods(Graph);class DirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"directed"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('DirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class UndirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"undirected"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('UndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiGraph extends Graph{constructor(oe){const ce=assign$3({multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(ce)}}class MultiDirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"directed",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('MultiDirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiUndirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"undirected",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('MultiUndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}function attachStaticFromMethod(ne){ne.from=function(oe,ce){const ue=assign$3({},oe.options,ce),pe=new ne(ue);return pe.import(oe),pe}}attachStaticFromMethod(Graph);attachStaticFromMethod(DirectedGraph);attachStaticFromMethod(UndirectedGraph);attachStaticFromMethod(MultiGraph);attachStaticFromMethod(MultiDirectedGraph);attachStaticFromMethod(MultiUndirectedGraph);Graph.Graph=Graph;Graph.DirectedGraph=DirectedGraph;Graph.UndirectedGraph=UndirectedGraph;Graph.MultiGraph=MultiGraph;Graph.MultiDirectedGraph=MultiDirectedGraph;Graph.MultiUndirectedGraph=MultiUndirectedGraph;Graph.InvalidArgumentsGraphError=InvalidArgumentsGraphError;Graph.NotFoundGraphError=NotFoundGraphError;Graph.UsageGraphError=UsageGraphError;function _toPrimitive(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function _toPropertyKey(ne){var oe=_toPrimitive(ne,"string");return typeof oe=="symbol"?oe:oe+""}function _classCallCheck$1(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=Array(oe);cexe){ye=_e,xe=we;continue}}ye&&(pe[paletteMapKey(ge)]=ye)}return pe}function matchPaletteLab(ne,oe,ce){let ue,pe,me=oe[0],ge=ciede2000(ne,me);for(let ye=1,xe=oe.length;yege)&&(me=ue,ge=pe);return me}function mapPaletteLab(ne,oe,ce){const ue={},pe=ce==="furthest";for(let me=0;me{let oe=hexRgb(ne);return{R:oe[0],G:oe[1],B:oe[2]}},pantoneRGBList=pantones.map(ne=>get_rgbObject(ne.hex));var getClosestColor=ne=>{const oe=get_rgbObject(ne),ce=diff.closest(oe,pantoneRGBList),ue=rgbHex(ce.R,ce.G,ce.B),pe=pantones.findIndex(ge=>ge.hex==`#${ue}`);return pantones[pe]};function u$4(){return(u$4=Object.assign||function(ne){for(var oe=1;oe=0||(pe[ce]=ne[ce]);return pe}function i$4(ne){var oe=reactExports.useRef(ne),ce=reactExports.useRef(function(ue){oe.current&&oe.current(ue)});return oe.current=ne,ce.current}var s$3=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=1),ne>ce?ce:ne0:Ae.buttons>0)&&pe.current?me(d$2(pe.current,Ae,ye.current)):Re(!1)},Te=function(){return Re(!1)};function Re(Ae){var ke=xe.current,Be=v$6(pe.current),Ie=Ae?Be.addEventListener:Be.removeEventListener;Ie(ke?"touchmove":"mousemove",$e),Ie(ke?"touchend":"mouseup",Te)}return[function(Ae){var ke=Ae.nativeEvent,Be=pe.current;if(Be&&(h$5(ke),!function(Ne,je){return je&&!f$5(Ne)}(ke,xe.current)&&Be)){if(f$5(ke)){xe.current=!0;var Ie=ke.changedTouches||[];Ie.length&&(ye.current=Ie[0].identifier)}Be.focus(),me(d$2(Be,ke,ye.current)),Re(!0)}},function(Ae){var ke=Ae.which||Ae.keyCode;ke<37||ke>40||(Ae.preventDefault(),ge({left:ke===39?.05:ke===37?-.05:0,top:ke===40?.05:ke===38?-.05:0}))},Re]},[ge,me]),_e=ve[0],we=ve[1],Se=ve[2];return reactExports.useEffect(function(){return Se},[Se]),React$2.createElement("div",u$4({},ue,{onTouchStart:_e,onMouseDown:_e,className:"react-colorful__interactive",ref:pe,onKeyDown:we,tabIndex:0,role:"slider"}))}),g$4=function(ne){return ne.filter(Boolean).join(" ")},p$5=function(ne){var oe=ne.color,ce=ne.left,ue=ne.top,pe=ue===void 0?.5:ue,me=g$4(["react-colorful__pointer",ne.className]);return React$2.createElement("div",{className:me,style:{top:100*pe+"%",left:100*ce+"%"}},React$2.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:oe}}))},b$5=function(ne,oe,ce){return oe===void 0&&(oe=0),ce===void 0&&(ce=Math.pow(10,oe)),Math.round(ce*ne)/ce},x$5=function(ne){return L$3(C$3(ne))},C$3=function(ne){return ne[0]==="#"&&(ne=ne.substring(1)),ne.length<6?{r:parseInt(ne[0]+ne[0],16),g:parseInt(ne[1]+ne[1],16),b:parseInt(ne[2]+ne[2],16),a:ne.length===4?b$5(parseInt(ne[3]+ne[3],16)/255,2):1}:{r:parseInt(ne.substring(0,2),16),g:parseInt(ne.substring(2,4),16),b:parseInt(ne.substring(4,6),16),a:ne.length===8?b$5(parseInt(ne.substring(6,8),16)/255,2):1}},w$4=function(ne){return K$2(I$2(ne))},y$6=function(ne){var oe=ne.s,ce=ne.v,ue=ne.a,pe=(200-oe)*ce/100;return{h:b$5(ne.h),s:b$5(pe>0&&pe<200?oe*ce/100/(pe<=100?pe:200-pe)*100:0),l:b$5(pe/2),a:b$5(ue,2)}},q$3=function(ne){var oe=y$6(ne);return"hsl("+oe.h+", "+oe.s+"%, "+oe.l+"%)"},I$2=function(ne){var oe=ne.h,ce=ne.s,ue=ne.v,pe=ne.a;oe=oe/360*6,ce/=100,ue/=100;var me=Math.floor(oe),ge=ue*(1-ce),ye=ue*(1-(oe-me)*ce),xe=ue*(1-(1-oe+me)*ce),ve=me%6;return{r:b$5(255*[ue,ye,ge,ge,xe,ue][ve]),g:b$5(255*[xe,ue,ue,ye,ge,ge][ve]),b:b$5(255*[ge,ge,xe,ue,ue,ye][ve]),a:b$5(pe,2)}},D$3=function(ne){var oe=ne.toString(16);return oe.length<2?"0"+oe:oe},K$2=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=pe<1?D$3(b$5(255*pe)):"";return"#"+D$3(oe)+D$3(ce)+D$3(ue)+me},L$3=function(ne){var oe=ne.r,ce=ne.g,ue=ne.b,pe=ne.a,me=Math.max(oe,ce,ue),ge=me-Math.min(oe,ce,ue),ye=ge?me===oe?(ce-ue)/ge:me===ce?2+(ue-oe)/ge:4+(oe-ce)/ge:0;return{h:b$5(60*(ye<0?ye+6:ye)),s:b$5(me?ge/me*100:0),v:b$5(me/255*100),a:pe}},S$5=React$2.memo(function(ne){var oe=ne.hue,ce=ne.onChange,ue=g$4(["react-colorful__hue",ne.className]);return React$2.createElement("div",{className:ue},React$2.createElement(m$3,{onMove:function(pe){ce({h:360*pe.left})},onKey:function(pe){ce({h:s$3(oe+360*pe.left,0,360)})},"aria-label":"Hue","aria-valuenow":b$5(oe),"aria-valuemax":"360","aria-valuemin":"0"},React$2.createElement(p$5,{className:"react-colorful__hue-pointer",left:oe/360,color:q$3({h:oe,s:100,v:100,a:1})})))}),T$3=React$2.memo(function(ne){var oe=ne.hsva,ce=ne.onChange,ue={backgroundColor:q$3({h:oe.h,s:100,v:100,a:1})};return React$2.createElement("div",{className:"react-colorful__saturation",style:ue},React$2.createElement(m$3,{onMove:function(pe){ce({s:100*pe.left,v:100-100*pe.top})},onKey:function(pe){ce({s:s$3(oe.s+100*pe.left,0,100),v:s$3(oe.v-100*pe.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+b$5(oe.s)+"%, Brightness "+b$5(oe.v)+"%"},React$2.createElement(p$5,{className:"react-colorful__saturation-pointer",top:1-oe.v/100,left:oe.s/100,color:q$3(oe)})))}),F$2=function(ne,oe){if(ne===oe)return!0;for(var ce in ne)if(ne[ce]!==oe[ce])return!1;return!0},X$2=function(ne,oe){return ne.toLowerCase()===oe.toLowerCase()||F$2(C$3(ne),C$3(oe))};function Y$5(ne,oe,ce){var ue=i$4(ce),pe=reactExports.useState(function(){return ne.toHsva(oe)}),me=pe[0],ge=pe[1],ye=reactExports.useRef({color:oe,hsva:me});reactExports.useEffect(function(){if(!ne.equal(oe,ye.current.color)){var ve=ne.toHsva(oe);ye.current={hsva:ve,color:oe},ge(ve)}},[oe,ne]),reactExports.useEffect(function(){var ve;F$2(me,ye.current.hsva)||ne.equal(ve=ne.fromHsva(me),ye.current.color)||(ye.current={hsva:me,color:ve},ue(ve))},[me,ne,ue]);var xe=reactExports.useCallback(function(ve){ge(function(_e){return Object.assign({},_e,ve)})},[]);return[me,xe]}var V$2=typeof window<"u"?reactExports.useLayoutEffect:reactExports.useEffect,$$4=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:void 0},J$2=new Map,Q$2=function(ne){V$2(function(){var oe=ne.current?ne.current.ownerDocument:document;if(oe!==void 0&&!J$2.has(oe)){var ce=oe.createElement("style");ce.innerHTML=`.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url('data:image/svg+xml;charset=utf-8,')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}`,J$2.set(oe,ce);var ue=$$4();ue&&ce.setAttribute("nonce",ue),oe.head.appendChild(ce)}},[])},U$2=function(ne){var oe=ne.className,ce=ne.colorModel,ue=ne.color,pe=ue===void 0?ce.defaultColor:ue,me=ne.onChange,ge=c$4(ne,["className","colorModel","color","onChange"]),ye=reactExports.useRef(null);Q$2(ye);var xe=Y$5(ce,pe,me),ve=xe[0],_e=xe[1],we=g$4(["react-colorful",oe]);return React$2.createElement("div",u$4({},ge,{ref:ye,className:we}),React$2.createElement(T$3,{hsva:ve,onChange:_e}),React$2.createElement(S$5,{hue:ve.h,onChange:_e,className:"react-colorful__last-control"}))},W$2={defaultColor:"000",toHsva:x$5,fromHsva:function(ne){return w$4({h:ne.h,s:ne.s,v:ne.v,a:1})},equal:X$2},Z$3=function(ne){return React$2.createElement(U$2,u$4({},ne,{colorModel:W$2}))};const byPoint=({variables:ne},{x:oe,y:ce})=>(ne==null?void 0:ne.x)===oe&&(ne==null?void 0:ne.y)===ce,getGridSymbolsUrl=""+new URL("getGridSymbols.worker-BM9IxXsn.js",import.meta.url).href;class GetGridSymbolsWorker extends Worker{constructor(){super(getGridSymbolsUrl,{type:"module"})}}const getGridSymbolsAsync=usingWorkerTask(GetGridSymbolsWorker),parseGridWorkerUrl=""+new URL("parseGrid.worker-CoX8qlO4.js",import.meta.url).href;class ParseGridWorker extends Worker{constructor(){super(parseGridWorkerUrl,{type:"module"})}}const parseGridAsync=usingMemoizedWorkerTask(ParseGridWorker);function useDebouncedState(ne,oe=lodashExports.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports.now());return[ue,ge=>{const ye=lodashExports.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge)}]}function useDebouncedState2(ne,oe=lodashExports.noop,ce=300){const[ue,pe]=reactExports.useState(ne),me=reactExports.useRef(lodashExports.now());return[ue,ge=>{const ye=lodashExports.now();requestIdleCallback(()=>{ye>me.current&&(oe==null||oe(ge),me.current=ye)},{timeout:ce}),pe(ge(ue))}]}function between(ne,oe,ce){return ne>=oe&&ne({content:ne,...await parseGridAsync({map:ne,options:oe})}),{normalizer:JSON.stringify});function SymbolColorPicker(ne){const oe=compilerRuntimeExports.c(5),{onChange:ce,value:ue,autoValue:pe}=ne,[me,ge]=useDebouncedState(ue,ce),ye=me??pe;let xe;return oe[0]!==pe||oe[1]!==ye||oe[2]!==ge||oe[3]!==me?(xe=jsxRuntimeExports.jsx(PopupState,{variant:"popover",children:ve=>{var _e;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(FeaturePickerButton,{...bindTrigger(ve),children:jsxRuntimeExports.jsxs(Stack,{direction:"row",gap:1,alignItems:"center",children:[jsxRuntimeExports.jsx(Box,{sx:{width:16,height:16,backgroundColor:ye,outline:_temp$t,borderRadius:4}}),me?lodashExports.startCase(((_e=getClosestColor(me))==null?void 0:_e.name)??"Custom"):"Auto"]})}),jsxRuntimeExports.jsxs(Popover,{transformOrigin:{horizontal:"left",vertical:"top"},anchorOrigin:{horizontal:"right",vertical:"top"},...bindPopover(ve),slotProps:{paper:{sx:{overflow:"visible"}}},children:[jsxRuntimeExports.jsx(Box,{sx:{px:2,py:1},children:jsxRuntimeExports.jsx(FormControlLabel,{control:jsxRuntimeExports.jsx(Checkbox,{defaultChecked:!me,onChange:(we,Se)=>ge==null?void 0:ge(Se?void 0:pe)}),label:"Choose Automatically"})}),jsxRuntimeExports.jsx(Box,{sx:{p:2,pt:0,...!me&&{opacity:_temp2$l,pointerEvents:"none"}},children:jsxRuntimeExports.jsx(Z$3,{color:me??pe,onChange:ge})})]})]})}}),oe[0]=pe,oe[1]=ye,oe[2]=ge,oe[3]=me,oe[4]=xe):xe=oe[4],xe}function _temp2$l(ne){return ne.palette.action.disabledOpacity}function _temp$t(ne){return`1px solid ${ne.palette.divider}`}const editor$3=async ne=>{if(ne){const{symbols:oe}=await getGridSymbolsAsync({map:ne});return withProduce(({produce:ce,value:ue})=>{const{palette:pe}=useTheme(),me=lodashExports.flow(interpolate$1([pe.background.paper,pe.text.primary]),rgbToHex$3);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:lodashExports.sortBy(oe,"value").map(({symbol:ge})=>{var ye,xe;return jsxRuntimeExports.jsx(Option,{label:`Tile color for "${ge}"`,content:jsxRuntimeExports.jsx(SymbolColorPicker,{value:(ye=ue==null?void 0:ue.symbols)==null?void 0:ye[ge],autoValue:me(((xe=lodashExports.find(oe,{symbol:ge}))==null?void 0:xe.value)??0),onChange:ve=>ce(_e=>{lodashExports.set(_e,`symbols["${ge}"]`,ve)})})},ge)})})})}else return()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},hydrate$3=ne=>{const{width:oe,height:ce}=ne.bounds;return{...ne,snap:({x:ue,y:pe},me=1)=>{const[ge,ye]=[lodashExports.round(-1+ue+me/2),lodashExports.round(-1+pe+me/2)];if(between(ge,0,oe)&&between(ye,0,ce))return{x:ge,y:ye}},nodeAt:ue=>{const{x:pe,y:me}=ue;return me*oe+pe},pointOf:ue=>({x:ue%oe,y:~~(ue/oe)}),matchNode:byPoint}},grid=Object.freeze(Object.defineProperty({__proto__:null,SymbolColorPicker,editor:editor$3,hydrate:hydrate$3,parse:parse$9},Symbol.toStringTag,{value:"Module"})),parseMeshWorkerUrl=""+new URL("parseMesh.worker-Dr4cls8w.js",import.meta.url).href;class ParseMeshWorker extends Worker{constructor(){super(parseMeshWorkerUrl,{type:"module"})}}const parseMeshAsync=usingMemoizedWorkerTask(ParseMeshWorker),parse$8=memoizee$1(async(ne="",oe)=>await parseMeshAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$2=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor$2=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),mesh=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$2,hydrate:hydrate$2,parse:parse$8},Symbol.toStringTag,{value:"Module"})),parseNetworkWorkerUrl=""+new URL("parseNetwork.worker-CBxoD6o6.js",import.meta.url).href;class ParseNetworkWorker extends Worker{constructor(){super(parseNetworkWorkerUrl,{type:"module"})}}const parseNetworkAsync=usingMemoizedWorkerTask(ParseNetworkWorker),parse$7=memoizee$1(async(ne="",oe)=>await parseNetworkAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate$1=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor$1=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),xy=Object.freeze(Object.defineProperty({__proto__:null,editor:editor$1,hydrate:hydrate$1,parse:parse$7},Symbol.toStringTag,{value:"Module"})),parsePolyWorkerUrl=""+new URL("parsePoly.worker-CFQGo0UP.js",import.meta.url).href;class ParsePolyWorker extends Worker{constructor(){super(parsePolyWorkerUrl,{type:"module"})}}const parsePolyAsync=usingMemoizedWorkerTask(ParsePolyWorker),parse$6=memoizee$1(async(ne="",oe)=>await parsePolyAsync({map:ne,options:oe}),{normalizer:JSON.stringify}),hydrate=ne=>({...ne,snap:lodashExports.identity,nodeAt:lodashExports.constant(0),pointOf:lodashExports.constant({x:0,y:0}),matchNode:byPoint}),editor=async()=>()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:"No options available."})}),poly=Object.freeze(Object.defineProperty({__proto__:null,editor,hydrate,parse:parse$6},Symbol.toStringTag,{value:"Module"})),mapParsers={grid,map:grid,xy,mesh,poly};function getParser(ne=""){return mapParsers[ne]}const defaultGuard=lodashExports.constant(!0),[useLayers,LayersProvider]=createSlice({layers:[]});function useLayer(ne,oe){const ce=compilerRuntimeExports.c(21),ue=oe===void 0?defaultGuard:oe,[pe,me]=reactExports.useState(ne),[ge,ye]=useLayers(),{layers:xe}=ge;let ve,_e;ce[0]!==ue||ce[1]!==pe||ce[2]!==xe?(ve=lodashExports.filter(xe,ue),_e=pe?lodashExports.find(ve,{key:pe})??lodashExports.head(ve):lodashExports.head(ve),ce[0]=ue,ce[1]=pe,ce[2]=xe,ce[3]=ve,ce[4]=_e):(ve=ce[3],_e=ce[4]);const we=_e;let Se,$e;ce[5]!==ne?(Se=()=>{me(ne)},$e=[ne],ce[5]=ne,ce[6]=Se,ce[7]=$e):(Se=ce[6],$e=ce[7]),reactExports.useEffect(Se,$e);let Te,Re;ce[8]!==pe||ce[9]!==we?(Te=()=>{we&&we.key!==pe&&me(we.key)},Re=[we,pe,me],ce[8]=pe,ce[9]=we,ce[10]=Te,ce[11]=Re):(Te=ce[10],Re=ce[11]),reactExports.useEffect(Te,Re);let Ae;const ke=we==null?void 0:we.key;let Be;ce[12]!==we||ce[13]!==ye?(Be=Ne=>{const je={...we,...Ne};ye(ze=>{const{layers:Ue}=ze;return{layers:lodashExports.map(Ue,qe=>qe.key===je.key?je:qe)}})},ce[12]=we,ce[13]=ye,ce[14]=Be):Be=ce[14];let Ie;return ce[15]!==ve||ce[16]!==we||ce[17]!==xe||ce[18]!==ke||ce[19]!==Be?(Ie={key:ke,setKey:me,layer:we,setLayer:Be,layers:ve,allLayers:xe},ce[15]=ve,ce[16]=we,ce[17]=xe,ce[18]=ke,ce[19]=Be,ce[20]=Ie):Ie=ce[20],Ae=Ie,Ae}const shouldBreak={name:"shouldBreak",description:"Define in what situations the debugger should break, in addition to the conditions defined in the standard options.",params:[{name:"step",type:"number"},{name:"event",type:"any"},{name:"events",type:"any"},{name:"parent",type:"any"},{name:"children",type:"any"}],defaultReturnValue:!1,returnType:"boolean"},templates={shouldBreak},fn=memoizee$1((ne,oe)=>new Function("params",`${ne}; return ${oe}.apply(null, params);`));function call$2(ne,oe,ce){try{return fn(ne,oe)(ce)}catch{return templates[oe].defaultReturnValue}}function _extends(){return _extends=Object.assign||function(ne){for(var oe=1;oeawait treeAsync$1(ne),ue=[ne],oe[0]=ne,oe[1]=ce,oe[2]=ue):(ce=oe[1],ue=oe[2]),useAsync(ce,ue)}function useTreeMemo$1(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree$1(ce)}function useBreakpoints(ne){var _e;const{layer:oe}=useLayer(ne),{isTrusted:ce}=useUntrustedLayers(),{monotonicF:ue,monotonicG:pe,breakpoints:me,code:ge,trace:ye}=(oe==null?void 0:oe.source)??{},xe=ye==null?void 0:ye.content,{result:ve}=useTreeMemo$1({trace:xe,step:(_e=xe==null?void 0:xe.events)==null?void 0:_e.length,radius:void 0},[xe]);return reactExports.useMemo(()=>{const we=(xe==null?void 0:xe.events)??[],Se=treeToDict((ve==null?void 0:ve.tree)??[]);return memoizee$1($e=>{var Re,Ae;const Te=we[$e];if(Te)try{for(const{active:ke,condition:Be,type:Ie,property:Ne="",reference:je=0}of me??[]){const ze=!Ie||Ie===Te.type;if(ke&&ze&&(()=>{var qe;return(qe=Be==null?void 0:Be.apply)==null?void 0:qe.call(Be,{type:Ie,event:Te,property:Ne,value:lodashExports.get(Te,Ne),reference:je,step:$e,events:we,node:Se[$e]})})())return Be!=null&&Be.needsReference?{result:`${Ne} ${lodashExports.toLower(lodashExports.startCase(Be==null?void 0:Be.key))} ${je}`}:{result:`${Ne} ${lodashExports.toLower(lodashExports.startCase(Be==null?void 0:Be.key))}`}}if(ce&&call$2(ge??"","shouldBreak",[$e,Te,we,(Re=Se[$e])==null?void 0:Re.parent,((Ae=Se[$e])==null?void 0:Ae.children)??[]]))return{result:"Script editor"}}catch(ke){return{error:`${ke}`}}return{result:""}})},[ce,ge,xe,me,ue,pe,ve])}function treeToDict(ne=[],oe={}){for(const ce of ne){for(const ue of ce.events)oe[ue.step]=ce;treeToDict(ce.children,oe)}return oe}function cancellable(ne,oe){let ce=!1;return requestAnimationFrame(async()=>{const ue=await ne();ce||oe(ue)}),()=>{ce=!0}}function usePlaybackState(ne){const{layer:oe,setLayer:ce,setKey:ue}=useLayer(ne),pe=useSnackbar(),me=useBreakpoints(ne);reactExports.useEffect(()=>{ne&&ue(ne)},[ne]);const{playback:ge,playbackTo:ye,step:xe=0}=(oe==null?void 0:oe.source)??{},ve=lodashExports.min([ye,xe])??0,_e=!!ye,we=ge==="playing",[Se,$e]=[0,(ye??1)-1];return reactExports.useMemo(()=>{function Te(ze){ce(produce(oe,Ue=>lodashExports.set(Ue,"source",{...Ue==null?void 0:Ue.source,...ze})))}const Re={start:Se,end:$e,step:ve,canPlay:_e&&!we&&ve<$e,canPause:_e&&we,canStop:_e&&ve,canStepForward:_e&&!we&&ve<$e,canStepBackward:_e&&!we&&ve>0},Ae=(ze=0)=>{Te({playback:"paused",step:Ne(ze)})},ke=(ze=1)=>Te({playback:"playing",step:Ne(ze)}),Be=(ze,Ue=0)=>cancellable(async()=>{for(const qe of lodashExports.range(Ue,ze)){const Ke=me(ve+qe);if(Ke.result||Ke.error)return{...Ke,offset:qe}}return{result:"",offset:0,error:void 0}},({result:qe,offset:Ke,error:Ge})=>{Ge?(pe(`${lodashExports.trimEnd(Ge,".")}`,`Step ${ve+Ke}`),Ae()):qe?(pe(`Breakpoint hit: ${qe}`,`Step ${ve+Ke}`),Ae(Ke)):ke(ze)}),Ie=(ze=1)=>{var qe;let Ue;for(Ue=ve+ze;Ue<=$e&&Ue>=0&&!((qe=me(Ue))!=null&&qe.result);Ue+=ze);return Ue},Ne=ze=>lodashExports.clamp(ve+ze,Se,$e);return{playing:ge==="playing",...Re,...{play:()=>{Te({playback:"playing",step:Ne(1)})},pause:Ae,stepTo:(ze=0)=>Te({step:lodashExports.clamp(ze,Se,$e)}),stop:()=>Te({step:Se,playback:"paused"}),stepForward:()=>Te({step:Ne(1)}),stepBackward:()=>Te({step:Ne(-1)}),tick:ke,findBreakpoint:Ie,stepWithBreakpointCheck:Be}}},[$e,ge,we,_e,Se,ve,ce])}function RenderLayer(ne){var ge;const oe=compilerRuntimeExports.c(5),{layer:ce,index:ue}=ne;let pe;oe[0]!==ue||oe[1]!==ce?(pe=ce&&reactExports.createElement((ge=getController(ce))==null?void 0:ge.renderer,{layer:ce,index:ue}),oe[0]=ue,oe[1]=ce,oe[2]=pe):pe=oe[2];let me;return oe[3]!==pe?(me=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:pe}),oe[3]=pe,oe[4]=me):me=oe[4],me}const[useRenderers,RendererProvider]=createSlice([],{reduce:replace$1}),removeUndefinedValues=ne=>lodashExports.omit(ne,lodashExports.filter(lodashExports.keys(ne),oe=>lodashExports.isUndefined(ne[oe]))),[useScreenshots,ScreenshotsProvider]=createSlice({},{reduce:lodashExports.flow(merge$6,removeUndefinedValues)});var events={exports:{}},R$3=typeof Reflect=="object"?Reflect:null,ReflectApply=R$3&&typeof R$3.apply=="function"?R$3.apply:function(oe,ce,ue){return Function.prototype.apply.call(oe,ce,ue)},ReflectOwnKeys;R$3&&typeof R$3.ownKeys=="function"?ReflectOwnKeys=R$3.ownKeys:Object.getOwnPropertySymbols?ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe).concat(Object.getOwnPropertySymbols(oe))}:ReflectOwnKeys=function(oe){return Object.getOwnPropertyNames(oe)};function ProcessEmitWarning(ne){console&&console.warn&&console.warn(ne)}var NumberIsNaN=Number.isNaN||function(oe){return oe!==oe};function EventEmitter$3(){EventEmitter$3.init.call(this)}events.exports=EventEmitter$3;events.exports.once=once;EventEmitter$3.EventEmitter=EventEmitter$3;EventEmitter$3.prototype._events=void 0;EventEmitter$3.prototype._eventsCount=0;EventEmitter$3.prototype._maxListeners=void 0;var defaultMaxListeners=10;function checkListener(ne){if(typeof ne!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof ne)}Object.defineProperty(EventEmitter$3,"defaultMaxListeners",{enumerable:!0,get:function(){return defaultMaxListeners},set:function(ne){if(typeof ne!="number"||ne<0||NumberIsNaN(ne))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+ne+".");defaultMaxListeners=ne}});EventEmitter$3.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};EventEmitter$3.prototype.setMaxListeners=function(oe){if(typeof oe!="number"||oe<0||NumberIsNaN(oe))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+oe+".");return this._maxListeners=oe,this};function _getMaxListeners(ne){return ne._maxListeners===void 0?EventEmitter$3.defaultMaxListeners:ne._maxListeners}EventEmitter$3.prototype.getMaxListeners=function(){return _getMaxListeners(this)};EventEmitter$3.prototype.emit=function(oe){for(var ce=[],ue=1;ue0&&(ge=ce[0]),ge instanceof Error)throw ge;var ye=new Error("Unhandled error."+(ge?" ("+ge.message+")":""));throw ye.context=ge,ye}var xe=me[oe];if(xe===void 0)return!1;if(typeof xe=="function")ReflectApply(xe,this,ce);else for(var ve=xe.length,_e=arrayClone(xe,ve),ue=0;ue0&&ge.length>pe&&!ge.warned){ge.warned=!0;var ye=new Error("Possible EventEmitter memory leak detected. "+ge.length+" "+String(oe)+" listeners added. Use emitter.setMaxListeners() to increase limit");ye.name="MaxListenersExceededWarning",ye.emitter=ne,ye.type=oe,ye.count=ge.length,ProcessEmitWarning(ye)}return ne}EventEmitter$3.prototype.addListener=function(oe,ce){return _addListener(this,oe,ce,!1)};EventEmitter$3.prototype.on=EventEmitter$3.prototype.addListener;EventEmitter$3.prototype.prependListener=function(oe,ce){return _addListener(this,oe,ce,!0)};function onceWrapper(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function _onceWrap(ne,oe,ce){var ue={fired:!1,wrapFn:void 0,target:ne,type:oe,listener:ce},pe=onceWrapper.bind(ue);return pe.listener=ce,ue.wrapFn=pe,pe}EventEmitter$3.prototype.once=function(oe,ce){return checkListener(ce),this.on(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.prependOnceListener=function(oe,ce){return checkListener(ce),this.prependListener(oe,_onceWrap(this,oe,ce)),this};EventEmitter$3.prototype.removeListener=function(oe,ce){var ue,pe,me,ge,ye;if(checkListener(ce),pe=this._events,pe===void 0)return this;if(ue=pe[oe],ue===void 0)return this;if(ue===ce||ue.listener===ce)--this._eventsCount===0?this._events=Object.create(null):(delete pe[oe],pe.removeListener&&this.emit("removeListener",oe,ue.listener||ce));else if(typeof ue!="function"){for(me=-1,ge=ue.length-1;ge>=0;ge--)if(ue[ge]===ce||ue[ge].listener===ce){ye=ue[ge].listener,me=ge;break}if(me<0)return this;me===0?ue.shift():spliceOne(ue,me),ue.length===1&&(pe[oe]=ue[0]),pe.removeListener!==void 0&&this.emit("removeListener",oe,ye||ce)}return this};EventEmitter$3.prototype.off=EventEmitter$3.prototype.removeListener;EventEmitter$3.prototype.removeAllListeners=function(oe){var ce,ue,pe;if(ue=this._events,ue===void 0)return this;if(ue.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):ue[oe]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete ue[oe]),this;if(arguments.length===0){var me=Object.keys(ue),ge;for(pe=0;pe=0;pe--)this.removeListener(oe,ce[pe]);return this};function _listeners(ne,oe,ce){var ue=ne._events;if(ue===void 0)return[];var pe=ue[oe];return pe===void 0?[]:typeof pe=="function"?ce?[pe.listener||pe]:[pe]:ce?unwrapListeners(pe):arrayClone(pe,pe.length)}EventEmitter$3.prototype.listeners=function(oe){return _listeners(this,oe,!0)};EventEmitter$3.prototype.rawListeners=function(oe){return _listeners(this,oe,!1)};EventEmitter$3.listenerCount=function(ne,oe){return typeof ne.listenerCount=="function"?ne.listenerCount(oe):listenerCount.call(ne,oe)};EventEmitter$3.prototype.listenerCount=listenerCount;function listenerCount(ne){var oe=this._events;if(oe!==void 0){var ce=oe[ne];if(typeof ce=="function")return 1;if(ce!==void 0)return ce.length}return 0}EventEmitter$3.prototype.eventNames=function(){return this._eventsCount>0?ReflectOwnKeys(this._events):[]};function arrayClone(ne,oe){for(var ce=new Array(oe),ue=0;ue=oe?{done:!0}:{done:!1,value:ne[ce++]}})};Iterator$2.empty=function(){var ne=new Iterator$2(function(){return{done:!0}});return ne};Iterator$2.fromSequence=function(ne){var oe=0,ce=ne.length;return new Iterator$2(function(){return oe>=ce?{done:!0}:{done:!1,value:ne[oe++]}})};Iterator$2.is=function(ne){return ne instanceof Iterator$2?!0:typeof ne=="object"&&ne!==null&&typeof ne.next=="function"};var iterator=Iterator$2;const Iterator$3=getDefaultExportFromCjs$1(iterator);var support$1={};support$1.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";support$1.SYMBOL_SUPPORT=typeof Symbol<"u";var Iterator$1=iterator,support=support$1,ARRAY_BUFFER_SUPPORT=support.ARRAY_BUFFER_SUPPORT,SYMBOL_SUPPORT=support.SYMBOL_SUPPORT;function iterOrNull(ne){return typeof ne=="string"||Array.isArray(ne)||ARRAY_BUFFER_SUPPORT&&ArrayBuffer.isView(ne)?Iterator$1.fromSequence(ne):typeof ne!="object"||ne===null?null:SYMBOL_SUPPORT&&typeof ne[Symbol.iterator]=="function"?ne[Symbol.iterator]():typeof ne.next=="function"?ne:null}var iter$2=function(oe){var ce=iterOrNull(oe);if(!ce)throw new Error("obliterator: target is not iterable nor a valid iterator.");return ce},iter$1=iter$2,take=function(oe,ce){for(var ue=arguments.length>1?ce:1/0,pe=ue!==1/0?new Array(ue):[],me,ge=0,ye=iter$1(oe);;){if(ge===ue)return pe;if(me=ye.next(),me.done)return ge!==ce&&(pe.length=ge),pe;pe[ge++]=me.value}};const take$1=getDefaultExportFromCjs$1(take);var Iterator=iterator,iter=iter$2,chain=function(){var oe=arguments,ce=null,ue=-1;return new Iterator(function(){var me=null;do{if(ce===null){if(ue++,ue>=oe.length)return{done:!0};ce=iter(oe[ue])}if(me=ce.next(),me.done===!0){ce=null;continue}break}while(!0);return me})};const chain$1=getDefaultExportFromCjs$1(chain);function assignPolyfill(){const ne=arguments[0];for(let oe=1,ce=arguments.length;oene++}class GraphError extends Error{constructor(oe){super(),this.name="GraphError",this.message=oe}}class InvalidArgumentsGraphError extends GraphError{constructor(oe){super(oe),this.name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,InvalidArgumentsGraphError.prototype.constructor)}}class NotFoundGraphError extends GraphError{constructor(oe){super(oe),this.name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,NotFoundGraphError.prototype.constructor)}}class UsageGraphError extends GraphError{constructor(oe){super(oe),this.name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,UsageGraphError.prototype.constructor)}}function MixedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}MixedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}};function DirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}DirectedNodeData.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}};function UndirectedNodeData(ne,oe){this.key=ne,this.attributes=oe,this.clear()}UndirectedNodeData.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}};function EdgeData(ne,oe,ce,ue,pe){this.key=oe,this.attributes=pe,this.undirected=ne,this.source=ce,this.target=ue}EdgeData.prototype.attach=function(){let ne="out",oe="in";this.undirected&&(ne=oe="undirected");const ce=this.source.key,ue=this.target.key;this.source[ne][ue]=this,!(this.undirected&&ce===ue)&&(this.target[oe][ce]=this)};EdgeData.prototype.attachMulti=function(){let ne="out",oe="in";const ce=this.source.key,ue=this.target.key;this.undirected&&(ne=oe="undirected");const pe=this.source[ne],me=pe[ue];if(typeof me>"u"){pe[ue]=this,this.undirected&&ce===ue||(this.target[oe][ce]=this);return}me.previous=this,this.next=me,pe[ue]=this,this.target[oe][ce]=this};EdgeData.prototype.detach=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),delete this.source[ce][oe],delete this.target[ue][ne]};EdgeData.prototype.detachMulti=function(){const ne=this.source.key,oe=this.target.key;let ce="out",ue="in";this.undirected&&(ce=ue="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[ce][oe],delete this.target[ue][ne]):(this.next.previous=void 0,this.source[ce][oe]=this.next,this.target[ue][ne]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};const NODE=0,SOURCE=1,TARGET=2,OPPOSITE=3;function findRelevantNodeData(ne,oe,ce,ue,pe,me,ge){let ye,xe,ve,_e;if(ue=""+ue,ce===NODE){if(ye=ne._nodes.get(ue),!ye)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" node in the graph.`);ve=pe,_e=me}else if(ce===OPPOSITE){if(pe=""+pe,xe=ne._edges.get(pe),!xe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${pe}" edge in the graph.`);const we=xe.source.key,Se=xe.target.key;if(ue===we)ye=xe.target;else if(ue===Se)ye=xe.source;else throw new NotFoundGraphError(`Graph.${oe}: the "${ue}" node is not attached to the "${pe}" edge (${we}, ${Se}).`);ve=me,_e=ge}else{if(xe=ne._edges.get(ue),!xe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`);ce===SOURCE?ye=xe.source:ye=xe.target,ve=pe,_e=me}return[ye,ve,_e]}function attachNodeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes[ye]}}function attachNodeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){const[me]=findRelevantNodeData(this,oe,ce,ue,pe);return me.attributes}}function attachNodeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return ge.attributes.hasOwnProperty(ye)}}function attachNodeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,xe,ve]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);return ye.attributes[xe]=ve,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:xe}),this}}function attachNodeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me,ge){const[ye,xe,ve]=findRelevantNodeData(this,oe,ce,ue,pe,me,ge);if(typeof ve!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);const _e=ye.attributes,we=ve(_e[xe]);return _e[xe]=we,this.emit("nodeAttributesUpdated",{key:ye.key,type:"set",attributes:ye.attributes,name:xe}),this}}function attachNodeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);return delete ge.attributes[ye],this.emit("nodeAttributesUpdated",{key:ge.key,type:"remove",attributes:ge.attributes,name:ye}),this}}function attachNodeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return ge.attributes=ye,this.emit("nodeAttributesUpdated",{key:ge.key,type:"replace",attributes:ge.attributes}),this}}function attachNodeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$3(ge.attributes,ye),this.emit("nodeAttributesUpdated",{key:ge.key,type:"merge",attributes:ge.attributes,data:ye}),this}}function attachNodeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){const[ge,ye]=findRelevantNodeData(this,oe,ce,ue,pe,me);if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return ge.attributes=ye(ge.attributes),this.emit("nodeAttributesUpdated",{key:ge.key,type:"update",attributes:ge.attributes}),this}}const NODE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachNodeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachNodeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachNodeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachNodeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachNodeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachNodeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachNodeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachNodeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachNodeAttributesUpdater}];function attachNodeAttributesMethods(ne){NODE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Node"),NODE),ce(ne,oe("Source"),SOURCE),ce(ne,oe("Target"),TARGET),ce(ne,oe("Opposite"),OPPOSITE)})}function attachEdgeAttributeGetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes[pe]}}function attachEdgeAttributesGetter(ne,oe,ce){ne.prototype[oe]=function(ue){let pe;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>1){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const me=""+ue,ge=""+arguments[1];if(pe=getMatchingEdge(this,me,ge,ce),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${me}" - "${ge}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,pe=this._edges.get(ue),!pe)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return pe.attributes}}function attachEdgeAttributeChecker(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return me.attributes.hasOwnProperty(pe)}}function attachEdgeAttributeSetter(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,xe=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,xe,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${xe}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return ge.attributes[pe]=me,this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe,me){let ge;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>3){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ye=""+ue,xe=""+pe;if(pe=arguments[2],me=arguments[3],ge=getMatchingEdge(this,ye,xe,ce),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ye}" - "${xe}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,ge=this._edges.get(ue),!ge)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof me!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: updater should be a function.`);return ge.attributes[pe]=me(ge.attributes[pe]),this.emit("edgeAttributesUpdated",{key:ge.key,type:"set",attributes:ge.attributes,name:pe}),this}}function attachEdgeAttributeRemover(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}return delete me.attributes[pe],this.emit("edgeAttributesUpdated",{key:me.key,type:"remove",attributes:me.attributes,name:pe}),this}}function attachEdgeAttributesReplacer(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$1(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return me.attributes=pe,this.emit("edgeAttributesUpdated",{key:me.key,type:"replace",attributes:me.attributes}),this}}function attachEdgeAttributesMerger(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(!isPlainObject$1(pe))throw new InvalidArgumentsGraphError(`Graph.${oe}: provided attributes are not a plain object.`);return assign$3(me.attributes,pe),this.emit("edgeAttributesUpdated",{key:me.key,type:"merge",attributes:me.attributes,data:pe}),this}}function attachEdgeAttributesUpdater(ne,oe,ce){ne.prototype[oe]=function(ue,pe){let me;if(this.type!=="mixed"&&ce!=="mixed"&&ce!==this.type)throw new UsageGraphError(`Graph.${oe}: cannot find this type of edges in your ${this.type} graph.`);if(arguments.length>2){if(this.multi)throw new UsageGraphError(`Graph.${oe}: cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about.`);const ge=""+ue,ye=""+pe;if(pe=arguments[2],me=getMatchingEdge(this,ge,ye,ce),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find an edge for the given path ("${ge}" - "${ye}").`)}else{if(ce!=="mixed")throw new UsageGraphError(`Graph.${oe}: calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type.`);if(ue=""+ue,me=this._edges.get(ue),!me)throw new NotFoundGraphError(`Graph.${oe}: could not find the "${ue}" edge in the graph.`)}if(typeof pe!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: provided updater is not a function.`);return me.attributes=pe(me.attributes),this.emit("edgeAttributesUpdated",{key:me.key,type:"update",attributes:me.attributes}),this}}const EDGE_ATTRIBUTES_METHODS=[{name:ne=>`get${ne}Attribute`,attacher:attachEdgeAttributeGetter},{name:ne=>`get${ne}Attributes`,attacher:attachEdgeAttributesGetter},{name:ne=>`has${ne}Attribute`,attacher:attachEdgeAttributeChecker},{name:ne=>`set${ne}Attribute`,attacher:attachEdgeAttributeSetter},{name:ne=>`update${ne}Attribute`,attacher:attachEdgeAttributeUpdater},{name:ne=>`remove${ne}Attribute`,attacher:attachEdgeAttributeRemover},{name:ne=>`replace${ne}Attributes`,attacher:attachEdgeAttributesReplacer},{name:ne=>`merge${ne}Attributes`,attacher:attachEdgeAttributesMerger},{name:ne=>`update${ne}Attributes`,attacher:attachEdgeAttributesUpdater}];function attachEdgeAttributesMethods(ne){EDGE_ATTRIBUTES_METHODS.forEach(function({name:oe,attacher:ce}){ce(ne,oe("Edge"),"mixed"),ce(ne,oe("DirectedEdge"),"directed"),ce(ne,oe("UndirectedEdge"),"undirected")})}const EDGES_ITERATION=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function forEachSimple(ne,oe,ce,ue){let pe=!1;for(const me in oe){if(me===ue)continue;const ge=oe[me];if(pe=ce(ge.key,ge.attributes,ge.source.key,ge.target.key,ge.source.attributes,ge.target.attributes,ge.undirected),ne&&pe)return ge.key}}function forEachMulti(ne,oe,ce,ue){let pe,me,ge,ye=!1;for(const xe in oe)if(xe!==ue){pe=oe[xe];do{if(me=pe.source,ge=pe.target,ye=ce(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected),ne&&ye)return pe.key;pe=pe.next}while(pe!==void 0)}}function createIterator(ne,oe){const ce=Object.keys(ne),ue=ce.length;let pe,me=0;return new Iterator$3(function(){do if(pe)pe=pe.next;else{if(me>=ue)return{done:!0};const ye=ce[me++];if(ye===oe){pe=void 0;continue}pe=ne[ye]}while(!pe);return{done:!1,value:{edge:pe.key,attributes:pe.attributes,source:pe.source.key,target:pe.target.key,sourceAttributes:pe.source.attributes,targetAttributes:pe.target.attributes,undirected:pe.undirected}}})}function forEachForKeySimple(ne,oe,ce,ue){const pe=oe[ce];if(!pe)return;const me=pe.source,ge=pe.target;if(ue(pe.key,pe.attributes,me.key,ge.key,me.attributes,ge.attributes,pe.undirected)&&ne)return pe.key}function forEachForKeyMulti(ne,oe,ce,ue){let pe=oe[ce];if(!pe)return;let me=!1;do{if(me=ue(pe.key,pe.attributes,pe.source.key,pe.target.key,pe.source.attributes,pe.target.attributes,pe.undirected),ne&&me)return pe.key;pe=pe.next}while(pe!==void 0)}function createIteratorForKey(ne,oe){let ce=ne[oe];return ce.next!==void 0?new Iterator$3(function(){if(!ce)return{done:!0};const ue={edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected};return ce=ce.next,{done:!1,value:ue}}):Iterator$3.of({edge:ce.key,attributes:ce.attributes,source:ce.source.key,target:ce.target.key,sourceAttributes:ce.source.attributes,targetAttributes:ce.target.attributes,undirected:ce.undirected})}function createEdgeArray(ne,oe){if(ne.size===0)return[];if(oe==="mixed"||oe===ne.type)return typeof Array.from=="function"?Array.from(ne._edges.keys()):take$1(ne._edges.keys(),ne._edges.size);const ce=oe==="undirected"?ne.undirectedSize:ne.directedSize,ue=new Array(ce),pe=oe==="undirected",me=ne._edges.values();let ge=0,ye,xe;for(;ye=me.next(),ye.done!==!0;)xe=ye.value,xe.undirected===pe&&(ue[ge++]=xe.key);return ue}function forEachEdge(ne,oe,ce,ue){if(oe.size===0)return;const pe=ce!=="mixed"&&ce!==oe.type,me=ce==="undirected";let ge,ye,xe=!1;const ve=oe._edges.values();for(;ge=ve.next(),ge.done!==!0;){if(ye=ge.value,pe&&ye.undirected!==me)continue;const{key:_e,attributes:we,source:Se,target:$e}=ye;if(xe=ue(_e,we,Se.key,$e.key,Se.attributes,$e.attributes,ye.undirected),ne&&xe)return _e}}function createEdgeIterator(ne,oe){if(ne.size===0)return Iterator$3.empty();const ce=oe!=="mixed"&&oe!==ne.type,ue=oe==="undirected",pe=ne._edges.values();return new Iterator$3(function(){let ge,ye;for(;;){if(ge=pe.next(),ge.done)return ge;if(ye=ge.value,!(ce&&ye.undirected!==ue))break}return{value:{edge:ye.key,attributes:ye.attributes,source:ye.source.key,target:ye.target.key,sourceAttributes:ye.source.attributes,targetAttributes:ye.target.attributes,undirected:ye.undirected},done:!1}})}function forEachEdgeForNode(ne,oe,ce,ue,pe,me){const ge=oe?forEachMulti:forEachSimple;let ye;if(ce!=="undirected"&&(ue!=="out"&&(ye=ge(ne,pe.in,me),ne&&ye)||ue!=="in"&&(ye=ge(ne,pe.out,me,ue?void 0:pe.key),ne&&ye))||ce!=="directed"&&(ye=ge(ne,pe.undirected,me),ne&&ye))return ye}function createEdgeArrayForNode(ne,oe,ce,ue){const pe=[];return forEachEdgeForNode(!1,ne,oe,ce,ue,function(me){pe.push(me)}),pe}function createEdgeIteratorForNode(ne,oe,ce){let ue=Iterator$3.empty();return ne!=="undirected"&&(oe!=="out"&&typeof ce.in<"u"&&(ue=chain$1(ue,createIterator(ce.in))),oe!=="in"&&typeof ce.out<"u"&&(ue=chain$1(ue,createIterator(ce.out,oe?void 0:ce.key)))),ne!=="directed"&&typeof ce.undirected<"u"&&(ue=chain$1(ue,createIterator(ce.undirected))),ue}function forEachEdgeForPath(ne,oe,ce,ue,pe,me,ge){const ye=ce?forEachForKeyMulti:forEachForKeySimple;let xe;if(oe!=="undirected"&&(typeof pe.in<"u"&&ue!=="out"&&(xe=ye(ne,pe.in,me,ge),ne&&xe)||typeof pe.out<"u"&&ue!=="in"&&(ue||pe.key!==me)&&(xe=ye(ne,pe.out,me,ge),ne&&xe))||oe!=="directed"&&typeof pe.undirected<"u"&&(xe=ye(ne,pe.undirected,me,ge),ne&&xe))return xe}function createEdgeArrayForPath(ne,oe,ce,ue,pe){const me=[];return forEachEdgeForPath(!1,ne,oe,ce,ue,pe,function(ge){me.push(ge)}),me}function createEdgeIteratorForPath(ne,oe,ce,ue){let pe=Iterator$3.empty();return ne!=="undirected"&&(typeof ce.in<"u"&&oe!=="out"&&ue in ce.in&&(pe=chain$1(pe,createIteratorForKey(ce.in,ue))),typeof ce.out<"u"&&oe!=="in"&&ue in ce.out&&(oe||ce.key!==ue)&&(pe=chain$1(pe,createIteratorForKey(ce.out,ue)))),ne!=="directed"&&typeof ce.undirected<"u"&&ue in ce.undirected&&(pe=chain$1(pe,createIteratorForKey(ce.undirected,ue))),pe}function attachEdgeArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me,ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];if(!arguments.length)return createEdgeArray(this,ue);if(arguments.length===1){me=""+me;const ye=this._nodes.get(me);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createEdgeArrayForNode(this.multi,ue==="mixed"?this.type:ue,pe,ye)}if(arguments.length===2){me=""+me,ge=""+ge;const ye=this._nodes.get(me);if(!ye)throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" source node in the graph.`);if(!this._nodes.has(ge))throw new NotFoundGraphError(`Graph.${ce}: could not find the "${ge}" target node in the graph.`);return createEdgeArrayForPath(ue,this.multi,pe,ye,ge)}throw new InvalidArgumentsGraphError(`Graph.${ce}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachForEachEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,_e,we){if(!(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)){if(arguments.length===1)return we=ve,forEachEdge(!1,this,ue,we);if(arguments.length===2){ve=""+ve,we=_e;const Se=this._nodes.get(ve);if(typeof Se>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);return forEachEdgeForNode(!1,this.multi,ue==="mixed"?this.type:ue,pe,Se,we)}if(arguments.length===3){ve=""+ve,_e=""+_e;const Se=this._nodes.get(ve);if(!Se)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" source node in the graph.`);if(!this._nodes.has(_e))throw new NotFoundGraphError(`Graph.${me}: could not find the "${_e}" target node in the graph.`);return forEachEdgeForPath(!1,ue,this.multi,pe,Se,_e,we)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)}};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(){const ve=Array.prototype.slice.call(arguments),_e=ve.pop();let we;if(ve.length===0){let Se=0;ue!=="directed"&&(Se+=this.undirectedSize),ue!=="undirected"&&(Se+=this.directedSize),we=new Array(Se);let $e=0;ve.push((Te,Re,Ae,ke,Be,Ie,Ne)=>{we[$e++]=_e(Te,Re,Ae,ke,Be,Ie,Ne)})}else we=[],ve.push((Se,$e,Te,Re,Ae,ke,Be)=>{we.push(_e(Se,$e,Te,Re,Ae,ke,Be))});return this[me].apply(this,ve),we};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(){const ve=Array.prototype.slice.call(arguments),_e=ve.pop(),we=[];return ve.push((Se,$e,Te,Re,Ae,ke,Be)=>{_e(Se,$e,Te,Re,Ae,ke,Be)&&we.push(Se)}),this[me].apply(this,ve),we};const xe="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[xe]=function(){let ve=Array.prototype.slice.call(arguments);if(ve.length<2||ve.length>4)throw new InvalidArgumentsGraphError(`Graph.${xe}: invalid number of arguments (expecting 2, 3 or 4 and got ${ve.length}).`);if(typeof ve[ve.length-1]=="function"&&typeof ve[ve.length-2]!="function")throw new InvalidArgumentsGraphError(`Graph.${xe}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let _e,we;ve.length===2?(_e=ve[0],we=ve[1],ve=[]):ve.length===3?(_e=ve[1],we=ve[2],ve=[ve[0]]):ve.length===4&&(_e=ve[2],we=ve[3],ve=[ve[0],ve[1]]);let Se=we;return ve.push(($e,Te,Re,Ae,ke,Be,Ie)=>{Se=_e(Se,$e,Te,Re,Ae,ke,Be,Ie)}),this[me].apply(this,ve),Se}}function attachFindEdge(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="find"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(xe,ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return!1;if(arguments.length===1)return _e=xe,forEachEdge(!0,this,ue,_e);if(arguments.length===2){xe=""+xe,_e=ve;const we=this._nodes.get(xe);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" node in the graph.`);return forEachEdgeForNode(!0,this.multi,ue==="mixed"?this.type:ue,pe,we,_e)}if(arguments.length===3){xe=""+xe,ve=""+ve;const we=this._nodes.get(xe);if(!we)throw new NotFoundGraphError(`Graph.${me}: could not find the "${xe}" source node in the graph.`);if(!this._nodes.has(ve))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" target node in the graph.`);return forEachEdgeForPath(!0,ue,this.multi,pe,we,ve,_e)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 1, 2 or 3 and got ${arguments.length}).`)};const ge="some"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ge]=function(){const xe=Array.prototype.slice.call(arguments),ve=xe.pop();return xe.push((we,Se,$e,Te,Re,Ae,ke)=>ve(we,Se,$e,Te,Re,Ae,ke)),!!this[me].apply(this,xe)};const ye="every"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[ye]=function(){const xe=Array.prototype.slice.call(arguments),ve=xe.pop();return xe.push((we,Se,$e,Te,Re,Ae,ke)=>!ve(we,Se,$e,Te,Re,Ae,ke)),!this[me].apply(this,xe)}}function attachEdgeIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge,ye){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();if(!arguments.length)return createEdgeIterator(this,ue);if(arguments.length===1){ge=""+ge;const xe=this._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createEdgeIteratorForNode(ue,pe,xe)}if(arguments.length===2){ge=""+ge,ye=""+ye;const xe=this._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" source node in the graph.`);if(!this._nodes.has(ye))throw new NotFoundGraphError(`Graph.${me}: could not find the "${ye}" target node in the graph.`);return createEdgeIteratorForPath(ue,pe,xe,ye)}throw new InvalidArgumentsGraphError(`Graph.${me}: too many arguments (expecting 0, 1 or 2 and got ${arguments.length}).`)}}function attachEdgeIterationMethods(ne){EDGES_ITERATION.forEach(oe=>{attachEdgeArrayCreator(ne,oe),attachForEachEdge(ne,oe),attachFindEdge(ne,oe),attachEdgeIteratorCreator(ne,oe)})}const NEIGHBORS_ITERATION=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function CompositeSetWrapper(){this.A=null,this.B=null}CompositeSetWrapper.prototype.wrap=function(ne){this.A===null?this.A=ne:this.B===null&&(this.B=ne)};CompositeSetWrapper.prototype.has=function(ne){return this.A!==null&&ne in this.A||this.B!==null&&ne in this.B};function forEachInObjectOnce(ne,oe,ce,ue,pe){for(const me in ue){const ge=ue[me],ye=ge.source,xe=ge.target,ve=ye===ce?xe:ye;if(oe&&oe.has(ve.key))continue;const _e=pe(ve.key,ve.attributes);if(ne&&_e)return ve.key}}function forEachNeighbor(ne,oe,ce,ue,pe){if(oe!=="mixed"){if(oe==="undirected")return forEachInObjectOnce(ne,null,ue,ue.undirected,pe);if(typeof ce=="string")return forEachInObjectOnce(ne,null,ue,ue[ce],pe)}const me=new CompositeSetWrapper;let ge;if(oe!=="undirected"){if(ce!=="out"){if(ge=forEachInObjectOnce(ne,null,ue,ue.in,pe),ne&&ge)return ge;me.wrap(ue.in)}if(ce!=="in"){if(ge=forEachInObjectOnce(ne,me,ue,ue.out,pe),ne&&ge)return ge;me.wrap(ue.out)}}if(oe!=="directed"&&(ge=forEachInObjectOnce(ne,me,ue,ue.undirected,pe),ne&&ge))return ge}function createNeighborArrayForNode(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return Object.keys(ce.undirected);if(typeof oe=="string")return Object.keys(ce[oe])}const ue=[];return forEachNeighbor(!1,ne,oe,ce,function(pe){ue.push(pe)}),ue}function createDedupedObjectIterator(ne,oe,ce){const ue=Object.keys(ce),pe=ue.length;let me=0;return new Iterator$3(function(){let ye=null;do{if(me>=pe)return ne&&ne.wrap(ce),{done:!0};const xe=ce[ue[me++]],ve=xe.source,_e=xe.target;if(ye=ve===oe?_e:ve,ne&&ne.has(ye.key)){ye=null;continue}}while(ye===null);return{done:!1,value:{neighbor:ye.key,attributes:ye.attributes}}})}function createNeighborIterator(ne,oe,ce){if(ne!=="mixed"){if(ne==="undirected")return createDedupedObjectIterator(null,ce,ce.undirected);if(typeof oe=="string")return createDedupedObjectIterator(null,ce,ce[oe])}let ue=Iterator$3.empty();const pe=new CompositeSetWrapper;return ne!=="undirected"&&(oe!=="out"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.in))),oe!=="in"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.out)))),ne!=="directed"&&(ue=chain$1(ue,createDedupedObjectIterator(pe,ce,ce.undirected))),ue}function attachNeighborArrayCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe;ne.prototype[ce]=function(me){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return[];me=""+me;const ge=this._nodes.get(me);if(typeof ge>"u")throw new NotFoundGraphError(`Graph.${ce}: could not find the "${me}" node in the graph.`);return createNeighborArrayForNode(ue==="mixed"?this.type:ue,pe,ge)}}function attachForEachNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me="forEach"+ce[0].toUpperCase()+ce.slice(1,-1);ne.prototype[me]=function(ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;ve=""+ve;const we=this._nodes.get(ve);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ve}" node in the graph.`);forEachNeighbor(!1,ue==="mixed"?this.type:ue,pe,we,_e)};const ge="map"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ge]=function(ve,_e){const we=[];return this[me](ve,(Se,$e)=>{we.push(_e(Se,$e))}),we};const ye="filter"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[ye]=function(ve,_e){const we=[];return this[me](ve,(Se,$e)=>{_e(Se,$e)&&we.push(Se)}),we};const xe="reduce"+ce[0].toUpperCase()+ce.slice(1);ne.prototype[xe]=function(ve,_e,we){if(arguments.length<3)throw new InvalidArgumentsGraphError(`Graph.${xe}: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.`);let Se=we;return this[me](ve,($e,Te)=>{Se=_e(Se,$e,Te)}),Se}}function attachFindNeighbor(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce[0].toUpperCase()+ce.slice(1,-1),ge="find"+me;ne.prototype[ge]=function(ve,_e){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return;ve=""+ve;const we=this._nodes.get(ve);if(typeof we>"u")throw new NotFoundGraphError(`Graph.${ge}: could not find the "${ve}" node in the graph.`);return forEachNeighbor(!0,ue==="mixed"?this.type:ue,pe,we,_e)};const ye="some"+me;ne.prototype[ye]=function(ve,_e){return!!this[ge](ve,_e)};const xe="every"+me;ne.prototype[xe]=function(ve,_e){return!this[ge](ve,(Se,$e)=>!_e(Se,$e))}}function attachNeighborIteratorCreator(ne,oe){const{name:ce,type:ue,direction:pe}=oe,me=ce.slice(0,-1)+"Entries";ne.prototype[me]=function(ge){if(ue!=="mixed"&&this.type!=="mixed"&&ue!==this.type)return Iterator$3.empty();ge=""+ge;const ye=this._nodes.get(ge);if(typeof ye>"u")throw new NotFoundGraphError(`Graph.${me}: could not find the "${ge}" node in the graph.`);return createNeighborIterator(ue==="mixed"?this.type:ue,pe,ye)}}function attachNeighborIterationMethods(ne){NEIGHBORS_ITERATION.forEach(oe=>{attachNeighborArrayCreator(ne,oe),attachForEachNeighbor(ne,oe),attachFindNeighbor(ne,oe),attachNeighborIteratorCreator(ne,oe)})}function forEachAdjacency(ne,oe,ce,ue,pe){const me=ue._nodes.values(),ge=ue.type;let ye,xe,ve,_e,we,Se;for(;ye=me.next(),ye.done!==!0;){let $e=!1;if(xe=ye.value,ge!=="undirected"){_e=xe.out;for(ve in _e){we=_e[ve];do Se=we.target,$e=!0,pe(xe.key,Se.key,xe.attributes,Se.attributes,we.key,we.attributes,we.undirected),we=we.next;while(we)}}if(ge!=="directed"){_e=xe.undirected;for(ve in _e)if(!(oe&&xe.key>ve)){we=_e[ve];do Se=we.target,Se.key!==ve&&(Se=we.source),$e=!0,pe(xe.key,Se.key,xe.attributes,Se.attributes,we.key,we.attributes,we.undirected),we=we.next;while(we)}}ce&&!$e&&pe(xe.key,null,xe.attributes,null,null,null,null)}}function serializeNode(ne,oe){const ce={key:ne};return isEmpty$2(oe.attributes)||(ce.attributes=assign$3({},oe.attributes)),ce}function serializeEdge(ne,oe,ce){const ue={key:oe,source:ce.source.key,target:ce.target.key};return isEmpty$2(ce.attributes)||(ue.attributes=assign$3({},ce.attributes)),ne==="mixed"&&ce.undirected&&(ue.undirected=!0),ue}function validateSerializedNode(ne){if(!isPlainObject$1(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized node is missing its key.");if("attributes"in ne&&(!isPlainObject$1(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function validateSerializedEdge(ne){if(!isPlainObject$1(ne))throw new InvalidArgumentsGraphError('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its source.");if(!("target"in ne))throw new InvalidArgumentsGraphError("Graph.import: serialized edge is missing its target.");if("attributes"in ne&&(!isPlainObject$1(ne.attributes)||ne.attributes===null))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in ne&&typeof ne.undirected!="boolean")throw new InvalidArgumentsGraphError("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}const INSTANCE_ID=incrementalIdStartingFromRandomByte(),TYPES$1=new Set(["directed","undirected","mixed"]),EMITTER_PROPS=new Set(["domain","_events","_eventsCount","_maxListeners"]),EDGE_ADD_METHODS=[{name:ne=>`${ne}Edge`,generateKey:!0},{name:ne=>`${ne}DirectedEdge`,generateKey:!0,type:"directed"},{name:ne=>`${ne}UndirectedEdge`,generateKey:!0,type:"undirected"},{name:ne=>`${ne}EdgeWithKey`},{name:ne=>`${ne}DirectedEdgeWithKey`,type:"directed"},{name:ne=>`${ne}UndirectedEdgeWithKey`,type:"undirected"}],DEFAULTS={allowSelfLoops:!0,multi:!1,type:"mixed"};function addNode(ne,oe,ce){if(ce&&!isPlainObject$1(ce))throw new InvalidArgumentsGraphError(`Graph.addNode: invalid attributes. Expecting an object but got "${ce}"`);if(oe=""+oe,ce=ce||{},ne._nodes.has(oe))throw new UsageGraphError(`Graph.addNode: the "${oe}" node already exist in the graph.`);const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function unsafeAddNode(ne,oe,ce){const ue=new ne.NodeDataClass(oe,ce);return ne._nodes.set(oe,ue),ne.emit("nodeAdded",{key:oe,attributes:ce}),ue}function addEdge(ne,oe,ce,ue,pe,me,ge,ye){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead.`);if(ye&&!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`);if(me=""+me,ge=""+ge,ye=ye||{},!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);const xe=ne._nodes.get(me),ve=ne._nodes.get(ge);if(!xe)throw new NotFoundGraphError(`Graph.${oe}: source node "${me}" not found.`);if(!ve)throw new NotFoundGraphError(`Graph.${oe}: target node "${ge}" not found.`);const _e={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);if(!ne.multi&&(ue?typeof xe.undirected[ge]<"u":typeof xe.out[ge]<"u"))throw new UsageGraphError(`Graph.${oe}: an edge linking "${me}" to "${ge}" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`);const we=new EdgeData(ue,pe,xe,ve,ye);ne._edges.set(pe,we);const Se=me===ge;return ue?(xe.undirectedDegree++,ve.undirectedDegree++,Se&&(xe.undirectedLoops++,ne._undirectedSelfLoopCount++)):(xe.outDegree++,ve.inDegree++,Se&&(xe.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?we.attachMulti():we.attach(),ue?ne._undirectedSize++:ne._directedSize++,_e.key=pe,ne.emit("edgeAdded",_e),pe}function mergeEdge(ne,oe,ce,ue,pe,me,ge,ye,xe){if(!ue&&ne.type==="undirected")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead.`);if(ue&&ne.type==="directed")throw new UsageGraphError(`Graph.${oe}: you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead.`);if(ye){if(xe){if(typeof ye!="function")throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid updater function. Expecting a function but got "${ye}"`)}else if(!isPlainObject$1(ye))throw new InvalidArgumentsGraphError(`Graph.${oe}: invalid attributes. Expecting an object but got "${ye}"`)}me=""+me,ge=""+ge;let ve;if(xe&&(ve=ye,ye=void 0),!ne.allowSelfLoops&&me===ge)throw new UsageGraphError(`Graph.${oe}: source & target are the same ("${me}"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`);let _e=ne._nodes.get(me),we=ne._nodes.get(ge),Se,$e;if(!ce&&(Se=ne._edges.get(pe),Se)){if((Se.source.key!==me||Se.target.key!==ge)&&(!ue||Se.source.key!==ge||Se.target.key!==me))throw new UsageGraphError(`Graph.${oe}: inconsistency detected when attempting to merge the "${pe}" edge with "${me}" source & "${ge}" target vs. ("${Se.source.key}", "${Se.target.key}").`);$e=Se}if(!$e&&!ne.multi&&_e&&($e=ue?_e.undirected[ge]:_e.out[ge]),$e){const Be=[$e.key,!1,!1,!1];if(xe?!ve:!ye)return Be;if(xe){const Ie=$e.attributes;$e.attributes=ve(Ie),ne.emit("edgeAttributesUpdated",{type:"replace",key:$e.key,attributes:$e.attributes})}else assign$3($e.attributes,ye),ne.emit("edgeAttributesUpdated",{type:"merge",key:$e.key,attributes:$e.attributes,data:ye});return Be}ye=ye||{},xe&&ve&&(ye=ve(ye));const Te={key:null,undirected:ue,source:me,target:ge,attributes:ye};if(ce)pe=ne._edgeKeyGenerator();else if(pe=""+pe,ne._edges.has(pe))throw new UsageGraphError(`Graph.${oe}: the "${pe}" edge already exists in the graph.`);let Re=!1,Ae=!1;_e||(_e=unsafeAddNode(ne,me,{}),Re=!0,me===ge&&(we=_e,Ae=!0)),we||(we=unsafeAddNode(ne,ge,{}),Ae=!0),Se=new EdgeData(ue,pe,_e,we,ye),ne._edges.set(pe,Se);const ke=me===ge;return ue?(_e.undirectedDegree++,we.undirectedDegree++,ke&&(_e.undirectedLoops++,ne._undirectedSelfLoopCount++)):(_e.outDegree++,we.inDegree++,ke&&(_e.directedLoops++,ne._directedSelfLoopCount++)),ne.multi?Se.attachMulti():Se.attach(),ue?ne._undirectedSize++:ne._directedSize++,Te.key=pe,ne.emit("edgeAdded",Te),[pe,!0,Re,Ae]}function dropEdgeFromData(ne,oe){ne._edges.delete(oe.key);const{source:ce,target:ue,attributes:pe}=oe,me=oe.undirected,ge=ce===ue;me?(ce.undirectedDegree--,ue.undirectedDegree--,ge&&(ce.undirectedLoops--,ne._undirectedSelfLoopCount--)):(ce.outDegree--,ue.inDegree--,ge&&(ce.directedLoops--,ne._directedSelfLoopCount--)),ne.multi?oe.detachMulti():oe.detach(),me?ne._undirectedSize--:ne._directedSize--,ne.emit("edgeDropped",{key:oe.key,attributes:pe,source:ce.key,target:ue.key,undirected:me})}class Graph extends eventsExports.EventEmitter{constructor(oe){if(super(),oe=assign$3({},DEFAULTS,oe),typeof oe.multi!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "${oe.multi}".`);if(!TYPES$1.has(oe.type))throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "${oe.type}".`);if(typeof oe.allowSelfLoops!="boolean")throw new InvalidArgumentsGraphError(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "${oe.allowSelfLoops}".`);const ce=oe.type==="mixed"?MixedNodeData:oe.type==="directed"?DirectedNodeData:UndirectedNodeData;privateProperty(this,"NodeDataClass",ce);const ue="geid_"+INSTANCE_ID()+"_";let pe=0;const me=()=>{let ge;do ge=ue+pe++;while(this._edges.has(ge));return ge};privateProperty(this,"_attributes",{}),privateProperty(this,"_nodes",new Map),privateProperty(this,"_edges",new Map),privateProperty(this,"_directedSize",0),privateProperty(this,"_undirectedSize",0),privateProperty(this,"_directedSelfLoopCount",0),privateProperty(this,"_undirectedSelfLoopCount",0),privateProperty(this,"_edgeKeyGenerator",me),privateProperty(this,"_options",oe),EMITTER_PROPS.forEach(ge=>privateProperty(this,ge,this[ge])),readOnlyProperty(this,"order",()=>this._nodes.size),readOnlyProperty(this,"size",()=>this._edges.size),readOnlyProperty(this,"directedSize",()=>this._directedSize),readOnlyProperty(this,"undirectedSize",()=>this._undirectedSize),readOnlyProperty(this,"selfLoopCount",()=>this._directedSelfLoopCount+this._undirectedSelfLoopCount),readOnlyProperty(this,"directedSelfLoopCount",()=>this._directedSelfLoopCount),readOnlyProperty(this,"undirectedSelfLoopCount",()=>this._undirectedSelfLoopCount),readOnlyProperty(this,"multi",this._options.multi),readOnlyProperty(this,"type",this._options.type),readOnlyProperty(this,"allowSelfLoops",this._options.allowSelfLoops),readOnlyProperty(this,"implementation",()=>"graphology")}_resetInstanceCounters(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0}hasNode(oe){return this._nodes.has(""+oe)}hasDirectedEdge(oe,ce){if(this.type==="undirected")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&!pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.out.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasUndirectedEdge(oe,ce){if(this.type==="directed")return!1;if(arguments.length===1){const ue=""+oe,pe=this._edges.get(ue);return!!pe&&pe.undirected}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasDirectedEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}hasEdge(oe,ce){if(arguments.length===1){const ue=""+oe;return this._edges.has(ue)}else if(arguments.length===2){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);return ue?typeof ue.out<"u"&&ue.out.hasOwnProperty(ce)||typeof ue.undirected<"u"&&ue.undirected.hasOwnProperty(ce):!1}throw new InvalidArgumentsGraphError(`Graph.hasEdge: invalid arity (${arguments.length}, instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target.`)}directedEdge(oe,ce){if(this.type==="undirected")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.directedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||void 0;if(pe)return pe.key}undirectedEdge(oe,ce){if(this.type==="directed")return;if(oe=""+oe,ce=""+ce,this.multi)throw new UsageGraphError("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.undirectedEdge: could not find the "${ce}" target node in the graph.`);const pe=ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}edge(oe,ce){if(this.multi)throw new UsageGraphError("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.edge: could not find the "${oe}" source node in the graph.`);if(!this._nodes.has(ce))throw new NotFoundGraphError(`Graph.edge: could not find the "${ce}" target node in the graph.`);const pe=ue.out&&ue.out[ce]||ue.undirected&&ue.undirected[ce]||void 0;if(pe)return pe.key}areDirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areDirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in||ce in ue.out}areOutNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.out}areInNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?!1:ce in ue.in}areUndirectedNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areUndirectedNeighbors: could not find the "${oe}" node in the graph.`);return this.type==="directed"?!1:ce in ue.undirected}areNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&(ce in ue.in||ce in ue.out)||this.type!=="directed"&&ce in ue.undirected}areInboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areInboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.in||this.type!=="directed"&&ce in ue.undirected}areOutboundNeighbors(oe,ce){oe=""+oe,ce=""+ce;const ue=this._nodes.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.areOutboundNeighbors: could not find the "${oe}" node in the graph.`);return this.type!=="undirected"&&ce in ue.out||this.type!=="directed"&&ce in ue.undirected}inDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree}outDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree}directedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegree: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree}undirectedDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegree: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree}inboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree),ue}outboundDegree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.outDegree),ue}degree(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degree: could not find the "${oe}" node in the graph.`);let ue=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree),ue}inDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree-ce.directedLoops}outDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.outDegree-ce.directedLoops}directedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.directedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="undirected"?0:ce.inDegree+ce.outDegree-ce.directedLoops*2}undirectedDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.undirectedDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);return this.type==="directed"?0:ce.undirectedDegree-ce.undirectedLoops*2}inboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.inboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree,pe+=ce.directedLoops),ue-pe}outboundDegreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.outboundDegreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.outDegree,pe+=ce.directedLoops),ue-pe}degreeWithoutSelfLoops(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.degreeWithoutSelfLoops: could not find the "${oe}" node in the graph.`);let ue=0,pe=0;return this.type!=="directed"&&(ue+=ce.undirectedDegree,pe+=ce.undirectedLoops*2),this.type!=="undirected"&&(ue+=ce.inDegree+ce.outDegree,pe+=ce.directedLoops*2),ue-pe}source(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.source: could not find the "${oe}" edge in the graph.`);return ce.source.key}target(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.target: could not find the "${oe}" edge in the graph.`);return ce.target.key}extremities(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.extremities: could not find the "${oe}" edge in the graph.`);return[ce.source.key,ce.target.key]}opposite(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(ce);if(!ue)throw new NotFoundGraphError(`Graph.opposite: could not find the "${ce}" edge in the graph.`);const pe=ue.source.key,me=ue.target.key;if(oe===pe)return me;if(oe===me)return pe;throw new NotFoundGraphError(`Graph.opposite: the "${oe}" node is not attached to the "${ce}" edge (${pe}, ${me}).`)}hasExtremity(oe,ce){oe=""+oe,ce=""+ce;const ue=this._edges.get(oe);if(!ue)throw new NotFoundGraphError(`Graph.hasExtremity: could not find the "${oe}" edge in the graph.`);return ue.source.key===ce||ue.target.key===ce}isUndirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isUndirected: could not find the "${oe}" edge in the graph.`);return ce.undirected}isDirected(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isDirected: could not find the "${oe}" edge in the graph.`);return!ce.undirected}isSelfLoop(oe){oe=""+oe;const ce=this._edges.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.isSelfLoop: could not find the "${oe}" edge in the graph.`);return ce.source===ce.target}addNode(oe,ce){return addNode(this,oe,ce).key}mergeNode(oe,ce){if(ce&&!isPlainObject$1(ce))throw new InvalidArgumentsGraphError(`Graph.mergeNode: invalid attributes. Expecting an object but got "${ce}"`);oe=""+oe,ce=ce||{};let ue=this._nodes.get(oe);return ue?(ce&&(assign$3(ue.attributes,ce),this.emit("nodeAttributesUpdated",{type:"merge",key:oe,attributes:ue.attributes,data:ce})),[oe,!1]):(ue=new this.NodeDataClass(oe,ce),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:ce}),[oe,!0])}updateNode(oe,ce){if(ce&&typeof ce!="function")throw new InvalidArgumentsGraphError(`Graph.updateNode: invalid updater function. Expecting a function but got "${ce}"`);oe=""+oe;let ue=this._nodes.get(oe);if(ue){if(ce){const me=ue.attributes;ue.attributes=ce(me),this.emit("nodeAttributesUpdated",{type:"replace",key:oe,attributes:ue.attributes})}return[oe,!1]}const pe=ce?ce({}):{};return ue=new this.NodeDataClass(oe,pe),this._nodes.set(oe,ue),this.emit("nodeAdded",{key:oe,attributes:pe}),[oe,!0]}dropNode(oe){oe=""+oe;const ce=this._nodes.get(oe);if(!ce)throw new NotFoundGraphError(`Graph.dropNode: could not find the "${oe}" node in the graph.`);let ue;if(this.type!=="undirected"){for(const pe in ce.out){ue=ce.out[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}for(const pe in ce.in){ue=ce.in[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}}if(this.type!=="directed")for(const pe in ce.undirected){ue=ce.undirected[pe];do dropEdgeFromData(this,ue),ue=ue.next;while(ue)}this._nodes.delete(oe),this.emit("nodeDropped",{key:oe,attributes:ce.attributes})}dropEdge(oe){let ce;if(arguments.length>1){const ue=""+arguments[0],pe=""+arguments[1];if(ce=getMatchingEdge(this,ue,pe,this.type),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${ue}" -> "${pe}" edge in the graph.`)}else if(oe=""+oe,ce=this._edges.get(oe),!ce)throw new NotFoundGraphError(`Graph.dropEdge: could not find the "${oe}" edge in the graph.`);return dropEdgeFromData(this,ce),this}dropDirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");oe=""+oe,ce=""+ce;const ue=getMatchingEdge(this,oe,ce,"directed");if(!ue)throw new NotFoundGraphError(`Graph.dropDirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}dropUndirectedEdge(oe,ce){if(arguments.length<2)throw new UsageGraphError("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new UsageGraphError("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");const ue=getMatchingEdge(this,oe,ce,"undirected");if(!ue)throw new NotFoundGraphError(`Graph.dropUndirectedEdge: could not find a "${oe}" -> "${ce}" edge in the graph.`);return dropEdgeFromData(this,ue),this}clear(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")}clearEdges(){const oe=this._nodes.values();let ce;for(;ce=oe.next(),ce.done!==!0;)ce.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")}getAttribute(oe){return this._attributes[oe]}getAttributes(){return this._attributes}hasAttribute(oe){return this._attributes.hasOwnProperty(oe)}setAttribute(oe,ce){return this._attributes[oe]=ce,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}updateAttribute(oe,ce){if(typeof ce!="function")throw new InvalidArgumentsGraphError("Graph.updateAttribute: updater should be a function.");const ue=this._attributes[oe];return this._attributes[oe]=ce(ue),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:oe}),this}removeAttribute(oe){return delete this._attributes[oe],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:oe}),this}replaceAttributes(oe){if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=oe,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this}mergeAttributes(oe){if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.mergeAttributes: provided attributes are not a plain object.");return assign$3(this._attributes,oe),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:oe}),this}updateAttributes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateAttributes: provided updater is not a function.");return this._attributes=oe(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this}updateEachNodeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._nodes.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,me.attributes=oe(me.key,me.attributes);this.emit("eachNodeAttributesUpdated",{hints:ce||null})}updateEachEdgeAttributes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: expecting an updater function.");if(ce&&!validateHints(ce))throw new InvalidArgumentsGraphError("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");const ue=this._edges.values();let pe,me,ge,ye;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,ge=me.source,ye=me.target,me.attributes=oe(me.key,me.attributes,ge.key,ye.key,ge.attributes,ye.attributes,me.undirected);this.emit("eachEdgeAttributesUpdated",{hints:ce||null})}forEachAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!1,!1,this,oe)}forEachAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!1,!0,this,oe)}forEachAssymetricAdjacencyEntry(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");forEachAdjacency(!1,!0,!1,this,oe)}forEachAssymetricAdjacencyEntryWithOrphans(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");forEachAdjacency(!1,!0,!0,this,oe)}nodes(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):take$1(this._nodes.keys(),this._nodes.size)}forEachNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.forEachNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)}findNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.findNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return pe.key}mapNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.mapNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=new Array(this.order);let ge=0;for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,me[ge++]=oe(pe.key,pe.attributes);return me}someNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.someNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,oe(pe.key,pe.attributes))return!0;return!1}everyNode(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.everyNode: expecting a callback.");const ce=this._nodes.values();let ue,pe;for(;ue=ce.next(),ue.done!==!0;)if(pe=ue.value,!oe(pe.key,pe.attributes))return!1;return!0}filterNodes(oe){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.filterNodes: expecting a callback.");const ce=this._nodes.values();let ue,pe;const me=[];for(;ue=ce.next(),ue.done!==!0;)pe=ue.value,oe(pe.key,pe.attributes)&&me.push(pe.key);return me}reduceNodes(oe,ce){if(typeof oe!="function")throw new InvalidArgumentsGraphError("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new InvalidArgumentsGraphError("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");let ue=ce;const pe=this._nodes.values();let me,ge;for(;me=pe.next(),me.done!==!0;)ge=me.value,ue=oe(ue,ge.key,ge.attributes);return ue}nodeEntries(){const oe=this._nodes.values();return new Iterator$3(()=>{const ce=oe.next();if(ce.done)return ce;const ue=ce.value;return{value:{node:ue.key,attributes:ue.attributes},done:!1}})}export(){const oe=new Array(this._nodes.size);let ce=0;this._nodes.forEach((pe,me)=>{oe[ce++]=serializeNode(me,pe)});const ue=new Array(this._edges.size);return ce=0,this._edges.forEach((pe,me)=>{ue[ce++]=serializeEdge(this.type,me,pe)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:oe,edges:ue}}import(oe,ce=!1){if(oe instanceof Graph)return oe.forEachNode((xe,ve)=>{ce?this.mergeNode(xe,ve):this.addNode(xe,ve)}),oe.forEachEdge((xe,ve,_e,we,Se,$e,Te)=>{ce?Te?this.mergeUndirectedEdgeWithKey(xe,_e,we,ve):this.mergeDirectedEdgeWithKey(xe,_e,we,ve):Te?this.addUndirectedEdgeWithKey(xe,_e,we,ve):this.addDirectedEdgeWithKey(xe,_e,we,ve)}),this;if(!isPlainObject$1(oe))throw new InvalidArgumentsGraphError("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(oe.attributes){if(!isPlainObject$1(oe.attributes))throw new InvalidArgumentsGraphError("Graph.import: invalid attributes. Expecting a plain object.");ce?this.mergeAttributes(oe.attributes):this.replaceAttributes(oe.attributes)}let ue,pe,me,ge,ye;if(oe.nodes){if(me=oe.nodes,!Array.isArray(me))throw new InvalidArgumentsGraphError("Graph.import: invalid nodes. Expecting an array.");for(ue=0,pe=me.length;ue{const me=assign$3({},ue.attributes);ue=new ce.NodeDataClass(pe,me),ce._nodes.set(pe,ue)}),ce}copy(oe){if(oe=oe||{},typeof oe.type=="string"&&oe.type!==this.type&&oe.type!=="mixed")throw new UsageGraphError(`Graph.copy: cannot create an incompatible copy from "${this.type}" type to "${oe.type}" because this would mean losing information about the current graph.`);if(typeof oe.multi=="boolean"&&oe.multi!==this.multi&&oe.multi!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof oe.allowSelfLoops=="boolean"&&oe.allowSelfLoops!==this.allowSelfLoops&&oe.allowSelfLoops!==!0)throw new UsageGraphError("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");const ce=this.emptyCopy(oe),ue=this._edges.values();let pe,me;for(;pe=ue.next(),pe.done!==!0;)me=pe.value,addEdge(ce,"copy",!1,me.undirected,me.key,me.source.key,me.target.key,assign$3({},me.attributes));return ce}toJSON(){return this.export()}toString(){return"[object Graph]"}inspect(){const oe={};this._nodes.forEach((me,ge)=>{oe[ge]=me.attributes});const ce={},ue={};this._edges.forEach((me,ge)=>{const ye=me.undirected?"--":"->";let xe="",ve=me.source.key,_e=me.target.key,we;me.undirected&&ve>_e&&(we=ve,ve=_e,_e=we);const Se=`(${ve})${ye}(${_e})`;ge.startsWith("geid_")?this.multi&&(typeof ue[Se]>"u"?ue[Se]=0:ue[Se]++,xe+=`${ue[Se]}. `):xe+=`[${ge}]: `,xe+=Se,ce[xe]=me.attributes});const pe={};for(const me in this)this.hasOwnProperty(me)&&!EMITTER_PROPS.has(me)&&typeof this[me]!="function"&&typeof me!="symbol"&&(pe[me]=this[me]);return pe.attributes=this._attributes,pe.nodes=oe,pe.edges=ce,privateProperty(pe,"constructor",this.constructor),pe}}typeof Symbol<"u"&&(Graph.prototype[Symbol.for("nodejs.util.inspect.custom")]=Graph.prototype.inspect);EDGE_ADD_METHODS.forEach(ne=>{["add","merge","update"].forEach(oe=>{const ce=ne.name(oe),ue=oe==="add"?addEdge:mergeEdge;ne.generateKey?Graph.prototype[ce]=function(pe,me,ge){return ue(this,ce,!0,(ne.type||this.type)==="undirected",null,pe,me,ge,oe==="update")}:Graph.prototype[ce]=function(pe,me,ge,ye){return ue(this,ce,!1,(ne.type||this.type)==="undirected",pe,me,ge,ye,oe==="update")}})});attachNodeAttributesMethods(Graph);attachEdgeAttributesMethods(Graph);attachEdgeIterationMethods(Graph);attachNeighborIterationMethods(Graph);class DirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"directed"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('DirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class UndirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"undirected"},oe);if("multi"in ce&&ce.multi!==!1)throw new InvalidArgumentsGraphError("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('UndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiGraph extends Graph{constructor(oe){const ce=assign$3({multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");super(ce)}}class MultiDirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"directed",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="directed")throw new InvalidArgumentsGraphError('MultiDirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}class MultiUndirectedGraph extends Graph{constructor(oe){const ce=assign$3({type:"undirected",multi:!0},oe);if("multi"in ce&&ce.multi!==!0)throw new InvalidArgumentsGraphError("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(ce.type!=="undirected")throw new InvalidArgumentsGraphError('MultiUndirectedGraph.from: inconsistent "'+ce.type+'" type in given options!');super(ce)}}function attachStaticFromMethod(ne){ne.from=function(oe,ce){const ue=assign$3({},oe.options,ce),pe=new ne(ue);return pe.import(oe),pe}}attachStaticFromMethod(Graph);attachStaticFromMethod(DirectedGraph);attachStaticFromMethod(UndirectedGraph);attachStaticFromMethod(MultiGraph);attachStaticFromMethod(MultiDirectedGraph);attachStaticFromMethod(MultiUndirectedGraph);Graph.Graph=Graph;Graph.DirectedGraph=DirectedGraph;Graph.UndirectedGraph=UndirectedGraph;Graph.MultiGraph=MultiGraph;Graph.MultiDirectedGraph=MultiDirectedGraph;Graph.MultiUndirectedGraph=MultiUndirectedGraph;Graph.InvalidArgumentsGraphError=InvalidArgumentsGraphError;Graph.NotFoundGraphError=NotFoundGraphError;Graph.UsageGraphError=UsageGraphError;function _toPrimitive(ne,oe){if(typeof ne!="object"||!ne)return ne;var ce=ne[Symbol.toPrimitive];if(ce!==void 0){var ue=ce.call(ne,oe||"default");if(typeof ue!="object")return ue;throw new TypeError("@@toPrimitive must return a primitive value.")}return(oe==="string"?String:Number)(ne)}function _toPropertyKey(ne){var oe=_toPrimitive(ne,"string");return typeof oe=="symbol"?oe:oe+""}function _classCallCheck$1(ne,oe){if(!(ne instanceof oe))throw new TypeError("Cannot call a class as a function")}function _defineProperties$1(ne,oe){for(var ce=0;cene.length)&&(oe=ne.length);for(var ce=0,ue=Array(oe);ce>>16,ce=(ne&65280)>>>8,ue=ne&255,pe=255,me=rgbaToFloat(oe,ce,ue,pe);return FLOAT_INDEX_CACHE[ne]=me,me}function colorToIndex(ne,oe,ce,ue){return ce+(oe<<8)+(ne<<16)}function getPixelColor(ne,oe,ce,ue,pe,me){var ge=Math.floor(ce/me*pe),ye=Math.floor(ne.drawingBufferHeight/me-ue/me*pe),xe=new Uint8Array(4);ne.bindFramebuffer(ne.FRAMEBUFFER,oe),ne.readPixels(ge,ye,1,1,ne.RGBA,ne.UNSIGNED_BYTE,xe);var ve=_slicedToArray$1(xe,4),_e=ve[0],we=ve[1],Se=ve[2],$e=ve[3];return[_e,we,Se,$e]}function _defineProperty$3(ne,oe,ce){return(oe=_toPropertyKey(oe))in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$3(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$3(ne){for(var oe=1;oece?`{ `+gap+xe.join(`, `+gap)+` -`+ye+"}":"{ "+xe.join(", ")+" }":"{"+xe.join(",")+"}",gap=ye,me}}function beautify(ne,oe,ce,ue){var pe;if(gap="",indent="",ue||(ue=0),typeof ue!="number")throw new Error("beaufifier: limit must be a number");if(typeof ce=="number")for(pe=0;pe+pe);return ue<-2||ue>4?jsxRuntimeExports.jsxs("span",{children:[ce,"x10",jsxRuntimeExports.jsx("sup",{style:supProps,children:ue})]}):lodashExports.round(ne,2)}else return ne;case"string":return`${ne}`;case"undefined":return"null";default:return oe?jsxRuntimeExports.jsx("code",{children:lodashExports.isNull(ne)?"null":lodashExports.get(ne,"constructor.name")??typeof ne}):jsxRuntimeExports.jsx("code",{style:{whiteSpace:"pre"},children:lodashExports.truncate(beautify$1(ne,void 0,2),{length:100})})}}function Property(ne){const oe=compilerRuntimeExports.c(17),{label:ce,value:ue,type:pe,simple:me}=ne,ge=`${ce}::${renderProperty(ue)}`,ye=pe==null?void 0:pe.sx;let xe;oe[0]!==ye?(xe={opacity:.54,...ye},oe[0]=ye,oe[1]=xe):xe=oe[1];let ve;oe[2]!==ce||oe[3]!==xe||oe[4]!==pe?(ve=jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",...pe,sx:xe,children:ce}),oe[2]=ce,oe[3]=xe,oe[4]=pe,oe[5]=ve):ve=oe[5];let _e;oe[6]===Symbol.for("react.memo_cache_sentinel")?(_e=jsxRuntimeExports.jsx(Space,{}),oe[6]=_e):_e=oe[6];let we;oe[7]!==me||oe[8]!==ue?(we=renderProperty(ue,me)??"none",oe[7]=me,oe[8]=ue,oe[9]=we):we=oe[9];let Se;oe[10]!==we||oe[11]!==pe?(Se=jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",...pe,children:we}),oe[10]=we,oe[11]=pe,oe[12]=Se):Se=oe[12];let $e;return oe[13]!==ge||oe[14]!==ve||oe[15]!==Se?($e=jsxRuntimeExports.jsxs(Flex,{width:"auto",mr:2,mb:.5,alignItems:"baseline",children:[ve,_e,Se]},ge),oe[13]=ge,oe[14]=ve,oe[15]=Se,oe[16]=$e):$e=oe[16],$e}const COMMON_PROPS=["type"],OMIT_PROPS=[...COMMON_PROPS,"id"],ESSENTIAL_PROPS=["id"],GRAPH_PROPS=[...ESSENTIAL_PROPS,"pId"],HEURISTIC_PROPS=["f","g"],ALL_PROPS=[...OMIT_PROPS,...GRAPH_PROPS,...HEURISTIC_PROPS],sortEventKeys=ne=>lodashExports.chain(ne).entries().filter(([,oe])=>!lodashExports.isUndefined(oe)).sortBy(([oe])=>lodashExports.indexOf(ALL_PROPS,oe)+1||Number.MAX_SAFE_INTEGER).value();function PropertyDialog(ne){const oe=compilerRuntimeExports.c(9);let ce,ue,pe;if(oe[0]!==ne){const{event:ye,max:xe,simple:ve,variant:_e,...we}=ne;ce=ye,pe=xe,ue=we,oe[0]=ne,oe[1]=ce,oe[2]=ue,oe[3]=pe}else ce=oe[1],ue=oe[2],pe=oe[3];const me=pe===void 0?10:pe;let ge;if(oe[4]!==ce||oe[5]!==me||oe[6]!==ue){const ye=sortEventKeys(ce);let xe;oe[8]===Symbol.for("react.memo_cache_sentinel")?(xe=jsxRuntimeExports.jsx(AppBarTitle,{children:"Event Properties"}),oe[8]=xe):xe=oe[8],ge=jsxRuntimeExports.jsx(ManagedModal,{...lodashExports.merge({appBar:{children:xe},trigger:ve=>jsxRuntimeExports.jsxs(Button$1,{variant:"text",sx:{mx:-1,minWidth:0,width:"fit-content",color:_temp$q,justifyContent:"left"},onClick:_e=>{_e.stopPropagation(),_e.preventDefault(),ve(_e)},children:[ye.length-me," more"]})},ue),children:[{name:"common",props:lodashExports.filter(ye,_temp2$i)},{name:"Graph",props:lodashExports.filter(ye,_temp3$b)},{name:"Heuristic",props:lodashExports.filter(ye,_temp4$6)},{name:"other",props:lodashExports.filter(ye,_temp5$3)}].map(_temp7$3)}),oe[4]=ce,oe[5]=me,oe[6]=ue,oe[7]=ge}else ge=oe[7];return ge}function _temp7$3(ne,oe){const{name:ce,props:ue}=ne;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!!oe&&jsxRuntimeExports.jsx(Divider,{sx:{mb:1}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"overline",color:"text.secondary",sx:{px:3},children:lodashExports.startCase(ce)}),jsxRuntimeExports.jsx(Box,{sx:{p:1,pt:0,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(2, 1fr)"},children:lodashExports.map(ue,_temp6$3)},ce)]},ce)}function _temp6$3(ne){const[oe,ce]=ne;return jsxRuntimeExports.jsx(ListItem,{sx:{py:.5},children:jsxRuntimeExports.jsx(ListItemText,{secondary:oe,primary:renderProperty(ce)})},`${oe}::${ce}`)}function _temp5$3(ne){const[oe]=ne;return!ALL_PROPS.includes(oe)}function _temp4$6(ne){const[oe]=ne;return HEURISTIC_PROPS.includes(oe)}function _temp3$b(ne){const[oe]=ne;return GRAPH_PROPS.includes(oe)}function _temp2$i(ne){const[oe]=ne;return COMMON_PROPS.includes(oe)}function _temp$q(ne){return ne.palette.text.secondary}function PropertyList(ne){const oe=compilerRuntimeExports.c(32);let ce,ue,pe,me,ge,ye;oe[0]!==ne?({event:ce,variant:ge,max:ye,simple:me,primitives:ue,...pe}=ne,oe[0]=ne,oe[1]=ce,oe[2]=ue,oe[3]=pe,oe[4]=me,oe[5]=ge,oe[6]=ye):(ce=oe[1],ue=oe[2],pe=oe[3],me=oe[4],ge=oe[5],ye=oe[6]);const xe=ge===void 0?"body2":ge,ve=ye===void 0?10:ye;let _e,we,Se,$e;if(oe[7]!==ce||oe[8]!==ve||oe[9]!==ue||oe[10]!==pe||oe[11]!==me||oe[12]!==xe){we=sortEventKeys(ce),_e=Flex,Se=pe;let Ae;oe[17]!==ue?(Ae=ue?_temp8$1:lodashExports.constant(!0),oe[17]=ue,oe[18]=Ae):Ae=oe[18];let ke;oe[19]!==me||oe[20]!==xe?(ke=(Be,Ie)=>{const[Ne,je]=Be;return jsxRuntimeExports.jsx(Property,{label:Ne,value:je,type:{variant:xe},simple:me},Ie)},oe[19]=me,oe[20]=xe,oe[21]=ke):ke=oe[21],$e=lodashExports.chain(we).filter(Ae).slice(0,ve).map(ke).value(),oe[7]=ce,oe[8]=ve,oe[9]=ue,oe[10]=pe,oe[11]=me,oe[12]=xe,oe[13]=_e,oe[14]=we,oe[15]=Se,oe[16]=$e}else _e=oe[13],we=oe[14],Se=oe[15],$e=oe[16];let Te;oe[22]!==ve||oe[23]!==ne||oe[24]!==me||oe[25]!==we.length?(Te=we.length>ve&&!me&&jsxRuntimeExports.jsx(PropertyDialog,{...ne}),oe[22]=ve,oe[23]=ne,oe[24]=me,oe[25]=we.length,oe[26]=Te):Te=oe[26];let Re;return oe[27]!==_e||oe[28]!==Se||oe[29]!==$e||oe[30]!==Te?(Re=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(_e,{...Se,children:[$e,Te]})}),oe[27]=_e,oe[28]=Se,oe[29]=$e,oe[30]=Te,oe[31]=Re):Re=oe[31],Re}function _temp8$1(ne){const[,oe]=ne;return isPrimitive(oe)}function isPrimitive(ne){return lodashExports.isString(ne)||lodashExports.isNumber(ne)}var t$3,e$2,s$2,i$3;(function(ne){ne.HEX="HEX",ne.RGB="RGB",ne.HSL="HSL",ne.CIELab="CIELab",ne.CMYK="CMYK"})(t$3||(t$3={})),function(ne){ne.ANALOGOUS="ANALOGOUS",ne.COMPLEMENTARY="COMPLEMENTARY",ne.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",ne.TRIADIC="TRIADIC",ne.TETRADIC="TETRADIC",ne.SQUARE="SQUARE"}(e$2||(e$2={})),function(ne){ne.ADDITIVE="ADDITIVE",ne.SUBTRACTIVE="SUBTRACTIVE"}(s$2||(s$2={})),function(ne){ne.black="#000000",ne.silver="#C0C0C0",ne.gray="#808080",ne.white="#FFFFFF",ne.maroon="#800000",ne.red="#FF0000",ne.purple="#800080",ne.fuchsia="#FF00FF",ne.green="#008000",ne.lime="#00FF00",ne.olive="#808000",ne.yellow="#FFFF00",ne.navy="#000080",ne.blue="#0000FF",ne.teal="#008080",ne.aqua="#00FFFF",ne.orange="#FFA500",ne.aliceblue="#F0F8FF",ne.antiquewhite="#FAEBD7",ne.aquamarine="#7FFFD4",ne.azure="#F0FFFF",ne.beige="#F5F5DC",ne.bisque="#FFE4C4",ne.blanchedalmond="#FFEBCD",ne.blueviolet="#8A2BE2",ne.brown="#A52A2A",ne.burlywood="#DEB887",ne.cadetblue="#5F9EA0",ne.chartreuse="#7FFF00",ne.chocolate="#D2691E",ne.coral="#FF7F50",ne.cornflowerblue="#6495ED",ne.cornsilk="#FFF8DC",ne.crimson="#DC143C",ne.cyan="#00FFFF",ne.darkblue="#00008B",ne.darkcyan="#008B8B",ne.darkgoldenrod="#B8860B",ne.darkgray="#A9A9A9",ne.darkgreen="#006400",ne.darkgrey="#A9A9A9",ne.darkkhaki="#BDB76B",ne.darkmagenta="#8B008B",ne.darkolivegreen="#556B2F",ne.darkorange="#FF8C00",ne.darkorchid="#9932CC",ne.darkred="#8B0000",ne.darksalmon="#E9967A",ne.darkseagreen="#8FBC8F",ne.darkslateblue="#483D8B",ne.darkslategray="#2F4F4F",ne.darkslategrey="#2F4F4F",ne.darkturquoise="#00CED1",ne.darkviolet="#9400D3",ne.deeppink="#FF1493",ne.deepskyblue="#00BFFF",ne.dimgray="#696969",ne.dimgrey="#696969",ne.dodgerblue="#1E90FF",ne.firebrick="#B22222",ne.floralwhite="#FFFAF0",ne.forestgreen="#228B22",ne.gainsboro="#DCDCDC",ne.ghostwhite="#F8F8FF",ne.gold="#FFD700",ne.goldenrod="#DAA520",ne.greenyellow="#ADFF2F",ne.grey="#808080",ne.honeydew="#F0FFF0",ne.hotpink="#FF69B4",ne.indianred="#CD5C5C",ne.indigo="#4B0082",ne.ivory="#FFFFF0",ne.khaki="#F0E68C",ne.lavender="#E6E6FA",ne.lavenderblush="#FFF0F5",ne.lawngreen="#7CFC00",ne.lemonchiffon="#FFFACD",ne.lightblue="#ADD8E6",ne.lightcoral="#F08080",ne.lightcyan="#E0FFFF",ne.lightgoldenrodyellow="#FAFAD2",ne.lightgray="#D3D3D3",ne.lightgreen="#90EE90",ne.lightgrey="#D3D3D3",ne.lightpink="#FFB6C1",ne.lightsalmon="#FFA07A",ne.lightseagreen="#20B2AA",ne.lightskyblue="#87CEFA",ne.lightslategray="#778899",ne.lightslategrey="#778899",ne.lightsteelblue="#B0C4DE",ne.lightyellow="#FFFFE0",ne.limegreen="#32CD32",ne.linen="#FAF0E6",ne.magenta="#FF00FF",ne.mediumaquamarine="#66CDAA",ne.mediumblue="#0000CD",ne.mediumorchid="#BA55D3",ne.mediumpurple="#9370DB",ne.mediumseagreen="#3CB371",ne.mediumslateblue="#7B68EE",ne.mediumspringgreen="#00FA9A",ne.mediumturquoise="#48D1CC",ne.mediumvioletred="#C71585",ne.midnightblue="#191970",ne.mintcream="#F5FFFA",ne.mistyrose="#FFE4E1",ne.moccasin="#FFE4B5",ne.navajowhite="#FFDEAD",ne.oldlace="#FDF5E6",ne.olivedrab="#6B8E23",ne.orangered="#FF4500",ne.orchid="#DA70D6",ne.palegoldenrod="#EEE8AA",ne.palegreen="#98FB98",ne.paleturquoise="#AFEEEE",ne.palevioletred="#DB7093",ne.papayawhip="#FFEFD5",ne.peachpuff="#FFDAB9",ne.peru="#CD853F",ne.pink="#FFC0CB",ne.plum="#DDA0DD",ne.powderblue="#B0E0E6",ne.rosybrown="#BC8F8F",ne.royalblue="#4169E1",ne.saddlebrown="#8B4513",ne.salmon="#FA8072",ne.sandybrown="#F4A460",ne.seagreen="#2E8B57",ne.seashell="#FFF5EE",ne.sienna="#A0522D",ne.skyblue="#87CEEB",ne.slateblue="#6A5ACD",ne.slategray="#708090",ne.slategrey="#708090",ne.snow="#FFFAFA",ne.springgreen="#00FF7F",ne.steelblue="#4682B4",ne.tan="#D2B48C",ne.thistle="#D8BFD8",ne.tomato="#FF6347",ne.turquoise="#40E0D0",ne.violet="#EE82EE",ne.wheat="#F5DEB3",ne.whitesmoke="#F5F5F5",ne.yellowgreen="#9ACD32",ne.rebeccapurple="#663399"}(i$3||(i$3={}));const a$3=Object.keys(i$3),r$3={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},n$3={BGR:t$3.RGB,ABGR:t$3.RGB,HLS:t$3.HSL,AHLS:t$3.HSL,LAB:t$3.CIELab,ALAB:t$3.CIELab,CKMY:t$3.CMYK,ACKMY:t$3.CMYK};var c$3;(function(ne){ne.NUMBER="number",ne.BOOLEAN="boolean"})(c$3||(c$3={}));const o$3={[t$3.HEX]:/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,[t$3.RGB]:/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.HSL]:/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.CIELab]:/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/},A$3=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,h$3=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,u$3=/^0x([a-f\d]{1,2})$/i,d$1=/\{(\d+)\}/g,l$3=/,( +|\d+)/g,E$2=/ +/,m$1="The provided string color doesn't have a correct format",b$3="The provided color object doesn't have the proper keys or format";var C$2,L$2,g$3;(function(ne){ne.NONE="none",ne.DEGREES="deg",ne.GRADIANS="grad",ne.RADIANS="rad",ne.TURNS="turn"})(C$2||(C$2={})),function(ne){ne.NONE="none",ne.PERCENT="percent"}(L$2||(L$2={})),function(ne){ne.DEVICE_CMYK="device-cmyk",ne.CMYK="cmyk"}(g$3||(g$3={}));const B$2={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:C$2.NONE,rgbUnit:L$2.NONE,labUnit:L$2.NONE,cmykUnit:L$2.PERCENT,alphaUnit:L$2.NONE,cmykFunction:g$3.DEVICE_CMYK},p$3=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),H$3=ne=>+`${ne}`.replace(h$3,"$1"),F$1=ne=>h$3.test(`${ne}`)?H$3(ne):Math.min(+ne,100),R$2=ne=>(ne.length===1&&(ne+=ne),parseInt(ne,16)),S$3=ne=>{const oe=D$2(ne,0).toString(16).toUpperCase();return oe.length===1?`0x0${oe}`:`0x${oe}`},I$1=(ne,oe=!1)=>!oe&&h$3.test(ne)?Math.min(255*H$3(ne)/100,255):u$3.test(ne)?(ne.length===3&&(ne+=ne.slice(-1)),oe?D$2(ne)/255:D$2(ne)):Math.min(+ne,oe?1:255),G$1=ne=>h$3.test(ne)?f$3(125*H$3(ne)/100,-125,125):f$3(+ne,-125,125),M$3=ne=>Math.min(h$3.test(ne)?H$3(ne)/100:+ne,1),y$4=ne=>[...ne].sort().join("").toUpperCase(),D$2=(ne,oe=6)=>{const ce=Math.pow(10,oe);return Math.round(+ne*ce)/ce},f$3=(ne,oe,ce)=>Math.max(oe,Math.min(ne,ce)),O$1=ne=>{if(typeof ne=="string"){const oe=ne.match(A$3),ce=+oe[1];switch(oe[2]){case C$2.RADIANS:ne=D$2(180*ce/Math.PI);break;case C$2.TURNS:ne=D$2(360*ce);break;case C$2.GRADIANS:ne=D$2(.9*ce);break;case C$2.DEGREES:default:ne=ce}}return(ne>360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},Y$4=(ne,oe)=>{let ce;switch(oe){case C$2.RADIANS:ce=D$2((ue=>ue*Math.PI/180)(ne));break;case C$2.TURNS:ce=D$2(ne/360);break;case C$2.GRADIANS:ce=D$2(10/9*ne);break;case C$2.DEGREES:case C$2.NONE:default:ce=ne}return ce},k$4=(ne,...oe)=>{const ce=[],ue=[],pe=[],me=[],ge=[],ye=[],xe=Object.values(C$2),ve=Object.values(L$2),_e=Object.values(g$3),we={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const Se of oe)if(typeof Se=="string"){if(ce.push(Se),Se.includes(",")){we.legacyCSS++;const $e=Se.match(l$3);new Set($e).size===1&&E$2.test($e[0].slice(1))&&we.spacesAfterCommas++}if(Se.match(o$3.HSL)){const $e=Se.match(o$3.HSL),Te=$e[1]||$e[5],Re=$e[8],Ae=Te.match(A$3)[2];ue.push(Ae===""?C$2.NONE:Ae),ye.push(h$3.test(Re));continue}if(o$3.RGB.test(Se)){const $e=Se.match(o$3.RGB),Te=$e[1]||$e[5],Re=$e[2]||$e[6],Ae=$e[3]||$e[7],ke=$e[8];pe.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)),ye.push(h$3.test(ke));continue}if(o$3.CIELab.test(Se)){const $e=Se.match(o$3.CIELab),Te=$e[1],Re=$e[2],Ae=$e[3],ke=$e[4];me.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)),ye.push(h$3.test(ke));continue}if(Se.match(o$3.CMYK)){const $e=Se.match(o$3.CMYK),Te=$e[1]||$e[6],Re=$e[2]||$e[7],Ae=$e[3]||$e[8],ke=$e[4]||$e[9],Be=$e[10];ge.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)&&h$3.test(ke)),Se.startsWith("cmyk")&&we.cmykFunction++,ye.push(h$3.test(Be))}}return{decimals:typeof ne.decimals===c$3.NUMBER?ne.decimals:B$2.decimals,legacyCSS:typeof ne.legacyCSS===c$3.BOOLEAN?ne.legacyCSS:!!(ce.length&&we.legacyCSS===ce.length)||B$2.legacyCSS,spacesAfterCommas:typeof ne.spacesAfterCommas===c$3.BOOLEAN?ne.spacesAfterCommas:!!(ce.length&&we.spacesAfterCommas===ce.length)||B$2.spacesAfterCommas,anglesUnit:ne.anglesUnit&&xe.includes(ne.anglesUnit)?ne.anglesUnit:new Set(ue).size===1?ue[0]:B$2.anglesUnit,rgbUnit:ne.rgbUnit&&ve.includes(ne.rgbUnit)?ne.rgbUnit:new Set(pe).size===1&&pe[0]?L$2.PERCENT:B$2.rgbUnit,labUnit:ne.labUnit&&ve.includes(ne.labUnit)?ne.labUnit:new Set(me).size===1&&me[0]?L$2.PERCENT:B$2.labUnit,cmykUnit:ne.cmykUnit&&ve.includes(ne.cmykUnit)?ne.cmykUnit:new Set(ge).size!==1||ge[0]?B$2.cmykUnit:L$2.NONE,alphaUnit:ne.alphaUnit&&ve.includes(ne.alphaUnit)?ne.alphaUnit:new Set(ye).size===1&&ye[0]?L$2.PERCENT:B$2.alphaUnit,cmykFunction:ne.cmykFunction&&_e.includes(ne.cmykFunction)?ne.cmykFunction:ge.length&&ge.length===we.cmykFunction?g$3.CMYK:B$2.cmykFunction}},K$1=ne=>`${ne}`in s$2,X$1=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],T$2=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],N$3=X$1.map(ne=>ne.reduce((oe,ce)=>oe+ce,0)),$$3=(ne,oe,ce)=>(ce<0&&(ce+=6),ce>=6&&(ce-=6),D$2(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)),j$2=ne=>ne<=.04045?ne/12.92:((ne+.055)/1.055)**2.4,U$1=ne=>ne<=.0031308?12.92*ne:1.055*ne**(1/2.4)-.055,w$2=(ne,oe,ce,ue)=>{const pe=[0,0,0],me=[ne,oe,ce];return ue.forEach((ge,ye)=>{ge.forEach((xe,ve)=>{pe[ye]+=xe*me[ve]})}),pe},x$4=(ne,oe,ce)=>{oe/=100;const ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{R:$$3(pe,ue,(ne/=60)+2),G:$$3(pe,ue,ne),B:$$3(pe,ue,ne-2)}},v$4=(ne,oe,ce,ue=1)=>{ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);const pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me;let ye=0,xe=0;const ve=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}ye=D$2(60*ye),ye<0&&(ye+=360),xe=ge/(1-Math.abs(2*ve-1))}return{H:ye,S:D$2(100*xe),L:D$2(100*ve),A:ue}},V$1=(ne,oe,ce)=>{const ue=[ne/255,oe/255,ce/255].map(j$2),pe=w$2(ue[0],ue[1],ue[2],X$1),me=((ge,ye,xe)=>{const ve=Se=>Se>.008856451679035631?Math.cbrt(Se):Se/.12841854934601665+.13793103448275862,_e=ve(ge/N$3[0]),we=ve(ye/N$3[1]);return[116*we-16,500*(_e-we),200*(we-ve(xe/N$3[2]))]})(pe[0],pe[1],pe[2]);return{L:me[0],a:me[1],b:me[2]}},P=(ne,oe,ce)=>{const ue=((me,ge,ye)=>{const xe=Se=>Se>.20689655172413793?Se**3:.12841854934601665*(Se-.13793103448275862),ve=(me+16)/116,_e=ge/500,we=ye/200;return[N$3[0]*xe(ve+_e),N$3[1]*xe(ve),N$3[2]*xe(ve-we)]})(ne,oe,ce),pe=w$2(ue[0],ue[1],ue[2],T$2).map(U$1);return{R:f$3(255*pe[0],0,255),G:f$3(255*pe[1],0,255),B:f$3(255*pe[2],0,255)}},q$2=(ne,oe,ce,ue)=>({R:D$2(255*(1-ne)*(ue=1-ue)),G:D$2(255*(1-oe)*ue),B:D$2(255*(1-ce)*ue)}),_$3=(ne,oe,ce)=>{ne/=255,oe/=255,ce/=255;const ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{C:D$2(100*(pe&&(pe-ne)/pe)),M:D$2(100*me),Y:D$2(100*ge),K:D$2(100*ue)}},z$3=(ne,oe)=>{if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;const ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce;let me=0,ge=0,ye=0,xe=0;return(oe?ce:ue).find((ve,_e)=>ne>=ve[0]&&nene?", ":",",W$1=(ne,oe)=>{const ce=y$4(Object.keys(ne));return r$3[n$3[ce]].reduce((ue,pe,me)=>{const ge=ne[pe];return ge!==void 0&&ue.push(oe(ge,me)),ue},[])},J$1=(ne,oe)=>ne.replace(d$1,(ce,ue)=>`${oe[+ue-1]}`),Z$2=(ne,oe,ce=!1)=>{const{alphaUnit:ue,legacyCSS:pe,decimals:me}=oe;return ue!==L$2.PERCENT||pe&&!ce?D$2(ne,me):`${D$2(100*ne,me)}%`},tt$1={[t$3.HEX]:ne=>{const oe=W$1(ne,ue=>(pe=>{let me=D$2(pe,0).toString(16).toUpperCase();return me.length===1&&(me=`0${me}`),me})(D$2(ue))),ce=oe.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return J$1(ce,oe)},[t$3.RGB]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,rgbUnit:me}=oe,ge=Q$1(pe),ye=W$1(ne,(ve,_e)=>me===L$2.PERCENT&&_e<3?`${((we,Se)=>D$2(we/255*100,Se))(ve,ce)}%`:_e===3?Z$2(ve,oe):D$2(ve,ce)),xe=ue?ye.length===4?`rgba({1}${ge}{2}${ge}{3}${ge}{4})`:`rgb({1}${ge}{2}${ge}{3})`:ye.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return J$1(xe,ye)},[t$3.HSL]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,anglesUnit:me}=oe,ge=Q$1(pe),ye=W$1(ne,(ve,_e)=>_e===0&&me!==C$2.NONE?`${D$2(Y$4(ve,me),ce)}${me}`:_e===3?Z$2(ve,oe):D$2(ve,ce)),xe=ue?ye.length===4?`hsla({1}${ge}{2}%${ge}{3}%${ge}{4})`:`hsl({1}${ge}{2}%${ge}{3}%)`:ye.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return J$1(xe,ye)},[t$3.CIELab]:(ne,oe)=>{const{decimals:ce,labUnit:ue}=oe,pe=W$1(ne,(ge,ye)=>{if(ye===0){const xe=D$2(F$1(ge),ce);return ue===L$2.PERCENT?`${xe}%`:`${xe}`}return ye<3?ue===L$2.PERCENT?`${((xe,ve)=>D$2(xe/125*100,ve))(ge,ce)}%`:D$2(ge,ce):Z$2(ge,oe,!0)}),me=pe.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return J$1(me,pe)},[t$3.CMYK]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,cmykUnit:me,cmykFunction:ge}=oe,ye=Q$1(pe),xe=W$1(ne,(_e,we)=>me===L$2.PERCENT&&we<4?`${D$2(_e,ce)}%`:we===4?Z$2(_e,oe):D$2(_e/100,ce)),ve=ue?xe.length===5?`${ge}({1}${ye}{2}${ye}{3}${ye}{4}${ye}{5})`:`${ge}({1}${ye}{2}${ye}{3}${ye}{4})`:xe.length===5?`${ge}({1} {2} {3} {4} / {5})`:`${ge}({1} {2} {3} {4})`;return J$1(ve,xe)}},et$1=ne=>(typeof ne=="string"&&(ne=h$3.test(ne)?H$3(ne)/100:+ne),isNaN(+ne)||ne>1?1:D$2(ne)),st=(ne,oe,ce)=>oe.reduce((ue,pe)=>[...ue,{...ne,H:ce===s$2.ADDITIVE?O$1(ne.H+pe):O$1(z$3(z$3(ne.H,!1)+pe,!0))}],[{...ne}]),it=(ne,oe)=>st(ne,[30,-30],oe),at=(ne,oe)=>st(ne,[180],oe),rt=(ne,oe)=>st(ne,[150,-150],oe),nt=(ne,oe)=>st(ne,[120,-120],oe),ct=(ne,oe)=>st(ne,[60,-120,180],oe),ot=(ne,oe)=>st(ne,[90,-90,180],oe),At=ne=>typeof ne=="string"?(oe=>{let ce;if(Object.keys(t$3).some(ue=>{if(o$3[ue].test(oe))return ce=ue,!0}),!ce&&~a$3.indexOf(oe)&&(ce=t$3.HEX),!ce)throw new Error(m$1);return ce})(ne):(oe=>{let ce,ue=!1;const pe=y$4(Object.keys(oe));if(n$3[pe]&&(ce=n$3[pe]),ce&&ce===t$3.RGB){const me=Object.entries(oe).some(ye=>!u$3.test(`${ye[1]}`)),ge=Object.entries(oe).some(ye=>!(h$3.test(`${ye[1]}`)||!u$3.test(`${ye[1]}`)&&!isNaN(+ye[1])&&+ye[1]<=255));me&&ge&&(ue=!0),me||(ce=t$3.HEX)}if(!ce||ue)throw new Error(b$3);return ce})(ne),ht$1={[t$3.HEX](ne){const oe=(~a$3.indexOf(ne)?i$3[ne]:ne).match(o$3.HEX),ce={R:R$2(oe[1]||oe[5]),G:R$2(oe[2]||oe[6]),B:R$2(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.A=R$2(ue)/255),ce},[t$3.RGB](ne){const oe=ne.match(o$3.RGB),ce=I$1(oe[1]||oe[5]),ue=I$1(oe[2]||oe[6]),pe=I$1(oe[3]||oe[7]),me=oe[4]||oe[8],ge={R:Math.min(ce,255),G:Math.min(ue,255),B:Math.min(pe,255)};return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.HSL](ne){const oe=ne.match(o$3.HSL),ce=O$1(oe[1]||oe[5]),ue=F$1(oe[2]||oe[6]),pe=F$1(oe[3]||oe[7]),me=oe[4]||oe[8],ge=x$4(ce,ue,pe);return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.CIELab](ne){const oe=ne.match(o$3.CIELab),ce=F$1(oe[1]),ue=G$1(oe[2]),pe=G$1(oe[3]),me=oe[4],ge=P(ce,ue,pe);return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.CMYK](ne){const oe=ne.match(o$3.CMYK),ce=M$3(oe[1]||oe[6]),ue=M$3(oe[2]||oe[7]),pe=M$3(oe[3]||oe[8]),me=M$3(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=q$2(ce,ue,pe,me);return ge!==void 0&&(ye.A=et$1(ge)),ye}},ut={[t$3.HEX](ne){const oe={R:I$1(`${ne.R}`),G:I$1(`${ne.G}`),B:I$1(`${ne.B}`)};return p$3(ne,"A")&&(oe.A=Math.min(I$1(`${ne.A}`,!0),1)),oe},[t$3.RGB](ne){return this.HEX(ne)},[t$3.HSL](ne){const oe=F$1(`${ne.S}`),ce=F$1(`${ne.L}`),ue=x$4(O$1(ne.H),oe,ce);return p$3(ne,"A")&&(ue.A=et$1(ne.A)),ue},[t$3.CIELab](ne){const oe=F$1(`${ne.L}`),ce=G$1(`${ne.a}`),ue=G$1(`${ne.b}`),pe=P(oe,ce,ue);return p$3(ne,"A")&&(pe.A=et$1(ne.A)),pe},[t$3.CMYK](ne){const oe=M$3(`${ne.C}`),ce=M$3(`${ne.M}`),ue=M$3(`${ne.Y}`),pe=M$3(`${ne.K}`),me=q$2(oe,ce,ue,pe);return p$3(ne,"A")&&(me.A=et$1(ne.A)),me}},dt=(ne,oe=At(ne))=>typeof ne=="string"?ht$1[oe](ne):ut[oe](ne),lt={[t$3.HEX]:ne=>({R:S$3(ne.R),G:S$3(ne.G),B:S$3(ne.B)}),HEXA(ne){const oe=lt.HEX(ne);return oe.A=p$3(ne,"A")?S$3(255*ne.A):"0xFF",oe},[t$3.RGB](ne,oe){const ce=Ct(ne,oe);return p$3(ce,"A")&&delete ce.A,ce},RGBA(ne,oe){const ce=lt.RGB(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A):1,ce},[t$3.HSL](ne,oe){const ce=v$4(ne.R,ne.G,ne.B);return delete ce.A,Lt(ce,oe)},HSLA(ne,oe){const ce=lt.HSL(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce},[t$3.CIELab](ne,oe){const ce=V$1(ne.R,ne.G,ne.B);return gt(ce,oe)},CIELabA(ne,oe){const ce=lt.CIELab(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce},[t$3.CMYK]:(ne,oe)=>Bt(_$3(ne.R,ne.G,ne.B),oe),CMYKA(ne,oe){const ce=lt.CMYK(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce}},Et=(ne,oe,ce,ue)=>{const pe=At(ne),me=typeof ne=="string",ge=dt(ne,pe),ye=typeof ne=="string"&&p$3(ge,"A")||typeof ne!="string"&&p$3(ne,"A"),xe=v$4(ge.R,ge.G,ge.B,ge.A);ye||delete xe.A;const ve=ce?xe.L/(oe+1):(100-xe.L)/(oe+1),_e=Array(oe).fill(null).map((we,Se)=>({...xe,L:xe.L+ve*(Se+1)*(1-2*+ce)}));switch(pe){case t$3.HEX:default:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return ye&&(Se.A=we.A),me?ye?tt$1.HEX({...Se,A:D$2(255*Se.A)}):tt$1.HEX(Se):ye?lt.HEXA(Se):lt.HEX(Se)});case t$3.RGB:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return ye&&(Se.A=we.A),me?tt$1.RGB(Se,ue):ye?lt.RGBA(Se,ue.decimals):lt.RGB(Se,ue.decimals)});case t$3.HSL:return _e.map(we=>me?tt$1.HSL(we,ue):ye?lt.HSLA({...x$4(we.H,we.S,we.L),A:we.A},ue.decimals):lt.HSL(x$4(we.H,we.S,we.L),ue.decimals));case t$3.CIELab:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return me?tt$1.CIELab(ye?lt.CIELabA(Se,ue.decimals):lt.CIELab(Se,ue.decimals),ue):ye?lt.CIELabA({...Se,A:we.A},ue.decimals):lt.CIELab(Se,ue.decimals)})}},mt={buildHarmony(ne,oe,ce,ue){const pe=At(ne),me=dt(ne,pe),ge=v$4(me.R,me.G,me.B,me.A),ye=typeof ne=="string"&&p$3(me,"A")||typeof ne!="string"&&p$3(ne,"A"),xe=typeof ne=="string";switch(pe){case t$3.HEX:default:return ye?this.HEXA(Lt(ge,0),oe,ce,xe):this.HEX(Lt(ge,0),oe,ce,xe);case t$3.HSL:return ye?this.HSLA(ge,oe,ce,xe,ue):this.HSL(ge,oe,ce,xe,ue);case t$3.RGB:return ye?this.RGBA(ge,oe,ce,xe,ue):this.RGB(ge,oe,ce,xe,ue);case t$3.CIELab:return ye?this.CIELabA(ge,oe,ce,xe,ue):this.CIELab(ge,oe,ce,xe,ue)}},[t$3.HEX]:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$1.HEX(x$4(pe.H,pe.S,pe.L)):lt.HEX(x$4(pe.H,pe.S,pe.L))),HEXA:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$1.HEX({...x$4(pe.H,pe.S,pe.L),A:255*et$1(pe.A)}):lt.HEXA({...x$4(pe.H,pe.S,pe.L),A:et$1(pe.A)})),[t$3.RGB]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.RGB(x$4(me.H,me.S,me.L),pe):lt.RGB(x$4(me.H,me.S,me.L),pe.decimals)),RGBA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.RGB({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe):lt.RGBA({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe.decimals)),[t$3.HSL]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.HSL({H:me.H,S:me.S,L:me.L},pe):lt.HSL(x$4(me.H,me.S,me.L),pe.decimals)),HSLA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.HSL({...me,A:et$1(me.A)},pe):lt.HSLA({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe.decimals)),[t$3.CIELab]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$4(me.H,me.S,me.L);return ue?tt$1.CIELab(V$1(ge.R,ge.G,ge.B),pe):lt.CIELab(ge,pe.decimals)}),CIELabA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$4(me.H,me.S,me.L);return ue?tt$1.CIELab({...V$1(ge.R,ge.G,ge.B),A:et$1(me.A)},pe):lt.CIELabA({...ge,A:et$1(me.A)},pe.decimals)})},bt={mix(ne,oe){const ce=ne.map(ge=>{const ye=At(ge);return dt(ge,ye)}),ue=oe===s$2.SUBTRACTIVE?ce.map(ge=>{const ye=((xe,ve,_e)=>{const we=Math.min(xe,ve,_e),Se=Math.min(255-xe,255-ve,255-_e),$e=xe-we,Te=ve-we,Re=_e-we,Ae=Math.min($e,Te),ke=$e-Ae,Be=(Te+Ae)/2,Ie=(Re+Te-Ae)/2,Ne=Math.max(ke,Be,Ie)/Math.max($e,Te,Re),je=isNaN(Ne)||Ne===1/0||Ne<=0?1:Ne;return{R:ke/je+Se,Y:Be/je+Se,B:Ie/je+Se}})(ge.R,ge.G,ge.B);return p$3(ge,"A")&&(ye.A=ge.A),ye}):null;function pe(ge){const ye=oe===s$2.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return ge.reduce((xe,ve)=>{const _e=p$3(ve,"A")?ve.A:1,we={R:Math.min(xe.R+ve.R*_e,255),B:Math.min(xe.B+ve.B*_e,255),A:1-(1-_e)*(1-xe.A)},Se="G"in xe?xe.G:xe.Y,$e="G"in ve?ve.G:ve.Y;return{...we,...oe===s$2.ADDITIVE?{G:Math.min(Se+$e*_e,255)}:{Y:Math.min(Se+$e*_e,255)}}},ye)}let me;if(oe===s$2.ADDITIVE)me=pe(ce);else{const ge=pe(ue);me=((ye,xe,ve)=>{const _e=Math.min(ye,xe,ve),we=Math.min(255-ye,255-xe,255-ve),Se=ye-_e,$e=xe-_e,Te=ve-_e,Re=Math.min($e,Te),Ae=Se+$e-Re,ke=$e+Re,Be=2*(Te-Re),Ie=Math.max(Ae,ke,Be)/Math.max(Se,$e,Te),Ne=isNaN(Ie)||Ie===1/0||Ie<=0?1:Ie;return{R:Ae/Ne+we,G:ke/Ne+we,B:Be/Ne+we}})(ge.R,ge.Y,ge.B),me.A=ge.A}return{R:D$2(me.R),G:D$2(me.G),B:D$2(me.B),A:f$3(me.A,0,1)}},[t$3.HEX](ne,oe,ce){const ue=this.mix(ne,oe);return delete ue.A,ce?tt$1.HEX(ue):lt.HEX(ue)},HEXA(ne,oe,ce){const ue=this.mix(ne,oe);return ue.A=ce?255*et$1(ue.A):et$1(ue.A),ce?tt$1.HEX(ue):lt.HEXA(ue)},[t$3.RGB](ne,oe,ce,ue){const pe=this.mix(ne,oe);return delete pe.A,ce?tt$1.RGB(pe,ue):lt.RGB(pe,ue.decimals)},RGBA(ne,oe,ce,ue){const pe=this.mix(ne,oe);return ce?tt$1.RGB(pe,ue):lt.RGBA(pe,ue.decimals)},[t$3.HSL](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B);return delete pe.A,delete me.A,ce?tt$1.HSL(me,ue):lt.HSL(pe,ue.decimals)},HSLA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B,pe.A);return ce?tt$1.HSL(me,ue):lt.HSLA(pe,ue.decimals)},[t$3.CIELab](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$1(pe.R,pe.G,pe.B);return delete pe.A,ce?tt$1.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)},CIELabA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$1(pe.R,pe.G,pe.B);return p$3(pe,"A")&&(me.A=pe.A),ce?tt$1.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)}},Ct=(ne,oe)=>({R:D$2(ne.R,oe),G:D$2(ne.G,oe),B:D$2(ne.B,oe),...p$3(ne,"A")?{A:D$2(ne.A,oe)}:{}}),Lt=(ne,oe)=>({H:D$2(ne.H,oe),S:D$2(ne.S,oe),L:D$2(ne.L,oe),...p$3(ne,"A")?{A:D$2(ne.A,oe)}:{}}),gt=(ne,oe)=>({L:D$2(ne.L,oe),a:D$2(ne.a,oe),b:D$2(ne.b,oe)}),Bt=(ne,oe)=>({C:D$2(ne.C,oe),M:D$2(ne.M,oe),Y:D$2(ne.Y,oe),K:D$2(ne.K,oe)}),pt=(ne,oe,ce,ue)=>ue(dt(ne,oe),ce),Ht=(ne,oe,ce,ue,pe)=>(ce<1&&(ce=5),((ge,ye,xe)=>{const ve=xe-1,_e=(ye.R-ge.R)/ve,we=(ye.G-ge.G)/ve,Se=(ye.B-ge.B)/ve,$e=et$1(ge.A),Te=(et$1(ye.A)-$e)/ve;return Array(xe).fill(null).map((Re,Ae)=>Ae===0?ge:Ae===ve?ye:{R:D$2(ge.R+_e*Ae),G:D$2(ge.G+we*Ae),B:D$2(ge.B+Se*Ae),A:D$2($e+Te*Ae)})})(dt(ne),dt(oe),ce).map(ge=>pe(ge,ue))),Ft$1=(ne,oe,ce,ue)=>({[e$2.ANALOGOUS]:mt.buildHarmony(oe,it,ce,ue),[e$2.COMPLEMENTARY]:mt.buildHarmony(oe,at,ce,ue),[e$2.SPLIT_COMPLEMENTARY]:mt.buildHarmony(oe,rt,ce,ue),[e$2.TRIADIC]:mt.buildHarmony(oe,nt,ce,ue),[e$2.TETRADIC]:mt.buildHarmony(oe,ct,ce,ue),[e$2.SQUARE]:mt.buildHarmony(oe,ot,ce,ue)})[ne];class Rt{constructor(oe,ce={}){this._options=k$4(ce,oe),this.rgb=dt(oe),this.updateHSL(),this.updateLab(),this.updateCMYK()}updateRGB(){this.rgb={...x$4(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateRGBFromCMYK(){this.rgb={...q$2(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLab(){this.rgb={...P(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateHSL(){this.hsl=v$4(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLab(){this.lab={...V$1(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=_$3(this.rgb.R,this.rgb.G,this.rgb.B)}setOptions(oe={}){return this._options={...this._options,...oe},this}setH(oe){return this.hsl.H=O$1(oe),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setS(oe){return this.hsl.S=f$3(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setL(oe){return this.hsl.L=f$3(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setR(oe){this.rgb.R=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()}setG(oe){return this.rgb.G=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setB(oe){return this.rgb.B=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setCIEL(oe){return this.lab.L=f$3(oe,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEa(oe){return this.lab.a=f$3(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEb(oe){return this.lab.b=f$3(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setA(oe){return this.hsl.A=this.rgb.A=f$3(oe,0,1),this}setC(oe){return this.cmyk.C=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setM(oe){return this.cmyk.M=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setY(oe){return this.cmyk.Y=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setK(oe){return this.cmyk.K=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}get options(){return this._options}get H(){return D$2(this.hsl.H,this.options.decimals)}get S(){return D$2(this.hsl.S,this.options.decimals)}get L(){return D$2(this.hsl.L,this.options.decimals)}get CIEL(){return D$2(this.lab.L,this.options.decimals)}get CIEa(){return D$2(this.lab.a,this.options.decimals)}get CIEb(){return D$2(this.lab.b,this.options.decimals)}get R(){return D$2(this.rgb.R,this.options.decimals)}get G(){return D$2(this.rgb.G,this.options.decimals)}get B(){return D$2(this.rgb.B,this.options.decimals)}get A(){return D$2(this.hsl.A,this.options.decimals)}get C(){return D$2(this.cmyk.C,this.options.decimals)}get M(){return D$2(this.cmyk.M,this.options.decimals)}get Y(){return D$2(this.cmyk.Y,this.options.decimals)}get K(){return D$2(this.cmyk.K,this.options.decimals)}get HEXObject(){return lt.HEX(this.rgb)}get HEXAObject(){return lt.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return tt$1.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return tt$1.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})}get RGB(){return tt$1.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return tt$1.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return tt$1.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return tt$1.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get CIELab(){return tt$1.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return tt$1.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get CMYK(){return tt$1.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return tt$1.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEX)}static toHEX(oe){return tt$1.HEX(Rt.toHEXObject(oe))}static toHEXAObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEXA)}static toHEXA(oe){return tt$1.HEX(Rt.toHEXAObject(oe))}static toRGBObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGB)}static toRGB(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGB);return tt$1.RGB(me,pe)}static toRGBAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGBA)}static toRGBA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGBA);return tt$1.RGB(me,pe)}static toHSLObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSL)}static toHSL(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSL);return tt$1.HSL(me,pe)}static toHSLAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSLA)}static toHSLA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSLA);return tt$1.HSL(me,pe)}static toCIELabObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELab)}static toCIELab(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELab);return tt$1.CIELab(me,pe)}static toCIELabAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELabA)}static toCIELabA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELabA);return tt$1.CIELab(me,pe)}static toCMYKObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYK)}static toCMYK(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYK);return tt$1.CMYK(me,pe)}static toCMYKAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYKA)}static toCMYKA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYKA);return tt$1.CMYK(me,pe)}static getBlendHEXObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEX)}static getBlendHEX(oe,ce,ue=5){return Rt.getBlendHEXObject(oe,ce,ue).map(pe=>tt$1.HEX(pe))}static getBlendHEXAObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEXA)}static getBlendHEXA(oe,ce,ue=5){return Rt.getBlendHEXAObject(oe,ce,ue).map(pe=>tt$1.HEX(pe))}static getBlendRGBObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB)}static getBlendRGB(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB).map(me=>tt$1.RGB(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB).map(me=>tt$1.RGB(me,k$4(ue||{},oe,ce)))}static getBlendRGBAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA)}static getBlendRGBA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA).map(me=>tt$1.RGB(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA).map(me=>tt$1.RGB(me,k$4(ue||{},oe,ce)))}static getBlendHSLObject(oe,ce,ue,pe){return Ht(oe,ce,typeof ue=="number"?ue:5,pe==null?void 0:pe.decimals,lt.HSL)}static getBlendHSL(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSL).map(me=>tt$1.HSL(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSL).map(me=>tt$1.HSL(me,k$4(ue||{},oe,ce)))}static getBlendHSLAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA)}static getBlendHSLA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA).map(me=>tt$1.HSL(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA).map(me=>tt$1.HSL(me,k$4(ue||{},oe,ce)))}static getBlendCIELabObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab)}static getBlendCIELab(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab).map(me=>tt$1.CIELab(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab).map(me=>tt$1.CIELab(me,k$4(ue||{},oe,ce)))}static getBlendCIELabAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA)}static getBlendCIELabA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA).map(me=>tt$1.CIELab(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA).map(me=>tt$1.CIELab(me,k$4(ue||{},oe,ce)))}static getMixHEXObject(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!1)}static getMixHEX(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!0)}static getMixHEXAObject(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!1)}static getMixHEXA(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!0)}static getMixRGBObject(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!1,k$4(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixRGB(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!0,k$4(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixRGBAObject(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!1,k$4(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixRGBA(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!0,k$4(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixHSLObject(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!1,k$4(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixHSL(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!0,k$4(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixHSLAObject(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!1,k$4(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixHSLA(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!0,k$4(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixCIELabObject(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!1,k$4(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixCIELab(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!0,k$4(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixCIELabAObject(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!1,k$4(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixCIELabA(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!0,k$4(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getShades(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!0,k$4(ue||{},oe)):Et(oe,5,!0,k$4(ce||{},oe))}static getTints(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!1,k$4(ue||{},oe)):Et(oe,5,!1,k$4(ce||{},oe))}static getHarmony(oe,ce,ue,pe){return`${ce}`in e$2?Ft$1(ce,oe,K$1(ue)?ue:s$2.ADDITIVE,k$4(K$1(ue)?pe||{}:ue||{},oe)):K$1(ce)?Ft$1(e$2.COMPLEMENTARY,oe,ce,k$4(ue||{},oe)):Ft$1(e$2.COMPLEMENTARY,oe,s$2.ADDITIVE,k$4(ce||{},oe))}}function hash(ne){let oe=5381,ce=ne.length;for(;ce;)oe=oe*33^ne.charCodeAt(--ce);return oe>>>0}const tint="500";function hex(ne){return parseInt(ne.replace("#","0x"))}const searchEventAliases=lodashExports.thru({source:["source","start"],destination:["destination","goal","finish"],updating:["update","updating"],expanding:["expanding","expanding"],generating:["generate","generating","open","opening"],closing:["close","closing"],end:["finish","end","solution"]},ne=>{const oe={};for(const[ce,ue]of lodashExports.entries(ne))for(const pe of ue)oe[pe]=ce;return oe}),colorsHex={source:green$2.A400,destination:red$2.A400,updating:orange$2[tint],expanding:deepPurple[tint],generating:amber[tint],closing:pink[tint],end:blue$2.A400};lodashExports.mapValues(colorsHex,hex);const shades=lodashExports.sortBy(lodashExports.keys(accentColors),ne=>new Rt(getShade(ne,"dark")).H);function getColorHex(ne="",oe){const ce=searchEventAliases[lodashExports.lowerCase(ne)];if(ce)return colorsHex[ce];{const ue=hash(lodashExports.lowerCase(ne)),pe=lodashExports.values(accentColors);return pe[ue%pe.length][tint]}}function inferLayerName(ne){var oe;return ne!=null&&ne.name?ne==null?void 0:ne.name:(oe=ne==null?void 0:ne.source)!=null&&oe.type?getController(ne).inferName(ne):"Untitled Layer"}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(oe){return setTimeoutFn(oe,TIMEOUT_DURATION)}):(cancelFrame=function([oe,ce]){cancelAnimationFrameFn(oe),clearTimeoutFn(ce)},requestFrame=function(oe){const ce=requestAnimationFrameFn(function(){clearTimeoutFn(ue),oe()}),ue=setTimeoutFn(function(){cancelAnimationFrameFn(ce),oe()},TIMEOUT_DURATION);return[ce,ue]});function createDetectElementResize(ne){let oe,ce,ue,pe,me,ge,ye;const xe=typeof document<"u"&&document.attachEvent;if(!xe){ge=function(ke){const Be=ke.__resizeTriggers__,Ie=Be.firstElementChild,Ne=Be.lastElementChild,je=Ie.firstElementChild;Ne.scrollLeft=Ne.scrollWidth,Ne.scrollTop=Ne.scrollHeight,je.style.width=Ie.offsetWidth+1+"px",je.style.height=Ie.offsetHeight+1+"px",Ie.scrollLeft=Ie.scrollWidth,Ie.scrollTop=Ie.scrollHeight},me=function(ke){return ke.offsetWidth!==ke.__resizeLast__.width||ke.offsetHeight!==ke.__resizeLast__.height},ye=function(ke){if(ke.target.className&&typeof ke.target.className.indexOf=="function"&&ke.target.className.indexOf("contract-trigger")<0&&ke.target.className.indexOf("expand-trigger")<0)return;const Be=this;ge(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){me(Be)&&(Be.__resizeLast__.width=Be.offsetWidth,Be.__resizeLast__.height=Be.offsetHeight,Be.__resizeListeners__.forEach(function(je){je.call(Be,ke)}))})};let Se=!1,$e="";ue="animationstart";const Te="Webkit Moz O ms".split(" ");let Re="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),Ae="";{const ke=document.createElement("fakeelement");if(ke.style.animationName!==void 0&&(Se=!0),Se===!1){for(let Be=0;Be 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%; }',Te=Se.head||Se.getElementsByTagName("head")[0],Re=Se.createElement("style");Re.id="detectElementResize",Re.type="text/css",ne!=null&&Re.setAttribute("nonce",ne),Re.styleSheet?Re.styleSheet.cssText=$e:Re.appendChild(Se.createTextNode($e)),Te.appendChild(Re)}};return{addResizeListener:function(Se,$e){if(xe)Se.attachEvent("onresize",$e);else{if(!Se.__resizeTriggers__){const Te=Se.ownerDocument,Re=windowObject.getComputedStyle(Se);Re&&Re.position==="static"&&(Se.style.position="relative"),ve(Te),Se.__resizeLast__={},Se.__resizeListeners__=[],(Se.__resizeTriggers__=Te.createElement("div")).className="resize-triggers";const Ae=Te.createElement("div");Ae.className="expand-trigger",Ae.appendChild(Te.createElement("div"));const ke=Te.createElement("div");ke.className="contract-trigger",Se.__resizeTriggers__.appendChild(Ae),Se.__resizeTriggers__.appendChild(ke),Se.appendChild(Se.__resizeTriggers__),ge(Se),Se.addEventListener("scroll",ye,!0),ue&&(Se.__resizeTriggers__.__animationListener__=function(Ie){Ie.animationName===ce&&ge(Se)},Se.__resizeTriggers__.addEventListener(ue,Se.__resizeTriggers__.__animationListener__))}Se.__resizeListeners__.push($e)}},removeResizeListener:function(Se,$e){if(xe)Se.detachEvent("onresize",$e);else if(Se.__resizeListeners__.splice(Se.__resizeListeners__.indexOf($e),1),!Se.__resizeListeners__.length){Se.removeEventListener("scroll",ye,!0),Se.__resizeTriggers__.__animationListener__&&(Se.__resizeTriggers__.removeEventListener(ue,Se.__resizeTriggers__.__animationListener__),Se.__resizeTriggers__.__animationListener__=null);try{Se.__resizeTriggers__=!Se.removeChild(Se.__resizeTriggers__)}catch{}}}}}class AutoSizer extends reactExports.Component{constructor(...oe){super(...oe),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._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:ce,disableWidth:ue,onResize:pe}=this.props;if(this._parentNode){const me=window.getComputedStyle(this._parentNode)||{},ge=parseFloat(me.paddingLeft||"0"),ye=parseFloat(me.paddingRight||"0"),xe=parseFloat(me.paddingTop||"0"),ve=parseFloat(me.paddingBottom||"0"),_e=this._parentNode.getBoundingClientRect(),we=_e.height-xe-ve,Se=_e.width-ge-ye,$e=this._parentNode.offsetHeight-xe-ve,Te=this._parentNode.offsetWidth-ge-ye;(!ce&&(this.state.height!==$e||this.state.scaledHeight!==we)||!ue&&(this.state.width!==Te||this.state.scaledWidth!==Se))&&(this.setState({height:$e,width:Te,scaledHeight:we,scaledWidth:Se}),typeof pe=="function"&&pe({height:$e,scaledHeight:we,scaledWidth:Se,width:Te}))}},this._setRef=ce=>{this._autoSizer=ce}}componentDidMount(){const{nonce:oe}=this.props,ce=this._autoSizer?this._autoSizer.parentNode:null;if(ce!=null&&ce.ownerDocument&&ce.ownerDocument.defaultView&&ce instanceof ce.ownerDocument.defaultView.HTMLElement){this._parentNode=ce;const ue=ce.ownerDocument.defaultView.ResizeObserver;ue!=null?(this._resizeObserver=new ue(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(ce)):(this._detectElementResize=createDetectElementResize(oe),this._detectElementResize.addResizeListener(ce,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:oe,defaultHeight:ce,defaultWidth:ue,disableHeight:pe=!1,disableWidth:me=!1,doNotBailOutOnEmptyChildren:ge=!1,nonce:ye,onResize:xe,style:ve={},tagName:_e="div",...we}=this.props,{height:Se,scaledHeight:$e,scaledWidth:Te,width:Re}=this.state,Ae={overflow:"visible"},ke={};let Be=!1;return pe||(Se===0&&(Be=!0),Ae.height=0,ke.height=Se,ke.scaledHeight=$e),me||(Re===0&&(Be=!0),Ae.width=0,ke.width=Re,ke.scaledWidth=Te),ge&&(Be=!1),reactExports.createElement(_e,{ref:this._setRef,style:{...Ae,...ve},...we},!Be&&oe(ke))}}const treeWorkerUrl=""+new URL("tree.worker-w3km_BXF.js",import.meta.url).href;class TreeWorkerUrl extends Worker{constructor(){super(treeWorkerUrl,{type:"module"})}}const treeAsync=usingMemoizedWorkerTask(TreeWorkerUrl);function useTree(ne){const oe=compilerRuntimeExports.c(3);let ce,ue;return oe[0]!==ne?(ce=async()=>await treeAsync(ne),ue=[ne],oe[0]=ne,oe[1]=ce,oe[2]=ue):(ce=oe[1],ue=oe[2]),useAsync(ce,ue)}function useTreeMemo(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree(ce)}const isDefined$1=ne=>!lodashExports.isUndefined(ne)&&!lodashExports.isNull(ne),divider$4=jsxRuntimeExports.jsx(Divider,{orientation:"vertical",flexItem:!0,sx:{m:1}});function useCache(ne,oe){const ce=compilerRuntimeExports.c(4),ue=!1,[pe,me]=reactExports.useState();let ge,ye;return ce[0]!==ue||ce[1]!==ne?(ge=()=>{ne&&me(ne)},ye=[ne,ue],ce[0]=ue,ce[1]=ne,ce[2]=ge,ce[3]=ye):(ge=ce[2],ye=ce[3]),reactExports.useEffect(ge,ye),pe}const layoutModes={"directed-graph":{value:"directed-graph",name:"Directed Graph",description:"Show all edges",showAllEdges:!0},tree:{value:"tree",name:"Tree",description:"Show only edges between each node and their final parents",showAllEdges:!1}};function GraphEvents(ne){const oe=compilerRuntimeExports.c(7),{onSelection:ce,layer:ue}=ne,pe=v$5(),me=_$4();let ge;oe[0]!==ce||oe[1]!==me?(ge=()=>{me({clickNode:xe=>{ce==null||ce({event:xe.event.original,node:xe.node})},enterNode:_temp$p,leaveNode:_temp2$h})},oe[0]=ce,oe[1]=me,oe[2]=ge):ge=oe[2];let ye;return oe[3]!==ue||oe[4]!==me||oe[5]!==pe?(ye=[ue,me,pe],oe[3]=ue,oe[4]=me,oe[5]=pe,oe[6]=ye):ye=oe[6],reactExports.useEffect(ge,ye),null}function _temp2$h(){document.body.style.cursor=""}function _temp$p(){document.body.style.cursor="pointer"}const SEVEN_CLASS_GNBU=["#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"];function TreeGraph({trace:ne,tree:oe,step:ce=0,layer:ue,showAllEdges:pe,trackedProperty:me}){const ge=v$5(),[ye,xe]=reactExports.useState("vertical"),ve=usePaper(),_e=useAcrylic(),we=useTheme(),Se=interpolate$1([we.palette.background.paper,we.palette.text.primary]),$e=j$3(),Te=reactExports.useMemo(()=>getFinalParents(ne),[ne]),Re=reactExports.useMemo(()=>{const Ae=ye==="vertical",ke=new MultiDirectedGraph;lodashExports.forEach(oe,Ie=>{ke.addNode(Ie.label,{x:Ae?Ie.x:-Ie.y,y:Ae?Ie.y:-Ie.x,label:Ie.label,size:Math.log(Ie.size)+2,color:we.palette.action.disabledBackground})});const Be={};return lodashExports.forEach(ne==null?void 0:ne.events,({id:Ie,pId:Ne})=>{Ie&&Ne&&(Be[Ie]=Be[Ie]??new Set,Be[Ie].add(Ne))}),lodashExports.forEach(ne==null?void 0:ne.events,({id:Ie,pId:Ne})=>{if(isDefined$1(Ne)&&ke.hasNode(`${Ne}`)){const je=makeEdgeKey(Ie,Ne);!ke.hasEdge(je)&&ke.hasNode(`${Ie}`)&&ke.addDirectedEdgeWithKey(je,`${Ne}`,`${Ie}`,{label:"",color:"white",size:2,final:Te[Ie]===Ne}),ke.hasDirectedEdge(je)&&ke.updateEdgeAttribute(je,"size",ze=>Math.log(Math.E**(ze-.5)+.5)+.5)}}),ke},[$e,ne,oe,Te,ye]);return reactExports.useEffect(()=>{const Ae=memoizee$1(je=>interpolate$1([we.palette.background.paper,je])),ke=400,Be=Se(.1);Re.forEachNode(je=>{Re.setNodeAttribute(je,"color",Be),Re.setNodeAttribute(je,"forceLabel",!1),Re.setNodeAttribute(je,"label",lodashExports.truncate(je,{length:15}))}),Re.forEachEdge(je=>{const ze=Re.getEdgeAttribute(je,"final");Re.setEdgeAttribute(je,"color",Be),Re.setEdgeAttribute(je,"hidden",!pe&&!ze),Re.setEdgeAttribute(je,"forceLabel",!1),Re.setEdgeAttribute(je,"label","")});const Ie={},Ne={};if((pe?lodashExports.forEach:lodashExports.forEachRight)(lodashExports.slice(ne==null?void 0:ne.events,0,ce+1),({id:je,type:ze,pId:Ue},qe)=>{const Ke=getColorHex(ze),Ge=Ae(Ke)(lodashExports.max([1-(ce-qe)/ke,.2]));if(Re.hasNode(`${je}`)&&!Ie[je]){Re.setNodeAttribute(`${je}`,"color",Ge),Re.setNodeAttribute(`${je}`,"label",lodashExports.truncate(`${lodashExports.startCase(ze)} ${je}`,{length:15})),Re.setNodeAttribute(`${je}`,"forceLabel",ce===qe);const Ye=makeEdgeKey(je,Ue);isDefined$1(Ue)&&Re.hasNode(`${Ue}`)&&Re.hasEdge(Ye)&&!Ne[Ye]&&(Re.setEdgeAttribute(Ye,"forceLabel",ce===qe),Re.setEdgeAttribute(Ye,"color",Ge),Re.setEdgeAttribute(Ye,"label",`Step ${qe}`),Re.setEdgeAttribute(Ye,"hidden",!1),pe||(Ne[Ye]=!0)),pe||(Ie[je]=!0)}}),me){const je=lodashExports.min(lodashExports.map(ne==null?void 0:ne.events,Ke=>lodashExports.get(Ke,me))),ze=lodashExports.max(lodashExports.map(ne==null?void 0:ne.events,Ke=>lodashExports.get(Ke,me))),Ue=Ke=>isNaN(je)||isNaN(ze)||isNaN(Ke)?0:(Ke-je)/(ze-je),qe=interpolate$1(SEVEN_CLASS_GNBU);lodashExports.forEach(lodashExports.slice(ne==null?void 0:ne.events,0,ce+1),Ke=>{if(Re.hasNode(`${Ke.id}`)){const Ge=qe(Ue(lodashExports.get(Ke,me)));if(Re.setNodeAttribute(`${Ke.id}`,"color",Ge),isDefined$1(Ke.pId)){const Ye=makeEdgeKey(`${Ke.id}`,`${Ke.pId}`);Re.hasDirectedEdge(Ye)&&Re.setEdgeAttribute(Ye,"color",Ge)}}})}$e(Re)},[Re,ce,ne,pe,me,we]),jsxRuntimeExports.jsx(Stack,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack,{direction:"row",sx:{...ve(1),..._e,alignItems:"center",height:Ae=>Ae.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{var Ae,ke,Be;(Be=(ke=(Ae=ge==null?void 0:ge.getCamera)==null?void 0:Ae.call(ge))==null?void 0:ke.animatedReset)==null||Be.call(ke)},label:"Fit",icon:jsxRuntimeExports.jsx(SvgIcon$g,{})}),divider$4,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{xe(ye==="vertical"?"horizontal":"vertical")},label:"Rotate",icon:jsxRuntimeExports.jsx(SvgIcon$c,{})}),divider$4,jsxRuntimeExports.jsx(MinimisedPlaybackControls,{layer:ue})]})})}function makeEdgeKey(ne,oe){return`${ne}::${oe}`}const stepsLayerGuard$2=ne=>!!getController(ne).steps;function TreePage({template:ne}){var Je,Qe,Ze,Tt,Ut,Gt,Nt,Wt,Mt,Yt;const{key:oe,setKey:ce,layer:ue,layers:pe,allLayers:me}=useLayer(void 0,stepsLayerGuard$2),ge=useTheme(),{controls:ye,onChange:xe,state:ve,dragHandle:_e}=useViewTreeContext(),we=useThrottle(((Je=ue==null?void 0:ue.source)==null?void 0:Je.step)??0,1e3/24),{stepTo:Se}=usePlaybackState(oe),$e=reactExports.useMemo(()=>{var ir,tr,Qt;return lodashExports.chain((Qt=(tr=(ir=ue==null?void 0:ue.source)==null?void 0:ir.trace)==null?void 0:tr.content)==null?void 0:Qt.events).flatMap(lodashExports.keys).uniq().filter(er=>er!=="type").value()},[(Tt=(Ze=(Qe=ue==null?void 0:ue.source)==null?void 0:Qe.trace)==null?void 0:Ze.content)==null?void 0:Tt.events]),[Te,Re]=reactExports.useState(""),Ae=(Gt=(Ut=ue==null?void 0:ue.source)==null?void 0:Ut.trace)==null?void 0:Gt.content;reactExports.useEffect(()=>{Re("")},[Ae,Re]);const[ke,Be]=reactExports.useState(),{x:Ie,y:Ne}=ke?ke.event instanceof MouseEvent?{x:ke.event.clientX,y:ke.event.clientY}:{x:(Wt=(Nt=ke.event.touches)==null?void 0:Nt[0])==null?void 0:Wt.clientX,y:(Yt=(Mt=ke.event.touches)==null?void 0:Mt[0])==null?void 0:Yt.clientY}:{x:0,y:0},[je,ze]=reactExports.useState(!1),[Ue,qe]=reactExports.useState("tree"),Ke=reactExports.useMemo(()=>{const ir=lodashExports.filter(lodashExports.map(Ae==null?void 0:Ae.events,(tr,Qt)=>({event:tr,step:Qt})),tr=>`${tr.event.id}`===(ke==null?void 0:ke.node));return{events:ir,current:lodashExports.findLast(ir,tr=>tr.step<=we)}},[ke,we]),{result:Ge,loading:Ye}=useTreeMemo({trace:Ae,mode:Ue},[oe,Ue]),Xe=reactExports.useMemo(()=>({stagePadding:8*8,allowInvalidContainer:!0,edgeLabelColor:{color:ge.palette.text.secondary},labelFont:"Inter",labelSize:14,labelDensity:.1,renderEdgeLabels:!0,edgeLabelFont:"Inter",edgeLabelSize:12,defaultDrawNodeHover:()=>{},labelColor:{color:ge.palette.text.primary},edgeLabelWeight:"500",defaultEdgeType:"arrow",edgeProgramClasses:{straight:EdgeArrowProgram$1,curvedArrow:EdgeCurvedArrowProgram}}),[ge]);return jsxRuntimeExports.jsxs(ne,{onChange:xe,stack:ve,children:[jsxRuntimeExports.jsx(ne.Key,{children:"tree"}),jsxRuntimeExports.jsx(ne.Title,{children:"Tree"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:Ae?Ye?jsxRuntimeExports.jsxs(Flex,{sx:{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(CircularProgress,{}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",sx:{px:8,maxWidth:480},children:"Generating layout"})]}):Ge!=null&&Ge.length?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AutoSizer,{children:ir=>jsxRuntimeExports.jsxs(S$4,{style:{...ir,background:ge.palette.background.paper},graph:MultiDirectedGraph,settings:Xe,children:[jsxRuntimeExports.jsx(TreeGraph,{step:we,tree:Ge,trace:Ae,layer:ue,showAllEdges:layoutModes[Ue].showAllEdges,trackedProperty:Te}),jsxRuntimeExports.jsx(GraphEvents,{layer:oe,onSelection:tr=>{Be(tr),ze(!0)}})]})}),jsxRuntimeExports.jsx(Menu,{onClose:()=>ze(!1),anchorReference:"anchorPosition",anchorPosition:{left:Ie,top:Ne},transformOrigin:{horizontal:"left",vertical:"top"},open:je,children:jsxRuntimeExports.jsxs(MenuList,{dense:!0,sx:{p:0},children:[!!Ke.current&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsxs(Typography,{component:"div",color:"text.secondary",variant:"overline",children:["Step ",Ke.current.step]})}),jsxRuntimeExports.jsx(Box,{px:2,py:1,children:jsxRuntimeExports.jsx(PropertyList,{event:Ke.current.event,vertical:!0,simple:!0,primitives:!0})}),jsxRuntimeExports.jsx(Divider,{sx:{my:1,mx:2}})]}),jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsxs(Typography,{component:"div",color:"text.secondary",variant:"overline",children:["Events at ",ke==null?void 0:ke.node]})}),lodashExports.map(Ke.events,(ir,tr,Qt)=>{var hr;const er=((hr=lodashExports.findLast(Qt,cr=>cr.step<=we))==null?void 0:hr.step)===ir.step;return jsxRuntimeExports.jsxs(Stack,{direction:"row",children:[jsxRuntimeExports.jsx(MenuItem,{selected:er,sx:{height:32,flex:1,borderLeft:`4px solid ${getColorHex(ir.event.type)}`},onClick:()=>{Se(ir.step)},children:jsxRuntimeExports.jsx(Tooltip,{title:`Go to step ${ir.step}`,children:jsxRuntimeExports.jsx(Box,{sx:{ml:-.5,pr:4},children:jsxRuntimeExports.jsx(Label$1,{primary:lodashExports.startCase(ir.event.type),secondary:isDefined$1(ir.event.pId)?`Step ${ir.step}, from ${ir.event.pId}`:`Step ${ir.step}`})})})}),jsxRuntimeExports.jsx(Box,{sx:{flex:0},children:jsxRuntimeExports.jsx(PropertyDialog,{event:ir.event,trigger:cr=>jsxRuntimeExports.jsx(MenuItem,{selected:er,onClick:cr,sx:{pr:0},children:jsxRuntimeExports.jsx(Tooltip,{title:"See all properties",children:jsxRuntimeExports.jsx(ListItemIcon,{children:jsxRuntimeExports.jsx(SvgIcon$S,{})})})})})})]})})]})})]}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$10,{}),label:"Graph",secondary:`${inferLayerName(ue)} is not a graph.`}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$10,{}),label:"Graph",secondary:"When you load a trace that has tree-like data, you'll see it here as a decision tree."})})}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$G,{}),label:"Layer",value:oe,items:lodashExports.map(me,ir=>({id:ir.key,hidden:!lodashExports.find(pe,{key:ir.key}),name:inferLayerName(ir)})),onChange:ce,arrow:!0,ellipsis:12}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$C,{}),label:"Layout",value:Ue,onChange:qe,items:lodashExports.map(lodashExports.entries(layoutModes),([ir,tr])=>({id:ir,...tr})),arrow:!0}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$r,{}),label:"Tracked Property",value:Te,onChange:Re,items:[{id:"",name:"Off"},...lodashExports.map($e,ir=>({id:ir,name:`$.${ir}`}))],arrow:!0})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function getFinalParents(ne){const oe={};return lodashExports.forEach(ne==null?void 0:ne.events,({id:ce,pId:ue})=>{oe[ce]=ue}),oe}function SelectionMenu(ne){const oe=compilerRuntimeExports.c(17),{selection:ce,onClose:ue}=ne,pe=useSelectionMenu(),me=useCache(ce);let ge;oe[0]!==ce?(ge=ce??{},oe[0]=ce,oe[1]=ge):ge=oe[1];const{client:ye}=ge,xe=!!ce,ve=(ye==null?void 0:ye.y)??0,_e=(ye==null?void 0:ye.x)??0;let we;oe[2]!==ve||oe[3]!==_e?(we={top:ve,left:_e},oe[2]=ve,oe[3]=_e,oe[4]=we):we=oe[4];let Se;oe[5]===Symbol.for("react.memo_cache_sentinel")?(Se={py:0},oe[5]=Se):Se=oe[5];let $e;oe[6]!==ue?($e=Ae=>{const ke=lodashExports.entries(Ae);return ke.length?lodashExports.chain(ke).sortBy(_temp$o).map((Be,Ie)=>{const[,Ne]=Be,{items:je,primary:ze}=Ne;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!Ie&&jsxRuntimeExports.jsx(Divider,{sx:{my:1,mx:2}}),ze&&jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsx(Typography,{component:"div",color:"text.secondary",variant:"overline",children:ze})}),lodashExports.chain(je).entries().sortBy(_temp2$g).map(Ue=>{const[qe,Ke]=Ue,{action:Ge,icon:Ye,primary:Xe,secondary:Je,extras:Qe}=Ke;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!(Ge||Xe||Je)&&(Ge?jsxRuntimeExports.jsxs(MenuItem,{onClick:()=>{Ge==null||Ge(),ue==null||ue()},children:[Ye&&jsxRuntimeExports.jsx(ListItemIcon,{children:Ye}),jsxRuntimeExports.jsx(ListItemText,{primary:Xe,sx:{mr:4}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",children:Je})]},qe):jsxRuntimeExports.jsxs(ListItem,{children:[Ye&&jsxRuntimeExports.jsx(ListItemIcon,{children:Ye}),jsxRuntimeExports.jsx(ListItemText,{primary:Xe,sx:{mr:4}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",children:Je})]},qe)),!!Qe&&Qe]})}).value()]})}).value():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ListItem,{children:jsxRuntimeExports.jsx(Typography,{component:"div",children:"No info to show."})})})},oe[6]=ue,oe[7]=$e):$e=oe[7];let Te;oe[8]!==pe||oe[9]!==me||oe[10]!==$e?(Te=jsxRuntimeExports.jsx(MenuList,{dense:!0,sx:Se,children:jsxRuntimeExports.jsx(pe,{event:me,children:$e})}),oe[8]=pe,oe[9]=me,oe[10]=$e,oe[11]=Te):Te=oe[11];let Re;return oe[12]!==ue||oe[13]!==xe||oe[14]!==we||oe[15]!==Te?(Re=jsxRuntimeExports.jsx(Menu,{open:xe,anchorReference:"anchorPosition",anchorPosition:we,onClose:ue,keepMounted:!0,children:Te}),oe[12]=ue,oe[13]=xe,oe[14]=we,oe[15]=Te,oe[16]=Re):Re=oe[16],Re}function _temp2$g(ne){const[,oe]=ne;return oe.index}function _temp$o(ne){const[,oe]=ne;return oe.index}const identity$1=({children:ne})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne({})});function useSelectionMenu(){const ne=compilerRuntimeExports.c(2),[oe]=useLayers(),{layers:ce}=oe;let ue,pe;return ne[0]!==ce?(pe=lodashExports.chain(ce).reduce(_temp3$a,identity$1).value(),ne[0]=ce,ne[1]=pe):pe=ne[1],ue=pe,ue}function _temp3$a(ne,oe){var ue;const ce=((ue=getController(oe))==null?void 0:ue.provideSelectionInfo)??identity$1;return pe=>{const{children:me,event:ge}=pe;return jsxRuntimeExports.jsx(ce,{layer:oe.key,event:ge,children:ye=>jsxRuntimeExports.jsx(ne,{event:ge,children:xe=>me==null?void 0:me(lodashExports.merge(ye,xe))})})}}const TILE_RESOLUTION=128,tileSize=(ne=!1)=>(ne?.75:devicePixelRatio*2)*TILE_RESOLUTION,rendererOptions={tileSubdivision:2,workerCount:lodashExports.clamp(lodashExports.floor((navigator.hardwareConcurrency-1)/2),1,12),tileResolution:{width:tileSize(),height:tileSize()}},TraceRendererContext=reactExports.createContext({});function useRendererInstance(){return reactExports.useContext(TraceRendererContext)}function useRenderer(ne,{width:oe,height:ce}={}){const ue=useTheme(),[pe]=useRenderers(),me=reactExports.useRef(null),[ge,ye]=reactExports.useState(""),[xe,ve]=reactExports.useState();return reactExports.useEffect(()=>{if(me.current&&oe&&ce&&ne){const _e=lodashExports.find(pe,we=>we.renderer.meta.id===ne);if(_e)try{const we=new _e.renderer.constructor;we.setup({...rendererOptions,screenSize:{width:oe,height:ce},backgroundColor:ue.palette.background.paper,accentColor:ue.palette.primary.main}),me.current.append(we.getView()),ve(we),ye("");const Se=me.current;return()=>{try{Se.removeChild(we.getView()),ve(void 0)}catch($e){console.warn($e)}finally{we.destroy()}}}catch(we){ye(`${_e.renderer.meta.name}: ${lodashExports.get(we,"message")}`),ve(void 0)}}},[me.current,lodashExports.map,ne,pe,ue,ye,ve]),useDebounce(()=>{xe&&oe&&ce&&xe.setOptions({screenSize:{width:oe,height:ce}})},ue.transitions.duration.standard,[xe,oe,ce]),{instance:xe,ref:me,error:ge}}function TraceRendererCircularProgress(){const ne=compilerRuntimeExports.c(3),[oe]=useLoading(),{map:ce,specimen:ue}=oe;let pe;return ne[0]!==ce||ne[1]!==ue?(pe=!!(ce||ue)&&jsxRuntimeExports.jsx(CircularProgress,{sx:{position:"absolute",top:_temp$n,right:_temp2$f}}),ne[0]=ce,ne[1]=ue,ne[2]=pe):pe=ne[2],pe}function _temp2$f(ne){return ne.spacing(2)}function _temp$n(ne){return ne.spacing(8)}const VIEWPORT_PAGE_DESCRIPTION="When you create a layer, you'll see it visualised here.";function TraceRenderer({width:ne,height:oe,renderer:ce,rendererRef:ue,layers:pe}){const me=reactExports.useMemo(nanoid,[]),{instance:ge,error:ye,ref:xe}=useRenderer(ce,{width:ne,height:oe}),{playing:ve}=usePlaybackState(),[,_e]=useScreenshots(),[we,Se]=reactExports.useState();reactExports.useEffect(()=>{if(ge){const Te=(Re,Ae)=>{const ke=Re;Se({client:{x:ke.clientX,y:ke.clientY},world:Ae.world,info:{point:Ae.world,components:Ae.components}})};return ge.on("click",Te),()=>void ge.off("click",Te)}},[ge]);const $e=reactExports.useMemo(()=>({renderer:ge}),[ge]);return reactExports.useEffect(()=>ue==null?void 0:ue(ge),[ge,ue]),reactExports.useEffect(()=>{const Te=async()=>{var Re;return await((Re=ge==null?void 0:ge.toDataUrl)==null?void 0:Re.call(ge))};return _e(()=>({[me]:Te})),()=>_e(()=>({[me]:void 0}))},[me,ge]),reactExports.useEffect(()=>{ge&&ge.setOptions({tileResolution:{width:tileSize(ve),height:tileSize(ve)}})},[ge,ve]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TraceRendererCircularProgress,{}),jsxRuntimeExports.jsx(TraceRendererContext.Provider,{value:$e,children:jsxRuntimeExports.jsx(Box,{sx:{width:ne,height:oe},children:pe!=null&&pe.length?jsxRuntimeExports.jsx(TrustedContent,{children:ye?jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",width:ne,height:oe,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[jsxRuntimeExports.jsx(SvgIcon$X,{sx:{mb:2},fontSize:"large"}),ye]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box,{ref:xe,children:pe.map((Te,Re)=>jsxRuntimeExports.jsx(RenderLayer,{index:Re,layer:Te},Te.key))})})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$o,{}),label:"Viewport",width:ne,height:oe,secondary:VIEWPORT_PAGE_DESCRIPTION})})}),jsxRuntimeExports.jsx(SelectionMenu,{selection:we,onClose:()=>Se(void 0)})]})}function NodeList({nodes:ne,start:oe=0,end:ce=(ne==null?void 0:ne.length)??0}){const{renderer:ue}=useRendererInstance();return reactExports.useEffect(()=>{if(ue&&(ne!=null&&ne.length))return ue.add(lodashExports.slice(ne,oe,ce).flat())},[ue,ne,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function NodeList2(ne){const oe=compilerRuntimeExports.c(5),{nodes:ce}=ne,{renderer:ue}=useRendererInstance();let pe,me;oe[0]!==ce||oe[1]!==ue?(pe=()=>{if(ue&&(ce!=null&&ce.length))return ue.add(ce)},me=[ue,ce],oe[0]=ce,oe[1]=ue,oe[2]=pe,oe[3]=me):(pe=oe[2],me=oe[3]),reactExports.useEffect(pe,me);let ge;return oe[4]===Symbol.for("react.memo_cache_sentinel")?(ge=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),oe[4]=ge):ge=oe[4],ge}function LazyNodeList({nodes:ne,end:oe}){const ue=lodashExports.floor((oe??0)/100)*100,pe=reactExports.useMemo(()=>lodashExports.slice(ne,0,ue),[ne,ue]),me=reactExports.useMemo(()=>lodashExports.slice(ne,ue,(oe??0)+1),[ne,ue,oe]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!ue&&jsxRuntimeExports.jsx(NodeList,{nodes:pe}),me.map((ge,ye)=>jsxRuntimeExports.jsx(NodeList2,{nodes:ge},ue+ye))]})}const useEffectWhen=(ne,oe,ce)=>{const ue=compilerRuntimeExports.c(6),pe=usePrevious$1(ce);let me;ue[0]!==ne||ue[1]!==pe||ue[2]!==ce?(me=()=>{allSame(ce,pe)||ne()},ue[0]=ne,ue[1]=pe,ue[2]=ce,ue[3]=me):me=ue[3];let ge;return ue[4]!==oe?(ge=[oe],ue[4]=oe,ue[5]=ge):ge=ue[5],reactExports.useEffect(me,ge)};function allSame(ne,oe){return lodashExports.zip(ne,oe).every(([ce,ue])=>ce===ue)}const useEffectWhenAsync=(ne,oe,ce)=>{const ue=compilerRuntimeExports.c(12);let pe;ue[0]!==oe?(pe=oe===void 0?[]:oe,ue[0]=oe,ue[1]=pe):pe=ue[1];const me=pe;let ge;ue[2]!==ce?(ge=ce===void 0?[]:ce,ue[2]=ce,ue[3]=ge):ge=ue[3];const ye=ge,[xe,ve]=reactExports.useState(me),[_e,we]=reactExports.useState(ye);let Se,$e;ue[4]!==me||ue[5]!==_e||ue[6]!==ye?(Se=()=>{allSame(_e,ye)||(ve(me),we(ye))},$e=[me,ye,_e],ue[4]=me,ue[5]=_e,ue[6]=ye,ue[7]=Se,ue[8]=$e):(Se=ue[7],$e=ue[8]),reactExports.useEffect(Se,$e);let Te;return ue[9]!==xe||ue[10]!==_e?(Te=[...xe,..._e],ue[9]=xe,ue[10]=_e,ue[11]=Te):Te=ue[11],useAsyncAbortable(ne,Te)};function useConnectionResolver(){const ne=compilerRuntimeExports.c(2),[oe]=useConnections();let ce;return ne[0]!==oe?(ce=ue=>lodashExports.find(oe,ue),ne[0]=oe,ne[1]=ce):ce=ne[1],ce}function useConnection(ne){const oe=compilerRuntimeExports.c(3),ce=useConnectionResolver();let ue;return oe[0]!==ce||oe[1]!==ne?(ue=ce({url:ne}),oe[0]=ce,oe[1]=ne,oe[2]=ue):ue=oe[2],ue}function useMapContent(ne){const oe=compilerRuntimeExports.c(17),ce=useSnackbar(),ue=useLoadingState("map"),pe=useConnectionResolver();let me,ge;oe[0]!==ce||oe[1]!==pe?(ge=memoizee$1(async Te=>{const{source:Re,id:Ae}=Te===void 0?{}:Te;if(Re&&Ae){const ke=pe({url:Re});if(ke){ce("Fetching map...");const Be=await ke.transport().call("features/map",{id:Ae});return Be==null?void 0:Be.content}}},{normalizer:JSON.stringify}),oe[0]=ce,oe[1]=pe,oe[2]=ge):ge=oe[2],me=ge;const ye=me;let xe;oe[3]!==ne?(xe=ne??{},oe[3]=ne,oe[4]=xe):xe=oe[4];const{content:ve,source:_e,id:we}=xe;let Se;oe[5]!==ve||oe[6]!==ye||oe[7]!==we||oe[8]!==ne||oe[9]!==_e||oe[10]!==ue?(Se=()=>ue(async()=>{if(we)return{...ne,content:ve||await ye({source:_e,id:we})}}),oe[5]=ve,oe[6]=ye,oe[7]=we,oe[8]=ne,oe[9]=_e,oe[10]=ue,oe[11]=Se):Se=oe[11];let $e;return oe[12]!==ve||oe[13]!==ye||oe[14]!==we||oe[15]!==_e?($e=[ye,ve,_e,we],oe[12]=ve,oe[13]=ye,oe[14]=we,oe[15]=_e,oe[16]=$e):$e=oe[16],useAsync(Se,$e)}const noop$6=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});function useMapOptions(ne){const oe=compilerRuntimeExports.c(8);let ce;oe[0]!==ne?(ce=ne??{},oe[0]=ne,oe[1]=ce):ce=oe[1];const{format:ue}=ce;let pe;oe[2]!==ue||oe[3]!==(ne==null?void 0:ne.content)?(pe=async()=>{var ye,xe;return await((xe=(ye=getParser(ue))==null?void 0:ye.editor)==null?void 0:xe.call(ye,ne==null?void 0:ne.content))??noop$6},oe[2]=ue,oe[3]=ne==null?void 0:ne.content,oe[4]=pe):pe=oe[4];const me=ne==null?void 0:ne.content;let ge;return oe[5]!==ue||oe[6]!==me?(ge=[ue,me],oe[5]=ue,oe[6]=me,oe[7]=ge):ge=oe[7],useAsync(pe,ge)}function useParsedMap(ne,oe){const ce=useSnackbar(),ue=useTheme(),pe=useLoadingState("map"),{format:me,content:ge}=ne??{};return useAsync(()=>pe(async()=>{var ye,xe;if(me&&ge){ce("Processing map...");try{const ve=await((xe=(ye=getParser(me))==null?void 0:ye.parse)==null?void 0:xe.call(ye,ge,{color:ue.palette.text.primary,background:ue.palette.background.paper,...oe}))??{nodes:[]};return ce("Map loaded",`${ve.nodes.length} elements, ${ve.log.join(", ")}`),{...ne,...ve}}catch(ve){return console.error(ve),ce("Error parsing",lodashExports.get(ve,"message")),{error:lodashExports.get(ve,"message")}}}}),[me,ge,ue,oe])}const controller$2={key:"map",icon:jsxRuntimeExports.jsx(SvgIcon$D,{}),inferName:ne=>{var oe;return(oe=ne==null?void 0:ne.source)!=null&&oe.map?`${ne.source.map.name} (${lodashExports.startCase(ne.source.map.format)})`:"Untitled Map"},error:ne=>{var oe,ce;return(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedMap)==null?void 0:ce.error},compress:ne=>lodashExports.pick(ne,["map","options"]),claimImportedFile:async ne=>lodashExports.keys(mapParsers).includes(ext$1(ne.name))?{claimed:!0,layer:async oe=>{oe("Opening map...");try{return{map:{...await readUploadedMap(ne,lodashExports.entries(mapParsers).map(([ue])=>({id:ue}))).read()}}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports.get(ce,"message")}`),{map:{key:nanoid(),id:custom$1().id,error:lodashExports.get(ce,"message"),name:lodashExports.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var pe,me,ge;const ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap,{result:ue}=useMapOptions(ce);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Source",content:jsxRuntimeExports.jsx(MapPicker,{value:(me=ne==null?void 0:ne.source)==null?void 0:me.map,onChange:ye=>oe(xe=>lodashExports.set(xe,"source.map",ye))})}),(ce==null?void 0:ce.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:ce==null?void 0:ce.error})}),!!ce&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Heading,{label:"Map Options"}),ue?jsxRuntimeExports.jsx(ue,{value:(ge=ne==null?void 0:ne.source)==null?void 0:ge.options,onChange:ye=>oe(xe=>{var ve;lodashExports.set(xe,"source.options",ye(((ve=xe.source)==null?void 0:ve.options)??{}))})}):jsxRuntimeExports.jsx(CircularProgress,{sx:{mt:2}})]})]})}),renderer:({layer:ne,index:oe})=>{var pe;const{nodes:ce}=((pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap)??{},ue=reactExports.useMemo(()=>[lodashExports.map(ce,me=>({...me,meta:{...me.meta,sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))],[ce,oe,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode]);return jsxRuntimeExports.jsx(NodeList,{nodes:ue})},service:withProduce(({value:ne,produce:oe})=>{var me,ge;const{result:ce}=useMapContent((me=ne==null?void 0:ne.source)==null?void 0:me.map),{result:ue,loading:pe}=useParsedMap(ce,(ge=ne==null?void 0:ne.source)==null?void 0:ge.options);return useEffectWhen(()=>{pe||oe(ye=>{lodashExports.set(ye,"source.parsedMap",ue),lodashExports.set(ye,"viewKey",nanoid())})},[ue,oe,pe],[ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const{layer:ue,setLayer:pe,layers:me}=useLayer(ce),{parsedMap:ge}=(ue==null?void 0:ue.source)??{},{point:ye,node:xe}=reactExports.useMemo(()=>{var _e,we,Se,$e;if(ge&&oe){const Te=($e=(Se=getParser((we=(_e=ue==null?void 0:ue.source)==null?void 0:_e.map)==null?void 0:we.format))==null?void 0:Se.hydrate)==null?void 0:$e.call(Se,ge);if(Te){const Re=(oe==null?void 0:oe.world)&&Te.snap(oe.world);if(Re){const Ae=(oe==null?void 0:oe.world)&&Te.nodeAt(Re);return{point:Re,node:Ae}}}}return{}},[ge,oe]),ve=reactExports.useMemo(()=>({...ue&&ye&&!lodashExports.isUndefined(xe)&&{[ue.key]:{primary:inferLayerName(ue),items:{point:{primary:"Point",secondary:`(${lodashExports.round(ye.x,2)}, ${lodashExports.round(ye.y,2)})`}}}}}),[ye,xe,ue,me,pe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne(ve)})},getSources:ne=>{var ue,pe;const oe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.map,ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap;return oe?[{id:"map",name:`${oe.name}`,language:"txt",content:ce==null?void 0:ce.content}]:[]},onEditSource:(ne,oe,ce)=>ne};function _defineProperty$1(ne,oe,ce){return oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$1(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$1(ne){for(var oe=1;oe=0)&&(ce[pe]=ne[pe]);return ce}function _objectWithoutProperties(ne,oe){if(ne==null)return{};var ce=_objectWithoutPropertiesLoose(ne,oe),ue,pe;if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(ne);for(pe=0;pe=0)&&Object.prototype.propertyIsEnumerable.call(ne,ue)&&(ce[ue]=ne[ue])}return ce}function _slicedToArray(ne,oe){return _arrayWithHoles(ne)||_iterableToArrayLimit(ne,oe)||_unsupportedIterableToArray(ne,oe)||_nonIterableRest()}function _arrayWithHoles(ne){if(Array.isArray(ne))return ne}function _iterableToArrayLimit(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(xe){pe=!0,me=xe}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray(ne,oe)}}function _arrayLikeToArray(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce+pe);return ue<-2||ue>4?jsxRuntimeExports.jsxs("span",{children:[ce,"x10",jsxRuntimeExports.jsx("sup",{style:supProps,children:ue})]}):lodashExports.round(ne,2)}else return ne;case"string":return`${ne}`;case"undefined":return"null";default:return oe?jsxRuntimeExports.jsx("code",{children:lodashExports.isNull(ne)?"null":lodashExports.get(ne,"constructor.name")??typeof ne}):jsxRuntimeExports.jsx("code",{style:{whiteSpace:"pre"},children:lodashExports.truncate(beautify$1(ne,void 0,2),{length:100})})}}function Property(ne){const oe=compilerRuntimeExports.c(17),{label:ce,value:ue,type:pe,simple:me}=ne,ge=`${ce}::${renderProperty(ue)}`,ye=pe==null?void 0:pe.sx;let xe;oe[0]!==ye?(xe={opacity:.54,...ye},oe[0]=ye,oe[1]=xe):xe=oe[1];let ve;oe[2]!==ce||oe[3]!==xe||oe[4]!==pe?(ve=jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",...pe,sx:xe,children:ce}),oe[2]=ce,oe[3]=xe,oe[4]=pe,oe[5]=ve):ve=oe[5];let _e;oe[6]===Symbol.for("react.memo_cache_sentinel")?(_e=jsxRuntimeExports.jsx(Space,{}),oe[6]=_e):_e=oe[6];let we;oe[7]!==me||oe[8]!==ue?(we=renderProperty(ue,me)??"none",oe[7]=me,oe[8]=ue,oe[9]=we):we=oe[9];let Se;oe[10]!==we||oe[11]!==pe?(Se=jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",...pe,children:we}),oe[10]=we,oe[11]=pe,oe[12]=Se):Se=oe[12];let $e;return oe[13]!==ge||oe[14]!==ve||oe[15]!==Se?($e=jsxRuntimeExports.jsxs(Flex,{width:"auto",mr:2,mb:.5,alignItems:"baseline",children:[ve,_e,Se]},ge),oe[13]=ge,oe[14]=ve,oe[15]=Se,oe[16]=$e):$e=oe[16],$e}const COMMON_PROPS=["type"],OMIT_PROPS=[...COMMON_PROPS,"id"],ESSENTIAL_PROPS=["id"],GRAPH_PROPS=[...ESSENTIAL_PROPS,"pId"],HEURISTIC_PROPS=["f","g"],ALL_PROPS=[...OMIT_PROPS,...GRAPH_PROPS,...HEURISTIC_PROPS],sortEventKeys=ne=>lodashExports.chain(ne).entries().filter(([,oe])=>!lodashExports.isUndefined(oe)).sortBy(([oe])=>lodashExports.indexOf(ALL_PROPS,oe)+1||Number.MAX_SAFE_INTEGER).value();function PropertyDialog(ne){const oe=compilerRuntimeExports.c(9);let ce,ue,pe;if(oe[0]!==ne){const{event:ye,max:xe,simple:ve,variant:_e,...we}=ne;ce=ye,pe=xe,ue=we,oe[0]=ne,oe[1]=ce,oe[2]=ue,oe[3]=pe}else ce=oe[1],ue=oe[2],pe=oe[3];const me=pe===void 0?10:pe;let ge;if(oe[4]!==ce||oe[5]!==me||oe[6]!==ue){const ye=sortEventKeys(ce);let xe;oe[8]===Symbol.for("react.memo_cache_sentinel")?(xe=jsxRuntimeExports.jsx(AppBarTitle,{children:"Event Properties"}),oe[8]=xe):xe=oe[8],ge=jsxRuntimeExports.jsx(ManagedModal,{...lodashExports.merge({appBar:{children:xe},trigger:ve=>jsxRuntimeExports.jsxs(Button$1,{variant:"text",sx:{mx:-1,minWidth:0,width:"fit-content",color:_temp$q,justifyContent:"left"},onClick:_e=>{_e.stopPropagation(),_e.preventDefault(),ve(_e)},children:[ye.length-me," more"]})},ue),children:[{name:"common",props:lodashExports.filter(ye,_temp2$i)},{name:"Graph",props:lodashExports.filter(ye,_temp3$b)},{name:"Heuristic",props:lodashExports.filter(ye,_temp4$6)},{name:"other",props:lodashExports.filter(ye,_temp5$3)}].map(_temp7$3)}),oe[4]=ce,oe[5]=me,oe[6]=ue,oe[7]=ge}else ge=oe[7];return ge}function _temp7$3(ne,oe){const{name:ce,props:ue}=ne;return jsxRuntimeExports.jsxs(reactExports.Fragment,{children:[!!oe&&jsxRuntimeExports.jsx(Divider,{sx:{mb:1}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"overline",color:"text.secondary",sx:{px:3},children:lodashExports.startCase(ce)}),jsxRuntimeExports.jsx(Box,{sx:{p:1,pt:0,display:"grid",gridAutoFlow:"row",gridTemplateColumns:"repeat(2, 1fr)"},children:lodashExports.map(ue,_temp6$3)},ce)]},ce)}function _temp6$3(ne){const[oe,ce]=ne;return jsxRuntimeExports.jsx(ListItem,{sx:{py:.5},children:jsxRuntimeExports.jsx(ListItemText,{secondary:oe,primary:renderProperty(ce)})},`${oe}::${ce}`)}function _temp5$3(ne){const[oe]=ne;return!ALL_PROPS.includes(oe)}function _temp4$6(ne){const[oe]=ne;return HEURISTIC_PROPS.includes(oe)}function _temp3$b(ne){const[oe]=ne;return GRAPH_PROPS.includes(oe)}function _temp2$i(ne){const[oe]=ne;return COMMON_PROPS.includes(oe)}function _temp$q(ne){return ne.palette.text.secondary}function PropertyList(ne){const oe=compilerRuntimeExports.c(32);let ce,ue,pe,me,ge,ye;oe[0]!==ne?({event:ce,variant:ge,max:ye,simple:me,primitives:ue,...pe}=ne,oe[0]=ne,oe[1]=ce,oe[2]=ue,oe[3]=pe,oe[4]=me,oe[5]=ge,oe[6]=ye):(ce=oe[1],ue=oe[2],pe=oe[3],me=oe[4],ge=oe[5],ye=oe[6]);const xe=ge===void 0?"body2":ge,ve=ye===void 0?10:ye;let _e,we,Se,$e;if(oe[7]!==ce||oe[8]!==ve||oe[9]!==ue||oe[10]!==pe||oe[11]!==me||oe[12]!==xe){we=sortEventKeys(ce),_e=Flex,Se=pe;let Ae;oe[17]!==ue?(Ae=ue?_temp8$1:lodashExports.constant(!0),oe[17]=ue,oe[18]=Ae):Ae=oe[18];let ke;oe[19]!==me||oe[20]!==xe?(ke=(Be,Ie)=>{const[Ne,je]=Be;return jsxRuntimeExports.jsx(Property,{label:Ne,value:je,type:{variant:xe},simple:me},Ie)},oe[19]=me,oe[20]=xe,oe[21]=ke):ke=oe[21],$e=lodashExports.chain(we).filter(Ae).slice(0,ve).map(ke).value(),oe[7]=ce,oe[8]=ve,oe[9]=ue,oe[10]=pe,oe[11]=me,oe[12]=xe,oe[13]=_e,oe[14]=we,oe[15]=Se,oe[16]=$e}else _e=oe[13],we=oe[14],Se=oe[15],$e=oe[16];let Te;oe[22]!==ve||oe[23]!==ne||oe[24]!==me||oe[25]!==we.length?(Te=we.length>ve&&!me&&jsxRuntimeExports.jsx(PropertyDialog,{...ne}),oe[22]=ve,oe[23]=ne,oe[24]=me,oe[25]=we.length,oe[26]=Te):Te=oe[26];let Re;return oe[27]!==_e||oe[28]!==Se||oe[29]!==$e||oe[30]!==Te?(Re=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsxs(_e,{...Se,children:[$e,Te]})}),oe[27]=_e,oe[28]=Se,oe[29]=$e,oe[30]=Te,oe[31]=Re):Re=oe[31],Re}function _temp8$1(ne){const[,oe]=ne;return isPrimitive(oe)}function isPrimitive(ne){return lodashExports.isString(ne)||lodashExports.isNumber(ne)}var t$3,e$2,s$2,i$3;(function(ne){ne.HEX="HEX",ne.RGB="RGB",ne.HSL="HSL",ne.CIELab="CIELab",ne.CMYK="CMYK"})(t$3||(t$3={})),function(ne){ne.ANALOGOUS="ANALOGOUS",ne.COMPLEMENTARY="COMPLEMENTARY",ne.SPLIT_COMPLEMENTARY="SPLIT_COMPLEMENTARY",ne.TRIADIC="TRIADIC",ne.TETRADIC="TETRADIC",ne.SQUARE="SQUARE"}(e$2||(e$2={})),function(ne){ne.ADDITIVE="ADDITIVE",ne.SUBTRACTIVE="SUBTRACTIVE"}(s$2||(s$2={})),function(ne){ne.black="#000000",ne.silver="#C0C0C0",ne.gray="#808080",ne.white="#FFFFFF",ne.maroon="#800000",ne.red="#FF0000",ne.purple="#800080",ne.fuchsia="#FF00FF",ne.green="#008000",ne.lime="#00FF00",ne.olive="#808000",ne.yellow="#FFFF00",ne.navy="#000080",ne.blue="#0000FF",ne.teal="#008080",ne.aqua="#00FFFF",ne.orange="#FFA500",ne.aliceblue="#F0F8FF",ne.antiquewhite="#FAEBD7",ne.aquamarine="#7FFFD4",ne.azure="#F0FFFF",ne.beige="#F5F5DC",ne.bisque="#FFE4C4",ne.blanchedalmond="#FFEBCD",ne.blueviolet="#8A2BE2",ne.brown="#A52A2A",ne.burlywood="#DEB887",ne.cadetblue="#5F9EA0",ne.chartreuse="#7FFF00",ne.chocolate="#D2691E",ne.coral="#FF7F50",ne.cornflowerblue="#6495ED",ne.cornsilk="#FFF8DC",ne.crimson="#DC143C",ne.cyan="#00FFFF",ne.darkblue="#00008B",ne.darkcyan="#008B8B",ne.darkgoldenrod="#B8860B",ne.darkgray="#A9A9A9",ne.darkgreen="#006400",ne.darkgrey="#A9A9A9",ne.darkkhaki="#BDB76B",ne.darkmagenta="#8B008B",ne.darkolivegreen="#556B2F",ne.darkorange="#FF8C00",ne.darkorchid="#9932CC",ne.darkred="#8B0000",ne.darksalmon="#E9967A",ne.darkseagreen="#8FBC8F",ne.darkslateblue="#483D8B",ne.darkslategray="#2F4F4F",ne.darkslategrey="#2F4F4F",ne.darkturquoise="#00CED1",ne.darkviolet="#9400D3",ne.deeppink="#FF1493",ne.deepskyblue="#00BFFF",ne.dimgray="#696969",ne.dimgrey="#696969",ne.dodgerblue="#1E90FF",ne.firebrick="#B22222",ne.floralwhite="#FFFAF0",ne.forestgreen="#228B22",ne.gainsboro="#DCDCDC",ne.ghostwhite="#F8F8FF",ne.gold="#FFD700",ne.goldenrod="#DAA520",ne.greenyellow="#ADFF2F",ne.grey="#808080",ne.honeydew="#F0FFF0",ne.hotpink="#FF69B4",ne.indianred="#CD5C5C",ne.indigo="#4B0082",ne.ivory="#FFFFF0",ne.khaki="#F0E68C",ne.lavender="#E6E6FA",ne.lavenderblush="#FFF0F5",ne.lawngreen="#7CFC00",ne.lemonchiffon="#FFFACD",ne.lightblue="#ADD8E6",ne.lightcoral="#F08080",ne.lightcyan="#E0FFFF",ne.lightgoldenrodyellow="#FAFAD2",ne.lightgray="#D3D3D3",ne.lightgreen="#90EE90",ne.lightgrey="#D3D3D3",ne.lightpink="#FFB6C1",ne.lightsalmon="#FFA07A",ne.lightseagreen="#20B2AA",ne.lightskyblue="#87CEFA",ne.lightslategray="#778899",ne.lightslategrey="#778899",ne.lightsteelblue="#B0C4DE",ne.lightyellow="#FFFFE0",ne.limegreen="#32CD32",ne.linen="#FAF0E6",ne.magenta="#FF00FF",ne.mediumaquamarine="#66CDAA",ne.mediumblue="#0000CD",ne.mediumorchid="#BA55D3",ne.mediumpurple="#9370DB",ne.mediumseagreen="#3CB371",ne.mediumslateblue="#7B68EE",ne.mediumspringgreen="#00FA9A",ne.mediumturquoise="#48D1CC",ne.mediumvioletred="#C71585",ne.midnightblue="#191970",ne.mintcream="#F5FFFA",ne.mistyrose="#FFE4E1",ne.moccasin="#FFE4B5",ne.navajowhite="#FFDEAD",ne.oldlace="#FDF5E6",ne.olivedrab="#6B8E23",ne.orangered="#FF4500",ne.orchid="#DA70D6",ne.palegoldenrod="#EEE8AA",ne.palegreen="#98FB98",ne.paleturquoise="#AFEEEE",ne.palevioletred="#DB7093",ne.papayawhip="#FFEFD5",ne.peachpuff="#FFDAB9",ne.peru="#CD853F",ne.pink="#FFC0CB",ne.plum="#DDA0DD",ne.powderblue="#B0E0E6",ne.rosybrown="#BC8F8F",ne.royalblue="#4169E1",ne.saddlebrown="#8B4513",ne.salmon="#FA8072",ne.sandybrown="#F4A460",ne.seagreen="#2E8B57",ne.seashell="#FFF5EE",ne.sienna="#A0522D",ne.skyblue="#87CEEB",ne.slateblue="#6A5ACD",ne.slategray="#708090",ne.slategrey="#708090",ne.snow="#FFFAFA",ne.springgreen="#00FF7F",ne.steelblue="#4682B4",ne.tan="#D2B48C",ne.thistle="#D8BFD8",ne.tomato="#FF6347",ne.turquoise="#40E0D0",ne.violet="#EE82EE",ne.wheat="#F5DEB3",ne.whitesmoke="#F5F5F5",ne.yellowgreen="#9ACD32",ne.rebeccapurple="#663399"}(i$3||(i$3={}));const a$3=Object.keys(i$3),r$3={HEX:["R","G","B","A"],RGB:["R","G","B","A"],HSL:["H","S","L","A"],CIELab:["L","a","b","A"],CMYK:["C","M","Y","K","A"]},n$3={BGR:t$3.RGB,ABGR:t$3.RGB,HLS:t$3.HSL,AHLS:t$3.HSL,LAB:t$3.CIELab,ALAB:t$3.CIELab,CKMY:t$3.CMYK,ACKMY:t$3.CMYK};var c$3;(function(ne){ne.NUMBER="number",ne.BOOLEAN="boolean"})(c$3||(c$3={}));const o$3={[t$3.HEX]:/^#(?:([a-f\d])([a-f\d])([a-f\d])([a-f\d])?|([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})?)$/i,[t$3.RGB]:/^rgba?\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.HSL]:/^hsla?\s*\(\s*(?:(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*,\s*((?:\d*\.)?\d+)%\s*,\s*((?:\d*\.)?\d+)%(?:\s*,\s*((?:\d*\.)?\d+))?|(-?(?:\d*\.)?\d+(?:deg|grad|rad|turn)?)\s*((?:\d*\.)?\d+)%\s*((?:\d*\.)?\d+)%(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.CIELab]:/^lab\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)\s*(-?(?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/,[t$3.CMYK]:/^(?:device-cmyk|cmyk)\s*\(\s*(?:((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)\s*,\s*((?:\d*\.)?\d+%?)(?:\s*,\s*((?:\d*\.)?\d+))?|((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)\s*((?:\d*\.)?\d+%?)(?:\s*\/\s*((?:\d*\.)?\d+%?))?)\s*\)$/},A$3=/^(-?(?:\d*\.)?\d+)((?:deg|grad|rad|turn)?)$/,h$3=/^(-?\d+(?:\.\d+)?|-?\.\d+)%$/,u$3=/^0x([a-f\d]{1,2})$/i,d$1=/\{(\d+)\}/g,l$3=/,( +|\d+)/g,E$2=/ +/,m$1="The provided string color doesn't have a correct format",b$3="The provided color object doesn't have the proper keys or format";var C$2,L$2,g$3;(function(ne){ne.NONE="none",ne.DEGREES="deg",ne.GRADIANS="grad",ne.RADIANS="rad",ne.TURNS="turn"})(C$2||(C$2={})),function(ne){ne.NONE="none",ne.PERCENT="percent"}(L$2||(L$2={})),function(ne){ne.DEVICE_CMYK="device-cmyk",ne.CMYK="cmyk"}(g$3||(g$3={}));const B$2={decimals:6,legacyCSS:!1,spacesAfterCommas:!1,anglesUnit:C$2.NONE,rgbUnit:L$2.NONE,labUnit:L$2.NONE,cmykUnit:L$2.PERCENT,alphaUnit:L$2.NONE,cmykFunction:g$3.DEVICE_CMYK},p$3=(ne,oe)=>Object.prototype.hasOwnProperty.call(ne,oe),H$3=ne=>+`${ne}`.replace(h$3,"$1"),F$1=ne=>h$3.test(`${ne}`)?H$3(ne):Math.min(+ne,100),R$2=ne=>(ne.length===1&&(ne+=ne),parseInt(ne,16)),S$3=ne=>{const oe=D$2(ne,0).toString(16).toUpperCase();return oe.length===1?`0x0${oe}`:`0x${oe}`},I$1=(ne,oe=!1)=>!oe&&h$3.test(ne)?Math.min(255*H$3(ne)/100,255):u$3.test(ne)?(ne.length===3&&(ne+=ne.slice(-1)),oe?D$2(ne)/255:D$2(ne)):Math.min(+ne,oe?1:255),G$1=ne=>h$3.test(ne)?f$3(125*H$3(ne)/100,-125,125):f$3(+ne,-125,125),M$3=ne=>Math.min(h$3.test(ne)?H$3(ne)/100:+ne,1),y$4=ne=>[...ne].sort().join("").toUpperCase(),D$2=(ne,oe=6)=>{const ce=Math.pow(10,oe);return Math.round(+ne*ce)/ce},f$3=(ne,oe,ce)=>Math.max(oe,Math.min(ne,ce)),O$1=ne=>{if(typeof ne=="string"){const oe=ne.match(A$3),ce=+oe[1];switch(oe[2]){case C$2.RADIANS:ne=D$2(180*ce/Math.PI);break;case C$2.TURNS:ne=D$2(360*ce);break;case C$2.GRADIANS:ne=D$2(.9*ce);break;case C$2.DEGREES:default:ne=ce}}return(ne>360||ne<0)&&(ne-=360*Math.floor(ne/360)),ne},Y$4=(ne,oe)=>{let ce;switch(oe){case C$2.RADIANS:ce=D$2((ue=>ue*Math.PI/180)(ne));break;case C$2.TURNS:ce=D$2(ne/360);break;case C$2.GRADIANS:ce=D$2(10/9*ne);break;case C$2.DEGREES:case C$2.NONE:default:ce=ne}return ce},k$4=(ne,...oe)=>{const ce=[],ue=[],pe=[],me=[],ge=[],ye=[],xe=Object.values(C$2),ve=Object.values(L$2),_e=Object.values(g$3),we={legacyCSS:0,spacesAfterCommas:0,cmykFunction:0};for(const Se of oe)if(typeof Se=="string"){if(ce.push(Se),Se.includes(",")){we.legacyCSS++;const $e=Se.match(l$3);new Set($e).size===1&&E$2.test($e[0].slice(1))&&we.spacesAfterCommas++}if(Se.match(o$3.HSL)){const $e=Se.match(o$3.HSL),Te=$e[1]||$e[5],Re=$e[8],Ae=Te.match(A$3)[2];ue.push(Ae===""?C$2.NONE:Ae),ye.push(h$3.test(Re));continue}if(o$3.RGB.test(Se)){const $e=Se.match(o$3.RGB),Te=$e[1]||$e[5],Re=$e[2]||$e[6],Ae=$e[3]||$e[7],ke=$e[8];pe.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)),ye.push(h$3.test(ke));continue}if(o$3.CIELab.test(Se)){const $e=Se.match(o$3.CIELab),Te=$e[1],Re=$e[2],Ae=$e[3],ke=$e[4];me.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)),ye.push(h$3.test(ke));continue}if(Se.match(o$3.CMYK)){const $e=Se.match(o$3.CMYK),Te=$e[1]||$e[6],Re=$e[2]||$e[7],Ae=$e[3]||$e[8],ke=$e[4]||$e[9],Be=$e[10];ge.push(h$3.test(Te)&&h$3.test(Re)&&h$3.test(Ae)&&h$3.test(ke)),Se.startsWith("cmyk")&&we.cmykFunction++,ye.push(h$3.test(Be))}}return{decimals:typeof ne.decimals===c$3.NUMBER?ne.decimals:B$2.decimals,legacyCSS:typeof ne.legacyCSS===c$3.BOOLEAN?ne.legacyCSS:!!(ce.length&&we.legacyCSS===ce.length)||B$2.legacyCSS,spacesAfterCommas:typeof ne.spacesAfterCommas===c$3.BOOLEAN?ne.spacesAfterCommas:!!(ce.length&&we.spacesAfterCommas===ce.length)||B$2.spacesAfterCommas,anglesUnit:ne.anglesUnit&&xe.includes(ne.anglesUnit)?ne.anglesUnit:new Set(ue).size===1?ue[0]:B$2.anglesUnit,rgbUnit:ne.rgbUnit&&ve.includes(ne.rgbUnit)?ne.rgbUnit:new Set(pe).size===1&&pe[0]?L$2.PERCENT:B$2.rgbUnit,labUnit:ne.labUnit&&ve.includes(ne.labUnit)?ne.labUnit:new Set(me).size===1&&me[0]?L$2.PERCENT:B$2.labUnit,cmykUnit:ne.cmykUnit&&ve.includes(ne.cmykUnit)?ne.cmykUnit:new Set(ge).size!==1||ge[0]?B$2.cmykUnit:L$2.NONE,alphaUnit:ne.alphaUnit&&ve.includes(ne.alphaUnit)?ne.alphaUnit:new Set(ye).size===1&&ye[0]?L$2.PERCENT:B$2.alphaUnit,cmykFunction:ne.cmykFunction&&_e.includes(ne.cmykFunction)?ne.cmykFunction:ge.length&&ge.length===we.cmykFunction?g$3.CMYK:B$2.cmykFunction}},K$1=ne=>`${ne}`in s$2,X$1=[[.4360747,.3850649,.1430804],[.2225045,.7168786,.0606169],[.0139322,.0971045,.7141733]],T$2=[[3.1338561,-1.6168667,-.4906146],[-.9787684,1.9161415,.033454],[.0719453,-.2289914,1.4052427]],N$3=X$1.map(ne=>ne.reduce((oe,ce)=>oe+ce,0)),$$3=(ne,oe,ce)=>(ce<0&&(ce+=6),ce>=6&&(ce-=6),D$2(ce<1?255*((oe-ne)*ce+ne):ce<3?255*oe:ce<4?255*((oe-ne)*(4-ce)+ne):255*ne)),j$2=ne=>ne<=.04045?ne/12.92:((ne+.055)/1.055)**2.4,U$1=ne=>ne<=.0031308?12.92*ne:1.055*ne**(1/2.4)-.055,w$2=(ne,oe,ce,ue)=>{const pe=[0,0,0],me=[ne,oe,ce];return ue.forEach((ge,ye)=>{ge.forEach((xe,ve)=>{pe[ye]+=xe*me[ve]})}),pe},x$4=(ne,oe,ce)=>{oe/=100;const ue=(ce/=100)<=.5?ce*(oe+1):ce+oe-ce*oe,pe=2*ce-ue;return{R:$$3(pe,ue,(ne/=60)+2),G:$$3(pe,ue,ne),B:$$3(pe,ue,ne-2)}},v$4=(ne,oe,ce,ue=1)=>{ne/=255,oe/=255,ce/=255,ue=Math.min(ue,1);const pe=Math.max(ne,oe,ce),me=Math.min(ne,oe,ce),ge=pe-me;let ye=0,xe=0;const ve=(pe+me)/2;if(ge!==0){switch(pe){case ne:ye=(oe-ce)/ge%6;break;case oe:ye=(ce-ne)/ge+2;break;case ce:ye=(ne-oe)/ge+4}ye=D$2(60*ye),ye<0&&(ye+=360),xe=ge/(1-Math.abs(2*ve-1))}return{H:ye,S:D$2(100*xe),L:D$2(100*ve),A:ue}},V$1=(ne,oe,ce)=>{const ue=[ne/255,oe/255,ce/255].map(j$2),pe=w$2(ue[0],ue[1],ue[2],X$1),me=((ge,ye,xe)=>{const ve=Se=>Se>.008856451679035631?Math.cbrt(Se):Se/.12841854934601665+.13793103448275862,_e=ve(ge/N$3[0]),we=ve(ye/N$3[1]);return[116*we-16,500*(_e-we),200*(we-ve(xe/N$3[2]))]})(pe[0],pe[1],pe[2]);return{L:me[0],a:me[1],b:me[2]}},P=(ne,oe,ce)=>{const ue=((me,ge,ye)=>{const xe=Se=>Se>.20689655172413793?Se**3:.12841854934601665*(Se-.13793103448275862),ve=(me+16)/116,_e=ge/500,we=ye/200;return[N$3[0]*xe(ve+_e),N$3[1]*xe(ve),N$3[2]*xe(ve-we)]})(ne,oe,ce),pe=w$2(ue[0],ue[1],ue[2],T$2).map(U$1);return{R:f$3(255*pe[0],0,255),G:f$3(255*pe[1],0,255),B:f$3(255*pe[2],0,255)}},q$2=(ne,oe,ce,ue)=>({R:D$2(255*(1-ne)*(ue=1-ue)),G:D$2(255*(1-oe)*ue),B:D$2(255*(1-ce)*ue)}),_$3=(ne,oe,ce)=>{ne/=255,oe/=255,ce/=255;const ue=1-Math.max(ne,oe,ce),pe=1-ue,me=pe&&(pe-oe)/pe,ge=pe&&(pe-ce)/pe;return{C:D$2(100*(pe&&(pe-ne)/pe)),M:D$2(100*me),Y:D$2(100*ge),K:D$2(100*ue)}},z$3=(ne,oe)=>{if(ne<0&&(ne+=360),ne>360&&(ne-=360),ne===360||ne===0)return ne;const ce=[[0,120],[120,180],[180,240],[240,360]],ue=[[0,60],[60,120],[120,240],[240,360]],pe=oe?ue:ce;let me=0,ge=0,ye=0,xe=0;return(oe?ce:ue).find((ve,_e)=>ne>=ve[0]&&nene?", ":",",W$1=(ne,oe)=>{const ce=y$4(Object.keys(ne));return r$3[n$3[ce]].reduce((ue,pe,me)=>{const ge=ne[pe];return ge!==void 0&&ue.push(oe(ge,me)),ue},[])},J$1=(ne,oe)=>ne.replace(d$1,(ce,ue)=>`${oe[+ue-1]}`),Z$2=(ne,oe,ce=!1)=>{const{alphaUnit:ue,legacyCSS:pe,decimals:me}=oe;return ue!==L$2.PERCENT||pe&&!ce?D$2(ne,me):`${D$2(100*ne,me)}%`},tt$1={[t$3.HEX]:ne=>{const oe=W$1(ne,ue=>(pe=>{let me=D$2(pe,0).toString(16).toUpperCase();return me.length===1&&(me=`0${me}`),me})(D$2(ue))),ce=oe.length===4?"#{1}{2}{3}{4}":"#{1}{2}{3}";return J$1(ce,oe)},[t$3.RGB]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,rgbUnit:me}=oe,ge=Q$1(pe),ye=W$1(ne,(ve,_e)=>me===L$2.PERCENT&&_e<3?`${((we,Se)=>D$2(we/255*100,Se))(ve,ce)}%`:_e===3?Z$2(ve,oe):D$2(ve,ce)),xe=ue?ye.length===4?`rgba({1}${ge}{2}${ge}{3}${ge}{4})`:`rgb({1}${ge}{2}${ge}{3})`:ye.length===4?"rgb({1} {2} {3} / {4})":"rgb({1} {2} {3})";return J$1(xe,ye)},[t$3.HSL]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,anglesUnit:me}=oe,ge=Q$1(pe),ye=W$1(ne,(ve,_e)=>_e===0&&me!==C$2.NONE?`${D$2(Y$4(ve,me),ce)}${me}`:_e===3?Z$2(ve,oe):D$2(ve,ce)),xe=ue?ye.length===4?`hsla({1}${ge}{2}%${ge}{3}%${ge}{4})`:`hsl({1}${ge}{2}%${ge}{3}%)`:ye.length===4?"hsl({1} {2}% {3}% / {4})":"hsl({1} {2}% {3}%)";return J$1(xe,ye)},[t$3.CIELab]:(ne,oe)=>{const{decimals:ce,labUnit:ue}=oe,pe=W$1(ne,(ge,ye)=>{if(ye===0){const xe=D$2(F$1(ge),ce);return ue===L$2.PERCENT?`${xe}%`:`${xe}`}return ye<3?ue===L$2.PERCENT?`${((xe,ve)=>D$2(xe/125*100,ve))(ge,ce)}%`:D$2(ge,ce):Z$2(ge,oe,!0)}),me=pe.length===4?"lab({1} {2} {3} / {4})":"lab({1} {2} {3})";return J$1(me,pe)},[t$3.CMYK]:(ne,oe)=>{const{decimals:ce,legacyCSS:ue,spacesAfterCommas:pe,cmykUnit:me,cmykFunction:ge}=oe,ye=Q$1(pe),xe=W$1(ne,(_e,we)=>me===L$2.PERCENT&&we<4?`${D$2(_e,ce)}%`:we===4?Z$2(_e,oe):D$2(_e/100,ce)),ve=ue?xe.length===5?`${ge}({1}${ye}{2}${ye}{3}${ye}{4}${ye}{5})`:`${ge}({1}${ye}{2}${ye}{3}${ye}{4})`:xe.length===5?`${ge}({1} {2} {3} {4} / {5})`:`${ge}({1} {2} {3} {4})`;return J$1(ve,xe)}},et$1=ne=>(typeof ne=="string"&&(ne=h$3.test(ne)?H$3(ne)/100:+ne),isNaN(+ne)||ne>1?1:D$2(ne)),st=(ne,oe,ce)=>oe.reduce((ue,pe)=>[...ue,{...ne,H:ce===s$2.ADDITIVE?O$1(ne.H+pe):O$1(z$3(z$3(ne.H,!1)+pe,!0))}],[{...ne}]),it=(ne,oe)=>st(ne,[30,-30],oe),at=(ne,oe)=>st(ne,[180],oe),rt=(ne,oe)=>st(ne,[150,-150],oe),nt=(ne,oe)=>st(ne,[120,-120],oe),ct=(ne,oe)=>st(ne,[60,-120,180],oe),ot=(ne,oe)=>st(ne,[90,-90,180],oe),At=ne=>typeof ne=="string"?(oe=>{let ce;if(Object.keys(t$3).some(ue=>{if(o$3[ue].test(oe))return ce=ue,!0}),!ce&&~a$3.indexOf(oe)&&(ce=t$3.HEX),!ce)throw new Error(m$1);return ce})(ne):(oe=>{let ce,ue=!1;const pe=y$4(Object.keys(oe));if(n$3[pe]&&(ce=n$3[pe]),ce&&ce===t$3.RGB){const me=Object.entries(oe).some(ye=>!u$3.test(`${ye[1]}`)),ge=Object.entries(oe).some(ye=>!(h$3.test(`${ye[1]}`)||!u$3.test(`${ye[1]}`)&&!isNaN(+ye[1])&&+ye[1]<=255));me&&ge&&(ue=!0),me||(ce=t$3.HEX)}if(!ce||ue)throw new Error(b$3);return ce})(ne),ht$1={[t$3.HEX](ne){const oe=(~a$3.indexOf(ne)?i$3[ne]:ne).match(o$3.HEX),ce={R:R$2(oe[1]||oe[5]),G:R$2(oe[2]||oe[6]),B:R$2(oe[3]||oe[7])},ue=oe[4]||oe[8];return ue!==void 0&&(ce.A=R$2(ue)/255),ce},[t$3.RGB](ne){const oe=ne.match(o$3.RGB),ce=I$1(oe[1]||oe[5]),ue=I$1(oe[2]||oe[6]),pe=I$1(oe[3]||oe[7]),me=oe[4]||oe[8],ge={R:Math.min(ce,255),G:Math.min(ue,255),B:Math.min(pe,255)};return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.HSL](ne){const oe=ne.match(o$3.HSL),ce=O$1(oe[1]||oe[5]),ue=F$1(oe[2]||oe[6]),pe=F$1(oe[3]||oe[7]),me=oe[4]||oe[8],ge=x$4(ce,ue,pe);return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.CIELab](ne){const oe=ne.match(o$3.CIELab),ce=F$1(oe[1]),ue=G$1(oe[2]),pe=G$1(oe[3]),me=oe[4],ge=P(ce,ue,pe);return me!==void 0&&(ge.A=et$1(me)),ge},[t$3.CMYK](ne){const oe=ne.match(o$3.CMYK),ce=M$3(oe[1]||oe[6]),ue=M$3(oe[2]||oe[7]),pe=M$3(oe[3]||oe[8]),me=M$3(oe[4]||oe[9]),ge=oe[5]||oe[10],ye=q$2(ce,ue,pe,me);return ge!==void 0&&(ye.A=et$1(ge)),ye}},ut={[t$3.HEX](ne){const oe={R:I$1(`${ne.R}`),G:I$1(`${ne.G}`),B:I$1(`${ne.B}`)};return p$3(ne,"A")&&(oe.A=Math.min(I$1(`${ne.A}`,!0),1)),oe},[t$3.RGB](ne){return this.HEX(ne)},[t$3.HSL](ne){const oe=F$1(`${ne.S}`),ce=F$1(`${ne.L}`),ue=x$4(O$1(ne.H),oe,ce);return p$3(ne,"A")&&(ue.A=et$1(ne.A)),ue},[t$3.CIELab](ne){const oe=F$1(`${ne.L}`),ce=G$1(`${ne.a}`),ue=G$1(`${ne.b}`),pe=P(oe,ce,ue);return p$3(ne,"A")&&(pe.A=et$1(ne.A)),pe},[t$3.CMYK](ne){const oe=M$3(`${ne.C}`),ce=M$3(`${ne.M}`),ue=M$3(`${ne.Y}`),pe=M$3(`${ne.K}`),me=q$2(oe,ce,ue,pe);return p$3(ne,"A")&&(me.A=et$1(ne.A)),me}},dt=(ne,oe=At(ne))=>typeof ne=="string"?ht$1[oe](ne):ut[oe](ne),lt={[t$3.HEX]:ne=>({R:S$3(ne.R),G:S$3(ne.G),B:S$3(ne.B)}),HEXA(ne){const oe=lt.HEX(ne);return oe.A=p$3(ne,"A")?S$3(255*ne.A):"0xFF",oe},[t$3.RGB](ne,oe){const ce=Ct(ne,oe);return p$3(ce,"A")&&delete ce.A,ce},RGBA(ne,oe){const ce=lt.RGB(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A):1,ce},[t$3.HSL](ne,oe){const ce=v$4(ne.R,ne.G,ne.B);return delete ce.A,Lt(ce,oe)},HSLA(ne,oe){const ce=lt.HSL(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce},[t$3.CIELab](ne,oe){const ce=V$1(ne.R,ne.G,ne.B);return gt(ce,oe)},CIELabA(ne,oe){const ce=lt.CIELab(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce},[t$3.CMYK]:(ne,oe)=>Bt(_$3(ne.R,ne.G,ne.B),oe),CMYKA(ne,oe){const ce=lt.CMYK(ne,oe);return ce.A=p$3(ne,"A")?D$2(ne.A,oe):1,ce}},Et=(ne,oe,ce,ue)=>{const pe=At(ne),me=typeof ne=="string",ge=dt(ne,pe),ye=typeof ne=="string"&&p$3(ge,"A")||typeof ne!="string"&&p$3(ne,"A"),xe=v$4(ge.R,ge.G,ge.B,ge.A);ye||delete xe.A;const ve=ce?xe.L/(oe+1):(100-xe.L)/(oe+1),_e=Array(oe).fill(null).map((we,Se)=>({...xe,L:xe.L+ve*(Se+1)*(1-2*+ce)}));switch(pe){case t$3.HEX:default:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return ye&&(Se.A=we.A),me?ye?tt$1.HEX({...Se,A:D$2(255*Se.A)}):tt$1.HEX(Se):ye?lt.HEXA(Se):lt.HEX(Se)});case t$3.RGB:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return ye&&(Se.A=we.A),me?tt$1.RGB(Se,ue):ye?lt.RGBA(Se,ue.decimals):lt.RGB(Se,ue.decimals)});case t$3.HSL:return _e.map(we=>me?tt$1.HSL(we,ue):ye?lt.HSLA({...x$4(we.H,we.S,we.L),A:we.A},ue.decimals):lt.HSL(x$4(we.H,we.S,we.L),ue.decimals));case t$3.CIELab:return _e.map(we=>{const Se=x$4(we.H,we.S,we.L);return me?tt$1.CIELab(ye?lt.CIELabA(Se,ue.decimals):lt.CIELab(Se,ue.decimals),ue):ye?lt.CIELabA({...Se,A:we.A},ue.decimals):lt.CIELab(Se,ue.decimals)})}},mt={buildHarmony(ne,oe,ce,ue){const pe=At(ne),me=dt(ne,pe),ge=v$4(me.R,me.G,me.B,me.A),ye=typeof ne=="string"&&p$3(me,"A")||typeof ne!="string"&&p$3(ne,"A"),xe=typeof ne=="string";switch(pe){case t$3.HEX:default:return ye?this.HEXA(Lt(ge,0),oe,ce,xe):this.HEX(Lt(ge,0),oe,ce,xe);case t$3.HSL:return ye?this.HSLA(ge,oe,ce,xe,ue):this.HSL(ge,oe,ce,xe,ue);case t$3.RGB:return ye?this.RGBA(ge,oe,ce,xe,ue):this.RGB(ge,oe,ce,xe,ue);case t$3.CIELab:return ye?this.CIELabA(ge,oe,ce,xe,ue):this.CIELab(ge,oe,ce,xe,ue)}},[t$3.HEX]:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$1.HEX(x$4(pe.H,pe.S,pe.L)):lt.HEX(x$4(pe.H,pe.S,pe.L))),HEXA:(ne,oe,ce,ue)=>oe(ne,ce).map(pe=>ue?tt$1.HEX({...x$4(pe.H,pe.S,pe.L),A:255*et$1(pe.A)}):lt.HEXA({...x$4(pe.H,pe.S,pe.L),A:et$1(pe.A)})),[t$3.RGB]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.RGB(x$4(me.H,me.S,me.L),pe):lt.RGB(x$4(me.H,me.S,me.L),pe.decimals)),RGBA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.RGB({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe):lt.RGBA({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe.decimals)),[t$3.HSL]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.HSL({H:me.H,S:me.S,L:me.L},pe):lt.HSL(x$4(me.H,me.S,me.L),pe.decimals)),HSLA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>ue?tt$1.HSL({...me,A:et$1(me.A)},pe):lt.HSLA({...x$4(me.H,me.S,me.L),A:et$1(me.A)},pe.decimals)),[t$3.CIELab]:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$4(me.H,me.S,me.L);return ue?tt$1.CIELab(V$1(ge.R,ge.G,ge.B),pe):lt.CIELab(ge,pe.decimals)}),CIELabA:(ne,oe,ce,ue,pe)=>oe(ne,ce).map(me=>{const ge=x$4(me.H,me.S,me.L);return ue?tt$1.CIELab({...V$1(ge.R,ge.G,ge.B),A:et$1(me.A)},pe):lt.CIELabA({...ge,A:et$1(me.A)},pe.decimals)})},bt={mix(ne,oe){const ce=ne.map(ge=>{const ye=At(ge);return dt(ge,ye)}),ue=oe===s$2.SUBTRACTIVE?ce.map(ge=>{const ye=((xe,ve,_e)=>{const we=Math.min(xe,ve,_e),Se=Math.min(255-xe,255-ve,255-_e),$e=xe-we,Te=ve-we,Re=_e-we,Ae=Math.min($e,Te),ke=$e-Ae,Be=(Te+Ae)/2,Ie=(Re+Te-Ae)/2,Ne=Math.max(ke,Be,Ie)/Math.max($e,Te,Re),je=isNaN(Ne)||Ne===1/0||Ne<=0?1:Ne;return{R:ke/je+Se,Y:Be/je+Se,B:Ie/je+Se}})(ge.R,ge.G,ge.B);return p$3(ge,"A")&&(ye.A=ge.A),ye}):null;function pe(ge){const ye=oe===s$2.ADDITIVE?{R:0,G:0,B:0,A:0}:{R:0,Y:0,B:0,A:0};return ge.reduce((xe,ve)=>{const _e=p$3(ve,"A")?ve.A:1,we={R:Math.min(xe.R+ve.R*_e,255),B:Math.min(xe.B+ve.B*_e,255),A:1-(1-_e)*(1-xe.A)},Se="G"in xe?xe.G:xe.Y,$e="G"in ve?ve.G:ve.Y;return{...we,...oe===s$2.ADDITIVE?{G:Math.min(Se+$e*_e,255)}:{Y:Math.min(Se+$e*_e,255)}}},ye)}let me;if(oe===s$2.ADDITIVE)me=pe(ce);else{const ge=pe(ue);me=((ye,xe,ve)=>{const _e=Math.min(ye,xe,ve),we=Math.min(255-ye,255-xe,255-ve),Se=ye-_e,$e=xe-_e,Te=ve-_e,Re=Math.min($e,Te),Ae=Se+$e-Re,ke=$e+Re,Be=2*(Te-Re),Ie=Math.max(Ae,ke,Be)/Math.max(Se,$e,Te),Ne=isNaN(Ie)||Ie===1/0||Ie<=0?1:Ie;return{R:Ae/Ne+we,G:ke/Ne+we,B:Be/Ne+we}})(ge.R,ge.Y,ge.B),me.A=ge.A}return{R:D$2(me.R),G:D$2(me.G),B:D$2(me.B),A:f$3(me.A,0,1)}},[t$3.HEX](ne,oe,ce){const ue=this.mix(ne,oe);return delete ue.A,ce?tt$1.HEX(ue):lt.HEX(ue)},HEXA(ne,oe,ce){const ue=this.mix(ne,oe);return ue.A=ce?255*et$1(ue.A):et$1(ue.A),ce?tt$1.HEX(ue):lt.HEXA(ue)},[t$3.RGB](ne,oe,ce,ue){const pe=this.mix(ne,oe);return delete pe.A,ce?tt$1.RGB(pe,ue):lt.RGB(pe,ue.decimals)},RGBA(ne,oe,ce,ue){const pe=this.mix(ne,oe);return ce?tt$1.RGB(pe,ue):lt.RGBA(pe,ue.decimals)},[t$3.HSL](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B);return delete pe.A,delete me.A,ce?tt$1.HSL(me,ue):lt.HSL(pe,ue.decimals)},HSLA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=v$4(pe.R,pe.G,pe.B,pe.A);return ce?tt$1.HSL(me,ue):lt.HSLA(pe,ue.decimals)},[t$3.CIELab](ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$1(pe.R,pe.G,pe.B);return delete pe.A,ce?tt$1.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)},CIELabA(ne,oe,ce,ue){const pe=this.mix(ne,oe),me=V$1(pe.R,pe.G,pe.B);return p$3(pe,"A")&&(me.A=pe.A),ce?tt$1.CIELab(me,ue):lt.CIELabA(pe,ue.decimals)}},Ct=(ne,oe)=>({R:D$2(ne.R,oe),G:D$2(ne.G,oe),B:D$2(ne.B,oe),...p$3(ne,"A")?{A:D$2(ne.A,oe)}:{}}),Lt=(ne,oe)=>({H:D$2(ne.H,oe),S:D$2(ne.S,oe),L:D$2(ne.L,oe),...p$3(ne,"A")?{A:D$2(ne.A,oe)}:{}}),gt=(ne,oe)=>({L:D$2(ne.L,oe),a:D$2(ne.a,oe),b:D$2(ne.b,oe)}),Bt=(ne,oe)=>({C:D$2(ne.C,oe),M:D$2(ne.M,oe),Y:D$2(ne.Y,oe),K:D$2(ne.K,oe)}),pt=(ne,oe,ce,ue)=>ue(dt(ne,oe),ce),Ht=(ne,oe,ce,ue,pe)=>(ce<1&&(ce=5),((ge,ye,xe)=>{const ve=xe-1,_e=(ye.R-ge.R)/ve,we=(ye.G-ge.G)/ve,Se=(ye.B-ge.B)/ve,$e=et$1(ge.A),Te=(et$1(ye.A)-$e)/ve;return Array(xe).fill(null).map((Re,Ae)=>Ae===0?ge:Ae===ve?ye:{R:D$2(ge.R+_e*Ae),G:D$2(ge.G+we*Ae),B:D$2(ge.B+Se*Ae),A:D$2($e+Te*Ae)})})(dt(ne),dt(oe),ce).map(ge=>pe(ge,ue))),Ft$1=(ne,oe,ce,ue)=>({[e$2.ANALOGOUS]:mt.buildHarmony(oe,it,ce,ue),[e$2.COMPLEMENTARY]:mt.buildHarmony(oe,at,ce,ue),[e$2.SPLIT_COMPLEMENTARY]:mt.buildHarmony(oe,rt,ce,ue),[e$2.TRIADIC]:mt.buildHarmony(oe,nt,ce,ue),[e$2.TETRADIC]:mt.buildHarmony(oe,ct,ce,ue),[e$2.SQUARE]:mt.buildHarmony(oe,ot,ce,ue)})[ne];class Rt{constructor(oe,ce={}){this._options=k$4(ce,oe),this.rgb=dt(oe),this.updateHSL(),this.updateLab(),this.updateCMYK()}updateRGB(){this.rgb={...x$4(this.hsl.H,this.hsl.S,this.hsl.L),A:this.hsl.A}}updateRGBFromCMYK(){this.rgb={...q$2(this.cmyk.C,this.cmyk.M,this.cmyk.Y,this.cmyk.K),A:this.rgb.A}}updateRGBFromLab(){this.rgb={...P(this.lab.L,this.lab.a,this.lab.b),A:this.rgb.A}}updateHSL(){this.hsl=v$4(this.rgb.R,this.rgb.G,this.rgb.B,this.rgb.A)}updateLab(){this.lab={...V$1(this.rgb.R,this.rgb.G,this.rgb.B),A:this.rgb.A}}updateCMYK(){this.cmyk=_$3(this.rgb.R,this.rgb.G,this.rgb.B)}setOptions(oe={}){return this._options={...this._options,...oe},this}setH(oe){return this.hsl.H=O$1(oe),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setS(oe){return this.hsl.S=f$3(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setL(oe){return this.hsl.L=f$3(oe,0,100),this.updateRGB(),this.updateLab(),this.updateCMYK(),this}setR(oe){this.rgb.R=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK()}setG(oe){return this.rgb.G=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setB(oe){return this.rgb.B=f$3(oe,0,255),this.updateHSL(),this.updateLab(),this.updateCMYK(),this}setCIEL(oe){return this.lab.L=f$3(oe,0,100),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEa(oe){return this.lab.a=f$3(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setCIEb(oe){return this.lab.b=f$3(oe,-125,125),this.updateRGBFromLab(),this.updateHSL(),this.updateCMYK(),this}setA(oe){return this.hsl.A=this.rgb.A=f$3(oe,0,1),this}setC(oe){return this.cmyk.C=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setM(oe){return this.cmyk.M=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setY(oe){return this.cmyk.Y=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}setK(oe){return this.cmyk.K=f$3(oe,0,100),this.updateRGBFromCMYK(),this.updateHSL(),this.updateLab(),this}get options(){return this._options}get H(){return D$2(this.hsl.H,this.options.decimals)}get S(){return D$2(this.hsl.S,this.options.decimals)}get L(){return D$2(this.hsl.L,this.options.decimals)}get CIEL(){return D$2(this.lab.L,this.options.decimals)}get CIEa(){return D$2(this.lab.a,this.options.decimals)}get CIEb(){return D$2(this.lab.b,this.options.decimals)}get R(){return D$2(this.rgb.R,this.options.decimals)}get G(){return D$2(this.rgb.G,this.options.decimals)}get B(){return D$2(this.rgb.B,this.options.decimals)}get A(){return D$2(this.hsl.A,this.options.decimals)}get C(){return D$2(this.cmyk.C,this.options.decimals)}get M(){return D$2(this.cmyk.M,this.options.decimals)}get Y(){return D$2(this.cmyk.Y,this.options.decimals)}get K(){return D$2(this.cmyk.K,this.options.decimals)}get HEXObject(){return lt.HEX(this.rgb)}get HEXAObject(){return lt.HEXA(this.rgb)}get RGBObject(){return{R:this.R,G:this.G,B:this.B}}get RGBAObject(){return{...this.RGBObject,A:this.A}}get HSLObject(){return{H:this.H,S:this.S,L:this.L}}get HSLAObject(){return{...this.HSLObject,A:this.A}}get CIELabObject(){return{L:this.CIEL,a:this.CIEa,b:this.CIEb}}get CIELabAObject(){return{...this.CIELabObject,A:this.A}}get CMYKObject(){return{C:this.C,M:this.M,Y:this.Y,K:this.K}}get CMYKAObject(){return{...this.CMYKObject,A:this.A}}get HEX(){return tt$1.HEX({R:this.R,G:this.G,B:this.B})}get HEXA(){return tt$1.HEX({R:this.R,G:this.G,B:this.B,A:255*this.A})}get RGB(){return tt$1.RGB({R:this.R,G:this.G,B:this.B},this.options)}get RGBA(){return tt$1.RGB({R:this.R,G:this.G,B:this.B,A:this.A},this.options)}get HSL(){return tt$1.HSL({H:this.H,S:this.S,L:this.L},this.options)}get HSLA(){return tt$1.HSL({H:this.H,S:this.S,L:this.L,A:this.A},this.options)}get CIELab(){return tt$1.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb},this.options)}get CIELabA(){return tt$1.CIELab({L:this.CIEL,a:this.CIEa,b:this.CIEb,A:this.A},this.options)}get CMYK(){return tt$1.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K},this.options)}get CMYKA(){return tt$1.CMYK({C:this.C,M:this.M,Y:this.Y,K:this.K,A:this.A},this.options)}static toHEXObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEX)}static toHEX(oe){return tt$1.HEX(Rt.toHEXObject(oe))}static toHEXAObject(oe){const ce=At(oe);return pt(oe,ce,0,lt.HEXA)}static toHEXA(oe){return tt$1.HEX(Rt.toHEXAObject(oe))}static toRGBObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGB)}static toRGB(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGB);return tt$1.RGB(me,pe)}static toRGBAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.RGBA)}static toRGBA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.RGBA);return tt$1.RGB(me,pe)}static toHSLObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSL)}static toHSL(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSL);return tt$1.HSL(me,pe)}static toHSLAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.HSLA)}static toHSLA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.HSLA);return tt$1.HSL(me,pe)}static toCIELabObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELab)}static toCIELab(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELab);return tt$1.CIELab(me,pe)}static toCIELabAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CIELabA)}static toCIELabA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CIELabA);return tt$1.CIELab(me,pe)}static toCMYKObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYK)}static toCMYK(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYK);return tt$1.CMYK(me,pe)}static toCMYKAObject(oe,ce={}){const ue=At(oe);return pt(oe,ue,ce.decimals,lt.CMYKA)}static toCMYKA(oe,ce={}){const ue=At(oe),pe=k$4(ce,oe),me=pt(oe,ue,ce.decimals,lt.CMYKA);return tt$1.CMYK(me,pe)}static getBlendHEXObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEX)}static getBlendHEX(oe,ce,ue=5){return Rt.getBlendHEXObject(oe,ce,ue).map(pe=>tt$1.HEX(pe))}static getBlendHEXAObject(oe,ce,ue=5){return Ht(oe,ce,ue,0,lt.HEXA)}static getBlendHEXA(oe,ce,ue=5){return Rt.getBlendHEXAObject(oe,ce,ue).map(pe=>tt$1.HEX(pe))}static getBlendRGBObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB)}static getBlendRGB(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGB).map(me=>tt$1.RGB(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGB).map(me=>tt$1.RGB(me,k$4(ue||{},oe,ce)))}static getBlendRGBAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA)}static getBlendRGBA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.RGBA).map(me=>tt$1.RGB(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.RGBA).map(me=>tt$1.RGB(me,k$4(ue||{},oe,ce)))}static getBlendHSLObject(oe,ce,ue,pe){return Ht(oe,ce,typeof ue=="number"?ue:5,pe==null?void 0:pe.decimals,lt.HSL)}static getBlendHSL(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSL).map(me=>tt$1.HSL(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSL).map(me=>tt$1.HSL(me,k$4(ue||{},oe,ce)))}static getBlendHSLAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA)}static getBlendHSLA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.HSLA).map(me=>tt$1.HSL(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.HSLA).map(me=>tt$1.HSL(me,k$4(ue||{},oe,ce)))}static getBlendCIELabObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab)}static getBlendCIELab(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELab).map(me=>tt$1.CIELab(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELab).map(me=>tt$1.CIELab(me,k$4(ue||{},oe,ce)))}static getBlendCIELabAObject(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA)}static getBlendCIELabA(oe,ce,ue,pe){return typeof ue=="number"?Ht(oe,ce,ue,pe==null?void 0:pe.decimals,lt.CIELabA).map(me=>tt$1.CIELab(me,k$4(pe||{},oe,ce))):Ht(oe,ce,5,ue==null?void 0:ue.decimals,lt.CIELabA).map(me=>tt$1.CIELab(me,k$4(ue||{},oe,ce)))}static getMixHEXObject(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!1)}static getMixHEX(oe,ce=s$2.ADDITIVE){return bt.HEX(oe,ce,!0)}static getMixHEXAObject(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!1)}static getMixHEXA(oe,ce=s$2.ADDITIVE){return bt.HEXA(oe,ce,!0)}static getMixRGBObject(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!1,k$4(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixRGB(oe,ce,ue){return typeof ce=="string"?bt.RGB(oe,ce,!0,k$4(ue||{},...oe)):bt.RGB(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixRGBAObject(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!1,k$4(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixRGBA(oe,ce,ue){return typeof ce=="string"?bt.RGBA(oe,ce,!0,k$4(ue||{},...oe)):bt.RGBA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixHSLObject(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!1,k$4(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixHSL(oe,ce,ue){return typeof ce=="string"?bt.HSL(oe,ce,!0,k$4(ue||{},...oe)):bt.HSL(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixHSLAObject(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!1,k$4(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixHSLA(oe,ce,ue){return typeof ce=="string"?bt.HSLA(oe,ce,!0,k$4(ue||{},...oe)):bt.HSLA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixCIELabObject(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!1,k$4(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixCIELab(oe,ce,ue){return typeof ce=="string"?bt.CIELab(oe,ce,!0,k$4(ue||{},...oe)):bt.CIELab(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getMixCIELabAObject(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!1,k$4(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!1,k$4(ce||{},...oe))}static getMixCIELabA(oe,ce,ue){return typeof ce=="string"?bt.CIELabA(oe,ce,!0,k$4(ue||{},...oe)):bt.CIELabA(oe,s$2.ADDITIVE,!0,k$4(ce||{},...oe))}static getShades(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!0,k$4(ue||{},oe)):Et(oe,5,!0,k$4(ce||{},oe))}static getTints(oe,ce,ue){return typeof ce=="number"?Et(oe,ce,!1,k$4(ue||{},oe)):Et(oe,5,!1,k$4(ce||{},oe))}static getHarmony(oe,ce,ue,pe){return`${ce}`in e$2?Ft$1(ce,oe,K$1(ue)?ue:s$2.ADDITIVE,k$4(K$1(ue)?pe||{}:ue||{},oe)):K$1(ce)?Ft$1(e$2.COMPLEMENTARY,oe,ce,k$4(ue||{},oe)):Ft$1(e$2.COMPLEMENTARY,oe,s$2.ADDITIVE,k$4(ce||{},oe))}}function hash(ne){let oe=5381,ce=ne.length;for(;ce;)oe=oe*33^ne.charCodeAt(--ce);return oe>>>0}const tint="500";function hex(ne){return parseInt(ne.replace("#","0x"))}const searchEventAliases=lodashExports.thru({source:["source","start"],destination:["destination","goal","finish"],updating:["update","updating"],expanding:["expanding","expanding"],generating:["generate","generating","open","opening"],closing:["close","closing"],end:["finish","end","solution"]},ne=>{const oe={};for(const[ce,ue]of lodashExports.entries(ne))for(const pe of ue)oe[pe]=ce;return oe}),colorsHex={source:green$2.A400,destination:red$2.A400,updating:orange$2[tint],expanding:deepPurple[tint],generating:amber[tint],closing:pink[tint],end:blue$2.A400};lodashExports.mapValues(colorsHex,hex);const shades=lodashExports.sortBy(lodashExports.keys(accentColors),ne=>new Rt(getShade(ne,"dark")).H);function getColorHex(ne="",oe){const ce=searchEventAliases[lodashExports.lowerCase(ne)];if(ce)return colorsHex[ce];{const ue=hash(lodashExports.lowerCase(ne)),pe=lodashExports.values(accentColors);return pe[ue%pe.length][tint]}}function inferLayerName(ne){var oe;return ne!=null&&ne.name?ne==null?void 0:ne.name:(oe=ne==null?void 0:ne.source)!=null&&oe.type?getController(ne).inferName(ne):"Untitled Layer"}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(oe){return setTimeoutFn(oe,TIMEOUT_DURATION)}):(cancelFrame=function([oe,ce]){cancelAnimationFrameFn(oe),clearTimeoutFn(ce)},requestFrame=function(oe){const ce=requestAnimationFrameFn(function(){clearTimeoutFn(ue),oe()}),ue=setTimeoutFn(function(){cancelAnimationFrameFn(ce),oe()},TIMEOUT_DURATION);return[ce,ue]});function createDetectElementResize(ne){let oe,ce,ue,pe,me,ge,ye;const xe=typeof document<"u"&&document.attachEvent;if(!xe){ge=function(ke){const Be=ke.__resizeTriggers__,Ie=Be.firstElementChild,Ne=Be.lastElementChild,je=Ie.firstElementChild;Ne.scrollLeft=Ne.scrollWidth,Ne.scrollTop=Ne.scrollHeight,je.style.width=Ie.offsetWidth+1+"px",je.style.height=Ie.offsetHeight+1+"px",Ie.scrollLeft=Ie.scrollWidth,Ie.scrollTop=Ie.scrollHeight},me=function(ke){return ke.offsetWidth!==ke.__resizeLast__.width||ke.offsetHeight!==ke.__resizeLast__.height},ye=function(ke){if(ke.target.className&&typeof ke.target.className.indexOf=="function"&&ke.target.className.indexOf("contract-trigger")<0&&ke.target.className.indexOf("expand-trigger")<0)return;const Be=this;ge(this),this.__resizeRAF__&&cancelFrame(this.__resizeRAF__),this.__resizeRAF__=requestFrame(function(){me(Be)&&(Be.__resizeLast__.width=Be.offsetWidth,Be.__resizeLast__.height=Be.offsetHeight,Be.__resizeListeners__.forEach(function(je){je.call(Be,ke)}))})};let Se=!1,$e="";ue="animationstart";const Te="Webkit Moz O ms".split(" ");let Re="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),Ae="";{const ke=document.createElement("fakeelement");if(ke.style.animationName!==void 0&&(Se=!0),Se===!1){for(let Be=0;Be 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%; }',Te=Se.head||Se.getElementsByTagName("head")[0],Re=Se.createElement("style");Re.id="detectElementResize",Re.type="text/css",ne!=null&&Re.setAttribute("nonce",ne),Re.styleSheet?Re.styleSheet.cssText=$e:Re.appendChild(Se.createTextNode($e)),Te.appendChild(Re)}};return{addResizeListener:function(Se,$e){if(xe)Se.attachEvent("onresize",$e);else{if(!Se.__resizeTriggers__){const Te=Se.ownerDocument,Re=windowObject.getComputedStyle(Se);Re&&Re.position==="static"&&(Se.style.position="relative"),ve(Te),Se.__resizeLast__={},Se.__resizeListeners__=[],(Se.__resizeTriggers__=Te.createElement("div")).className="resize-triggers";const Ae=Te.createElement("div");Ae.className="expand-trigger",Ae.appendChild(Te.createElement("div"));const ke=Te.createElement("div");ke.className="contract-trigger",Se.__resizeTriggers__.appendChild(Ae),Se.__resizeTriggers__.appendChild(ke),Se.appendChild(Se.__resizeTriggers__),ge(Se),Se.addEventListener("scroll",ye,!0),ue&&(Se.__resizeTriggers__.__animationListener__=function(Ie){Ie.animationName===ce&&ge(Se)},Se.__resizeTriggers__.addEventListener(ue,Se.__resizeTriggers__.__animationListener__))}Se.__resizeListeners__.push($e)}},removeResizeListener:function(Se,$e){if(xe)Se.detachEvent("onresize",$e);else if(Se.__resizeListeners__.splice(Se.__resizeListeners__.indexOf($e),1),!Se.__resizeListeners__.length){Se.removeEventListener("scroll",ye,!0),Se.__resizeTriggers__.__animationListener__&&(Se.__resizeTriggers__.removeEventListener(ue,Se.__resizeTriggers__.__animationListener__),Se.__resizeTriggers__.__animationListener__=null);try{Se.__resizeTriggers__=!Se.removeChild(Se.__resizeTriggers__)}catch{}}}}}class AutoSizer extends reactExports.Component{constructor(...oe){super(...oe),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._timeoutId=null,this._onResize=()=>{this._timeoutId=null;const{disableHeight:ce,disableWidth:ue,onResize:pe}=this.props;if(this._parentNode){const me=window.getComputedStyle(this._parentNode)||{},ge=parseFloat(me.paddingLeft||"0"),ye=parseFloat(me.paddingRight||"0"),xe=parseFloat(me.paddingTop||"0"),ve=parseFloat(me.paddingBottom||"0"),_e=this._parentNode.getBoundingClientRect(),we=_e.height-xe-ve,Se=_e.width-ge-ye,$e=this._parentNode.offsetHeight-xe-ve,Te=this._parentNode.offsetWidth-ge-ye;(!ce&&(this.state.height!==$e||this.state.scaledHeight!==we)||!ue&&(this.state.width!==Te||this.state.scaledWidth!==Se))&&(this.setState({height:$e,width:Te,scaledHeight:we,scaledWidth:Se}),typeof pe=="function"&&pe({height:$e,scaledHeight:we,scaledWidth:Se,width:Te}))}},this._setRef=ce=>{this._autoSizer=ce}}componentDidMount(){const{nonce:oe}=this.props,ce=this._autoSizer?this._autoSizer.parentNode:null;if(ce!=null&&ce.ownerDocument&&ce.ownerDocument.defaultView&&ce instanceof ce.ownerDocument.defaultView.HTMLElement){this._parentNode=ce;const ue=ce.ownerDocument.defaultView.ResizeObserver;ue!=null?(this._resizeObserver=new ue(()=>{this._timeoutId=setTimeout(this._onResize,0)}),this._resizeObserver.observe(ce)):(this._detectElementResize=createDetectElementResize(oe),this._detectElementResize.addResizeListener(ce,this._onResize)),this._onResize()}}componentWillUnmount(){this._parentNode&&(this._detectElementResize&&this._detectElementResize.removeResizeListener(this._parentNode,this._onResize),this._timeoutId!==null&&clearTimeout(this._timeoutId),this._resizeObserver&&this._resizeObserver.disconnect())}render(){const{children:oe,defaultHeight:ce,defaultWidth:ue,disableHeight:pe=!1,disableWidth:me=!1,doNotBailOutOnEmptyChildren:ge=!1,nonce:ye,onResize:xe,style:ve={},tagName:_e="div",...we}=this.props,{height:Se,scaledHeight:$e,scaledWidth:Te,width:Re}=this.state,Ae={overflow:"visible"},ke={};let Be=!1;return pe||(Se===0&&(Be=!0),Ae.height=0,ke.height=Se,ke.scaledHeight=$e),me||(Re===0&&(Be=!0),Ae.width=0,ke.width=Re,ke.scaledWidth=Te),ge&&(Be=!1),reactExports.createElement(_e,{ref:this._setRef,style:{...Ae,...ve},...we},!Be&&oe(ke))}}const treeWorkerUrl=""+new URL("tree.worker-CpBXS68a.js",import.meta.url).href;class TreeWorkerUrl extends Worker{constructor(){super(treeWorkerUrl,{type:"module"})}}const treeAsync=usingMemoizedWorkerTask(TreeWorkerUrl);function useTree(ne){const oe=compilerRuntimeExports.c(3);let ce,ue;return oe[0]!==ne?(ce=async()=>await treeAsync(ne),ue=[ne],oe[0]=ne,oe[1]=ce,oe[2]=ue):(ce=oe[1],ue=oe[2]),useAsync(ce,ue)}function useTreeMemo(ne,oe){const ce=reactExports.useMemo(()=>ne,oe);return useTree(ce)}const isDefined$1=ne=>!lodashExports.isUndefined(ne)&&!lodashExports.isNull(ne),divider$4=jsxRuntimeExports.jsx(Divider,{orientation:"vertical",flexItem:!0,sx:{m:1}});function useCache(ne,oe){const ce=compilerRuntimeExports.c(4),ue=!1,[pe,me]=reactExports.useState();let ge,ye;return ce[0]!==ue||ce[1]!==ne?(ge=()=>{ne&&me(ne)},ye=[ne,ue],ce[0]=ue,ce[1]=ne,ce[2]=ge,ce[3]=ye):(ge=ce[2],ye=ce[3]),reactExports.useEffect(ge,ye),pe}const layoutModes={"directed-graph":{value:"directed-graph",name:"Directed Graph",description:"Show all edges",showAllEdges:!0},tree:{value:"tree",name:"Tree",description:"Show only edges between each node and their final parents",showAllEdges:!1}};function GraphEvents(ne){const oe=compilerRuntimeExports.c(7),{onSelection:ce,layer:ue}=ne,pe=v$5(),me=_$4();let ge;oe[0]!==ce||oe[1]!==me?(ge=()=>{me({clickNode:xe=>{ce==null||ce({event:xe.event.original,node:xe.node})},enterNode:_temp$p,leaveNode:_temp2$h})},oe[0]=ce,oe[1]=me,oe[2]=ge):ge=oe[2];let ye;return oe[3]!==ue||oe[4]!==me||oe[5]!==pe?(ye=[ue,me,pe],oe[3]=ue,oe[4]=me,oe[5]=pe,oe[6]=ye):ye=oe[6],reactExports.useEffect(ge,ye),null}function _temp2$h(){document.body.style.cursor=""}function _temp$p(){document.body.style.cursor="pointer"}const SEVEN_CLASS_GNBU=["#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"];function TreeGraph({trace:ne,tree:oe,step:ce=0,layer:ue,showAllEdges:pe,trackedProperty:me}){const ge=v$5(),[ye,xe]=reactExports.useState("vertical"),ve=usePaper(),_e=useAcrylic(),we=useTheme(),Se=interpolate$1([we.palette.background.paper,we.palette.text.primary]),$e=j$3(),Te=reactExports.useMemo(()=>getFinalParents(ne),[ne]),Re=reactExports.useMemo(()=>{const Ae=ye==="vertical",ke=new MultiDirectedGraph;lodashExports.forEach(oe,Ie=>{ke.addNode(Ie.label,{x:Ae?Ie.x:-Ie.y,y:Ae?Ie.y:-Ie.x,label:Ie.label,size:Math.log(Ie.size)+2,color:we.palette.action.disabledBackground})});const Be={};return lodashExports.forEach(ne==null?void 0:ne.events,({id:Ie,pId:Ne})=>{Ie&&Ne&&(Be[Ie]=Be[Ie]??new Set,Be[Ie].add(Ne))}),lodashExports.forEach(ne==null?void 0:ne.events,({id:Ie,pId:Ne})=>{if(isDefined$1(Ne)&&ke.hasNode(`${Ne}`)){const je=makeEdgeKey(Ie,Ne);!ke.hasEdge(je)&&ke.hasNode(`${Ie}`)&&ke.addDirectedEdgeWithKey(je,`${Ne}`,`${Ie}`,{label:"",color:"white",size:2,final:Te[Ie]===Ne}),ke.hasDirectedEdge(je)&&ke.updateEdgeAttribute(je,"size",ze=>Math.log(Math.E**(ze-.5)+.5)+.5)}}),ke},[$e,ne,oe,Te,ye]);return reactExports.useEffect(()=>{const Ae=memoizee$1(je=>interpolate$1([we.palette.background.paper,je])),ke=400,Be=Se(.1);Re.forEachNode(je=>{Re.setNodeAttribute(je,"color",Be),Re.setNodeAttribute(je,"forceLabel",!1),Re.setNodeAttribute(je,"label",lodashExports.truncate(je,{length:15}))}),Re.forEachEdge(je=>{const ze=Re.getEdgeAttribute(je,"final");Re.setEdgeAttribute(je,"color",Be),Re.setEdgeAttribute(je,"hidden",!pe&&!ze),Re.setEdgeAttribute(je,"forceLabel",!1),Re.setEdgeAttribute(je,"label","")});const Ie={},Ne={};if((pe?lodashExports.forEach:lodashExports.forEachRight)(lodashExports.slice(ne==null?void 0:ne.events,0,ce+1),({id:je,type:ze,pId:Ue},qe)=>{const Ke=getColorHex(ze),Ge=Ae(Ke)(lodashExports.max([1-(ce-qe)/ke,.2]));if(Re.hasNode(`${je}`)&&!Ie[je]){Re.setNodeAttribute(`${je}`,"color",Ge),Re.setNodeAttribute(`${je}`,"label",lodashExports.truncate(`${lodashExports.startCase(ze)} ${je}`,{length:15})),Re.setNodeAttribute(`${je}`,"forceLabel",ce===qe);const Ye=makeEdgeKey(je,Ue);isDefined$1(Ue)&&Re.hasNode(`${Ue}`)&&Re.hasEdge(Ye)&&!Ne[Ye]&&(Re.setEdgeAttribute(Ye,"forceLabel",ce===qe),Re.setEdgeAttribute(Ye,"color",Ge),Re.setEdgeAttribute(Ye,"label",`Step ${qe}`),Re.setEdgeAttribute(Ye,"hidden",!1),pe||(Ne[Ye]=!0)),pe||(Ie[je]=!0)}}),me){const je=lodashExports.min(lodashExports.map(ne==null?void 0:ne.events,Ke=>lodashExports.get(Ke,me))),ze=lodashExports.max(lodashExports.map(ne==null?void 0:ne.events,Ke=>lodashExports.get(Ke,me))),Ue=Ke=>isNaN(je)||isNaN(ze)||isNaN(Ke)?0:(Ke-je)/(ze-je),qe=interpolate$1(SEVEN_CLASS_GNBU);lodashExports.forEach(lodashExports.slice(ne==null?void 0:ne.events,0,ce+1),Ke=>{if(Re.hasNode(`${Ke.id}`)){const Ge=qe(Ue(lodashExports.get(Ke,me)));if(Re.setNodeAttribute(`${Ke.id}`,"color",Ge),isDefined$1(Ke.pId)){const Ye=makeEdgeKey(`${Ke.id}`,`${Ke.pId}`);Re.hasDirectedEdge(Ye)&&Re.setEdgeAttribute(Ye,"color",Ge)}}})}$e(Re)},[Re,ce,ne,pe,me,we]),jsxRuntimeExports.jsx(Stack,{sx:{pt:6,position:"absolute",top:0,left:0},children:jsxRuntimeExports.jsxs(Stack,{direction:"row",sx:{...ve(1),..._e,alignItems:"center",height:Ae=>Ae.spacing(6),px:1,m:1},children:[jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{var Ae,ke,Be;(Be=(ke=(Ae=ge==null?void 0:ge.getCamera)==null?void 0:Ae.call(ge))==null?void 0:ke.animatedReset)==null||Be.call(ke)},label:"Fit",icon:jsxRuntimeExports.jsx(SvgIcon$g,{})}),divider$4,jsxRuntimeExports.jsx(IconButtonWithTooltip,{color:"primary",onClick:()=>{xe(ye==="vertical"?"horizontal":"vertical")},label:"Rotate",icon:jsxRuntimeExports.jsx(SvgIcon$c,{})}),divider$4,jsxRuntimeExports.jsx(MinimisedPlaybackControls,{layer:ue})]})})}function makeEdgeKey(ne,oe){return`${ne}::${oe}`}const stepsLayerGuard$2=ne=>!!getController(ne).steps;function TreePage({template:ne}){var Je,Qe,Ze,Tt,Ut,Gt,Nt,Wt,Mt,Yt;const{key:oe,setKey:ce,layer:ue,layers:pe,allLayers:me}=useLayer(void 0,stepsLayerGuard$2),ge=useTheme(),{controls:ye,onChange:xe,state:ve,dragHandle:_e}=useViewTreeContext(),we=useThrottle(((Je=ue==null?void 0:ue.source)==null?void 0:Je.step)??0,1e3/24),{stepTo:Se}=usePlaybackState(oe),$e=reactExports.useMemo(()=>{var ir,tr,Qt;return lodashExports.chain((Qt=(tr=(ir=ue==null?void 0:ue.source)==null?void 0:ir.trace)==null?void 0:tr.content)==null?void 0:Qt.events).flatMap(lodashExports.keys).uniq().filter(er=>er!=="type").value()},[(Tt=(Ze=(Qe=ue==null?void 0:ue.source)==null?void 0:Qe.trace)==null?void 0:Ze.content)==null?void 0:Tt.events]),[Te,Re]=reactExports.useState(""),Ae=(Gt=(Ut=ue==null?void 0:ue.source)==null?void 0:Ut.trace)==null?void 0:Gt.content;reactExports.useEffect(()=>{Re("")},[Ae,Re]);const[ke,Be]=reactExports.useState(),{x:Ie,y:Ne}=ke?ke.event instanceof MouseEvent?{x:ke.event.clientX,y:ke.event.clientY}:{x:(Wt=(Nt=ke.event.touches)==null?void 0:Nt[0])==null?void 0:Wt.clientX,y:(Yt=(Mt=ke.event.touches)==null?void 0:Mt[0])==null?void 0:Yt.clientY}:{x:0,y:0},[je,ze]=reactExports.useState(!1),[Ue,qe]=reactExports.useState("tree"),Ke=reactExports.useMemo(()=>{const ir=lodashExports.filter(lodashExports.map(Ae==null?void 0:Ae.events,(tr,Qt)=>({event:tr,step:Qt})),tr=>`${tr.event.id}`===(ke==null?void 0:ke.node));return{events:ir,current:lodashExports.findLast(ir,tr=>tr.step<=we)}},[ke,we]),{result:Ge,loading:Ye}=useTreeMemo({trace:Ae,mode:Ue},[oe,Ue]),Xe=reactExports.useMemo(()=>({stagePadding:8*8,allowInvalidContainer:!0,edgeLabelColor:{color:ge.palette.text.secondary},labelFont:"Inter",labelSize:14,labelDensity:.1,renderEdgeLabels:!0,edgeLabelFont:"Inter",edgeLabelSize:12,defaultDrawNodeHover:()=>{},labelColor:{color:ge.palette.text.primary},edgeLabelWeight:"500",defaultEdgeType:"arrow",edgeProgramClasses:{straight:EdgeArrowProgram$1,curvedArrow:EdgeCurvedArrowProgram}}),[ge]);return jsxRuntimeExports.jsxs(ne,{onChange:xe,stack:ve,children:[jsxRuntimeExports.jsx(ne.Key,{children:"tree"}),jsxRuntimeExports.jsx(ne.Title,{children:"Tree"}),jsxRuntimeExports.jsx(ne.Handle,{children:_e}),jsxRuntimeExports.jsx(ne.Content,{children:jsxRuntimeExports.jsx(Flex,{children:Ae?Ye?jsxRuntimeExports.jsxs(Flex,{sx:{flexDirection:"column",gap:4,alignItems:"center",justifyContent:"center"},children:[jsxRuntimeExports.jsx(CircularProgress,{}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",sx:{px:8,maxWidth:480},children:"Generating layout"})]}):Ge!=null&&Ge.length?jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(AutoSizer,{children:ir=>jsxRuntimeExports.jsxs(S$4,{style:{...ir,background:ge.palette.background.paper},graph:MultiDirectedGraph,settings:Xe,children:[jsxRuntimeExports.jsx(TreeGraph,{step:we,tree:Ge,trace:Ae,layer:ue,showAllEdges:layoutModes[Ue].showAllEdges,trackedProperty:Te}),jsxRuntimeExports.jsx(GraphEvents,{layer:oe,onSelection:tr=>{Be(tr),ze(!0)}})]})}),jsxRuntimeExports.jsx(Menu,{onClose:()=>ze(!1),anchorReference:"anchorPosition",anchorPosition:{left:Ie,top:Ne},transformOrigin:{horizontal:"left",vertical:"top"},open:je,children:jsxRuntimeExports.jsxs(MenuList,{dense:!0,sx:{p:0},children:[!!Ke.current&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsxs(Typography,{component:"div",color:"text.secondary",variant:"overline",children:["Step ",Ke.current.step]})}),jsxRuntimeExports.jsx(Box,{px:2,py:1,children:jsxRuntimeExports.jsx(PropertyList,{event:Ke.current.event,vertical:!0,simple:!0,primitives:!0})}),jsxRuntimeExports.jsx(Divider,{sx:{my:1,mx:2}})]}),jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsxs(Typography,{component:"div",color:"text.secondary",variant:"overline",children:["Events at ",ke==null?void 0:ke.node]})}),lodashExports.map(Ke.events,(ir,tr,Qt)=>{var hr;const er=((hr=lodashExports.findLast(Qt,cr=>cr.step<=we))==null?void 0:hr.step)===ir.step;return jsxRuntimeExports.jsxs(Stack,{direction:"row",children:[jsxRuntimeExports.jsx(MenuItem,{selected:er,sx:{height:32,flex:1,borderLeft:`4px solid ${getColorHex(ir.event.type)}`},onClick:()=>{Se(ir.step)},children:jsxRuntimeExports.jsx(Tooltip,{title:`Go to step ${ir.step}`,children:jsxRuntimeExports.jsx(Box,{sx:{ml:-.5,pr:4},children:jsxRuntimeExports.jsx(Label$1,{primary:lodashExports.startCase(ir.event.type),secondary:isDefined$1(ir.event.pId)?`Step ${ir.step}, from ${ir.event.pId}`:`Step ${ir.step}`})})})}),jsxRuntimeExports.jsx(Box,{sx:{flex:0},children:jsxRuntimeExports.jsx(PropertyDialog,{event:ir.event,trigger:cr=>jsxRuntimeExports.jsx(MenuItem,{selected:er,onClick:cr,sx:{pr:0},children:jsxRuntimeExports.jsx(Tooltip,{title:"See all properties",children:jsxRuntimeExports.jsx(ListItemIcon,{children:jsxRuntimeExports.jsx(SvgIcon$S,{})})})})})})]})})]})})]}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$10,{}),label:"Graph",secondary:`${inferLayerName(ue)} is not a graph.`}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$10,{}),label:"Graph",secondary:"When you load a trace that has tree-like data, you'll see it here as a decision tree."})})}),jsxRuntimeExports.jsxs(ne.Options,{children:[jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$G,{}),label:"Layer",value:oe,items:lodashExports.map(me,ir=>({id:ir.key,hidden:!lodashExports.find(pe,{key:ir.key}),name:inferLayerName(ir)})),onChange:ce,arrow:!0,ellipsis:12}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$C,{}),label:"Layout",value:Ue,onChange:qe,items:lodashExports.map(lodashExports.entries(layoutModes),([ir,tr])=>({id:ir,...tr})),arrow:!0}),divider$4,jsxRuntimeExports.jsx(FeaturePicker,{icon:jsxRuntimeExports.jsx(SvgIcon$r,{}),label:"Tracked Property",value:Te,onChange:Re,items:[{id:"",name:"Off"},...lodashExports.map($e,ir=>({id:ir,name:`$.${ir}`}))],arrow:!0})]}),jsxRuntimeExports.jsx(ne.Extras,{children:ye})]})}function getFinalParents(ne){const oe={};return lodashExports.forEach(ne==null?void 0:ne.events,({id:ce,pId:ue})=>{oe[ce]=ue}),oe}function SelectionMenu(ne){const oe=compilerRuntimeExports.c(17),{selection:ce,onClose:ue}=ne,pe=useSelectionMenu(),me=useCache(ce);let ge;oe[0]!==ce?(ge=ce??{},oe[0]=ce,oe[1]=ge):ge=oe[1];const{client:ye}=ge,xe=!!ce,ve=(ye==null?void 0:ye.y)??0,_e=(ye==null?void 0:ye.x)??0;let we;oe[2]!==ve||oe[3]!==_e?(we={top:ve,left:_e},oe[2]=ve,oe[3]=_e,oe[4]=we):we=oe[4];let Se;oe[5]===Symbol.for("react.memo_cache_sentinel")?(Se={py:0},oe[5]=Se):Se=oe[5];let $e;oe[6]!==ue?($e=Ae=>{const ke=lodashExports.entries(Ae);return ke.length?lodashExports.chain(ke).sortBy(_temp$o).map((Be,Ie)=>{const[,Ne]=Be,{items:je,primary:ze}=Ne;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!Ie&&jsxRuntimeExports.jsx(Divider,{sx:{my:1,mx:2}}),ze&&jsxRuntimeExports.jsx(ListItem,{sx:{py:0},children:jsxRuntimeExports.jsx(Typography,{component:"div",color:"text.secondary",variant:"overline",children:ze})}),lodashExports.chain(je).entries().sortBy(_temp2$g).map(Ue=>{const[qe,Ke]=Ue,{action:Ge,icon:Ye,primary:Xe,secondary:Je,extras:Qe}=Ke;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!(Ge||Xe||Je)&&(Ge?jsxRuntimeExports.jsxs(MenuItem,{onClick:()=>{Ge==null||Ge(),ue==null||ue()},children:[Ye&&jsxRuntimeExports.jsx(ListItemIcon,{children:Ye}),jsxRuntimeExports.jsx(ListItemText,{primary:Xe,sx:{mr:4}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",children:Je})]},qe):jsxRuntimeExports.jsxs(ListItem,{children:[Ye&&jsxRuntimeExports.jsx(ListItemIcon,{children:Ye}),jsxRuntimeExports.jsx(ListItemText,{primary:Xe,sx:{mr:4}}),jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"text.secondary",children:Je})]},qe)),!!Qe&&Qe]})}).value()]})}).value():jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ListItem,{children:jsxRuntimeExports.jsx(Typography,{component:"div",children:"No info to show."})})})},oe[6]=ue,oe[7]=$e):$e=oe[7];let Te;oe[8]!==pe||oe[9]!==me||oe[10]!==$e?(Te=jsxRuntimeExports.jsx(MenuList,{dense:!0,sx:Se,children:jsxRuntimeExports.jsx(pe,{event:me,children:$e})}),oe[8]=pe,oe[9]=me,oe[10]=$e,oe[11]=Te):Te=oe[11];let Re;return oe[12]!==ue||oe[13]!==xe||oe[14]!==we||oe[15]!==Te?(Re=jsxRuntimeExports.jsx(Menu,{open:xe,anchorReference:"anchorPosition",anchorPosition:we,onClose:ue,keepMounted:!0,children:Te}),oe[12]=ue,oe[13]=xe,oe[14]=we,oe[15]=Te,oe[16]=Re):Re=oe[16],Re}function _temp2$g(ne){const[,oe]=ne;return oe.index}function _temp$o(ne){const[,oe]=ne;return oe.index}const identity$1=({children:ne})=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne({})});function useSelectionMenu(){const ne=compilerRuntimeExports.c(2),[oe]=useLayers(),{layers:ce}=oe;let ue,pe;return ne[0]!==ce?(pe=lodashExports.chain(ce).reduce(_temp3$a,identity$1).value(),ne[0]=ce,ne[1]=pe):pe=ne[1],ue=pe,ue}function _temp3$a(ne,oe){var ue;const ce=((ue=getController(oe))==null?void 0:ue.provideSelectionInfo)??identity$1;return pe=>{const{children:me,event:ge}=pe;return jsxRuntimeExports.jsx(ce,{layer:oe.key,event:ge,children:ye=>jsxRuntimeExports.jsx(ne,{event:ge,children:xe=>me==null?void 0:me(lodashExports.merge(ye,xe))})})}}const TILE_RESOLUTION=128,tileSize=(ne=!1)=>(ne?.75:devicePixelRatio*2)*TILE_RESOLUTION,rendererOptions={tileSubdivision:2,workerCount:lodashExports.clamp(lodashExports.floor((navigator.hardwareConcurrency-1)/2),1,12),tileResolution:{width:tileSize(),height:tileSize()}},TraceRendererContext=reactExports.createContext({});function useRendererInstance(){return reactExports.useContext(TraceRendererContext)}function useRenderer(ne,{width:oe,height:ce}={}){const ue=useTheme(),[pe]=useRenderers(),me=reactExports.useRef(null),[ge,ye]=reactExports.useState(""),[xe,ve]=reactExports.useState();return reactExports.useEffect(()=>{if(me.current&&oe&&ce&&ne){const _e=lodashExports.find(pe,we=>we.renderer.meta.id===ne);if(_e)try{const we=new _e.renderer.constructor;we.setup({...rendererOptions,screenSize:{width:oe,height:ce},backgroundColor:ue.palette.background.paper,accentColor:ue.palette.primary.main}),me.current.append(we.getView()),ve(we),ye("");const Se=me.current;return()=>{try{Se.removeChild(we.getView()),ve(void 0)}catch($e){console.warn($e)}finally{we.destroy()}}}catch(we){ye(`${_e.renderer.meta.name}: ${lodashExports.get(we,"message")}`),ve(void 0)}}},[me.current,lodashExports.map,ne,pe,ue,ye,ve]),useDebounce(()=>{xe&&oe&&ce&&xe.setOptions({screenSize:{width:oe,height:ce}})},ue.transitions.duration.standard,[xe,oe,ce]),{instance:xe,ref:me,error:ge}}function TraceRendererCircularProgress(){const ne=compilerRuntimeExports.c(3),[oe]=useLoading(),{map:ce,specimen:ue}=oe;let pe;return ne[0]!==ce||ne[1]!==ue?(pe=!!(ce||ue)&&jsxRuntimeExports.jsx(CircularProgress,{sx:{position:"absolute",top:_temp$n,right:_temp2$f}}),ne[0]=ce,ne[1]=ue,ne[2]=pe):pe=ne[2],pe}function _temp2$f(ne){return ne.spacing(2)}function _temp$n(ne){return ne.spacing(8)}const VIEWPORT_PAGE_DESCRIPTION="When you create a layer, you'll see it visualised here.";function TraceRenderer({width:ne,height:oe,renderer:ce,rendererRef:ue,layers:pe}){const me=reactExports.useMemo(nanoid,[]),{instance:ge,error:ye,ref:xe}=useRenderer(ce,{width:ne,height:oe}),{playing:ve}=usePlaybackState(),[,_e]=useScreenshots(),[we,Se]=reactExports.useState();reactExports.useEffect(()=>{if(ge){const Te=(Re,Ae)=>{const ke=Re;Se({client:{x:ke.clientX,y:ke.clientY},world:Ae.world,info:{point:Ae.world,components:Ae.components}})};return ge.on("click",Te),()=>void ge.off("click",Te)}},[ge]);const $e=reactExports.useMemo(()=>({renderer:ge}),[ge]);return reactExports.useEffect(()=>ue==null?void 0:ue(ge),[ge,ue]),reactExports.useEffect(()=>{const Te=async()=>{var Re;return await((Re=ge==null?void 0:ge.toDataUrl)==null?void 0:Re.call(ge))};return _e(()=>({[me]:Te})),()=>_e(()=>({[me]:void 0}))},[me,ge]),reactExports.useEffect(()=>{ge&&ge.setOptions({tileResolution:{width:tileSize(ve),height:tileSize(ve)}})},[ge,ve]),jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(TraceRendererCircularProgress,{}),jsxRuntimeExports.jsx(TraceRendererContext.Provider,{value:$e,children:jsxRuntimeExports.jsx(Box,{sx:{width:ne,height:oe},children:pe!=null&&pe.length?jsxRuntimeExports.jsx(TrustedContent,{children:ye?jsxRuntimeExports.jsxs(Box,{sx:{display:"flex",flexDirection:"column",width:ne,height:oe,alignItems:"center",justifyContent:"center",color:"text.secondary"},children:[jsxRuntimeExports.jsx(SvgIcon$X,{sx:{mb:2},fontSize:"large"}),ye]}):jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(Box,{ref:xe,children:pe.map((Te,Re)=>jsxRuntimeExports.jsx(RenderLayer,{index:Re,layer:Te},Te.key))})})}):jsxRuntimeExports.jsx(Placeholder$2,{icon:jsxRuntimeExports.jsx(SvgIcon$o,{}),label:"Viewport",width:ne,height:oe,secondary:VIEWPORT_PAGE_DESCRIPTION})})}),jsxRuntimeExports.jsx(SelectionMenu,{selection:we,onClose:()=>Se(void 0)})]})}function NodeList({nodes:ne,start:oe=0,end:ce=(ne==null?void 0:ne.length)??0}){const{renderer:ue}=useRendererInstance();return reactExports.useEffect(()=>{if(ue&&(ne!=null&&ne.length))return ue.add(lodashExports.slice(ne,oe,ce).flat())},[ue,ne,oe,ce]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}function NodeList2(ne){const oe=compilerRuntimeExports.c(5),{nodes:ce}=ne,{renderer:ue}=useRendererInstance();let pe,me;oe[0]!==ce||oe[1]!==ue?(pe=()=>{if(ue&&(ce!=null&&ce.length))return ue.add(ce)},me=[ue,ce],oe[0]=ce,oe[1]=ue,oe[2]=pe,oe[3]=me):(pe=oe[2],me=oe[3]),reactExports.useEffect(pe,me);let ge;return oe[4]===Symbol.for("react.memo_cache_sentinel")?(ge=jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{}),oe[4]=ge):ge=oe[4],ge}function LazyNodeList({nodes:ne,end:oe}){const ue=lodashExports.floor((oe??0)/100)*100,pe=reactExports.useMemo(()=>lodashExports.slice(ne,0,ue),[ne,ue]),me=reactExports.useMemo(()=>lodashExports.slice(ne,ue,(oe??0)+1),[ne,ue,oe]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[!!ue&&jsxRuntimeExports.jsx(NodeList,{nodes:pe}),me.map((ge,ye)=>jsxRuntimeExports.jsx(NodeList2,{nodes:ge},ue+ye))]})}const useEffectWhen=(ne,oe,ce)=>{const ue=compilerRuntimeExports.c(6),pe=usePrevious$1(ce);let me;ue[0]!==ne||ue[1]!==pe||ue[2]!==ce?(me=()=>{allSame(ce,pe)||ne()},ue[0]=ne,ue[1]=pe,ue[2]=ce,ue[3]=me):me=ue[3];let ge;return ue[4]!==oe?(ge=[oe],ue[4]=oe,ue[5]=ge):ge=ue[5],reactExports.useEffect(me,ge)};function allSame(ne,oe){return lodashExports.zip(ne,oe).every(([ce,ue])=>ce===ue)}const useEffectWhenAsync=(ne,oe,ce)=>{const ue=compilerRuntimeExports.c(12);let pe;ue[0]!==oe?(pe=oe===void 0?[]:oe,ue[0]=oe,ue[1]=pe):pe=ue[1];const me=pe;let ge;ue[2]!==ce?(ge=ce===void 0?[]:ce,ue[2]=ce,ue[3]=ge):ge=ue[3];const ye=ge,[xe,ve]=reactExports.useState(me),[_e,we]=reactExports.useState(ye);let Se,$e;ue[4]!==me||ue[5]!==_e||ue[6]!==ye?(Se=()=>{allSame(_e,ye)||(ve(me),we(ye))},$e=[me,ye,_e],ue[4]=me,ue[5]=_e,ue[6]=ye,ue[7]=Se,ue[8]=$e):(Se=ue[7],$e=ue[8]),reactExports.useEffect(Se,$e);let Te;return ue[9]!==xe||ue[10]!==_e?(Te=[...xe,..._e],ue[9]=xe,ue[10]=_e,ue[11]=Te):Te=ue[11],useAsyncAbortable(ne,Te)};function useConnectionResolver(){const ne=compilerRuntimeExports.c(2),[oe]=useConnections();let ce;return ne[0]!==oe?(ce=ue=>lodashExports.find(oe,ue),ne[0]=oe,ne[1]=ce):ce=ne[1],ce}function useConnection(ne){const oe=compilerRuntimeExports.c(3),ce=useConnectionResolver();let ue;return oe[0]!==ce||oe[1]!==ne?(ue=ce({url:ne}),oe[0]=ce,oe[1]=ne,oe[2]=ue):ue=oe[2],ue}function useMapContent(ne){const oe=compilerRuntimeExports.c(17),ce=useSnackbar(),ue=useLoadingState("map"),pe=useConnectionResolver();let me,ge;oe[0]!==ce||oe[1]!==pe?(ge=memoizee$1(async Te=>{const{source:Re,id:Ae}=Te===void 0?{}:Te;if(Re&&Ae){const ke=pe({url:Re});if(ke){ce("Fetching map...");const Be=await ke.transport().call("features/map",{id:Ae});return Be==null?void 0:Be.content}}},{normalizer:JSON.stringify}),oe[0]=ce,oe[1]=pe,oe[2]=ge):ge=oe[2],me=ge;const ye=me;let xe;oe[3]!==ne?(xe=ne??{},oe[3]=ne,oe[4]=xe):xe=oe[4];const{content:ve,source:_e,id:we}=xe;let Se;oe[5]!==ve||oe[6]!==ye||oe[7]!==we||oe[8]!==ne||oe[9]!==_e||oe[10]!==ue?(Se=()=>ue(async()=>{if(we)return{...ne,content:ve||await ye({source:_e,id:we})}}),oe[5]=ve,oe[6]=ye,oe[7]=we,oe[8]=ne,oe[9]=_e,oe[10]=ue,oe[11]=Se):Se=oe[11];let $e;return oe[12]!==ve||oe[13]!==ye||oe[14]!==we||oe[15]!==_e?($e=[ye,ve,_e,we],oe[12]=ve,oe[13]=ye,oe[14]=we,oe[15]=_e,oe[16]=$e):$e=oe[16],useAsync(Se,$e)}const noop$6=()=>jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{});function useMapOptions(ne){const oe=compilerRuntimeExports.c(8);let ce;oe[0]!==ne?(ce=ne??{},oe[0]=ne,oe[1]=ce):ce=oe[1];const{format:ue}=ce;let pe;oe[2]!==ue||oe[3]!==(ne==null?void 0:ne.content)?(pe=async()=>{var ye,xe;return await((xe=(ye=getParser(ue))==null?void 0:ye.editor)==null?void 0:xe.call(ye,ne==null?void 0:ne.content))??noop$6},oe[2]=ue,oe[3]=ne==null?void 0:ne.content,oe[4]=pe):pe=oe[4];const me=ne==null?void 0:ne.content;let ge;return oe[5]!==ue||oe[6]!==me?(ge=[ue,me],oe[5]=ue,oe[6]=me,oe[7]=ge):ge=oe[7],useAsync(pe,ge)}function useParsedMap(ne,oe){const ce=useSnackbar(),ue=useTheme(),pe=useLoadingState("map"),{format:me,content:ge}=ne??{};return useAsync(()=>pe(async()=>{var ye,xe;if(me&&ge){ce("Processing map...");try{const ve=await((xe=(ye=getParser(me))==null?void 0:ye.parse)==null?void 0:xe.call(ye,ge,{color:ue.palette.text.primary,background:ue.palette.background.paper,...oe}))??{nodes:[]};return ce("Map loaded",`${ve.nodes.length} elements, ${ve.log.join(", ")}`),{...ne,...ve}}catch(ve){return console.error(ve),ce("Error parsing",lodashExports.get(ve,"message")),{error:lodashExports.get(ve,"message")}}}}),[me,ge,ue,oe])}const controller$2={key:"map",icon:jsxRuntimeExports.jsx(SvgIcon$D,{}),inferName:ne=>{var oe;return(oe=ne==null?void 0:ne.source)!=null&&oe.map?`${ne.source.map.name} (${lodashExports.startCase(ne.source.map.format)})`:"Untitled Map"},error:ne=>{var oe,ce;return(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedMap)==null?void 0:ce.error},compress:ne=>lodashExports.pick(ne,["map","options"]),claimImportedFile:async ne=>lodashExports.keys(mapParsers).includes(ext$1(ne.name))?{claimed:!0,layer:async oe=>{oe("Opening map...");try{return{map:{...await readUploadedMap(ne,lodashExports.entries(mapParsers).map(([ue])=>({id:ue}))).read()}}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports.get(ce,"message")}`),{map:{key:nanoid(),id:custom$1().id,error:lodashExports.get(ce,"message"),name:lodashExports.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var pe,me,ge;const ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap,{result:ue}=useMapOptions(ce);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Source",content:jsxRuntimeExports.jsx(MapPicker,{value:(me=ne==null?void 0:ne.source)==null?void 0:me.map,onChange:ye=>oe(xe=>lodashExports.set(xe,"source.map",ye))})}),(ce==null?void 0:ce.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:ce==null?void 0:ce.error})}),!!ce&&jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Heading,{label:"Map Options"}),ue?jsxRuntimeExports.jsx(ue,{value:(ge=ne==null?void 0:ne.source)==null?void 0:ge.options,onChange:ye=>oe(xe=>{var ve;lodashExports.set(xe,"source.options",ye(((ve=xe.source)==null?void 0:ve.options)??{}))})}):jsxRuntimeExports.jsx(CircularProgress,{sx:{mt:2}})]})]})}),renderer:({layer:ne,index:oe})=>{var pe;const{nodes:ce}=((pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap)??{},ue=reactExports.useMemo(()=>[lodashExports.map(ce,me=>({...me,meta:{...me.meta,sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))],[ce,oe,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode]);return jsxRuntimeExports.jsx(NodeList,{nodes:ue})},service:withProduce(({value:ne,produce:oe})=>{var me,ge;const{result:ce}=useMapContent((me=ne==null?void 0:ne.source)==null?void 0:me.map),{result:ue,loading:pe}=useParsedMap(ce,(ge=ne==null?void 0:ne.source)==null?void 0:ge.options);return useEffectWhen(()=>{pe||oe(ye=>{lodashExports.set(ye,"source.parsedMap",ue),lodashExports.set(ye,"viewKey",nanoid())})},[ue,oe,pe],[ue]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})}),provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const{layer:ue,setLayer:pe,layers:me}=useLayer(ce),{parsedMap:ge}=(ue==null?void 0:ue.source)??{},{point:ye,node:xe}=reactExports.useMemo(()=>{var _e,we,Se,$e;if(ge&&oe){const Te=($e=(Se=getParser((we=(_e=ue==null?void 0:ue.source)==null?void 0:_e.map)==null?void 0:we.format))==null?void 0:Se.hydrate)==null?void 0:$e.call(Se,ge);if(Te){const Re=(oe==null?void 0:oe.world)&&Te.snap(oe.world);if(Re){const Ae=(oe==null?void 0:oe.world)&&Te.nodeAt(Re);return{point:Re,node:Ae}}}}return{}},[ge,oe]),ve=reactExports.useMemo(()=>({...ue&&ye&&!lodashExports.isUndefined(xe)&&{[ue.key]:{primary:inferLayerName(ue),items:{point:{primary:"Point",secondary:`(${lodashExports.round(ye.x,2)}, ${lodashExports.round(ye.y,2)})`}}}}}),[ye,xe,ue,me,pe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ne==null?void 0:ne(ve)})},getSources:ne=>{var ue,pe;const oe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.map,ce=(pe=ne==null?void 0:ne.source)==null?void 0:pe.parsedMap;return oe?[{id:"map",name:`${oe.name}`,language:"txt",content:ce==null?void 0:ce.content}]:[]},onEditSource:(ne,oe,ce)=>ne};function _defineProperty$1(ne,oe,ce){return oe in ne?Object.defineProperty(ne,oe,{value:ce,enumerable:!0,configurable:!0,writable:!0}):ne[oe]=ce,ne}function ownKeys$1(ne,oe){var ce=Object.keys(ne);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(ne);oe&&(ue=ue.filter(function(pe){return Object.getOwnPropertyDescriptor(ne,pe).enumerable})),ce.push.apply(ce,ue)}return ce}function _objectSpread2$1(ne){for(var oe=1;oe=0)&&(ce[pe]=ne[pe]);return ce}function _objectWithoutProperties(ne,oe){if(ne==null)return{};var ce=_objectWithoutPropertiesLoose(ne,oe),ue,pe;if(Object.getOwnPropertySymbols){var me=Object.getOwnPropertySymbols(ne);for(pe=0;pe=0)&&Object.prototype.propertyIsEnumerable.call(ne,ue)&&(ce[ue]=ne[ue])}return ce}function _slicedToArray(ne,oe){return _arrayWithHoles(ne)||_iterableToArrayLimit(ne,oe)||_unsupportedIterableToArray(ne,oe)||_nonIterableRest()}function _arrayWithHoles(ne){if(Array.isArray(ne))return ne}function _iterableToArrayLimit(ne,oe){if(!(typeof Symbol>"u"||!(Symbol.iterator in Object(ne)))){var ce=[],ue=!0,pe=!1,me=void 0;try{for(var ge=ne[Symbol.iterator](),ye;!(ue=(ye=ge.next()).done)&&(ce.push(ye.value),!(oe&&ce.length===oe));ue=!0);}catch(xe){pe=!0,me=xe}finally{try{!ue&&ge.return!=null&&ge.return()}finally{if(pe)throw me}}return ce}}function _unsupportedIterableToArray(ne,oe){if(ne){if(typeof ne=="string")return _arrayLikeToArray(ne,oe);var ce=Object.prototype.toString.call(ne).slice(8,-1);if(ce==="Object"&&ne.constructor&&(ce=ne.constructor.name),ce==="Map"||ce==="Set")return Array.from(ne);if(ce==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ce))return _arrayLikeToArray(ne,oe)}}function _arrayLikeToArray(ne,oe){(oe==null||oe>ne.length)&&(oe=ne.length);for(var ce=0,ue=new Array(oe);ce=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),xe=0;xe1&&arguments[1]!==void 0?arguments[1]:{};validators$1.initial(ne),validators$1.handler(oe);var ce={current:ne},ue=curry$1(didStateUpdate)(ce,oe),pe=curry$1(updateState)(ce),me=curry$1(validators$1.changes)(ne),ge=curry$1(extractChanges)(ce);function ye(){var ve=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(_e){return _e};return validators$1.selector(ve),ve(ce.current)}function xe(ve){compose$3(ue,pe,me,ge)(ve)}return[ye,xe]}function extractChanges(ne,oe){return isFunction(oe)?oe(ne.current):oe}function updateState(ne,oe){return ne.current=_objectSpread2(_objectSpread2({},ne.current),oe),oe}function didStateUpdate(ne,oe,ce){return isFunction(oe)?oe(ne.current):Object.keys(ce).forEach(function(ue){var pe;return(pe=oe[ue])===null||pe===void 0?void 0:pe.call(oe,ne.current[ue])}),ce}var index$1={create:create$1},config$1={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.43.0/min/vs"}};function curry(ne){return function oe(){for(var ce=this,ue=arguments.length,pe=new Array(ue),me=0;me=ne.length?ne.apply(this,pe):function(){for(var ge=arguments.length,ye=new Array(ge),xe=0;xeoe(new Proxy(normalize$1(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace$1=/^\$\{\{\s*/,closeBrace$1=/^\s*\}\}/,neverMatch$1=/\b\B/,parser$3=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace$1,VARIABLE_END:closeBrace$1,PIPE_START:neverMatch$1,PIPE_PARAMETER_START:neverMatch$1,QUOTED_STRING:neverMatch$1}),parseString$1=memoizee$1(ne=>{const oe=parser$3(ne);return lodashExports.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken$1(ue)(ce)):parseToken$1(oe.variables[0].name)},{primitive:!0});function parseProperty$1(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports.map(ne,parseProperty$1);return ce=>lodashExports.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports.mapValues(ne,parseProperty$1);return ce=>lodashExports.mapValues(oe,ue=>ue(ce))}case String:return parseString$1(ne);default:return()=>ne}}function commonjsRequire$1(ne){throw new Error('Could not dynamically require "'+ne+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pluralize$1={exports:{}};(function(ne,oe){(function(ce,ue){typeof commonjsRequire$1=="function"?ne.exports=ue():ce.pluralize=ue()})(commonjsGlobal$1,function(){var ce=[],ue=[],pe={},me={},ge={};function ye(Re){return typeof Re=="string"?new RegExp("^"+Re+"$","i"):Re}function xe(Re,Ae){return Re===Ae?Ae:Re===Re.toLowerCase()?Ae.toLowerCase():Re===Re.toUpperCase()?Ae.toUpperCase():Re[0]===Re[0].toUpperCase()?Ae.charAt(0).toUpperCase()+Ae.substr(1).toLowerCase():Ae.toLowerCase()}function ve(Re,Ae){return Re.replace(/\$(\d{1,2})/g,function(ke,Be){return Ae[Be]||""})}function _e(Re,Ae){return Re.replace(Ae[0],function(ke,Be){var Ie=ve(Ae[1],arguments);return xe(ke===""?Re[Be-1]:ke,Ie)})}function we(Re,Ae,ke){if(!Re.length||pe.hasOwnProperty(Re))return Ae;for(var Be=ke.length;Be--;){var Ie=ke[Be];if(Ie[0].test(Ae))return _e(Ae,Ie)}return Ae}function Se(Re,Ae,ke){return function(Be){var Ie=Be.toLowerCase();return Ae.hasOwnProperty(Ie)?xe(Be,Ie):Re.hasOwnProperty(Ie)?xe(Be,Re[Ie]):we(Ie,Be,ke)}}function $e(Re,Ae,ke,Be){return function(Ie){var Ne=Ie.toLowerCase();return Ae.hasOwnProperty(Ne)?!0:Re.hasOwnProperty(Ne)?!1:we(Ne,Ne,ke)===Ne}}function Te(Re,Ae,ke){var Be=Ae===1?Te.singular(Re):Te.plural(Re);return(ke?Ae+" ":"")+Be}return Te.plural=Se(ge,me,ce),Te.isPlural=$e(ge,me,ce),Te.singular=Se(me,ge,ue),Te.isSingular=$e(me,ge,ue),Te.addPluralRule=function(Re,Ae){ce.push([ye(Re),Ae])},Te.addSingularRule=function(Re,Ae){ue.push([ye(Re),Ae])},Te.addUncountableRule=function(Re){if(typeof Re=="string"){pe[Re.toLowerCase()]=!0;return}Te.addPluralRule(Re,"$0"),Te.addSingularRule(Re,"$0")},Te.addIrregularRule=function(Re,Ae){Ae=Ae.toLowerCase(),Re=Re.toLowerCase(),ge[Re]=Ae,me[Ae]=Re},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(Re){return Te.addIrregularRule(Re[0],Re[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(Re){return Te.addPluralRule(Re[0],Re[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(Re){return Te.addSingularRule(Re[0],Re[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Te.addUncountableRule),Te})})(pluralize$1);var pluralizeExports=pluralize$1.exports;const pluralize=getDefaultExportFromCjs$1(pluralizeExports),parseTraceWorkerLegacyUrl=""+new URL("parseTrace.worker-y8dm9SDW.js",import.meta.url).href,parseTraceWorkerUrl=""+new URL("parseTrace.worker-DDV8yRvx.js",import.meta.url).href;class ParseTraceWorker extends Worker{constructor(){super(parseTraceWorkerUrl,{type:"module"})}}class ParseTraceWorkerLegacy extends Worker{constructor(){super(parseTraceWorkerLegacyUrl,{type:"module"})}}const parseTraceAsync=usingMemoizedWorkerTask(ParseTraceWorker),parseTraceLegacyAsync=usingMemoizedWorkerTask(ParseTraceWorkerLegacy);function useTraceParser(ne,oe,ce){const ue=useSnackbar(),pe=useLoadingState("specimen");return reactExports.useMemo(()=>{if(ne.trace)return oe?()=>pe(async()=>{var me,ge;ue("Processing trace...");try{const ye=((me=ne.trace)==null?void 0:me.version)==="1.4.0"?await parseTraceAsync(ne):await parseTraceLegacyAsync(ne);return ue("Trace loaded",pluralize("step",((ge=ye==null?void 0:ye.stepsPersistent)==null?void 0:ge.length)??0,!0)),{components:ye,content:ne.trace}}catch(ye){return console.error(ye),ue("Error parsing",lodashExports.get(ye,"message")),{error:lodashExports.get(ye,"message")}}}):()=>pe(async()=>{var me,ge;return ue("Trace loaded",pluralize("step",((ge=(me=ne.trace)==null?void 0:me.events)==null?void 0:ge.length)??0,!0)),{content:ne.trace,components:[]}})},ce)}function mapProperties(ne={},oe){const ce={};for(const ue of Object.keys(ne))ce[ue]=ue==="$"?ne[ue]:oe(ne[ue],ue,ne);return Object.setPrototypeOf(ce,ne)}function normalize(ne={}){return mapProperties(ne,oe=>lodashExports.isFunction(oe)?oe:parseProperty(oe))}const parseToken=ne=>{const oe=Function("$",`return ${ne};`);return ce=>oe(new Proxy(normalize(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace=/^\{\{\s*/,closeBrace=/^\s*\}\}/,neverMatch=/\b\B/,parser$2=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace,VARIABLE_END:closeBrace,PIPE_START:neverMatch,PIPE_PARAMETER_START:neverMatch,QUOTED_STRING:neverMatch}),parseString=memoizee$1(ne=>{const oe=parser$2(ne);return lodashExports.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken(ue)(ce)):parseToken(oe.variables[0].name)},{primitive:!0});function parseProperty(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports.map(ne,parseProperty);return ce=>lodashExports.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports.mapValues(ne,parseProperty);return ce=>lodashExports.mapValues(oe,ue=>ue(ce))}case String:return parseString(ne);default:return()=>ne}}function useTraceContent(ne){const oe=compilerRuntimeExports.c(24),ce=useSnackbar(),ue=useLoadingState("specimen"),pe=useConnectionResolver(),[me]=useFeatures(),{traces:ge}=me;let ye,xe;oe[0]!==ce||oe[1]!==pe?(xe=memoizee$1(async Ne=>{const{source:je,id:ze}=Ne;if(je&&ze){const Ue=pe({url:je});if(Ue){ce("Fetching trace...");const qe=await Ue.transport().call("features/trace",{id:ze});return console.log(qe==null?void 0:qe.content),qe==null?void 0:qe.content}}},{normalizer:JSON.stringify}),oe[0]=ce,oe[1]=pe,oe[2]=xe):xe=oe[2],ye=xe;const ve=ye;let _e;oe[3]!==ne?(_e=ne??{},oe[3]=ne,oe[4]=_e):_e=oe[4];const{content:we,source:Se,id:$e,key:Te}=_e;let Re;oe[5]!==$e||oe[6]!==Se||oe[7]!==ge?(Re=lodashExports.find(ge,{id:$e,source:Se})??{},oe[5]=$e,oe[6]=Se,oe[7]=ge,oe[8]=Re):Re=oe[8];const{lastModified:Ae}=Re;let ke;oe[9]!==we||oe[10]!==ve||oe[11]!==$e||oe[12]!==Ae||oe[13]!==Se||oe[14]!==ne||oe[15]!==ue?(ke=()=>ue(async()=>{if($e){if(we)return{...ne,content:we};{const Ne=await ve({source:Se,id:$e,lastModified:Ae});return{...ne,content:Ne}}}}),oe[9]=we,oe[10]=ve,oe[11]=$e,oe[12]=Ae,oe[13]=Se,oe[14]=ne,oe[15]=ue,oe[16]=ke):ke=oe[16];const Be=!!we;let Ie;return oe[17]!==ve||oe[18]!==$e||oe[19]!==Te||oe[20]!==Ae||oe[21]!==Se||oe[22]!==Be?(Ie=[ve,Be,Te,Se,$e,Ae],oe[17]=ve,oe[18]=$e,oe[19]=Te,oe[20]=Ae,oe[21]=Se,oe[22]=Be,oe[23]=Ie):Ie=oe[23],useAsync(ke,Ie)}const labelScale=1.25,reuseCanvas={canvas:document.createElement("canvas")};function getTextWidth(ne,oe){const ue=(reuseCanvas.canvas||(reuseCanvas.canvas=document.createElement("canvas"))).getContext("2d");return ue.font=oe,ue.measureText(ne).width}const isNullish=ne=>ne==null;function makePathIndex(ne){const oe=[],ce={},ue={},pe=lodashExports.chain(ne==null?void 0:ne.events).map((ye,xe)=>({step:xe,id:ye.id,pId:ye.pId})).groupBy("id").value();lodashExports.forEach(ne==null?void 0:ne.events,({id:ye,pId:xe},ve)=>{!isNullish(xe)&&ce[ye]!==xe&&(oe.push({id:ye,pId:xe,step:ve,prev:lodashExports.last(oe)}),ce[ye]=xe),ue[ve]=lodashExports.last(oe)});const me=(ye,xe=(ve=>(ve=ne==null?void 0:ne.events)==null?void 0:ve.length)()??0)=>{let _e=ue[xe];for(;_e;){if(_e.id===ye)return _e.pId;_e=_e.prev}};return{getParent:me,getPath:ye=>{const xe=[ye];let ve={...(ne.events??[])[ye],step:ye};for(;ve;){const _e=me(ve.id,ve.step);if(_e){const we=lodashExports.findLast(pe[_e],Se=>Se.step<=ve.step);if(we)xe.push(we.step),ve=we;else break}else break}return xe}}}const controller$1={key:"trace",icon:jsxRuntimeExports.jsx(SvgIcon$w,{}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Trace"},error:ne=>{var oe,ce,ue,pe;return((ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.trace)==null?void 0:ce.error)||((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.parsedTrace)==null?void 0:pe.error)},compress:ne=>lodashExports.pick(ne,["trace","onion","step","code","breakpoints"]),claimImportedFile:async ne=>isTraceFormat(ne)?{claimed:!0,layer:async oe=>{oe("Opening trace...");try{return{trace:await readUploadedTrace(ne).read()}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports.get(ce,"message")}`),{trace:{key:nanoid(),id:custom$1().id,error:lodashExports.get(ce,"message"),name:lodashExports.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var ce,ue,pe,me,ge,ye,xe,ve,_e,we,Se;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Trace",content:jsxRuntimeExports.jsx(TracePicker,{onChange:$e=>oe(Te=>lodashExports.set(Te,"source.trace",$e)),value:(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace})}),((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.trace)==null?void 0:pe.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(ge=(me=ne==null?void 0:ne.source)==null?void 0:me.trace)==null?void 0:ge.error})}),((xe=(ye=ne==null?void 0:ne.source)==null?void 0:ye.parsedTrace)==null?void 0:xe.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(_e=(ve=ne==null?void 0:ne.source)==null?void 0:ve.parsedTrace)==null?void 0:_e.error})}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(Se=(we=ne==null?void 0:ne.source)==null?void 0:we.parsedTrace)==null?void 0:Se.content})})]})}),service:withProduce(({value:ne,produce:oe})=>{var ye;const{palette:ce}=useTheme(),{result:ue,loading:pe}=useTraceContent((ye=ne==null?void 0:ne.source)==null?void 0:ye.trace);reactExports.useEffect(()=>{oe(xe=>{var ve,_e;return lodashExports.set(xe,"source.playbackTo",((_e=(ve=ue==null?void 0:ue.content)==null?void 0:ve.events)==null?void 0:_e.length)??0)})},[ue==null?void 0:ue.key]);const{isTrusted:me}=useUntrustedLayers(),ge=useTraceParser({trace:ue==null?void 0:ue.content,context:{theme:{foreground:ce.text.primary,background:ce.background.paper,accent:ce.primary.main},color:{...colorsHex,...lodashExports.mapValues(accentColors,(xe,ve)=>getShade(ve,ce.mode,500,400))},themeAccent:ce.primary.main,themeTextPrimary:ce.text.primary,themeBackground:ce.background.paper},view:"main"},me,[ue==null?void 0:ue.key,ce.mode,me]);return useAsync$1(async()=>{if(ge&&!pe){const xe=await ge();oe(ve=>{lodashExports.set(ve,"source.parsedTrace",xe),lodashExports.set(ve,"viewKey",nanoid())})}},[pe,ge]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(PlaybackService,{value:ne})})}),renderer:({layer:ne,index:oe})=>{var xe,ve,_e;const ce=(ve=(xe=ne==null?void 0:ne.source)==null?void 0:xe.parsedTrace)==null?void 0:ve.components,ue=useThrottle(((_e=ne==null?void 0:ne.source)==null?void 0:_e.step)??0,1e3/60),pe=use2DPath(ne,oe,ue),me=reactExports.useMemo(()=>lodashExports.map(ce==null?void 0:ce.stepsPersistent,we=>lodashExports.map(we,Se=>lodashExports.merge(Se,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsPersistent,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ge=reactExports.useMemo(()=>lodashExports.map(ce==null?void 0:ce.stepsTransient,we=>lodashExports.map(we,Se=>lodashExports.merge(Se,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsTransient,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ye=reactExports.useMemo(()=>[ge[ue]??[]],[ge,ue]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LazyNodeList,{end:ue,nodes:me}),jsxRuntimeExports.jsx(NodeList,{nodes:ye}),pe]})},steps:ne=>{var oe,ce,ue;return((ue=(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedTrace)==null?void 0:ce.content)==null?void 0:ue.events)??[]},provideSelectionInfo:({layer:ne,event:oe,children:ce})=>{const{layer:ue,setLayer:pe}=useLayer(ne),me=reactExports.useMemo(()=>{var ve,_e,we,Se,$e;const ge=((we=(_e=(ve=ue==null?void 0:ue.source)==null?void 0:ve.parsedTrace)==null?void 0:_e.content)==null?void 0:we.events)??[],ye=lodashExports.chain((Se=oe==null?void 0:oe.info)==null?void 0:Se.components).filter(Te=>{var Re;return((Re=Te.meta)==null?void 0:Re.sourceLayer)===(ue==null?void 0:ue.key)}).map(Te=>{var Re;return(Re=Te.meta)==null?void 0:Re.step}).filter(lodashExports.negate(lodashExports.isUndefined)).sort((Te,Re)=>Te-Re).value(),xe=lodashExports.chain(($e=oe==null?void 0:oe.info)==null?void 0:$e.components).filter(Te=>{var Re;return((Re=Te.meta)==null?void 0:Re.sourceLayer)===(ue==null?void 0:ue.key)}).filter(Te=>{var Re;return(Re=Te.meta)==null?void 0:Re.info}).value();if(ye.length&&ue){const Te=lodashExports.last(ye),Re=ge[Te];if(Re)return{...lodashExports.keyBy(lodashExports.map(xe,(Ae,ke)=>({key:`${ue.key}.${ke}`,primary:`Selection in ${inferLayerName(ue)}`,items:{info:{index:-1,primary:jsxRuntimeExports.jsx(PropertyList,{event:Ae.meta.info,vertical:!0})}}})),"key"),[ue.key]:{primary:inferLayerName(ue),items:{properties:{index:-2,primary:jsxRuntimeExports.jsx(PropertyList,{event:Re,vertical:!0,simple:!0,primitives:!0})},propertiesDetails:{index:-1,extras:jsxRuntimeExports.jsx(PropertyDialog,{event:Re,trigger:Ae=>jsxRuntimeExports.jsxs(MenuItem,{onClick:Ae,children:[jsxRuntimeExports.jsx(ListItemIcon,{children:jsxRuntimeExports.jsx(SvgIcon$S,{})}),jsxRuntimeExports.jsx(ListItemText,{sx:{mr:4},children:"See properties"}),jsxRuntimeExports.jsxs(Typography,{component:"div",variant:"body2",color:"text.secondary",children:["Step ",Te]})]})})},[`${Re}`]:{primary:`Go to step ${Te}`,secondary:`${lodashExports.startCase(Re.type)}`,action:()=>pe(produce(ue,Ae=>{lodashExports.set(Ae,"source.step",Te)})),icon:jsxRuntimeExports.jsx(SvgIcon$Z,{})}}}}}return{}},[ue,oe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ce==null?void 0:ce(me)})},getSources:ne=>{var ce;const oe=(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace;return oe?[{id:"trace",name:`${oe.name}`,language:"yaml",content:dump(oe.content,{noCompatMode:!0})}]:[]}},labelSize=.8;function use2DPath(ne,oe=0,ce=0){var ge,ye,xe;const{palette:ue}=useTheme(),{getPath:pe}=reactExports.useMemo(()=>{var ve,_e,we;return((ve=ne==null?void 0:ne.source)==null?void 0:ve.playback)!=="playing"&&((we=(_e=ne==null?void 0:ne.source)==null?void 0:_e.parsedTrace)!=null&&we.content)?makePathIndex(ne.source.parsedTrace.content):{getParent:lodashExports.constant(void 0),getPath:lodashExports.constant([])}},[(ye=(ge=ne==null?void 0:ne.source)==null?void 0:ge.parsedTrace)==null?void 0:ye.content,(xe=ne==null?void 0:ne.source)==null?void 0:xe.playback]);return reactExports.useMemo(()=>{var we,Se,$e,Te,Re,Ae,ke,Be,Ie,Ne,je,ze;const ve=interpolate$1([ue.background.paper,ue.text.primary])(.05),_e=(Se=(we=ne==null?void 0:ne.source)==null?void 0:we.parsedTrace)==null?void 0:Se.content;if(($e=_e==null?void 0:_e.render)!=null&&$e.path||_e!=null&&_e.pivot){const Ue=((Re=(Te=_e==null?void 0:_e.render)==null?void 0:Te.path)==null?void 0:Re.pivot)??(_e==null?void 0:_e.pivot)??{},qe=(ke=(Ae=_e==null?void 0:_e.render)==null?void 0:Ae.path)!=null&&ke.scale?_e.render.path.scale*(1/.3):((Be=_e==null?void 0:_e.pivot)==null?void 0:Be.scale)??1,{x:Ke,y:Ge}=Ue,Ye=(_e==null?void 0:_e.version)==="1.4.0"?parseProperty$1:Tt=>Ut=>parseProperty(Tt)({event:Ut}),Xe=Ke?Ye(Ke):Tt=>Tt.x,Je=Ge?Ye(Ge):Tt=>Tt.y,Qe=lodashExports.map(pe(ce),Tt=>{var Ut;return(Ut=_e==null?void 0:_e.events)==null?void 0:Ut[Tt]}),Ze={x:Xe({x:0,y:0,...lodashExports.head(Qe)}),y:Je({x:0,y:0,...lodashExports.head(Qe)})};if(Qe.length){const Tt=`${lodashExports.startCase((Ie=lodashExports.head(Qe))==null?void 0:Ie.type)} ${(Ne=lodashExports.head(Qe))==null?void 0:Ne.id}`,Ut=getTextWidth(Tt,`${labelSize*qe*labelScale}px Inter`),Gt=[{$:"circle",x:Xe({x:0,y:0,...lodashExports.last(Qe)}),y:Je({x:0,y:0,...lodashExports.last(Qe)}),fill:ue.primary.main,radius:.3*qe},{$:"path",points:Qe.map(Nt=>({x:Xe({x:0,y:0,...Nt}),y:Je({x:0,y:0,...Nt})})),fill:ue.primary.main,alpha:1,lineWidth:.3*qe},{$:"circle",...Ze,fill:ue.primary.main,radius:.3*qe},{$:"rect",alpha:.85,fill:ve,x:Ze.x-.3*qe*labelScale,y:Ze.y-2*qe*labelScale,width:Ut+(.8+.5)*qe*labelScale,height:1.4*qe*labelScale},{$:"path",points:[{x:Ze.x,y:Ze.y},{x:Ze.x+(-.3-.05)*qe*labelScale,y:Ze.y+(-2+1.4)*qe*labelScale}],fill:getColorHex((je=lodashExports.head(Qe))==null?void 0:je.type),alpha:1,lineWidth:.1*qe*labelScale},{$:"rect",x:Ze.x+(-.3-.1)*qe*labelScale,y:Ze.y+-2*qe*labelScale,fill:getColorHex((ze=lodashExports.head(Qe))==null?void 0:ze.type),height:1.4*qe*labelScale,width:.1*qe*labelScale},{$:"rect",alpha:0,fill:"rgba(255, 255, 255, 0)",x:Ze.x-.3*qe*labelScale,y:Ze.y-2*qe*labelScale,width:Ut*2,height:1*qe*labelScale,label:Tt,"label-size":labelSize*qe*labelScale,"label-x":(.1+.5)*qe*labelScale,"label-y":1*qe*labelScale,"label-color":ue.text.primary}];return jsxRuntimeExports.jsx(NodeList,{nodes:[lodashExports.map(Gt,Nt=>({component:Nt,meta:{source:"path",sourceLayerIndex:-99999+oe}}))]})}}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},[ne,oe,ce,ue,pe])}const mapValuesDeep=(ne,oe)=>lodashExports.isArray(ne)?lodashExports.map(ne,ce=>mapValuesDeep(ce,oe)):lodashExports.isObject(ne)?lodashExports.mapValues(ne,ce=>mapValuesDeep(ce,oe)):oe(ne);async function findConnection(ne,oe,ce){for(const ue of ne){const pe=await ue.transport().call("features/algorithms"),me=await ue.transport().call("features/formats");if(lodashExports.find(pe,{id:oe})&&lodashExports.find(me,{id:ce}))return ue}}const maxStringPropLength=40,controller={...lodashExports.omit(controller$1,"claimImportedFile"),key:"query",icon:jsxRuntimeExports.jsx(SvgIcon$w,{}),compress:ne=>lodashExports.pick(ne,["mapLayerKey","query","start","end","algorithm","onion","step","code","breakpoints"]),editor:withProduce(({value:ne,produce:oe})=>{var ve,_e;const{algorithm:ce}=(ne==null?void 0:ne.source)??{},{layers:ue,allLayers:pe,layer:me,key:ge}=useLayer(void 0,we=>{var Se;return((Se=we.source)==null?void 0:Se.type)==="map"}),[{algorithms:ye}]=useFeatures(),[xe]=useConnections();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Algorithm",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(SvgIcon$T,{}),label:"Algorithm",value:ce,items:ye.map(we=>{var Se;return{...we,description:(Se=lodashExports.find(xe,{url:we.source}))==null?void 0:Se.name}}),onChange:async we=>oe(Se=>lodashExports.set(Se,"source.algorithm",we))})}),!(ye!=null&&ye.length)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),jsxRuntimeExports.jsx(Option,{label:"Map",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(SvgIcon$G,{}),label:"Layer",value:ge,items:pe.map(we=>({id:we.key,hidden:!lodashExports.find(ue,Se=>Se.key===we.key),name:inferLayerName(we)})),onChange:async we=>oe(Se=>lodashExports.set(Se,"source.mapLayerKey",we))})}),me&&jsxRuntimeExports.jsxs(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",inferLayerName(me)]}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(_e=(ve=ne==null?void 0:ne.source)==null?void 0:ve.trace)==null?void 0:_e.content})})]})}),service:withProduce(({value:ne,produce:oe,onChange:ce})=>{var Te;const ue=controller$1.service,pe=useSnackbar(),{algorithm:me,mapLayerKey:ge,start:ye,end:xe}=(ne==null?void 0:ne.source)??{},[{layers:ve}]=useLayers(),[_e]=useConnections(),[{algorithms:we}]=useFeatures(),Se=reactExports.useMemo(()=>{if(ge&&me)return lodashExports.find(ve,{key:ge})},[ge,me,ve]),{result:$e}=useMapContent((Te=Se==null?void 0:Se.source)==null?void 0:Te.map);return useEffectWhenAsync(async Re=>{var Ae;if(Se&&$e&&me){const{format:ke}=((Ae=Se==null?void 0:Se.source)==null?void 0:Ae.map)??{},{content:Be}=$e??{};if(ke&&Be){const Ie=await findConnection(_e,me,ke),Ne=lodashExports.find(we,{id:me});if(Ie){pe(`Executing ${inferLayerName(ne)} using ${Ie.name}...`);const je={format:ke,instances:[{start:ye??0,end:xe??0}],mapURI:`map:${encodeURIComponent(Be)}`,algorithm:me},ze=await Ie.transport().call("solve/pathfinding",je);Re.aborted?pe("Canceled"):oe(Ue=>{lodashExports.set(Ue,"source.trace",{name:`${Ne==null?void 0:Ne.name}`,content:ze,key:nanoid(),id:nanoid()}),lodashExports.set(Ue,"source.query",je)})}}}},[Se,_e,me,ye,xe,oe,pe,ne,we],[Se,$e,_e,me,ye,xe]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ue,{value:ne,onChange:ce})})}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Query"},provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const ue=controller$1.provideSelectionInfo,{layer:pe,setLayer:me,layers:ge}=useLayer(ce),ye=reactExports.useMemo(()=>{const ve=lodashExports.filter(ge,{source:{type:"map"}});return lodashExports.filter(lodashExports.map(ve,_e=>{var Se,$e,Te,Re;const{parsedMap:we}=(_e==null?void 0:_e.source)??{};if(we&&oe){const Ae=(Re=(Te=getParser(($e=(Se=_e==null?void 0:_e.source)==null?void 0:Se.map)==null?void 0:$e.format))==null?void 0:Te.hydrate)==null?void 0:Re.call(Te,we);if(Ae){const ke=(oe==null?void 0:oe.world)&&Ae.snap(oe.world);if(ke){const Be=(oe==null?void 0:oe.world)&&Ae.nodeAt(ke);return{point:ke,node:Be,key:_e.key,name:inferLayerName(_e)}}}}}))},[ge]),xe=reactExports.useMemo(()=>!!pe&&!!ye.length&&{[pe.key]:{primary:inferLayerName(pe),items:{...lodashExports.reduce(ye,(ve,_e)=>({...ve,[`${ce}-${_e==null?void 0:_e.key}-source`]:{primary:"Set as source",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,we=>{lodashExports.set(we,"source.start",_e==null?void 0:_e.node),lodashExports.set(we,"source.query",void 0),lodashExports.set(we,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports.set(we,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(SvgIcon$q,{sx:{transform:"scale(0.5)"}})},[`${ce}-${_e==null?void 0:_e.key}-destination`]:{primary:"Set as destination",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,we=>{lodashExports.set(we,"source.end",_e==null?void 0:_e.node),lodashExports.set(we,"source.query",void 0),lodashExports.set(we,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports.set(we,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(SvgIcon$E,{})}}),{})}}},[ye,pe,ge,me]);return jsxRuntimeExports.jsx(ue,{event:oe,layer:ce,children:ve=>ne==null?void 0:ne(lodashExports.merge(ve,xe))})},getSources:ne=>{const{algorithm:oe=null,start:ce=0,end:ue=0,query:pe}=(ne==null?void 0:ne.source)??{};return[{id:"params",name:"Query",language:"yaml",content:dump({algorithm:oe,instances:[{start:ce,end:ue}],mapURI:"(...)",format:"(...)",...mapValuesDeep(pe,me=>typeof me=="string"&&me.length>maxStringPropLength?`${lodashExports.truncate(me,{length:maxStringPropLength})} (${me.length} characters)`:me)},{noCompatMode:!0})},...controller$1.getSources(ne)]}};function getController(ne){var oe;return getControllers()[((oe=ne==null?void 0:ne.source)==null?void 0:oe.type)??""]}const getControllers=lodashExports.once(()=>({trace:controller$1,map:controller$2,query:controller}));var byte_size={STRING:2,BOOLEAN:4,BYTES:4,NUMBER:8,Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=ye,base64Js.toByteArray=ve,base64Js.fromByteArray=Se;for(var ne=[],oe=[],ce=typeof Uint8Array<"u"?Uint8Array:Array,ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=0,me=ue.length;pe0)throw new Error("Invalid string. Length must be a multiple of 4");var Re=$e.indexOf("=");Re===-1&&(Re=Te);var Ae=Re===Te?0:4-Re%4;return[Re,Ae]}function ye($e){var Te=ge($e),Re=Te[0],Ae=Te[1];return(Re+Ae)*3/4-Ae}function xe($e,Te,Re){return(Te+Re)*3/4-Re}function ve($e){var Te,Re=ge($e),Ae=Re[0],ke=Re[1],Be=new ce(xe($e,Ae,ke)),Ie=0,Ne=ke>0?Ae-4:Ae,je;for(je=0;je>16&255,Be[Ie++]=Te>>8&255,Be[Ie++]=Te&255;return ke===2&&(Te=oe[$e.charCodeAt(je)]<<2|oe[$e.charCodeAt(je+1)]>>4,Be[Ie++]=Te&255),ke===1&&(Te=oe[$e.charCodeAt(je)]<<10|oe[$e.charCodeAt(je+1)]<<4|oe[$e.charCodeAt(je+2)]>>2,Be[Ie++]=Te>>8&255,Be[Ie++]=Te&255),Be}function _e($e){return ne[$e>>18&63]+ne[$e>>12&63]+ne[$e>>6&63]+ne[$e&63]}function we($e,Te,Re){for(var Ae,ke=[],Be=Te;BeNe?Ne:Ie+Be));return Ae===1?(Te=$e[Re-1],ke.push(ne[Te>>2]+ne[Te<<4&63]+"==")):Ae===2&&(Te=($e[Re-2]<<8)+$e[Re-1],ke.push(ne[Te>>10]+ne[Te>>4&63]+ne[Te<<2&63]+"=")),ke.join("")}return base64Js}var ieee754$1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754$1.read=function(ne,oe,ce,ue,pe){var me,ge,ye=pe*8-ue-1,xe=(1<>1,_e=-7,we=ce?pe-1:0,Se=ce?-1:1,$e=ne[oe+we];for(we+=Se,me=$e&(1<<-_e)-1,$e>>=-_e,_e+=ye;_e>0;me=me*256+ne[oe+we],we+=Se,_e-=8);for(ge=me&(1<<-_e)-1,me>>=-_e,_e+=ue;_e>0;ge=ge*256+ne[oe+we],we+=Se,_e-=8);if(me===0)me=1-ve;else{if(me===xe)return ge?NaN:($e?-1:1)*(1/0);ge=ge+Math.pow(2,ue),me=me-ve}return($e?-1:1)*ge*Math.pow(2,me-ue)},ieee754$1.write=function(ne,oe,ce,ue,pe,me){var ge,ye,xe,ve=me*8-pe-1,_e=(1<>1,Se=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,$e=ue?0:me-1,Te=ue?1:-1,Re=oe<0||oe===0&&1/oe<0?1:0;for(oe=Math.abs(oe),isNaN(oe)||oe===1/0?(ye=isNaN(oe)?1:0,ge=_e):(ge=Math.floor(Math.log(oe)/Math.LN2),oe*(xe=Math.pow(2,-ge))<1&&(ge--,xe*=2),ge+we>=1?oe+=Se/xe:oe+=Se*Math.pow(2,1-we),oe*xe>=2&&(ge++,xe/=2),ge+we>=_e?(ye=0,ge=_e):ge+we>=1?(ye=(oe*xe-1)*Math.pow(2,pe),ge=ge+we):(ye=oe*Math.pow(2,we-1)*Math.pow(2,pe),ge=0));pe>=8;ne[ce+$e]=ye&255,$e+=Te,ye/=256,pe-=8);for(ge=ge<0;ne[ce+$e]=ge&255,$e+=Te,ge/=256,ve-=8);ne[ce+$e-Te]|=Re*128}),ieee754$1}/*! + `);return ce=>oe(new Proxy(normalize$1(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace$1=/^\$\{\{\s*/,closeBrace$1=/^\s*\}\}/,neverMatch$1=/\b\B/,parser$3=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace$1,VARIABLE_END:closeBrace$1,PIPE_START:neverMatch$1,PIPE_PARAMETER_START:neverMatch$1,QUOTED_STRING:neverMatch$1}),parseString$1=memoizee$1(ne=>{const oe=parser$3(ne);return lodashExports.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken$1(ue)(ce)):parseToken$1(oe.variables[0].name)},{primitive:!0});function parseProperty$1(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports.map(ne,parseProperty$1);return ce=>lodashExports.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports.mapValues(ne,parseProperty$1);return ce=>lodashExports.mapValues(oe,ue=>ue(ce))}case String:return parseString$1(ne);default:return()=>ne}}function commonjsRequire$1(ne){throw new Error('Could not dynamically require "'+ne+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var pluralize$1={exports:{}};(function(ne,oe){(function(ce,ue){typeof commonjsRequire$1=="function"?ne.exports=ue():ce.pluralize=ue()})(commonjsGlobal$1,function(){var ce=[],ue=[],pe={},me={},ge={};function ye(Re){return typeof Re=="string"?new RegExp("^"+Re+"$","i"):Re}function xe(Re,Ae){return Re===Ae?Ae:Re===Re.toLowerCase()?Ae.toLowerCase():Re===Re.toUpperCase()?Ae.toUpperCase():Re[0]===Re[0].toUpperCase()?Ae.charAt(0).toUpperCase()+Ae.substr(1).toLowerCase():Ae.toLowerCase()}function ve(Re,Ae){return Re.replace(/\$(\d{1,2})/g,function(ke,Be){return Ae[Be]||""})}function _e(Re,Ae){return Re.replace(Ae[0],function(ke,Be){var Ie=ve(Ae[1],arguments);return xe(ke===""?Re[Be-1]:ke,Ie)})}function we(Re,Ae,ke){if(!Re.length||pe.hasOwnProperty(Re))return Ae;for(var Be=ke.length;Be--;){var Ie=ke[Be];if(Ie[0].test(Ae))return _e(Ae,Ie)}return Ae}function Se(Re,Ae,ke){return function(Be){var Ie=Be.toLowerCase();return Ae.hasOwnProperty(Ie)?xe(Be,Ie):Re.hasOwnProperty(Ie)?xe(Be,Re[Ie]):we(Ie,Be,ke)}}function $e(Re,Ae,ke,Be){return function(Ie){var Ne=Ie.toLowerCase();return Ae.hasOwnProperty(Ne)?!0:Re.hasOwnProperty(Ne)?!1:we(Ne,Ne,ke)===Ne}}function Te(Re,Ae,ke){var Be=Ae===1?Te.singular(Re):Te.plural(Re);return(ke?Ae+" ":"")+Be}return Te.plural=Se(ge,me,ce),Te.isPlural=$e(ge,me,ce),Te.singular=Se(me,ge,ue),Te.isSingular=$e(me,ge,ue),Te.addPluralRule=function(Re,Ae){ce.push([ye(Re),Ae])},Te.addSingularRule=function(Re,Ae){ue.push([ye(Re),Ae])},Te.addUncountableRule=function(Re){if(typeof Re=="string"){pe[Re.toLowerCase()]=!0;return}Te.addPluralRule(Re,"$0"),Te.addSingularRule(Re,"$0")},Te.addIrregularRule=function(Re,Ae){Ae=Ae.toLowerCase(),Re=Re.toLowerCase(),ge[Re]=Ae,me[Ae]=Re},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(Re){return Te.addIrregularRule(Re[0],Re[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(Re){return Te.addPluralRule(Re[0],Re[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(Re){return Te.addSingularRule(Re[0],Re[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(Te.addUncountableRule),Te})})(pluralize$1);var pluralizeExports=pluralize$1.exports;const pluralize=getDefaultExportFromCjs$1(pluralizeExports),parseTraceWorkerLegacyUrl=""+new URL("parseTrace.worker-BQa4x7DA.js",import.meta.url).href,parseTraceWorkerUrl=""+new URL("parseTrace.worker-DWVEnv8C.js",import.meta.url).href;class ParseTraceWorker extends Worker{constructor(){super(parseTraceWorkerUrl,{type:"module"})}}class ParseTraceWorkerLegacy extends Worker{constructor(){super(parseTraceWorkerLegacyUrl,{type:"module"})}}const parseTraceAsync=usingMemoizedWorkerTask(ParseTraceWorker),parseTraceLegacyAsync=usingMemoizedWorkerTask(ParseTraceWorkerLegacy);function useTraceParser(ne,oe,ce){const ue=useSnackbar(),pe=useLoadingState("specimen");return reactExports.useMemo(()=>{if(ne.trace)return oe?()=>pe(async()=>{var me,ge;ue("Processing trace...");try{const ye=((me=ne.trace)==null?void 0:me.version)==="1.4.0"?await parseTraceAsync(ne):await parseTraceLegacyAsync(ne);return ue("Trace loaded",pluralize("step",((ge=ye==null?void 0:ye.stepsPersistent)==null?void 0:ge.length)??0,!0)),{components:ye,content:ne.trace}}catch(ye){return console.error(ye),ue("Error parsing",lodashExports.get(ye,"message")),{error:lodashExports.get(ye,"message")}}}):()=>pe(async()=>{var me,ge;return ue("Trace loaded",pluralize("step",((ge=(me=ne.trace)==null?void 0:me.events)==null?void 0:ge.length)??0,!0)),{content:ne.trace,components:[]}})},ce)}function mapProperties(ne={},oe){const ce={};for(const ue of Object.keys(ne))ce[ue]=ue==="$"?ne[ue]:oe(ne[ue],ue,ne);return Object.setPrototypeOf(ce,ne)}function normalize(ne={}){return mapProperties(ne,oe=>lodashExports.isFunction(oe)?oe:parseProperty(oe))}const parseToken=ne=>{const oe=Function("$",`return ${ne};`);return ce=>oe(new Proxy(normalize(ce),{get(ue,pe){return typeof(ue==null?void 0:ue[pe])=="function"?ue[pe]({}):ue==null?void 0:ue[pe]}}))},openBrace=/^\{\{\s*/,closeBrace=/^\s*\}\}/,neverMatch=/\b\B/,parser$2=distExports.parseStringTemplateGenerator({VARIABLE_START:openBrace,VARIABLE_END:closeBrace,PIPE_START:neverMatch,PIPE_PARAMETER_START:neverMatch,QUOTED_STRING:neverMatch}),parseString=memoizee$1(ne=>{const oe=parser$2(ne);return lodashExports.join(oe.literals,"")?ce=>distExports.evaluateParsedString(oe,{},{},ue=>parseToken(ue)(ce)):parseToken(oe.variables[0].name)},{primitive:!0});function parseProperty(ne){switch(ne==null?void 0:ne.constructor){case Array:{const oe=lodashExports.map(ne,parseProperty);return ce=>lodashExports.map(oe,ue=>ue(ce))}case Object:{const oe=lodashExports.mapValues(ne,parseProperty);return ce=>lodashExports.mapValues(oe,ue=>ue(ce))}case String:return parseString(ne);default:return()=>ne}}function useTraceContent(ne){const oe=compilerRuntimeExports.c(24),ce=useSnackbar(),ue=useLoadingState("specimen"),pe=useConnectionResolver(),[me]=useFeatures(),{traces:ge}=me;let ye,xe;oe[0]!==ce||oe[1]!==pe?(xe=memoizee$1(async Ne=>{const{source:je,id:ze}=Ne;if(je&&ze){const Ue=pe({url:je});if(Ue){ce("Fetching trace...");const qe=await Ue.transport().call("features/trace",{id:ze});return console.log(qe==null?void 0:qe.content),qe==null?void 0:qe.content}}},{normalizer:JSON.stringify}),oe[0]=ce,oe[1]=pe,oe[2]=xe):xe=oe[2],ye=xe;const ve=ye;let _e;oe[3]!==ne?(_e=ne??{},oe[3]=ne,oe[4]=_e):_e=oe[4];const{content:we,source:Se,id:$e,key:Te}=_e;let Re;oe[5]!==$e||oe[6]!==Se||oe[7]!==ge?(Re=lodashExports.find(ge,{id:$e,source:Se})??{},oe[5]=$e,oe[6]=Se,oe[7]=ge,oe[8]=Re):Re=oe[8];const{lastModified:Ae}=Re;let ke;oe[9]!==we||oe[10]!==ve||oe[11]!==$e||oe[12]!==Ae||oe[13]!==Se||oe[14]!==ne||oe[15]!==ue?(ke=()=>ue(async()=>{if($e){if(we)return{...ne,content:we};{const Ne=await ve({source:Se,id:$e,lastModified:Ae});return{...ne,content:Ne}}}}),oe[9]=we,oe[10]=ve,oe[11]=$e,oe[12]=Ae,oe[13]=Se,oe[14]=ne,oe[15]=ue,oe[16]=ke):ke=oe[16];const Be=!!we;let Ie;return oe[17]!==ve||oe[18]!==$e||oe[19]!==Te||oe[20]!==Ae||oe[21]!==Se||oe[22]!==Be?(Ie=[ve,Be,Te,Se,$e,Ae],oe[17]=ve,oe[18]=$e,oe[19]=Te,oe[20]=Ae,oe[21]=Se,oe[22]=Be,oe[23]=Ie):Ie=oe[23],useAsync(ke,Ie)}const labelScale=1.25,reuseCanvas={canvas:document.createElement("canvas")};function getTextWidth(ne,oe){const ue=(reuseCanvas.canvas||(reuseCanvas.canvas=document.createElement("canvas"))).getContext("2d");return ue.font=oe,ue.measureText(ne).width}const isNullish=ne=>ne==null;function makePathIndex(ne){const oe=[],ce={},ue={},pe=lodashExports.chain(ne==null?void 0:ne.events).map((ye,xe)=>({step:xe,id:ye.id,pId:ye.pId})).groupBy("id").value();lodashExports.forEach(ne==null?void 0:ne.events,({id:ye,pId:xe},ve)=>{!isNullish(xe)&&ce[ye]!==xe&&(oe.push({id:ye,pId:xe,step:ve,prev:lodashExports.last(oe)}),ce[ye]=xe),ue[ve]=lodashExports.last(oe)});const me=(ye,xe=(ve=>(ve=ne==null?void 0:ne.events)==null?void 0:ve.length)()??0)=>{let _e=ue[xe];for(;_e;){if(_e.id===ye)return _e.pId;_e=_e.prev}};return{getParent:me,getPath:ye=>{const xe=[ye];let ve={...(ne.events??[])[ye],step:ye};for(;ve;){const _e=me(ve.id,ve.step);if(_e){const we=lodashExports.findLast(pe[_e],Se=>Se.step<=ve.step);if(we)xe.push(we.step),ve=we;else break}else break}return xe}}}const controller$1={key:"trace",icon:jsxRuntimeExports.jsx(SvgIcon$w,{}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Trace"},error:ne=>{var oe,ce,ue,pe;return((ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.trace)==null?void 0:ce.error)||((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.parsedTrace)==null?void 0:pe.error)},compress:ne=>lodashExports.pick(ne,["trace","onion","step","code","breakpoints"]),claimImportedFile:async ne=>isTraceFormat(ne)?{claimed:!0,layer:async oe=>{oe("Opening trace...");try{return{trace:await readUploadedTrace(ne).read()}}catch(ce){return console.error(ce),oe(`Error opening, ${lodashExports.get(ce,"message")}`),{trace:{key:nanoid(),id:custom$1().id,error:lodashExports.get(ce,"message"),name:lodashExports.startCase(name$2(ne.name))}}}}}:{claimed:!1},editor:withProduce(({value:ne,produce:oe})=>{var ce,ue,pe,me,ge,ye,xe,ve,_e,we,Se;return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Trace",content:jsxRuntimeExports.jsx(TracePicker,{onChange:$e=>oe(Te=>lodashExports.set(Te,"source.trace",$e)),value:(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace})}),((pe=(ue=ne==null?void 0:ne.source)==null?void 0:ue.trace)==null?void 0:pe.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(ge=(me=ne==null?void 0:ne.source)==null?void 0:me.trace)==null?void 0:ge.error})}),((xe=(ye=ne==null?void 0:ne.source)==null?void 0:ye.parsedTrace)==null?void 0:xe.error)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"error",sx:{whiteSpace:"pre-wrap",mb:1,mt:1},children:jsxRuntimeExports.jsx("code",{children:(_e=(ve=ne==null?void 0:ne.source)==null?void 0:ve.parsedTrace)==null?void 0:_e.error})}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(Se=(we=ne==null?void 0:ne.source)==null?void 0:we.parsedTrace)==null?void 0:Se.content})})]})}),service:withProduce(({value:ne,produce:oe})=>{var ye;const{palette:ce}=useTheme(),{result:ue,loading:pe}=useTraceContent((ye=ne==null?void 0:ne.source)==null?void 0:ye.trace);reactExports.useEffect(()=>{oe(xe=>{var ve,_e;return lodashExports.set(xe,"source.playbackTo",((_e=(ve=ue==null?void 0:ue.content)==null?void 0:ve.events)==null?void 0:_e.length)??0)})},[ue==null?void 0:ue.key]);const{isTrusted:me}=useUntrustedLayers(),ge=useTraceParser({trace:ue==null?void 0:ue.content,context:{theme:{foreground:ce.text.primary,background:ce.background.paper,accent:ce.primary.main},color:{...colorsHex,...lodashExports.mapValues(accentColors,(xe,ve)=>getShade(ve,ce.mode,500,400))},themeAccent:ce.primary.main,themeTextPrimary:ce.text.primary,themeBackground:ce.background.paper},view:"main"},me,[ue==null?void 0:ue.key,ce.mode,me]);return useAsync$1(async()=>{if(ge&&!pe){const xe=await ge();oe(ve=>{lodashExports.set(ve,"source.parsedTrace",xe),lodashExports.set(ve,"viewKey",nanoid())})}},[pe,ge]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(PlaybackService,{value:ne})})}),renderer:({layer:ne,index:oe})=>{var xe,ve,_e;const ce=(ve=(xe=ne==null?void 0:ne.source)==null?void 0:xe.parsedTrace)==null?void 0:ve.components,ue=useThrottle(((_e=ne==null?void 0:ne.source)==null?void 0:_e.step)??0,1e3/60),pe=use2DPath(ne,oe,ue),me=reactExports.useMemo(()=>lodashExports.map(ce==null?void 0:ce.stepsPersistent,we=>lodashExports.map(we,Se=>lodashExports.merge(Se,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsPersistent,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ge=reactExports.useMemo(()=>lodashExports.map(ce==null?void 0:ce.stepsTransient,we=>lodashExports.map(we,Se=>lodashExports.merge(Se,{meta:{sourceLayer:ne==null?void 0:ne.key,sourceLayerIndex:oe,sourceLayerAlpha:1-.01*+((ne==null?void 0:ne.transparency)??0),sourceLayerDisplayMode:(ne==null?void 0:ne.displayMode)??"source-over"}}))),[ce==null?void 0:ce.stepsTransient,ne==null?void 0:ne.key,ne==null?void 0:ne.transparency,ne==null?void 0:ne.displayMode,oe]),ye=reactExports.useMemo(()=>[ge[ue]??[]],[ge,ue]);return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(LazyNodeList,{end:ue,nodes:me}),jsxRuntimeExports.jsx(NodeList,{nodes:ye}),pe]})},steps:ne=>{var oe,ce,ue;return((ue=(ce=(oe=ne==null?void 0:ne.source)==null?void 0:oe.parsedTrace)==null?void 0:ce.content)==null?void 0:ue.events)??[]},provideSelectionInfo:({layer:ne,event:oe,children:ce})=>{const{layer:ue,setLayer:pe}=useLayer(ne),me=reactExports.useMemo(()=>{var ve,_e,we,Se,$e;const ge=((we=(_e=(ve=ue==null?void 0:ue.source)==null?void 0:ve.parsedTrace)==null?void 0:_e.content)==null?void 0:we.events)??[],ye=lodashExports.chain((Se=oe==null?void 0:oe.info)==null?void 0:Se.components).filter(Te=>{var Re;return((Re=Te.meta)==null?void 0:Re.sourceLayer)===(ue==null?void 0:ue.key)}).map(Te=>{var Re;return(Re=Te.meta)==null?void 0:Re.step}).filter(lodashExports.negate(lodashExports.isUndefined)).sort((Te,Re)=>Te-Re).value(),xe=lodashExports.chain(($e=oe==null?void 0:oe.info)==null?void 0:$e.components).filter(Te=>{var Re;return((Re=Te.meta)==null?void 0:Re.sourceLayer)===(ue==null?void 0:ue.key)}).filter(Te=>{var Re;return(Re=Te.meta)==null?void 0:Re.info}).value();if(ye.length&&ue){const Te=lodashExports.last(ye),Re=ge[Te];if(Re)return{...lodashExports.keyBy(lodashExports.map(xe,(Ae,ke)=>({key:`${ue.key}.${ke}`,primary:`Selection in ${inferLayerName(ue)}`,items:{info:{index:-1,primary:jsxRuntimeExports.jsx(PropertyList,{event:Ae.meta.info,vertical:!0})}}})),"key"),[ue.key]:{primary:inferLayerName(ue),items:{properties:{index:-2,primary:jsxRuntimeExports.jsx(PropertyList,{event:Re,vertical:!0,simple:!0,primitives:!0})},propertiesDetails:{index:-1,extras:jsxRuntimeExports.jsx(PropertyDialog,{event:Re,trigger:Ae=>jsxRuntimeExports.jsxs(MenuItem,{onClick:Ae,children:[jsxRuntimeExports.jsx(ListItemIcon,{children:jsxRuntimeExports.jsx(SvgIcon$S,{})}),jsxRuntimeExports.jsx(ListItemText,{sx:{mr:4},children:"See properties"}),jsxRuntimeExports.jsxs(Typography,{component:"div",variant:"body2",color:"text.secondary",children:["Step ",Te]})]})})},[`${Re}`]:{primary:`Go to step ${Te}`,secondary:`${lodashExports.startCase(Re.type)}`,action:()=>pe(produce(ue,Ae=>{lodashExports.set(Ae,"source.step",Te)})),icon:jsxRuntimeExports.jsx(SvgIcon$Z,{})}}}}}return{}},[ue,oe]);return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:ce==null?void 0:ce(me)})},getSources:ne=>{var ce;const oe=(ce=ne==null?void 0:ne.source)==null?void 0:ce.trace;return oe?[{id:"trace",name:`${oe.name}`,language:"yaml",content:dump(oe.content,{noCompatMode:!0})}]:[]}},labelSize=.8;function use2DPath(ne,oe=0,ce=0){var ge,ye,xe;const{palette:ue}=useTheme(),{getPath:pe}=reactExports.useMemo(()=>{var ve,_e,we;return((ve=ne==null?void 0:ne.source)==null?void 0:ve.playback)!=="playing"&&((we=(_e=ne==null?void 0:ne.source)==null?void 0:_e.parsedTrace)!=null&&we.content)?makePathIndex(ne.source.parsedTrace.content):{getParent:lodashExports.constant(void 0),getPath:lodashExports.constant([])}},[(ye=(ge=ne==null?void 0:ne.source)==null?void 0:ge.parsedTrace)==null?void 0:ye.content,(xe=ne==null?void 0:ne.source)==null?void 0:xe.playback]);return reactExports.useMemo(()=>{var we,Se,$e,Te,Re,Ae,ke,Be,Ie,Ne,je,ze;const ve=interpolate$1([ue.background.paper,ue.text.primary])(.05),_e=(Se=(we=ne==null?void 0:ne.source)==null?void 0:we.parsedTrace)==null?void 0:Se.content;if(($e=_e==null?void 0:_e.render)!=null&&$e.path||_e!=null&&_e.pivot){const Ue=((Re=(Te=_e==null?void 0:_e.render)==null?void 0:Te.path)==null?void 0:Re.pivot)??(_e==null?void 0:_e.pivot)??{},qe=(ke=(Ae=_e==null?void 0:_e.render)==null?void 0:Ae.path)!=null&&ke.scale?_e.render.path.scale*(1/.3):((Be=_e==null?void 0:_e.pivot)==null?void 0:Be.scale)??1,{x:Ke,y:Ge}=Ue,Ye=(_e==null?void 0:_e.version)==="1.4.0"?parseProperty$1:Tt=>Ut=>parseProperty(Tt)({event:Ut}),Xe=Ke?Ye(Ke):Tt=>Tt.x,Je=Ge?Ye(Ge):Tt=>Tt.y,Qe=lodashExports.map(pe(ce),Tt=>{var Ut;return(Ut=_e==null?void 0:_e.events)==null?void 0:Ut[Tt]}),Ze={x:Xe({x:0,y:0,...lodashExports.head(Qe)}),y:Je({x:0,y:0,...lodashExports.head(Qe)})};if(Qe.length){const Tt=`${lodashExports.startCase((Ie=lodashExports.head(Qe))==null?void 0:Ie.type)} ${(Ne=lodashExports.head(Qe))==null?void 0:Ne.id}`,Ut=getTextWidth(Tt,`${labelSize*qe*labelScale}px Inter`),Gt=[{$:"circle",x:Xe({x:0,y:0,...lodashExports.last(Qe)}),y:Je({x:0,y:0,...lodashExports.last(Qe)}),fill:ue.primary.main,radius:.3*qe},{$:"path",points:Qe.map(Nt=>({x:Xe({x:0,y:0,...Nt}),y:Je({x:0,y:0,...Nt})})),fill:ue.primary.main,alpha:1,lineWidth:.3*qe},{$:"circle",...Ze,fill:ue.primary.main,radius:.3*qe},{$:"rect",alpha:.85,fill:ve,x:Ze.x-.3*qe*labelScale,y:Ze.y-2*qe*labelScale,width:Ut+(.8+.5)*qe*labelScale,height:1.4*qe*labelScale},{$:"path",points:[{x:Ze.x,y:Ze.y},{x:Ze.x+(-.3-.05)*qe*labelScale,y:Ze.y+(-2+1.4)*qe*labelScale}],fill:getColorHex((je=lodashExports.head(Qe))==null?void 0:je.type),alpha:1,lineWidth:.1*qe*labelScale},{$:"rect",x:Ze.x+(-.3-.1)*qe*labelScale,y:Ze.y+-2*qe*labelScale,fill:getColorHex((ze=lodashExports.head(Qe))==null?void 0:ze.type),height:1.4*qe*labelScale,width:.1*qe*labelScale},{$:"rect",alpha:0,fill:"rgba(255, 255, 255, 0)",x:Ze.x-.3*qe*labelScale,y:Ze.y-2*qe*labelScale,width:Ut*2,height:1*qe*labelScale,label:Tt,"label-size":labelSize*qe*labelScale,"label-x":(.1+.5)*qe*labelScale,"label-y":1*qe*labelScale,"label-color":ue.text.primary}];return jsxRuntimeExports.jsx(NodeList,{nodes:[lodashExports.map(Gt,Nt=>({component:Nt,meta:{source:"path",sourceLayerIndex:-99999+oe}}))]})}}return jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{})},[ne,oe,ce,ue,pe])}const mapValuesDeep=(ne,oe)=>lodashExports.isArray(ne)?lodashExports.map(ne,ce=>mapValuesDeep(ce,oe)):lodashExports.isObject(ne)?lodashExports.mapValues(ne,ce=>mapValuesDeep(ce,oe)):oe(ne);async function findConnection(ne,oe,ce){for(const ue of ne){const pe=await ue.transport().call("features/algorithms"),me=await ue.transport().call("features/formats");if(lodashExports.find(pe,{id:oe})&&lodashExports.find(me,{id:ce}))return ue}}const maxStringPropLength=40,controller={...lodashExports.omit(controller$1,"claimImportedFile"),key:"query",icon:jsxRuntimeExports.jsx(SvgIcon$w,{}),compress:ne=>lodashExports.pick(ne,["mapLayerKey","query","start","end","algorithm","onion","step","code","breakpoints"]),editor:withProduce(({value:ne,produce:oe})=>{var ve,_e;const{algorithm:ce}=(ne==null?void 0:ne.source)??{},{layers:ue,allLayers:pe,layer:me,key:ge}=useLayer(void 0,we=>{var Se;return((Se=we.source)==null?void 0:Se.type)==="map"}),[{algorithms:ye}]=useFeatures(),[xe]=useConnections();return jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment,{children:[jsxRuntimeExports.jsx(Option,{label:"Algorithm",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(SvgIcon$T,{}),label:"Algorithm",value:ce,items:ye.map(we=>{var Se;return{...we,description:(Se=lodashExports.find(xe,{url:we.source}))==null?void 0:Se.name}}),onChange:async we=>oe(Se=>lodashExports.set(Se,"source.algorithm",we))})}),!(ye!=null&&ye.length)&&jsxRuntimeExports.jsx(Typography,{component:"div",variant:"body2",color:"warning.main",sx:{mb:1},children:"No connected solver has declared support for running algorithms"}),jsxRuntimeExports.jsx(Option,{label:"Map",content:jsxRuntimeExports.jsx(FeaturePicker,{arrow:!0,paper:!0,icon:jsxRuntimeExports.jsx(SvgIcon$G,{}),label:"Layer",value:ge,items:pe.map(we=>({id:we.key,hidden:!lodashExports.find(ue,Se=>Se.key===we.key),name:inferLayerName(we)})),onChange:async we=>oe(Se=>lodashExports.set(Se,"source.mapLayerKey",we))})}),me&&jsxRuntimeExports.jsxs(Typography,{component:"div",variant:"body2",color:"text.secondary",sx:{mb:1,mt:1},children:["Define source and destination nodes by clicking on valid regions on"," ",inferLayerName(me)]}),jsxRuntimeExports.jsx(Heading,{label:"Preview"}),jsxRuntimeExports.jsx(Box,{sx:{height:240,mx:-2},children:jsxRuntimeExports.jsx(TracePreview,{trace:(_e=(ve=ne==null?void 0:ne.source)==null?void 0:ve.trace)==null?void 0:_e.content})})]})}),service:withProduce(({value:ne,produce:oe,onChange:ce})=>{var Te;const ue=controller$1.service,pe=useSnackbar(),{algorithm:me,mapLayerKey:ge,start:ye,end:xe}=(ne==null?void 0:ne.source)??{},[{layers:ve}]=useLayers(),[_e]=useConnections(),[{algorithms:we}]=useFeatures(),Se=reactExports.useMemo(()=>{if(ge&&me)return lodashExports.find(ve,{key:ge})},[ge,me,ve]),{result:$e}=useMapContent((Te=Se==null?void 0:Se.source)==null?void 0:Te.map);return useEffectWhenAsync(async Re=>{var Ae;if(Se&&$e&&me){const{format:ke}=((Ae=Se==null?void 0:Se.source)==null?void 0:Ae.map)??{},{content:Be}=$e??{};if(ke&&Be){const Ie=await findConnection(_e,me,ke),Ne=lodashExports.find(we,{id:me});if(Ie){pe(`Executing ${inferLayerName(ne)} using ${Ie.name}...`);const je={format:ke,instances:[{start:ye??0,end:xe??0}],mapURI:`map:${encodeURIComponent(Be)}`,algorithm:me},ze=await Ie.transport().call("solve/pathfinding",je);Re.aborted?pe("Canceled"):oe(Ue=>{lodashExports.set(Ue,"source.trace",{name:`${Ne==null?void 0:Ne.name}`,content:ze,key:nanoid(),id:nanoid()}),lodashExports.set(Ue,"source.query",je)})}}}},[Se,_e,me,ye,xe,oe,pe,ne,we],[Se,$e,_e,me,ye,xe]),jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment,{children:jsxRuntimeExports.jsx(ue,{value:ne,onChange:ce})})}),inferName:ne=>{var oe,ce;return((ce=(oe=ne.source)==null?void 0:oe.trace)==null?void 0:ce.name)??"Untitled Query"},provideSelectionInfo:({children:ne,event:oe,layer:ce})=>{const ue=controller$1.provideSelectionInfo,{layer:pe,setLayer:me,layers:ge}=useLayer(ce),ye=reactExports.useMemo(()=>{const ve=lodashExports.filter(ge,{source:{type:"map"}});return lodashExports.filter(lodashExports.map(ve,_e=>{var Se,$e,Te,Re;const{parsedMap:we}=(_e==null?void 0:_e.source)??{};if(we&&oe){const Ae=(Re=(Te=getParser(($e=(Se=_e==null?void 0:_e.source)==null?void 0:Se.map)==null?void 0:$e.format))==null?void 0:Te.hydrate)==null?void 0:Re.call(Te,we);if(Ae){const ke=(oe==null?void 0:oe.world)&&Ae.snap(oe.world);if(ke){const Be=(oe==null?void 0:oe.world)&&Ae.nodeAt(ke);return{point:ke,node:Be,key:_e.key,name:inferLayerName(_e)}}}}}))},[ge]),xe=reactExports.useMemo(()=>!!pe&&!!ye.length&&{[pe.key]:{primary:inferLayerName(pe),items:{...lodashExports.reduce(ye,(ve,_e)=>({...ve,[`${ce}-${_e==null?void 0:_e.key}-source`]:{primary:"Set as source",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,we=>{lodashExports.set(we,"source.start",_e==null?void 0:_e.node),lodashExports.set(we,"source.query",void 0),lodashExports.set(we,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports.set(we,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(SvgIcon$q,{sx:{transform:"scale(0.5)"}})},[`${ce}-${_e==null?void 0:_e.key}-destination`]:{primary:"Set as destination",secondary:_e==null?void 0:_e.name,action:()=>me(produce(pe,we=>{lodashExports.set(we,"source.end",_e==null?void 0:_e.node),lodashExports.set(we,"source.query",void 0),lodashExports.set(we,"source.mapLayerKey",_e==null?void 0:_e.key),lodashExports.set(we,"source.trace",void 0)})),icon:jsxRuntimeExports.jsx(SvgIcon$E,{})}}),{})}}},[ye,pe,ge,me]);return jsxRuntimeExports.jsx(ue,{event:oe,layer:ce,children:ve=>ne==null?void 0:ne(lodashExports.merge(ve,xe))})},getSources:ne=>{const{algorithm:oe=null,start:ce=0,end:ue=0,query:pe}=(ne==null?void 0:ne.source)??{};return[{id:"params",name:"Query",language:"yaml",content:dump({algorithm:oe,instances:[{start:ce,end:ue}],mapURI:"(...)",format:"(...)",...mapValuesDeep(pe,me=>typeof me=="string"&&me.length>maxStringPropLength?`${lodashExports.truncate(me,{length:maxStringPropLength})} (${me.length} characters)`:me)},{noCompatMode:!0})},...controller$1.getSources(ne)]}};function getController(ne){var oe;return getControllers()[((oe=ne==null?void 0:ne.source)==null?void 0:oe.type)??""]}const getControllers=lodashExports.once(()=>({trace:controller$1,map:controller$2,query:controller}));var byte_size={STRING:2,BOOLEAN:4,BYTES:4,NUMBER:8,Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},buffer={},base64Js={},hasRequiredBase64Js;function requireBase64Js(){if(hasRequiredBase64Js)return base64Js;hasRequiredBase64Js=1,base64Js.byteLength=ye,base64Js.toByteArray=ve,base64Js.fromByteArray=Se;for(var ne=[],oe=[],ce=typeof Uint8Array<"u"?Uint8Array:Array,ue="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pe=0,me=ue.length;pe0)throw new Error("Invalid string. Length must be a multiple of 4");var Re=$e.indexOf("=");Re===-1&&(Re=Te);var Ae=Re===Te?0:4-Re%4;return[Re,Ae]}function ye($e){var Te=ge($e),Re=Te[0],Ae=Te[1];return(Re+Ae)*3/4-Ae}function xe($e,Te,Re){return(Te+Re)*3/4-Re}function ve($e){var Te,Re=ge($e),Ae=Re[0],ke=Re[1],Be=new ce(xe($e,Ae,ke)),Ie=0,Ne=ke>0?Ae-4:Ae,je;for(je=0;je>16&255,Be[Ie++]=Te>>8&255,Be[Ie++]=Te&255;return ke===2&&(Te=oe[$e.charCodeAt(je)]<<2|oe[$e.charCodeAt(je+1)]>>4,Be[Ie++]=Te&255),ke===1&&(Te=oe[$e.charCodeAt(je)]<<10|oe[$e.charCodeAt(je+1)]<<4|oe[$e.charCodeAt(je+2)]>>2,Be[Ie++]=Te>>8&255,Be[Ie++]=Te&255),Be}function _e($e){return ne[$e>>18&63]+ne[$e>>12&63]+ne[$e>>6&63]+ne[$e&63]}function we($e,Te,Re){for(var Ae,ke=[],Be=Te;BeNe?Ne:Ie+Be));return Ae===1?(Te=$e[Re-1],ke.push(ne[Te>>2]+ne[Te<<4&63]+"==")):Ae===2&&(Te=($e[Re-2]<<8)+$e[Re-1],ke.push(ne[Te>>10]+ne[Te>>4&63]+ne[Te<<2&63]+"=")),ke.join("")}return base64Js}var ieee754$1={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */var hasRequiredIeee754;function requireIeee754(){return hasRequiredIeee754||(hasRequiredIeee754=1,ieee754$1.read=function(ne,oe,ce,ue,pe){var me,ge,ye=pe*8-ue-1,xe=(1<>1,_e=-7,we=ce?pe-1:0,Se=ce?-1:1,$e=ne[oe+we];for(we+=Se,me=$e&(1<<-_e)-1,$e>>=-_e,_e+=ye;_e>0;me=me*256+ne[oe+we],we+=Se,_e-=8);for(ge=me&(1<<-_e)-1,me>>=-_e,_e+=ue;_e>0;ge=ge*256+ne[oe+we],we+=Se,_e-=8);if(me===0)me=1-ve;else{if(me===xe)return ge?NaN:($e?-1:1)*(1/0);ge=ge+Math.pow(2,ue),me=me-ve}return($e?-1:1)*ge*Math.pow(2,me-ue)},ieee754$1.write=function(ne,oe,ce,ue,pe,me){var ge,ye,xe,ve=me*8-pe-1,_e=(1<>1,Se=pe===23?Math.pow(2,-24)-Math.pow(2,-77):0,$e=ue?0:me-1,Te=ue?1:-1,Re=oe<0||oe===0&&1/oe<0?1:0;for(oe=Math.abs(oe),isNaN(oe)||oe===1/0?(ye=isNaN(oe)?1:0,ge=_e):(ge=Math.floor(Math.log(oe)/Math.LN2),oe*(xe=Math.pow(2,-ge))<1&&(ge--,xe*=2),ge+we>=1?oe+=Se/xe:oe+=Se*Math.pow(2,1-we),oe*xe>=2&&(ge++,xe/=2),ge+we>=_e?(ye=0,ge=_e):ge+we>=1?(ye=(oe*xe-1)*Math.pow(2,pe),ge=ge+we):(ye=oe*Math.pow(2,we-1)*Math.pow(2,pe),ge=0));pe>=8;ne[ce+$e]=ye&255,$e+=Te,ye/=256,pe-=8);for(ge=ge<0;ne[ce+$e]=ge&255,$e+=Te,ge/=256,ve-=8);ne[ce+$e-Te]|=Re*128}),ieee754$1}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh diff --git a/assets/parseGrid.worker-CTnsDGUU.js b/assets/parseGrid.worker-CTnsDGUU.js deleted file mode 100644 index 5444bcc..0000000 --- a/assets/parseGrid.worker-CTnsDGUU.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function $a(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Da={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]},gu=Da,Ua=Na,pu={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Na(a){var g,u=[],A=1,x;if(typeof a=="string")if(a=a.toLowerCase(),gu[a])u=gu[a].slice(),x="rgb";else if(a==="transparent")A=0,x="rgb",u=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(a)){var y=a.slice(1),w=y.length,O=w<=4;A=1,O?(u=[parseInt(y[0]+y[0],16),parseInt(y[1]+y[1],16),parseInt(y[2]+y[2],16)],w===4&&(A=parseInt(y[3]+y[3],16)/255)):(u=[parseInt(y[0]+y[1],16),parseInt(y[2]+y[3],16),parseInt(y[4]+y[5],16)],w===8&&(A=parseInt(y[6]+y[7],16)/255)),u[0]||(u[0]=0),u[1]||(u[1]=0),u[2]||(u[2]=0),x="rgb"}else if(g=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(a)){var b=g[1],I=b==="rgb",y=b.replace(/a$/,"");x=y;var w=y==="cmyk"?4:y==="gray"?1:3;u=g[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(E,q){if(/%$/.test(E))return q===w?parseFloat(E)/100:y==="rgb"?parseFloat(E)*255/100:parseFloat(E);if(y[q]==="h"){if(/deg$/.test(E))return parseFloat(E);if(pu[E]!==void 0)return pu[E]}return parseFloat(E)}),b===y&&u.push(1),A=I||u[w]===void 0?1:u[w],u=u.slice(0,w)}else a.length>10&&/[0-9](?:\s|\/)/.test(a)&&(u=a.match(/([0-9]+)/g).map(function(U){return parseFloat(U)}),x=a.match(/([a-z])/ig).join("").toLowerCase());else isNaN(a)?Array.isArray(a)||a.length?(u=[a[0],a[1],a[2]],x="rgb",A=a.length===4?a[3]:1):a instanceof Object&&(a.r!=null||a.red!=null||a.R!=null?(x="rgb",u=[a.r||a.red||a.R||0,a.g||a.green||a.G||0,a.b||a.blue||a.B||0]):(x="hsl",u=[a.h||a.hue||a.H||0,a.s||a.saturation||a.S||0,a.l||a.lightness||a.L||a.b||a.brightness]),A=a.a||a.alpha||a.opacity||1,a.opacity!=null&&(A/=100)):(x="rgb",u=[a>>>16,(a&65280)>>>8,a&255]);return{space:x,values:u,alpha:A}}var Ga={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Ha=Ga,za={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(a){var g=a[0]/360,u=a[1]/100,A=a[2]/100,x,y,w,O,b;if(u===0)return b=A*255,[b,b,b];A<.5?y=A*(1+u):y=A+u-A*u,x=2*A-y,O=[0,0,0];for(var I=0;I<3;I++)w=g+1/3*-(I-1),w<0?w++:w>1&&w--,6*w<1?b=x+(y-x)*6*w:2*w<1?b=y:3*w<2?b=x+(y-x)*(2/3-w)*6:b=x,O[I]=b*255;return O}};Ha.hsl=function(a){var g=a[0]/255,u=a[1]/255,A=a[2]/255,x=Math.min(g,u,A),y=Math.max(g,u,A),w=y-x,O,b,I;return y===x?O=0:g===y?O=(u-A)/w:u===y?O=2+(A-g)/w:A===y&&(O=4+(g-u)/w),O=Math.min(O*60,360),O<0&&(O+=360),I=(x+y)/2,y===x?b=0:I<=.5?b=w/(y+x):b=w/(2-y-x),[O,b*100,I*100]};function Ka(a,g,u){return a*(1-u)+g*u}var Ya=Ka,Za=Xa;function Xa(a,g,u){return gu?u:a:ag?g:a}const Ja=Ua,Qa=za,Va=Ya,ka=Za;var ja=nl;function nl(a){return a=a.map(function(g){if(g=Ja(g),g.space!="rgb"){if(g.space!="hsl")throw"c.spacespace is not supported.";g.values=Qa.rgb(g.values)}return g.values.push(g.alpha),g.values}),function(g,u){u=u||Va,g=ka(g,0,1);var A=(a.length-1)*g,x=Math.floor(A),y=Math.ceil(A);g=A-x;var w=a[x],O=a[y],b=w.map(function(I,U){return I=u(I,O[U],g),U<3&&(I=Math.round(I)),I});return b[3]===1?"rgb("+b.slice(0,3)+")":"rgba("+b+")"}}var el=$a(ja),dr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */dr.exports,function(a,g){(function(){var u,A="4.17.21",x=200,y="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",w="Expected a function",O="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",I=500,U="__lodash_placeholder__",Z=1,E=2,q=4,un=1,an=2,M=1,_n=2,$=4,C=8,z=16,Q=32,k=64,en=128,cn=256,Kt=512,is=30,us="...",fs=800,os=16,uf=1,as=2,ls=3,me=1/0,ae=9007199254740991,ss=17976931348623157e292,mr=NaN,Xn=4294967295,cs=Xn-1,hs=Xn>>>1,gs=[["ary",en],["bind",M],["bindKey",_n],["curry",C],["curryRight",z],["flip",Kt],["partial",Q],["partialRight",k],["rearg",cn]],Ce="[object Arguments]",wr="[object Array]",ps="[object AsyncFunction]",Xe="[object Boolean]",Je="[object Date]",_s="[object DOMException]",yr="[object Error]",xr="[object Function]",ff="[object GeneratorFunction]",Gn="[object Map]",Qe="[object Number]",ds="[object Null]",kn="[object Object]",of="[object Promise]",vs="[object Proxy]",Ve="[object RegExp]",Hn="[object Set]",ke="[object String]",br="[object Symbol]",ms="[object Undefined]",je="[object WeakMap]",ws="[object WeakSet]",nr="[object ArrayBuffer]",Le="[object DataView]",Yt="[object Float32Array]",Zt="[object Float64Array]",Xt="[object Int8Array]",Jt="[object Int16Array]",Qt="[object Int32Array]",Vt="[object Uint8Array]",kt="[object Uint8ClampedArray]",jt="[object Uint16Array]",ni="[object Uint32Array]",ys=/\b__p \+= '';/g,xs=/\b(__p \+=) '' \+/g,bs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,af=/&(?:amp|lt|gt|quot|#39);/g,lf=/[&<>"']/g,As=RegExp(af.source),Ss=RegExp(lf.source),Is=/<%-([\s\S]+?)%>/g,Rs=/<%([\s\S]+?)%>/g,sf=/<%=([\s\S]+?)%>/g,Os=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ts=/^\w*$/,Es=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ei=/[\\^$.*+?()[\]{}|]/g,Cs=RegExp(ei.source),ri=/^\s+/,Ls=/\s/,Ps=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Fs=/\{\n\/\* \[wrapped with (.+)\] \*/,qs=/,? & /,Ms=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ws=/[()=,{}\[\]\/\s]/,Bs=/\\(\\)?/g,$s=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,cf=/\w*$/,Ds=/^[-+]0x[0-9a-f]+$/i,Us=/^0b[01]+$/i,Ns=/^\[object .+?Constructor\]$/,Gs=/^0o[0-7]+$/i,Hs=/^(?:0|[1-9]\d*)$/,zs=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,Ks=/['\n\r\u2028\u2029\\]/g,Sr="\\ud800-\\udfff",Ys="\\u0300-\\u036f",Zs="\\ufe20-\\ufe2f",Xs="\\u20d0-\\u20ff",hf=Ys+Zs+Xs,gf="\\u2700-\\u27bf",pf="a-z\\xdf-\\xf6\\xf8-\\xff",Js="\\xac\\xb1\\xd7\\xf7",Qs="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Vs="\\u2000-\\u206f",ks=" \\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",_f="A-Z\\xc0-\\xd6\\xd8-\\xde",df="\\ufe0e\\ufe0f",vf=Js+Qs+Vs+ks,ti="['’]",js="["+Sr+"]",mf="["+vf+"]",Ir="["+hf+"]",wf="\\d+",nc="["+gf+"]",yf="["+pf+"]",xf="[^"+Sr+vf+wf+gf+pf+_f+"]",ii="\\ud83c[\\udffb-\\udfff]",ec="(?:"+Ir+"|"+ii+")",bf="[^"+Sr+"]",ui="(?:\\ud83c[\\udde6-\\uddff]){2}",fi="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+_f+"]",Af="\\u200d",Sf="(?:"+yf+"|"+xf+")",rc="(?:"+Pe+"|"+xf+")",If="(?:"+ti+"(?:d|ll|m|re|s|t|ve))?",Rf="(?:"+ti+"(?:D|LL|M|RE|S|T|VE))?",Of=ec+"?",Tf="["+df+"]?",tc="(?:"+Af+"(?:"+[bf,ui,fi].join("|")+")"+Tf+Of+")*",ic="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",uc="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Ef=Tf+Of+tc,fc="(?:"+[nc,ui,fi].join("|")+")"+Ef,oc="(?:"+[bf+Ir+"?",Ir,ui,fi,js].join("|")+")",ac=RegExp(ti,"g"),lc=RegExp(Ir,"g"),oi=RegExp(ii+"(?="+ii+")|"+oc+Ef,"g"),sc=RegExp([Pe+"?"+yf+"+"+If+"(?="+[mf,Pe,"$"].join("|")+")",rc+"+"+Rf+"(?="+[mf,Pe+Sf,"$"].join("|")+")",Pe+"?"+Sf+"+"+If,Pe+"+"+Rf,uc,ic,wf,fc].join("|"),"g"),cc=RegExp("["+Af+Sr+hf+df+"]"),hc=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,gc=["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"],pc=-1,rn={};rn[Yt]=rn[Zt]=rn[Xt]=rn[Jt]=rn[Qt]=rn[Vt]=rn[kt]=rn[jt]=rn[ni]=!0,rn[Ce]=rn[wr]=rn[nr]=rn[Xe]=rn[Le]=rn[Je]=rn[yr]=rn[xr]=rn[Gn]=rn[Qe]=rn[kn]=rn[Ve]=rn[Hn]=rn[ke]=rn[je]=!1;var nn={};nn[Ce]=nn[wr]=nn[nr]=nn[Le]=nn[Xe]=nn[Je]=nn[Yt]=nn[Zt]=nn[Xt]=nn[Jt]=nn[Qt]=nn[Gn]=nn[Qe]=nn[kn]=nn[Ve]=nn[Hn]=nn[ke]=nn[br]=nn[Vt]=nn[kt]=nn[jt]=nn[ni]=!0,nn[yr]=nn[xr]=nn[je]=!1;var _c={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},dc={"&":"&","<":"<",">":">",'"':""","'":"'"},vc={"&":"&","<":"<",">":">",""":'"',"'":"'"},mc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},wc=parseFloat,yc=parseInt,Cf=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,xc=typeof self=="object"&&self&&self.Object===Object&&self,dn=Cf||xc||Function("return this")(),ai=g&&!g.nodeType&&g,we=ai&&!0&&a&&!a.nodeType&&a,Lf=we&&we.exports===ai,li=Lf&&Cf.process,Fn=function(){try{var c=we&&we.require&&we.require("util").types;return c||li&&li.binding&&li.binding("util")}catch{}}(),Pf=Fn&&Fn.isArrayBuffer,Ff=Fn&&Fn.isDate,qf=Fn&&Fn.isMap,Mf=Fn&&Fn.isRegExp,Wf=Fn&&Fn.isSet,Bf=Fn&&Fn.isTypedArray;function On(c,_,p){switch(p.length){case 0:return c.call(_);case 1:return c.call(_,p[0]);case 2:return c.call(_,p[0],p[1]);case 3:return c.call(_,p[0],p[1],p[2])}return c.apply(_,p)}function bc(c,_,p,R){for(var W=-1,X=c==null?0:c.length;++W-1}function si(c,_,p){for(var R=-1,W=c==null?0:c.length;++R-1;);return p}function Kf(c,_){for(var p=c.length;p--&&Fe(_,c[p],0)>-1;);return p}function Lc(c,_){for(var p=c.length,R=0;p--;)c[p]===_&&++R;return R}var Pc=pi(_c),Fc=pi(dc);function qc(c){return"\\"+mc[c]}function Mc(c,_){return c==null?u:c[_]}function qe(c){return cc.test(c)}function Wc(c){return hc.test(c)}function Bc(c){for(var _,p=[];!(_=c.next()).done;)p.push(_.value);return p}function mi(c){var _=-1,p=Array(c.size);return c.forEach(function(R,W){p[++_]=[W,R]}),p}function Yf(c,_){return function(p){return c(_(p))}}function ce(c,_){for(var p=-1,R=c.length,W=0,X=[];++p-1}function Sh(n,e){var r=this.__data__,t=Hr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}jn.prototype.clear=yh,jn.prototype.delete=xh,jn.prototype.get=bh,jn.prototype.has=Ah,jn.prototype.set=Sh;function ne(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Bn(n,e,r,t,i,o){var l,s=e&Z,h=e&E,d=e&q;if(r&&(l=i?r(n,t,i,o):r(n)),l!==u)return l;if(!fn(n))return n;var v=B(n);if(v){if(l=Tg(n),!s)return An(n,l)}else{var m=wn(n),S=m==xr||m==ff;if(ve(n))return Eo(n,s);if(m==kn||m==Ce||S&&!i){if(l=h||S?{}:Xo(n),!s)return h?vg(n,Uh(l,n)):dg(n,io(l,n))}else{if(!nn[m])return i?n:{};l=Eg(n,m,s)}}o||(o=new Kn);var T=o.get(n);if(T)return T;o.set(n,l),Aa(n)?n.forEach(function(F){l.add(Bn(F,e,r,F,n,o))}):xa(n)&&n.forEach(function(F,H){l.set(H,Bn(F,e,r,H,n,o))});var P=d?h?zi:Hi:h?In:pn,N=v?u:P(n);return qn(N||n,function(F,H){N&&(H=F,F=n[H]),or(l,H,Bn(F,e,r,H,n,o))}),l}function Nh(n){var e=pn(n);return function(r){return uo(r,n,e)}}function uo(n,e,r){var t=r.length;if(n==null)return!t;for(n=j(n);t--;){var i=r[t],o=e[i],l=n[i];if(l===u&&!(i in n)||!o(l))return!1}return!0}function fo(n,e,r){if(typeof n!="function")throw new Mn(w);return pr(function(){n.apply(u,r)},e)}function ar(n,e,r,t){var i=-1,o=Rr,l=!0,s=n.length,h=[],d=e.length;if(!s)return h;r&&(e=tn(e,Tn(r))),t?(o=si,l=!1):e.length>=x&&(o=er,l=!1,e=new be(e));n:for(;++ii?0:i+r),t=t===u||t>i?i:D(t),t<0&&(t+=i),t=r>t?0:Ia(t);r0&&r(s)?e>1?vn(s,e-1,r,t,i):se(i,s):t||(i[i.length]=s)}return i}var Ii=Mo(),lo=Mo(!0);function Jn(n,e){return n&&Ii(n,e,pn)}function Ri(n,e){return n&&lo(n,e,pn)}function Kr(n,e){return le(e,function(r){return ue(n[r])})}function Se(n,e){e=_e(e,n);for(var r=0,t=e.length;n!=null&&re}function zh(n,e){return n!=null&&V.call(n,e)}function Kh(n,e){return n!=null&&e in j(n)}function Yh(n,e,r){return n>=mn(e,r)&&n=120&&v.length>=120)?new be(l&&v):u}v=n[0];var m=-1,S=s[0];n:for(;++m-1;)s!==n&&Wr.call(s,h,1),Wr.call(n,h,1);return n}function xo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;ie(i)?Wr.call(n,i,1):Wi(n,i)}}return n}function Fi(n,e){return n+Dr(no()*(e-n+1))}function ug(n,e,r,t){for(var i=-1,o=gn($r((e-n)/(r||1)),0),l=p(o);o--;)l[t?o:++i]=n,n+=r;return l}function qi(n,e){var r="";if(!n||e<1||e>ae)return r;do e%2&&(r+=n),e=Dr(e/2),e&&(n+=n);while(e);return r}function G(n,e){return Vi(Vo(n,e,Rn),n+"")}function fg(n){return to(Ke(n))}function og(n,e){var r=Ke(n);return rt(r,Ae(e,0,r.length))}function cr(n,e,r,t){if(!fn(n))return n;e=_e(e,n);for(var i=-1,o=e.length,l=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=p(i);++t>>1,l=n[o];l!==null&&!Cn(l)&&(r?l<=e:l=x){var d=e?null:xg(n);if(d)return Tr(d);l=!1,i=er,h=new be}else h=e?[]:s;n:for(;++t=t?n:$n(n,e,r)}var To=kc||function(n){return dn.clearTimeout(n)};function Eo(n,e){if(e)return n.slice();var r=n.length,t=Jf?Jf(r):new n.constructor(r);return n.copy(t),t}function Ui(n){var e=new n.constructor(n.byteLength);return new qr(e).set(new qr(n)),e}function hg(n,e){var r=e?Ui(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function gg(n){var e=new n.constructor(n.source,cf.exec(n));return e.lastIndex=n.lastIndex,e}function pg(n){return fr?j(fr.call(n)):{}}function Co(n,e){var r=e?Ui(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Lo(n,e){if(n!==e){var r=n!==u,t=n===null,i=n===n,o=Cn(n),l=e!==u,s=e===null,h=e===e,d=Cn(e);if(!s&&!d&&!o&&n>e||o&&l&&h&&!s&&!d||t&&l&&h||!r&&h||!i)return 1;if(!t&&!o&&!d&&n=s)return h;var d=r[t];return h*(d=="desc"?-1:1)}}return n.index-e.index}function Po(n,e,r,t){for(var i=-1,o=n.length,l=r.length,s=-1,h=e.length,d=gn(o-l,0),v=p(h+d),m=!t;++s1?r[i-1]:u,l=i>2?r[2]:u;for(o=n.length>3&&typeof o=="function"?(i--,o):u,l&&xn(r[0],r[1],l)&&(o=i<3?u:o,i=1),e=j(e);++t-1?i[o?e[l]:l]:u}}function $o(n){return te(function(e){var r=e.length,t=r,i=Wn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Mn(w);if(i&&!l&&nt(o)=="wrapper")var l=new Wn([],!0)}for(t=l?t:r;++t1&&Y.reverse(),v&&hs))return!1;var d=o.get(n),v=o.get(e);if(d&&v)return d==e&&v==n;var m=-1,S=!0,T=r&an?new be:u;for(o.set(n,e),o.set(e,n);++m1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(Ps,`{ -/* [wrapped with `+e+`] */ -`)}function Lg(n){return B(n)||Oe(n)||!!(kf&&n&&n[kf])}function ie(n,e){var r=typeof n;return e=e??ae,!!e&&(r=="number"||r!="symbol"&&Hs.test(n))&&n>-1&&n%1==0&&n0){if(++e>=fs)return arguments[0]}else e=0;return n.apply(u,arguments)}}function rt(n,e){var r=-1,t=n.length,i=t-1;for(e=e===u?t:e;++r1?n[e-1]:u;return r=typeof r=="function"?(n.pop(),r):u,la(n,r)});function sa(n){var e=f(n);return e.__chain__=!0,e}function Gp(n,e){return e(n),n}function tt(n,e){return e(n)}var Hp=te(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return Si(o,n)};return e>1||this.__actions__.length||!(t instanceof K)||!ie(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:tt,args:[i],thisArg:u}),new Wn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(u),o}))});function zp(){return sa(this)}function Kp(){return new Wn(this.value(),this.__chain__)}function Yp(){this.__values__===u&&(this.__values__=Sa(this.value()));var n=this.__index__>=this.__values__.length,e=n?u:this.__values__[this.__index__++];return{done:n,value:e}}function Zp(){return this}function Xp(n){for(var e,r=this;r instanceof Gr;){var t=ta(r);t.__index__=0,t.__values__=u,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Jp(){var n=this.__wrapped__;if(n instanceof K){var e=n;return this.__actions__.length&&(e=new K(this)),e=e.reverse(),e.__actions__.push({func:tt,args:[ki],thisArg:u}),new Wn(e,this.__chain__)}return this.thru(ki)}function Qp(){return Ro(this.__wrapped__,this.__actions__)}var Vp=Jr(function(n,e,r){V.call(n,r)?++n[r]:ee(n,r,1)});function kp(n,e,r){var t=B(n)?$f:Gh;return r&&xn(n,e,r)&&(e=u),t(n,L(e,3))}function jp(n,e){var r=B(n)?le:ao;return r(n,L(e,3))}var n1=Bo(ia),e1=Bo(ua);function r1(n,e){return vn(it(n,e),1)}function t1(n,e){return vn(it(n,e),me)}function i1(n,e,r){return r=r===u?1:D(r),vn(it(n,e),r)}function ca(n,e){var r=B(n)?qn:ge;return r(n,L(e,3))}function ha(n,e){var r=B(n)?Ac:oo;return r(n,L(e,3))}var u1=Jr(function(n,e,r){V.call(n,r)?n[r].push(e):ee(n,r,[e])});function f1(n,e,r,t){n=Sn(n)?n:Ke(n),r=r&&!t?D(r):0;var i=n.length;return r<0&&(r=gn(i+r,0)),lt(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&Fe(n,e,r)>-1}var o1=G(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?p(n.length):[];return ge(n,function(l){o[++t]=i?On(e,l,r):lr(l,e,r)}),o}),a1=Jr(function(n,e,r){ee(n,r,e)});function it(n,e){var r=B(n)?tn:po;return r(n,L(e,3))}function l1(n,e,r,t){return n==null?[]:(B(e)||(e=e==null?[]:[e]),r=t?u:r,B(r)||(r=r==null?[]:[r]),wo(n,e,r))}var s1=Jr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function c1(n,e,r){var t=B(n)?ci:Gf,i=arguments.length<3;return t(n,L(e,4),r,i,ge)}function h1(n,e,r){var t=B(n)?Sc:Gf,i=arguments.length<3;return t(n,L(e,4),r,i,oo)}function g1(n,e){var r=B(n)?le:ao;return r(n,ot(L(e,3)))}function p1(n){var e=B(n)?to:fg;return e(n)}function _1(n,e,r){(r?xn(n,e,r):e===u)?e=1:e=D(e);var t=B(n)?Bh:og;return t(n,e)}function d1(n){var e=B(n)?$h:lg;return e(n)}function v1(n){if(n==null)return 0;if(Sn(n))return lt(n)?Me(n):n.length;var e=wn(n);return e==Gn||e==Hn?n.size:Ci(n).length}function m1(n,e,r){var t=B(n)?hi:sg;return r&&xn(n,e,r)&&(e=u),t(n,L(e,3))}var w1=G(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),wo(n,vn(e,1),[])}),ut=jc||function(){return dn.Date.now()};function y1(n,e){if(typeof e!="function")throw new Mn(w);return n=D(n),function(){if(--n<1)return e.apply(this,arguments)}}function ga(n,e,r){return e=r?u:e,e=n&&e==null?n.length:e,re(n,en,u,u,u,u,e)}function pa(n,e){var r;if(typeof e!="function")throw new Mn(w);return n=D(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=u),r}}var nu=G(function(n,e,r){var t=M;if(r.length){var i=ce(r,He(nu));t|=Q}return re(n,t,e,r,i)}),_a=G(function(n,e,r){var t=M|_n;if(r.length){var i=ce(r,He(_a));t|=Q}return re(e,t,n,r,i)});function da(n,e,r){e=r?u:e;var t=re(n,C,u,u,u,u,u,e);return t.placeholder=da.placeholder,t}function va(n,e,r){e=r?u:e;var t=re(n,z,u,u,u,u,u,e);return t.placeholder=va.placeholder,t}function ma(n,e,r){var t,i,o,l,s,h,d=0,v=!1,m=!1,S=!0;if(typeof n!="function")throw new Mn(w);e=Un(e)||0,fn(r)&&(v=!!r.leading,m="maxWait"in r,o=m?gn(Un(r.maxWait)||0,e):o,S="trailing"in r?!!r.trailing:S);function T(sn){var Zn=t,oe=i;return t=i=u,d=sn,l=n.apply(oe,Zn),l}function P(sn){return d=sn,s=pr(H,e),v?T(sn):l}function N(sn){var Zn=sn-h,oe=sn-d,Ba=e-Zn;return m?mn(Ba,o-oe):Ba}function F(sn){var Zn=sn-h,oe=sn-d;return h===u||Zn>=e||Zn<0||m&&oe>=o}function H(){var sn=ut();if(F(sn))return Y(sn);s=pr(H,N(sn))}function Y(sn){return s=u,S&&t?T(sn):(t=i=u,l)}function Ln(){s!==u&&To(s),d=0,t=h=i=s=u}function bn(){return s===u?l:Y(ut())}function Pn(){var sn=ut(),Zn=F(sn);if(t=arguments,i=this,h=sn,Zn){if(s===u)return P(h);if(m)return To(s),s=pr(H,e),T(h)}return s===u&&(s=pr(H,e)),l}return Pn.cancel=Ln,Pn.flush=bn,Pn}var x1=G(function(n,e){return fo(n,1,e)}),b1=G(function(n,e,r){return fo(n,Un(e)||0,r)});function A1(n){return re(n,Kt)}function ft(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Mn(w);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var l=n.apply(this,t);return r.cache=o.set(i,l)||o,l};return r.cache=new(ft.Cache||ne),r}ft.Cache=ne;function ot(n){if(typeof n!="function")throw new Mn(w);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function S1(n){return pa(2,n)}var I1=cg(function(n,e){e=e.length==1&&B(e[0])?tn(e[0],Tn(L())):tn(vn(e,1),Tn(L()));var r=e.length;return G(function(t){for(var i=-1,o=mn(t.length,r);++i=e}),Oe=co(function(){return arguments}())?co:function(n){return on(n)&&V.call(n,"callee")&&!Vf.call(n,"callee")},B=p.isArray,U1=Pf?Tn(Pf):Xh;function Sn(n){return n!=null&&at(n.length)&&!ue(n)}function ln(n){return on(n)&&Sn(n)}function N1(n){return n===!0||n===!1||on(n)&&yn(n)==Xe}var ve=eh||hu,G1=Ff?Tn(Ff):Jh;function H1(n){return on(n)&&n.nodeType===1&&!_r(n)}function z1(n){if(n==null)return!0;if(Sn(n)&&(B(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||ze(n)||Oe(n)))return!n.length;var e=wn(n);if(e==Gn||e==Hn)return!n.size;if(gr(n))return!Ci(n).length;for(var r in n)if(V.call(n,r))return!1;return!0}function K1(n,e){return sr(n,e)}function Y1(n,e,r){r=typeof r=="function"?r:u;var t=r?r(n,e):u;return t===u?sr(n,e,u,r):!!t}function ru(n){if(!on(n))return!1;var e=yn(n);return e==yr||e==_s||typeof n.message=="string"&&typeof n.name=="string"&&!_r(n)}function Z1(n){return typeof n=="number"&&jf(n)}function ue(n){if(!fn(n))return!1;var e=yn(n);return e==xr||e==ff||e==ps||e==vs}function ya(n){return typeof n=="number"&&n==D(n)}function at(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function fn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function on(n){return n!=null&&typeof n=="object"}var xa=qf?Tn(qf):Vh;function X1(n,e){return n===e||Ei(n,e,Yi(e))}function J1(n,e,r){return r=typeof r=="function"?r:u,Ei(n,e,Yi(e),r)}function Q1(n){return ba(n)&&n!=+n}function V1(n){if(qg(n))throw new W(y);return ho(n)}function k1(n){return n===null}function j1(n){return n==null}function ba(n){return typeof n=="number"||on(n)&&yn(n)==Qe}function _r(n){if(!on(n)||yn(n)!=kn)return!1;var e=Mr(n);if(e===null)return!0;var r=V.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Lr.call(r)==Jc}var tu=Mf?Tn(Mf):kh;function n0(n){return ya(n)&&n>=-ae&&n<=ae}var Aa=Wf?Tn(Wf):jh;function lt(n){return typeof n=="string"||!B(n)&&on(n)&&yn(n)==ke}function Cn(n){return typeof n=="symbol"||on(n)&&yn(n)==br}var ze=Bf?Tn(Bf):ng;function e0(n){return n===u}function r0(n){return on(n)&&wn(n)==je}function t0(n){return on(n)&&yn(n)==ws}var i0=jr(Li),u0=jr(function(n,e){return n<=e});function Sa(n){if(!n)return[];if(Sn(n))return lt(n)?zn(n):An(n);if(rr&&n[rr])return Bc(n[rr]());var e=wn(n),r=e==Gn?mi:e==Hn?Tr:Ke;return r(n)}function fe(n){if(!n)return n===0?n:0;if(n=Un(n),n===me||n===-me){var e=n<0?-1:1;return e*ss}return n===n?n:0}function D(n){var e=fe(n),r=e%1;return e===e?r?e-r:e:0}function Ia(n){return n?Ae(D(n),0,Xn):0}function Un(n){if(typeof n=="number")return n;if(Cn(n))return mr;if(fn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=fn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Hf(n);var r=Us.test(n);return r||Gs.test(n)?yc(n.slice(2),r?2:8):Ds.test(n)?mr:+n}function Ra(n){return Qn(n,In(n))}function f0(n){return n?Ae(D(n),-ae,ae):n===0?n:0}function J(n){return n==null?"":En(n)}var o0=Ne(function(n,e){if(gr(e)||Sn(e)){Qn(e,pn(e),n);return}for(var r in e)V.call(e,r)&&or(n,r,e[r])}),Oa=Ne(function(n,e){Qn(e,In(e),n)}),st=Ne(function(n,e,r,t){Qn(e,In(e),n,t)}),a0=Ne(function(n,e,r,t){Qn(e,pn(e),n,t)}),l0=te(Si);function s0(n,e){var r=Ue(n);return e==null?r:io(r,e)}var c0=G(function(n,e){n=j(n);var r=-1,t=e.length,i=t>2?e[2]:u;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Qn(n,zi(n),r),t&&(r=Bn(r,Z|E|q,bg));for(var i=e.length;i--;)Wi(r,e[i]);return r});function E0(n,e){return Ea(n,ot(L(e)))}var C0=te(function(n,e){return n==null?{}:tg(n,e)});function Ea(n,e){if(n==null)return{};var r=tn(zi(n),function(t){return[t]});return e=L(e),yo(n,r,function(t,i){return e(t,i[0])})}function L0(n,e,r){e=_e(e,n);var t=-1,i=e.length;for(i||(i=1,n=u);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=no();return mn(n+i*(e-n+wc("1e-"+((i+"").length-1))),e)}return Fi(n,e)}var G0=Ge(function(n,e,r){return e=e.toLowerCase(),n+(r?Pa(e):e)});function Pa(n){return fu(J(n).toLowerCase())}function Fa(n){return n=J(n),n&&n.replace(zs,Pc).replace(lc,"")}function H0(n,e,r){n=J(n),e=En(e);var t=n.length;r=r===u?t:Ae(D(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function z0(n){return n=J(n),n&&Ss.test(n)?n.replace(lf,Fc):n}function K0(n){return n=J(n),n&&Cs.test(n)?n.replace(ei,"\\$&"):n}var Y0=Ge(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Z0=Ge(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),X0=Wo("toLowerCase");function J0(n,e,r){n=J(n),e=D(e);var t=e?Me(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return kr(Dr(i),r)+n+kr($r(i),r)}function Q0(n,e,r){n=J(n),e=D(e);var t=e?Me(n):0;return e&&t>>0,r?(n=J(n),n&&(typeof e=="string"||e!=null&&!tu(e))&&(e=En(e),!e&&qe(n))?de(zn(n),0,r):n.split(e,r)):[]}var t_=Ge(function(n,e,r){return n+(r?" ":"")+fu(e)});function i_(n,e,r){return n=J(n),r=r==null?0:Ae(D(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function u_(n,e,r){var t=f.templateSettings;r&&xn(n,e,r)&&(e=u),n=J(n),e=st({},e,t,Ho);var i=st({},e.imports,t.imports,Ho),o=pn(i),l=vi(i,o),s,h,d=0,v=e.interpolate||Ar,m="__p += '",S=wi((e.escape||Ar).source+"|"+v.source+"|"+(v===sf?$s:Ar).source+"|"+(e.evaluate||Ar).source+"|$","g"),T="//# sourceURL="+(V.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++pc+"]")+` -`;n.replace(S,function(F,H,Y,Ln,bn,Pn){return Y||(Y=Ln),m+=n.slice(d,Pn).replace(Ks,qc),H&&(s=!0,m+=`' + -__e(`+H+`) + -'`),bn&&(h=!0,m+=`'; -`+bn+`; -__p += '`),Y&&(m+=`' + -((__t = (`+Y+`)) == null ? '' : __t) + -'`),d=Pn+F.length,F}),m+=`'; -`;var P=V.call(e,"variable")&&e.variable;if(!P)m=`with (obj) { -`+m+` -} -`;else if(Ws.test(P))throw new W(O);m=(h?m.replace(ys,""):m).replace(xs,"$1").replace(bs,"$1;"),m="function("+(P||"obj")+`) { -`+(P?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(h?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+m+`return __p -}`;var N=Ma(function(){return X(o,T+"return "+m).apply(u,l)});if(N.source=m,ru(N))throw N;return N}function f_(n){return J(n).toLowerCase()}function o_(n){return J(n).toUpperCase()}function a_(n,e,r){if(n=J(n),n&&(r||e===u))return Hf(n);if(!n||!(e=En(e)))return n;var t=zn(n),i=zn(e),o=zf(t,i),l=Kf(t,i)+1;return de(t,o,l).join("")}function l_(n,e,r){if(n=J(n),n&&(r||e===u))return n.slice(0,Zf(n)+1);if(!n||!(e=En(e)))return n;var t=zn(n),i=Kf(t,zn(e))+1;return de(t,0,i).join("")}function s_(n,e,r){if(n=J(n),n&&(r||e===u))return n.replace(ri,"");if(!n||!(e=En(e)))return n;var t=zn(n),i=zf(t,zn(e));return de(t,i).join("")}function c_(n,e){var r=is,t=us;if(fn(e)){var i="separator"in e?e.separator:i;r="length"in e?D(e.length):r,t="omission"in e?En(e.omission):t}n=J(n);var o=n.length;if(qe(n)){var l=zn(n);o=l.length}if(r>=o)return n;var s=r-Me(t);if(s<1)return t;var h=l?de(l,0,s).join(""):n.slice(0,s);if(i===u)return h+t;if(l&&(s+=h.length-s),tu(i)){if(n.slice(s).search(i)){var d,v=h;for(i.global||(i=wi(i.source,J(cf.exec(i))+"g")),i.lastIndex=0;d=i.exec(v);)var m=d.index;h=h.slice(0,m===u?s:m)}}else if(n.indexOf(En(i),s)!=s){var S=h.lastIndexOf(i);S>-1&&(h=h.slice(0,S))}return h+t}function h_(n){return n=J(n),n&&As.test(n)?n.replace(af,Nc):n}var g_=Ge(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),fu=Wo("toUpperCase");function qa(n,e,r){return n=J(n),e=r?u:e,e===u?Wc(n)?zc(n):Oc(n):n.match(e)||[]}var Ma=G(function(n,e){try{return On(n,u,e)}catch(r){return ru(r)?r:new W(r)}}),p_=te(function(n,e){return qn(e,function(r){r=Vn(r),ee(n,r,nu(n[r],n))}),n});function __(n){var e=n==null?0:n.length,r=L();return n=e?tn(n,function(t){if(typeof t[1]!="function")throw new Mn(w);return[r(t[0]),t[1]]}):[],G(function(t){for(var i=-1;++iae)return[];var r=Xn,t=mn(n,Xn);e=L(e),n-=Xn;for(var i=di(t,e);++r0||e<0)?new K(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==u&&(e=D(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},K.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},K.prototype.toArray=function(){return this.take(Xn)},Jn(K.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=f[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(f.prototype[e]=function(){var l=this.__wrapped__,s=t?[1]:arguments,h=l instanceof K,d=s[0],v=h||B(l),m=function(H){var Y=i.apply(f,se([H],s));return t&&S?Y[0]:Y};v&&r&&typeof d=="function"&&d.length!=1&&(h=v=!1);var S=this.__chain__,T=!!this.__actions__.length,P=o&&!S,N=h&&!T;if(!o&&v){l=N?l:new K(this);var F=n.apply(l,s);return F.__actions__.push({func:tt,args:[m],thisArg:u}),new Wn(F,S)}return P&&N?n.apply(this,s):(F=this.thru(m),P?t?F.value()[0]:F.value():F)})}),qn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Er[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(B(o)?o:[],i)}return this[r](function(l){return e.apply(B(l)?l:[],i)})}}),Jn(K.prototype,function(n,e){var r=f[e];if(r){var t=r.name+"";V.call(De,t)||(De[t]=[]),De[t].push({name:e,func:r})}}),De[Qr(u,_n).name]=[{name:"wrapper",func:u}],K.prototype.clone=hh,K.prototype.reverse=gh,K.prototype.value=ph,f.prototype.at=Hp,f.prototype.chain=zp,f.prototype.commit=Kp,f.prototype.next=Yp,f.prototype.plant=Xp,f.prototype.reverse=Jp,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Qp,f.prototype.first=f.prototype.head,rr&&(f.prototype[rr]=Zp),f},We=Kc();we?((we.exports=We)._=We,ai._=We):dn._=We}).call(Ye)}(dr,dr.exports);var Nn=dr.exports;const _u=" `.-':_,^=;><+!rc*/z?sLTv)J7(|Fi{C}fI31tlu[neoZ5Yxjya]2ESwqkP6h9d4VpOGbUAKXHm8RD#$Bg0MNWQ%&@";function rl(a){return Nn.chain(_u).split("").indexOf(a).thru(g=>Math.max(g-3,0)/_u.length).value()}var tl=function(){},il=tl(),Te=function(a){return a!==il&&a!==null},ul=Te,fl=Array.prototype.forEach,ol=Object.create,al=function(a,g){var u;for(u in a)g[u]=a[u]},ll=function(a){var g=ol(null);return fl.call(arguments,function(u){ul(u)&&al(Object(u),g)}),g},sl=function(){var a=Math.sign;return typeof a!="function"?!1:a(10)===1&&a(-20)===-1},ct,du;function cl(){return du||(du=1,ct=function(a){return a=Number(a),isNaN(a)||a===0?a:a>0?1:-1}),ct}var hl=sl()?Math.sign:cl(),gl=hl,pl=Math.abs,_l=Math.floor,dl=function(a){return isNaN(a)?0:(a=Number(a),a===0||!isFinite(a)?a:gl(a)*_l(pl(a)))},vl=dl,ml=Math.max,wl=function(a){return ml(0,vl(a))},vu=function(a){if(typeof a!="function")throw new TypeError(a+" is not a function");return a},yl=Te,mu=function(a){if(!yl(a))throw new TypeError("Cannot use null or undefined");return a},xl={exports:{}},ht,wu;function bl(){return wu||(wu=1,ht=function(){var a=Object.assign,g;return typeof a!="function"?!1:(g={foo:"raz"},a(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")}),ht}var gt,yu;function Al(){return yu||(yu=1,gt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),gt}var pt,xu;function Sl(){if(xu)return pt;xu=1;var a=Te,g=Object.keys;return pt=function(u){return g(a(u)?Object(u):u)},pt}var _t,bu;function Il(){return bu||(bu=1,_t=Al()()?Object.keys:Sl()),_t}var dt,Au;function Rl(){if(Au)return dt;Au=1;var a=Il(),g=mu,u=Math.max;return dt=function(A,x){var y,w,O=u(arguments.length,2),b;for(A=Object(g(A)),b=function(I){try{A[I]=x[I]}catch(U){y||(y=U)}},w=1;w-1},It}var Rt,Mu;function Wl(){return Mu||(Mu=1,Rt=ql()()?String.prototype.contains:Ml()),Rt}var Wu;function Ee(){if(Wu)return mt.exports;Wu=1;var a=Tu(),g=Fl(),u=Iu(),A=ll,x=Wl(),y=mt.exports=function(w,O){var b,I,U,Z,E;return arguments.length<2||typeof w!="string"?(Z=O,O=w,w=null):Z=arguments[2],a(w)?(b=x.call(w,"c"),I=x.call(w,"e"),U=x.call(w,"w")):(b=U=!0,I=!1),E={value:O,configurable:b,enumerable:I,writable:U},Z?u(A(Z),E):E};return y.gs=function(w,O,b){var I,U,Z,E;return typeof w!="string"?(Z=b,b=O,O=w,w=null):Z=arguments[3],a(O)?g(O)?a(b)?g(b)||(Z=b,b=void 0):b=void 0:(Z=O,O=b=void 0):O=void 0,a(w)?(I=x.call(w,"c"),U=x.call(w,"e")):(I=!0,U=!1),E={get:O,set:b,configurable:I,enumerable:U},Z?u(A(Z),E):E},mt.exports}var Ot={exports:{}};(function(a,g){var u=Ee(),A=vu,x=Function.prototype.apply,y=Function.prototype.call,w=Object.create,O=Object.defineProperty,b=Object.defineProperties,I=Object.prototype.hasOwnProperty,U={configurable:!0,enumerable:!1,writable:!0},Z,E,q,un,an,M,_n;Z=function($,C){var z;return A(C),I.call(this,"__ee__")?z=this.__ee__:(z=U.value=w(null),O(this,"__ee__",U),U.value=null),z[$]?typeof z[$]=="object"?z[$].push(C):z[$]=[z[$],C]:z[$]=C,this},E=function($,C){var z,Q;return A(C),Q=this,Z.call(this,$,z=function(){q.call(Q,$,z),x.call(C,this,arguments)}),z.__eeOnceListener__=C,this},q=function($,C){var z,Q,k,en;if(A(C),!I.call(this,"__ee__"))return this;if(z=this.__ee__,!z[$])return this;if(Q=z[$],typeof Q=="object")for(en=0;k=Q[en];++en)(k===C||k.__eeOnceListener__===C)&&(Q.length===2?z[$]=Q[en?0:1]:Q.splice(en,1));else(Q===C||Q.__eeOnceListener__===C)&&delete z[$];return this},un=function($){var C,z,Q,k,en;if(I.call(this,"__ee__")&&(k=this.__ee__[$],!!k))if(typeof k=="object"){for(z=arguments.length,en=new Array(z-1),C=1;C=55296&&z<=56319&&(cn+=E[++M])),cn=q?I.call(q,un,cn,_n):cn,an?(U.value=cn,Z($,_n,U)):$[_n]=cn,++_n;C=_n}}if(C===void 0)for(C=A(E.length),an&&($=new an(C)),M=0;Masync g=>{try{const u=await a(g);postMessage({result:u})}catch(u){postMessage({error:u})}};function tf({map:a}){const g=a.split(/\r?\n/),[,,,,...u]=g;return{symbols:Nn.chain(u).join("").trim().split("").uniq().map(A=>({symbol:A,value:rl(A)})).value()}}onmessage=rf(async({data:a})=>tf(a));function jl(a,g){return Nn.map(a,u=>Nn.map(u,A=>g(A)))}const{min:ns}=Math;function Ze(a,{x:g,y:u}){var A;return!!((A=a==null?void 0:a[u])!=null&&A[g])}function es(a,g,{x:u,y:A},x){let y=u,w=A;for(;y+1<=x.x&&w+1<=x.y&&!(Nn.range(u,y+1).map(I=>Ze(a,{x:I,y:w+1})).includes(!g)||Nn.range(A,w+2).map(I=>Ze(a,{x:y+1,y:I})).includes(!g));)y++,w++;for(;w+1<=x.y&&!Nn.range(u,y+1).map(b=>Ze(a,{x:b,y:w+1})).includes(!g);)w++;for(;y+1<=x.x&&!Nn.range(A,w+1).map(b=>Ze(a,{x:y+1,y:b})).includes(!g);)y++;return{x:y,y:w}}function rs(a,g,u={x:0,y:0},A={x:g.width-1,y:g.height-1}){const x=[[u,A]],y=[];for(;x.length>0;){const[w,O]=x.pop();if(w.x<=O.x&&w.y<=O.y){const b=Ze(a,w),I=es(a,b,w,O);x.push([{x:w.x,y:I.y+1},{x:ns(O.x,I.x),y:O.y}],[{x:I.x+1,y:w.y},{x:O.x,y:O.y}]),b&&y.push({...w,width:I.x-w.x+1,height:I.y-w.y+1})}}return y}function ts({map:a,options:{symbols:g={},color:u="#fff",background:A="#000"}={}}){const x=a.split(/\r?\n/),[,y="",w="",,...O]=x,[b,I]=[w,y].map(q=>+Nn.last(q.split(" "))),{symbols:U}=tf({map:a}),Z=el([A,u]),E=Nn.chain(U).filter(({value:q,symbol:un})=>!!q||!!g[un]).map(({symbol:q,value:un})=>[void 0,"auto"].includes(g[q])?[q,Z(un)]:[q,g[q]]).filter(([,q])=>!!q).map(([q,un])=>{const an=rs(jl(O,M=>M===q),{width:b,height:I});return Nn.map(an,M=>({$:"rect",fill:un,alpha:1,...M}))}).flatten().value();return{log:[`${(E.length*100/(b*I)).toFixed(2)}% of original`],bounds:{width:b,height:I,minX:0,minY:0,maxX:b,maxY:I},nodes:E.map(q=>({component:q}))}}onmessage=rf(async({data:a})=>ts(a))})(); diff --git a/assets/parseGrid.worker-CoX8qlO4.js b/assets/parseGrid.worker-CoX8qlO4.js new file mode 100644 index 0000000..4a13f7e --- /dev/null +++ b/assets/parseGrid.worker-CoX8qlO4.js @@ -0,0 +1,27 @@ +(function(){"use strict";var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Ia(a){return a&&a.__esModule&&Object.prototype.hasOwnProperty.call(a,"default")?a.default:a}var Ra={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]},fu=Ra,Oa=Ta,ou={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function Ta(a){var g,u=[],b=1,x;if(typeof a=="string")if(a=a.toLowerCase(),fu[a])u=fu[a].slice(),x="rgb";else if(a==="transparent")b=0,x="rgb",u=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(a)){var w=a.slice(1),y=w.length,E=y<=4;b=1,E?(u=[parseInt(w[0]+w[0],16),parseInt(w[1]+w[1],16),parseInt(w[2]+w[2],16)],y===4&&(b=parseInt(w[3]+w[3],16)/255)):(u=[parseInt(w[0]+w[1],16),parseInt(w[2]+w[3],16),parseInt(w[4]+w[5],16)],y===8&&(b=parseInt(w[6]+w[7],16)/255)),u[0]||(u[0]=0),u[1]||(u[1]=0),u[2]||(u[2]=0),x="rgb"}else if(g=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(a)){var R=g[1],I=R==="rgb",w=R.replace(/a$/,"");x=w;var y=w==="cmyk"?4:w==="gray"?1:3;u=g[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(M,F){if(/%$/.test(M))return F===y?parseFloat(M)/100:w==="rgb"?parseFloat(M)*255/100:parseFloat(M);if(w[F]==="h"){if(/deg$/.test(M))return parseFloat(M);if(ou[M]!==void 0)return ou[M]}return parseFloat(M)}),R===w&&u.push(1),b=I||u[y]===void 0?1:u[y],u=u.slice(0,y)}else a.length>10&&/[0-9](?:\s|\/)/.test(a)&&(u=a.match(/([0-9]+)/g).map(function(Y){return parseFloat(Y)}),x=a.match(/([a-z])/ig).join("").toLowerCase());else isNaN(a)?Array.isArray(a)||a.length?(u=[a[0],a[1],a[2]],x="rgb",b=a.length===4?a[3]:1):a instanceof Object&&(a.r!=null||a.red!=null||a.R!=null?(x="rgb",u=[a.r||a.red||a.R||0,a.g||a.green||a.G||0,a.b||a.blue||a.B||0]):(x="hsl",u=[a.h||a.hue||a.H||0,a.s||a.saturation||a.S||0,a.l||a.lightness||a.L||a.b||a.brightness]),b=a.a||a.alpha||a.opacity||1,a.opacity!=null&&(b/=100)):(x="rgb",u=[a>>>16,(a&65280)>>>8,a&255]);return{space:x,values:u,alpha:b}}var Ea={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]},Ca=Ea,La={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(a){var g=a[0]/360,u=a[1]/100,b=a[2]/100,x,w,y,E,R;if(u===0)return R=b*255,[R,R,R];b<.5?w=b*(1+u):w=b+u-b*u,x=2*b-w,E=[0,0,0];for(var I=0;I<3;I++)y=g+1/3*-(I-1),y<0?y++:y>1&&y--,6*y<1?R=x+(w-x)*6*y:2*y<1?R=w:3*y<2?R=x+(w-x)*(2/3-y)*6:R=x,E[I]=R*255;return E}};Ca.hsl=function(a){var g=a[0]/255,u=a[1]/255,b=a[2]/255,x=Math.min(g,u,b),w=Math.max(g,u,b),y=w-x,E,R,I;return w===x?E=0:g===w?E=(u-b)/y:u===w?E=2+(b-g)/y:b===w&&(E=4+(g-u)/y),E=Math.min(E*60,360),E<0&&(E+=360),I=(x+w)/2,w===x?R=0:I<=.5?R=y/(w+x):R=y/(2-w-x),[E,R*100,I*100]};function Pa(a,g,u){return a*(1-u)+g*u}var Fa=Pa,Ma=Wa;function Wa(a,g,u){return gu?u:a:ag?g:a}const Ba=Oa,qa=La,$a=Fa,Ua=Ma;var Da=Na;function Na(a){return a=a.map(function(g){if(g=Ba(g),g.space!="rgb"){if(g.space!="hsl")throw"c.spacespace is not supported.";g.values=qa.rgb(g.values)}return g.values.push(g.alpha),g.values}),function(g,u){u=u||$a,g=Ua(g,0,1);var b=(a.length-1)*g,x=Math.floor(b),w=Math.ceil(b);g=b-x;var y=a[x],E=a[w],R=y.map(function(I,Y){return I=u(I,E[Y],g),Y<3&&(I=Math.round(I)),I});return R[3]===1?"rgb("+R.slice(0,3)+")":"rgba("+R+")"}}var Ga=Ia(Da),vr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */vr.exports,function(a,g){(function(){var u,b="4.17.21",x=200,w="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",E="Invalid `variable` option passed into `_.template`",R="__lodash_hash_undefined__",I=500,Y="__lodash_placeholder__",fn=1,M=2,F=4,tn=1,an=2,W=1,_n=2,$=4,T=8,H=16,J=32,V=64,nn=128,cn=256,$t=512,ns=30,es="...",rs=800,ts=16,Ku=1,is=2,us=3,me=1/0,ae=9007199254740991,fs=17976931348623157e292,yr=NaN,Xn=4294967295,os=Xn-1,as=Xn>>>1,ls=[["ary",nn],["bind",W],["bindKey",_n],["curry",T],["curryRight",H],["flip",$t],["partial",J],["partialRight",V],["rearg",cn]],Ee="[object Arguments]",xr="[object Array]",ss="[object AsyncFunction]",Je="[object Boolean]",Qe="[object Date]",cs="[object DOMException]",br="[object Error]",Ar="[object Function]",Yu="[object GeneratorFunction]",Gn="[object Map]",Ve="[object Number]",hs="[object Null]",kn="[object Object]",Zu="[object Promise]",gs="[object Proxy]",ke="[object RegExp]",Hn="[object Set]",je="[object String]",Sr="[object Symbol]",ps="[object Undefined]",nr="[object WeakMap]",_s="[object WeakSet]",er="[object ArrayBuffer]",Ce="[object DataView]",Ut="[object Float32Array]",Dt="[object Float64Array]",Nt="[object Int8Array]",Gt="[object Int16Array]",Ht="[object Int32Array]",zt="[object Uint8Array]",Kt="[object Uint8ClampedArray]",Yt="[object Uint16Array]",Zt="[object Uint32Array]",ds=/\b__p \+= '';/g,vs=/\b(__p \+=) '' \+/g,ms=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xu=/&(?:amp|lt|gt|quot|#39);/g,Ju=/[&<>"']/g,ws=RegExp(Xu.source),ys=RegExp(Ju.source),xs=/<%-([\s\S]+?)%>/g,bs=/<%([\s\S]+?)%>/g,Qu=/<%=([\s\S]+?)%>/g,As=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ss=/^\w*$/,Is=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Xt=/[\\^$.*+?()[\]{}|]/g,Rs=RegExp(Xt.source),Jt=/^\s+/,Os=/\s/,Ts=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Es=/\{\n\/\* \[wrapped with (.+)\] \*/,Cs=/,? & /,Ls=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ps=/[()=,{}\[\]\/\s]/,Fs=/\\(\\)?/g,Ms=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vu=/\w*$/,Ws=/^[-+]0x[0-9a-f]+$/i,Bs=/^0b[01]+$/i,qs=/^\[object .+?Constructor\]$/,$s=/^0o[0-7]+$/i,Us=/^(?:0|[1-9]\d*)$/,Ds=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ir=/($^)/,Ns=/['\n\r\u2028\u2029\\]/g,Rr="\\ud800-\\udfff",Gs="\\u0300-\\u036f",Hs="\\ufe20-\\ufe2f",zs="\\u20d0-\\u20ff",ku=Gs+Hs+zs,ju="\\u2700-\\u27bf",nf="a-z\\xdf-\\xf6\\xf8-\\xff",Ks="\\xac\\xb1\\xd7\\xf7",Ys="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Zs="\\u2000-\\u206f",Xs=" \\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",ef="A-Z\\xc0-\\xd6\\xd8-\\xde",rf="\\ufe0e\\ufe0f",tf=Ks+Ys+Zs+Xs,Qt="['’]",Js="["+Rr+"]",uf="["+tf+"]",Or="["+ku+"]",ff="\\d+",Qs="["+ju+"]",of="["+nf+"]",af="[^"+Rr+tf+ff+ju+nf+ef+"]",Vt="\\ud83c[\\udffb-\\udfff]",Vs="(?:"+Or+"|"+Vt+")",lf="[^"+Rr+"]",kt="(?:\\ud83c[\\udde6-\\uddff]){2}",jt="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+ef+"]",sf="\\u200d",cf="(?:"+of+"|"+af+")",ks="(?:"+Le+"|"+af+")",hf="(?:"+Qt+"(?:d|ll|m|re|s|t|ve))?",gf="(?:"+Qt+"(?:D|LL|M|RE|S|T|VE))?",pf=Vs+"?",_f="["+rf+"]?",js="(?:"+sf+"(?:"+[lf,kt,jt].join("|")+")"+_f+pf+")*",nc="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",ec="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",df=_f+pf+js,rc="(?:"+[Qs,kt,jt].join("|")+")"+df,tc="(?:"+[lf+Or+"?",Or,kt,jt,Js].join("|")+")",ic=RegExp(Qt,"g"),uc=RegExp(Or,"g"),ni=RegExp(Vt+"(?="+Vt+")|"+tc+df,"g"),fc=RegExp([Le+"?"+of+"+"+hf+"(?="+[uf,Le,"$"].join("|")+")",ks+"+"+gf+"(?="+[uf,Le+cf,"$"].join("|")+")",Le+"?"+cf+"+"+hf,Le+"+"+gf,ec,nc,ff,rc].join("|"),"g"),oc=RegExp("["+sf+Rr+ku+rf+"]"),ac=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,lc=["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"],sc=-1,en={};en[Ut]=en[Dt]=en[Nt]=en[Gt]=en[Ht]=en[zt]=en[Kt]=en[Yt]=en[Zt]=!0,en[Ee]=en[xr]=en[er]=en[Je]=en[Ce]=en[Qe]=en[br]=en[Ar]=en[Gn]=en[Ve]=en[kn]=en[ke]=en[Hn]=en[je]=en[nr]=!1;var j={};j[Ee]=j[xr]=j[er]=j[Ce]=j[Je]=j[Qe]=j[Ut]=j[Dt]=j[Nt]=j[Gt]=j[Ht]=j[Gn]=j[Ve]=j[kn]=j[ke]=j[Hn]=j[je]=j[Sr]=j[zt]=j[Kt]=j[Yt]=j[Zt]=!0,j[br]=j[Ar]=j[nr]=!1;var cc={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},hc={"&":"&","<":"<",">":">",'"':""","'":"'"},gc={"&":"&","<":"<",">":">",""":'"',"'":"'"},pc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},_c=parseFloat,dc=parseInt,vf=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,vc=typeof self=="object"&&self&&self.Object===Object&&self,dn=vf||vc||Function("return this")(),ei=g&&!g.nodeType&&g,we=ei&&!0&&a&&!a.nodeType&&a,mf=we&&we.exports===ei,ri=mf&&vf.process,Fn=function(){try{var c=we&&we.require&&we.require("util").types;return c||ri&&ri.binding&&ri.binding("util")}catch{}}(),wf=Fn&&Fn.isArrayBuffer,yf=Fn&&Fn.isDate,xf=Fn&&Fn.isMap,bf=Fn&&Fn.isRegExp,Af=Fn&&Fn.isSet,Sf=Fn&&Fn.isTypedArray;function On(c,_,p){switch(p.length){case 0:return c.call(_);case 1:return c.call(_,p[0]);case 2:return c.call(_,p[0],p[1]);case 3:return c.call(_,p[0],p[1],p[2])}return c.apply(_,p)}function mc(c,_,p,S){for(var B=-1,Z=c==null?0:c.length;++B-1}function ti(c,_,p){for(var S=-1,B=c==null?0:c.length;++S-1;);return p}function Pf(c,_){for(var p=c.length;p--&&Pe(_,c[p],0)>-1;);return p}function Oc(c,_){for(var p=c.length,S=0;p--;)c[p]===_&&++S;return S}var Tc=oi(cc),Ec=oi(hc);function Cc(c){return"\\"+pc[c]}function Lc(c,_){return c==null?u:c[_]}function Fe(c){return oc.test(c)}function Pc(c){return ac.test(c)}function Fc(c){for(var _,p=[];!(_=c.next()).done;)p.push(_.value);return p}function ci(c){var _=-1,p=Array(c.size);return c.forEach(function(S,B){p[++_]=[B,S]}),p}function Ff(c,_){return function(p){return c(_(p))}}function ce(c,_){for(var p=-1,S=c.length,B=0,Z=[];++p-1}function yh(n,e){var r=this.__data__,t=Kr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}jn.prototype.clear=dh,jn.prototype.delete=vh,jn.prototype.get=mh,jn.prototype.has=wh,jn.prototype.set=yh;function ne(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function qn(n,e,r,t,i,o){var l,s=e&fn,h=e&M,d=e&F;if(r&&(l=i?r(n,t,i,o):r(n)),l!==u)return l;if(!un(n))return n;var v=q(n);if(v){if(l=Sg(n),!s)return An(n,l)}else{var m=wn(n),A=m==Ar||m==Yu;if(ve(n))return _o(n,s);if(m==kn||m==Ee||A&&!i){if(l=h||A?{}:Wo(n),!s)return h?gg(n,Bh(l,n)):hg(n,Kf(l,n))}else{if(!j[m])return i?n:{};l=Ig(n,m,s)}}o||(o=new Kn);var O=o.get(n);if(O)return O;o.set(n,l),sa(n)?n.forEach(function(P){l.add(qn(P,e,r,P,n,o))}):aa(n)&&n.forEach(function(P,G){l.set(G,qn(P,e,r,G,n,o))});var L=d?h?qi:Bi:h?In:pn,D=v?u:L(n);return Mn(D||n,function(P,G){D&&(G=P,P=n[G]),ar(l,G,qn(P,e,r,G,n,o))}),l}function qh(n){var e=pn(n);return function(r){return Yf(r,n,e)}}function Yf(n,e,r){var t=r.length;if(n==null)return!t;for(n=k(n);t--;){var i=r[t],o=e[i],l=n[i];if(l===u&&!(i in n)||!o(l))return!1}return!0}function Zf(n,e,r){if(typeof n!="function")throw new Wn(y);return _r(function(){n.apply(u,r)},e)}function lr(n,e,r,t){var i=-1,o=Tr,l=!0,s=n.length,h=[],d=e.length;if(!s)return h;r&&(e=rn(e,Tn(r))),t?(o=ti,l=!1):e.length>=x&&(o=rr,l=!1,e=new be(e));n:for(;++ii?0:i+r),t=t===u||t>i?i:U(t),t<0&&(t+=i),t=r>t?0:ha(t);r0&&r(s)?e>1?vn(s,e-1,r,t,i):se(i,s):t||(i[i.length]=s)}return i}var mi=bo(),Qf=bo(!0);function Jn(n,e){return n&&mi(n,e,pn)}function wi(n,e){return n&&Qf(n,e,pn)}function Zr(n,e){return le(e,function(r){return ue(n[r])})}function Se(n,e){e=_e(e,n);for(var r=0,t=e.length;n!=null&&re}function Dh(n,e){return n!=null&&Q.call(n,e)}function Nh(n,e){return n!=null&&e in k(n)}function Gh(n,e,r){return n>=mn(e,r)&&n=120&&v.length>=120)?new be(l&&v):u}v=n[0];var m=-1,A=s[0];n:for(;++m-1;)s!==n&&$r.call(s,h,1),$r.call(n,h,1);return n}function oo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;ie(i)?$r.call(n,i,1):Ei(n,i)}}return n}function Ri(n,e){return n+Nr(Nf()*(e-n+1))}function eg(n,e,r,t){for(var i=-1,o=gn(Dr((e-n)/(r||1)),0),l=p(o);o--;)l[t?o:++i]=n,n+=r;return l}function Oi(n,e){var r="";if(!n||e<1||e>ae)return r;do e%2&&(r+=n),e=Nr(e/2),e&&(n+=n);while(e);return r}function N(n,e){return zi($o(n,e,Rn),n+"")}function rg(n){return zf(ze(n))}function tg(n,e){var r=ze(n);return it(r,Ae(e,0,r.length))}function hr(n,e,r,t){if(!un(n))return n;e=_e(e,n);for(var i=-1,o=e.length,l=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=p(i);++t>>1,l=n[o];l!==null&&!Cn(l)&&(r?l<=e:l=x){var d=e?null:vg(n);if(d)return Cr(d);l=!1,i=rr,h=new be}else h=e?[]:s;n:for(;++t=t?n:$n(n,e,r)}var po=Xc||function(n){return dn.clearTimeout(n)};function _o(n,e){if(e)return n.slice();var r=n.length,t=Bf?Bf(r):new n.constructor(r);return n.copy(t),t}function Fi(n){var e=new n.constructor(n.byteLength);return new Br(e).set(new Br(n)),e}function ag(n,e){var r=e?Fi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function lg(n){var e=new n.constructor(n.source,Vu.exec(n));return e.lastIndex=n.lastIndex,e}function sg(n){return or?k(or.call(n)):{}}function vo(n,e){var r=e?Fi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function mo(n,e){if(n!==e){var r=n!==u,t=n===null,i=n===n,o=Cn(n),l=e!==u,s=e===null,h=e===e,d=Cn(e);if(!s&&!d&&!o&&n>e||o&&l&&h&&!s&&!d||t&&l&&h||!r&&h||!i)return 1;if(!t&&!o&&!d&&n=s)return h;var d=r[t];return h*(d=="desc"?-1:1)}}return n.index-e.index}function wo(n,e,r,t){for(var i=-1,o=n.length,l=r.length,s=-1,h=e.length,d=gn(o-l,0),v=p(h+d),m=!t;++s1?r[i-1]:u,l=i>2?r[2]:u;for(o=n.length>3&&typeof o=="function"?(i--,o):u,l&&xn(r[0],r[1],l)&&(o=i<3?u:o,i=1),e=k(e);++t-1?i[o?e[l]:l]:u}}function Io(n){return te(function(e){var r=e.length,t=r,i=Bn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Wn(y);if(i&&!l&&rt(o)=="wrapper")var l=new Bn([],!0)}for(t=l?t:r;++t1&&K.reverse(),v&&hs))return!1;var d=o.get(n),v=o.get(e);if(d&&v)return d==e&&v==n;var m=-1,A=!0,O=r&an?new be:u;for(o.set(n,e),o.set(e,n);++m1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(Ts,`{ +/* [wrapped with `+e+`] */ +`)}function Og(n){return q(n)||Oe(n)||!!(Uf&&n&&n[Uf])}function ie(n,e){var r=typeof n;return e=e??ae,!!e&&(r=="number"||r!="symbol"&&Us.test(n))&&n>-1&&n%1==0&&n0){if(++e>=rs)return arguments[0]}else e=0;return n.apply(u,arguments)}}function it(n,e){var r=-1,t=n.length,i=t-1;for(e=e===u?t:e;++r1?n[e-1]:u;return r=typeof r=="function"?(n.pop(),r):u,Qo(n,r)});function Vo(n){var e=f(n);return e.__chain__=!0,e}function $p(n,e){return e(n),n}function ut(n,e){return e(n)}var Up=te(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return vi(o,n)};return e>1||this.__actions__.length||!(t instanceof z)||!ie(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:ut,args:[i],thisArg:u}),new Bn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(u),o}))});function Dp(){return Vo(this)}function Np(){return new Bn(this.value(),this.__chain__)}function Gp(){this.__values__===u&&(this.__values__=ca(this.value()));var n=this.__index__>=this.__values__.length,e=n?u:this.__values__[this.__index__++];return{done:n,value:e}}function Hp(){return this}function zp(n){for(var e,r=this;r instanceof zr;){var t=zo(r);t.__index__=0,t.__values__=u,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Kp(){var n=this.__wrapped__;if(n instanceof z){var e=n;return this.__actions__.length&&(e=new z(this)),e=e.reverse(),e.__actions__.push({func:ut,args:[Ki],thisArg:u}),new Bn(e,this.__chain__)}return this.thru(Ki)}function Yp(){return ho(this.__wrapped__,this.__actions__)}var Zp=Vr(function(n,e,r){Q.call(n,r)?++n[r]:ee(n,r,1)});function Xp(n,e,r){var t=q(n)?If:$h;return r&&xn(n,e,r)&&(e=u),t(n,C(e,3))}function Jp(n,e){var r=q(n)?le:Jf;return r(n,C(e,3))}var Qp=So(Ko),Vp=So(Yo);function kp(n,e){return vn(ft(n,e),1)}function jp(n,e){return vn(ft(n,e),me)}function n0(n,e,r){return r=r===u?1:U(r),vn(ft(n,e),r)}function ko(n,e){var r=q(n)?Mn:ge;return r(n,C(e,3))}function jo(n,e){var r=q(n)?wc:Xf;return r(n,C(e,3))}var e0=Vr(function(n,e,r){Q.call(n,r)?n[r].push(e):ee(n,r,[e])});function r0(n,e,r,t){n=Sn(n)?n:ze(n),r=r&&!t?U(r):0;var i=n.length;return r<0&&(r=gn(i+r,0)),ct(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&Pe(n,e,r)>-1}var t0=N(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?p(n.length):[];return ge(n,function(l){o[++t]=i?On(e,l,r):sr(l,e,r)}),o}),i0=Vr(function(n,e,r){ee(n,r,e)});function ft(n,e){var r=q(n)?rn:eo;return r(n,C(e,3))}function u0(n,e,r,t){return n==null?[]:(q(e)||(e=e==null?[]:[e]),r=t?u:r,q(r)||(r=r==null?[]:[r]),uo(n,e,r))}var f0=Vr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function o0(n,e,r){var t=q(n)?ii:Ef,i=arguments.length<3;return t(n,C(e,4),r,i,ge)}function a0(n,e,r){var t=q(n)?yc:Ef,i=arguments.length<3;return t(n,C(e,4),r,i,Xf)}function l0(n,e){var r=q(n)?le:Jf;return r(n,lt(C(e,3)))}function s0(n){var e=q(n)?zf:rg;return e(n)}function c0(n,e,r){(r?xn(n,e,r):e===u)?e=1:e=U(e);var t=q(n)?Fh:tg;return t(n,e)}function h0(n){var e=q(n)?Mh:ug;return e(n)}function g0(n){if(n==null)return 0;if(Sn(n))return ct(n)?Me(n):n.length;var e=wn(n);return e==Gn||e==Hn?n.size:Ai(n).length}function p0(n,e,r){var t=q(n)?ui:fg;return r&&xn(n,e,r)&&(e=u),t(n,C(e,3))}var _0=N(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),uo(n,vn(e,1),[])}),ot=Jc||function(){return dn.Date.now()};function d0(n,e){if(typeof e!="function")throw new Wn(y);return n=U(n),function(){if(--n<1)return e.apply(this,arguments)}}function na(n,e,r){return e=r?u:e,e=n&&e==null?n.length:e,re(n,nn,u,u,u,u,e)}function ea(n,e){var r;if(typeof e!="function")throw new Wn(y);return n=U(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=u),r}}var Zi=N(function(n,e,r){var t=W;if(r.length){var i=ce(r,Ge(Zi));t|=J}return re(n,t,e,r,i)}),ra=N(function(n,e,r){var t=W|_n;if(r.length){var i=ce(r,Ge(ra));t|=J}return re(e,t,n,r,i)});function ta(n,e,r){e=r?u:e;var t=re(n,T,u,u,u,u,u,e);return t.placeholder=ta.placeholder,t}function ia(n,e,r){e=r?u:e;var t=re(n,H,u,u,u,u,u,e);return t.placeholder=ia.placeholder,t}function ua(n,e,r){var t,i,o,l,s,h,d=0,v=!1,m=!1,A=!0;if(typeof n!="function")throw new Wn(y);e=Dn(e)||0,un(r)&&(v=!!r.leading,m="maxWait"in r,o=m?gn(Dn(r.maxWait)||0,e):o,A="trailing"in r?!!r.trailing:A);function O(sn){var Zn=t,oe=i;return t=i=u,d=sn,l=n.apply(oe,Zn),l}function L(sn){return d=sn,s=_r(G,e),v?O(sn):l}function D(sn){var Zn=sn-h,oe=sn-d,Sa=e-Zn;return m?mn(Sa,o-oe):Sa}function P(sn){var Zn=sn-h,oe=sn-d;return h===u||Zn>=e||Zn<0||m&&oe>=o}function G(){var sn=ot();if(P(sn))return K(sn);s=_r(G,D(sn))}function K(sn){return s=u,A&&t?O(sn):(t=i=u,l)}function Ln(){s!==u&&po(s),d=0,t=h=i=s=u}function bn(){return s===u?l:K(ot())}function Pn(){var sn=ot(),Zn=P(sn);if(t=arguments,i=this,h=sn,Zn){if(s===u)return L(h);if(m)return po(s),s=_r(G,e),O(h)}return s===u&&(s=_r(G,e)),l}return Pn.cancel=Ln,Pn.flush=bn,Pn}var v0=N(function(n,e){return Zf(n,1,e)}),m0=N(function(n,e,r){return Zf(n,Dn(e)||0,r)});function w0(n){return re(n,$t)}function at(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Wn(y);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var l=n.apply(this,t);return r.cache=o.set(i,l)||o,l};return r.cache=new(at.Cache||ne),r}at.Cache=ne;function lt(n){if(typeof n!="function")throw new Wn(y);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function y0(n){return ea(2,n)}var x0=og(function(n,e){e=e.length==1&&q(e[0])?rn(e[0],Tn(C())):rn(vn(e,1),Tn(C()));var r=e.length;return N(function(t){for(var i=-1,o=mn(t.length,r);++i=e}),Oe=kf(function(){return arguments}())?kf:function(n){return on(n)&&Q.call(n,"callee")&&!$f.call(n,"callee")},q=p.isArray,B0=wf?Tn(wf):zh;function Sn(n){return n!=null&&st(n.length)&&!ue(n)}function ln(n){return on(n)&&Sn(n)}function q0(n){return n===!0||n===!1||on(n)&&yn(n)==Je}var ve=Vc||uu,$0=yf?Tn(yf):Kh;function U0(n){return on(n)&&n.nodeType===1&&!dr(n)}function D0(n){if(n==null)return!0;if(Sn(n)&&(q(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||He(n)||Oe(n)))return!n.length;var e=wn(n);if(e==Gn||e==Hn)return!n.size;if(pr(n))return!Ai(n).length;for(var r in n)if(Q.call(n,r))return!1;return!0}function N0(n,e){return cr(n,e)}function G0(n,e,r){r=typeof r=="function"?r:u;var t=r?r(n,e):u;return t===u?cr(n,e,u,r):!!t}function Ji(n){if(!on(n))return!1;var e=yn(n);return e==br||e==cs||typeof n.message=="string"&&typeof n.name=="string"&&!dr(n)}function H0(n){return typeof n=="number"&&Df(n)}function ue(n){if(!un(n))return!1;var e=yn(n);return e==Ar||e==Yu||e==ss||e==gs}function oa(n){return typeof n=="number"&&n==U(n)}function st(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function un(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function on(n){return n!=null&&typeof n=="object"}var aa=xf?Tn(xf):Zh;function z0(n,e){return n===e||bi(n,e,Ui(e))}function K0(n,e,r){return r=typeof r=="function"?r:u,bi(n,e,Ui(e),r)}function Y0(n){return la(n)&&n!=+n}function Z0(n){if(Cg(n))throw new B(w);return jf(n)}function X0(n){return n===null}function J0(n){return n==null}function la(n){return typeof n=="number"||on(n)&&yn(n)==Ve}function dr(n){if(!on(n)||yn(n)!=kn)return!1;var e=qr(n);if(e===null)return!0;var r=Q.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Fr.call(r)==Kc}var Qi=bf?Tn(bf):Xh;function Q0(n){return oa(n)&&n>=-ae&&n<=ae}var sa=Af?Tn(Af):Jh;function ct(n){return typeof n=="string"||!q(n)&&on(n)&&yn(n)==je}function Cn(n){return typeof n=="symbol"||on(n)&&yn(n)==Sr}var He=Sf?Tn(Sf):Qh;function V0(n){return n===u}function k0(n){return on(n)&&wn(n)==nr}function j0(n){return on(n)&&yn(n)==_s}var n1=et(Si),e1=et(function(n,e){return n<=e});function ca(n){if(!n)return[];if(Sn(n))return ct(n)?zn(n):An(n);if(tr&&n[tr])return Fc(n[tr]());var e=wn(n),r=e==Gn?ci:e==Hn?Cr:ze;return r(n)}function fe(n){if(!n)return n===0?n:0;if(n=Dn(n),n===me||n===-me){var e=n<0?-1:1;return e*fs}return n===n?n:0}function U(n){var e=fe(n),r=e%1;return e===e?r?e-r:e:0}function ha(n){return n?Ae(U(n),0,Xn):0}function Dn(n){if(typeof n=="number")return n;if(Cn(n))return yr;if(un(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=un(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Cf(n);var r=Bs.test(n);return r||$s.test(n)?dc(n.slice(2),r?2:8):Ws.test(n)?yr:+n}function ga(n){return Qn(n,In(n))}function r1(n){return n?Ae(U(n),-ae,ae):n===0?n:0}function X(n){return n==null?"":En(n)}var t1=De(function(n,e){if(pr(e)||Sn(e)){Qn(e,pn(e),n);return}for(var r in e)Q.call(e,r)&&ar(n,r,e[r])}),pa=De(function(n,e){Qn(e,In(e),n)}),ht=De(function(n,e,r,t){Qn(e,In(e),n,t)}),i1=De(function(n,e,r,t){Qn(e,pn(e),n,t)}),u1=te(vi);function f1(n,e){var r=Ue(n);return e==null?r:Kf(r,e)}var o1=N(function(n,e){n=k(n);var r=-1,t=e.length,i=t>2?e[2]:u;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Qn(n,qi(n),r),t&&(r=qn(r,fn|M|F,mg));for(var i=e.length;i--;)Ei(r,e[i]);return r});function I1(n,e){return da(n,lt(C(e)))}var R1=te(function(n,e){return n==null?{}:jh(n,e)});function da(n,e){if(n==null)return{};var r=rn(qi(n),function(t){return[t]});return e=C(e),fo(n,r,function(t,i){return e(t,i[0])})}function O1(n,e,r){e=_e(e,n);var t=-1,i=e.length;for(i||(i=1,n=u);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=Nf();return mn(n+i*(e-n+_c("1e-"+((i+"").length-1))),e)}return Ri(n,e)}var $1=Ne(function(n,e,r){return e=e.toLowerCase(),n+(r?wa(e):e)});function wa(n){return ji(X(n).toLowerCase())}function ya(n){return n=X(n),n&&n.replace(Ds,Tc).replace(uc,"")}function U1(n,e,r){n=X(n),e=En(e);var t=n.length;r=r===u?t:Ae(U(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function D1(n){return n=X(n),n&&ys.test(n)?n.replace(Ju,Ec):n}function N1(n){return n=X(n),n&&Rs.test(n)?n.replace(Xt,"\\$&"):n}var G1=Ne(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),H1=Ne(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),z1=Ao("toLowerCase");function K1(n,e,r){n=X(n),e=U(e);var t=e?Me(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return nt(Nr(i),r)+n+nt(Dr(i),r)}function Y1(n,e,r){n=X(n),e=U(e);var t=e?Me(n):0;return e&&t>>0,r?(n=X(n),n&&(typeof e=="string"||e!=null&&!Qi(e))&&(e=En(e),!e&&Fe(n))?de(zn(n),0,r):n.split(e,r)):[]}var j1=Ne(function(n,e,r){return n+(r?" ":"")+ji(e)});function n_(n,e,r){return n=X(n),r=r==null?0:Ae(U(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function e_(n,e,r){var t=f.templateSettings;r&&xn(n,e,r)&&(e=u),n=X(n),e=ht({},e,t,Co);var i=ht({},e.imports,t.imports,Co),o=pn(i),l=si(i,o),s,h,d=0,v=e.interpolate||Ir,m="__p += '",A=hi((e.escape||Ir).source+"|"+v.source+"|"+(v===Qu?Ms:Ir).source+"|"+(e.evaluate||Ir).source+"|$","g"),O="//# sourceURL="+(Q.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++sc+"]")+` +`;n.replace(A,function(P,G,K,Ln,bn,Pn){return K||(K=Ln),m+=n.slice(d,Pn).replace(Ns,Cc),G&&(s=!0,m+=`' + +__e(`+G+`) + +'`),bn&&(h=!0,m+=`'; +`+bn+`; +__p += '`),K&&(m+=`' + +((__t = (`+K+`)) == null ? '' : __t) + +'`),d=Pn+P.length,P}),m+=`'; +`;var L=Q.call(e,"variable")&&e.variable;if(!L)m=`with (obj) { +`+m+` +} +`;else if(Ps.test(L))throw new B(E);m=(h?m.replace(ds,""):m).replace(vs,"$1").replace(ms,"$1;"),m="function("+(L||"obj")+`) { +`+(L?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(h?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+m+`return __p +}`;var D=ba(function(){return Z(o,O+"return "+m).apply(u,l)});if(D.source=m,Ji(D))throw D;return D}function r_(n){return X(n).toLowerCase()}function t_(n){return X(n).toUpperCase()}function i_(n,e,r){if(n=X(n),n&&(r||e===u))return Cf(n);if(!n||!(e=En(e)))return n;var t=zn(n),i=zn(e),o=Lf(t,i),l=Pf(t,i)+1;return de(t,o,l).join("")}function u_(n,e,r){if(n=X(n),n&&(r||e===u))return n.slice(0,Mf(n)+1);if(!n||!(e=En(e)))return n;var t=zn(n),i=Pf(t,zn(e))+1;return de(t,0,i).join("")}function f_(n,e,r){if(n=X(n),n&&(r||e===u))return n.replace(Jt,"");if(!n||!(e=En(e)))return n;var t=zn(n),i=Lf(t,zn(e));return de(t,i).join("")}function o_(n,e){var r=ns,t=es;if(un(e)){var i="separator"in e?e.separator:i;r="length"in e?U(e.length):r,t="omission"in e?En(e.omission):t}n=X(n);var o=n.length;if(Fe(n)){var l=zn(n);o=l.length}if(r>=o)return n;var s=r-Me(t);if(s<1)return t;var h=l?de(l,0,s).join(""):n.slice(0,s);if(i===u)return h+t;if(l&&(s+=h.length-s),Qi(i)){if(n.slice(s).search(i)){var d,v=h;for(i.global||(i=hi(i.source,X(Vu.exec(i))+"g")),i.lastIndex=0;d=i.exec(v);)var m=d.index;h=h.slice(0,m===u?s:m)}}else if(n.indexOf(En(i),s)!=s){var A=h.lastIndexOf(i);A>-1&&(h=h.slice(0,A))}return h+t}function a_(n){return n=X(n),n&&ws.test(n)?n.replace(Xu,qc):n}var l_=Ne(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),ji=Ao("toUpperCase");function xa(n,e,r){return n=X(n),e=r?u:e,e===u?Pc(n)?Dc(n):Ac(n):n.match(e)||[]}var ba=N(function(n,e){try{return On(n,u,e)}catch(r){return Ji(r)?r:new B(r)}}),s_=te(function(n,e){return Mn(e,function(r){r=Vn(r),ee(n,r,Zi(n[r],n))}),n});function c_(n){var e=n==null?0:n.length,r=C();return n=e?rn(n,function(t){if(typeof t[1]!="function")throw new Wn(y);return[r(t[0]),t[1]]}):[],N(function(t){for(var i=-1;++iae)return[];var r=Xn,t=mn(n,Xn);e=C(e),n-=Xn;for(var i=li(t,e);++r0||e<0)?new z(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==u&&(e=U(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},z.prototype.toArray=function(){return this.take(Xn)},Jn(z.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=f[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(f.prototype[e]=function(){var l=this.__wrapped__,s=t?[1]:arguments,h=l instanceof z,d=s[0],v=h||q(l),m=function(G){var K=i.apply(f,se([G],s));return t&&A?K[0]:K};v&&r&&typeof d=="function"&&d.length!=1&&(h=v=!1);var A=this.__chain__,O=!!this.__actions__.length,L=o&&!A,D=h&&!O;if(!o&&v){l=D?l:new z(this);var P=n.apply(l,s);return P.__actions__.push({func:ut,args:[m],thisArg:u}),new Bn(P,A)}return L&&D?n.apply(this,s):(P=this.thru(m),L?t?P.value()[0]:P.value():P)})}),Mn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Lr[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(q(o)?o:[],i)}return this[r](function(l){return e.apply(q(l)?l:[],i)})}}),Jn(z.prototype,function(n,e){var r=f[e];if(r){var t=r.name+"";Q.call($e,t)||($e[t]=[]),$e[t].push({name:e,func:r})}}),$e[kr(u,_n).name]=[{name:"wrapper",func:u}],z.prototype.clone=ah,z.prototype.reverse=lh,z.prototype.value=sh,f.prototype.at=Up,f.prototype.chain=Dp,f.prototype.commit=Np,f.prototype.next=Gp,f.prototype.plant=zp,f.prototype.reverse=Kp,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=Yp,f.prototype.first=f.prototype.head,tr&&(f.prototype[tr]=Hp),f},We=Nc();we?((we.exports=We)._=We,ei._=We):dn._=We}).call(Ke)}(vr,vr.exports);var Nn=vr.exports;const au=" `.-':_,^=;><+!rc*/z?sLTv)J7(|Fi{C}fI31tlu[neoZ5Yxjya]2ESwqkP6h9d4VpOGbUAKXHm8RD#$Bg0MNWQ%&@";function Ha(a){return Nn.chain(au).split("").indexOf(a).thru(g=>Math.max(g-3,0)/au.length).value()}var za=function(){},Ka=za(),Te=function(a){return a!==Ka&&a!==null},Ya=Te,Za=Array.prototype.forEach,Xa=Object.create,Ja=function(a,g){var u;for(u in a)g[u]=a[u]},Qa=function(a){var g=Xa(null);return Za.call(arguments,function(u){Ya(u)&&Ja(Object(u),g)}),g},Va=function(){var a=Math.sign;return typeof a!="function"?!1:a(10)===1&&a(-20)===-1},gt,lu;function ka(){return lu||(lu=1,gt=function(a){return a=Number(a),isNaN(a)||a===0?a:a>0?1:-1}),gt}var ja=Va()?Math.sign:ka(),nl=ja,el=Math.abs,rl=Math.floor,tl=function(a){return isNaN(a)?0:(a=Number(a),a===0||!isFinite(a)?a:nl(a)*rl(el(a)))},il=tl,ul=Math.max,fl=function(a){return ul(0,il(a))},su=function(a){if(typeof a!="function")throw new TypeError(a+" is not a function");return a},ol=Te,cu=function(a){if(!ol(a))throw new TypeError("Cannot use null or undefined");return a},al={exports:{}},ll=function(){var a=Object.assign,g;return typeof a!="function"?!1:(g={foo:"raz"},a(g,{bar:"dwa"},{trzy:"trzy"}),g.foo+g.bar+g.trzy==="razdwatrzy")},pt,hu;function sl(){return hu||(hu=1,pt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),pt}var _t,gu;function cl(){if(gu)return _t;gu=1;var a=Te,g=Object.keys;return _t=function(u){return g(a(u)?Object(u):u)},_t}var dt,pu;function hl(){return pu||(pu=1,dt=sl()()?Object.keys:cl()),dt}var vt,_u;function gl(){if(_u)return vt;_u=1;var a=hl(),g=cu,u=Math.max;return vt=function(b,x){var w,y,E=u(arguments.length,2),R;for(b=Object(g(b)),R=function(I){try{b[I]=x[I]}catch(Y){w||(w=Y)}},y=1;y-1},wt}var Ll=El()?String.prototype.contains:Cl(),mr=wu,xu=Tl,bu=du,Au=Qa,Ye=Ll,Pl=mu.exports=function(a,g){var u,b,x,w,y;return arguments.length<2||typeof a!="string"?(w=g,g=a,a=null):w=arguments[2],mr(a)?(u=Ye.call(a,"c"),b=Ye.call(a,"e"),x=Ye.call(a,"w")):(u=x=!0,b=!1),y={value:g,configurable:u,enumerable:b,writable:x},w?bu(Au(w),y):y};Pl.gs=function(a,g,u){var b,x,w,y;return typeof a!="string"?(w=u,u=g,g=a,a=null):w=arguments[3],mr(g)?xu(g)?mr(u)?xu(u)||(w=u,u=void 0):u=void 0:(w=g,g=u=void 0):g=void 0,mr(a)?(b=Ye.call(a,"c"),x=Ye.call(a,"e")):(b=!0,x=!1),y={get:g,set:u,configurable:b,enumerable:x},w?bu(Au(w),y):y};var Ze=mu.exports,yt={exports:{}};(function(a,g){var u=Ze,b=su,x=Function.prototype.apply,w=Function.prototype.call,y=Object.create,E=Object.defineProperty,R=Object.defineProperties,I=Object.prototype.hasOwnProperty,Y={configurable:!0,enumerable:!1,writable:!0},fn,M,F,tn,an,W,_n;fn=function($,T){var H;return b(T),I.call(this,"__ee__")?H=this.__ee__:(H=Y.value=y(null),E(this,"__ee__",Y),Y.value=null),H[$]?typeof H[$]=="object"?H[$].push(T):H[$]=[H[$],T]:H[$]=T,this},M=function($,T){var H,J;return b(T),J=this,fn.call(this,$,H=function(){F.call(J,$,H),x.call(T,this,arguments)}),H.__eeOnceListener__=T,this},F=function($,T){var H,J,V,nn;if(b(T),!I.call(this,"__ee__"))return this;if(H=this.__ee__,!H[$])return this;if(J=H[$],typeof J=="object")for(nn=0;V=J[nn];++nn)(V===T||V.__eeOnceListener__===T)&&(J.length===2?H[$]=J[nn?0:1]:J.splice(nn,1));else(J===T||J.__eeOnceListener__===T)&&delete H[$];return this},tn=function($){var T,H,J,V,nn;if(I.call(this,"__ee__")&&(V=this.__ee__[$],!!V))if(typeof V=="object"){for(H=arguments.length,nn=new Array(H-1),T=1;T=55296&&H<=56319&&(cn+=M[++W])),cn=F?I.call(F,tn,cn,_n):cn,an?(Y.value=cn,fn($,_n,Y)):$[_n]=cn,++_n;T=_n}}if(T===void 0)for(T=b(M.length),an&&($=new an(T)),W=0;Wasync g=>{try{const u=await a(g);postMessage({result:u})}catch(u){postMessage({error:u})}};function zu({map:a}){const g=a.split(/\r?\n/),[,,,,...u]=g;return{symbols:Nn.chain(u).join("").trim().split("").uniq().map(b=>({symbol:b,value:Ha(b)})).value()}}onmessage=Hu(async({data:a})=>zu(a));function Jl(a,g){return Nn.map(a,u=>Nn.map(u,b=>g(b)))}const{min:Ql}=Math;function Xe(a,{x:g,y:u}){var b;return!!((b=a==null?void 0:a[u])!=null&&b[g])}function Vl(a,g,{x:u,y:b},x){let w=u,y=b;for(;w+1<=x.x&&y+1<=x.y&&!(Nn.range(u,w+1).map(I=>Xe(a,{x:I,y:y+1})).includes(!g)||Nn.range(b,y+2).map(I=>Xe(a,{x:w+1,y:I})).includes(!g));)w++,y++;for(;y+1<=x.y&&!Nn.range(u,w+1).map(R=>Xe(a,{x:R,y:y+1})).includes(!g);)y++;for(;w+1<=x.x&&!Nn.range(b,y+1).map(R=>Xe(a,{x:w+1,y:R})).includes(!g);)w++;return{x:w,y}}function kl(a,g,u={x:0,y:0},b={x:g.width-1,y:g.height-1}){const x=[[u,b]],w=[];for(;x.length>0;){const[y,E]=x.pop();if(y.x<=E.x&&y.y<=E.y){const R=Xe(a,y),I=Vl(a,R,y,E);x.push([{x:y.x,y:I.y+1},{x:Ql(E.x,I.x),y:E.y}],[{x:I.x+1,y:y.y},{x:E.x,y:E.y}]),R&&w.push({...y,width:I.x-y.x+1,height:I.y-y.y+1})}}return w}function jl({map:a,options:{symbols:g={},color:u="#fff",background:b="#000"}={}}){const x=a.split(/\r?\n/),[,w="",y="",,...E]=x,[R,I]=[y,w].map(F=>+Nn.last(F.split(" "))),{symbols:Y}=zu({map:a}),fn=Ga([b,u]),M=Nn.chain(Y).filter(({value:F,symbol:tn})=>!!F||!!g[tn]).map(({symbol:F,value:tn})=>[void 0,"auto"].includes(g[F])?[F,fn(tn)]:[F,g[F]]).filter(([,F])=>!!F).map(([F,tn])=>{const an=kl(Jl(E,W=>W===F),{width:R,height:I});return Nn.map(an,W=>({$:"rect",fill:tn,alpha:1,...W}))}).flatten().value();return{log:[`${(M.length*100/(R*I)).toFixed(2)}% of original`],bounds:{width:R,height:I,minX:0,minY:0,maxX:R,maxY:I},nodes:M.map(F=>({component:F}))}}onmessage=Hu(async({data:a})=>jl(a))})(); diff --git a/assets/parseMesh.worker-BqXfsHv6.js b/assets/parseMesh.worker-BqXfsHv6.js deleted file mode 100644 index a093558..0000000 --- a/assets/parseMesh.worker-BqXfsHv6.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ya(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var _t={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */_t.exports,function(h,d){(function(){var f,L="4.17.21",C=200,E="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",I="Expected a function",J="Invalid `variable` option passed into `_.template`",Z="__lodash_hash_undefined__",G=500,nn="__lodash_placeholder__",K=1,F=2,D=4,N=1,x=2,w=1,Q=2,R=4,b=8,M=16,k=32,en=64,un=128,hn=256,Br=512,Fs=30,Ws="...",Ms=800,Bs=16,Du=1,qs=2,Us=3,de=1/0,oe=9007199254740991,Ds=17976931348623157e292,mt=NaN,Zn=4294967295,Ns=Zn-1,zs=Zn>>>1,Gs=[["ary",un],["bind",w],["bindKey",Q],["curry",b],["curryRight",M],["flip",Br],["partial",k],["partialRight",en],["rearg",hn]],$e="[object Arguments]",wt="[object Array]",Hs="[object AsyncFunction]",Ze="[object Boolean]",Xe="[object Date]",Ks="[object DOMException]",yt="[object Error]",xt="[object Function]",Nu="[object GeneratorFunction]",Nn="[object Map]",Je="[object Number]",Ys="[object Null]",Vn="[object Object]",zu="[object Promise]",Zs="[object Proxy]",Qe="[object RegExp]",zn="[object Set]",Ve="[object String]",bt="[object Symbol]",Xs="[object Undefined]",ke="[object WeakMap]",Js="[object WeakSet]",je="[object ArrayBuffer]",Ee="[object DataView]",qr="[object Float32Array]",Ur="[object Float64Array]",Dr="[object Int8Array]",Nr="[object Int16Array]",zr="[object Int32Array]",Gr="[object Uint8Array]",Hr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",Yr="[object Uint32Array]",Qs=/\b__p \+= '';/g,Vs=/\b(__p \+=) '' \+/g,ks=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Gu=/&(?:amp|lt|gt|quot|#39);/g,Hu=/[&<>"']/g,js=RegExp(Gu.source),nl=RegExp(Hu.source),el=/<%-([\s\S]+?)%>/g,tl=/<%([\s\S]+?)%>/g,Ku=/<%=([\s\S]+?)%>/g,rl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,il=/^\w*$/,ul=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Zr=/[\\^$.*+?()[\]{}|]/g,fl=RegExp(Zr.source),Xr=/^\s+/,ol=/\s/,al=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sl=/\{\n\/\* \[wrapped with (.+)\] \*/,ll=/,? & /,cl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hl=/[()=,{}\[\]\/\s]/,gl=/\\(\\)?/g,pl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yu=/\w*$/,_l=/^[-+]0x[0-9a-f]+$/i,vl=/^0b[01]+$/i,dl=/^\[object .+?Constructor\]$/,ml=/^0o[0-7]+$/i,wl=/^(?:0|[1-9]\d*)$/,yl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,At=/($^)/,xl=/['\n\r\u2028\u2029\\]/g,St="\\ud800-\\udfff",bl="\\u0300-\\u036f",Al="\\ufe20-\\ufe2f",Sl="\\u20d0-\\u20ff",Zu=bl+Al+Sl,Xu="\\u2700-\\u27bf",Ju="a-z\\xdf-\\xf6\\xf8-\\xff",Rl="\\xac\\xb1\\xd7\\xf7",Il="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ol="\\u2000-\\u206f",Tl=" \\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",Qu="A-Z\\xc0-\\xd6\\xd8-\\xde",Vu="\\ufe0e\\ufe0f",ku=Rl+Il+Ol+Tl,Jr="['’]",$l="["+St+"]",ju="["+ku+"]",Rt="["+Zu+"]",nf="\\d+",El="["+Xu+"]",ef="["+Ju+"]",tf="[^"+St+ku+nf+Xu+Ju+Qu+"]",Qr="\\ud83c[\\udffb-\\udfff]",Cl="(?:"+Rt+"|"+Qr+")",rf="[^"+St+"]",Vr="(?:\\ud83c[\\udde6-\\uddff]){2}",kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Ce="["+Qu+"]",uf="\\u200d",ff="(?:"+ef+"|"+tf+")",Ll="(?:"+Ce+"|"+tf+")",of="(?:"+Jr+"(?:d|ll|m|re|s|t|ve))?",af="(?:"+Jr+"(?:D|LL|M|RE|S|T|VE))?",sf=Cl+"?",lf="["+Vu+"]?",Pl="(?:"+uf+"(?:"+[rf,Vr,kr].join("|")+")"+lf+sf+")*",Fl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",cf=lf+sf+Pl,Ml="(?:"+[El,Vr,kr].join("|")+")"+cf,Bl="(?:"+[rf+Rt+"?",Rt,Vr,kr,$l].join("|")+")",ql=RegExp(Jr,"g"),Ul=RegExp(Rt,"g"),jr=RegExp(Qr+"(?="+Qr+")|"+Bl+cf,"g"),Dl=RegExp([Ce+"?"+ef+"+"+of+"(?="+[ju,Ce,"$"].join("|")+")",Ll+"+"+af+"(?="+[ju,Ce+ff,"$"].join("|")+")",Ce+"?"+ff+"+"+of,Ce+"+"+af,Wl,Fl,nf,Ml].join("|"),"g"),Nl=RegExp("["+uf+St+Zu+Vu+"]"),zl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Gl=["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"],Hl=-1,fn={};fn[qr]=fn[Ur]=fn[Dr]=fn[Nr]=fn[zr]=fn[Gr]=fn[Hr]=fn[Kr]=fn[Yr]=!0,fn[$e]=fn[wt]=fn[je]=fn[Ze]=fn[Ee]=fn[Xe]=fn[yt]=fn[xt]=fn[Nn]=fn[Je]=fn[Vn]=fn[Qe]=fn[zn]=fn[Ve]=fn[ke]=!1;var rn={};rn[$e]=rn[wt]=rn[je]=rn[Ee]=rn[Ze]=rn[Xe]=rn[qr]=rn[Ur]=rn[Dr]=rn[Nr]=rn[zr]=rn[Nn]=rn[Je]=rn[Vn]=rn[Qe]=rn[zn]=rn[Ve]=rn[bt]=rn[Gr]=rn[Hr]=rn[Kr]=rn[Yr]=!0,rn[yt]=rn[xt]=rn[ke]=!1;var Kl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Yl={"&":"&","<":"<",">":">",'"':""","'":"'"},Zl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Xl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Jl=parseFloat,Ql=parseInt,hf=typeof Oe=="object"&&Oe&&Oe.Object===Object&&Oe,Vl=typeof self=="object"&&self&&self.Object===Object&&self,vn=hf||Vl||Function("return this")(),ni=d&&!d.nodeType&&d,me=ni&&!0&&h&&!h.nodeType&&h,gf=me&&me.exports===ni,ei=gf&&hf.process,Pn=function(){try{var l=me&&me.require&&me.require("util").types;return l||ei&&ei.binding&&ei.binding("util")}catch{}}(),pf=Pn&&Pn.isArrayBuffer,_f=Pn&&Pn.isDate,vf=Pn&&Pn.isMap,df=Pn&&Pn.isRegExp,mf=Pn&&Pn.isSet,wf=Pn&&Pn.isTypedArray;function On(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function kl(l,p,g,A){for(var P=-1,X=l==null?0:l.length;++P-1}function ti(l,p,g){for(var A=-1,P=l==null?0:l.length;++A-1;);return g}function Of(l,p){for(var g=l.length;g--&&Le(p,l[g],0)>-1;);return g}function oc(l,p){for(var g=l.length,A=0;g--;)l[g]===p&&++A;return A}var ac=fi(Kl),sc=fi(Yl);function lc(l){return"\\"+Xl[l]}function cc(l,p){return l==null?f:l[p]}function Pe(l){return Nl.test(l)}function hc(l){return zl.test(l)}function gc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function li(l){var p=-1,g=Array(l.size);return l.forEach(function(A,P){g[++p]=[P,A]}),g}function Tf(l,p){return function(g){return l(p(g))}}function le(l,p){for(var g=-1,A=l.length,P=0,X=[];++g-1}function nh(n,e){var t=this.__data__,r=Gt(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}kn.prototype.clear=Qc,kn.prototype.delete=Vc,kn.prototype.get=kc,kn.prototype.has=jc,kn.prototype.set=nh;function jn(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Bn(n,e,t,r,i,o){var a,s=e&K,c=e&F,_=e&D;if(t&&(a=i?t(n,r,i,o):t(n)),a!==f)return a;if(!an(n))return n;var v=W(n);if(v){if(a=ig(n),!s)return An(n,a)}else{var m=wn(n),y=m==xt||m==Nu;if(ve(n))return lo(n,s);if(m==Vn||m==$e||y&&!i){if(a=c||y?{}:Eo(n),!s)return c?Zh(n,vh(a,n)):Yh(n,Df(a,n))}else{if(!rn[m])return i?n:{};a=ug(n,m,s)}}o||(o=new Hn);var S=o.get(n);if(S)return S;o.set(n,a),ua(n)?n.forEach(function($){a.add(Bn($,e,t,$,n,o))}):ra(n)&&n.forEach(function($,z){a.set(z,Bn($,e,t,z,n,o))});var T=_?c?Mi:Wi:c?Rn:_n,q=v?f:T(n);return Fn(q||n,function($,z){q&&(z=$,$=n[z]),ft(a,z,Bn($,e,t,z,n,o))}),a}function dh(n){var e=_n(n);return function(t){return Nf(t,n,e)}}function Nf(n,e,t){var r=t.length;if(n==null)return!r;for(n=tn(n);r--;){var i=t[r],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function zf(n,e,t){if(typeof n!="function")throw new Wn(I);return gt(function(){n.apply(f,t)},e)}function ot(n,e,t,r){var i=-1,o=It,a=!0,s=n.length,c=[],_=e.length;if(!s)return c;t&&(e=on(e,Tn(t))),r?(o=ti,a=!1):e.length>=C&&(o=nt,a=!1,e=new xe(e));n:for(;++ii?0:i+t),r=r===f||r>i?i:B(r),r<0&&(r+=i),r=t>r?0:oa(r);t0&&t(s)?e>1?dn(s,e-1,t,r,i):se(i,s):r||(i[i.length]=s)}return i}var di=vo(),Kf=vo(!0);function Xn(n,e){return n&&di(n,e,_n)}function mi(n,e){return n&&Kf(n,e,_n)}function Kt(n,e){return ae(e,function(t){return ie(n[t])})}function Ae(n,e){e=pe(e,n);for(var t=0,r=e.length;n!=null&&te}function yh(n,e){return n!=null&&j.call(n,e)}function xh(n,e){return n!=null&&e in tn(n)}function bh(n,e,t){return n>=mn(e,t)&&n=120&&v.length>=120)?new xe(a&&v):f}v=n[0];var m=-1,y=s[0];n:for(;++m-1;)s!==n&&Mt.call(s,c,1),Mt.call(n,c,1);return n}function to(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==o){var o=i;re(i)?Mt.call(n,i,1):Ti(n,i)}}return n}function Ri(n,e){return n+Ut(Mf()*(e-n+1))}function Wh(n,e,t,r){for(var i=-1,o=pn(qt((e-n)/(t||1)),0),a=g(o);o--;)a[r?o:++i]=n,n+=t;return a}function Ii(n,e){var t="";if(!n||e<1||e>oe)return t;do e%2&&(t+=n),e=Ut(e/2),e&&(n+=n);while(e);return t}function U(n,e){return Gi(Po(n,e,In),n+"")}function Mh(n){return Uf(He(n))}function Bh(n,e){var t=He(n);return tr(t,be(e,0,t.length))}function lt(n,e,t,r){if(!an(n))return n;e=pe(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=g(i);++r>>1,a=n[o];a!==null&&!En(a)&&(t?a<=e:a=C){var _=e?null:Vh(n);if(_)return Tt(_);a=!1,i=nt,c=new xe}else c=e?[]:s;n:for(;++r=r?n:qn(n,e,t)}var so=Tc||function(n){return vn.clearTimeout(n)};function lo(n,e){if(e)return n.slice();var t=n.length,r=Cf?Cf(t):new n.constructor(t);return n.copy(r),r}function Li(n){var e=new n.constructor(n.byteLength);return new Ft(e).set(new Ft(n)),e}function zh(n,e){var t=e?Li(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Gh(n){var e=new n.constructor(n.source,Yu.exec(n));return e.lastIndex=n.lastIndex,e}function Hh(n){return ut?tn(ut.call(n)):{}}function co(n,e){var t=e?Li(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function ho(n,e){if(n!==e){var t=n!==f,r=n===null,i=n===n,o=En(n),a=e!==f,s=e===null,c=e===e,_=En(e);if(!s&&!_&&!o&&n>e||o&&a&&c&&!s&&!_||r&&a&&c||!t&&c||!i)return 1;if(!r&&!o&&!_&&n=s)return c;var _=t[r];return c*(_=="desc"?-1:1)}}return n.index-e.index}function go(n,e,t,r){for(var i=-1,o=n.length,a=t.length,s=-1,c=e.length,_=pn(o-a,0),v=g(c+_),m=!r;++s1?t[i-1]:f,a=i>2?t[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(t[0],t[1],a)&&(o=i<3?f:o,i=1),e=tn(e);++r-1?i[o?e[a]:a]:f}}function yo(n){return te(function(e){var t=e.length,r=t,i=Mn.prototype.thru;for(n&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new Wn(I);if(i&&!a&&nr(o)=="wrapper")var a=new Mn([],!0)}for(r=a?r:t;++r1&&Y.reverse(),v&&cs))return!1;var _=o.get(n),v=o.get(e);if(_&&v)return _==e&&v==n;var m=-1,y=!0,S=t&x?new xe:f;for(o.set(n,e),o.set(e,n);++m1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(al,`{ -/* [wrapped with `+e+`] */ -`)}function og(n){return W(n)||Ie(n)||!!(Ff&&n&&n[Ff])}function re(n,e){var t=typeof n;return e=e??oe,!!e&&(t=="number"||t!="symbol"&&wl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Ms)return arguments[0]}else e=0;return n.apply(f,arguments)}}function tr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===f?r:e;++t1?n[e-1]:f;return t=typeof t=="function"?(n.pop(),t):f,Ko(n,t)});function Yo(n){var e=u(n);return e.__chain__=!0,e}function mp(n,e){return e(n),n}function rr(n,e){return e(n)}var wp=te(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(o){return vi(o,n)};return e>1||this.__actions__.length||!(r instanceof H)||!re(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:rr,args:[i],thisArg:f}),new Mn(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function yp(){return Yo(this)}function xp(){return new Mn(this.value(),this.__chain__)}function bp(){this.__values__===f&&(this.__values__=fa(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Ap(){return this}function Sp(n){for(var e,t=this;t instanceof zt;){var r=Uo(t);r.__index__=0,r.__values__=f,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Rp(){var n=this.__wrapped__;if(n instanceof H){var e=n;return this.__actions__.length&&(e=new H(this)),e=e.reverse(),e.__actions__.push({func:rr,args:[Hi],thisArg:f}),new Mn(e,this.__chain__)}return this.thru(Hi)}function Ip(){return oo(this.__wrapped__,this.__actions__)}var Op=Jt(function(n,e,t){j.call(n,t)?++n[t]:ne(n,t,1)});function Tp(n,e,t){var r=W(n)?yf:mh;return t&&xn(n,e,t)&&(e=f),r(n,O(e,3))}function $p(n,e){var t=W(n)?ae:Hf;return t(n,O(e,3))}var Ep=wo(Do),Cp=wo(No);function Lp(n,e){return dn(ir(n,e),1)}function Pp(n,e){return dn(ir(n,e),de)}function Fp(n,e,t){return t=t===f?1:B(t),dn(ir(n,e),t)}function Zo(n,e){var t=W(n)?Fn:he;return t(n,O(e,3))}function Xo(n,e){var t=W(n)?jl:Gf;return t(n,O(e,3))}var Wp=Jt(function(n,e,t){j.call(n,t)?n[t].push(e):ne(n,t,[e])});function Mp(n,e,t,r){n=Sn(n)?n:He(n),t=t&&!r?B(t):0;var i=n.length;return t<0&&(t=pn(i+t,0)),sr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Le(n,e,t)>-1}var Bp=U(function(n,e,t){var r=-1,i=typeof e=="function",o=Sn(n)?g(n.length):[];return he(n,function(a){o[++r]=i?On(e,a,t):at(a,e,t)}),o}),qp=Jt(function(n,e,t){ne(n,t,e)});function ir(n,e){var t=W(n)?on:Qf;return t(n,O(e,3))}function Up(n,e,t,r){return n==null?[]:(W(e)||(e=e==null?[]:[e]),t=r?f:t,W(t)||(t=t==null?[]:[t]),no(n,e,t))}var Dp=Jt(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Np(n,e,t){var r=W(n)?ri:Sf,i=arguments.length<3;return r(n,O(e,4),t,i,he)}function zp(n,e,t){var r=W(n)?nc:Sf,i=arguments.length<3;return r(n,O(e,4),t,i,Gf)}function Gp(n,e){var t=W(n)?ae:Hf;return t(n,or(O(e,3)))}function Hp(n){var e=W(n)?Uf:Mh;return e(n)}function Kp(n,e,t){(t?xn(n,e,t):e===f)?e=1:e=B(e);var r=W(n)?gh:Bh;return r(n,e)}function Yp(n){var e=W(n)?ph:Uh;return e(n)}function Zp(n){if(n==null)return 0;if(Sn(n))return sr(n)?Fe(n):n.length;var e=wn(n);return e==Nn||e==zn?n.size:bi(n).length}function Xp(n,e,t){var r=W(n)?ii:Dh;return t&&xn(n,e,t)&&(e=f),r(n,O(e,3))}var Jp=U(function(n,e){if(n==null)return[];var t=e.length;return t>1&&xn(n,e[0],e[1])?e=[]:t>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),no(n,dn(e,1),[])}),ur=$c||function(){return vn.Date.now()};function Qp(n,e){if(typeof e!="function")throw new Wn(I);return n=B(n),function(){if(--n<1)return e.apply(this,arguments)}}function Jo(n,e,t){return e=t?f:e,e=n&&e==null?n.length:e,ee(n,un,f,f,f,f,e)}function Qo(n,e){var t;if(typeof e!="function")throw new Wn(I);return n=B(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=f),t}}var Yi=U(function(n,e,t){var r=w;if(t.length){var i=le(t,ze(Yi));r|=k}return ee(n,r,e,t,i)}),Vo=U(function(n,e,t){var r=w|Q;if(t.length){var i=le(t,ze(Vo));r|=k}return ee(e,r,n,t,i)});function ko(n,e,t){e=t?f:e;var r=ee(n,b,f,f,f,f,f,e);return r.placeholder=ko.placeholder,r}function jo(n,e,t){e=t?f:e;var r=ee(n,M,f,f,f,f,f,e);return r.placeholder=jo.placeholder,r}function na(n,e,t){var r,i,o,a,s,c,_=0,v=!1,m=!1,y=!0;if(typeof n!="function")throw new Wn(I);e=Dn(e)||0,an(t)&&(v=!!t.leading,m="maxWait"in t,o=m?pn(Dn(t.maxWait)||0,e):o,y="trailing"in t?!!t.trailing:y);function S(cn){var Yn=r,fe=i;return r=i=f,_=cn,a=n.apply(fe,Yn),a}function T(cn){return _=cn,s=gt(z,e),v?S(cn):a}function q(cn){var Yn=cn-c,fe=cn-_,wa=e-Yn;return m?mn(wa,o-fe):wa}function $(cn){var Yn=cn-c,fe=cn-_;return c===f||Yn>=e||Yn<0||m&&fe>=o}function z(){var cn=ur();if($(cn))return Y(cn);s=gt(z,q(cn))}function Y(cn){return s=f,y&&r?S(cn):(r=i=f,a)}function Cn(){s!==f&&so(s),_=0,r=c=i=s=f}function bn(){return s===f?a:Y(ur())}function Ln(){var cn=ur(),Yn=$(cn);if(r=arguments,i=this,c=cn,Yn){if(s===f)return T(c);if(m)return so(s),s=gt(z,e),S(c)}return s===f&&(s=gt(z,e)),a}return Ln.cancel=Cn,Ln.flush=bn,Ln}var Vp=U(function(n,e){return zf(n,1,e)}),kp=U(function(n,e,t){return zf(n,Dn(e)||0,t)});function jp(n){return ee(n,Br)}function fr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Wn(I);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var a=n.apply(this,r);return t.cache=o.set(i,a)||o,a};return t.cache=new(fr.Cache||jn),t}fr.Cache=jn;function or(n){if(typeof n!="function")throw new Wn(I);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function n_(n){return Qo(2,n)}var e_=Nh(function(n,e){e=e.length==1&&W(e[0])?on(e[0],Tn(O())):on(dn(e,1),Tn(O()));var t=e.length;return U(function(r){for(var i=-1,o=mn(r.length,t);++i=e}),Ie=Zf(function(){return arguments}())?Zf:function(n){return sn(n)&&j.call(n,"callee")&&!Pf.call(n,"callee")},W=g.isArray,v_=pf?Tn(pf):Sh;function Sn(n){return n!=null&&ar(n.length)&&!ie(n)}function ln(n){return sn(n)&&Sn(n)}function d_(n){return n===!0||n===!1||sn(n)&&yn(n)==Ze}var ve=Cc||iu,m_=_f?Tn(_f):Rh;function w_(n){return sn(n)&&n.nodeType===1&&!pt(n)}function y_(n){if(n==null)return!0;if(Sn(n)&&(W(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||Ge(n)||Ie(n)))return!n.length;var e=wn(n);if(e==Nn||e==zn)return!n.size;if(ht(n))return!bi(n).length;for(var t in n)if(j.call(n,t))return!1;return!0}function x_(n,e){return st(n,e)}function b_(n,e,t){t=typeof t=="function"?t:f;var r=t?t(n,e):f;return r===f?st(n,e,f,t):!!r}function Xi(n){if(!sn(n))return!1;var e=yn(n);return e==yt||e==Ks||typeof n.message=="string"&&typeof n.name=="string"&&!pt(n)}function A_(n){return typeof n=="number"&&Wf(n)}function ie(n){if(!an(n))return!1;var e=yn(n);return e==xt||e==Nu||e==Hs||e==Zs}function ta(n){return typeof n=="number"&&n==B(n)}function ar(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=oe}function an(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function sn(n){return n!=null&&typeof n=="object"}var ra=vf?Tn(vf):Oh;function S_(n,e){return n===e||xi(n,e,qi(e))}function R_(n,e,t){return t=typeof t=="function"?t:f,xi(n,e,qi(e),t)}function I_(n){return ia(n)&&n!=+n}function O_(n){if(lg(n))throw new P(E);return Xf(n)}function T_(n){return n===null}function $_(n){return n==null}function ia(n){return typeof n=="number"||sn(n)&&yn(n)==Je}function pt(n){if(!sn(n)||yn(n)!=Vn)return!1;var e=Wt(n);if(e===null)return!0;var t=j.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Ct.call(t)==Rc}var Ji=df?Tn(df):Th;function E_(n){return ta(n)&&n>=-oe&&n<=oe}var ua=mf?Tn(mf):$h;function sr(n){return typeof n=="string"||!W(n)&&sn(n)&&yn(n)==Ve}function En(n){return typeof n=="symbol"||sn(n)&&yn(n)==bt}var Ge=wf?Tn(wf):Eh;function C_(n){return n===f}function L_(n){return sn(n)&&wn(n)==ke}function P_(n){return sn(n)&&yn(n)==Js}var F_=jt(Ai),W_=jt(function(n,e){return n<=e});function fa(n){if(!n)return[];if(Sn(n))return sr(n)?Gn(n):An(n);if(et&&n[et])return gc(n[et]());var e=wn(n),t=e==Nn?li:e==zn?Tt:He;return t(n)}function ue(n){if(!n)return n===0?n:0;if(n=Dn(n),n===de||n===-de){var e=n<0?-1:1;return e*Ds}return n===n?n:0}function B(n){var e=ue(n),t=e%1;return e===e?t?e-t:e:0}function oa(n){return n?be(B(n),0,Zn):0}function Dn(n){if(typeof n=="number")return n;if(En(n))return mt;if(an(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=an(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Rf(n);var t=vl.test(n);return t||ml.test(n)?Ql(n.slice(2),t?2:8):_l.test(n)?mt:+n}function aa(n){return Jn(n,Rn(n))}function M_(n){return n?be(B(n),-oe,oe):n===0?n:0}function V(n){return n==null?"":$n(n)}var B_=De(function(n,e){if(ht(e)||Sn(e)){Jn(e,_n(e),n);return}for(var t in e)j.call(e,t)&&ft(n,t,e[t])}),sa=De(function(n,e){Jn(e,Rn(e),n)}),lr=De(function(n,e,t,r){Jn(e,Rn(e),n,r)}),q_=De(function(n,e,t,r){Jn(e,_n(e),n,r)}),U_=te(vi);function D_(n,e){var t=Ue(n);return e==null?t:Df(t,e)}var N_=U(function(n,e){n=tn(n);var t=-1,r=e.length,i=r>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(r=1);++t1),o}),Jn(n,Mi(n),t),r&&(t=Bn(t,K|F|D,kh));for(var i=e.length;i--;)Ti(t,e[i]);return t});function uv(n,e){return ca(n,or(O(e)))}var fv=te(function(n,e){return n==null?{}:Ph(n,e)});function ca(n,e){if(n==null)return{};var t=on(Mi(n),function(r){return[r]});return e=O(e),eo(n,t,function(r,i){return e(r,i[0])})}function ov(n,e,t){e=pe(e,n);var r=-1,i=e.length;for(i||(i=1,n=f);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=Mf();return mn(n+i*(e-n+Jl("1e-"+((i+"").length-1))),e)}return Ri(n,e)}var mv=Ne(function(n,e,t){return e=e.toLowerCase(),n+(t?pa(e):e)});function pa(n){return ki(V(n).toLowerCase())}function _a(n){return n=V(n),n&&n.replace(yl,ac).replace(Ul,"")}function wv(n,e,t){n=V(n),e=$n(e);var r=n.length;t=t===f?r:be(B(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function yv(n){return n=V(n),n&&nl.test(n)?n.replace(Hu,sc):n}function xv(n){return n=V(n),n&&fl.test(n)?n.replace(Zr,"\\$&"):n}var bv=Ne(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Av=Ne(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),Sv=mo("toLowerCase");function Rv(n,e,t){n=V(n),e=B(e);var r=e?Fe(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return kt(Ut(i),t)+n+kt(qt(i),t)}function Iv(n,e,t){n=V(n),e=B(e);var r=e?Fe(n):0;return e&&r>>0,t?(n=V(n),n&&(typeof e=="string"||e!=null&&!Ji(e))&&(e=$n(e),!e&&Pe(n))?_e(Gn(n),0,t):n.split(e,t)):[]}var Pv=Ne(function(n,e,t){return n+(t?" ":"")+ki(e)});function Fv(n,e,t){return n=V(n),t=t==null?0:be(B(t),0,n.length),e=$n(e),n.slice(t,t+e.length)==e}function Wv(n,e,t){var r=u.templateSettings;t&&xn(n,e,t)&&(e=f),n=V(n),e=lr({},e,r,Ro);var i=lr({},e.imports,r.imports,Ro),o=_n(i),a=si(i,o),s,c,_=0,v=e.interpolate||At,m="__p += '",y=ci((e.escape||At).source+"|"+v.source+"|"+(v===Ku?pl:At).source+"|"+(e.evaluate||At).source+"|$","g"),S="//# sourceURL="+(j.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Hl+"]")+` -`;n.replace(y,function($,z,Y,Cn,bn,Ln){return Y||(Y=Cn),m+=n.slice(_,Ln).replace(xl,lc),z&&(s=!0,m+=`' + -__e(`+z+`) + -'`),bn&&(c=!0,m+=`'; -`+bn+`; -__p += '`),Y&&(m+=`' + -((__t = (`+Y+`)) == null ? '' : __t) + -'`),_=Ln+$.length,$}),m+=`'; -`;var T=j.call(e,"variable")&&e.variable;if(!T)m=`with (obj) { -`+m+` -} -`;else if(hl.test(T))throw new P(J);m=(c?m.replace(Qs,""):m).replace(Vs,"$1").replace(ks,"$1;"),m="function("+(T||"obj")+`) { -`+(T?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+m+`return __p -}`;var q=da(function(){return X(o,S+"return "+m).apply(f,a)});if(q.source=m,Xi(q))throw q;return q}function Mv(n){return V(n).toLowerCase()}function Bv(n){return V(n).toUpperCase()}function qv(n,e,t){if(n=V(n),n&&(t||e===f))return Rf(n);if(!n||!(e=$n(e)))return n;var r=Gn(n),i=Gn(e),o=If(r,i),a=Of(r,i)+1;return _e(r,o,a).join("")}function Uv(n,e,t){if(n=V(n),n&&(t||e===f))return n.slice(0,$f(n)+1);if(!n||!(e=$n(e)))return n;var r=Gn(n),i=Of(r,Gn(e))+1;return _e(r,0,i).join("")}function Dv(n,e,t){if(n=V(n),n&&(t||e===f))return n.replace(Xr,"");if(!n||!(e=$n(e)))return n;var r=Gn(n),i=If(r,Gn(e));return _e(r,i).join("")}function Nv(n,e){var t=Fs,r=Ws;if(an(e)){var i="separator"in e?e.separator:i;t="length"in e?B(e.length):t,r="omission"in e?$n(e.omission):r}n=V(n);var o=n.length;if(Pe(n)){var a=Gn(n);o=a.length}if(t>=o)return n;var s=t-Fe(r);if(s<1)return r;var c=a?_e(a,0,s).join(""):n.slice(0,s);if(i===f)return c+r;if(a&&(s+=c.length-s),Ji(i)){if(n.slice(s).search(i)){var _,v=c;for(i.global||(i=ci(i.source,V(Yu.exec(i))+"g")),i.lastIndex=0;_=i.exec(v);)var m=_.index;c=c.slice(0,m===f?s:m)}}else if(n.indexOf($n(i),s)!=s){var y=c.lastIndexOf(i);y>-1&&(c=c.slice(0,y))}return c+r}function zv(n){return n=V(n),n&&js.test(n)?n.replace(Gu,dc):n}var Gv=Ne(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),ki=mo("toUpperCase");function va(n,e,t){return n=V(n),e=t?f:e,e===f?hc(n)?yc(n):rc(n):n.match(e)||[]}var da=U(function(n,e){try{return On(n,f,e)}catch(t){return Xi(t)?t:new P(t)}}),Hv=te(function(n,e){return Fn(e,function(t){t=Qn(t),ne(n,t,Yi(n[t],n))}),n});function Kv(n){var e=n==null?0:n.length,t=O();return n=e?on(n,function(r){if(typeof r[1]!="function")throw new Wn(I);return[t(r[0]),r[1]]}):[],U(function(r){for(var i=-1;++ioe)return[];var t=Zn,r=mn(n,Zn);e=O(e),n-=Zn;for(var i=ai(r,e);++t0||e<0)?new H(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==f&&(e=B(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},H.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},H.prototype.toArray=function(){return this.take(Zn)},Xn(H.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,c=a instanceof H,_=s[0],v=c||W(a),m=function(z){var Y=i.apply(u,se([z],s));return r&&y?Y[0]:Y};v&&t&&typeof _=="function"&&_.length!=1&&(c=v=!1);var y=this.__chain__,S=!!this.__actions__.length,T=o&&!y,q=c&&!S;if(!o&&v){a=q?a:new H(this);var $=n.apply(a,s);return $.__actions__.push({func:rr,args:[m],thisArg:f}),new Mn($,y)}return T&&q?n.apply(this,s):($=this.thru(m),T?r?$.value()[0]:$.value():$)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(n){var e=$t[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(W(o)?o:[],i)}return this[t](function(a){return e.apply(W(a)?a:[],i)})}}),Xn(H.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";j.call(qe,r)||(qe[r]=[]),qe[r].push({name:e,func:t})}}),qe[Qt(f,Q).name]=[{name:"wrapper",func:f}],H.prototype.clone=zc,H.prototype.reverse=Gc,H.prototype.value=Hc,u.prototype.at=wp,u.prototype.chain=yp,u.prototype.commit=xp,u.prototype.next=bp,u.prototype.plant=Sp,u.prototype.reverse=Rp,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Ip,u.prototype.first=u.prototype.head,et&&(u.prototype[et]=Ap),u},We=xc();me?((me.exports=We)._=We,ni._=We):vn._=We}).call(Oe)}(_t,_t.exports);var cr=_t.exports;function xa(h){throw new Error('Could not dynamically require "'+h+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var uu={exports:{}};(function(h,d){(function(f,L){typeof xa=="function"?h.exports=L():f.pluralize=L()})(Oe,function(){var f=[],L=[],C={},E={},I={};function J(x){return typeof x=="string"?new RegExp("^"+x+"$","i"):x}function Z(x,w){return x===w?w:x===x.toLowerCase()?w.toLowerCase():x===x.toUpperCase()?w.toUpperCase():x[0]===x[0].toUpperCase()?w.charAt(0).toUpperCase()+w.substr(1).toLowerCase():w.toLowerCase()}function G(x,w){return x.replace(/\$(\d{1,2})/g,function(Q,R){return w[R]||""})}function nn(x,w){return x.replace(w[0],function(Q,R){var b=G(w[1],arguments);return Z(Q===""?x[R-1]:Q,b)})}function K(x,w,Q){if(!x.length||C.hasOwnProperty(x))return w;for(var R=Q.length;R--;){var b=Q[R];if(b[0].test(w))return nn(w,b)}return w}function F(x,w,Q){return function(R){var b=R.toLowerCase();return w.hasOwnProperty(b)?Z(R,b):x.hasOwnProperty(b)?Z(R,x[b]):K(b,R,Q)}}function D(x,w,Q,R){return function(b){var M=b.toLowerCase();return w.hasOwnProperty(M)?!0:x.hasOwnProperty(M)?!1:K(M,M,Q)===M}}function N(x,w,Q){var R=w===1?N.singular(x):N.plural(x);return(Q?w+" ":"")+R}return N.plural=F(I,E,f),N.isPlural=D(I,E,f),N.singular=F(E,I,L),N.isSingular=D(E,I,L),N.addPluralRule=function(x,w){f.push([J(x),w])},N.addSingularRule=function(x,w){L.push([J(x),w])},N.addUncountableRule=function(x){if(typeof x=="string"){C[x.toLowerCase()]=!0;return}N.addPluralRule(x,"$0"),N.addSingularRule(x,"$0")},N.addIrregularRule=function(x,w){w=w.toLowerCase(),x=x.toLowerCase(),I[x]=w,E[w]=x},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(x){return N.addIrregularRule(x[0],x[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(x){return N.addPluralRule(x[0],x[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(x){return N.addSingularRule(x[0],x[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(N.addUncountableRule),N})})(uu);var ba=uu.exports,Aa=ya(ba),Sa=function(){},Ra=Sa(),Te=function(h){return h!==Ra&&h!==null},Ia=Te,Oa=Array.prototype.forEach,Ta=Object.create,$a=function(h,d){var f;for(f in h)d[f]=h[f]},Ea=function(h){var d=Ta(null);return Oa.call(arguments,function(f){Ia(f)&&$a(Object(f),d)}),d},Ca=function(){var h=Math.sign;return typeof h!="function"?!1:h(10)===1&&h(-20)===-1},hr,fu;function La(){return fu||(fu=1,hr=function(h){return h=Number(h),isNaN(h)||h===0?h:h>0?1:-1}),hr}var Pa=Ca()?Math.sign:La(),Fa=Pa,Wa=Math.abs,Ma=Math.floor,Ba=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Fa(h)*Ma(Wa(h)))},qa=Ba,Ua=Math.max,Da=function(h){return Ua(0,qa(h))},ou=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},Na=Te,au=function(h){if(!Na(h))throw new TypeError("Cannot use null or undefined");return h},za={exports:{}},Ga=function(){var h=Object.assign,d;return typeof h!="function"?!1:(d={foo:"raz"},h(d,{bar:"dwa"},{trzy:"trzy"}),d.foo+d.bar+d.trzy==="razdwatrzy")},gr,su;function Ha(){return su||(su=1,gr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),gr}var pr,lu;function Ka(){if(lu)return pr;lu=1;var h=Te,d=Object.keys;return pr=function(f){return d(h(f)?Object(f):f)},pr}var _r,cu;function Ya(){return cu||(cu=1,_r=Ha()()?Object.keys:Ka()),_r}var vr,hu;function Za(){if(hu)return vr;hu=1;var h=Ya(),d=au,f=Math.max;return vr=function(L,C){var E,I,J=f(arguments.length,2),Z;for(L=Object(d(L)),Z=function(G){try{L[G]=C[G]}catch(nn){E||(E=nn)}},I=1;I-1},mr}var cs=ss()?String.prototype.contains:ls(),vt=vu,mu=as,wu=gu,yu=Ea,Ke=cs,hs=_u.exports=function(h,d){var f,L,C,E,I;return arguments.length<2||typeof h!="string"?(E=d,d=h,h=null):E=arguments[2],vt(h)?(f=Ke.call(h,"c"),L=Ke.call(h,"e"),C=Ke.call(h,"w")):(f=C=!0,L=!1),I={value:d,configurable:f,enumerable:L,writable:C},E?wu(yu(E),I):I};hs.gs=function(h,d,f){var L,C,E,I;return typeof h!="string"?(E=f,f=d,d=h,h=null):E=arguments[3],vt(d)?mu(d)?vt(f)?mu(f)||(E=f,f=void 0):f=void 0:(E=d,d=f=void 0):d=void 0,vt(h)?(L=Ke.call(h,"c"),C=Ke.call(h,"e")):(L=!0,C=!1),I={get:d,set:f,configurable:L,enumerable:C},E?wu(yu(E),I):I};var Ye=_u.exports,wr={exports:{}};(function(h,d){var f=Ye,L=ou,C=Function.prototype.apply,E=Function.prototype.call,I=Object.create,J=Object.defineProperty,Z=Object.defineProperties,G=Object.prototype.hasOwnProperty,nn={configurable:!0,enumerable:!1,writable:!0},K,F,D,N,x,w,Q;K=function(R,b){var M;return L(b),G.call(this,"__ee__")?M=this.__ee__:(M=nn.value=I(null),J(this,"__ee__",nn),nn.value=null),M[R]?typeof M[R]=="object"?M[R].push(b):M[R]=[M[R],b]:M[R]=b,this},F=function(R,b){var M,k;return L(b),k=this,K.call(this,R,M=function(){D.call(k,R,M),C.call(b,this,arguments)}),M.__eeOnceListener__=b,this},D=function(R,b){var M,k,en,un;if(L(b),!G.call(this,"__ee__"))return this;if(M=this.__ee__,!M[R])return this;if(k=M[R],typeof k=="object")for(un=0;en=k[un];++un)(en===b||en.__eeOnceListener__===b)&&(k.length===2?M[R]=k[un?0:1]:k.splice(un,1));else(k===b||k.__eeOnceListener__===b)&&delete M[R];return this},N=function(R){var b,M,k,en,un;if(G.call(this,"__ee__")&&(en=this.__ee__[R],!!en))if(typeof en=="object"){for(M=arguments.length,un=new Array(M-1),b=1;b=55296&&M<=56319&&(hn+=F[++w])),hn=D?G.call(D,N,hn,Q):hn,x?(nn.value=hn,K(R,Q,nn)):R[Q]=hn,++Q;b=Q}}if(b===void 0)for(b=L(F.length),x&&(R=new x(b)),w=0;wasync d=>{try{const f=await h(d);postMessage({result:f})}catch(f){postMessage({error:f})}},Es=(h,d)=>{var f;return(f=cr.minBy(h,d))==null?void 0:f[d]},Cs=(h,d)=>{var f;return(f=cr.maxBy(h,d))==null?void 0:f[d]};function Ls(h){const[[d,f],[L,C]]=[Es,Cs].map(J=>["x","y"].map(Z=>J(h,Z)??0)),[E,I]=[L-d,C-f];return{width:E,height:I,minX:d,minY:f,maxX:L,maxY:C}}function Ps({map:h,options:{color:d="#151d2f"}}){const f=h.split(/\r?\n/),[,,L,...C]=f.filter(cr.identity),[E]=L.split(/\s+/).map(parseInt),I=C.map(K=>K.split(/\s+/).map(parseFloat)),J=I.slice(0,E),G=I.slice(E).filter(([K])=>!K).map(K=>{const[,,F,D,N]=K;return[F,D,N].map(x=>J[x-1])});return{bounds:Ls(J.map(([K,F])=>({x:K,y:F}))),log:[`${Aa("face",G.length,!0)}`],nodes:G.map(K=>({$:"polygon",points:K.map(([F,D])=>({x:F,y:D})),fill:d,alpha:1})).map(K=>({component:K}))}}onmessage=$s(async({data:h})=>Ps(h))})(); diff --git a/assets/parseMesh.worker-Dr4cls8w.js b/assets/parseMesh.worker-Dr4cls8w.js new file mode 100644 index 0000000..a577d0f --- /dev/null +++ b/assets/parseMesh.worker-Dr4cls8w.js @@ -0,0 +1,27 @@ +(function(){"use strict";var Oe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Pa(h){return h&&h.__esModule&&Object.prototype.hasOwnProperty.call(h,"default")?h.default:h}var pr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */pr.exports,function(h,_){(function(){var f,q="4.17.21",P=200,G="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",I="Expected a function",M="Invalid `variable` option passed into `_.template`",C="__lodash_hash_undefined__",F=500,Z="__lodash_placeholder__",L=1,O=2,H=4,K=1,x=2,w=1,V=2,R=4,b=8,U=16,j=32,en=64,un=128,hn=256,Ht=512,Bs=30,Us="...",Ds=800,Ns=16,ju=1,zs=2,Gs=3,de=1/0,oe=9007199254740991,Hs=17976931348623157e292,vr=NaN,Zn=4294967295,Ks=Zn-1,Ys=Zn>>>1,Zs=[["ary",un],["bind",w],["bindKey",V],["curry",b],["curryRight",U],["flip",Ht],["partial",j],["partialRight",en],["rearg",hn]],Ee="[object Arguments]",dr="[object Array]",Xs="[object AsyncFunction]",Ye="[object Boolean]",Ze="[object Date]",Js="[object DOMException]",mr="[object Error]",wr="[object Function]",nf="[object GeneratorFunction]",Nn="[object Map]",Xe="[object Number]",Qs="[object Null]",Vn="[object Object]",ef="[object Promise]",Vs="[object Proxy]",Je="[object RegExp]",zn="[object Set]",Qe="[object String]",yr="[object Symbol]",ks="[object Undefined]",Ve="[object WeakMap]",js="[object WeakSet]",ke="[object ArrayBuffer]",Ce="[object DataView]",Kt="[object Float32Array]",Yt="[object Float64Array]",Zt="[object Int8Array]",Xt="[object Int16Array]",Jt="[object Int32Array]",Qt="[object Uint8Array]",Vt="[object Uint8ClampedArray]",kt="[object Uint16Array]",jt="[object Uint32Array]",nl=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,rl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,rf=/&(?:amp|lt|gt|quot|#39);/g,tf=/[&<>"']/g,tl=RegExp(rf.source),il=RegExp(tf.source),ul=/<%-([\s\S]+?)%>/g,fl=/<%([\s\S]+?)%>/g,uf=/<%=([\s\S]+?)%>/g,ol=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,al=/^\w*$/,sl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ni=/[\\^$.*+?()[\]{}|]/g,ll=RegExp(ni.source),ei=/^\s+/,cl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gl=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,_l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vl=/[()=,{}\[\]\/\s]/,dl=/\\(\\)?/g,ml=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ff=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,yl=/^0b[01]+$/i,xl=/^\[object .+?Constructor\]$/,bl=/^0o[0-7]+$/i,Al=/^(?:0|[1-9]\d*)$/,Sl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,xr=/($^)/,Il=/['\n\r\u2028\u2029\\]/g,br="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Ol="\\ufe20-\\ufe2f",$l="\\u20d0-\\u20ff",of=Rl+Ol+$l,af="\\u2700-\\u27bf",sf="a-z\\xdf-\\xf6\\xf8-\\xff",Tl="\\xac\\xb1\\xd7\\xf7",El="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Cl="\\u2000-\\u206f",Ll=" \\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",lf="A-Z\\xc0-\\xd6\\xd8-\\xde",cf="\\ufe0e\\ufe0f",hf=Tl+El+Cl+Ll,ri="['’]",Pl="["+br+"]",gf="["+hf+"]",Ar="["+of+"]",pf="\\d+",ql="["+af+"]",_f="["+sf+"]",vf="[^"+br+hf+pf+af+sf+lf+"]",ti="\\ud83c[\\udffb-\\udfff]",Fl="(?:"+Ar+"|"+ti+")",df="[^"+br+"]",ii="(?:\\ud83c[\\udde6-\\uddff]){2}",ui="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+lf+"]",mf="\\u200d",wf="(?:"+_f+"|"+vf+")",Wl="(?:"+Le+"|"+vf+")",yf="(?:"+ri+"(?:d|ll|m|re|s|t|ve))?",xf="(?:"+ri+"(?:D|LL|M|RE|S|T|VE))?",bf=Fl+"?",Af="["+cf+"]?",Ml="(?:"+mf+"(?:"+[df,ii,ui].join("|")+")"+Af+bf+")*",Bl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ul="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Sf=Af+bf+Ml,Dl="(?:"+[ql,ii,ui].join("|")+")"+Sf,Nl="(?:"+[df+Ar+"?",Ar,ii,ui,Pl].join("|")+")",zl=RegExp(ri,"g"),Gl=RegExp(Ar,"g"),fi=RegExp(ti+"(?="+ti+")|"+Nl+Sf,"g"),Hl=RegExp([Le+"?"+_f+"+"+yf+"(?="+[gf,Le,"$"].join("|")+")",Wl+"+"+xf+"(?="+[gf,Le+wf,"$"].join("|")+")",Le+"?"+wf+"+"+yf,Le+"+"+xf,Ul,Bl,pf,Dl].join("|"),"g"),Kl=RegExp("["+mf+br+of+cf+"]"),Yl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Zl=["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"],Xl=-1,fn={};fn[Kt]=fn[Yt]=fn[Zt]=fn[Xt]=fn[Jt]=fn[Qt]=fn[Vt]=fn[kt]=fn[jt]=!0,fn[Ee]=fn[dr]=fn[ke]=fn[Ye]=fn[Ce]=fn[Ze]=fn[mr]=fn[wr]=fn[Nn]=fn[Xe]=fn[Vn]=fn[Je]=fn[zn]=fn[Qe]=fn[Ve]=!1;var tn={};tn[Ee]=tn[dr]=tn[ke]=tn[Ce]=tn[Ye]=tn[Ze]=tn[Kt]=tn[Yt]=tn[Zt]=tn[Xt]=tn[Jt]=tn[Nn]=tn[Xe]=tn[Vn]=tn[Je]=tn[zn]=tn[Qe]=tn[yr]=tn[Qt]=tn[Vt]=tn[kt]=tn[jt]=!0,tn[mr]=tn[wr]=tn[Ve]=!1;var Jl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ql={"&":"&","<":"<",">":">",'"':""","'":"'"},Vl={"&":"&","<":"<",">":">",""":'"',"'":"'"},kl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jl=parseFloat,nc=parseInt,If=typeof Oe=="object"&&Oe&&Oe.Object===Object&&Oe,ec=typeof self=="object"&&self&&self.Object===Object&&self,vn=If||ec||Function("return this")(),oi=_&&!_.nodeType&&_,me=oi&&!0&&h&&!h.nodeType&&h,Rf=me&&me.exports===oi,ai=Rf&&If.process,Pn=function(){try{var l=me&&me.require&&me.require("util").types;return l||ai&&ai.binding&&ai.binding("util")}catch{}}(),Of=Pn&&Pn.isArrayBuffer,$f=Pn&&Pn.isDate,Tf=Pn&&Pn.isMap,Ef=Pn&&Pn.isRegExp,Cf=Pn&&Pn.isSet,Lf=Pn&&Pn.isTypedArray;function On(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function rc(l,p,g,A){for(var W=-1,Q=l==null?0:l.length;++W-1}function si(l,p,g){for(var A=-1,W=l==null?0:l.length;++A-1;);return g}function Df(l,p){for(var g=l.length;g--&&Pe(p,l[g],0)>-1;);return g}function cc(l,p){for(var g=l.length,A=0;g--;)l[g]===p&&++A;return A}var hc=gi(Jl),gc=gi(Ql);function pc(l){return"\\"+kl[l]}function _c(l,p){return l==null?f:l[p]}function qe(l){return Kl.test(l)}function vc(l){return Yl.test(l)}function dc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function di(l){var p=-1,g=Array(l.size);return l.forEach(function(A,W){g[++p]=[W,A]}),g}function Nf(l,p){return function(g){return l(p(g))}}function le(l,p){for(var g=-1,A=l.length,W=0,Q=[];++g-1}function ih(n,e){var r=this.__data__,t=Nr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}kn.prototype.clear=nh,kn.prototype.delete=eh,kn.prototype.get=rh,kn.prototype.has=th,kn.prototype.set=ih;function jn(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Mn(n,e,r,t,i,o){var a,s=e&L,c=e&O,v=e&H;if(r&&(a=i?r(n,t,i,o):r(n)),a!==f)return a;if(!an(n))return n;var d=B(n);if(d){if(a=ag(n),!s)return An(n,a)}else{var m=wn(n),y=m==wr||m==nf;if(ve(n))return So(n,s);if(m==Vn||m==Ee||y&&!i){if(a=c||y?{}:Go(n),!s)return c?Vh(n,yh(a,n)):Qh(n,jf(a,n))}else{if(!tn[m])return i?n:{};a=sg(n,m,s)}}o||(o=new Hn);var S=o.get(n);if(S)return S;o.set(n,a),ma(n)?n.forEach(function(E){a.add(Mn(E,e,r,E,n,o))}):va(n)&&n.forEach(function(E,Y){a.set(Y,Mn(E,e,r,Y,n,o))});var T=v?c?Gi:zi:c?In:_n,N=d?f:T(n);return qn(N||n,function(E,Y){N&&(Y=E,E=n[Y]),ur(a,Y,Mn(E,e,r,Y,n,o))}),a}function xh(n){var e=_n(n);return function(r){return no(r,n,e)}}function no(n,e,r){var t=r.length;if(n==null)return!t;for(n=rn(n);t--;){var i=r[t],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function eo(n,e,r){if(typeof n!="function")throw new Fn(I);return hr(function(){n.apply(f,r)},e)}function fr(n,e,r,t){var i=-1,o=Sr,a=!0,s=n.length,c=[],v=e.length;if(!s)return c;r&&(e=on(e,$n(r))),t?(o=si,a=!1):e.length>=P&&(o=je,a=!1,e=new xe(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:D(t),t<0&&(t+=i),t=r>t?0:ya(t);r0&&r(s)?e>1?dn(s,e-1,r,t,i):se(i,s):t||(i[i.length]=s)}return i}var Si=Eo(),io=Eo(!0);function Xn(n,e){return n&&Si(n,e,_n)}function Ii(n,e){return n&&io(n,e,_n)}function Gr(n,e){return ae(e,function(r){return ie(n[r])})}function Ae(n,e){e=pe(e,n);for(var r=0,t=e.length;n!=null&&re}function Sh(n,e){return n!=null&&nn.call(n,e)}function Ih(n,e){return n!=null&&e in rn(n)}function Rh(n,e,r){return n>=mn(e,r)&&n=120&&d.length>=120)?new xe(a&&d):f}d=n[0];var m=-1,y=s[0];n:for(;++m-1;)s!==n&&qr.call(s,c,1),qr.call(n,c,1);return n}function _o(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;te(i)?qr.call(n,i,1):Fi(n,i)}}return n}function Li(n,e){return n+Mr(Jf()*(e-n+1))}function Uh(n,e,r,t){for(var i=-1,o=pn(Wr((e-n)/(r||1)),0),a=g(o);o--;)a[t?o:++i]=n,n+=r;return a}function Pi(n,e){var r="";if(!n||e<1||e>oe)return r;do e%2&&(r+=n),e=Mr(e/2),e&&(n+=n);while(e);return r}function z(n,e){return Qi(Yo(n,e,Rn),n+"")}function Dh(n){return kf(Ke(n))}function Nh(n,e){var r=Ke(n);return nt(r,be(e,0,r.length))}function sr(n,e,r,t){if(!an(n))return n;e=pe(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,a=n[o];a!==null&&!En(a)&&(r?a<=e:a=P){var v=e?null:eg(n);if(v)return Rr(v);a=!1,i=je,c=new xe}else c=e?[]:s;n:for(;++t=t?n:Bn(n,e,r)}var Ao=Lc||function(n){return vn.clearTimeout(n)};function So(n,e){if(e)return n.slice();var r=n.length,t=Hf?Hf(r):new n.constructor(r);return n.copy(t),t}function Ui(n){var e=new n.constructor(n.byteLength);return new Lr(e).set(new Lr(n)),e}function Yh(n,e){var r=e?Ui(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Zh(n){var e=new n.constructor(n.source,ff.exec(n));return e.lastIndex=n.lastIndex,e}function Xh(n){return ir?rn(ir.call(n)):{}}function Io(n,e){var r=e?Ui(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Ro(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=En(n),a=e!==f,s=e===null,c=e===e,v=En(e);if(!s&&!v&&!o&&n>e||o&&a&&c&&!s&&!v||t&&a&&c||!r&&c||!i)return 1;if(!t&&!o&&!v&&n=s)return c;var v=r[t];return c*(v=="desc"?-1:1)}}return n.index-e.index}function Oo(n,e,r,t){for(var i=-1,o=n.length,a=r.length,s=-1,c=e.length,v=pn(o-a,0),d=g(c+v),m=!t;++s1?r[i-1]:f,a=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(r[0],r[1],a)&&(o=i<3?f:o,i=1),e=rn(e);++t-1?i[o?e[a]:a]:f}}function Po(n){return re(function(e){var r=e.length,t=r,i=Wn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Fn(I);if(i&&!a&&kr(o)=="wrapper")var a=new Wn([],!0)}for(t=a?t:r;++t1&&J.reverse(),d&&cs))return!1;var v=o.get(n),d=o.get(e);if(v&&d)return v==e&&d==n;var m=-1,y=!0,S=r&x?new xe:f;for(o.set(n,e),o.set(e,n);++m1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(hl,`{ +/* [wrapped with `+e+`] */ +`)}function cg(n){return B(n)||Re(n)||!!(Zf&&n&&n[Zf])}function te(n,e){var r=typeof n;return e=e??oe,!!e&&(r=="number"||r!="symbol"&&Al.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Ds)return arguments[0]}else e=0;return n.apply(f,arguments)}}function nt(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,ia(n,r)});function ua(n){var e=u(n);return e.__chain__=!0,e}function bp(n,e){return e(n),n}function et(n,e){return e(n)}var Ap=re(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return Ai(o,n)};return e>1||this.__actions__.length||!(t instanceof X)||!te(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:et,args:[i],thisArg:f}),new Wn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function Sp(){return ua(this)}function Ip(){return new Wn(this.value(),this.__chain__)}function Rp(){this.__values__===f&&(this.__values__=wa(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Op(){return this}function $p(n){for(var e,r=this;r instanceof Dr;){var t=ko(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Tp(){var n=this.__wrapped__;if(n instanceof X){var e=n;return this.__actions__.length&&(e=new X(this)),e=e.reverse(),e.__actions__.push({func:et,args:[Vi],thisArg:f}),new Wn(e,this.__chain__)}return this.thru(Vi)}function Ep(){return xo(this.__wrapped__,this.__actions__)}var Cp=Zr(function(n,e,r){nn.call(n,r)?++n[r]:ne(n,r,1)});function Lp(n,e,r){var t=B(n)?Pf:bh;return r&&xn(n,e,r)&&(e=f),t(n,$(e,3))}function Pp(n,e){var r=B(n)?ae:to;return r(n,$(e,3))}var qp=Lo(jo),Fp=Lo(na);function Wp(n,e){return dn(rt(n,e),1)}function Mp(n,e){return dn(rt(n,e),de)}function Bp(n,e,r){return r=r===f?1:D(r),dn(rt(n,e),r)}function fa(n,e){var r=B(n)?qn:he;return r(n,$(e,3))}function oa(n,e){var r=B(n)?tc:ro;return r(n,$(e,3))}var Up=Zr(function(n,e,r){nn.call(n,r)?n[r].push(e):ne(n,r,[e])});function Dp(n,e,r,t){n=Sn(n)?n:Ke(n),r=r&&!t?D(r):0;var i=n.length;return r<0&&(r=pn(i+r,0)),ot(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&Pe(n,e,r)>-1}var Np=z(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?g(n.length):[];return he(n,function(a){o[++t]=i?On(e,a,r):or(a,e,r)}),o}),zp=Zr(function(n,e,r){ne(n,r,e)});function rt(n,e){var r=B(n)?on:so;return r(n,$(e,3))}function Gp(n,e,r,t){return n==null?[]:(B(e)||(e=e==null?[]:[e]),r=t?f:r,B(r)||(r=r==null?[]:[r]),go(n,e,r))}var Hp=Zr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Kp(n,e,r){var t=B(n)?li:Mf,i=arguments.length<3;return t(n,$(e,4),r,i,he)}function Yp(n,e,r){var t=B(n)?ic:Mf,i=arguments.length<3;return t(n,$(e,4),r,i,ro)}function Zp(n,e){var r=B(n)?ae:to;return r(n,ut($(e,3)))}function Xp(n){var e=B(n)?kf:Dh;return e(n)}function Jp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=D(e);var t=B(n)?dh:Nh;return t(n,e)}function Qp(n){var e=B(n)?mh:Gh;return e(n)}function Vp(n){if(n==null)return 0;if(Sn(n))return ot(n)?Fe(n):n.length;var e=wn(n);return e==Nn||e==zn?n.size:Ti(n).length}function kp(n,e,r){var t=B(n)?ci:Hh;return r&&xn(n,e,r)&&(e=f),t(n,$(e,3))}var jp=z(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),go(n,dn(e,1),[])}),tt=Pc||function(){return vn.Date.now()};function n_(n,e){if(typeof e!="function")throw new Fn(I);return n=D(n),function(){if(--n<1)return e.apply(this,arguments)}}function aa(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,ee(n,un,f,f,f,f,e)}function sa(n,e){var r;if(typeof e!="function")throw new Fn(I);return n=D(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var ji=z(function(n,e,r){var t=w;if(r.length){var i=le(r,Ge(ji));t|=j}return ee(n,t,e,r,i)}),la=z(function(n,e,r){var t=w|V;if(r.length){var i=le(r,Ge(la));t|=j}return ee(e,t,n,r,i)});function ca(n,e,r){e=r?f:e;var t=ee(n,b,f,f,f,f,f,e);return t.placeholder=ca.placeholder,t}function ha(n,e,r){e=r?f:e;var t=ee(n,U,f,f,f,f,f,e);return t.placeholder=ha.placeholder,t}function ga(n,e,r){var t,i,o,a,s,c,v=0,d=!1,m=!1,y=!0;if(typeof n!="function")throw new Fn(I);e=Dn(e)||0,an(r)&&(d=!!r.leading,m="maxWait"in r,o=m?pn(Dn(r.maxWait)||0,e):o,y="trailing"in r?!!r.trailing:y);function S(cn){var Yn=t,fe=i;return t=i=f,v=cn,a=n.apply(fe,Yn),a}function T(cn){return v=cn,s=hr(Y,e),d?S(cn):a}function N(cn){var Yn=cn-c,fe=cn-v,La=e-Yn;return m?mn(La,o-fe):La}function E(cn){var Yn=cn-c,fe=cn-v;return c===f||Yn>=e||Yn<0||m&&fe>=o}function Y(){var cn=tt();if(E(cn))return J(cn);s=hr(Y,N(cn))}function J(cn){return s=f,y&&t?S(cn):(t=i=f,a)}function Cn(){s!==f&&Ao(s),v=0,t=c=i=s=f}function bn(){return s===f?a:J(tt())}function Ln(){var cn=tt(),Yn=E(cn);if(t=arguments,i=this,c=cn,Yn){if(s===f)return T(c);if(m)return Ao(s),s=hr(Y,e),S(c)}return s===f&&(s=hr(Y,e)),a}return Ln.cancel=Cn,Ln.flush=bn,Ln}var e_=z(function(n,e){return eo(n,1,e)}),r_=z(function(n,e,r){return eo(n,Dn(e)||0,r)});function t_(n){return ee(n,Ht)}function it(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Fn(I);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=n.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(it.Cache||jn),r}it.Cache=jn;function ut(n){if(typeof n!="function")throw new Fn(I);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function i_(n){return sa(2,n)}var u_=Kh(function(n,e){e=e.length==1&&B(e[0])?on(e[0],$n($())):on(dn(e,1),$n($()));var r=e.length;return z(function(t){for(var i=-1,o=mn(t.length,r);++i=e}),Re=fo(function(){return arguments}())?fo:function(n){return sn(n)&&nn.call(n,"callee")&&!Yf.call(n,"callee")},B=g.isArray,y_=Of?$n(Of):$h;function Sn(n){return n!=null&&ft(n.length)&&!ie(n)}function ln(n){return sn(n)&&Sn(n)}function x_(n){return n===!0||n===!1||sn(n)&&yn(n)==Ye}var ve=Fc||cu,b_=$f?$n($f):Th;function A_(n){return sn(n)&&n.nodeType===1&&!gr(n)}function S_(n){if(n==null)return!0;if(Sn(n)&&(B(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||He(n)||Re(n)))return!n.length;var e=wn(n);if(e==Nn||e==zn)return!n.size;if(cr(n))return!Ti(n).length;for(var r in n)if(nn.call(n,r))return!1;return!0}function I_(n,e){return ar(n,e)}function R_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?ar(n,e,f,r):!!t}function eu(n){if(!sn(n))return!1;var e=yn(n);return e==mr||e==Js||typeof n.message=="string"&&typeof n.name=="string"&&!gr(n)}function O_(n){return typeof n=="number"&&Xf(n)}function ie(n){if(!an(n))return!1;var e=yn(n);return e==wr||e==nf||e==Xs||e==Vs}function _a(n){return typeof n=="number"&&n==D(n)}function ft(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=oe}function an(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function sn(n){return n!=null&&typeof n=="object"}var va=Tf?$n(Tf):Ch;function $_(n,e){return n===e||$i(n,e,Ki(e))}function T_(n,e,r){return r=typeof r=="function"?r:f,$i(n,e,Ki(e),r)}function E_(n){return da(n)&&n!=+n}function C_(n){if(pg(n))throw new W(G);return oo(n)}function L_(n){return n===null}function P_(n){return n==null}function da(n){return typeof n=="number"||sn(n)&&yn(n)==Xe}function gr(n){if(!sn(n)||yn(n)!=Vn)return!1;var e=Pr(n);if(e===null)return!0;var r=nn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Tr.call(r)==Tc}var ru=Ef?$n(Ef):Lh;function q_(n){return _a(n)&&n>=-oe&&n<=oe}var ma=Cf?$n(Cf):Ph;function ot(n){return typeof n=="string"||!B(n)&&sn(n)&&yn(n)==Qe}function En(n){return typeof n=="symbol"||sn(n)&&yn(n)==yr}var He=Lf?$n(Lf):qh;function F_(n){return n===f}function W_(n){return sn(n)&&wn(n)==Ve}function M_(n){return sn(n)&&yn(n)==js}var B_=Vr(Ei),U_=Vr(function(n,e){return n<=e});function wa(n){if(!n)return[];if(Sn(n))return ot(n)?Gn(n):An(n);if(nr&&n[nr])return dc(n[nr]());var e=wn(n),r=e==Nn?di:e==zn?Rr:Ke;return r(n)}function ue(n){if(!n)return n===0?n:0;if(n=Dn(n),n===de||n===-de){var e=n<0?-1:1;return e*Hs}return n===n?n:0}function D(n){var e=ue(n),r=e%1;return e===e?r?e-r:e:0}function ya(n){return n?be(D(n),0,Zn):0}function Dn(n){if(typeof n=="number")return n;if(En(n))return vr;if(an(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=an(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Bf(n);var r=yl.test(n);return r||bl.test(n)?nc(n.slice(2),r?2:8):wl.test(n)?vr:+n}function xa(n){return Jn(n,In(n))}function D_(n){return n?be(D(n),-oe,oe):n===0?n:0}function k(n){return n==null?"":Tn(n)}var N_=Ne(function(n,e){if(cr(e)||Sn(e)){Jn(e,_n(e),n);return}for(var r in e)nn.call(e,r)&&ur(n,r,e[r])}),ba=Ne(function(n,e){Jn(e,In(e),n)}),at=Ne(function(n,e,r,t){Jn(e,In(e),n,t)}),z_=Ne(function(n,e,r,t){Jn(e,_n(e),n,t)}),G_=re(Ai);function H_(n,e){var r=De(n);return e==null?r:jf(r,e)}var K_=z(function(n,e){n=rn(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Jn(n,Gi(n),r),t&&(r=Mn(r,L|O|H,rg));for(var i=e.length;i--;)Fi(r,e[i]);return r});function sv(n,e){return Sa(n,ut($(e)))}var lv=re(function(n,e){return n==null?{}:Mh(n,e)});function Sa(n,e){if(n==null)return{};var r=on(Gi(n),function(t){return[t]});return e=$(e),po(n,r,function(t,i){return e(t,i[0])})}function cv(n,e,r){e=pe(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=Jf();return mn(n+i*(e-n+jl("1e-"+((i+"").length-1))),e)}return Li(n,e)}var bv=ze(function(n,e,r){return e=e.toLowerCase(),n+(r?Oa(e):e)});function Oa(n){return uu(k(n).toLowerCase())}function $a(n){return n=k(n),n&&n.replace(Sl,hc).replace(Gl,"")}function Av(n,e,r){n=k(n),e=Tn(e);var t=n.length;r=r===f?t:be(D(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function Sv(n){return n=k(n),n&&il.test(n)?n.replace(tf,gc):n}function Iv(n){return n=k(n),n&&ll.test(n)?n.replace(ni,"\\$&"):n}var Rv=ze(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Ov=ze(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),$v=Co("toLowerCase");function Tv(n,e,r){n=k(n),e=D(e);var t=e?Fe(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return Qr(Mr(i),r)+n+Qr(Wr(i),r)}function Ev(n,e,r){n=k(n),e=D(e);var t=e?Fe(n):0;return e&&t>>0,r?(n=k(n),n&&(typeof e=="string"||e!=null&&!ru(e))&&(e=Tn(e),!e&&qe(n))?_e(Gn(n),0,r):n.split(e,r)):[]}var Mv=ze(function(n,e,r){return n+(r?" ":"")+uu(e)});function Bv(n,e,r){return n=k(n),r=r==null?0:be(D(r),0,n.length),e=Tn(e),n.slice(r,r+e.length)==e}function Uv(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=k(n),e=at({},e,t,Bo);var i=at({},e.imports,t.imports,Bo),o=_n(i),a=vi(i,o),s,c,v=0,d=e.interpolate||xr,m="__p += '",y=mi((e.escape||xr).source+"|"+d.source+"|"+(d===uf?ml:xr).source+"|"+(e.evaluate||xr).source+"|$","g"),S="//# sourceURL="+(nn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xl+"]")+` +`;n.replace(y,function(E,Y,J,Cn,bn,Ln){return J||(J=Cn),m+=n.slice(v,Ln).replace(Il,pc),Y&&(s=!0,m+=`' + +__e(`+Y+`) + +'`),bn&&(c=!0,m+=`'; +`+bn+`; +__p += '`),J&&(m+=`' + +((__t = (`+J+`)) == null ? '' : __t) + +'`),v=Ln+E.length,E}),m+=`'; +`;var T=nn.call(e,"variable")&&e.variable;if(!T)m=`with (obj) { +`+m+` +} +`;else if(vl.test(T))throw new W(M);m=(c?m.replace(nl,""):m).replace(el,"$1").replace(rl,"$1;"),m="function("+(T||"obj")+`) { +`+(T?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+m+`return __p +}`;var N=Ea(function(){return Q(o,S+"return "+m).apply(f,a)});if(N.source=m,eu(N))throw N;return N}function Dv(n){return k(n).toLowerCase()}function Nv(n){return k(n).toUpperCase()}function zv(n,e,r){if(n=k(n),n&&(r||e===f))return Bf(n);if(!n||!(e=Tn(e)))return n;var t=Gn(n),i=Gn(e),o=Uf(t,i),a=Df(t,i)+1;return _e(t,o,a).join("")}function Gv(n,e,r){if(n=k(n),n&&(r||e===f))return n.slice(0,zf(n)+1);if(!n||!(e=Tn(e)))return n;var t=Gn(n),i=Df(t,Gn(e))+1;return _e(t,0,i).join("")}function Hv(n,e,r){if(n=k(n),n&&(r||e===f))return n.replace(ei,"");if(!n||!(e=Tn(e)))return n;var t=Gn(n),i=Uf(t,Gn(e));return _e(t,i).join("")}function Kv(n,e){var r=Bs,t=Us;if(an(e)){var i="separator"in e?e.separator:i;r="length"in e?D(e.length):r,t="omission"in e?Tn(e.omission):t}n=k(n);var o=n.length;if(qe(n)){var a=Gn(n);o=a.length}if(r>=o)return n;var s=r-Fe(t);if(s<1)return t;var c=a?_e(a,0,s).join(""):n.slice(0,s);if(i===f)return c+t;if(a&&(s+=c.length-s),ru(i)){if(n.slice(s).search(i)){var v,d=c;for(i.global||(i=mi(i.source,k(ff.exec(i))+"g")),i.lastIndex=0;v=i.exec(d);)var m=v.index;c=c.slice(0,m===f?s:m)}}else if(n.indexOf(Tn(i),s)!=s){var y=c.lastIndexOf(i);y>-1&&(c=c.slice(0,y))}return c+t}function Yv(n){return n=k(n),n&&tl.test(n)?n.replace(rf,xc):n}var Zv=ze(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),uu=Co("toUpperCase");function Ta(n,e,r){return n=k(n),e=r?f:e,e===f?vc(n)?Sc(n):oc(n):n.match(e)||[]}var Ea=z(function(n,e){try{return On(n,f,e)}catch(r){return eu(r)?r:new W(r)}}),Xv=re(function(n,e){return qn(e,function(r){r=Qn(r),ne(n,r,ji(n[r],n))}),n});function Jv(n){var e=n==null?0:n.length,r=$();return n=e?on(n,function(t){if(typeof t[1]!="function")throw new Fn(I);return[r(t[0]),t[1]]}):[],z(function(t){for(var i=-1;++ioe)return[];var r=Zn,t=mn(n,Zn);e=$(e),n-=Zn;for(var i=_i(t,e);++r0||e<0)?new X(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=D(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},X.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},X.prototype.toArray=function(){return this.take(Zn)},Xn(X.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=t?[1]:arguments,c=a instanceof X,v=s[0],d=c||B(a),m=function(Y){var J=i.apply(u,se([Y],s));return t&&y?J[0]:J};d&&r&&typeof v=="function"&&v.length!=1&&(c=d=!1);var y=this.__chain__,S=!!this.__actions__.length,T=o&&!y,N=c&&!S;if(!o&&d){a=N?a:new X(this);var E=n.apply(a,s);return E.__actions__.push({func:et,args:[m],thisArg:f}),new Wn(E,y)}return T&&N?n.apply(this,s):(E=this.thru(m),T?t?E.value()[0]:E.value():E)})}),qn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Or[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(B(o)?o:[],i)}return this[r](function(a){return e.apply(B(a)?a:[],i)})}}),Xn(X.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";nn.call(Ue,t)||(Ue[t]=[]),Ue[t].push({name:e,func:r})}}),Ue[Xr(f,V).name]=[{name:"wrapper",func:f}],X.prototype.clone=Yc,X.prototype.reverse=Zc,X.prototype.value=Xc,u.prototype.at=Ap,u.prototype.chain=Sp,u.prototype.commit=Ip,u.prototype.next=Rp,u.prototype.plant=$p,u.prototype.reverse=Tp,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Ep,u.prototype.first=u.prototype.head,nr&&(u.prototype[nr]=Op),u},We=Ic();me?((me.exports=We)._=We,oi._=We):vn._=We}).call(Oe)}(pr,pr.exports);var st=pr.exports;function qa(h){throw new Error('Could not dynamically require "'+h+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var hu={exports:{}};(function(h,_){(function(f,q){typeof qa=="function"?h.exports=q():f.pluralize=q()})(Oe,function(){var f=[],q=[],P={},G={},I={};function M(x){return typeof x=="string"?new RegExp("^"+x+"$","i"):x}function C(x,w){return x===w?w:x===x.toLowerCase()?w.toLowerCase():x===x.toUpperCase()?w.toUpperCase():x[0]===x[0].toUpperCase()?w.charAt(0).toUpperCase()+w.substr(1).toLowerCase():w.toLowerCase()}function F(x,w){return x.replace(/\$(\d{1,2})/g,function(V,R){return w[R]||""})}function Z(x,w){return x.replace(w[0],function(V,R){var b=F(w[1],arguments);return C(V===""?x[R-1]:V,b)})}function L(x,w,V){if(!x.length||P.hasOwnProperty(x))return w;for(var R=V.length;R--;){var b=V[R];if(b[0].test(w))return Z(w,b)}return w}function O(x,w,V){return function(R){var b=R.toLowerCase();return w.hasOwnProperty(b)?C(R,b):x.hasOwnProperty(b)?C(R,x[b]):L(b,R,V)}}function H(x,w,V,R){return function(b){var U=b.toLowerCase();return w.hasOwnProperty(U)?!0:x.hasOwnProperty(U)?!1:L(U,U,V)===U}}function K(x,w,V){var R=w===1?K.singular(x):K.plural(x);return(V?w+" ":"")+R}return K.plural=O(I,G,f),K.isPlural=H(I,G,f),K.singular=O(G,I,q),K.isSingular=H(G,I,q),K.addPluralRule=function(x,w){f.push([M(x),w])},K.addSingularRule=function(x,w){q.push([M(x),w])},K.addUncountableRule=function(x){if(typeof x=="string"){P[x.toLowerCase()]=!0;return}K.addPluralRule(x,"$0"),K.addSingularRule(x,"$0")},K.addIrregularRule=function(x,w){w=w.toLowerCase(),x=x.toLowerCase(),I[x]=w,G[w]=x},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(x){return K.addIrregularRule(x[0],x[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(x){return K.addPluralRule(x[0],x[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(x){return K.addSingularRule(x[0],x[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(K.addUncountableRule),K})})(hu);var Fa=hu.exports,Wa=Pa(Fa),Ma=function(){},Ba=Ma(),$e=function(h){return h!==Ba&&h!==null},Ua=$e,Da=Array.prototype.forEach,Na=Object.create,za=function(h,_){var f;for(f in h)_[f]=h[f]},Ga=function(h){var _=Na(null);return Da.call(arguments,function(f){Ua(f)&&za(Object(f),_)}),_},Ha=function(){var h=Math.sign;return typeof h!="function"?!1:h(10)===1&&h(-20)===-1},lt,gu;function Ka(){return gu||(gu=1,lt=function(h){return h=Number(h),isNaN(h)||h===0?h:h>0?1:-1}),lt}var Ya=Ha()?Math.sign:Ka(),Za=Ya,Xa=Math.abs,Ja=Math.floor,Qa=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Za(h)*Ja(Xa(h)))},Va=Qa,ka=Math.max,ja=function(h){return ka(0,Va(h))},pu=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},ns=$e,_u=function(h){if(!ns(h))throw new TypeError("Cannot use null or undefined");return h},es={exports:{}},ct,vu;function rs(){return vu||(vu=1,ct=function(){var h=Object.assign,_;return typeof h!="function"?!1:(_={foo:"raz"},h(_,{bar:"dwa"},{trzy:"trzy"}),_.foo+_.bar+_.trzy==="razdwatrzy")}),ct}var ht,du;function ts(){return du||(du=1,ht=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ht}var gt,mu;function is(){if(mu)return gt;mu=1;var h=$e,_=Object.keys;return gt=function(f){return _(h(f)?Object(f):f)},gt}var pt,wu;function us(){return wu||(wu=1,pt=ts()()?Object.keys:is()),pt}var _t,yu;function fs(){if(yu)return _t;yu=1;var h=us(),_=_u,f=Math.max;return _t=function(q,P){var G,I,M=f(arguments.length,2),C;for(q=Object(_(q)),C=function(F){try{q[F]=P[F]}catch(Z){G||(G=Z)}},I=1;I-1},St}var It,Lu;function vs(){return Lu||(Lu=1,It=ps()()?String.prototype.contains:_s()),It}var Pu;function Te(){if(Pu)return dt.exports;Pu=1;var h=Iu(),_=gs(),f=bu(),q=Ga,P=vs(),G=dt.exports=function(I,M){var C,F,Z,L,O;return arguments.length<2||typeof I!="string"?(L=M,M=I,I=null):L=arguments[2],h(I)?(C=P.call(I,"c"),F=P.call(I,"e"),Z=P.call(I,"w")):(C=Z=!0,F=!1),O={value:M,configurable:C,enumerable:F,writable:Z},L?f(q(L),O):O};return G.gs=function(I,M,C){var F,Z,L,O;return typeof I!="string"?(L=C,C=M,M=I,I=null):L=arguments[3],h(M)?_(M)?h(C)?_(C)||(L=C,C=void 0):C=void 0:(L=M,M=C=void 0):M=void 0,h(I)?(F=P.call(I,"c"),Z=P.call(I,"e")):(F=!0,Z=!1),O={get:M,set:C,configurable:F,enumerable:Z},L?f(q(L),O):O},dt.exports}var Rt={exports:{}};(function(h,_){var f=Te(),q=pu,P=Function.prototype.apply,G=Function.prototype.call,I=Object.create,M=Object.defineProperty,C=Object.defineProperties,F=Object.prototype.hasOwnProperty,Z={configurable:!0,enumerable:!1,writable:!0},L,O,H,K,x,w,V;L=function(R,b){var U;return q(b),F.call(this,"__ee__")?U=this.__ee__:(U=Z.value=I(null),M(this,"__ee__",Z),Z.value=null),U[R]?typeof U[R]=="object"?U[R].push(b):U[R]=[U[R],b]:U[R]=b,this},O=function(R,b){var U,j;return q(b),j=this,L.call(this,R,U=function(){H.call(j,R,U),P.call(b,this,arguments)}),U.__eeOnceListener__=b,this},H=function(R,b){var U,j,en,un;if(q(b),!F.call(this,"__ee__"))return this;if(U=this.__ee__,!U[R])return this;if(j=U[R],typeof j=="object")for(un=0;en=j[un];++un)(en===b||en.__eeOnceListener__===b)&&(j.length===2?U[R]=j[un?0:1]:j.splice(un,1));else(j===b||j.__eeOnceListener__===b)&&delete U[R];return this},K=function(R){var b,U,j,en,un;if(F.call(this,"__ee__")&&(en=this.__ee__[R],!!en))if(typeof en=="object"){for(U=arguments.length,un=new Array(U-1),b=1;b=55296&&U<=56319&&(hn+=O[++w])),hn=H?F.call(H,K,hn,V):hn,x?(Z.value=hn,L(R,V,Z)):R[V]=hn,++V;b=V}}if(b===void 0)for(b=q(O.length),x&&(R=new x(b)),w=0;wasync _=>{try{const f=await h(_);postMessage({result:f})}catch(f){postMessage({error:f})}},qs=(h,_)=>{var f;return(f=st.minBy(h,_))==null?void 0:f[_]},Fs=(h,_)=>{var f;return(f=st.maxBy(h,_))==null?void 0:f[_]};function Ws(h){const[[_,f],[q,P]]=[qs,Fs].map(M=>["x","y"].map(C=>M(h,C)??0)),[G,I]=[q-_,P-f];return{width:G,height:I,minX:_,minY:f,maxX:q,maxY:P}}function Ms({map:h,options:{color:_="#151d2f"}}){const f=h.split(/\r?\n/),[,,q,...P]=f.filter(st.identity),[G]=q.split(/\s+/).map(parseInt),I=P.map(L=>L.split(/\s+/).map(parseFloat)),M=I.slice(0,G),F=I.slice(G).filter(([L])=>!L).map(L=>{const[,,O,H,K]=L;return[O,H,K].map(x=>M[x-1])});return{bounds:Ws(M.map(([L,O])=>({x:L,y:O}))),log:[`${Wa("face",F.length,!0)}`],nodes:F.map(L=>({$:"polygon",points:L.map(([O,H])=>({x:O,y:H})),fill:_,alpha:1})).map(L=>({component:L}))}}onmessage=Ps(async({data:h})=>Ms(h))})(); diff --git a/assets/parseTrace.worker-BQa4x7DA.js b/assets/parseTrace.worker-BQa4x7DA.js new file mode 100644 index 0000000..49a7b9b --- /dev/null +++ b/assets/parseTrace.worker-BQa4x7DA.js @@ -0,0 +1,27 @@ +(function(){"use strict";var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vr={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */vr.exports,function(h,d){(function(){var f,T="4.17.21",E=200,A="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",C="Invalid `variable` option passed into `_.template`",U="__lodash_hash_undefined__",P=500,X="__lodash_placeholder__",an=1,z=2,Z=4,pn=1,ln=2,F=1,_n=2,M=4,S=8,$=16,J=32,V=64,nn=128,sn=256,$t=512,Ds=30,Ns="...",$s=800,Gs=16,Ku=1,Hs=2,zs=3,de=1/0,oe=9007199254740991,Ks=17976931348623157e292,xr=NaN,Yn=4294967295,Zs=Yn-1,Ys=Yn>>>1,Xs=[["ary",nn],["bind",F],["bindKey",_n],["curry",S],["curryRight",$],["flip",$t],["partial",J],["partialRight",V],["rearg",sn]],Ee="[object Arguments]",br="[object Array]",Js="[object AsyncFunction]",Xe="[object Boolean]",Je="[object Date]",Qs="[object DOMException]",Ar="[object Error]",Sr="[object Function]",Zu="[object GeneratorFunction]",$n="[object Map]",Qe="[object Number]",Vs="[object Null]",Vn="[object Object]",Yu="[object Promise]",ks="[object Proxy]",Ve="[object RegExp]",Gn="[object Set]",ke="[object String]",Ir="[object Symbol]",js="[object Undefined]",je="[object WeakMap]",nl="[object WeakSet]",nr="[object ArrayBuffer]",Ce="[object DataView]",Gt="[object Float32Array]",Ht="[object Float64Array]",zt="[object Int8Array]",Kt="[object Int16Array]",Zt="[object Int32Array]",Yt="[object Uint8Array]",Xt="[object Uint8ClampedArray]",Jt="[object Uint16Array]",Qt="[object Uint32Array]",el=/\b__p \+= '';/g,rl=/\b(__p \+=) '' \+/g,tl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Xu=/&(?:amp|lt|gt|quot|#39);/g,Ju=/[&<>"']/g,il=RegExp(Xu.source),ul=RegExp(Ju.source),fl=/<%-([\s\S]+?)%>/g,ol=/<%([\s\S]+?)%>/g,Qu=/<%=([\s\S]+?)%>/g,al=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sl=/^\w*$/,ll=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Vt=/[\\^$.*+?()[\]{}|]/g,cl=RegExp(Vt.source),kt=/^\s+/,hl=/\s/,gl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,pl=/\{\n\/\* \[wrapped with (.+)\] \*/,_l=/,? & /,vl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dl=/[()=,{}\[\]\/\s]/,wl=/\\(\\)?/g,ml=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Vu=/\w*$/,yl=/^[-+]0x[0-9a-f]+$/i,xl=/^0b[01]+$/i,bl=/^\[object .+?Constructor\]$/,Al=/^0o[0-7]+$/i,Sl=/^(?:0|[1-9]\d*)$/,Il=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Rr=/($^)/,Rl=/['\n\r\u2028\u2029\\]/g,Or="\\ud800-\\udfff",Ol="\\u0300-\\u036f",Tl="\\ufe20-\\ufe2f",El="\\u20d0-\\u20ff",ku=Ol+Tl+El,ju="\\u2700-\\u27bf",nf="a-z\\xdf-\\xf6\\xf8-\\xff",Cl="\\xac\\xb1\\xd7\\xf7",Ll="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pl="\\u2000-\\u206f",Wl=" \\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",ef="A-Z\\xc0-\\xd6\\xd8-\\xde",rf="\\ufe0e\\ufe0f",tf=Cl+Ll+Pl+Wl,jt="['’]",Fl="["+Or+"]",uf="["+tf+"]",Tr="["+ku+"]",ff="\\d+",Ml="["+ju+"]",of="["+nf+"]",af="[^"+Or+tf+ff+ju+nf+ef+"]",ni="\\ud83c[\\udffb-\\udfff]",Bl="(?:"+Tr+"|"+ni+")",sf="[^"+Or+"]",ei="(?:\\ud83c[\\udde6-\\uddff]){2}",ri="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+ef+"]",lf="\\u200d",cf="(?:"+of+"|"+af+")",Ul="(?:"+Le+"|"+af+")",hf="(?:"+jt+"(?:d|ll|m|re|s|t|ve))?",gf="(?:"+jt+"(?:D|LL|M|RE|S|T|VE))?",pf=Bl+"?",_f="["+rf+"]?",ql="(?:"+lf+"(?:"+[sf,ei,ri].join("|")+")"+_f+pf+")*",Dl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Nl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",vf=_f+pf+ql,$l="(?:"+[Ml,ei,ri].join("|")+")"+vf,Gl="(?:"+[sf+Tr+"?",Tr,ei,ri,Fl].join("|")+")",Hl=RegExp(jt,"g"),zl=RegExp(Tr,"g"),ti=RegExp(ni+"(?="+ni+")|"+Gl+vf,"g"),Kl=RegExp([Le+"?"+of+"+"+hf+"(?="+[uf,Le,"$"].join("|")+")",Ul+"+"+gf+"(?="+[uf,Le+cf,"$"].join("|")+")",Le+"?"+cf+"+"+hf,Le+"+"+gf,Nl,Dl,ff,$l].join("|"),"g"),Zl=RegExp("["+lf+Or+ku+rf+"]"),Yl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Xl=["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"],Jl=-1,en={};en[Gt]=en[Ht]=en[zt]=en[Kt]=en[Zt]=en[Yt]=en[Xt]=en[Jt]=en[Qt]=!0,en[Ee]=en[br]=en[nr]=en[Xe]=en[Ce]=en[Je]=en[Ar]=en[Sr]=en[$n]=en[Qe]=en[Vn]=en[Ve]=en[Gn]=en[ke]=en[je]=!1;var j={};j[Ee]=j[br]=j[nr]=j[Ce]=j[Xe]=j[Je]=j[Gt]=j[Ht]=j[zt]=j[Kt]=j[Zt]=j[$n]=j[Qe]=j[Vn]=j[Ve]=j[Gn]=j[ke]=j[Ir]=j[Yt]=j[Xt]=j[Jt]=j[Qt]=!0,j[Ar]=j[Sr]=j[je]=!1;var Ql={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Vl={"&":"&","<":"<",">":">",'"':""","'":"'"},kl={"&":"&","<":"<",">":">",""":'"',"'":"'"},jl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},nc=parseFloat,ec=parseInt,df=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,rc=typeof self=="object"&&self&&self.Object===Object&&self,vn=df||rc||Function("return this")(),ii=d&&!d.nodeType&&d,we=ii&&!0&&h&&!h.nodeType&&h,wf=we&&we.exports===ii,ui=wf&&df.process,Wn=function(){try{var l=we&&we.require&&we.require("util").types;return l||ui&&ui.binding&&ui.binding("util")}catch{}}(),mf=Wn&&Wn.isArrayBuffer,yf=Wn&&Wn.isDate,xf=Wn&&Wn.isMap,bf=Wn&&Wn.isRegExp,Af=Wn&&Wn.isSet,Sf=Wn&&Wn.isTypedArray;function On(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function tc(l,p,g,y){for(var L=-1,K=l==null?0:l.length;++L-1}function fi(l,p,g){for(var y=-1,L=l==null?0:l.length;++y-1;);return g}function Pf(l,p){for(var g=l.length;g--&&Pe(p,l[g],0)>-1;);return g}function hc(l,p){for(var g=l.length,y=0;g--;)l[g]===p&&++y;return y}var gc=li(Ql),pc=li(Vl);function _c(l){return"\\"+jl[l]}function vc(l,p){return l==null?f:l[p]}function We(l){return Zl.test(l)}function dc(l){return Yl.test(l)}function wc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function pi(l){var p=-1,g=Array(l.size);return l.forEach(function(y,L){g[++p]=[L,y]}),g}function Wf(l,p){return function(g){return l(p(g))}}function le(l,p){for(var g=-1,y=l.length,L=0,K=[];++g-1}function uh(n,e){var r=this.__data__,t=Zr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}kn.prototype.clear=eh,kn.prototype.delete=rh,kn.prototype.get=th,kn.prototype.has=ih,kn.prototype.set=uh;function jn(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Un(n,e,r,t,i,o){var a,s=e&an,c=e&z,_=e&Z;if(r&&(a=i?r(n,t,i,o):r(n)),a!==f)return a;if(!tn(n))return n;var v=W(n);if(v){if(a=sg(n),!s)return An(n,a)}else{var w=mn(n),m=w==Sr||w==Zu;if(ve(n))return _o(n,s);if(w==Vn||w==Ee||m&&!i){if(a=c||m?{}:Mo(n),!s)return c?kh(n,xh(a,n)):Vh(n,Kf(a,n))}else{if(!j[w])return i?n:{};a=lg(n,w,s)}}o||(o=new zn);var b=o.get(n);if(b)return b;o.set(n,a),la(n)?n.forEach(function(O){a.add(Un(O,e,r,O,n,o))}):aa(n)&&n.forEach(function(O,N){a.set(N,Un(O,e,r,N,n,o))});var R=_?c?Ni:Di:c?In:gn,q=v?f:R(n);return Fn(q||n,function(O,N){q&&(N=O,O=n[N]),or(a,N,Un(O,e,r,N,n,o))}),a}function bh(n){var e=gn(n);return function(r){return Zf(r,n,e)}}function Zf(n,e,r){var t=r.length;if(n==null)return!t;for(n=k(n);t--;){var i=r[t],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function Yf(n,e,r){if(typeof n!="function")throw new Mn(x);return pr(function(){n.apply(f,r)},e)}function ar(n,e,r,t){var i=-1,o=Er,a=!0,s=n.length,c=[],_=e.length;if(!s)return c;r&&(e=rn(e,Tn(r))),t?(o=fi,a=!1):e.length>=E&&(o=er,a=!1,e=new xe(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:B(t),t<0&&(t+=i),t=r>t?0:ha(t);r0&&r(s)?e>1?dn(s,e-1,r,t,i):se(i,s):t||(i[i.length]=s)}return i}var xi=bo(),Qf=bo(!0);function Xn(n,e){return n&&xi(n,e,gn)}function bi(n,e){return n&&Qf(n,e,gn)}function Xr(n,e){return ae(e,function(r){return ie(n[r])})}function Ae(n,e){e=pe(e,n);for(var r=0,t=e.length;n!=null&&re}function Ih(n,e){return n!=null&&Q.call(n,e)}function Rh(n,e){return n!=null&&e in k(n)}function Oh(n,e,r){return n>=wn(e,r)&&n=120&&v.length>=120)?new xe(a&&v):f}v=n[0];var w=-1,m=s[0];n:for(;++w-1;)s!==n&&Dr.call(s,c,1),Dr.call(n,c,1);return n}function oo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;te(i)?Dr.call(n,i,1):Pi(n,i)}}return n}function Ei(n,e){return n+Gr($f()*(e-n+1))}function Nh(n,e,r,t){for(var i=-1,o=hn($r((e-n)/(r||1)),0),a=g(o);o--;)a[t?o:++i]=n,n+=r;return a}function Ci(n,e){var r="";if(!n||e<1||e>oe)return r;do e%2&&(r+=n),e=Gr(e/2),e&&(n+=n);while(e);return r}function D(n,e){return Yi(qo(n,e,Rn),n+"")}function $h(n){return zf(ze(n))}function Gh(n,e){var r=ze(n);return ut(r,be(e,0,r.length))}function cr(n,e,r,t){if(!tn(n))return n;e=pe(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,a=n[o];a!==null&&!Cn(a)&&(r?a<=e:a=E){var _=e?null:rg(n);if(_)return Lr(_);a=!1,i=er,c=new xe}else c=e?[]:s;n:for(;++t=t?n:qn(n,e,r)}var po=Wc||function(n){return vn.clearTimeout(n)};function _o(n,e){if(e)return n.slice();var r=n.length,t=Bf?Bf(r):new n.constructor(r);return n.copy(t),t}function Bi(n){var e=new n.constructor(n.byteLength);return new Ur(e).set(new Ur(n)),e}function Yh(n,e){var r=e?Bi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Xh(n){var e=new n.constructor(n.source,Vu.exec(n));return e.lastIndex=n.lastIndex,e}function Jh(n){return fr?k(fr.call(n)):{}}function vo(n,e){var r=e?Bi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function wo(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=Cn(n),a=e!==f,s=e===null,c=e===e,_=Cn(e);if(!s&&!_&&!o&&n>e||o&&a&&c&&!s&&!_||t&&a&&c||!r&&c||!i)return 1;if(!t&&!o&&!_&&n=s)return c;var _=r[t];return c*(_=="desc"?-1:1)}}return n.index-e.index}function mo(n,e,r,t){for(var i=-1,o=n.length,a=r.length,s=-1,c=e.length,_=hn(o-a,0),v=g(c+_),w=!t;++s1?r[i-1]:f,a=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(r[0],r[1],a)&&(o=i<3?f:o,i=1),e=k(e);++t-1?i[o?e[a]:a]:f}}function Io(n){return re(function(e){var r=e.length,t=r,i=Bn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Mn(x);if(i&&!a&&tt(o)=="wrapper")var a=new Bn([],!0)}for(t=a?t:r;++t1&&H.reverse(),v&&cs))return!1;var _=o.get(n),v=o.get(e);if(_&&v)return _==e&&v==n;var w=-1,m=!0,b=r&ln?new xe:f;for(o.set(n,e),o.set(e,n);++w1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(gl,`{ +/* [wrapped with `+e+`] */ +`)}function hg(n){return W(n)||Re(n)||!!(Df&&n&&n[Df])}function te(n,e){var r=typeof n;return e=e??oe,!!e&&(r=="number"||r!="symbol"&&Sl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=$s)return arguments[0]}else e=0;return n.apply(f,arguments)}}function ut(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,Qo(n,r)});function Vo(n){var e=u(n);return e.__chain__=!0,e}function Ap(n,e){return e(n),n}function ft(n,e){return e(n)}var Sp=re(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return yi(o,n)};return e>1||this.__actions__.length||!(t instanceof G)||!te(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:ft,args:[i],thisArg:f}),new Bn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function Ip(){return Vo(this)}function Rp(){return new Bn(this.value(),this.__chain__)}function Op(){this.__values__===f&&(this.__values__=ca(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Tp(){return this}function Ep(n){for(var e,r=this;r instanceof Kr;){var t=zo(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Cp(){var n=this.__wrapped__;if(n instanceof G){var e=n;return this.__actions__.length&&(e=new G(this)),e=e.reverse(),e.__actions__.push({func:ft,args:[Xi],thisArg:f}),new Bn(e,this.__chain__)}return this.thru(Xi)}function Lp(){return ho(this.__wrapped__,this.__actions__)}var Pp=kr(function(n,e,r){Q.call(n,r)?++n[r]:ne(n,r,1)});function Wp(n,e,r){var t=W(n)?If:Ah;return r&&xn(n,e,r)&&(e=f),t(n,I(e,3))}function Fp(n,e){var r=W(n)?ae:Jf;return r(n,I(e,3))}var Mp=So(Ko),Bp=So(Zo);function Up(n,e){return dn(ot(n,e),1)}function qp(n,e){return dn(ot(n,e),de)}function Dp(n,e,r){return r=r===f?1:B(r),dn(ot(n,e),r)}function ko(n,e){var r=W(n)?Fn:he;return r(n,I(e,3))}function jo(n,e){var r=W(n)?ic:Xf;return r(n,I(e,3))}var Np=kr(function(n,e,r){Q.call(n,r)?n[r].push(e):ne(n,r,[e])});function $p(n,e,r,t){n=Sn(n)?n:ze(n),r=r&&!t?B(r):0;var i=n.length;return r<0&&(r=hn(i+r,0)),ht(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&Pe(n,e,r)>-1}var Gp=D(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?g(n.length):[];return he(n,function(a){o[++t]=i?On(e,a,r):sr(a,e,r)}),o}),Hp=kr(function(n,e,r){ne(n,r,e)});function ot(n,e){var r=W(n)?rn:eo;return r(n,I(e,3))}function zp(n,e,r,t){return n==null?[]:(W(e)||(e=e==null?[]:[e]),r=t?f:r,W(r)||(r=r==null?[]:[r]),uo(n,e,r))}var Kp=kr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Zp(n,e,r){var t=W(n)?oi:Ef,i=arguments.length<3;return t(n,I(e,4),r,i,he)}function Yp(n,e,r){var t=W(n)?uc:Ef,i=arguments.length<3;return t(n,I(e,4),r,i,Xf)}function Xp(n,e){var r=W(n)?ae:Jf;return r(n,lt(I(e,3)))}function Jp(n){var e=W(n)?zf:$h;return e(n)}function Qp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=B(e);var t=W(n)?wh:Gh;return t(n,e)}function Vp(n){var e=W(n)?mh:zh;return e(n)}function kp(n){if(n==null)return 0;if(Sn(n))return ht(n)?Fe(n):n.length;var e=mn(n);return e==$n||e==Gn?n.size:Ri(n).length}function jp(n,e,r){var t=W(n)?ai:Kh;return r&&xn(n,e,r)&&(e=f),t(n,I(e,3))}var n_=D(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),uo(n,dn(e,1),[])}),at=Fc||function(){return vn.Date.now()};function e_(n,e){if(typeof e!="function")throw new Mn(x);return n=B(n),function(){if(--n<1)return e.apply(this,arguments)}}function na(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,ee(n,nn,f,f,f,f,e)}function ea(n,e){var r;if(typeof e!="function")throw new Mn(x);return n=B(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var Qi=D(function(n,e,r){var t=F;if(r.length){var i=le(r,Ge(Qi));t|=J}return ee(n,t,e,r,i)}),ra=D(function(n,e,r){var t=F|_n;if(r.length){var i=le(r,Ge(ra));t|=J}return ee(e,t,n,r,i)});function ta(n,e,r){e=r?f:e;var t=ee(n,S,f,f,f,f,f,e);return t.placeholder=ta.placeholder,t}function ia(n,e,r){e=r?f:e;var t=ee(n,$,f,f,f,f,f,e);return t.placeholder=ia.placeholder,t}function ua(n,e,r){var t,i,o,a,s,c,_=0,v=!1,w=!1,m=!0;if(typeof n!="function")throw new Mn(x);e=Nn(e)||0,tn(r)&&(v=!!r.leading,w="maxWait"in r,o=w?hn(Nn(r.maxWait)||0,e):o,m="trailing"in r?!!r.trailing:m);function b(on){var Zn=t,fe=i;return t=i=f,_=on,a=n.apply(fe,Zn),a}function R(on){return _=on,s=pr(N,e),v?b(on):a}function q(on){var Zn=on-c,fe=on-_,Sa=e-Zn;return w?wn(Sa,o-fe):Sa}function O(on){var Zn=on-c,fe=on-_;return c===f||Zn>=e||Zn<0||w&&fe>=o}function N(){var on=at();if(O(on))return H(on);s=pr(N,q(on))}function H(on){return s=f,m&&t?b(on):(t=i=f,a)}function Ln(){s!==f&&po(s),_=0,t=c=i=s=f}function bn(){return s===f?a:H(at())}function Pn(){var on=at(),Zn=O(on);if(t=arguments,i=this,c=on,Zn){if(s===f)return R(c);if(w)return po(s),s=pr(N,e),b(c)}return s===f&&(s=pr(N,e)),a}return Pn.cancel=Ln,Pn.flush=bn,Pn}var r_=D(function(n,e){return Yf(n,1,e)}),t_=D(function(n,e,r){return Yf(n,Nn(e)||0,r)});function i_(n){return ee(n,$t)}function st(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Mn(x);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=n.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(st.Cache||jn),r}st.Cache=jn;function lt(n){if(typeof n!="function")throw new Mn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function u_(n){return ea(2,n)}var f_=Zh(function(n,e){e=e.length==1&&W(e[0])?rn(e[0],Tn(I())):rn(dn(e,1),Tn(I()));var r=e.length;return D(function(t){for(var i=-1,o=wn(t.length,r);++i=e}),Re=kf(function(){return arguments}())?kf:function(n){return un(n)&&Q.call(n,"callee")&&!qf.call(n,"callee")},W=g.isArray,x_=mf?Tn(mf):Eh;function Sn(n){return n!=null&&ct(n.length)&&!ie(n)}function fn(n){return un(n)&&Sn(n)}function b_(n){return n===!0||n===!1||un(n)&&yn(n)==Xe}var ve=Bc||au,A_=yf?Tn(yf):Ch;function S_(n){return un(n)&&n.nodeType===1&&!_r(n)}function I_(n){if(n==null)return!0;if(Sn(n)&&(W(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||He(n)||Re(n)))return!n.length;var e=mn(n);if(e==$n||e==Gn)return!n.size;if(gr(n))return!Ri(n).length;for(var r in n)if(Q.call(n,r))return!1;return!0}function R_(n,e){return lr(n,e)}function O_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?lr(n,e,f,r):!!t}function ki(n){if(!un(n))return!1;var e=yn(n);return e==Ar||e==Qs||typeof n.message=="string"&&typeof n.name=="string"&&!_r(n)}function T_(n){return typeof n=="number"&&Nf(n)}function ie(n){if(!tn(n))return!1;var e=yn(n);return e==Sr||e==Zu||e==Js||e==ks}function oa(n){return typeof n=="number"&&n==B(n)}function ct(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=oe}function tn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function un(n){return n!=null&&typeof n=="object"}var aa=xf?Tn(xf):Ph;function E_(n,e){return n===e||Ii(n,e,Gi(e))}function C_(n,e,r){return r=typeof r=="function"?r:f,Ii(n,e,Gi(e),r)}function L_(n){return sa(n)&&n!=+n}function P_(n){if(_g(n))throw new L(A);return jf(n)}function W_(n){return n===null}function F_(n){return n==null}function sa(n){return typeof n=="number"||un(n)&&yn(n)==Qe}function _r(n){if(!un(n)||yn(n)!=Vn)return!1;var e=qr(n);if(e===null)return!0;var r=Q.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Fr.call(r)==Cc}var ji=bf?Tn(bf):Wh;function M_(n){return oa(n)&&n>=-oe&&n<=oe}var la=Af?Tn(Af):Fh;function ht(n){return typeof n=="string"||!W(n)&&un(n)&&yn(n)==ke}function Cn(n){return typeof n=="symbol"||un(n)&&yn(n)==Ir}var He=Sf?Tn(Sf):Mh;function B_(n){return n===f}function U_(n){return un(n)&&mn(n)==je}function q_(n){return un(n)&&yn(n)==nl}var D_=rt(Oi),N_=rt(function(n,e){return n<=e});function ca(n){if(!n)return[];if(Sn(n))return ht(n)?Hn(n):An(n);if(rr&&n[rr])return wc(n[rr]());var e=mn(n),r=e==$n?pi:e==Gn?Lr:ze;return r(n)}function ue(n){if(!n)return n===0?n:0;if(n=Nn(n),n===de||n===-de){var e=n<0?-1:1;return e*Ks}return n===n?n:0}function B(n){var e=ue(n),r=e%1;return e===e?r?e-r:e:0}function ha(n){return n?be(B(n),0,Yn):0}function Nn(n){if(typeof n=="number")return n;if(Cn(n))return xr;if(tn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=tn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Cf(n);var r=xl.test(n);return r||Al.test(n)?ec(n.slice(2),r?2:8):yl.test(n)?xr:+n}function ga(n){return Jn(n,In(n))}function $_(n){return n?be(B(n),-oe,oe):n===0?n:0}function Y(n){return n==null?"":En(n)}var G_=Ne(function(n,e){if(gr(e)||Sn(e)){Jn(e,gn(e),n);return}for(var r in e)Q.call(e,r)&&or(n,r,e[r])}),pa=Ne(function(n,e){Jn(e,In(e),n)}),gt=Ne(function(n,e,r,t){Jn(e,In(e),n,t)}),H_=Ne(function(n,e,r,t){Jn(e,gn(e),n,t)}),z_=re(yi);function K_(n,e){var r=De(n);return e==null?r:Kf(r,e)}var Z_=D(function(n,e){n=k(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Jn(n,Ni(n),r),t&&(r=Un(r,an|z|Z,tg));for(var i=e.length;i--;)Pi(r,e[i]);return r});function lv(n,e){return va(n,lt(I(e)))}var cv=re(function(n,e){return n==null?{}:qh(n,e)});function va(n,e){if(n==null)return{};var r=rn(Ni(n),function(t){return[t]});return e=I(e),fo(n,r,function(t,i){return e(t,i[0])})}function hv(n,e,r){e=pe(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=$f();return wn(n+i*(e-n+nc("1e-"+((i+"").length-1))),e)}return Ei(n,e)}var Av=$e(function(n,e,r){return e=e.toLowerCase(),n+(r?ma(e):e)});function ma(n){return ru(Y(n).toLowerCase())}function ya(n){return n=Y(n),n&&n.replace(Il,gc).replace(zl,"")}function Sv(n,e,r){n=Y(n),e=En(e);var t=n.length;r=r===f?t:be(B(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function Iv(n){return n=Y(n),n&&ul.test(n)?n.replace(Ju,pc):n}function Rv(n){return n=Y(n),n&&cl.test(n)?n.replace(Vt,"\\$&"):n}var Ov=$e(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Tv=$e(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),Ev=Ao("toLowerCase");function Cv(n,e,r){n=Y(n),e=B(e);var t=e?Fe(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return et(Gr(i),r)+n+et($r(i),r)}function Lv(n,e,r){n=Y(n),e=B(e);var t=e?Fe(n):0;return e&&t>>0,r?(n=Y(n),n&&(typeof e=="string"||e!=null&&!ji(e))&&(e=En(e),!e&&We(n))?_e(Hn(n),0,r):n.split(e,r)):[]}var qv=$e(function(n,e,r){return n+(r?" ":"")+ru(e)});function Dv(n,e,r){return n=Y(n),r=r==null?0:be(B(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function Nv(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=Y(n),e=gt({},e,t,Co);var i=gt({},e.imports,t.imports,Co),o=gn(i),a=gi(i,o),s,c,_=0,v=e.interpolate||Rr,w="__p += '",m=_i((e.escape||Rr).source+"|"+v.source+"|"+(v===Qu?ml:Rr).source+"|"+(e.evaluate||Rr).source+"|$","g"),b="//# sourceURL="+(Q.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Jl+"]")+` +`;n.replace(m,function(O,N,H,Ln,bn,Pn){return H||(H=Ln),w+=n.slice(_,Pn).replace(Rl,_c),N&&(s=!0,w+=`' + +__e(`+N+`) + +'`),bn&&(c=!0,w+=`'; +`+bn+`; +__p += '`),H&&(w+=`' + +((__t = (`+H+`)) == null ? '' : __t) + +'`),_=Pn+O.length,O}),w+=`'; +`;var R=Q.call(e,"variable")&&e.variable;if(!R)w=`with (obj) { +`+w+` +} +`;else if(dl.test(R))throw new L(C);w=(c?w.replace(el,""):w).replace(rl,"$1").replace(tl,"$1;"),w="function("+(R||"obj")+`) { +`+(R?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+w+`return __p +}`;var q=ba(function(){return K(o,b+"return "+w).apply(f,a)});if(q.source=w,ki(q))throw q;return q}function $v(n){return Y(n).toLowerCase()}function Gv(n){return Y(n).toUpperCase()}function Hv(n,e,r){if(n=Y(n),n&&(r||e===f))return Cf(n);if(!n||!(e=En(e)))return n;var t=Hn(n),i=Hn(e),o=Lf(t,i),a=Pf(t,i)+1;return _e(t,o,a).join("")}function zv(n,e,r){if(n=Y(n),n&&(r||e===f))return n.slice(0,Ff(n)+1);if(!n||!(e=En(e)))return n;var t=Hn(n),i=Pf(t,Hn(e))+1;return _e(t,0,i).join("")}function Kv(n,e,r){if(n=Y(n),n&&(r||e===f))return n.replace(kt,"");if(!n||!(e=En(e)))return n;var t=Hn(n),i=Lf(t,Hn(e));return _e(t,i).join("")}function Zv(n,e){var r=Ds,t=Ns;if(tn(e)){var i="separator"in e?e.separator:i;r="length"in e?B(e.length):r,t="omission"in e?En(e.omission):t}n=Y(n);var o=n.length;if(We(n)){var a=Hn(n);o=a.length}if(r>=o)return n;var s=r-Fe(t);if(s<1)return t;var c=a?_e(a,0,s).join(""):n.slice(0,s);if(i===f)return c+t;if(a&&(s+=c.length-s),ji(i)){if(n.slice(s).search(i)){var _,v=c;for(i.global||(i=_i(i.source,Y(Vu.exec(i))+"g")),i.lastIndex=0;_=i.exec(v);)var w=_.index;c=c.slice(0,w===f?s:w)}}else if(n.indexOf(En(i),s)!=s){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+t}function Yv(n){return n=Y(n),n&&il.test(n)?n.replace(Xu,bc):n}var Xv=$e(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),ru=Ao("toUpperCase");function xa(n,e,r){return n=Y(n),e=r?f:e,e===f?dc(n)?Ic(n):ac(n):n.match(e)||[]}var ba=D(function(n,e){try{return On(n,f,e)}catch(r){return ki(r)?r:new L(r)}}),Jv=re(function(n,e){return Fn(e,function(r){r=Qn(r),ne(n,r,Qi(n[r],n))}),n});function Qv(n){var e=n==null?0:n.length,r=I();return n=e?rn(n,function(t){if(typeof t[1]!="function")throw new Mn(x);return[r(t[0]),t[1]]}):[],D(function(t){for(var i=-1;++ioe)return[];var r=Yn,t=wn(n,Yn);e=I(e),n-=Yn;for(var i=hi(t,e);++r0||e<0)?new G(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=B(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},G.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},G.prototype.toArray=function(){return this.take(Yn)},Xn(G.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=t?[1]:arguments,c=a instanceof G,_=s[0],v=c||W(a),w=function(N){var H=i.apply(u,se([N],s));return t&&m?H[0]:H};v&&r&&typeof _=="function"&&_.length!=1&&(c=v=!1);var m=this.__chain__,b=!!this.__actions__.length,R=o&&!m,q=c&&!b;if(!o&&v){a=q?a:new G(this);var O=n.apply(a,s);return O.__actions__.push({func:ft,args:[w],thisArg:f}),new Bn(O,m)}return R&&q?n.apply(this,s):(O=this.thru(w),R?t?O.value()[0]:O.value():O)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Pr[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(W(o)?o:[],i)}return this[r](function(a){return e.apply(W(a)?a:[],i)})}}),Xn(G.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";Q.call(qe,t)||(qe[t]=[]),qe[t].push({name:e,func:r})}}),qe[jr(f,_n).name]=[{name:"wrapper",func:f}],G.prototype.clone=Yc,G.prototype.reverse=Xc,G.prototype.value=Jc,u.prototype.at=Sp,u.prototype.chain=Ip,u.prototype.commit=Rp,u.prototype.next=Op,u.prototype.plant=Ep,u.prototype.reverse=Cp,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Lp,u.prototype.first=u.prototype.head,rr&&(u.prototype[rr]=Tp),u},Me=Rc();we?((we.exports=Me)._=Me,ii._=Me):vn._=Me}).call(Ke)}(vr,vr.exports);var Oe=vr.exports,Ia=function(){},Ra=Ia(),Te=function(h){return h!==Ra&&h!==null},Oa=Te,Ta=Array.prototype.forEach,Ea=Object.create,Ca=function(h,d){var f;for(f in h)d[f]=h[f]},La=function(h){var d=Ea(null);return Ta.call(arguments,function(f){Oa(f)&&Ca(Object(f),d)}),d},Pa=function(){var h=Math.sign;return typeof h!="function"?!1:h(10)===1&&h(-20)===-1},pt,su;function Wa(){return su||(su=1,pt=function(h){return h=Number(h),isNaN(h)||h===0?h:h>0?1:-1}),pt}var Fa=Pa()?Math.sign:Wa(),Ma=Fa,Ba=Math.abs,Ua=Math.floor,qa=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Ma(h)*Ua(Ba(h)))},Da=qa,Na=Math.max,lu=function(h){return Na(0,Da(h))},cu=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},_t,hu;function dr(){if(hu)return _t;hu=1;var h=Te;return _t=function(d){if(!h(d))throw new TypeError("Cannot use null or undefined");return d},_t}dr();var $a={exports:{}},Ga=function(){var h=Object.assign,d;return typeof h!="function"?!1:(d={foo:"raz"},h(d,{bar:"dwa"},{trzy:"trzy"}),d.foo+d.bar+d.trzy==="razdwatrzy")},vt,gu;function Ha(){return gu||(gu=1,vt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),vt}var dt,pu;function za(){if(pu)return dt;pu=1;var h=Te,d=Object.keys;return dt=function(f){return d(h(f)?Object(f):f)},dt}var wt,_u;function Ka(){return _u||(_u=1,wt=Ha()()?Object.keys:za()),wt}var mt,vu;function Za(){if(vu)return mt;vu=1;var h=Ka(),d=dr(),f=Math.max;return mt=function(T,E){var A,x,C=f(arguments.length,2),U;for(T=Object(d(T)),U=function(P){try{T[P]=E[P]}catch(X){A||(A=X)}},x=1;x-1},bt}var hs=ls()?String.prototype.contains:cs(),mr=xu,Au=ss,Su=du,Iu=La,Ze=hs,gs=yu.exports=function(h,d){var f,T,E,A,x;return arguments.length<2||typeof h!="string"?(A=d,d=h,h=null):A=arguments[2],mr(h)?(f=Ze.call(h,"c"),T=Ze.call(h,"e"),E=Ze.call(h,"w")):(f=E=!0,T=!1),x={value:d,configurable:f,enumerable:T,writable:E},A?Su(Iu(A),x):x};gs.gs=function(h,d,f){var T,E,A,x;return typeof h!="string"?(A=f,f=d,d=h,h=null):A=arguments[3],mr(d)?Au(d)?mr(f)?Au(f)||(A=f,f=void 0):f=void 0:(A=d,d=f=void 0):d=void 0,mr(h)?(T=Ze.call(h,"c"),E=Ze.call(h,"e")):(T=!0,E=!1),x={get:d,set:f,configurable:T,enumerable:E},A?Su(Iu(A),x):x};var Ye=yu.exports,At={exports:{}};(function(h,d){var f=Ye,T=cu,E=Function.prototype.apply,A=Function.prototype.call,x=Object.create,C=Object.defineProperty,U=Object.defineProperties,P=Object.prototype.hasOwnProperty,X={configurable:!0,enumerable:!1,writable:!0},an,z,Z,pn,ln,F,_n;an=function(M,S){var $;return T(S),P.call(this,"__ee__")?$=this.__ee__:($=X.value=x(null),C(this,"__ee__",X),X.value=null),$[M]?typeof $[M]=="object"?$[M].push(S):$[M]=[$[M],S]:$[M]=S,this},z=function(M,S){var $,J;return T(S),J=this,an.call(this,M,$=function(){Z.call(J,M,$),E.call(S,this,arguments)}),$.__eeOnceListener__=S,this},Z=function(M,S){var $,J,V,nn;if(T(S),!P.call(this,"__ee__"))return this;if($=this.__ee__,!$[M])return this;if(J=$[M],typeof J=="object")for(nn=0;V=J[nn];++nn)(V===S||V.__eeOnceListener__===S)&&(J.length===2?$[M]=J[nn?0:1]:J.splice(nn,1));else(J===S||J.__eeOnceListener__===S)&&delete $[M];return this},pn=function(M){var S,$,J,V,nn;if(P.call(this,"__ee__")&&(V=this.__ee__[M],!!V))if(typeof V=="object"){for($=arguments.length,nn=new Array($-1),S=1;S<$;++S)nn[S-1]=arguments[S];for(V=V.slice(),S=0;J=V[S];++S)E.call(J,this,nn)}else switch(arguments.length){case 1:A.call(V,this);break;case 2:A.call(V,this,arguments[1]);break;case 3:A.call(V,this,arguments[1],arguments[2]);break;default:for($=arguments.length,nn=new Array($-1),S=1;S<$;++S)nn[S-1]=arguments[S];E.call(V,this,nn)}},ln={on:an,once:z,off:Z,emit:pn},F={on:f(an),once:f(z),off:f(Z),emit:f(pn)},_n=U({},F),h.exports=d=function(M){return M==null?x(_n):U(Object(M),F)},d.methods=ln})(At,At.exports);var ps=At.exports,St,Ru;function _s(){return Ru||(Ru=1,St=function(){var h=Array.from,d,f;return typeof h!="function"?!1:(d=["raz","dwa"],f=h(d),!!(f&&f!==d&&f[1]==="dwa"))}),St}var It,Ou;function vs(){return Ou||(Ou=1,It=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}),It}var Rt,Tu;function ds(){if(Tu)return Rt;Tu=1;var h=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};return Rt=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return h()}try{return __global__||h()}finally{delete Object.prototype.__global__}}(),Rt}var Ot,Eu;function yr(){return Eu||(Eu=1,Ot=vs()()?globalThis:ds()),Ot}var Tt,Cu;function ws(){if(Cu)return Tt;Cu=1;var h=yr(),d={object:!0,symbol:!0};return Tt=function(){var f=h.Symbol,T;if(typeof f!="function")return!1;T=f("test symbol");try{String(T)}catch{return!1}return!(!d[typeof f.iterator]||!d[typeof f.toPrimitive]||!d[typeof f.toStringTag])},Tt}var Et,Lu;function ms(){return Lu||(Lu=1,Et=function(h){return h?typeof h=="symbol"?!0:!h.constructor||h.constructor.name!=="Symbol"?!1:h[h.constructor.toStringTag]==="Symbol":!1}),Et}var Ct,Pu;function Wu(){if(Pu)return Ct;Pu=1;var h=ms();return Ct=function(d){if(!h(d))throw new TypeError(d+" is not a symbol");return d},Ct}var Lt,Fu;function ys(){if(Fu)return Lt;Fu=1;var h=Ye,d=Object.create,f=Object.defineProperty,T=Object.prototype,E=d(null);return Lt=function(A){for(var x=0,C,U;E[A+(x||"")];)++x;return A+=x||"",E[A]=!0,C="@@"+A,f(T,C,h.gs(null,function(P){U||(U=!0,f(this,C,h(P)),U=!1)})),C},Lt}var Pt,Mu;function xs(){if(Mu)return Pt;Mu=1;var h=Ye,d=yr().Symbol;return Pt=function(f){return Object.defineProperties(f,{hasInstance:h("",d&&d.hasInstance||f("hasInstance")),isConcatSpreadable:h("",d&&d.isConcatSpreadable||f("isConcatSpreadable")),iterator:h("",d&&d.iterator||f("iterator")),match:h("",d&&d.match||f("match")),replace:h("",d&&d.replace||f("replace")),search:h("",d&&d.search||f("search")),species:h("",d&&d.species||f("species")),split:h("",d&&d.split||f("split")),toPrimitive:h("",d&&d.toPrimitive||f("toPrimitive")),toStringTag:h("",d&&d.toStringTag||f("toStringTag")),unscopables:h("",d&&d.unscopables||f("unscopables"))})},Pt}var Wt,Bu;function bs(){if(Bu)return Wt;Bu=1;var h=Ye,d=Wu(),f=Object.create(null);return Wt=function(T){return Object.defineProperties(T,{for:h(function(E){return f[E]?f[E]:f[E]=T(String(E))}),keyFor:h(function(E){var A;d(E);for(A in f)if(f[A]===E)return A})})},Wt}var Ft,Uu;function As(){if(Uu)return Ft;Uu=1;var h=Ye,d=Wu(),f=yr().Symbol,T=ys(),E=xs(),A=bs(),x=Object.create,C=Object.defineProperties,U=Object.defineProperty,P,X,an;if(typeof f=="function")try{String(f()),an=!0}catch{}else f=null;return X=function(Z){if(this instanceof X)throw new TypeError("Symbol is not a constructor");return P(Z)},Ft=P=function z(Z){var pn;if(this instanceof z)throw new TypeError("Symbol is not a constructor");return an?f(Z):(pn=x(X.prototype),Z=Z===void 0?"":String(Z),C(pn,{__description__:h("",Z),__name__:h("",T(Z))}))},E(P),A(P),C(X.prototype,{constructor:h(P),toString:h("",function(){return this.__name__})}),C(P.prototype,{toString:h(function(){return"Symbol ("+d(this).__description__+")"}),valueOf:h(function(){return d(this)})}),U(P.prototype,P.toPrimitive,h("",function(){var z=d(this);return typeof z=="symbol"?z:z.toString()})),U(P.prototype,P.toStringTag,h("c","Symbol")),U(X.prototype,P.toStringTag,h("c",P.prototype[P.toStringTag])),U(X.prototype,P.toPrimitive,h("c",P.prototype[P.toPrimitive])),Ft}var Mt,qu;function Ss(){return qu||(qu=1,Mt=ws()()?yr().Symbol:As()),Mt}var Bt,Du;function Is(){if(Du)return Bt;Du=1;var h=Object.prototype.toString,d=h.call(function(){return arguments}());return Bt=function(f){return h.call(f)===d},Bt}var Ut,Nu;function Rs(){if(Nu)return Ut;Nu=1;var h=Object.prototype.toString,d=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Ut=function(f){return typeof f=="function"&&d(h.call(f))},Ut}var qt,$u;function Os(){if($u)return qt;$u=1;var h=Object.prototype.toString,d=h.call("");return qt=function(f){return typeof f=="string"||f&&typeof f=="object"&&(f instanceof String||h.call(f)===d)||!1},qt}var Dt,Gu;function Ts(){if(Gu)return Dt;Gu=1;var h=Ss().iterator,d=Is(),f=Rs(),T=lu,E=cu,A=dr(),x=Te,C=Os(),U=Array.isArray,P=Function.prototype.call,X={configurable:!0,enumerable:!0,writable:!0,value:null},an=Object.defineProperty;return Dt=function(z){var Z=arguments[1],pn=arguments[2],ln,F,_n,M,S,$,J,V,nn,sn;if(z=Object(A(z)),x(Z)&&E(Z),!this||this===Array||!f(this)){if(!Z){if(d(z))return S=z.length,S!==1?Array.apply(null,z):(M=new Array(1),M[0]=z[0],M);if(U(z)){for(M=new Array(S=z.length),F=0;F=55296&&$<=56319&&(sn+=z[++F])),sn=Z?P.call(Z,pn,sn,_n):sn,ln?(X.value=sn,an(M,_n,X)):M[_n]=sn,++_n;S=_n}}if(S===void 0)for(S=T(z.length),ln&&(M=new ln(S)),F=0;Fasync d=>{const f=new h,T=await d(f);if("error"in T)throw console.error(T.error),new Error(T.error);return f.terminate(),T.result},Ls=h=>d=>Cs(h)(f=>(f.postMessage(d),new Promise((T,E)=>{f.onmessage=A=>{T(A.data)},f.onerror=A=>{console.error(A),E(A)}}))),Ps=h=>async d=>{try{const f=await h(d);postMessage({result:f})}catch(f){postMessage({error:f})}};var Ws=""+new URL("parseTraceSlave.worker-R8bZvGE3.js",self.location.href).href;const{min:Fs}=Math,Ms=navigator.hardwareConcurrency??8;class Bs extends Worker{constructor(){super(Ws,{type:"module"})}}const Us=Ls(Bs);async function qs({trace:h,context:d,view:f="main"}){var x,C;const T=Oe.ceil((((x=h==null?void 0:h.events)==null?void 0:x.length)??0)/Ms),E=Oe.range(0,(C=h==null?void 0:h.events)==null?void 0:C.length,T),A=Oe.flatten(await Promise.all(Oe.map(E,U=>{var P;return Us({trace:h,context:d,view:f,from:U,to:Fs(U+T,((P=h==null?void 0:h.events)==null?void 0:P.length)??0)})})));return{stepsPersistent:Oe.flatMap(A,"stepsPersistent"),stepsTransient:Oe.flatMap(A,"stepsTransient")}}onmessage=Ps(async({data:h})=>await qs(h))})(); diff --git a/assets/parseTrace.worker-DDV8yRvx.js b/assets/parseTrace.worker-DDV8yRvx.js deleted file mode 100644 index a1fb48c..0000000 --- a/assets/parseTrace.worker-DDV8yRvx.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var Ke=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},vt={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */vt.exports,function(c,d){(function(){var f,T="4.17.21",C=200,O="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",R="Expected a function",j="Invalid `variable` option passed into `_.template`",Y="__lodash_hash_undefined__",H=500,D="__lodash_placeholder__",Q=1,q=2,z=4,an=1,un=2,P=1,_n=2,W=4,A=8,$=16,X=32,V=64,en=128,cn=256,Ur=512,Fs=30,Ms="...",Bs=800,Us=16,Nu=1,Ds=2,qs=3,we=1/0,ae=9007199254740991,$s=17976931348623157e292,mt=NaN,Xn=4294967295,Ns=Xn-1,Gs=Xn>>>1,Hs=[["ary",en],["bind",P],["bindKey",_n],["curry",A],["curryRight",$],["flip",Ur],["partial",X],["partialRight",V],["rearg",cn]],Ee="[object Arguments]",yt="[object Array]",zs="[object AsyncFunction]",Xe="[object Boolean]",Je="[object Date]",Ks="[object DOMException]",xt="[object Error]",At="[object Function]",Gu="[object GeneratorFunction]",Gn="[object Map]",Qe="[object Number]",Zs="[object Null]",kn="[object Object]",Hu="[object Promise]",Ys="[object Proxy]",Ve="[object RegExp]",Hn="[object Set]",ke="[object String]",St="[object Symbol]",Xs="[object Undefined]",je="[object WeakMap]",Js="[object WeakSet]",nt="[object ArrayBuffer]",Ce="[object DataView]",Dr="[object Float32Array]",qr="[object Float64Array]",$r="[object Int8Array]",Nr="[object Int16Array]",Gr="[object Int32Array]",Hr="[object Uint8Array]",zr="[object Uint8ClampedArray]",Kr="[object Uint16Array]",Zr="[object Uint32Array]",Qs=/\b__p \+= '';/g,Vs=/\b(__p \+=) '' \+/g,ks=/(__e\(.*?\)|\b__t\)) \+\n'';/g,zu=/&(?:amp|lt|gt|quot|#39);/g,Ku=/[&<>"']/g,js=RegExp(zu.source),nl=RegExp(Ku.source),el=/<%-([\s\S]+?)%>/g,tl=/<%([\s\S]+?)%>/g,Zu=/<%=([\s\S]+?)%>/g,rl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,il=/^\w*$/,ul=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yr=/[\\^$.*+?()[\]{}|]/g,fl=RegExp(Yr.source),Xr=/^\s+/,ol=/\s/,al=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,sl=/\{\n\/\* \[wrapped with (.+)\] \*/,ll=/,? & /,cl=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hl=/[()=,{}\[\]\/\s]/,gl=/\\(\\)?/g,pl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yu=/\w*$/,_l=/^[-+]0x[0-9a-f]+$/i,vl=/^0b[01]+$/i,dl=/^\[object .+?Constructor\]$/,wl=/^0o[0-7]+$/i,ml=/^(?:0|[1-9]\d*)$/,yl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xl=/['\n\r\u2028\u2029\\]/g,It="\\ud800-\\udfff",Al="\\u0300-\\u036f",Sl="\\ufe20-\\ufe2f",bl="\\u20d0-\\u20ff",Xu=Al+Sl+bl,Ju="\\u2700-\\u27bf",Qu="a-z\\xdf-\\xf6\\xf8-\\xff",Il="\\xac\\xb1\\xd7\\xf7",Rl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Tl="\\u2000-\\u206f",Ol=" \\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",Vu="A-Z\\xc0-\\xd6\\xd8-\\xde",ku="\\ufe0e\\ufe0f",ju=Il+Rl+Tl+Ol,Jr="['’]",El="["+It+"]",nf="["+ju+"]",Rt="["+Xu+"]",ef="\\d+",Cl="["+Ju+"]",tf="["+Qu+"]",rf="[^"+It+ju+ef+Ju+Qu+Vu+"]",Qr="\\ud83c[\\udffb-\\udfff]",Ll="(?:"+Rt+"|"+Qr+")",uf="[^"+It+"]",Vr="(?:\\ud83c[\\udde6-\\uddff]){2}",kr="[\\ud800-\\udbff][\\udc00-\\udfff]",Le="["+Vu+"]",ff="\\u200d",of="(?:"+tf+"|"+rf+")",Pl="(?:"+Le+"|"+rf+")",af="(?:"+Jr+"(?:d|ll|m|re|s|t|ve))?",sf="(?:"+Jr+"(?:D|LL|M|RE|S|T|VE))?",lf=Ll+"?",cf="["+ku+"]?",Wl="(?:"+ff+"(?:"+[uf,Vr,kr].join("|")+")"+cf+lf+")*",Fl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ml="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",hf=cf+lf+Wl,Bl="(?:"+[Cl,Vr,kr].join("|")+")"+hf,Ul="(?:"+[uf+Rt+"?",Rt,Vr,kr,El].join("|")+")",Dl=RegExp(Jr,"g"),ql=RegExp(Rt,"g"),jr=RegExp(Qr+"(?="+Qr+")|"+Ul+hf,"g"),$l=RegExp([Le+"?"+tf+"+"+af+"(?="+[nf,Le,"$"].join("|")+")",Pl+"+"+sf+"(?="+[nf,Le+of,"$"].join("|")+")",Le+"?"+of+"+"+af,Le+"+"+sf,Ml,Fl,ef,Bl].join("|"),"g"),Nl=RegExp("["+ff+It+Xu+ku+"]"),Gl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Hl=["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"],zl=-1,tn={};tn[Dr]=tn[qr]=tn[$r]=tn[Nr]=tn[Gr]=tn[Hr]=tn[zr]=tn[Kr]=tn[Zr]=!0,tn[Ee]=tn[yt]=tn[nt]=tn[Xe]=tn[Ce]=tn[Je]=tn[xt]=tn[At]=tn[Gn]=tn[Qe]=tn[kn]=tn[Ve]=tn[Hn]=tn[ke]=tn[je]=!1;var nn={};nn[Ee]=nn[yt]=nn[nt]=nn[Ce]=nn[Xe]=nn[Je]=nn[Dr]=nn[qr]=nn[$r]=nn[Nr]=nn[Gr]=nn[Gn]=nn[Qe]=nn[kn]=nn[Ve]=nn[Hn]=nn[ke]=nn[St]=nn[Hr]=nn[zr]=nn[Kr]=nn[Zr]=!0,nn[xt]=nn[At]=nn[je]=!1;var Kl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Zl={"&":"&","<":"<",">":">",'"':""","'":"'"},Yl={"&":"&","<":"<",">":">",""":'"',"'":"'"},Xl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Jl=parseFloat,Ql=parseInt,gf=typeof Ke=="object"&&Ke&&Ke.Object===Object&&Ke,Vl=typeof self=="object"&&self&&self.Object===Object&&self,vn=gf||Vl||Function("return this")(),ni=d&&!d.nodeType&&d,me=ni&&!0&&c&&!c.nodeType&&c,pf=me&&me.exports===ni,ei=pf&&gf.process,Wn=function(){try{var l=me&&me.require&&me.require("util").types;return l||ei&&ei.binding&&ei.binding("util")}catch{}}(),_f=Wn&&Wn.isArrayBuffer,vf=Wn&&Wn.isDate,df=Wn&&Wn.isMap,wf=Wn&&Wn.isRegExp,mf=Wn&&Wn.isSet,yf=Wn&&Wn.isTypedArray;function Tn(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function kl(l,p,g,y){for(var E=-1,K=l==null?0:l.length;++E-1}function ti(l,p,g){for(var y=-1,E=l==null?0:l.length;++y-1;);return g}function Of(l,p){for(var g=l.length;g--&&Pe(p,l[g],0)>-1;);return g}function oc(l,p){for(var g=l.length,y=0;g--;)l[g]===p&&++y;return y}var ac=fi(Kl),sc=fi(Zl);function lc(l){return"\\"+Xl[l]}function cc(l,p){return l==null?f:l[p]}function We(l){return Nl.test(l)}function hc(l){return Gl.test(l)}function gc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function li(l){var p=-1,g=Array(l.size);return l.forEach(function(y,E){g[++p]=[E,y]}),g}function Ef(l,p){return function(g){return l(p(g))}}function ce(l,p){for(var g=-1,y=l.length,E=0,K=[];++g-1}function nh(n,e){var t=this.__data__,r=zt(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}jn.prototype.clear=Qc,jn.prototype.delete=Vc,jn.prototype.get=kc,jn.prototype.has=jc,jn.prototype.set=nh;function ne(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Un(n,e,t,r,i,o){var a,s=e&Q,h=e&q,_=e&z;if(t&&(a=i?t(n,r,i,o):t(n)),a!==f)return a;if(!fn(n))return n;var v=L(n);if(v){if(a=ig(n),!s)return Sn(n,a)}else{var w=mn(n),m=w==At||w==Gu;if(de(n))return co(n,s);if(w==kn||w==Ee||m&&!i){if(a=h||m?{}:Lo(n),!s)return h?Yh(n,vh(a,n)):Zh(n,Nf(a,n))}else{if(!nn[w])return i?n:{};a=ug(n,w,s)}}o||(o=new Kn);var x=o.get(n);if(x)return x;o.set(n,a),fa(n)?n.forEach(function(I){a.add(Un(I,e,t,I,n,o))}):ia(n)&&n.forEach(function(I,U){a.set(U,Un(I,e,t,U,n,o))});var b=_?h?Bi:Mi:h?In:pn,M=v?f:b(n);return Fn(M||n,function(I,U){M&&(U=I,I=n[U]),ot(a,U,Un(I,e,t,U,n,o))}),a}function dh(n){var e=pn(n);return function(t){return Gf(t,n,e)}}function Gf(n,e,t){var r=t.length;if(n==null)return!r;for(n=k(n);r--;){var i=t[r],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function Hf(n,e,t){if(typeof n!="function")throw new Mn(R);return pt(function(){n.apply(f,t)},e)}function at(n,e,t,r){var i=-1,o=Tt,a=!0,s=n.length,h=[],_=e.length;if(!s)return h;t&&(e=rn(e,On(t))),r?(o=ti,a=!1):e.length>=C&&(o=et,a=!1,e=new Ae(e));n:for(;++ii?0:i+t),r=r===f||r>i?i:F(r),r<0&&(r+=i),r=t>r?0:aa(r);t0&&t(s)?e>1?dn(s,e-1,t,r,i):le(i,s):r||(i[i.length]=s)}return i}var di=wo(),Zf=wo(!0);function Jn(n,e){return n&&di(n,e,pn)}function wi(n,e){return n&&Zf(n,e,pn)}function Zt(n,e){return se(e,function(t){return ue(n[t])})}function be(n,e){e=_e(e,n);for(var t=0,r=e.length;n!=null&&te}function yh(n,e){return n!=null&&J.call(n,e)}function xh(n,e){return n!=null&&e in k(n)}function Ah(n,e,t){return n>=wn(e,t)&&n=120&&v.length>=120)?new Ae(a&&v):f}v=n[0];var w=-1,m=s[0];n:for(;++w-1;)s!==n&&Ut.call(s,h,1),Ut.call(n,h,1);return n}function ro(n,e){for(var t=n?e.length:0,r=t-1;t--;){var i=e[t];if(t==r||i!==o){var o=i;ie(i)?Ut.call(n,i,1):Oi(n,i)}}return n}function Ii(n,e){return n+$t(Uf()*(e-n+1))}function Mh(n,e,t,r){for(var i=-1,o=gn(qt((e-n)/(t||1)),0),a=g(o);o--;)a[r?o:++i]=n,n+=t;return a}function Ri(n,e){var t="";if(!n||e<1||e>ae)return t;do e%2&&(t+=n),e=$t(e/2),e&&(n+=n);while(e);return t}function B(n,e){return Hi(Fo(n,e,Rn),n+"")}function Bh(n){return $f(ze(n))}function Uh(n,e){var t=ze(n);return rr(t,Se(e,0,t.length))}function ct(n,e,t,r){if(!fn(n))return n;e=_e(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var o=g(i);++r>>1,a=n[o];a!==null&&!Cn(a)&&(t?a<=e:a=C){var _=e?null:Vh(n);if(_)return Et(_);a=!1,i=et,h=new Ae}else h=e?[]:s;n:for(;++r=r?n:Dn(n,e,t)}var lo=Oc||function(n){return vn.clearTimeout(n)};function co(n,e){if(e)return n.slice();var t=n.length,r=Pf?Pf(t):new n.constructor(t);return n.copy(r),r}function Pi(n){var e=new n.constructor(n.byteLength);return new Mt(e).set(new Mt(n)),e}function Gh(n,e){var t=e?Pi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Hh(n){var e=new n.constructor(n.source,Yu.exec(n));return e.lastIndex=n.lastIndex,e}function zh(n){return ft?k(ft.call(n)):{}}function ho(n,e){var t=e?Pi(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function go(n,e){if(n!==e){var t=n!==f,r=n===null,i=n===n,o=Cn(n),a=e!==f,s=e===null,h=e===e,_=Cn(e);if(!s&&!_&&!o&&n>e||o&&a&&h&&!s&&!_||r&&a&&h||!t&&h||!i)return 1;if(!r&&!o&&!_&&n=s)return h;var _=t[r];return h*(_=="desc"?-1:1)}}return n.index-e.index}function po(n,e,t,r){for(var i=-1,o=n.length,a=t.length,s=-1,h=e.length,_=gn(o-a,0),v=g(h+_),w=!r;++s1?t[i-1]:f,a=i>2?t[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(t[0],t[1],a)&&(o=i<3?f:o,i=1),e=k(e);++r-1?i[o?e[a]:a]:f}}function xo(n){return re(function(e){var t=e.length,r=t,i=Bn.prototype.thru;for(n&&e.reverse();r--;){var o=e[r];if(typeof o!="function")throw new Mn(R);if(i&&!a&&er(o)=="wrapper")var a=new Bn([],!0)}for(r=a?r:t;++r1&&G.reverse(),v&&hs))return!1;var _=o.get(n),v=o.get(e);if(_&&v)return _==e&&v==n;var w=-1,m=!0,x=t&un?new Ae:f;for(o.set(n,e),o.set(e,n);++w1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(al,`{ -/* [wrapped with `+e+`] */ -`)}function og(n){return L(n)||Te(n)||!!(Mf&&n&&n[Mf])}function ie(n,e){var t=typeof n;return e=e??ae,!!e&&(t=="number"||t!="symbol"&&ml.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Bs)return arguments[0]}else e=0;return n.apply(f,arguments)}}function rr(n,e){var t=-1,r=n.length,i=r-1;for(e=e===f?r:e;++t1?n[e-1]:f;return t=typeof t=="function"?(n.pop(),t):f,Zo(n,t)});function Yo(n){var e=u(n);return e.__chain__=!0,e}function wp(n,e){return e(n),n}function ir(n,e){return e(n)}var mp=re(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,i=function(o){return vi(o,n)};return e>1||this.__actions__.length||!(r instanceof N)||!ie(t)?this.thru(i):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:ir,args:[i],thisArg:f}),new Bn(r,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function yp(){return Yo(this)}function xp(){return new Bn(this.value(),this.__chain__)}function Ap(){this.__values__===f&&(this.__values__=oa(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Sp(){return this}function bp(n){for(var e,t=this;t instanceof Ht;){var r=$o(t);r.__index__=0,r.__values__=f,e?i.__wrapped__=r:e=r;var i=r;t=t.__wrapped__}return i.__wrapped__=n,e}function Ip(){var n=this.__wrapped__;if(n instanceof N){var e=n;return this.__actions__.length&&(e=new N(this)),e=e.reverse(),e.__actions__.push({func:ir,args:[zi],thisArg:f}),new Bn(e,this.__chain__)}return this.thru(zi)}function Rp(){return ao(this.__wrapped__,this.__actions__)}var Tp=Qt(function(n,e,t){J.call(n,t)?++n[t]:ee(n,t,1)});function Op(n,e,t){var r=L(n)?xf:wh;return t&&xn(n,e,t)&&(e=f),r(n,S(e,3))}function Ep(n,e){var t=L(n)?se:Kf;return t(n,S(e,3))}var Cp=yo(No),Lp=yo(Go);function Pp(n,e){return dn(ur(n,e),1)}function Wp(n,e){return dn(ur(n,e),we)}function Fp(n,e,t){return t=t===f?1:F(t),dn(ur(n,e),t)}function Xo(n,e){var t=L(n)?Fn:ge;return t(n,S(e,3))}function Jo(n,e){var t=L(n)?jl:zf;return t(n,S(e,3))}var Mp=Qt(function(n,e,t){J.call(n,t)?n[t].push(e):ee(n,t,[e])});function Bp(n,e,t,r){n=bn(n)?n:ze(n),t=t&&!r?F(t):0;var i=n.length;return t<0&&(t=gn(i+t,0)),lr(n)?t<=i&&n.indexOf(e,t)>-1:!!i&&Pe(n,e,t)>-1}var Up=B(function(n,e,t){var r=-1,i=typeof e=="function",o=bn(n)?g(n.length):[];return ge(n,function(a){o[++r]=i?Tn(e,a,t):st(a,e,t)}),o}),Dp=Qt(function(n,e,t){ee(n,t,e)});function ur(n,e){var t=L(n)?rn:Vf;return t(n,S(e,3))}function qp(n,e,t,r){return n==null?[]:(L(e)||(e=e==null?[]:[e]),t=r?f:t,L(t)||(t=t==null?[]:[t]),eo(n,e,t))}var $p=Qt(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function Np(n,e,t){var r=L(n)?ri:If,i=arguments.length<3;return r(n,S(e,4),t,i,ge)}function Gp(n,e,t){var r=L(n)?nc:If,i=arguments.length<3;return r(n,S(e,4),t,i,zf)}function Hp(n,e){var t=L(n)?se:Kf;return t(n,ar(S(e,3)))}function zp(n){var e=L(n)?$f:Bh;return e(n)}function Kp(n,e,t){(t?xn(n,e,t):e===f)?e=1:e=F(e);var r=L(n)?gh:Uh;return r(n,e)}function Zp(n){var e=L(n)?ph:qh;return e(n)}function Yp(n){if(n==null)return 0;if(bn(n))return lr(n)?Fe(n):n.length;var e=mn(n);return e==Gn||e==Hn?n.size:Ai(n).length}function Xp(n,e,t){var r=L(n)?ii:$h;return t&&xn(n,e,t)&&(e=f),r(n,S(e,3))}var Jp=B(function(n,e){if(n==null)return[];var t=e.length;return t>1&&xn(n,e[0],e[1])?e=[]:t>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),eo(n,dn(e,1),[])}),fr=Ec||function(){return vn.Date.now()};function Qp(n,e){if(typeof e!="function")throw new Mn(R);return n=F(n),function(){if(--n<1)return e.apply(this,arguments)}}function Qo(n,e,t){return e=t?f:e,e=n&&e==null?n.length:e,te(n,en,f,f,f,f,e)}function Vo(n,e){var t;if(typeof e!="function")throw new Mn(R);return n=F(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=f),t}}var Zi=B(function(n,e,t){var r=P;if(t.length){var i=ce(t,Ge(Zi));r|=X}return te(n,r,e,t,i)}),ko=B(function(n,e,t){var r=P|_n;if(t.length){var i=ce(t,Ge(ko));r|=X}return te(e,r,n,t,i)});function jo(n,e,t){e=t?f:e;var r=te(n,A,f,f,f,f,f,e);return r.placeholder=jo.placeholder,r}function na(n,e,t){e=t?f:e;var r=te(n,$,f,f,f,f,f,e);return r.placeholder=na.placeholder,r}function ea(n,e,t){var r,i,o,a,s,h,_=0,v=!1,w=!1,m=!0;if(typeof n!="function")throw new Mn(R);e=$n(e)||0,fn(t)&&(v=!!t.leading,w="maxWait"in t,o=w?gn($n(t.maxWait)||0,e):o,m="trailing"in t?!!t.trailing:m);function x(ln){var Yn=r,oe=i;return r=i=f,_=ln,a=n.apply(oe,Yn),a}function b(ln){return _=ln,s=pt(U,e),v?x(ln):a}function M(ln){var Yn=ln-h,oe=ln-_,ya=e-Yn;return w?wn(ya,o-oe):ya}function I(ln){var Yn=ln-h,oe=ln-_;return h===f||Yn>=e||Yn<0||w&&oe>=o}function U(){var ln=fr();if(I(ln))return G(ln);s=pt(U,M(ln))}function G(ln){return s=f,m&&r?x(ln):(r=i=f,a)}function Ln(){s!==f&&lo(s),_=0,r=h=i=s=f}function An(){return s===f?a:G(fr())}function Pn(){var ln=fr(),Yn=I(ln);if(r=arguments,i=this,h=ln,Yn){if(s===f)return b(h);if(w)return lo(s),s=pt(U,e),x(h)}return s===f&&(s=pt(U,e)),a}return Pn.cancel=Ln,Pn.flush=An,Pn}var Vp=B(function(n,e){return Hf(n,1,e)}),kp=B(function(n,e,t){return Hf(n,$n(e)||0,t)});function jp(n){return te(n,Ur)}function or(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Mn(R);var t=function(){var r=arguments,i=e?e.apply(this,r):r[0],o=t.cache;if(o.has(i))return o.get(i);var a=n.apply(this,r);return t.cache=o.set(i,a)||o,a};return t.cache=new(or.Cache||ne),t}or.Cache=ne;function ar(n){if(typeof n!="function")throw new Mn(R);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function n_(n){return Vo(2,n)}var e_=Nh(function(n,e){e=e.length==1&&L(e[0])?rn(e[0],On(S())):rn(dn(e,1),On(S()));var t=e.length;return B(function(r){for(var i=-1,o=wn(r.length,t);++i=e}),Te=Xf(function(){return arguments}())?Xf:function(n){return on(n)&&J.call(n,"callee")&&!Ff.call(n,"callee")},L=g.isArray,v_=_f?On(_f):bh;function bn(n){return n!=null&&sr(n.length)&&!ue(n)}function sn(n){return on(n)&&bn(n)}function d_(n){return n===!0||n===!1||on(n)&&yn(n)==Xe}var de=Lc||iu,w_=vf?On(vf):Ih;function m_(n){return on(n)&&n.nodeType===1&&!_t(n)}function y_(n){if(n==null)return!0;if(bn(n)&&(L(n)||typeof n=="string"||typeof n.splice=="function"||de(n)||He(n)||Te(n)))return!n.length;var e=mn(n);if(e==Gn||e==Hn)return!n.size;if(gt(n))return!Ai(n).length;for(var t in n)if(J.call(n,t))return!1;return!0}function x_(n,e){return lt(n,e)}function A_(n,e,t){t=typeof t=="function"?t:f;var r=t?t(n,e):f;return r===f?lt(n,e,f,t):!!r}function Xi(n){if(!on(n))return!1;var e=yn(n);return e==xt||e==Ks||typeof n.message=="string"&&typeof n.name=="string"&&!_t(n)}function S_(n){return typeof n=="number"&&Bf(n)}function ue(n){if(!fn(n))return!1;var e=yn(n);return e==At||e==Gu||e==zs||e==Ys}function ra(n){return typeof n=="number"&&n==F(n)}function sr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function fn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function on(n){return n!=null&&typeof n=="object"}var ia=df?On(df):Th;function b_(n,e){return n===e||xi(n,e,Di(e))}function I_(n,e,t){return t=typeof t=="function"?t:f,xi(n,e,Di(e),t)}function R_(n){return ua(n)&&n!=+n}function T_(n){if(lg(n))throw new E(O);return Jf(n)}function O_(n){return n===null}function E_(n){return n==null}function ua(n){return typeof n=="number"||on(n)&&yn(n)==Qe}function _t(n){if(!on(n)||yn(n)!=kn)return!1;var e=Bt(n);if(e===null)return!0;var t=J.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Pt.call(t)==Ic}var Ji=wf?On(wf):Oh;function C_(n){return ra(n)&&n>=-ae&&n<=ae}var fa=mf?On(mf):Eh;function lr(n){return typeof n=="string"||!L(n)&&on(n)&&yn(n)==ke}function Cn(n){return typeof n=="symbol"||on(n)&&yn(n)==St}var He=yf?On(yf):Ch;function L_(n){return n===f}function P_(n){return on(n)&&mn(n)==je}function W_(n){return on(n)&&yn(n)==Js}var F_=nr(Si),M_=nr(function(n,e){return n<=e});function oa(n){if(!n)return[];if(bn(n))return lr(n)?zn(n):Sn(n);if(tt&&n[tt])return gc(n[tt]());var e=mn(n),t=e==Gn?li:e==Hn?Et:ze;return t(n)}function fe(n){if(!n)return n===0?n:0;if(n=$n(n),n===we||n===-we){var e=n<0?-1:1;return e*$s}return n===n?n:0}function F(n){var e=fe(n),t=e%1;return e===e?t?e-t:e:0}function aa(n){return n?Se(F(n),0,Xn):0}function $n(n){if(typeof n=="number")return n;if(Cn(n))return mt;if(fn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=fn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Rf(n);var t=vl.test(n);return t||wl.test(n)?Ql(n.slice(2),t?2:8):_l.test(n)?mt:+n}function sa(n){return Qn(n,In(n))}function B_(n){return n?Se(F(n),-ae,ae):n===0?n:0}function Z(n){return n==null?"":En(n)}var U_=$e(function(n,e){if(gt(e)||bn(e)){Qn(e,pn(e),n);return}for(var t in e)J.call(e,t)&&ot(n,t,e[t])}),la=$e(function(n,e){Qn(e,In(e),n)}),cr=$e(function(n,e,t,r){Qn(e,In(e),n,r)}),D_=$e(function(n,e,t,r){Qn(e,pn(e),n,r)}),q_=re(vi);function $_(n,e){var t=qe(n);return e==null?t:Nf(t,e)}var N_=B(function(n,e){n=k(n);var t=-1,r=e.length,i=r>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(r=1);++t1),o}),Qn(n,Bi(n),t),r&&(t=Un(t,Q|q|z,kh));for(var i=e.length;i--;)Oi(t,e[i]);return t});function uv(n,e){return ha(n,ar(S(e)))}var fv=re(function(n,e){return n==null?{}:Wh(n,e)});function ha(n,e){if(n==null)return{};var t=rn(Bi(n),function(r){return[r]});return e=S(e),to(n,t,function(r,i){return e(r,i[0])})}function ov(n,e,t){e=_e(e,n);var r=-1,i=e.length;for(i||(i=1,n=f);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var i=Uf();return wn(n+i*(e-n+Jl("1e-"+((i+"").length-1))),e)}return Ii(n,e)}var wv=Ne(function(n,e,t){return e=e.toLowerCase(),n+(t?_a(e):e)});function _a(n){return ki(Z(n).toLowerCase())}function va(n){return n=Z(n),n&&n.replace(yl,ac).replace(ql,"")}function mv(n,e,t){n=Z(n),e=En(e);var r=n.length;t=t===f?r:Se(F(t),0,r);var i=t;return t-=e.length,t>=0&&n.slice(t,i)==e}function yv(n){return n=Z(n),n&&nl.test(n)?n.replace(Ku,sc):n}function xv(n){return n=Z(n),n&&fl.test(n)?n.replace(Yr,"\\$&"):n}var Av=Ne(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),Sv=Ne(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),bv=mo("toLowerCase");function Iv(n,e,t){n=Z(n),e=F(e);var r=e?Fe(n):0;if(!e||r>=e)return n;var i=(e-r)/2;return jt($t(i),t)+n+jt(qt(i),t)}function Rv(n,e,t){n=Z(n),e=F(e);var r=e?Fe(n):0;return e&&r>>0,t?(n=Z(n),n&&(typeof e=="string"||e!=null&&!Ji(e))&&(e=En(e),!e&&We(n))?ve(zn(n),0,t):n.split(e,t)):[]}var Wv=Ne(function(n,e,t){return n+(t?" ":"")+ki(e)});function Fv(n,e,t){return n=Z(n),t=t==null?0:Se(F(t),0,n.length),e=En(e),n.slice(t,t+e.length)==e}function Mv(n,e,t){var r=u.templateSettings;t&&xn(n,e,t)&&(e=f),n=Z(n),e=cr({},e,r,Ro);var i=cr({},e.imports,r.imports,Ro),o=pn(i),a=si(i,o),s,h,_=0,v=e.interpolate||bt,w="__p += '",m=ci((e.escape||bt).source+"|"+v.source+"|"+(v===Zu?pl:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),x="//# sourceURL="+(J.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++zl+"]")+` -`;n.replace(m,function(I,U,G,Ln,An,Pn){return G||(G=Ln),w+=n.slice(_,Pn).replace(xl,lc),U&&(s=!0,w+=`' + -__e(`+U+`) + -'`),An&&(h=!0,w+=`'; -`+An+`; -__p += '`),G&&(w+=`' + -((__t = (`+G+`)) == null ? '' : __t) + -'`),_=Pn+I.length,I}),w+=`'; -`;var b=J.call(e,"variable")&&e.variable;if(!b)w=`with (obj) { -`+w+` -} -`;else if(hl.test(b))throw new E(j);w=(h?w.replace(Qs,""):w).replace(Vs,"$1").replace(ks,"$1;"),w="function("+(b||"obj")+`) { -`+(b?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(h?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+w+`return __p -}`;var M=wa(function(){return K(o,x+"return "+w).apply(f,a)});if(M.source=w,Xi(M))throw M;return M}function Bv(n){return Z(n).toLowerCase()}function Uv(n){return Z(n).toUpperCase()}function Dv(n,e,t){if(n=Z(n),n&&(t||e===f))return Rf(n);if(!n||!(e=En(e)))return n;var r=zn(n),i=zn(e),o=Tf(r,i),a=Of(r,i)+1;return ve(r,o,a).join("")}function qv(n,e,t){if(n=Z(n),n&&(t||e===f))return n.slice(0,Cf(n)+1);if(!n||!(e=En(e)))return n;var r=zn(n),i=Of(r,zn(e))+1;return ve(r,0,i).join("")}function $v(n,e,t){if(n=Z(n),n&&(t||e===f))return n.replace(Xr,"");if(!n||!(e=En(e)))return n;var r=zn(n),i=Tf(r,zn(e));return ve(r,i).join("")}function Nv(n,e){var t=Fs,r=Ms;if(fn(e)){var i="separator"in e?e.separator:i;t="length"in e?F(e.length):t,r="omission"in e?En(e.omission):r}n=Z(n);var o=n.length;if(We(n)){var a=zn(n);o=a.length}if(t>=o)return n;var s=t-Fe(r);if(s<1)return r;var h=a?ve(a,0,s).join(""):n.slice(0,s);if(i===f)return h+r;if(a&&(s+=h.length-s),Ji(i)){if(n.slice(s).search(i)){var _,v=h;for(i.global||(i=ci(i.source,Z(Yu.exec(i))+"g")),i.lastIndex=0;_=i.exec(v);)var w=_.index;h=h.slice(0,w===f?s:w)}}else if(n.indexOf(En(i),s)!=s){var m=h.lastIndexOf(i);m>-1&&(h=h.slice(0,m))}return h+r}function Gv(n){return n=Z(n),n&&js.test(n)?n.replace(zu,dc):n}var Hv=Ne(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),ki=mo("toUpperCase");function da(n,e,t){return n=Z(n),e=t?f:e,e===f?hc(n)?yc(n):rc(n):n.match(e)||[]}var wa=B(function(n,e){try{return Tn(n,f,e)}catch(t){return Xi(t)?t:new E(t)}}),zv=re(function(n,e){return Fn(e,function(t){t=Vn(t),ee(n,t,Zi(n[t],n))}),n});function Kv(n){var e=n==null?0:n.length,t=S();return n=e?rn(n,function(r){if(typeof r[1]!="function")throw new Mn(R);return[t(r[0]),r[1]]}):[],B(function(r){for(var i=-1;++iae)return[];var t=Xn,r=wn(n,Xn);e=S(e),n-=Xn;for(var i=ai(r,e);++t0||e<0)?new N(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==f&&(e=F(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},N.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},N.prototype.toArray=function(){return this.take(Xn)},Jn(N.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],o=r||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=r?[1]:arguments,h=a instanceof N,_=s[0],v=h||L(a),w=function(U){var G=i.apply(u,le([U],s));return r&&m?G[0]:G};v&&t&&typeof _=="function"&&_.length!=1&&(h=v=!1);var m=this.__chain__,x=!!this.__actions__.length,b=o&&!m,M=h&&!x;if(!o&&v){a=M?a:new N(this);var I=n.apply(a,s);return I.__actions__.push({func:ir,args:[w],thisArg:f}),new Bn(I,m)}return b&&M?n.apply(this,s):(I=this.thru(w),b?r?I.value()[0]:I.value():I)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Ct[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(L(o)?o:[],i)}return this[t](function(a){return e.apply(L(a)?a:[],i)})}}),Jn(N.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";J.call(De,r)||(De[r]=[]),De[r].push({name:e,func:t})}}),De[Vt(f,_n).name]=[{name:"wrapper",func:f}],N.prototype.clone=Gc,N.prototype.reverse=Hc,N.prototype.value=zc,u.prototype.at=mp,u.prototype.chain=yp,u.prototype.commit=xp,u.prototype.next=Ap,u.prototype.plant=bp,u.prototype.reverse=Ip,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Rp,u.prototype.first=u.prototype.head,tt&&(u.prototype[tt]=Sp),u},Me=xc();me?((me.exports=Me)._=Me,ni._=Me):vn._=Me}).call(Ke)}(vt,vt.exports);var Nn=vt.exports,xa=function(){},Aa=xa(),Oe=function(c){return c!==Aa&&c!==null},Sa=Oe,ba=Array.prototype.forEach,Ia=Object.create,Ra=function(c,d){var f;for(f in c)d[f]=c[f]},Ta=function(c){var d=Ia(null);return ba.call(arguments,function(f){Sa(f)&&Ra(Object(f),d)}),d},Oa=function(){var c=Math.sign;return typeof c!="function"?!1:c(10)===1&&c(-20)===-1},hr,uu;function Ea(){return uu||(uu=1,hr=function(c){return c=Number(c),isNaN(c)||c===0?c:c>0?1:-1}),hr}var Ca=Oa()?Math.sign:Ea(),La=Ca,Pa=Math.abs,Wa=Math.floor,Fa=function(c){return isNaN(c)?0:(c=Number(c),c===0||!isFinite(c)?c:La(c)*Wa(Pa(c)))},Ma=Fa,Ba=Math.max,Ua=function(c){return Ba(0,Ma(c))},fu=function(c){if(typeof c!="function")throw new TypeError(c+" is not a function");return c},Da=Oe,ou=function(c){if(!Da(c))throw new TypeError("Cannot use null or undefined");return c},qa={exports:{}},$a=function(){var c=Object.assign,d;return typeof c!="function"?!1:(d={foo:"raz"},c(d,{bar:"dwa"},{trzy:"trzy"}),d.foo+d.bar+d.trzy==="razdwatrzy")},gr,au;function Na(){return au||(au=1,gr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),gr}var pr,su;function Ga(){if(su)return pr;su=1;var c=Oe,d=Object.keys;return pr=function(f){return d(c(f)?Object(f):f)},pr}var _r,lu;function Ha(){return lu||(lu=1,_r=Na()()?Object.keys:Ga()),_r}var vr,cu;function za(){if(cu)return vr;cu=1;var c=Ha(),d=ou,f=Math.max;return vr=function(T,C){var O,R,j=f(arguments.length,2),Y;for(T=Object(d(T)),Y=function(H){try{T[H]=C[H]}catch(D){O||(O=D)}},R=1;R-1},wr}var as=fs()?String.prototype.contains:os(),dt=_u,du=us,wu=hu,mu=Ta,Ze=as,ss=pu.exports=function(c,d){var f,T,C,O,R;return arguments.length<2||typeof c!="string"?(O=d,d=c,c=null):O=arguments[2],dt(c)?(f=Ze.call(c,"c"),T=Ze.call(c,"e"),C=Ze.call(c,"w")):(f=C=!0,T=!1),R={value:d,configurable:f,enumerable:T,writable:C},O?wu(mu(O),R):R};ss.gs=function(c,d,f){var T,C,O,R;return typeof c!="string"?(O=f,f=d,d=c,c=null):O=arguments[3],dt(d)?du(d)?dt(f)?du(f)||(O=f,f=void 0):f=void 0:(O=d,d=f=void 0):d=void 0,dt(c)?(T=Ze.call(c,"c"),C=Ze.call(c,"e")):(T=!0,C=!1),R={get:d,set:f,configurable:T,enumerable:C},O?wu(mu(O),R):R};var Ye=pu.exports,mr={exports:{}};(function(c,d){var f=Ye,T=fu,C=Function.prototype.apply,O=Function.prototype.call,R=Object.create,j=Object.defineProperty,Y=Object.defineProperties,H=Object.prototype.hasOwnProperty,D={configurable:!0,enumerable:!1,writable:!0},Q,q,z,an,un,P,_n;Q=function(W,A){var $;return T(A),H.call(this,"__ee__")?$=this.__ee__:($=D.value=R(null),j(this,"__ee__",D),D.value=null),$[W]?typeof $[W]=="object"?$[W].push(A):$[W]=[$[W],A]:$[W]=A,this},q=function(W,A){var $,X;return T(A),X=this,Q.call(this,W,$=function(){z.call(X,W,$),C.call(A,this,arguments)}),$.__eeOnceListener__=A,this},z=function(W,A){var $,X,V,en;if(T(A),!H.call(this,"__ee__"))return this;if($=this.__ee__,!$[W])return this;if(X=$[W],typeof X=="object")for(en=0;V=X[en];++en)(V===A||V.__eeOnceListener__===A)&&(X.length===2?$[W]=X[en?0:1]:X.splice(en,1));else(X===A||X.__eeOnceListener__===A)&&delete $[W];return this},an=function(W){var A,$,X,V,en;if(H.call(this,"__ee__")&&(V=this.__ee__[W],!!V))if(typeof V=="object"){for($=arguments.length,en=new Array($-1),A=1;A<$;++A)en[A-1]=arguments[A];for(V=V.slice(),A=0;X=V[A];++A)C.call(X,this,en)}else switch(arguments.length){case 1:O.call(V,this);break;case 2:O.call(V,this,arguments[1]);break;case 3:O.call(V,this,arguments[1],arguments[2]);break;default:for($=arguments.length,en=new Array($-1),A=1;A<$;++A)en[A-1]=arguments[A];C.call(V,this,en)}},un={on:Q,once:q,off:z,emit:an},P={on:f(Q),once:f(q),off:f(z),emit:f(an)},_n=Y({},P),c.exports=d=function(W){return W==null?R(_n):Y(Object(W),P)},d.methods=un})(mr,mr.exports);var ls=mr.exports,yr,yu;function cs(){return yu||(yu=1,yr=function(){var c=Array.from,d,f;return typeof c!="function"?!1:(d=["raz","dwa"],f=c(d),!!(f&&f!==d&&f[1]==="dwa"))}),yr}var xr,xu;function hs(){return xu||(xu=1,xr=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}),xr}var Ar,Au;function gs(){if(Au)return Ar;Au=1;var c=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};return Ar=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return c()}try{return __global__||c()}finally{delete Object.prototype.__global__}}(),Ar}var Sr,Su;function wt(){return Su||(Su=1,Sr=hs()()?globalThis:gs()),Sr}var br,bu;function ps(){if(bu)return br;bu=1;var c=wt(),d={object:!0,symbol:!0};return br=function(){var f=c.Symbol,T;if(typeof f!="function")return!1;T=f("test symbol");try{String(T)}catch{return!1}return!(!d[typeof f.iterator]||!d[typeof f.toPrimitive]||!d[typeof f.toStringTag])},br}var Ir,Iu;function _s(){return Iu||(Iu=1,Ir=function(c){return c?typeof c=="symbol"?!0:!c.constructor||c.constructor.name!=="Symbol"?!1:c[c.constructor.toStringTag]==="Symbol":!1}),Ir}var Rr,Ru;function Tu(){if(Ru)return Rr;Ru=1;var c=_s();return Rr=function(d){if(!c(d))throw new TypeError(d+" is not a symbol");return d},Rr}var Tr,Ou;function vs(){if(Ou)return Tr;Ou=1;var c=Ye,d=Object.create,f=Object.defineProperty,T=Object.prototype,C=d(null);return Tr=function(O){for(var R=0,j,Y;C[O+(R||"")];)++R;return O+=R||"",C[O]=!0,j="@@"+O,f(T,j,c.gs(null,function(H){Y||(Y=!0,f(this,j,c(H)),Y=!1)})),j},Tr}var Or,Eu;function ds(){if(Eu)return Or;Eu=1;var c=Ye,d=wt().Symbol;return Or=function(f){return Object.defineProperties(f,{hasInstance:c("",d&&d.hasInstance||f("hasInstance")),isConcatSpreadable:c("",d&&d.isConcatSpreadable||f("isConcatSpreadable")),iterator:c("",d&&d.iterator||f("iterator")),match:c("",d&&d.match||f("match")),replace:c("",d&&d.replace||f("replace")),search:c("",d&&d.search||f("search")),species:c("",d&&d.species||f("species")),split:c("",d&&d.split||f("split")),toPrimitive:c("",d&&d.toPrimitive||f("toPrimitive")),toStringTag:c("",d&&d.toStringTag||f("toStringTag")),unscopables:c("",d&&d.unscopables||f("unscopables"))})},Or}var Er,Cu;function ws(){if(Cu)return Er;Cu=1;var c=Ye,d=Tu(),f=Object.create(null);return Er=function(T){return Object.defineProperties(T,{for:c(function(C){return f[C]?f[C]:f[C]=T(String(C))}),keyFor:c(function(C){var O;d(C);for(O in f)if(f[O]===C)return O})})},Er}var Cr,Lu;function ms(){if(Lu)return Cr;Lu=1;var c=Ye,d=Tu(),f=wt().Symbol,T=vs(),C=ds(),O=ws(),R=Object.create,j=Object.defineProperties,Y=Object.defineProperty,H,D,Q;if(typeof f=="function")try{String(f()),Q=!0}catch{}else f=null;return D=function(z){if(this instanceof D)throw new TypeError("Symbol is not a constructor");return H(z)},Cr=H=function q(z){var an;if(this instanceof q)throw new TypeError("Symbol is not a constructor");return Q?f(z):(an=R(D.prototype),z=z===void 0?"":String(z),j(an,{__description__:c("",z),__name__:c("",T(z))}))},C(H),O(H),j(D.prototype,{constructor:c(H),toString:c("",function(){return this.__name__})}),j(H.prototype,{toString:c(function(){return"Symbol ("+d(this).__description__+")"}),valueOf:c(function(){return d(this)})}),Y(H.prototype,H.toPrimitive,c("",function(){var q=d(this);return typeof q=="symbol"?q:q.toString()})),Y(H.prototype,H.toStringTag,c("c","Symbol")),Y(D.prototype,H.toStringTag,c("c",H.prototype[H.toStringTag])),Y(D.prototype,H.toPrimitive,c("c",H.prototype[H.toPrimitive])),Cr}var Lr,Pu;function ys(){return Pu||(Pu=1,Lr=ps()()?wt().Symbol:ms()),Lr}var Pr,Wu;function xs(){if(Wu)return Pr;Wu=1;var c=Object.prototype.toString,d=c.call(function(){return arguments}());return Pr=function(f){return c.call(f)===d},Pr}var Wr,Fu;function As(){if(Fu)return Wr;Fu=1;var c=Object.prototype.toString,d=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);return Wr=function(f){return typeof f=="function"&&d(c.call(f))},Wr}var Fr,Mu;function Ss(){if(Mu)return Fr;Mu=1;var c=Object.prototype.toString,d=c.call("");return Fr=function(f){return typeof f=="string"||f&&typeof f=="object"&&(f instanceof String||c.call(f)===d)||!1},Fr}var Mr,Bu;function bs(){if(Bu)return Mr;Bu=1;var c=ys().iterator,d=xs(),f=As(),T=Ua,C=fu,O=ou,R=Oe,j=Ss(),Y=Array.isArray,H=Function.prototype.call,D={configurable:!0,enumerable:!0,writable:!0,value:null},Q=Object.defineProperty;return Mr=function(q){var z=arguments[1],an=arguments[2],un,P,_n,W,A,$,X,V,en,cn;if(q=Object(O(q)),R(z)&&C(z),!this||this===Array||!f(this)){if(!z){if(d(q))return A=q.length,A!==1?Array.apply(null,q):(W=new Array(1),W[0]=q[0],W);if(Y(q)){for(W=new Array(A=q.length),P=0;P=55296&&$<=56319&&(cn+=q[++P])),cn=z?H.call(z,an,cn,_n):cn,un?(D.value=cn,Q(W,_n,D)):W[_n]=cn,++_n;A=_n}}if(A===void 0)for(A=T(q.length),un&&(W=new un(A)),P=0;Pasync d=>{const f=new c,T=await d(f);if("error"in T)throw console.error(T.error),new Error(T.error);return f.terminate(),T.result},Ts=c=>d=>Rs(c)(f=>(f.postMessage(d),new Promise((T,C)=>{f.onmessage=O=>{T(O.data)},f.onerror=O=>{console.error(O),C(O)}}))),Os=c=>async d=>{try{const f=await c(d);postMessage({result:f})}catch(f){postMessage({error:f})}};var Es=""+new URL("parseTraceSlave.worker-BXEGFQQZ.js",self.location.href).href;const qu=(c="",d="")=>`${c}::::${d}`,$u=({component:c})=>c&&Object.hasOwn(c,"alpha")?Nn.get(c,"alpha")>0:!0,{min:Cs}=Math,Ls=navigator.hardwareConcurrency??8,Ps=Ts(class extends Worker{constructor(){super(Es,{type:"module"})}});async function Ws({trace:c,context:d,view:f="main"}){var Y,H;const T=Nn.ceil((((Y=c==null?void 0:c.events)==null?void 0:Y.length)??0)/Ls),C=Nn.range(0,(H=c==null?void 0:c.events)==null?void 0:H.length,T),O=Nn.flatten(await Promise.all(Nn.map(C,D=>{var Q;return Ps({trace:c,context:d,view:f,from:D,to:Cs(D+T,((Q=c==null?void 0:c.events)==null?void 0:Q.length)??0)})}))),R={},j=[];for(const{event:D,components:{transient:Q=[],special:q=[],persistent:z=[]}}of O){delete R[qu(D.id,D.type)],Q.push(...Nn.values(R).flat());for(const an of q){const un=qu(D.id,Nn.get(an.component,"clear"));R[un]=R[un]??[],R[un].push(an),Q.push(an)}j.push({transient:Q,persistent:z})}return{stepsPersistent:Nn.map(j,"persistent").map(D=>Nn.filter(D,$u)),stepsTransient:Nn.map(j,"transient").map(D=>Nn.filter(D,$u))}}onmessage=Os(async({data:c})=>await Ws(c))})(); diff --git a/assets/parseTrace.worker-DWVEnv8C.js b/assets/parseTrace.worker-DWVEnv8C.js new file mode 100644 index 0000000..686af68 --- /dev/null +++ b/assets/parseTrace.worker-DWVEnv8C.js @@ -0,0 +1,27 @@ +(function(){"use strict";var Ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */_r.exports,function(h,d){(function(){var f,P="4.17.21",q=200,Z="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",A="Expected a function",D="Invalid `variable` option passed into `_.template`",C="__lodash_hash_undefined__",W=500,T="__lodash_placeholder__",$=1,O=2,Y=4,sn=1,un=2,F=1,_n=2,M=4,S=8,H=16,Q=32,k=64,en=128,cn=256,zt=512,Ua=30,Da="...",$a=800,Na=16,nf=1,Ga=2,Ha=3,me=1/0,se=9007199254740991,za=17976931348623157e292,dr=NaN,Xn=4294967295,Ka=Xn-1,Za=Xn>>>1,Ya=[["ary",en],["bind",F],["bindKey",_n],["curry",S],["curryRight",H],["flip",zt],["partial",Q],["partialRight",k],["rearg",cn]],Ce="[object Arguments]",mr="[object Array]",Xa="[object AsyncFunction]",Ye="[object Boolean]",Xe="[object Date]",Ja="[object DOMException]",wr="[object Error]",yr="[object Function]",ef="[object GeneratorFunction]",Gn="[object Map]",Je="[object Number]",Qa="[object Null]",kn="[object Object]",rf="[object Promise]",Va="[object Proxy]",Qe="[object RegExp]",Hn="[object Set]",Ve="[object String]",xr="[object Symbol]",ka="[object Undefined]",ke="[object WeakMap]",ja="[object WeakSet]",je="[object ArrayBuffer]",Le="[object DataView]",Kt="[object Float32Array]",Zt="[object Float64Array]",Yt="[object Int8Array]",Xt="[object Int16Array]",Jt="[object Int32Array]",Qt="[object Uint8Array]",Vt="[object Uint8ClampedArray]",kt="[object Uint16Array]",jt="[object Uint32Array]",nl=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,rl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,tf=/&(?:amp|lt|gt|quot|#39);/g,uf=/[&<>"']/g,tl=RegExp(tf.source),il=RegExp(uf.source),ul=/<%-([\s\S]+?)%>/g,fl=/<%([\s\S]+?)%>/g,ff=/<%=([\s\S]+?)%>/g,ol=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,sl=/^\w*$/,al=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ni=/[\\^$.*+?()[\]{}|]/g,ll=RegExp(ni.source),ei=/^\s+/,cl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gl=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,_l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,vl=/[()=,{}\[\]\/\s]/,dl=/\\(\\)?/g,ml=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,of=/\w*$/,wl=/^[-+]0x[0-9a-f]+$/i,yl=/^0b[01]+$/i,xl=/^\[object .+?Constructor\]$/,Al=/^0o[0-7]+$/i,Sl=/^(?:0|[1-9]\d*)$/,bl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,Il=/['\n\r\u2028\u2029\\]/g,Sr="\\ud800-\\udfff",Rl="\\u0300-\\u036f",Tl="\\ufe20-\\ufe2f",Ol="\\u20d0-\\u20ff",sf=Rl+Tl+Ol,af="\\u2700-\\u27bf",lf="a-z\\xdf-\\xf6\\xf8-\\xff",El="\\xac\\xb1\\xd7\\xf7",Cl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ll="\\u2000-\\u206f",Pl=" \\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",cf="A-Z\\xc0-\\xd6\\xd8-\\xde",hf="\\ufe0e\\ufe0f",gf=El+Cl+Ll+Pl,ri="['’]",Wl="["+Sr+"]",pf="["+gf+"]",br="["+sf+"]",_f="\\d+",Fl="["+af+"]",vf="["+lf+"]",df="[^"+Sr+gf+_f+af+lf+cf+"]",ti="\\ud83c[\\udffb-\\udfff]",ql="(?:"+br+"|"+ti+")",mf="[^"+Sr+"]",ii="(?:\\ud83c[\\udde6-\\uddff]){2}",ui="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+cf+"]",wf="\\u200d",yf="(?:"+vf+"|"+df+")",Ml="(?:"+Pe+"|"+df+")",xf="(?:"+ri+"(?:d|ll|m|re|s|t|ve))?",Af="(?:"+ri+"(?:D|LL|M|RE|S|T|VE))?",Sf=ql+"?",bf="["+hf+"]?",Bl="(?:"+wf+"(?:"+[mf,ii,ui].join("|")+")"+bf+Sf+")*",Ul="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Dl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",If=bf+Sf+Bl,$l="(?:"+[Fl,ii,ui].join("|")+")"+If,Nl="(?:"+[mf+br+"?",br,ii,ui,Wl].join("|")+")",Gl=RegExp(ri,"g"),Hl=RegExp(br,"g"),fi=RegExp(ti+"(?="+ti+")|"+Nl+If,"g"),zl=RegExp([Pe+"?"+vf+"+"+xf+"(?="+[pf,Pe,"$"].join("|")+")",Ml+"+"+Af+"(?="+[pf,Pe+yf,"$"].join("|")+")",Pe+"?"+yf+"+"+xf,Pe+"+"+Af,Dl,Ul,_f,$l].join("|"),"g"),Kl=RegExp("["+wf+Sr+sf+hf+"]"),Zl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yl=["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"],Xl=-1,rn={};rn[Kt]=rn[Zt]=rn[Yt]=rn[Xt]=rn[Jt]=rn[Qt]=rn[Vt]=rn[kt]=rn[jt]=!0,rn[Ce]=rn[mr]=rn[je]=rn[Ye]=rn[Le]=rn[Xe]=rn[wr]=rn[yr]=rn[Gn]=rn[Je]=rn[kn]=rn[Qe]=rn[Hn]=rn[Ve]=rn[ke]=!1;var nn={};nn[Ce]=nn[mr]=nn[je]=nn[Le]=nn[Ye]=nn[Xe]=nn[Kt]=nn[Zt]=nn[Yt]=nn[Xt]=nn[Jt]=nn[Gn]=nn[Je]=nn[kn]=nn[Qe]=nn[Hn]=nn[Ve]=nn[xr]=nn[Qt]=nn[Vt]=nn[kt]=nn[jt]=!0,nn[wr]=nn[yr]=nn[ke]=!1;var Jl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ql={"&":"&","<":"<",">":">",'"':""","'":"'"},Vl={"&":"&","<":"<",">":">",""":'"',"'":"'"},kl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},jl=parseFloat,nc=parseInt,Rf=typeof Ze=="object"&&Ze&&Ze.Object===Object&&Ze,ec=typeof self=="object"&&self&&self.Object===Object&&self,vn=Rf||ec||Function("return this")(),oi=d&&!d.nodeType&&d,we=oi&&!0&&h&&!h.nodeType&&h,Tf=we&&we.exports===oi,si=Tf&&Rf.process,Wn=function(){try{var l=we&&we.require&&we.require("util").types;return l||si&&si.binding&&si.binding("util")}catch{}}(),Of=Wn&&Wn.isArrayBuffer,Ef=Wn&&Wn.isDate,Cf=Wn&&Wn.isMap,Lf=Wn&&Wn.isRegExp,Pf=Wn&&Wn.isSet,Wf=Wn&&Wn.isTypedArray;function Tn(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function rc(l,p,g,y){for(var E=-1,X=l==null?0:l.length;++E-1}function ai(l,p,g){for(var y=-1,E=l==null?0:l.length;++y-1;);return g}function Nf(l,p){for(var g=l.length;g--&&We(p,l[g],0)>-1;);return g}function cc(l,p){for(var g=l.length,y=0;g--;)l[g]===p&&++y;return y}var hc=gi(Jl),gc=gi(Ql);function pc(l){return"\\"+kl[l]}function _c(l,p){return l==null?f:l[p]}function Fe(l){return Kl.test(l)}function vc(l){return Zl.test(l)}function dc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function di(l){var p=-1,g=Array(l.size);return l.forEach(function(y,E){g[++p]=[E,y]}),g}function Gf(l,p){return function(g){return l(p(g))}}function ce(l,p){for(var g=-1,y=l.length,E=0,X=[];++g-1}function ih(n,e){var r=this.__data__,t=Gr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}jn.prototype.clear=nh,jn.prototype.delete=eh,jn.prototype.get=rh,jn.prototype.has=th,jn.prototype.set=ih;function ne(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Bn(n,e,r,t,i,o){var s,a=e&$,c=e&O,_=e&Y;if(r&&(s=i?r(n,t,i,o):r(n)),s!==f)return s;if(!fn(n))return n;var v=L(n);if(v){if(s=sg(n),!a)return Sn(n,s)}else{var m=wn(n),w=m==yr||m==ef;if(de(n))return Io(n,a);if(m==kn||m==Ce||w&&!i){if(s=c||w?{}:zo(n),!a)return c?Vh(n,yh(s,n)):Qh(n,no(s,n))}else{if(!nn[m])return i?n:{};s=ag(n,m,a)}}o||(o=new Kn);var x=o.get(n);if(x)return x;o.set(n,s),ws(n)?n.forEach(function(R){s.add(Bn(R,e,r,R,n,o))}):ds(n)&&n.forEach(function(R,G){s.set(G,Bn(R,e,r,G,n,o))});var I=_?c?Hi:Gi:c?In:pn,U=v?f:I(n);return Fn(U||n,function(R,G){U&&(G=R,R=n[G]),fr(s,G,Bn(R,e,r,G,n,o))}),s}function xh(n){var e=pn(n);return function(r){return eo(r,n,e)}}function eo(n,e,r){var t=r.length;if(n==null)return!t;for(n=j(n);t--;){var i=r[t],o=e[i],s=n[i];if(s===f&&!(i in n)||!o(s))return!1}return!0}function ro(n,e,r){if(typeof n!="function")throw new qn(A);return gr(function(){n.apply(f,r)},e)}function or(n,e,r,t){var i=-1,o=Ir,s=!0,a=n.length,c=[],_=e.length;if(!a)return c;r&&(e=tn(e,On(r))),t?(o=ai,s=!1):e.length>=q&&(o=nr,s=!1,e=new Ae(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:B(t),t<0&&(t+=i),t=r>t?0:xs(t);r0&&r(a)?e>1?dn(a,e-1,r,t,i):le(i,a):t||(i[i.length]=a)}return i}var bi=Lo(),uo=Lo(!0);function Jn(n,e){return n&&bi(n,e,pn)}function Ii(n,e){return n&&uo(n,e,pn)}function zr(n,e){return ae(e,function(r){return ue(n[r])})}function be(n,e){e=_e(e,n);for(var r=0,t=e.length;n!=null&&re}function bh(n,e){return n!=null&&V.call(n,e)}function Ih(n,e){return n!=null&&e in j(n)}function Rh(n,e,r){return n>=mn(e,r)&&n=120&&v.length>=120)?new Ae(s&&v):f}v=n[0];var m=-1,w=a[0];n:for(;++m-1;)a!==n&&qr.call(a,c,1),qr.call(n,c,1);return n}function vo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;ie(i)?qr.call(n,i,1):qi(n,i)}}return n}function Pi(n,e){return n+Ur(Qf()*(e-n+1))}function Dh(n,e,r,t){for(var i=-1,o=gn(Br((e-n)/(r||1)),0),s=g(o);o--;)s[t?o:++i]=n,n+=r;return s}function Wi(n,e){var r="";if(!n||e<1||e>se)return r;do e%2&&(r+=n),e=Ur(e/2),e&&(n+=n);while(e);return r}function N(n,e){return Qi(Yo(n,e,Rn),n+"")}function $h(n){return jf(Ke(n))}function Nh(n,e){var r=Ke(n);return et(r,Se(e,0,r.length))}function lr(n,e,r,t){if(!fn(n))return n;e=_e(e,n);for(var i=-1,o=e.length,s=o-1,a=n;a!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,s=n[o];s!==null&&!Cn(s)&&(r?s<=e:s=q){var _=e?null:eg(n);if(_)return Tr(_);s=!1,i=nr,c=new Ae}else c=e?[]:a;n:for(;++t=t?n:Un(n,e,r)}var bo=Pc||function(n){return vn.clearTimeout(n)};function Io(n,e){if(e)return n.slice();var r=n.length,t=Kf?Kf(r):new n.constructor(r);return n.copy(t),t}function Di(n){var e=new n.constructor(n.byteLength);return new Wr(e).set(new Wr(n)),e}function Zh(n,e){var r=e?Di(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Yh(n){var e=new n.constructor(n.source,of.exec(n));return e.lastIndex=n.lastIndex,e}function Xh(n){return ur?j(ur.call(n)):{}}function Ro(n,e){var r=e?Di(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function To(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=Cn(n),s=e!==f,a=e===null,c=e===e,_=Cn(e);if(!a&&!_&&!o&&n>e||o&&s&&c&&!a&&!_||t&&s&&c||!r&&c||!i)return 1;if(!t&&!o&&!_&&n=a)return c;var _=r[t];return c*(_=="desc"?-1:1)}}return n.index-e.index}function Oo(n,e,r,t){for(var i=-1,o=n.length,s=r.length,a=-1,c=e.length,_=gn(o-s,0),v=g(c+_),m=!t;++a1?r[i-1]:f,s=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,s&&xn(r[0],r[1],s)&&(o=i<3?f:o,i=1),e=j(e);++t-1?i[o?e[s]:s]:f}}function Fo(n){return te(function(e){var r=e.length,t=r,i=Mn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new qn(A);if(i&&!s&&jr(o)=="wrapper")var s=new Mn([],!0)}for(t=s?t:r;++t1&&K.reverse(),v&&ca))return!1;var _=o.get(n),v=o.get(e);if(_&&v)return _==e&&v==n;var m=-1,w=!0,x=r&un?new Ae:f;for(o.set(n,e),o.set(e,n);++m1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(hl,`{ +/* [wrapped with `+e+`] */ +`)}function cg(n){return L(n)||Te(n)||!!(Xf&&n&&n[Xf])}function ie(n,e){var r=typeof n;return e=e??se,!!e&&(r=="number"||r!="symbol"&&Sl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=$a)return arguments[0]}else e=0;return n.apply(f,arguments)}}function et(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,us(n,r)});function fs(n){var e=u(n);return e.__chain__=!0,e}function Ap(n,e){return e(n),n}function rt(n,e){return e(n)}var Sp=te(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return Si(o,n)};return e>1||this.__actions__.length||!(t instanceof z)||!ie(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:rt,args:[i],thisArg:f}),new Mn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function bp(){return fs(this)}function Ip(){return new Mn(this.value(),this.__chain__)}function Rp(){this.__values__===f&&(this.__values__=ys(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Tp(){return this}function Op(n){for(var e,r=this;r instanceof Nr;){var t=jo(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Ep(){var n=this.__wrapped__;if(n instanceof z){var e=n;return this.__actions__.length&&(e=new z(this)),e=e.reverse(),e.__actions__.push({func:rt,args:[Vi],thisArg:f}),new Mn(e,this.__chain__)}return this.thru(Vi)}function Cp(){return Ao(this.__wrapped__,this.__actions__)}var Lp=Xr(function(n,e,r){V.call(n,r)?++n[r]:ee(n,r,1)});function Pp(n,e,r){var t=L(n)?Ff:Ah;return r&&xn(n,e,r)&&(e=f),t(n,b(e,3))}function Wp(n,e){var r=L(n)?ae:io;return r(n,b(e,3))}var Fp=Wo(ns),qp=Wo(es);function Mp(n,e){return dn(tt(n,e),1)}function Bp(n,e){return dn(tt(n,e),me)}function Up(n,e,r){return r=r===f?1:B(r),dn(tt(n,e),r)}function os(n,e){var r=L(n)?Fn:ge;return r(n,b(e,3))}function ss(n,e){var r=L(n)?tc:to;return r(n,b(e,3))}var Dp=Xr(function(n,e,r){V.call(n,r)?n[r].push(e):ee(n,r,[e])});function $p(n,e,r,t){n=bn(n)?n:Ke(n),r=r&&!t?B(r):0;var i=n.length;return r<0&&(r=gn(i+r,0)),st(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&We(n,e,r)>-1}var Np=N(function(n,e,r){var t=-1,i=typeof e=="function",o=bn(n)?g(n.length):[];return ge(n,function(s){o[++t]=i?Tn(e,s,r):sr(s,e,r)}),o}),Gp=Xr(function(n,e,r){ee(n,r,e)});function tt(n,e){var r=L(n)?tn:lo;return r(n,b(e,3))}function Hp(n,e,r,t){return n==null?[]:(L(e)||(e=e==null?[]:[e]),r=t?f:r,L(r)||(r=r==null?[]:[r]),po(n,e,r))}var zp=Xr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Kp(n,e,r){var t=L(n)?li:Uf,i=arguments.length<3;return t(n,b(e,4),r,i,ge)}function Zp(n,e,r){var t=L(n)?ic:Uf,i=arguments.length<3;return t(n,b(e,4),r,i,to)}function Yp(n,e){var r=L(n)?ae:io;return r(n,ft(b(e,3)))}function Xp(n){var e=L(n)?jf:$h;return e(n)}function Jp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=B(e);var t=L(n)?dh:Nh;return t(n,e)}function Qp(n){var e=L(n)?mh:Hh;return e(n)}function Vp(n){if(n==null)return 0;if(bn(n))return st(n)?qe(n):n.length;var e=wn(n);return e==Gn||e==Hn?n.size:Ei(n).length}function kp(n,e,r){var t=L(n)?ci:zh;return r&&xn(n,e,r)&&(e=f),t(n,b(e,3))}var jp=N(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),po(n,dn(e,1),[])}),it=Wc||function(){return vn.Date.now()};function n_(n,e){if(typeof e!="function")throw new qn(A);return n=B(n),function(){if(--n<1)return e.apply(this,arguments)}}function as(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,re(n,en,f,f,f,f,e)}function ls(n,e){var r;if(typeof e!="function")throw new qn(A);return n=B(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var ji=N(function(n,e,r){var t=F;if(r.length){var i=ce(r,He(ji));t|=Q}return re(n,t,e,r,i)}),cs=N(function(n,e,r){var t=F|_n;if(r.length){var i=ce(r,He(cs));t|=Q}return re(e,t,n,r,i)});function hs(n,e,r){e=r?f:e;var t=re(n,S,f,f,f,f,f,e);return t.placeholder=hs.placeholder,t}function gs(n,e,r){e=r?f:e;var t=re(n,H,f,f,f,f,f,e);return t.placeholder=gs.placeholder,t}function ps(n,e,r){var t,i,o,s,a,c,_=0,v=!1,m=!1,w=!0;if(typeof n!="function")throw new qn(A);e=$n(e)||0,fn(r)&&(v=!!r.leading,m="maxWait"in r,o=m?gn($n(r.maxWait)||0,e):o,w="trailing"in r?!!r.trailing:w);function x(ln){var Yn=t,oe=i;return t=i=f,_=ln,s=n.apply(oe,Yn),s}function I(ln){return _=ln,a=gr(G,e),v?x(ln):s}function U(ln){var Yn=ln-c,oe=ln-_,Ws=e-Yn;return m?mn(Ws,o-oe):Ws}function R(ln){var Yn=ln-c,oe=ln-_;return c===f||Yn>=e||Yn<0||m&&oe>=o}function G(){var ln=it();if(R(ln))return K(ln);a=gr(G,U(ln))}function K(ln){return a=f,w&&t?x(ln):(t=i=f,s)}function Ln(){a!==f&&bo(a),_=0,t=c=i=a=f}function An(){return a===f?s:K(it())}function Pn(){var ln=it(),Yn=R(ln);if(t=arguments,i=this,c=ln,Yn){if(a===f)return I(c);if(m)return bo(a),a=gr(G,e),x(c)}return a===f&&(a=gr(G,e)),s}return Pn.cancel=Ln,Pn.flush=An,Pn}var e_=N(function(n,e){return ro(n,1,e)}),r_=N(function(n,e,r){return ro(n,$n(e)||0,r)});function t_(n){return re(n,zt)}function ut(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new qn(A);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var s=n.apply(this,t);return r.cache=o.set(i,s)||o,s};return r.cache=new(ut.Cache||ne),r}ut.Cache=ne;function ft(n){if(typeof n!="function")throw new qn(A);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function i_(n){return ls(2,n)}var u_=Kh(function(n,e){e=e.length==1&&L(e[0])?tn(e[0],On(b())):tn(dn(e,1),On(b()));var r=e.length;return N(function(t){for(var i=-1,o=mn(t.length,r);++i=e}),Te=oo(function(){return arguments}())?oo:function(n){return on(n)&&V.call(n,"callee")&&!Yf.call(n,"callee")},L=g.isArray,y_=Of?On(Of):Oh;function bn(n){return n!=null&&ot(n.length)&&!ue(n)}function an(n){return on(n)&&bn(n)}function x_(n){return n===!0||n===!1||on(n)&&yn(n)==Ye}var de=qc||cu,A_=Ef?On(Ef):Eh;function S_(n){return on(n)&&n.nodeType===1&&!pr(n)}function b_(n){if(n==null)return!0;if(bn(n)&&(L(n)||typeof n=="string"||typeof n.splice=="function"||de(n)||ze(n)||Te(n)))return!n.length;var e=wn(n);if(e==Gn||e==Hn)return!n.size;if(hr(n))return!Ei(n).length;for(var r in n)if(V.call(n,r))return!1;return!0}function I_(n,e){return ar(n,e)}function R_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?ar(n,e,f,r):!!t}function eu(n){if(!on(n))return!1;var e=yn(n);return e==wr||e==Ja||typeof n.message=="string"&&typeof n.name=="string"&&!pr(n)}function T_(n){return typeof n=="number"&&Jf(n)}function ue(n){if(!fn(n))return!1;var e=yn(n);return e==yr||e==ef||e==Xa||e==Va}function vs(n){return typeof n=="number"&&n==B(n)}function ot(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=se}function fn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function on(n){return n!=null&&typeof n=="object"}var ds=Cf?On(Cf):Lh;function O_(n,e){return n===e||Oi(n,e,Ki(e))}function E_(n,e,r){return r=typeof r=="function"?r:f,Oi(n,e,Ki(e),r)}function C_(n){return ms(n)&&n!=+n}function L_(n){if(pg(n))throw new E(Z);return so(n)}function P_(n){return n===null}function W_(n){return n==null}function ms(n){return typeof n=="number"||on(n)&&yn(n)==Je}function pr(n){if(!on(n)||yn(n)!=kn)return!1;var e=Fr(n);if(e===null)return!0;var r=V.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Cr.call(r)==Ec}var ru=Lf?On(Lf):Ph;function F_(n){return vs(n)&&n>=-se&&n<=se}var ws=Pf?On(Pf):Wh;function st(n){return typeof n=="string"||!L(n)&&on(n)&&yn(n)==Ve}function Cn(n){return typeof n=="symbol"||on(n)&&yn(n)==xr}var ze=Wf?On(Wf):Fh;function q_(n){return n===f}function M_(n){return on(n)&&wn(n)==ke}function B_(n){return on(n)&&yn(n)==ja}var U_=kr(Ci),D_=kr(function(n,e){return n<=e});function ys(n){if(!n)return[];if(bn(n))return st(n)?zn(n):Sn(n);if(er&&n[er])return dc(n[er]());var e=wn(n),r=e==Gn?di:e==Hn?Tr:Ke;return r(n)}function fe(n){if(!n)return n===0?n:0;if(n=$n(n),n===me||n===-me){var e=n<0?-1:1;return e*za}return n===n?n:0}function B(n){var e=fe(n),r=e%1;return e===e?r?e-r:e:0}function xs(n){return n?Se(B(n),0,Xn):0}function $n(n){if(typeof n=="number")return n;if(Cn(n))return dr;if(fn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=fn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Df(n);var r=yl.test(n);return r||Al.test(n)?nc(n.slice(2),r?2:8):wl.test(n)?dr:+n}function As(n){return Qn(n,In(n))}function $_(n){return n?Se(B(n),-se,se):n===0?n:0}function J(n){return n==null?"":En(n)}var N_=Ne(function(n,e){if(hr(e)||bn(e)){Qn(e,pn(e),n);return}for(var r in e)V.call(e,r)&&fr(n,r,e[r])}),Ss=Ne(function(n,e){Qn(e,In(e),n)}),at=Ne(function(n,e,r,t){Qn(e,In(e),n,t)}),G_=Ne(function(n,e,r,t){Qn(e,pn(e),n,t)}),H_=te(Si);function z_(n,e){var r=$e(n);return e==null?r:no(r,e)}var K_=N(function(n,e){n=j(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Qn(n,Hi(n),r),t&&(r=Bn(r,$|O|Y,rg));for(var i=e.length;i--;)qi(r,e[i]);return r});function av(n,e){return Is(n,ft(b(e)))}var lv=te(function(n,e){return n==null?{}:Bh(n,e)});function Is(n,e){if(n==null)return{};var r=tn(Hi(n),function(t){return[t]});return e=b(e),_o(n,r,function(t,i){return e(t,i[0])})}function cv(n,e,r){e=_e(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=Qf();return mn(n+i*(e-n+jl("1e-"+((i+"").length-1))),e)}return Pi(n,e)}var Av=Ge(function(n,e,r){return e=e.toLowerCase(),n+(r?Os(e):e)});function Os(n){return uu(J(n).toLowerCase())}function Es(n){return n=J(n),n&&n.replace(bl,hc).replace(Hl,"")}function Sv(n,e,r){n=J(n),e=En(e);var t=n.length;r=r===f?t:Se(B(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function bv(n){return n=J(n),n&&il.test(n)?n.replace(uf,gc):n}function Iv(n){return n=J(n),n&&ll.test(n)?n.replace(ni,"\\$&"):n}var Rv=Ge(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Tv=Ge(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),Ov=Po("toLowerCase");function Ev(n,e,r){n=J(n),e=B(e);var t=e?qe(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return Vr(Ur(i),r)+n+Vr(Br(i),r)}function Cv(n,e,r){n=J(n),e=B(e);var t=e?qe(n):0;return e&&t>>0,r?(n=J(n),n&&(typeof e=="string"||e!=null&&!ru(e))&&(e=En(e),!e&&Fe(n))?ve(zn(n),0,r):n.split(e,r)):[]}var Bv=Ge(function(n,e,r){return n+(r?" ":"")+uu(e)});function Uv(n,e,r){return n=J(n),r=r==null?0:Se(B(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function Dv(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=J(n),e=at({},e,t,Do);var i=at({},e.imports,t.imports,Do),o=pn(i),s=vi(i,o),a,c,_=0,v=e.interpolate||Ar,m="__p += '",w=mi((e.escape||Ar).source+"|"+v.source+"|"+(v===ff?ml:Ar).source+"|"+(e.evaluate||Ar).source+"|$","g"),x="//# sourceURL="+(V.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xl+"]")+` +`;n.replace(w,function(R,G,K,Ln,An,Pn){return K||(K=Ln),m+=n.slice(_,Pn).replace(Il,pc),G&&(a=!0,m+=`' + +__e(`+G+`) + +'`),An&&(c=!0,m+=`'; +`+An+`; +__p += '`),K&&(m+=`' + +((__t = (`+K+`)) == null ? '' : __t) + +'`),_=Pn+R.length,R}),m+=`'; +`;var I=V.call(e,"variable")&&e.variable;if(!I)m=`with (obj) { +`+m+` +} +`;else if(vl.test(I))throw new E(D);m=(c?m.replace(nl,""):m).replace(el,"$1").replace(rl,"$1;"),m="function("+(I||"obj")+`) { +`+(I?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(a?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+m+`return __p +}`;var U=Ls(function(){return X(o,x+"return "+m).apply(f,s)});if(U.source=m,eu(U))throw U;return U}function $v(n){return J(n).toLowerCase()}function Nv(n){return J(n).toUpperCase()}function Gv(n,e,r){if(n=J(n),n&&(r||e===f))return Df(n);if(!n||!(e=En(e)))return n;var t=zn(n),i=zn(e),o=$f(t,i),s=Nf(t,i)+1;return ve(t,o,s).join("")}function Hv(n,e,r){if(n=J(n),n&&(r||e===f))return n.slice(0,Hf(n)+1);if(!n||!(e=En(e)))return n;var t=zn(n),i=Nf(t,zn(e))+1;return ve(t,0,i).join("")}function zv(n,e,r){if(n=J(n),n&&(r||e===f))return n.replace(ei,"");if(!n||!(e=En(e)))return n;var t=zn(n),i=$f(t,zn(e));return ve(t,i).join("")}function Kv(n,e){var r=Ua,t=Da;if(fn(e)){var i="separator"in e?e.separator:i;r="length"in e?B(e.length):r,t="omission"in e?En(e.omission):t}n=J(n);var o=n.length;if(Fe(n)){var s=zn(n);o=s.length}if(r>=o)return n;var a=r-qe(t);if(a<1)return t;var c=s?ve(s,0,a).join(""):n.slice(0,a);if(i===f)return c+t;if(s&&(a+=c.length-a),ru(i)){if(n.slice(a).search(i)){var _,v=c;for(i.global||(i=mi(i.source,J(of.exec(i))+"g")),i.lastIndex=0;_=i.exec(v);)var m=_.index;c=c.slice(0,m===f?a:m)}}else if(n.indexOf(En(i),a)!=a){var w=c.lastIndexOf(i);w>-1&&(c=c.slice(0,w))}return c+t}function Zv(n){return n=J(n),n&&tl.test(n)?n.replace(tf,xc):n}var Yv=Ge(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),uu=Po("toUpperCase");function Cs(n,e,r){return n=J(n),e=r?f:e,e===f?vc(n)?bc(n):oc(n):n.match(e)||[]}var Ls=N(function(n,e){try{return Tn(n,f,e)}catch(r){return eu(r)?r:new E(r)}}),Xv=te(function(n,e){return Fn(e,function(r){r=Vn(r),ee(n,r,ji(n[r],n))}),n});function Jv(n){var e=n==null?0:n.length,r=b();return n=e?tn(n,function(t){if(typeof t[1]!="function")throw new qn(A);return[r(t[0]),t[1]]}):[],N(function(t){for(var i=-1;++ise)return[];var r=Xn,t=mn(n,Xn);e=b(e),n-=Xn;for(var i=_i(t,e);++r0||e<0)?new z(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=B(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},z.prototype.toArray=function(){return this.take(Xn)},Jn(z.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var s=this.__wrapped__,a=t?[1]:arguments,c=s instanceof z,_=a[0],v=c||L(s),m=function(G){var K=i.apply(u,le([G],a));return t&&w?K[0]:K};v&&r&&typeof _=="function"&&_.length!=1&&(c=v=!1);var w=this.__chain__,x=!!this.__actions__.length,I=o&&!w,U=c&&!x;if(!o&&v){s=U?s:new z(this);var R=n.apply(s,a);return R.__actions__.push({func:rt,args:[m],thisArg:f}),new Mn(R,w)}return I&&U?n.apply(this,a):(R=this.thru(m),I?t?R.value()[0]:R.value():R)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Or[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(L(o)?o:[],i)}return this[r](function(s){return e.apply(L(s)?s:[],i)})}}),Jn(z.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";V.call(De,t)||(De[t]=[]),De[t].push({name:e,func:r})}}),De[Jr(f,_n).name]=[{name:"wrapper",func:f}],z.prototype.clone=Zc,z.prototype.reverse=Yc,z.prototype.value=Xc,u.prototype.at=Sp,u.prototype.chain=bp,u.prototype.commit=Ip,u.prototype.next=Rp,u.prototype.plant=Op,u.prototype.reverse=Ep,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Cp,u.prototype.first=u.prototype.head,er&&(u.prototype[er]=Tp),u},Me=Ic();we?((we.exports=Me)._=Me,oi._=Me):vn._=Me}).call(Ze)}(_r,_r.exports);var Nn=_r.exports,Fs=function(){},qs=Fs(),Oe=function(h){return h!==qs&&h!==null},Ms=Oe,Bs=Array.prototype.forEach,Us=Object.create,Ds=function(h,d){var f;for(f in h)d[f]=h[f]},$s=function(h){var d=Us(null);return Bs.call(arguments,function(f){Ms(f)&&Ds(Object(f),d)}),d},Ns=function(){var h=Math.sign;return typeof h!="function"?!1:h(10)===1&&h(-20)===-1},lt,hu;function Gs(){return hu||(hu=1,lt=function(h){return h=Number(h),isNaN(h)||h===0?h:h>0?1:-1}),lt}var Hs=Ns()?Math.sign:Gs(),zs=Hs,Ks=Math.abs,Zs=Math.floor,Ys=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:zs(h)*Zs(Ks(h)))},Xs=Ys,Js=Math.max,Qs=function(h){return Js(0,Xs(h))},gu=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},Vs=Oe,pu=function(h){if(!Vs(h))throw new TypeError("Cannot use null or undefined");return h},ks={exports:{}},ct,_u;function js(){return _u||(_u=1,ct=function(){var h=Object.assign,d;return typeof h!="function"?!1:(d={foo:"raz"},h(d,{bar:"dwa"},{trzy:"trzy"}),d.foo+d.bar+d.trzy==="razdwatrzy")}),ct}var ht,vu;function na(){return vu||(vu=1,ht=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ht}var gt,du;function ea(){if(du)return gt;du=1;var h=Oe,d=Object.keys;return gt=function(f){return d(h(f)?Object(f):f)},gt}var pt,mu;function ra(){return mu||(mu=1,pt=na()()?Object.keys:ea()),pt}var _t,wu;function ta(){if(wu)return _t;wu=1;var h=ra(),d=pu,f=Math.max;return _t=function(P,q){var Z,A,D=f(arguments.length,2),C;for(P=Object(d(P)),C=function(W){try{P[W]=q[W]}catch(T){Z||(Z=T)}},A=1;A-1},bt}var It,Lu;function ga(){return Lu||(Lu=1,It=ca()()?String.prototype.contains:ha()),It}var Pu;function Ee(){if(Pu)return dt.exports;Pu=1;var h=bu(),d=la(),f=xu(),P=$s,q=ga(),Z=dt.exports=function(A,D){var C,W,T,$,O;return arguments.length<2||typeof A!="string"?($=D,D=A,A=null):$=arguments[2],h(A)?(C=q.call(A,"c"),W=q.call(A,"e"),T=q.call(A,"w")):(C=T=!0,W=!1),O={value:D,configurable:C,enumerable:W,writable:T},$?f(P($),O):O};return Z.gs=function(A,D,C){var W,T,$,O;return typeof A!="string"?($=C,C=D,D=A,A=null):$=arguments[3],h(D)?d(D)?h(C)?d(C)||($=C,C=void 0):C=void 0:($=D,D=C=void 0):D=void 0,h(A)?(W=q.call(A,"c"),T=q.call(A,"e")):(W=!0,T=!1),O={get:D,set:C,configurable:W,enumerable:T},$?f(P($),O):O},dt.exports}var Rt={exports:{}};(function(h,d){var f=Ee(),P=gu,q=Function.prototype.apply,Z=Function.prototype.call,A=Object.create,D=Object.defineProperty,C=Object.defineProperties,W=Object.prototype.hasOwnProperty,T={configurable:!0,enumerable:!1,writable:!0},$,O,Y,sn,un,F,_n;$=function(M,S){var H;return P(S),W.call(this,"__ee__")?H=this.__ee__:(H=T.value=A(null),D(this,"__ee__",T),T.value=null),H[M]?typeof H[M]=="object"?H[M].push(S):H[M]=[H[M],S]:H[M]=S,this},O=function(M,S){var H,Q;return P(S),Q=this,$.call(this,M,H=function(){Y.call(Q,M,H),q.call(S,this,arguments)}),H.__eeOnceListener__=S,this},Y=function(M,S){var H,Q,k,en;if(P(S),!W.call(this,"__ee__"))return this;if(H=this.__ee__,!H[M])return this;if(Q=H[M],typeof Q=="object")for(en=0;k=Q[en];++en)(k===S||k.__eeOnceListener__===S)&&(Q.length===2?H[M]=Q[en?0:1]:Q.splice(en,1));else(Q===S||Q.__eeOnceListener__===S)&&delete H[M];return this},sn=function(M){var S,H,Q,k,en;if(W.call(this,"__ee__")&&(k=this.__ee__[M],!!k))if(typeof k=="object"){for(H=arguments.length,en=new Array(H-1),S=1;S=55296&&H<=56319&&(cn+=O[++F])),cn=Y?W.call(Y,sn,cn,_n):cn,un?(T.value=cn,$(M,_n,T)):M[_n]=cn,++_n;S=_n}}if(S===void 0)for(S=P(O.length),un&&(M=new un(S)),F=0;Fasync d=>{const f=new h,P=await d(f);if("error"in P)throw console.error(P.error),new Error(P.error);return f.terminate(),P.result},La=h=>d=>Ca(h)(f=>(f.postMessage(d),new Promise((P,q)=>{f.onmessage=Z=>{P(Z.data)},f.onerror=Z=>{console.error(Z),q(Z)}}))),Pa=h=>async d=>{try{const f=await h(d);postMessage({result:f})}catch(f){postMessage({error:f})}};var Wa=""+new URL("parseTraceSlave.worker-_UCrsWXU.js",self.location.href).href;const ku=(h="",d="")=>`${h}::::${d}`,ju=({component:h})=>h&&Object.hasOwn(h,"alpha")?Nn.get(h,"alpha")>0:!0,{min:Fa}=Math,qa=navigator.hardwareConcurrency??8,Ma=La(class extends Worker{constructor(){super(Wa,{type:"module"})}});async function Ba({trace:h,context:d,view:f="main"}){var C,W;const P=Nn.ceil((((C=h==null?void 0:h.events)==null?void 0:C.length)??0)/qa),q=Nn.range(0,(W=h==null?void 0:h.events)==null?void 0:W.length,P),Z=Nn.flatten(await Promise.all(Nn.map(q,T=>{var $;return Ma({trace:h,context:d,view:f,from:T,to:Fa(T+P,(($=h==null?void 0:h.events)==null?void 0:$.length)??0)})}))),A={},D=[];for(const{event:T,components:{transient:$=[],special:O=[],persistent:Y=[]}}of Z){delete A[ku(T.id,T.type)],$.push(...Nn.values(A).flat());for(const sn of O){const un=ku(T.id,Nn.get(sn.component,"clear"));A[un]=A[un]??[],A[un].push(sn),$.push(sn)}D.push({transient:$,persistent:Y})}return{stepsPersistent:Nn.map(D,"persistent").map(T=>Nn.filter(T,ju)),stepsTransient:Nn.map(D,"transient").map(T=>Nn.filter(T,ju))}}onmessage=Pa(async({data:h})=>await Ba(h))})(); diff --git a/assets/parseTrace.worker-y8dm9SDW.js b/assets/parseTrace.worker-y8dm9SDW.js deleted file mode 100644 index 2974926..0000000 --- a/assets/parseTrace.worker-y8dm9SDW.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var Ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */_r.exports,function(h,d){(function(){var f,C="4.17.21",L=200,P="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",y="Expected a function",A="Invalid `variable` option passed into `_.template`",S="__lodash_hash_undefined__",R=500,N="__lodash_placeholder__",Z=1,q=2,X=4,pn=1,ln=2,M=1,_n=2,B=4,I=8,H=16,Q=32,k=64,en=128,sn=256,Yt=512,Gs=30,Hs="...",zs=800,Ks=16,rf=1,Zs=2,Ys=3,de=1/0,oe=9007199254740991,Xs=17976931348623157e292,wr=NaN,Yn=4294967295,Js=Yn-1,Qs=Yn>>>1,Vs=[["ary",en],["bind",M],["bindKey",_n],["curry",I],["curryRight",H],["flip",Yt],["partial",Q],["partialRight",k],["rearg",sn]],Ce="[object Arguments]",mr="[object Array]",ks="[object AsyncFunction]",Ye="[object Boolean]",Xe="[object Date]",js="[object DOMException]",yr="[object Error]",xr="[object Function]",tf="[object GeneratorFunction]",Nn="[object Map]",Je="[object Number]",nl="[object Null]",Vn="[object Object]",uf="[object Promise]",el="[object Proxy]",Qe="[object RegExp]",Gn="[object Set]",Ve="[object String]",br="[object Symbol]",rl="[object Undefined]",ke="[object WeakMap]",tl="[object WeakSet]",je="[object ArrayBuffer]",Le="[object DataView]",Xt="[object Float32Array]",Jt="[object Float64Array]",Qt="[object Int8Array]",Vt="[object Int16Array]",kt="[object Int32Array]",jt="[object Uint8Array]",ni="[object Uint8ClampedArray]",ei="[object Uint16Array]",ri="[object Uint32Array]",il=/\b__p \+= '';/g,ul=/\b(__p \+=) '' \+/g,fl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ff=/&(?:amp|lt|gt|quot|#39);/g,of=/[&<>"']/g,ol=RegExp(ff.source),al=RegExp(of.source),sl=/<%-([\s\S]+?)%>/g,ll=/<%([\s\S]+?)%>/g,af=/<%=([\s\S]+?)%>/g,cl=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,hl=/^\w*$/,gl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ti=/[\\^$.*+?()[\]{}|]/g,pl=RegExp(ti.source),ii=/^\s+/,_l=/\s/,vl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,dl=/\{\n\/\* \[wrapped with (.+)\] \*/,wl=/,? & /,ml=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,yl=/[()=,{}\[\]\/\s]/,xl=/\\(\\)?/g,bl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,sf=/\w*$/,Al=/^[-+]0x[0-9a-f]+$/i,Sl=/^0b[01]+$/i,Il=/^\[object .+?Constructor\]$/,Rl=/^0o[0-7]+$/i,Ol=/^(?:0|[1-9]\d*)$/,Tl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,El=/['\n\r\u2028\u2029\\]/g,Sr="\\ud800-\\udfff",Cl="\\u0300-\\u036f",Ll="\\ufe20-\\ufe2f",Pl="\\u20d0-\\u20ff",lf=Cl+Ll+Pl,cf="\\u2700-\\u27bf",hf="a-z\\xdf-\\xf6\\xf8-\\xff",Wl="\\xac\\xb1\\xd7\\xf7",Fl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ql="\\u2000-\\u206f",Ml=" \\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",gf="A-Z\\xc0-\\xd6\\xd8-\\xde",pf="\\ufe0e\\ufe0f",_f=Wl+Fl+ql+Ml,ui="['’]",Bl="["+Sr+"]",vf="["+_f+"]",Ir="["+lf+"]",df="\\d+",Ul="["+cf+"]",wf="["+hf+"]",mf="[^"+Sr+_f+df+cf+hf+gf+"]",fi="\\ud83c[\\udffb-\\udfff]",Dl="(?:"+Ir+"|"+fi+")",yf="[^"+Sr+"]",oi="(?:\\ud83c[\\udde6-\\uddff]){2}",ai="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+gf+"]",xf="\\u200d",bf="(?:"+wf+"|"+mf+")",$l="(?:"+Pe+"|"+mf+")",Af="(?:"+ui+"(?:d|ll|m|re|s|t|ve))?",Sf="(?:"+ui+"(?:D|LL|M|RE|S|T|VE))?",If=Dl+"?",Rf="["+pf+"]?",Nl="(?:"+xf+"(?:"+[yf,oi,ai].join("|")+")"+Rf+If+")*",Gl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Hl="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Of=Rf+If+Nl,zl="(?:"+[Ul,oi,ai].join("|")+")"+Of,Kl="(?:"+[yf+Ir+"?",Ir,oi,ai,Bl].join("|")+")",Zl=RegExp(ui,"g"),Yl=RegExp(Ir,"g"),si=RegExp(fi+"(?="+fi+")|"+Kl+Of,"g"),Xl=RegExp([Pe+"?"+wf+"+"+Af+"(?="+[vf,Pe,"$"].join("|")+")",$l+"+"+Sf+"(?="+[vf,Pe+bf,"$"].join("|")+")",Pe+"?"+bf+"+"+Af,Pe+"+"+Sf,Hl,Gl,df,zl].join("|"),"g"),Jl=RegExp("["+xf+Sr+lf+pf+"]"),Ql=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Vl=["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"],kl=-1,rn={};rn[Xt]=rn[Jt]=rn[Qt]=rn[Vt]=rn[kt]=rn[jt]=rn[ni]=rn[ei]=rn[ri]=!0,rn[Ce]=rn[mr]=rn[je]=rn[Ye]=rn[Le]=rn[Xe]=rn[yr]=rn[xr]=rn[Nn]=rn[Je]=rn[Vn]=rn[Qe]=rn[Gn]=rn[Ve]=rn[ke]=!1;var nn={};nn[Ce]=nn[mr]=nn[je]=nn[Le]=nn[Ye]=nn[Xe]=nn[Xt]=nn[Jt]=nn[Qt]=nn[Vt]=nn[kt]=nn[Nn]=nn[Je]=nn[Vn]=nn[Qe]=nn[Gn]=nn[Ve]=nn[br]=nn[jt]=nn[ni]=nn[ei]=nn[ri]=!0,nn[yr]=nn[xr]=nn[ke]=!1;var jl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},nc={"&":"&","<":"<",">":">",'"':""","'":"'"},ec={"&":"&","<":"<",">":">",""":'"',"'":"'"},rc={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},tc=parseFloat,ic=parseInt,Tf=typeof Ze=="object"&&Ze&&Ze.Object===Object&&Ze,uc=typeof self=="object"&&self&&self.Object===Object&&self,vn=Tf||uc||Function("return this")(),li=d&&!d.nodeType&&d,we=li&&!0&&h&&!h.nodeType&&h,Ef=we&&we.exports===li,ci=Ef&&Tf.process,Wn=function(){try{var l=we&&we.require&&we.require("util").types;return l||ci&&ci.binding&&ci.binding("util")}catch{}}(),Cf=Wn&&Wn.isArrayBuffer,Lf=Wn&&Wn.isDate,Pf=Wn&&Wn.isMap,Wf=Wn&&Wn.isRegExp,Ff=Wn&&Wn.isSet,qf=Wn&&Wn.isTypedArray;function On(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function fc(l,p,g,x){for(var W=-1,Y=l==null?0:l.length;++W-1}function hi(l,p,g){for(var x=-1,W=l==null?0:l.length;++x-1;);return g}function Hf(l,p){for(var g=l.length;g--&&We(p,l[g],0)>-1;);return g}function _c(l,p){for(var g=l.length,x=0;g--;)l[g]===p&&++x;return x}var vc=vi(jl),dc=vi(nc);function wc(l){return"\\"+rc[l]}function mc(l,p){return l==null?f:l[p]}function Fe(l){return Jl.test(l)}function yc(l){return Ql.test(l)}function xc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function yi(l){var p=-1,g=Array(l.size);return l.forEach(function(x,W){g[++p]=[W,x]}),g}function zf(l,p){return function(g){return l(p(g))}}function le(l,p){for(var g=-1,x=l.length,W=0,Y=[];++g-1}function ah(n,e){var r=this.__data__,t=Hr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}kn.prototype.clear=ih,kn.prototype.delete=uh,kn.prototype.get=fh,kn.prototype.has=oh,kn.prototype.set=ah;function jn(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Bn(n,e,r,t,i,o){var a,s=e&Z,c=e&q,_=e&X;if(r&&(a=i?r(n,t,i,o):r(n)),a!==f)return a;if(!un(n))return n;var v=F(n);if(v){if(a=hg(n),!s)return An(n,a)}else{var w=mn(n),m=w==xr||w==tf;if(ve(n))return Oo(n,s);if(w==Vn||w==Ce||m&&!i){if(a=c||m?{}:Zo(n),!s)return c?eg(n,Sh(a,n)):ng(n,ro(a,n))}else{if(!nn[w])return i?n:{};a=gg(n,w,s)}}o||(o=new zn);var b=o.get(n);if(b)return b;o.set(n,a),xa(n)?n.forEach(function(E){a.add(Bn(E,e,r,E,n,o))}):ma(n)&&n.forEach(function(E,G){a.set(G,Bn(E,e,r,G,n,o))});var T=_?c?Zi:Ki:c?In:gn,D=v?f:T(n);return Fn(D||n,function(E,G){D&&(G=E,E=n[G]),fr(a,G,Bn(E,e,r,G,n,o))}),a}function Ih(n){var e=gn(n);return function(r){return to(r,n,e)}}function to(n,e,r){var t=r.length;if(n==null)return!t;for(n=j(n);t--;){var i=r[t],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function io(n,e,r){if(typeof n!="function")throw new qn(y);return gr(function(){n.apply(f,r)},e)}function or(n,e,r,t){var i=-1,o=Rr,a=!0,s=n.length,c=[],_=e.length;if(!s)return c;r&&(e=tn(e,Tn(r))),t?(o=hi,a=!1):e.length>=L&&(o=nr,a=!1,e=new xe(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:U(t),t<0&&(t+=i),t=r>t?0:Aa(t);r0&&r(s)?e>1?dn(s,e-1,r,t,i):se(i,s):t||(i[i.length]=s)}return i}var Oi=Wo(),oo=Wo(!0);function Xn(n,e){return n&&Oi(n,e,gn)}function Ti(n,e){return n&&oo(n,e,gn)}function Kr(n,e){return ae(e,function(r){return ie(n[r])})}function Ae(n,e){e=pe(e,n);for(var r=0,t=e.length;n!=null&&re}function Th(n,e){return n!=null&&V.call(n,e)}function Eh(n,e){return n!=null&&e in j(n)}function Ch(n,e,r){return n>=wn(e,r)&&n=120&&v.length>=120)?new xe(a&&v):f}v=n[0];var w=-1,m=s[0];n:for(;++w-1;)s!==n&&Mr.call(s,c,1),Mr.call(n,c,1);return n}function mo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;te(i)?Mr.call(n,i,1):Ui(n,i)}}return n}function qi(n,e){return n+Dr(kf()*(e-n+1))}function Hh(n,e,r,t){for(var i=-1,o=hn(Ur((e-n)/(r||1)),0),a=g(o);o--;)a[t?o:++i]=n,n+=r;return a}function Mi(n,e){var r="";if(!n||e<1||e>oe)return r;do e%2&&(r+=n),e=Dr(e/2),e&&(n+=n);while(e);return r}function $(n,e){return ji(Jo(n,e,Rn),n+"")}function zh(n){return eo(Ke(n))}function Kh(n,e){var r=Ke(n);return rt(r,be(e,0,r.length))}function lr(n,e,r,t){if(!un(n))return n;e=pe(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,a=n[o];a!==null&&!Cn(a)&&(r?a<=e:a=L){var _=e?null:ug(n);if(_)return Tr(_);a=!1,i=nr,c=new xe}else c=e?[]:s;n:for(;++t=t?n:Un(n,e,r)}var Ro=Mc||function(n){return vn.clearTimeout(n)};function Oo(n,e){if(e)return n.slice();var r=n.length,t=Yf?Yf(r):new n.constructor(r);return n.copy(t),t}function Gi(n){var e=new n.constructor(n.byteLength);return new Fr(e).set(new Fr(n)),e}function Qh(n,e){var r=e?Gi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Vh(n){var e=new n.constructor(n.source,sf.exec(n));return e.lastIndex=n.lastIndex,e}function kh(n){return ur?j(ur.call(n)):{}}function To(n,e){var r=e?Gi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Eo(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=Cn(n),a=e!==f,s=e===null,c=e===e,_=Cn(e);if(!s&&!_&&!o&&n>e||o&&a&&c&&!s&&!_||t&&a&&c||!r&&c||!i)return 1;if(!t&&!o&&!_&&n=s)return c;var _=r[t];return c*(_=="desc"?-1:1)}}return n.index-e.index}function Co(n,e,r,t){for(var i=-1,o=n.length,a=r.length,s=-1,c=e.length,_=hn(o-a,0),v=g(c+_),w=!t;++s1?r[i-1]:f,a=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(r[0],r[1],a)&&(o=i<3?f:o,i=1),e=j(e);++t-1?i[o?e[a]:a]:f}}function Mo(n){return re(function(e){var r=e.length,t=r,i=Mn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new qn(y);if(i&&!a&&nt(o)=="wrapper")var a=new Mn([],!0)}for(t=a?t:r;++t1&&K.reverse(),v&&cs))return!1;var _=o.get(n),v=o.get(e);if(_&&v)return _==e&&v==n;var w=-1,m=!0,b=r&ln?new xe:f;for(o.set(n,e),o.set(e,n);++w1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(vl,`{ -/* [wrapped with `+e+`] */ -`)}function _g(n){return F(n)||Re(n)||!!(Qf&&n&&n[Qf])}function te(n,e){var r=typeof n;return e=e??oe,!!e&&(r=="number"||r!="symbol"&&Ol.test(n))&&n>-1&&n%1==0&&n0){if(++e>=zs)return arguments[0]}else e=0;return n.apply(f,arguments)}}function rt(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,oa(n,r)});function aa(n){var e=u(n);return e.__chain__=!0,e}function Rp(n,e){return e(n),n}function tt(n,e){return e(n)}var Op=re(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return Ri(o,n)};return e>1||this.__actions__.length||!(t instanceof z)||!te(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:tt,args:[i],thisArg:f}),new Mn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function Tp(){return aa(this)}function Ep(){return new Mn(this.value(),this.__chain__)}function Cp(){this.__values__===f&&(this.__values__=ba(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Lp(){return this}function Pp(n){for(var e,r=this;r instanceof Gr;){var t=ea(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Wp(){var n=this.__wrapped__;if(n instanceof z){var e=n;return this.__actions__.length&&(e=new z(this)),e=e.reverse(),e.__actions__.push({func:tt,args:[nu],thisArg:f}),new Mn(e,this.__chain__)}return this.thru(nu)}function Fp(){return So(this.__wrapped__,this.__actions__)}var qp=Jr(function(n,e,r){V.call(n,r)?++n[r]:ne(n,r,1)});function Mp(n,e,r){var t=F(n)?Mf:Rh;return r&&xn(n,e,r)&&(e=f),t(n,O(e,3))}function Bp(n,e){var r=F(n)?ae:fo;return r(n,O(e,3))}var Up=qo(ra),Dp=qo(ta);function $p(n,e){return dn(it(n,e),1)}function Np(n,e){return dn(it(n,e),de)}function Gp(n,e,r){return r=r===f?1:U(r),dn(it(n,e),r)}function sa(n,e){var r=F(n)?Fn:he;return r(n,O(e,3))}function la(n,e){var r=F(n)?oc:uo;return r(n,O(e,3))}var Hp=Jr(function(n,e,r){V.call(n,r)?n[r].push(e):ne(n,r,[e])});function zp(n,e,r,t){n=Sn(n)?n:Ke(n),r=r&&!t?U(r):0;var i=n.length;return r<0&&(r=hn(i+r,0)),st(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&We(n,e,r)>-1}var Kp=$(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?g(n.length):[];return he(n,function(a){o[++t]=i?On(e,a,r):ar(a,e,r)}),o}),Zp=Jr(function(n,e,r){ne(n,r,e)});function it(n,e){var r=F(n)?tn:ho;return r(n,O(e,3))}function Yp(n,e,r,t){return n==null?[]:(F(e)||(e=e==null?[]:[e]),r=t?f:r,F(r)||(r=r==null?[]:[r]),vo(n,e,r))}var Xp=Jr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Jp(n,e,r){var t=F(n)?gi:$f,i=arguments.length<3;return t(n,O(e,4),r,i,he)}function Qp(n,e,r){var t=F(n)?ac:$f,i=arguments.length<3;return t(n,O(e,4),r,i,uo)}function Vp(n,e){var r=F(n)?ae:fo;return r(n,ot(O(e,3)))}function kp(n){var e=F(n)?eo:zh;return e(n)}function jp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=U(e);var t=F(n)?xh:Kh;return t(n,e)}function n_(n){var e=F(n)?bh:Yh;return e(n)}function e_(n){if(n==null)return 0;if(Sn(n))return st(n)?qe(n):n.length;var e=mn(n);return e==Nn||e==Gn?n.size:Pi(n).length}function r_(n,e,r){var t=F(n)?pi:Xh;return r&&xn(n,e,r)&&(e=f),t(n,O(e,3))}var t_=$(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),vo(n,dn(e,1),[])}),ut=Bc||function(){return vn.Date.now()};function i_(n,e){if(typeof e!="function")throw new qn(y);return n=U(n),function(){if(--n<1)return e.apply(this,arguments)}}function ca(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,ee(n,en,f,f,f,f,e)}function ha(n,e){var r;if(typeof e!="function")throw new qn(y);return n=U(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var ru=$(function(n,e,r){var t=M;if(r.length){var i=le(r,He(ru));t|=Q}return ee(n,t,e,r,i)}),ga=$(function(n,e,r){var t=M|_n;if(r.length){var i=le(r,He(ga));t|=Q}return ee(e,t,n,r,i)});function pa(n,e,r){e=r?f:e;var t=ee(n,I,f,f,f,f,f,e);return t.placeholder=pa.placeholder,t}function _a(n,e,r){e=r?f:e;var t=ee(n,H,f,f,f,f,f,e);return t.placeholder=_a.placeholder,t}function va(n,e,r){var t,i,o,a,s,c,_=0,v=!1,w=!1,m=!0;if(typeof n!="function")throw new qn(y);e=$n(e)||0,un(r)&&(v=!!r.leading,w="maxWait"in r,o=w?hn($n(r.maxWait)||0,e):o,m="trailing"in r?!!r.trailing:m);function b(an){var Zn=t,fe=i;return t=i=f,_=an,a=n.apply(fe,Zn),a}function T(an){return _=an,s=gr(G,e),v?b(an):a}function D(an){var Zn=an-c,fe=an-_,qa=e-Zn;return w?wn(qa,o-fe):qa}function E(an){var Zn=an-c,fe=an-_;return c===f||Zn>=e||Zn<0||w&&fe>=o}function G(){var an=ut();if(E(an))return K(an);s=gr(G,D(an))}function K(an){return s=f,m&&t?b(an):(t=i=f,a)}function Ln(){s!==f&&Ro(s),_=0,t=c=i=s=f}function bn(){return s===f?a:K(ut())}function Pn(){var an=ut(),Zn=E(an);if(t=arguments,i=this,c=an,Zn){if(s===f)return T(c);if(w)return Ro(s),s=gr(G,e),b(c)}return s===f&&(s=gr(G,e)),a}return Pn.cancel=Ln,Pn.flush=bn,Pn}var u_=$(function(n,e){return io(n,1,e)}),f_=$(function(n,e,r){return io(n,$n(e)||0,r)});function o_(n){return ee(n,Yt)}function ft(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new qn(y);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=n.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(ft.Cache||jn),r}ft.Cache=jn;function ot(n){if(typeof n!="function")throw new qn(y);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function a_(n){return ha(2,n)}var s_=Jh(function(n,e){e=e.length==1&&F(e[0])?tn(e[0],Tn(O())):tn(dn(e,1),Tn(O()));var r=e.length;return $(function(t){for(var i=-1,o=wn(t.length,r);++i=e}),Re=so(function(){return arguments}())?so:function(n){return fn(n)&&V.call(n,"callee")&&!Jf.call(n,"callee")},F=g.isArray,S_=Cf?Tn(Cf):Ph;function Sn(n){return n!=null&&at(n.length)&&!ie(n)}function on(n){return fn(n)&&Sn(n)}function I_(n){return n===!0||n===!1||fn(n)&&yn(n)==Ye}var ve=Dc||pu,R_=Lf?Tn(Lf):Wh;function O_(n){return fn(n)&&n.nodeType===1&&!pr(n)}function T_(n){if(n==null)return!0;if(Sn(n)&&(F(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||ze(n)||Re(n)))return!n.length;var e=mn(n);if(e==Nn||e==Gn)return!n.size;if(hr(n))return!Pi(n).length;for(var r in n)if(V.call(n,r))return!1;return!0}function E_(n,e){return sr(n,e)}function C_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?sr(n,e,f,r):!!t}function iu(n){if(!fn(n))return!1;var e=yn(n);return e==yr||e==js||typeof n.message=="string"&&typeof n.name=="string"&&!pr(n)}function L_(n){return typeof n=="number"&&Vf(n)}function ie(n){if(!un(n))return!1;var e=yn(n);return e==xr||e==tf||e==ks||e==el}function wa(n){return typeof n=="number"&&n==U(n)}function at(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=oe}function un(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function fn(n){return n!=null&&typeof n=="object"}var ma=Pf?Tn(Pf):qh;function P_(n,e){return n===e||Li(n,e,Xi(e))}function W_(n,e,r){return r=typeof r=="function"?r:f,Li(n,e,Xi(e),r)}function F_(n){return ya(n)&&n!=+n}function q_(n){if(wg(n))throw new W(P);return lo(n)}function M_(n){return n===null}function B_(n){return n==null}function ya(n){return typeof n=="number"||fn(n)&&yn(n)==Je}function pr(n){if(!fn(n)||yn(n)!=Vn)return!1;var e=qr(n);if(e===null)return!0;var r=V.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Lr.call(r)==Wc}var uu=Wf?Tn(Wf):Mh;function U_(n){return wa(n)&&n>=-oe&&n<=oe}var xa=Ff?Tn(Ff):Bh;function st(n){return typeof n=="string"||!F(n)&&fn(n)&&yn(n)==Ve}function Cn(n){return typeof n=="symbol"||fn(n)&&yn(n)==br}var ze=qf?Tn(qf):Uh;function D_(n){return n===f}function $_(n){return fn(n)&&mn(n)==ke}function N_(n){return fn(n)&&yn(n)==tl}var G_=jr(Wi),H_=jr(function(n,e){return n<=e});function ba(n){if(!n)return[];if(Sn(n))return st(n)?Hn(n):An(n);if(er&&n[er])return xc(n[er]());var e=mn(n),r=e==Nn?yi:e==Gn?Tr:Ke;return r(n)}function ue(n){if(!n)return n===0?n:0;if(n=$n(n),n===de||n===-de){var e=n<0?-1:1;return e*Xs}return n===n?n:0}function U(n){var e=ue(n),r=e%1;return e===e?r?e-r:e:0}function Aa(n){return n?be(U(n),0,Yn):0}function $n(n){if(typeof n=="number")return n;if(Cn(n))return wr;if(un(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=un(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Nf(n);var r=Sl.test(n);return r||Rl.test(n)?ic(n.slice(2),r?2:8):Al.test(n)?wr:+n}function Sa(n){return Jn(n,In(n))}function z_(n){return n?be(U(n),-oe,oe):n===0?n:0}function J(n){return n==null?"":En(n)}var K_=Ne(function(n,e){if(hr(e)||Sn(e)){Jn(e,gn(e),n);return}for(var r in e)V.call(e,r)&&fr(n,r,e[r])}),Ia=Ne(function(n,e){Jn(e,In(e),n)}),lt=Ne(function(n,e,r,t){Jn(e,In(e),n,t)}),Z_=Ne(function(n,e,r,t){Jn(e,gn(e),n,t)}),Y_=re(Ri);function X_(n,e){var r=$e(n);return e==null?r:ro(r,e)}var J_=$(function(n,e){n=j(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Jn(n,Zi(n),r),t&&(r=Bn(r,Z|q|X,fg));for(var i=e.length;i--;)Ui(r,e[i]);return r});function gv(n,e){return Oa(n,ot(O(e)))}var pv=re(function(n,e){return n==null?{}:Nh(n,e)});function Oa(n,e){if(n==null)return{};var r=tn(Zi(n),function(t){return[t]});return e=O(e),wo(n,r,function(t,i){return e(t,i[0])})}function _v(n,e,r){e=pe(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=kf();return wn(n+i*(e-n+tc("1e-"+((i+"").length-1))),e)}return qi(n,e)}var Rv=Ge(function(n,e,r){return e=e.toLowerCase(),n+(r?Ca(e):e)});function Ca(n){return au(J(n).toLowerCase())}function La(n){return n=J(n),n&&n.replace(Tl,vc).replace(Yl,"")}function Ov(n,e,r){n=J(n),e=En(e);var t=n.length;r=r===f?t:be(U(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function Tv(n){return n=J(n),n&&al.test(n)?n.replace(of,dc):n}function Ev(n){return n=J(n),n&&pl.test(n)?n.replace(ti,"\\$&"):n}var Cv=Ge(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Lv=Ge(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),Pv=Fo("toLowerCase");function Wv(n,e,r){n=J(n),e=U(e);var t=e?qe(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return kr(Dr(i),r)+n+kr(Ur(i),r)}function Fv(n,e,r){n=J(n),e=U(e);var t=e?qe(n):0;return e&&t>>0,r?(n=J(n),n&&(typeof e=="string"||e!=null&&!uu(e))&&(e=En(e),!e&&Fe(n))?_e(Hn(n),0,r):n.split(e,r)):[]}var Nv=Ge(function(n,e,r){return n+(r?" ":"")+au(e)});function Gv(n,e,r){return n=J(n),r=r==null?0:be(U(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function Hv(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=J(n),e=lt({},e,t,No);var i=lt({},e.imports,t.imports,No),o=gn(i),a=mi(i,o),s,c,_=0,v=e.interpolate||Ar,w="__p += '",m=xi((e.escape||Ar).source+"|"+v.source+"|"+(v===af?bl:Ar).source+"|"+(e.evaluate||Ar).source+"|$","g"),b="//# sourceURL="+(V.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++kl+"]")+` -`;n.replace(m,function(E,G,K,Ln,bn,Pn){return K||(K=Ln),w+=n.slice(_,Pn).replace(El,wc),G&&(s=!0,w+=`' + -__e(`+G+`) + -'`),bn&&(c=!0,w+=`'; -`+bn+`; -__p += '`),K&&(w+=`' + -((__t = (`+K+`)) == null ? '' : __t) + -'`),_=Pn+E.length,E}),w+=`'; -`;var T=V.call(e,"variable")&&e.variable;if(!T)w=`with (obj) { -`+w+` -} -`;else if(yl.test(T))throw new W(A);w=(c?w.replace(il,""):w).replace(ul,"$1").replace(fl,"$1;"),w="function("+(T||"obj")+`) { -`+(T?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+w+`return __p -}`;var D=Wa(function(){return Y(o,b+"return "+w).apply(f,a)});if(D.source=w,iu(D))throw D;return D}function zv(n){return J(n).toLowerCase()}function Kv(n){return J(n).toUpperCase()}function Zv(n,e,r){if(n=J(n),n&&(r||e===f))return Nf(n);if(!n||!(e=En(e)))return n;var t=Hn(n),i=Hn(e),o=Gf(t,i),a=Hf(t,i)+1;return _e(t,o,a).join("")}function Yv(n,e,r){if(n=J(n),n&&(r||e===f))return n.slice(0,Kf(n)+1);if(!n||!(e=En(e)))return n;var t=Hn(n),i=Hf(t,Hn(e))+1;return _e(t,0,i).join("")}function Xv(n,e,r){if(n=J(n),n&&(r||e===f))return n.replace(ii,"");if(!n||!(e=En(e)))return n;var t=Hn(n),i=Gf(t,Hn(e));return _e(t,i).join("")}function Jv(n,e){var r=Gs,t=Hs;if(un(e)){var i="separator"in e?e.separator:i;r="length"in e?U(e.length):r,t="omission"in e?En(e.omission):t}n=J(n);var o=n.length;if(Fe(n)){var a=Hn(n);o=a.length}if(r>=o)return n;var s=r-qe(t);if(s<1)return t;var c=a?_e(a,0,s).join(""):n.slice(0,s);if(i===f)return c+t;if(a&&(s+=c.length-s),uu(i)){if(n.slice(s).search(i)){var _,v=c;for(i.global||(i=xi(i.source,J(sf.exec(i))+"g")),i.lastIndex=0;_=i.exec(v);)var w=_.index;c=c.slice(0,w===f?s:w)}}else if(n.indexOf(En(i),s)!=s){var m=c.lastIndexOf(i);m>-1&&(c=c.slice(0,m))}return c+t}function Qv(n){return n=J(n),n&&ol.test(n)?n.replace(ff,Ic):n}var Vv=Ge(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),au=Fo("toUpperCase");function Pa(n,e,r){return n=J(n),e=r?f:e,e===f?yc(n)?Tc(n):cc(n):n.match(e)||[]}var Wa=$(function(n,e){try{return On(n,f,e)}catch(r){return iu(r)?r:new W(r)}}),kv=re(function(n,e){return Fn(e,function(r){r=Qn(r),ne(n,r,ru(n[r],n))}),n});function jv(n){var e=n==null?0:n.length,r=O();return n=e?tn(n,function(t){if(typeof t[1]!="function")throw new qn(y);return[r(t[0]),t[1]]}):[],$(function(t){for(var i=-1;++ioe)return[];var r=Yn,t=wn(n,Yn);e=O(e),n-=Yn;for(var i=wi(t,e);++r0||e<0)?new z(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=U(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},z.prototype.toArray=function(){return this.take(Yn)},Xn(z.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=t?[1]:arguments,c=a instanceof z,_=s[0],v=c||F(a),w=function(G){var K=i.apply(u,se([G],s));return t&&m?K[0]:K};v&&r&&typeof _=="function"&&_.length!=1&&(c=v=!1);var m=this.__chain__,b=!!this.__actions__.length,T=o&&!m,D=c&&!b;if(!o&&v){a=D?a:new z(this);var E=n.apply(a,s);return E.__actions__.push({func:tt,args:[w],thisArg:f}),new Mn(E,m)}return T&&D?n.apply(this,s):(E=this.thru(w),T?t?E.value()[0]:E.value():E)})}),Fn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Er[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(F(o)?o:[],i)}return this[r](function(a){return e.apply(F(a)?a:[],i)})}}),Xn(z.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";V.call(De,t)||(De[t]=[]),De[t].push({name:e,func:r})}}),De[Qr(f,_n).name]=[{name:"wrapper",func:f}],z.prototype.clone=Qc,z.prototype.reverse=Vc,z.prototype.value=kc,u.prototype.at=Op,u.prototype.chain=Tp,u.prototype.commit=Ep,u.prototype.next=Cp,u.prototype.plant=Pp,u.prototype.reverse=Wp,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Fp,u.prototype.first=u.prototype.head,er&&(u.prototype[er]=Lp),u},Me=Ec();we?((we.exports=Me)._=Me,li._=Me):vn._=Me}).call(Ze)}(_r,_r.exports);var Oe=_r.exports,Ma=function(){},Ba=Ma(),Te=function(h){return h!==Ba&&h!==null},Ua=Te,Da=Array.prototype.forEach,$a=Object.create,Na=function(h,d){var f;for(f in h)d[f]=h[f]},Ga=function(h){var d=$a(null);return Da.call(arguments,function(f){Ua(f)&&Na(Object(f),d)}),d},Ha=function(){var h=Math.sign;return typeof h!="function"?!1:h(10)===1&&h(-20)===-1},ct,_u;function za(){return _u||(_u=1,ct=function(h){return h=Number(h),isNaN(h)||h===0?h:h>0?1:-1}),ct}var Ka=Ha()?Math.sign:za(),Za=Ka,Ya=Math.abs,Xa=Math.floor,Ja=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Za(h)*Xa(Ya(h)))},Qa=Ja,Va=Math.max,vu=function(h){return Va(0,Qa(h))},du=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},ka=Te,ht=function(h){if(!ka(h))throw new TypeError("Cannot use null or undefined");return h},ja={exports:{}},gt,wu;function ns(){return wu||(wu=1,gt=function(){var h=Object.assign,d;return typeof h!="function"?!1:(d={foo:"raz"},h(d,{bar:"dwa"},{trzy:"trzy"}),d.foo+d.bar+d.trzy==="razdwatrzy")}),gt}var pt,mu;function es(){return mu||(mu=1,pt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),pt}var _t,yu;function rs(){if(yu)return _t;yu=1;var h=Te,d=Object.keys;return _t=function(f){return d(h(f)?Object(f):f)},_t}var vt,xu;function ts(){return xu||(xu=1,vt=es()()?Object.keys:rs()),vt}var dt,bu;function is(){if(bu)return dt;bu=1;var h=ts(),d=ht,f=Math.max;return dt=function(C,L){var P,y,A=f(arguments.length,2),S;for(C=Object(d(C)),S=function(R){try{C[R]=L[R]}catch(N){P||(P=N)}},y=1;y-1},Ot}var Tt,qu;function vs(){return qu||(qu=1,Tt=ps()()?String.prototype.contains:_s()),Tt}var Mu;function Ee(){if(Mu)return yt.exports;Mu=1;var h=Tu(),d=gs(),f=Su(),C=Ga,L=vs(),P=yt.exports=function(y,A){var S,R,N,Z,q;return arguments.length<2||typeof y!="string"?(Z=A,A=y,y=null):Z=arguments[2],h(y)?(S=L.call(y,"c"),R=L.call(y,"e"),N=L.call(y,"w")):(S=N=!0,R=!1),q={value:A,configurable:S,enumerable:R,writable:N},Z?f(C(Z),q):q};return P.gs=function(y,A,S){var R,N,Z,q;return typeof y!="string"?(Z=S,S=A,A=y,y=null):Z=arguments[3],h(A)?d(A)?h(S)?d(S)||(Z=S,S=void 0):S=void 0:(Z=A,A=S=void 0):A=void 0,h(y)?(R=L.call(y,"c"),N=L.call(y,"e")):(R=!0,N=!1),q={get:A,set:S,configurable:R,enumerable:N},Z?f(C(Z),q):q},yt.exports}var Et={exports:{}};(function(h,d){var f=Ee(),C=du,L=Function.prototype.apply,P=Function.prototype.call,y=Object.create,A=Object.defineProperty,S=Object.defineProperties,R=Object.prototype.hasOwnProperty,N={configurable:!0,enumerable:!1,writable:!0},Z,q,X,pn,ln,M,_n;Z=function(B,I){var H;return C(I),R.call(this,"__ee__")?H=this.__ee__:(H=N.value=y(null),A(this,"__ee__",N),N.value=null),H[B]?typeof H[B]=="object"?H[B].push(I):H[B]=[H[B],I]:H[B]=I,this},q=function(B,I){var H,Q;return C(I),Q=this,Z.call(this,B,H=function(){X.call(Q,B,H),L.call(I,this,arguments)}),H.__eeOnceListener__=I,this},X=function(B,I){var H,Q,k,en;if(C(I),!R.call(this,"__ee__"))return this;if(H=this.__ee__,!H[B])return this;if(Q=H[B],typeof Q=="object")for(en=0;k=Q[en];++en)(k===I||k.__eeOnceListener__===I)&&(Q.length===2?H[B]=Q[en?0:1]:Q.splice(en,1));else(Q===I||Q.__eeOnceListener__===I)&&delete H[B];return this},pn=function(B){var I,H,Q,k,en;if(R.call(this,"__ee__")&&(k=this.__ee__[B],!!k))if(typeof k=="object"){for(H=arguments.length,en=new Array(H-1),I=1;I=55296&&H<=56319&&(sn+=q[++M])),sn=X?R.call(X,pn,sn,_n):sn,ln?(N.value=sn,Z(B,_n,N)):B[_n]=sn,++_n;I=_n}}if(I===void 0)for(I=C(q.length),ln&&(B=new ln(I)),M=0;Masync d=>{const f=new h,C=await d(f);if("error"in C)throw console.error(C.error),new Error(C.error);return f.terminate(),C.result},Fs=h=>d=>Ws(h)(f=>(f.postMessage(d),new Promise((C,L)=>{f.onmessage=P=>{C(P.data)},f.onerror=P=>{console.error(P),L(P)}}))),qs=h=>async d=>{try{const f=await h(d);postMessage({result:f})}catch(f){postMessage({error:f})}};var Ms=""+new URL("parseTraceSlave.worker-DaoiSWpC.js",self.location.href).href;const{min:Bs}=Math,Us=navigator.hardwareConcurrency??8;class Ds extends Worker{constructor(){super(Ms,{type:"module"})}}const $s=Fs(Ds);async function Ns({trace:h,context:d,view:f="main"}){var y,A;const C=Oe.ceil((((y=h==null?void 0:h.events)==null?void 0:y.length)??0)/Us),L=Oe.range(0,(A=h==null?void 0:h.events)==null?void 0:A.length,C),P=Oe.flatten(await Promise.all(Oe.map(L,S=>{var R;return $s({trace:h,context:d,view:f,from:S,to:Bs(S+C,((R=h==null?void 0:h.events)==null?void 0:R.length)??0)})})));return{stepsPersistent:Oe.flatMap(P,"stepsPersistent"),stepsTransient:Oe.flatMap(P,"stepsTransient")}}onmessage=qs(async({data:h})=>await Ns(h))})(); diff --git a/assets/parseTraceSlave.worker-BXEGFQQZ.js b/assets/parseTraceSlave.worker-BXEGFQQZ.js deleted file mode 100644 index 02b9c97..0000000 --- a/assets/parseTraceSlave.worker-BXEGFQQZ.js +++ /dev/null @@ -1,35 +0,0 @@ -(function(){"use strict";var Qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ys(f){return f&&f.__esModule&&Object.prototype.hasOwnProperty.call(f,"default")?f.default:f}var ws=function(){},xs=ws(),Me=function(f){return f!==xs&&f!==null},bs=Me,Ss=Array.prototype.forEach,As=Object.create,Os=function(f,l){var i;for(i in f)l[i]=f[i]},hf=function(f){var l=As(null);return Ss.call(arguments,function(i){bs(i)&&Os(Object(i),l)}),l},Ts=function(){var f=Math.sign;return typeof f!="function"?!1:f(10)===1&&f(-20)===-1},Dr,pf;function Is(){return pf||(pf=1,Dr=function(f){return f=Number(f),isNaN(f)||f===0?f:f>0?1:-1}),Dr}var Rs=Ts()?Math.sign:Is(),Es=Rs,Ps=Math.abs,Cs=Math.floor,Ls=function(f){return isNaN(f)?0:(f=Number(f),f===0||!isFinite(f)?f:Es(f)*Cs(Ps(f)))},qs=Ls,Ms=Math.max,Fe=function(f){return Ms(0,qs(f))},Fs=Fe,gf=function(f,l,i){var h;return isNaN(f)?(h=l,h>=0?i&&h?h-1:h:1):f===!1?!1:Fs(f)},we=function(f){if(typeof f!="function")throw new TypeError(f+" is not a function");return f},Ns=Me,Xe=function(f){if(!Ns(f))throw new TypeError("Cannot use null or undefined");return f},$s=we,Ds=Xe,Ws=Function.prototype.bind,vf=Function.prototype.call,Bs=Object.keys,Us=Object.prototype.propertyIsEnumerable,Gs=function(f,l){return function(i,h){var m,d=arguments[2],g=arguments[3];return i=Object(Ds(i)),$s(h),m=Bs(i),g&&m.sort(typeof g=="function"?Ws.call(g,i):void 0),typeof f!="function"&&(f=m[f]),vf.call(f,m,function(y,w){return Us.call(i,y)?vf.call(h,d,i[y],y,i,w):l})}},Ft=Gs("forEach"),Ne={},df={exports:{}},zs=function(){var f=Object.assign,l;return typeof f!="function"?!1:(l={foo:"raz"},f(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")},Wr,_f;function Hs(){return _f||(_f=1,Wr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Wr}var Br,mf;function Ks(){if(mf)return Br;mf=1;var f=Me,l=Object.keys;return Br=function(i){return l(f(i)?Object(i):i)},Br}var Ur,yf;function Zs(){return yf||(yf=1,Ur=Hs()()?Object.keys:Ks()),Ur}var Gr,wf;function Ys(){if(wf)return Gr;wf=1;var f=Zs(),l=Xe,i=Math.max;return Gr=function(h,m){var d,g,y=i(arguments.length,2),w;for(h=Object(l(h)),w=function(_){try{h[_]=m[_]}catch(x){d||(d=x)}},g=1;g-1},Yr}var hc=sc()?String.prototype.contains:cc(),Nt=Cf,qf=lc,Mf=xf,Ff=hf,ht=hc,pc=Pf.exports=function(f,l){var i,h,m,d,g;return arguments.length<2||typeof f!="string"?(d=l,l=f,f=null):d=arguments[2],Nt(f)?(i=ht.call(f,"c"),h=ht.call(f,"e"),m=ht.call(f,"w")):(i=m=!0,h=!1),g={value:l,configurable:i,enumerable:h,writable:m},d?Mf(Ff(d),g):g};pc.gs=function(f,l,i){var h,m,d,g;return typeof f!="string"?(d=i,i=l,l=f,f=null):d=arguments[3],Nt(l)?qf(l)?Nt(i)?qf(i)||(d=i,i=void 0):i=void 0:(d=l,l=i=void 0):l=void 0,Nt(f)?(h=ht.call(f,"c"),m=ht.call(f,"e")):(h=!0,m=!1),g={get:l,set:i,configurable:h,enumerable:m},d?Mf(Ff(d),g):g};var $e=Pf.exports,Vr={exports:{}};(function(f,l){var i=$e,h=we,m=Function.prototype.apply,d=Function.prototype.call,g=Object.create,y=Object.defineProperty,w=Object.defineProperties,_=Object.prototype.hasOwnProperty,x={configurable:!0,enumerable:!1,writable:!0},E,M,C,N,D,L,P;E=function(q,A){var R;return h(A),_.call(this,"__ee__")?R=this.__ee__:(R=x.value=g(null),y(this,"__ee__",x),x.value=null),R[q]?typeof R[q]=="object"?R[q].push(A):R[q]=[R[q],A]:R[q]=A,this},M=function(q,A){var R,W;return h(A),W=this,E.call(this,q,R=function(){C.call(W,q,R),m.call(A,this,arguments)}),R.__eeOnceListener__=A,this},C=function(q,A){var R,W,U,J;if(h(A),!_.call(this,"__ee__"))return this;if(R=this.__ee__,!R[q])return this;if(W=R[q],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?R[q]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete R[q];return this},N=function(q){var A,R,W,U,J;if(_.call(this,"__ee__")&&(U=this.__ee__[q],!!U))if(typeof U=="object"){for(R=arguments.length,J=new Array(R-1),A=1;A=55296&&R<=56319&&(rn+=M[++L])),rn=C?_.call(C,N,rn,P):rn,D?(x.value=rn,E(q,P,x)):q[P]=rn,++P;A=P}}if(A===void 0)for(A=h(M.length),D&&(q=new D(A)),L=0;L=0?x=g(x):x=l(this.length)-g(d(x)),w=x;w<_;++w)if(m.call(this,w)&&(E=this[w],f(E)))return w;return-1},wi}var bi,so;function nh(){if(so)return bi;so=1;var f=xi(),l=Object.create;return bi=function(){var i=0,h=[],m=l(null);return{get:function(d){var g=0,y=h,w,_=d.length;if(_===0)return y[_]||null;if(y=y[_]){for(;g<_-1;){if(w=f.call(y[0],d[g]),w===-1)return null;y=y[1][w],++g}return w=f.call(y[0],d[g]),w===-1?null:y[1][w]||null}return null},set:function(d){var g=0,y=h,w,_=d.length;if(_===0)y[_]=++i;else{for(y[_]||(y[_]=[[],[]]),y=y[_];g<_-1;)w=f.call(y[0],d[g]),w===-1&&(w=y[0].push(d[g])-1,y[1].push([[],[]])),y=y[1][w],++g;w=f.call(y[0],d[g]),w===-1&&(w=y[0].push(d[g])-1),y[1][w]=++i}return m[i]=d,i},delete:function(d){var g=0,y=h,w,_=m[d],x=_.length,E=[];if(x===0)delete y[x];else if(y=y[x]){for(;g"}},Li}var qi,To;function ah(){if(To)return qi;To=1;var f=oh(),l=/[\n\r\u2028\u2029]/g;return qi=function(i){var h=f(i);return h.length>100&&(h=h.slice(0,99)+"…"),h=h.replace(l,function(m){return JSON.stringify(m).slice(1,-1)}),h},qi}var Ut={exports:{}},Io;function Ro(){if(Io)return Ut.exports;Io=1,Ut.exports=f,Ut.exports.default=f;function f(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Ut.exports}var Eo;function lh(){if(Eo)return yo;Eo=1;var f=vo(),l=ih(),i=fh(),h=ah(),m=Ro(),d=Ii(),g=Object.create,y=l("then","then:finally","done","done:finally");return Ne.promise=function(w,_){var x=g(null),E=g(null),M=g(null);if(w===!0)w=null;else if(w=i(w),!y[w])throw new TypeError("'"+h(w)+"' is not valid promise mode");_.on("set",function(C,N,D){var L=!1;if(!m(D)){E[C]=D,_.emit("setasync",C,1);return}x[C]=1,M[C]=D;var P=function(W){var U=x[C];if(L)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);U&&(delete x[C],E[C]=W,_.emit("setasync",C,U))},q=function(){L=!0,x[C]&&(delete x[C],delete M[C],_.delete(C))},A=w;if(A||(A="then"),A==="then"){var R=function(){d(q)};D=D.then(function(W){d(P.bind(this,W))},R),typeof D.finally=="function"&&D.finally(R)}else if(A==="done"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");D.done(P,q)}else if(A==="done:finally"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof D.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");D.done(P),D.finally(q)}}),_.on("get",function(C,N,D){var L;if(x[C]){++x[C];return}L=M[C];var P=function(){_.emit("getasync",C,N,D)};m(L)?typeof L.done=="function"?L.done(P):L.then(function(){d(P)}):P()}),_.on("delete",function(C){if(delete M[C],x[C]){delete x[C];return}if(hasOwnProperty.call(E,C)){var N=E[C];delete E[C],_.emit("deleteasync",C,[N])}}),_.on("clear",function(){var C=E;E=g(null),x=g(null),M=g(null),_.emit("clearasync",f(C,function(N){return[N]}))})},yo}var Po={},Co;function sh(){if(Co)return Po;Co=1;var f=we,l=Ft,i=Ne,h=Function.prototype.apply;return i.dispose=function(m,d,g){var y;if(f(m),g.async&&i.async||g.promise&&i.promise){d.on("deleteasync",y=function(w,_){h.call(m,null,_)}),d.on("clearasync",function(w){l(w,function(_,x){y(x,_)})});return}d.on("delete",y=function(w,_){m(_)}),d.on("clear",function(w){l(w,function(_,x){y(x,_)})})},Po}var Lo={},Mi,qo;function ch(){return qo||(qo=1,Mi=2147483647),Mi}var Fi,Mo;function hh(){if(Mo)return Fi;Mo=1;var f=Fe,l=ch();return Fi=function(i){if(i=f(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Fi}var Fo;function ph(){if(Fo)return Lo;Fo=1;var f=hi(),l=Ft,i=Ii(),h=Ro(),m=hh(),d=Ne,g=Function.prototype,y=Math.max,w=Math.min,_=Object.create;return d.maxAge=function(x,E,M){var C,N,D,L;x=m(x),x&&(C=_(null),N=M.async&&d.async||M.promise&&d.promise?"async":"",E.on("set"+N,function(P){C[P]=setTimeout(function(){E.delete(P)},x),typeof C[P].unref=="function"&&C[P].unref(),L&&(L[P]&&L[P]!=="nextTick"&&clearTimeout(L[P]),L[P]=setTimeout(function(){delete L[P]},D),typeof L[P].unref=="function"&&L[P].unref())}),E.on("delete"+N,function(P){clearTimeout(C[P]),delete C[P],L&&(L[P]!=="nextTick"&&clearTimeout(L[P]),delete L[P])}),M.preFetch&&(M.preFetch===!0||isNaN(M.preFetch)?D=.333:D=y(w(Number(M.preFetch),1),0),D&&(L={},D=(1-D)*x,E.on("get"+N,function(P,q,A){L[P]||(L[P]="nextTick",i(function(){var R;L[P]==="nextTick"&&(delete L[P],E.delete(P),M.async&&(q=f(q),q.push(g)),R=E.memoized.apply(A,q),M.promise&&h(R)&&(typeof R.done=="function"?R.done(g,g):R.then(g,g)))}))}))),E.on("clear"+N,function(){l(C,function(P){clearTimeout(P)}),C={},L&&(l(L,function(P){P!=="nextTick"&&clearTimeout(P)}),L={})}))},Lo}var No={},Ni,$o;function gh(){if($o)return Ni;$o=1;var f=Fe,l=Object.create,i=Object.prototype.hasOwnProperty;return Ni=function(h){var m=0,d=1,g=l(null),y=l(null),w=0,_;return h=f(h),{hit:function(x){var E=y[x],M=++w;if(g[M]=x,y[x]=M,!E)return++m,m<=h?void 0:(x=g[d],_(x),x);if(delete g[E],d===E)for(;!i.call(g,++d););},delete:_=function(x){var E=y[x];if(E&&(delete g[E],delete y[x],--m,d===E)){if(!m){w=0,d=1;return}for(;!i.call(g,++d););}},clear:function(){m=0,d=1,g=l(null),y=l(null),w=0}}},Ni}var Do;function vh(){if(Do)return No;Do=1;var f=Fe,l=gh(),i=Ne;return i.max=function(h,m,d){var g,y,w;h=f(h),h&&(y=l(h),g=d.async&&i.async||d.promise&&i.promise?"async":"",m.on("set"+g,w=function(_){_=y.hit(_),_!==void 0&&m.delete(_)}),m.on("get"+g,w),m.on("delete"+g,y.delete),m.on("clear"+g,y.clear))},No}var Wo={},Bo;function dh(){if(Bo)return Wo;Bo=1;var f=$e,l=Ne,i=Object.create,h=Object.defineProperties;return l.refCounter=function(m,d,g){var y,w;y=i(null),w=g.async&&l.async||g.promise&&l.promise?"async":"",d.on("set"+w,function(_,x){y[_]=x||1}),d.on("get"+w,function(_){++y[_]}),d.on("delete"+w,function(_){delete y[_]}),d.on("clear"+w,function(){y={}}),h(d.memoized,{deleteRef:f(function(){var _=d.get(arguments);return _===null||!y[_]?null:--y[_]?!1:(d.delete(_),!0)}),getRefCount:f(function(){var _=d.get(arguments);return _===null||!y[_]?0:y[_]})})},Wo}var _h=hf,mh=gf,yh=Vc,wh=function(f){var l=_h(arguments[1]),i;return l.normalizer||(i=l.length=mh(l.length,f.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=Qc():i>1&&(l.normalizer=Xc()(i)):i===!1?l.normalizer=nh()():i===1?l.normalizer=eh()():l.normalizer=th()(i))),l.async&&rh(),l.promise&&lh(),l.dispose&&sh(),l.maxAge&&ph(),l.max&&vh(),l.refCounter&&dh(),yh(f,l)},xh=ys(wh);const bh=f=>async l=>{try{const i=await f(l);postMessage({result:i})}catch(i){postMessage({error:i})}};var Gt={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Gt.exports,function(f,l){(function(){var i,h="4.17.21",m=200,d="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",g="Expected a function",y="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",_=500,x="__lodash_placeholder__",E=1,M=2,C=4,N=1,D=2,L=1,P=2,q=4,A=8,R=16,W=32,U=64,J=128,rn=256,Pn=512,gt=30,Ht="...",Bi=800,Kt=16,vt=1,Ui=2,Gi=3,Nn=1/0,wn=9007199254740991,We=17976931348623157e292,ae=NaN,$n=4294967295,zi=$n-1,Zt=$n>>>1,Yt=[["ary",J],["bind",L],["bindKey",P],["curry",A],["curryRight",R],["flip",Pn],["partial",W],["partialRight",U],["rearg",rn]],le="[object Arguments]",xe="[object Array]",dt="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",xn="[object Function]",Se="[object GeneratorFunction]",dn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",_t="[object Promise]",Vt="[object Proxy]",an="[object RegExp]",_n="[object Set]",kn="[object String]",Qt="[object Symbol]",Fh="[object Undefined]",mt="[object WeakMap]",Nh="[object WeakSet]",yt="[object ArrayBuffer]",Je="[object DataView]",Hi="[object Float32Array]",Ki="[object Float64Array]",Zi="[object Int8Array]",Yi="[object Int16Array]",Vi="[object Int32Array]",Qi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ji="[object Uint16Array]",ji="[object Uint32Array]",$h=/\b__p \+= '';/g,Dh=/\b(__p \+=) '' \+/g,Wh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ho=/&(?:amp|lt|gt|quot|#39);/g,Ko=/[&<>"']/g,Bh=RegExp(Ho.source),Uh=RegExp(Ko.source),Gh=/<%-([\s\S]+?)%>/g,zh=/<%([\s\S]+?)%>/g,Zo=/<%=([\s\S]+?)%>/g,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kh=/^\w*$/,Zh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,Yh=RegExp(ki.source),nu=/^\s+/,Vh=/\s/,Qh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xh=/\{\n\/\* \[wrapped with (.+)\] \*/,Jh=/,? & /,jh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kh=/[()=,{}\[\]\/\s]/,np=/\\(\\)?/g,ep=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Yo=/\w*$/,tp=/^[-+]0x[0-9a-f]+$/i,rp=/^0b[01]+$/i,ip=/^\[object .+?Constructor\]$/,up=/^0o[0-7]+$/i,fp=/^(?:0|[1-9]\d*)$/,op=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Xt=/($^)/,ap=/['\n\r\u2028\u2029\\]/g,Jt="\\ud800-\\udfff",lp="\\u0300-\\u036f",sp="\\ufe20-\\ufe2f",cp="\\u20d0-\\u20ff",Vo=lp+sp+cp,Qo="\\u2700-\\u27bf",Xo="a-z\\xdf-\\xf6\\xf8-\\xff",hp="\\xac\\xb1\\xd7\\xf7",pp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gp="\\u2000-\\u206f",vp=" \\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",Jo="A-Z\\xc0-\\xd6\\xd8-\\xde",jo="\\ufe0e\\ufe0f",ko=hp+pp+gp+vp,eu="['’]",dp="["+Jt+"]",na="["+ko+"]",jt="["+Vo+"]",ea="\\d+",_p="["+Qo+"]",ta="["+Xo+"]",ra="[^"+Jt+ko+ea+Qo+Xo+Jo+"]",tu="\\ud83c[\\udffb-\\udfff]",mp="(?:"+jt+"|"+tu+")",ia="[^"+Jt+"]",ru="(?:\\ud83c[\\udde6-\\uddff]){2}",iu="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Jo+"]",ua="\\u200d",fa="(?:"+ta+"|"+ra+")",yp="(?:"+je+"|"+ra+")",oa="(?:"+eu+"(?:d|ll|m|re|s|t|ve))?",aa="(?:"+eu+"(?:D|LL|M|RE|S|T|VE))?",la=mp+"?",sa="["+jo+"]?",wp="(?:"+ua+"(?:"+[ia,ru,iu].join("|")+")"+sa+la+")*",xp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ca=sa+la+wp,Sp="(?:"+[_p,ru,iu].join("|")+")"+ca,Ap="(?:"+[ia+jt+"?",jt,ru,iu,dp].join("|")+")",Op=RegExp(eu,"g"),Tp=RegExp(jt,"g"),uu=RegExp(tu+"(?="+tu+")|"+Ap+ca,"g"),Ip=RegExp([je+"?"+ta+"+"+oa+"(?="+[na,je,"$"].join("|")+")",yp+"+"+aa+"(?="+[na,je+fa,"$"].join("|")+")",je+"?"+fa+"+"+oa,je+"+"+aa,bp,xp,ea,Sp].join("|"),"g"),Rp=RegExp("["+ua+Jt+Vo+jo+"]"),Ep=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pp=["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"],Cp=-1,ln={};ln[Hi]=ln[Ki]=ln[Zi]=ln[Yi]=ln[Vi]=ln[Qi]=ln[Xi]=ln[Ji]=ln[ji]=!0,ln[le]=ln[xe]=ln[yt]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[xn]=ln[dn]=ln[Cn]=ln[Hn]=ln[an]=ln[_n]=ln[kn]=ln[mt]=!1;var on={};on[le]=on[xe]=on[yt]=on[Je]=on[se]=on[be]=on[Hi]=on[Ki]=on[Zi]=on[Yi]=on[Vi]=on[dn]=on[Cn]=on[Hn]=on[an]=on[_n]=on[kn]=on[Qt]=on[Qi]=on[Xi]=on[Ji]=on[ji]=!0,on[ie]=on[xn]=on[mt]=!1;var Lp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},qp={"&":"&","<":"<",">":">",'"':""","'":"'"},Mp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Fp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Np=parseFloat,$p=parseInt,ha=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,Dp=typeof self=="object"&&self&&self.Object===Object&&self,Sn=ha||Dp||Function("return this")(),fu=l&&!l.nodeType&&l,Be=fu&&!0&&f&&!f.nodeType&&f,pa=Be&&Be.exports===fu,ou=pa&&ha.process,Kn=function(){try{var p=Be&&Be.require&&Be.require("util").types;return p||ou&&ou.binding&&ou.binding("util")}catch{}}(),ga=Kn&&Kn.isArrayBuffer,va=Kn&&Kn.isDate,da=Kn&&Kn.isMap,_a=Kn&&Kn.isRegExp,ma=Kn&&Kn.isSet,ya=Kn&&Kn.isTypedArray;function Dn(p,S,b){switch(b.length){case 0:return p.call(S);case 1:return p.call(S,b[0]);case 2:return p.call(S,b[0],b[1]);case 3:return p.call(S,b[0],b[1],b[2])}return p.apply(S,b)}function Wp(p,S,b,$){for(var K=-1,nn=p==null?0:p.length;++K-1}function au(p,S,b){for(var $=-1,K=p==null?0:p.length;++$-1;);return b}function Ia(p,S){for(var b=p.length;b--&&ke(S,p[b],0)>-1;);return b}function Vp(p,S){for(var b=p.length,$=0;b--;)p[b]===S&&++$;return $}var Qp=hu(Lp),Xp=hu(qp);function Jp(p){return"\\"+Fp[p]}function jp(p,S){return p==null?i:p[S]}function nt(p){return Rp.test(p)}function kp(p){return Ep.test(p)}function ng(p){for(var S,b=[];!(S=p.next()).done;)b.push(S.value);return b}function du(p){var S=-1,b=Array(p.size);return p.forEach(function($,K){b[++S]=[K,$]}),b}function Ra(p,S){return function(b){return p(S(b))}}function Ie(p,S){for(var b=-1,$=p.length,K=0,nn=[];++b<$;){var mn=p[b];(mn===S||mn===x)&&(p[b]=x,nn[K++]=b)}return nn}function er(p){var S=-1,b=Array(p.size);return p.forEach(function($){b[++S]=$}),b}function eg(p){var S=-1,b=Array(p.size);return p.forEach(function($){b[++S]=[$,$]}),b}function tg(p,S,b){for(var $=b-1,K=p.length;++$-1}function Ug(n,e){var t=this.__data__,r=dr(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ce.prototype.clear=$g,ce.prototype.delete=Dg,ce.prototype.get=Wg,ce.prototype.has=Bg,ce.prototype.set=Ug;function he(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,u,a){var s,c=e&E,v=e&M,O=e&C;if(t&&(s=u?t(n,r,u,a):t(n)),s!==i)return s;if(!cn(n))return n;var T=Z(n);if(T){if(s=Kv(n),!c)return Ln(n,s)}else{var I=Tn(n),F=I==xn||I==Se;if(qe(n))return sl(n,c);if(I==Hn||I==le||F&&!u){if(s=v||F?{}:El(n),!c)return v?Mv(n,rv(s,n)):qv(n,Ba(s,n))}else{if(!on[I])return u?n:{};s=Zv(n,I,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),is(n)?n.forEach(function(H){s.add(Qn(H,e,t,H,n,a))}):ts(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,t,X,n,a))});var z=O?v?Gu:Uu:v?Mn:bn,V=T?i:z(n);return Zn(V||n,function(H,X){V&&(X=H,H=n[X]),Tt(s,X,Qn(H,e,t,X,n,a))}),s}function iv(n){var e=bn(n);return function(t){return Ua(t,n,e)}}function Ua(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var u=t[r],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function Ga(n,e,t){if(typeof n!="function")throw new Yn(g);return qt(function(){n.apply(i,t)},e)}function It(n,e,t,r){var u=-1,a=kt,s=!0,c=n.length,v=[],O=e.length;if(!c)return v;t&&(e=sn(e,Wn(t))),r?(a=au,s=!1):e.length>=m&&(a=wt,s=!1,e=new ze(e));n:for(;++uu?0:u+t),r=r===i||r>u?u:Y(r),r<0&&(r+=u),r=t>r?0:fs(r);t0&&t(c)?e>1?An(c,e-1,t,r,u):Te(u,c):r||(u[u.length]=c)}return u}var Su=dl(),Ka=dl(!0);function ue(n,e){return n&&Su(n,e,bn)}function Au(n,e){return n&&Ka(n,e,bn)}function mr(n,e){return Oe(e,function(t){return _e(n[t])})}function Ke(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function ov(n,e){return n!=null&&tn.call(n,e)}function av(n,e){return n!=null&&e in fn(n)}function lv(n,e,t){return n>=On(e,t)&&n=120&&T.length>=120)?new ze(s&&T):i}T=n[0];var I=-1,F=c[0];n:for(;++I-1;)c!==n&&lr.call(c,v,1),lr.call(n,v,1);return n}function tl(n,e){for(var t=n?e.length:0,r=t-1;t--;){var u=e[t];if(t==r||u!==a){var a=u;de(u)?lr.call(n,u,1):Mu(n,u)}}return n}function Cu(n,e){return n+hr(Na()*(e-n+1))}function bv(n,e,t,r){for(var u=-1,a=yn(cr((e-n)/(t||1)),0),s=b(a);a--;)s[r?a:++u]=n,n+=t;return s}function Lu(n,e){var t="";if(!n||e<1||e>wn)return t;do e%2&&(t+=n),e=hr(e/2),e&&(n+=n);while(e);return t}function Q(n,e){return Qu(Ll(n,e,Fn),n+"")}function Sv(n){return Wa(ct(n))}function Av(n,e){var t=ct(n);return Er(t,He(e,0,t.length))}function Pt(n,e,t,r){if(!cn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),t=t>u?u:t,t<0&&(t+=u),u=e>t?0:t-e>>>0,e>>>=0;for(var a=b(u);++r>>1,s=n[a];s!==null&&!Un(s)&&(t?s<=e:s=m){var O=e?null:Dv(n);if(O)return er(O);s=!1,u=wt,v=new ze}else v=e?[]:c;n:for(;++r=r?n:Xn(n,e,t)}var ll=vg||function(n){return Sn.clearTimeout(n)};function sl(n,e){if(e)return n.slice();var t=n.length,r=Ca?Ca(t):new n.constructor(t);return n.copy(r),r}function Du(n){var e=new n.constructor(n.byteLength);return new or(e).set(new or(n)),e}function Ev(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,Yo.exec(n));return e.lastIndex=n.lastIndex,e}function Cv(n){return Ot?fn(Ot.call(n)):{}}function cl(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function hl(n,e){if(n!==e){var t=n!==i,r=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,v=e===e,O=Un(e);if(!c&&!O&&!a&&n>e||a&&s&&v&&!c&&!O||r&&s&&v||!t&&v||!u)return 1;if(!r&&!a&&!O&&n=c)return v;var O=t[r];return v*(O=="desc"?-1:1)}}return n.index-e.index}function pl(n,e,t,r){for(var u=-1,a=n.length,s=t.length,c=-1,v=e.length,O=yn(a-s,0),T=b(v+O),I=!r;++c1?t[u-1]:i,s=u>2?t[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Rn(t[0],t[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++r-1?u[a?e[s]:s]:i}}function yl(n){return ve(function(e){var t=e.length,r=t,u=Vn.prototype.thru;for(n&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new Yn(g);if(u&&!s&&Ir(a)=="wrapper")var s=new Vn([],!0)}for(r=s?r:t;++r1&&k.reverse(),T&&vc))return!1;var O=a.get(n),T=a.get(e);if(O&&T)return O==e&&T==n;var I=-1,F=!0,B=t&D?new ze:i;for(a.set(n,e),a.set(e,n);++I1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(Qh,`{ -/* [wrapped with `+e+`] */ -`)}function Vv(n){return Z(n)||Ve(n)||!!(Ma&&n&&n[Ma])}function de(n,e){var t=typeof n;return e=e??wn,!!e&&(t=="number"||t!="symbol"&&fp.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Bi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Er(n,e){var t=-1,r=n.length,u=r-1;for(e=e===i?r:e;++t1?n[e-1]:i;return t=typeof t=="function"?(n.pop(),t):i,Hl(n,t)});function Kl(n){var e=o(n);return e.__chain__=!0,e}function u_(n,e){return e(n),n}function Pr(n,e){return e(n)}var f_=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,u=function(a){return bu(a,n)};return e>1||this.__actions__.length||!(r instanceof j)||!de(t)?this.thru(u):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Pr,args:[u],thisArg:i}),new Vn(r,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function o_(){return Kl(this)}function a_(){return new Vn(this.value(),this.__chain__)}function l_(){this.__values__===i&&(this.__values__=us(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function s_(){return this}function c_(n){for(var e,t=this;t instanceof vr;){var r=Dl(t);r.__index__=0,r.__values__=i,e?u.__wrapped__=r:e=r;var u=r;t=t.__wrapped__}return u.__wrapped__=n,e}function h_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Pr,args:[Xu],thisArg:i}),new Vn(e,this.__chain__)}return this.thru(Xu)}function p_(){return ol(this.__wrapped__,this.__actions__)}var g_=br(function(n,e,t){tn.call(n,t)?++n[t]:pe(n,t,1)});function v_(n,e,t){var r=Z(n)?wa:uv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}function d_(n,e){var t=Z(n)?Oe:Ha;return t(n,G(e,3))}var __=ml(Wl),m_=ml(Bl);function y_(n,e){return An(Cr(n,e),1)}function w_(n,e){return An(Cr(n,e),Nn)}function x_(n,e,t){return t=t===i?1:Y(t),An(Cr(n,e),t)}function Zl(n,e){var t=Z(n)?Zn:Ee;return t(n,G(e,3))}function Yl(n,e){var t=Z(n)?Bp:za;return t(n,G(e,3))}var b_=br(function(n,e,t){tn.call(n,t)?n[t].push(e):pe(n,t,[e])});function S_(n,e,t,r){n=qn(n)?n:ct(n),t=t&&!r?Y(t):0;var u=n.length;return t<0&&(t=yn(u+t,0)),Nr(n)?t<=u&&n.indexOf(e,t)>-1:!!u&&ke(n,e,t)>-1}var A_=Q(function(n,e,t){var r=-1,u=typeof e=="function",a=qn(n)?b(n.length):[];return Ee(n,function(s){a[++r]=u?Dn(e,s,t):Rt(s,e,t)}),a}),O_=br(function(n,e,t){pe(n,t,e)});function Cr(n,e){var t=Z(n)?sn:Xa;return t(n,G(e,3))}function T_(n,e,t,r){return n==null?[]:(Z(e)||(e=e==null?[]:[e]),t=r?i:t,Z(t)||(t=t==null?[]:[t]),nl(n,e,t))}var I_=br(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function R_(n,e,t){var r=Z(n)?lu:Aa,u=arguments.length<3;return r(n,G(e,4),t,u,Ee)}function E_(n,e,t){var r=Z(n)?Up:Aa,u=arguments.length<3;return r(n,G(e,4),t,u,za)}function P_(n,e){var t=Z(n)?Oe:Ha;return t(n,Mr(G(e,3)))}function C_(n){var e=Z(n)?Wa:Sv;return e(n)}function L_(n,e,t){(t?Rn(n,e,t):e===i)?e=1:e=Y(e);var r=Z(n)?nv:Av;return r(n,e)}function q_(n){var e=Z(n)?ev:Tv;return e(n)}function M_(n){if(n==null)return 0;if(qn(n))return Nr(n)?et(n):n.length;var e=Tn(n);return e==dn||e==_n?n.size:Ru(n).length}function F_(n,e,t){var r=Z(n)?su:Iv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}var N_=Q(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Rn(n,e[0],e[1])?e=[]:t>2&&Rn(e[0],e[1],e[2])&&(e=[e[0]]),nl(n,An(e,1),[])}),Lr=dg||function(){return Sn.Date.now()};function $_(n,e){if(typeof e!="function")throw new Yn(g);return n=Y(n),function(){if(--n<1)return e.apply(this,arguments)}}function Vl(n,e,t){return e=t?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function Ql(n,e){var t;if(typeof e!="function")throw new Yn(g);return n=Y(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=i),t}}var ju=Q(function(n,e,t){var r=L;if(t.length){var u=Ie(t,lt(ju));r|=W}return ge(n,r,e,t,u)}),Xl=Q(function(n,e,t){var r=L|P;if(t.length){var u=Ie(t,lt(Xl));r|=W}return ge(e,r,n,t,u)});function Jl(n,e,t){e=t?i:e;var r=ge(n,A,i,i,i,i,i,e);return r.placeholder=Jl.placeholder,r}function jl(n,e,t){e=t?i:e;var r=ge(n,R,i,i,i,i,i,e);return r.placeholder=jl.placeholder,r}function kl(n,e,t){var r,u,a,s,c,v,O=0,T=!1,I=!1,F=!0;if(typeof n!="function")throw new Yn(g);e=jn(e)||0,cn(t)&&(T=!!t.leading,I="maxWait"in t,a=I?yn(jn(t.maxWait)||0,e):a,F="trailing"in t?!!t.trailing:F);function B(gn){var re=r,ye=u;return r=u=i,O=gn,s=n.apply(ye,re),s}function z(gn){return O=gn,c=qt(X,e),T?B(gn):s}function V(gn){var re=gn-v,ye=gn-O,ms=e-re;return I?On(ms,a-ye):ms}function H(gn){var re=gn-v,ye=gn-O;return v===i||re>=e||re<0||I&&ye>=a}function X(){var gn=Lr();if(H(gn))return k(gn);c=qt(X,V(gn))}function k(gn){return c=i,F&&r?B(gn):(r=u=i,s)}function Gn(){c!==i&&ll(c),O=0,r=v=u=c=i}function En(){return c===i?s:k(Lr())}function zn(){var gn=Lr(),re=H(gn);if(r=arguments,u=this,v=gn,re){if(c===i)return z(v);if(I)return ll(c),c=qt(X,e),B(v)}return c===i&&(c=qt(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var D_=Q(function(n,e){return Ga(n,1,e)}),W_=Q(function(n,e,t){return Ga(n,jn(e)||0,t)});function B_(n){return ge(n,Pn)}function qr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Yn(g);var t=function(){var r=arguments,u=e?e.apply(this,r):r[0],a=t.cache;if(a.has(u))return a.get(u);var s=n.apply(this,r);return t.cache=a.set(u,s)||a,s};return t.cache=new(qr.Cache||he),t}qr.Cache=he;function Mr(n){if(typeof n!="function")throw new Yn(g);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function U_(n){return Ql(2,n)}var G_=Rv(function(n,e){e=e.length==1&&Z(e[0])?sn(e[0],Wn(G())):sn(An(e,1),Wn(G()));var t=e.length;return Q(function(r){for(var u=-1,a=On(r.length,t);++u=e}),Ve=Ya(function(){return arguments}())?Ya:function(n){return hn(n)&&tn.call(n,"callee")&&!qa.call(n,"callee")},Z=b.isArray,r0=ga?Wn(ga):cv;function qn(n){return n!=null&&Fr(n.length)&&!_e(n)}function pn(n){return hn(n)&&qn(n)}function i0(n){return n===!0||n===!1||hn(n)&&In(n)==se}var qe=mg||cf,u0=va?Wn(va):hv;function f0(n){return hn(n)&&n.nodeType===1&&!Mt(n)}function o0(n){if(n==null)return!0;if(qn(n)&&(Z(n)||typeof n=="string"||typeof n.splice=="function"||qe(n)||st(n)||Ve(n)))return!n.length;var e=Tn(n);if(e==dn||e==_n)return!n.size;if(Lt(n))return!Ru(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function a0(n,e){return Et(n,e)}function l0(n,e,t){t=typeof t=="function"?t:i;var r=t?t(n,e):i;return r===i?Et(n,e,i,t):!!r}function nf(n){if(!hn(n))return!1;var e=In(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Mt(n)}function s0(n){return typeof n=="number"&&Fa(n)}function _e(n){if(!cn(n))return!1;var e=In(n);return e==xn||e==Se||e==dt||e==Vt}function es(n){return typeof n=="number"&&n==Y(n)}function Fr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wn}function cn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function hn(n){return n!=null&&typeof n=="object"}var ts=da?Wn(da):gv;function c0(n,e){return n===e||Iu(n,e,Hu(e))}function h0(n,e,t){return t=typeof t=="function"?t:i,Iu(n,e,Hu(e),t)}function p0(n){return rs(n)&&n!=+n}function g0(n){if(Jv(n))throw new K(d);return Va(n)}function v0(n){return n===null}function d0(n){return n==null}function rs(n){return typeof n=="number"||hn(n)&&In(n)==Cn}function Mt(n){if(!hn(n)||In(n)!=Hn)return!1;var e=ar(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ir.call(t)==hg}var ef=_a?Wn(_a):vv;function _0(n){return es(n)&&n>=-wn&&n<=wn}var is=ma?Wn(ma):dv;function Nr(n){return typeof n=="string"||!Z(n)&&hn(n)&&In(n)==kn}function Un(n){return typeof n=="symbol"||hn(n)&&In(n)==Qt}var st=ya?Wn(ya):_v;function m0(n){return n===i}function y0(n){return hn(n)&&Tn(n)==mt}function w0(n){return hn(n)&&In(n)==Nh}var x0=Tr(Eu),b0=Tr(function(n,e){return n<=e});function us(n){if(!n)return[];if(qn(n))return Nr(n)?ne(n):Ln(n);if(xt&&n[xt])return ng(n[xt]());var e=Tn(n),t=e==dn?du:e==_n?er:ct;return t(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*We}return n===n?n:0}function Y(n){var e=me(n),t=e%1;return e===e?t?e-t:e:0}function fs(n){return n?He(Y(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(cn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=cn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Oa(n);var t=rp.test(n);return t||up.test(n)?$p(n.slice(2),t?2:8):tp.test(n)?ae:+n}function os(n){return fe(n,Mn(n))}function S0(n){return n?He(Y(n),-wn,wn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var A0=ot(function(n,e){if(Lt(e)||qn(e)){fe(e,bn(e),n);return}for(var t in e)tn.call(e,t)&&Tt(n,t,e[t])}),as=ot(function(n,e){fe(e,Mn(e),n)}),$r=ot(function(n,e,t,r){fe(e,Mn(e),n,r)}),O0=ot(function(n,e,t,r){fe(e,bn(e),n,r)}),T0=ve(bu);function I0(n,e){var t=ft(n);return e==null?t:Ba(t,e)}var R0=Q(function(n,e){n=fn(n);var t=-1,r=e.length,u=r>2?e[2]:i;for(u&&Rn(e[0],e[1],u)&&(r=1);++t1),a}),fe(n,Gu(n),t),r&&(t=Qn(t,E|M|C,Wv));for(var u=e.length;u--;)Mu(t,e[u]);return t});function Z0(n,e){return ss(n,Mr(G(e)))}var Y0=ve(function(n,e){return n==null?{}:wv(n,e)});function ss(n,e){if(n==null)return{};var t=sn(Gu(n),function(r){return[r]});return e=G(e),el(n,t,function(r,u){return e(r,u[0])})}function V0(n,e,t){e=Ce(e,n);var r=-1,u=e.length;for(u||(u=1,n=i);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var u=Na();return On(n+u*(e-n+Np("1e-"+((u+"").length-1))),e)}return Cu(n,e)}var u1=at(function(n,e,t){return e=e.toLowerCase(),n+(t?ps(e):e)});function ps(n){return uf(en(n).toLowerCase())}function gs(n){return n=en(n),n&&n.replace(op,Qp).replace(Tp,"")}function f1(n,e,t){n=en(n),e=Bn(e);var r=n.length;t=t===i?r:He(Y(t),0,r);var u=t;return t-=e.length,t>=0&&n.slice(t,u)==e}function o1(n){return n=en(n),n&&Uh.test(n)?n.replace(Ko,Xp):n}function a1(n){return n=en(n),n&&Yh.test(n)?n.replace(ki,"\\$&"):n}var l1=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),s1=at(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),c1=_l("toLowerCase");function h1(n,e,t){n=en(n),e=Y(e);var r=e?et(n):0;if(!e||r>=e)return n;var u=(e-r)/2;return Or(hr(u),t)+n+Or(cr(u),t)}function p1(n,e,t){n=en(n),e=Y(e);var r=e?et(n):0;return e&&r>>0,t?(n=en(n),n&&(typeof e=="string"||e!=null&&!ef(e))&&(e=Bn(e),!e&&nt(n))?Le(ne(n),0,t):n.split(e,t)):[]}var w1=at(function(n,e,t){return n+(t?" ":"")+uf(e)});function x1(n,e,t){return n=en(n),t=t==null?0:He(Y(t),0,n.length),e=Bn(e),n.slice(t,t+e.length)==e}function b1(n,e,t){var r=o.templateSettings;t&&Rn(n,e,t)&&(e=i),n=en(n),e=$r({},e,r,Al);var u=$r({},e.imports,r.imports,Al),a=bn(u),s=vu(u,a),c,v,O=0,T=e.interpolate||Xt,I="__p += '",F=_u((e.escape||Xt).source+"|"+T.source+"|"+(T===Zo?ep:Xt).source+"|"+(e.evaluate||Xt).source+"|$","g"),B="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cp+"]")+` -`;n.replace(F,function(H,X,k,Gn,En,zn){return k||(k=Gn),I+=n.slice(O,zn).replace(ap,Jp),X&&(c=!0,I+=`' + -__e(`+X+`) + -'`),En&&(v=!0,I+=`'; -`+En+`; -__p += '`),k&&(I+=`' + -((__t = (`+k+`)) == null ? '' : __t) + -'`),O=zn+H.length,H}),I+=`'; -`;var z=tn.call(e,"variable")&&e.variable;if(!z)I=`with (obj) { -`+I+` -} -`;else if(kh.test(z))throw new K(y);I=(v?I.replace($h,""):I).replace(Dh,"$1").replace(Wh,"$1;"),I="function("+(z||"obj")+`) { -`+(z?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(c?", __e = _.escape":"")+(v?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+I+`return __p -}`;var V=ds(function(){return nn(a,B+"return "+I).apply(i,s)});if(V.source=I,nf(V))throw V;return V}function S1(n){return en(n).toLowerCase()}function A1(n){return en(n).toUpperCase()}function O1(n,e,t){if(n=en(n),n&&(t||e===i))return Oa(n);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ne(e),a=Ta(r,u),s=Ia(r,u)+1;return Le(r,a,s).join("")}function T1(n,e,t){if(n=en(n),n&&(t||e===i))return n.slice(0,Ea(n)+1);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Ia(r,ne(e))+1;return Le(r,0,u).join("")}function I1(n,e,t){if(n=en(n),n&&(t||e===i))return n.replace(nu,"");if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Ta(r,ne(e));return Le(r,u).join("")}function R1(n,e){var t=gt,r=Ht;if(cn(e)){var u="separator"in e?e.separator:u;t="length"in e?Y(e.length):t,r="omission"in e?Bn(e.omission):r}n=en(n);var a=n.length;if(nt(n)){var s=ne(n);a=s.length}if(t>=a)return n;var c=t-et(r);if(c<1)return r;var v=s?Le(s,0,c).join(""):n.slice(0,c);if(u===i)return v+r;if(s&&(c+=v.length-c),ef(u)){if(n.slice(c).search(u)){var O,T=v;for(u.global||(u=_u(u.source,en(Yo.exec(u))+"g")),u.lastIndex=0;O=u.exec(T);)var I=O.index;v=v.slice(0,I===i?c:I)}}else if(n.indexOf(Bn(u),c)!=c){var F=v.lastIndexOf(u);F>-1&&(v=v.slice(0,F))}return v+r}function E1(n){return n=en(n),n&&Bh.test(n)?n.replace(Ho,ig):n}var P1=at(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),uf=_l("toUpperCase");function vs(n,e,t){return n=en(n),e=t?i:e,e===i?kp(n)?og(n):Hp(n):n.match(e)||[]}var ds=Q(function(n,e){try{return Dn(n,i,e)}catch(t){return nf(t)?t:new K(t)}}),C1=ve(function(n,e){return Zn(e,function(t){t=oe(t),pe(n,t,ju(n[t],n))}),n});function L1(n){var e=n==null?0:n.length,t=G();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new Yn(g);return[t(r[0]),r[1]]}):[],Q(function(r){for(var u=-1;++uwn)return[];var t=$n,r=On(n,$n);e=G(e),n-=$n;for(var u=gu(r,e);++t0||e<0)?new j(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=Y(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),u=o[r?"take"+(e=="last"?"Right":""):e],a=r||/^find/.test(e);u&&(o.prototype[e]=function(){var s=this.__wrapped__,c=r?[1]:arguments,v=s instanceof j,O=c[0],T=v||Z(s),I=function(X){var k=u.apply(o,Te([X],c));return r&&F?k[0]:k};T&&t&&typeof O=="function"&&O.length!=1&&(v=T=!1);var F=this.__chain__,B=!!this.__actions__.length,z=a&&!F,V=v&&!B;if(!a&&T){s=V?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Pr,args:[I],thisArg:i}),new Vn(H,F)}return z&&V?n.apply(this,c):(H=this.thru(I),z?r?H.value()[0]:H.value():H)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=tr[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);o.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Z(a)?a:[],u)}return this[t](function(s){return e.apply(Z(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var t=o[e];if(t){var r=t.name+"";tn.call(ut,r)||(ut[r]=[]),ut[r].push({name:e,func:t})}}),ut[Sr(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=Eg,j.prototype.reverse=Pg,j.prototype.value=Cg,o.prototype.at=f_,o.prototype.chain=o_,o.prototype.commit=a_,o.prototype.next=l_,o.prototype.plant=c_,o.prototype.reverse=h_,o.prototype.toJSON=o.prototype.valueOf=o.prototype.value=p_,o.prototype.first=o.prototype.head,xt&&(o.prototype[xt]=s_),o},tt=ag();Be?((Be.exports=tt)._=tt,fu._=tt):Sn._=tt}).call(Qe)}(Gt,Gt.exports);var vn=Gt.exports;function $i(f={},l){const i={};for(const h of Object.keys(f))i[h]=h==="$"?f[h]:l(f[h],h,f);return Object.setPrototypeOf(i,f)}var Uo={exports:{}};(function(f,l){(function(i,h){f.exports=h()})(Qe,function(){return function(i){function h(d){if(m[d])return m[d].exports;var g=m[d]={i:d,l:!1,exports:{}};return i[d].call(g.exports,g,g.exports,h),g.l=!0,g.exports}var m={};return h.m=i,h.c=m,h.d=function(d,g,y){h.o(d,g)||Object.defineProperty(d,g,{configurable:!1,enumerable:!0,get:y})},h.n=function(d){var g=d&&d.__esModule?function(){return d.default}:function(){return d};return h.d(g,"a",g),g},h.o=function(d,g){return Object.prototype.hasOwnProperty.call(d,g)},h.p="",h(h.s=1)}([function(i,h,m){function d(y){var w=y===void 0?{}:y,_=w.ESCAPE,x=_===void 0?/^\\/:_,E=w.VARIABLE_START,M=E===void 0?/^\${\s*/:E,C=w.VARIABLE_END,N=C===void 0?/^\s*}/:C,D=w.PIPE_START,L=D===void 0?/^\s*\|\s*/:D,P=w.PIPE_PARAMETER_START,q=P===void 0?/^\s*:\s*/:P,A=w.QUOTED_STRING,R=A===void 0?h.DEFAULT_QUOTED_STRING_REGEX:A,W=w.QUOTED_STRING_TEST,U=W===void 0?null:W,J=w.QUOTED_STRING_GET_AND_ADVANCE,rn=J===void 0?null:J,Pn=w.QUOTED_STRING_IN_PARAMETER_TEST,gt=Pn===void 0?null:Pn,Ht=w.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Bi=Ht===void 0?null:Ht,Kt=U||function(Nn){return R.test(Nn)},vt=rn||g(R),Ui=gt||function(Nn){return R.test(Nn)},Gi=Bi||g(R);return function(Nn){function wn(an){an===void 0&&(an=1),un=un.substr(an)}function We(an){an===void 0&&(an=/^/),wn(un.match(an)[0].length)}function ae(){var an;return We(x),an=un.length>0?un[0]:"",wn(),an}function $n(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;dn={name:"",pipes:[]},Hn=!kn}function zi(){ie.variables.push(dn),$n({isNull:!0})}function Zt(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Cn={name:"",parameters:[]},_t=!kn}function Yt(){dn.pipes.push(Cn),Zt({isNull:!0})}function le(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Ae="",Vt=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function dt(){return!!N.test(un)&&(We(N),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&zi(),xn=0,!0)}function se(){return!!L.test(un)&&(We(L),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&Zt(),xn=2,!0)}function be(){return!!q.test(un)&&(We(q),xn>=3&&xe(),xn>=2&&le(),xn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},xn=0,Se="",dn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,_t=!1,Vt=!1;un&&un.length>0;)switch(xn){case 0:if(x.test(un)){Se+=ae();continue}if(M.test(un)){xn=1,$n(),ie.literals.push(Se),Se="",We(M);continue}Se+=un[0],wn();break;case 1:if(x.test(un)){dn.name+=ae();continue}if(dt()||se())continue;if(Kt(un)){dn.name+=vt(un,wn);continue}dn.name+=un[0],wn();break;case 2:if(x.test(un)){Cn.name+=ae();continue}if(dt()||be()||se())continue;if(Kt(un)){Cn.name+=vt(un,wn);continue}Cn.name+=un[0],wn();break;case 3:if(x.test(un)){Ae+=ae();continue}if(dt()||be()||se())continue;if(Ui(un)){Ae+=Gi(un,wn);continue}Ae+=un[0],wn()}return Vt&&Cn.parameters.push(Ae),_t&&dn.pipes.push(Cn),Hn&&ie.variables.push(dn),ie.literals.push(Se),ie}}function g(y){return function(w,_){var x=w.match(y);return _(x[0].length),x.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(h,"__esModule",{value:!0}),h.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,h.parseStringTemplateGenerator=d,h.parseStringTemplate=d(),h.getQuotedStringAndAdvanceForRegex=g},function(i,h,m){i.exports=m(2)},function(i,h,m){function d(g){for(var y in g)h.hasOwnProperty(y)||(h[y]=g[y])}Object.defineProperty(h,"__esModule",{value:!0}),d(m(0)),d(m(3))},function(i,h,m){function d(x){return function(E){return x.hasOwnProperty(E)?x[E]:E.split(".").reduce(function(M,C){return M.hasOwnProperty(C)?M[C]:""},x)}}function g(x,E,M,C){C===void 0&&(C=d(E));var N=C(x.name);return x.pipes.reduce(function(D,L){return M.hasOwnProperty(L.name)?M[L.name](D,L.parameters):D},N??"")}function y(x,E,M,C){return C===void 0&&(C=d(E)),x.literals.length===0?"":x.literals.slice(1).reduce(function(N,D,L){return""+N+g(x.variables[L],E,M,C)+D},x.literals[0])}function w(x,E,M){return y(_.parseStringTemplate(x),E,M)}Object.defineProperty(h,"__esModule",{value:!0});var _=m(0);h.evaluateParsedString=y,h.evaluateStringTemplate=w}])})})(Uo);var Go=Uo.exports;const zo=f=>{const l=Function("$",` - const theme = $.__internal__?.context.theme; - const color = $.__internal__?.context.color; - const step = $.__internal__?.step; - const events = $.__internal__?.events; - const parent = $.__internal__?.parent; - return ${f}; - `);return i=>l(new Proxy(zt(i),{get(h,m){return typeof(h==null?void 0:h[m])=="function"?h[m]({}):h==null?void 0:h[m]}}))},Sh=/^\$\{\{\s*/,Ah=/^\s*\}\}/,Di=/\b\B/,Oh=Go.parseStringTemplateGenerator({VARIABLE_START:Sh,VARIABLE_END:Ah,PIPE_START:Di,PIPE_PARAMETER_START:Di,QUOTED_STRING:Di}),Th=xh(f=>{const l=Oh(f);return vn.join(l.literals,"")?i=>Go.evaluateParsedString(l,{},{},h=>zo(h)(i)):zo(l.variables[0].name)},{primitive:!0});function De(f){switch(f==null?void 0:f.constructor){case Array:{const l=vn.map(f,De);return i=>vn.map(l,h=>h(i))}case Object:{const l=vn.mapValues(f,De);return i=>vn.mapValues(l,h=>h(i))}case String:return Th(f);default:return()=>f}}function zt(f={}){return $i(f,l=>vn.isFunction(l)?l:De(l))}function Ih(f={}){return new Proxy(f,{get:(l,i)=>typeof l[i]=="function"?l[i]:()=>l[i]})}function Wi(f,l){return Object.setPrototypeOf($i(l,i=>h=>i(f)),f)}function Rh(f){const{$for:l,$if:i,...h}=f;if(l||i){const{$let:m="i",$from:d=0,$to:g=1,$step:y=1}=l??{},w=De(i),_=De(d),x=De(g),E=De(y);return(M={})=>!i||w(M)?vn.range(_(M),x(M),E(M)).map(C=>{const N=Wi(M,zt({[m]:C}));return Wi(N,zt(h))}):[]}else return(m={})=>[Wi(m,zt(h))]}function Eh(f,l){const i=d=>{const{$:g}=d,y=Rh(d);return g in l?w=>vn.flatMap(y(w),_=>vn.flatMap(h[g],x=>x(_))):w=>vn.map(y(w),_=>Object.setPrototypeOf($i(_,x=>x(_)),null))},h=vn.mapValues(l,d=>vn.map(d,i)),m=vn.flatMap(f,i);return d=>vn.flatMap(m,g=>g(d))}const Ph=f=>f==null,Ch=f=>f.clear?typeof f.clear=="string"?"special":"transient":"persistent";function Lh(f,l){return Object.setPrototypeOf(f,l),f}const qh="#808080";function Mh({trace:f,context:l,view:i="main",from:h=0,to:m=(d=>(d=f==null?void 0:f.events)==null?void 0:d.length)()??0}){var _;const g=Eh(((_=f==null?void 0:f.views)==null?void 0:_[i])??[],(f==null?void 0:f.views)??{}),y=x=>E=>({component:E,meta:{source:"trace",step:h+x,info:E.$info}}),w=vn.chain(f==null?void 0:f.events).map((x,E)=>({step:E,id:x.id,data:x,pId:x.pId})).groupBy("id").value();return vn.chain(vn.range(h,m)).map(x=>{var N;const E=f.events[x],M=f.events,C=g(Ih(Lh({alpha:1,fill:qh,__internal__:{context:l,step:x,parent:Ph(E.pId)?void 0:M[((N=vn.findLast(w[E.pId],D=>D.step<=x))==null?void 0:N.step)??0],events:M}},E)));return{event:E,components:vn.groupBy(C,Ch)}}).map((x,E)=>({event:x.event,components:vn.mapValues(x.components,M=>M.map(y(E)))})).value()}onmessage=bh(async({data:f})=>Mh(f))})(); diff --git a/assets/parseTraceSlave.worker-DaoiSWpC.js b/assets/parseTraceSlave.worker-DaoiSWpC.js deleted file mode 100644 index cc8fbf8..0000000 --- a/assets/parseTraceSlave.worker-DaoiSWpC.js +++ /dev/null @@ -1,28 +0,0 @@ -(function(){"use strict";var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function vs(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ds=function(){},_s=ds(),Me=function(o){return o!==_s&&o!==null},ms=Me,ys=Array.prototype.forEach,ws=Object.create,xs=function(o,l){var i;for(i in o)l[i]=o[i]},cf=function(o){var l=ws(null);return ys.call(arguments,function(i){ms(i)&&xs(Object(i),l)}),l},bs=function(){var o=Math.sign;return typeof o!="function"?!1:o(10)===1&&o(-20)===-1},Wr,hf;function Ss(){return hf||(hf=1,Wr=function(o){return o=Number(o),isNaN(o)||o===0?o:o>0?1:-1}),Wr}var As=bs()?Math.sign:Ss(),Os=As,Ts=Math.abs,Is=Math.floor,Rs=function(o){return isNaN(o)?0:(o=Number(o),o===0||!isFinite(o)?o:Os(o)*Is(Ts(o)))},Es=Rs,Ps=Math.max,Fe=function(o){return Ps(0,Es(o))},Cs=Fe,pf=function(o,l,i){var p;return isNaN(o)?(p=l,p>=0?i&&p?p-1:p:1):o===!1?!1:Cs(o)},we=function(o){if(typeof o!="function")throw new TypeError(o+" is not a function");return o},Ls=Me,Qe=function(o){if(!Ls(o))throw new TypeError("Cannot use null or undefined");return o},qs=we,Ms=Qe,Fs=Function.prototype.bind,gf=Function.prototype.call,Ns=Object.keys,$s=Object.prototype.propertyIsEnumerable,Ds=function(o,l){return function(i,p){var y,_=arguments[2],h=arguments[3];return i=Object(Ms(i)),qs(p),y=Ns(i),h&&y.sort(typeof h=="function"?Fs.call(h,i):void 0),typeof o!="function"&&(o=y[o]),gf.call(o,y,function(d,w){return $s.call(i,d)?gf.call(p,_,i[d],d,i,w):l})}},Ft=Ds("forEach"),Ne={},vf={exports:{}},Ws=function(){var o=Object.assign,l;return typeof o!="function"?!1:(l={foo:"raz"},o(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")},Br,df;function Bs(){return df||(df=1,Br=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Br}var Ur,_f;function Us(){if(_f)return Ur;_f=1;var o=Me,l=Object.keys;return Ur=function(i){return l(o(i)?Object(i):i)},Ur}var Gr,mf;function Gs(){return mf||(mf=1,Gr=Bs()()?Object.keys:Us()),Gr}var zr,yf;function zs(){if(yf)return zr;yf=1;var o=Gs(),l=Qe,i=Math.max;return zr=function(p,y){var _,h,d=i(arguments.length,2),w;for(p=Object(l(p)),w=function(m){try{p[m]=y[m]}catch(b){_||(_=b)}},h=1;h-1},Zr}var ac=fc()?String.prototype.contains:oc(),$t=Tf,Rf=uc,Ef=wf,Pf=cf,ht=ac,lc=Of.exports=function(o,l){var i,p,y,_,h;return arguments.length<2||typeof o!="string"?(_=l,l=o,o=null):_=arguments[2],$t(o)?(i=ht.call(o,"c"),p=ht.call(o,"e"),y=ht.call(o,"w")):(i=y=!0,p=!1),h={value:l,configurable:i,enumerable:p,writable:y},_?Ef(Pf(_),h):h};lc.gs=function(o,l,i){var p,y,_,h;return typeof o!="string"?(_=i,i=l,l=o,o=null):_=arguments[3],$t(l)?Rf(l)?$t(i)?Rf(i)||(_=i,i=void 0):i=void 0:(_=l,l=i=void 0):l=void 0,$t(o)?(p=ht.call(o,"c"),y=ht.call(o,"e")):(p=!0,y=!1),h={get:l,set:i,configurable:p,enumerable:y},_?Ef(Pf(_),h):h};var $e=Of.exports,Vr={exports:{}};(function(o,l){var i=$e,p=we,y=Function.prototype.apply,_=Function.prototype.call,h=Object.create,d=Object.defineProperty,w=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0},q,F,C,D,M,I,P;q=function(L,A){var E;return p(A),m.call(this,"__ee__")?E=this.__ee__:(E=b.value=h(null),d(this,"__ee__",b),b.value=null),E[L]?typeof E[L]=="object"?E[L].push(A):E[L]=[E[L],A]:E[L]=A,this},F=function(L,A){var E,W;return p(A),W=this,q.call(this,L,E=function(){C.call(W,L,E),y.call(A,this,arguments)}),E.__eeOnceListener__=A,this},C=function(L,A){var E,W,U,J;if(p(A),!m.call(this,"__ee__"))return this;if(E=this.__ee__,!E[L])return this;if(W=E[L],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?E[L]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete E[L];return this},D=function(L){var A,E,W,U,J;if(m.call(this,"__ee__")&&(U=this.__ee__[L],!!U))if(typeof U=="object"){for(E=arguments.length,J=new Array(E-1),A=1;A=55296&&E<=56319&&(rn+=F[++I])),rn=C?m.call(C,D,rn,P):rn,M?(b.value=rn,q(L,P,b)):L[P]=rn,++P;A=P}}if(A===void 0)for(A=p(F.length),M&&(L=new M(A)),I=0;I=0?b=h(b):b=l(this.length)-h(_(b)),w=b;w"}},Ci}var Li,xo;function ih(){if(xo)return Li;xo=1;var o=rh(),l=/[\n\r\u2028\u2029]/g;return Li=function(i){var p=o(i);return p.length>100&&(p=p.slice(0,99)+"…"),p=p.replace(l,function(y){return JSON.stringify(y).slice(1,-1)}),p},Li}var Gt={exports:{}},bo;function So(){if(bo)return Gt.exports;bo=1,Gt.exports=o,Gt.exports.default=o;function o(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Gt.exports}var Ao;function uh(){if(Ao)return po;Ao=1;var o=so(),l=nh(),i=th(),p=ih(),y=So(),_=Ti(),h=Object.create,d=l("then","then:finally","done","done:finally");return Ne.promise=function(w,m){var b=h(null),q=h(null),F=h(null);if(w===!0)w=null;else if(w=i(w),!d[w])throw new TypeError("'"+p(w)+"' is not valid promise mode");m.on("set",function(C,D,M){var I=!1;if(!y(M)){q[C]=M,m.emit("setasync",C,1);return}b[C]=1,F[C]=M;var P=function(W){var U=b[C];if(I)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) -Consider to rely on 'then' or 'done' mode instead.`);U&&(delete b[C],q[C]=W,m.emit("setasync",C,U))},L=function(){I=!0,b[C]&&(delete b[C],delete F[C],m.delete(C))},A=w;if(A||(A="then"),A==="then"){var E=function(){_(L)};M=M.then(function(W){_(P.bind(this,W))},E),typeof M.finally=="function"&&M.finally(E)}else if(A==="done"){if(typeof M.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");M.done(P,L)}else if(A==="done:finally"){if(typeof M.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof M.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");M.done(P),M.finally(L)}}),m.on("get",function(C,D,M){var I;if(b[C]){++b[C];return}I=F[C];var P=function(){m.emit("getasync",C,D,M)};y(I)?typeof I.done=="function"?I.done(P):I.then(function(){_(P)}):P()}),m.on("delete",function(C){if(delete F[C],b[C]){delete b[C];return}if(hasOwnProperty.call(q,C)){var D=q[C];delete q[C],m.emit("deleteasync",C,[D])}}),m.on("clear",function(){var C=q;q=h(null),b=h(null),F=h(null),m.emit("clearasync",o(C,function(D){return[D]}))})},po}var Oo={},To;function fh(){if(To)return Oo;To=1;var o=we,l=Ft,i=Ne,p=Function.prototype.apply;return i.dispose=function(y,_,h){var d;if(o(y),h.async&&i.async||h.promise&&i.promise){_.on("deleteasync",d=function(w,m){p.call(y,null,m)}),_.on("clearasync",function(w){l(w,function(m,b){d(b,m)})});return}_.on("delete",d=function(w,m){y(m)}),_.on("clear",function(w){l(w,function(m,b){d(b,m)})})},Oo}var Io={},qi,Ro;function oh(){return Ro||(Ro=1,qi=2147483647),qi}var Mi,Eo;function ah(){if(Eo)return Mi;Eo=1;var o=Fe,l=oh();return Mi=function(i){if(i=o(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Mi}var Po;function lh(){if(Po)return Io;Po=1;var o=ci(),l=Ft,i=Ti(),p=So(),y=ah(),_=Ne,h=Function.prototype,d=Math.max,w=Math.min,m=Object.create;return _.maxAge=function(b,q,F){var C,D,M,I;b=y(b),b&&(C=m(null),D=F.async&&_.async||F.promise&&_.promise?"async":"",q.on("set"+D,function(P){C[P]=setTimeout(function(){q.delete(P)},b),typeof C[P].unref=="function"&&C[P].unref(),I&&(I[P]&&I[P]!=="nextTick"&&clearTimeout(I[P]),I[P]=setTimeout(function(){delete I[P]},M),typeof I[P].unref=="function"&&I[P].unref())}),q.on("delete"+D,function(P){clearTimeout(C[P]),delete C[P],I&&(I[P]!=="nextTick"&&clearTimeout(I[P]),delete I[P])}),F.preFetch&&(F.preFetch===!0||isNaN(F.preFetch)?M=.333:M=d(w(Number(F.preFetch),1),0),M&&(I={},M=(1-M)*b,q.on("get"+D,function(P,L,A){I[P]||(I[P]="nextTick",i(function(){var E;I[P]==="nextTick"&&(delete I[P],q.delete(P),F.async&&(L=o(L),L.push(h)),E=q.memoized.apply(A,L),F.promise&&p(E)&&(typeof E.done=="function"?E.done(h,h):E.then(h,h)))}))}))),q.on("clear"+D,function(){l(C,function(P){clearTimeout(P)}),C={},I&&(l(I,function(P){P!=="nextTick"&&clearTimeout(P)}),I={})}))},Io}var Co={},Fi,Lo;function sh(){if(Lo)return Fi;Lo=1;var o=Fe,l=Object.create,i=Object.prototype.hasOwnProperty;return Fi=function(p){var y=0,_=1,h=l(null),d=l(null),w=0,m;return p=o(p),{hit:function(b){var q=d[b],F=++w;if(h[F]=b,d[b]=F,!q)return++y,y<=p?void 0:(b=h[_],m(b),b);if(delete h[q],_===q)for(;!i.call(h,++_););},delete:m=function(b){var q=d[b];if(q&&(delete h[q],delete d[b],--y,_===q)){if(!y){w=0,_=1;return}for(;!i.call(h,++_););}},clear:function(){y=0,_=1,h=l(null),d=l(null),w=0}}},Fi}var qo;function ch(){if(qo)return Co;qo=1;var o=Fe,l=sh(),i=Ne;return i.max=function(p,y,_){var h,d,w;p=o(p),p&&(d=l(p),h=_.async&&i.async||_.promise&&i.promise?"async":"",y.on("set"+h,w=function(m){m=d.hit(m),m!==void 0&&y.delete(m)}),y.on("get"+h,w),y.on("delete"+h,d.delete),y.on("clear"+h,d.clear))},Co}var Mo={},Fo;function hh(){if(Fo)return Mo;Fo=1;var o=$e,l=Ne,i=Object.create,p=Object.defineProperties;return l.refCounter=function(y,_,h){var d,w;d=i(null),w=h.async&&l.async||h.promise&&l.promise?"async":"",_.on("set"+w,function(m,b){d[m]=b||1}),_.on("get"+w,function(m){++d[m]}),_.on("delete"+w,function(m){delete d[m]}),_.on("clear"+w,function(){d={}}),p(_.memoized,{deleteRef:o(function(){var m=_.get(arguments);return m===null||!d[m]?null:--d[m]?!1:(_.delete(m),!0)}),getRefCount:o(function(){var m=_.get(arguments);return m===null||!d[m]?0:d[m]})})},Mo}var ph=cf,gh=pf,vh=Hc,dh=function(o){var l=ph(arguments[1]),i;return l.normalizer||(i=l.length=gh(l.length,o.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=Kc():i>1&&(l.normalizer=Zc()(i)):i===!1?l.normalizer=Xc()():i===1?l.normalizer=Jc()():l.normalizer=jc()(i))),l.async&&kc(),l.promise&&uh(),l.dispose&&fh(),l.maxAge&&lh(),l.max&&ch(),l.refCounter&&hh(),vh(o,l)},_h=vs(dh);const mh=o=>async l=>{try{const i=await o(l);postMessage({result:i})}catch(i){postMessage({error:i})}};var zt={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */zt.exports,function(o,l){(function(){var i,p="4.17.21",y=200,_="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",d="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",m=500,b="__lodash_placeholder__",q=1,F=2,C=4,D=1,M=2,I=1,P=2,L=4,A=8,E=16,W=32,U=64,J=128,rn=256,Pn=512,gt=30,Kt="...",Wi=800,Zt=16,vt=1,Bi=2,Ui=3,Nn=1/0,wn=9007199254740991,De=17976931348623157e292,ae=NaN,$n=4294967295,Gi=$n-1,Vt=$n>>>1,Yt=[["ary",J],["bind",I],["bindKey",P],["curry",A],["curryRight",E],["flip",Pn],["partial",W],["partialRight",U],["rearg",rn]],le="[object Arguments]",xe="[object Array]",dt="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",xn="[object Function]",Se="[object GeneratorFunction]",dn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",_t="[object Promise]",Qt="[object Proxy]",an="[object RegExp]",_n="[object Set]",kn="[object String]",Xt="[object Symbol]",Rh="[object Undefined]",mt="[object WeakMap]",Eh="[object WeakSet]",yt="[object ArrayBuffer]",Je="[object DataView]",zi="[object Float32Array]",Hi="[object Float64Array]",Ki="[object Int8Array]",Zi="[object Int16Array]",Vi="[object Int32Array]",Yi="[object Uint8Array]",Qi="[object Uint8ClampedArray]",Xi="[object Uint16Array]",Ji="[object Uint32Array]",Ph=/\b__p \+= '';/g,Ch=/\b(__p \+=) '' \+/g,Lh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Bo=/&(?:amp|lt|gt|quot|#39);/g,Uo=/[&<>"']/g,qh=RegExp(Bo.source),Mh=RegExp(Uo.source),Fh=/<%-([\s\S]+?)%>/g,Nh=/<%([\s\S]+?)%>/g,Go=/<%=([\s\S]+?)%>/g,$h=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Dh=/^\w*$/,Wh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ji=/[\\^$.*+?()[\]{}|]/g,Bh=RegExp(ji.source),ki=/^\s+/,Uh=/\s/,Gh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,zh=/\{\n\/\* \[wrapped with (.+)\] \*/,Hh=/,? & /,Kh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zh=/[()=,{}\[\]\/\s]/,Vh=/\\(\\)?/g,Yh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,zo=/\w*$/,Qh=/^[-+]0x[0-9a-f]+$/i,Xh=/^0b[01]+$/i,Jh=/^\[object .+?Constructor\]$/,jh=/^0o[0-7]+$/i,kh=/^(?:0|[1-9]\d*)$/,np=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,ep=/['\n\r\u2028\u2029\\]/g,jt="\\ud800-\\udfff",tp="\\u0300-\\u036f",rp="\\ufe20-\\ufe2f",ip="\\u20d0-\\u20ff",Ho=tp+rp+ip,Ko="\\u2700-\\u27bf",Zo="a-z\\xdf-\\xf6\\xf8-\\xff",up="\\xac\\xb1\\xd7\\xf7",fp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",op="\\u2000-\\u206f",ap=" \\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",Vo="A-Z\\xc0-\\xd6\\xd8-\\xde",Yo="\\ufe0e\\ufe0f",Qo=up+fp+op+ap,nu="['’]",lp="["+jt+"]",Xo="["+Qo+"]",kt="["+Ho+"]",Jo="\\d+",sp="["+Ko+"]",jo="["+Zo+"]",ko="[^"+jt+Qo+Jo+Ko+Zo+Vo+"]",eu="\\ud83c[\\udffb-\\udfff]",cp="(?:"+kt+"|"+eu+")",na="[^"+jt+"]",tu="(?:\\ud83c[\\udde6-\\uddff]){2}",ru="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Vo+"]",ea="\\u200d",ta="(?:"+jo+"|"+ko+")",hp="(?:"+je+"|"+ko+")",ra="(?:"+nu+"(?:d|ll|m|re|s|t|ve))?",ia="(?:"+nu+"(?:D|LL|M|RE|S|T|VE))?",ua=cp+"?",fa="["+Yo+"]?",pp="(?:"+ea+"(?:"+[na,tu,ru].join("|")+")"+fa+ua+")*",gp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",vp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",oa=fa+ua+pp,dp="(?:"+[sp,tu,ru].join("|")+")"+oa,_p="(?:"+[na+kt+"?",kt,tu,ru,lp].join("|")+")",mp=RegExp(nu,"g"),yp=RegExp(kt,"g"),iu=RegExp(eu+"(?="+eu+")|"+_p+oa,"g"),wp=RegExp([je+"?"+jo+"+"+ra+"(?="+[Xo,je,"$"].join("|")+")",hp+"+"+ia+"(?="+[Xo,je+ta,"$"].join("|")+")",je+"?"+ta+"+"+ra,je+"+"+ia,vp,gp,Jo,dp].join("|"),"g"),xp=RegExp("["+ea+jt+Ho+Yo+"]"),bp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Sp=["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"],Ap=-1,ln={};ln[zi]=ln[Hi]=ln[Ki]=ln[Zi]=ln[Vi]=ln[Yi]=ln[Qi]=ln[Xi]=ln[Ji]=!0,ln[le]=ln[xe]=ln[yt]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[xn]=ln[dn]=ln[Cn]=ln[Hn]=ln[an]=ln[_n]=ln[kn]=ln[mt]=!1;var on={};on[le]=on[xe]=on[yt]=on[Je]=on[se]=on[be]=on[zi]=on[Hi]=on[Ki]=on[Zi]=on[Vi]=on[dn]=on[Cn]=on[Hn]=on[an]=on[_n]=on[kn]=on[Xt]=on[Yi]=on[Qi]=on[Xi]=on[Ji]=!0,on[ie]=on[xn]=on[mt]=!1;var Op={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Tp={"&":"&","<":"<",">":">",'"':""","'":"'"},Ip={"&":"&","<":"<",">":">",""":'"',"'":"'"},Rp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Ep=parseFloat,Pp=parseInt,aa=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Cp=typeof self=="object"&&self&&self.Object===Object&&self,Sn=aa||Cp||Function("return this")(),uu=l&&!l.nodeType&&l,We=uu&&!0&&o&&!o.nodeType&&o,la=We&&We.exports===uu,fu=la&&aa.process,Kn=function(){try{var g=We&&We.require&&We.require("util").types;return g||fu&&fu.binding&&fu.binding("util")}catch{}}(),sa=Kn&&Kn.isArrayBuffer,ca=Kn&&Kn.isDate,ha=Kn&&Kn.isMap,pa=Kn&&Kn.isRegExp,ga=Kn&&Kn.isSet,va=Kn&&Kn.isTypedArray;function Dn(g,S,x){switch(x.length){case 0:return g.call(S);case 1:return g.call(S,x[0]);case 2:return g.call(S,x[0],x[1]);case 3:return g.call(S,x[0],x[1],x[2])}return g.apply(S,x)}function Lp(g,S,x,$){for(var K=-1,nn=g==null?0:g.length;++K-1}function ou(g,S,x){for(var $=-1,K=g==null?0:g.length;++$-1;);return x}function Sa(g,S){for(var x=g.length;x--&&ke(S,g[x],0)>-1;);return x}function Up(g,S){for(var x=g.length,$=0;x--;)g[x]===S&&++$;return $}var Gp=cu(Op),zp=cu(Tp);function Hp(g){return"\\"+Rp[g]}function Kp(g,S){return g==null?i:g[S]}function nt(g){return xp.test(g)}function Zp(g){return bp.test(g)}function Vp(g){for(var S,x=[];!(S=g.next()).done;)x.push(S.value);return x}function vu(g){var S=-1,x=Array(g.size);return g.forEach(function($,K){x[++S]=[K,$]}),x}function Aa(g,S){return function(x){return g(S(x))}}function Ie(g,S){for(var x=-1,$=g.length,K=0,nn=[];++x<$;){var mn=g[x];(mn===S||mn===b)&&(g[x]=b,nn[K++]=x)}return nn}function tr(g){var S=-1,x=Array(g.size);return g.forEach(function($){x[++S]=$}),x}function Yp(g){var S=-1,x=Array(g.size);return g.forEach(function($){x[++S]=[$,$]}),x}function Qp(g,S,x){for(var $=x-1,K=g.length;++$-1}function Mg(n,e){var t=this.__data__,r=_r(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ce.prototype.clear=Pg,ce.prototype.delete=Cg,ce.prototype.get=Lg,ce.prototype.has=qg,ce.prototype.set=Mg;function he(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,u,a){var s,c=e&q,v=e&F,O=e&C;if(t&&(s=u?t(n,r,u,a):t(n)),s!==i)return s;if(!hn(n))return n;var T=Z(n);if(T){if(s=Dv(n),!c)return Ln(n,s)}else{var R=Tn(n),N=R==xn||R==Se;if(qe(n))return fl(n,c);if(R==Hn||R==le||N&&!u){if(s=v||N?{}:Ol(n),!c)return v?Iv(n,Xg(s,n)):Tv(n,Na(s,n))}else{if(!on[R])return u?n:{};s=Wv(n,R,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),ns(n)?n.forEach(function(H){s.add(Qn(H,e,t,H,n,a))}):jl(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,t,X,n,a))});var z=O?v?Uu:Bu:v?Mn:bn,Y=T?i:z(n);return Zn(Y||n,function(H,X){Y&&(X=H,H=n[X]),Tt(s,X,Qn(H,e,t,X,n,a))}),s}function Jg(n){var e=bn(n);return function(t){return $a(t,n,e)}}function $a(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var u=t[r],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function Da(n,e,t){if(typeof n!="function")throw new Vn(h);return qt(function(){n.apply(i,t)},e)}function It(n,e,t,r){var u=-1,a=nr,s=!0,c=n.length,v=[],O=e.length;if(!c)return v;t&&(e=sn(e,Wn(t))),r?(a=ou,s=!1):e.length>=y&&(a=wt,s=!1,e=new Ge(e));n:for(;++uu?0:u+t),r=r===i||r>u?u:V(r),r<0&&(r+=u),r=t>r?0:ts(r);t0&&t(c)?e>1?An(c,e-1,t,r,u):Te(u,c):r||(u[u.length]=c)}return u}var bu=hl(),Ua=hl(!0);function ue(n,e){return n&&bu(n,e,bn)}function Su(n,e){return n&&Ua(n,e,bn)}function yr(n,e){return Oe(e,function(t){return _e(n[t])})}function He(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function nv(n,e){return n!=null&&tn.call(n,e)}function ev(n,e){return n!=null&&e in fn(n)}function tv(n,e,t){return n>=On(e,t)&&n=120&&T.length>=120)?new Ge(s&&T):i}T=n[0];var R=-1,N=c[0];n:for(;++R-1;)c!==n&&sr.call(c,v,1),sr.call(n,v,1);return n}function ja(n,e){for(var t=n?e.length:0,r=t-1;t--;){var u=e[t];if(t==r||u!==a){var a=u;de(u)?sr.call(n,u,1):qu(n,u)}}return n}function Pu(n,e){return n+pr(La()*(e-n+1))}function vv(n,e,t,r){for(var u=-1,a=yn(hr((e-n)/(t||1)),0),s=x(a);a--;)s[r?a:++u]=n,n+=t;return s}function Cu(n,e){var t="";if(!n||e<1||e>wn)return t;do e%2&&(t+=n),e=pr(e/2),e&&(n+=n);while(e);return t}function Q(n,e){return Yu(Rl(n,e,Fn),n+"")}function dv(n){return Fa(ct(n))}function _v(n,e){var t=ct(n);return Pr(t,ze(e,0,t.length))}function Pt(n,e,t,r){if(!hn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),t=t>u?u:t,t<0&&(t+=u),u=e>t?0:t-e>>>0,e>>>=0;for(var a=x(u);++r>>1,s=n[a];s!==null&&!Un(s)&&(t?s<=e:s=y){var O=e?null:Cv(n);if(O)return tr(O);s=!1,u=wt,v=new Ge}else v=e?[]:c;n:for(;++r=r?n:Xn(n,e,t)}var ul=ag||function(n){return Sn.clearTimeout(n)};function fl(n,e){if(e)return n.slice();var t=n.length,r=Ia?Ia(t):new n.constructor(t);return n.copy(r),r}function $u(n){var e=new n.constructor(n.byteLength);return new ar(e).set(new ar(n)),e}function bv(n,e){var t=e?$u(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Sv(n){var e=new n.constructor(n.source,zo.exec(n));return e.lastIndex=n.lastIndex,e}function Av(n){return Ot?fn(Ot.call(n)):{}}function ol(n,e){var t=e?$u(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function al(n,e){if(n!==e){var t=n!==i,r=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,v=e===e,O=Un(e);if(!c&&!O&&!a&&n>e||a&&s&&v&&!c&&!O||r&&s&&v||!t&&v||!u)return 1;if(!r&&!a&&!O&&n=c)return v;var O=t[r];return v*(O=="desc"?-1:1)}}return n.index-e.index}function ll(n,e,t,r){for(var u=-1,a=n.length,s=t.length,c=-1,v=e.length,O=yn(a-s,0),T=x(v+O),R=!r;++c1?t[u-1]:i,s=u>2?t[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Rn(t[0],t[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++r-1?u[a?e[s]:s]:i}}function vl(n){return ve(function(e){var t=e.length,r=t,u=Yn.prototype.thru;for(n&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new Vn(h);if(u&&!s&&Rr(a)=="wrapper")var s=new Yn([],!0)}for(r=s?r:t;++r1&&k.reverse(),T&&vc))return!1;var O=a.get(n),T=a.get(e);if(O&&T)return O==e&&T==n;var R=-1,N=!0,B=t&M?new Ge:i;for(a.set(n,e),a.set(e,n);++R1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(Gh,`{ -/* [wrapped with `+e+`] */ -`)}function Uv(n){return Z(n)||Ve(n)||!!(Pa&&n&&n[Pa])}function de(n,e){var t=typeof n;return e=e??wn,!!e&&(t=="number"||t!="symbol"&&kh.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Wi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Pr(n,e){var t=-1,r=n.length,u=r-1;for(e=e===i?r:e;++t1?n[e-1]:i;return t=typeof t=="function"?(n.pop(),t):i,Bl(n,t)});function Ul(n){var e=f(n);return e.__chain__=!0,e}function jd(n,e){return e(n),n}function Cr(n,e){return e(n)}var kd=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,u=function(a){return xu(a,n)};return e>1||this.__actions__.length||!(r instanceof j)||!de(t)?this.thru(u):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Cr,args:[u],thisArg:i}),new Yn(r,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function n_(){return Ul(this)}function e_(){return new Yn(this.value(),this.__chain__)}function t_(){this.__values__===i&&(this.__values__=es(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function r_(){return this}function i_(n){for(var e,t=this;t instanceof dr;){var r=Ml(t);r.__index__=0,r.__values__=i,e?u.__wrapped__=r:e=r;var u=r;t=t.__wrapped__}return u.__wrapped__=n,e}function u_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Cr,args:[Qu],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(Qu)}function f_(){return rl(this.__wrapped__,this.__actions__)}var o_=Sr(function(n,e,t){tn.call(n,t)?++n[t]:pe(n,t,1)});function a_(n,e,t){var r=Z(n)?da:jg;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}function l_(n,e){var t=Z(n)?Oe:Ba;return t(n,G(e,3))}var s_=gl(Fl),c_=gl(Nl);function h_(n,e){return An(Lr(n,e),1)}function p_(n,e){return An(Lr(n,e),Nn)}function g_(n,e,t){return t=t===i?1:V(t),An(Lr(n,e),t)}function Gl(n,e){var t=Z(n)?Zn:Ee;return t(n,G(e,3))}function zl(n,e){var t=Z(n)?qp:Wa;return t(n,G(e,3))}var v_=Sr(function(n,e,t){tn.call(n,t)?n[t].push(e):pe(n,t,[e])});function d_(n,e,t,r){n=qn(n)?n:ct(n),t=t&&!r?V(t):0;var u=n.length;return t<0&&(t=yn(u+t,0)),$r(n)?t<=u&&n.indexOf(e,t)>-1:!!u&&ke(n,e,t)>-1}var __=Q(function(n,e,t){var r=-1,u=typeof e=="function",a=qn(n)?x(n.length):[];return Ee(n,function(s){a[++r]=u?Dn(e,s,t):Rt(s,e,t)}),a}),m_=Sr(function(n,e,t){pe(n,t,e)});function Lr(n,e){var t=Z(n)?sn:Za;return t(n,G(e,3))}function y_(n,e,t,r){return n==null?[]:(Z(e)||(e=e==null?[]:[e]),t=r?i:t,Z(t)||(t=t==null?[]:[t]),Xa(n,e,t))}var w_=Sr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function x_(n,e,t){var r=Z(n)?au:wa,u=arguments.length<3;return r(n,G(e,4),t,u,Ee)}function b_(n,e,t){var r=Z(n)?Mp:wa,u=arguments.length<3;return r(n,G(e,4),t,u,Wa)}function S_(n,e){var t=Z(n)?Oe:Ba;return t(n,Fr(G(e,3)))}function A_(n){var e=Z(n)?Fa:dv;return e(n)}function O_(n,e,t){(t?Rn(n,e,t):e===i)?e=1:e=V(e);var r=Z(n)?Vg:_v;return r(n,e)}function T_(n){var e=Z(n)?Yg:yv;return e(n)}function I_(n){if(n==null)return 0;if(qn(n))return $r(n)?et(n):n.length;var e=Tn(n);return e==dn||e==_n?n.size:Iu(n).length}function R_(n,e,t){var r=Z(n)?lu:wv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}var E_=Q(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Rn(n,e[0],e[1])?e=[]:t>2&&Rn(e[0],e[1],e[2])&&(e=[e[0]]),Xa(n,An(e,1),[])}),qr=lg||function(){return Sn.Date.now()};function P_(n,e){if(typeof e!="function")throw new Vn(h);return n=V(n),function(){if(--n<1)return e.apply(this,arguments)}}function Hl(n,e,t){return e=t?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function Kl(n,e){var t;if(typeof e!="function")throw new Vn(h);return n=V(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=i),t}}var Ju=Q(function(n,e,t){var r=I;if(t.length){var u=Ie(t,lt(Ju));r|=W}return ge(n,r,e,t,u)}),Zl=Q(function(n,e,t){var r=I|P;if(t.length){var u=Ie(t,lt(Zl));r|=W}return ge(e,r,n,t,u)});function Vl(n,e,t){e=t?i:e;var r=ge(n,A,i,i,i,i,i,e);return r.placeholder=Vl.placeholder,r}function Yl(n,e,t){e=t?i:e;var r=ge(n,E,i,i,i,i,i,e);return r.placeholder=Yl.placeholder,r}function Ql(n,e,t){var r,u,a,s,c,v,O=0,T=!1,R=!1,N=!0;if(typeof n!="function")throw new Vn(h);e=jn(e)||0,hn(t)&&(T=!!t.leading,R="maxWait"in t,a=R?yn(jn(t.maxWait)||0,e):a,N="trailing"in t?!!t.trailing:N);function B(vn){var re=r,ye=u;return r=u=i,O=vn,s=n.apply(ye,re),s}function z(vn){return O=vn,c=qt(X,e),T?B(vn):s}function Y(vn){var re=vn-v,ye=vn-O,gs=e-re;return R?On(gs,a-ye):gs}function H(vn){var re=vn-v,ye=vn-O;return v===i||re>=e||re<0||R&&ye>=a}function X(){var vn=qr();if(H(vn))return k(vn);c=qt(X,Y(vn))}function k(vn){return c=i,N&&r?B(vn):(r=u=i,s)}function Gn(){c!==i&&ul(c),O=0,r=v=u=c=i}function En(){return c===i?s:k(qr())}function zn(){var vn=qr(),re=H(vn);if(r=arguments,u=this,v=vn,re){if(c===i)return z(v);if(R)return ul(c),c=qt(X,e),B(v)}return c===i&&(c=qt(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var C_=Q(function(n,e){return Da(n,1,e)}),L_=Q(function(n,e,t){return Da(n,jn(e)||0,t)});function q_(n){return ge(n,Pn)}function Mr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Vn(h);var t=function(){var r=arguments,u=e?e.apply(this,r):r[0],a=t.cache;if(a.has(u))return a.get(u);var s=n.apply(this,r);return t.cache=a.set(u,s)||a,s};return t.cache=new(Mr.Cache||he),t}Mr.Cache=he;function Fr(n){if(typeof n!="function")throw new Vn(h);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function M_(n){return Kl(2,n)}var F_=xv(function(n,e){e=e.length==1&&Z(e[0])?sn(e[0],Wn(G())):sn(An(e,1),Wn(G()));var t=e.length;return Q(function(r){for(var u=-1,a=On(r.length,t);++u=e}),Ve=za(function(){return arguments}())?za:function(n){return pn(n)&&tn.call(n,"callee")&&!Ea.call(n,"callee")},Z=x.isArray,X_=sa?Wn(sa):iv;function qn(n){return n!=null&&Nr(n.length)&&!_e(n)}function gn(n){return pn(n)&&qn(n)}function J_(n){return n===!0||n===!1||pn(n)&&In(n)==se}var qe=cg||sf,j_=ca?Wn(ca):uv;function k_(n){return pn(n)&&n.nodeType===1&&!Mt(n)}function n0(n){if(n==null)return!0;if(qn(n)&&(Z(n)||typeof n=="string"||typeof n.splice=="function"||qe(n)||st(n)||Ve(n)))return!n.length;var e=Tn(n);if(e==dn||e==_n)return!n.size;if(Lt(n))return!Iu(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function e0(n,e){return Et(n,e)}function t0(n,e,t){t=typeof t=="function"?t:i;var r=t?t(n,e):i;return r===i?Et(n,e,i,t):!!r}function ku(n){if(!pn(n))return!1;var e=In(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Mt(n)}function r0(n){return typeof n=="number"&&Ca(n)}function _e(n){if(!hn(n))return!1;var e=In(n);return e==xn||e==Se||e==dt||e==Qt}function Jl(n){return typeof n=="number"&&n==V(n)}function Nr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wn}function hn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function pn(n){return n!=null&&typeof n=="object"}var jl=ha?Wn(ha):ov;function i0(n,e){return n===e||Tu(n,e,zu(e))}function u0(n,e,t){return t=typeof t=="function"?t:i,Tu(n,e,zu(e),t)}function f0(n){return kl(n)&&n!=+n}function o0(n){if(Hv(n))throw new K(_);return Ha(n)}function a0(n){return n===null}function l0(n){return n==null}function kl(n){return typeof n=="number"||pn(n)&&In(n)==Cn}function Mt(n){if(!pn(n)||In(n)!=Hn)return!1;var e=lr(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ur.call(t)==ug}var nf=pa?Wn(pa):av;function s0(n){return Jl(n)&&n>=-wn&&n<=wn}var ns=ga?Wn(ga):lv;function $r(n){return typeof n=="string"||!Z(n)&&pn(n)&&In(n)==kn}function Un(n){return typeof n=="symbol"||pn(n)&&In(n)==Xt}var st=va?Wn(va):sv;function c0(n){return n===i}function h0(n){return pn(n)&&Tn(n)==mt}function p0(n){return pn(n)&&In(n)==Eh}var g0=Ir(Ru),v0=Ir(function(n,e){return n<=e});function es(n){if(!n)return[];if(qn(n))return $r(n)?ne(n):Ln(n);if(xt&&n[xt])return Vp(n[xt]());var e=Tn(n),t=e==dn?vu:e==_n?tr:ct;return t(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*De}return n===n?n:0}function V(n){var e=me(n),t=e%1;return e===e?t?e-t:e:0}function ts(n){return n?ze(V(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(hn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=hn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=xa(n);var t=Xh.test(n);return t||jh.test(n)?Pp(n.slice(2),t?2:8):Qh.test(n)?ae:+n}function rs(n){return fe(n,Mn(n))}function d0(n){return n?ze(V(n),-wn,wn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var _0=ot(function(n,e){if(Lt(e)||qn(e)){fe(e,bn(e),n);return}for(var t in e)tn.call(e,t)&&Tt(n,t,e[t])}),is=ot(function(n,e){fe(e,Mn(e),n)}),Dr=ot(function(n,e,t,r){fe(e,Mn(e),n,r)}),m0=ot(function(n,e,t,r){fe(e,bn(e),n,r)}),y0=ve(xu);function w0(n,e){var t=ft(n);return e==null?t:Na(t,e)}var x0=Q(function(n,e){n=fn(n);var t=-1,r=e.length,u=r>2?e[2]:i;for(u&&Rn(e[0],e[1],u)&&(r=1);++t1),a}),fe(n,Uu(n),t),r&&(t=Qn(t,q|F|C,Lv));for(var u=e.length;u--;)qu(t,e[u]);return t});function W0(n,e){return fs(n,Fr(G(e)))}var B0=ve(function(n,e){return n==null?{}:pv(n,e)});function fs(n,e){if(n==null)return{};var t=sn(Uu(n),function(r){return[r]});return e=G(e),Ja(n,t,function(r,u){return e(r,u[0])})}function U0(n,e,t){e=Ce(e,n);var r=-1,u=e.length;for(u||(u=1,n=i);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var u=La();return On(n+u*(e-n+Ep("1e-"+((u+"").length-1))),e)}return Pu(n,e)}var j0=at(function(n,e,t){return e=e.toLowerCase(),n+(t?ls(e):e)});function ls(n){return rf(en(n).toLowerCase())}function ss(n){return n=en(n),n&&n.replace(np,Gp).replace(yp,"")}function k0(n,e,t){n=en(n),e=Bn(e);var r=n.length;t=t===i?r:ze(V(t),0,r);var u=t;return t-=e.length,t>=0&&n.slice(t,u)==e}function n1(n){return n=en(n),n&&Mh.test(n)?n.replace(Uo,zp):n}function e1(n){return n=en(n),n&&Bh.test(n)?n.replace(ji,"\\$&"):n}var t1=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),r1=at(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),i1=pl("toLowerCase");function u1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;if(!e||r>=e)return n;var u=(e-r)/2;return Tr(pr(u),t)+n+Tr(hr(u),t)}function f1(n,e,t){n=en(n),e=V(e);var r=e?et(n):0;return e&&r>>0,t?(n=en(n),n&&(typeof e=="string"||e!=null&&!nf(e))&&(e=Bn(e),!e&&nt(n))?Le(ne(n),0,t):n.split(e,t)):[]}var p1=at(function(n,e,t){return n+(t?" ":"")+rf(e)});function g1(n,e,t){return n=en(n),t=t==null?0:ze(V(t),0,n.length),e=Bn(e),n.slice(t,t+e.length)==e}function v1(n,e,t){var r=f.templateSettings;t&&Rn(n,e,t)&&(e=i),n=en(n),e=Dr({},e,r,wl);var u=Dr({},e.imports,r.imports,wl),a=bn(u),s=gu(u,a),c,v,O=0,T=e.interpolate||Jt,R="__p += '",N=du((e.escape||Jt).source+"|"+T.source+"|"+(T===Go?Yh:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),B="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Ap+"]")+` -`;n.replace(N,function(H,X,k,Gn,En,zn){return k||(k=Gn),R+=n.slice(O,zn).replace(ep,Hp),X&&(c=!0,R+=`' + -__e(`+X+`) + -'`),En&&(v=!0,R+=`'; -`+En+`; -__p += '`),k&&(R+=`' + -((__t = (`+k+`)) == null ? '' : __t) + -'`),O=zn+H.length,H}),R+=`'; -`;var z=tn.call(e,"variable")&&e.variable;if(!z)R=`with (obj) { -`+R+` -} -`;else if(Zh.test(z))throw new K(d);R=(v?R.replace(Ph,""):R).replace(Ch,"$1").replace(Lh,"$1;"),R="function("+(z||"obj")+`) { -`+(z?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(c?", __e = _.escape":"")+(v?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+R+`return __p -}`;var Y=hs(function(){return nn(a,B+"return "+R).apply(i,s)});if(Y.source=R,ku(Y))throw Y;return Y}function d1(n){return en(n).toLowerCase()}function _1(n){return en(n).toUpperCase()}function m1(n,e,t){if(n=en(n),n&&(t||e===i))return xa(n);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ne(e),a=ba(r,u),s=Sa(r,u)+1;return Le(r,a,s).join("")}function y1(n,e,t){if(n=en(n),n&&(t||e===i))return n.slice(0,Oa(n)+1);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Sa(r,ne(e))+1;return Le(r,0,u).join("")}function w1(n,e,t){if(n=en(n),n&&(t||e===i))return n.replace(ki,"");if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ba(r,ne(e));return Le(r,u).join("")}function x1(n,e){var t=gt,r=Kt;if(hn(e)){var u="separator"in e?e.separator:u;t="length"in e?V(e.length):t,r="omission"in e?Bn(e.omission):r}n=en(n);var a=n.length;if(nt(n)){var s=ne(n);a=s.length}if(t>=a)return n;var c=t-et(r);if(c<1)return r;var v=s?Le(s,0,c).join(""):n.slice(0,c);if(u===i)return v+r;if(s&&(c+=v.length-c),nf(u)){if(n.slice(c).search(u)){var O,T=v;for(u.global||(u=du(u.source,en(zo.exec(u))+"g")),u.lastIndex=0;O=u.exec(T);)var R=O.index;v=v.slice(0,R===i?c:R)}}else if(n.indexOf(Bn(u),c)!=c){var N=v.lastIndexOf(u);N>-1&&(v=v.slice(0,N))}return v+r}function b1(n){return n=en(n),n&&qh.test(n)?n.replace(Bo,Jp):n}var S1=at(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),rf=pl("toUpperCase");function cs(n,e,t){return n=en(n),e=t?i:e,e===i?Zp(n)?ng(n):$p(n):n.match(e)||[]}var hs=Q(function(n,e){try{return Dn(n,i,e)}catch(t){return ku(t)?t:new K(t)}}),A1=ve(function(n,e){return Zn(e,function(t){t=oe(t),pe(n,t,Ju(n[t],n))}),n});function O1(n){var e=n==null?0:n.length,t=G();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new Vn(h);return[t(r[0]),r[1]]}):[],Q(function(r){for(var u=-1;++uwn)return[];var t=$n,r=On(n,$n);e=G(e),n-=$n;for(var u=pu(r,e);++t0||e<0)?new j(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=V(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),u=f[r?"take"+(e=="last"?"Right":""):e],a=r||/^find/.test(e);u&&(f.prototype[e]=function(){var s=this.__wrapped__,c=r?[1]:arguments,v=s instanceof j,O=c[0],T=v||Z(s),R=function(X){var k=u.apply(f,Te([X],c));return r&&N?k[0]:k};T&&t&&typeof O=="function"&&O.length!=1&&(v=T=!1);var N=this.__chain__,B=!!this.__actions__.length,z=a&&!N,Y=v&&!B;if(!a&&T){s=Y?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Cr,args:[R],thisArg:i}),new Yn(H,N)}return z&&Y?n.apply(this,c):(H=this.thru(R),z?r?H.value()[0]:H.value():H)})}),Zn(["pop","push","shift","sort","splice","unshift"],function(n){var e=rr[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(Z(a)?a:[],u)}return this[t](function(s){return e.apply(Z(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var t=f[e];if(t){var r=t.name+"";tn.call(ut,r)||(ut[r]=[]),ut[r].push({name:e,func:t})}}),ut[Ar(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=bg,j.prototype.reverse=Sg,j.prototype.value=Ag,f.prototype.at=kd,f.prototype.chain=n_,f.prototype.commit=e_,f.prototype.next=t_,f.prototype.plant=i_,f.prototype.reverse=u_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=f_,f.prototype.first=f.prototype.head,xt&&(f.prototype[xt]=r_),f},tt=eg();We?((We.exports=tt)._=tt,uu._=tt):Sn._=tt}).call(Ye)}(zt,zt.exports);var cn=zt.exports;function Ni(o={},l){const i={};for(const p of Object.keys(o))i[p]=p==="$"?o[p]:l(o[p],p,o);return Object.setPrototypeOf(i,o)}var No={exports:{}};(function(o,l){(function(i,p){o.exports=p()})(Ye,function(){return function(i){function p(_){if(y[_])return y[_].exports;var h=y[_]={i:_,l:!1,exports:{}};return i[_].call(h.exports,h,h.exports,p),h.l=!0,h.exports}var y={};return p.m=i,p.c=y,p.d=function(_,h,d){p.o(_,h)||Object.defineProperty(_,h,{configurable:!1,enumerable:!0,get:d})},p.n=function(_){var h=_&&_.__esModule?function(){return _.default}:function(){return _};return p.d(h,"a",h),h},p.o=function(_,h){return Object.prototype.hasOwnProperty.call(_,h)},p.p="",p(p.s=1)}([function(i,p,y){function _(d){var w=d===void 0?{}:d,m=w.ESCAPE,b=m===void 0?/^\\/:m,q=w.VARIABLE_START,F=q===void 0?/^\${\s*/:q,C=w.VARIABLE_END,D=C===void 0?/^\s*}/:C,M=w.PIPE_START,I=M===void 0?/^\s*\|\s*/:M,P=w.PIPE_PARAMETER_START,L=P===void 0?/^\s*:\s*/:P,A=w.QUOTED_STRING,E=A===void 0?p.DEFAULT_QUOTED_STRING_REGEX:A,W=w.QUOTED_STRING_TEST,U=W===void 0?null:W,J=w.QUOTED_STRING_GET_AND_ADVANCE,rn=J===void 0?null:J,Pn=w.QUOTED_STRING_IN_PARAMETER_TEST,gt=Pn===void 0?null:Pn,Kt=w.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Wi=Kt===void 0?null:Kt,Zt=U||function(Nn){return E.test(Nn)},vt=rn||h(E),Bi=gt||function(Nn){return E.test(Nn)},Ui=Wi||h(E);return function(Nn){function wn(an){an===void 0&&(an=1),un=un.substr(an)}function De(an){an===void 0&&(an=/^/),wn(un.match(an)[0].length)}function ae(){var an;return De(b),an=un.length>0?un[0]:"",wn(),an}function $n(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;dn={name:"",pipes:[]},Hn=!kn}function Gi(){ie.variables.push(dn),$n({isNull:!0})}function Vt(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Cn={name:"",parameters:[]},_t=!kn}function Yt(){dn.pipes.push(Cn),Vt({isNull:!0})}function le(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Ae="",Qt=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function dt(){return!!D.test(un)&&(De(D),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&Gi(),xn=0,!0)}function se(){return!!I.test(un)&&(De(I),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&Vt(),xn=2,!0)}function be(){return!!L.test(un)&&(De(L),xn>=3&&xe(),xn>=2&&le(),xn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},xn=0,Se="",dn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,_t=!1,Qt=!1;un&&un.length>0;)switch(xn){case 0:if(b.test(un)){Se+=ae();continue}if(F.test(un)){xn=1,$n(),ie.literals.push(Se),Se="",De(F);continue}Se+=un[0],wn();break;case 1:if(b.test(un)){dn.name+=ae();continue}if(dt()||se())continue;if(Zt(un)){dn.name+=vt(un,wn);continue}dn.name+=un[0],wn();break;case 2:if(b.test(un)){Cn.name+=ae();continue}if(dt()||be()||se())continue;if(Zt(un)){Cn.name+=vt(un,wn);continue}Cn.name+=un[0],wn();break;case 3:if(b.test(un)){Ae+=ae();continue}if(dt()||be()||se())continue;if(Bi(un)){Ae+=Ui(un,wn);continue}Ae+=un[0],wn()}return Qt&&Cn.parameters.push(Ae),_t&&dn.pipes.push(Cn),Hn&&ie.variables.push(dn),ie.literals.push(Se),ie}}function h(d){return function(w,m){var b=w.match(d);return m(b[0].length),b.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(p,"__esModule",{value:!0}),p.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,p.parseStringTemplateGenerator=_,p.parseStringTemplate=_(),p.getQuotedStringAndAdvanceForRegex=h},function(i,p,y){i.exports=y(2)},function(i,p,y){function _(h){for(var d in h)p.hasOwnProperty(d)||(p[d]=h[d])}Object.defineProperty(p,"__esModule",{value:!0}),_(y(0)),_(y(3))},function(i,p,y){function _(b){return function(q){return b.hasOwnProperty(q)?b[q]:q.split(".").reduce(function(F,C){return F.hasOwnProperty(C)?F[C]:""},b)}}function h(b,q,F,C){C===void 0&&(C=_(q));var D=C(b.name);return b.pipes.reduce(function(M,I){return F.hasOwnProperty(I.name)?F[I.name](M,I.parameters):M},D??"")}function d(b,q,F,C){return C===void 0&&(C=_(q)),b.literals.length===0?"":b.literals.slice(1).reduce(function(D,M,I){return""+D+h(b.variables[I],q,F,C)+M},b.literals[0])}function w(b,q,F){return d(m.parseStringTemplate(b),q,F)}Object.defineProperty(p,"__esModule",{value:!0});var m=y(0);p.evaluateParsedString=d,p.evaluateStringTemplate=w}])})})(No);var $o=No.exports;const Do=o=>{const l=Function("$",`return ${o};`);return i=>l(new Proxy(Ht(i),{get(p,y){return typeof(p==null?void 0:p[y])=="function"?p[y]({}):p==null?void 0:p[y]}}))},yh=/^\{\{\s*/,wh=/^\s*\}\}/,$i=/\b\B/,xh=$o.parseStringTemplateGenerator({VARIABLE_START:yh,VARIABLE_END:wh,PIPE_START:$i,PIPE_PARAMETER_START:$i,QUOTED_STRING:$i}),bh=_h(o=>{const l=xh(o);return cn.join(l.literals,"")?i=>$o.evaluateParsedString(l,{},{},p=>Do(p)(i)):Do(l.variables[0].name)},{primitive:!0});function Xe(o){switch(o==null?void 0:o.constructor){case Array:{const l=cn.map(o,Xe);return i=>cn.map(l,p=>p(i))}case Object:{const l=cn.mapValues(o,Xe);return i=>cn.mapValues(l,p=>p(i))}case String:return bh(o);default:return()=>o}}function Ht(o={}){return Ni(o,l=>cn.isFunction(l)?l:Xe(l))}function Sh(o={}){return new Proxy(o,{get:(l,i)=>typeof l[i]=="function"?l[i]:()=>l[i]})}function Di(o,l){return Object.setPrototypeOf(Ni(l,i=>p=>i(o)),o)}function Ah(o){const{$for:l,...i}=o;if(l){const{$let:p="i",$from:y=0,$to:_=1,$step:h=1}=l,d=Xe(y),w=Xe(_),m=Xe(h);return(b={})=>cn.range(d(b),w(b),m(b)).map(q=>{const F=Di(b,Ht({[p]:q}));return Di(F,Ht(i))})}else return(p={})=>[Di(p,Ht(i))]}function Oh(o,l){const i=_=>{const{$:h}=_,d=Ah(_);return h in l?w=>cn.flatMap(d(w),m=>cn.flatMap(p[h],b=>b(m))):w=>cn.map(d(w),m=>Object.setPrototypeOf(Ni(m,b=>b(m)),null))},p=cn.mapValues(l,_=>cn.map(_,i)),y=cn.flatMap(o,i);return _=>cn.flatMap(y,h=>h(_))}const Th=o=>o==null,Wo=o=>o.display!=="transient";function Ih({trace:o,context:l,view:i="main",from:p=0,to:y=(_=>(_=o==null?void 0:o.events)==null?void 0:_.length)()??0}){var q,F,C,D;const h=Oh(((C=(F=(q=o==null?void 0:o.render)==null?void 0:q.views)==null?void 0:F[i])==null?void 0:C.components)??[],((D=o==null?void 0:o.render)==null?void 0:D.components)??{}),d=M=>M&&Object.hasOwn(M,"alpha")?M.alpha>0:!0,w=M=>I=>({component:I,meta:{source:"trace",step:p+M,info:I.$info}}),m=cn.chain(o==null?void 0:o.events).map((M,I)=>({step:I,id:M.id,data:M,pId:M.pId})).groupBy("id").value(),b=cn.chain(cn.range(p,y)).map(M=>{var W;const I=o.events[M],P=o.events,L=h(Sh({alpha:1,...l,step:M,parent:Th(I.pId)?void 0:P[((W=cn.findLast(m[I.pId],U=>U.step<=M))==null?void 0:W.step)??0],event:I,events:P})),A=L.filter(Wo),E=L.filter(cn.negate(Wo));return{persistent:A,transient:E}}).map(M=>cn.mapValues(M,I=>I.filter(d))).map((M,I)=>cn.mapValues(M,P=>P.map(w(I)))).value();return{stepsPersistent:cn.map(b,M=>M.persistent),stepsTransient:cn.map(b,M=>M.transient)}}onmessage=mh(async({data:o})=>Ih(o))})(); diff --git a/assets/parseTraceSlave.worker-R8bZvGE3.js b/assets/parseTraceSlave.worker-R8bZvGE3.js new file mode 100644 index 0000000..64c2373 --- /dev/null +++ b/assets/parseTraceSlave.worker-R8bZvGE3.js @@ -0,0 +1,28 @@ +(function(){"use strict";var Ye=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function _s(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var ms=function(){},ys=ms(),Me=function(o){return o!==ys&&o!==null},ws=Me,xs=Array.prototype.forEach,bs=Object.create,Ss=function(o,l){var i;for(i in o)l[i]=o[i]},hf=function(o){var l=bs(null);return xs.call(arguments,function(i){ws(i)&&Ss(Object(i),l)}),l},As=function(){var o=Math.sign;return typeof o!="function"?!1:o(10)===1&&o(-20)===-1},Wr,pf;function Os(){return pf||(pf=1,Wr=function(o){return o=Number(o),isNaN(o)||o===0?o:o>0?1:-1}),Wr}var Ts=As()?Math.sign:Os(),Is=Ts,Rs=Math.abs,Es=Math.floor,Ps=function(o){return isNaN(o)?0:(o=Number(o),o===0||!isFinite(o)?o:Is(o)*Es(Rs(o)))},Cs=Ps,Ls=Math.max,Fe=function(o){return Ls(0,Cs(o))},qs=Fe,gf=function(o,l,i){var p;return isNaN(o)?(p=l,p>=0?i&&p?p-1:p:1):o===!1?!1:qs(o)},we=function(o){if(typeof o!="function")throw new TypeError(o+" is not a function");return o},Br,vf;function Qe(){if(vf)return Br;vf=1;var o=Me;return Br=function(l){if(!o(l))throw new TypeError("Cannot use null or undefined");return l},Br}var Ms=we,Fs=Qe(),Ns=Function.prototype.bind,df=Function.prototype.call,$s=Object.keys,Ds=Object.prototype.propertyIsEnumerable,Ws=function(o,l){return function(i,p){var y,_=arguments[2],h=arguments[3];return i=Object(Fs(i)),Ms(p),y=$s(i),h&&y.sort(typeof h=="function"?Ns.call(h,i):void 0),typeof o!="function"&&(o=y[o]),df.call(o,y,function(d,w){return Ds.call(i,d)?df.call(p,_,i[d],d,i,w):l})}},Ft=Ws("forEach"),Ne={},_f={exports:{}},Bs=function(){var o=Object.assign,l;return typeof o!="function"?!1:(l={foo:"raz"},o(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")},Ur,mf;function Us(){return mf||(mf=1,Ur=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Ur}var Gr,yf;function Gs(){if(yf)return Gr;yf=1;var o=Me,l=Object.keys;return Gr=function(i){return l(o(i)?Object(i):i)},Gr}var zr,wf;function zs(){return wf||(wf=1,zr=Us()()?Object.keys:Gs()),zr}var Hr,xf;function Hs(){if(xf)return Hr;xf=1;var o=zs(),l=Qe(),i=Math.max;return Hr=function(p,y){var _,h,d=i(arguments.length,2),w;for(p=Object(l(p)),w=function(m){try{p[m]=y[m]}catch(b){_||(_=b)}},h=1;h-1},Zr}var lc=oc()?String.prototype.contains:ac(),$t=Rf,Pf=fc,Cf=bf,Lf=hf,ht=lc,sc=If.exports=function(o,l){var i,p,y,_,h;return arguments.length<2||typeof o!="string"?(_=l,l=o,o=null):_=arguments[2],$t(o)?(i=ht.call(o,"c"),p=ht.call(o,"e"),y=ht.call(o,"w")):(i=y=!0,p=!1),h={value:l,configurable:i,enumerable:p,writable:y},_?Cf(Lf(_),h):h};sc.gs=function(o,l,i){var p,y,_,h;return typeof o!="string"?(_=i,i=l,l=o,o=null):_=arguments[3],$t(l)?Pf(l)?$t(i)?Pf(i)||(_=i,i=void 0):i=void 0:(_=l,l=i=void 0):l=void 0,$t(o)?(p=ht.call(o,"c"),y=ht.call(o,"e")):(p=!0,y=!1),h={get:l,set:i,configurable:p,enumerable:y},_?Cf(Lf(_),h):h};var $e=If.exports,Yr={exports:{}};(function(o,l){var i=$e,p=we,y=Function.prototype.apply,_=Function.prototype.call,h=Object.create,d=Object.defineProperty,w=Object.defineProperties,m=Object.prototype.hasOwnProperty,b={configurable:!0,enumerable:!1,writable:!0},q,F,C,D,M,I,P;q=function(L,A){var E;return p(A),m.call(this,"__ee__")?E=this.__ee__:(E=b.value=h(null),d(this,"__ee__",b),b.value=null),E[L]?typeof E[L]=="object"?E[L].push(A):E[L]=[E[L],A]:E[L]=A,this},F=function(L,A){var E,W;return p(A),W=this,q.call(this,L,E=function(){C.call(W,L,E),y.call(A,this,arguments)}),E.__eeOnceListener__=A,this},C=function(L,A){var E,W,U,J;if(p(A),!m.call(this,"__ee__"))return this;if(E=this.__ee__,!E[L])return this;if(W=E[L],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?E[L]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete E[L];return this},D=function(L){var A,E,W,U,J;if(m.call(this,"__ee__")&&(U=this.__ee__[L],!!U))if(typeof U=="object"){for(E=arguments.length,J=new Array(E-1),A=1;A=55296&&E<=56319&&(rn+=F[++I])),rn=C?m.call(C,D,rn,P):rn,M?(b.value=rn,q(L,P,b)):L[P]=rn,++P;A=P}}if(A===void 0)for(A=p(F.length),M&&(L=new M(A)),I=0;I=0?b=h(b):b=l(this.length)-h(_(b)),w=b;w"}},Li}var qi,So;function uh(){if(So)return qi;So=1;var o=ih(),l=/[\n\r\u2028\u2029]/g;return qi=function(i){var p=o(i);return p.length>100&&(p=p.slice(0,99)+"…"),p=p.replace(l,function(y){return JSON.stringify(y).slice(1,-1)}),p},qi}var Gt={exports:{}},Ao;function Oo(){if(Ao)return Gt.exports;Ao=1,Gt.exports=o,Gt.exports.default=o;function o(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Gt.exports}var To;function fh(){if(To)return vo;To=1;var o=ho(),l=eh(),i=rh(),p=uh(),y=Oo(),_=Ii(),h=Object.create,d=l("then","then:finally","done","done:finally");return Ne.promise=function(w,m){var b=h(null),q=h(null),F=h(null);if(w===!0)w=null;else if(w=i(w),!d[w])throw new TypeError("'"+p(w)+"' is not valid promise mode");m.on("set",function(C,D,M){var I=!1;if(!y(M)){q[C]=M,m.emit("setasync",C,1);return}b[C]=1,F[C]=M;var P=function(W){var U=b[C];if(I)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);U&&(delete b[C],q[C]=W,m.emit("setasync",C,U))},L=function(){I=!0,b[C]&&(delete b[C],delete F[C],m.delete(C))},A=w;if(A||(A="then"),A==="then"){var E=function(){_(L)};M=M.then(function(W){_(P.bind(this,W))},E),typeof M.finally=="function"&&M.finally(E)}else if(A==="done"){if(typeof M.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");M.done(P,L)}else if(A==="done:finally"){if(typeof M.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof M.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");M.done(P),M.finally(L)}}),m.on("get",function(C,D,M){var I;if(b[C]){++b[C];return}I=F[C];var P=function(){m.emit("getasync",C,D,M)};y(I)?typeof I.done=="function"?I.done(P):I.then(function(){_(P)}):P()}),m.on("delete",function(C){if(delete F[C],b[C]){delete b[C];return}if(hasOwnProperty.call(q,C)){var D=q[C];delete q[C],m.emit("deleteasync",C,[D])}}),m.on("clear",function(){var C=q;q=h(null),b=h(null),F=h(null),m.emit("clearasync",o(C,function(D){return[D]}))})},vo}var Io={},Ro;function oh(){if(Ro)return Io;Ro=1;var o=we,l=Ft,i=Ne,p=Function.prototype.apply;return i.dispose=function(y,_,h){var d;if(o(y),h.async&&i.async||h.promise&&i.promise){_.on("deleteasync",d=function(w,m){p.call(y,null,m)}),_.on("clearasync",function(w){l(w,function(m,b){d(b,m)})});return}_.on("delete",d=function(w,m){y(m)}),_.on("clear",function(w){l(w,function(m,b){d(b,m)})})},Io}var Eo={},Mi,Po;function ah(){return Po||(Po=1,Mi=2147483647),Mi}var Fi,Co;function lh(){if(Co)return Fi;Co=1;var o=Fe,l=ah();return Fi=function(i){if(i=o(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Fi}var Lo;function sh(){if(Lo)return Eo;Lo=1;var o=hi(),l=Ft,i=Ii(),p=Oo(),y=lh(),_=Ne,h=Function.prototype,d=Math.max,w=Math.min,m=Object.create;return _.maxAge=function(b,q,F){var C,D,M,I;b=y(b),b&&(C=m(null),D=F.async&&_.async||F.promise&&_.promise?"async":"",q.on("set"+D,function(P){C[P]=setTimeout(function(){q.delete(P)},b),typeof C[P].unref=="function"&&C[P].unref(),I&&(I[P]&&I[P]!=="nextTick"&&clearTimeout(I[P]),I[P]=setTimeout(function(){delete I[P]},M),typeof I[P].unref=="function"&&I[P].unref())}),q.on("delete"+D,function(P){clearTimeout(C[P]),delete C[P],I&&(I[P]!=="nextTick"&&clearTimeout(I[P]),delete I[P])}),F.preFetch&&(F.preFetch===!0||isNaN(F.preFetch)?M=.333:M=d(w(Number(F.preFetch),1),0),M&&(I={},M=(1-M)*b,q.on("get"+D,function(P,L,A){I[P]||(I[P]="nextTick",i(function(){var E;I[P]==="nextTick"&&(delete I[P],q.delete(P),F.async&&(L=o(L),L.push(h)),E=q.memoized.apply(A,L),F.promise&&p(E)&&(typeof E.done=="function"?E.done(h,h):E.then(h,h)))}))}))),q.on("clear"+D,function(){l(C,function(P){clearTimeout(P)}),C={},I&&(l(I,function(P){P!=="nextTick"&&clearTimeout(P)}),I={})}))},Eo}var qo={},Ni,Mo;function ch(){if(Mo)return Ni;Mo=1;var o=Fe,l=Object.create,i=Object.prototype.hasOwnProperty;return Ni=function(p){var y=0,_=1,h=l(null),d=l(null),w=0,m;return p=o(p),{hit:function(b){var q=d[b],F=++w;if(h[F]=b,d[b]=F,!q)return++y,y<=p?void 0:(b=h[_],m(b),b);if(delete h[q],_===q)for(;!i.call(h,++_););},delete:m=function(b){var q=d[b];if(q&&(delete h[q],delete d[b],--y,_===q)){if(!y){w=0,_=1;return}for(;!i.call(h,++_););}},clear:function(){y=0,_=1,h=l(null),d=l(null),w=0}}},Ni}var Fo;function hh(){if(Fo)return qo;Fo=1;var o=Fe,l=ch(),i=Ne;return i.max=function(p,y,_){var h,d,w;p=o(p),p&&(d=l(p),h=_.async&&i.async||_.promise&&i.promise?"async":"",y.on("set"+h,w=function(m){m=d.hit(m),m!==void 0&&y.delete(m)}),y.on("get"+h,w),y.on("delete"+h,d.delete),y.on("clear"+h,d.clear))},qo}var No={},$o;function ph(){if($o)return No;$o=1;var o=$e,l=Ne,i=Object.create,p=Object.defineProperties;return l.refCounter=function(y,_,h){var d,w;d=i(null),w=h.async&&l.async||h.promise&&l.promise?"async":"",_.on("set"+w,function(m,b){d[m]=b||1}),_.on("get"+w,function(m){++d[m]}),_.on("delete"+w,function(m){delete d[m]}),_.on("clear"+w,function(){d={}}),p(_.memoized,{deleteRef:o(function(){var m=_.get(arguments);return m===null||!d[m]?null:--d[m]?!1:(_.delete(m),!0)}),getRefCount:o(function(){var m=_.get(arguments);return m===null||!d[m]?0:d[m]})})},No}var gh=hf,vh=gf,dh=Kc,_h=function(o){var l=gh(arguments[1]),i;return l.normalizer||(i=l.length=vh(l.length,o.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=Vc():i>1&&(l.normalizer=Zc()(i)):i===!1?l.normalizer=Jc()():i===1?l.normalizer=jc()():l.normalizer=kc()(i))),l.async&&nh(),l.promise&&fh(),l.dispose&&oh(),l.maxAge&&sh(),l.max&&hh(),l.refCounter&&ph(),dh(o,l)},mh=_s(_h);const yh=o=>async l=>{try{const i=await o(l);postMessage({result:i})}catch(i){postMessage({error:i})}};var zt={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */zt.exports,function(o,l){(function(){var i,p="4.17.21",y=200,_="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",d="Invalid `variable` option passed into `_.template`",w="__lodash_hash_undefined__",m=500,b="__lodash_placeholder__",q=1,F=2,C=4,D=1,M=2,I=1,P=2,L=4,A=8,E=16,W=32,U=64,J=128,rn=256,Pn=512,gt=30,Kt="...",Bi=800,Vt=16,vt=1,Ui=2,Gi=3,Nn=1/0,wn=9007199254740991,De=17976931348623157e292,ae=NaN,$n=4294967295,zi=$n-1,Zt=$n>>>1,Yt=[["ary",J],["bind",I],["bindKey",P],["curry",A],["curryRight",E],["flip",Pn],["partial",W],["partialRight",U],["rearg",rn]],le="[object Arguments]",xe="[object Array]",dt="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",xn="[object Function]",Se="[object GeneratorFunction]",dn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",_t="[object Promise]",Qt="[object Proxy]",an="[object RegExp]",_n="[object Set]",kn="[object String]",Xt="[object Symbol]",Eh="[object Undefined]",mt="[object WeakMap]",Ph="[object WeakSet]",yt="[object ArrayBuffer]",Je="[object DataView]",Hi="[object Float32Array]",Ki="[object Float64Array]",Vi="[object Int8Array]",Zi="[object Int16Array]",Yi="[object Int32Array]",Qi="[object Uint8Array]",Xi="[object Uint8ClampedArray]",Ji="[object Uint16Array]",ji="[object Uint32Array]",Ch=/\b__p \+= '';/g,Lh=/\b(__p \+=) '' \+/g,qh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Go=/&(?:amp|lt|gt|quot|#39);/g,zo=/[&<>"']/g,Mh=RegExp(Go.source),Fh=RegExp(zo.source),Nh=/<%-([\s\S]+?)%>/g,$h=/<%([\s\S]+?)%>/g,Ho=/<%=([\s\S]+?)%>/g,Dh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Wh=/^\w*$/,Bh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ki=/[\\^$.*+?()[\]{}|]/g,Uh=RegExp(ki.source),nu=/^\s+/,Gh=/\s/,zh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Hh=/\{\n\/\* \[wrapped with (.+)\] \*/,Kh=/,? & /,Vh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Zh=/[()=,{}\[\]\/\s]/,Yh=/\\(\\)?/g,Qh=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Ko=/\w*$/,Xh=/^[-+]0x[0-9a-f]+$/i,Jh=/^0b[01]+$/i,jh=/^\[object .+?Constructor\]$/,kh=/^0o[0-7]+$/i,np=/^(?:0|[1-9]\d*)$/,ep=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jt=/($^)/,tp=/['\n\r\u2028\u2029\\]/g,jt="\\ud800-\\udfff",rp="\\u0300-\\u036f",ip="\\ufe20-\\ufe2f",up="\\u20d0-\\u20ff",Vo=rp+ip+up,Zo="\\u2700-\\u27bf",Yo="a-z\\xdf-\\xf6\\xf8-\\xff",fp="\\xac\\xb1\\xd7\\xf7",op="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",ap="\\u2000-\\u206f",lp=" \\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",Qo="A-Z\\xc0-\\xd6\\xd8-\\xde",Xo="\\ufe0e\\ufe0f",Jo=fp+op+ap+lp,eu="['’]",sp="["+jt+"]",jo="["+Jo+"]",kt="["+Vo+"]",ko="\\d+",cp="["+Zo+"]",na="["+Yo+"]",ea="[^"+jt+Jo+ko+Zo+Yo+Qo+"]",tu="\\ud83c[\\udffb-\\udfff]",hp="(?:"+kt+"|"+tu+")",ta="[^"+jt+"]",ru="(?:\\ud83c[\\udde6-\\uddff]){2}",iu="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+Qo+"]",ra="\\u200d",ia="(?:"+na+"|"+ea+")",pp="(?:"+je+"|"+ea+")",ua="(?:"+eu+"(?:d|ll|m|re|s|t|ve))?",fa="(?:"+eu+"(?:D|LL|M|RE|S|T|VE))?",oa=hp+"?",aa="["+Xo+"]?",gp="(?:"+ra+"(?:"+[ta,ru,iu].join("|")+")"+aa+oa+")*",vp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",dp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",la=aa+oa+gp,_p="(?:"+[cp,ru,iu].join("|")+")"+la,mp="(?:"+[ta+kt+"?",kt,ru,iu,sp].join("|")+")",yp=RegExp(eu,"g"),wp=RegExp(kt,"g"),uu=RegExp(tu+"(?="+tu+")|"+mp+la,"g"),xp=RegExp([je+"?"+na+"+"+ua+"(?="+[jo,je,"$"].join("|")+")",pp+"+"+fa+"(?="+[jo,je+ia,"$"].join("|")+")",je+"?"+ia+"+"+ua,je+"+"+fa,dp,vp,ko,_p].join("|"),"g"),bp=RegExp("["+ra+jt+Vo+Xo+"]"),Sp=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ap=["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"],Op=-1,ln={};ln[Hi]=ln[Ki]=ln[Vi]=ln[Zi]=ln[Yi]=ln[Qi]=ln[Xi]=ln[Ji]=ln[ji]=!0,ln[le]=ln[xe]=ln[yt]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[xn]=ln[dn]=ln[Cn]=ln[Hn]=ln[an]=ln[_n]=ln[kn]=ln[mt]=!1;var on={};on[le]=on[xe]=on[yt]=on[Je]=on[se]=on[be]=on[Hi]=on[Ki]=on[Vi]=on[Zi]=on[Yi]=on[dn]=on[Cn]=on[Hn]=on[an]=on[_n]=on[kn]=on[Xt]=on[Qi]=on[Xi]=on[Ji]=on[ji]=!0,on[ie]=on[xn]=on[mt]=!1;var Tp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ip={"&":"&","<":"<",">":">",'"':""","'":"'"},Rp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Ep={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Pp=parseFloat,Cp=parseInt,sa=typeof Ye=="object"&&Ye&&Ye.Object===Object&&Ye,Lp=typeof self=="object"&&self&&self.Object===Object&&self,Sn=sa||Lp||Function("return this")(),fu=l&&!l.nodeType&&l,We=fu&&!0&&o&&!o.nodeType&&o,ca=We&&We.exports===fu,ou=ca&&sa.process,Kn=function(){try{var g=We&&We.require&&We.require("util").types;return g||ou&&ou.binding&&ou.binding("util")}catch{}}(),ha=Kn&&Kn.isArrayBuffer,pa=Kn&&Kn.isDate,ga=Kn&&Kn.isMap,va=Kn&&Kn.isRegExp,da=Kn&&Kn.isSet,_a=Kn&&Kn.isTypedArray;function Dn(g,S,x){switch(x.length){case 0:return g.call(S);case 1:return g.call(S,x[0]);case 2:return g.call(S,x[0],x[1]);case 3:return g.call(S,x[0],x[1],x[2])}return g.apply(S,x)}function qp(g,S,x,$){for(var K=-1,nn=g==null?0:g.length;++K-1}function au(g,S,x){for(var $=-1,K=g==null?0:g.length;++$-1;);return x}function Oa(g,S){for(var x=g.length;x--&&ke(S,g[x],0)>-1;);return x}function Gp(g,S){for(var x=g.length,$=0;x--;)g[x]===S&&++$;return $}var zp=hu(Tp),Hp=hu(Ip);function Kp(g){return"\\"+Ep[g]}function Vp(g,S){return g==null?i:g[S]}function nt(g){return bp.test(g)}function Zp(g){return Sp.test(g)}function Yp(g){for(var S,x=[];!(S=g.next()).done;)x.push(S.value);return x}function du(g){var S=-1,x=Array(g.size);return g.forEach(function($,K){x[++S]=[K,$]}),x}function Ta(g,S){return function(x){return g(S(x))}}function Ie(g,S){for(var x=-1,$=g.length,K=0,nn=[];++x<$;){var mn=g[x];(mn===S||mn===b)&&(g[x]=b,nn[K++]=x)}return nn}function tr(g){var S=-1,x=Array(g.size);return g.forEach(function($){x[++S]=$}),x}function Qp(g){var S=-1,x=Array(g.size);return g.forEach(function($){x[++S]=[$,$]}),x}function Xp(g,S,x){for(var $=x-1,K=g.length;++$-1}function Fg(n,e){var t=this.__data__,r=_r(t,n);return r<0?(++this.size,t.push([n,e])):t[r][1]=e,this}ce.prototype.clear=Cg,ce.prototype.delete=Lg,ce.prototype.get=qg,ce.prototype.has=Mg,ce.prototype.set=Fg;function he(n){var e=-1,t=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,t,r,u,a){var s,c=e&q,v=e&F,O=e&C;if(t&&(s=u?t(n,r,u,a):t(n)),s!==i)return s;if(!hn(n))return n;var T=V(n);if(T){if(s=Wv(n),!c)return Ln(n,s)}else{var R=Tn(n),N=R==xn||R==Se;if(qe(n))return al(n,c);if(R==Hn||R==le||N&&!u){if(s=v||N?{}:Il(n),!c)return v?Rv(n,Jg(s,n)):Iv(n,Da(s,n))}else{if(!on[R])return u?n:{};s=Bv(n,R,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),ts(n)?n.forEach(function(H){s.add(Qn(H,e,t,H,n,a))}):ns(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,t,X,n,a))});var z=O?v?Gu:Uu:v?Mn:bn,Y=T?i:z(n);return Vn(Y||n,function(H,X){Y&&(X=H,H=n[X]),Tt(s,X,Qn(H,e,t,X,n,a))}),s}function jg(n){var e=bn(n);return function(t){return Wa(t,n,e)}}function Wa(n,e,t){var r=t.length;if(n==null)return!r;for(n=fn(n);r--;){var u=t[r],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function Ba(n,e,t){if(typeof n!="function")throw new Zn(h);return qt(function(){n.apply(i,t)},e)}function It(n,e,t,r){var u=-1,a=nr,s=!0,c=n.length,v=[],O=e.length;if(!c)return v;t&&(e=sn(e,Wn(t))),r?(a=au,s=!1):e.length>=y&&(a=wt,s=!1,e=new Ge(e));n:for(;++uu?0:u+t),r=r===i||r>u?u:Z(r),r<0&&(r+=u),r=t>r?0:is(r);t0&&t(c)?e>1?An(c,e-1,t,r,u):Te(u,c):r||(u[u.length]=c)}return u}var Su=gl(),za=gl(!0);function ue(n,e){return n&&Su(n,e,bn)}function Au(n,e){return n&&za(n,e,bn)}function yr(n,e){return Oe(e,function(t){return _e(n[t])})}function He(n,e){e=Ce(e,n);for(var t=0,r=e.length;n!=null&&te}function ev(n,e){return n!=null&&tn.call(n,e)}function tv(n,e){return n!=null&&e in fn(n)}function rv(n,e,t){return n>=On(e,t)&&n=120&&T.length>=120)?new Ge(s&&T):i}T=n[0];var R=-1,N=c[0];n:for(;++R-1;)c!==n&&sr.call(c,v,1),sr.call(n,v,1);return n}function nl(n,e){for(var t=n?e.length:0,r=t-1;t--;){var u=e[t];if(t==r||u!==a){var a=u;de(u)?sr.call(n,u,1):Mu(n,u)}}return n}function Cu(n,e){return n+pr(Ma()*(e-n+1))}function dv(n,e,t,r){for(var u=-1,a=yn(hr((e-n)/(t||1)),0),s=x(a);a--;)s[r?a:++u]=n,n+=t;return s}function Lu(n,e){var t="";if(!n||e<1||e>wn)return t;do e%2&&(t+=n),e=pr(e/2),e&&(n+=n);while(e);return t}function Q(n,e){return Qu(Pl(n,e,Fn),n+"")}function _v(n){return $a(ct(n))}function mv(n,e){var t=ct(n);return Pr(t,ze(e,0,t.length))}function Pt(n,e,t,r){if(!hn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),t=t>u?u:t,t<0&&(t+=u),u=e>t?0:t-e>>>0,e>>>=0;for(var a=x(u);++r>>1,s=n[a];s!==null&&!Un(s)&&(t?s<=e:s=y){var O=e?null:Lv(n);if(O)return tr(O);s=!1,u=wt,v=new Ge}else v=e?[]:c;n:for(;++r=r?n:Xn(n,e,t)}var ol=lg||function(n){return Sn.clearTimeout(n)};function al(n,e){if(e)return n.slice();var t=n.length,r=Ea?Ea(t):new n.constructor(t);return n.copy(r),r}function Du(n){var e=new n.constructor(n.byteLength);return new ar(e).set(new ar(n)),e}function Sv(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.byteLength)}function Av(n){var e=new n.constructor(n.source,Ko.exec(n));return e.lastIndex=n.lastIndex,e}function Ov(n){return Ot?fn(Ot.call(n)):{}}function ll(n,e){var t=e?Du(n.buffer):n.buffer;return new n.constructor(t,n.byteOffset,n.length)}function sl(n,e){if(n!==e){var t=n!==i,r=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,v=e===e,O=Un(e);if(!c&&!O&&!a&&n>e||a&&s&&v&&!c&&!O||r&&s&&v||!t&&v||!u)return 1;if(!r&&!a&&!O&&n=c)return v;var O=t[r];return v*(O=="desc"?-1:1)}}return n.index-e.index}function cl(n,e,t,r){for(var u=-1,a=n.length,s=t.length,c=-1,v=e.length,O=yn(a-s,0),T=x(v+O),R=!r;++c1?t[u-1]:i,s=u>2?t[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Rn(t[0],t[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++r-1?u[a?e[s]:s]:i}}function _l(n){return ve(function(e){var t=e.length,r=t,u=Yn.prototype.thru;for(n&&e.reverse();r--;){var a=e[r];if(typeof a!="function")throw new Zn(h);if(u&&!s&&Rr(a)=="wrapper")var s=new Yn([],!0)}for(r=s?r:t;++r1&&k.reverse(),T&&vc))return!1;var O=a.get(n),T=a.get(e);if(O&&T)return O==e&&T==n;var R=-1,N=!0,B=t&M?new Ge:i;for(a.set(n,e),a.set(e,n);++R1?"& ":"")+e[r],e=e.join(t>2?", ":" "),n.replace(zh,`{ +/* [wrapped with `+e+`] */ +`)}function Gv(n){return V(n)||Ze(n)||!!(La&&n&&n[La])}function de(n,e){var t=typeof n;return e=e??wn,!!e&&(t=="number"||t!="symbol"&&np.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Bi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Pr(n,e){var t=-1,r=n.length,u=r-1;for(e=e===i?r:e;++t1?n[e-1]:i;return t=typeof t=="function"?(n.pop(),t):i,Gl(n,t)});function zl(n){var e=f(n);return e.__chain__=!0,e}function kd(n,e){return e(n),n}function Cr(n,e){return e(n)}var n_=ve(function(n){var e=n.length,t=e?n[0]:0,r=this.__wrapped__,u=function(a){return bu(a,n)};return e>1||this.__actions__.length||!(r instanceof j)||!de(t)?this.thru(u):(r=r.slice(t,+t+(e?1:0)),r.__actions__.push({func:Cr,args:[u],thisArg:i}),new Yn(r,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function e_(){return zl(this)}function t_(){return new Yn(this.value(),this.__chain__)}function r_(){this.__values__===i&&(this.__values__=rs(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function i_(){return this}function u_(n){for(var e,t=this;t instanceof dr;){var r=Nl(t);r.__index__=0,r.__values__=i,e?u.__wrapped__=r:e=r;var u=r;t=t.__wrapped__}return u.__wrapped__=n,e}function f_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Cr,args:[Xu],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(Xu)}function o_(){return ul(this.__wrapped__,this.__actions__)}var a_=Sr(function(n,e,t){tn.call(n,t)?++n[t]:pe(n,t,1)});function l_(n,e,t){var r=V(n)?ma:kg;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}function s_(n,e){var t=V(n)?Oe:Ga;return t(n,G(e,3))}var c_=dl($l),h_=dl(Dl);function p_(n,e){return An(Lr(n,e),1)}function g_(n,e){return An(Lr(n,e),Nn)}function v_(n,e,t){return t=t===i?1:Z(t),An(Lr(n,e),t)}function Hl(n,e){var t=V(n)?Vn:Ee;return t(n,G(e,3))}function Kl(n,e){var t=V(n)?Mp:Ua;return t(n,G(e,3))}var d_=Sr(function(n,e,t){tn.call(n,t)?n[t].push(e):pe(n,t,[e])});function __(n,e,t,r){n=qn(n)?n:ct(n),t=t&&!r?Z(t):0;var u=n.length;return t<0&&(t=yn(u+t,0)),$r(n)?t<=u&&n.indexOf(e,t)>-1:!!u&&ke(n,e,t)>-1}var m_=Q(function(n,e,t){var r=-1,u=typeof e=="function",a=qn(n)?x(n.length):[];return Ee(n,function(s){a[++r]=u?Dn(e,s,t):Rt(s,e,t)}),a}),y_=Sr(function(n,e,t){pe(n,t,e)});function Lr(n,e){var t=V(n)?sn:Ya;return t(n,G(e,3))}function w_(n,e,t,r){return n==null?[]:(V(e)||(e=e==null?[]:[e]),t=r?i:t,V(t)||(t=t==null?[]:[t]),ja(n,e,t))}var x_=Sr(function(n,e,t){n[t?0:1].push(e)},function(){return[[],[]]});function b_(n,e,t){var r=V(n)?lu:ba,u=arguments.length<3;return r(n,G(e,4),t,u,Ee)}function S_(n,e,t){var r=V(n)?Fp:ba,u=arguments.length<3;return r(n,G(e,4),t,u,Ua)}function A_(n,e){var t=V(n)?Oe:Ga;return t(n,Fr(G(e,3)))}function O_(n){var e=V(n)?$a:_v;return e(n)}function T_(n,e,t){(t?Rn(n,e,t):e===i)?e=1:e=Z(e);var r=V(n)?Yg:mv;return r(n,e)}function I_(n){var e=V(n)?Qg:wv;return e(n)}function R_(n){if(n==null)return 0;if(qn(n))return $r(n)?et(n):n.length;var e=Tn(n);return e==dn||e==_n?n.size:Ru(n).length}function E_(n,e,t){var r=V(n)?su:xv;return t&&Rn(n,e,t)&&(e=i),r(n,G(e,3))}var P_=Q(function(n,e){if(n==null)return[];var t=e.length;return t>1&&Rn(n,e[0],e[1])?e=[]:t>2&&Rn(e[0],e[1],e[2])&&(e=[e[0]]),ja(n,An(e,1),[])}),qr=sg||function(){return Sn.Date.now()};function C_(n,e){if(typeof e!="function")throw new Zn(h);return n=Z(n),function(){if(--n<1)return e.apply(this,arguments)}}function Vl(n,e,t){return e=t?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function Zl(n,e){var t;if(typeof e!="function")throw new Zn(h);return n=Z(n),function(){return--n>0&&(t=e.apply(this,arguments)),n<=1&&(e=i),t}}var ju=Q(function(n,e,t){var r=I;if(t.length){var u=Ie(t,lt(ju));r|=W}return ge(n,r,e,t,u)}),Yl=Q(function(n,e,t){var r=I|P;if(t.length){var u=Ie(t,lt(Yl));r|=W}return ge(e,r,n,t,u)});function Ql(n,e,t){e=t?i:e;var r=ge(n,A,i,i,i,i,i,e);return r.placeholder=Ql.placeholder,r}function Xl(n,e,t){e=t?i:e;var r=ge(n,E,i,i,i,i,i,e);return r.placeholder=Xl.placeholder,r}function Jl(n,e,t){var r,u,a,s,c,v,O=0,T=!1,R=!1,N=!0;if(typeof n!="function")throw new Zn(h);e=jn(e)||0,hn(t)&&(T=!!t.leading,R="maxWait"in t,a=R?yn(jn(t.maxWait)||0,e):a,N="trailing"in t?!!t.trailing:N);function B(vn){var re=r,ye=u;return r=u=i,O=vn,s=n.apply(ye,re),s}function z(vn){return O=vn,c=qt(X,e),T?B(vn):s}function Y(vn){var re=vn-v,ye=vn-O,ds=e-re;return R?On(ds,a-ye):ds}function H(vn){var re=vn-v,ye=vn-O;return v===i||re>=e||re<0||R&&ye>=a}function X(){var vn=qr();if(H(vn))return k(vn);c=qt(X,Y(vn))}function k(vn){return c=i,N&&r?B(vn):(r=u=i,s)}function Gn(){c!==i&&ol(c),O=0,r=v=u=c=i}function En(){return c===i?s:k(qr())}function zn(){var vn=qr(),re=H(vn);if(r=arguments,u=this,v=vn,re){if(c===i)return z(v);if(R)return ol(c),c=qt(X,e),B(v)}return c===i&&(c=qt(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var L_=Q(function(n,e){return Ba(n,1,e)}),q_=Q(function(n,e,t){return Ba(n,jn(e)||0,t)});function M_(n){return ge(n,Pn)}function Mr(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Zn(h);var t=function(){var r=arguments,u=e?e.apply(this,r):r[0],a=t.cache;if(a.has(u))return a.get(u);var s=n.apply(this,r);return t.cache=a.set(u,s)||a,s};return t.cache=new(Mr.Cache||he),t}Mr.Cache=he;function Fr(n){if(typeof n!="function")throw new Zn(h);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function F_(n){return Zl(2,n)}var N_=bv(function(n,e){e=e.length==1&&V(e[0])?sn(e[0],Wn(G())):sn(An(e,1),Wn(G()));var t=e.length;return Q(function(r){for(var u=-1,a=On(r.length,t);++u=e}),Ze=Ka(function(){return arguments}())?Ka:function(n){return pn(n)&&tn.call(n,"callee")&&!Ca.call(n,"callee")},V=x.isArray,J_=ha?Wn(ha):uv;function qn(n){return n!=null&&Nr(n.length)&&!_e(n)}function gn(n){return pn(n)&&qn(n)}function j_(n){return n===!0||n===!1||pn(n)&&In(n)==se}var qe=hg||cf,k_=pa?Wn(pa):fv;function n0(n){return pn(n)&&n.nodeType===1&&!Mt(n)}function e0(n){if(n==null)return!0;if(qn(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||qe(n)||st(n)||Ze(n)))return!n.length;var e=Tn(n);if(e==dn||e==_n)return!n.size;if(Lt(n))return!Ru(n).length;for(var t in n)if(tn.call(n,t))return!1;return!0}function t0(n,e){return Et(n,e)}function r0(n,e,t){t=typeof t=="function"?t:i;var r=t?t(n,e):i;return r===i?Et(n,e,i,t):!!r}function nf(n){if(!pn(n))return!1;var e=In(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Mt(n)}function i0(n){return typeof n=="number"&&qa(n)}function _e(n){if(!hn(n))return!1;var e=In(n);return e==xn||e==Se||e==dt||e==Qt}function kl(n){return typeof n=="number"&&n==Z(n)}function Nr(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wn}function hn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function pn(n){return n!=null&&typeof n=="object"}var ns=ga?Wn(ga):av;function u0(n,e){return n===e||Iu(n,e,Hu(e))}function f0(n,e,t){return t=typeof t=="function"?t:i,Iu(n,e,Hu(e),t)}function o0(n){return es(n)&&n!=+n}function a0(n){if(Kv(n))throw new K(_);return Va(n)}function l0(n){return n===null}function s0(n){return n==null}function es(n){return typeof n=="number"||pn(n)&&In(n)==Cn}function Mt(n){if(!pn(n)||In(n)!=Hn)return!1;var e=lr(n);if(e===null)return!0;var t=tn.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&ur.call(t)==fg}var ef=va?Wn(va):lv;function c0(n){return kl(n)&&n>=-wn&&n<=wn}var ts=da?Wn(da):sv;function $r(n){return typeof n=="string"||!V(n)&&pn(n)&&In(n)==kn}function Un(n){return typeof n=="symbol"||pn(n)&&In(n)==Xt}var st=_a?Wn(_a):cv;function h0(n){return n===i}function p0(n){return pn(n)&&Tn(n)==mt}function g0(n){return pn(n)&&In(n)==Ph}var v0=Ir(Eu),d0=Ir(function(n,e){return n<=e});function rs(n){if(!n)return[];if(qn(n))return $r(n)?ne(n):Ln(n);if(xt&&n[xt])return Yp(n[xt]());var e=Tn(n),t=e==dn?du:e==_n?tr:ct;return t(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*De}return n===n?n:0}function Z(n){var e=me(n),t=e%1;return e===e?t?e-t:e:0}function is(n){return n?ze(Z(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(hn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=hn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Sa(n);var t=Jh.test(n);return t||kh.test(n)?Cp(n.slice(2),t?2:8):Xh.test(n)?ae:+n}function us(n){return fe(n,Mn(n))}function _0(n){return n?ze(Z(n),-wn,wn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var m0=ot(function(n,e){if(Lt(e)||qn(e)){fe(e,bn(e),n);return}for(var t in e)tn.call(e,t)&&Tt(n,t,e[t])}),fs=ot(function(n,e){fe(e,Mn(e),n)}),Dr=ot(function(n,e,t,r){fe(e,Mn(e),n,r)}),y0=ot(function(n,e,t,r){fe(e,bn(e),n,r)}),w0=ve(bu);function x0(n,e){var t=ft(n);return e==null?t:Da(t,e)}var b0=Q(function(n,e){n=fn(n);var t=-1,r=e.length,u=r>2?e[2]:i;for(u&&Rn(e[0],e[1],u)&&(r=1);++t1),a}),fe(n,Gu(n),t),r&&(t=Qn(t,q|F|C,qv));for(var u=e.length;u--;)Mu(t,e[u]);return t});function B0(n,e){return as(n,Fr(G(e)))}var U0=ve(function(n,e){return n==null?{}:gv(n,e)});function as(n,e){if(n==null)return{};var t=sn(Gu(n),function(r){return[r]});return e=G(e),ka(n,t,function(r,u){return e(r,u[0])})}function G0(n,e,t){e=Ce(e,n);var r=-1,u=e.length;for(u||(u=1,n=i);++re){var r=n;n=e,e=r}if(t||n%1||e%1){var u=Ma();return On(n+u*(e-n+Pp("1e-"+((u+"").length-1))),e)}return Cu(n,e)}var k0=at(function(n,e,t){return e=e.toLowerCase(),n+(t?cs(e):e)});function cs(n){return uf(en(n).toLowerCase())}function hs(n){return n=en(n),n&&n.replace(ep,zp).replace(wp,"")}function n1(n,e,t){n=en(n),e=Bn(e);var r=n.length;t=t===i?r:ze(Z(t),0,r);var u=t;return t-=e.length,t>=0&&n.slice(t,u)==e}function e1(n){return n=en(n),n&&Fh.test(n)?n.replace(zo,Hp):n}function t1(n){return n=en(n),n&&Uh.test(n)?n.replace(ki,"\\$&"):n}var r1=at(function(n,e,t){return n+(t?"-":"")+e.toLowerCase()}),i1=at(function(n,e,t){return n+(t?" ":"")+e.toLowerCase()}),u1=vl("toLowerCase");function f1(n,e,t){n=en(n),e=Z(e);var r=e?et(n):0;if(!e||r>=e)return n;var u=(e-r)/2;return Tr(pr(u),t)+n+Tr(hr(u),t)}function o1(n,e,t){n=en(n),e=Z(e);var r=e?et(n):0;return e&&r>>0,t?(n=en(n),n&&(typeof e=="string"||e!=null&&!ef(e))&&(e=Bn(e),!e&&nt(n))?Le(ne(n),0,t):n.split(e,t)):[]}var g1=at(function(n,e,t){return n+(t?" ":"")+uf(e)});function v1(n,e,t){return n=en(n),t=t==null?0:ze(Z(t),0,n.length),e=Bn(e),n.slice(t,t+e.length)==e}function d1(n,e,t){var r=f.templateSettings;t&&Rn(n,e,t)&&(e=i),n=en(n),e=Dr({},e,r,bl);var u=Dr({},e.imports,r.imports,bl),a=bn(u),s=vu(u,a),c,v,O=0,T=e.interpolate||Jt,R="__p += '",N=_u((e.escape||Jt).source+"|"+T.source+"|"+(T===Ho?Qh:Jt).source+"|"+(e.evaluate||Jt).source+"|$","g"),B="//# sourceURL="+(tn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Op+"]")+` +`;n.replace(N,function(H,X,k,Gn,En,zn){return k||(k=Gn),R+=n.slice(O,zn).replace(tp,Kp),X&&(c=!0,R+=`' + +__e(`+X+`) + +'`),En&&(v=!0,R+=`'; +`+En+`; +__p += '`),k&&(R+=`' + +((__t = (`+k+`)) == null ? '' : __t) + +'`),O=zn+H.length,H}),R+=`'; +`;var z=tn.call(e,"variable")&&e.variable;if(!z)R=`with (obj) { +`+R+` +} +`;else if(Zh.test(z))throw new K(d);R=(v?R.replace(Ch,""):R).replace(Lh,"$1").replace(qh,"$1;"),R="function("+(z||"obj")+`) { +`+(z?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(c?", __e = _.escape":"")+(v?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+R+`return __p +}`;var Y=gs(function(){return nn(a,B+"return "+R).apply(i,s)});if(Y.source=R,nf(Y))throw Y;return Y}function _1(n){return en(n).toLowerCase()}function m1(n){return en(n).toUpperCase()}function y1(n,e,t){if(n=en(n),n&&(t||e===i))return Sa(n);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=ne(e),a=Aa(r,u),s=Oa(r,u)+1;return Le(r,a,s).join("")}function w1(n,e,t){if(n=en(n),n&&(t||e===i))return n.slice(0,Ia(n)+1);if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Oa(r,ne(e))+1;return Le(r,0,u).join("")}function x1(n,e,t){if(n=en(n),n&&(t||e===i))return n.replace(nu,"");if(!n||!(e=Bn(e)))return n;var r=ne(n),u=Aa(r,ne(e));return Le(r,u).join("")}function b1(n,e){var t=gt,r=Kt;if(hn(e)){var u="separator"in e?e.separator:u;t="length"in e?Z(e.length):t,r="omission"in e?Bn(e.omission):r}n=en(n);var a=n.length;if(nt(n)){var s=ne(n);a=s.length}if(t>=a)return n;var c=t-et(r);if(c<1)return r;var v=s?Le(s,0,c).join(""):n.slice(0,c);if(u===i)return v+r;if(s&&(c+=v.length-c),ef(u)){if(n.slice(c).search(u)){var O,T=v;for(u.global||(u=_u(u.source,en(Ko.exec(u))+"g")),u.lastIndex=0;O=u.exec(T);)var R=O.index;v=v.slice(0,R===i?c:R)}}else if(n.indexOf(Bn(u),c)!=c){var N=v.lastIndexOf(u);N>-1&&(v=v.slice(0,N))}return v+r}function S1(n){return n=en(n),n&&Mh.test(n)?n.replace(Go,jp):n}var A1=at(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),uf=vl("toUpperCase");function ps(n,e,t){return n=en(n),e=t?i:e,e===i?Zp(n)?eg(n):Dp(n):n.match(e)||[]}var gs=Q(function(n,e){try{return Dn(n,i,e)}catch(t){return nf(t)?t:new K(t)}}),O1=ve(function(n,e){return Vn(e,function(t){t=oe(t),pe(n,t,ju(n[t],n))}),n});function T1(n){var e=n==null?0:n.length,t=G();return n=e?sn(n,function(r){if(typeof r[1]!="function")throw new Zn(h);return[t(r[0]),r[1]]}):[],Q(function(r){for(var u=-1;++uwn)return[];var t=$n,r=On(n,$n);e=G(e),n-=$n;for(var u=gu(r,e);++t0||e<0)?new j(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==i&&(e=Z(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),u=f[r?"take"+(e=="last"?"Right":""):e],a=r||/^find/.test(e);u&&(f.prototype[e]=function(){var s=this.__wrapped__,c=r?[1]:arguments,v=s instanceof j,O=c[0],T=v||V(s),R=function(X){var k=u.apply(f,Te([X],c));return r&&N?k[0]:k};T&&t&&typeof O=="function"&&O.length!=1&&(v=T=!1);var N=this.__chain__,B=!!this.__actions__.length,z=a&&!N,Y=v&&!B;if(!a&&T){s=Y?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Cr,args:[R],thisArg:i}),new Yn(H,N)}return z&&Y?n.apply(this,c):(H=this.thru(R),z?r?H.value()[0]:H.value():H)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(n){var e=rr[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var u=arguments;if(r&&!this.__chain__){var a=this.value();return e.apply(V(a)?a:[],u)}return this[t](function(s){return e.apply(V(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var t=f[e];if(t){var r=t.name+"";tn.call(ut,r)||(ut[r]=[]),ut[r].push({name:e,func:t})}}),ut[Ar(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=Sg,j.prototype.reverse=Ag,j.prototype.value=Og,f.prototype.at=n_,f.prototype.chain=e_,f.prototype.commit=t_,f.prototype.next=r_,f.prototype.plant=u_,f.prototype.reverse=f_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=o_,f.prototype.first=f.prototype.head,xt&&(f.prototype[xt]=i_),f},tt=tg();We?((We.exports=tt)._=tt,fu._=tt):Sn._=tt}).call(Ye)}(zt,zt.exports);var cn=zt.exports;function $i(o={},l){const i={};for(const p of Object.keys(o))i[p]=p==="$"?o[p]:l(o[p],p,o);return Object.setPrototypeOf(i,o)}var Do={exports:{}};(function(o,l){(function(i,p){o.exports=p()})(Ye,function(){return function(i){function p(_){if(y[_])return y[_].exports;var h=y[_]={i:_,l:!1,exports:{}};return i[_].call(h.exports,h,h.exports,p),h.l=!0,h.exports}var y={};return p.m=i,p.c=y,p.d=function(_,h,d){p.o(_,h)||Object.defineProperty(_,h,{configurable:!1,enumerable:!0,get:d})},p.n=function(_){var h=_&&_.__esModule?function(){return _.default}:function(){return _};return p.d(h,"a",h),h},p.o=function(_,h){return Object.prototype.hasOwnProperty.call(_,h)},p.p="",p(p.s=1)}([function(i,p,y){function _(d){var w=d===void 0?{}:d,m=w.ESCAPE,b=m===void 0?/^\\/:m,q=w.VARIABLE_START,F=q===void 0?/^\${\s*/:q,C=w.VARIABLE_END,D=C===void 0?/^\s*}/:C,M=w.PIPE_START,I=M===void 0?/^\s*\|\s*/:M,P=w.PIPE_PARAMETER_START,L=P===void 0?/^\s*:\s*/:P,A=w.QUOTED_STRING,E=A===void 0?p.DEFAULT_QUOTED_STRING_REGEX:A,W=w.QUOTED_STRING_TEST,U=W===void 0?null:W,J=w.QUOTED_STRING_GET_AND_ADVANCE,rn=J===void 0?null:J,Pn=w.QUOTED_STRING_IN_PARAMETER_TEST,gt=Pn===void 0?null:Pn,Kt=w.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Bi=Kt===void 0?null:Kt,Vt=U||function(Nn){return E.test(Nn)},vt=rn||h(E),Ui=gt||function(Nn){return E.test(Nn)},Gi=Bi||h(E);return function(Nn){function wn(an){an===void 0&&(an=1),un=un.substr(an)}function De(an){an===void 0&&(an=/^/),wn(un.match(an)[0].length)}function ae(){var an;return De(b),an=un.length>0?un[0]:"",wn(),an}function $n(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;dn={name:"",pipes:[]},Hn=!kn}function zi(){ie.variables.push(dn),$n({isNull:!0})}function Zt(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Cn={name:"",parameters:[]},_t=!kn}function Yt(){dn.pipes.push(Cn),Zt({isNull:!0})}function le(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Ae="",Qt=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function dt(){return!!D.test(un)&&(De(D),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&zi(),xn=0,!0)}function se(){return!!I.test(un)&&(De(I),xn>=3&&xe(),xn>=2&&Yt(),xn>=1&&Zt(),xn=2,!0)}function be(){return!!L.test(un)&&(De(L),xn>=3&&xe(),xn>=2&&le(),xn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},xn=0,Se="",dn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,_t=!1,Qt=!1;un&&un.length>0;)switch(xn){case 0:if(b.test(un)){Se+=ae();continue}if(F.test(un)){xn=1,$n(),ie.literals.push(Se),Se="",De(F);continue}Se+=un[0],wn();break;case 1:if(b.test(un)){dn.name+=ae();continue}if(dt()||se())continue;if(Vt(un)){dn.name+=vt(un,wn);continue}dn.name+=un[0],wn();break;case 2:if(b.test(un)){Cn.name+=ae();continue}if(dt()||be()||se())continue;if(Vt(un)){Cn.name+=vt(un,wn);continue}Cn.name+=un[0],wn();break;case 3:if(b.test(un)){Ae+=ae();continue}if(dt()||be()||se())continue;if(Ui(un)){Ae+=Gi(un,wn);continue}Ae+=un[0],wn()}return Qt&&Cn.parameters.push(Ae),_t&&dn.pipes.push(Cn),Hn&&ie.variables.push(dn),ie.literals.push(Se),ie}}function h(d){return function(w,m){var b=w.match(d);return m(b[0].length),b.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(p,"__esModule",{value:!0}),p.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,p.parseStringTemplateGenerator=_,p.parseStringTemplate=_(),p.getQuotedStringAndAdvanceForRegex=h},function(i,p,y){i.exports=y(2)},function(i,p,y){function _(h){for(var d in h)p.hasOwnProperty(d)||(p[d]=h[d])}Object.defineProperty(p,"__esModule",{value:!0}),_(y(0)),_(y(3))},function(i,p,y){function _(b){return function(q){return b.hasOwnProperty(q)?b[q]:q.split(".").reduce(function(F,C){return F.hasOwnProperty(C)?F[C]:""},b)}}function h(b,q,F,C){C===void 0&&(C=_(q));var D=C(b.name);return b.pipes.reduce(function(M,I){return F.hasOwnProperty(I.name)?F[I.name](M,I.parameters):M},D??"")}function d(b,q,F,C){return C===void 0&&(C=_(q)),b.literals.length===0?"":b.literals.slice(1).reduce(function(D,M,I){return""+D+h(b.variables[I],q,F,C)+M},b.literals[0])}function w(b,q,F){return d(m.parseStringTemplate(b),q,F)}Object.defineProperty(p,"__esModule",{value:!0});var m=y(0);p.evaluateParsedString=d,p.evaluateStringTemplate=w}])})})(Do);var Wo=Do.exports;const Bo=o=>{const l=Function("$",`return ${o};`);return i=>l(new Proxy(Ht(i),{get(p,y){return typeof(p==null?void 0:p[y])=="function"?p[y]({}):p==null?void 0:p[y]}}))},wh=/^\{\{\s*/,xh=/^\s*\}\}/,Di=/\b\B/,bh=Wo.parseStringTemplateGenerator({VARIABLE_START:wh,VARIABLE_END:xh,PIPE_START:Di,PIPE_PARAMETER_START:Di,QUOTED_STRING:Di}),Sh=mh(o=>{const l=bh(o);return cn.join(l.literals,"")?i=>Wo.evaluateParsedString(l,{},{},p=>Bo(p)(i)):Bo(l.variables[0].name)},{primitive:!0});function Xe(o){switch(o==null?void 0:o.constructor){case Array:{const l=cn.map(o,Xe);return i=>cn.map(l,p=>p(i))}case Object:{const l=cn.mapValues(o,Xe);return i=>cn.mapValues(l,p=>p(i))}case String:return Sh(o);default:return()=>o}}function Ht(o={}){return $i(o,l=>cn.isFunction(l)?l:Xe(l))}function Ah(o={}){return new Proxy(o,{get:(l,i)=>typeof l[i]=="function"?l[i]:()=>l[i]})}function Wi(o,l){return Object.setPrototypeOf($i(l,i=>p=>i(o)),o)}function Oh(o){const{$for:l,...i}=o;if(l){const{$let:p="i",$from:y=0,$to:_=1,$step:h=1}=l,d=Xe(y),w=Xe(_),m=Xe(h);return(b={})=>cn.range(d(b),w(b),m(b)).map(q=>{const F=Wi(b,Ht({[p]:q}));return Wi(F,Ht(i))})}else return(p={})=>[Wi(p,Ht(i))]}function Th(o,l){const i=_=>{const{$:h}=_,d=Oh(_);return h in l?w=>cn.flatMap(d(w),m=>cn.flatMap(p[h],b=>b(m))):w=>cn.map(d(w),m=>Object.setPrototypeOf($i(m,b=>b(m)),null))},p=cn.mapValues(l,_=>cn.map(_,i)),y=cn.flatMap(o,i);return _=>cn.flatMap(y,h=>h(_))}const Ih=o=>o==null,Uo=o=>o.display!=="transient";function Rh({trace:o,context:l,view:i="main",from:p=0,to:y=(_=>(_=o==null?void 0:o.events)==null?void 0:_.length)()??0}){var q,F,C,D;const h=Th(((C=(F=(q=o==null?void 0:o.render)==null?void 0:q.views)==null?void 0:F[i])==null?void 0:C.components)??[],((D=o==null?void 0:o.render)==null?void 0:D.components)??{}),d=M=>M&&Object.hasOwn(M,"alpha")?M.alpha>0:!0,w=M=>I=>({component:I,meta:{source:"trace",step:p+M,info:I.$info}}),m=cn.chain(o==null?void 0:o.events).map((M,I)=>({step:I,id:M.id,data:M,pId:M.pId})).groupBy("id").value(),b=cn.chain(cn.range(p,y)).map(M=>{var W;const I=o.events[M],P=o.events,L=h(Ah({alpha:1,...l,step:M,parent:Ih(I.pId)?void 0:P[((W=cn.findLast(m[I.pId],U=>U.step<=M))==null?void 0:W.step)??0],event:I,events:P})),A=L.filter(Uo),E=L.filter(cn.negate(Uo));return{persistent:A,transient:E}}).map(M=>cn.mapValues(M,I=>I.filter(d))).map((M,I)=>cn.mapValues(M,P=>P.map(w(I)))).value();return{stepsPersistent:cn.map(b,M=>M.persistent),stepsTransient:cn.map(b,M=>M.transient)}}onmessage=yh(async({data:o})=>Rh(o))})(); diff --git a/assets/parseTraceSlave.worker-_UCrsWXU.js b/assets/parseTraceSlave.worker-_UCrsWXU.js new file mode 100644 index 0000000..309d566 --- /dev/null +++ b/assets/parseTraceSlave.worker-_UCrsWXU.js @@ -0,0 +1,35 @@ +(function(){"use strict";var Qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Es(o){return o&&o.__esModule&&Object.prototype.hasOwnProperty.call(o,"default")?o.default:o}var Ps=function(){},Cs=Ps(),Me=function(o){return o!==Cs&&o!==null},qs=Me,Ls=Array.prototype.forEach,Ms=Object.create,Fs=function(o,l){var i;for(i in o)l[i]=o[i]},yf=function(o){var l=Ms(null);return Ls.call(arguments,function(i){qs(i)&&Fs(Object(i),l)}),l},Ns=function(){var o=Math.sign;return typeof o!="function"?!1:o(10)===1&&o(-20)===-1},$t,wf;function $s(){return wf||(wf=1,$t=function(o){return o=Number(o),isNaN(o)||o===0?o:o>0?1:-1}),$t}var Ds=Ns()?Math.sign:$s(),Ws=Ds,Bs=Math.abs,Us=Math.floor,Gs=function(o){return isNaN(o)?0:(o=Number(o),o===0||!isFinite(o)?o:Ws(o)*Us(Bs(o)))},zs=Gs,Hs=Math.max,Fe=function(o){return Hs(0,zs(o))},Ks=Fe,xf=function(o,l,i){var g;return isNaN(o)?(g=l,g>=0?i&&g?g-1:g:1):o===!1?!1:Ks(o)},we=function(o){if(typeof o!="function")throw new TypeError(o+" is not a function");return o},Dt,bf;function Xe(){if(bf)return Dt;bf=1;var o=Me;return Dt=function(l){if(!o(l))throw new TypeError("Cannot use null or undefined");return l},Dt}var Vs=we,Zs=Xe(),Ys=Function.prototype.bind,Sf=Function.prototype.call,Qs=Object.keys,Xs=Object.prototype.propertyIsEnumerable,Js=function(o,l){return function(i,g){var w,y=arguments[2],h=arguments[3];return i=Object(Zs(i)),Vs(g),w=Qs(i),h&&w.sort(typeof h=="function"?Ys.call(h,i):void 0),typeof o!="function"&&(o=w[o]),Sf.call(o,w,function(p,_){return Xs.call(i,p)?Sf.call(g,y,i[p],p,i,_):l})}},Mr=Js("forEach"),Ne={},Af={exports:{}},Wt,If;function js(){return If||(If=1,Wt=function(){var o=Object.assign,l;return typeof o!="function"?!1:(l={foo:"raz"},o(l,{bar:"dwa"},{trzy:"trzy"}),l.foo+l.bar+l.trzy==="razdwatrzy")}),Wt}var Bt,Of;function ks(){return Of||(Of=1,Bt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Bt}var Ut,Rf;function nc(){if(Rf)return Ut;Rf=1;var o=Me,l=Object.keys;return Ut=function(i){return l(o(i)?Object(i):i)},Ut}var Gt,Tf;function ec(){return Tf||(Tf=1,Gt=ks()()?Object.keys:nc()),Gt}var zt,Ef;function rc(){if(Ef)return zt;Ef=1;var o=ec(),l=Xe(),i=Math.max;return zt=function(g,w){var y,h,p=i(arguments.length,2),_;for(g=Object(l(g)),_=function(d){try{g[d]=w[d]}catch(x){y||(y=x)}},h=1;h-1},kt}var ni,Hf;function pc(){return Hf||(Hf=1,ni=cc()()?String.prototype.contains:hc()),ni}var Kf;function $e(){if(Kf)return Vt.exports;Kf=1;var o=$f(),l=sc(),i=Cf(),g=yf,w=pc(),y=Vt.exports=function(h,p){var _,d,x,R,q;return arguments.length<2||typeof h!="string"?(R=p,p=h,h=null):R=arguments[2],o(h)?(_=w.call(h,"c"),d=w.call(h,"e"),x=w.call(h,"w")):(_=x=!0,d=!1),q={value:p,configurable:_,enumerable:d,writable:x},R?i(g(R),q):q};return y.gs=function(h,p,_){var d,x,R,q;return typeof h!="string"?(R=_,_=p,p=h,h=null):R=arguments[3],o(p)?l(p)?o(_)?l(_)||(R=_,_=void 0):_=void 0:(R=p,p=_=void 0):p=void 0,o(h)?(d=w.call(h,"c"),x=w.call(h,"e")):(d=!0,x=!1),q={get:p,set:_,configurable:d,enumerable:x},R?i(g(R),q):q},Vt.exports}var ei={exports:{}};(function(o,l){var i=$e(),g=we,w=Function.prototype.apply,y=Function.prototype.call,h=Object.create,p=Object.defineProperty,_=Object.defineProperties,d=Object.prototype.hasOwnProperty,x={configurable:!0,enumerable:!1,writable:!0},R,q,C,N,D,L,P;R=function(M,A){var E;return g(A),d.call(this,"__ee__")?E=this.__ee__:(E=x.value=h(null),p(this,"__ee__",x),x.value=null),E[M]?typeof E[M]=="object"?E[M].push(A):E[M]=[E[M],A]:E[M]=A,this},q=function(M,A){var E,W;return g(A),W=this,R.call(this,M,E=function(){C.call(W,M,E),w.call(A,this,arguments)}),E.__eeOnceListener__=A,this},C=function(M,A){var E,W,U,J;if(g(A),!d.call(this,"__ee__"))return this;if(E=this.__ee__,!E[M])return this;if(W=E[M],typeof W=="object")for(J=0;U=W[J];++J)(U===A||U.__eeOnceListener__===A)&&(W.length===2?E[M]=W[J?0:1]:W.splice(J,1));else(W===A||W.__eeOnceListener__===A)&&delete E[M];return this},N=function(M){var A,E,W,U,J;if(d.call(this,"__ee__")&&(U=this.__ee__[M],!!U))if(typeof U=="object"){for(E=arguments.length,J=new Array(E-1),A=1;A=55296&&E<=56319&&(tn+=q[++L])),tn=C?d.call(C,N,tn,P):tn,D?(x.value=tn,R(M,P,x)):M[P]=tn,++P;A=P}}if(A===void 0)for(A=g(q.length),D&&(M=new D(A)),L=0;L=0?x=h(x):x=l(this.length)-h(y(x)),_=x;_"}},Wi}var Bi,No;function ah(){if(No)return Bi;No=1;var o=oh(),l=/[\n\r\u2028\u2029]/g;return Bi=function(i){var g=o(i);return g.length>100&&(g=g.slice(0,99)+"…"),g=g.replace(l,function(w){return JSON.stringify(w).slice(1,-1)}),g},Bi}var Br={exports:{}},$o;function Do(){if($o)return Br.exports;$o=1,Br.exports=o,Br.exports.default=o;function o(l){return!!l&&(typeof l=="object"||typeof l=="function")&&typeof l.then=="function"}return Br.exports}var Wo;function lh(){if(Wo)return Eo;Wo=1;var o=Oo(),l=ih(),i=fh(),g=ah(),w=Do(),y=Mi(),h=Object.create,p=l("then","then:finally","done","done:finally");return Ne.promise=function(_,d){var x=h(null),R=h(null),q=h(null);if(_===!0)_=null;else if(_=i(_),!p[_])throw new TypeError("'"+g(_)+"' is not valid promise mode");d.on("set",function(C,N,D){var L=!1;if(!w(D)){R[C]=D,d.emit("setasync",C,1);return}x[C]=1,q[C]=D;var P=function(W){var U=x[C];if(L)throw new Error(`Memoizee error: Detected unordered then|done & finally resolution, which in turn makes proper detection of success/failure impossible (when in 'done:finally' mode) +Consider to rely on 'then' or 'done' mode instead.`);U&&(delete x[C],R[C]=W,d.emit("setasync",C,U))},M=function(){L=!0,x[C]&&(delete x[C],delete q[C],d.delete(C))},A=_;if(A||(A="then"),A==="then"){var E=function(){y(M)};D=D.then(function(W){y(P.bind(this,W))},E),typeof D.finally=="function"&&D.finally(E)}else if(A==="done"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done' mode");D.done(P,M)}else if(A==="done:finally"){if(typeof D.done!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'done' in 'done:finally' mode");if(typeof D.finally!="function")throw new Error("Memoizee error: Retrieved promise does not implement 'finally' in 'done:finally' mode");D.done(P),D.finally(M)}}),d.on("get",function(C,N,D){var L;if(x[C]){++x[C];return}L=q[C];var P=function(){d.emit("getasync",C,N,D)};w(L)?typeof L.done=="function"?L.done(P):L.then(function(){y(P)}):P()}),d.on("delete",function(C){if(delete q[C],x[C]){delete x[C];return}if(hasOwnProperty.call(R,C)){var N=R[C];delete R[C],d.emit("deleteasync",C,[N])}}),d.on("clear",function(){var C=R;R=h(null),x=h(null),q=h(null),d.emit("clearasync",o(C,function(N){return[N]}))})},Eo}var Bo={},Uo;function sh(){if(Uo)return Bo;Uo=1;var o=we,l=Mr,i=Ne,g=Function.prototype.apply;return i.dispose=function(w,y,h){var p;if(o(w),h.async&&i.async||h.promise&&i.promise){y.on("deleteasync",p=function(_,d){g.call(w,null,d)}),y.on("clearasync",function(_){l(_,function(d,x){p(x,d)})});return}y.on("delete",p=function(_,d){w(d)}),y.on("clear",function(_){l(_,function(d,x){p(x,d)})})},Bo}var Go={},Ui,zo;function ch(){return zo||(zo=1,Ui=2147483647),Ui}var Gi,Ho;function hh(){if(Ho)return Gi;Ho=1;var o=Fe,l=ch();return Gi=function(i){if(i=o(i),i>l)throw new TypeError(i+" exceeds maximum possible timeout");return i},Gi}var Ko;function ph(){if(Ko)return Go;Ko=1;var o=yi(),l=Mr,i=Mi(),g=Do(),w=hh(),y=Ne,h=Function.prototype,p=Math.max,_=Math.min,d=Object.create;return y.maxAge=function(x,R,q){var C,N,D,L;x=w(x),x&&(C=d(null),N=q.async&&y.async||q.promise&&y.promise?"async":"",R.on("set"+N,function(P){C[P]=setTimeout(function(){R.delete(P)},x),typeof C[P].unref=="function"&&C[P].unref(),L&&(L[P]&&L[P]!=="nextTick"&&clearTimeout(L[P]),L[P]=setTimeout(function(){delete L[P]},D),typeof L[P].unref=="function"&&L[P].unref())}),R.on("delete"+N,function(P){clearTimeout(C[P]),delete C[P],L&&(L[P]!=="nextTick"&&clearTimeout(L[P]),delete L[P])}),q.preFetch&&(q.preFetch===!0||isNaN(q.preFetch)?D=.333:D=p(_(Number(q.preFetch),1),0),D&&(L={},D=(1-D)*x,R.on("get"+N,function(P,M,A){L[P]||(L[P]="nextTick",i(function(){var E;L[P]==="nextTick"&&(delete L[P],R.delete(P),q.async&&(M=o(M),M.push(h)),E=R.memoized.apply(A,M),q.promise&&g(E)&&(typeof E.done=="function"?E.done(h,h):E.then(h,h)))}))}))),R.on("clear"+N,function(){l(C,function(P){clearTimeout(P)}),C={},L&&(l(L,function(P){P!=="nextTick"&&clearTimeout(P)}),L={})}))},Go}var Vo={},zi,Zo;function gh(){if(Zo)return zi;Zo=1;var o=Fe,l=Object.create,i=Object.prototype.hasOwnProperty;return zi=function(g){var w=0,y=1,h=l(null),p=l(null),_=0,d;return g=o(g),{hit:function(x){var R=p[x],q=++_;if(h[q]=x,p[x]=q,!R)return++w,w<=g?void 0:(x=h[y],d(x),x);if(delete h[R],y===R)for(;!i.call(h,++y););},delete:d=function(x){var R=p[x];if(R&&(delete h[R],delete p[x],--w,y===R)){if(!w){_=0,y=1;return}for(;!i.call(h,++y););}},clear:function(){w=0,y=1,h=l(null),p=l(null),_=0}}},zi}var Yo;function vh(){if(Yo)return Vo;Yo=1;var o=Fe,l=gh(),i=Ne;return i.max=function(g,w,y){var h,p,_;g=o(g),g&&(p=l(g),h=y.async&&i.async||y.promise&&i.promise?"async":"",w.on("set"+h,_=function(d){d=p.hit(d),d!==void 0&&w.delete(d)}),w.on("get"+h,_),w.on("delete"+h,p.delete),w.on("clear"+h,p.clear))},Vo}var Qo={},Xo;function dh(){if(Xo)return Qo;Xo=1;var o=$e(),l=Ne,i=Object.create,g=Object.defineProperties;return l.refCounter=function(w,y,h){var p,_;p=i(null),_=h.async&&l.async||h.promise&&l.promise?"async":"",y.on("set"+_,function(d,x){p[d]=x||1}),y.on("get"+_,function(d){++p[d]}),y.on("delete"+_,function(d){delete p[d]}),y.on("clear"+_,function(){p={}}),g(y.memoized,{deleteRef:o(function(){var d=y.get(arguments);return d===null||!p[d]?null:--p[d]?!1:(y.delete(d),!0)}),getRefCount:o(function(){var d=y.get(arguments);return d===null||!p[d]?0:p[d]})})},Qo}var _h=yf,mh=xf,yh=Yc,wh=function(o){var l=_h(arguments[1]),i;return l.normalizer||(i=l.length=mh(l.length,o.length,l.async),i!==0&&(l.primitive?i===!1?l.normalizer=Qc():i>1&&(l.normalizer=Xc()(i)):i===!1?l.normalizer=nh()():i===1?l.normalizer=eh()():l.normalizer=rh()(i))),l.async&&th(),l.promise&&lh(),l.dispose&&sh(),l.maxAge&&ph(),l.max&&vh(),l.refCounter&&dh(),yh(o,l)},xh=Es(wh);const bh=o=>async l=>{try{const i=await o(l);postMessage({result:i})}catch(i){postMessage({error:i})}};var Ur={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Ur.exports,function(o,l){(function(){var i,g="4.17.21",w=200,y="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",p="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",d=500,x="__lodash_placeholder__",R=1,q=2,C=4,N=1,D=2,L=1,P=2,M=4,A=8,E=16,W=32,U=64,J=128,tn=256,Pn=512,pr=30,zr="...",Zi=800,Hr=16,gr=1,Yi=2,Qi=3,Nn=1/0,wn=9007199254740991,We=17976931348623157e292,ae=NaN,$n=4294967295,Xi=$n-1,Kr=$n>>>1,Vr=[["ary",J],["bind",L],["bindKey",P],["curry",A],["curryRight",E],["flip",Pn],["partial",W],["partialRight",U],["rearg",tn]],le="[object Arguments]",xe="[object Array]",vr="[object AsyncFunction]",se="[object Boolean]",be="[object Date]",un="[object DOMException]",ie="[object Error]",xn="[object Function]",Se="[object GeneratorFunction]",dn="[object Map]",Cn="[object Number]",Ae="[object Null]",Hn="[object Object]",dr="[object Promise]",Zr="[object Proxy]",an="[object RegExp]",_n="[object Set]",kn="[object String]",Yr="[object Symbol]",Fh="[object Undefined]",_r="[object WeakMap]",Nh="[object WeakSet]",mr="[object ArrayBuffer]",Je="[object DataView]",Ji="[object Float32Array]",ji="[object Float64Array]",ki="[object Int8Array]",nu="[object Int16Array]",eu="[object Int32Array]",ru="[object Uint8Array]",tu="[object Uint8ClampedArray]",iu="[object Uint16Array]",uu="[object Uint32Array]",$h=/\b__p \+= '';/g,Dh=/\b(__p \+=) '' \+/g,Wh=/(__e\(.*?\)|\b__t\)) \+\n'';/g,na=/&(?:amp|lt|gt|quot|#39);/g,ea=/[&<>"']/g,Bh=RegExp(na.source),Uh=RegExp(ea.source),Gh=/<%-([\s\S]+?)%>/g,zh=/<%([\s\S]+?)%>/g,ra=/<%=([\s\S]+?)%>/g,Hh=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Kh=/^\w*$/,Vh=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fu=/[\\^$.*+?()[\]{}|]/g,Zh=RegExp(fu.source),ou=/^\s+/,Yh=/\s/,Qh=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Xh=/\{\n\/\* \[wrapped with (.+)\] \*/,Jh=/,? & /,jh=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,kh=/[()=,{}\[\]\/\s]/,np=/\\(\\)?/g,ep=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ta=/\w*$/,rp=/^[-+]0x[0-9a-f]+$/i,tp=/^0b[01]+$/i,ip=/^\[object .+?Constructor\]$/,up=/^0o[0-7]+$/i,fp=/^(?:0|[1-9]\d*)$/,op=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Qr=/($^)/,ap=/['\n\r\u2028\u2029\\]/g,Xr="\\ud800-\\udfff",lp="\\u0300-\\u036f",sp="\\ufe20-\\ufe2f",cp="\\u20d0-\\u20ff",ia=lp+sp+cp,ua="\\u2700-\\u27bf",fa="a-z\\xdf-\\xf6\\xf8-\\xff",hp="\\xac\\xb1\\xd7\\xf7",pp="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",gp="\\u2000-\\u206f",vp=" \\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",oa="A-Z\\xc0-\\xd6\\xd8-\\xde",aa="\\ufe0e\\ufe0f",la=hp+pp+gp+vp,au="['’]",dp="["+Xr+"]",sa="["+la+"]",Jr="["+ia+"]",ca="\\d+",_p="["+ua+"]",ha="["+fa+"]",pa="[^"+Xr+la+ca+ua+fa+oa+"]",lu="\\ud83c[\\udffb-\\udfff]",mp="(?:"+Jr+"|"+lu+")",ga="[^"+Xr+"]",su="(?:\\ud83c[\\udde6-\\uddff]){2}",cu="[\\ud800-\\udbff][\\udc00-\\udfff]",je="["+oa+"]",va="\\u200d",da="(?:"+ha+"|"+pa+")",yp="(?:"+je+"|"+pa+")",_a="(?:"+au+"(?:d|ll|m|re|s|t|ve))?",ma="(?:"+au+"(?:D|LL|M|RE|S|T|VE))?",ya=mp+"?",wa="["+aa+"]?",wp="(?:"+va+"(?:"+[ga,su,cu].join("|")+")"+wa+ya+")*",xp="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",bp="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xa=wa+ya+wp,Sp="(?:"+[_p,su,cu].join("|")+")"+xa,Ap="(?:"+[ga+Jr+"?",Jr,su,cu,dp].join("|")+")",Ip=RegExp(au,"g"),Op=RegExp(Jr,"g"),hu=RegExp(lu+"(?="+lu+")|"+Ap+xa,"g"),Rp=RegExp([je+"?"+ha+"+"+_a+"(?="+[sa,je,"$"].join("|")+")",yp+"+"+ma+"(?="+[sa,je+da,"$"].join("|")+")",je+"?"+da+"+"+_a,je+"+"+ma,bp,xp,ca,Sp].join("|"),"g"),Tp=RegExp("["+va+Xr+ia+aa+"]"),Ep=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Pp=["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"],Cp=-1,ln={};ln[Ji]=ln[ji]=ln[ki]=ln[nu]=ln[eu]=ln[ru]=ln[tu]=ln[iu]=ln[uu]=!0,ln[le]=ln[xe]=ln[mr]=ln[se]=ln[Je]=ln[be]=ln[ie]=ln[xn]=ln[dn]=ln[Cn]=ln[Hn]=ln[an]=ln[_n]=ln[kn]=ln[_r]=!1;var on={};on[le]=on[xe]=on[mr]=on[Je]=on[se]=on[be]=on[Ji]=on[ji]=on[ki]=on[nu]=on[eu]=on[dn]=on[Cn]=on[Hn]=on[an]=on[_n]=on[kn]=on[Yr]=on[ru]=on[tu]=on[iu]=on[uu]=!0,on[ie]=on[xn]=on[_r]=!1;var qp={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Lp={"&":"&","<":"<",">":">",'"':""","'":"'"},Mp={"&":"&","<":"<",">":">",""":'"',"'":"'"},Fp={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Np=parseFloat,$p=parseInt,ba=typeof Qe=="object"&&Qe&&Qe.Object===Object&&Qe,Dp=typeof self=="object"&&self&&self.Object===Object&&self,Sn=ba||Dp||Function("return this")(),pu=l&&!l.nodeType&&l,Be=pu&&!0&&o&&!o.nodeType&&o,Sa=Be&&Be.exports===pu,gu=Sa&&ba.process,Kn=function(){try{var v=Be&&Be.require&&Be.require("util").types;return v||gu&&gu.binding&&gu.binding("util")}catch{}}(),Aa=Kn&&Kn.isArrayBuffer,Ia=Kn&&Kn.isDate,Oa=Kn&&Kn.isMap,Ra=Kn&&Kn.isRegExp,Ta=Kn&&Kn.isSet,Ea=Kn&&Kn.isTypedArray;function Dn(v,S,b){switch(b.length){case 0:return v.call(S);case 1:return v.call(S,b[0]);case 2:return v.call(S,b[0],b[1]);case 3:return v.call(S,b[0],b[1],b[2])}return v.apply(S,b)}function Wp(v,S,b,$){for(var K=-1,nn=v==null?0:v.length;++K-1}function vu(v,S,b){for(var $=-1,K=v==null?0:v.length;++$-1;);return b}function $a(v,S){for(var b=v.length;b--&&ke(S,v[b],0)>-1;);return b}function Yp(v,S){for(var b=v.length,$=0;b--;)v[b]===S&&++$;return $}var Qp=yu(qp),Xp=yu(Lp);function Jp(v){return"\\"+Fp[v]}function jp(v,S){return v==null?i:v[S]}function nr(v){return Tp.test(v)}function kp(v){return Ep.test(v)}function ng(v){for(var S,b=[];!(S=v.next()).done;)b.push(S.value);return b}function Su(v){var S=-1,b=Array(v.size);return v.forEach(function($,K){b[++S]=[K,$]}),b}function Da(v,S){return function(b){return v(S(b))}}function Re(v,S){for(var b=-1,$=v.length,K=0,nn=[];++b<$;){var mn=v[b];(mn===S||mn===x)&&(v[b]=x,nn[K++]=b)}return nn}function nt(v){var S=-1,b=Array(v.size);return v.forEach(function($){b[++S]=$}),b}function eg(v){var S=-1,b=Array(v.size);return v.forEach(function($){b[++S]=[$,$]}),b}function rg(v,S,b){for(var $=b-1,K=v.length;++$-1}function Ug(n,e){var r=this.__data__,t=vt(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}ce.prototype.clear=$g,ce.prototype.delete=Dg,ce.prototype.get=Wg,ce.prototype.has=Bg,ce.prototype.set=Ug;function he(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Qn(n,e,r,t,u,a){var s,c=e&R,m=e&q,I=e&C;if(r&&(s=u?r(n,t,u,a):r(n)),s!==i)return s;if(!cn(n))return n;var O=V(n);if(O){if(s=Kv(n),!c)return qn(n,s)}else{var T=On(n),F=T==xn||T==Se;if(Le(n))return wl(n,c);if(T==Hn||T==le||F&&!u){if(s=m||F?{}:Wl(n),!c)return m?Mv(n,tv(s,n)):Lv(n,Xa(s,n))}else{if(!on[T])return u?n:{};s=Vv(n,T,c)}}a||(a=new ee);var B=a.get(n);if(B)return B;a.set(n,s),gs(n)?n.forEach(function(H){s.add(Qn(H,e,r,H,n,a))}):hs(n)&&n.forEach(function(H,X){s.set(X,Qn(H,e,r,X,n,a))});var z=I?m?Qu:Yu:m?Mn:bn,Y=O?i:z(n);return Vn(Y||n,function(H,X){Y&&(X=H,H=n[X]),Ir(s,X,Qn(H,e,r,X,n,a))}),s}function iv(n){var e=bn(n);return function(r){return Ja(r,n,e)}}function Ja(n,e,r){var t=r.length;if(n==null)return!t;for(n=fn(n);t--;){var u=r[t],a=e[u],s=n[u];if(s===i&&!(u in n)||!a(s))return!1}return!0}function ja(n,e,r){if(typeof n!="function")throw new Zn(h);return qr(function(){n.apply(i,r)},e)}function Or(n,e,r,t){var u=-1,a=jr,s=!0,c=n.length,m=[],I=e.length;if(!c)return m;r&&(e=sn(e,Wn(r))),t?(a=vu,s=!1):e.length>=w&&(a=yr,s=!1,e=new ze(e));n:for(;++uu?0:u+r),t=t===i||t>u?u:Z(t),t<0&&(t+=u),t=r>t?0:ds(t);r0&&r(c)?e>1?An(c,e-1,r,t,u):Oe(u,c):t||(u[u.length]=c)}return u}var Pu=Ol(),el=Ol(!0);function ue(n,e){return n&&Pu(n,e,bn)}function Cu(n,e){return n&&el(n,e,bn)}function _t(n,e){return Ie(e,function(r){return _e(n[r])})}function Ke(n,e){e=Ce(e,n);for(var r=0,t=e.length;n!=null&&re}function ov(n,e){return n!=null&&rn.call(n,e)}function av(n,e){return n!=null&&e in fn(n)}function lv(n,e,r){return n>=In(e,r)&&n=120&&O.length>=120)?new ze(s&&O):i}O=n[0];var T=-1,F=c[0];n:for(;++T-1;)c!==n&&at.call(c,m,1),at.call(n,m,1);return n}function hl(n,e){for(var r=n?e.length:0,t=r-1;r--;){var u=e[r];if(r==t||u!==a){var a=u;de(u)?at.call(n,u,1):Uu(n,u)}}return n}function Du(n,e){return n+ct(Va()*(e-n+1))}function bv(n,e,r,t){for(var u=-1,a=yn(st((e-n)/(r||1)),0),s=b(a);a--;)s[t?a:++u]=n,n+=r;return s}function Wu(n,e){var r="";if(!n||e<1||e>wn)return r;do e%2&&(r+=n),e=ct(e/2),e&&(n+=n);while(e);return r}function Q(n,e){return rf(Gl(n,e,Fn),n+"")}function Sv(n){return Qa(cr(n))}function Av(n,e){var r=cr(n);return Tt(r,He(e,0,r.length))}function Er(n,e,r,t){if(!cn(n))return n;e=Ce(e,n);for(var u=-1,a=e.length,s=a-1,c=n;c!=null&&++uu?0:u+e),r=r>u?u:r,r<0&&(r+=u),u=e>r?0:r-e>>>0,e>>>=0;for(var a=b(u);++t>>1,s=n[a];s!==null&&!Un(s)&&(r?s<=e:s=w){var I=e?null:Dv(n);if(I)return nt(I);s=!1,u=yr,m=new ze}else m=e?[]:c;n:for(;++t=t?n:Xn(n,e,r)}var yl=vg||function(n){return Sn.clearTimeout(n)};function wl(n,e){if(e)return n.slice();var r=n.length,t=Ua?Ua(r):new n.constructor(r);return n.copy(t),t}function Ku(n){var e=new n.constructor(n.byteLength);return new ft(e).set(new ft(n)),e}function Ev(n,e){var r=e?Ku(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Pv(n){var e=new n.constructor(n.source,ta.exec(n));return e.lastIndex=n.lastIndex,e}function Cv(n){return Ar?fn(Ar.call(n)):{}}function xl(n,e){var r=e?Ku(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function bl(n,e){if(n!==e){var r=n!==i,t=n===null,u=n===n,a=Un(n),s=e!==i,c=e===null,m=e===e,I=Un(e);if(!c&&!I&&!a&&n>e||a&&s&&m&&!c&&!I||t&&s&&m||!r&&m||!u)return 1;if(!t&&!a&&!I&&n=c)return m;var I=r[t];return m*(I=="desc"?-1:1)}}return n.index-e.index}function Sl(n,e,r,t){for(var u=-1,a=n.length,s=r.length,c=-1,m=e.length,I=yn(a-s,0),O=b(m+I),T=!t;++c1?r[u-1]:i,s=u>2?r[2]:i;for(a=n.length>3&&typeof a=="function"?(u--,a):i,s&&Tn(r[0],r[1],s)&&(a=u<3?i:a,u=1),e=fn(e);++t-1?u[a?e[s]:s]:i}}function El(n){return ve(function(e){var r=e.length,t=r,u=Yn.prototype.thru;for(n&&e.reverse();t--;){var a=e[t];if(typeof a!="function")throw new Zn(h);if(u&&!s&&Ot(a)=="wrapper")var s=new Yn([],!0)}for(t=s?t:r;++t1&&k.reverse(),O&&mc))return!1;var I=a.get(n),O=a.get(e);if(I&&O)return I==e&&O==n;var T=-1,F=!0,B=r&D?new ze:i;for(a.set(n,e),a.set(e,n);++T1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(Qh,`{ +/* [wrapped with `+e+`] */ +`)}function Yv(n){return V(n)||Ye(n)||!!(Ha&&n&&n[Ha])}function de(n,e){var r=typeof n;return e=e??wn,!!e&&(r=="number"||r!="symbol"&&fp.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Zi)return arguments[0]}else e=0;return n.apply(i,arguments)}}function Tt(n,e){var r=-1,t=n.length,u=t-1;for(e=e===i?t:e;++r1?n[e-1]:i;return r=typeof r=="function"?(n.pop(),r):i,ns(n,r)});function es(n){var e=f(n);return e.__chain__=!0,e}function u_(n,e){return e(n),n}function Et(n,e){return e(n)}var f_=ve(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,u=function(a){return Eu(a,n)};return e>1||this.__actions__.length||!(t instanceof j)||!de(r)?this.thru(u):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:Et,args:[u],thisArg:i}),new Yn(t,this.__chain__).thru(function(a){return e&&!a.length&&a.push(i),a}))});function o_(){return es(this)}function a_(){return new Yn(this.value(),this.__chain__)}function l_(){this.__values__===i&&(this.__values__=vs(this.value()));var n=this.__index__>=this.__values__.length,e=n?i:this.__values__[this.__index__++];return{done:n,value:e}}function s_(){return this}function c_(n){for(var e,r=this;r instanceof gt;){var t=Yl(r);t.__index__=0,t.__values__=i,e?u.__wrapped__=t:e=t;var u=t;r=r.__wrapped__}return u.__wrapped__=n,e}function h_(){var n=this.__wrapped__;if(n instanceof j){var e=n;return this.__actions__.length&&(e=new j(this)),e=e.reverse(),e.__actions__.push({func:Et,args:[tf],thisArg:i}),new Yn(e,this.__chain__)}return this.thru(tf)}function p_(){return _l(this.__wrapped__,this.__actions__)}var g_=xt(function(n,e,r){rn.call(n,r)?++n[r]:pe(n,r,1)});function v_(n,e,r){var t=V(n)?Pa:uv;return r&&Tn(n,e,r)&&(e=i),t(n,G(e,3))}function d_(n,e){var r=V(n)?Ie:nl;return r(n,G(e,3))}var __=Tl(Ql),m_=Tl(Xl);function y_(n,e){return An(Pt(n,e),1)}function w_(n,e){return An(Pt(n,e),Nn)}function x_(n,e,r){return r=r===i?1:Z(r),An(Pt(n,e),r)}function rs(n,e){var r=V(n)?Vn:Ee;return r(n,G(e,3))}function ts(n,e){var r=V(n)?Bp:ka;return r(n,G(e,3))}var b_=xt(function(n,e,r){rn.call(n,r)?n[r].push(e):pe(n,r,[e])});function S_(n,e,r,t){n=Ln(n)?n:cr(n),r=r&&!t?Z(r):0;var u=n.length;return r<0&&(r=yn(u+r,0)),Ft(n)?r<=u&&n.indexOf(e,r)>-1:!!u&&ke(n,e,r)>-1}var A_=Q(function(n,e,r){var t=-1,u=typeof e=="function",a=Ln(n)?b(n.length):[];return Ee(n,function(s){a[++t]=u?Dn(e,s,r):Rr(s,e,r)}),a}),I_=xt(function(n,e,r){pe(n,r,e)});function Pt(n,e){var r=V(n)?sn:fl;return r(n,G(e,3))}function O_(n,e,r,t){return n==null?[]:(V(e)||(e=e==null?[]:[e]),r=t?i:r,V(r)||(r=r==null?[]:[r]),sl(n,e,r))}var R_=xt(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function T_(n,e,r){var t=V(n)?du:Ma,u=arguments.length<3;return t(n,G(e,4),r,u,Ee)}function E_(n,e,r){var t=V(n)?Up:Ma,u=arguments.length<3;return t(n,G(e,4),r,u,ka)}function P_(n,e){var r=V(n)?Ie:nl;return r(n,Lt(G(e,3)))}function C_(n){var e=V(n)?Qa:Sv;return e(n)}function q_(n,e,r){(r?Tn(n,e,r):e===i)?e=1:e=Z(e);var t=V(n)?nv:Av;return t(n,e)}function L_(n){var e=V(n)?ev:Ov;return e(n)}function M_(n){if(n==null)return 0;if(Ln(n))return Ft(n)?er(n):n.length;var e=On(n);return e==dn||e==_n?n.size:Fu(n).length}function F_(n,e,r){var t=V(n)?_u:Rv;return r&&Tn(n,e,r)&&(e=i),t(n,G(e,3))}var N_=Q(function(n,e){if(n==null)return[];var r=e.length;return r>1&&Tn(n,e[0],e[1])?e=[]:r>2&&Tn(e[0],e[1],e[2])&&(e=[e[0]]),sl(n,An(e,1),[])}),Ct=dg||function(){return Sn.Date.now()};function $_(n,e){if(typeof e!="function")throw new Zn(h);return n=Z(n),function(){if(--n<1)return e.apply(this,arguments)}}function is(n,e,r){return e=r?i:e,e=n&&e==null?n.length:e,ge(n,J,i,i,i,i,e)}function us(n,e){var r;if(typeof e!="function")throw new Zn(h);return n=Z(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=i),r}}var ff=Q(function(n,e,r){var t=L;if(r.length){var u=Re(r,lr(ff));t|=W}return ge(n,t,e,r,u)}),fs=Q(function(n,e,r){var t=L|P;if(r.length){var u=Re(r,lr(fs));t|=W}return ge(e,t,n,r,u)});function os(n,e,r){e=r?i:e;var t=ge(n,A,i,i,i,i,i,e);return t.placeholder=os.placeholder,t}function as(n,e,r){e=r?i:e;var t=ge(n,E,i,i,i,i,i,e);return t.placeholder=as.placeholder,t}function ls(n,e,r){var t,u,a,s,c,m,I=0,O=!1,T=!1,F=!0;if(typeof n!="function")throw new Zn(h);e=jn(e)||0,cn(r)&&(O=!!r.leading,T="maxWait"in r,a=T?yn(jn(r.maxWait)||0,e):a,F="trailing"in r?!!r.trailing:F);function B(gn){var te=t,ye=u;return t=u=i,I=gn,s=n.apply(ye,te),s}function z(gn){return I=gn,c=qr(X,e),O?B(gn):s}function Y(gn){var te=gn-m,ye=gn-I,Ts=e-te;return T?In(Ts,a-ye):Ts}function H(gn){var te=gn-m,ye=gn-I;return m===i||te>=e||te<0||T&&ye>=a}function X(){var gn=Ct();if(H(gn))return k(gn);c=qr(X,Y(gn))}function k(gn){return c=i,F&&t?B(gn):(t=u=i,s)}function Gn(){c!==i&&yl(c),I=0,t=m=u=c=i}function En(){return c===i?s:k(Ct())}function zn(){var gn=Ct(),te=H(gn);if(t=arguments,u=this,m=gn,te){if(c===i)return z(m);if(T)return yl(c),c=qr(X,e),B(m)}return c===i&&(c=qr(X,e)),s}return zn.cancel=Gn,zn.flush=En,zn}var D_=Q(function(n,e){return ja(n,1,e)}),W_=Q(function(n,e,r){return ja(n,jn(e)||0,r)});function B_(n){return ge(n,Pn)}function qt(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Zn(h);var r=function(){var t=arguments,u=e?e.apply(this,t):t[0],a=r.cache;if(a.has(u))return a.get(u);var s=n.apply(this,t);return r.cache=a.set(u,s)||a,s};return r.cache=new(qt.Cache||he),r}qt.Cache=he;function Lt(n){if(typeof n!="function")throw new Zn(h);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function U_(n){return us(2,n)}var G_=Tv(function(n,e){e=e.length==1&&V(e[0])?sn(e[0],Wn(G())):sn(An(e,1),Wn(G()));var r=e.length;return Q(function(t){for(var u=-1,a=In(t.length,r);++u=e}),Ye=tl(function(){return arguments}())?tl:function(n){return hn(n)&&rn.call(n,"callee")&&!za.call(n,"callee")},V=b.isArray,t0=Aa?Wn(Aa):cv;function Ln(n){return n!=null&&Mt(n.length)&&!_e(n)}function pn(n){return hn(n)&&Ln(n)}function i0(n){return n===!0||n===!1||hn(n)&&Rn(n)==se}var Le=mg||mf,u0=Ia?Wn(Ia):hv;function f0(n){return hn(n)&&n.nodeType===1&&!Lr(n)}function o0(n){if(n==null)return!0;if(Ln(n)&&(V(n)||typeof n=="string"||typeof n.splice=="function"||Le(n)||sr(n)||Ye(n)))return!n.length;var e=On(n);if(e==dn||e==_n)return!n.size;if(Cr(n))return!Fu(n).length;for(var r in n)if(rn.call(n,r))return!1;return!0}function a0(n,e){return Tr(n,e)}function l0(n,e,r){r=typeof r=="function"?r:i;var t=r?r(n,e):i;return t===i?Tr(n,e,i,r):!!t}function af(n){if(!hn(n))return!1;var e=Rn(n);return e==ie||e==un||typeof n.message=="string"&&typeof n.name=="string"&&!Lr(n)}function s0(n){return typeof n=="number"&&Ka(n)}function _e(n){if(!cn(n))return!1;var e=Rn(n);return e==xn||e==Se||e==vr||e==Zr}function cs(n){return typeof n=="number"&&n==Z(n)}function Mt(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=wn}function cn(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function hn(n){return n!=null&&typeof n=="object"}var hs=Oa?Wn(Oa):gv;function c0(n,e){return n===e||Mu(n,e,Ju(e))}function h0(n,e,r){return r=typeof r=="function"?r:i,Mu(n,e,Ju(e),r)}function p0(n){return ps(n)&&n!=+n}function g0(n){if(Jv(n))throw new K(y);return il(n)}function v0(n){return n===null}function d0(n){return n==null}function ps(n){return typeof n=="number"||hn(n)&&Rn(n)==Cn}function Lr(n){if(!hn(n)||Rn(n)!=Hn)return!1;var e=ot(n);if(e===null)return!0;var r=rn.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&tt.call(r)==hg}var lf=Ra?Wn(Ra):vv;function _0(n){return cs(n)&&n>=-wn&&n<=wn}var gs=Ta?Wn(Ta):dv;function Ft(n){return typeof n=="string"||!V(n)&&hn(n)&&Rn(n)==kn}function Un(n){return typeof n=="symbol"||hn(n)&&Rn(n)==Yr}var sr=Ea?Wn(Ea):_v;function m0(n){return n===i}function y0(n){return hn(n)&&On(n)==_r}function w0(n){return hn(n)&&Rn(n)==Nh}var x0=It(Nu),b0=It(function(n,e){return n<=e});function vs(n){if(!n)return[];if(Ln(n))return Ft(n)?ne(n):qn(n);if(wr&&n[wr])return ng(n[wr]());var e=On(n),r=e==dn?Su:e==_n?nt:cr;return r(n)}function me(n){if(!n)return n===0?n:0;if(n=jn(n),n===Nn||n===-Nn){var e=n<0?-1:1;return e*We}return n===n?n:0}function Z(n){var e=me(n),r=e%1;return e===e?r?e-r:e:0}function ds(n){return n?He(Z(n),0,$n):0}function jn(n){if(typeof n=="number")return n;if(Un(n))return ae;if(cn(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=cn(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=Fa(n);var r=tp.test(n);return r||up.test(n)?$p(n.slice(2),r?2:8):rp.test(n)?ae:+n}function _s(n){return fe(n,Mn(n))}function S0(n){return n?He(Z(n),-wn,wn):n===0?n:0}function en(n){return n==null?"":Bn(n)}var A0=or(function(n,e){if(Cr(e)||Ln(e)){fe(e,bn(e),n);return}for(var r in e)rn.call(e,r)&&Ir(n,r,e[r])}),ms=or(function(n,e){fe(e,Mn(e),n)}),Nt=or(function(n,e,r,t){fe(e,Mn(e),n,t)}),I0=or(function(n,e,r,t){fe(e,bn(e),n,t)}),O0=ve(Eu);function R0(n,e){var r=fr(n);return e==null?r:Xa(r,e)}var T0=Q(function(n,e){n=fn(n);var r=-1,t=e.length,u=t>2?e[2]:i;for(u&&Tn(e[0],e[1],u)&&(t=1);++r1),a}),fe(n,Qu(n),r),t&&(r=Qn(r,R|q|C,Wv));for(var u=e.length;u--;)Uu(r,e[u]);return r});function V0(n,e){return ws(n,Lt(G(e)))}var Z0=ve(function(n,e){return n==null?{}:wv(n,e)});function ws(n,e){if(n==null)return{};var r=sn(Qu(n),function(t){return[t]});return e=G(e),cl(n,r,function(t,u){return e(t,u[0])})}function Y0(n,e,r){e=Ce(e,n);var t=-1,u=e.length;for(u||(u=1,n=i);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var u=Va();return In(n+u*(e-n+Np("1e-"+((u+"").length-1))),e)}return Du(n,e)}var u1=ar(function(n,e,r){return e=e.toLowerCase(),n+(r?Ss(e):e)});function Ss(n){return hf(en(n).toLowerCase())}function As(n){return n=en(n),n&&n.replace(op,Qp).replace(Op,"")}function f1(n,e,r){n=en(n),e=Bn(e);var t=n.length;r=r===i?t:He(Z(r),0,t);var u=r;return r-=e.length,r>=0&&n.slice(r,u)==e}function o1(n){return n=en(n),n&&Uh.test(n)?n.replace(ea,Xp):n}function a1(n){return n=en(n),n&&Zh.test(n)?n.replace(fu,"\\$&"):n}var l1=ar(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),s1=ar(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),c1=Rl("toLowerCase");function h1(n,e,r){n=en(n),e=Z(e);var t=e?er(n):0;if(!e||t>=e)return n;var u=(e-t)/2;return At(ct(u),r)+n+At(st(u),r)}function p1(n,e,r){n=en(n),e=Z(e);var t=e?er(n):0;return e&&t>>0,r?(n=en(n),n&&(typeof e=="string"||e!=null&&!lf(e))&&(e=Bn(e),!e&&nr(n))?qe(ne(n),0,r):n.split(e,r)):[]}var w1=ar(function(n,e,r){return n+(r?" ":"")+hf(e)});function x1(n,e,r){return n=en(n),r=r==null?0:He(Z(r),0,n.length),e=Bn(e),n.slice(r,r+e.length)==e}function b1(n,e,r){var t=f.templateSettings;r&&Tn(n,e,r)&&(e=i),n=en(n),e=Nt({},e,t,Ml);var u=Nt({},e.imports,t.imports,Ml),a=bn(u),s=bu(u,a),c,m,I=0,O=e.interpolate||Qr,T="__p += '",F=Au((e.escape||Qr).source+"|"+O.source+"|"+(O===ra?ep:Qr).source+"|"+(e.evaluate||Qr).source+"|$","g"),B="//# sourceURL="+(rn.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Cp+"]")+` +`;n.replace(F,function(H,X,k,Gn,En,zn){return k||(k=Gn),T+=n.slice(I,zn).replace(ap,Jp),X&&(c=!0,T+=`' + +__e(`+X+`) + +'`),En&&(m=!0,T+=`'; +`+En+`; +__p += '`),k&&(T+=`' + +((__t = (`+k+`)) == null ? '' : __t) + +'`),I=zn+H.length,H}),T+=`'; +`;var z=rn.call(e,"variable")&&e.variable;if(!z)T=`with (obj) { +`+T+` +} +`;else if(kh.test(z))throw new K(p);T=(m?T.replace($h,""):T).replace(Dh,"$1").replace(Wh,"$1;"),T="function("+(z||"obj")+`) { +`+(z?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(c?", __e = _.escape":"")+(m?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+T+`return __p +}`;var Y=Os(function(){return nn(a,B+"return "+T).apply(i,s)});if(Y.source=T,af(Y))throw Y;return Y}function S1(n){return en(n).toLowerCase()}function A1(n){return en(n).toUpperCase()}function I1(n,e,r){if(n=en(n),n&&(r||e===i))return Fa(n);if(!n||!(e=Bn(e)))return n;var t=ne(n),u=ne(e),a=Na(t,u),s=$a(t,u)+1;return qe(t,a,s).join("")}function O1(n,e,r){if(n=en(n),n&&(r||e===i))return n.slice(0,Wa(n)+1);if(!n||!(e=Bn(e)))return n;var t=ne(n),u=$a(t,ne(e))+1;return qe(t,0,u).join("")}function R1(n,e,r){if(n=en(n),n&&(r||e===i))return n.replace(ou,"");if(!n||!(e=Bn(e)))return n;var t=ne(n),u=Na(t,ne(e));return qe(t,u).join("")}function T1(n,e){var r=pr,t=zr;if(cn(e)){var u="separator"in e?e.separator:u;r="length"in e?Z(e.length):r,t="omission"in e?Bn(e.omission):t}n=en(n);var a=n.length;if(nr(n)){var s=ne(n);a=s.length}if(r>=a)return n;var c=r-er(t);if(c<1)return t;var m=s?qe(s,0,c).join(""):n.slice(0,c);if(u===i)return m+t;if(s&&(c+=m.length-c),lf(u)){if(n.slice(c).search(u)){var I,O=m;for(u.global||(u=Au(u.source,en(ta.exec(u))+"g")),u.lastIndex=0;I=u.exec(O);)var T=I.index;m=m.slice(0,T===i?c:T)}}else if(n.indexOf(Bn(u),c)!=c){var F=m.lastIndexOf(u);F>-1&&(m=m.slice(0,F))}return m+t}function E1(n){return n=en(n),n&&Bh.test(n)?n.replace(na,ig):n}var P1=ar(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),hf=Rl("toUpperCase");function Is(n,e,r){return n=en(n),e=r?i:e,e===i?kp(n)?og(n):Hp(n):n.match(e)||[]}var Os=Q(function(n,e){try{return Dn(n,i,e)}catch(r){return af(r)?r:new K(r)}}),C1=ve(function(n,e){return Vn(e,function(r){r=oe(r),pe(n,r,ff(n[r],n))}),n});function q1(n){var e=n==null?0:n.length,r=G();return n=e?sn(n,function(t){if(typeof t[1]!="function")throw new Zn(h);return[r(t[0]),t[1]]}):[],Q(function(t){for(var u=-1;++uwn)return[];var r=$n,t=In(n,$n);e=G(e),n-=$n;for(var u=xu(t,e);++r0||e<0)?new j(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==i&&(e=Z(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},j.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},j.prototype.toArray=function(){return this.take($n)},ue(j.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),u=f[t?"take"+(e=="last"?"Right":""):e],a=t||/^find/.test(e);u&&(f.prototype[e]=function(){var s=this.__wrapped__,c=t?[1]:arguments,m=s instanceof j,I=c[0],O=m||V(s),T=function(X){var k=u.apply(f,Oe([X],c));return t&&F?k[0]:k};O&&r&&typeof I=="function"&&I.length!=1&&(m=O=!1);var F=this.__chain__,B=!!this.__actions__.length,z=a&&!F,Y=m&&!B;if(!a&&O){s=Y?s:new j(this);var H=n.apply(s,c);return H.__actions__.push({func:Et,args:[T],thisArg:i}),new Yn(H,F)}return z&&Y?n.apply(this,c):(H=this.thru(T),z?t?H.value()[0]:H.value():H)})}),Vn(["pop","push","shift","sort","splice","unshift"],function(n){var e=et[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);f.prototype[n]=function(){var u=arguments;if(t&&!this.__chain__){var a=this.value();return e.apply(V(a)?a:[],u)}return this[r](function(s){return e.apply(V(s)?s:[],u)})}}),ue(j.prototype,function(n,e){var r=f[e];if(r){var t=r.name+"";rn.call(ur,t)||(ur[t]=[]),ur[t].push({name:e,func:r})}}),ur[bt(i,P).name]=[{name:"wrapper",func:i}],j.prototype.clone=Eg,j.prototype.reverse=Pg,j.prototype.value=Cg,f.prototype.at=f_,f.prototype.chain=o_,f.prototype.commit=a_,f.prototype.next=l_,f.prototype.plant=c_,f.prototype.reverse=h_,f.prototype.toJSON=f.prototype.valueOf=f.prototype.value=p_,f.prototype.first=f.prototype.head,wr&&(f.prototype[wr]=s_),f},rr=ag();Be?((Be.exports=rr)._=rr,pu._=rr):Sn._=rr}).call(Qe)}(Ur,Ur.exports);var vn=Ur.exports;function Hi(o={},l){const i={};for(const g of Object.keys(o))i[g]=g==="$"?o[g]:l(o[g],g,o);return Object.setPrototypeOf(i,o)}var Jo={exports:{}};(function(o,l){(function(i,g){o.exports=g()})(Qe,function(){return function(i){function g(y){if(w[y])return w[y].exports;var h=w[y]={i:y,l:!1,exports:{}};return i[y].call(h.exports,h,h.exports,g),h.l=!0,h.exports}var w={};return g.m=i,g.c=w,g.d=function(y,h,p){g.o(y,h)||Object.defineProperty(y,h,{configurable:!1,enumerable:!0,get:p})},g.n=function(y){var h=y&&y.__esModule?function(){return y.default}:function(){return y};return g.d(h,"a",h),h},g.o=function(y,h){return Object.prototype.hasOwnProperty.call(y,h)},g.p="",g(g.s=1)}([function(i,g,w){function y(p){var _=p===void 0?{}:p,d=_.ESCAPE,x=d===void 0?/^\\/:d,R=_.VARIABLE_START,q=R===void 0?/^\${\s*/:R,C=_.VARIABLE_END,N=C===void 0?/^\s*}/:C,D=_.PIPE_START,L=D===void 0?/^\s*\|\s*/:D,P=_.PIPE_PARAMETER_START,M=P===void 0?/^\s*:\s*/:P,A=_.QUOTED_STRING,E=A===void 0?g.DEFAULT_QUOTED_STRING_REGEX:A,W=_.QUOTED_STRING_TEST,U=W===void 0?null:W,J=_.QUOTED_STRING_GET_AND_ADVANCE,tn=J===void 0?null:J,Pn=_.QUOTED_STRING_IN_PARAMETER_TEST,pr=Pn===void 0?null:Pn,zr=_.QUOTED_STRING_IN_PARAMETER_GET_AND_ADVANCE,Zi=zr===void 0?null:zr,Hr=U||function(Nn){return E.test(Nn)},gr=tn||h(E),Yi=pr||function(Nn){return E.test(Nn)},Qi=Zi||h(E);return function(Nn){function wn(an){an===void 0&&(an=1),un=un.substr(an)}function We(an){an===void 0&&(an=/^/),wn(un.match(an)[0].length)}function ae(){var an;return We(x),an=un.length>0?un[0]:"",wn(),an}function $n(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;dn={name:"",pipes:[]},Hn=!kn}function Xi(){ie.variables.push(dn),$n({isNull:!0})}function Kr(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Cn={name:"",parameters:[]},dr=!kn}function Vr(){dn.pipes.push(Cn),Kr({isNull:!0})}function le(an){var _n=(an===void 0?{}:an).isNull,kn=_n!==void 0&&_n;Ae="",Zr=!kn}function xe(){Cn.parameters.push(Ae),le({isNull:!0})}function vr(){return!!N.test(un)&&(We(N),xn>=3&&xe(),xn>=2&&Vr(),xn>=1&&Xi(),xn=0,!0)}function se(){return!!L.test(un)&&(We(L),xn>=3&&xe(),xn>=2&&Vr(),xn>=1&&Kr(),xn=2,!0)}function be(){return!!M.test(un)&&(We(M),xn>=3&&xe(),xn>=2&&le(),xn=3,!0)}for(var un=Nn,ie={literals:[],variables:[]},xn=0,Se="",dn={name:"",pipes:[]},Cn={name:"",parameters:[]},Ae="",Hn=!1,dr=!1,Zr=!1;un&&un.length>0;)switch(xn){case 0:if(x.test(un)){Se+=ae();continue}if(q.test(un)){xn=1,$n(),ie.literals.push(Se),Se="",We(q);continue}Se+=un[0],wn();break;case 1:if(x.test(un)){dn.name+=ae();continue}if(vr()||se())continue;if(Hr(un)){dn.name+=gr(un,wn);continue}dn.name+=un[0],wn();break;case 2:if(x.test(un)){Cn.name+=ae();continue}if(vr()||be()||se())continue;if(Hr(un)){Cn.name+=gr(un,wn);continue}Cn.name+=un[0],wn();break;case 3:if(x.test(un)){Ae+=ae();continue}if(vr()||be()||se())continue;if(Yi(un)){Ae+=Qi(un,wn);continue}Ae+=un[0],wn()}return Zr&&Cn.parameters.push(Ae),dr&&dn.pipes.push(Cn),Hn&&ie.variables.push(dn),ie.literals.push(Se),ie}}function h(p){return function(_,d){var x=_.match(p);return d(x[0].length),x.slice(2).join("").replace("\\\\","\\")}}Object.defineProperty(g,"__esModule",{value:!0}),g.DEFAULT_QUOTED_STRING_REGEX=/^('((?:[^'\\]|\\.)*)'|'((?:[^'\\]|\\.)*)$|"((?:[^"\\]|\\.)*)"|"((?:[^"\\]|\\.)*)$)/,g.parseStringTemplateGenerator=y,g.parseStringTemplate=y(),g.getQuotedStringAndAdvanceForRegex=h},function(i,g,w){i.exports=w(2)},function(i,g,w){function y(h){for(var p in h)g.hasOwnProperty(p)||(g[p]=h[p])}Object.defineProperty(g,"__esModule",{value:!0}),y(w(0)),y(w(3))},function(i,g,w){function y(x){return function(R){return x.hasOwnProperty(R)?x[R]:R.split(".").reduce(function(q,C){return q.hasOwnProperty(C)?q[C]:""},x)}}function h(x,R,q,C){C===void 0&&(C=y(R));var N=C(x.name);return x.pipes.reduce(function(D,L){return q.hasOwnProperty(L.name)?q[L.name](D,L.parameters):D},N??"")}function p(x,R,q,C){return C===void 0&&(C=y(R)),x.literals.length===0?"":x.literals.slice(1).reduce(function(N,D,L){return""+N+h(x.variables[L],R,q,C)+D},x.literals[0])}function _(x,R,q){return p(d.parseStringTemplate(x),R,q)}Object.defineProperty(g,"__esModule",{value:!0});var d=w(0);g.evaluateParsedString=p,g.evaluateStringTemplate=_}])})})(Jo);var jo=Jo.exports;const ko=o=>{const l=Function("$",` + const theme = $.__internal__?.context.theme; + const color = $.__internal__?.context.color; + const step = $.__internal__?.step; + const events = $.__internal__?.events; + const parent = $.__internal__?.parent; + return ${o}; + `);return i=>l(new Proxy(Gr(i),{get(g,w){return typeof(g==null?void 0:g[w])=="function"?g[w]({}):g==null?void 0:g[w]}}))},Sh=/^\$\{\{\s*/,Ah=/^\s*\}\}/,Ki=/\b\B/,Ih=jo.parseStringTemplateGenerator({VARIABLE_START:Sh,VARIABLE_END:Ah,PIPE_START:Ki,PIPE_PARAMETER_START:Ki,QUOTED_STRING:Ki}),Oh=xh(o=>{const l=Ih(o);return vn.join(l.literals,"")?i=>jo.evaluateParsedString(l,{},{},g=>ko(g)(i)):ko(l.variables[0].name)},{primitive:!0});function De(o){switch(o==null?void 0:o.constructor){case Array:{const l=vn.map(o,De);return i=>vn.map(l,g=>g(i))}case Object:{const l=vn.mapValues(o,De);return i=>vn.mapValues(l,g=>g(i))}case String:return Oh(o);default:return()=>o}}function Gr(o={}){return Hi(o,l=>vn.isFunction(l)?l:De(l))}function Rh(o={}){return new Proxy(o,{get:(l,i)=>typeof l[i]=="function"?l[i]:()=>l[i]})}function Vi(o,l){return Object.setPrototypeOf(Hi(l,i=>g=>i(o)),o)}function Th(o){const{$for:l,$if:i,...g}=o;if(l||i){const{$let:w="i",$from:y=0,$to:h=1,$step:p=1}=l??{},_=De(i),d=De(y),x=De(h),R=De(p);return(q={})=>!i||_(q)?vn.range(d(q),x(q),R(q)).map(C=>{const N=Vi(q,Gr({[w]:C}));return Vi(N,Gr(g))}):[]}else return(w={})=>[Vi(w,Gr(g))]}function Eh(o,l){const i=y=>{const{$:h}=y,p=Th(y);return h in l?_=>vn.flatMap(p(_),d=>vn.flatMap(g[h],x=>x(d))):_=>vn.map(p(_),d=>Object.setPrototypeOf(Hi(d,x=>x(d)),null))},g=vn.mapValues(l,y=>vn.map(y,i)),w=vn.flatMap(o,i);return y=>vn.flatMap(w,h=>h(y))}const Ph=o=>o==null,Ch=o=>o.clear?typeof o.clear=="string"?"special":"transient":"persistent";function qh(o,l){return Object.setPrototypeOf(o,l),o}const Lh="#808080";function Mh({trace:o,context:l,view:i="main",from:g=0,to:w=(y=>(y=o==null?void 0:o.events)==null?void 0:y.length)()??0}){var d;const h=Eh(((d=o==null?void 0:o.views)==null?void 0:d[i])??[],(o==null?void 0:o.views)??{}),p=x=>R=>({component:R,meta:{source:"trace",step:g+x,info:R.$info}}),_=vn.chain(o==null?void 0:o.events).map((x,R)=>({step:R,id:x.id,data:x,pId:x.pId})).groupBy("id").value();return vn.chain(vn.range(g,w)).map(x=>{var N;const R=o.events[x],q=o.events,C=h(Rh(qh({alpha:1,fill:Lh,__internal__:{context:l,step:x,parent:Ph(R.pId)?void 0:q[((N=vn.findLast(_[R.pId],D=>D.step<=x))==null?void 0:N.step)??0],events:q}},R)));return{event:R,components:vn.groupBy(C,Ch)}}).map((x,R)=>({event:x.event,components:vn.mapValues(x.components,q=>q.map(p(R)))})).value()}onmessage=bh(async({data:o})=>Mh(o))})(); diff --git a/assets/parseYaml.worker-CXyNYLS1.js b/assets/parseYaml.worker-CXyNYLS1.js deleted file mode 100644 index 0542404..0000000 --- a/assets/parseYaml.worker-CXyNYLS1.js +++ /dev/null @@ -1,17 +0,0 @@ -(function(){"use strict";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function qe(e){return typeof e>"u"||e===null}function Lr(e){return typeof e=="object"&&e!==null}function Dr(e){return Array.isArray(e)?e:qe(e)?[]:[e]}function Yr(e,r){var n,o,i,l;if(r)for(l=Object.keys(r),n=0,o=l.length;nu&&(l=" ... ",r=o-u+l.length),n-o>u&&(t=" ...",n=o+u-t.length),{str:l+e.slice(r,n).replace(/\t/g,"→")+t,pos:o-r+l.length}}function K(e,r){return C.repeat(" ",r-e.length)+e}function Zr(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var n=/\r?\n|\r|\0/g,o=[0],i=[],l,t=-1;l=n.exec(e.buffer);)i.push(l.index),o.push(l.index+l[0].length),e.position<=l.index&&t<0&&(t=o.length-2);t<0&&(t=o.length-1);var u="",c,a,h=Math.min(e.line+r.linesAfter,i.length).toString().length,f=r.maxLength-(r.indent+h+3);for(c=1;c<=r.linesBefore&&!(t-c<0);c++)a=H(e.buffer,o[t-c],i[t-c],e.position-(o[t]-o[t-c]),f),u=C.repeat(" ",r.indent)+K((e.line-c+1).toString(),h)+" | "+a.str+` -`+u;for(a=H(e.buffer,o[t],i[t],e.position,f),u+=C.repeat(" ",r.indent)+K((e.line+1).toString(),h)+" | "+a.str+` -`,u+=C.repeat("-",r.indent+h+3+a.pos)+`^ -`,c=1;c<=r.linesAfter&&!(t+c>=i.length);c++)a=H(e.buffer,o[t+c],i[t+c],e.position-(o[t]-o[t+c]),f),u+=C.repeat(" ",r.indent)+K((e.line+c+1).toString(),h)+" | "+a.str+` -`;return u.replace(/\n$/,"")}var Xr=Zr,Qr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Jr=["scalar","sequence","mapping"];function en(e){var r={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){r[String(o)]=n})}),r}function rn(e,r){if(r=r||{},Object.keys(r).forEach(function(n){if(Qr.indexOf(n)===-1)throw new k('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(n){return n},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=en(r.styleAliases||null),Jr.indexOf(this.kind)===-1)throw new k('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var I=rn;function $e(e,r){var n=[];return e[r].forEach(function(o){var i=n.length;n.forEach(function(l,t){l.tag===o.tag&&l.kind===o.kind&&l.multi===o.multi&&(i=t)}),n[i]=o}),n}function nn(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function o(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(r=0,n=arguments.length;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),Sn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function In(e){return!(e===null||!Sn.test(e)||e[e.length-1]==="_")}function Cn(e){var r,n;return r=e.replace(/_/g,"").toLowerCase(),n=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:n*parseFloat(r,10)}var On=/^[-+]?[0-9]+e/;function Tn(e,r){var n;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(C.isNegativeZero(e))return"-0.0";return n=e.toString(10),On.test(n)?n.replace("e",".e"):n}function Fn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||C.isNegativeZero(e))}var En=new I("tag:yaml.org,2002:float",{kind:"scalar",resolve:In,construct:Cn,predicate:Fn,represent:Tn,defaultStyle:"lowercase"}),kn=cn.extend({implicit:[pn,gn,wn,En]}),jn=kn,Me=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),Pe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Nn(e){return e===null?!1:Me.exec(e)!==null||Pe.exec(e)!==null}function qn(e){var r,n,o,i,l,t,u,c=0,a=null,h,f,d;if(r=Me.exec(e),r===null&&(r=Pe.exec(e)),r===null)throw new Error("Date resolve error");if(n=+r[1],o=+r[2]-1,i=+r[3],!r[4])return new Date(Date.UTC(n,o,i));if(l=+r[4],t=+r[5],u=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(h=+r[10],f=+(r[11]||0),a=(h*60+f)*6e4,r[9]==="-"&&(a=-a)),d=new Date(Date.UTC(n,o,i,l,t,u,c)),a&&d.setTime(d.getTime()-a),d}function Rn(e){return e.toISOString()}var $n=new I("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Nn,construct:qn,instanceOf:Date,represent:Rn});function Mn(e){return e==="<<"||e===null}var Pn=new I("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Mn}),Z=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`;function Ln(e){if(e===null)return!1;var r,n,o=0,i=e.length,l=Z;for(n=0;n64)){if(r<0)return!1;o+=6}return o%8===0}function Dn(e){var r,n,o=e.replace(/[\r\n=]/g,""),i=o.length,l=Z,t=0,u=[];for(r=0;r>16&255),u.push(t>>8&255),u.push(t&255)),t=t<<6|l.indexOf(o.charAt(r));return n=i%4*6,n===0?(u.push(t>>16&255),u.push(t>>8&255),u.push(t&255)):n===18?(u.push(t>>10&255),u.push(t>>2&255)):n===12&&u.push(t>>4&255),new Uint8Array(u)}function Yn(e){var r="",n=0,o,i,l=e.length,t=Z;for(o=0;o>18&63],r+=t[n>>12&63],r+=t[n>>6&63],r+=t[n&63]),n=(n<<8)+e[o];return i=l%3,i===0?(r+=t[n>>18&63],r+=t[n>>12&63],r+=t[n>>6&63],r+=t[n&63]):i===2?(r+=t[n>>10&63],r+=t[n>>4&63],r+=t[n<<2&63],r+=t[64]):i===1&&(r+=t[n>>2&63],r+=t[n<<4&63],r+=t[64],r+=t[64]),r}function Bn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Un=new I("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Ln,construct:Dn,predicate:Bn,represent:Yn}),Vn=Object.prototype.hasOwnProperty,Gn=Object.prototype.toString;function zn(e){if(e===null)return!0;var r=[],n,o,i,l,t,u=e;for(n=0,o=u.length;n>10)+55296,(e-65536&1023)+56320)}for(var ze=new Array(256),He=new Array(256),$=0;$<256;$++)ze[$]=Ge($)?1:0,He[$]=Ge($);function pi(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||ii,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ke(e,r){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Xr(n),new k(r,n)}function m(e,r){throw Ke(e,r)}function V(e,r){e.onWarning&&e.onWarning.call(null,Ke(e,r))}var We={YAML:function(r,n,o){var i,l,t;r.version!==null&&m(r,"duplication of %YAML directive"),o.length!==1&&m(r,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),i===null&&m(r,"ill-formed argument of the YAML directive"),l=parseInt(i[1],10),t=parseInt(i[2],10),l!==1&&m(r,"unacceptable YAML version of the document"),r.version=o[0],r.checkLineBreaks=t<2,t!==1&&t!==2&&V(r,"unsupported YAML version of the document")},TAG:function(r,n,o){var i,l;o.length!==2&&m(r,"TAG directive accepts exactly two arguments"),i=o[0],l=o[1],Be.test(i)||m(r,"ill-formed tag handle (first argument) of the TAG directive"),j.call(r.tagMap,i)&&m(r,'there is a previously declared suffix for "'+i+'" tag handle'),Ue.test(l)||m(r,"ill-formed tag prefix (second argument) of the TAG directive");try{l=decodeURIComponent(l)}catch{m(r,"tag prefix is malformed: "+l)}r.tagMap[i]=l}};function N(e,r,n,o){var i,l,t,u;if(r1&&(e.result+=C.repeat(` -`,r-1))}function hi(e,r,n){var o,i,l,t,u,c,a,h,f=e.kind,d=e.result,p;if(p=e.input.charCodeAt(e.position),T(p)||R(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),T(i)||n&&R(i)))return!1;for(e.kind="scalar",e.result="",l=t=e.position,u=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),T(i)||n&&R(i))break}else if(p===35){if(o=e.input.charCodeAt(e.position-1),T(o))break}else{if(e.position===e.lineStart&&G(e)||n&&R(p))break;if(E(p))if(c=e.line,a=e.lineStart,h=e.lineIndent,_(e,!1,-1),e.lineIndent>=r){u=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=t,e.line=c,e.lineStart=a,e.lineIndent=h;break}}u&&(N(e,l,t,!1),J(e,e.line-c),l=t=e.position,u=!1),q(p)||(t=e.position+1),p=e.input.charCodeAt(++e.position)}return N(e,l,t,!1),e.result?!0:(e.kind=f,e.result=d,!1)}function di(e,r){var n,o,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(N(e,o,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)o=e.position,e.position++,i=e.position;else return!0;else E(n)?(N(e,o,i,!0),J(e,_(e,!1,r)),o=i=e.position):e.position===e.lineStart&&G(e)?m(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);m(e,"unexpected end of the stream within a single quoted scalar")}function mi(e,r){var n,o,i,l,t,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return N(e,n,e.position,!0),e.position++,!0;if(u===92){if(N(e,n,e.position,!0),u=e.input.charCodeAt(++e.position),E(u))_(e,!1,r);else if(u<256&&ze[u])e.result+=He[u],e.position++;else if((t=fi(u))>0){for(i=t,l=0;i>0;i--)u=e.input.charCodeAt(++e.position),(t=ci(u))>=0?l=(l<<4)+t:m(e,"expected hexadecimal character");e.result+=si(l),e.position++}else m(e,"unknown escape sequence");n=o=e.position}else E(u)?(N(e,n,o,!0),J(e,_(e,!1,r)),n=o=e.position):e.position===e.lineStart&&G(e)?m(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}m(e,"unexpected end of the stream within a double quoted scalar")}function gi(e,r){var n=!0,o,i,l,t=e.tag,u,c=e.anchor,a,h,f,d,p,x=Object.create(null),b,g,A,s;if(s=e.input.charCodeAt(e.position),s===91)h=93,p=!1,u=[];else if(s===123)h=125,p=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),s=e.input.charCodeAt(++e.position);s!==0;){if(_(e,!0,r),s=e.input.charCodeAt(e.position),s===h)return e.position++,e.tag=t,e.anchor=c,e.kind=p?"mapping":"sequence",e.result=u,!0;n?s===44&&m(e,"expected the node content, but found ','"):m(e,"missed comma between flow collection entries"),g=b=A=null,f=d=!1,s===63&&(a=e.input.charCodeAt(e.position+1),T(a)&&(f=d=!0,e.position++,_(e,!0,r))),o=e.line,i=e.lineStart,l=e.position,P(e,r,B,!1,!0),g=e.tag,b=e.result,_(e,!0,r),s=e.input.charCodeAt(e.position),(d||e.line===o)&&s===58&&(f=!0,s=e.input.charCodeAt(++e.position),_(e,!0,r),P(e,r,B,!1,!0),A=e.result),p?M(e,u,x,g,b,A,o,i,l):f?u.push(M(e,null,x,g,b,A,o,i,l)):u.push(b),_(e,!0,r),s=e.input.charCodeAt(e.position),s===44?(n=!0,s=e.input.charCodeAt(++e.position)):n=!1}m(e,"unexpected end of the stream within a flow collection")}function vi(e,r){var n,o,i=X,l=!1,t=!1,u=r,c=0,a=!1,h,f;if(f=e.input.charCodeAt(e.position),f===124)o=!1;else if(f===62)o=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)X===i?i=f===43?Ye:oi:m(e,"repeat of a chomping mode identifier");else if((h=ai(f))>=0)h===0?m(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):t?m(e,"repeat of an indentation width identifier"):(u=r+h-1,t=!0);else break;if(q(f)){do f=e.input.charCodeAt(++e.position);while(q(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!E(f)&&f!==0)}for(;f!==0;){for(Q(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!t||e.lineIndentu&&(u=e.lineIndent),E(f)){c++;continue}if(e.lineIndentr)&&c!==0)m(e,"bad indentation of a sequence entry");else if(e.lineIndentr)&&(g&&(t=e.line,u=e.lineStart,c=e.position),P(e,r,U,!0,i)&&(g?x=e.result:b=e.result),g||(M(e,f,d,p,x,b,t,u,c),p=x=b=null),_(e,!0,-1),s=e.input.charCodeAt(e.position)),(e.line===l||e.lineIndent>r)&&s!==0)m(e,"bad indentation of a mapping entry");else if(e.lineIndentr?c=1:e.lineIndent===r?c=0:e.lineIndentr?c=1:e.lineIndent===r?c=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),f=0,d=e.implicitTypes.length;f"),e.result!==null&&x.kind!==e.kind&&m(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):m(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||h}function _i(e){var r=e.position,n,o,i,l=!1,t;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(t=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),t=e.input.charCodeAt(e.position),!(e.lineIndent>0||t!==37));){for(l=!0,t=e.input.charCodeAt(++e.position),n=e.position;t!==0&&!T(t);)t=e.input.charCodeAt(++e.position);for(o=e.input.slice(n,e.position),i=[],o.length<1&&m(e,"directive name must not be less than one character in length");t!==0;){for(;q(t);)t=e.input.charCodeAt(++e.position);if(t===35){do t=e.input.charCodeAt(++e.position);while(t!==0&&!E(t));break}if(E(t))break;for(n=e.position;t!==0&&!T(t);)t=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}t!==0&&Q(e),j.call(We,o)?We[o](e,o,i):V(e,'unknown document directive "'+o+'"')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):l&&m(e,"directives end mark is expected"),P(e,e.lineIndent-1,U,!1,!0),_(e,!0,-1),e.checkLineBreaks&&li.test(e.input.slice(r,e.position))&&V(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&G(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position"u"&&(n=r,r=null);var o=Qe(e,n);if(typeof r!="function")return o;for(var i=0,l=o.length;i0?1:-1}),ee}var Pi=$i()?Math.sign:Mi(),Li=Pi,Di=Math.abs,Yi=Math.floor,Bi=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Li(e)*Yi(Di(e)))},Ui=Bi,Vi=Math.max,Gi=function(e){return Vi(0,Ui(e))},er=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},zi=L,rr=function(e){if(!zi(e))throw new TypeError("Cannot use null or undefined");return e},Hi={exports:{}},re,nr;function Ki(){return nr||(nr=1,re=function(){var e=Object.assign,r;return typeof e!="function"?!1:(r={foo:"raz"},e(r,{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")}),re}var ne,ir;function Wi(){return ir||(ir=1,ne=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ne}var ie,or;function Zi(){if(or)return ie;or=1;var e=L,r=Object.keys;return ie=function(n){return r(e(n)?Object(n):n)},ie}var oe,tr;function Xi(){return tr||(tr=1,oe=Wi()()?Object.keys:Zi()),oe}var te,lr;function Qi(){if(lr)return te;lr=1;var e=Xi(),r=rr,n=Math.max;return te=function(o,i){var l,t,u=n(arguments.length,2),c;for(o=Object(r(o)),c=function(a){try{o[a]=i[a]}catch(h){l||(l=h)}},t=1;t-1},de}var me,xr;function co(){return xr||(xr=1,me=lo()()?String.prototype.contains:uo()),me}var br;function D(){if(br)return ue.exports;br=1;var e=sr(),r=to(),n=cr(),o=Ri,i=co(),l=ue.exports=function(t,u){var c,a,h,f,d;return arguments.length<2||typeof t!="string"?(f=u,u=t,t=null):f=arguments[2],e(t)?(c=i.call(t,"c"),a=i.call(t,"e"),h=i.call(t,"w")):(c=h=!0,a=!1),d={value:u,configurable:c,enumerable:a,writable:h},f?n(o(f),d):d};return l.gs=function(t,u,c){var a,h,f,d;return typeof t!="string"?(f=c,c=u,u=t,t=null):f=arguments[3],e(u)?r(u)?e(c)?r(c)||(f=c,c=void 0):c=void 0:(f=u,u=c=void 0):u=void 0,e(t)?(a=i.call(t,"c"),h=i.call(t,"e")):(a=!0,h=!1),d={get:u,set:c,configurable:a,enumerable:h},f?n(o(f),d):d},ue.exports}var ge={exports:{}};(function(e,r){var n=D(),o=er,i=Function.prototype.apply,l=Function.prototype.call,t=Object.create,u=Object.defineProperty,c=Object.defineProperties,a=Object.prototype.hasOwnProperty,h={configurable:!0,enumerable:!1,writable:!0},f,d,p,x,b,g,A;f=function(s,v){var y;return o(v),a.call(this,"__ee__")?y=this.__ee__:(y=h.value=t(null),u(this,"__ee__",h),h.value=null),y[s]?typeof y[s]=="object"?y[s].push(v):y[s]=[y[s],v]:y[s]=v,this},d=function(s,v){var y,S;return o(v),S=this,f.call(this,s,y=function(){p.call(S,s,y),i.call(v,this,arguments)}),y.__eeOnceListener__=v,this},p=function(s,v){var y,S,w,O;if(o(v),!a.call(this,"__ee__"))return this;if(y=this.__ee__,!y[s])return this;if(S=y[s],typeof S=="object")for(O=0;w=S[O];++O)(w===v||w.__eeOnceListener__===v)&&(S.length===2?y[s]=S[O?0:1]:S.splice(O,1));else(S===v||S.__eeOnceListener__===v)&&delete y[s];return this},x=function(s){var v,y,S,w,O;if(a.call(this,"__ee__")&&(w=this.__ee__[s],!!w))if(typeof w=="object"){for(y=arguments.length,O=new Array(y-1),v=1;v=55296&&y<=56319&&(F+=d[++g])),F=p?a.call(p,x,F,A):F,b?(h.value=F,f(s,A,h)):s[A]=F,++A;v=A}}if(v===void 0)for(v=o(d.length),b&&(s=new b(v)),g=0;gasync r=>{try{const n=await e(r);postMessage({result:n})}catch(n){postMessage({error:n})}})(async e=>Ti(e.data))})(); diff --git a/assets/parseYaml.worker-D2goq2pP.js b/assets/parseYaml.worker-D2goq2pP.js new file mode 100644 index 0000000..ab2417c --- /dev/null +++ b/assets/parseYaml.worker-D2goq2pP.js @@ -0,0 +1,17 @@ +(function(){"use strict";/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Oe(e){return typeof e>"u"||e===null}function Ir(e){return typeof e=="object"&&e!==null}function Or(e){return Array.isArray(e)?e:Oe(e)?[]:[e]}function Tr(e,r){var n,o,i,t;if(r)for(t=Object.keys(r),n=0,o=t.length;nu&&(t=" ... ",r=o-u+t.length),n-o>u&&(l=" ...",n=o+u-l.length),{str:t+e.slice(r,n).replace(/\t/g,"→")+l,pos:o-r+t.length}}function Z(e,r){return I.repeat(" ",r-e.length)+e}function $r(e,r){if(r=Object.create(r||null),!e.buffer)return null;r.maxLength||(r.maxLength=79),typeof r.indent!="number"&&(r.indent=1),typeof r.linesBefore!="number"&&(r.linesBefore=3),typeof r.linesAfter!="number"&&(r.linesAfter=2);for(var n=/\r?\n|\r|\0/g,o=[0],i=[],t,l=-1;t=n.exec(e.buffer);)i.push(t.index),o.push(t.index+t[0].length),e.position<=t.index&&l<0&&(l=o.length-2);l<0&&(l=o.length-1);var u="",c,f,d=Math.min(e.line+r.linesAfter,i.length).toString().length,a=r.maxLength-(r.indent+d+3);for(c=1;c<=r.linesBefore&&!(l-c<0);c++)f=W(e.buffer,o[l-c],i[l-c],e.position-(o[l]-o[l-c]),a),u=I.repeat(" ",r.indent)+Z((e.line-c+1).toString(),d)+" | "+f.str+` +`+u;for(f=W(e.buffer,o[l],i[l],e.position,a),u+=I.repeat(" ",r.indent)+Z((e.line+1).toString(),d)+" | "+f.str+` +`,u+=I.repeat("-",r.indent+d+3+f.pos)+`^ +`,c=1;c<=r.linesAfter&&!(l+c>=i.length);c++)f=W(e.buffer,o[l+c],i[l+c],e.position-(o[l]-o[l+c]),a),u+=I.repeat(" ",r.indent)+Z((e.line+c+1).toString(),d)+" | "+f.str+` +`;return u.replace(/\n$/,"")}var Rr=$r,Lr=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Dr=["scalar","sequence","mapping"];function Yr(e){var r={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(o){r[String(o)]=n})}),r}function Br(e,r){if(r=r||{},Object.keys(r).forEach(function(n){if(Lr.indexOf(n)===-1)throw new k('Unknown option "'+n+'" is met in definition of "'+e+'" YAML type.')}),this.options=r,this.tag=e,this.kind=r.kind||null,this.resolve=r.resolve||function(){return!0},this.construct=r.construct||function(n){return n},this.instanceOf=r.instanceOf||null,this.predicate=r.predicate||null,this.represent=r.represent||null,this.representName=r.representName||null,this.defaultStyle=r.defaultStyle||null,this.multi=r.multi||!1,this.styleAliases=Yr(r.styleAliases||null),Dr.indexOf(this.kind)===-1)throw new k('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var C=Br;function Fe(e,r){var n=[];return e[r].forEach(function(o){var i=n.length;n.forEach(function(t,l){t.tag===o.tag&&t.kind===o.kind&&t.multi===o.multi&&(i=l)}),n[i]=o}),n}function Ur(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},r,n;function o(i){i.multi?(e.multi[i.kind].push(i),e.multi.fallback.push(i)):e[i.kind][i.tag]=e.fallback[i.tag]=i}for(r=0,n=arguments.length;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),pn=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function sn(e){return!(e===null||!pn.test(e)||e[e.length-1]==="_")}function hn(e){var r,n;return r=e.replace(/_/g,"").toLowerCase(),n=r[0]==="-"?-1:1,"+-".indexOf(r[0])>=0&&(r=r.slice(1)),r===".inf"?n===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:r===".nan"?NaN:n*parseFloat(r,10)}var dn=/^[-+]?[0-9]+e/;function mn(e,r){var n;if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(I.isNegativeZero(e))return"-0.0";return n=e.toString(10),dn.test(n)?n.replace("e",".e"):n}function gn(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||I.isNegativeZero(e))}var vn=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:sn,construct:hn,predicate:gn,represent:mn,defaultStyle:"lowercase"}),xn=Kr.extend({implicit:[Qr,nn,an,vn]}),bn=xn,Ee=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ke=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function yn(e){return e===null?!1:Ee.exec(e)!==null||ke.exec(e)!==null}function An(e){var r,n,o,i,t,l,u,c=0,f=null,d,a,m;if(r=Ee.exec(e),r===null&&(r=ke.exec(e)),r===null)throw new Error("Date resolve error");if(n=+r[1],o=+r[2]-1,i=+r[3],!r[4])return new Date(Date.UTC(n,o,i));if(t=+r[4],l=+r[5],u=+r[6],r[7]){for(c=r[7].slice(0,3);c.length<3;)c+="0";c=+c}return r[9]&&(d=+r[10],a=+(r[11]||0),f=(d*60+a)*6e4,r[9]==="-"&&(f=-f)),m=new Date(Date.UTC(n,o,i,t,l,u,c)),f&&m.setTime(m.getTime()-f),m}function _n(e){return e.toISOString()}var wn=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:yn,construct:An,instanceOf:Date,represent:_n});function Sn(e){return e==="<<"||e===null}var Cn=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Sn}),Q=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function In(e){if(e===null)return!1;var r,n,o=0,i=e.length,t=Q;for(n=0;n64)){if(r<0)return!1;o+=6}return o%8===0}function On(e){var r,n,o=e.replace(/[\r\n=]/g,""),i=o.length,t=Q,l=0,u=[];for(r=0;r>16&255),u.push(l>>8&255),u.push(l&255)),l=l<<6|t.indexOf(o.charAt(r));return n=i%4*6,n===0?(u.push(l>>16&255),u.push(l>>8&255),u.push(l&255)):n===18?(u.push(l>>10&255),u.push(l>>2&255)):n===12&&u.push(l>>4&255),new Uint8Array(u)}function Tn(e){var r="",n=0,o,i,t=e.length,l=Q;for(o=0;o>18&63],r+=l[n>>12&63],r+=l[n>>6&63],r+=l[n&63]),n=(n<<8)+e[o];return i=t%3,i===0?(r+=l[n>>18&63],r+=l[n>>12&63],r+=l[n>>6&63],r+=l[n&63]):i===2?(r+=l[n>>10&63],r+=l[n>>4&63],r+=l[n<<2&63],r+=l[64]):i===1&&(r+=l[n>>2&63],r+=l[n<<4&63],r+=l[64],r+=l[64]),r}function Fn(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var En=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:In,construct:On,predicate:Fn,represent:Tn}),kn=Object.prototype.hasOwnProperty,jn=Object.prototype.toString;function Nn(e){if(e===null)return!0;var r=[],n,o,i,t,l,u=e;for(n=0,o=u.length;n>10)+55296,(e-65536&1023)+56320)}for(var Le=new Array(256),De=new Array(256),P=0;P<256;P++)Le[P]=Re(P)?1:0,De[P]=Re(P);function Jn(e,r){this.input=e,this.filename=r.filename||null,this.schema=r.schema||Vn,this.onWarning=r.onWarning||null,this.legacy=r.legacy||!1,this.json=r.json||!1,this.listener=r.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function Ye(e,r){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=Rr(n),new k(r,n)}function h(e,r){throw Ye(e,r)}function G(e,r){e.onWarning&&e.onWarning.call(null,Ye(e,r))}var Be={YAML:function(r,n,o){var i,t,l;r.version!==null&&h(r,"duplication of %YAML directive"),o.length!==1&&h(r,"YAML directive accepts exactly one argument"),i=/^([0-9]+)\.([0-9]+)$/.exec(o[0]),i===null&&h(r,"ill-formed argument of the YAML directive"),t=parseInt(i[1],10),l=parseInt(i[2],10),t!==1&&h(r,"unacceptable YAML version of the document"),r.version=o[0],r.checkLineBreaks=l<2,l!==1&&l!==2&&G(r,"unsupported YAML version of the document")},TAG:function(r,n,o){var i,t;o.length!==2&&h(r,"TAG directive accepts exactly two arguments"),i=o[0],t=o[1],qe.test(i)||h(r,"ill-formed tag handle (first argument) of the TAG directive"),j.call(r.tagMap,i)&&h(r,'there is a previously declared suffix for "'+i+'" tag handle'),Pe.test(t)||h(r,"ill-formed tag prefix (second argument) of the TAG directive");try{t=decodeURIComponent(t)}catch{h(r,"tag prefix is malformed: "+t)}r.tagMap[i]=t}};function N(e,r,n,o){var i,t,l,u;if(r1&&(e.result+=I.repeat(` +`,r-1))}function ei(e,r,n){var o,i,t,l,u,c,f,d,a=e.kind,m=e.result,s;if(s=e.input.charCodeAt(e.position),T(s)||q(s)||s===35||s===38||s===42||s===33||s===124||s===62||s===39||s===34||s===37||s===64||s===96||(s===63||s===45)&&(i=e.input.charCodeAt(e.position+1),T(i)||n&&q(i)))return!1;for(e.kind="scalar",e.result="",t=l=e.position,u=!1;s!==0;){if(s===58){if(i=e.input.charCodeAt(e.position+1),T(i)||n&&q(i))break}else if(s===35){if(o=e.input.charCodeAt(e.position-1),T(o))break}else{if(e.position===e.lineStart&&z(e)||n&&q(s))break;if(E(s))if(c=e.line,f=e.lineStart,d=e.lineIndent,_(e,!1,-1),e.lineIndent>=r){u=!0,s=e.input.charCodeAt(e.position);continue}else{e.position=l,e.line=c,e.lineStart=f,e.lineIndent=d;break}}u&&(N(e,t,l,!1),re(e,e.line-c),t=l=e.position,u=!1),M(s)||(l=e.position+1),s=e.input.charCodeAt(++e.position)}return N(e,t,l,!1),e.result?!0:(e.kind=a,e.result=m,!1)}function ri(e,r){var n,o,i;if(n=e.input.charCodeAt(e.position),n!==39)return!1;for(e.kind="scalar",e.result="",e.position++,o=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(N(e,o,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)o=e.position,e.position++,i=e.position;else return!0;else E(n)?(N(e,o,i,!0),re(e,_(e,!1,r)),o=i=e.position):e.position===e.lineStart&&z(e)?h(e,"unexpected end of the document within a single quoted scalar"):(e.position++,i=e.position);h(e,"unexpected end of the stream within a single quoted scalar")}function ni(e,r){var n,o,i,t,l,u;if(u=e.input.charCodeAt(e.position),u!==34)return!1;for(e.kind="scalar",e.result="",e.position++,n=o=e.position;(u=e.input.charCodeAt(e.position))!==0;){if(u===34)return N(e,n,e.position,!0),e.position++,!0;if(u===92){if(N(e,n,e.position,!0),u=e.input.charCodeAt(++e.position),E(u))_(e,!1,r);else if(u<256&&Le[u])e.result+=De[u],e.position++;else if((l=Zn(u))>0){for(i=l,t=0;i>0;i--)u=e.input.charCodeAt(++e.position),(l=Wn(u))>=0?t=(t<<4)+l:h(e,"expected hexadecimal character");e.result+=Qn(t),e.position++}else h(e,"unknown escape sequence");n=o=e.position}else E(u)?(N(e,n,o,!0),re(e,_(e,!1,r)),n=o=e.position):e.position===e.lineStart&&z(e)?h(e,"unexpected end of the document within a double quoted scalar"):(e.position++,o=e.position)}h(e,"unexpected end of the stream within a double quoted scalar")}function ii(e,r){var n=!0,o,i,t,l=e.tag,u,c=e.anchor,f,d,a,m,s,x=Object.create(null),b,g,A,p;if(p=e.input.charCodeAt(e.position),p===91)d=93,s=!1,u=[];else if(p===123)d=125,s=!0,u={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),p=e.input.charCodeAt(++e.position);p!==0;){if(_(e,!0,r),p=e.input.charCodeAt(e.position),p===d)return e.position++,e.tag=l,e.anchor=c,e.kind=s?"mapping":"sequence",e.result=u,!0;n?p===44&&h(e,"expected the node content, but found ','"):h(e,"missed comma between flow collection entries"),g=b=A=null,a=m=!1,p===63&&(f=e.input.charCodeAt(e.position+1),T(f)&&(a=m=!0,e.position++,_(e,!0,r))),o=e.line,i=e.lineStart,t=e.position,R(e,r,U,!1,!0),g=e.tag,b=e.result,_(e,!0,r),p=e.input.charCodeAt(e.position),(m||e.line===o)&&p===58&&(a=!0,p=e.input.charCodeAt(++e.position),_(e,!0,r),R(e,r,U,!1,!0),A=e.result),s?$(e,u,x,g,b,A,o,i,t):a?u.push($(e,null,x,g,b,A,o,i,t)):u.push(b),_(e,!0,r),p=e.input.charCodeAt(e.position),p===44?(n=!0,p=e.input.charCodeAt(++e.position)):n=!1}h(e,"unexpected end of the stream within a flow collection")}function oi(e,r){var n,o,i=J,t=!1,l=!1,u=r,c=0,f=!1,d,a;if(a=e.input.charCodeAt(e.position),a===124)o=!1;else if(a===62)o=!0;else return!1;for(e.kind="scalar",e.result="";a!==0;)if(a=e.input.charCodeAt(++e.position),a===43||a===45)J===i?i=a===43?Me:Gn:h(e,"repeat of a chomping mode identifier");else if((d=Xn(a))>=0)d===0?h(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):l?h(e,"repeat of an indentation width identifier"):(u=r+d-1,l=!0);else break;if(M(a)){do a=e.input.charCodeAt(++e.position);while(M(a));if(a===35)do a=e.input.charCodeAt(++e.position);while(!E(a)&&a!==0)}for(;a!==0;){for(ee(e),e.lineIndent=0,a=e.input.charCodeAt(e.position);(!l||e.lineIndentu&&(u=e.lineIndent),E(a)){c++;continue}if(e.lineIndentr)&&c!==0)h(e,"bad indentation of a sequence entry");else if(e.lineIndentr)&&(g&&(l=e.line,u=e.lineStart,c=e.position),R(e,r,V,!0,i)&&(g?x=e.result:b=e.result),g||($(e,a,m,s,x,b,l,u,c),s=x=b=null),_(e,!0,-1),p=e.input.charCodeAt(e.position)),(e.line===t||e.lineIndent>r)&&p!==0)h(e,"bad indentation of a mapping entry");else if(e.lineIndentr?c=1:e.lineIndent===r?c=0:e.lineIndentr?c=1:e.lineIndent===r?c=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),a=0,m=e.implicitTypes.length;a"),e.result!==null&&x.kind!==e.kind&&h(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+x.kind+'", not "'+e.kind+'"'),x.resolve(e.result,e.tag)?(e.result=x.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):h(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||d}function fi(e){var r=e.position,n,o,i,t=!1,l;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(l=e.input.charCodeAt(e.position))!==0&&(_(e,!0,-1),l=e.input.charCodeAt(e.position),!(e.lineIndent>0||l!==37));){for(t=!0,l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!T(l);)l=e.input.charCodeAt(++e.position);for(o=e.input.slice(n,e.position),i=[],o.length<1&&h(e,"directive name must not be less than one character in length");l!==0;){for(;M(l);)l=e.input.charCodeAt(++e.position);if(l===35){do l=e.input.charCodeAt(++e.position);while(l!==0&&!E(l));break}if(E(l))break;for(n=e.position;l!==0&&!T(l);)l=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}l!==0&&ee(e),j.call(Be,o)?Be[o](e,o,i):G(e,'unknown document directive "'+o+'"')}if(_(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,_(e,!0,-1)):t&&h(e,"directives end mark is expected"),R(e,e.lineIndent-1,V,!1,!0),_(e,!0,-1),e.checkLineBreaks&&Hn.test(e.input.slice(r,e.position))&&G(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&z(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,_(e,!0,-1));return}if(e.position"u"&&(n=r,r=null);var o=Ge(e,n);if(typeof r!="function")return o;for(var i=0,t=o.length;i0?1:-1}),ne}var Ci=wi()?Math.sign:Si(),Ii=Ci,Oi=Math.abs,Ti=Math.floor,Fi=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:Ii(e)*Ti(Oi(e)))},Ei=Fi,ki=Math.max,ji=function(e){return ki(0,Ei(e))},He=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e},Ni=L,Ke=function(e){if(!Ni(e))throw new TypeError("Cannot use null or undefined");return e},Mi={exports:{}},qi=function(){var e=Object.assign,r;return typeof e!="function"?!1:(r={foo:"raz"},e(r,{bar:"dwa"},{trzy:"trzy"}),r.foo+r.bar+r.trzy==="razdwatrzy")},ie,We;function Pi(){return We||(We=1,ie=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),ie}var oe,Ze;function $i(){if(Ze)return oe;Ze=1;var e=L,r=Object.keys;return oe=function(n){return r(e(n)?Object(n):n)},oe}var le,Xe;function Ri(){return Xe||(Xe=1,le=Pi()()?Object.keys:$i()),le}var te,Qe;function Li(){if(Qe)return te;Qe=1;var e=Ri(),r=Ke,n=Math.max;return te=function(o,i){var t,l,u=n(arguments.length,2),c;for(o=Object(r(o)),c=function(f){try{o[f]=i[f]}catch(d){t||(t=d)}},l=1;l-1},ce}var io=ro()?String.prototype.contains:no(),H=nr,or=eo,lr=Je,tr=_i,Y=io,oo=rr.exports=function(e,r){var n,o,i,t,l;return arguments.length<2||typeof e!="string"?(t=r,r=e,e=null):t=arguments[2],H(e)?(n=Y.call(e,"c"),o=Y.call(e,"e"),i=Y.call(e,"w")):(n=i=!0,o=!1),l={value:r,configurable:n,enumerable:o,writable:i},t?lr(tr(t),l):l};oo.gs=function(e,r,n){var o,i,t,l;return typeof e!="string"?(t=n,n=r,r=e,e=null):t=arguments[3],H(r)?or(r)?H(n)?or(n)||(t=n,n=void 0):n=void 0:(t=r,r=n=void 0):r=void 0,H(e)?(o=Y.call(e,"c"),i=Y.call(e,"e")):(o=!0,i=!1),l={get:r,set:n,configurable:o,enumerable:i},t?lr(tr(t),l):l};var B=rr.exports,fe={exports:{}};(function(e,r){var n=B,o=He,i=Function.prototype.apply,t=Function.prototype.call,l=Object.create,u=Object.defineProperty,c=Object.defineProperties,f=Object.prototype.hasOwnProperty,d={configurable:!0,enumerable:!1,writable:!0},a,m,s,x,b,g,A;a=function(p,v){var y;return o(v),f.call(this,"__ee__")?y=this.__ee__:(y=d.value=l(null),u(this,"__ee__",d),d.value=null),y[p]?typeof y[p]=="object"?y[p].push(v):y[p]=[y[p],v]:y[p]=v,this},m=function(p,v){var y,S;return o(v),S=this,a.call(this,p,y=function(){s.call(S,p,y),i.call(v,this,arguments)}),y.__eeOnceListener__=v,this},s=function(p,v){var y,S,w,O;if(o(v),!f.call(this,"__ee__"))return this;if(y=this.__ee__,!y[p])return this;if(S=y[p],typeof S=="object")for(O=0;w=S[O];++O)(w===v||w.__eeOnceListener__===v)&&(S.length===2?y[p]=S[O?0:1]:S.splice(O,1));else(S===v||S.__eeOnceListener__===v)&&delete y[p];return this},x=function(p){var v,y,S,w,O;if(f.call(this,"__ee__")&&(w=this.__ee__[p],!!w))if(typeof w=="object"){for(y=arguments.length,O=new Array(y-1),v=1;v=55296&&y<=56319&&(F+=m[++g])),F=s?f.call(s,x,F,A):F,b?(d.value=F,a(p,A,d)):p[A]=F,++A;v=A}}if(v===void 0)for(v=o(m.length),b&&(p=new b(v)),g=0;gasync r=>{try{const n=await e(r);postMessage({result:n})}catch(n){postMessage({error:n})}})(async e=>mi(e.data))})(); diff --git a/assets/tree.worker-CpBXS68a.js b/assets/tree.worker-CpBXS68a.js new file mode 100644 index 0000000..1ed3968 --- /dev/null +++ b/assets/tree.worker-CpBXS68a.js @@ -0,0 +1,27 @@ +var Hb=Object.defineProperty;var jb=(ze,tn,$e)=>tn in ze?Hb(ze,tn,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ze[tn]=$e;var de=(ze,tn,$e)=>jb(ze,typeof tn!="symbol"?tn+"":tn,$e);(function(){"use strict";var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tn="\0",$e="\0",Wu="";let ul=class{constructor(u){de(this,"_isDirected",!0);de(this,"_isMultigraph",!1);de(this,"_isCompound",!1);de(this,"_label");de(this,"_defaultNodeLabelFn",()=>{});de(this,"_defaultEdgeLabelFn",()=>{});de(this,"_nodes",{});de(this,"_in",{});de(this,"_preds",{});de(this,"_out",{});de(this,"_sucs",{});de(this,"_edgeObjs",{});de(this,"_edgeLabels",{});de(this,"_nodeCount",0);de(this,"_edgeCount",0);de(this,"_parent");de(this,"_children");u&&(this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[$e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){return this._defaultNodeLabelFn=u,typeof u!="function"&&(this._defaultNodeLabelFn=()=>u),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter(r=>Object.keys(u._in[r]).length===0)}sinks(){var u=this;return this.nodes().filter(r=>Object.keys(u._out[r]).length===0)}setNodes(u,r){var o=arguments,f=this;return u.forEach(function(l){o.length>1?f.setNode(l,r):f.setNode(l)}),this}setNode(u,r){return Object.hasOwn(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=r),this):(this._nodes[u]=arguments.length>1?r:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=$e,this._children[u]={},this._children[$e][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var r=this;if(Object.hasOwn(this._nodes,u)){var o=f=>r.removeEdge(r._edgeObjs[f]);delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(f){r.setParent(f)}),delete this._children[u]),Object.keys(this._in[u]).forEach(o),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach(o),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r===void 0)r=$e;else{r+="";for(var o=r;o!==void 0;o=this.parent(o))if(o===u)throw new Error("Setting "+r+" as parent of "+u+" would create a cycle");this.setNode(r)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=r,this._children[r][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var r=this._parent[u];if(r!==$e)return r}}children(u=$e){if(this._isCompound){var r=this._children[u];if(r)return Object.keys(r)}else{if(u===$e)return this.nodes();if(this.hasNode(u))return[]}}predecessors(u){var r=this._preds[u];if(r)return Object.keys(r)}successors(u){var r=this._sucs[u];if(r)return Object.keys(r)}neighbors(u){var r=this.predecessors(u);if(r){const f=new Set(r);for(var o of this.successors(u))f.add(o);return Array.from(f.values())}}isLeaf(u){var r;return this.isDirected()?r=this.successors(u):r=this.neighbors(u),r.length===0}filterNodes(u){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var o=this;Object.entries(this._nodes).forEach(function([h,g]){u(h)&&r.setNode(h,g)}),Object.values(this._edgeObjs).forEach(function(h){r.hasNode(h.v)&&r.hasNode(h.w)&&r.setEdge(h,o.edge(h))});var f={};function l(h){var g=o.parent(h);return g===void 0||r.hasNode(g)?(f[h]=g,g):g in f?f[g]:l(g)}return this._isCompound&&r.nodes().forEach(h=>r.setParent(h,l(h))),r}setDefaultEdgeLabel(u){return this._defaultEdgeLabelFn=u,typeof u!="function"&&(this._defaultEdgeLabelFn=()=>u),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,r){var o=this,f=arguments;return u.reduce(function(l,h){return f.length>1?o.setEdge(l,h,r):o.setEdge(l,h),h}),this}setEdge(){var u,r,o,f,l=!1,h=arguments[0];typeof h=="object"&&h!==null&&"v"in h?(u=h.v,r=h.w,o=h.name,arguments.length===2&&(f=arguments[1],l=!0)):(u=h,r=arguments[1],o=arguments[3],arguments.length>2&&(f=arguments[2],l=!0)),u=""+u,r=""+r,o!==void 0&&(o=""+o);var g=et(this._isDirected,u,r,o);if(Object.hasOwn(this._edgeLabels,g))return l&&(this._edgeLabels[g]=f),this;if(o!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(r),this._edgeLabels[g]=l?f:this._defaultEdgeLabelFn(u,r,o);var _=al(this._isDirected,u,r,o);return u=_.v,r=_.w,Object.freeze(_),this._edgeObjs[g]=_,Bu(this._preds[r],u),Bu(this._sucs[u],r),this._in[r][g]=_,this._out[u][g]=_,this._edgeCount++,this}edge(u,r,o){var f=arguments.length===1?Or(this._isDirected,arguments[0]):et(this._isDirected,u,r,o);return this._edgeLabels[f]}edgeAsObj(){const u=this.edge(...arguments);return typeof u!="object"?{label:u}:u}hasEdge(u,r,o){var f=arguments.length===1?Or(this._isDirected,arguments[0]):et(this._isDirected,u,r,o);return Object.hasOwn(this._edgeLabels,f)}removeEdge(u,r,o){var f=arguments.length===1?Or(this._isDirected,arguments[0]):et(this._isDirected,u,r,o),l=this._edgeObjs[f];return l&&(u=l.v,r=l.w,delete this._edgeLabels[f],delete this._edgeObjs[f],qu(this._preds[r],u),qu(this._sucs[u],r),delete this._in[r][f],delete this._out[u][f],this._edgeCount--),this}inEdges(u,r){var o=this._in[u];if(o){var f=Object.values(o);return r?f.filter(l=>l.v===r):f}}outEdges(u,r){var o=this._out[u];if(o){var f=Object.values(o);return r?f.filter(l=>l.w===r):f}}nodeEdges(u,r){var o=this.inEdges(u,r);if(o)return o.concat(this.outEdges(u,r))}};function Bu(i,u){i[u]?i[u]++:i[u]=1}function qu(i,u){--i[u]||delete i[u]}function et(i,u,r,o){var f=""+u,l=""+r;if(!i&&f>l){var h=f;f=l,l=h}return f+Wu+l+Wu+(o===void 0?tn:o)}function al(i,u,r,o){var f=""+u,l=""+r;if(!i&&f>l){var h=f;f=l,l=h}var g={v:f,w:l};return o&&(g.name=o),g}function Or(i,u){return et(i,u.v,u.w,u.name)}var Ir=ul,ol="2.2.4",fl={Graph:Ir,version:ol},sl=Ir,ll={write:cl,read:pl};function cl(i){var u={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:hl(i),edges:dl(i)};return i.graph()!==void 0&&(u.value=structuredClone(i.graph())),u}function hl(i){return i.nodes().map(function(u){var r=i.node(u),o=i.parent(u),f={v:u};return r!==void 0&&(f.value=r),o!==void 0&&(f.parent=o),f})}function dl(i){return i.edges().map(function(u){var r=i.edge(u),o={v:u.v,w:u.w};return u.name!==void 0&&(o.name=u.name),r!==void 0&&(o.value=r),o})}function pl(i){var u=new sl(i.options).setGraph(i.value);return i.nodes.forEach(function(r){u.setNode(r.v,r.value),r.parent&&u.setParent(r.v,r.parent)}),i.edges.forEach(function(r){u.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),u}var gl=_l;function _l(i){var u={},r=[],o;function f(l){Object.hasOwn(u,l)||(u[l]=!0,o.push(l),i.successors(l).forEach(f),i.predecessors(l).forEach(f))}return i.nodes().forEach(function(l){o=[],f(l),o.length&&r.push(o)}),r}var Gu=class{constructor(){de(this,"_arr",[]);de(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(u){return u.key})}has(u){return Object.hasOwn(this._keyIndices,u)}priority(u){var r=this._keyIndices[u];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(u,r){var o=this._keyIndices;if(u=String(u),!Object.hasOwn(o,u)){var f=this._arr,l=f.length;return o[u]=l,f.push({key:u,priority:r}),this._decrease(l),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key}decrease(u,r){var o=this._keyIndices[u];if(r>this._arr[o].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[o].priority+" New: "+r);this._arr[o].priority=r,this._decrease(o)}_heapify(u){var r=this._arr,o=2*u,f=o+1,l=u;o>1,!(r[f].priority1;function wl(i,u,r,o){return bl(i,String(u),r||ml,o||function(f){return i.outEdges(f)})}function bl(i,u,r,o){var f={},l=new vl,h,g,_=function(m){var y=m.v!==h?m.v:m.w,O=f[y],R=r(m),T=g.distance+R;if(R<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+R);T0&&(h=l.removeMin(),g=f[h],g.distance!==Number.POSITIVE_INFINITY);)o(h).forEach(_);return f}var yl=Uu,El=xl;function xl(i,u,r){return i.nodes().reduce(function(o,f){return o[f]=yl(i,f,u,r),o},{})}var zu=Ol;function Ol(i){var u=0,r=[],o={},f=[];function l(h){var g=o[h]={onStack:!0,lowlink:u,index:u++};if(r.push(h),i.successors(h).forEach(function(y){Object.hasOwn(o,y)?o[y].onStack&&(g.lowlink=Math.min(g.lowlink,o[y].index)):(l(y),g.lowlink=Math.min(g.lowlink,o[y].lowlink))}),g.lowlink===g.index){var _=[],m;do m=r.pop(),o[m].onStack=!1,_.push(m);while(h!==m);f.push(_)}}return i.nodes().forEach(function(h){Object.hasOwn(o,h)||l(h)}),f}var Il=zu,Sl=Al;function Al(i){return Il(i).filter(function(u){return u.length>1||u.length===1&&i.hasEdge(u[0],u[0])})}var Rl=Tl,Cl=()=>1;function Tl(i,u,r){return Ll(i,u||Cl,r||function(o){return i.outEdges(o)})}function Ll(i,u,r){var o={},f=i.nodes();return f.forEach(function(l){o[l]={},o[l][l]={distance:0},f.forEach(function(h){l!==h&&(o[l][h]={distance:Number.POSITIVE_INFINITY})}),r(l).forEach(function(h){var g=h.v===l?h.w:h.v,_=u(h);o[l][g]={distance:_,predecessor:l}})}),f.forEach(function(l){var h=o[l];f.forEach(function(g){var _=o[g];f.forEach(function(m){var y=_[l],O=h[m],R=_[m],T=y.distance+O.distance;Ti.successors(g):g=>i.neighbors(g),f=r==="post"?Ml:Fl,l=[],h={};return u.forEach(g=>{if(!i.hasNode(g))throw new Error("Graph does not have node: "+g);f(g,o,h,l)}),l}function Ml(i,u,r,o){for(var f=[[i,!1]];f.length>0;){var l=f.pop();l[1]?o.push(l[0]):Object.hasOwn(r,l[0])||(r[l[0]]=!0,f.push([l[0],!0]),Ku(u(l[0]),h=>f.push([h,!1])))}}function Fl(i,u,r,o){for(var f=[i];f.length>0;){var l=f.pop();Object.hasOwn(r,l)||(r[l]=!0,o.push(l),Ku(u(l),h=>f.push(h)))}}function Ku(i,u){for(var r=i.length;r--;)u(i[r],r,i);return i}var kl=Vu,Dl=Wl;function Wl(i,u){return kl(i,u,"post")}var Bl=Vu,ql=Gl;function Gl(i,u){return Bl(i,u,"pre")}var Ul=Ir,zl=Gu,Hl=jl;function jl(i,u){var r=new Ul,o={},f=new zl,l;function h(_){var m=_.v===l?_.w:_.v,y=f.priority(m);if(y!==void 0){var O=u(_);O0;){if(l=f.removeMin(),Object.hasOwn(o,l))r.setEdge(l,o[l]);else{if(g)throw new Error("Input graph is not connected: "+i);g=!0}i.nodeEdges(l).forEach(h)}return r}var Yl={components:gl,dijkstra:Uu,dijkstraAll:El,findCycles:Sl,floydWarshall:Rl,isAcyclic:Nl,postorder:Dl,preorder:ql,prim:Hl,tarjan:zu,topsort:ju},Xu=fl,He={Graph:Xu.Graph,json:ll,alg:Yl,version:Xu.version};let Vl=class{constructor(){let u={};u._next=u._prev=u,this._sentinel=u}dequeue(){let u=this._sentinel,r=u._prev;if(r!==u)return Zu(r),r}enqueue(u){let r=this._sentinel;u._prev&&u._next&&Zu(u),u._next=r._next,r._next._prev=u,r._next=u,u._prev=r}toString(){let u=[],r=this._sentinel,o=r._prev;for(;o!==r;)u.push(JSON.stringify(o,Kl)),o=o._prev;return"["+u.join(", ")+"]"}};function Zu(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function Kl(i,u){if(i!=="_next"&&i!=="_prev")return u}var Xl=Vl;let Zl=He.Graph,Jl=Xl;var Ql=nc;let ec=()=>1;function nc(i,u){if(i.nodeCount()<=1)return[];let r=rc(i,u||ec);return tc(r.graph,r.buckets,r.zeroIdx).flatMap(f=>i.outEdges(f.v,f.w))}function tc(i,u,r){let o=[],f=u[u.length-1],l=u[0],h;for(;i.nodeCount();){for(;h=l.dequeue();)Ar(i,u,r,h);for(;h=f.dequeue();)Ar(i,u,r,h);if(i.nodeCount()){for(let g=u.length-2;g>0;--g)if(h=u[g].dequeue(),h){o=o.concat(Ar(i,u,r,h,!0));break}}}return o}function Ar(i,u,r,o,f){let l=f?[]:void 0;return i.inEdges(o.v).forEach(h=>{let g=i.edge(h),_=i.node(h.v);f&&l.push({v:h.v,w:h.w}),_.out-=g,Rr(u,r,_)}),i.outEdges(o.v).forEach(h=>{let g=i.edge(h),_=h.w,m=i.node(_);m.in-=g,Rr(u,r,m)}),i.removeNode(o.v),l}function rc(i,u){let r=new Zl,o=0,f=0;i.nodes().forEach(g=>{r.setNode(g,{v:g,in:0,out:0})}),i.edges().forEach(g=>{let _=r.edge(g.v,g.w)||0,m=u(g),y=_+m;r.setEdge(g.v,g.w,y),f=Math.max(f,r.node(g.v).out+=m),o=Math.max(o,r.node(g.w).in+=m)});let l=ic(f+o+3).map(()=>new Jl),h=o+1;return r.nodes().forEach(g=>{Rr(l,h,r.node(g))}),{graph:r,buckets:l,zeroIdx:h}}function Rr(i,u,r){r.out?r.in?i[r.out-r.in+u].enqueue(r):i[i.length-1].enqueue(r):i[0].enqueue(r)}function ic(i){const u=[];for(let r=0;ru.setNode(r,i.node(r))),i.edges().forEach(r=>{let o=u.edge(r.v,r.w)||{weight:0,minlen:1},f=i.edge(r);u.setEdge(r.v,r.w,{weight:o.weight+f.weight,minlen:Math.max(o.minlen,f.minlen)})}),u}function ac(i){let u=new Ju({multigraph:i.isMultigraph()}).setGraph(i.graph());return i.nodes().forEach(r=>{i.children(r).length||u.setNode(r,i.node(r))}),i.edges().forEach(r=>{u.setEdge(r,i.edge(r))}),u}function oc(i){let u=i.nodes().map(r=>{let o={};return i.outEdges(r).forEach(f=>{o[f.w]=(o[f.w]||0)+i.edge(f).weight}),o});return Cr(i.nodes(),u)}function fc(i){let u=i.nodes().map(r=>{let o={};return i.inEdges(r).forEach(f=>{o[f.v]=(o[f.v]||0)+i.edge(f).weight}),o});return Cr(i.nodes(),u)}function sc(i,u){let r=i.x,o=i.y,f=u.x-r,l=u.y-o,h=i.width/2,g=i.height/2;if(!f&&!l)throw new Error("Not possible to find intersection inside of the rectangle");let _,m;return Math.abs(l)*h>Math.abs(f)*g?(l<0&&(g=-g),_=g*f/l,m=g):(f<0&&(h=-h),_=h,m=h*l/f),{x:r+_,y:o+m}}function lc(i){let u=ra(na(i)+1).map(()=>[]);return i.nodes().forEach(r=>{let o=i.node(r),f=o.rank;f!==void 0&&(u[f][o.order]=r)}),u}function cc(i){let u=i.nodes().map(o=>{let f=i.node(o).rank;return f===void 0?Number.MAX_VALUE:f}),r=xt(Math.min,u);i.nodes().forEach(o=>{let f=i.node(o);Object.hasOwn(f,"rank")&&(f.rank-=r)})}function hc(i){let u=i.nodes().map(h=>i.node(h).rank),r=xt(Math.min,u),o=[];i.nodes().forEach(h=>{let g=i.node(h).rank-r;o[g]||(o[g]=[]),o[g].push(h)});let f=0,l=i.graph().nodeRankFactor;Array.from(o).forEach((h,g)=>{h===void 0&&g%l!==0?--f:h!==void 0&&f&&h.forEach(_=>i.node(_).rank+=f)})}function dc(i,u,r,o){let f={width:0,height:0};return arguments.length>=4&&(f.rank=r,f.order=o),Qu(i,"border",f,u)}function pc(i,u=ea){const r=[];for(let o=0;oea){const r=pc(u);return i.apply(null,r.map(o=>i.apply(null,o)))}else return i.apply(null,u)}function na(i){const r=i.nodes().map(o=>{let f=i.node(o).rank;return f===void 0?Number.MIN_VALUE:f});return xt(Math.max,r)}function gc(i,u){let r={lhs:[],rhs:[]};return i.forEach(o=>{u(o)?r.lhs.push(o):r.rhs.push(o)}),r}function _c(i,u){let r=Date.now();try{return u()}finally{console.log(i+" time: "+(Date.now()-r)+"ms")}}function vc(i,u){return u()}let mc=0;function ta(i){var u=++mc;return toString(i)+u}function ra(i,u,r=1){u==null&&(u=i,i=0);let o=l=>luo[u]),Object.entries(i).reduce((o,[f,l])=>(o[f]=r(l,f),o),{})}function Cr(i,u){return i.reduce((r,o,f)=>(r[o]=u[f],r),{})}let yc=Ql,Ec=le.uniqueId;var xc={run:Oc,undo:Sc};function Oc(i){(i.graph().acyclicer==="greedy"?yc(i,r(i)):Ic(i)).forEach(o=>{let f=i.edge(o);i.removeEdge(o),f.forwardName=o.name,f.reversed=!0,i.setEdge(o.w,o.v,f,Ec("rev"))});function r(o){return f=>o.edge(f).weight}}function Ic(i){let u=[],r={},o={};function f(l){Object.hasOwn(o,l)||(o[l]=!0,r[l]=!0,i.outEdges(l).forEach(h=>{Object.hasOwn(r,h.w)?u.push(h):f(h.w)}),delete r[l])}return i.nodes().forEach(f),u}function Sc(i){i.edges().forEach(u=>{let r=i.edge(u);if(r.reversed){i.removeEdge(u);let o=r.forwardName;delete r.reversed,delete r.forwardName,i.setEdge(u.w,u.v,r,o)}})}let Ac=le;var Rc={run:Cc,undo:Lc};function Cc(i){i.graph().dummyChains=[],i.edges().forEach(u=>Tc(i,u))}function Tc(i,u){let r=u.v,o=i.node(r).rank,f=u.w,l=i.node(f).rank,h=u.name,g=i.edge(u),_=g.labelRank;if(l===o+1)return;i.removeEdge(u);let m,y,O;for(O=0,++o;o{let r=i.node(u),o=r.edgeLabel,f;for(i.setEdge(r.edgeObj,o);r.dummy;)f=i.successors(u)[0],i.removeNode(u),o.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(o.x=r.x,o.y=r.y,o.width=r.width,o.height=r.height),u=f,r=i.node(u)})}const{applyWithChunking:Nc}=le;var Ot={longestPath:Pc,slack:$c};function Pc(i){var u={};function r(o){var f=i.node(o);if(Object.hasOwn(u,o))return f.rank;u[o]=!0;let l=i.outEdges(o).map(g=>g==null?Number.POSITIVE_INFINITY:r(g.w)-i.edge(g).minlen);var h=Nc(Math.min,l);return h===Number.POSITIVE_INFINITY&&(h=0),f.rank=h}i.sources().forEach(r)}function $c(i,u){return i.node(u.w).rank-i.node(u.v).rank-i.edge(u).minlen}var Mc=He.Graph,It=Ot.slack,ia=Fc;function Fc(i){var u=new Mc({directed:!1}),r=i.nodes()[0],o=i.nodeCount();u.setNode(r,{});for(var f,l;kc(u,i){var l=f.v,h=o===l?f.w:l;!i.hasNode(h)&&!It(u,f)&&(i.setNode(h,{}),i.setEdge(o,h,{}),r(h))})}return i.nodes().forEach(r),i.nodeCount()}function Dc(i,u){return u.edges().reduce((o,f)=>{let l=Number.POSITIVE_INFINITY;return i.hasNode(f.v)!==i.hasNode(f.w)&&(l=It(u,f)),lu.node(o).rank+=r)}var Bc=ia,ua=Ot.slack,qc=Ot.longestPath,Gc=He.alg.preorder,Uc=He.alg.postorder,zc=le.simplify,Hc=In;In.initLowLimValues=Lr,In.initCutValues=Tr,In.calcCutValue=aa,In.leaveEdge=fa,In.enterEdge=sa,In.exchangeEdges=la;function In(i){i=zc(i),qc(i);var u=Bc(i);Lr(u),Tr(u,i);for(var r,o;r=fa(u);)o=sa(u,i,r),la(u,i,r,o)}function Tr(i,u){var r=Uc(i,i.nodes());r=r.slice(0,r.length-1),r.forEach(o=>jc(i,u,o))}function jc(i,u,r){var o=i.node(r),f=o.parent;i.edge(r,f).cutvalue=aa(i,u,r)}function aa(i,u,r){var o=i.node(r),f=o.parent,l=!0,h=u.edge(r,f),g=0;return h||(l=!1,h=u.edge(f,r)),g=h.weight,u.nodeEdges(r).forEach(_=>{var m=_.v===r,y=m?_.w:_.v;if(y!==f){var O=m===l,R=u.edge(_).weight;if(g+=O?R:-R,Vc(i,r,y)){var T=i.edge(r,y).cutvalue;g+=O?-T:T}}}),g}function Lr(i,u){arguments.length<2&&(u=i.nodes()[0]),oa(i,{},1,u)}function oa(i,u,r,o,f){var l=r,h=i.node(o);return u[o]=!0,i.neighbors(o).forEach(g=>{Object.hasOwn(u,g)||(r=oa(i,u,r,g,o))}),h.low=l,h.lim=r++,f?h.parent=f:delete h.parent,r}function fa(i){return i.edges().find(u=>i.edge(u).cutvalue<0)}function sa(i,u,r){var o=r.v,f=r.w;u.hasEdge(o,f)||(o=r.w,f=r.v);var l=i.node(o),h=i.node(f),g=l,_=!1;l.lim>h.lim&&(g=h,_=!0);var m=u.edges().filter(y=>_===ca(i,i.node(y.v),g)&&_!==ca(i,i.node(y.w),g));return m.reduce((y,O)=>ua(u,O)!u.node(f).parent),o=Gc(i,r);o=o.slice(1),o.forEach(f=>{var l=i.node(f).parent,h=u.edge(f,l),g=!1;h||(h=u.edge(l,f),g=!0),u.node(f).rank=u.node(l).rank+(g?h.minlen:-h.minlen)})}function Vc(i,u,r){return i.hasEdge(u,r)}function ca(i,u,r){return r.low<=u.lim&&u.lim<=r.lim}var Kc=Ot,ha=Kc.longestPath,Xc=ia,Zc=Hc,Jc=Qc;function Qc(i){switch(i.graph().ranker){case"network-simplex":da(i);break;case"tight-tree":nh(i);break;case"longest-path":eh(i);break;default:da(i)}}var eh=ha;function nh(i){ha(i),Xc(i)}function da(i){Zc(i)}var th=rh;function rh(i){let u=uh(i);i.graph().dummyChains.forEach(r=>{let o=i.node(r),f=o.edgeObj,l=ih(i,u,f.v,f.w),h=l.path,g=l.lca,_=0,m=h[_],y=!0;for(;r!==f.w;){if(o=i.node(r),y){for(;(m=h[_])!==g&&i.node(m).maxRankh||g>u[_].lim));for(m=_,_=o;(_=i.parent(_))!==m;)l.push(_);return{path:f.concat(l.reverse()),lca:m}}function uh(i){let u={},r=0;function o(f){let l=r;i.children(f).forEach(o),u[f]={low:l,lim:r++}}return i.children().forEach(o),u}let St=le;var ah={run:oh,cleanup:lh};function oh(i){let u=St.addDummyNode(i,"root",{},"_root"),r=fh(i),o=Object.values(r),f=St.applyWithChunking(Math.max,o)-1,l=2*f+1;i.graph().nestingRoot=u,i.edges().forEach(g=>i.edge(g).minlen*=l);let h=sh(i)+1;i.children().forEach(g=>pa(i,u,l,h,f,r,g)),i.graph().nodeRankFactor=l}function pa(i,u,r,o,f,l,h){let g=i.children(h);if(!g.length){h!==u&&i.setEdge(u,h,{weight:0,minlen:r});return}let _=St.addBorderNode(i,"_bt"),m=St.addBorderNode(i,"_bb"),y=i.node(h);i.setParent(_,h),y.borderTop=_,i.setParent(m,h),y.borderBottom=m,g.forEach(O=>{pa(i,u,r,o,f,l,O);let R=i.node(O),T=R.borderTop?R.borderTop:O,G=R.borderBottom?R.borderBottom:O,K=R.borderTop?o:2*o,k=T!==G?1:f-l[h]+1;i.setEdge(_,T,{weight:K,minlen:k,nestingEdge:!0}),i.setEdge(G,m,{weight:K,minlen:k,nestingEdge:!0})}),i.parent(h)||i.setEdge(u,_,{weight:0,minlen:f+l[h]})}function fh(i){var u={};function r(o,f){var l=i.children(o);l&&l.length&&l.forEach(h=>r(h,f+1)),u[o]=f}return i.children().forEach(o=>r(o,1)),u}function sh(i){return i.edges().reduce((u,r)=>u+i.edge(r).weight,0)}function lh(i){var u=i.graph();i.removeNode(u.nestingRoot),delete u.nestingRoot,i.edges().forEach(r=>{var o=i.edge(r);o.nestingEdge&&i.removeEdge(r)})}let ch=le;var hh=dh;function dh(i){function u(r){let o=i.children(r),f=i.node(r);if(o.length&&o.forEach(u),Object.hasOwn(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(let l=f.minRank,h=f.maxRank+1;lva(i.node(u))),i.edges().forEach(u=>va(i.edge(u)))}function va(i){let u=i.width;i.width=i.height,i.height=u}function vh(i){i.nodes().forEach(u=>Nr(i.node(u))),i.edges().forEach(u=>{let r=i.edge(u);r.points.forEach(Nr),Object.hasOwn(r,"y")&&Nr(r)})}function Nr(i){i.y=-i.y}function mh(i){i.nodes().forEach(u=>Pr(i.node(u))),i.edges().forEach(u=>{let r=i.edge(u);r.points.forEach(Pr),Object.hasOwn(r,"x")&&Pr(r)})}function Pr(i){let u=i.x;i.x=i.y,i.y=u}let ma=le;var wh=bh;function bh(i){let u={},r=i.nodes().filter(_=>!i.children(_).length),o=r.map(_=>i.node(_).rank),f=ma.applyWithChunking(Math.max,o),l=ma.range(f+1).map(()=>[]);function h(_){if(u[_])return;u[_]=!0;let m=i.node(_);l[m.rank].push(_),i.successors(_).forEach(h)}return r.sort((_,m)=>i.node(_).rank-i.node(m).rank).forEach(h),l}let yh=le.zipObject;var Eh=xh;function xh(i,u){let r=0;for(let o=1;oy)),f=u.flatMap(m=>i.outEdges(m).map(y=>({pos:o[y.w],weight:i.edge(y).weight})).sort((y,O)=>y.pos-O.pos)),l=1;for(;l{let y=m.pos+l;g[y]+=m.weight;let O=0;for(;y>0;)y%2&&(O+=g[y+1]),y=y-1>>1,g[y]+=m.weight;_+=m.weight*O}),_}var Ih=Sh;function Sh(i,u=[]){return u.map(r=>{let o=i.inEdges(r);if(o.length){let f=o.reduce((l,h)=>{let g=i.edge(h),_=i.node(h.v);return{sum:l.sum+g.weight*_.order,weight:l.weight+g.weight}},{sum:0,weight:0});return{v:r,barycenter:f.sum/f.weight,weight:f.weight}}else return{v:r}})}let Ah=le;var Rh=Ch;function Ch(i,u){let r={};i.forEach((f,l)=>{let h=r[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:l};f.barycenter!==void 0&&(h.barycenter=f.barycenter,h.weight=f.weight)}),u.edges().forEach(f=>{let l=r[f.v],h=r[f.w];l!==void 0&&h!==void 0&&(h.indegree++,l.out.push(r[f.w]))});let o=Object.values(r).filter(f=>!f.indegree);return Th(o)}function Th(i){let u=[];function r(f){return l=>{l.merged||(l.barycenter===void 0||f.barycenter===void 0||l.barycenter>=f.barycenter)&&Lh(f,l)}}function o(f){return l=>{l.in.push(f),--l.indegree===0&&i.push(l)}}for(;i.length;){let f=i.pop();u.push(f),f.in.reverse().forEach(r(f)),f.out.forEach(o(f))}return u.filter(f=>!f.merged).map(f=>Ah.pick(f,["vs","i","barycenter","weight"]))}function Lh(i,u){let r=0,o=0;i.weight&&(r+=i.barycenter*i.weight,o+=i.weight),u.weight&&(r+=u.barycenter*u.weight,o+=u.weight),i.vs=u.vs.concat(i.vs),i.barycenter=r/o,i.weight=o,i.i=Math.min(u.i,i.i),u.merged=!0}let Nh=le;var Ph=$h;function $h(i,u){let r=Nh.partition(i,y=>Object.hasOwn(y,"barycenter")),o=r.lhs,f=r.rhs.sort((y,O)=>O.i-y.i),l=[],h=0,g=0,_=0;o.sort(Mh(!!u)),_=wa(l,f,_),o.forEach(y=>{_+=y.vs.length,l.push(y.vs),h+=y.barycenter*y.weight,g+=y.weight,_=wa(l,f,_)});let m={vs:l.flat(!0)};return g&&(m.barycenter=h/g,m.weight=g),m}function wa(i,u,r){let o;for(;u.length&&(o=u[u.length-1]).i<=r;)u.pop(),i.push(o.vs),r++;return r}function Mh(i){return(u,r)=>u.barycenterr.barycenter?1:i?r.i-u.i:u.i-r.i}let Fh=Ih,kh=Rh,Dh=Ph;var Wh=ba;function ba(i,u,r,o){let f=i.children(u),l=i.node(u),h=l?l.borderLeft:void 0,g=l?l.borderRight:void 0,_={};h&&(f=f.filter(R=>R!==h&&R!==g));let m=Fh(i,f);m.forEach(R=>{if(i.children(R.v).length){let T=ba(i,R.v,r,o);_[R.v]=T,Object.hasOwn(T,"barycenter")&&qh(R,T)}});let y=kh(m,r);Bh(y,_);let O=Dh(y,o);if(h&&(O.vs=[h,O.vs,g].flat(!0),i.predecessors(h).length)){let R=i.node(i.predecessors(h)[0]),T=i.node(i.predecessors(g)[0]);Object.hasOwn(O,"barycenter")||(O.barycenter=0,O.weight=0),O.barycenter=(O.barycenter*O.weight+R.order+T.order)/(O.weight+2),O.weight+=2}return O}function Bh(i,u){i.forEach(r=>{r.vs=r.vs.flatMap(o=>u[o]?u[o].vs:o)})}function qh(i,u){i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight):(i.barycenter=u.barycenter,i.weight=u.weight)}let Gh=He.Graph,Uh=le;var zh=Hh;function Hh(i,u,r){let o=jh(i),f=new Gh({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(l=>i.node(l));return i.nodes().forEach(l=>{let h=i.node(l),g=i.parent(l);(h.rank===u||h.minRank<=u&&u<=h.maxRank)&&(f.setNode(l),f.setParent(l,g||o),i[r](l).forEach(_=>{let m=_.v===l?_.w:_.v,y=f.edge(m,l),O=y!==void 0?y.weight:0;f.setEdge(m,l,{weight:i.edge(_).weight+O})}),Object.hasOwn(h,"minRank")&&f.setNode(l,{borderLeft:h.borderLeft[u],borderRight:h.borderRight[u]}))}),f}function jh(i){for(var u;i.hasNode(u=Uh.uniqueId("_root")););return u}var Yh=Vh;function Vh(i,u,r){let o={},f;r.forEach(l=>{let h=i.parent(l),g,_;for(;h;){if(g=i.parent(h),g?(_=o[g],o[g]=h):(_=f,f=h),_&&_!==h){u.setEdge(_,h);return}h=g}})}let Kh=wh,Xh=Eh,Zh=Wh,Jh=zh,Qh=Yh,ed=He.Graph,At=le;var nd=ya;function ya(i,u){if(u&&typeof u.customOrder=="function"){u.customOrder(i,ya);return}let r=At.maxRank(i),o=Ea(i,At.range(1,r+1),"inEdges"),f=Ea(i,At.range(r-1,-1,-1),"outEdges"),l=Kh(i);if(xa(i,l),u&&u.disableOptimalOrderHeuristic)return;let h=Number.POSITIVE_INFINITY,g;for(let _=0,m=0;m<4;++_,++m){td(_%2?o:f,_%4>=2),l=At.buildLayerMatrix(i);let y=Xh(i,l);yo.node(h).order=g),Qh(o,r,l.vs)})}function xa(i,u){Object.values(u).forEach(r=>r.forEach((o,f)=>i.node(o).order=f))}let rd=He.Graph,rn=le;var id={positionX:od,findType1Conflicts:Oa,findType2Conflicts:Ia,addConflict:$r,hasConflict:Sa,verticalAlignment:Aa,horizontalCompaction:Ra,alignCoordinates:Ta,findSmallestWidthAlignment:Ca,balance:La};function Oa(i,u){let r={};function o(f,l){let h=0,g=0,_=f.length,m=l[l.length-1];return l.forEach((y,O)=>{let R=ud(i,y),T=R?i.node(R).order:_;(R||y===m)&&(l.slice(g,O+1).forEach(G=>{i.predecessors(G).forEach(K=>{let k=i.node(K),ce=k.order;(ce{y=l[O],i.node(y).dummy&&i.predecessors(y).forEach(R=>{let T=i.node(R);T.dummy&&(T.order<_||T.order>m)&&$r(r,R,y)})})}function f(l,h){let g=-1,_,m=0;return h.forEach((y,O)=>{if(i.node(y).dummy==="border"){let R=i.predecessors(y);R.length&&(_=i.node(R[0]).order,o(h,m,O,g,_),m=O,g=_)}o(h,m,h.length,_,l.length)}),h}return u.length&&u.reduce(f),r}function ud(i,u){if(i.node(u).dummy)return i.predecessors(u).find(r=>i.node(r).dummy)}function $r(i,u,r){if(u>r){let f=u;u=r,r=f}let o=i[u];o||(i[u]=o={}),o[r]=!0}function Sa(i,u,r){if(u>r){let o=u;u=r,r=o}return!!i[u]&&Object.hasOwn(i[u],r)}function Aa(i,u,r,o){let f={},l={},h={};return u.forEach(g=>{g.forEach((_,m)=>{f[_]=_,l[_]=_,h[_]=m})}),u.forEach(g=>{let _=-1;g.forEach(m=>{let y=o(m);if(y.length){y=y.sort((R,T)=>h[R]-h[T]);let O=(y.length-1)/2;for(let R=Math.floor(O),T=Math.ceil(O);R<=T;++R){let G=y[R];l[m]===m&&_Math.max(R,l[T.v]+h.edge(T)),0)}function y(O){let R=h.outEdges(O).reduce((G,K)=>Math.min(G,l[K.w]-h.edge(K)),Number.POSITIVE_INFINITY),T=i.node(O);R!==Number.POSITIVE_INFINITY&&T.borderType!==g&&(l[O]=Math.max(l[O],R))}return _(m,h.predecessors.bind(h)),_(y,h.successors.bind(h)),Object.keys(o).forEach(O=>l[O]=l[r[O]]),l}function ad(i,u,r,o){let f=new rd,l=i.graph(),h=fd(l.nodesep,l.edgesep,o);return u.forEach(g=>{let _;g.forEach(m=>{let y=r[m];if(f.setNode(y),_){var O=r[_],R=f.edge(O,y);f.setEdge(O,y,Math.max(h(i,m,_),R||0))}_=m})}),f}function Ca(i,u){return Object.values(u).reduce((r,o)=>{let f=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;Object.entries(o).forEach(([g,_])=>{let m=sd(i,g)/2;f=Math.max(_+m,f),l=Math.min(_-m,l)});const h=f-l;return h{["l","r"].forEach(h=>{let g=l+h,_=i[g];if(_===u)return;let m=Object.values(_),y=o-rn.applyWithChunking(Math.min,m);h!=="l"&&(y=f-rn.applyWithChunking(Math.max,m)),y&&(i[g]=rn.mapValues(_,O=>O+y))})})}function La(i,u){return rn.mapValues(i.ul,(r,o)=>{if(u)return i[u.toLowerCase()][o];{let f=Object.values(i).map(l=>l[o]).sort((l,h)=>l-h);return(f[1]+f[2])/2}})}function od(i){let u=rn.buildLayerMatrix(i),r=Object.assign(Oa(i,u),Ia(i,u)),o={},f;["u","d"].forEach(h=>{f=h==="u"?u:Object.values(u).reverse(),["l","r"].forEach(g=>{g==="r"&&(f=f.map(O=>Object.values(O).reverse()));let _=(h==="u"?i.predecessors:i.successors).bind(i),m=Aa(i,f,r,_),y=Ra(i,f,m.root,m.align,g==="r");g==="r"&&(y=rn.mapValues(y,O=>-O)),o[h+g]=y})});let l=Ca(i,o);return Ta(o,l),La(o,i.graph().align)}function fd(i,u,r){return(o,f,l)=>{let h=o.node(f),g=o.node(l),_=0,m;if(_+=h.width/2,Object.hasOwn(h,"labelpos"))switch(h.labelpos.toLowerCase()){case"l":m=-h.width/2;break;case"r":m=h.width/2;break}if(m&&(_+=r?m:-m),m=0,_+=(h.dummy?u:i)/2,_+=(g.dummy?u:i)/2,_+=g.width/2,Object.hasOwn(g,"labelpos"))switch(g.labelpos.toLowerCase()){case"l":m=g.width/2;break;case"r":m=-g.width/2;break}return m&&(_+=r?m:-m),m=0,_}}function sd(i,u){return i.node(u).width}let Na=le,ld=id.positionX;var cd=hd;function hd(i){i=Na.asNonCompoundGraph(i),dd(i),Object.entries(ld(i)).forEach(([u,r])=>i.node(u).x=r)}function dd(i){let u=Na.buildLayerMatrix(i),r=i.graph().ranksep,o=0;u.forEach(f=>{const l=f.reduce((h,g)=>{const _=i.node(g).height;return h>_?h:_},0);f.forEach(h=>i.node(h).y=o+l/2),o+=l+r})}let Pa=xc,$a=Rc,pd=Jc,gd=le.normalizeRanks,_d=th,vd=le.removeEmptyRanks,Ma=ah,md=hh,Fa=ph,wd=nd,bd=cd,Me=le,yd=He.Graph;var Ed=xd;function xd(i,u){let r=u&&u.debugTiming?Me.time:Me.notime;r("layout",()=>{let o=r(" buildLayoutGraph",()=>Pd(i));r(" runLayout",()=>Od(o,r,u)),r(" updateInputGraph",()=>Id(i,o))})}function Od(i,u,r){u(" makeSpaceForEdgeLabels",()=>$d(i)),u(" removeSelfEdges",()=>Ud(i)),u(" acyclic",()=>Pa.run(i)),u(" nestingGraph.run",()=>Ma.run(i)),u(" rank",()=>pd(Me.asNonCompoundGraph(i))),u(" injectEdgeLabelProxies",()=>Md(i)),u(" removeEmptyRanks",()=>vd(i)),u(" nestingGraph.cleanup",()=>Ma.cleanup(i)),u(" normalizeRanks",()=>gd(i)),u(" assignRankMinMax",()=>Fd(i)),u(" removeEdgeLabelProxies",()=>kd(i)),u(" normalize.run",()=>$a.run(i)),u(" parentDummyChains",()=>_d(i)),u(" addBorderSegments",()=>md(i)),u(" order",()=>wd(i,r)),u(" insertSelfEdges",()=>zd(i)),u(" adjustCoordinateSystem",()=>Fa.adjust(i)),u(" position",()=>bd(i)),u(" positionSelfEdges",()=>Hd(i)),u(" removeBorderNodes",()=>Gd(i)),u(" normalize.undo",()=>$a.undo(i)),u(" fixupEdgeLabelCoords",()=>Bd(i)),u(" undoCoordinateSystem",()=>Fa.undo(i)),u(" translateGraph",()=>Dd(i)),u(" assignNodeIntersects",()=>Wd(i)),u(" reversePoints",()=>qd(i)),u(" acyclic.undo",()=>Pa.undo(i))}function Id(i,u){i.nodes().forEach(r=>{let o=i.node(r),f=u.node(r);o&&(o.x=f.x,o.y=f.y,o.rank=f.rank,u.children(r).length&&(o.width=f.width,o.height=f.height))}),i.edges().forEach(r=>{let o=i.edge(r),f=u.edge(r);o.points=f.points,Object.hasOwn(f,"x")&&(o.x=f.x,o.y=f.y)}),i.graph().width=u.graph().width,i.graph().height=u.graph().height}let Sd=["nodesep","edgesep","ranksep","marginx","marginy"],Ad={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Rd=["acyclicer","ranker","rankdir","align"],Cd=["width","height"],ka={width:0,height:0},Td=["minlen","weight","width","height","labeloffset"],Ld={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Nd=["labelpos"];function Pd(i){let u=new yd({multigraph:!0,compound:!0}),r=Fr(i.graph());return u.setGraph(Object.assign({},Ad,Mr(r,Sd),Me.pick(r,Rd))),i.nodes().forEach(o=>{let f=Fr(i.node(o));const l=Mr(f,Cd);Object.keys(ka).forEach(h=>{l[h]===void 0&&(l[h]=ka[h])}),u.setNode(o,l),u.setParent(o,i.parent(o))}),i.edges().forEach(o=>{let f=Fr(i.edge(o));u.setEdge(o,Object.assign({},Ld,Mr(f,Td),Me.pick(f,Nd)))}),u}function $d(i){let u=i.graph();u.ranksep/=2,i.edges().forEach(r=>{let o=i.edge(r);o.minlen*=2,o.labelpos.toLowerCase()!=="c"&&(u.rankdir==="TB"||u.rankdir==="BT"?o.width+=o.labeloffset:o.height+=o.labeloffset)})}function Md(i){i.edges().forEach(u=>{let r=i.edge(u);if(r.width&&r.height){let o=i.node(u.v),l={rank:(i.node(u.w).rank-o.rank)/2+o.rank,e:u};Me.addDummyNode(i,"edge-proxy",l,"_ep")}})}function Fd(i){let u=0;i.nodes().forEach(r=>{let o=i.node(r);o.borderTop&&(o.minRank=i.node(o.borderTop).rank,o.maxRank=i.node(o.borderBottom).rank,u=Math.max(u,o.maxRank))}),i.graph().maxRank=u}function kd(i){i.nodes().forEach(u=>{let r=i.node(u);r.dummy==="edge-proxy"&&(i.edge(r.e).labelRank=r.rank,i.removeNode(u))})}function Dd(i){let u=Number.POSITIVE_INFINITY,r=0,o=Number.POSITIVE_INFINITY,f=0,l=i.graph(),h=l.marginx||0,g=l.marginy||0;function _(m){let y=m.x,O=m.y,R=m.width,T=m.height;u=Math.min(u,y-R/2),r=Math.max(r,y+R/2),o=Math.min(o,O-T/2),f=Math.max(f,O+T/2)}i.nodes().forEach(m=>_(i.node(m))),i.edges().forEach(m=>{let y=i.edge(m);Object.hasOwn(y,"x")&&_(y)}),u-=h,o-=g,i.nodes().forEach(m=>{let y=i.node(m);y.x-=u,y.y-=o}),i.edges().forEach(m=>{let y=i.edge(m);y.points.forEach(O=>{O.x-=u,O.y-=o}),Object.hasOwn(y,"x")&&(y.x-=u),Object.hasOwn(y,"y")&&(y.y-=o)}),l.width=r-u+h,l.height=f-o+g}function Wd(i){i.edges().forEach(u=>{let r=i.edge(u),o=i.node(u.v),f=i.node(u.w),l,h;r.points?(l=r.points[0],h=r.points[r.points.length-1]):(r.points=[],l=f,h=o),r.points.unshift(Me.intersectRect(o,l)),r.points.push(Me.intersectRect(f,h))})}function Bd(i){i.edges().forEach(u=>{let r=i.edge(u);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function qd(i){i.edges().forEach(u=>{let r=i.edge(u);r.reversed&&r.points.reverse()})}function Gd(i){i.nodes().forEach(u=>{if(i.children(u).length){let r=i.node(u),o=i.node(r.borderTop),f=i.node(r.borderBottom),l=i.node(r.borderLeft[r.borderLeft.length-1]),h=i.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(h.x-l.x),r.height=Math.abs(f.y-o.y),r.x=l.x+r.width/2,r.y=o.y+r.height/2}}),i.nodes().forEach(u=>{i.node(u).dummy==="border"&&i.removeNode(u)})}function Ud(i){i.edges().forEach(u=>{if(u.v===u.w){var r=i.node(u.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:u,label:i.edge(u)}),i.removeEdge(u)}})}function zd(i){var u=Me.buildLayerMatrix(i);u.forEach(r=>{var o=0;r.forEach((f,l)=>{var h=i.node(f);h.order=l+o,(h.selfEdges||[]).forEach(g=>{Me.addDummyNode(i,"selfedge",{width:g.label.width,height:g.label.height,rank:h.rank,order:l+ ++o,e:g.e,label:g.label},"_se")}),delete h.selfEdges})})}function Hd(i){i.nodes().forEach(u=>{var r=i.node(u);if(r.dummy==="selfedge"){var o=i.node(r.e.v),f=o.x+o.width/2,l=o.y,h=r.x-f,g=o.height/2;i.setEdge(r.e,r.label),i.removeNode(u),r.label.points=[{x:f+2*h/3,y:l-g},{x:f+5*h/6,y:l-g},{x:f+h,y:l},{x:f+5*h/6,y:l+g},{x:f+2*h/3,y:l+g}],r.label.x=r.x,r.label.y=r.y}})}function Mr(i,u){return Me.mapValues(Me.pick(i,u),Number)}function Fr(i){var u={};return i&&Object.entries(i).forEach(([r,o])=>{typeof r=="string"&&(r=r.toLowerCase()),u[r]=o}),u}let jd=le,Yd=He.Graph;var Vd={debugOrdering:Kd};function Kd(i){let u=jd.buildLayerMatrix(i),r=new Yd({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(o=>{r.setNode(o,{label:o}),r.setParent(o,"layer"+i.node(o).rank)}),i.edges().forEach(o=>r.setEdge(o.v,o.w,{},o.name)),u.forEach((o,f)=>{let l="layer"+f;r.setNode(l,{rank:"same"}),o.reduce((h,g)=>(r.setEdge(h,g,{style:"invis"}),g))}),r}var Xd="1.1.4",Da={graphlib:He,layout:Ed,debug:Vd,util:{time:le.time,notime:le.notime},version:Xd},Rt={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */Rt.exports,function(i,u){(function(){var r,o="4.17.21",f=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",h="Expected a function",g="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",O=1,R=2,T=4,G=1,K=2,k=1,ce=2,B=4,P=8,j=16,J=32,ee=64,re=128,he=256,vi=512,Xp=30,Zp="...",Jp=800,Qp=16,So=1,eg=2,ng=3,Sn=1/0,gn=9007199254740991,tg=17976931348623157e292,Lt=NaN,Je=4294967295,rg=Je-1,ig=Je>>>1,ug=[["ary",re],["bind",k],["bindKey",ce],["curry",P],["curryRight",j],["flip",vi],["partial",J],["partialRight",ee],["rearg",he]],Dn="[object Arguments]",Nt="[object Array]",ag="[object AsyncFunction]",nt="[object Boolean]",tt="[object Date]",og="[object DOMException]",Pt="[object Error]",$t="[object Function]",Ao="[object GeneratorFunction]",je="[object Map]",rt="[object Number]",fg="[object Null]",un="[object Object]",Ro="[object Promise]",sg="[object Proxy]",it="[object RegExp]",Ye="[object Set]",ut="[object String]",Mt="[object Symbol]",lg="[object Undefined]",at="[object WeakMap]",cg="[object WeakSet]",ot="[object ArrayBuffer]",Wn="[object DataView]",mi="[object Float32Array]",wi="[object Float64Array]",bi="[object Int8Array]",yi="[object Int16Array]",Ei="[object Int32Array]",xi="[object Uint8Array]",Oi="[object Uint8ClampedArray]",Ii="[object Uint16Array]",Si="[object Uint32Array]",hg=/\b__p \+= '';/g,dg=/\b(__p \+=) '' \+/g,pg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Co=/&(?:amp|lt|gt|quot|#39);/g,To=/[&<>"']/g,gg=RegExp(Co.source),_g=RegExp(To.source),vg=/<%-([\s\S]+?)%>/g,mg=/<%([\s\S]+?)%>/g,Lo=/<%=([\s\S]+?)%>/g,wg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bg=/^\w*$/,yg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ai=/[\\^$.*+?()[\]{}|]/g,Eg=RegExp(Ai.source),Ri=/^\s+/,xg=/\s/,Og=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Ig=/\{\n\/\* \[wrapped with (.+)\] \*/,Sg=/,? & /,Ag=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Rg=/[()=,{}\[\]\/\s]/,Cg=/\\(\\)?/g,Tg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,No=/\w*$/,Lg=/^[-+]0x[0-9a-f]+$/i,Ng=/^0b[01]+$/i,Pg=/^\[object .+?Constructor\]$/,$g=/^0o[0-7]+$/i,Mg=/^(?:0|[1-9]\d*)$/,Fg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ft=/($^)/,kg=/['\n\r\u2028\u2029\\]/g,kt="\\ud800-\\udfff",Dg="\\u0300-\\u036f",Wg="\\ufe20-\\ufe2f",Bg="\\u20d0-\\u20ff",Po=Dg+Wg+Bg,$o="\\u2700-\\u27bf",Mo="a-z\\xdf-\\xf6\\xf8-\\xff",qg="\\xac\\xb1\\xd7\\xf7",Gg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Ug="\\u2000-\\u206f",zg=" \\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",Fo="A-Z\\xc0-\\xd6\\xd8-\\xde",ko="\\ufe0e\\ufe0f",Do=qg+Gg+Ug+zg,Ci="['’]",Hg="["+kt+"]",Wo="["+Do+"]",Dt="["+Po+"]",Bo="\\d+",jg="["+$o+"]",qo="["+Mo+"]",Go="[^"+kt+Do+Bo+$o+Mo+Fo+"]",Ti="\\ud83c[\\udffb-\\udfff]",Yg="(?:"+Dt+"|"+Ti+")",Uo="[^"+kt+"]",Li="(?:\\ud83c[\\udde6-\\uddff]){2}",Ni="[\\ud800-\\udbff][\\udc00-\\udfff]",Bn="["+Fo+"]",zo="\\u200d",Ho="(?:"+qo+"|"+Go+")",Vg="(?:"+Bn+"|"+Go+")",jo="(?:"+Ci+"(?:d|ll|m|re|s|t|ve))?",Yo="(?:"+Ci+"(?:D|LL|M|RE|S|T|VE))?",Vo=Yg+"?",Ko="["+ko+"]?",Kg="(?:"+zo+"(?:"+[Uo,Li,Ni].join("|")+")"+Ko+Vo+")*",Xg="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Zg="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Xo=Ko+Vo+Kg,Jg="(?:"+[jg,Li,Ni].join("|")+")"+Xo,Qg="(?:"+[Uo+Dt+"?",Dt,Li,Ni,Hg].join("|")+")",e_=RegExp(Ci,"g"),n_=RegExp(Dt,"g"),Pi=RegExp(Ti+"(?="+Ti+")|"+Qg+Xo,"g"),t_=RegExp([Bn+"?"+qo+"+"+jo+"(?="+[Wo,Bn,"$"].join("|")+")",Vg+"+"+Yo+"(?="+[Wo,Bn+Ho,"$"].join("|")+")",Bn+"?"+Ho+"+"+jo,Bn+"+"+Yo,Zg,Xg,Bo,Jg].join("|"),"g"),r_=RegExp("["+zo+kt+Po+ko+"]"),i_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,u_=["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"],a_=-1,ie={};ie[mi]=ie[wi]=ie[bi]=ie[yi]=ie[Ei]=ie[xi]=ie[Oi]=ie[Ii]=ie[Si]=!0,ie[Dn]=ie[Nt]=ie[ot]=ie[nt]=ie[Wn]=ie[tt]=ie[Pt]=ie[$t]=ie[je]=ie[rt]=ie[un]=ie[it]=ie[Ye]=ie[ut]=ie[at]=!1;var te={};te[Dn]=te[Nt]=te[ot]=te[Wn]=te[nt]=te[tt]=te[mi]=te[wi]=te[bi]=te[yi]=te[Ei]=te[je]=te[rt]=te[un]=te[it]=te[Ye]=te[ut]=te[Mt]=te[xi]=te[Oi]=te[Ii]=te[Si]=!0,te[Pt]=te[$t]=te[at]=!1;var o_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},f_={"&":"&","<":"<",">":">",'"':""","'":"'"},s_={"&":"&","<":"<",">":">",""":'"',"'":"'"},l_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},c_=parseFloat,h_=parseInt,Zo=typeof ze=="object"&&ze&&ze.Object===Object&&ze,d_=typeof self=="object"&&self&&self.Object===Object&&self,ve=Zo||d_||Function("return this")(),$i=u&&!u.nodeType&&u,An=$i&&!0&&i&&!i.nodeType&&i,Jo=An&&An.exports===$i,Mi=Jo&&Zo.process,Fe=function(){try{var w=An&&An.require&&An.require("util").types;return w||Mi&&Mi.binding&&Mi.binding("util")}catch{}}(),Qo=Fe&&Fe.isArrayBuffer,ef=Fe&&Fe.isDate,nf=Fe&&Fe.isMap,tf=Fe&&Fe.isRegExp,rf=Fe&&Fe.isSet,uf=Fe&&Fe.isTypedArray;function Re(w,x,E){switch(E.length){case 0:return w.call(x);case 1:return w.call(x,E[0]);case 2:return w.call(x,E[0],E[1]);case 3:return w.call(x,E[0],E[1],E[2])}return w.apply(x,E)}function p_(w,x,E,L){for(var D=-1,X=w==null?0:w.length;++D-1}function Fi(w,x,E){for(var L=-1,D=w==null?0:w.length;++L-1;);return E}function df(w,x){for(var E=w.length;E--&&qn(x,w[E],0)>-1;);return E}function x_(w,x){for(var E=w.length,L=0;E--;)w[E]===x&&++L;return L}var O_=Bi(o_),I_=Bi(f_);function S_(w){return"\\"+l_[w]}function A_(w,x){return w==null?r:w[x]}function Gn(w){return r_.test(w)}function R_(w){return i_.test(w)}function C_(w){for(var x,E=[];!(x=w.next()).done;)E.push(x.value);return E}function zi(w){var x=-1,E=Array(w.size);return w.forEach(function(L,D){E[++x]=[D,L]}),E}function pf(w,x){return function(E){return w(x(E))}}function mn(w,x){for(var E=-1,L=w.length,D=0,X=[];++E-1}function _v(e,n){var t=this.__data__,a=tr(t,e);return a<0?(++this.size,t.push([e,n])):t[a][1]=n,this}an.prototype.clear=hv,an.prototype.delete=dv,an.prototype.get=pv,an.prototype.has=gv,an.prototype.set=_v;function on(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n=n?e:n)),e}function Be(e,n,t,a,s,d){var p,v=n&O,b=n&R,I=n&T;if(t&&(p=s?t(e,a,s,d):t(e)),p!==r)return p;if(!ae(e))return e;var S=W(e);if(S){if(p=b1(e),!v)return Oe(e,p)}else{var A=be(e),C=A==$t||A==Ao;if(On(e))return Xf(e,v);if(A==un||A==Dn||C&&!s){if(p=b||C?{}:gs(e),!v)return b?s1(e,Nv(p,e)):f1(e,Sf(p,e))}else{if(!te[A])return s?e:{};p=y1(e,A,v)}}d||(d=new Ke);var N=d.get(e);if(N)return N;d.set(e,p),zs(e)?e.forEach(function(F){p.add(Be(F,n,t,F,e,d))}):Gs(e)&&e.forEach(function(F,H){p.set(H,Be(F,n,t,H,e,d))});var M=I?b?_u:gu:b?Se:_e,U=S?r:M(e);return ke(U||e,function(F,H){U&&(H=F,F=e[H]),pt(p,H,Be(F,n,t,H,e,d))}),p}function Pv(e){var n=_e(e);return function(t){return Af(t,e,n)}}function Af(e,n,t){var a=t.length;if(e==null)return!a;for(e=ne(e);a--;){var s=t[a],d=n[s],p=e[s];if(p===r&&!(s in e)||!d(p))return!1}return!0}function Rf(e,n,t){if(typeof e!="function")throw new De(h);return yt(function(){e.apply(r,t)},n)}function gt(e,n,t,a){var s=-1,d=Wt,p=!0,v=e.length,b=[],I=n.length;if(!v)return b;t&&(n=ue(n,Ce(t))),a?(d=Fi,p=!1):n.length>=f&&(d=ft,p=!1,n=new Tn(n));e:for(;++ss?0:s+t),a=a===r||a>s?s:q(a),a<0&&(a+=s),a=t>a?0:js(a);t0&&t(v)?n>1?me(v,n-1,t,a,s):vn(s,v):a||(s[s.length]=v)}return s}var Zi=ts(),Lf=ts(!0);function Qe(e,n){return e&&Zi(e,n,_e)}function Ji(e,n){return e&&Lf(e,n,_e)}function ir(e,n){return _n(n,function(t){return hn(e[t])})}function Nn(e,n){n=En(n,e);for(var t=0,a=n.length;e!=null&&tn}function Fv(e,n){return e!=null&&Q.call(e,n)}function kv(e,n){return e!=null&&n in ne(e)}function Dv(e,n,t){return e>=we(n,t)&&e=120&&S.length>=120)?new Tn(p&&S):r}S=e[0];var A=-1,C=v[0];e:for(;++A-1;)v!==e&&Kt.call(v,b,1),Kt.call(e,b,1);return e}function Gf(e,n){for(var t=e?n.length:0,a=t-1;t--;){var s=n[t];if(t==a||s!==d){var d=s;cn(s)?Kt.call(e,s,1):fu(e,s)}}return e}function uu(e,n){return e+Jt(Ef()*(n-e+1))}function Zv(e,n,t,a){for(var s=-1,d=ge(Zt((n-e)/(t||1)),0),p=E(d);d--;)p[a?d:++s]=e,e+=t;return p}function au(e,n){var t="";if(!e||n<1||n>gn)return t;do n%2&&(t+=e),n=Jt(n/2),n&&(e+=e);while(n);return t}function z(e,n){return xu(ms(e,n,Ae),e+"")}function Jv(e){return If(Qn(e))}function Qv(e,n){var t=Qn(e);return gr(t,Ln(n,0,t.length))}function mt(e,n,t,a){if(!ae(e))return e;n=En(n,e);for(var s=-1,d=n.length,p=d-1,v=e;v!=null&&++ss?0:s+n),t=t>s?s:t,t<0&&(t+=s),s=n>t?0:t-n>>>0,n>>>=0;for(var d=E(s);++a>>1,p=e[d];p!==null&&!Le(p)&&(t?p<=n:p=f){var I=n?null:d1(e);if(I)return qt(I);p=!1,s=ft,b=new Tn}else b=n?[]:v;e:for(;++a=a?e:qe(e,n,t)}var Kf=z_||function(e){return ve.clearTimeout(e)};function Xf(e,n){if(n)return e.slice();var t=e.length,a=vf?vf(t):new e.constructor(t);return e.copy(a),a}function hu(e){var n=new e.constructor(e.byteLength);return new Yt(n).set(new Yt(e)),n}function i1(e,n){var t=n?hu(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}function u1(e){var n=new e.constructor(e.source,No.exec(e));return n.lastIndex=e.lastIndex,n}function a1(e){return dt?ne(dt.call(e)):{}}function Zf(e,n){var t=n?hu(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function Jf(e,n){if(e!==n){var t=e!==r,a=e===null,s=e===e,d=Le(e),p=n!==r,v=n===null,b=n===n,I=Le(n);if(!v&&!I&&!d&&e>n||d&&p&&b&&!v&&!I||a&&p&&b||!t&&b||!s)return 1;if(!a&&!d&&!I&&e=v)return b;var I=t[a];return b*(I=="desc"?-1:1)}}return e.index-n.index}function Qf(e,n,t,a){for(var s=-1,d=e.length,p=t.length,v=-1,b=n.length,I=ge(d-p,0),S=E(b+I),A=!a;++v1?t[s-1]:r,p=s>2?t[2]:r;for(d=e.length>3&&typeof d=="function"?(s--,d):r,p&&Ee(t[0],t[1],p)&&(d=s<3?r:d,s=1),n=ne(n);++a-1?s[d?n[p]:p]:r}}function us(e){return ln(function(n){var t=n.length,a=t,s=We.prototype.thru;for(e&&n.reverse();a--;){var d=n[a];if(typeof d!="function")throw new De(h);if(s&&!p&&dr(d)=="wrapper")var p=new We([],!0)}for(a=p?a:t;++a1&&V.reverse(),S&&bv))return!1;var I=d.get(e),S=d.get(n);if(I&&S)return I==n&&S==e;var A=-1,C=!0,N=t&K?new Tn:r;for(d.set(e,n),d.set(n,e);++A1?"& ":"")+n[a],n=n.join(t>2?", ":" "),e.replace(Og,`{ +/* [wrapped with `+n+`] */ +`)}function x1(e){return W(e)||Mn(e)||!!(bf&&e&&e[bf])}function cn(e,n){var t=typeof e;return n=n??gn,!!n&&(t=="number"||t!="symbol"&&Mg.test(e))&&e>-1&&e%1==0&&e0){if(++n>=Jp)return arguments[0]}else n=0;return e.apply(r,arguments)}}function gr(e,n){var t=-1,a=e.length,s=a-1;for(n=n===r?a:n;++t1?e[n-1]:r;return t=typeof t=="function"?(e.pop(),t):r,Ts(e,t)});function Ls(e){var n=c(e);return n.__chain__=!0,n}function $0(e,n){return n(e),e}function _r(e,n){return n(e)}var M0=ln(function(e){var n=e.length,t=n?e[0]:0,a=this.__wrapped__,s=function(d){return Xi(d,e)};return n>1||this.__actions__.length||!(a instanceof Y)||!cn(t)?this.thru(s):(a=a.slice(t,+t+(n?1:0)),a.__actions__.push({func:_r,args:[s],thisArg:r}),new We(a,this.__chain__).thru(function(d){return n&&!d.length&&d.push(r),d}))});function F0(){return Ls(this)}function k0(){return new We(this.value(),this.__chain__)}function D0(){this.__values__===r&&(this.__values__=Hs(this.value()));var e=this.__index__>=this.__values__.length,n=e?r:this.__values__[this.__index__++];return{done:e,value:n}}function W0(){return this}function B0(e){for(var n,t=this;t instanceof nr;){var a=Os(t);a.__index__=0,a.__values__=r,n?s.__wrapped__=a:n=a;var s=a;t=t.__wrapped__}return s.__wrapped__=e,n}function q0(){var e=this.__wrapped__;if(e instanceof Y){var n=e;return this.__actions__.length&&(n=new Y(this)),n=n.reverse(),n.__actions__.push({func:_r,args:[Ou],thisArg:r}),new We(n,this.__chain__)}return this.thru(Ou)}function G0(){return Yf(this.__wrapped__,this.__actions__)}var U0=fr(function(e,n,t){Q.call(e,t)?++e[t]:fn(e,t,1)});function z0(e,n,t){var a=W(e)?af:$v;return t&&Ee(e,n,t)&&(n=r),a(e,$(n,3))}function H0(e,n){var t=W(e)?_n:Tf;return t(e,$(n,3))}var j0=is(Is),Y0=is(Ss);function V0(e,n){return me(vr(e,n),1)}function K0(e,n){return me(vr(e,n),Sn)}function X0(e,n,t){return t=t===r?1:q(t),me(vr(e,n),t)}function Ns(e,n){var t=W(e)?ke:bn;return t(e,$(n,3))}function Ps(e,n){var t=W(e)?g_:Cf;return t(e,$(n,3))}var Z0=fr(function(e,n,t){Q.call(e,t)?e[t].push(n):fn(e,t,[n])});function J0(e,n,t,a){e=Ie(e)?e:Qn(e),t=t&&!a?q(t):0;var s=e.length;return t<0&&(t=ge(s+t,0)),Er(e)?t<=s&&e.indexOf(n,t)>-1:!!s&&qn(e,n,t)>-1}var Q0=z(function(e,n,t){var a=-1,s=typeof n=="function",d=Ie(e)?E(e.length):[];return bn(e,function(p){d[++a]=s?Re(n,p,t):_t(p,n,t)}),d}),em=fr(function(e,n,t){fn(e,t,n)});function vr(e,n){var t=W(e)?ue:Ff;return t(e,$(n,3))}function nm(e,n,t,a){return e==null?[]:(W(n)||(n=n==null?[]:[n]),t=a?r:t,W(t)||(t=t==null?[]:[t]),Bf(e,n,t))}var tm=fr(function(e,n,t){e[t?0:1].push(n)},function(){return[[],[]]});function rm(e,n,t){var a=W(e)?ki:lf,s=arguments.length<3;return a(e,$(n,4),t,s,bn)}function im(e,n,t){var a=W(e)?__:lf,s=arguments.length<3;return a(e,$(n,4),t,s,Cf)}function um(e,n){var t=W(e)?_n:Tf;return t(e,br($(n,3)))}function am(e){var n=W(e)?If:Jv;return n(e)}function om(e,n,t){(t?Ee(e,n,t):n===r)?n=1:n=q(n);var a=W(e)?Cv:Qv;return a(e,n)}function fm(e){var n=W(e)?Tv:n1;return n(e)}function sm(e){if(e==null)return 0;if(Ie(e))return Er(e)?Un(e):e.length;var n=be(e);return n==je||n==Ye?e.size:tu(e).length}function lm(e,n,t){var a=W(e)?Di:t1;return t&&Ee(e,n,t)&&(n=r),a(e,$(n,3))}var cm=z(function(e,n){if(e==null)return[];var t=n.length;return t>1&&Ee(e,n[0],n[1])?n=[]:t>2&&Ee(n[0],n[1],n[2])&&(n=[n[0]]),Bf(e,me(n,1),[])}),mr=H_||function(){return ve.Date.now()};function hm(e,n){if(typeof n!="function")throw new De(h);return e=q(e),function(){if(--e<1)return n.apply(this,arguments)}}function $s(e,n,t){return n=t?r:n,n=e&&n==null?e.length:n,sn(e,re,r,r,r,r,n)}function Ms(e,n){var t;if(typeof n!="function")throw new De(h);return e=q(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=r),t}}var Su=z(function(e,n,t){var a=k;if(t.length){var s=mn(t,Zn(Su));a|=J}return sn(e,a,n,t,s)}),Fs=z(function(e,n,t){var a=k|ce;if(t.length){var s=mn(t,Zn(Fs));a|=J}return sn(n,a,e,t,s)});function ks(e,n,t){n=t?r:n;var a=sn(e,P,r,r,r,r,r,n);return a.placeholder=ks.placeholder,a}function Ds(e,n,t){n=t?r:n;var a=sn(e,j,r,r,r,r,r,n);return a.placeholder=Ds.placeholder,a}function Ws(e,n,t){var a,s,d,p,v,b,I=0,S=!1,A=!1,C=!0;if(typeof e!="function")throw new De(h);n=Ue(n)||0,ae(t)&&(S=!!t.leading,A="maxWait"in t,d=A?ge(Ue(t.maxWait)||0,n):d,C="trailing"in t?!!t.trailing:C);function N(se){var Ze=a,pn=s;return a=s=r,I=se,p=e.apply(pn,Ze),p}function M(se){return I=se,v=yt(H,n),S?N(se):p}function U(se){var Ze=se-b,pn=se-I,il=n-Ze;return A?we(il,d-pn):il}function F(se){var Ze=se-b,pn=se-I;return b===r||Ze>=n||Ze<0||A&&pn>=d}function H(){var se=mr();if(F(se))return V(se);v=yt(H,U(se))}function V(se){return v=r,C&&a?N(se):(a=s=r,p)}function Ne(){v!==r&&Kf(v),I=0,a=b=s=v=r}function xe(){return v===r?p:V(mr())}function Pe(){var se=mr(),Ze=F(se);if(a=arguments,s=this,b=se,Ze){if(v===r)return M(b);if(A)return Kf(v),v=yt(H,n),N(b)}return v===r&&(v=yt(H,n)),p}return Pe.cancel=Ne,Pe.flush=xe,Pe}var dm=z(function(e,n){return Rf(e,1,n)}),pm=z(function(e,n,t){return Rf(e,Ue(n)||0,t)});function gm(e){return sn(e,vi)}function wr(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new De(h);var t=function(){var a=arguments,s=n?n.apply(this,a):a[0],d=t.cache;if(d.has(s))return d.get(s);var p=e.apply(this,a);return t.cache=d.set(s,p)||d,p};return t.cache=new(wr.Cache||on),t}wr.Cache=on;function br(e){if(typeof e!="function")throw new De(h);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function _m(e){return Ms(2,e)}var vm=r1(function(e,n){n=n.length==1&&W(n[0])?ue(n[0],Ce($())):ue(me(n,1),Ce($()));var t=n.length;return z(function(a){for(var s=-1,d=we(a.length,t);++s=n}),Mn=Pf(function(){return arguments}())?Pf:function(e){return oe(e)&&Q.call(e,"callee")&&!wf.call(e,"callee")},W=E.isArray,Nm=Qo?Ce(Qo):Bv;function Ie(e){return e!=null&&yr(e.length)&&!hn(e)}function fe(e){return oe(e)&&Ie(e)}function Pm(e){return e===!0||e===!1||oe(e)&&ye(e)==nt}var On=Y_||Du,$m=ef?Ce(ef):qv;function Mm(e){return oe(e)&&e.nodeType===1&&!Et(e)}function Fm(e){if(e==null)return!0;if(Ie(e)&&(W(e)||typeof e=="string"||typeof e.splice=="function"||On(e)||Jn(e)||Mn(e)))return!e.length;var n=be(e);if(n==je||n==Ye)return!e.size;if(bt(e))return!tu(e).length;for(var t in e)if(Q.call(e,t))return!1;return!0}function km(e,n){return vt(e,n)}function Dm(e,n,t){t=typeof t=="function"?t:r;var a=t?t(e,n):r;return a===r?vt(e,n,r,t):!!a}function Ru(e){if(!oe(e))return!1;var n=ye(e);return n==Pt||n==og||typeof e.message=="string"&&typeof e.name=="string"&&!Et(e)}function Wm(e){return typeof e=="number"&&yf(e)}function hn(e){if(!ae(e))return!1;var n=ye(e);return n==$t||n==Ao||n==ag||n==sg}function qs(e){return typeof e=="number"&&e==q(e)}function yr(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gn}function ae(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function oe(e){return e!=null&&typeof e=="object"}var Gs=nf?Ce(nf):Uv;function Bm(e,n){return e===n||nu(e,n,mu(n))}function qm(e,n,t){return t=typeof t=="function"?t:r,nu(e,n,mu(n),t)}function Gm(e){return Us(e)&&e!=+e}function Um(e){if(S1(e))throw new D(l);return $f(e)}function zm(e){return e===null}function Hm(e){return e==null}function Us(e){return typeof e=="number"||oe(e)&&ye(e)==rt}function Et(e){if(!oe(e)||ye(e)!=un)return!1;var n=Vt(e);if(n===null)return!0;var t=Q.call(n,"constructor")&&n.constructor;return typeof t=="function"&&t instanceof t&&zt.call(t)==q_}var Cu=tf?Ce(tf):zv;function jm(e){return qs(e)&&e>=-gn&&e<=gn}var zs=rf?Ce(rf):Hv;function Er(e){return typeof e=="string"||!W(e)&&oe(e)&&ye(e)==ut}function Le(e){return typeof e=="symbol"||oe(e)&&ye(e)==Mt}var Jn=uf?Ce(uf):jv;function Ym(e){return e===r}function Vm(e){return oe(e)&&be(e)==at}function Km(e){return oe(e)&&ye(e)==cg}var Xm=hr(ru),Zm=hr(function(e,n){return e<=n});function Hs(e){if(!e)return[];if(Ie(e))return Er(e)?Ve(e):Oe(e);if(st&&e[st])return C_(e[st]());var n=be(e),t=n==je?zi:n==Ye?qt:Qn;return t(e)}function dn(e){if(!e)return e===0?e:0;if(e=Ue(e),e===Sn||e===-Sn){var n=e<0?-1:1;return n*tg}return e===e?e:0}function q(e){var n=dn(e),t=n%1;return n===n?t?n-t:n:0}function js(e){return e?Ln(q(e),0,Je):0}function Ue(e){if(typeof e=="number")return e;if(Le(e))return Lt;if(ae(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=ae(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=cf(e);var t=Ng.test(e);return t||$g.test(e)?h_(e.slice(2),t?2:8):Lg.test(e)?Lt:+e}function Ys(e){return en(e,Se(e))}function Jm(e){return e?Ln(q(e),-gn,gn):e===0?e:0}function Z(e){return e==null?"":Te(e)}var Qm=Kn(function(e,n){if(bt(n)||Ie(n)){en(n,_e(n),e);return}for(var t in n)Q.call(n,t)&&pt(e,t,n[t])}),Vs=Kn(function(e,n){en(n,Se(n),e)}),xr=Kn(function(e,n,t,a){en(n,Se(n),e,a)}),ew=Kn(function(e,n,t,a){en(n,_e(n),e,a)}),nw=ln(Xi);function tw(e,n){var t=Vn(e);return n==null?t:Sf(t,n)}var rw=z(function(e,n){e=ne(e);var t=-1,a=n.length,s=a>2?n[2]:r;for(s&&Ee(n[0],n[1],s)&&(a=1);++t1),d}),en(e,_u(e),t),a&&(t=Be(t,O|R|T,p1));for(var s=n.length;s--;)fu(t,n[s]);return t});function yw(e,n){return Xs(e,br($(n)))}var Ew=ln(function(e,n){return e==null?{}:Kv(e,n)});function Xs(e,n){if(e==null)return{};var t=ue(_u(e),function(a){return[a]});return n=$(n),qf(e,t,function(a,s){return n(a,s[0])})}function xw(e,n,t){n=En(n,e);var a=-1,s=n.length;for(s||(s=1,e=r);++an){var a=e;e=n,n=a}if(t||e%1||n%1){var s=Ef();return we(e+s*(n-e+c_("1e-"+((s+"").length-1))),n)}return uu(e,n)}var $w=Xn(function(e,n,t){return n=n.toLowerCase(),e+(t?Qs(n):n)});function Qs(e){return Nu(Z(e).toLowerCase())}function el(e){return e=Z(e),e&&e.replace(Fg,O_).replace(n_,"")}function Mw(e,n,t){e=Z(e),n=Te(n);var a=e.length;t=t===r?a:Ln(q(t),0,a);var s=t;return t-=n.length,t>=0&&e.slice(t,s)==n}function Fw(e){return e=Z(e),e&&_g.test(e)?e.replace(To,I_):e}function kw(e){return e=Z(e),e&&Eg.test(e)?e.replace(Ai,"\\$&"):e}var Dw=Xn(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),Ww=Xn(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),Bw=rs("toLowerCase");function qw(e,n,t){e=Z(e),n=q(n);var a=n?Un(e):0;if(!n||a>=n)return e;var s=(n-a)/2;return cr(Jt(s),t)+e+cr(Zt(s),t)}function Gw(e,n,t){e=Z(e),n=q(n);var a=n?Un(e):0;return n&&a>>0,t?(e=Z(e),e&&(typeof n=="string"||n!=null&&!Cu(n))&&(n=Te(n),!n&&Gn(e))?xn(Ve(e),0,t):e.split(n,t)):[]}var Kw=Xn(function(e,n,t){return e+(t?" ":"")+Nu(n)});function Xw(e,n,t){return e=Z(e),t=t==null?0:Ln(q(t),0,e.length),n=Te(n),e.slice(t,t+n.length)==n}function Zw(e,n,t){var a=c.templateSettings;t&&Ee(e,n,t)&&(n=r),e=Z(e),n=xr({},n,a,ls);var s=xr({},n.imports,a.imports,ls),d=_e(s),p=Ui(s,d),v,b,I=0,S=n.interpolate||Ft,A="__p += '",C=Hi((n.escape||Ft).source+"|"+S.source+"|"+(S===Lo?Tg:Ft).source+"|"+(n.evaluate||Ft).source+"|$","g"),N="//# sourceURL="+(Q.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++a_+"]")+` +`;e.replace(C,function(F,H,V,Ne,xe,Pe){return V||(V=Ne),A+=e.slice(I,Pe).replace(kg,S_),H&&(v=!0,A+=`' + +__e(`+H+`) + +'`),xe&&(b=!0,A+=`'; +`+xe+`; +__p += '`),V&&(A+=`' + +((__t = (`+V+`)) == null ? '' : __t) + +'`),I=Pe+F.length,F}),A+=`'; +`;var M=Q.call(n,"variable")&&n.variable;if(!M)A=`with (obj) { +`+A+` +} +`;else if(Rg.test(M))throw new D(g);A=(b?A.replace(hg,""):A).replace(dg,"$1").replace(pg,"$1;"),A="function("+(M||"obj")+`) { +`+(M?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(b?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+A+`return __p +}`;var U=tl(function(){return X(d,N+"return "+A).apply(r,p)});if(U.source=A,Ru(U))throw U;return U}function Jw(e){return Z(e).toLowerCase()}function Qw(e){return Z(e).toUpperCase()}function eb(e,n,t){if(e=Z(e),e&&(t||n===r))return cf(e);if(!e||!(n=Te(n)))return e;var a=Ve(e),s=Ve(n),d=hf(a,s),p=df(a,s)+1;return xn(a,d,p).join("")}function nb(e,n,t){if(e=Z(e),e&&(t||n===r))return e.slice(0,gf(e)+1);if(!e||!(n=Te(n)))return e;var a=Ve(e),s=df(a,Ve(n))+1;return xn(a,0,s).join("")}function tb(e,n,t){if(e=Z(e),e&&(t||n===r))return e.replace(Ri,"");if(!e||!(n=Te(n)))return e;var a=Ve(e),s=hf(a,Ve(n));return xn(a,s).join("")}function rb(e,n){var t=Xp,a=Zp;if(ae(n)){var s="separator"in n?n.separator:s;t="length"in n?q(n.length):t,a="omission"in n?Te(n.omission):a}e=Z(e);var d=e.length;if(Gn(e)){var p=Ve(e);d=p.length}if(t>=d)return e;var v=t-Un(a);if(v<1)return a;var b=p?xn(p,0,v).join(""):e.slice(0,v);if(s===r)return b+a;if(p&&(v+=b.length-v),Cu(s)){if(e.slice(v).search(s)){var I,S=b;for(s.global||(s=Hi(s.source,Z(No.exec(s))+"g")),s.lastIndex=0;I=s.exec(S);)var A=I.index;b=b.slice(0,A===r?v:A)}}else if(e.indexOf(Te(s),v)!=v){var C=b.lastIndexOf(s);C>-1&&(b=b.slice(0,C))}return b+a}function ib(e){return e=Z(e),e&&gg.test(e)?e.replace(Co,P_):e}var ub=Xn(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),Nu=rs("toUpperCase");function nl(e,n,t){return e=Z(e),n=t?r:n,n===r?R_(e)?F_(e):w_(e):e.match(n)||[]}var tl=z(function(e,n){try{return Re(e,r,n)}catch(t){return Ru(t)?t:new D(t)}}),ab=ln(function(e,n){return ke(n,function(t){t=nn(t),fn(e,t,Su(e[t],e))}),e});function ob(e){var n=e==null?0:e.length,t=$();return e=n?ue(e,function(a){if(typeof a[1]!="function")throw new De(h);return[t(a[0]),a[1]]}):[],z(function(a){for(var s=-1;++sgn)return[];var t=Je,a=we(e,Je);n=$(n),e-=Je;for(var s=Gi(a,n);++t0||n<0)?new Y(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),n!==r&&(n=q(n),t=n<0?t.dropRight(-n):t.take(n-e)),t)},Y.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Y.prototype.toArray=function(){return this.take(Je)},Qe(Y.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),a=/^(?:head|last)$/.test(n),s=c[a?"take"+(n=="last"?"Right":""):n],d=a||/^find/.test(n);s&&(c.prototype[n]=function(){var p=this.__wrapped__,v=a?[1]:arguments,b=p instanceof Y,I=v[0],S=b||W(p),A=function(H){var V=s.apply(c,vn([H],v));return a&&C?V[0]:V};S&&t&&typeof I=="function"&&I.length!=1&&(b=S=!1);var C=this.__chain__,N=!!this.__actions__.length,M=d&&!C,U=b&&!N;if(!d&&S){p=U?p:new Y(this);var F=e.apply(p,v);return F.__actions__.push({func:_r,args:[A],thisArg:r}),new We(F,C)}return M&&U?e.apply(this,v):(F=this.thru(A),M?a?F.value()[0]:F.value():F)})}),ke(["pop","push","shift","sort","splice","unshift"],function(e){var n=Gt[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",a=/^(?:pop|shift)$/.test(e);c.prototype[e]=function(){var s=arguments;if(a&&!this.__chain__){var d=this.value();return n.apply(W(d)?d:[],s)}return this[t](function(p){return n.apply(W(p)?p:[],s)})}}),Qe(Y.prototype,function(e,n){var t=c[n];if(t){var a=t.name+"";Q.call(Yn,a)||(Yn[a]=[]),Yn[a].push({name:n,func:t})}}),Yn[sr(r,ce).name]=[{name:"wrapper",func:r}],Y.prototype.clone=iv,Y.prototype.reverse=uv,Y.prototype.value=av,c.prototype.at=M0,c.prototype.chain=F0,c.prototype.commit=k0,c.prototype.next=D0,c.prototype.plant=B0,c.prototype.reverse=q0,c.prototype.toJSON=c.prototype.valueOf=c.prototype.value=G0,c.prototype.first=c.prototype.head,st&&(c.prototype[st]=W0),c},zn=k_();An?((An.exports=zn)._=zn,$i._=zn):ve._=zn}).call(ze)}(Rt,Rt.exports);var Ct=Rt.exports,Zd=function(){},Jd=Zd(),Fn=function(i){return i!==Jd&&i!==null},Qd=Fn,ep=Array.prototype.forEach,np=Object.create,tp=function(i,u){var r;for(r in i)u[r]=i[r]},rp=function(i){var u=np(null);return ep.call(arguments,function(r){Qd(r)&&tp(Object(r),u)}),u},ip=function(){var i=Math.sign;return typeof i!="function"?!1:i(10)===1&&i(-20)===-1},kr,Wa;function up(){return Wa||(Wa=1,kr=function(i){return i=Number(i),isNaN(i)||i===0?i:i>0?1:-1}),kr}var ap=ip()?Math.sign:up(),op=ap,fp=Math.abs,sp=Math.floor,lp=function(i){return isNaN(i)?0:(i=Number(i),i===0||!isFinite(i)?i:op(i)*sp(fp(i)))},cp=lp,hp=Math.max,dp=function(i){return hp(0,cp(i))},Ba=function(i){if(typeof i!="function")throw new TypeError(i+" is not a function");return i},pp=Fn,qa=function(i){if(!pp(i))throw new TypeError("Cannot use null or undefined");return i},gp={exports:{}},Dr,Ga;function _p(){return Ga||(Ga=1,Dr=function(){var i=Object.assign,u;return typeof i!="function"?!1:(u={foo:"raz"},i(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")}),Dr}var Wr,Ua;function vp(){return Ua||(Ua=1,Wr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),Wr}var Br,za;function mp(){if(za)return Br;za=1;var i=Fn,u=Object.keys;return Br=function(r){return u(i(r)?Object(r):r)},Br}var qr,Ha;function wp(){return Ha||(Ha=1,qr=vp()()?Object.keys:mp()),qr}var Gr,ja;function bp(){if(ja)return Gr;ja=1;var i=wp(),u=qa,r=Math.max;return Gr=function(o,f){var l,h,g=r(arguments.length,2),_;for(o=Object(u(o)),_=function(m){try{o[m]=f[m]}catch(y){l||(l=y)}},h=1;h-1},Zr}var Jr,io;function Tp(){return io||(io=1,Jr=Rp()()?String.prototype.contains:Cp()),Jr}var uo;function kn(){if(uo)return zr.exports;uo=1;var i=Za(),u=Ap(),r=Va(),o=rp,f=Tp(),l=zr.exports=function(h,g){var _,m,y,O,R;return arguments.length<2||typeof h!="string"?(O=g,g=h,h=null):O=arguments[2],i(h)?(_=f.call(h,"c"),m=f.call(h,"e"),y=f.call(h,"w")):(_=y=!0,m=!1),R={value:g,configurable:_,enumerable:m,writable:y},O?r(o(O),R):R};return l.gs=function(h,g,_){var m,y,O,R;return typeof h!="string"?(O=_,_=g,g=h,h=null):O=arguments[3],i(g)?u(g)?i(_)?u(_)||(O=_,_=void 0):_=void 0:(O=g,g=_=void 0):g=void 0,i(h)?(m=f.call(h,"c"),y=f.call(h,"e")):(m=!0,y=!1),R={get:g,set:_,configurable:m,enumerable:y},O?r(o(O),R):R},zr.exports}var Qr={exports:{}};(function(i,u){var r=kn(),o=Ba,f=Function.prototype.apply,l=Function.prototype.call,h=Object.create,g=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},O,R,T,G,K,k,ce;O=function(B,P){var j;return o(P),m.call(this,"__ee__")?j=this.__ee__:(j=y.value=h(null),g(this,"__ee__",y),y.value=null),j[B]?typeof j[B]=="object"?j[B].push(P):j[B]=[j[B],P]:j[B]=P,this},R=function(B,P){var j,J;return o(P),J=this,O.call(this,B,j=function(){T.call(J,B,j),f.call(P,this,arguments)}),j.__eeOnceListener__=P,this},T=function(B,P){var j,J,ee,re;if(o(P),!m.call(this,"__ee__"))return this;if(j=this.__ee__,!j[B])return this;if(J=j[B],typeof J=="object")for(re=0;ee=J[re];++re)(ee===P||ee.__eeOnceListener__===P)&&(J.length===2?j[B]=J[re?0:1]:J.splice(re,1));else(J===P||J.__eeOnceListener__===P)&&delete j[B];return this},G=function(B){var P,j,J,ee,re;if(m.call(this,"__ee__")&&(ee=this.__ee__[B],!!ee))if(typeof ee=="object"){for(j=arguments.length,re=new Array(j-1),P=1;P=55296&&j<=56319&&(he+=R[++k])),he=T?m.call(T,G,he,ce):he,K?(y.value=he,O(B,ce,y)):B[ce]=he,++ce;P=ce}}if(P===void 0)for(P=o(R.length),K&&(B=new K(P)),k=0;kasync u=>{try{const r=await i(u);postMessage({result:r})}catch(r){postMessage({error:r})}};function Vp(i){const u={};return Ct.forEach(i==null?void 0:i.events,({id:r,pId:o})=>{u[r]=o}),u}function Kp({trace:i,mode:u,orientation:r}){const o=new Da.graphlib.Graph;switch(o.setGraph({}),u){case"directed-graph":Ct.forEach(i==null?void 0:i.events,({id:f,pId:l,type:h},g)=>{f&&(o.hasNode(`${f}`)?o.node(`${f}`).size+=1:o.setNode(`${f}`,{label:`${f}`,width:1,height:1,size:1}),l&&o.hasNode(`${l}`)&&o.setEdge(`${f}`,`${l}`,{label:`${f}`,width:1,height:1}))});break;case"tree":{const f=Vp(i);Ct.forEach(i==null?void 0:i.events,({id:l,pId:h,type:g},_)=>{if(l){o.hasNode(`${l}`)?o.node(`${l}`).size+=1:o.setNode(`${l}`,{label:`${l}`,width:1,height:1,size:1});const m=f[l];m&&o.hasNode(`${m}`)&&o.setEdge(`${l}`,`${m}`,{label:`${l}`,width:1,height:1})}})}break}return o.setGraph({ranksep:100,align:"UL",rankdir:r==="horizontal"?"LR":"TB"}),Da.layout(o),o.nodes().map(f=>Ct.pick(o.node(f),"x","y","label","size"))}onmessage=Yp(async({data:i})=>Kp(i))})(); diff --git a/assets/tree.worker-w3km_BXF.js b/assets/tree.worker-w3km_BXF.js deleted file mode 100644 index 98f20ea..0000000 --- a/assets/tree.worker-w3km_BXF.js +++ /dev/null @@ -1,27 +0,0 @@ -var Xb=Object.defineProperty;var Zb=(ze,tn,$e)=>tn in ze?Xb(ze,tn,{enumerable:!0,configurable:!0,writable:!0,value:$e}):ze[tn]=$e;var de=(ze,tn,$e)=>Zb(ze,typeof tn!="symbol"?tn+"":tn,$e);(function(){"use strict";var ze=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},tn="\0",$e="\0",Gu="";let sl=class{constructor(u){de(this,"_isDirected",!0);de(this,"_isMultigraph",!1);de(this,"_isCompound",!1);de(this,"_label");de(this,"_defaultNodeLabelFn",()=>{});de(this,"_defaultEdgeLabelFn",()=>{});de(this,"_nodes",{});de(this,"_in",{});de(this,"_preds",{});de(this,"_out",{});de(this,"_sucs",{});de(this,"_edgeObjs",{});de(this,"_edgeLabels",{});de(this,"_nodeCount",0);de(this,"_edgeCount",0);de(this,"_parent");de(this,"_children");u&&(this._isDirected=Object.hasOwn(u,"directed")?u.directed:!0,this._isMultigraph=Object.hasOwn(u,"multigraph")?u.multigraph:!1,this._isCompound=Object.hasOwn(u,"compound")?u.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[$e]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(u){return this._label=u,this}graph(){return this._label}setDefaultNodeLabel(u){return this._defaultNodeLabelFn=u,typeof u!="function"&&(this._defaultNodeLabelFn=()=>u),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var u=this;return this.nodes().filter(r=>Object.keys(u._in[r]).length===0)}sinks(){var u=this;return this.nodes().filter(r=>Object.keys(u._out[r]).length===0)}setNodes(u,r){var a=arguments,f=this;return u.forEach(function(l){a.length>1?f.setNode(l,r):f.setNode(l)}),this}setNode(u,r){return Object.hasOwn(this._nodes,u)?(arguments.length>1&&(this._nodes[u]=r),this):(this._nodes[u]=arguments.length>1?r:this._defaultNodeLabelFn(u),this._isCompound&&(this._parent[u]=$e,this._children[u]={},this._children[$e][u]=!0),this._in[u]={},this._preds[u]={},this._out[u]={},this._sucs[u]={},++this._nodeCount,this)}node(u){return this._nodes[u]}hasNode(u){return Object.hasOwn(this._nodes,u)}removeNode(u){var r=this;if(Object.hasOwn(this._nodes,u)){var a=f=>r.removeEdge(r._edgeObjs[f]);delete this._nodes[u],this._isCompound&&(this._removeFromParentsChildList(u),delete this._parent[u],this.children(u).forEach(function(f){r.setParent(f)}),delete this._children[u]),Object.keys(this._in[u]).forEach(a),delete this._in[u],delete this._preds[u],Object.keys(this._out[u]).forEach(a),delete this._out[u],delete this._sucs[u],--this._nodeCount}return this}setParent(u,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r===void 0)r=$e;else{r+="";for(var a=r;a!==void 0;a=this.parent(a))if(a===u)throw new Error("Setting "+r+" as parent of "+u+" would create a cycle");this.setNode(r)}return this.setNode(u),this._removeFromParentsChildList(u),this._parent[u]=r,this._children[r][u]=!0,this}_removeFromParentsChildList(u){delete this._children[this._parent[u]][u]}parent(u){if(this._isCompound){var r=this._parent[u];if(r!==$e)return r}}children(u=$e){if(this._isCompound){var r=this._children[u];if(r)return Object.keys(r)}else{if(u===$e)return this.nodes();if(this.hasNode(u))return[]}}predecessors(u){var r=this._preds[u];if(r)return Object.keys(r)}successors(u){var r=this._sucs[u];if(r)return Object.keys(r)}neighbors(u){var r=this.predecessors(u);if(r){const f=new Set(r);for(var a of this.successors(u))f.add(a);return Array.from(f.values())}}isLeaf(u){var r;return this.isDirected()?r=this.successors(u):r=this.neighbors(u),r.length===0}filterNodes(u){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var a=this;Object.entries(this._nodes).forEach(function([c,p]){u(c)&&r.setNode(c,p)}),Object.values(this._edgeObjs).forEach(function(c){r.hasNode(c.v)&&r.hasNode(c.w)&&r.setEdge(c,a.edge(c))});var f={};function l(c){var p=a.parent(c);return p===void 0||r.hasNode(p)?(f[c]=p,p):p in f?f[p]:l(p)}return this._isCompound&&r.nodes().forEach(c=>r.setParent(c,l(c))),r}setDefaultEdgeLabel(u){return this._defaultEdgeLabelFn=u,typeof u!="function"&&(this._defaultEdgeLabelFn=()=>u),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(u,r){var a=this,f=arguments;return u.reduce(function(l,c){return f.length>1?a.setEdge(l,c,r):a.setEdge(l,c),c}),this}setEdge(){var u,r,a,f,l=!1,c=arguments[0];typeof c=="object"&&c!==null&&"v"in c?(u=c.v,r=c.w,a=c.name,arguments.length===2&&(f=arguments[1],l=!0)):(u=c,r=arguments[1],a=arguments[3],arguments.length>2&&(f=arguments[2],l=!0)),u=""+u,r=""+r,a!==void 0&&(a=""+a);var p=et(this._isDirected,u,r,a);if(Object.hasOwn(this._edgeLabels,p))return l&&(this._edgeLabels[p]=f),this;if(a!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(u),this.setNode(r),this._edgeLabels[p]=l?f:this._defaultEdgeLabelFn(u,r,a);var _=ll(this._isDirected,u,r,a);return u=_.v,r=_.w,Object.freeze(_),this._edgeObjs[p]=_,Uu(this._preds[r],u),Uu(this._sucs[u],r),this._in[r][p]=_,this._out[u][p]=_,this._edgeCount++,this}edge(u,r,a){var f=arguments.length===1?Ir(this._isDirected,arguments[0]):et(this._isDirected,u,r,a);return this._edgeLabels[f]}edgeAsObj(){const u=this.edge(...arguments);return typeof u!="object"?{label:u}:u}hasEdge(u,r,a){var f=arguments.length===1?Ir(this._isDirected,arguments[0]):et(this._isDirected,u,r,a);return Object.hasOwn(this._edgeLabels,f)}removeEdge(u,r,a){var f=arguments.length===1?Ir(this._isDirected,arguments[0]):et(this._isDirected,u,r,a),l=this._edgeObjs[f];return l&&(u=l.v,r=l.w,delete this._edgeLabels[f],delete this._edgeObjs[f],zu(this._preds[r],u),zu(this._sucs[u],r),delete this._in[r][f],delete this._out[u][f],this._edgeCount--),this}inEdges(u,r){var a=this._in[u];if(a){var f=Object.values(a);return r?f.filter(l=>l.v===r):f}}outEdges(u,r){var a=this._out[u];if(a){var f=Object.values(a);return r?f.filter(l=>l.w===r):f}}nodeEdges(u,r){var a=this.inEdges(u,r);if(a)return a.concat(this.outEdges(u,r))}};function Uu(i,u){i[u]?i[u]++:i[u]=1}function zu(i,u){--i[u]||delete i[u]}function et(i,u,r,a){var f=""+u,l=""+r;if(!i&&f>l){var c=f;f=l,l=c}return f+Gu+l+Gu+(a===void 0?tn:a)}function ll(i,u,r,a){var f=""+u,l=""+r;if(!i&&f>l){var c=f;f=l,l=c}var p={v:f,w:l};return a&&(p.name=a),p}function Ir(i,u){return et(i,u.v,u.w,u.name)}var Sr=sl,cl="2.2.4",hl={Graph:Sr,version:cl},dl=Sr,pl={write:gl,read:ml};function gl(i){var u={options:{directed:i.isDirected(),multigraph:i.isMultigraph(),compound:i.isCompound()},nodes:_l(i),edges:vl(i)};return i.graph()!==void 0&&(u.value=structuredClone(i.graph())),u}function _l(i){return i.nodes().map(function(u){var r=i.node(u),a=i.parent(u),f={v:u};return r!==void 0&&(f.value=r),a!==void 0&&(f.parent=a),f})}function vl(i){return i.edges().map(function(u){var r=i.edge(u),a={v:u.v,w:u.w};return u.name!==void 0&&(a.name=u.name),r!==void 0&&(a.value=r),a})}function ml(i){var u=new dl(i.options).setGraph(i.value);return i.nodes.forEach(function(r){u.setNode(r.v,r.value),r.parent&&u.setParent(r.v,r.parent)}),i.edges.forEach(function(r){u.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),u}var wl=bl;function bl(i){var u={},r=[],a;function f(l){Object.hasOwn(u,l)||(u[l]=!0,a.push(l),i.successors(l).forEach(f),i.predecessors(l).forEach(f))}return i.nodes().forEach(function(l){a=[],f(l),a.length&&r.push(a)}),r}var ju=class{constructor(){de(this,"_arr",[]);de(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(u){return u.key})}has(u){return Object.hasOwn(this._keyIndices,u)}priority(u){var r=this._keyIndices[u];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(u,r){var a=this._keyIndices;if(u=String(u),!Object.hasOwn(a,u)){var f=this._arr,l=f.length;return a[u]=l,f.push({key:u,priority:r}),this._decrease(l),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var u=this._arr.pop();return delete this._keyIndices[u.key],this._heapify(0),u.key}decrease(u,r){var a=this._keyIndices[u];if(r>this._arr[a].priority)throw new Error("New priority is greater than current priority. Key: "+u+" Old: "+this._arr[a].priority+" New: "+r);this._arr[a].priority=r,this._decrease(a)}_heapify(u){var r=this._arr,a=2*u,f=a+1,l=u;a>1,!(r[f].priority1;function xl(i,u,r,a){return Ol(i,String(u),r||El,a||function(f){return i.outEdges(f)})}function Ol(i,u,r,a){var f={},l=new yl,c,p,_=function(m){var y=m.v!==c?m.v:m.w,O=f[y],R=r(m),T=p.distance+R;if(R<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+m+" Weight: "+R);T0&&(c=l.removeMin(),p=f[c],p.distance!==Number.POSITIVE_INFINITY);)a(c).forEach(_);return f}var Il=Hu,Sl=Al;function Al(i,u,r){return i.nodes().reduce(function(a,f){return a[f]=Il(i,f,u,r),a},{})}var Yu=Rl;function Rl(i){var u=0,r=[],a={},f=[];function l(c){var p=a[c]={onStack:!0,lowlink:u,index:u++};if(r.push(c),i.successors(c).forEach(function(y){Object.hasOwn(a,y)?a[y].onStack&&(p.lowlink=Math.min(p.lowlink,a[y].index)):(l(y),p.lowlink=Math.min(p.lowlink,a[y].lowlink))}),p.lowlink===p.index){var _=[],m;do m=r.pop(),a[m].onStack=!1,_.push(m);while(c!==m);f.push(_)}}return i.nodes().forEach(function(c){Object.hasOwn(a,c)||l(c)}),f}var Cl=Yu,Tl=Ll;function Ll(i){return Cl(i).filter(function(u){return u.length>1||u.length===1&&i.hasEdge(u[0],u[0])})}var Nl=$l,Pl=()=>1;function $l(i,u,r){return Ml(i,u||Pl,r||function(a){return i.outEdges(a)})}function Ml(i,u,r){var a={},f=i.nodes();return f.forEach(function(l){a[l]={},a[l][l]={distance:0},f.forEach(function(c){l!==c&&(a[l][c]={distance:Number.POSITIVE_INFINITY})}),r(l).forEach(function(c){var p=c.v===l?c.w:c.v,_=u(c);a[l][p]={distance:_,predecessor:l}})}),f.forEach(function(l){var c=a[l];f.forEach(function(p){var _=a[p];f.forEach(function(m){var y=_[l],O=c[m],R=_[m],T=y.distance+O.distance;Ti.successors(p):p=>i.neighbors(p),f=r==="post"?Wl:Bl,l=[],c={};return u.forEach(p=>{if(!i.hasNode(p))throw new Error("Graph does not have node: "+p);f(p,a,c,l)}),l}function Wl(i,u,r,a){for(var f=[[i,!1]];f.length>0;){var l=f.pop();l[1]?a.push(l[0]):Object.hasOwn(r,l[0])||(r[l[0]]=!0,f.push([l[0],!0]),Ju(u(l[0]),c=>f.push([c,!1])))}}function Bl(i,u,r,a){for(var f=[i];f.length>0;){var l=f.pop();Object.hasOwn(r,l)||(r[l]=!0,a.push(l),Ju(u(l),c=>f.push(c)))}}function Ju(i,u){for(var r=i.length;r--;)u(i[r],r,i);return i}var ql=Zu,Gl=Ul;function Ul(i,u){return ql(i,u,"post")}var zl=Zu,jl=Hl;function Hl(i,u){return zl(i,u,"pre")}var Yl=Sr,Vl=ju,Kl=Xl;function Xl(i,u){var r=new Yl,a={},f=new Vl,l;function c(_){var m=_.v===l?_.w:_.v,y=f.priority(m);if(y!==void 0){var O=u(_);O0;){if(l=f.removeMin(),Object.hasOwn(a,l))r.setEdge(l,a[l]);else{if(p)throw new Error("Input graph is not connected: "+i);p=!0}i.nodeEdges(l).forEach(c)}return r}var Zl={components:wl,dijkstra:Hu,dijkstraAll:Sl,findCycles:Tl,floydWarshall:Nl,isAcyclic:Fl,postorder:Gl,preorder:jl,prim:Kl,tarjan:Yu,topsort:Ku},Qu=hl,je={Graph:Qu.Graph,json:pl,alg:Zl,version:Qu.version};let Jl=class{constructor(){let u={};u._next=u._prev=u,this._sentinel=u}dequeue(){let u=this._sentinel,r=u._prev;if(r!==u)return eo(r),r}enqueue(u){let r=this._sentinel;u._prev&&u._next&&eo(u),u._next=r._next,r._next._prev=u,r._next=u,u._prev=r}toString(){let u=[],r=this._sentinel,a=r._prev;for(;a!==r;)u.push(JSON.stringify(a,Ql)),a=a._prev;return"["+u.join(", ")+"]"}};function eo(i){i._prev._next=i._next,i._next._prev=i._prev,delete i._next,delete i._prev}function Ql(i,u){if(i!=="_next"&&i!=="_prev")return u}var ec=Jl;let nc=je.Graph,tc=ec;var rc=uc;let ic=()=>1;function uc(i,u){if(i.nodeCount()<=1)return[];let r=ac(i,u||ic);return oc(r.graph,r.buckets,r.zeroIdx).flatMap(f=>i.outEdges(f.v,f.w))}function oc(i,u,r){let a=[],f=u[u.length-1],l=u[0],c;for(;i.nodeCount();){for(;c=l.dequeue();)Rr(i,u,r,c);for(;c=f.dequeue();)Rr(i,u,r,c);if(i.nodeCount()){for(let p=u.length-2;p>0;--p)if(c=u[p].dequeue(),c){a=a.concat(Rr(i,u,r,c,!0));break}}}return a}function Rr(i,u,r,a,f){let l=f?[]:void 0;return i.inEdges(a.v).forEach(c=>{let p=i.edge(c),_=i.node(c.v);f&&l.push({v:c.v,w:c.w}),_.out-=p,Cr(u,r,_)}),i.outEdges(a.v).forEach(c=>{let p=i.edge(c),_=c.w,m=i.node(_);m.in-=p,Cr(u,r,m)}),i.removeNode(a.v),l}function ac(i,u){let r=new nc,a=0,f=0;i.nodes().forEach(p=>{r.setNode(p,{v:p,in:0,out:0})}),i.edges().forEach(p=>{let _=r.edge(p.v,p.w)||0,m=u(p),y=_+m;r.setEdge(p.v,p.w,y),f=Math.max(f,r.node(p.v).out+=m),a=Math.max(a,r.node(p.w).in+=m)});let l=fc(f+a+3).map(()=>new tc),c=a+1;return r.nodes().forEach(p=>{Cr(l,c,r.node(p))}),{graph:r,buckets:l,zeroIdx:c}}function Cr(i,u,r){r.out?r.in?i[r.out-r.in+u].enqueue(r):i[i.length-1].enqueue(r):i[0].enqueue(r)}function fc(i){const u=[];for(let r=0;ru.setNode(r,i.node(r))),i.edges().forEach(r=>{let a=u.edge(r.v,r.w)||{weight:0,minlen:1},f=i.edge(r);u.setEdge(r.v,r.w,{weight:a.weight+f.weight,minlen:Math.max(a.minlen,f.minlen)})}),u}function lc(i){let u=new no({multigraph:i.isMultigraph()}).setGraph(i.graph());return i.nodes().forEach(r=>{i.children(r).length||u.setNode(r,i.node(r))}),i.edges().forEach(r=>{u.setEdge(r,i.edge(r))}),u}function cc(i){let u=i.nodes().map(r=>{let a={};return i.outEdges(r).forEach(f=>{a[f.w]=(a[f.w]||0)+i.edge(f).weight}),a});return Tr(i.nodes(),u)}function hc(i){let u=i.nodes().map(r=>{let a={};return i.inEdges(r).forEach(f=>{a[f.v]=(a[f.v]||0)+i.edge(f).weight}),a});return Tr(i.nodes(),u)}function dc(i,u){let r=i.x,a=i.y,f=u.x-r,l=u.y-a,c=i.width/2,p=i.height/2;if(!f&&!l)throw new Error("Not possible to find intersection inside of the rectangle");let _,m;return Math.abs(l)*c>Math.abs(f)*p?(l<0&&(p=-p),_=p*f/l,m=p):(f<0&&(c=-c),_=c,m=c*l/f),{x:r+_,y:a+m}}function pc(i){let u=oo(io(i)+1).map(()=>[]);return i.nodes().forEach(r=>{let a=i.node(r),f=a.rank;f!==void 0&&(u[f][a.order]=r)}),u}function gc(i){let u=i.nodes().map(a=>{let f=i.node(a).rank;return f===void 0?Number.MAX_VALUE:f}),r=xt(Math.min,u);i.nodes().forEach(a=>{let f=i.node(a);Object.hasOwn(f,"rank")&&(f.rank-=r)})}function _c(i){let u=i.nodes().map(c=>i.node(c).rank),r=xt(Math.min,u),a=[];i.nodes().forEach(c=>{let p=i.node(c).rank-r;a[p]||(a[p]=[]),a[p].push(c)});let f=0,l=i.graph().nodeRankFactor;Array.from(a).forEach((c,p)=>{c===void 0&&p%l!==0?--f:c!==void 0&&f&&c.forEach(_=>i.node(_).rank+=f)})}function vc(i,u,r,a){let f={width:0,height:0};return arguments.length>=4&&(f.rank=r,f.order=a),to(i,"border",f,u)}function mc(i,u=ro){const r=[];for(let a=0;aro){const r=mc(u);return i.apply(null,r.map(a=>i.apply(null,a)))}else return i.apply(null,u)}function io(i){const r=i.nodes().map(a=>{let f=i.node(a).rank;return f===void 0?Number.MIN_VALUE:f});return xt(Math.max,r)}function wc(i,u){let r={lhs:[],rhs:[]};return i.forEach(a=>{u(a)?r.lhs.push(a):r.rhs.push(a)}),r}function bc(i,u){let r=Date.now();try{return u()}finally{console.log(i+" time: "+(Date.now()-r)+"ms")}}function yc(i,u){return u()}let Ec=0;function uo(i){var u=++Ec;return toString(i)+u}function oo(i,u,r=1){u==null&&(u=i,i=0);let a=l=>lua[u]),Object.entries(i).reduce((a,[f,l])=>(a[f]=r(l,f),a),{})}function Tr(i,u){return i.reduce((r,a,f)=>(r[a]=u[f],r),{})}let Ic=rc,Sc=le.uniqueId;var Ac={run:Rc,undo:Tc};function Rc(i){(i.graph().acyclicer==="greedy"?Ic(i,r(i)):Cc(i)).forEach(a=>{let f=i.edge(a);i.removeEdge(a),f.forwardName=a.name,f.reversed=!0,i.setEdge(a.w,a.v,f,Sc("rev"))});function r(a){return f=>a.edge(f).weight}}function Cc(i){let u=[],r={},a={};function f(l){Object.hasOwn(a,l)||(a[l]=!0,r[l]=!0,i.outEdges(l).forEach(c=>{Object.hasOwn(r,c.w)?u.push(c):f(c.w)}),delete r[l])}return i.nodes().forEach(f),u}function Tc(i){i.edges().forEach(u=>{let r=i.edge(u);if(r.reversed){i.removeEdge(u);let a=r.forwardName;delete r.reversed,delete r.forwardName,i.setEdge(u.w,u.v,r,a)}})}let Lc=le;var Nc={run:Pc,undo:Mc};function Pc(i){i.graph().dummyChains=[],i.edges().forEach(u=>$c(i,u))}function $c(i,u){let r=u.v,a=i.node(r).rank,f=u.w,l=i.node(f).rank,c=u.name,p=i.edge(u),_=p.labelRank;if(l===a+1)return;i.removeEdge(u);let m,y,O;for(O=0,++a;a{let r=i.node(u),a=r.edgeLabel,f;for(i.setEdge(r.edgeObj,a);r.dummy;)f=i.successors(u)[0],i.removeNode(u),a.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(a.x=r.x,a.y=r.y,a.width=r.width,a.height=r.height),u=f,r=i.node(u)})}const{applyWithChunking:Fc}=le;var Ot={longestPath:kc,slack:Dc};function kc(i){var u={};function r(a){var f=i.node(a);if(Object.hasOwn(u,a))return f.rank;u[a]=!0;let l=i.outEdges(a).map(p=>p==null?Number.POSITIVE_INFINITY:r(p.w)-i.edge(p).minlen);var c=Fc(Math.min,l);return c===Number.POSITIVE_INFINITY&&(c=0),f.rank=c}i.sources().forEach(r)}function Dc(i,u){return i.node(u.w).rank-i.node(u.v).rank-i.edge(u).minlen}var Wc=je.Graph,It=Ot.slack,ao=Bc;function Bc(i){var u=new Wc({directed:!1}),r=i.nodes()[0],a=i.nodeCount();u.setNode(r,{});for(var f,l;qc(u,i){var l=f.v,c=a===l?f.w:l;!i.hasNode(c)&&!It(u,f)&&(i.setNode(c,{}),i.setEdge(a,c,{}),r(c))})}return i.nodes().forEach(r),i.nodeCount()}function Gc(i,u){return u.edges().reduce((a,f)=>{let l=Number.POSITIVE_INFINITY;return i.hasNode(f.v)!==i.hasNode(f.w)&&(l=It(u,f)),lu.node(a).rank+=r)}var zc=ao,fo=Ot.slack,jc=Ot.longestPath,Hc=je.alg.preorder,Yc=je.alg.postorder,Vc=le.simplify,Kc=In;In.initLowLimValues=Nr,In.initCutValues=Lr,In.calcCutValue=so,In.leaveEdge=co,In.enterEdge=ho,In.exchangeEdges=po;function In(i){i=Vc(i),jc(i);var u=zc(i);Nr(u),Lr(u,i);for(var r,a;r=co(u);)a=ho(u,i,r),po(u,i,r,a)}function Lr(i,u){var r=Yc(i,i.nodes());r=r.slice(0,r.length-1),r.forEach(a=>Xc(i,u,a))}function Xc(i,u,r){var a=i.node(r),f=a.parent;i.edge(r,f).cutvalue=so(i,u,r)}function so(i,u,r){var a=i.node(r),f=a.parent,l=!0,c=u.edge(r,f),p=0;return c||(l=!1,c=u.edge(f,r)),p=c.weight,u.nodeEdges(r).forEach(_=>{var m=_.v===r,y=m?_.w:_.v;if(y!==f){var O=m===l,R=u.edge(_).weight;if(p+=O?R:-R,Jc(i,r,y)){var T=i.edge(r,y).cutvalue;p+=O?-T:T}}}),p}function Nr(i,u){arguments.length<2&&(u=i.nodes()[0]),lo(i,{},1,u)}function lo(i,u,r,a,f){var l=r,c=i.node(a);return u[a]=!0,i.neighbors(a).forEach(p=>{Object.hasOwn(u,p)||(r=lo(i,u,r,p,a))}),c.low=l,c.lim=r++,f?c.parent=f:delete c.parent,r}function co(i){return i.edges().find(u=>i.edge(u).cutvalue<0)}function ho(i,u,r){var a=r.v,f=r.w;u.hasEdge(a,f)||(a=r.w,f=r.v);var l=i.node(a),c=i.node(f),p=l,_=!1;l.lim>c.lim&&(p=c,_=!0);var m=u.edges().filter(y=>_===go(i,i.node(y.v),p)&&_!==go(i,i.node(y.w),p));return m.reduce((y,O)=>fo(u,O)!u.node(f).parent),a=Hc(i,r);a=a.slice(1),a.forEach(f=>{var l=i.node(f).parent,c=u.edge(f,l),p=!1;c||(c=u.edge(l,f),p=!0),u.node(f).rank=u.node(l).rank+(p?c.minlen:-c.minlen)})}function Jc(i,u,r){return i.hasEdge(u,r)}function go(i,u,r){return r.low<=u.lim&&u.lim<=r.lim}var Qc=Ot,_o=Qc.longestPath,eh=ao,nh=Kc,th=rh;function rh(i){switch(i.graph().ranker){case"network-simplex":vo(i);break;case"tight-tree":uh(i);break;case"longest-path":ih(i);break;default:vo(i)}}var ih=_o;function uh(i){_o(i),eh(i)}function vo(i){nh(i)}var oh=ah;function ah(i){let u=sh(i);i.graph().dummyChains.forEach(r=>{let a=i.node(r),f=a.edgeObj,l=fh(i,u,f.v,f.w),c=l.path,p=l.lca,_=0,m=c[_],y=!0;for(;r!==f.w;){if(a=i.node(r),y){for(;(m=c[_])!==p&&i.node(m).maxRankc||p>u[_].lim));for(m=_,_=a;(_=i.parent(_))!==m;)l.push(_);return{path:f.concat(l.reverse()),lca:m}}function sh(i){let u={},r=0;function a(f){let l=r;i.children(f).forEach(a),u[f]={low:l,lim:r++}}return i.children().forEach(a),u}let St=le;var lh={run:ch,cleanup:ph};function ch(i){let u=St.addDummyNode(i,"root",{},"_root"),r=hh(i),a=Object.values(r),f=St.applyWithChunking(Math.max,a)-1,l=2*f+1;i.graph().nestingRoot=u,i.edges().forEach(p=>i.edge(p).minlen*=l);let c=dh(i)+1;i.children().forEach(p=>mo(i,u,l,c,f,r,p)),i.graph().nodeRankFactor=l}function mo(i,u,r,a,f,l,c){let p=i.children(c);if(!p.length){c!==u&&i.setEdge(u,c,{weight:0,minlen:r});return}let _=St.addBorderNode(i,"_bt"),m=St.addBorderNode(i,"_bb"),y=i.node(c);i.setParent(_,c),y.borderTop=_,i.setParent(m,c),y.borderBottom=m,p.forEach(O=>{mo(i,u,r,a,f,l,O);let R=i.node(O),T=R.borderTop?R.borderTop:O,G=R.borderBottom?R.borderBottom:O,K=R.borderTop?a:2*a,k=T!==G?1:f-l[c]+1;i.setEdge(_,T,{weight:K,minlen:k,nestingEdge:!0}),i.setEdge(G,m,{weight:K,minlen:k,nestingEdge:!0})}),i.parent(c)||i.setEdge(u,_,{weight:0,minlen:f+l[c]})}function hh(i){var u={};function r(a,f){var l=i.children(a);l&&l.length&&l.forEach(c=>r(c,f+1)),u[a]=f}return i.children().forEach(a=>r(a,1)),u}function dh(i){return i.edges().reduce((u,r)=>u+i.edge(r).weight,0)}function ph(i){var u=i.graph();i.removeNode(u.nestingRoot),delete u.nestingRoot,i.edges().forEach(r=>{var a=i.edge(r);a.nestingEdge&&i.removeEdge(r)})}let gh=le;var _h=vh;function vh(i){function u(r){let a=i.children(r),f=i.node(r);if(a.length&&a.forEach(u),Object.hasOwn(f,"minRank")){f.borderLeft=[],f.borderRight=[];for(let l=f.minRank,c=f.maxRank+1;lyo(i.node(u))),i.edges().forEach(u=>yo(i.edge(u)))}function yo(i){let u=i.width;i.width=i.height,i.height=u}function yh(i){i.nodes().forEach(u=>Pr(i.node(u))),i.edges().forEach(u=>{let r=i.edge(u);r.points.forEach(Pr),Object.hasOwn(r,"y")&&Pr(r)})}function Pr(i){i.y=-i.y}function Eh(i){i.nodes().forEach(u=>$r(i.node(u))),i.edges().forEach(u=>{let r=i.edge(u);r.points.forEach($r),Object.hasOwn(r,"x")&&$r(r)})}function $r(i){let u=i.x;i.x=i.y,i.y=u}let Eo=le;var xh=Oh;function Oh(i){let u={},r=i.nodes().filter(_=>!i.children(_).length),a=r.map(_=>i.node(_).rank),f=Eo.applyWithChunking(Math.max,a),l=Eo.range(f+1).map(()=>[]);function c(_){if(u[_])return;u[_]=!0;let m=i.node(_);l[m.rank].push(_),i.successors(_).forEach(c)}return r.sort((_,m)=>i.node(_).rank-i.node(m).rank).forEach(c),l}let Ih=le.zipObject;var Sh=Ah;function Ah(i,u){let r=0;for(let a=1;ay)),f=u.flatMap(m=>i.outEdges(m).map(y=>({pos:a[y.w],weight:i.edge(y).weight})).sort((y,O)=>y.pos-O.pos)),l=1;for(;l{let y=m.pos+l;p[y]+=m.weight;let O=0;for(;y>0;)y%2&&(O+=p[y+1]),y=y-1>>1,p[y]+=m.weight;_+=m.weight*O}),_}var Ch=Th;function Th(i,u=[]){return u.map(r=>{let a=i.inEdges(r);if(a.length){let f=a.reduce((l,c)=>{let p=i.edge(c),_=i.node(c.v);return{sum:l.sum+p.weight*_.order,weight:l.weight+p.weight}},{sum:0,weight:0});return{v:r,barycenter:f.sum/f.weight,weight:f.weight}}else return{v:r}})}let Lh=le;var Nh=Ph;function Ph(i,u){let r={};i.forEach((f,l)=>{let c=r[f.v]={indegree:0,in:[],out:[],vs:[f.v],i:l};f.barycenter!==void 0&&(c.barycenter=f.barycenter,c.weight=f.weight)}),u.edges().forEach(f=>{let l=r[f.v],c=r[f.w];l!==void 0&&c!==void 0&&(c.indegree++,l.out.push(r[f.w]))});let a=Object.values(r).filter(f=>!f.indegree);return $h(a)}function $h(i){let u=[];function r(f){return l=>{l.merged||(l.barycenter===void 0||f.barycenter===void 0||l.barycenter>=f.barycenter)&&Mh(f,l)}}function a(f){return l=>{l.in.push(f),--l.indegree===0&&i.push(l)}}for(;i.length;){let f=i.pop();u.push(f),f.in.reverse().forEach(r(f)),f.out.forEach(a(f))}return u.filter(f=>!f.merged).map(f=>Lh.pick(f,["vs","i","barycenter","weight"]))}function Mh(i,u){let r=0,a=0;i.weight&&(r+=i.barycenter*i.weight,a+=i.weight),u.weight&&(r+=u.barycenter*u.weight,a+=u.weight),i.vs=u.vs.concat(i.vs),i.barycenter=r/a,i.weight=a,i.i=Math.min(u.i,i.i),u.merged=!0}let Fh=le;var kh=Dh;function Dh(i,u){let r=Fh.partition(i,y=>Object.hasOwn(y,"barycenter")),a=r.lhs,f=r.rhs.sort((y,O)=>O.i-y.i),l=[],c=0,p=0,_=0;a.sort(Wh(!!u)),_=xo(l,f,_),a.forEach(y=>{_+=y.vs.length,l.push(y.vs),c+=y.barycenter*y.weight,p+=y.weight,_=xo(l,f,_)});let m={vs:l.flat(!0)};return p&&(m.barycenter=c/p,m.weight=p),m}function xo(i,u,r){let a;for(;u.length&&(a=u[u.length-1]).i<=r;)u.pop(),i.push(a.vs),r++;return r}function Wh(i){return(u,r)=>u.barycenterr.barycenter?1:i?r.i-u.i:u.i-r.i}let Bh=Ch,qh=Nh,Gh=kh;var Uh=Oo;function Oo(i,u,r,a){let f=i.children(u),l=i.node(u),c=l?l.borderLeft:void 0,p=l?l.borderRight:void 0,_={};c&&(f=f.filter(R=>R!==c&&R!==p));let m=Bh(i,f);m.forEach(R=>{if(i.children(R.v).length){let T=Oo(i,R.v,r,a);_[R.v]=T,Object.hasOwn(T,"barycenter")&&jh(R,T)}});let y=qh(m,r);zh(y,_);let O=Gh(y,a);if(c&&(O.vs=[c,O.vs,p].flat(!0),i.predecessors(c).length)){let R=i.node(i.predecessors(c)[0]),T=i.node(i.predecessors(p)[0]);Object.hasOwn(O,"barycenter")||(O.barycenter=0,O.weight=0),O.barycenter=(O.barycenter*O.weight+R.order+T.order)/(O.weight+2),O.weight+=2}return O}function zh(i,u){i.forEach(r=>{r.vs=r.vs.flatMap(a=>u[a]?u[a].vs:a)})}function jh(i,u){i.barycenter!==void 0?(i.barycenter=(i.barycenter*i.weight+u.barycenter*u.weight)/(i.weight+u.weight),i.weight+=u.weight):(i.barycenter=u.barycenter,i.weight=u.weight)}let Hh=je.Graph,Yh=le;var Vh=Kh;function Kh(i,u,r){let a=Xh(i),f=new Hh({compound:!0}).setGraph({root:a}).setDefaultNodeLabel(l=>i.node(l));return i.nodes().forEach(l=>{let c=i.node(l),p=i.parent(l);(c.rank===u||c.minRank<=u&&u<=c.maxRank)&&(f.setNode(l),f.setParent(l,p||a),i[r](l).forEach(_=>{let m=_.v===l?_.w:_.v,y=f.edge(m,l),O=y!==void 0?y.weight:0;f.setEdge(m,l,{weight:i.edge(_).weight+O})}),Object.hasOwn(c,"minRank")&&f.setNode(l,{borderLeft:c.borderLeft[u],borderRight:c.borderRight[u]}))}),f}function Xh(i){for(var u;i.hasNode(u=Yh.uniqueId("_root")););return u}var Zh=Jh;function Jh(i,u,r){let a={},f;r.forEach(l=>{let c=i.parent(l),p,_;for(;c;){if(p=i.parent(c),p?(_=a[p],a[p]=c):(_=f,f=c),_&&_!==c){u.setEdge(_,c);return}c=p}})}let Qh=xh,ed=Sh,nd=Uh,td=Vh,rd=Zh,id=je.Graph,At=le;var ud=Io;function Io(i,u){if(u&&typeof u.customOrder=="function"){u.customOrder(i,Io);return}let r=At.maxRank(i),a=So(i,At.range(1,r+1),"inEdges"),f=So(i,At.range(r-1,-1,-1),"outEdges"),l=Qh(i);if(Ao(i,l),u&&u.disableOptimalOrderHeuristic)return;let c=Number.POSITIVE_INFINITY,p;for(let _=0,m=0;m<4;++_,++m){od(_%2?a:f,_%4>=2),l=At.buildLayerMatrix(i);let y=ed(i,l);ya.node(c).order=p),rd(a,r,l.vs)})}function Ao(i,u){Object.values(u).forEach(r=>r.forEach((a,f)=>i.node(a).order=f))}let ad=je.Graph,rn=le;var fd={positionX:cd,findType1Conflicts:Ro,findType2Conflicts:Co,addConflict:Mr,hasConflict:To,verticalAlignment:Lo,horizontalCompaction:No,alignCoordinates:$o,findSmallestWidthAlignment:Po,balance:Mo};function Ro(i,u){let r={};function a(f,l){let c=0,p=0,_=f.length,m=l[l.length-1];return l.forEach((y,O)=>{let R=sd(i,y),T=R?i.node(R).order:_;(R||y===m)&&(l.slice(p,O+1).forEach(G=>{i.predecessors(G).forEach(K=>{let k=i.node(K),ce=k.order;(ce{y=l[O],i.node(y).dummy&&i.predecessors(y).forEach(R=>{let T=i.node(R);T.dummy&&(T.order<_||T.order>m)&&Mr(r,R,y)})})}function f(l,c){let p=-1,_,m=0;return c.forEach((y,O)=>{if(i.node(y).dummy==="border"){let R=i.predecessors(y);R.length&&(_=i.node(R[0]).order,a(c,m,O,p,_),m=O,p=_)}a(c,m,c.length,_,l.length)}),c}return u.length&&u.reduce(f),r}function sd(i,u){if(i.node(u).dummy)return i.predecessors(u).find(r=>i.node(r).dummy)}function Mr(i,u,r){if(u>r){let f=u;u=r,r=f}let a=i[u];a||(i[u]=a={}),a[r]=!0}function To(i,u,r){if(u>r){let a=u;u=r,r=a}return!!i[u]&&Object.hasOwn(i[u],r)}function Lo(i,u,r,a){let f={},l={},c={};return u.forEach(p=>{p.forEach((_,m)=>{f[_]=_,l[_]=_,c[_]=m})}),u.forEach(p=>{let _=-1;p.forEach(m=>{let y=a(m);if(y.length){y=y.sort((R,T)=>c[R]-c[T]);let O=(y.length-1)/2;for(let R=Math.floor(O),T=Math.ceil(O);R<=T;++R){let G=y[R];l[m]===m&&_Math.max(R,l[T.v]+c.edge(T)),0)}function y(O){let R=c.outEdges(O).reduce((G,K)=>Math.min(G,l[K.w]-c.edge(K)),Number.POSITIVE_INFINITY),T=i.node(O);R!==Number.POSITIVE_INFINITY&&T.borderType!==p&&(l[O]=Math.max(l[O],R))}return _(m,c.predecessors.bind(c)),_(y,c.successors.bind(c)),Object.keys(a).forEach(O=>l[O]=l[r[O]]),l}function ld(i,u,r,a){let f=new ad,l=i.graph(),c=hd(l.nodesep,l.edgesep,a);return u.forEach(p=>{let _;p.forEach(m=>{let y=r[m];if(f.setNode(y),_){var O=r[_],R=f.edge(O,y);f.setEdge(O,y,Math.max(c(i,m,_),R||0))}_=m})}),f}function Po(i,u){return Object.values(u).reduce((r,a)=>{let f=Number.NEGATIVE_INFINITY,l=Number.POSITIVE_INFINITY;Object.entries(a).forEach(([p,_])=>{let m=dd(i,p)/2;f=Math.max(_+m,f),l=Math.min(_-m,l)});const c=f-l;return c{["l","r"].forEach(c=>{let p=l+c,_=i[p];if(_===u)return;let m=Object.values(_),y=a-rn.applyWithChunking(Math.min,m);c!=="l"&&(y=f-rn.applyWithChunking(Math.max,m)),y&&(i[p]=rn.mapValues(_,O=>O+y))})})}function Mo(i,u){return rn.mapValues(i.ul,(r,a)=>{if(u)return i[u.toLowerCase()][a];{let f=Object.values(i).map(l=>l[a]).sort((l,c)=>l-c);return(f[1]+f[2])/2}})}function cd(i){let u=rn.buildLayerMatrix(i),r=Object.assign(Ro(i,u),Co(i,u)),a={},f;["u","d"].forEach(c=>{f=c==="u"?u:Object.values(u).reverse(),["l","r"].forEach(p=>{p==="r"&&(f=f.map(O=>Object.values(O).reverse()));let _=(c==="u"?i.predecessors:i.successors).bind(i),m=Lo(i,f,r,_),y=No(i,f,m.root,m.align,p==="r");p==="r"&&(y=rn.mapValues(y,O=>-O)),a[c+p]=y})});let l=Po(i,a);return $o(a,l),Mo(a,i.graph().align)}function hd(i,u,r){return(a,f,l)=>{let c=a.node(f),p=a.node(l),_=0,m;if(_+=c.width/2,Object.hasOwn(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":m=-c.width/2;break;case"r":m=c.width/2;break}if(m&&(_+=r?m:-m),m=0,_+=(c.dummy?u:i)/2,_+=(p.dummy?u:i)/2,_+=p.width/2,Object.hasOwn(p,"labelpos"))switch(p.labelpos.toLowerCase()){case"l":m=p.width/2;break;case"r":m=-p.width/2;break}return m&&(_+=r?m:-m),m=0,_}}function dd(i,u){return i.node(u).width}let Fo=le,pd=fd.positionX;var gd=_d;function _d(i){i=Fo.asNonCompoundGraph(i),vd(i),Object.entries(pd(i)).forEach(([u,r])=>i.node(u).x=r)}function vd(i){let u=Fo.buildLayerMatrix(i),r=i.graph().ranksep,a=0;u.forEach(f=>{const l=f.reduce((c,p)=>{const _=i.node(p).height;return c>_?c:_},0);f.forEach(c=>i.node(c).y=a+l/2),a+=l+r})}let ko=Ac,Do=Nc,md=th,wd=le.normalizeRanks,bd=oh,yd=le.removeEmptyRanks,Wo=lh,Ed=_h,Bo=mh,xd=ud,Od=gd,Me=le,Id=je.Graph;var Sd=Ad;function Ad(i,u){let r=u&&u.debugTiming?Me.time:Me.notime;r("layout",()=>{let a=r(" buildLayoutGraph",()=>kd(i));r(" runLayout",()=>Rd(a,r,u)),r(" updateInputGraph",()=>Cd(i,a))})}function Rd(i,u,r){u(" makeSpaceForEdgeLabels",()=>Dd(i)),u(" removeSelfEdges",()=>Yd(i)),u(" acyclic",()=>ko.run(i)),u(" nestingGraph.run",()=>Wo.run(i)),u(" rank",()=>md(Me.asNonCompoundGraph(i))),u(" injectEdgeLabelProxies",()=>Wd(i)),u(" removeEmptyRanks",()=>yd(i)),u(" nestingGraph.cleanup",()=>Wo.cleanup(i)),u(" normalizeRanks",()=>wd(i)),u(" assignRankMinMax",()=>Bd(i)),u(" removeEdgeLabelProxies",()=>qd(i)),u(" normalize.run",()=>Do.run(i)),u(" parentDummyChains",()=>bd(i)),u(" addBorderSegments",()=>Ed(i)),u(" order",()=>xd(i,r)),u(" insertSelfEdges",()=>Vd(i)),u(" adjustCoordinateSystem",()=>Bo.adjust(i)),u(" position",()=>Od(i)),u(" positionSelfEdges",()=>Kd(i)),u(" removeBorderNodes",()=>Hd(i)),u(" normalize.undo",()=>Do.undo(i)),u(" fixupEdgeLabelCoords",()=>zd(i)),u(" undoCoordinateSystem",()=>Bo.undo(i)),u(" translateGraph",()=>Gd(i)),u(" assignNodeIntersects",()=>Ud(i)),u(" reversePoints",()=>jd(i)),u(" acyclic.undo",()=>ko.undo(i))}function Cd(i,u){i.nodes().forEach(r=>{let a=i.node(r),f=u.node(r);a&&(a.x=f.x,a.y=f.y,a.rank=f.rank,u.children(r).length&&(a.width=f.width,a.height=f.height))}),i.edges().forEach(r=>{let a=i.edge(r),f=u.edge(r);a.points=f.points,Object.hasOwn(f,"x")&&(a.x=f.x,a.y=f.y)}),i.graph().width=u.graph().width,i.graph().height=u.graph().height}let Td=["nodesep","edgesep","ranksep","marginx","marginy"],Ld={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},Nd=["acyclicer","ranker","rankdir","align"],Pd=["width","height"],qo={width:0,height:0},$d=["minlen","weight","width","height","labeloffset"],Md={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},Fd=["labelpos"];function kd(i){let u=new Id({multigraph:!0,compound:!0}),r=kr(i.graph());return u.setGraph(Object.assign({},Ld,Fr(r,Td),Me.pick(r,Nd))),i.nodes().forEach(a=>{let f=kr(i.node(a));const l=Fr(f,Pd);Object.keys(qo).forEach(c=>{l[c]===void 0&&(l[c]=qo[c])}),u.setNode(a,l),u.setParent(a,i.parent(a))}),i.edges().forEach(a=>{let f=kr(i.edge(a));u.setEdge(a,Object.assign({},Md,Fr(f,$d),Me.pick(f,Fd)))}),u}function Dd(i){let u=i.graph();u.ranksep/=2,i.edges().forEach(r=>{let a=i.edge(r);a.minlen*=2,a.labelpos.toLowerCase()!=="c"&&(u.rankdir==="TB"||u.rankdir==="BT"?a.width+=a.labeloffset:a.height+=a.labeloffset)})}function Wd(i){i.edges().forEach(u=>{let r=i.edge(u);if(r.width&&r.height){let a=i.node(u.v),l={rank:(i.node(u.w).rank-a.rank)/2+a.rank,e:u};Me.addDummyNode(i,"edge-proxy",l,"_ep")}})}function Bd(i){let u=0;i.nodes().forEach(r=>{let a=i.node(r);a.borderTop&&(a.minRank=i.node(a.borderTop).rank,a.maxRank=i.node(a.borderBottom).rank,u=Math.max(u,a.maxRank))}),i.graph().maxRank=u}function qd(i){i.nodes().forEach(u=>{let r=i.node(u);r.dummy==="edge-proxy"&&(i.edge(r.e).labelRank=r.rank,i.removeNode(u))})}function Gd(i){let u=Number.POSITIVE_INFINITY,r=0,a=Number.POSITIVE_INFINITY,f=0,l=i.graph(),c=l.marginx||0,p=l.marginy||0;function _(m){let y=m.x,O=m.y,R=m.width,T=m.height;u=Math.min(u,y-R/2),r=Math.max(r,y+R/2),a=Math.min(a,O-T/2),f=Math.max(f,O+T/2)}i.nodes().forEach(m=>_(i.node(m))),i.edges().forEach(m=>{let y=i.edge(m);Object.hasOwn(y,"x")&&_(y)}),u-=c,a-=p,i.nodes().forEach(m=>{let y=i.node(m);y.x-=u,y.y-=a}),i.edges().forEach(m=>{let y=i.edge(m);y.points.forEach(O=>{O.x-=u,O.y-=a}),Object.hasOwn(y,"x")&&(y.x-=u),Object.hasOwn(y,"y")&&(y.y-=a)}),l.width=r-u+c,l.height=f-a+p}function Ud(i){i.edges().forEach(u=>{let r=i.edge(u),a=i.node(u.v),f=i.node(u.w),l,c;r.points?(l=r.points[0],c=r.points[r.points.length-1]):(r.points=[],l=f,c=a),r.points.unshift(Me.intersectRect(a,l)),r.points.push(Me.intersectRect(f,c))})}function zd(i){i.edges().forEach(u=>{let r=i.edge(u);if(Object.hasOwn(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function jd(i){i.edges().forEach(u=>{let r=i.edge(u);r.reversed&&r.points.reverse()})}function Hd(i){i.nodes().forEach(u=>{if(i.children(u).length){let r=i.node(u),a=i.node(r.borderTop),f=i.node(r.borderBottom),l=i.node(r.borderLeft[r.borderLeft.length-1]),c=i.node(r.borderRight[r.borderRight.length-1]);r.width=Math.abs(c.x-l.x),r.height=Math.abs(f.y-a.y),r.x=l.x+r.width/2,r.y=a.y+r.height/2}}),i.nodes().forEach(u=>{i.node(u).dummy==="border"&&i.removeNode(u)})}function Yd(i){i.edges().forEach(u=>{if(u.v===u.w){var r=i.node(u.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e:u,label:i.edge(u)}),i.removeEdge(u)}})}function Vd(i){var u=Me.buildLayerMatrix(i);u.forEach(r=>{var a=0;r.forEach((f,l)=>{var c=i.node(f);c.order=l+a,(c.selfEdges||[]).forEach(p=>{Me.addDummyNode(i,"selfedge",{width:p.label.width,height:p.label.height,rank:c.rank,order:l+ ++a,e:p.e,label:p.label},"_se")}),delete c.selfEdges})})}function Kd(i){i.nodes().forEach(u=>{var r=i.node(u);if(r.dummy==="selfedge"){var a=i.node(r.e.v),f=a.x+a.width/2,l=a.y,c=r.x-f,p=a.height/2;i.setEdge(r.e,r.label),i.removeNode(u),r.label.points=[{x:f+2*c/3,y:l-p},{x:f+5*c/6,y:l-p},{x:f+c,y:l},{x:f+5*c/6,y:l+p},{x:f+2*c/3,y:l+p}],r.label.x=r.x,r.label.y=r.y}})}function Fr(i,u){return Me.mapValues(Me.pick(i,u),Number)}function kr(i){var u={};return i&&Object.entries(i).forEach(([r,a])=>{typeof r=="string"&&(r=r.toLowerCase()),u[r]=a}),u}let Xd=le,Zd=je.Graph;var Jd={debugOrdering:Qd};function Qd(i){let u=Xd.buildLayerMatrix(i),r=new Zd({compound:!0,multigraph:!0}).setGraph({});return i.nodes().forEach(a=>{r.setNode(a,{label:a}),r.setParent(a,"layer"+i.node(a).rank)}),i.edges().forEach(a=>r.setEdge(a.v,a.w,{},a.name)),u.forEach((a,f)=>{let l="layer"+f;r.setNode(l,{rank:"same"}),a.reduce((c,p)=>(r.setEdge(c,p,{style:"invis"}),p))}),r}var ep="1.1.4",Go={graphlib:je,layout:Sd,debug:Jd,util:{time:le.time,notime:le.notime},version:ep},Rt={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */Rt.exports,function(i,u){(function(){var r,a="4.17.21",f=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",c="Expected a function",p="Invalid `variable` option passed into `_.template`",_="__lodash_hash_undefined__",m=500,y="__lodash_placeholder__",O=1,R=2,T=4,G=1,K=2,k=1,ce=2,B=4,P=8,H=16,J=32,ee=64,re=128,he=256,bi=512,ng=30,tg="...",rg=800,ig=16,Ta=1,ug=2,og=3,Sn=1/0,gn=9007199254740991,ag=17976931348623157e292,Nt=NaN,Je=4294967295,fg=Je-1,sg=Je>>>1,lg=[["ary",re],["bind",k],["bindKey",ce],["curry",P],["curryRight",H],["flip",bi],["partial",J],["partialRight",ee],["rearg",he]],Dn="[object Arguments]",Pt="[object Array]",cg="[object AsyncFunction]",nt="[object Boolean]",tt="[object Date]",hg="[object DOMException]",$t="[object Error]",Mt="[object Function]",La="[object GeneratorFunction]",He="[object Map]",rt="[object Number]",dg="[object Null]",un="[object Object]",Na="[object Promise]",pg="[object Proxy]",it="[object RegExp]",Ye="[object Set]",ut="[object String]",Ft="[object Symbol]",gg="[object Undefined]",ot="[object WeakMap]",_g="[object WeakSet]",at="[object ArrayBuffer]",Wn="[object DataView]",yi="[object Float32Array]",Ei="[object Float64Array]",xi="[object Int8Array]",Oi="[object Int16Array]",Ii="[object Int32Array]",Si="[object Uint8Array]",Ai="[object Uint8ClampedArray]",Ri="[object Uint16Array]",Ci="[object Uint32Array]",vg=/\b__p \+= '';/g,mg=/\b(__p \+=) '' \+/g,wg=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Pa=/&(?:amp|lt|gt|quot|#39);/g,$a=/[&<>"']/g,bg=RegExp(Pa.source),yg=RegExp($a.source),Eg=/<%-([\s\S]+?)%>/g,xg=/<%([\s\S]+?)%>/g,Ma=/<%=([\s\S]+?)%>/g,Og=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Ig=/^\w*$/,Sg=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ti=/[\\^$.*+?()[\]{}|]/g,Ag=RegExp(Ti.source),Li=/^\s+/,Rg=/\s/,Cg=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,Tg=/\{\n\/\* \[wrapped with (.+)\] \*/,Lg=/,? & /,Ng=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Pg=/[()=,{}\[\]\/\s]/,$g=/\\(\\)?/g,Mg=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Fa=/\w*$/,Fg=/^[-+]0x[0-9a-f]+$/i,kg=/^0b[01]+$/i,Dg=/^\[object .+?Constructor\]$/,Wg=/^0o[0-7]+$/i,Bg=/^(?:0|[1-9]\d*)$/,qg=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,kt=/($^)/,Gg=/['\n\r\u2028\u2029\\]/g,Dt="\\ud800-\\udfff",Ug="\\u0300-\\u036f",zg="\\ufe20-\\ufe2f",jg="\\u20d0-\\u20ff",ka=Ug+zg+jg,Da="\\u2700-\\u27bf",Wa="a-z\\xdf-\\xf6\\xf8-\\xff",Hg="\\xac\\xb1\\xd7\\xf7",Yg="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Vg="\\u2000-\\u206f",Kg=" \\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",Ba="A-Z\\xc0-\\xd6\\xd8-\\xde",qa="\\ufe0e\\ufe0f",Ga=Hg+Yg+Vg+Kg,Ni="['’]",Xg="["+Dt+"]",Ua="["+Ga+"]",Wt="["+ka+"]",za="\\d+",Zg="["+Da+"]",ja="["+Wa+"]",Ha="[^"+Dt+Ga+za+Da+Wa+Ba+"]",Pi="\\ud83c[\\udffb-\\udfff]",Jg="(?:"+Wt+"|"+Pi+")",Ya="[^"+Dt+"]",$i="(?:\\ud83c[\\udde6-\\uddff]){2}",Mi="[\\ud800-\\udbff][\\udc00-\\udfff]",Bn="["+Ba+"]",Va="\\u200d",Ka="(?:"+ja+"|"+Ha+")",Qg="(?:"+Bn+"|"+Ha+")",Xa="(?:"+Ni+"(?:d|ll|m|re|s|t|ve))?",Za="(?:"+Ni+"(?:D|LL|M|RE|S|T|VE))?",Ja=Jg+"?",Qa="["+qa+"]?",e_="(?:"+Va+"(?:"+[Ya,$i,Mi].join("|")+")"+Qa+Ja+")*",n_="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",t_="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",ef=Qa+Ja+e_,r_="(?:"+[Zg,$i,Mi].join("|")+")"+ef,i_="(?:"+[Ya+Wt+"?",Wt,$i,Mi,Xg].join("|")+")",u_=RegExp(Ni,"g"),o_=RegExp(Wt,"g"),Fi=RegExp(Pi+"(?="+Pi+")|"+i_+ef,"g"),a_=RegExp([Bn+"?"+ja+"+"+Xa+"(?="+[Ua,Bn,"$"].join("|")+")",Qg+"+"+Za+"(?="+[Ua,Bn+Ka,"$"].join("|")+")",Bn+"?"+Ka+"+"+Xa,Bn+"+"+Za,t_,n_,za,r_].join("|"),"g"),f_=RegExp("["+Va+Dt+ka+qa+"]"),s_=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,l_=["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"],c_=-1,ie={};ie[yi]=ie[Ei]=ie[xi]=ie[Oi]=ie[Ii]=ie[Si]=ie[Ai]=ie[Ri]=ie[Ci]=!0,ie[Dn]=ie[Pt]=ie[at]=ie[nt]=ie[Wn]=ie[tt]=ie[$t]=ie[Mt]=ie[He]=ie[rt]=ie[un]=ie[it]=ie[Ye]=ie[ut]=ie[ot]=!1;var te={};te[Dn]=te[Pt]=te[at]=te[Wn]=te[nt]=te[tt]=te[yi]=te[Ei]=te[xi]=te[Oi]=te[Ii]=te[He]=te[rt]=te[un]=te[it]=te[Ye]=te[ut]=te[Ft]=te[Si]=te[Ai]=te[Ri]=te[Ci]=!0,te[$t]=te[Mt]=te[ot]=!1;var h_={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},d_={"&":"&","<":"<",">":">",'"':""","'":"'"},p_={"&":"&","<":"<",">":">",""":'"',"'":"'"},g_={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},__=parseFloat,v_=parseInt,nf=typeof ze=="object"&&ze&&ze.Object===Object&&ze,m_=typeof self=="object"&&self&&self.Object===Object&&self,ve=nf||m_||Function("return this")(),ki=u&&!u.nodeType&&u,An=ki&&!0&&i&&!i.nodeType&&i,tf=An&&An.exports===ki,Di=tf&&nf.process,Fe=function(){try{var w=An&&An.require&&An.require("util").types;return w||Di&&Di.binding&&Di.binding("util")}catch{}}(),rf=Fe&&Fe.isArrayBuffer,uf=Fe&&Fe.isDate,of=Fe&&Fe.isMap,af=Fe&&Fe.isRegExp,ff=Fe&&Fe.isSet,sf=Fe&&Fe.isTypedArray;function Re(w,x,E){switch(E.length){case 0:return w.call(x);case 1:return w.call(x,E[0]);case 2:return w.call(x,E[0],E[1]);case 3:return w.call(x,E[0],E[1],E[2])}return w.apply(x,E)}function w_(w,x,E,L){for(var D=-1,X=w==null?0:w.length;++D-1}function Wi(w,x,E){for(var L=-1,D=w==null?0:w.length;++L-1;);return E}function vf(w,x){for(var E=w.length;E--&&qn(x,w[E],0)>-1;);return E}function R_(w,x){for(var E=w.length,L=0;E--;)w[E]===x&&++L;return L}var C_=Ui(h_),T_=Ui(d_);function L_(w){return"\\"+g_[w]}function N_(w,x){return w==null?r:w[x]}function Gn(w){return f_.test(w)}function P_(w){return s_.test(w)}function $_(w){for(var x,E=[];!(x=w.next()).done;)E.push(x.value);return E}function Yi(w){var x=-1,E=Array(w.size);return w.forEach(function(L,D){E[++x]=[D,L]}),E}function mf(w,x){return function(E){return w(x(E))}}function mn(w,x){for(var E=-1,L=w.length,D=0,X=[];++E-1}function yv(e,n){var t=this.__data__,o=rr(t,e);return o<0?(++this.size,t.push([e,n])):t[o][1]=n,this}on.prototype.clear=vv,on.prototype.delete=mv,on.prototype.get=wv,on.prototype.has=bv,on.prototype.set=yv;function an(e){var n=-1,t=e==null?0:e.length;for(this.clear();++n=n?e:n)),e}function Be(e,n,t,o,s,d){var g,v=n&O,b=n&R,I=n&T;if(t&&(g=s?t(e,o,s,d):t(e)),g!==r)return g;if(!oe(e))return e;var S=W(e);if(S){if(g=I1(e),!v)return Oe(e,g)}else{var A=be(e),C=A==Mt||A==La;if(On(e))return es(e,v);if(A==un||A==Dn||C&&!s){if(g=b||C?{}:ws(e),!v)return b?p1(e,kv(g,e)):d1(e,Tf(g,e))}else{if(!te[A])return s?e:{};g=S1(e,A,v)}}d||(d=new Ke);var N=d.get(e);if(N)return N;d.set(e,g),Vs(e)?e.forEach(function(F){g.add(Be(F,n,t,F,e,d))}):Hs(e)&&e.forEach(function(F,j){g.set(j,Be(F,n,t,j,e,d))});var M=I?b?wu:mu:b?Se:_e,U=S?r:M(e);return ke(U||e,function(F,j){U&&(j=F,F=e[j]),pt(g,j,Be(F,n,t,j,e,d))}),g}function Dv(e){var n=_e(e);return function(t){return Lf(t,e,n)}}function Lf(e,n,t){var o=t.length;if(e==null)return!o;for(e=ne(e);o--;){var s=t[o],d=n[s],g=e[s];if(g===r&&!(s in e)||!d(g))return!1}return!0}function Nf(e,n,t){if(typeof e!="function")throw new De(c);return yt(function(){e.apply(r,t)},n)}function gt(e,n,t,o){var s=-1,d=Bt,g=!0,v=e.length,b=[],I=n.length;if(!v)return b;t&&(n=ue(n,Ce(t))),o?(d=Wi,g=!1):n.length>=f&&(d=ft,g=!1,n=new Tn(n));e:for(;++ss?0:s+t),o=o===r||o>s?s:q(o),o<0&&(o+=s),o=t>o?0:Xs(o);t0&&t(v)?n>1?me(v,n-1,t,o,s):vn(s,v):o||(s[s.length]=v)}return s}var eu=os(),Mf=os(!0);function Qe(e,n){return e&&eu(e,n,_e)}function nu(e,n){return e&&Mf(e,n,_e)}function ur(e,n){return _n(n,function(t){return hn(e[t])})}function Nn(e,n){n=En(n,e);for(var t=0,o=n.length;e!=null&&tn}function qv(e,n){return e!=null&&Q.call(e,n)}function Gv(e,n){return e!=null&&n in ne(e)}function Uv(e,n,t){return e>=we(n,t)&&e=120&&S.length>=120)?new Tn(g&&S):r}S=e[0];var A=-1,C=v[0];e:for(;++A-1;)v!==e&&Xt.call(v,b,1),Xt.call(e,b,1);return e}function Hf(e,n){for(var t=e?n.length:0,o=t-1;t--;){var s=n[t];if(t==o||s!==d){var d=s;cn(s)?Xt.call(e,s,1):cu(e,s)}}return e}function fu(e,n){return e+Qt(Sf()*(n-e+1))}function t1(e,n,t,o){for(var s=-1,d=ge(Jt((n-e)/(t||1)),0),g=E(d);d--;)g[o?d:++s]=e,e+=t;return g}function su(e,n){var t="";if(!e||n<1||n>gn)return t;do n%2&&(t+=e),n=Qt(n/2),n&&(e+=e);while(n);return t}function z(e,n){return Su(Es(e,n,Ae),e+"")}function r1(e){return Cf(Qn(e))}function i1(e,n){var t=Qn(e);return _r(t,Ln(n,0,t.length))}function mt(e,n,t,o){if(!oe(e))return e;n=En(n,e);for(var s=-1,d=n.length,g=d-1,v=e;v!=null&&++ss?0:s+n),t=t>s?s:t,t<0&&(t+=s),s=n>t?0:t-n>>>0,n>>>=0;for(var d=E(s);++o>>1,g=e[d];g!==null&&!Le(g)&&(t?g<=n:g=f){var I=n?null:m1(e);if(I)return Gt(I);g=!1,s=ft,b=new Tn}else b=n?[]:v;e:for(;++o=o?e:qe(e,n,t)}var Qf=K_||function(e){return ve.clearTimeout(e)};function es(e,n){if(n)return e.slice();var t=e.length,o=yf?yf(t):new e.constructor(t);return e.copy(o),o}function gu(e){var n=new e.constructor(e.byteLength);return new Vt(n).set(new Vt(e)),n}function s1(e,n){var t=n?gu(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.byteLength)}function l1(e){var n=new e.constructor(e.source,Fa.exec(e));return n.lastIndex=e.lastIndex,n}function c1(e){return dt?ne(dt.call(e)):{}}function ns(e,n){var t=n?gu(e.buffer):e.buffer;return new e.constructor(t,e.byteOffset,e.length)}function ts(e,n){if(e!==n){var t=e!==r,o=e===null,s=e===e,d=Le(e),g=n!==r,v=n===null,b=n===n,I=Le(n);if(!v&&!I&&!d&&e>n||d&&g&&b&&!v&&!I||o&&g&&b||!t&&b||!s)return 1;if(!o&&!d&&!I&&e=v)return b;var I=t[o];return b*(I=="desc"?-1:1)}}return e.index-n.index}function rs(e,n,t,o){for(var s=-1,d=e.length,g=t.length,v=-1,b=n.length,I=ge(d-g,0),S=E(b+I),A=!o;++v1?t[s-1]:r,g=s>2?t[2]:r;for(d=e.length>3&&typeof d=="function"?(s--,d):r,g&&Ee(t[0],t[1],g)&&(d=s<3?r:d,s=1),n=ne(n);++o-1?s[d?n[g]:g]:r}}function ss(e){return ln(function(n){var t=n.length,o=t,s=We.prototype.thru;for(e&&n.reverse();o--;){var d=n[o];if(typeof d!="function")throw new De(c);if(s&&!g&&pr(d)=="wrapper")var g=new We([],!0)}for(o=g?o:t;++o1&&V.reverse(),S&&bv))return!1;var I=d.get(e),S=d.get(n);if(I&&S)return I==n&&S==e;var A=-1,C=!0,N=t&K?new Tn:r;for(d.set(e,n),d.set(n,e);++A1?"& ":"")+n[o],n=n.join(t>2?", ":" "),e.replace(Cg,`{ -/* [wrapped with `+n+`] */ -`)}function R1(e){return W(e)||Mn(e)||!!(Of&&e&&e[Of])}function cn(e,n){var t=typeof e;return n=n??gn,!!n&&(t=="number"||t!="symbol"&&Bg.test(e))&&e>-1&&e%1==0&&e0){if(++n>=rg)return arguments[0]}else n=0;return e.apply(r,arguments)}}function _r(e,n){var t=-1,o=e.length,s=o-1;for(n=n===r?o:n;++t1?e[n-1]:r;return t=typeof t=="function"?(e.pop(),t):r,$s(e,t)});function Ms(e){var n=h(e);return n.__chain__=!0,n}function W0(e,n){return n(e),e}function vr(e,n){return n(e)}var B0=ln(function(e){var n=e.length,t=n?e[0]:0,o=this.__wrapped__,s=function(d){return Qi(d,e)};return n>1||this.__actions__.length||!(o instanceof Y)||!cn(t)?this.thru(s):(o=o.slice(t,+t+(n?1:0)),o.__actions__.push({func:vr,args:[s],thisArg:r}),new We(o,this.__chain__).thru(function(d){return n&&!d.length&&d.push(r),d}))});function q0(){return Ms(this)}function G0(){return new We(this.value(),this.__chain__)}function U0(){this.__values__===r&&(this.__values__=Ks(this.value()));var e=this.__index__>=this.__values__.length,n=e?r:this.__values__[this.__index__++];return{done:e,value:n}}function z0(){return this}function j0(e){for(var n,t=this;t instanceof tr;){var o=Rs(t);o.__index__=0,o.__values__=r,n?s.__wrapped__=o:n=o;var s=o;t=t.__wrapped__}return s.__wrapped__=e,n}function H0(){var e=this.__wrapped__;if(e instanceof Y){var n=e;return this.__actions__.length&&(n=new Y(this)),n=n.reverse(),n.__actions__.push({func:vr,args:[Au],thisArg:r}),new We(n,this.__chain__)}return this.thru(Au)}function Y0(){return Zf(this.__wrapped__,this.__actions__)}var V0=sr(function(e,n,t){Q.call(e,t)?++e[t]:fn(e,t,1)});function K0(e,n,t){var o=W(e)?lf:Wv;return t&&Ee(e,n,t)&&(n=r),o(e,$(n,3))}function X0(e,n){var t=W(e)?_n:$f;return t(e,$(n,3))}var Z0=fs(Cs),J0=fs(Ts);function Q0(e,n){return me(mr(e,n),1)}function em(e,n){return me(mr(e,n),Sn)}function nm(e,n,t){return t=t===r?1:q(t),me(mr(e,n),t)}function Fs(e,n){var t=W(e)?ke:bn;return t(e,$(n,3))}function ks(e,n){var t=W(e)?b_:Pf;return t(e,$(n,3))}var tm=sr(function(e,n,t){Q.call(e,t)?e[t].push(n):fn(e,t,[n])});function rm(e,n,t,o){e=Ie(e)?e:Qn(e),t=t&&!o?q(t):0;var s=e.length;return t<0&&(t=ge(s+t,0)),xr(e)?t<=s&&e.indexOf(n,t)>-1:!!s&&qn(e,n,t)>-1}var im=z(function(e,n,t){var o=-1,s=typeof n=="function",d=Ie(e)?E(e.length):[];return bn(e,function(g){d[++o]=s?Re(n,g,t):_t(g,n,t)}),d}),um=sr(function(e,n,t){fn(e,t,n)});function mr(e,n){var t=W(e)?ue:Bf;return t(e,$(n,3))}function om(e,n,t,o){return e==null?[]:(W(n)||(n=n==null?[]:[n]),t=o?r:t,W(t)||(t=t==null?[]:[t]),zf(e,n,t))}var am=sr(function(e,n,t){e[t?0:1].push(n)},function(){return[[],[]]});function fm(e,n,t){var o=W(e)?Bi:pf,s=arguments.length<3;return o(e,$(n,4),t,s,bn)}function sm(e,n,t){var o=W(e)?y_:pf,s=arguments.length<3;return o(e,$(n,4),t,s,Pf)}function lm(e,n){var t=W(e)?_n:$f;return t(e,yr($(n,3)))}function cm(e){var n=W(e)?Cf:r1;return n(e)}function hm(e,n,t){(t?Ee(e,n,t):n===r)?n=1:n=q(n);var o=W(e)?$v:i1;return o(e,n)}function dm(e){var n=W(e)?Mv:o1;return n(e)}function pm(e){if(e==null)return 0;if(Ie(e))return xr(e)?Un(e):e.length;var n=be(e);return n==He||n==Ye?e.size:uu(e).length}function gm(e,n,t){var o=W(e)?qi:a1;return t&&Ee(e,n,t)&&(n=r),o(e,$(n,3))}var _m=z(function(e,n){if(e==null)return[];var t=n.length;return t>1&&Ee(e,n[0],n[1])?n=[]:t>2&&Ee(n[0],n[1],n[2])&&(n=[n[0]]),zf(e,me(n,1),[])}),wr=X_||function(){return ve.Date.now()};function vm(e,n){if(typeof n!="function")throw new De(c);return e=q(e),function(){if(--e<1)return n.apply(this,arguments)}}function Ds(e,n,t){return n=t?r:n,n=e&&n==null?e.length:n,sn(e,re,r,r,r,r,n)}function Ws(e,n){var t;if(typeof n!="function")throw new De(c);return e=q(e),function(){return--e>0&&(t=n.apply(this,arguments)),e<=1&&(n=r),t}}var Cu=z(function(e,n,t){var o=k;if(t.length){var s=mn(t,Zn(Cu));o|=J}return sn(e,o,n,t,s)}),Bs=z(function(e,n,t){var o=k|ce;if(t.length){var s=mn(t,Zn(Bs));o|=J}return sn(n,o,e,t,s)});function qs(e,n,t){n=t?r:n;var o=sn(e,P,r,r,r,r,r,n);return o.placeholder=qs.placeholder,o}function Gs(e,n,t){n=t?r:n;var o=sn(e,H,r,r,r,r,r,n);return o.placeholder=Gs.placeholder,o}function Us(e,n,t){var o,s,d,g,v,b,I=0,S=!1,A=!1,C=!0;if(typeof e!="function")throw new De(c);n=Ue(n)||0,oe(t)&&(S=!!t.leading,A="maxWait"in t,d=A?ge(Ue(t.maxWait)||0,n):d,C="trailing"in t?!!t.trailing:C);function N(se){var Ze=o,pn=s;return o=s=r,I=se,g=e.apply(pn,Ze),g}function M(se){return I=se,v=yt(j,n),S?N(se):g}function U(se){var Ze=se-b,pn=se-I,fl=n-Ze;return A?we(fl,d-pn):fl}function F(se){var Ze=se-b,pn=se-I;return b===r||Ze>=n||Ze<0||A&&pn>=d}function j(){var se=wr();if(F(se))return V(se);v=yt(j,U(se))}function V(se){return v=r,C&&o?N(se):(o=s=r,g)}function Ne(){v!==r&&Qf(v),I=0,o=b=s=v=r}function xe(){return v===r?g:V(wr())}function Pe(){var se=wr(),Ze=F(se);if(o=arguments,s=this,b=se,Ze){if(v===r)return M(b);if(A)return Qf(v),v=yt(j,n),N(b)}return v===r&&(v=yt(j,n)),g}return Pe.cancel=Ne,Pe.flush=xe,Pe}var mm=z(function(e,n){return Nf(e,1,n)}),wm=z(function(e,n,t){return Nf(e,Ue(n)||0,t)});function bm(e){return sn(e,bi)}function br(e,n){if(typeof e!="function"||n!=null&&typeof n!="function")throw new De(c);var t=function(){var o=arguments,s=n?n.apply(this,o):o[0],d=t.cache;if(d.has(s))return d.get(s);var g=e.apply(this,o);return t.cache=d.set(s,g)||d,g};return t.cache=new(br.Cache||an),t}br.Cache=an;function yr(e){if(typeof e!="function")throw new De(c);return function(){var n=arguments;switch(n.length){case 0:return!e.call(this);case 1:return!e.call(this,n[0]);case 2:return!e.call(this,n[0],n[1]);case 3:return!e.call(this,n[0],n[1],n[2])}return!e.apply(this,n)}}function ym(e){return Ws(2,e)}var Em=f1(function(e,n){n=n.length==1&&W(n[0])?ue(n[0],Ce($())):ue(me(n,1),Ce($()));var t=n.length;return z(function(o){for(var s=-1,d=we(o.length,t);++s=n}),Mn=kf(function(){return arguments}())?kf:function(e){return ae(e)&&Q.call(e,"callee")&&!xf.call(e,"callee")},W=E.isArray,km=rf?Ce(rf):jv;function Ie(e){return e!=null&&Er(e.length)&&!hn(e)}function fe(e){return ae(e)&&Ie(e)}function Dm(e){return e===!0||e===!1||ae(e)&&ye(e)==nt}var On=J_||qu,Wm=uf?Ce(uf):Hv;function Bm(e){return ae(e)&&e.nodeType===1&&!Et(e)}function qm(e){if(e==null)return!0;if(Ie(e)&&(W(e)||typeof e=="string"||typeof e.splice=="function"||On(e)||Jn(e)||Mn(e)))return!e.length;var n=be(e);if(n==He||n==Ye)return!e.size;if(bt(e))return!uu(e).length;for(var t in e)if(Q.call(e,t))return!1;return!0}function Gm(e,n){return vt(e,n)}function Um(e,n,t){t=typeof t=="function"?t:r;var o=t?t(e,n):r;return o===r?vt(e,n,r,t):!!o}function Lu(e){if(!ae(e))return!1;var n=ye(e);return n==$t||n==hg||typeof e.message=="string"&&typeof e.name=="string"&&!Et(e)}function zm(e){return typeof e=="number"&&If(e)}function hn(e){if(!oe(e))return!1;var n=ye(e);return n==Mt||n==La||n==cg||n==pg}function js(e){return typeof e=="number"&&e==q(e)}function Er(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=gn}function oe(e){var n=typeof e;return e!=null&&(n=="object"||n=="function")}function ae(e){return e!=null&&typeof e=="object"}var Hs=of?Ce(of):Vv;function jm(e,n){return e===n||iu(e,n,yu(n))}function Hm(e,n,t){return t=typeof t=="function"?t:r,iu(e,n,yu(n),t)}function Ym(e){return Ys(e)&&e!=+e}function Vm(e){if(L1(e))throw new D(l);return Df(e)}function Km(e){return e===null}function Xm(e){return e==null}function Ys(e){return typeof e=="number"||ae(e)&&ye(e)==rt}function Et(e){if(!ae(e)||ye(e)!=un)return!1;var n=Kt(e);if(n===null)return!0;var t=Q.call(n,"constructor")&&n.constructor;return typeof t=="function"&&t instanceof t&&jt.call(t)==H_}var Nu=af?Ce(af):Kv;function Zm(e){return js(e)&&e>=-gn&&e<=gn}var Vs=ff?Ce(ff):Xv;function xr(e){return typeof e=="string"||!W(e)&&ae(e)&&ye(e)==ut}function Le(e){return typeof e=="symbol"||ae(e)&&ye(e)==Ft}var Jn=sf?Ce(sf):Zv;function Jm(e){return e===r}function Qm(e){return ae(e)&&be(e)==ot}function ew(e){return ae(e)&&ye(e)==_g}var nw=dr(ou),tw=dr(function(e,n){return e<=n});function Ks(e){if(!e)return[];if(Ie(e))return xr(e)?Ve(e):Oe(e);if(st&&e[st])return $_(e[st]());var n=be(e),t=n==He?Yi:n==Ye?Gt:Qn;return t(e)}function dn(e){if(!e)return e===0?e:0;if(e=Ue(e),e===Sn||e===-Sn){var n=e<0?-1:1;return n*ag}return e===e?e:0}function q(e){var n=dn(e),t=n%1;return n===n?t?n-t:n:0}function Xs(e){return e?Ln(q(e),0,Je):0}function Ue(e){if(typeof e=="number")return e;if(Le(e))return Nt;if(oe(e)){var n=typeof e.valueOf=="function"?e.valueOf():e;e=oe(n)?n+"":n}if(typeof e!="string")return e===0?e:+e;e=gf(e);var t=kg.test(e);return t||Wg.test(e)?v_(e.slice(2),t?2:8):Fg.test(e)?Nt:+e}function Zs(e){return en(e,Se(e))}function rw(e){return e?Ln(q(e),-gn,gn):e===0?e:0}function Z(e){return e==null?"":Te(e)}var iw=Kn(function(e,n){if(bt(n)||Ie(n)){en(n,_e(n),e);return}for(var t in n)Q.call(n,t)&&pt(e,t,n[t])}),Js=Kn(function(e,n){en(n,Se(n),e)}),Or=Kn(function(e,n,t,o){en(n,Se(n),e,o)}),uw=Kn(function(e,n,t,o){en(n,_e(n),e,o)}),ow=ln(Qi);function aw(e,n){var t=Vn(e);return n==null?t:Tf(t,n)}var fw=z(function(e,n){e=ne(e);var t=-1,o=n.length,s=o>2?n[2]:r;for(s&&Ee(n[0],n[1],s)&&(o=1);++t1),d}),en(e,wu(e),t),o&&(t=Be(t,O|R|T,w1));for(var s=n.length;s--;)cu(t,n[s]);return t});function Sw(e,n){return el(e,yr($(n)))}var Aw=ln(function(e,n){return e==null?{}:e1(e,n)});function el(e,n){if(e==null)return{};var t=ue(wu(e),function(o){return[o]});return n=$(n),jf(e,t,function(o,s){return n(o,s[0])})}function Rw(e,n,t){n=En(n,e);var o=-1,s=n.length;for(s||(s=1,e=r);++on){var o=e;e=n,n=o}if(t||e%1||n%1){var s=Sf();return we(e+s*(n-e+__("1e-"+((s+"").length-1))),n)}return fu(e,n)}var Ww=Xn(function(e,n,t){return n=n.toLowerCase(),e+(t?rl(n):n)});function rl(e){return Mu(Z(e).toLowerCase())}function il(e){return e=Z(e),e&&e.replace(qg,C_).replace(o_,"")}function Bw(e,n,t){e=Z(e),n=Te(n);var o=e.length;t=t===r?o:Ln(q(t),0,o);var s=t;return t-=n.length,t>=0&&e.slice(t,s)==n}function qw(e){return e=Z(e),e&&yg.test(e)?e.replace($a,T_):e}function Gw(e){return e=Z(e),e&&Ag.test(e)?e.replace(Ti,"\\$&"):e}var Uw=Xn(function(e,n,t){return e+(t?"-":"")+n.toLowerCase()}),zw=Xn(function(e,n,t){return e+(t?" ":"")+n.toLowerCase()}),jw=as("toLowerCase");function Hw(e,n,t){e=Z(e),n=q(n);var o=n?Un(e):0;if(!n||o>=n)return e;var s=(n-o)/2;return hr(Qt(s),t)+e+hr(Jt(s),t)}function Yw(e,n,t){e=Z(e),n=q(n);var o=n?Un(e):0;return n&&o>>0,t?(e=Z(e),e&&(typeof n=="string"||n!=null&&!Nu(n))&&(n=Te(n),!n&&Gn(e))?xn(Ve(e),0,t):e.split(n,t)):[]}var eb=Xn(function(e,n,t){return e+(t?" ":"")+Mu(n)});function nb(e,n,t){return e=Z(e),t=t==null?0:Ln(q(t),0,e.length),n=Te(n),e.slice(t,t+n.length)==n}function tb(e,n,t){var o=h.templateSettings;t&&Ee(e,n,t)&&(n=r),e=Z(e),n=Or({},n,o,ps);var s=Or({},n.imports,o.imports,ps),d=_e(s),g=Hi(s,d),v,b,I=0,S=n.interpolate||kt,A="__p += '",C=Vi((n.escape||kt).source+"|"+S.source+"|"+(S===Ma?Mg:kt).source+"|"+(n.evaluate||kt).source+"|$","g"),N="//# sourceURL="+(Q.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++c_+"]")+` -`;e.replace(C,function(F,j,V,Ne,xe,Pe){return V||(V=Ne),A+=e.slice(I,Pe).replace(Gg,L_),j&&(v=!0,A+=`' + -__e(`+j+`) + -'`),xe&&(b=!0,A+=`'; -`+xe+`; -__p += '`),V&&(A+=`' + -((__t = (`+V+`)) == null ? '' : __t) + -'`),I=Pe+F.length,F}),A+=`'; -`;var M=Q.call(n,"variable")&&n.variable;if(!M)A=`with (obj) { -`+A+` -} -`;else if(Pg.test(M))throw new D(p);A=(b?A.replace(vg,""):A).replace(mg,"$1").replace(wg,"$1;"),A="function("+(M||"obj")+`) { -`+(M?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(v?", __e = _.escape":"")+(b?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+A+`return __p -}`;var U=ol(function(){return X(d,N+"return "+A).apply(r,g)});if(U.source=A,Lu(U))throw U;return U}function rb(e){return Z(e).toLowerCase()}function ib(e){return Z(e).toUpperCase()}function ub(e,n,t){if(e=Z(e),e&&(t||n===r))return gf(e);if(!e||!(n=Te(n)))return e;var o=Ve(e),s=Ve(n),d=_f(o,s),g=vf(o,s)+1;return xn(o,d,g).join("")}function ob(e,n,t){if(e=Z(e),e&&(t||n===r))return e.slice(0,wf(e)+1);if(!e||!(n=Te(n)))return e;var o=Ve(e),s=vf(o,Ve(n))+1;return xn(o,0,s).join("")}function ab(e,n,t){if(e=Z(e),e&&(t||n===r))return e.replace(Li,"");if(!e||!(n=Te(n)))return e;var o=Ve(e),s=_f(o,Ve(n));return xn(o,s).join("")}function fb(e,n){var t=ng,o=tg;if(oe(n)){var s="separator"in n?n.separator:s;t="length"in n?q(n.length):t,o="omission"in n?Te(n.omission):o}e=Z(e);var d=e.length;if(Gn(e)){var g=Ve(e);d=g.length}if(t>=d)return e;var v=t-Un(o);if(v<1)return o;var b=g?xn(g,0,v).join(""):e.slice(0,v);if(s===r)return b+o;if(g&&(v+=b.length-v),Nu(s)){if(e.slice(v).search(s)){var I,S=b;for(s.global||(s=Vi(s.source,Z(Fa.exec(s))+"g")),s.lastIndex=0;I=s.exec(S);)var A=I.index;b=b.slice(0,A===r?v:A)}}else if(e.indexOf(Te(s),v)!=v){var C=b.lastIndexOf(s);C>-1&&(b=b.slice(0,C))}return b+o}function sb(e){return e=Z(e),e&&bg.test(e)?e.replace(Pa,D_):e}var lb=Xn(function(e,n,t){return e+(t?" ":"")+n.toUpperCase()}),Mu=as("toUpperCase");function ul(e,n,t){return e=Z(e),n=t?r:n,n===r?P_(e)?q_(e):O_(e):e.match(n)||[]}var ol=z(function(e,n){try{return Re(e,r,n)}catch(t){return Lu(t)?t:new D(t)}}),cb=ln(function(e,n){return ke(n,function(t){t=nn(t),fn(e,t,Cu(e[t],e))}),e});function hb(e){var n=e==null?0:e.length,t=$();return e=n?ue(e,function(o){if(typeof o[1]!="function")throw new De(c);return[t(o[0]),o[1]]}):[],z(function(o){for(var s=-1;++sgn)return[];var t=Je,o=we(e,Je);n=$(n),e-=Je;for(var s=ji(o,n);++t0||n<0)?new Y(t):(e<0?t=t.takeRight(-e):e&&(t=t.drop(e)),n!==r&&(n=q(n),t=n<0?t.dropRight(-n):t.take(n-e)),t)},Y.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},Y.prototype.toArray=function(){return this.take(Je)},Qe(Y.prototype,function(e,n){var t=/^(?:filter|find|map|reject)|While$/.test(n),o=/^(?:head|last)$/.test(n),s=h[o?"take"+(n=="last"?"Right":""):n],d=o||/^find/.test(n);s&&(h.prototype[n]=function(){var g=this.__wrapped__,v=o?[1]:arguments,b=g instanceof Y,I=v[0],S=b||W(g),A=function(j){var V=s.apply(h,vn([j],v));return o&&C?V[0]:V};S&&t&&typeof I=="function"&&I.length!=1&&(b=S=!1);var C=this.__chain__,N=!!this.__actions__.length,M=d&&!C,U=b&&!N;if(!d&&S){g=U?g:new Y(this);var F=e.apply(g,v);return F.__actions__.push({func:vr,args:[A],thisArg:r}),new We(F,C)}return M&&U?e.apply(this,v):(F=this.thru(A),M?o?F.value()[0]:F.value():F)})}),ke(["pop","push","shift","sort","splice","unshift"],function(e){var n=Ut[e],t=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",o=/^(?:pop|shift)$/.test(e);h.prototype[e]=function(){var s=arguments;if(o&&!this.__chain__){var d=this.value();return n.apply(W(d)?d:[],s)}return this[t](function(g){return n.apply(W(g)?g:[],s)})}}),Qe(Y.prototype,function(e,n){var t=h[n];if(t){var o=t.name+"";Q.call(Yn,o)||(Yn[o]=[]),Yn[o].push({name:n,func:t})}}),Yn[lr(r,ce).name]=[{name:"wrapper",func:r}],Y.prototype.clone=sv,Y.prototype.reverse=lv,Y.prototype.value=cv,h.prototype.at=B0,h.prototype.chain=q0,h.prototype.commit=G0,h.prototype.next=U0,h.prototype.plant=j0,h.prototype.reverse=H0,h.prototype.toJSON=h.prototype.valueOf=h.prototype.value=Y0,h.prototype.first=h.prototype.head,st&&(h.prototype[st]=z0),h},zn=G_();An?((An.exports=zn)._=zn,ki._=zn):ve._=zn}).call(ze)}(Rt,Rt.exports);var Ct=Rt.exports,np=function(){},tp=np(),Fn=function(i){return i!==tp&&i!==null},rp=Fn,ip=Array.prototype.forEach,up=Object.create,op=function(i,u){var r;for(r in i)u[r]=i[r]},ap=function(i){var u=up(null);return ip.call(arguments,function(r){rp(r)&&op(Object(r),u)}),u},fp=function(){var i=Math.sign;return typeof i!="function"?!1:i(10)===1&&i(-20)===-1},Dr,Uo;function sp(){return Uo||(Uo=1,Dr=function(i){return i=Number(i),isNaN(i)||i===0?i:i>0?1:-1}),Dr}var lp=fp()?Math.sign:sp(),cp=lp,hp=Math.abs,dp=Math.floor,pp=function(i){return isNaN(i)?0:(i=Number(i),i===0||!isFinite(i)?i:cp(i)*dp(hp(i)))},gp=pp,_p=Math.max,zo=function(i){return _p(0,gp(i))},jo=function(i){if(typeof i!="function")throw new TypeError(i+" is not a function");return i},vp=Fn,Wr=function(i){if(!vp(i))throw new TypeError("Cannot use null or undefined");return i},mp={exports:{}},Br,Ho;function wp(){return Ho||(Ho=1,Br=function(){var i=Object.assign,u;return typeof i!="function"?!1:(u={foo:"raz"},i(u,{bar:"dwa"},{trzy:"trzy"}),u.foo+u.bar+u.trzy==="razdwatrzy")}),Br}var qr,Yo;function bp(){return Yo||(Yo=1,qr=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),qr}var Gr,Vo;function yp(){if(Vo)return Gr;Vo=1;var i=Fn,u=Object.keys;return Gr=function(r){return u(i(r)?Object(r):r)},Gr}var Ur,Ko;function Ep(){return Ko||(Ko=1,Ur=bp()()?Object.keys:yp()),Ur}var zr,Xo;function xp(){if(Xo)return zr;Xo=1;var i=Ep(),u=Wr,r=Math.max;return zr=function(a,f){var l,c,p=r(arguments.length,2),_;for(a=Object(u(a)),_=function(m){try{a[m]=f[m]}catch(y){l||(l=y)}},c=1;c-1},ei}var ni,sa;function Mp(){return sa||(sa=1,ni=Pp()()?String.prototype.contains:$p()),ni}var la;function kn(){if(la)return Yr.exports;la=1;var i=ta(),u=Np(),r=Jo(),a=ap,f=Mp(),l=Yr.exports=function(c,p){var _,m,y,O,R;return arguments.length<2||typeof c!="string"?(O=p,p=c,c=null):O=arguments[2],i(c)?(_=f.call(c,"c"),m=f.call(c,"e"),y=f.call(c,"w")):(_=y=!0,m=!1),R={value:p,configurable:_,enumerable:m,writable:y},O?r(a(O),R):R};return l.gs=function(c,p,_){var m,y,O,R;return typeof c!="string"?(O=_,_=p,p=c,c=null):O=arguments[3],i(p)?u(p)?i(_)?u(_)||(O=_,_=void 0):_=void 0:(O=p,p=_=void 0):p=void 0,i(c)?(m=f.call(c,"c"),y=f.call(c,"e")):(m=!0,y=!1),R={get:p,set:_,configurable:m,enumerable:y},O?r(a(O),R):R},Yr.exports}var ti={exports:{}};(function(i,u){var r=kn(),a=jo,f=Function.prototype.apply,l=Function.prototype.call,c=Object.create,p=Object.defineProperty,_=Object.defineProperties,m=Object.prototype.hasOwnProperty,y={configurable:!0,enumerable:!1,writable:!0},O,R,T,G,K,k,ce;O=function(B,P){var H;return a(P),m.call(this,"__ee__")?H=this.__ee__:(H=y.value=c(null),p(this,"__ee__",y),y.value=null),H[B]?typeof H[B]=="object"?H[B].push(P):H[B]=[H[B],P]:H[B]=P,this},R=function(B,P){var H,J;return a(P),J=this,O.call(this,B,H=function(){T.call(J,B,H),f.call(P,this,arguments)}),H.__eeOnceListener__=P,this},T=function(B,P){var H,J,ee,re;if(a(P),!m.call(this,"__ee__"))return this;if(H=this.__ee__,!H[B])return this;if(J=H[B],typeof J=="object")for(re=0;ee=J[re];++re)(ee===P||ee.__eeOnceListener__===P)&&(J.length===2?H[B]=J[re?0:1]:J.splice(re,1));else(J===P||J.__eeOnceListener__===P)&&delete H[B];return this},G=function(B){var P,H,J,ee,re;if(m.call(this,"__ee__")&&(ee=this.__ee__[B],!!ee))if(typeof ee=="object"){for(H=arguments.length,re=new Array(H-1),P=1;P=55296&&H<=56319&&(he+=R[++k])),he=T?m.call(T,G,he,ce):he,K?(y.value=he,O(B,ce,y)):B[ce]=he,++ce;P=ce}}if(P===void 0)for(P=a(R.length),K&&(B=new K(P)),k=0;kasync u=>{try{const r=await i(u);postMessage({result:r})}catch(r){postMessage({error:r})}};function Qp(i){const u={};return Ct.forEach(i==null?void 0:i.events,({id:r,pId:a})=>{u[r]=a}),u}function eg({trace:i,mode:u,orientation:r}){const a=new Go.graphlib.Graph;switch(a.setGraph({}),u){case"directed-graph":Ct.forEach(i==null?void 0:i.events,({id:f,pId:l,type:c},p)=>{f&&(a.hasNode(`${f}`)?a.node(`${f}`).size+=1:a.setNode(`${f}`,{label:`${f}`,width:1,height:1,size:1}),l&&a.hasNode(`${l}`)&&a.setEdge(`${f}`,`${l}`,{label:`${f}`,width:1,height:1}))});break;case"tree":{const f=Qp(i);Ct.forEach(i==null?void 0:i.events,({id:l,pId:c,type:p},_)=>{if(l){a.hasNode(`${l}`)?a.node(`${l}`).size+=1:a.setNode(`${l}`,{label:`${l}`,width:1,height:1,size:1});const m=f[l];m&&a.hasNode(`${m}`)&&a.setEdge(`${l}`,`${m}`,{label:`${l}`,width:1,height:1})}})}break}return a.setGraph({ranksep:100,align:"UL",rankdir:r==="horizontal"?"LR":"TB"}),Go.layout(a),a.nodes().map(f=>Ct.pick(a.node(f),"x","y","label","size"))}onmessage=Jp(async({data:i})=>eg(i))})(); diff --git a/assets/treeLegacy.worker-Cn1QySOo.js b/assets/treeLegacy.worker-Cn1QySOo.js new file mode 100644 index 0000000..443f65b --- /dev/null +++ b/assets/treeLegacy.worker-Cn1QySOo.js @@ -0,0 +1,27 @@ +(function(){"use strict";var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},_r={exports:{}};/** + * @license + * Lodash + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + */_r.exports,function(h,_){(function(){var f,q="4.17.21",C=200,M="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",x="Expected a function",b="Invalid `variable` option passed into `_.template`",y="__lodash_hash_undefined__",m=500,T="__lodash_placeholder__",W=1,S=2,B=4,on=1,Y=2,O=1,un=2,U=4,E=8,K=16,V=32,k=64,rn=128,hn=256,Xt=512,Ds=30,Us="...",Ns=800,$s=16,ff=1,Gs=2,Hs=3,me=1/0,ae=9007199254740991,zs=17976931348623157e292,mr=NaN,Xn=4294967295,Ks=Xn-1,Zs=Xn>>>1,Ys=[["ary",rn],["bind",O],["bindKey",un],["curry",E],["curryRight",K],["flip",Xt],["partial",V],["partialRight",k],["rearg",hn]],Pe="[object Arguments]",yr="[object Array]",Xs="[object AsyncFunction]",Ye="[object Boolean]",Xe="[object Date]",Js="[object DOMException]",xr="[object Error]",br="[object Function]",of="[object GeneratorFunction]",Gn="[object Map]",Je="[object Number]",Qs="[object Null]",jn="[object Object]",af="[object Promise]",Vs="[object Proxy]",Qe="[object RegExp]",Hn="[object Set]",Ve="[object String]",Ir="[object Symbol]",js="[object Undefined]",je="[object WeakMap]",ks="[object WeakSet]",ke="[object ArrayBuffer]",Le="[object DataView]",Jt="[object Float32Array]",Qt="[object Float64Array]",Vt="[object Int8Array]",jt="[object Int16Array]",kt="[object Int32Array]",ni="[object Uint8Array]",ei="[object Uint8ClampedArray]",ri="[object Uint16Array]",ti="[object Uint32Array]",nl=/\b__p \+= '';/g,el=/\b(__p \+=) '' \+/g,rl=/(__e\(.*?\)|\b__t\)) \+\n'';/g,sf=/&(?:amp|lt|gt|quot|#39);/g,lf=/[&<>"']/g,tl=RegExp(sf.source),il=RegExp(lf.source),ul=/<%-([\s\S]+?)%>/g,fl=/<%([\s\S]+?)%>/g,cf=/<%=([\s\S]+?)%>/g,ol=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,al=/^\w*$/,sl=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,ii=/[\\^$.*+?()[\]{}|]/g,ll=RegExp(ii.source),ui=/^\s+/,cl=/\s/,hl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,gl=/\{\n\/\* \[wrapped with (.+)\] \*/,pl=/,? & /,_l=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,dl=/[()=,{}\[\]\/\s]/,vl=/\\(\\)?/g,wl=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,hf=/\w*$/,ml=/^[-+]0x[0-9a-f]+$/i,yl=/^0b[01]+$/i,xl=/^\[object .+?Constructor\]$/,bl=/^0o[0-7]+$/i,Il=/^(?:0|[1-9]\d*)$/,Al=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Ar=/($^)/,Sl=/['\n\r\u2028\u2029\\]/g,Sr="\\ud800-\\udfff",Ol="\\u0300-\\u036f",Rl="\\ufe20-\\ufe2f",Tl="\\u20d0-\\u20ff",gf=Ol+Rl+Tl,pf="\\u2700-\\u27bf",_f="a-z\\xdf-\\xf6\\xf8-\\xff",El="\\xac\\xb1\\xd7\\xf7",Cl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Pl="\\u2000-\\u206f",Ll=" \\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",df="A-Z\\xc0-\\xd6\\xd8-\\xde",vf="\\ufe0e\\ufe0f",wf=El+Cl+Pl+Ll,fi="['’]",Fl="["+Sr+"]",mf="["+wf+"]",Or="["+gf+"]",yf="\\d+",ql="["+pf+"]",xf="["+_f+"]",bf="[^"+Sr+wf+yf+pf+_f+df+"]",oi="\\ud83c[\\udffb-\\udfff]",Wl="(?:"+Or+"|"+oi+")",If="[^"+Sr+"]",ai="(?:\\ud83c[\\udde6-\\uddff]){2}",si="[\\ud800-\\udbff][\\udc00-\\udfff]",Fe="["+df+"]",Af="\\u200d",Sf="(?:"+xf+"|"+bf+")",Ml="(?:"+Fe+"|"+bf+")",Of="(?:"+fi+"(?:d|ll|m|re|s|t|ve))?",Rf="(?:"+fi+"(?:D|LL|M|RE|S|T|VE))?",Tf=Wl+"?",Ef="["+vf+"]?",Bl="(?:"+Af+"(?:"+[If,ai,si].join("|")+")"+Ef+Tf+")*",Dl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Ul="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Cf=Ef+Tf+Bl,Nl="(?:"+[ql,ai,si].join("|")+")"+Cf,$l="(?:"+[If+Or+"?",Or,ai,si,Fl].join("|")+")",Gl=RegExp(fi,"g"),Hl=RegExp(Or,"g"),li=RegExp(oi+"(?="+oi+")|"+$l+Cf,"g"),zl=RegExp([Fe+"?"+xf+"+"+Of+"(?="+[mf,Fe,"$"].join("|")+")",Ml+"+"+Rf+"(?="+[mf,Fe+Sf,"$"].join("|")+")",Fe+"?"+Sf+"+"+Of,Fe+"+"+Rf,Ul,Dl,yf,Nl].join("|"),"g"),Kl=RegExp("["+Af+Sr+gf+vf+"]"),Zl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Yl=["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"],Xl=-1,tn={};tn[Jt]=tn[Qt]=tn[Vt]=tn[jt]=tn[kt]=tn[ni]=tn[ei]=tn[ri]=tn[ti]=!0,tn[Pe]=tn[yr]=tn[ke]=tn[Ye]=tn[Le]=tn[Xe]=tn[xr]=tn[br]=tn[Gn]=tn[Je]=tn[jn]=tn[Qe]=tn[Hn]=tn[Ve]=tn[je]=!1;var en={};en[Pe]=en[yr]=en[ke]=en[Le]=en[Ye]=en[Xe]=en[Jt]=en[Qt]=en[Vt]=en[jt]=en[kt]=en[Gn]=en[Je]=en[jn]=en[Qe]=en[Hn]=en[Ve]=en[Ir]=en[ni]=en[ei]=en[ri]=en[ti]=!0,en[xr]=en[br]=en[je]=!1;var Jl={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Ql={"&":"&","<":"<",">":">",'"':""","'":"'"},Vl={"&":"&","<":"<",">":">",""":'"',"'":"'"},jl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},kl=parseFloat,nc=parseInt,Pf=typeof we=="object"&&we&&we.Object===Object&&we,ec=typeof self=="object"&&self&&self.Object===Object&&self,dn=Pf||ec||Function("return this")(),ci=_&&!_.nodeType&&_,ye=ci&&!0&&h&&!h.nodeType&&h,Lf=ye&&ye.exports===ci,hi=Lf&&Pf.process,qn=function(){try{var l=ye&&ye.require&&ye.require("util").types;return l||hi&&hi.binding&&hi.binding("util")}catch{}}(),Ff=qn&&qn.isArrayBuffer,qf=qn&&qn.isDate,Wf=qn&&qn.isMap,Mf=qn&&qn.isRegExp,Bf=qn&&qn.isSet,Df=qn&&qn.isTypedArray;function Rn(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function rc(l,p,g,A){for(var D=-1,J=l==null?0:l.length;++D-1}function gi(l,p,g){for(var A=-1,D=l==null?0:l.length;++A-1;);return g}function Zf(l,p){for(var g=l.length;g--&&qe(p,l[g],0)>-1;);return g}function cc(l,p){for(var g=l.length,A=0;g--;)l[g]===p&&++A;return A}var hc=vi(Jl),gc=vi(Ql);function pc(l){return"\\"+jl[l]}function _c(l,p){return l==null?f:l[p]}function We(l){return Kl.test(l)}function dc(l){return Zl.test(l)}function vc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function xi(l){var p=-1,g=Array(l.size);return l.forEach(function(A,D){g[++p]=[D,A]}),g}function Yf(l,p){return function(g){return l(p(g))}}function ce(l,p){for(var g=-1,A=l.length,D=0,J=[];++g-1}function ih(n,e){var r=this.__data__,t=zr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}kn.prototype.clear=nh,kn.prototype.delete=eh,kn.prototype.get=rh,kn.prototype.has=th,kn.prototype.set=ih;function ne(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Dn(n,e,r,t,i,o){var a,s=e&W,c=e&S,d=e&B;if(r&&(a=i?r(n,t,i,o):r(n)),a!==f)return a;if(!an(n))return n;var v=N(n);if(v){if(a=ag(n),!s)return In(n,a)}else{var w=mn(n),I=w==br||w==of;if(ve(n))return Co(n,s);if(w==jn||w==Pe||I&&!i){if(a=c||I?{}:Jo(n),!s)return c?Vh(n,yh(a,n)):Qh(n,uo(a,n))}else{if(!en[w])return i?n:{};a=sg(n,w,s)}}o||(o=new Kn);var R=o.get(n);if(R)return R;o.set(n,a),Aa(n)?n.forEach(function(F){a.add(Dn(F,e,r,F,n,o))}):ba(n)&&n.forEach(function(F,z){a.set(z,Dn(F,e,r,z,n,o))});var L=d?c?Yi:Zi:c?Sn:_n,G=v?f:L(n);return Wn(G||n,function(F,z){G&&(z=F,F=n[z]),fr(a,z,Dn(F,e,r,z,n,o))}),a}function xh(n){var e=_n(n);return function(r){return fo(r,n,e)}}function fo(n,e,r){var t=r.length;if(n==null)return!t;for(n=nn(n);t--;){var i=r[t],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function oo(n,e,r){if(typeof n!="function")throw new Mn(x);return gr(function(){n.apply(f,r)},e)}function or(n,e,r,t){var i=-1,o=Rr,a=!0,s=n.length,c=[],d=e.length;if(!s)return c;r&&(e=fn(e,Tn(r))),t?(o=gi,a=!1):e.length>=C&&(o=nr,a=!1,e=new Ie(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:$(t),t<0&&(t+=i),t=r>t?0:Oa(t);r0&&r(s)?e>1?vn(s,e-1,r,t,i):le(i,s):t||(i[i.length]=s)}return i}var Ti=Mo(),lo=Mo(!0);function Jn(n,e){return n&&Ti(n,e,_n)}function Ei(n,e){return n&&lo(n,e,_n)}function Zr(n,e){return se(e,function(r){return ue(n[r])})}function Se(n,e){e=_e(e,n);for(var r=0,t=e.length;n!=null&&re}function Ah(n,e){return n!=null&&j.call(n,e)}function Sh(n,e){return n!=null&&e in nn(n)}function Oh(n,e,r){return n>=wn(e,r)&&n=120&&v.length>=120)?new Ie(a&&v):f}v=n[0];var w=-1,I=s[0];n:for(;++w-1;)s!==n&&Br.call(s,c,1),Br.call(n,c,1);return n}function bo(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;ie(i)?Br.call(n,i,1):Ui(n,i)}}return n}function Mi(n,e){return n+Nr(eo()*(e-n+1))}function Uh(n,e,r,t){for(var i=-1,o=pn(Ur((e-n)/(r||1)),0),a=g(o);o--;)a[t?o:++i]=n,n+=r;return a}function Bi(n,e){var r="";if(!n||e<1||e>ae)return r;do e%2&&(r+=n),e=Nr(e/2),e&&(n+=n);while(e);return r}function H(n,e){return nu(jo(n,e,On),n+"")}function Nh(n){return io(Ze(n))}function $h(n,e){var r=Ze(n);return tt(r,Ae(e,0,r.length))}function lr(n,e,r,t){if(!an(n))return n;e=_e(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,a=n[o];a!==null&&!Cn(a)&&(r?a<=e:a=C){var d=e?null:eg(n);if(d)return Er(d);a=!1,i=nr,c=new Ie}else c=e?[]:s;n:for(;++t=t?n:Un(n,e,r)}var Eo=Lc||function(n){return dn.clearTimeout(n)};function Co(n,e){if(e)return n.slice();var r=n.length,t=Qf?Qf(r):new n.constructor(r);return n.copy(t),t}function Hi(n){var e=new n.constructor(n.byteLength);return new Wr(e).set(new Wr(n)),e}function Zh(n,e){var r=e?Hi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Yh(n){var e=new n.constructor(n.source,hf.exec(n));return e.lastIndex=n.lastIndex,e}function Xh(n){return ur?nn(ur.call(n)):{}}function Po(n,e){var r=e?Hi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function Lo(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=Cn(n),a=e!==f,s=e===null,c=e===e,d=Cn(e);if(!s&&!d&&!o&&n>e||o&&a&&c&&!s&&!d||t&&a&&c||!r&&c||!i)return 1;if(!t&&!o&&!d&&n=s)return c;var d=r[t];return c*(d=="desc"?-1:1)}}return n.index-e.index}function Fo(n,e,r,t){for(var i=-1,o=n.length,a=r.length,s=-1,c=e.length,d=pn(o-a,0),v=g(c+d),w=!t;++s1?r[i-1]:f,a=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(r[0],r[1],a)&&(o=i<3?f:o,i=1),e=nn(e);++t-1?i[o?e[a]:a]:f}}function Uo(n){return te(function(e){var r=e.length,t=r,i=Bn.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Mn(x);if(i&&!a&&et(o)=="wrapper")var a=new Bn([],!0)}for(t=a?t:r;++t1&&X.reverse(),v&&cs))return!1;var d=o.get(n),v=o.get(e);if(d&&v)return d==e&&v==n;var w=-1,I=!0,R=r&Y?new Ie:f;for(o.set(n,e),o.set(e,n);++w1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(hl,`{ +/* [wrapped with `+e+`] */ +`)}function cg(n){return N(n)||Te(n)||!!(kf&&n&&n[kf])}function ie(n,e){var r=typeof n;return e=e??ae,!!e&&(r=="number"||r!="symbol"&&Il.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Ns)return arguments[0]}else e=0;return n.apply(f,arguments)}}function tt(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,la(n,r)});function ca(n){var e=u(n);return e.__chain__=!0,e}function bp(n,e){return e(n),n}function it(n,e){return e(n)}var Ip=te(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return Ri(o,n)};return e>1||this.__actions__.length||!(t instanceof Z)||!ie(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:it,args:[i],thisArg:f}),new Bn(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function Ap(){return ca(this)}function Sp(){return new Bn(this.value(),this.__chain__)}function Op(){this.__values__===f&&(this.__values__=Sa(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function Rp(){return this}function Tp(n){for(var e,r=this;r instanceof Hr;){var t=ia(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function Ep(){var n=this.__wrapped__;if(n instanceof Z){var e=n;return this.__actions__.length&&(e=new Z(this)),e=e.reverse(),e.__actions__.push({func:it,args:[eu],thisArg:f}),new Bn(e,this.__chain__)}return this.thru(eu)}function Cp(){return Ro(this.__wrapped__,this.__actions__)}var Pp=Qr(function(n,e,r){j.call(n,r)?++n[r]:ee(n,r,1)});function Lp(n,e,r){var t=N(n)?Uf:bh;return r&&xn(n,e,r)&&(e=f),t(n,P(e,3))}function Fp(n,e){var r=N(n)?se:so;return r(n,P(e,3))}var qp=Do(ua),Wp=Do(fa);function Mp(n,e){return vn(ut(n,e),1)}function Bp(n,e){return vn(ut(n,e),me)}function Dp(n,e,r){return r=r===f?1:$(r),vn(ut(n,e),r)}function ha(n,e){var r=N(n)?Wn:ge;return r(n,P(e,3))}function ga(n,e){var r=N(n)?tc:ao;return r(n,P(e,3))}var Up=Qr(function(n,e,r){j.call(n,r)?n[r].push(e):ee(n,r,[e])});function Np(n,e,r,t){n=An(n)?n:Ze(n),r=r&&!t?$(r):0;var i=n.length;return r<0&&(r=pn(i+r,0)),lt(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&qe(n,e,r)>-1}var $p=H(function(n,e,r){var t=-1,i=typeof e=="function",o=An(n)?g(n.length):[];return ge(n,function(a){o[++t]=i?Rn(e,a,r):ar(a,e,r)}),o}),Gp=Qr(function(n,e,r){ee(n,r,e)});function ut(n,e){var r=N(n)?fn:_o;return r(n,P(e,3))}function Hp(n,e,r,t){return n==null?[]:(N(e)||(e=e==null?[]:[e]),r=t?f:r,N(r)||(r=r==null?[]:[r]),yo(n,e,r))}var zp=Qr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Kp(n,e,r){var t=N(n)?pi:Hf,i=arguments.length<3;return t(n,P(e,4),r,i,ge)}function Zp(n,e,r){var t=N(n)?ic:Hf,i=arguments.length<3;return t(n,P(e,4),r,i,ao)}function Yp(n,e){var r=N(n)?se:so;return r(n,at(P(e,3)))}function Xp(n){var e=N(n)?io:Nh;return e(n)}function Jp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=$(e);var t=N(n)?vh:$h;return t(n,e)}function Qp(n){var e=N(n)?wh:Hh;return e(n)}function Vp(n){if(n==null)return 0;if(An(n))return lt(n)?Me(n):n.length;var e=mn(n);return e==Gn||e==Hn?n.size:Fi(n).length}function jp(n,e,r){var t=N(n)?_i:zh;return r&&xn(n,e,r)&&(e=f),t(n,P(e,3))}var kp=H(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),yo(n,vn(e,1),[])}),ft=Fc||function(){return dn.Date.now()};function n_(n,e){if(typeof e!="function")throw new Mn(x);return n=$(n),function(){if(--n<1)return e.apply(this,arguments)}}function pa(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,re(n,rn,f,f,f,f,e)}function _a(n,e){var r;if(typeof e!="function")throw new Mn(x);return n=$(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var tu=H(function(n,e,r){var t=O;if(r.length){var i=ce(r,ze(tu));t|=V}return re(n,t,e,r,i)}),da=H(function(n,e,r){var t=O|un;if(r.length){var i=ce(r,ze(da));t|=V}return re(e,t,n,r,i)});function va(n,e,r){e=r?f:e;var t=re(n,E,f,f,f,f,f,e);return t.placeholder=va.placeholder,t}function wa(n,e,r){e=r?f:e;var t=re(n,K,f,f,f,f,f,e);return t.placeholder=wa.placeholder,t}function ma(n,e,r){var t,i,o,a,s,c,d=0,v=!1,w=!1,I=!0;if(typeof n!="function")throw new Mn(x);e=$n(e)||0,an(r)&&(v=!!r.leading,w="maxWait"in r,o=w?pn($n(r.maxWait)||0,e):o,I="trailing"in r?!!r.trailing:I);function R(cn){var Yn=t,oe=i;return t=i=f,d=cn,a=n.apply(oe,Yn),a}function L(cn){return d=cn,s=gr(z,e),v?R(cn):a}function G(cn){var Yn=cn-c,oe=cn-d,Da=e-Yn;return w?wn(Da,o-oe):Da}function F(cn){var Yn=cn-c,oe=cn-d;return c===f||Yn>=e||Yn<0||w&&oe>=o}function z(){var cn=ft();if(F(cn))return X(cn);s=gr(z,G(cn))}function X(cn){return s=f,I&&t?R(cn):(t=i=f,a)}function Pn(){s!==f&&Eo(s),d=0,t=c=i=s=f}function bn(){return s===f?a:X(ft())}function Ln(){var cn=ft(),Yn=F(cn);if(t=arguments,i=this,c=cn,Yn){if(s===f)return L(c);if(w)return Eo(s),s=gr(z,e),R(c)}return s===f&&(s=gr(z,e)),a}return Ln.cancel=Pn,Ln.flush=bn,Ln}var e_=H(function(n,e){return oo(n,1,e)}),r_=H(function(n,e,r){return oo(n,$n(e)||0,r)});function t_(n){return re(n,Xt)}function ot(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Mn(x);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=n.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(ot.Cache||ne),r}ot.Cache=ne;function at(n){if(typeof n!="function")throw new Mn(x);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function i_(n){return _a(2,n)}var u_=Kh(function(n,e){e=e.length==1&&N(e[0])?fn(e[0],Tn(P())):fn(vn(e,1),Tn(P()));var r=e.length;return H(function(t){for(var i=-1,o=wn(t.length,r);++i=e}),Te=ho(function(){return arguments}())?ho:function(n){return sn(n)&&j.call(n,"callee")&&!jf.call(n,"callee")},N=g.isArray,y_=Ff?Tn(Ff):Th;function An(n){return n!=null&&st(n.length)&&!ue(n)}function ln(n){return sn(n)&&An(n)}function x_(n){return n===!0||n===!1||sn(n)&&yn(n)==Ye}var ve=Wc||_u,b_=qf?Tn(qf):Eh;function I_(n){return sn(n)&&n.nodeType===1&&!pr(n)}function A_(n){if(n==null)return!0;if(An(n)&&(N(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||Ke(n)||Te(n)))return!n.length;var e=mn(n);if(e==Gn||e==Hn)return!n.size;if(hr(n))return!Fi(n).length;for(var r in n)if(j.call(n,r))return!1;return!0}function S_(n,e){return sr(n,e)}function O_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?sr(n,e,f,r):!!t}function uu(n){if(!sn(n))return!1;var e=yn(n);return e==xr||e==Js||typeof n.message=="string"&&typeof n.name=="string"&&!pr(n)}function R_(n){return typeof n=="number"&&no(n)}function ue(n){if(!an(n))return!1;var e=yn(n);return e==br||e==of||e==Xs||e==Vs}function xa(n){return typeof n=="number"&&n==$(n)}function st(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function an(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function sn(n){return n!=null&&typeof n=="object"}var ba=Wf?Tn(Wf):Ph;function T_(n,e){return n===e||Li(n,e,Ji(e))}function E_(n,e,r){return r=typeof r=="function"?r:f,Li(n,e,Ji(e),r)}function C_(n){return Ia(n)&&n!=+n}function P_(n){if(pg(n))throw new D(M);return go(n)}function L_(n){return n===null}function F_(n){return n==null}function Ia(n){return typeof n=="number"||sn(n)&&yn(n)==Je}function pr(n){if(!sn(n)||yn(n)!=jn)return!1;var e=Mr(n);if(e===null)return!0;var r=j.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Lr.call(r)==Ec}var fu=Mf?Tn(Mf):Lh;function q_(n){return xa(n)&&n>=-ae&&n<=ae}var Aa=Bf?Tn(Bf):Fh;function lt(n){return typeof n=="string"||!N(n)&&sn(n)&&yn(n)==Ve}function Cn(n){return typeof n=="symbol"||sn(n)&&yn(n)==Ir}var Ke=Df?Tn(Df):qh;function W_(n){return n===f}function M_(n){return sn(n)&&mn(n)==je}function B_(n){return sn(n)&&yn(n)==ks}var D_=nt(qi),U_=nt(function(n,e){return n<=e});function Sa(n){if(!n)return[];if(An(n))return lt(n)?zn(n):In(n);if(er&&n[er])return vc(n[er]());var e=mn(n),r=e==Gn?xi:e==Hn?Er:Ze;return r(n)}function fe(n){if(!n)return n===0?n:0;if(n=$n(n),n===me||n===-me){var e=n<0?-1:1;return e*zs}return n===n?n:0}function $(n){var e=fe(n),r=e%1;return e===e?r?e-r:e:0}function Oa(n){return n?Ae($(n),0,Xn):0}function $n(n){if(typeof n=="number")return n;if(Cn(n))return mr;if(an(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=an(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=zf(n);var r=yl.test(n);return r||bl.test(n)?nc(n.slice(2),r?2:8):ml.test(n)?mr:+n}function Ra(n){return Qn(n,Sn(n))}function N_(n){return n?Ae($(n),-ae,ae):n===0?n:0}function Q(n){return n==null?"":En(n)}var $_=Ge(function(n,e){if(hr(e)||An(e)){Qn(e,_n(e),n);return}for(var r in e)j.call(e,r)&&fr(n,r,e[r])}),Ta=Ge(function(n,e){Qn(e,Sn(e),n)}),ct=Ge(function(n,e,r,t){Qn(e,Sn(e),n,t)}),G_=Ge(function(n,e,r,t){Qn(e,_n(e),n,t)}),H_=te(Ri);function z_(n,e){var r=$e(n);return e==null?r:uo(r,e)}var K_=H(function(n,e){n=nn(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Qn(n,Yi(n),r),t&&(r=Dn(r,W|S|B,rg));for(var i=e.length;i--;)Ui(r,e[i]);return r});function sd(n,e){return Ca(n,at(P(e)))}var ld=te(function(n,e){return n==null?{}:Bh(n,e)});function Ca(n,e){if(n==null)return{};var r=fn(Yi(n),function(t){return[t]});return e=P(e),xo(n,r,function(t,i){return e(t,i[0])})}function cd(n,e,r){e=_e(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=eo();return wn(n+i*(e-n+kl("1e-"+((i+"").length-1))),e)}return Mi(n,e)}var bd=He(function(n,e,r){return e=e.toLowerCase(),n+(r?Fa(e):e)});function Fa(n){return su(Q(n).toLowerCase())}function qa(n){return n=Q(n),n&&n.replace(Al,hc).replace(Hl,"")}function Id(n,e,r){n=Q(n),e=En(e);var t=n.length;r=r===f?t:Ae($(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function Ad(n){return n=Q(n),n&&il.test(n)?n.replace(lf,gc):n}function Sd(n){return n=Q(n),n&&ll.test(n)?n.replace(ii,"\\$&"):n}var Od=He(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),Rd=He(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),Td=Bo("toLowerCase");function Ed(n,e,r){n=Q(n),e=$(e);var t=e?Me(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return kr(Nr(i),r)+n+kr(Ur(i),r)}function Cd(n,e,r){n=Q(n),e=$(e);var t=e?Me(n):0;return e&&t>>0,r?(n=Q(n),n&&(typeof e=="string"||e!=null&&!fu(e))&&(e=En(e),!e&&We(n))?de(zn(n),0,r):n.split(e,r)):[]}var Bd=He(function(n,e,r){return n+(r?" ":"")+su(e)});function Dd(n,e,r){return n=Q(n),r=r==null?0:Ae($(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function Ud(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=Q(n),e=ct({},e,t,zo);var i=ct({},e.imports,t.imports,zo),o=_n(i),a=yi(i,o),s,c,d=0,v=e.interpolate||Ar,w="__p += '",I=bi((e.escape||Ar).source+"|"+v.source+"|"+(v===cf?wl:Ar).source+"|"+(e.evaluate||Ar).source+"|$","g"),R="//# sourceURL="+(j.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Xl+"]")+` +`;n.replace(I,function(F,z,X,Pn,bn,Ln){return X||(X=Pn),w+=n.slice(d,Ln).replace(Sl,pc),z&&(s=!0,w+=`' + +__e(`+z+`) + +'`),bn&&(c=!0,w+=`'; +`+bn+`; +__p += '`),X&&(w+=`' + +((__t = (`+X+`)) == null ? '' : __t) + +'`),d=Ln+F.length,F}),w+=`'; +`;var L=j.call(e,"variable")&&e.variable;if(!L)w=`with (obj) { +`+w+` +} +`;else if(dl.test(L))throw new D(b);w=(c?w.replace(nl,""):w).replace(el,"$1").replace(rl,"$1;"),w="function("+(L||"obj")+`) { +`+(L?"":`obj || (obj = {}); +`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; +function print() { __p += __j.call(arguments, '') } +`:`; +`)+w+`return __p +}`;var G=Ma(function(){return J(o,R+"return "+w).apply(f,a)});if(G.source=w,uu(G))throw G;return G}function Nd(n){return Q(n).toLowerCase()}function $d(n){return Q(n).toUpperCase()}function Gd(n,e,r){if(n=Q(n),n&&(r||e===f))return zf(n);if(!n||!(e=En(e)))return n;var t=zn(n),i=zn(e),o=Kf(t,i),a=Zf(t,i)+1;return de(t,o,a).join("")}function Hd(n,e,r){if(n=Q(n),n&&(r||e===f))return n.slice(0,Xf(n)+1);if(!n||!(e=En(e)))return n;var t=zn(n),i=Zf(t,zn(e))+1;return de(t,0,i).join("")}function zd(n,e,r){if(n=Q(n),n&&(r||e===f))return n.replace(ui,"");if(!n||!(e=En(e)))return n;var t=zn(n),i=Kf(t,zn(e));return de(t,i).join("")}function Kd(n,e){var r=Ds,t=Us;if(an(e)){var i="separator"in e?e.separator:i;r="length"in e?$(e.length):r,t="omission"in e?En(e.omission):t}n=Q(n);var o=n.length;if(We(n)){var a=zn(n);o=a.length}if(r>=o)return n;var s=r-Me(t);if(s<1)return t;var c=a?de(a,0,s).join(""):n.slice(0,s);if(i===f)return c+t;if(a&&(s+=c.length-s),fu(i)){if(n.slice(s).search(i)){var d,v=c;for(i.global||(i=bi(i.source,Q(hf.exec(i))+"g")),i.lastIndex=0;d=i.exec(v);)var w=d.index;c=c.slice(0,w===f?s:w)}}else if(n.indexOf(En(i),s)!=s){var I=c.lastIndexOf(i);I>-1&&(c=c.slice(0,I))}return c+t}function Zd(n){return n=Q(n),n&&tl.test(n)?n.replace(sf,xc):n}var Yd=He(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),su=Bo("toUpperCase");function Wa(n,e,r){return n=Q(n),e=r?f:e,e===f?dc(n)?Ac(n):oc(n):n.match(e)||[]}var Ma=H(function(n,e){try{return Rn(n,f,e)}catch(r){return uu(r)?r:new D(r)}}),Xd=te(function(n,e){return Wn(e,function(r){r=Vn(r),ee(n,r,tu(n[r],n))}),n});function Jd(n){var e=n==null?0:n.length,r=P();return n=e?fn(n,function(t){if(typeof t[1]!="function")throw new Mn(x);return[r(t[0]),t[1]]}):[],H(function(t){for(var i=-1;++iae)return[];var r=Xn,t=wn(n,Xn);e=P(e),n-=Xn;for(var i=mi(t,e);++r0||e<0)?new Z(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=$(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},Z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Z.prototype.toArray=function(){return this.take(Xn)},Jn(Z.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=t?[1]:arguments,c=a instanceof Z,d=s[0],v=c||N(a),w=function(z){var X=i.apply(u,le([z],s));return t&&I?X[0]:X};v&&r&&typeof d=="function"&&d.length!=1&&(c=v=!1);var I=this.__chain__,R=!!this.__actions__.length,L=o&&!I,G=c&&!R;if(!o&&v){a=G?a:new Z(this);var F=n.apply(a,s);return F.__actions__.push({func:it,args:[w],thisArg:f}),new Bn(F,I)}return L&&G?n.apply(this,s):(F=this.thru(w),L?t?F.value()[0]:F.value():F)})}),Wn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Cr[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(N(o)?o:[],i)}return this[r](function(a){return e.apply(N(a)?a:[],i)})}}),Jn(Z.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";j.call(Ne,t)||(Ne[t]=[]),Ne[t].push({name:e,func:r})}}),Ne[Vr(f,un).name]=[{name:"wrapper",func:f}],Z.prototype.clone=Zc,Z.prototype.reverse=Yc,Z.prototype.value=Xc,u.prototype.at=Ip,u.prototype.chain=Ap,u.prototype.commit=Sp,u.prototype.next=Op,u.prototype.plant=Tp,u.prototype.reverse=Ep,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=Cp,u.prototype.first=u.prototype.head,er&&(u.prototype[er]=Rp),u},Be=Sc();ye?((ye.exports=Be)._=Be,ci._=Be):dn._=Be}).call(we)}(_r,_r.exports);var Fn=_r.exports,du={};(function(h){var _=we&&we.__assign||function(){return(_=Object.assign||function(x){for(var b,y=1,m=arguments.length;y0?1:-1}),ht}var Xa=Za()?Math.sign:Ya(),Ja=Xa,Qa=Math.abs,Va=Math.floor,ja=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Ja(h)*Va(Qa(h)))},ka=ja,ns=Math.max,wu=function(h){return ns(0,ka(h))},mu=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},gt,yu;function dr(){if(yu)return gt;yu=1;var h=Ee;return gt=function(_){if(!h(_))throw new TypeError("Cannot use null or undefined");return _},gt}dr();var es={exports:{}},pt,xu;function rs(){return xu||(xu=1,pt=function(){var h=Object.assign,_;return typeof h!="function"?!1:(_={foo:"raz"},h(_,{bar:"dwa"},{trzy:"trzy"}),_.foo+_.bar+_.trzy==="razdwatrzy")}),pt}var _t,bu;function ts(){return bu||(bu=1,_t=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),_t}var dt,Iu;function is(){if(Iu)return dt;Iu=1;var h=Ee,_=Object.keys;return dt=function(f){return _(h(f)?Object(f):f)},dt}var vt,Au;function us(){return Au||(Au=1,vt=ts()()?Object.keys:is()),vt}var wt,Su;function fs(){if(Su)return wt;Su=1;var h=us(),_=dr(),f=Math.max;return wt=function(q,C){var M,x,b=f(arguments.length,2),y;for(q=Object(_(q)),y=function(m){try{q[m]=C[m]}catch(T){M||(M=T)}},x=1;x-1},Tt}var Et,Du;function ws(){return Du||(Du=1,Et=ds()()?String.prototype.contains:vs()),Et}var Uu;function Ce(){if(Uu)return xt.exports;Uu=1;var h=Pu(),_=_s(),f=Ru(),q=Ka,C=ws(),M=xt.exports=function(x,b){var y,m,T,W,S;return arguments.length<2||typeof x!="string"?(W=b,b=x,x=null):W=arguments[2],h(x)?(y=C.call(x,"c"),m=C.call(x,"e"),T=C.call(x,"w")):(y=T=!0,m=!1),S={value:b,configurable:y,enumerable:m,writable:T},W?f(q(W),S):S};return M.gs=function(x,b,y){var m,T,W,S;return typeof x!="string"?(W=y,y=b,b=x,x=null):W=arguments[3],h(b)?_(b)?h(y)?_(y)||(W=y,y=void 0):y=void 0:(W=b,b=y=void 0):b=void 0,h(x)?(m=C.call(x,"c"),T=C.call(x,"e")):(m=!0,T=!1),S={get:b,set:y,configurable:m,enumerable:T},W?f(q(W),S):S},xt.exports}var Ct={exports:{}};(function(h,_){var f=Ce(),q=mu,C=Function.prototype.apply,M=Function.prototype.call,x=Object.create,b=Object.defineProperty,y=Object.defineProperties,m=Object.prototype.hasOwnProperty,T={configurable:!0,enumerable:!1,writable:!0},W,S,B,on,Y,O,un;W=function(U,E){var K;return q(E),m.call(this,"__ee__")?K=this.__ee__:(K=T.value=x(null),b(this,"__ee__",T),T.value=null),K[U]?typeof K[U]=="object"?K[U].push(E):K[U]=[K[U],E]:K[U]=E,this},S=function(U,E){var K,V;return q(E),V=this,W.call(this,U,K=function(){B.call(V,U,K),C.call(E,this,arguments)}),K.__eeOnceListener__=E,this},B=function(U,E){var K,V,k,rn;if(q(E),!m.call(this,"__ee__"))return this;if(K=this.__ee__,!K[U])return this;if(V=K[U],typeof V=="object")for(rn=0;k=V[rn];++rn)(k===E||k.__eeOnceListener__===E)&&(V.length===2?K[U]=V[rn?0:1]:V.splice(rn,1));else(V===E||V.__eeOnceListener__===E)&&delete K[U];return this},on=function(U){var E,K,V,k,rn;if(m.call(this,"__ee__")&&(k=this.__ee__[U],!!k))if(typeof k=="object"){for(K=arguments.length,rn=new Array(K-1),E=1;E=55296&&K<=56319&&(hn+=S[++O])),hn=B?m.call(B,on,hn,un):hn,Y?(T.value=hn,W(U,un,T)):U[un]=hn,++un;E=un}}if(E===void 0)for(E=q(S.length),Y&&(U=new Y(E)),O=0;Oasync _=>{try{const f=await h(_);postMessage({result:f})}catch(f){postMessage({error:f})}};function Ms(h,_){const f=new Set([h.id]);let q=h,C=_;Fn.times(_,()=>{q.parent&&(q=q.parent,f.add(q.id),C-=1)});function M(y,m=C){return m>=0?Fn.forEach(y.children,T=>M(T,f.has(T.id)?m+1:m-1)):y.children=[],y}function x(y){const m=y.parent;return m?(m.children=[y],x(m)):y}const b=M(structuredClone(q));return x(b)}function Bs({trace:h,step:_=0,radius:f}){var x,b;function q(y){Fn.forEach(y.children,m=>{m.parent=y,q(m)})}function C(y,m){y(m),Fn.forEach(m.children,T=>C(y,T))}function M(y){var m;if((m=y.children)!=null&&m.length){Fn.forEach(y.children,M);const T=Fn.sumBy(y.children,"cumulativeChildCount");return y.cumulativeChildCount=T+y.children.length,y}else y.cumulativeChildCount=0;return y}if(h){const y=Fn.chain(h.events).map((S,B)=>({step:B,id:S.id,data:S,pId:S.pId})).groupBy("id").entries().map(([S,B])=>{var on,Y;return{id:S,name:S,events:B,pId:((on=Fn.find(B,O=>!!O.pId&&O.step<=_))==null?void 0:on.pId)||((Y=Fn.find(B,O=>!!O.pId))==null?void 0:Y.pId)}}).value(),m=du.arrayToTree(y,{dataField:null,parentId:"pId"});Fn.forEach(m,q);const T={};Fn.forEach(m,S=>C(B=>{B.id!==null&&B.id!==void 0&&(T[B.id]=B)},S)),Fn.forEach(m,M);const W=(b=(x=h==null?void 0:h.events)==null?void 0:x[_])==null?void 0:b.id;if(W&&f!==void 0){const S=T[W];return{tree:Ms(S,f)}}else return{tree:m}}}onmessage=Ws(async({data:h})=>Bs(h))})(); diff --git a/assets/treeLegacy.worker-DG30Do5a.js b/assets/treeLegacy.worker-DG30Do5a.js deleted file mode 100644 index 7a7facc..0000000 --- a/assets/treeLegacy.worker-DG30Do5a.js +++ /dev/null @@ -1,27 +0,0 @@ -(function(){"use strict";var we=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},dr={exports:{}};/** - * @license - * Lodash - * Copyright OpenJS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors - */dr.exports,function(h,v){(function(){var f,F="4.17.21",L=200,P="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",I="Expected a function",q="Invalid `variable` option passed into `_.template`",b="__lodash_hash_undefined__",m=500,B="__lodash_placeholder__",z=1,O=2,W=4,on=1,Y=2,A=1,un=2,U=4,T=8,K=16,V=32,j=64,rn=128,hn=256,Ut=512,Rs=30,Es="...",Cs=800,Ls=16,Nu=1,Ps=2,Fs=3,me=1/0,ae=9007199254740991,Ws=17976931348623157e292,mr=NaN,Xn=4294967295,Ms=Xn-1,Bs=Xn>>>1,Us=[["ary",rn],["bind",A],["bindKey",un],["curry",T],["curryRight",K],["flip",Ut],["partial",V],["partialRight",j],["rearg",hn]],Ce="[object Arguments]",yr="[object Array]",Ds="[object AsyncFunction]",Xe="[object Boolean]",Je="[object Date]",qs="[object DOMException]",xr="[object Error]",br="[object Function]",$u="[object GeneratorFunction]",Gn="[object Map]",Qe="[object Number]",Ns="[object Null]",kn="[object Object]",Gu="[object Promise]",$s="[object Proxy]",Ve="[object RegExp]",Hn="[object Set]",ke="[object String]",Ar="[object Symbol]",Gs="[object Undefined]",je="[object WeakMap]",Hs="[object WeakSet]",nr="[object ArrayBuffer]",Le="[object DataView]",Dt="[object Float32Array]",qt="[object Float64Array]",Nt="[object Int8Array]",$t="[object Int16Array]",Gt="[object Int32Array]",Ht="[object Uint8Array]",zt="[object Uint8ClampedArray]",Kt="[object Uint16Array]",Zt="[object Uint32Array]",zs=/\b__p \+= '';/g,Ks=/\b(__p \+=) '' \+/g,Zs=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Hu=/&(?:amp|lt|gt|quot|#39);/g,zu=/[&<>"']/g,Ys=RegExp(Hu.source),Xs=RegExp(zu.source),Js=/<%-([\s\S]+?)%>/g,Qs=/<%([\s\S]+?)%>/g,Ku=/<%=([\s\S]+?)%>/g,Vs=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,ks=/^\w*$/,js=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Yt=/[\\^$.*+?()[\]{}|]/g,nl=RegExp(Yt.source),Xt=/^\s+/,el=/\s/,rl=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,tl=/\{\n\/\* \[wrapped with (.+)\] \*/,il=/,? & /,ul=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,fl=/[()=,{}\[\]\/\s]/,ol=/\\(\\)?/g,al=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Zu=/\w*$/,sl=/^[-+]0x[0-9a-f]+$/i,ll=/^0b[01]+$/i,cl=/^\[object .+?Constructor\]$/,hl=/^0o[0-7]+$/i,gl=/^(?:0|[1-9]\d*)$/,pl=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sr=/($^)/,_l=/['\n\r\u2028\u2029\\]/g,Ir="\\ud800-\\udfff",dl="\\u0300-\\u036f",vl="\\ufe20-\\ufe2f",wl="\\u20d0-\\u20ff",Yu=dl+vl+wl,Xu="\\u2700-\\u27bf",Ju="a-z\\xdf-\\xf6\\xf8-\\xff",ml="\\xac\\xb1\\xd7\\xf7",yl="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",xl="\\u2000-\\u206f",bl=" \\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",Qu="A-Z\\xc0-\\xd6\\xd8-\\xde",Vu="\\ufe0e\\ufe0f",ku=ml+yl+xl+bl,Jt="['’]",Al="["+Ir+"]",ju="["+ku+"]",Tr="["+Yu+"]",nf="\\d+",Sl="["+Xu+"]",ef="["+Ju+"]",rf="[^"+Ir+ku+nf+Xu+Ju+Qu+"]",Qt="\\ud83c[\\udffb-\\udfff]",Il="(?:"+Tr+"|"+Qt+")",tf="[^"+Ir+"]",Vt="(?:\\ud83c[\\udde6-\\uddff]){2}",kt="[\\ud800-\\udbff][\\udc00-\\udfff]",Pe="["+Qu+"]",uf="\\u200d",ff="(?:"+ef+"|"+rf+")",Tl="(?:"+Pe+"|"+rf+")",of="(?:"+Jt+"(?:d|ll|m|re|s|t|ve))?",af="(?:"+Jt+"(?:D|LL|M|RE|S|T|VE))?",sf=Il+"?",lf="["+Vu+"]?",Ol="(?:"+uf+"(?:"+[tf,Vt,kt].join("|")+")"+lf+sf+")*",Rl="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",El="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",cf=lf+sf+Ol,Cl="(?:"+[Sl,Vt,kt].join("|")+")"+cf,Ll="(?:"+[tf+Tr+"?",Tr,Vt,kt,Al].join("|")+")",Pl=RegExp(Jt,"g"),Fl=RegExp(Tr,"g"),jt=RegExp(Qt+"(?="+Qt+")|"+Ll+cf,"g"),Wl=RegExp([Pe+"?"+ef+"+"+of+"(?="+[ju,Pe,"$"].join("|")+")",Tl+"+"+af+"(?="+[ju,Pe+ff,"$"].join("|")+")",Pe+"?"+ff+"+"+of,Pe+"+"+af,El,Rl,nf,Cl].join("|"),"g"),Ml=RegExp("["+uf+Ir+Yu+Vu+"]"),Bl=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,Ul=["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"],Dl=-1,tn={};tn[Dt]=tn[qt]=tn[Nt]=tn[$t]=tn[Gt]=tn[Ht]=tn[zt]=tn[Kt]=tn[Zt]=!0,tn[Ce]=tn[yr]=tn[nr]=tn[Xe]=tn[Le]=tn[Je]=tn[xr]=tn[br]=tn[Gn]=tn[Qe]=tn[kn]=tn[Ve]=tn[Hn]=tn[ke]=tn[je]=!1;var en={};en[Ce]=en[yr]=en[nr]=en[Le]=en[Xe]=en[Je]=en[Dt]=en[qt]=en[Nt]=en[$t]=en[Gt]=en[Gn]=en[Qe]=en[kn]=en[Ve]=en[Hn]=en[ke]=en[Ar]=en[Ht]=en[zt]=en[Kt]=en[Zt]=!0,en[xr]=en[br]=en[je]=!1;var ql={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},Nl={"&":"&","<":"<",">":">",'"':""","'":"'"},$l={"&":"&","<":"<",">":">",""":'"',"'":"'"},Gl={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},Hl=parseFloat,zl=parseInt,hf=typeof we=="object"&&we&&we.Object===Object&&we,Kl=typeof self=="object"&&self&&self.Object===Object&&self,dn=hf||Kl||Function("return this")(),ni=v&&!v.nodeType&&v,ye=ni&&!0&&h&&!h.nodeType&&h,gf=ye&&ye.exports===ni,ei=gf&&hf.process,Wn=function(){try{var l=ye&&ye.require&&ye.require("util").types;return l||ei&&ei.binding&&ei.binding("util")}catch{}}(),pf=Wn&&Wn.isArrayBuffer,_f=Wn&&Wn.isDate,df=Wn&&Wn.isMap,vf=Wn&&Wn.isRegExp,wf=Wn&&Wn.isSet,mf=Wn&&Wn.isTypedArray;function On(l,p,g){switch(g.length){case 0:return l.call(p);case 1:return l.call(p,g[0]);case 2:return l.call(p,g[0],g[1]);case 3:return l.call(p,g[0],g[1],g[2])}return l.apply(p,g)}function Zl(l,p,g,x){for(var M=-1,J=l==null?0:l.length;++M-1}function ri(l,p,g){for(var x=-1,M=l==null?0:l.length;++x-1;);return g}function Of(l,p){for(var g=l.length;g--&&Fe(p,l[g],0)>-1;);return g}function ec(l,p){for(var g=l.length,x=0;g--;)l[g]===p&&++x;return x}var rc=fi(ql),tc=fi(Nl);function ic(l){return"\\"+Gl[l]}function uc(l,p){return l==null?f:l[p]}function We(l){return Ml.test(l)}function fc(l){return Bl.test(l)}function oc(l){for(var p,g=[];!(p=l.next()).done;)g.push(p.value);return g}function li(l){var p=-1,g=Array(l.size);return l.forEach(function(x,M){g[++p]=[M,x]}),g}function Rf(l,p){return function(g){return l(p(g))}}function ce(l,p){for(var g=-1,x=l.length,M=0,J=[];++g-1}function Xc(n,e){var r=this.__data__,t=zr(r,n);return t<0?(++this.size,r.push([n,e])):r[t][1]=e,this}jn.prototype.clear=zc,jn.prototype.delete=Kc,jn.prototype.get=Zc,jn.prototype.has=Yc,jn.prototype.set=Xc;function ne(n){var e=-1,r=n==null?0:n.length;for(this.clear();++e=e?n:e)),n}function Dn(n,e,r,t,i,o){var a,s=e&z,c=e&O,_=e&W;if(r&&(a=i?r(n,t,i,o):r(n)),a!==f)return a;if(!an(n))return n;var d=D(n);if(d){if(a=kh(n),!s)return An(n,a)}else{var w=mn(n),y=w==br||w==$u;if(ve(n))return lo(n,s);if(w==kn||w==Ce||y&&!i){if(a=c||y?{}:Co(n),!s)return c?$h(n,lh(a,n)):Nh(n,Nf(a,n))}else{if(!en[w])return i?n:{};a=jh(n,w,s)}}o||(o=new Kn);var S=o.get(n);if(S)return S;o.set(n,a),ua(n)?n.forEach(function(C){a.add(Dn(C,e,r,C,n,o))}):ta(n)&&n.forEach(function(C,H){a.set(H,Dn(C,e,r,H,n,o))});var E=_?c?Bi:Mi:c?In:_n,$=d?f:E(n);return Mn($||n,function(C,H){$&&(H=C,C=n[H]),or(a,H,Dn(C,e,r,H,n,o))}),a}function ch(n){var e=_n(n);return function(r){return $f(r,n,e)}}function $f(n,e,r){var t=r.length;if(n==null)return!t;for(n=nn(n);t--;){var i=r[t],o=e[i],a=n[i];if(a===f&&!(i in n)||!o(a))return!1}return!0}function Gf(n,e,r){if(typeof n!="function")throw new Bn(I);return pr(function(){n.apply(f,r)},e)}function ar(n,e,r,t){var i=-1,o=Or,a=!0,s=n.length,c=[],_=e.length;if(!s)return c;r&&(e=fn(e,Rn(r))),t?(o=ri,a=!1):e.length>=L&&(o=er,a=!1,e=new Ae(e));n:for(;++ii?0:i+r),t=t===f||t>i?i:N(t),t<0&&(t+=i),t=r>t?0:oa(t);r0&&r(s)?e>1?vn(s,e-1,r,t,i):le(i,s):t||(i[i.length]=s)}return i}var vi=vo(),Kf=vo(!0);function Jn(n,e){return n&&vi(n,e,_n)}function wi(n,e){return n&&Kf(n,e,_n)}function Zr(n,e){return se(e,function(r){return ue(n[r])})}function Ie(n,e){e=_e(e,n);for(var r=0,t=e.length;n!=null&&re}function ph(n,e){return n!=null&&k.call(n,e)}function _h(n,e){return n!=null&&e in nn(n)}function dh(n,e,r){return n>=wn(e,r)&&n=120&&d.length>=120)?new Ae(a&&d):f}d=n[0];var w=-1,y=s[0];n:for(;++w-1;)s!==n&&Ur.call(s,c,1),Ur.call(n,c,1);return n}function ro(n,e){for(var r=n?e.length:0,t=r-1;r--;){var i=e[r];if(r==t||i!==o){var o=i;ie(i)?Ur.call(n,i,1):Ri(n,i)}}return n}function Ii(n,e){return n+Nr(Bf()*(e-n+1))}function Eh(n,e,r,t){for(var i=-1,o=pn(qr((e-n)/(r||1)),0),a=g(o);o--;)a[t?o:++i]=n,n+=r;return a}function Ti(n,e){var r="";if(!n||e<1||e>ae)return r;do e%2&&(r+=n),e=Nr(e/2),e&&(n+=n);while(e);return r}function G(n,e){return Hi(Fo(n,e,Tn),n+"")}function Ch(n){return qf(Ke(n))}function Lh(n,e){var r=Ke(n);return tt(r,Se(e,0,r.length))}function cr(n,e,r,t){if(!an(n))return n;e=_e(e,n);for(var i=-1,o=e.length,a=o-1,s=n;s!=null&&++ii?0:i+e),r=r>i?i:r,r<0&&(r+=i),i=e>r?0:r-e>>>0,e>>>=0;for(var o=g(i);++t>>1,a=n[o];a!==null&&!Cn(a)&&(r?a<=e:a=L){var _=e?null:Kh(n);if(_)return Er(_);a=!1,i=er,c=new Ae}else c=e?[]:s;n:for(;++t=t?n:qn(n,e,r)}var so=bc||function(n){return dn.clearTimeout(n)};function lo(n,e){if(e)return n.slice();var r=n.length,t=Lf?Lf(r):new n.constructor(r);return n.copy(t),t}function Pi(n){var e=new n.constructor(n.byteLength);return new Mr(e).set(new Mr(n)),e}function Bh(n,e){var r=e?Pi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}function Uh(n){var e=new n.constructor(n.source,Zu.exec(n));return e.lastIndex=n.lastIndex,e}function Dh(n){return fr?nn(fr.call(n)):{}}function co(n,e){var r=e?Pi(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}function ho(n,e){if(n!==e){var r=n!==f,t=n===null,i=n===n,o=Cn(n),a=e!==f,s=e===null,c=e===e,_=Cn(e);if(!s&&!_&&!o&&n>e||o&&a&&c&&!s&&!_||t&&a&&c||!r&&c||!i)return 1;if(!t&&!o&&!_&&n=s)return c;var _=r[t];return c*(_=="desc"?-1:1)}}return n.index-e.index}function go(n,e,r,t){for(var i=-1,o=n.length,a=r.length,s=-1,c=e.length,_=pn(o-a,0),d=g(c+_),w=!t;++s1?r[i-1]:f,a=i>2?r[2]:f;for(o=n.length>3&&typeof o=="function"?(i--,o):f,a&&xn(r[0],r[1],a)&&(o=i<3?f:o,i=1),e=nn(e);++t-1?i[o?e[a]:a]:f}}function yo(n){return te(function(e){var r=e.length,t=r,i=Un.prototype.thru;for(n&&e.reverse();t--;){var o=e[t];if(typeof o!="function")throw new Bn(I);if(i&&!a&&et(o)=="wrapper")var a=new Un([],!0)}for(t=a?t:r;++t1&&X.reverse(),d&&cs))return!1;var _=o.get(n),d=o.get(e);if(_&&d)return _==e&&d==n;var w=-1,y=!0,S=r&Y?new Ae:f;for(o.set(n,e),o.set(e,n);++w1?"& ":"")+e[t],e=e.join(r>2?", ":" "),n.replace(rl,`{ -/* [wrapped with `+e+`] */ -`)}function eg(n){return D(n)||Re(n)||!!(Wf&&n&&n[Wf])}function ie(n,e){var r=typeof n;return e=e??ae,!!e&&(r=="number"||r!="symbol"&&gl.test(n))&&n>-1&&n%1==0&&n0){if(++e>=Cs)return arguments[0]}else e=0;return n.apply(f,arguments)}}function tt(n,e){var r=-1,t=n.length,i=t-1;for(e=e===f?t:e;++r1?n[e-1]:f;return r=typeof r=="function"?(n.pop(),r):f,Ko(n,r)});function Zo(n){var e=u(n);return e.__chain__=!0,e}function hp(n,e){return e(n),n}function it(n,e){return e(n)}var gp=te(function(n){var e=n.length,r=e?n[0]:0,t=this.__wrapped__,i=function(o){return di(o,n)};return e>1||this.__actions__.length||!(t instanceof Z)||!ie(r)?this.thru(i):(t=t.slice(r,+r+(e?1:0)),t.__actions__.push({func:it,args:[i],thisArg:f}),new Un(t,this.__chain__).thru(function(o){return e&&!o.length&&o.push(f),o}))});function pp(){return Zo(this)}function _p(){return new Un(this.value(),this.__chain__)}function dp(){this.__values__===f&&(this.__values__=fa(this.value()));var n=this.__index__>=this.__values__.length,e=n?f:this.__values__[this.__index__++];return{done:n,value:e}}function vp(){return this}function wp(n){for(var e,r=this;r instanceof Hr;){var t=qo(r);t.__index__=0,t.__values__=f,e?i.__wrapped__=t:e=t;var i=t;r=r.__wrapped__}return i.__wrapped__=n,e}function mp(){var n=this.__wrapped__;if(n instanceof Z){var e=n;return this.__actions__.length&&(e=new Z(this)),e=e.reverse(),e.__actions__.push({func:it,args:[zi],thisArg:f}),new Un(e,this.__chain__)}return this.thru(zi)}function yp(){return oo(this.__wrapped__,this.__actions__)}var xp=Qr(function(n,e,r){k.call(n,r)?++n[r]:ee(n,r,1)});function bp(n,e,r){var t=D(n)?yf:hh;return r&&xn(n,e,r)&&(e=f),t(n,R(e,3))}function Ap(n,e){var r=D(n)?se:zf;return r(n,R(e,3))}var Sp=mo(No),Ip=mo($o);function Tp(n,e){return vn(ut(n,e),1)}function Op(n,e){return vn(ut(n,e),me)}function Rp(n,e,r){return r=r===f?1:N(r),vn(ut(n,e),r)}function Yo(n,e){var r=D(n)?Mn:ge;return r(n,R(e,3))}function Xo(n,e){var r=D(n)?Yl:Hf;return r(n,R(e,3))}var Ep=Qr(function(n,e,r){k.call(n,r)?n[r].push(e):ee(n,r,[e])});function Cp(n,e,r,t){n=Sn(n)?n:Ke(n),r=r&&!t?N(r):0;var i=n.length;return r<0&&(r=pn(i+r,0)),lt(n)?r<=i&&n.indexOf(e,r)>-1:!!i&&Fe(n,e,r)>-1}var Lp=G(function(n,e,r){var t=-1,i=typeof e=="function",o=Sn(n)?g(n.length):[];return ge(n,function(a){o[++t]=i?On(e,a,r):sr(a,e,r)}),o}),Pp=Qr(function(n,e,r){ee(n,r,e)});function ut(n,e){var r=D(n)?fn:Qf;return r(n,R(e,3))}function Fp(n,e,r,t){return n==null?[]:(D(e)||(e=e==null?[]:[e]),r=t?f:r,D(r)||(r=r==null?[]:[r]),no(n,e,r))}var Wp=Qr(function(n,e,r){n[r?0:1].push(e)},function(){return[[],[]]});function Mp(n,e,r){var t=D(n)?ti:Sf,i=arguments.length<3;return t(n,R(e,4),r,i,ge)}function Bp(n,e,r){var t=D(n)?Xl:Sf,i=arguments.length<3;return t(n,R(e,4),r,i,Hf)}function Up(n,e){var r=D(n)?se:zf;return r(n,at(R(e,3)))}function Dp(n){var e=D(n)?qf:Ch;return e(n)}function qp(n,e,r){(r?xn(n,e,r):e===f)?e=1:e=N(e);var t=D(n)?oh:Lh;return t(n,e)}function Np(n){var e=D(n)?ah:Fh;return e(n)}function $p(n){if(n==null)return 0;if(Sn(n))return lt(n)?Me(n):n.length;var e=mn(n);return e==Gn||e==Hn?n.size:bi(n).length}function Gp(n,e,r){var t=D(n)?ii:Wh;return r&&xn(n,e,r)&&(e=f),t(n,R(e,3))}var Hp=G(function(n,e){if(n==null)return[];var r=e.length;return r>1&&xn(n,e[0],e[1])?e=[]:r>2&&xn(e[0],e[1],e[2])&&(e=[e[0]]),no(n,vn(e,1),[])}),ft=Ac||function(){return dn.Date.now()};function zp(n,e){if(typeof e!="function")throw new Bn(I);return n=N(n),function(){if(--n<1)return e.apply(this,arguments)}}function Jo(n,e,r){return e=r?f:e,e=n&&e==null?n.length:e,re(n,rn,f,f,f,f,e)}function Qo(n,e){var r;if(typeof e!="function")throw new Bn(I);return n=N(n),function(){return--n>0&&(r=e.apply(this,arguments)),n<=1&&(e=f),r}}var Zi=G(function(n,e,r){var t=A;if(r.length){var i=ce(r,He(Zi));t|=V}return re(n,t,e,r,i)}),Vo=G(function(n,e,r){var t=A|un;if(r.length){var i=ce(r,He(Vo));t|=V}return re(e,t,n,r,i)});function ko(n,e,r){e=r?f:e;var t=re(n,T,f,f,f,f,f,e);return t.placeholder=ko.placeholder,t}function jo(n,e,r){e=r?f:e;var t=re(n,K,f,f,f,f,f,e);return t.placeholder=jo.placeholder,t}function na(n,e,r){var t,i,o,a,s,c,_=0,d=!1,w=!1,y=!0;if(typeof n!="function")throw new Bn(I);e=$n(e)||0,an(r)&&(d=!!r.leading,w="maxWait"in r,o=w?pn($n(r.maxWait)||0,e):o,y="trailing"in r?!!r.trailing:y);function S(cn){var Yn=t,oe=i;return t=i=f,_=cn,a=n.apply(oe,Yn),a}function E(cn){return _=cn,s=pr(H,e),d?S(cn):a}function $(cn){var Yn=cn-c,oe=cn-_,ma=e-Yn;return w?wn(ma,o-oe):ma}function C(cn){var Yn=cn-c,oe=cn-_;return c===f||Yn>=e||Yn<0||w&&oe>=o}function H(){var cn=ft();if(C(cn))return X(cn);s=pr(H,$(cn))}function X(cn){return s=f,y&&t?S(cn):(t=i=f,a)}function Ln(){s!==f&&so(s),_=0,t=c=i=s=f}function bn(){return s===f?a:X(ft())}function Pn(){var cn=ft(),Yn=C(cn);if(t=arguments,i=this,c=cn,Yn){if(s===f)return E(c);if(w)return so(s),s=pr(H,e),S(c)}return s===f&&(s=pr(H,e)),a}return Pn.cancel=Ln,Pn.flush=bn,Pn}var Kp=G(function(n,e){return Gf(n,1,e)}),Zp=G(function(n,e,r){return Gf(n,$n(e)||0,r)});function Yp(n){return re(n,Ut)}function ot(n,e){if(typeof n!="function"||e!=null&&typeof e!="function")throw new Bn(I);var r=function(){var t=arguments,i=e?e.apply(this,t):t[0],o=r.cache;if(o.has(i))return o.get(i);var a=n.apply(this,t);return r.cache=o.set(i,a)||o,a};return r.cache=new(ot.Cache||ne),r}ot.Cache=ne;function at(n){if(typeof n!="function")throw new Bn(I);return function(){var e=arguments;switch(e.length){case 0:return!n.call(this);case 1:return!n.call(this,e[0]);case 2:return!n.call(this,e[0],e[1]);case 3:return!n.call(this,e[0],e[1],e[2])}return!n.apply(this,e)}}function Xp(n){return Qo(2,n)}var Jp=Mh(function(n,e){e=e.length==1&&D(e[0])?fn(e[0],Rn(R())):fn(vn(e,1),Rn(R()));var r=e.length;return G(function(t){for(var i=-1,o=wn(t.length,r);++i=e}),Re=Yf(function(){return arguments}())?Yf:function(n){return sn(n)&&k.call(n,"callee")&&!Ff.call(n,"callee")},D=g.isArray,l_=pf?Rn(pf):wh;function Sn(n){return n!=null&&st(n.length)&&!ue(n)}function ln(n){return sn(n)&&Sn(n)}function c_(n){return n===!0||n===!1||sn(n)&&yn(n)==Xe}var ve=Ic||iu,h_=_f?Rn(_f):mh;function g_(n){return sn(n)&&n.nodeType===1&&!_r(n)}function p_(n){if(n==null)return!0;if(Sn(n)&&(D(n)||typeof n=="string"||typeof n.splice=="function"||ve(n)||ze(n)||Re(n)))return!n.length;var e=mn(n);if(e==Gn||e==Hn)return!n.size;if(gr(n))return!bi(n).length;for(var r in n)if(k.call(n,r))return!1;return!0}function __(n,e){return lr(n,e)}function d_(n,e,r){r=typeof r=="function"?r:f;var t=r?r(n,e):f;return t===f?lr(n,e,f,r):!!t}function Xi(n){if(!sn(n))return!1;var e=yn(n);return e==xr||e==qs||typeof n.message=="string"&&typeof n.name=="string"&&!_r(n)}function v_(n){return typeof n=="number"&&Mf(n)}function ue(n){if(!an(n))return!1;var e=yn(n);return e==br||e==$u||e==Ds||e==$s}function ra(n){return typeof n=="number"&&n==N(n)}function st(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=ae}function an(n){var e=typeof n;return n!=null&&(e=="object"||e=="function")}function sn(n){return n!=null&&typeof n=="object"}var ta=df?Rn(df):xh;function w_(n,e){return n===e||xi(n,e,Di(e))}function m_(n,e,r){return r=typeof r=="function"?r:f,xi(n,e,Di(e),r)}function y_(n){return ia(n)&&n!=+n}function x_(n){if(ig(n))throw new M(P);return Xf(n)}function b_(n){return n===null}function A_(n){return n==null}function ia(n){return typeof n=="number"||sn(n)&&yn(n)==Qe}function _r(n){if(!sn(n)||yn(n)!=kn)return!1;var e=Br(n);if(e===null)return!0;var r=k.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Pr.call(r)==mc}var Ji=vf?Rn(vf):bh;function S_(n){return ra(n)&&n>=-ae&&n<=ae}var ua=wf?Rn(wf):Ah;function lt(n){return typeof n=="string"||!D(n)&&sn(n)&&yn(n)==ke}function Cn(n){return typeof n=="symbol"||sn(n)&&yn(n)==Ar}var ze=mf?Rn(mf):Sh;function I_(n){return n===f}function T_(n){return sn(n)&&mn(n)==je}function O_(n){return sn(n)&&yn(n)==Hs}var R_=nt(Ai),E_=nt(function(n,e){return n<=e});function fa(n){if(!n)return[];if(Sn(n))return lt(n)?zn(n):An(n);if(rr&&n[rr])return oc(n[rr]());var e=mn(n),r=e==Gn?li:e==Hn?Er:Ke;return r(n)}function fe(n){if(!n)return n===0?n:0;if(n=$n(n),n===me||n===-me){var e=n<0?-1:1;return e*Ws}return n===n?n:0}function N(n){var e=fe(n),r=e%1;return e===e?r?e-r:e:0}function oa(n){return n?Se(N(n),0,Xn):0}function $n(n){if(typeof n=="number")return n;if(Cn(n))return mr;if(an(n)){var e=typeof n.valueOf=="function"?n.valueOf():n;n=an(e)?e+"":e}if(typeof n!="string")return n===0?n:+n;n=If(n);var r=ll.test(n);return r||hl.test(n)?zl(n.slice(2),r?2:8):sl.test(n)?mr:+n}function aa(n){return Qn(n,In(n))}function C_(n){return n?Se(N(n),-ae,ae):n===0?n:0}function Q(n){return n==null?"":En(n)}var L_=$e(function(n,e){if(gr(e)||Sn(e)){Qn(e,_n(e),n);return}for(var r in e)k.call(e,r)&&or(n,r,e[r])}),sa=$e(function(n,e){Qn(e,In(e),n)}),ct=$e(function(n,e,r,t){Qn(e,In(e),n,t)}),P_=$e(function(n,e,r,t){Qn(e,_n(e),n,t)}),F_=te(di);function W_(n,e){var r=Ne(n);return e==null?r:Nf(r,e)}var M_=G(function(n,e){n=nn(n);var r=-1,t=e.length,i=t>2?e[2]:f;for(i&&xn(e[0],e[1],i)&&(t=1);++r1),o}),Qn(n,Bi(n),r),t&&(r=Dn(r,z|O|W,Zh));for(var i=e.length;i--;)Ri(r,e[i]);return r});function j_(n,e){return ca(n,at(R(e)))}var nd=te(function(n,e){return n==null?{}:Oh(n,e)});function ca(n,e){if(n==null)return{};var r=fn(Bi(n),function(t){return[t]});return e=R(e),eo(n,r,function(t,i){return e(t,i[0])})}function ed(n,e,r){e=_e(e,n);var t=-1,i=e.length;for(i||(i=1,n=f);++te){var t=n;n=e,e=t}if(r||n%1||e%1){var i=Bf();return wn(n+i*(e-n+Hl("1e-"+((i+"").length-1))),e)}return Ii(n,e)}var hd=Ge(function(n,e,r){return e=e.toLowerCase(),n+(r?pa(e):e)});function pa(n){return ki(Q(n).toLowerCase())}function _a(n){return n=Q(n),n&&n.replace(pl,rc).replace(Fl,"")}function gd(n,e,r){n=Q(n),e=En(e);var t=n.length;r=r===f?t:Se(N(r),0,t);var i=r;return r-=e.length,r>=0&&n.slice(r,i)==e}function pd(n){return n=Q(n),n&&Xs.test(n)?n.replace(zu,tc):n}function _d(n){return n=Q(n),n&&nl.test(n)?n.replace(Yt,"\\$&"):n}var dd=Ge(function(n,e,r){return n+(r?"-":"")+e.toLowerCase()}),vd=Ge(function(n,e,r){return n+(r?" ":"")+e.toLowerCase()}),wd=wo("toLowerCase");function md(n,e,r){n=Q(n),e=N(e);var t=e?Me(n):0;if(!e||t>=e)return n;var i=(e-t)/2;return jr(Nr(i),r)+n+jr(qr(i),r)}function yd(n,e,r){n=Q(n),e=N(e);var t=e?Me(n):0;return e&&t>>0,r?(n=Q(n),n&&(typeof e=="string"||e!=null&&!Ji(e))&&(e=En(e),!e&&We(n))?de(zn(n),0,r):n.split(e,r)):[]}var Od=Ge(function(n,e,r){return n+(r?" ":"")+ki(e)});function Rd(n,e,r){return n=Q(n),r=r==null?0:Se(N(r),0,n.length),e=En(e),n.slice(r,r+e.length)==e}function Ed(n,e,r){var t=u.templateSettings;r&&xn(n,e,r)&&(e=f),n=Q(n),e=ct({},e,t,Io);var i=ct({},e.imports,t.imports,Io),o=_n(i),a=si(i,o),s,c,_=0,d=e.interpolate||Sr,w="__p += '",y=ci((e.escape||Sr).source+"|"+d.source+"|"+(d===Ku?al:Sr).source+"|"+(e.evaluate||Sr).source+"|$","g"),S="//# sourceURL="+(k.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Dl+"]")+` -`;n.replace(y,function(C,H,X,Ln,bn,Pn){return X||(X=Ln),w+=n.slice(_,Pn).replace(_l,ic),H&&(s=!0,w+=`' + -__e(`+H+`) + -'`),bn&&(c=!0,w+=`'; -`+bn+`; -__p += '`),X&&(w+=`' + -((__t = (`+X+`)) == null ? '' : __t) + -'`),_=Pn+C.length,C}),w+=`'; -`;var E=k.call(e,"variable")&&e.variable;if(!E)w=`with (obj) { -`+w+` -} -`;else if(fl.test(E))throw new M(q);w=(c?w.replace(zs,""):w).replace(Ks,"$1").replace(Zs,"$1;"),w="function("+(E||"obj")+`) { -`+(E?"":`obj || (obj = {}); -`)+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?`, __j = Array.prototype.join; -function print() { __p += __j.call(arguments, '') } -`:`; -`)+w+`return __p -}`;var $=va(function(){return J(o,S+"return "+w).apply(f,a)});if($.source=w,Xi($))throw $;return $}function Cd(n){return Q(n).toLowerCase()}function Ld(n){return Q(n).toUpperCase()}function Pd(n,e,r){if(n=Q(n),n&&(r||e===f))return If(n);if(!n||!(e=En(e)))return n;var t=zn(n),i=zn(e),o=Tf(t,i),a=Of(t,i)+1;return de(t,o,a).join("")}function Fd(n,e,r){if(n=Q(n),n&&(r||e===f))return n.slice(0,Ef(n)+1);if(!n||!(e=En(e)))return n;var t=zn(n),i=Of(t,zn(e))+1;return de(t,0,i).join("")}function Wd(n,e,r){if(n=Q(n),n&&(r||e===f))return n.replace(Xt,"");if(!n||!(e=En(e)))return n;var t=zn(n),i=Tf(t,zn(e));return de(t,i).join("")}function Md(n,e){var r=Rs,t=Es;if(an(e)){var i="separator"in e?e.separator:i;r="length"in e?N(e.length):r,t="omission"in e?En(e.omission):t}n=Q(n);var o=n.length;if(We(n)){var a=zn(n);o=a.length}if(r>=o)return n;var s=r-Me(t);if(s<1)return t;var c=a?de(a,0,s).join(""):n.slice(0,s);if(i===f)return c+t;if(a&&(s+=c.length-s),Ji(i)){if(n.slice(s).search(i)){var _,d=c;for(i.global||(i=ci(i.source,Q(Zu.exec(i))+"g")),i.lastIndex=0;_=i.exec(d);)var w=_.index;c=c.slice(0,w===f?s:w)}}else if(n.indexOf(En(i),s)!=s){var y=c.lastIndexOf(i);y>-1&&(c=c.slice(0,y))}return c+t}function Bd(n){return n=Q(n),n&&Ys.test(n)?n.replace(Hu,cc):n}var Ud=Ge(function(n,e,r){return n+(r?" ":"")+e.toUpperCase()}),ki=wo("toUpperCase");function da(n,e,r){return n=Q(n),e=r?f:e,e===f?fc(n)?pc(n):Vl(n):n.match(e)||[]}var va=G(function(n,e){try{return On(n,f,e)}catch(r){return Xi(r)?r:new M(r)}}),Dd=te(function(n,e){return Mn(e,function(r){r=Vn(r),ee(n,r,Zi(n[r],n))}),n});function qd(n){var e=n==null?0:n.length,r=R();return n=e?fn(n,function(t){if(typeof t[1]!="function")throw new Bn(I);return[r(t[0]),t[1]]}):[],G(function(t){for(var i=-1;++iae)return[];var r=Xn,t=wn(n,Xn);e=R(e),n-=Xn;for(var i=ai(t,e);++r0||e<0)?new Z(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==f&&(e=N(e),r=e<0?r.dropRight(-e):r.take(e-n)),r)},Z.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},Z.prototype.toArray=function(){return this.take(Xn)},Jn(Z.prototype,function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),t=/^(?:head|last)$/.test(e),i=u[t?"take"+(e=="last"?"Right":""):e],o=t||/^find/.test(e);i&&(u.prototype[e]=function(){var a=this.__wrapped__,s=t?[1]:arguments,c=a instanceof Z,_=s[0],d=c||D(a),w=function(H){var X=i.apply(u,le([H],s));return t&&y?X[0]:X};d&&r&&typeof _=="function"&&_.length!=1&&(c=d=!1);var y=this.__chain__,S=!!this.__actions__.length,E=o&&!y,$=c&&!S;if(!o&&d){a=$?a:new Z(this);var C=n.apply(a,s);return C.__actions__.push({func:it,args:[w],thisArg:f}),new Un(C,y)}return E&&$?n.apply(this,s):(C=this.thru(w),E?t?C.value()[0]:C.value():C)})}),Mn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Cr[n],r=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",t=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(t&&!this.__chain__){var o=this.value();return e.apply(D(o)?o:[],i)}return this[r](function(a){return e.apply(D(a)?a:[],i)})}}),Jn(Z.prototype,function(n,e){var r=u[e];if(r){var t=r.name+"";k.call(qe,t)||(qe[t]=[]),qe[t].push({name:e,func:r})}}),qe[Vr(f,un).name]=[{name:"wrapper",func:f}],Z.prototype.clone=Bc,Z.prototype.reverse=Uc,Z.prototype.value=Dc,u.prototype.at=gp,u.prototype.chain=pp,u.prototype.commit=_p,u.prototype.next=dp,u.prototype.plant=wp,u.prototype.reverse=mp,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=yp,u.prototype.first=u.prototype.head,rr&&(u.prototype[rr]=vp),u},Be=_c();ye?((ye.exports=Be)._=Be,ni._=Be):dn._=Be}).call(we)}(dr,dr.exports);var Fn=dr.exports,uu={};(function(h){var v=we&&we.__assign||function(){return(v=Object.assign||function(I){for(var q,b=1,m=arguments.length;b0?1:-1}),ht}var Ea=Oa()?Math.sign:Ra(),Ca=Ea,La=Math.abs,Pa=Math.floor,Fa=function(h){return isNaN(h)?0:(h=Number(h),h===0||!isFinite(h)?h:Ca(h)*Pa(La(h)))},Wa=Fa,Ma=Math.max,Ba=function(h){return Ma(0,Wa(h))},ou=function(h){if(typeof h!="function")throw new TypeError(h+" is not a function");return h},Ua=Ee,au=function(h){if(!Ua(h))throw new TypeError("Cannot use null or undefined");return h},Da={exports:{}},qa=function(){var h=Object.assign,v;return typeof h!="function"?!1:(v={foo:"raz"},h(v,{bar:"dwa"},{trzy:"trzy"}),v.foo+v.bar+v.trzy==="razdwatrzy")},gt,su;function Na(){return su||(su=1,gt=function(){try{return Object.keys("primitive"),!0}catch{return!1}}),gt}var pt,lu;function $a(){if(lu)return pt;lu=1;var h=Ee,v=Object.keys;return pt=function(f){return v(h(f)?Object(f):f)},pt}var _t,cu;function Ga(){return cu||(cu=1,_t=Na()()?Object.keys:$a()),_t}var dt,hu;function Ha(){if(hu)return dt;hu=1;var h=Ga(),v=au,f=Math.max;return dt=function(F,L){var P,I,q=f(arguments.length,2),b;for(F=Object(v(F)),b=function(m){try{F[m]=L[m]}catch(B){P||(P=B)}},I=1;I-1},wt}var os=us()?String.prototype.contains:fs(),vr=du,wu=is,mu=gu,yu=Ta,Ze=os,as=_u.exports=function(h,v){var f,F,L,P,I;return arguments.length<2||typeof h!="string"?(P=v,v=h,h=null):P=arguments[2],vr(h)?(f=Ze.call(h,"c"),F=Ze.call(h,"e"),L=Ze.call(h,"w")):(f=L=!0,F=!1),I={value:v,configurable:f,enumerable:F,writable:L},P?mu(yu(P),I):I};as.gs=function(h,v,f){var F,L,P,I;return typeof h!="string"?(P=f,f=v,v=h,h=null):P=arguments[3],vr(v)?wu(v)?vr(f)?wu(f)||(P=f,f=void 0):f=void 0:(P=v,v=f=void 0):v=void 0,vr(h)?(F=Ze.call(h,"c"),L=Ze.call(h,"e")):(F=!0,L=!1),I={get:v,set:f,configurable:F,enumerable:L},P?mu(yu(P),I):I};var Ye=_u.exports,mt={exports:{}};(function(h,v){var f=Ye,F=ou,L=Function.prototype.apply,P=Function.prototype.call,I=Object.create,q=Object.defineProperty,b=Object.defineProperties,m=Object.prototype.hasOwnProperty,B={configurable:!0,enumerable:!1,writable:!0},z,O,W,on,Y,A,un;z=function(U,T){var K;return F(T),m.call(this,"__ee__")?K=this.__ee__:(K=B.value=I(null),q(this,"__ee__",B),B.value=null),K[U]?typeof K[U]=="object"?K[U].push(T):K[U]=[K[U],T]:K[U]=T,this},O=function(U,T){var K,V;return F(T),V=this,z.call(this,U,K=function(){W.call(V,U,K),L.call(T,this,arguments)}),K.__eeOnceListener__=T,this},W=function(U,T){var K,V,j,rn;if(F(T),!m.call(this,"__ee__"))return this;if(K=this.__ee__,!K[U])return this;if(V=K[U],typeof V=="object")for(rn=0;j=V[rn];++rn)(j===T||j.__eeOnceListener__===T)&&(V.length===2?K[U]=V[rn?0:1]:V.splice(rn,1));else(V===T||V.__eeOnceListener__===T)&&delete K[U];return this},on=function(U){var T,K,V,j,rn;if(m.call(this,"__ee__")&&(j=this.__ee__[U],!!j))if(typeof j=="object"){for(K=arguments.length,rn=new Array(K-1),T=1;T=55296&&K<=56319&&(hn+=O[++A])),hn=W?m.call(W,on,hn,un):hn,Y?(B.value=hn,z(U,un,B)):U[un]=hn,++un;T=un}}if(T===void 0)for(T=F(O.length),Y&&(U=new Y(T)),A=0;Aasync v=>{try{const f=await h(v);postMessage({result:f})}catch(f){postMessage({error:f})}};function Ts(h,v){const f=new Set([h.id]);let F=h,L=v;Fn.times(v,()=>{F.parent&&(F=F.parent,f.add(F.id),L-=1)});function P(b,m=L){return m>=0?Fn.forEach(b.children,B=>P(B,f.has(B.id)?m+1:m-1)):b.children=[],b}function I(b){const m=b.parent;return m?(m.children=[b],I(m)):b}const q=P(structuredClone(F));return I(q)}function Os({trace:h,step:v=0,radius:f}){var I,q;function F(b){Fn.forEach(b.children,m=>{m.parent=b,F(m)})}function L(b,m){b(m),Fn.forEach(m.children,B=>L(b,B))}function P(b){var m;if((m=b.children)!=null&&m.length){Fn.forEach(b.children,P);const B=Fn.sumBy(b.children,"cumulativeChildCount");return b.cumulativeChildCount=B+b.children.length,b}else b.cumulativeChildCount=0;return b}if(h){const b=Fn.chain(h.events).map((O,W)=>({step:W,id:O.id,data:O,pId:O.pId})).groupBy("id").entries().map(([O,W])=>{var on,Y;return{id:O,name:O,events:W,pId:((on=Fn.find(W,A=>!!A.pId&&A.step<=v))==null?void 0:on.pId)||((Y=Fn.find(W,A=>!!A.pId))==null?void 0:Y.pId)}}).value(),m=uu.arrayToTree(b,{dataField:null,parentId:"pId"});Fn.forEach(m,F);const B={};Fn.forEach(m,O=>L(W=>{W.id!==null&&W.id!==void 0&&(B[W.id]=W)},O)),Fn.forEach(m,P);const z=(q=(I=h==null?void 0:h.events)==null?void 0:I[v])==null?void 0:q.id;if(z&&f!==void 0){const O=B[z];return{tree:Ts(O,f)}}else return{tree:m}}}onmessage=Is(async({data:h})=>Os(h))})(); diff --git a/index.html b/index.html index e335d1e..62f2554 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,7 @@ Posthoc - +