From 2e5a87ab1a612f0503e4bb4858869f602bf93213 Mon Sep 17 00:00:00 2001 From: max Date: Fri, 31 May 2024 10:18:10 +0200 Subject: [PATCH] Updates --- asset-manifest.json | 4 ++-- index.html | 2 +- static/js/main.33862f50.js | 2 -- static/js/main.f3db7033.js | 2 ++ ...n.33862f50.js.LICENSE.txt => main.f3db7033.js.LICENSE.txt} | 0 5 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 static/js/main.33862f50.js create mode 100644 static/js/main.f3db7033.js rename static/js/{main.33862f50.js.LICENSE.txt => main.f3db7033.js.LICENSE.txt} (100%) diff --git a/asset-manifest.json b/asset-manifest.json index 1c0acd9..bba9670 100644 --- a/asset-manifest.json +++ b/asset-manifest.json @@ -1,7 +1,7 @@ { "files": { "main.css": "/static/css/main.f1d196ee.css", - "main.js": "/static/js/main.33862f50.js", + "main.js": "/static/js/main.f3db7033.js", "static/js/206.76bb8fc0.chunk.js": "/static/js/206.76bb8fc0.chunk.js", "static/media/grid.svg": "/static/media/grid.d57058918471d53920d7ae992d1ad287.svg", "index.html": "/index.html", @@ -10,6 +10,6 @@ }, "entrypoints": [ "static/css/main.f1d196ee.css", - "static/js/main.33862f50.js" + "static/js/main.f3db7033.js" ] } \ No newline at end of file diff --git a/index.html b/index.html index 5a7d423..efe2054 100644 --- a/index.html +++ b/index.html @@ -1 +1 @@ -MIDIspatcher
\ No newline at end of file +MIDIspatcher
\ No newline at end of file diff --git a/static/js/main.33862f50.js b/static/js/main.33862f50.js deleted file mode 100644 index f148ca0..0000000 --- a/static/js/main.33862f50.js +++ /dev/null @@ -1,2 +0,0 @@ -/*! For license information please see main.33862f50.js.LICENSE.txt */ -(()=>{var e={802:(e,t,n)=>{"use strict";n.d(t,{De:()=>w,GW:()=>u,Nw:()=>o,Rf:()=>b,TC:()=>d,U_:()=>m,Zz:()=>l,aB:()=>y,ht:()=>f,kP:()=>i,l8:()=>h,pE:()=>p,q8:()=>a});var r=n(75546);const o=["C","C#","D","D#","E","F","F#","G","G#","A","A#","B"],i="onMidiMessage",s={};function a(e){const[t,n]=l(e);return t+n}function l(e){if(void 0!=s[e])return s[e];const t=Math.floor(e/12)-1,n=[o[e%12],t];return s[e]=n,n}const c={};function u(e){if(!c[e]){const t=r.FP.buildNote(e,{rawAttack:150});c[e]=Uint8Array.from([r.br.CHANNEL_MESSAGES.noteon<<4,t.getOffsetNumber(r.OK.octaveOffset),t.rawAttack])}return c[e]}function d(e){return e/127}const h={clock:{type:"clock",message:{rawData:Uint8Array.from([248]),isChannelMessage:!1,type:"clock",channel:0}},start:{type:"start",message:{rawData:Uint8Array.from([250]),isChannelMessage:!1,type:"start",channel:0}},continue:{type:"continue",message:{rawData:Uint8Array.from([251]),isChannelMessage:!1,type:"continue",channel:0}},stop:{type:"stop",message:{rawData:Uint8Array.from([252]),isChannelMessage:!1,type:"stop",channel:0}},allnotesoff:{type:"allnotesoff",message:{rawData:Uint8Array.from([176,123,0]),isChannelMessage:!0,type:"allnotesoff",channel:0}},allsoundoff:{type:"allsoundoff",message:{rawData:Uint8Array.from([176,120,0]),isChannelMessage:!0,type:"allsoundoff",channel:0}}},p={B1:"Kick Drum 2",C2:"Kick Drum 1",D2:"Snare Drum 1","D#2":"Hand Clap",E2:"Snare Drum 2","F#2":"Closed Hi-Hat","G#2":"Pedal Hi-Hat","A#2":"Open Hi-Hat","C#3":"Crash Cymbal 1","D#3":"Ride Cymbal 1","G#3":"Cowbell"},f={F2:"Low Tom 2",G2:"Low Tom 1",A2:"Mid Tom 2",B2:"Mid Tom 1",C3:"High Tom 2",D3:"High Tom 1",C4:"High Bongo","C#4":"Low Bongo"},m={"A#0":"MC-500 Beep 1",B0:"MC-500 Beep 2",C1:"Concert Snare Drum","C#1":"Snare Roll",D1:"Finger Snap 2","D#1":"High Q",E1:"Slap",F1:"Scratch Push","F#1":"Scratch Pull",G1:"Sticks","G#1":"Square Click",A1:"Metronome Click","A#1":"Metronome Bell",B1:"Kick Drum 2",C2:"Kick Drum 1","C#2":"Side Stick",D2:"Snare Drum 1","D#2":"Hand Clap",E2:"Snare Drum 2",F2:"Low Tom 2","F#2":"Closed Hi-Hat",G2:"Low Tom 1","G#2":"Pedal Hi-Hat",A2:"Mid Tom 2","A#2":"Open Hi-Hat",B2:"Mid Tom 1",C3:"High Tom 2","C#3":"Crash Cymbal 1",D3:"High Tom 1","D#3":"Ride Cymbal 1",E3:"Chinese Cymbal",F3:"Ride Bell","F#3":"Tambourine",G3:"Splash Cymbal","G#3":"Cowbell",A3:"Crash Cymbal 2","A#3":"Vibraslap",B3:"Ride Cymbal 2",C4:"High Bongo","C#4":"Low Bongo",D4:"Mute High Conga","D#4":"Open High Conga",E4:"Low Conga",F4:"High Timbale","F#4":"Low Timbale",G4:"High Agogo","G#4":"Low Agogo",A4:"Cabasa","A#4":"Maracas",B4:"Short High Whistle",C5:"Long Low Whistle","C#5":"Short Guiro",D5:"Long Guiro","D#5":"Claves",E5:"High Wood Block",F5:"Low Wood Block","F#5":"Mute Cuica",G5:"Open Cuica","G#5":"Mute Triangle",A5:"Open Triangle","A#5":"Shaker",B5:"Jingle Bell",C6:"Bell Tree","C#6":"Castanets",D6:"Mute Surdo","D#6":"Open Surdo",E6:"Applause 2"};var g="undefined"===typeof window?n.g:window;const v="FLAG_TYPED_ARRAY",y=e=>JSON.stringify(e,(function(e,t){return t instanceof Int8Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Int16Array||t instanceof Uint16Array||t instanceof Int32Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array?{constructor:t.constructor.name,data:Array.apply([],t),flag:v}:t})),b=e=>JSON.parse(e,(function(e,t){try{if(void 0!=t.flag&&t.flag===v){return new(0,g[t.constructor])(t.data)}}catch(n){}return t})),w=[];for(let _=0;_<128;_++)w.push(Uint8Array.from([r.br.CHANNEL_MESSAGES.noteoff<<4,_,0]))},99986:(e,t,n)=>{"use strict";n.d(t,{fT:()=>p,FQ:()=>d,oB:()=>h,Hi:()=>l});var r=n(38657),o=n(77910);const i="onCycleDetected",s="onCycleCleared";class a extends EventTarget{addLink(e,t,n){void 0==this.links[e+"|"+t]&&(this.links[e+"|"+t]=[]),this.links[e+"|"+t].push(n)}getLinksBetween(e,t){var n;return null!==(n=this.links[e+"|"+t])&&void 0!==n?n:[]}deleteLink(e,t,n){this.links[e+"|"+t]=this.links[e+"|"+t].filter((e=>e!==n))}constructor(){super(),this.onCycleDetected=new Event(i),this.onCycleCleared=new Event(s),this.hasCycle=void 0,this.routings=void 0,this.deletions=void 0,this.links=void 0,this.sources=void 0,this.routings={},this.deletions={},this.links={},this.sources={},this.hasCycle=!1}connect(e,t,n,r,i){this.routings[e.getId()]||(this.routings[e.getId()]=[]),this.routings[e.getId()][n]||(this.routings[e.getId()][n]={}),this.routings[e.getId()][n][t.getId()]||(this.routings[e.getId()][n][t.getId()]=[]);e.setEmit(((t,n)=>{var r;Object.values(null!==(r=this.routings[e.getId()][n])&&void 0!==r?r:[]).forEach((e=>e.forEach((e=>e(t,n)))))})),this.sources[e.getId()]=e,this.routings[e.getId()][n][t.getId()][r]=e=>{if(!t.isEnabled())return;i.getTargetPort().setSending(!0);try{if(i.inCycle)return;t.receive(e,r)===o.LB.Processed&&i.setSending(!0)}catch(e){console.error(e)}},this.addLink(e.getId(),t.getId(),i),this.findAndMarkAllCycles()&&(this.dispatchEvent(this.onCycleDetected),this.hasCycle=!0),this.deletions[i.getID()]=()=>{delete this.routings[e.getId()][n][t.getId()][r],this.deleteLink(e.getId(),t.getId(),i);const o=this.findAndMarkAllCycles();this.hasCycle&&!o&&this.dispatchEvent(this.onCycleCleared),this.hasCycle=o}}findAndMarkAllCycles(){let e=!1;Object.values(this.links).forEach((e=>e.forEach((e=>e.setInCycle(!1)))));const t={};return Object.keys(this.routings).forEach((n=>{const r={},o=[],i={};for(o.push([n,void 0]);o.length>0;){const n=o.pop();if(void 0==n)break;const[s,a]=n;t[s]||(t[s]=!0,r[s]=!0,i[s]=a);let l=!1;for(let c=0;void 0!=this.routings[s]&&cvoid 0!=e)))if(t[n]){if(r[n]){let t=s;const r=[];for(;t!==n&&void 0!=t;){const e=i[t];if(void 0==e)break;r.push(...this.getLinksBetween(e,t)),t=e}t===n&&(r.push(...this.getLinksBetween(s,t)),r.forEach((e=>e.setInCycle(!0))),e=!0)}}else o.push([n,s]),l=!0;l||(r[s]=!1)}})),e}disconnect(e){void 0!=this.deletions[e.getID()]&&(this.deletions[e.getID()](),delete this.deletions[e.getID()])}}const l=(0,r.Ay)(),c=l.getStateMachine().getCurrentState();c instanceof r.kH&&(c.dragNewLink.config.allowLooseLinks=!1);class u{constructor(e,t){this._execute=void 0,this._undo=void 0,this._execute=e,this._undo=t}execute(e){this._execute(e)}undo(e){this._undo(e)}}class d{constructor(e){this.commands=[],this.index=-1,this.engine=void 0,this.engine=e}addCommand(e){this.commands.length=this.index+1,this.commands.push(e),this.index+=1}undo(){if(this.index>=0){this.commands[this.index].undo(this.engine),this.index=this.index-1}}redo(){if(this.index+1{this.onCycleDetected()})),this.routings.addEventListener(s,(()=>{this.onCycleCleared()})),window.setTimeout((()=>this.getLinks().forEach((e=>this.applyLink(e)))),0),this.realignGrid()}constructor(e,t,n){super(),this.commandManager=void 0,this.routings=void 0,this.onCycleDetected=void 0,this.onCycleCleared=void 0,this.routings=new a,this.onCycleDetected=t,this.onCycleCleared=n,this.routings.addEventListener(i,(()=>{this.onCycleDetected()})),this.routings.addEventListener(s,(()=>{this.onCycleCleared()})),this.commandManager=e,this.registerListener({linksUpdated:e=>{const t=e;if(t.isCreated){const e=t.link.registerListener({targetPortChanged:n=>{t.link.deregisterListener(e),this.applyLink(t.link)}})}else this.routings.disconnect(t.link)},eventDidFire:e=>{switch(e.function){case"offsetUpdated":this.adjustGridOffset(e);break;case"zoomUpdated":this.adjustGridZoom(e)}}}),this.realignGrid()}realignGrid(){this.adjustGridOffset({offsetX:this.getOffsetX(),offsetY:this.getOffsetY()}),this.adjustGridZoom({zoom:this.getZoomLevel()})}adjustGridOffset(e){let{offsetX:t,offsetY:n}=e;const r=document.querySelector(".midispatcherGrid");void 0!=r&&(r.style.setProperty("--offset-x","".concat(Math.round(t),"px")),r.style.setProperty("--offset-y","".concat(Math.round(n),"px")))}adjustGridZoom(e){let{zoom:t}=e;const n=document.querySelector(".midispatcherGrid");if(void 0==n)return;const{gridSize:r}=this.getOptions();n.style.setProperty("--grid-size","".concat((null!==r&&void 0!==r?r:15)*t/100,"px"))}removeLink(e){const t=new u((()=>super.removeLink(e)),(()=>{super.addLink(e),this.applyLink(e)}));return this.commandManager.addCommand(t),super.removeLink(e)}addLink(e){const t=new u((()=>{super.addLink(e),this.applyLink(e)}),(()=>super.removeLink(e)));return this.commandManager.addCommand(t),super.addLink(e)}addNode(e){const t=new u((()=>super.addNode(e)),(()=>super.removeNode(e)));return this.commandManager.addCommand(t),super.addNode(e)}removeNode(e){const t=new u((()=>super.removeNode(e)),(()=>super.addNode(e)));return this.commandManager.addCommand(t),super.removeNode(e)}addAll(){return super.addAll(...arguments)}applyLink(e){let t=e.getSourcePort(),n=e.getTargetPort();if(!n.isIn){const e=n;n=t,t=e}const r=t.getNode(),o=r.machine,i=n.getNode().machine;return e.getSourcePort().getName()===p?(Object.keys(r.getMachinePorts()).forEach((t=>{const o=r.getMachinePorts()[t];if(o.getName()!==p&&!o.isIn){const t=e.getTargetPort().link(o);l.getModel().addAll(t);const r=o.getNode().machine;this.routings.connect(r,i,o.channel,n.channel,t)}})),l.getModel().removeLink(e)):void 0!==t.getLinks()[n.getName()]?l.getModel().removeLink(e):this.routings.connect(o,i,t.channel,n.channel,e),!0}}const p="All"},56717:(e,t,n)=>{"use strict";n.d(t,{S:()=>z});var r=n(57528),o=n(46948),i=n(88283);n(9950);const s=n.p+"static/media/grid.d57058918471d53920d7ae992d1ad287.svg";var a,l,c,u,d,h,p,f,m,g,v,y,b,w,_,x,S,A,C,k,E,T,O,M,P,R,N,I,L,D,j,F,B,U;let z;!function(e){e.Container=o.A.div(a||(a=(0,r.A)(["\n height: 100%;\n background-color: ",";\n background-size: 50px 50px;\n background-position: top 10px right 10px;\n display: flex;\n\n > * {\n\n height: 100%;\n min-height: 100%;\n width: 100%;\n }\n\n --offset-x: 0px;\n --offset-y: 0px;\n --grid-size: 25px;\n\n background-position-x: var(--offset-x);\n background-position-y: var(--offset-y);\n\n background-size: calc(var(--grid-size) * 3)\n calc(var(--grid-size) * 3);\n\n background-image: url('","');\n "])),(e=>e.background),s),e.Expand=(0,i.AH)(l||(l=(0,r.A)(["\n html,\n body,\n #root {\n\n height: 100%;\n }\n "])));const t=e.Keyframes=(0,i.i7)(c||(c=(0,r.A)(["\n from {\n\n stroke-dashoffset: 24;\n }\n to {\n\n stroke-dashoffset: 0;\n }\n "]))),n=(0,i.AH)(u||(u=(0,r.A)(["\n stroke-dasharray: 10, 2;\n animation: "," 1s linear infinite;\n "])),t),z=(0,i.AH)(d||(d=(0,r.A)(["\n stroke-dasharray: 10, 1;\n stroke: lime;\n animation: "," 0.5s linear infinite;\n "])),t),W=(0,i.AH)(h||(h=(0,r.A)(["\n stroke-dasharray: 2, 2;\n animation: "," 0.5s linear infinite;\n "])),t),V=(0,i.i7)(p||(p=(0,r.A)(["\n 0%, 100% {\n stroke: rgba(255, 80, 80);\n }\n 50% {\n stroke: rgba(120, 120, 120);\n }\n "]))),H=(e.MidiLink=o.A.path(f||(f=(0,r.A)(["\n ",";\n ",";\n ",";\n fill: none;\n\n animation: ",";\n animation-duration: 0.5s;\n animation-timing-function: ease-in-out;\n animation-iteration-count: infinite;\n pointer-events: auto;\n "])),(e=>e.selected&&n),(e=>e.sending&&z),(e=>e.inCycle&&W),(e=>e.inCycle?V:"none")),e.Node=o.A.div(m||(m=(0,r.A)(["\n background-color: ",";\n opacity: ",";\n border-radius: 5px;\n font-family: sans-serif;\n color: white;\n overflow: visible;\n font-size: 11px;\n border: solid 2px ",";\n * {\n\n box-sizing:border-box\n }\n "])),(e=>e.background),(e=>e.enabled?"1":"0.5"),(e=>e.selected?"rgb(0,192,255)":"black")),e.Title=o.A.div(g||(g=(0,r.A)(["\n background: rgba(0, 0, 0, 0.3);\n display: flex;\n white-space: nowrap;\n justify-items: center;\n "]))),e.TitleName=o.A.div(v||(v=(0,r.A)(["\n flex-grow: 1;\n padding: 5px 5px;\n "]))),e.Ports=o.A.div(y||(y=(0,r.A)(["\n display: flex;\n background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));\n "]))),e.PortsContainer=o.A.div(b||(b=(0,r.A)(["\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n &:first-of-type {\n\n margin-right: 10px;\n }\n &:only-child {\n\n margin-right: 0px;\n }\n "]))),e.PortLabel=o.A.div(w||(w=(0,r.A)(["\n\t\tdisplay: flex;\n\t\tmargin-top: 1px;\n\t\talign-items: center;\n\t"]))),e.Label=o.A.div(_||(_=(0,r.A)(["\n\t\tpadding: 0 5px;\n\t\tflex-grow: 1;\n\t"]))),e.Port=o.A.div(x||(x=(0,r.A)(["\n\t\twidth: 15px;\n\t\theight: 15px;\n\t\tbackground: ",";\n\n\t\t&:hover {\n\t\t\tbackground: rgb(192, 255, 0);\n\t\t}\n\t"])),(e=>e.sending?"rgba(255, 255, 255, 0.9)":"rgba(255, 255, 255, 0.5)")),e.ExpandButton=o.A.button(S||(S=(0,r.A)(["\n background: ",";\n width: ",";\n float: right;\n padding: 5px 8px;\n border: solid;\n border-width: 2px;\n white-space:nowrap;\n border-color: rgb(60, 60, 60);\n color: white;\n outline: none;\n cursor: pointer;\n float: left;\n margin-top: 1px;\n border-radius: 5px;\n transition: all 0.2s ease-in-out;\n font-family: helvetica;\n font-variant-caps: all-small-caps;\n "])),(e=>e.open?"rgb(50, 100, 50)":"rgb(60, 192, 60)"),(e=>e.open?"100%":"40px")),e.Tooltip=o.A.h2(A||(A=(0,r.A)(["\n font-family: Helvetica, Arial;\n text-align: justify;\n color: lightblue;\n "]))),e.TrayChildrens=o.A.div(C||(C=(0,r.A)(["\n transition: all 0.3s ease-in-out;\n opacity: ",";\n\n width: 100%;\n height: 89vh;\n overflow-y: ",";\n overflow-x: hidden;\n\n &::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 8px;\n border: 3px solid transparent;\n background-clip: content-box;\n background-color: #d55959;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 8px;\n background-color: #121212;\n border: 1px solid #232323;\n }\n "])),(e=>e.open?"1":"0"),(e=>e.open?"auto":"hidden")),e.Tray=o.A.div(k||(k=(0,r.A)(["\n max-width: ",";\n background: rgb(20, 20, 20);\n font-size: 14px;\n transition: all 0.2s ease-in-out;\n "])),(e=>e.open?"200px":"41px")),e.TrayItem=o.A.div(E||(E=(0,r.A)(["\n color: ",";\n font-family: Helvetica, Arial;\n padding: 5px;\n margin: 0px 10px;\n margin-top: ",";\n text-align: ",";\n background: ",";\n border: solid 1px ",";\n border-radius: 5px;\n margin-bottom: 2px;\n margin-left: 2px;\n margin-right: 2px;\n cursor: pointer;\n font-weight: ",";\n "])),(e=>e.textcolor),(e=>e.isLabel?"10px":"0px"),(e=>e.isLabel?"center":"left"),(e=>e.background),(e=>e.color),(e=>e.isLabel?"bold":"unset")),e.GitHubLink=o.A.a(T||(T=(0,r.A)(["\n width: 32px;\n height: 32px;\n margin: 0px;\n "]))),e.GitHub=o.A.img(O||(O=(0,r.A)(["\n width: 32px;\n height: 32px;\n opacity: 50%;\n &:hover {\n opacity: 100%;\n transform: rotate(360deg);\n filter: invert(0.5) sepia(1) saturate(5) hue-rotate(175deg);\n };\n transition: all 0.3s ease-in-out;\n "]))),e.Animation=(0,i.i7)(M||(M=(0,r.A)(["\n to {\n background-position: 250% center;\n }\n "]))));e.WorkspaceTitle=o.A.h2(P||(P=(0,r.A)(["\n background-image: ",";\n background-size: auto auto;\n background-clip: border-box;\n background-size: 200% auto;\n font-family: helvetica;\n margin-right: ",";\n margin-left: ",";\n margin-top:2px;\n color: #fff;\n background-clip: text;\n text-fill-color: transparent;\n -webkit-background-clip: text;\n animation: "," 10s linear infinite;\n display: inline-block;\n text-transform: uppercase;\n font-variant-caps: ",";\n "])),(e=>!0===(e.rightPart||e.middlePart)?"linear-gradient(-225deg,#bbbbdd 0%,#a7d6fa 90%,#ffffff 100%);":"linear-gradient(-225deg,#bbbbbb 0%,#bbbbbb 90%,#ffffff 100%);"),(e=>!0===e.rightPart?"5px":"0px"),(e=>!0===(e.rightPart||e.middlePart)?"0px":"auto"),H,(e=>!0===e.rightPart?"all-small-caps":"normal")),e.Toolbar=o.A.div(R||(R=(0,r.A)(["\n padding: 5px;\n display: flex;\n flex-shrink: 0;\n \n overflow-y: hidden;\n overflow-x: auto;\n\n &::-webkit-scrollbar {\n width: 10px;\n height: 10px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 8px;\n border: 3px solid transparent;\n background-clip: content-box;\n background-color: #d55959;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 8px;\n background-color: #121212;\n border: 1px solid #232323;\n }\n "]))),e.Content=o.A.div(N||(N=(0,r.A)(["\n flex-grow: 1;\n height: 100%;\n "]))),e.WorkspaceContainer=o.A.div(I||(I=(0,r.A)(["\n background: black;\n display: flex;\n flex-direction: column;\n height: 100%;\n border-radius: 5px;\n overflow: hidden;\n "]))),e.Disqus=o.A.div(L||(L=(0,r.A)(["\n display: ",";\n padding-top: 10px;\n padding-bottom: 10px;\n padding-left: 30px;\n padding-right: 30px;\n overflow: auto;\n height: 50%;\n width: 50%;\n position: absolute;\n bottom: 0;\n right: 0;\n border: 1px;\n border-style: inset;\n border-color: #0096ff;\n background-color: #202020;\n\n &::-webkit-scrollbar {\n width: 12px;\n }\n\n &::-webkit-scrollbar-thumb {\n border-radius: 8px;\n border: 3px solid transparent;\n background-clip: content-box;\n background-color: #d55959;\n }\n\n &::-webkit-scrollbar-track {\n border-radius: 8px;\n background-color: #121212;\n border: 1px solid #232323;\n }\n "])),(e=>e.visible?"block":"none")),e.Body=o.A.div(D||(D=(0,r.A)(["\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n min-height: 100%;\n "]))),e.Header=o.A.div(j||(j=(0,r.A)(["\n display: flex;\n background: rgb(30, 30, 30);\n flex-grow: 0;\n flex-shrink: 0;\n color: white;\n font-family: Helvetica, Arial, sans-serif;\n padding: 10px;\n align-items: center;\n "]))),e.MainContent=o.A.div(F||(F=(0,r.A)(["\n display: flex;\n flex-grow: 1;\n "]))),e.Layer=o.A.div(B||(B=(0,r.A)(["\n position: relative;\n flex-grow: 1;\n "]))),e.ScrollDiv=o.A.div(U||(U=(0,r.A)(["\n max-height: 400px;\n overflow-y: auto;\n "])))}(z||(z={}))},95624:(e,t,n)=>{"use strict";n.d(t,{B:()=>c,s:()=>l});var r=n(38657),o=n(9950),i=n(56717),s=n(44414);const a=e=>{const[t,n]=o.useState(!1);return o.useEffect((()=>{e.link.setRefreshCallback((()=>{n(!t)}))})),(0,s.jsx)(r.Is,{link:e.link,diagramEngine:e.diagramEngine})};class l extends r.E${constructor(){super("midi-link")}generateReactWidget(e){return(0,s.jsx)(a,{link:e.model,diagramEngine:this.engine})}generateModel(){return new c}generateLinkSegment(e,t,n){return(0,s.jsx)(i.S.MidiLink,{selected:t,sending:e.sending,inCycle:e.inCycle,stroke:t?e.getOptions().selectedColor:e.getOptions().color,strokeWidth:e.getOptions().width,d:n})}}class c extends r.X0{setRefreshCallback(e){this.refreshCallback=e}setInCycle(e){const t=this.inCycle!==e;var n;(this.inCycle=e,t)&&(null===(n=this.refreshCallback)||void 0===n||n.call(this))}setSending(e){const t=this.sending!==e;if(this.sending=e,this.sending){const e=this;void 0!=this.sendingTimeout&&clearTimeout(this.sendingTimeout),this.sendingTimeout=setTimeout((function(){e.setSending(!1)}),100)}var n;t&&(null===(n=this.refreshCallback)||void 0===n||n.call(this))}constructor(){super({type:"midi-link",width:3}),this.sending=void 0,this.inCycle=void 0,this.sendingTimeout=void 0,this.refreshCallback=void 0,this.options.extras=!1,this.sending=!1,this.inCycle=!1}}},87828:(e,t,n)=>{"use strict";n.d(t,{uy:()=>D,Jt:()=>L,EU:()=>j});var r=n(9950),o=n(55858),i=n(38657),s=n(61619),a=n(77910),l=n(33525),c=n(56717),u=n(25333),d=n(63341),h=n(98587),p=n(58168),f=n(72004),m=n(74061),g=n(99269),v=n(59254),y=n(19608),b=n(48283),w=n(13372),_=n(8079),x=n(79044),S=n(31506),A=n(80863);const C=(0,A.A)("MuiDivider",["root","absolute","fullWidth","inset","middle","flexItem","light","vertical","withChildren","withChildrenVertical","textAlignRight","textAlignLeft","wrapper","wrapperVertical"]);const k=(0,A.A)("MuiListItemIcon",["root","alignItemsFlexStart"]);const E=(0,A.A)("MuiListItemText",["root","multiline","dense","inset","primary","secondary"]);var T=n(68483);function O(e){return(0,T.Ay)("MuiMenuItem",e)}const M=(0,A.A)("MuiMenuItem",["root","focusVisible","dense","disabled","divider","gutters","selected"]);var P=n(44414);const R=["autoFocus","component","dense","divider","disableGutters","focusVisibleClassName","role","tabIndex","className"],N=(0,v.Ay)(_.A,{shouldForwardProp:e=>(0,y.A)(e)||"classes"===e,name:"MuiMenuItem",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.dense&&t.dense,n.divider&&t.divider,!n.disableGutters&&t.gutters]}})((e=>{let{theme:t,ownerState:n}=e;return(0,p.A)({},t.typography.body1,{display:"flex",justifyContent:"flex-start",alignItems:"center",position:"relative",textDecoration:"none",minHeight:48,paddingTop:6,paddingBottom:6,boxSizing:"border-box",whiteSpace:"nowrap"},!n.disableGutters&&{paddingLeft:16,paddingRight:16},n.divider&&{borderBottom:"1px solid ".concat((t.vars||t).palette.divider),backgroundClip:"padding-box"},{"&:hover":{textDecoration:"none",backgroundColor:(t.vars||t).palette.action.hover,"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(M.selected)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,g.X4)(t.palette.primary.main,t.palette.action.selectedOpacity),["&.".concat(M.focusVisible)]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.focusOpacity,"))"):(0,g.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.focusOpacity)}},["&.".concat(M.selected,":hover")]:{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / calc(").concat(t.vars.palette.action.selectedOpacity," + ").concat(t.vars.palette.action.hoverOpacity,"))"):(0,g.X4)(t.palette.primary.main,t.palette.action.selectedOpacity+t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.primary.mainChannel," / ").concat(t.vars.palette.action.selectedOpacity,")"):(0,g.X4)(t.palette.primary.main,t.palette.action.selectedOpacity)}},["&.".concat(M.focusVisible)]:{backgroundColor:(t.vars||t).palette.action.focus},["&.".concat(M.disabled)]:{opacity:(t.vars||t).palette.action.disabledOpacity},["& + .".concat(C.root)]:{marginTop:t.spacing(1),marginBottom:t.spacing(1)},["& + .".concat(C.inset)]:{marginLeft:52},["& .".concat(E.root)]:{marginTop:0,marginBottom:0},["& .".concat(E.inset)]:{paddingLeft:36},["& .".concat(k.root)]:{minWidth:36}},!n.dense&&{[t.breakpoints.up("sm")]:{minHeight:"auto"}},n.dense&&(0,p.A)({minHeight:32,paddingTop:4,paddingBottom:4},t.typography.body2,{["& .".concat(k.root," svg")]:{fontSize:"1.25rem"}}))})),I=r.forwardRef((function(e,t){const n=(0,b.A)({props:e,name:"MuiMenuItem"}),{autoFocus:o=!1,component:i="li",dense:s=!1,divider:a=!1,disableGutters:l=!1,focusVisibleClassName:c,role:u="menuitem",tabIndex:d,className:g}=n,v=(0,h.A)(n,R),y=r.useContext(w.A),_=r.useMemo((()=>({dense:s||y.dense||!1,disableGutters:l})),[y.dense,s,l]),A=r.useRef(null);(0,x.A)((()=>{o&&A.current&&A.current.focus()}),[o]);const C=(0,p.A)({},n,{dense:_.dense,divider:a,disableGutters:l}),k=(e=>{const{disabled:t,dense:n,divider:r,disableGutters:o,selected:i,classes:s}=e,a={root:["root",n&&"dense",t&&"disabled",!o&&"gutters",r&&"divider",i&&"selected"]},l=(0,m.A)(a,O,s);return(0,p.A)({},s,l)})(n),E=(0,S.A)(A,t);let T;return n.disabled||(T=void 0!==d?d:-1),(0,P.jsx)(w.A.Provider,{value:_,children:(0,P.jsx)(N,(0,p.A)({ref:E,role:u,tabIndex:T,component:i,focusVisibleClassName:(0,f.A)(k.focusVisible,c),className:(0,f.A)(k.root,g)},v,{ownerState:C,classes:k}))})}));class L extends i.iL{constructor(e,t,n){super({type:null!==t&&void 0!==t?t:"machine",name:(null!==n&&void 0!==n?n:e.getFactory()).getName(),color:(0,a.G5)((null!==n&&void 0!==n?n:e.getFactory()).getType())}),this.portsIn=void 0,this.portsOut=void 0,this.machine=void 0,this.portsOut=[],this.portsIn=[],this.machine=e,this.machine.setNode(this),this.registerListener({entityRemoved:e=>{this.dispose()}})}dispose(){this.machine.dispose()}serialize(){return{...super.serialize(),machineName:this.machine.getFactory().getName(),state:this.machine.getState()}}getInPorts(){return this.portsIn}getOutPorts(){return this.portsOut}removePort(e){if(e.getOptions().in){const t=this.portsIn.indexOf(e);this.portsIn.splice(t,1)}else{const t=this.portsOut.indexOf(e);this.portsOut.splice(t,1)}super.removePort(e)}addPort(e){return super.addPort(e),e.getOptions().in?-1===this.portsIn.indexOf(e)&&this.portsIn.push(e):-1===this.portsOut.indexOf(e)&&this.portsOut.push(e),e}addMachineOutPort(e,t){const n=new l.c8({in:!1,name:e,label:e,alignment:i.wD.RIGHT},t);return this.addPort(n)}addMachineInPort(e,t){const n=new l.c8({in:!0,name:e,label:e,alignment:i.wD.LEFT},t);return this.addPort(n)}getMachinePorts(){return this.getPorts()}}class D extends s.IT{constructor(e){super("machine"),this.factories=void 0,this.factories=e}generateReactWidget(e){return(0,P.jsx)(j,{engine:this.engine,node:e.model})}generateModel(e){return e.initialConfig.machineName=e.initialConfig.machineName.replace(/(Machine)(?!.*\1)/,""),this.factories[e.initialConfig.machineName]||window.alert("Unknown machine "+e.initialConfig.machineName+"\r\nKnown machines:\r\n"+Object.keys(this.factories)),new L(this.factories[e.initialConfig.machineName].createMachine(e.initialConfig.state),"machine")}}const j=e=>{function t(t){return(0,P.jsx)(l.bd,{engine:e.engine,port:t},t.getID())}function n(t){e.node.setLocked(!t)}const[i,s]=r.useState(null),a=Boolean(i),h=()=>{s(null)};return(0,P.jsxs)(c.S.Node,{"data-default-node-name":e.node.getOptions().name,selected:e.node.isSelected(),background:e.node.getOptions().color,enabled:e.node.machine.isEnabled(),children:[(0,P.jsxs)(c.S.Title,{children:[(0,P.jsx)(c.S.TitleName,{children:e.node.getOptions().name+(e.node.machine.isEnabled()?"":" (disabled)")}),(0,P.jsx)(u.A,{"aria-label":"settings",size:"small",style:{margin:0},onClick:e=>{s(e.currentTarget)},children:(0,P.jsx)(o.A,{fontSize:"inherit",style:{margin:0,color:"white"}})}),(0,P.jsxs)(d.A,{anchorEl:i,open:a,onClose:h,children:[(0,P.jsx)(I,{style:{margin:0},onClick:()=>{const t=e.node.machine.getFactory().createMachine(e.node.machine.getState()).getNode();e.engine.getModel().addAll(t),h(),e.engine.repaintCanvas()},children:"Duplicate"}),(0,P.jsx)(I,{style:{margin:0},onClick:()=>{e.node.machine.setEnabled(!e.node.machine.isEnabled()),h(),e.engine.repaintCanvas()},children:e.node.machine.isEnabled()?"Disable":"Enable"}),(0,P.jsx)(I,{style:{margin:0},onClick:()=>{Object.keys(e.node.getMachinePorts()).forEach((t=>{const n=e.node.getMachinePorts()[t];Object.keys(n.getLinks()).forEach((e=>n.getLinks()[e].remove()))})),e.engine.getModel().removeNode(e.node),h(),e.engine.repaintCanvas()},children:"Delete"})]})]}),(0,P.jsxs)(c.S.Ports,{children:[(0,P.jsx)(c.S.PortsContainer,{children:Object.values(e.node.getInPorts()).map(t)}),(0,P.jsx)(c.S.PortsContainer,{children:Object.values(e.node.getOutPorts()).map(t)})]}),e.customWidget&&(0,P.jsx)("div",{onMouseOver:()=>n(!1),onMouseOut:()=>n(!0),children:e.customWidget})]})}},33525:(e,t,n)=>{"use strict";n.d(t,{bd:()=>d,c8:()=>c,lC:()=>u});var r=n(38657),o=n(61619),i=n(9950),s=n(95624),a=n(56717),l=n(44414);class c extends r.QO{setPortActiveCallback(e){this.sendingCallback=e}constructor(e,t){super({...e,type:"machine"}),this.channel=void 0,this.isIn=void 0,this.portActive=void 0,this.sendingTimeout=void 0,this.sendingCallback=void 0,this.current=c.counter++,this.channel=null!==t&&void 0!==t?t:-1,this.isIn=e.in,this.portActive=!1}createLinkModel(){return new s.B}serialize(){return{...super.serialize(),isIn:this.isIn,channel:this.channel}}deserialize(e){super.deserialize(e),this.isIn=e.data.isIn,this.channel=e.data.channel}setSending(e){if(this.portActive!==e){var t;if(this.portActive=e,this.portActive){const e=this;void 0!=this.sendingTimeout&&clearTimeout(this.sendingTimeout),this.sendingTimeout=setTimeout((function(){e.setSending(!1)}),100)}null===(t=this.sendingCallback)||void 0===t||t.call(this,e)}}}c.counter=0;class u extends o.U6{constructor(){super("machine")}generateModel(e){return new c({in:!0,name:e.name,label:e.label,alignment:e.alignment},1)}}const d=e=>{const[t,n]=i.useState(e.port.portActive);e.port.setPortActiveCallback((e=>n(e)));const o=(0,l.jsx)(r._F,{engine:e.engine,port:e.port,children:(0,l.jsx)(a.S.Port,{sending:t})}),s=(0,l.jsx)(a.S.Label,{children:e.port.getOptions().label});return(0,l.jsxs)(a.S.PortLabel,{children:[e.port.getOptions().in?o:s,e.port.getOptions().in?s:o]})}},1122:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ArpMachine:()=>y});var r=n(9950),o=n(23235),i=n(44414);const s=(0,o.A)((0,i.jsx)("path",{d:"M16.5 12c0-1.77-1.02-3.29-2.5-4.03v2.21l2.45 2.45c.03-.2.05-.41.05-.63m2.5 0c0 .94-.2 1.82-.54 2.64l1.51 1.51C20.63 14.91 21 13.5 21 12c0-4.28-2.99-7.86-7-8.77v2.06c2.89.86 5 3.54 5 6.71M4.27 3 3 4.27 7.73 9H3v6h4l5 5v-6.73l4.25 4.25c-.67.52-1.42.93-2.25 1.18v2.06c1.38-.31 2.63-.95 3.69-1.81L19.73 21 21 19.73l-9-9zM12 4 9.91 6.09 12 8.18z"}),"VolumeOff"),a=(0,o.A)((0,i.jsx)("path",{d:"M3 9v6h4l5 5V4L7 9zm13.5 3c0-1.77-1.02-3.29-2.5-4.03v8.05c1.48-.73 2.5-2.25 2.5-4.02M14 3.23v2.06c2.89.86 5 3.54 5 6.71s-2.11 5.85-5 6.71v2.06c4.01-.91 7-4.49 7-8.77s-2.99-7.86-7-8.77"}),"VolumeUp");var l,c,u=n(31902),d=n(58747),h=n(60123),p=n(66310),f=n(25333),m=n(802),g=n(46497),v=n(77910);let y=(0,v.Wn)((c=class e extends v.yC{getFactory(){return e.factory}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),getName:()=>"Arp",createWidget:(e,t)=>(0,i.jsx)(b,{engine:e,size:50,machine:t.machine}),getType:()=>v.OB.Emitter,getTooltip:()=>"Reads CLOCK message and sends out arpeggiated notes ; add notes to the arpeggiato with the + button",getMachineCode:()=>"arp"}),this.factory}constructor(e){super(),this.config=void 0,this.arpIndex=0,this.clockIndex=0,this.previousNote=void 0,void 0==e?(this.config={arpMode:"predefined",keyboardNotes:[],predefinedNotes:[{muted:!1,noteValue:"C",octave:3},{muted:!1,noteValue:"E",octave:3},{muted:!1,noteValue:"G",octave:3}],octaves:1,arpStyle:"up",notesToPlay:[]},this.setState(this.config)):this.config=e,this.getNode().addMachineInPort("Clock",0),this.getNode().addMachineOutPort("Out",0)}applyArpStyle(e,t){switch(e){case"down":return t.reverse();case"updown":const e=t.slice();return e.shift(),e.reverse(),e.shift(),t.concat(e);case"updown2":return t.concat(t.slice().reverse());default:return t}}setState(e,t){const n="predefined"==e.arpMode?e.predefinedNotes.slice():(null!==t&&void 0!==t?t:this.config.keyboardNotes).slice();for(let o=1;on.push({noteValue:e.noteValue,muted:e.muted,octave:e.octave+o})));const r=this.applyArpStyle(e.arpStyle,n);this.arpIndex>=r.length&&(this.arpIndex=Math.max(0,r.length-1)),"predefined"==e.arpMode?this.config.predefinedNotes.length!==e.predefinedNotes.length&&(this.clockIndex=0,this.arpIndex=0,void 0!=this.previousNote&&this.emit({message:{rawData:this.previousNote,isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},0),this.emit(m.l8.allnotesoff,0)):this.arpIndex=Math.min(this.arpIndex,r.length),0===r.length&&(void 0!=this.previousNote&&this.emit({message:{rawData:this.previousNote,isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},0),this.emit(m.l8.allnotesoff,0)),this.config={...e,keyboardNotes:null!==t&&void 0!==t?t:this.config.keyboardNotes,notesToPlay:r}}getState(){return this.config}removeKeyboardNote(e){let[t,n]=e;this.setState(this.config,this.config.keyboardNotes.filter((e=>e.noteValue!=t||e.octave!=n)))}addKeyboardNote(e){let[t,n]=e;this.setState(this.config,this.config.keyboardNotes.concat({noteValue:t,octave:n,muted:!1}))}receive(e,t){switch(e.type){case"start":return this.emit(e,0),this.arpIndex=0,v.LB.Processed;case"stop":return this.clockIndex=0,void 0!=this.previousNote&&this.emit({message:{rawData:this.previousNote,isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},0),this.emit(e,0),v.LB.Processed;case"clock":const t="predefined"==this.config.arpMode?this.config.predefinedNotes:this.config.keyboardNotes,n=Math.floor(24/t.length);if(0!==t.length&&void 0!=this.emit&&(this.clockIndex=(this.clockIndex+1)%n,0===this.clockIndex)){const e=this.config.notesToPlay[this.arpIndex];if(void 0!=this.previousNote&&this.emit({message:{rawData:this.previousNote,isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},0),this.arpIndex="random"===this.config.arpStyle?Math.floor(Math.random()*this.config.notesToPlay.length):(this.arpIndex+1)%this.config.notesToPlay.length,!e.muted){const t=(0,m.GW)(e.noteValue+e.octave);this.emit({message:{rawData:t,isChannelMessage:!0,type:"noteon",channel:0},type:"noteon"},0),this.previousNote=t}}return v.LB.Processed;case"noteon":return 0===e.message.rawData[2]?this.removeKeyboardNote((0,m.Zz)(e.message.rawData[1])):this.addKeyboardNote((0,m.Zz)(e.message.rawData[1])),v.LB.Processed;case"noteoff":return this.removeKeyboardNote((0,m.Zz)(e.message.rawData[1])),v.LB.Processed;default:return v.LB.Ignored}}},c.factory=void 0,l=c))||l;const b=e=>{const[t,n]=r.useState(e.machine.getState());function o(t){e.machine.setState(t),n(t)}function l(e){return m.Nw.indexOf(e)}const c="predefined"===t.arpMode?(0,i.jsxs)(g.S.SettingsBarVertical,{children:[t.predefinedNotes.map(((e,n)=>(0,i.jsxs)(g.S.Note,{children:[(0,i.jsx)(h.Ay,{sx:{"& input[type='range']":{WebkitAppearance:"slider-vertical"}},step:1,style:{marginTop:10,marginBottom:10},orientation:"vertical",defaultValue:0,max:11,value:l(e.noteValue),valueLabelDisplay:"off",onChange:(e,r)=>{"number"===typeof r&&(t.predefinedNotes[n].noteValue=m.Nw[r],o({...t,predefinedNotes:t.predefinedNotes}))}}),(0,i.jsxs)(g.S.SettingsBarVertical,{style:{margin:0,padding:0},children:[(0,i.jsx)(p.A,{"aria-label":"add note",icon:(0,i.jsx)(s,{}),style:{margin:0,padding:0},checkedIcon:(0,i.jsx)(a,{}),checked:!e.muted,onChange:e=>{t.predefinedNotes[n].muted=!e.target.checked,o({...t,predefinedNotes:t.predefinedNotes})}}),(0,i.jsx)(f.A,{"aria-label":"remove note",color:"error",size:"small",style:{margin:0,padding:0},onClick:()=>{t.predefinedNotes.splice(n,1),o({...t,predefinedNotes:t.predefinedNotes})},children:(0,i.jsx)(u.A,{})})]}),e.noteValue+e.octave]},n))),(0,i.jsx)(f.A,{"aria-label":"add note",color:"primary",onClick:()=>o({...t,predefinedNotes:t.predefinedNotes.concat({muted:!1,noteValue:"C",octave:3})}),children:(0,i.jsx)(d.A,{})})]}):void 0;return(0,i.jsxs)(g.S.SettingsBarHorizontal,{children:[(0,i.jsxs)(g.S.Dropdown,{children:[(0,i.jsx)("span",{children:"Mode: "}),(0,i.jsxs)("select",{name:"arpmode",value:t.arpMode,onChange:e=>{o({...t,arpMode:e.target.value})},children:[(0,i.jsx)("option",{value:"predefined",children:"Predefined"}),(0,i.jsx)("option",{value:"keyboard",children:"Keyboard"})]})]}),c,t.octaves+" octaves",(0,i.jsx)(h.Ay,{"aria-label":"Octaves",min:1,max:4,onChange:(e,n)=>{"number"===typeof n&&o({...t,octaves:n})},value:t.octaves}),(0,i.jsxs)(g.S.Dropdown,{children:[(0,i.jsx)("span",{children:"Style: "}),(0,i.jsxs)("select",{name:"arpstyle",value:t.arpStyle,onChange:e=>{o({...t,arpStyle:e.target.value})},children:[(0,i.jsx)("option",{value:"up",children:"Up"}),(0,i.jsx)("option",{value:"down",children:"Down"}),(0,i.jsx)("option",{value:"updown",children:"UpDown"}),(0,i.jsx)("option",{value:"updown2",children:"UpDown2"}),(0,i.jsx)("option",{value:"random",children:"Random"})]})]})]})}},28727:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ClockMachine:()=>G});var r=n(89490),o=n(9950),i=n(98587),s=n(58168),a=(n(26429),n(72004)),l=n(74061);var c=n(59254),u=n(48283),d=n(61676),h=n(80863),p=n(68483);function f(e){return(0,p.Ay)("MuiToggleButtonGroup",e)}const m=(0,h.A)("MuiToggleButtonGroup",["root","selected","vertical","disabled","grouped","groupedHorizontal","groupedVertical","fullWidth","firstButton","lastButton","middleButton"]);const g=o.createContext({});const v=o.createContext(void 0);function y(e){return(0,p.Ay)("MuiToggleButton",e)}const b=(0,h.A)("MuiToggleButton",["root","disabled","selected","standard","primary","secondary","sizeSmall","sizeMedium","sizeLarge","fullWidth"]);var w=n(44414);const _=["children","className","color","disabled","exclusive","fullWidth","onChange","orientation","size","value"],x=(0,c.Ay)("div",{name:"MuiToggleButtonGroup",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(m.grouped)]:t.grouped},{["& .".concat(m.grouped)]:t["grouped".concat((0,d.A)(n.orientation))]},{["& .".concat(m.firstButton)]:t.firstButton},{["& .".concat(m.lastButton)]:t.lastButton},{["& .".concat(m.middleButton)]:t.middleButton},t.root,"vertical"===n.orientation&&t.vertical,n.fullWidth&&t.fullWidth]}})((e=>{let{ownerState:t,theme:n}=e;return(0,s.A)({display:"inline-flex",borderRadius:(n.vars||n).shape.borderRadius},"vertical"===t.orientation&&{flexDirection:"column"},t.fullWidth&&{width:"100%"},{["& .".concat(m.grouped)]:(0,s.A)({},"horizontal"===t.orientation?{["&.".concat(m.selected," + .").concat(m.grouped,".").concat(m.selected)]:{borderLeft:0,marginLeft:0}}:{["&.".concat(m.selected," + .").concat(m.grouped,".").concat(m.selected)]:{borderTop:0,marginTop:0}})},"horizontal"===t.orientation?{["& .".concat(m.firstButton,",& .").concat(m.middleButton)]:{borderTopRightRadius:0,borderBottomRightRadius:0},["& .".concat(m.lastButton,",& .").concat(m.middleButton)]:{marginLeft:-1,borderLeft:"1px solid transparent",borderTopLeftRadius:0,borderBottomLeftRadius:0}}:{["& .".concat(m.firstButton,",& .").concat(m.middleButton)]:{borderBottomLeftRadius:0,borderBottomRightRadius:0},["& .".concat(m.lastButton,",& .").concat(m.middleButton)]:{marginTop:-1,borderTop:"1px solid transparent",borderTopLeftRadius:0,borderTopRightRadius:0}},"horizontal"===t.orientation?{["& .".concat(m.lastButton,".").concat(b.disabled,",& .").concat(m.middleButton,".").concat(b.disabled)]:{borderLeft:"1px solid transparent"}}:{["& .".concat(m.lastButton,".").concat(b.disabled,",& .").concat(m.middleButton,".").concat(b.disabled)]:{borderTop:"1px solid transparent"}})})),S=o.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiToggleButtonGroup"}),{children:r,className:c,color:h="standard",disabled:p=!1,exclusive:m=!1,fullWidth:y=!1,onChange:b,orientation:S="horizontal",size:A="medium",value:C}=n,k=(0,i.A)(n,_),E=(0,s.A)({},n,{disabled:p,fullWidth:y,orientation:S,size:A}),T=(e=>{const{classes:t,orientation:n,fullWidth:r,disabled:o}=e,i={root:["root","vertical"===n&&"vertical",r&&"fullWidth"],grouped:["grouped","grouped".concat((0,d.A)(n)),o&&"disabled"],firstButton:["firstButton"],lastButton:["lastButton"],middleButton:["middleButton"]};return(0,l.A)(i,f,t)})(E),O=o.useCallback(((e,t)=>{if(!b)return;const n=C&&C.indexOf(t);let r;C&&n>=0?(r=C.slice(),r.splice(n,1)):r=C?C.concat(t):[t],b(e,r)}),[b,C]),M=o.useCallback(((e,t)=>{b&&b(e,C===t?null:t)}),[b,C]),P=o.useMemo((()=>({className:T.grouped,onChange:m?M:O,value:C,size:A,fullWidth:y,color:h,disabled:p})),[T.grouped,m,M,O,C,A,y,h,p]),R=function(e){return o.Children.toArray(e).filter((e=>o.isValidElement(e)))}(r),N=R.length,I=e=>{const t=0===e,n=e===N-1;return t&&n?"":t?T.firstButton:n?T.lastButton:T.middleButton};return(0,w.jsx)(x,(0,s.A)({role:"group",className:(0,a.A)(T.root,c),ref:t,ownerState:E},k,{children:(0,w.jsx)(g.Provider,{value:P,children:R.map(((e,t)=>(0,w.jsx)(v.Provider,{value:I(t),children:e},t)))})}))}));var A=n(57661),C=n(63999),k=n(68935);function E(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,k.A)(e,t,n)}function T(e){if(e.type)return e;if("#"===e.charAt(0))return T(function(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,C.A)(9,e));let r,o=e.substring(t+1,e.length-1);if("color"===n){if(o=o.split(" "),r=o.shift(),4===o.length&&"/"===o[3].charAt(0)&&(o[3]=o[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,C.A)(10,r))}else o=o.split(",");return o=o.map((e=>parseFloat(e))),{type:n,values:o,colorSpace:r}}function O(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function M(e,t){return e=T(e),t=E(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,O(e)}var P=n(8079);function R(e,t){return void 0!==t&&void 0!==e&&(Array.isArray(t)?t.indexOf(e)>=0:e===t)}const N=["value"],I=["children","className","color","disabled","disableFocusRipple","fullWidth","onChange","onClick","selected","size","value"],L=(0,c.Ay)(P.A,{name:"MuiToggleButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["size".concat((0,d.A)(n.size))]]}})((e=>{let t,{theme:n,ownerState:r}=e,o="standard"===r.color?n.palette.text.primary:n.palette[r.color].main;return n.vars&&(o="standard"===r.color?n.vars.palette.text.primary:n.vars.palette[r.color].main,t="standard"===r.color?n.vars.palette.text.primaryChannel:n.vars.palette[r.color].mainChannel),(0,s.A)({},n.typography.button,{borderRadius:(n.vars||n).shape.borderRadius,padding:11,border:"1px solid ".concat((n.vars||n).palette.divider),color:(n.vars||n).palette.action.active},r.fullWidth&&{width:"100%"},{["&.".concat(b.disabled)]:{color:(n.vars||n).palette.action.disabled,border:"1px solid ".concat((n.vars||n).palette.action.disabledBackground)},"&:hover":{textDecoration:"none",backgroundColor:n.vars?"rgba(".concat(n.vars.palette.text.primaryChannel," / ").concat(n.vars.palette.action.hoverOpacity,")"):M(n.palette.text.primary,n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},["&.".concat(b.selected)]:{color:o,backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):M(o,n.palette.action.selectedOpacity),"&:hover":{backgroundColor:n.vars?"rgba(".concat(t," / calc(").concat(n.vars.palette.action.selectedOpacity," + ").concat(n.vars.palette.action.hoverOpacity,"))"):M(o,n.palette.action.selectedOpacity+n.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:n.vars?"rgba(".concat(t," / ").concat(n.vars.palette.action.selectedOpacity,")"):M(o,n.palette.action.selectedOpacity)}}}},"small"===r.size&&{padding:7,fontSize:n.typography.pxToRem(13)},"large"===r.size&&{padding:15,fontSize:n.typography.pxToRem(15)})})),D=o.forwardRef((function(e,t){const n=o.useContext(g),{value:r}=n,c=(0,i.A)(n,N),h=o.useContext(v),p=(0,A.A)((0,s.A)({},c,{selected:R(e.value,r)}),e),f=(0,u.A)({props:p,name:"MuiToggleButton"}),{children:m,className:b,color:_="standard",disabled:x=!1,disableFocusRipple:S=!1,fullWidth:C=!1,onChange:k,onClick:E,selected:T,size:O="medium",value:M}=f,P=(0,i.A)(f,I),D=(0,s.A)({},f,{color:_,disabled:x,disableFocusRipple:S,fullWidth:C,size:O}),j=(e=>{const{classes:t,fullWidth:n,selected:r,disabled:o,size:i,color:s}=e,a={root:["root",r&&"selected",o&&"disabled",n&&"fullWidth","size".concat((0,d.A)(i)),s]};return(0,l.A)(a,y,t)})(D),F=h||"";return(0,w.jsx)(L,(0,s.A)({className:(0,a.A)(c.className,j.root,b,F),disabled:x,focusRipple:!S,ref:t,onClick:e=>{E&&(E(e,M),e.defaultPrevented)||k&&k(e,M)},onChange:k,value:M,ownerState:D,"aria-pressed":T},P,{children:m}))}));var j=n(23235);const F=(0,j.A)((0,w.jsx)("path",{d:"M6 19h4V5H6zm8-14v14h4V5z"}),"PauseOutlined"),B=(0,j.A)((0,w.jsx)("path",{d:"M6 13c0-1.65.67-3.15 1.76-4.24L6.34 7.34C4.9 8.79 4 10.79 4 13c0 4.08 3.05 7.44 7 7.93v-2.02c-2.83-.48-5-2.94-5-5.91m14 0c0-4.42-3.58-8-8-8-.06 0-.12.01-.18.01l1.09-1.09L11.5 2.5 8 6l3.5 3.5 1.41-1.41-1.08-1.08c.06 0 .12-.01.17-.01 3.31 0 6 2.69 6 6 0 2.97-2.17 5.43-5 5.91v2.02c3.95-.49 7-3.85 7-7.93"}),"RestartAltOutlined");var U,z,W=n(46497),V=n(77910),H=n(802);let G=(0,V.Wn)((z=class e extends V.yC{hasWorker(){return void 0!=this.worker}dispose(){var e;this.worker.postMessage("stop"),null===(e=this.worker)||void 0===e||e.terminate(),this.emit(H.l8.stop,0)}getFactory(){return e.factory}setState(e){void 0!=e.status&&(this.state.tempo!==e.tempo&&this.worker.postMessage({tempo:e.tempo}),this.state.status!==e.status&&this.emit(H.l8[e.status],0),"stop"===this.state.status&&"stop"!==e.status&&(this.emit(H.l8.allnotesoff,0),this.emit(H.l8.allsoundoff,0),this.worker.postMessage("start")),"stop"===e.status&&(this.worker.postMessage("stop"),this.emit(H.l8.allnotesoff,0),this.emit(H.l8.allsoundoff,0)),this.state=e)}getState(){return this.state}constructor(t){super(),this.state=void 0,this.worker=void 0,this.state=null!==t&&void 0!==t?t:{tempo:110,status:"stop"},this.state={...this.state,status:"stop"};let n=e.workerFunction.toString(),r=n.substring(n.indexOf("{")+1,n.lastIndexOf("}")),o=new Blob([r],{type:"application/javascript"}),i=URL.createObjectURL(o);const s=this;this.worker=new Worker(i),this.worker.onmessage=function(e){s.emit(H.l8.clock,0)},this.worker.postMessage({tempo:this.state.tempo}),this.getNode().addMachineOutPort("Out",0)}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,w.jsx)(q,{engine:e,size:50,machine:t.machine}),getName:()=>"Clock",getType:()=>V.OB.System,getTooltip:()=>"Emits CLOCK message which can be used to command MIDI targets (on their system port) or Midispatcher's arpeggiator",getMachineCode:()=>"clock"}),this.factory}},z.factory=void 0,z.workerFunction=function(){let e,t=0,n=110;function r(){postMessage(null);const o=performance.now();0===t&&(t=o),t+=n;e&&setTimeout((()=>r()),t-o)}onmessage=o=>{"start"===o.data?(e=!0,t=performance.now(),setTimeout((()=>r()),0)):o.data.tempo?n=6e4/(24*o.data.tempo):"stop"===o.data&&(e=!1)}},U=z))||U;const q=e=>{const[t,n]=o.useState(e.machine.getState());function i(t){e.machine.setState(t),n(t)}return(0,w.jsxs)(W.S.SettingsBar,{children:[(0,w.jsxs)("span",{children:["Tempo: ",t.tempo]}),(0,w.jsxs)(W.S.Slider,{children:[(0,w.jsx)("input",{type:"range",min:"30",max:"240",step:"1",value:t.tempo,onChange:e=>{i({...t,tempo:Number(e.target.value)})},list:"tempos",name:"tempo"}),(0,w.jsx)("datalist",{id:"volumes",children:(0,w.jsx)("option",{value:"110",label:"Default"})})]}),(0,w.jsxs)(S,{value:t.status,exclusive:!0,onChange:(e,n)=>{i({...t,status:n})},"aria-label":"text alignment",children:[(0,w.jsx)(D,{value:"continue","aria-label":"continue",children:(0,w.jsx)(r.A,{})}),(0,w.jsx)(D,{value:"stop","aria-label":"stop",children:(0,w.jsx)(F,{})}),(0,w.jsxs)(D,{value:"start","aria-label":"start",children:[(0,w.jsx)(B,{}),(0,w.jsx)(r.A,{})]})]})]})}},95642:(e,t,n)=>{"use strict";n.r(t),n.d(t,{NoteGrowMachine:()=>pe,NoteRoundRobinMachine:()=>fe,NoteSplitMachine:()=>de});var r=n(9950),o=n(66310),i=n(98587),s=n(58168),a=n(72004),l=n(74061),c=n(39766),u=n(66455),d=n(68483),h=n(86897),p=n(12860),f=n(70505);const m=["ownerState"],g=["variants"],v=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function y(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const b=(0,p.A)(),w=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function _(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function x(e){return e?(t,n)=>n[e]:null}function S(e,t){let{ownerState:n}=t,r=(0,i.A)(t,m);const o="function"===typeof e?e((0,s.A)({ownerState:n},r)):e;if(Array.isArray(o))return o.flatMap((e=>S(e,(0,s.A)({ownerState:n},r))));if(o&&"object"===typeof o&&Array.isArray(o.variants)){const{variants:e=[]}=o;let t=(0,i.A)(o,g);return e.forEach((e=>{let o=!0;"function"===typeof e.props?o=e.props((0,s.A)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(o=!1)})),o&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,s.A)({ownerState:n},r,n)):e.style))})),t}return o}const A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=b,rootShouldForwardProp:r=y,slotShouldForwardProp:o=y}=e,a=e=>(0,f.A)((0,s.A)({},e,{theme:_((0,s.A)({},e,{defaultTheme:n,themeId:t}))}));return a.__mui_systemSx=!0,function(e){let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,h.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:c,slot:d,skipVariantsResolver:p,skipSx:f,overridesResolver:m=x(w(d))}=l,g=(0,i.A)(l,v),b=void 0!==p?p:d&&"Root"!==d&&"root"!==d||!1,A=f||!1;let C=y;"Root"===d||"root"===d?C=r:d?C=o:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const k=(0,h.default)(e,(0,s.A)({shouldForwardProp:C,label:undefined},g)),E=e=>"function"===typeof e&&e.__emotion_real!==e||(0,u.Q)(e)?r=>S(e,(0,s.A)({},r,{theme:_({theme:r.theme,defaultTheme:n,themeId:t})})):e,T=function(r){let o=E(r);for(var i=arguments.length,l=new Array(i>1?i-1:0),u=1;u{const r=_((0,s.A)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[c]||!r.components[c].styleOverrides)return null;const o=r.components[c].styleOverrides,i={};return Object.entries(o).forEach((t=>{let[n,o]=t;i[n]=S(o,(0,s.A)({},e,{theme:r}))})),m(e,i)})),c&&!b&&d.push((e=>{var r;const o=_((0,s.A)({},e,{defaultTheme:n,themeId:t}));return S({variants:null==o||null==(r=o.components)||null==(r=r[c])?void 0:r.variants},(0,s.A)({},e,{theme:o}))})),A||d.push(a);const h=d.length-l.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");o=[...r,...e],o.raw=[...r.raw,...e]}const p=k(o,...d);return e.muiName&&(p.muiName=e.muiName),p};return k.withConfig&&(T.withConfig=k.withConfig),T}}(),C=A;var k=n(22880),E=n(80237),T=n(28286),O=n(47937),M=n(44414);const P=["component","direction","spacing","divider","children","className","useFlexGap"],R=(0,p.A)(),N=C("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root});function I(e){return(0,k.A)({props:e,name:"MuiStack",defaultTheme:R})}function L(e,t){const n=r.Children.toArray(e).filter(Boolean);return n.reduce(((e,o,i)=>(e.push(o),i{let{ownerState:t,theme:n}=e,r=(0,s.A)({display:"flex",flexDirection:"column"},(0,T.NI)({theme:n},(0,T.kW)({values:t.direction,breakpoints:n.breakpoints.values}),(e=>({flexDirection:e}))));if(t.spacing){const e=(0,O.LX)(n),o=Object.keys(n.breakpoints.values).reduce(((e,n)=>(("object"===typeof t.spacing&&null!=t.spacing[n]||"object"===typeof t.direction&&null!=t.direction[n])&&(e[n]=!0),e)),{}),i=(0,T.kW)({values:t.direction,base:o}),s=(0,T.kW)({values:t.spacing,base:o});"object"===typeof i&&Object.keys(i).forEach(((e,t,n)=>{if(!i[e]){const r=t>0?i[n[t-1]]:"column";i[e]=r}}));const a=(n,r)=>{return t.useFlexGap?{gap:(0,O._W)(e,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{["margin".concat((o=r?i[r]:t.direction,{row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"}[o]))]:(0,O._W)(e,n)}};var o};r=(0,u.A)(r,(0,T.NI)({theme:n},s,a))}return r=(0,T.iZ)(n.breakpoints,r),r};var j=n(59254),F=n(48283);const B=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{createStyledComponent:t=N,useThemeProps:n=I,componentName:o="MuiStack"}=e,c=t(D),u=r.forwardRef((function(e,t){const r=n(e),u=(0,E.A)(r),{component:h="div",direction:p="column",spacing:f=0,divider:m,children:g,className:v,useFlexGap:y=!1}=u,b=(0,i.A)(u,P),w={direction:p,spacing:f,useFlexGap:y},_=(0,l.A)({root:["root"]},(e=>(0,d.Ay)(o,e)),{});return(0,M.jsx)(c,(0,s.A)({as:h,ownerState:w,ref:t,className:(0,a.A)(_.root,v)},b,{children:m?L(g,m):g}))}));return u}({createStyledComponent:(0,j.Ay)("div",{name:"MuiStack",slot:"Root",overridesResolver:(e,t)=>t.root}),useThemeProps:e=>(0,F.A)({props:e,name:"MuiStack"})}),U=B;var z=n(82053),W=n(61676);function V(e){return(0,d.Ay)("MuiFormControlLabel",e)}const H=(0,n(80863).A)("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]);var G=n(68624);const q=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","required","slotProps","value"],Y=(0,j.Ay)("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(H.label)]:t.label},t.root,t["labelPlacement".concat((0,W.A)(n.labelPlacement))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,s.A)({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,["&.".concat(H.disabled)]:{cursor:"default"}},"start"===n.labelPlacement&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},"top"===n.labelPlacement&&{flexDirection:"column-reverse",marginLeft:16},"bottom"===n.labelPlacement&&{flexDirection:"column",marginLeft:16},{["& .".concat(H.label)]:{["&.".concat(H.disabled)]:{color:(t.vars||t).palette.text.disabled}}})})),K=(0,j.Ay)("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(H.error)]:{color:(t.vars||t).palette.error.main}}})),X=r.forwardRef((function(e,t){var n,o;const u=(0,F.A)({props:e,name:"MuiFormControlLabel"}),{className:d,componentsProps:h={},control:p,disabled:f,disableTypography:m,label:g,labelPlacement:v="end",required:y,slotProps:b={}}=u,w=(0,i.A)(u,q),_=(0,c.A)(),x=null!=(n=null!=f?f:p.props.disabled)?n:null==_?void 0:_.disabled,S=null!=y?y:p.props.required,A={disabled:x,required:S};["checked","name","onChange","value","inputRef"].forEach((e=>{"undefined"===typeof p.props[e]&&"undefined"!==typeof u[e]&&(A[e]=u[e])}));const C=(0,G.A)({props:u,muiFormControl:_,states:["error"]}),k=(0,s.A)({},u,{disabled:x,labelPlacement:v,required:S,error:C.error}),E=(e=>{const{classes:t,disabled:n,labelPlacement:r,error:o,required:i}=e,s={root:["root",n&&"disabled","labelPlacement".concat((0,W.A)(r)),o&&"error",i&&"required"],label:["label",n&&"disabled"],asterisk:["asterisk",o&&"error"]};return(0,l.A)(s,V,t)})(k),T=null!=(o=b.typography)?o:h.typography;let O=g;return null==O||O.type===z.A||m||(O=(0,M.jsx)(z.A,(0,s.A)({component:"span"},T,{className:(0,a.A)(E.label,null==T?void 0:T.className),children:O}))),(0,M.jsxs)(Y,(0,s.A)({className:(0,a.A)(E.root,d),ownerState:k,ref:t},w,{children:[r.cloneElement(p,A),S?(0,M.jsxs)(U,{display:"block",children:[O,(0,M.jsxs)(K,{ownerState:k,"aria-hidden":!0,className:E.asterisk,children:["\u2009","*"]})]}):O]}))}));var $=n(16491),Q=n(1183),Z=n(46497),J=n(77910),ee=n(99986),te=n(802),ne=n(23235);const re=(0,ne.A)((0,M.jsx)("path",{d:"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5M7 15c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"}),"ToggleOff"),oe=(0,ne.A)((0,M.jsx)("path",{d:"M17 7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h10c2.76 0 5-2.24 5-5s-2.24-5-5-5m0 8c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3"}),"ToggleOnRounded");var ie,se,ae,le,ce,ue;let de=(0,J.Wn)((se=class e extends J.yC{setState(e){try{(0,te.GW)(e.editNote),(e={...e,noteThreshold:e.editNote}).noteThreshold!==this.config.noteThreshold&&(this.emit(te.l8.allnotesoff,1),this.emit(te.l8.allnotesoff,2))}catch{}this.config=e}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,M.jsx)(he,{engine:e,size:50,machine:t.machine}),getType:()=>J.OB.Processor,getName:()=>"NoteSplit",getTooltip:()=>"Reads notes then dispatches them over 2 channels depending on whether they're above or below a threshold",getMachineCode:()=>"split"}),this.factory}constructor(e){super(),this.config=void 0,this.config=null!==e&&void 0!==e?e:{editNote:"C3",noteThreshold:"C3",broadcastNonNotes:!0,active:!0},this.getNode().addMachineInPort("In",1),this.getNode().addMachineOutPort(ee.fT,0),this.getNode().addMachineOutPort("Channel 1",1),this.getNode().addMachineOutPort("Channel 2",2)}getState(){return this.config}getFactory(){return e.buildFactory()}receive(e,t){if("noteoff"===e.message.type||"noteon"===e.message.type){if(this.config.editNote!==this.config.noteThreshold)return J.LB.Ignored;if(this.config.active){e.message.rawData[1]>(0,te.GW)(this.config.noteThreshold)[1]?this.emit(e,1):this.emit(e,2)}else this.emit(e,1),this.emit(e,2);return J.LB.Processed}return this.config.broadcastNonNotes||"allnotesoff"===e.message.type||"allsoundoff"===e.message.type?(this.emit(e,1),this.emit(e,2),J.LB.Processed):J.LB.Ignored}},se.factory=void 0,ie=se))||ie;const he=e=>{const[t,n]=r.useState(e.machine.getState());function i(t){e.machine.setState(t),n(e.machine.getState())}const s=(0,M.jsx)(o.A,{"aria-label":"enable split",icon:(0,M.jsx)(re,{}),checkedIcon:(0,M.jsx)(oe,{}),style:{margin:0,padding:0},checked:t.active,onChange:e=>i({...t,active:e.target.checked})}),a=(0,M.jsx)(o.A,{"aria-label":"enable non notes",icon:(0,M.jsx)(re,{}),checkedIcon:(0,M.jsx)(oe,{}),style:{margin:0,padding:0},checked:t.broadcastNonNotes,onChange:e=>i({...t,broadcastNonNotes:e.target.checked})});return(0,M.jsxs)(Z.S.SettingsBarHorizontal,{children:[(0,M.jsxs)(Z.S.SettingsBarVertical,{children:[(0,M.jsx)(X,{control:s,label:(0,M.jsx)($.A,{component:"div",fontSize:11,padding:0,margin:0,children:"Active?"}),labelPlacement:"top"}),(0,M.jsx)(X,{control:a,label:(0,M.jsx)($.A,{component:"div",fontSize:11,padding:0,margin:0,children:"Broadcast non-notes?"}),labelPlacement:"top"})]}),(0,M.jsx)(Q.A,{size:"small",label:"Note threshold",variant:"standard",onKeyDown:e=>{"Enter"!==e.key&&"Escape"!==e.key||e.target.blur()},onChange:e=>i({...t,editNote:e.target.value}),value:t.editNote,error:t.editNote!==t.noteThreshold,fullWidth:!0})]})};let pe=(0,J.Wn)((le=class e extends J.yC{getFactory(){return e.factory}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),getType:()=>J.OB.Processor,getName:()=>"NoteGrow",getTooltip:()=>"Reads notes then dispatches them over N voices using the first free voice",getMachineCode:()=>"grow"}),this.factory}getState(){return this.voices}constructor(e){super(),this.activeVoices=void 0,this.usedVoices=void 0,this.voices=void 0,this.voices=null!==e&&void 0!==e?e:Number(window.prompt("How many voices?","8")),this.usedVoices=new Array(this.voices),this.getNode().addMachineOutPort(ee.fT,0);for(let t=0;tnew e(t),getType:()=>J.OB.Processor,getName:()=>"NoteRoundRobin",getTooltip:()=>"Reads notes then dispatches them over N voices to allow dispatching to different targets (you can achieve polyphony with multiple monophonic devices this way)",getMachineCode:()=>"roundrobin"}),this.factory}constructor(e){super(),this.activeVoices=void 0,this.voices=void 0,this.currentVoice=void 0,this.voices=null!==e&&void 0!==e?e:Number(window.prompt("How many voices?","8")),this.getNode().addMachineOutPort(ee.fT,0);for(let t=0;t{"use strict";n.r(t),n.d(t,{DrumKitMachine:()=>c,DrumKitScope:()=>l});var r,o,i=n(802),s=n(99986),a=n(77910);let l=function(e){return e[e.All=0]="All",e[e.Mini=1]="Mini",e[e.Toms=2]="Toms",e}({}),c=(0,a.JO)(l.Toms)(r=(0,a.JO)(l.Mini)(r=(0,a.Wn)((o=class e extends a.yC{getState(){return this.scope}getFactory(){return e.buildFactory(this.scope)}static buildFactory(t){const n=null!==t&&void 0!==t?t:l.All;return void 0!=e.factories[n]||(e.factories[n]={createMachine:t=>new e(null!==t&&void 0!==t?t:n),getType:()=>a.OB.Processor,getName:()=>"DrumKitMachine ("+l[n]+")",getTooltip:()=>"Split notes based on GS Standard Set Drum Kit",getMachineCode:()=>"drumkit"}),e.factories[n]}constructor(e){super(),this.scope=void 0,this.channelPerNote={},this.outOfScopeChannel=void 0,this.scope=e,this.getNode().addMachineInPort("In",0);let t,n=0;switch(e){case l.All:t=i.U_;break;case l.Mini:t=i.pE;break;case l.Toms:t=i.ht}Object.keys(t).forEach((e=>{this.channelPerNote[e]=n+1,this.getNode().addMachineOutPort(i.U_[e],n++)})),this.getNode().addMachineOutPort("Out of scope",n+1),this.getNode().addMachineOutPort(s.fT,n+2),this.outOfScopeChannel=n}receive(e,t){if("noteoff"===e.message.type||"noteon"===e.message.type){const t=(0,i.q8)(e.message.rawData[1]);void 0!=this.channelPerNote[t]?this.emit(e,this.channelPerNote[t]):this.emit(e,this.outOfScopeChannel)}else for(let n=0;n{"use strict";n.r(t),n.d(t,{EuclidianSequencerMachine:()=>xe});var r=n(9950);function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1&&void 0!==arguments[1]?arguments[1]:{};e&&Object.entries(t).forEach((function(t){var n=s(t,2),r=n[0],o=n[1];return e.style[r]=o}))}},{key:"find",value:function(e,t){return e?Array.from(e.querySelectorAll(t)):[]}},{key:"findSingle",value:function(e,t){return e?e.querySelector(t):null}},{key:"setAttributes",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){var r=function t(n,r){var o,i,l=null!==e&&void 0!==e&&null!==(o=e.$attrs)&&void 0!==o&&o[n]?[null===e||void 0===e||null===(i=e.$attrs)||void 0===i?void 0:i[n]]:[];return[r].flat().reduce((function(e,r){if(null!==r&&void 0!==r){var o=a(r);if("string"===o||"number"===o)e.push(r);else if("object"===o){var i=Array.isArray(r)?t(n,r):Object.entries(r).map((function(e){var t=s(e,2),r=t[0],o=t[1];return"style"!==n||!o&&0!==o?o?r:void 0:"".concat(r.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),":").concat(o)}));e=i.length?e.concat(i.filter((function(e){return!!e}))):e}}return e}),l)};Object.entries(n).forEach((function(n){var o=s(n,2),i=o[0],a=o[1];if(void 0!==a&&null!==a){var l=i.match(/^on(.+)/);l?e.addEventListener(l[1].toLowerCase(),a):"p-bind"===i?t.setAttributes(e,a):(a="class"===i?c(new Set(r("class",a))).join(" ").trim():"style"===i?r("style",a).join(";").trim():a,(e.$attrs=e.$attrs||{})&&(e.$attrs[i]=a),e.setAttribute(i,a))}}))}}},{key:"getAttribute",value:function(e,t){if(e){var n=e.getAttribute(t);return isNaN(n)?"true"===n||"false"===n?"true"===n:n:+n}}},{key:"isAttributeEquals",value:function(e,t,n){return!!e&&this.getAttribute(e,t)===n}},{key:"isAttributeNotEquals",value:function(e,t,n){return!this.isAttributeEquals(e,t,n)}},{key:"getHeight",value:function(e){if(e){var t=e.offsetHeight,n=getComputedStyle(e);return t-=parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)+parseFloat(n.borderTopWidth)+parseFloat(n.borderBottomWidth)}return 0}},{key:"getWidth",value:function(e){if(e){var t=e.offsetWidth,n=getComputedStyle(e);return t-=parseFloat(n.paddingLeft)+parseFloat(n.paddingRight)+parseFloat(n.borderLeftWidth)+parseFloat(n.borderRightWidth)}return 0}},{key:"alignOverlay",value:function(t,n,r){var o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t&&n&&("self"===r?this.relativePosition(t,n):(o&&(t.style.minWidth=e.getOuterWidth(n)+"px"),this.absolutePosition(t,n)))}},{key:"absolutePosition",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left";if(e&&t){var r,o,i=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),s=i.height,a=i.width,l=t.offsetHeight,c=t.offsetWidth,u=t.getBoundingClientRect(),d=this.getWindowScrollTop(),h=this.getWindowScrollLeft(),p=this.getViewport();u.top+l+s>p.height?((r=u.top+d-s)<0&&(r=d),e.style.transformOrigin="bottom"):(r=l+u.top+d,e.style.transformOrigin="top");var f=u.left,m="left"===n?0:a-c;o=f+c+a>p.width?Math.max(0,f+h+c-a):f-m+h,e.style.top=r+"px",e.style.left=o+"px"}}},{key:"relativePosition",value:function(e,t){if(e&&t){var n,r,o=e.offsetParent?{width:e.offsetWidth,height:e.offsetHeight}:this.getHiddenElementDimensions(e),i=t.offsetHeight,s=t.getBoundingClientRect(),a=this.getViewport();s.top+i+o.height>a.height?(n=-1*o.height,s.top+n<0&&(n=-1*s.top),e.style.transformOrigin="bottom"):(n=i,e.style.transformOrigin="top"),r=o.width>a.width?-1*s.left:s.left+o.width>a.width?-1*(s.left+o.width-a.width):0,e.style.top=n+"px",e.style.left=r+"px"}}},{key:"flipfitCollision",value:function(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"left top",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"left bottom",s=arguments.length>4?arguments[4]:void 0;if(t&&n){var a=n.getBoundingClientRect(),l=this.getViewport(),c=o.split(" "),u=i.split(" "),d=function(e,t){return t?+e.substring(e.search(/(\+|-)/g))||0:e.substring(0,e.search(/(\+|-)/g))||e},h={my:{x:d(c[0]),y:d(c[1]||c[0]),offsetX:d(c[0],!0),offsetY:d(c[1]||c[0],!0)},at:{x:d(u[0]),y:d(u[1]||u[0]),offsetX:d(u[0],!0),offsetY:d(u[1]||u[0],!0)}},p={left:function(){return h.my.offsetX+h.at.offsetX+a.left+("left"===h.my.x?0:-1*("center"===h.my.x?r.getOuterWidth(t)/2:r.getOuterWidth(t)))},top:function(){return h.my.offsetY+h.at.offsetY+a.top+("top"===h.my.y?0:-1*("center"===h.my.y?r.getOuterHeight(t)/2:r.getOuterHeight(t)))}},f={count:{x:0,y:0},left:function(){var n=p.left(),r=e.getWindowScrollLeft();t.style.left=n+r+"px",2===this.count.x?(t.style.left=r+"px",this.count.x=0):n<0&&(this.count.x++,h.my.x="left",h.at.x="right",h.my.offsetX*=-1,h.at.offsetX*=-1,this.right())},right:function(){var r=p.left()+e.getOuterWidth(n),o=e.getWindowScrollLeft();t.style.left=r+o+"px",2===this.count.x?(t.style.left=l.width-e.getOuterWidth(t)+o+"px",this.count.x=0):r+e.getOuterWidth(t)>l.width&&(this.count.x++,h.my.x="right",h.at.x="left",h.my.offsetX*=-1,h.at.offsetX*=-1,this.left())},top:function(){var n=p.top(),r=e.getWindowScrollTop();t.style.top=n+r+"px",2===this.count.y?(t.style.left=r+"px",this.count.y=0):n<0&&(this.count.y++,h.my.y="top",h.at.y="bottom",h.my.offsetY*=-1,h.at.offsetY*=-1,this.bottom())},bottom:function(){var r=p.top()+e.getOuterHeight(n),o=e.getWindowScrollTop();t.style.top=r+o+"px",2===this.count.y?(t.style.left=l.height-e.getOuterHeight(t)+o+"px",this.count.y=0):r+e.getOuterHeight(n)>l.height&&(this.count.y++,h.my.y="bottom",h.at.y="top",h.my.offsetY*=-1,h.at.offsetY*=-1,this.top())},center:function(r){if("y"===r){var o=p.top()+e.getOuterHeight(n)/2;t.style.top=o+e.getWindowScrollTop()+"px",o<0?this.bottom():o+e.getOuterHeight(n)>l.height&&this.top()}else{var i=p.left()+e.getOuterWidth(n)/2;t.style.left=i+e.getWindowScrollLeft()+"px",i<0?this.left():i+e.getOuterWidth(t)>l.width&&this.right()}}};f[h.at.x]("x"),f[h.at.y]("y"),this.isFunction(s)&&s(h)}}},{key:"findCollisionPosition",value:function(e){if(e){var t="left"===e?"right":"left";return"top"===e||"bottom"===e?{axis:"y",my:"center ".concat("top"===e?"bottom":"top"),at:"center ".concat(e)}:{axis:"x",my:"".concat(t," center"),at:"".concat(e," center")}}}},{key:"getParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return null===e.parentNode?t:this.getParents(e.parentNode,t.concat([e.parentNode]))}},{key:"getScrollableParents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=[];if(e){var r,o=this.getParents(e),i=/(auto|scroll)/,s=function(e){var t=e?getComputedStyle(e):null;return t&&(i.test(t.getPropertyValue("overflow"))||i.test(t.getPropertyValue("overflow-x"))||i.test(t.getPropertyValue("overflow-y")))},a=function(e){t?n.push("BODY"===e.nodeName||"HTML"===e.nodeName||9===e.nodeType?window:e):n.push(e)},l=m(o);try{for(l.s();!(r=l.n()).done;){var c=r.value,u=1===c.nodeType&&c.dataset.scrollselectors;if(u){var d,h=m(u.split(","));try{for(h.s();!(d=h.n()).done;){var p=d.value,f=this.findSingle(c,p);f&&s(f)&&a(f)}}catch(g){h.e(g)}finally{h.f()}}1===c.nodeType&&s(c)&&a(c)}}catch(g){l.e(g)}finally{l.f()}}return n.some((function(e){return e===document.body||e===window}))||n.push(window),n}},{key:"getHiddenElementOuterHeight",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetHeight;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementOuterWidth",value:function(e){if(e){e.style.visibility="hidden",e.style.display="block";var t=e.offsetWidth;return e.style.display="none",e.style.visibility="visible",t}return 0}},{key:"getHiddenElementDimensions",value:function(e){var t={};return e&&(e.style.visibility="hidden",e.style.display="block",t.width=e.offsetWidth,t.height=e.offsetHeight,e.style.display="none",e.style.visibility="visible"),t}},{key:"fadeIn",value:function(e,t){if(e){e.style.opacity=0;var n=+new Date,r=0;!function o(){r=+e.style.opacity+((new Date).getTime()-n)/t,e.style.opacity=r,n=+new Date,+r<1&&(window.requestAnimationFrame&&requestAnimationFrame(o)||setTimeout(o,16))}()}}},{key:"fadeOut",value:function(e,t){if(e)var n=1,r=50/t,o=setInterval((function(){(n-=r)<=0&&(n=0,clearInterval(o)),e.style.opacity=n}),50)}},{key:"getUserAgent",value:function(){return navigator.userAgent}},{key:"isIOS",value:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream}},{key:"isAndroid",value:function(){return/(android)/i.test(navigator.userAgent)}},{key:"isChrome",value:function(){return/(chrome)/i.test(navigator.userAgent)}},{key:"isClient",value:function(){return!("undefined"===typeof window||!window.document||!window.document.createElement)}},{key:"isTouchDevice",value:function(){return"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"appendChild",value:function(e,t){if(this.isElement(t))t.appendChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot append "+t+" to "+e);t.el.nativeElement.appendChild(e)}}},{key:"removeChild",value:function(e,t){if(this.isElement(t))t.removeChild(e);else{if(!t.el||!t.el.nativeElement)throw new Error("Cannot remove "+e+" from "+t);t.el.nativeElement.removeChild(e)}}},{key:"isElement",value:function(e){return"object"===("undefined"===typeof HTMLElement?"undefined":a(HTMLElement))?e instanceof HTMLElement:e&&"object"===a(e)&&null!==e&&1===e.nodeType&&"string"===typeof e.nodeName}},{key:"scrollInView",value:function(e,t){var n=getComputedStyle(e).getPropertyValue("border-top-width"),r=n?parseFloat(n):0,o=getComputedStyle(e).getPropertyValue("padding-top"),i=o?parseFloat(o):0,s=e.getBoundingClientRect(),a=t.getBoundingClientRect().top+document.body.scrollTop-(s.top+document.body.scrollTop)-r-i,l=e.scrollTop,c=e.clientHeight,u=this.getOuterHeight(t);a<0?e.scrollTop=l+a:a+u>c&&(e.scrollTop=l+a-c+u)}},{key:"clearSelection",value:function(){if(window.getSelection)window.getSelection().empty?window.getSelection().empty():window.getSelection().removeAllRanges&&window.getSelection().rangeCount>0&&window.getSelection().getRangeAt(0).getClientRects().length>0&&window.getSelection().removeAllRanges();else if(document.selection&&document.selection.empty)try{document.selection.empty()}catch(e){}}},{key:"calculateScrollbarWidth",value:function(e){if(e){var t=getComputedStyle(e);return e.offsetWidth-e.clientWidth-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth)}if(null!=this.calculatedScrollbarWidth)return this.calculatedScrollbarWidth;var n=document.createElement("div");n.className="p-scrollbar-measure",document.body.appendChild(n);var r=n.offsetWidth-n.clientWidth;return document.body.removeChild(n),this.calculatedScrollbarWidth=r,r}},{key:"calculateBodyScrollbarWidth",value:function(){return window.innerWidth-document.documentElement.offsetWidth}},{key:"getBrowser",value:function(){if(!this.browser){var e=this.resolveUserAgent();this.browser={},e.browser&&(this.browser[e.browser]=!0,this.browser.version=e.version),this.browser.chrome?this.browser.webkit=!0:this.browser.webkit&&(this.browser.safari=!0)}return this.browser}},{key:"resolveUserAgent",value:function(){var e=navigator.userAgent.toLowerCase(),t=/(chrome)[ ]([\w.]+)/.exec(e)||/(webkit)[ ]([\w.]+)/.exec(e)||/(opera)(?:.*version|)[ ]([\w.]+)/.exec(e)||/(msie) ([\w.]+)/.exec(e)||e.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(e)||[];return{browser:t[1]||"",version:t[2]||"0"}}},{key:"blockBodyScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";!!!document.body.style.getPropertyValue("--scrollbar-width")&&document.body.style.setProperty("--scrollbar-width",this.calculateBodyScrollbarWidth()+"px"),this.addClass(document.body,e)}},{key:"unblockBodyScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"p-overflow-hidden";document.body.style.removeProperty("--scrollbar-width"),this.removeClass(document.body,e)}},{key:"isVisible",value:function(e){return e&&(0!==e.clientHeight||0!==e.getClientRects().length||"none"!==getComputedStyle(e).display)}},{key:"isExist",value:function(e){return!(null===e||"undefined"===typeof e||!e.nodeName||!e.parentNode)}},{key:"getFocusableElements",value:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",o=[],i=m(e.find(t,'button:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])'.concat(r,',\n [href][clientHeight][clientWidth]:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n input:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n select:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n textarea:not([tabindex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [tabIndex]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r,',\n [contenteditable]:not([tabIndex = "-1"]):not([disabled]):not([style*="display:none"]):not([hidden])').concat(r)));try{for(i.s();!(n=i.n()).done;){var s=n.value;"none"!==getComputedStyle(s).display&&"hidden"!==getComputedStyle(s).visibility&&o.push(s)}}catch(a){i.e(a)}finally{i.f()}return o}},{key:"getFirstFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[0]:null}},{key:"getLastFocusableElement",value:function(t,n){var r=e.getFocusableElements(t,n);return r.length>0?r[r.length-1]:null}},{key:"focus",value:function(e,t){var n=void 0===t||!t;e&&document.activeElement!==e&&e.focus({preventScroll:n})}},{key:"focusFirstElement",value:function(t,n){if(t){var r=e.getFirstFocusableElement(t);return r&&e.focus(r,n),r}}},{key:"getCursorOffset",value:function(e,t,n,r){if(e){var o=getComputedStyle(e),i=document.createElement("div");i.style.position="absolute",i.style.top="0px",i.style.left="0px",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.overflow=o.overflow,i.style.width=o.width,i.style.height=o.height,i.style.padding=o.padding,i.style.border=o.border,i.style.overflowWrap=o.overflowWrap,i.style.whiteSpace=o.whiteSpace,i.style.lineHeight=o.lineHeight,i.innerHTML=t.replace(/\r\n|\r|\n/g,"
");var s=document.createElement("span");s.textContent=r,i.appendChild(s);var a=document.createTextNode(n);i.appendChild(a),document.body.appendChild(i);var l=s.offsetLeft,c=s.offsetTop,u=s.clientHeight;return document.body.removeChild(i),{left:Math.abs(l-e.scrollLeft),top:Math.abs(c-e.scrollTop)+u}}return{top:"auto",left:"auto"}}},{key:"invokeElementMethod",value:function(e,t,n){e[t].apply(e,n)}},{key:"isClickable",value:function(e){var t=e.nodeName,n=e.parentElement&&e.parentElement.nodeName;return"INPUT"===t||"TEXTAREA"===t||"BUTTON"===t||"A"===t||"INPUT"===n||"TEXTAREA"===n||"BUTTON"===n||"A"===n||this.hasClass(e,"p-button")||this.hasClass(e.parentElement,"p-button")||this.hasClass(e.parentElement,"p-checkbox")||this.hasClass(e.parentElement,"p-radiobutton")}},{key:"applyStyle",value:function(e,t){if("string"===typeof t)e.style.cssText=this.style;else for(var n in this.style)e.style[n]=t[n]}},{key:"exportCSV",value:function(t,n){var r=new Blob([t],{type:"application/csv;charset=utf-8;"});window.navigator.msSaveOrOpenBlob?navigator.msSaveOrOpenBlob(r,n+".csv"):e.saveAs({name:n+".csv",src:URL.createObjectURL(r)})||(t="data:text/csv;charset=utf-8,"+t,window.open(encodeURI(t)))}},{key:"saveAs",value:function(e){if(e){var t=document.createElement("a");if(void 0!==t.download){var n=e.name,r=e.src;return t.setAttribute("href",r),t.setAttribute("download",n),t.style.display="none",document.body.appendChild(t),t.click(),document.body.removeChild(t),!0}}return!1}},{key:"createInlineStyle",value:function(t,n){var r=document.createElement("style");return e.addNonce(r,t),n||(n=document.head),n.appendChild(r),r}},{key:"removeInlineStyle",value:function(e){if(this.isExist(e)){try{e.parentNode.removeChild(e)}catch(t){}e=null}return e}},{key:"addNonce",value:function(e,t){try{t||(t={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_METERED_API_KEY:"0132d438ab19602572c42db0efb136e5cec8"}.REACT_APP_CSS_NONCE)}catch(n){}t&&e.setAttribute("nonce",t)}},{key:"getTargetElement",value:function(e){if(!e)return null;if("document"===e)return document;if("window"===e)return window;if("object"===a(e)&&e.hasOwnProperty("current"))return this.isExist(e.current)?e.current:null;var t,n=(t=e)&&t.constructor&&t.call&&t.apply?e():e;return n&&9===n.nodeType||this.isExist(n)?n:null}},{key:"getAttributeNames",value:function(e){var t,n,r;for(n=[],r=e.attributes,t=0;t0}return!1}},{key:"hasCSSTransition",value:function(e){if(e){var t=getComputedStyle(e);return parseFloat(t.getPropertyValue("transition-duration")||"0")>0}return!1}}]),e}();function y(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"===typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(e,t)}(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,s=!0,a=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length&&(n%=e.length,t%=e.length),e.splice(n,0,e.splice(t,1)[0]))}},{key:"findIndexInList",value:function(e,t,n){var r=this;return t?n?t.findIndex((function(t){return r.equals(t,e,n)})):t.findIndex((function(t){return t===e})):-1}},{key:"getJSXElement",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e?e[t]:void 0;return void 0===r?n[t]:r}},{key:"getPropCaseInsensitive",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.toFlatCase(t);for(var o in e)if(e.hasOwnProperty(o)&&this.toFlatCase(o)===r)return e[o];for(var i in n)if(n.hasOwnProperty(i)&&this.toFlatCase(i)===r)return n[i]}},{key:"getMergedProps",value:function(e,t){return Object.assign({},t,e)}},{key:"getDiffProps",value:function(e,t){return this.findDiffKeys(e,t)}},{key:"getPropValue",value:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.isNotEmpty(e)?this.getProp(e.props,t,n):void 0}},{key:"getComponentProps",value:function(e,t){return this.isNotEmpty(e)?this.getMergedProps(e.props,t):void 0}},{key:"getComponentDiffProps",value:function(e,t){return this.isNotEmpty(e)?this.getDiffProps(e.props,t):void 0}},{key:"isValidChild",value:function(e,t,n){if(e){var r,o=this.getComponentProp(e,"__TYPE")||(e.type?e.type.displayName:void 0);!o&&null!==e&&void 0!==e&&null!==(r=e.type)&&void 0!==r&&null!==(r=r._payload)&&void 0!==r&&r.value&&(o=e.type._payload.value.find((function(e){return e===t})));var i=o===t;try{0}catch(s){}return i}return!1}},{key:"getRefElement",value:function(e){return e?"object"===a(e)&&e.hasOwnProperty("current")?e.current:e:null}},{key:"combinedRefs",value:function(e,t){e&&t&&("function"===typeof t?t(e.current):t.current=e.current)}},{key:"removeAccents",value:function(e){return e&&e.search(/[\xC0-\xFF]/g)>-1&&(e=e.replace(/[\xC0-\xC5]/g,"A").replace(/[\xC6]/g,"AE").replace(/[\xC7]/g,"C").replace(/[\xC8-\xCB]/g,"E").replace(/[\xCC-\xCF]/g,"I").replace(/[\xD0]/g,"D").replace(/[\xD1]/g,"N").replace(/[\xD2-\xD6\xD8]/g,"O").replace(/[\xD9-\xDC]/g,"U").replace(/[\xDD]/g,"Y").replace(/[\xDE]/g,"P").replace(/[\xE0-\xE5]/g,"a").replace(/[\xE6]/g,"ae").replace(/[\xE7]/g,"c").replace(/[\xE8-\xEB]/g,"e").replace(/[\xEC-\xEF]/g,"i").replace(/[\xF1]/g,"n").replace(/[\xF2-\xF6\xF8]/g,"o").replace(/[\xF9-\xFC]/g,"u").replace(/[\xFE]/g,"p").replace(/[\xFD\xFF]/g,"y")),e}},{key:"toFlatCase",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e.replace(/(-|_)/g,"").toLowerCase():e}},{key:"toCapitalCase",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e[0].toUpperCase()+e.slice(1):e}},{key:"trim",value:function(e){return this.isNotEmpty(e)&&this.isString(e)?e.trim():e}},{key:"isEmpty",value:function(e){return null===e||void 0===e||""===e||Array.isArray(e)&&0===e.length||!(e instanceof Date)&&"object"===a(e)&&0===Object.keys(e).length}},{key:"isNotEmpty",value:function(e){return!this.isEmpty(e)}},{key:"isFunction",value:function(e){return!!(e&&e.constructor&&e.call&&e.apply)}},{key:"isObject",value:function(e){return null!==e&&e instanceof Object&&e.constructor===Object}},{key:"isDate",value:function(e){return null!==e&&e instanceof Date&&e.constructor===Date}},{key:"isArray",value:function(e){return null!==e&&Array.isArray(e)}},{key:"isString",value:function(e){return null!==e&&"string"===typeof e}},{key:"isPrintableCharacter",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return this.isNotEmpty(e)&&1===e.length&&e.match(/\S| /)}},{key:"isLetter",value:function(e){return/^[a-zA-Z\u00C0-\u017F]$/.test(e)}},{key:"findLast",value:function(e,t){var n;if(this.isNotEmpty(e))try{n=e.findLast(t)}catch(r){n=c(e).reverse().find(t)}return n}},{key:"findLastIndex",value:function(e,t){var n=-1;if(this.isNotEmpty(e))try{n=e.findLastIndex(t)}catch(r){n=e.lastIndexOf(c(e).reverse().find(t))}return n}},{key:"sort",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=this.compare(e,t,r,n),s=n;return(this.isEmpty(e)||this.isEmpty(t))&&(s=1===o?n:o),s*i}},{key:"compare",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=this.isEmpty(e),i=this.isEmpty(t);return o&&i?0:o?r:i?-r:"string"===typeof e&&"string"===typeof t?n(e,t):et?1:0}},{key:"localeComparator",value:function(e){return new Intl.Collator(e,{numeric:!0}).compare}},{key:"findChildrenByKey",value:function(e,t){var n,r=y(e);try{for(r.s();!(n=r.n()).done;){var o=n.value;if(o.key===t)return o.children||[];if(o.children){var i=this.findChildrenByKey(o.children,t);if(i.length>0)return i}}}catch(s){r.e(s)}finally{r.f()}return[]}},{key:"mutateFieldData",value:function(e,t,n){if("object"===a(e)&&"string"===typeof t)for(var r=t.split("."),o=e,i=0,s=r.length;i1&&void 0!==arguments[1]?arguments[1]:{}).classNameMergeFunction,r=t(n);return e.reduce((function(e,o){if(!o)return e;var i=function(){var i=o[s];if("style"===s)e.style=x(x({},e.style),o.style);else if("className"===s){var a="";a=r?n(e.className,o.className):[e.className,o.className].join(" ").trim(),e.className=a||void 0}else if(t(i)){var l=e[s];e[s]=l?function(){l.apply(void 0,arguments),i.apply(void 0,arguments)}:i}else e[s]=i};for(var s in o)i();return e}),{})}}var A=function(){var e=[],t=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return c(e).reverse().find((function(e){return!!n||e.key===t}))||{key:t,value:r}};return{get:function(e){return e&&parseInt(e.style.zIndex,10)||0},set:function(n,r,o,i){r&&(r.style.zIndex=String(function(n,r){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:999,i=t(n,r,o),s=i.value+(i.key===n?0:o)+1;return e.push({key:n,value:s}),s}(n,o,i)))},clear:function(t){var n;t&&(n=A.get(t),e=e.filter((function(e){return e.value!==n})),t.style.zIndex="")},getCurrent:function(e,n){return function(e,n){return t(e,n).value}(e,n)}}}(),C=Object.freeze({STARTS_WITH:"startsWith",CONTAINS:"contains",NOT_CONTAINS:"notContains",ENDS_WITH:"endsWith",EQUALS:"equals",NOT_EQUALS:"notEquals",IN:"in",LESS_THAN:"lt",LESS_THAN_OR_EQUAL_TO:"lte",GREATER_THAN:"gt",GREATER_THAN_OR_EQUAL_TO:"gte",BETWEEN:"between",DATE_IS:"dateIs",DATE_IS_NOT:"dateIsNot",DATE_BEFORE:"dateBefore",DATE_AFTER:"dateAfter",CUSTOM:"custom"});Object.freeze({AND:"and",OR:"or"});function k(e){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},k(e)}function E(e){var t=function(e,t){if("object"!==k(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t||"default");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"===k(t)?t:String(t)}function T(e,t,n){return(t=E(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function O(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&void 0!==arguments[0]?arguments[0]:{},t=e.target;w.isNotEmpty(t)&&(f(),(e.when||l)&&(c.current=v.getTargetElement(t))),!u.current&&c.current&&(u.current=function(e){return i&&i(e)},c.current.addEventListener(o,u.current,s))},f=function(){u.current&&(c.current.removeEventListener(o,u.current,s),u.current=null)},m=function(){f(),d=null,h=null},g=r.useCallback((function(){l?c.current=v.getTargetElement(n):(f(),c.current=null)}),[n,l]);return r.useEffect((function(){g()}),[g]),r.useEffect((function(){var e="".concat(d)!=="".concat(i),t=h!==s,n=u.current;n&&(e||t)?(f(),l&&p()):n||m()}),[i,s,l]),F((function(){m()})),[p,f]};function U(e){return function(e){if(Array.isArray(e))return I(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||L(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}var z={escKeyListeners:new Map,onGlobalKeyDown:function(e){if("Escape"===e.code){var t=z.escKeyListeners,n=Math.max.apply(Math,U(t.keys())),r=t.get(n),o=Math.max.apply(Math,U(r.keys()));r.get(o)(e)}},refreshGlobalKeyDownListener:function(){var e=v.getTargetElement("document");this.escKeyListeners.size>0?e.addEventListener("keydown",this.onGlobalKeyDown):e.removeEventListener("keydown",this.onGlobalKeyDown)},addListener:function(e,t){var n=this,r=D(t,2),o=r[0],i=r[1],s=this.escKeyListeners;s.has(o)||s.set(o,new Map);var a=s.get(o);if(a.has(i))throw new Error("Unexpected: global esc key listener with priority [".concat(o,", ").concat(i,"] already exists."));return a.set(i,e),this.refreshGlobalKeyDownListener(),function(){a.delete(i),0===a.size&&s.delete(o),n.refreshGlobalKeyDownListener()}}},W=function(){var e=(0,r.useContext)(R);return function(){for(var t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=D((0,r.useState)(!1),2),o=n[0],i=n[1],s=(0,r.useRef)(null),a=(0,r.useContext)(R),l=v.isClient()?window.document:void 0,c=t.document,u=void 0===c?l:c,d=t.manual,h=void 0!==d&&d,p=t.name,f=void 0===p?"style_".concat(++H):p,m=t.id,g=void 0===m?void 0:m,y=t.media,b=void 0===y?void 0:y,w=function(){if(u&&!o){var t=(null===a||void 0===a?void 0:a.styleContainer)||u.head;s.current=function(e){var t=e.querySelector('style[data-primereact-style-id="'.concat(f,'"]'));if(t)return t;if(void 0!==g){var n=u.getElementById(g);if(n)return n}return u.createElement("style")}(t),s.current.isConnected||(s.current.type="text/css",g&&(s.current.id=g),b&&(s.current.media=b),v.addNonce(s.current,a&&a.nonce||N.nonce),t.appendChild(s.current),f&&s.current.setAttribute("data-primereact-style-id",f)),s.current.textContent=e,i(!0)}};return(0,r.useEffect)((function(){h||w()}),[h]),{id:g,name:f,update:function(t){o&&e!==t&&(s.current.textContent=t)},unload:function(){u&&s.current&&(v.removeInlineStyle(s.current),i(!1))},load:w,isLoaded:o}};function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n i,\n.p-input-icon-right > i,\n.p-input-icon-left > svg,\n.p-input-icon-right > svg,\n.p-input-icon-left > .p-input-prefix,\n.p-input-icon-right > .p-input-suffix {\n position: absolute;\n top: 50%;\n margin-top: -0.5rem;\n}\n\n.p-fluid .p-input-icon-left,\n.p-fluid .p-input-icon-right {\n display: block;\n width: 100%;\n}\n","\n ").concat("\n.p-icon {\n display: inline-block;\n}\n\n.p-icon-spin {\n -webkit-animation: p-icon-spin 2s infinite linear;\n animation: p-icon-spin 2s infinite linear;\n}\n\nsvg.p-icon {\n pointer-events: auto;\n}\n\nsvg.p-icon g,\n.p-disabled svg.p-icon {\n pointer-events: none;\n}\n\n@-webkit-keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n\n@keyframes p-icon-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(359deg);\n transform: rotate(359deg);\n }\n}\n","\n}\n"),ee={cProps:void 0,cParams:void 0,cName:void 0,defaultProps:{pt:void 0,ptOptions:void 0,unstyled:!1},context:{},globalCSS:void 0,classes:{},styles:"",extend:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.css,n=Z(Z({},e.defaultProps),ee.defaultProps),r={},o=function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];t.hasOwnProperty("pt")&&void 0!==t.pt&&(t=t.pt);var i=n,s=/./g.test(i)&&!!r[i.split(".")[0]],a=s?w.toFlatCase(i.split(".")[1]):w.toFlatCase(i),c=r.hostName&&w.toFlatCase(r.hostName)||r.props&&r.props.__TYPE&&w.toFlatCase(r.props.__TYPE)||"",u="transition"===a,d="data-pc-",h=function e(t){return null!==t&&void 0!==t&&t.props?t.hostName?t.props.__TYPE===t.hostName?t.props:e(t.parent):t.parent:void 0};ee.cParams=r,ee.cName=c;var p=function(e){var t,n;return(null===(t=r.props)||void 0===t?void 0:t[e])||(null===(n=h(r))||void 0===n?void 0:n[e])}("ptOptions")||ee.context.ptOptions||{},f=p.mergeSections,m=void 0===f||f,g=p.mergeProps,v=void 0!==g&&g,y=function(){var e=te.apply(void 0,arguments);return Array.isArray(e)?{className:l.apply(void 0,Y(e))}:w.isString(e)?{className:e}:null!==e&&void 0!==e&&e.hasOwnProperty("className")&&Array.isArray(e.className)?{className:l.apply(void 0,Y(e.className))}:e},b=o?s?oe(y,i,r):ie(y,i,r):void 0,_=s?void 0:re(ne(t,c),y,i,r),x=!u&&Z(Z({},"root"===a&&$({},"".concat(d,"name"),r.props&&r.props.__parentMetadata?w.toFlatCase(r.props.__TYPE):c)),{},$({},"".concat(d,"section"),a));return m||!m&&_?v?S([b,_,Object.keys(x).length?x:{}],{classNameMergeFunction:null===(e=ee.context.ptOptions)||void 0===e?void 0:e.classNameMergeFunction}):Z(Z(Z({},b),_),Object.keys(x).length?x:{}):Z(Z({},_),Object.keys(x).length?x:{})};return Z(Z({getProps:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return ee.context=t,ee.cProps=e,w.getMergedProps(e,n)},getOtherProps:function(e){return w.getDiffProps(e,n)},setMetaData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.props,i=e.state,s=function(){return ee.context.unstyled||N.unstyled||n.unstyled};return{ptm:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o((n||{}).pt,t,Z(Z({},e),r))},ptmo:function(){return o(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},!1)},sx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!(arguments.length>2&&void 0!==arguments[2])||arguments[2]){var s,a=te(t&&t.inlineStyles,e,Z({props:n,state:i},o));return S([te(r,e,Z({props:n,state:i},o)),a],{classNameMergeFunction:null===(s=ee.context.ptOptions)||void 0===s?void 0:s.classNameMergeFunction})}},cx:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return s()?void 0:te(t&&t.classes,e,Z({props:n,state:i},r))},isUnstyled:s}}},e),{},{defaultProps:n})}},te=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=String(w.toFlatCase(n)).split("."),i=o.shift(),s=w.isNotEmpty(t)?Object.keys(t).find((function(e){return w.toFlatCase(e)===i})):"";return i?w.isObject(t)?e(w.getItemValue(t[s],r),o.join("."),r):void 0:w.getItemValue(t,r)},ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=arguments.length>2?arguments[2]:void 0,r=null===e||void 0===e?void 0:e._usept,o=function(e){var r,o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=n?n(e):e,s=w.toFlatCase(t);return null!==(r=o?s!==ee.cName?null===i||void 0===i?void 0:i[s]:void 0:null===i||void 0===i?void 0:i[s])&&void 0!==r?r:i};return w.isNotEmpty(r)?{_usept:r,originalValue:o(e.originalValue),value:o(e.value)}:o(e,!0)},re=function(e,t,n,r){var o=function(e){return t(e,n,r)};if(null!==e&&void 0!==e&&e.hasOwnProperty("_usept")){var i=e._usept||ee.context.ptOptions||{},s=i.mergeSections,a=void 0===s||s,l=i.mergeProps,c=void 0!==l&&l,u=i.classNameMergeFunction,d=o(e.originalValue),h=o(e.value);if(void 0===d&&void 0===h)return;return w.isString(h)?h:w.isString(d)?d:a||!a&&h?c?S([d,h],{classNameMergeFunction:u}):Z(Z({},d),h):h}return o(e)},oe=function(e,t,n){return re(ne(ee.context.pt||N.pt,void 0,(function(e){return w.getItemValue(e,ee.cParams)})),e,t,n)},ie=function(e,t,n){return re(ne(ee.context.pt||N.pt,void 0,(function(e){return te(e,ee.cName,ee.cParams)||w.getItemValue(e,ee.cParams)})),e,t,n)},se=function(e){var t=arguments.length>2?arguments[2]:void 0,n=t.name,o=t.styled,i=void 0!==o&&o,s=t.hostName,a=void 0===s?"":s,l=oe(te,"global.css",ee.cParams),c=w.toFlatCase(n),u=G("\n.p-hidden-accessible {\n border: 0;\n padding: 0;\n margin: -1px;\n position: absolute;\n height: 1px;\n width: 1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n clip-path: inset(50%);\n white-space: nowrap;\n}\n\n.p-hidden-accessible input,\n.p-hidden-accessible select {\n transform: scale(0);\n}\n\n.p-overflow-hidden {\n overflow: hidden;\n padding-right: var(--scrollbar-width);\n}\n",{name:"base",manual:!0}).load,d=G(J,{name:"common",manual:!0}).load,h=G(l,{name:"global",manual:!0}).load,p=G(e,{name:n,manual:!0}).load,f=function(e){if(!a){var t=re(ne((ee.cProps||{}).pt,c),te,"hooks.".concat(e)),n=ie(te,"hooks.".concat(e));null===t||void 0===t||t(),null===n||void 0===n||n()}};f("useMountEffect"),V((function(){u(),h(),d(),i||p()})),function(e,t){var n=r.useRef(!1);r.useEffect((function(){if(n.current)return e&&e();n.current=!0}),t)}((function(){f("useUpdateEffect")})),F((function(){f("useUnmountEffect")}))};function ae(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&i.max>0?i.min:0,i.min,i.max,de,he)},E=function(){return C(i.value,i.min,i.max,de,he)},T="M ".concat(50+Math.cos(de)*ue," ").concat(50-Math.sin(de)*ue," A ").concat(ue," ").concat(ue," 0 1 1 ").concat(50+Math.cos(he)*ue," ").concat(50-Math.sin(he)*ue),O="M ".concat(50+Math.cos(k())*ue," ").concat(50-Math.sin(k())*ue," A ").concat(ue," ").concat(ue," 0 ").concat(Math.abs(k()-E())k()?0:1," ").concat(50+Math.cos(E())*ue," ").concat(50-Math.sin(E())*ue),M=function(e,t){var n=e-i.size/2,r=i.size/2-t,o=Math.atan2(r,n),s=-Math.PI/2-Math.PI/6;P(o,s)},P=function(e,t){var n;if(e>he)n=C(e,de,he,i.min,i.max);else{if(!(ei.max?i.max:enew e(t),getType:()=>ve.OB.Emitter,createWidget:(e,t)=>(0,be.jsx)(Se,{engine:e,size:50,machine:t.machine}),getName:()=>"EuclidianSequencer",getTooltip:()=>"A two tracks euclidian sequencer with different combination algorithms to trigger a MIDI signal",getMachineCode:()=>"euclidiansequencer"}),this.factory}sanitizeSequence(e,t){e.beats>t.steps&&(e.beats=t.steps),e.offset>t.steps/2&&(e.offset=t.steps/2),e.offset<-1*t.steps/2&&(e.offset=-1*t.steps/2),e.offset>0?e.offset=Math.floor(e.offset):e.offset<0&&(e.offset=Math.ceil(e.offset))}sanitizeAndApplyConfig(t){this.currentIndex>=t.steps&&(this.currentIndex=0),this.sanitizeSequence(t.mainSequence,t),this.sanitizeSequence(t.secondarySequence,t),t.note!==this.config.note&&this.noteOnSent&&this.emit(this.noteOff,0),this.config=t,this.noteOn={message:{rawData:(0,ge.GW)(this.config.note),isChannelMessage:!0,type:"noteon",channel:0},type:"noteon"},this.noteOff={message:{rawData:(0,ge.GW)(this.config.note),isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},this.mainBeats=e.distributeBeats(t.mainSequence.beats,t.steps,t.mainSequence.offset),this.secondaryBeats=e.distributeBeats(t.secondarySequence.beats,t.steps,t.secondarySequence.offset)}constructor(e){super(),this.config=void 0,this.playing=!1,this.currentClock=0,this.currentIndex=0,this.mainBeats=[],this.secondaryBeats=[],this.noteOn={message:{rawData:(0,ge.GW)("C4"),isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},this.noteOff={message:{rawData:(0,ge.GW)("C4"),isChannelMessage:!0,type:"noteoff",channel:0},type:"noteoff"},this.noteOnSent=!1,this.onSequenceIndexChanged=new Event(_e),void 0==e&&(e={steps:16,note:"C4",mainSequence:{offset:0,beats:4},secondarySequence:{offset:0,beats:0},combineOperator:we.OR}),this.config=e,this.sanitizeAndApplyConfig(e),this.getNode().addMachineOutPort("Out",0),this.getNode().addMachineInPort("Clock",0)}shouldPlayNow(){return this.shouldPlay(this.mainBeats[this.currentIndex],this.secondaryBeats[this.currentIndex])}shouldPlay(e,t){switch(this.config.combineOperator){case we.AND:return e&&t;case we.OR:return e||t;case we.SUB:return e&&!t;case we.XOR:return e!==t}}sequenceIndexKind(e){return[this.playing&&this.currentIndex===e,this.mainBeats[e],this.secondaryBeats[e],this.shouldPlay(this.mainBeats[e],this.secondaryBeats[e])]}receive(e,t){switch(e.message.type){case"clock":return this.playing?(this.currentClock+=1,this.currentClock%6===0&&(this.currentIndex=(this.currentIndex+1)%this.config.steps,this.dispatchEvent(this.onSequenceIndexChanged),this.currentClock=0,this.shouldPlayNow()?(this.emit(this.noteOn,0),this.noteOnSent=!0):this.noteOnSent&&(this.emit(this.noteOff,0),this.noteOnSent=!1)),ve.LB.Processed):ve.LB.Ignored;case"continue":return this.playing=!0,this.dispatchEvent(this.onSequenceIndexChanged),this.shouldPlayNow()&&(this.emit(this.noteOn,0),this.noteOnSent=!0),ve.LB.Processed;case"start":return this.playing=!0,this.currentClock=0,this.currentIndex=0,this.dispatchEvent(this.onSequenceIndexChanged),this.shouldPlayNow()&&(this.emit(this.noteOn,0),this.noteOnSent=!0),ve.LB.Processed;case"stop":return this.playing=!1,this.dispatchEvent(this.onSequenceIndexChanged),this.noteOnSent&&(this.emit(this.noteOff,0),this.noteOnSent=!1),ve.LB.Processed}return ve.LB.Ignored}static distributeBeats(e,t,n){let r=new Array(t).fill(!1);if(e<=0||t<=0||e>t)return r;n<0&&(n=t+n),r[n]=!0;let o=0;for(let i=1;i{const t=10;function n(e){const n=Math.ceil(e.steps/8);return[Math.min(e.steps,8)*t*2,n*t*2]}const[o,i]=r.useState(e.machine.getState()),[[s,a],l]=r.useState(n(o));function c(t){var r,o;e.machine.sanitizeAndApplyConfig(t),i(e.machine.getState());const[s,a]=n(e.machine.getState());l([s,a]);const c=null!==(r=null===(o=u.current)||void 0===o?void 0:o.getContext("2d"))&&void 0!==r?r:void 0;requestAnimationFrame((function(){d(c,s,a)}))}const u=r.useRef(null),d=function(n,r,o){if(void 0==n)return;const i=e.machine.getState();n.fillStyle="rgb(0,0,0)",n.fillRect(0,0,r,o);for(let s=0;s{var t,n;const r=null!==(t=null===(n=u.current)||void 0===n?void 0:n.getContext("2d"))&&void 0!==t?t:void 0;d(r,s,a);const o=()=>{requestAnimationFrame((function(){d(r,s,a)}))};return e.machine.addEventListener(_e,o),()=>{e.machine.removeEventListener(_e,o)}}),[e.machine]),(0,be.jsxs)(ye.S.SettingsBar,{children:[(0,be.jsxs)("span",{children:["Steps: ",o.steps]}),(0,be.jsx)(ye.S.Slider,{children:(0,be.jsx)("input",{type:"range",min:"4",max:"64",step:"1",value:o.steps,onChange:e=>{c({...o,steps:Number(e.target.value)})},list:"steps",name:"steps"})}),(0,be.jsxs)("span",{children:["Beats A: ",o.mainSequence.beats]}),(0,be.jsxs)(ye.S.SettingsBarVertical,{children:[(0,be.jsx)(ye.S.Slider,{children:(0,be.jsx)("input",{type:"range",min:"0",max:o.steps,step:"1",value:o.mainSequence.beats,onChange:e=>{c({...o,mainSequence:{...o.mainSequence,beats:Number(e.target.value)}})},list:"beats1",name:"beats1"})}),(0,be.jsx)(pe,{value:o.mainSequence.offset,min:-1*o.steps/2,max:o.steps/2,size:35,valueColor:"SlateGray",rangeColor:"MediumTurquoise",textColor:"White",step:1,strokeWidth:23,onChange:e=>{c({...o,mainSequence:{...o.mainSequence,offset:Number(e.value)}})}})]}),(0,be.jsxs)("span",{children:["Beats B: ",o.secondarySequence.beats]}),(0,be.jsxs)(ye.S.SettingsBarVertical,{children:[(0,be.jsx)(ye.S.Slider,{children:(0,be.jsx)("input",{type:"range",min:"0",max:o.steps,step:"1",value:o.secondarySequence.beats,onChange:e=>{c({...o,secondarySequence:{...o.secondarySequence,beats:Number(e.target.value)}})},list:"beats1",name:"beats1"})}),(0,be.jsx)(pe,{value:o.secondarySequence.offset,min:-1*o.steps/2,max:o.steps/2,size:35,valueColor:"SlateGray",rangeColor:"MediumTurquoise",textColor:"White",step:1,strokeWidth:23,onChange:e=>{c({...o,secondarySequence:{...o.secondarySequence,offset:Number(e.value)}})}})]}),(0,be.jsxs)(ye.S.SettingsBarVertical,{children:[(0,be.jsx)(ye.S.Dropdown,{children:(0,be.jsx)("select",{name:"combineOperatorSelection",value:o.combineOperator,onChange:e=>{c({...o,combineOperator:e.target.value})},children:Object.keys(we).map((e=>(0,be.jsx)("option",{value:e,children:e},e)))})}),(0,be.jsx)(ye.S.Dropdown,{children:(0,be.jsx)("select",{name:"noteSelection",value:o.note,onChange:e=>{c({...o,note:e.target.value})},children:ge.De.map((e=>(0,be.jsx)("option",{value:(0,ge.q8)(e[1]),children:(0,ge.q8)(e[1])},e[1])))})})]}),(0,be.jsx)("canvas",{ref:u,width:s,height:a})]})}},67164:(e,t,n)=>{"use strict";n.r(t),n.d(t,{KeyboardMachine:()=>u,KeyboardNodeWidget:()=>d});var r,o,i=n(9950),s=n(75546),a=n(77910),l=n(46497),c=n(44414);let u=(0,a.Wn)((o=class e extends a.yC{getFactory(){return e.factory}getState(){}static buildFactory(){return this.factory||(this.factory={createMachine:()=>new e,createWidget:(e,t)=>(0,c.jsx)(d,{engine:e,size:50,machine:t.machine}),getType:()=>a.OB.Emitter,getName:()=>"Keyboard",getTooltip:()=>"Visual keyboard to send out MIDI notes with fixed attack",getMachineCode:()=>"keyboard"}),this.factory}constructor(){super(),this.getNode().addMachineOutPort("Out",0)}},o.factory=void 0,r=o))||r;const d=e=>{const t=i.useCallback((t=>{const n=s.FP.buildNote(t,{rawAttack:150}),r=Uint8Array.from([s.br.CHANNEL_MESSAGES.noteon<<4,n.getOffsetNumber(s.OK.octaveOffset),n.rawAttack]);e.machine.emit({message:{rawData:r,isChannelMessage:!0,type:"noteon",channel:1},type:"noteon"},0)}),[e.machine]),n=i.useCallback((t=>{const n=s.FP.buildNote(t,{rawAttack:150}),r=Uint8Array.from([s.br.CHANNEL_MESSAGES.noteoff<<4,n.getOffsetNumber(s.OK.octaveOffset),n.rawAttack]);e.machine.emit({message:{rawData:r,isChannelMessage:!0,type:"noteoff",channel:1},type:"noteoff"},0)}),[e.machine]);return i.useEffect((()=>{const e={q:"B2",s:"C3",e:"C#3",d:"D3",r:"D#3",f:"E3",g:"F3",y:"F#3",h:"G3",u:"G#3",j:"A3",i:"A#3",k:"B3",l:"C4"},r=n=>{n.repeat||void 0!=e[n.key]&&t(e[n.key])},o=t=>{void 0!=e[t.key]&&n(e[t.key])};return window.addEventListener("keydown",r),window.addEventListener("keyup",o),()=>{window.removeEventListener("keydown",r),window.removeEventListener("keyup",o)}}),[t,n]),(0,c.jsx)(l.S.KeyboardBody,{children:(0,c.jsxs)("ul",{className:"set",children:[(0,c.jsx)("li",{className:"white e",onMouseDown:()=>t("C3"),onMouseUp:()=>n("C3")}),(0,c.jsx)("li",{className:"black ds",onMouseDown:()=>t("C#3"),onMouseUp:()=>n("C#3")}),(0,c.jsx)("li",{className:"white d",onMouseDown:()=>t("D3"),onMouseUp:()=>n("D3")}),(0,c.jsx)("li",{className:"black cs",onMouseDown:()=>t("D#3"),onMouseUp:()=>n("D#3")}),(0,c.jsx)("li",{className:"white c",onMouseDown:()=>t("E3"),onMouseUp:()=>n("E3")}),(0,c.jsx)("li",{className:"white b",onMouseDown:()=>t("F3"),onMouseUp:()=>n("F3")}),(0,c.jsx)("li",{className:"black as",onMouseDown:()=>t("F#3"),onMouseUp:()=>n("F#3")}),(0,c.jsx)("li",{className:"white a",onMouseDown:()=>t("G3"),onMouseUp:()=>n("G3")}),(0,c.jsx)("li",{className:"black gs",onMouseDown:()=>t("G#3"),onMouseUp:()=>n("G#3")}),(0,c.jsx)("li",{className:"white g",onMouseDown:()=>t("A3"),onMouseUp:()=>n("A3")}),(0,c.jsx)("li",{className:"black fs",onMouseDown:()=>t("A#3"),onMouseUp:()=>n("A#3")}),(0,c.jsx)("li",{className:"white f",onMouseDown:()=>t("B3"),onMouseUp:()=>n("B3")})]})})}},46497:(e,t,n)=>{"use strict";n.d(t,{S:()=>v});var r,o,i,s,a,l,c,u,d,h,p,f,m=n(57528),g=n(46948);let v;var y;(y=v||(v={})).Dropdown=g.A.div(r||(r=(0,m.A)(["\n vertical-align: middle;\n width: 100%;\n span {\n\n vertical-align: middle;\n }\n input {\n\n vertical-align: middle;\n }\n "]))),y.Slider=g.A.div(o||(o=(0,m.A)(["\n vertical-align: middle;\n input {\n\n vertical-align: middle;\n }\n span {\n\n vertical-align: middle;\n }\n "]))),y.Note=g.A.div(i||(i=(0,m.A)(["\n height: 200px;\n position: relative;\n vertical-align: middle;\n width: 100%;\n display: flex;\n flex-direction: column;\n justify-content: center;\n "]))),y.SettingsBarVertical=g.A.div(s||(s=(0,m.A)(['\n position: relative;\n vertical-align: middle;\n width: 100%;\n display: flex;\n justifyContent: "down";\n flex-direction: row;\n ']))),y.SettingsBarHorizontal=g.A.div(a||(a=(0,m.A)(['\n position: relative;\n vertical-align: middle;\n width: 100%;\n display: flex;\n justifyContent: "down";\n flex-direction: column;\n padding: 10px;\n padding: 0px;\n ']))),y.ExpandButton=g.A.button(l||(l=(0,m.A)(["\n background: ",";\n float: center;\n border: solid;\n border-width: 1px;\n border-color: rgb(60, 60, 60);\n color: white;\n outline: none;\n cursor: pointer;\n border-radius: 5px;\n transition: all 0.3s ease-in-out;\n "])),(e=>e.open?"rgb(7, 133, 116)":"rgb(7, 81, 7)")),y.VoiceInput=g.A.textarea(c||(c=(0,m.A)(["\n display: inline-block;\n border: solid 1px black;\n width: 100%;\n white-space: pre;\n max-width: auto;\n font-size: 11px;\n padding: 5px;\n overflow-wrap: normal;\n overscroll-behavior: contain;\n overflow-y: hidden;\n overflow-x: hidden;\n background-color: ",";\n "])),(e=>e.inError?"#ffe6e6":"white")),y.SettingsBar=g.A.div(u||(u=(0,m.A)(['\n padding: 3px;\n position: relative;\n vertical-align: middle;\n width: auto;\n display: flex;\n justifyContent: "center";\n flex-direction: column;\n ']))),y.InternalWrapper=g.A.div(d||(d=(0,m.A)(["\n width: 100%;\n height: ",";\n overflow: hidden;\n "])),(e=>e.open?"auto":"0")),y.ConsoleLog=g.A.div(h||(h=(0,m.A)(["\n max-height: 150px;\n overflow-y: auto;\n background: black;\n scroll-behavior: smooth;\n\n &::-webkit-scrollbar {\n\n width: 12px;\n }\n\n &::-webkit-scrollbar-track {\n\n -webkit-box-shadow: inset 0 0 6px #009633;\n border-radius: 0px;\n }\n\n &::-webkit-scrollbar-thumb {\n\n border-radius: 0px;\n -webkit-box-shadow: inset 0 0 6px white;\n }\n "]))),y.ConsoleLogEntry=g.A.span(p||(p=(0,m.A)(["\n "]))),y.KeyboardBody=g.A.div(f||(f=(0,m.A)(["\n ul {\n\n position:relative;\n border-radius:1em;\n }\n\n li {\n\n margin:0;\n padding:0;\n list-style:none;\n position:relative;\n float:left\n }\n\n ul .white {\n\n height:8em;\n width:3em;\n z-index:1;\n border-left:1px solid #bbb;\n border-bottom:1px solid #bbb;\n border-radius:0 0 5px 5px;\n box-shadow:-1px 0 0 rgba(255,255,255,0.8) inset,0 0 5px #ccc inset,0 0 3px rgba(0,0,0,0.2);\n background:linear-gradient(to bottom,#eee 0%,#fff 100%)\n }\n\n ul .white:active {\n\n border-top:1px solid #777;\n border-left:1px solid #999;\n border-bottom:1px solid #999;\n box-shadow:2px 0 3px rgba(0,0,0,0.1) inset,-5px 5px 20px rgba(0,0,0,0.2) inset,0 0 3px rgba(0,0,0,0.2);\n background:linear-gradient(to bottom,#fff 0%,#e9e9e9 100%)\n }\n\n .black {\n\n height:5em;\n width:1.5em;\n margin:0 0 0 -1em;\n z-index:2;\n border:1px solid #000;\n border-radius:0 0 3px 3px;\n box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -5px 2px 3px rgba(0,0,0,0.6) inset,0 2px 4px rgba(0,0,0,0.5);\n background:linear-gradient(45deg,#222 0%,#555 100%)\n }\n\n .black:active {\n\n box-shadow:-1px -1px 2px rgba(255,255,255,0.2) inset,0 -2px 2px 3px rgba(0,0,0,0.6) inset,0 1px 2px rgba(0,0,0,0.5);\n background:linear-gradient(to right,#444 0%,#222 100%)\n }\n\n .a,.g,.f,.d,.c {\n\n margin:0 0 0 -1em\n }\n\n ul li:first-of-type {\n\n border-radius:5px 0 5px 5px\n }\n\n ul li:last-child {\n\n border-radius:0 5px 5px 5px\n }\n "])))},77910:(e,t,n)=>{"use strict";n.d(t,{CI:()=>g,G5:()=>m,JO:()=>p,LB:()=>l,OB:()=>c,Wn:()=>h,yC:()=>a,zz:()=>u});var r=n(61619),o=n(87828),i=n(99986),s=n(44414);class a extends EventTarget{getNode(){return this.node}setNode(e){this.machineNode=e}constructor(e){super(),this.node=void 0,this.enabled=!0,this.machineNode=void 0,this.id=void 0,this.emitter=void 0,a.counters[this.constructor.name]||(a.counters[this.constructor.name]=0),this.id=this.constructor.name+"_"+a.counters[this.constructor.name]++,this.node=new o.Jt(this,(null!==e&&void 0!==e?e:this.getFactory()).getMachineCode(),e)}isEnabled(){return this.enabled}setEnabled(e){this.enabled=e}getId(){return this.id}dispose(){}setEmit(e){this.emitter=e}emit(e,t){var n,r,o;this.enabled&&(null===(n=(null!==(r=this.machineNode)&&void 0!==r?r:this.getNode()).getOutPorts()[t])||void 0===n||n.setSending(!0),null===(o=this.emitter)||void 0===o||o.call(this,e,t))}}a.counters={};let l=function(e){return e[e.Processed=0]="Processed",e[e.Ignored=1]="Ignored",e}({}),c=function(e){return e.Emitter="Emitters",e.Output="Output",e.System="System",e.Processor="Processors",e.WebRTC="WebRTC",e.MIDI="MIDI",e}({});const u={[c.Processor]:{tooltip:"Read a signal, modify/filter it, re-emit it",factories:[]},[c.Emitter]:{tooltip:"Emit signals based on GUI interactions or clock input",factories:[]},[c.Output]:{tooltip:"Read signals and emit sound",factories:[]},[c.System]:{tooltip:"Emit system signals",factories:[]},[c.WebRTC]:{tooltip:"Remote machines",factories:[]},[c.MIDI]:{tooltip:"MIDI Tooltip",factories:[]}};function d(e){i.Hi.getNodeFactories().registerFactory(new f(e,e.getMachineCode())),u[e.getType()].factories.push(e)}function h(e){d(e.buildFactory())}function p(e){return function(t){return d(t.buildFactory(e)),t}}class f extends r.IT{constructor(e,t){super(t),this.machineFactory=void 0,this.machineFactory=e}generateReactWidget(e){var t,n;const r=null===(t=(n=this.machineFactory).createWidget)||void 0===t?void 0:t.call(n,this.engine,e.model);return(0,s.jsx)(o.EU,{engine:i.Hi,node:e.model,customWidget:r})}generateModel(e){if(void 0!=e.initialConfig.clockConfig)e.initialConfig.state=e.initialConfig.clockConfig;else if(void 0!=e.initialConfig.arpConfig)e.initialConfig.state=e.initialConfig.arpConfig;else if(void 0!=e.initialConfig.midiFileConfig)e.initialConfig.state=e.initialConfig.midiFileConfig;else if(void 0!=e.initialConfig.oscillatorConfig)e.initialConfig.state=e.initialConfig.oscillatorConfig;else if(void 0!=e.initialConfig.thruConfig)e.initialConfig.state=e.initialConfig.thruConfig;else if(void 0!=e.initialConfig.toneJsConfig)e.initialConfig.state=e.initialConfig.toneJsConfig;else if(this.machineFactory.getName().startsWith("ToneJsSample")){var t;if((null===(t=e.initialConfig)||void 0===t?void 0:t.state)instanceof String)e.initialConfig.state={sample:e.initialConfig.state,volume:15};else switch(e.initialConfig.state){case 0:e.initialConfig.state={sample:"Drum",volume:-15};break;case 1:e.initialConfig.state={sample:"Kalimba",volume:-15};break;case 2:e.initialConfig.state={sample:"Guitar",volume:-15}}}return"ArpMachine"!==this.machineFactory.getName()&&"Arp"!==this.machineFactory.getName()||(void 0==e.initialConfig.state.keyboardNotes&&(e.initialConfig.state.keyboardNotes=[]),void 0==e.initialConfig.state.arpMode&&(e.initialConfig.state.arpMode="predefined"),void 0==e.initialConfig.state.predefinedNotes&&(e.initialConfig.state.predefinedNotes=e.initialConfig.state.notes)),new o.Jt(this.machineFactory.createMachine(e.initialConfig.state),this.type)}}function m(e){switch(e){case c.Processor:return"rgb(0,150,255)";case c.Emitter:return"rgb(100,0,255)";case c.Output:return"rgb(0,150,50)";case c.System:return"rgb(255,153,0)";case c.WebRTC:return"rgb(255,77,136)";case c.MIDI:return"rgb(150,150,50)"}}class g{constructor(e,t,n){this.type=void 0,this.label=void 0,this.tooltip=void 0,this.type=e,this.label=t,this.tooltip=n}getMachineCode(){return"machine"}createWidget(e,t){throw new Error("Method not implemented.")}createMachine(e){throw new Error("Method not implemented.")}getName(){return this.label}getType(){return this.type}getTooltip(){return this.tooltip}}},2434:(e,t,n)=>{"use strict";n.r(t),n.d(t,{MidiFileMachine:()=>c});var r,o,i=n(21830),s=n(75546),a=n(99986),l=n(77910);let c=(0,l.Wn)((o=class e extends l.yC{getFactory(){return e.factory}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),getType:()=>l.OB.Emitter,getName:()=>"MidiFile",getTooltip:()=>"Reads CLOCK message and sends out MIDI from file content",getMachineCode:()=>"midifile"}),this.factory}getState(){return this.config}constructor(t){if(super(),this.config=void 0,this.playing=!1,void 0==t){t={tracks:[],timeDivision:0,fileName:"None"};const n=document.createElement("input");n.type="file",n.accept=".mid, .midi",i.parse(n,(t=>{const r=e.createMidiConfig(t,n);this.getNode().addMachineOutPort(a.fT,0);for(let e=0;e{r.push(e)})):r.push(e.data);const u=Uint8Array.from(r),d=new s.QB(u),h={type:d.type,message:{rawData:u,isChannelMessage:d.isChannelMessage,type:d.type,channel:o+1}};"noteon"===h.type&&0!==h.message.rawData[2]?(l++,c=Math.max(c,l)):("noteoff"===h.type||"noteon"===h.type&&0===h.message.rawData[2])&&(l=Math.max(0,l-1)),a.push({...h,deltaTime:e.deltaTime})}let u=o+1+". "+(null!==(r=t)&&void 0!==r?r:"unknown");u+=c>1?" ("+c+" voices)":1==c?" (mono)":" (silent)",n.push({currentClock:0,currentEvent:0,name:u,events:a,voices:c})}return{tracks:n,timeDivision:e.timeDivision,fileName:t.value.replace(/^.*[\\/]/,"")}}receive(e,t){switch(e.message.type){case"allnotesoff":for(let n=0;nn.currentEvent)for(n.currentClock+=this.config.timeDivision/24;void 0!=n.events[n.currentEvent]&&n.events[n.currentEvent].deltaTime<=n.currentClock;){"sysex"!==n.events[n.currentEvent].type&&t.push({signal:n.events[n.currentEvent],channel:e+1});const r=n.currentClock-n.events[n.currentEvent].deltaTime;n.currentEvent++,n.currentClock=0,r>0&&void 0!=n.events[n.currentEvent]&&(n.currentClock+=r)}}for(let e=0;e{"use strict";n.r(t),n.d(t,{OscillatorMachine:()=>d});var r,o,i=n(9950),s=n(55076),a=n(46497),l=n(77910),c=n(30321),u=n(44414);let d=(0,l.Wn)((o=class e extends l.yC{getFactory(){return e.factory}applyFilterOptions(e){this.filter.type=e.filter,this.filter.frequency.value=e.filterFrequency,this.filter.Q.value=e.filterQ,this.filter.gain.value=e.filterGain}constructor(e){super(),this.oscillators={},this.mainGainNode=void 0,this.filter=void 0,this.analyzer=void 0,this.state=void 0,this.turnedOff=!1,this.mainGainNode=s.SD().createGain(),this.mainGainNode.connect(s.SD().rawContext.destination),this.analyzer=s.SD().createAnalyser(),this.analyzer.connect(this.mainGainNode),this.state=null!==e&&void 0!==e?e:{volume:.1,waveform:"square",detune:0,filter:"lowpass",filterFrequency:5e3,filterQ:1,filterGain:0},this.mainGainNode.gain.value=this.state.volume/4,this.filter=s.SD().createBiquadFilter(),this.applyFilterOptions(this.state),this.filter.connect(this.analyzer),this.getNode().addMachineInPort("In",1)}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,u.jsx)(h,{engine:e,size:50,machine:t.machine}),getName:()=>"Oscillator",getType:()=>l.OB.Output,getTooltip:()=>"Reads MIDI notes and emits sound with basic filtering ability",getMachineCode:()=>"oscillator"}),this.factory}getState(){return this.state}setState(e){this.mainGainNode.gain.value=e.volume/4,this.applyFilterOptions(e),this.state.detune!==e.detune&&this.stopAllOscillators(),this.state=e}stopAllOscillators(e){Object.values(this.oscillators).forEach((e=>{e.stop(),e.disconnect()})),!0===e&&(this.turnedOff=!0)}receive(e,t){if(this.turnedOff)return l.LB.Ignored;const n=e.message.rawData[1]+this.state.detune;if("stop"===e.message.type||"allnotesoff"===e.message.type||"allsoundoff"===e.message.type)this.stopAllOscillators();else if("noteoff"===e.message.type||"noteon"===e.message.type&&0===e.message.rawData[2]){var r,o;null===(r=this.oscillators[n])||void 0===r||r.stop(),null===(o=this.oscillators[n])||void 0===o||o.disconnect()}else if("noteon"===e.message.type){var i,a;const e=s.SD().createOscillator();e.connect(this.filter),e.connect(this.mainGainNode),e.frequency.value=function(e){p[e]||(p[e]=440*Math.pow(2,(e-69)/12));return p[e]}(n),e.type=this.state.waveform,null===(i=this.oscillators[n])||void 0===i||i.stop(),null===(a=this.oscillators[n])||void 0===a||a.disconnect(),this.oscillators[n]=e,this.oscillators[n].start()}return l.LB.Processed}dispose(){this.stopAllOscillators()}getInChannelCount(){return 1}},o.factory=void 0,r=o))||r;const h=e=>{const[t,n]=i.useState(e.machine.getState());function r(t){e.machine.setState(t),n(t)}return(0,u.jsxs)(a.S.SettingsBar,{children:[(0,u.jsxs)(a.S.Slider,{children:[(0,u.jsx)("span",{children:"Volume: "}),(0,u.jsx)("input",{type:"range",min:"0.0",max:"0.5",step:"0.01",value:t.volume,onChange:e=>{r({...t,volume:Number(e.target.value)})},list:"volumes",name:"volume"}),(0,u.jsxs)("datalist",{id:"volumes",children:[(0,u.jsx)("option",{value:"0.0",label:"Mute"}),(0,u.jsx)("option",{value:"1.0",label:"100%"})]})]}),(0,u.jsx)(c.I,{width:200,height:50,analyser:e.machine.analyzer}),(0,u.jsxs)(a.S.Dropdown,{children:[(0,u.jsx)("span",{children:"Waveform: "}),(0,u.jsxs)("select",{name:"waveform",value:t.waveform,onChange:e=>{r({...t,waveform:e.target.value})},children:[(0,u.jsx)("option",{value:"sine",children:"Sine"}),(0,u.jsx)("option",{value:"square",children:"Square"}),(0,u.jsx)("option",{value:"sawtooth",children:"Sawtooth"}),(0,u.jsx)("option",{value:"triangle",children:"Triangle"})]})]}),(0,u.jsxs)(a.S.Slider,{children:[(0,u.jsxs)("span",{children:["Detune (",t.detune,")"]}),(0,u.jsx)("input",{type:"range",min:"-12.0",max:"12.0",step:"1",value:t.detune,onChange:e=>{r({...t,detune:Number(e.target.value)})},list:"detunes",name:"detune"}),(0,u.jsxs)("datalist",{id:"detunes",children:[(0,u.jsx)("option",{value:"-12.0",label:"-1 octave"}),(0,u.jsx)("option",{value:"0",label:"Normal"}),(0,u.jsx)("option",{value:"12.0",label:"+1 octave"})]})]}),(0,u.jsxs)(a.S.Dropdown,{children:[(0,u.jsx)("span",{children:"Filter: "}),(0,u.jsxs)("select",{name:"waveform",value:t.filter,onChange:e=>{r({...t,filter:e.target.value})},children:[(0,u.jsx)("option",{value:"lowpass",children:"Lowpass"}),(0,u.jsx)("option",{value:"highpass",children:"Highpass"}),(0,u.jsx)("option",{value:"bandpass",children:"Bandpass"}),(0,u.jsx)("option",{value:"peaking",children:"Peaking"}),(0,u.jsx)("option",{value:"notch",children:"Notch"})]})]}),(0,u.jsxs)(a.S.Slider,{children:[(0,u.jsx)("span",{children:"Filter Freq: "}),(0,u.jsx)("input",{type:"range",min:"500",max:"5000",step:"1",value:t.filterFrequency,onChange:e=>{r({...t,filterFrequency:Number(e.target.value)})},list:"filterFrequencies",name:"filterFrequency"}),(0,u.jsx)("datalist",{id:"filterFrequencies",children:(0,u.jsx)("option",{value:"5000",label:"Default"})})]}),(0,u.jsxs)(a.S.Slider,{children:[(0,u.jsx)("span",{children:"Filter Q: "}),(0,u.jsx)("input",{type:"range",min:"1",max:"50",step:"1",value:t.filterQ,onChange:e=>{r({...t,filterQ:Number(e.target.value)})},list:"filterQs",name:"filterQ"}),(0,u.jsx)("datalist",{id:"filterQs",children:(0,u.jsx)("option",{value:"1",label:"Default"})})]}),(0,u.jsxs)(a.S.Slider,{children:[(0,u.jsx)("span",{children:"Filter Gain: "}),(0,u.jsx)("input",{type:"range",min:"-40",max:"40",disabled:"lowshelf"!==t.filter&&"highshelf"!==t.filter&&"peaking"!==t.filter,step:"1",value:t.filterGain,onChange:e=>{r({...t,filterGain:Number(e.target.value)})},list:"filterGains",name:"filterGain"}),(0,u.jsx)("datalist",{id:"filterGains",children:(0,u.jsx)("option",{value:"0",label:"Default"})})]})]})},p={}},15585:(e,t,n)=>{"use strict";n.r(t),n.d(t,{EmittingRemoteMachine:()=>Io,ReceivingRemoteMachine:()=>Do});var r={};n.r(r),n.d(r,{fixNegotiationNeeded:()=>L,shimAddTrackRemoveTrack:()=>N,shimAddTrackRemoveTrackWithNative:()=>R,shimGetDisplayMedia:()=>k,shimGetSendersWithDtmf:()=>O,shimGetStats:()=>M,shimGetUserMedia:()=>C,shimMediaStream:()=>E,shimOnTrack:()=>T,shimPeerConnection:()=>I,shimSenderReceiverGetStats:()=>P});var o={};n.r(o),n.d(o,{shimAddTransceiver:()=>H,shimCreateAnswer:()=>Y,shimCreateOffer:()=>q,shimGetDisplayMedia:()=>j,shimGetParameters:()=>G,shimGetUserMedia:()=>D,shimOnTrack:()=>F,shimPeerConnection:()=>B,shimRTCDataChannel:()=>V,shimReceiverGetStats:()=>z,shimRemoveStream:()=>W,shimSenderGetStats:()=>U});var i={};n.r(i),n.d(i,{shimAudioContext:()=>ne,shimCallbacksAPI:()=>$,shimConstraints:()=>Z,shimCreateOfferLegacy:()=>te,shimGetUserMedia:()=>Q,shimLocalStreamsAPI:()=>K,shimRTCIceServerUrls:()=>J,shimRemoteStreamsAPI:()=>X,shimTrackEventTransceiver:()=>ee});var s={};n.r(s),n.d(s,{removeExtmapAllowMixed:()=>ue,shimAddIceCandidateNullOrEmpty:()=>de,shimConnectionState:()=>ce,shimMaxMessageSize:()=>ae,shimParameterlessSetLocalDescription:()=>he,shimRTCIceCandidate:()=>ie,shimRTCIceCandidateRelayProtocol:()=>se,shimSendThrowTypeError:()=>le});class a{constructor(){this.encoder=new TextEncoder,this._pieces=[],this._parts=[]}append_buffer(e){this.flush(),this._parts.push(e)}append(e){this._pieces.push(e)}flush(){if(this._pieces.length>0){const e=new Uint8Array(this._pieces);this._parts.push(e),this._pieces=[]}}toArrayBuffer(){const e=[];for(const t of this._parts)e.push(t);return function(e){let t=0;for(const o of e)t+=o.byteLength;const n=new Uint8Array(t);let r=0;for(const o of e){const e=new Uint8Array(o.buffer,o.byteOffset,o.byteLength);n.set(e,r),r+=o.byteLength}return n}(e).buffer}}function l(e){return new u(e).unpack()}function c(e){const t=new d,n=t.pack(e);return n instanceof Promise?n.then((()=>t.getBuffer())):t.getBuffer()}class u{constructor(e){this.index=0,this.dataBuffer=e,this.dataView=new Uint8Array(this.dataBuffer),this.length=this.dataBuffer.byteLength}unpack(){const e=this.unpack_uint8();if(e<128)return e;if((224^e)<32)return(224^e)-32;let t;if((t=160^e)<=15)return this.unpack_raw(t);if((t=176^e)<=15)return this.unpack_string(t);if((t=144^e)<=15)return this.unpack_array(t);if((t=128^e)<=15)return this.unpack_map(t);switch(e){case 192:return null;case 193:case 212:case 213:case 214:case 215:return;case 194:return!1;case 195:return!0;case 202:return this.unpack_float();case 203:return this.unpack_double();case 204:return this.unpack_uint8();case 205:return this.unpack_uint16();case 206:return this.unpack_uint32();case 207:return this.unpack_uint64();case 208:return this.unpack_int8();case 209:return this.unpack_int16();case 210:return this.unpack_int32();case 211:return this.unpack_int64();case 216:return t=this.unpack_uint16(),this.unpack_string(t);case 217:return t=this.unpack_uint32(),this.unpack_string(t);case 218:return t=this.unpack_uint16(),this.unpack_raw(t);case 219:return t=this.unpack_uint32(),this.unpack_raw(t);case 220:return t=this.unpack_uint16(),this.unpack_array(t);case 221:return t=this.unpack_uint32(),this.unpack_array(t);case 222:return t=this.unpack_uint16(),this.unpack_map(t);case 223:return t=this.unpack_uint32(),this.unpack_map(t)}}unpack_uint8(){const e=255&this.dataView[this.index];return this.index++,e}unpack_uint16(){const e=this.read(2),t=256*(255&e[0])+(255&e[1]);return this.index+=2,t}unpack_uint32(){const e=this.read(4),t=256*(256*(256*e[0]+e[1])+e[2])+e[3];return this.index+=4,t}unpack_uint64(){const e=this.read(8),t=256*(256*(256*(256*(256*(256*(256*e[0]+e[1])+e[2])+e[3])+e[4])+e[5])+e[6])+e[7];return this.index+=8,t}unpack_int8(){const e=this.unpack_uint8();return e<128?e:e-256}unpack_int16(){const e=this.unpack_uint16();return e<32768?e:e-65536}unpack_int32(){const e=this.unpack_uint32();return e<2**31?e:e-2**32}unpack_int64(){const e=this.unpack_uint64();return e<2**63?e:e-2**64}unpack_raw(e){if(this.length>31?1:-1)*(8388607&e|8388608)*2**((e>>23&255)-127-23)}unpack_double(){const e=this.unpack_uint32(),t=(e>>20&2047)-1023;return(0===e>>31?1:-1)*((1048575&e|1048576)*2**(t-20)+this.unpack_uint32()*2**(t-52))}read(e){const t=this.index;if(t+e<=this.length)return this.dataView.subarray(t,t+e);throw new Error("BinaryPackFailure: read index out of range")}}class d{getBuffer(){return this._bufferBuilder.toArrayBuffer()}pack(e){if("string"===typeof e)this.pack_string(e);else if("number"===typeof e)Math.floor(e)===e?this.pack_integer(e):this.pack_double(e);else if("boolean"===typeof e)!0===e?this._bufferBuilder.append(195):!1===e&&this._bufferBuilder.append(194);else if(void 0===e)this._bufferBuilder.append(192);else{if("object"!==typeof e)throw new Error('Type "'.concat(typeof e,'" not yet supported'));if(null===e)this._bufferBuilder.append(192);else{const t=e.constructor;if(e instanceof Array){const t=this.pack_array(e);if(t instanceof Promise)return t.then((()=>this._bufferBuilder.flush()))}else if(e instanceof ArrayBuffer)this.pack_bin(new Uint8Array(e));else if("BYTES_PER_ELEMENT"in e){const t=e;this.pack_bin(new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}else if(e instanceof Date)this.pack_string(e.toString());else{if(e instanceof Blob)return e.arrayBuffer().then((e=>{this.pack_bin(new Uint8Array(e)),this._bufferBuilder.flush()}));if(t!=Object&&!t.toString().startsWith("class"))throw new Error('Type "'.concat(t.toString(),'" not yet supported'));{const t=this.pack_object(e);if(t instanceof Promise)return t.then((()=>this._bufferBuilder.flush()))}}}}this._bufferBuilder.flush()}pack_bin(e){const t=e.length;if(t<=15)this.pack_uint8(160+t);else if(t<=65535)this._bufferBuilder.append(218),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this._bufferBuilder.append(219),this.pack_uint32(t)}this._bufferBuilder.append_buffer(e)}pack_string(e){const t=this._textEncoder.encode(e),n=t.length;if(n<=15)this.pack_uint8(176+n);else if(n<=65535)this._bufferBuilder.append(216),this.pack_uint16(n);else{if(!(n<=4294967295))throw new Error("Invalid length");this._bufferBuilder.append(217),this.pack_uint32(n)}this._bufferBuilder.append_buffer(t)}pack_array(e){const t=e.length;if(t<=15)this.pack_uint8(144+t);else if(t<=65535)this._bufferBuilder.append(220),this.pack_uint16(t);else{if(!(t<=4294967295))throw new Error("Invalid length");this._bufferBuilder.append(221),this.pack_uint32(t)}const n=r=>{if(rn(r+1))):n(r+1)}};return n(0)}pack_integer(e){if(e>=-32&&e<=127)this._bufferBuilder.append(255&e);else if(e>=0&&e<=255)this._bufferBuilder.append(204),this.pack_uint8(e);else if(e>=-128&&e<=127)this._bufferBuilder.append(208),this.pack_int8(e);else if(e>=0&&e<=65535)this._bufferBuilder.append(205),this.pack_uint16(e);else if(e>=-32768&&e<=32767)this._bufferBuilder.append(209),this.pack_int16(e);else if(e>=0&&e<=4294967295)this._bufferBuilder.append(206),this.pack_uint32(e);else if(e>=-2147483648&&e<=2147483647)this._bufferBuilder.append(210),this.pack_int32(e);else if(e>=-0x8000000000000000&&e<=0x8000000000000000)this._bufferBuilder.append(211),this.pack_int64(e);else{if(!(e>=0&&e<=0x10000000000000000))throw new Error("Invalid integer");this._bufferBuilder.append(207),this.pack_uint64(e)}}pack_double(e){let t=0;e<0&&(t=1,e=-e);const n=Math.floor(Math.log(e)/Math.LN2),r=e/2**n-1,o=Math.floor(r*2**52),i=2**32,s=t<<31|n+1023<<20|o/i&1048575,a=o%i;this._bufferBuilder.append(203),this.pack_int32(s),this.pack_int32(a)}pack_object(e){const t=Object.keys(e),n=t.length;if(n<=15)this.pack_uint8(128+n);else if(n<=65535)this._bufferBuilder.append(222),this.pack_uint16(n);else{if(!(n<=4294967295))throw new Error("Invalid length");this._bufferBuilder.append(223),this.pack_uint32(n)}const r=n=>{if(nr(n+1)))}return r(n+1)}};return r(0)}pack_uint8(e){this._bufferBuilder.append(e)}pack_uint16(e){this._bufferBuilder.append(e>>8),this._bufferBuilder.append(255&e)}pack_uint32(e){const t=4294967295&e;this._bufferBuilder.append((4278190080&t)>>>24),this._bufferBuilder.append((16711680&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t)}pack_uint64(e){const t=e/2**32,n=e%2**32;this._bufferBuilder.append((4278190080&t)>>>24),this._bufferBuilder.append((16711680&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t),this._bufferBuilder.append((4278190080&n)>>>24),this._bufferBuilder.append((16711680&n)>>>16),this._bufferBuilder.append((65280&n)>>>8),this._bufferBuilder.append(255&n)}pack_int8(e){this._bufferBuilder.append(255&e)}pack_int16(e){this._bufferBuilder.append((65280&e)>>8),this._bufferBuilder.append(255&e)}pack_int32(e){this._bufferBuilder.append(e>>>24&255),this._bufferBuilder.append((16711680&e)>>>16),this._bufferBuilder.append((65280&e)>>>8),this._bufferBuilder.append(255&e)}pack_int64(e){const t=Math.floor(e/2**32),n=e%2**32;this._bufferBuilder.append((4278190080&t)>>>24),this._bufferBuilder.append((16711680&t)>>>16),this._bufferBuilder.append((65280&t)>>>8),this._bufferBuilder.append(255&t),this._bufferBuilder.append((4278190080&n)>>>24),this._bufferBuilder.append((16711680&n)>>>16),this._bufferBuilder.append((65280&n)>>>8),this._bufferBuilder.append(255&n)}constructor(){this._bufferBuilder=new a,this._textEncoder=new TextEncoder}}let h=!0,p=!0;function f(e,t,n){const r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}function m(e,t,n){if(!e.RTCPeerConnection)return;const r=e.RTCPeerConnection.prototype,o=r.addEventListener;r.addEventListener=function(e,r){if(e!==t)return o.apply(this,arguments);const i=e=>{const t=n(e);t&&(r.handleEvent?r.handleEvent(t):r(t))};return this._eventMap=this._eventMap||{},this._eventMap[t]||(this._eventMap[t]=new Map),this._eventMap[t].set(r,i),o.apply(this,[e,i])};const i=r.removeEventListener;r.removeEventListener=function(e,n){if(e!==t||!this._eventMap||!this._eventMap[t])return i.apply(this,arguments);if(!this._eventMap[t].has(n))return i.apply(this,arguments);const r=this._eventMap[t].get(n);return this._eventMap[t].delete(n),0===this._eventMap[t].size&&delete this._eventMap[t],0===Object.keys(this._eventMap).length&&delete this._eventMap,i.apply(this,[e,r])},Object.defineProperty(r,"on"+t,{get(){return this["_on"+t]},set(e){this["_on"+t]&&(this.removeEventListener(t,this["_on"+t]),delete this["_on"+t]),e&&this.addEventListener(t,this["_on"+t]=e)},enumerable:!0,configurable:!0})}function g(e){return"boolean"!==typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(h=e,e?"adapter.js logging disabled":"adapter.js logging enabled")}function v(e){return"boolean"!==typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(p=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))}function y(){if("object"===typeof window){if(h)return;"undefined"!==typeof console&&"function"===typeof console.log&&console.log.apply(console,arguments)}}function b(e,t){p&&console.warn(e+" is deprecated, please use "+t+" instead.")}function w(e){return"[object Object]"===Object.prototype.toString.call(e)}function _(e){return w(e)?Object.keys(e).reduce((function(t,n){const r=w(e[n]),o=r?_(e[n]):e[n],i=r&&!Object.keys(o).length;return void 0===o||i?t:Object.assign(t,{[n]:o})}),{}):e}function x(e,t,n){t&&!n.has(t.id)&&(n.set(t.id,t),Object.keys(t).forEach((r=>{r.endsWith("Id")?x(e,e.get(t[r]),n):r.endsWith("Ids")&&t[r].forEach((t=>{x(e,e.get(t),n)}))})))}function S(e,t,n){const r=n?"outbound-rtp":"inbound-rtp",o=new Map;if(null===t)return o;const i=[];return e.forEach((e=>{"track"===e.type&&e.trackIdentifier===t.id&&i.push(e)})),i.forEach((t=>{e.forEach((n=>{n.type===r&&n.trackId===t.id&&x(e,n,o)}))})),o}const A=y;function C(e,t){const n=e&&e.navigator;if(!n.mediaDevices)return;const r=function(e){if("object"!==typeof e||e.mandatory||e.optional)return e;const t={};return Object.keys(e).forEach((n=>{if("require"===n||"advanced"===n||"mediaSource"===n)return;const r="object"===typeof e[n]?e[n]:{ideal:e[n]};void 0!==r.exact&&"number"===typeof r.exact&&(r.min=r.max=r.exact);const o=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==r.ideal){t.optional=t.optional||[];let e={};"number"===typeof r.ideal?(e[o("min",n)]=r.ideal,t.optional.push(e),e={},e[o("max",n)]=r.ideal,t.optional.push(e)):(e[o("",n)]=r.ideal,t.optional.push(e))}void 0!==r.exact&&"number"!==typeof r.exact?(t.mandatory=t.mandatory||{},t.mandatory[o("",n)]=r.exact):["min","max"].forEach((e=>{void 0!==r[e]&&(t.mandatory=t.mandatory||{},t.mandatory[o(e,n)]=r[e])}))})),e.advanced&&(t.optional=(t.optional||[]).concat(e.advanced)),t},o=function(e,o){if(t.version>=61)return o(e);if((e=JSON.parse(JSON.stringify(e)))&&"object"===typeof e.audio){const t=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};t((e=JSON.parse(JSON.stringify(e))).audio,"autoGainControl","googAutoGainControl"),t(e.audio,"noiseSuppression","googNoiseSuppression"),e.audio=r(e.audio)}if(e&&"object"===typeof e.video){let i=e.video.facingMode;i=i&&("object"===typeof i?i:{ideal:i});const s=t.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!n.mediaDevices.getSupportedConstraints||!n.mediaDevices.getSupportedConstraints().facingMode||s)){let t;if(delete e.video.facingMode,"environment"===i.exact||"environment"===i.ideal?t=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(t=["front"]),t)return n.mediaDevices.enumerateDevices().then((n=>{let s=(n=n.filter((e=>"videoinput"===e.kind))).find((e=>t.some((t=>e.label.toLowerCase().includes(t)))));return!s&&n.length&&t.includes("back")&&(s=n[n.length-1]),s&&(e.video.deviceId=i.exact?{exact:s.deviceId}:{ideal:s.deviceId}),e.video=r(e.video),A("chrome: "+JSON.stringify(e)),o(e)}))}e.video=r(e.video)}return A("chrome: "+JSON.stringify(e)),o(e)},i=function(e){return t.version>=64?e:{name:{PermissionDeniedError:"NotAllowedError",PermissionDismissedError:"NotAllowedError",InvalidStateError:"NotAllowedError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotAllowedError",MediaDeviceKillSwitchOn:"NotAllowedError",TabCaptureError:"AbortError",ScreenCaptureError:"AbortError",DeviceCaptureError:"AbortError"}[e.name]||e.name,message:e.message,constraint:e.constraint||e.constraintName,toString(){return this.name+(this.message&&": ")+this.message}}};if(n.getUserMedia=function(e,t,r){o(e,(e=>{n.webkitGetUserMedia(e,t,(e=>{r&&r(i(e))}))}))}.bind(n),n.mediaDevices.getUserMedia){const e=n.mediaDevices.getUserMedia.bind(n.mediaDevices);n.mediaDevices.getUserMedia=function(t){return o(t,(t=>e(t).then((e=>{if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach((e=>{e.stop()})),new DOMException("","NotFoundError");return e}),(e=>Promise.reject(i(e))))))}}}function k(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&("function"===typeof t?e.navigator.mediaDevices.getDisplayMedia=function(n){return t(n).then((t=>{const r=n.video&&n.video.width,o=n.video&&n.video.height,i=n.video&&n.video.frameRate;return n.video={mandatory:{chromeMediaSource:"desktop",chromeMediaSourceId:t,maxFrameRate:i||3}},r&&(n.video.mandatory.maxWidth=r),o&&(n.video.mandatory.maxHeight=o),e.navigator.mediaDevices.getUserMedia(n)}))}:console.error("shimGetDisplayMedia: getSourceId argument is not a function"))}function E(e){e.MediaStream=e.MediaStream||e.webkitMediaStream}function T(e){if("object"===typeof e&&e.RTCPeerConnection&&!("ontrack"in e.RTCPeerConnection.prototype)){Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get(){return this._ontrack},set(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)},enumerable:!0,configurable:!0});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){return this._ontrackpoly||(this._ontrackpoly=t=>{t.stream.addEventListener("addtrack",(n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.track.id)):{track:n.track};const o=new Event("track");o.track=n.track,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)})),t.stream.getTracks().forEach((n=>{let r;r=e.RTCPeerConnection.prototype.getReceivers?this.getReceivers().find((e=>e.track&&e.track.id===n.id)):{track:n};const o=new Event("track");o.track=n,o.receiver=r,o.transceiver={receiver:r},o.streams=[t.stream],this.dispatchEvent(o)}))},this.addEventListener("addstream",this._ontrackpoly)),t.apply(this,arguments)}}else m(e,"track",(e=>(e.transceiver||Object.defineProperty(e,"transceiver",{value:{receiver:e.receiver}}),e)))}function O(e){if("object"===typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){const t=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};const n=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,r){let o=n.apply(this,arguments);return o||(o=t(this,e),this._senders.push(o)),o};const r=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){r.apply(this,arguments);const t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._senders=this._senders||[],n.apply(this,[e]),e.getTracks().forEach((e=>{this._senders.push(t(this,e))}))};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){this._senders=this._senders||[],r.apply(this,[e]),e.getTracks().forEach((e=>{const t=this._senders.find((t=>t.track===e));t&&this._senders.splice(this._senders.indexOf(t),1)}))}}else if("object"===typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}}function M(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,n,r]=arguments;if(arguments.length>0&&"function"===typeof e)return t.apply(this,arguments);if(0===t.length&&(0===arguments.length||"function"!==typeof e))return t.apply(this,[]);const o=function(e){const t={};return e.result().forEach((e=>{const n={id:e.id,timestamp:e.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[e.type]||e.type};e.names().forEach((t=>{n[t]=e.stat(t)})),t[n.id]=n})),t},i=function(e){return new Map(Object.keys(e).map((t=>[t,e[t]])))};if(arguments.length>=2){const r=function(e){n(i(o(e)))};return t.apply(this,[r,e])}return new Promise(((e,n)=>{t.apply(this,[function(t){e(i(o(t)))},n])})).then(n,r)}}function P(e){if(!("object"===typeof e&&e.RTCPeerConnection&&e.RTCRtpSender&&e.RTCRtpReceiver))return;if(!("getStats"in e.RTCRtpSender.prototype)){const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>S(t,e.track,!0)))}}if(!("getStats"in e.RTCRtpReceiver.prototype)){const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),m(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){const e=this;return this._pc.getStats().then((t=>S(t,e.track,!1)))}}if(!("getStats"in e.RTCRtpSender.prototype)||!("getStats"in e.RTCRtpReceiver.prototype))return;const t=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){if(arguments.length>0&&arguments[0]instanceof e.MediaStreamTrack){const e=arguments[0];let t,n,r;return this.getSenders().forEach((n=>{n.track===e&&(t?r=!0:t=n)})),this.getReceivers().forEach((t=>(t.track===e&&(n?r=!0:n=t),t.track===e))),r||t&&n?Promise.reject(new DOMException("There are more than one sender or receiver for the track.","InvalidAccessError")):t?t.getStats():n?n.getStats():Promise.reject(new DOMException("There is no sender or receiver for the track.","InvalidAccessError"))}return t.apply(this,arguments)}}function R(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map((e=>this._shimmedLocalStreams[e][0]))};const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,n){if(!n)return t.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};const r=t.apply(this,arguments);return this._shimmedLocalStreams[n.id]?-1===this._shimmedLocalStreams[n.id].indexOf(r)&&this._shimmedLocalStreams[n.id].push(r):this._shimmedLocalStreams[n.id]=[n,r],r};const n=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")}));const t=this.getSenders();n.apply(this,arguments);const r=this.getSenders().filter((e=>-1===t.indexOf(e)));this._shimmedLocalStreams[e.id]=[e].concat(r)};const r=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],r.apply(this,arguments)};const o=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},e&&Object.keys(this._shimmedLocalStreams).forEach((t=>{const n=this._shimmedLocalStreams[t].indexOf(e);-1!==n&&this._shimmedLocalStreams[t].splice(n,1),1===this._shimmedLocalStreams[t].length&&delete this._shimmedLocalStreams[t]})),o.apply(this,arguments)}}function N(e,t){if(!e.RTCPeerConnection)return;if(e.RTCPeerConnection.prototype.addTrack&&t.version>=65)return R(e);const n=e.RTCPeerConnection.prototype.getLocalStreams;e.RTCPeerConnection.prototype.getLocalStreams=function(){const e=n.apply(this);return this._reverseStreams=this._reverseStreams||{},e.map((e=>this._reverseStreams[e.id]))};const r=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(t){if(this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},t.getTracks().forEach((e=>{if(this.getSenders().find((t=>t.track===e)))throw new DOMException("Track already exists.","InvalidAccessError")})),!this._reverseStreams[t.id]){const n=new e.MediaStream(t.getTracks());this._streams[t.id]=n,this._reverseStreams[n.id]=t,t=n}r.apply(this,[t])};const o=e.RTCPeerConnection.prototype.removeStream;function i(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(o.id,"g"),r.id)})),new RTCSessionDescription({type:t.type,sdp:n})}e.RTCPeerConnection.prototype.removeStream=function(e){this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{},o.apply(this,[this._streams[e.id]||e]),delete this._reverseStreams[this._streams[e.id]?this._streams[e.id].id:e.id],delete this._streams[e.id]},e.RTCPeerConnection.prototype.addTrack=function(t,n){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");const r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find((e=>e===t)))throw new DOMException("The adapter.js addTrack polyfill only supports a single stream which is associated with the specified track.","NotSupportedError");if(this.getSenders().find((e=>e.track===t)))throw new DOMException("Track already exists.","InvalidAccessError");this._streams=this._streams||{},this._reverseStreams=this._reverseStreams||{};const o=this._streams[n.id];if(o)o.addTrack(t),Promise.resolve().then((()=>{this.dispatchEvent(new Event("negotiationneeded"))}));else{const r=new e.MediaStream([t]);this._streams[n.id]=r,this._reverseStreams[r.id]=n,this.addStream(r)}return this.getSenders().find((e=>e.track===t))},["createOffer","createAnswer"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){const e=arguments;return arguments.length&&"function"===typeof arguments[0]?n.apply(this,[t=>{const n=i(this,t);e[0].apply(null,[n])},t=>{e[1]&&e[1].apply(null,t)},arguments[2]]):n.apply(this,arguments).then((e=>i(this,e)))}};e.RTCPeerConnection.prototype[t]=r[t]}));const s=e.RTCPeerConnection.prototype.setLocalDescription;e.RTCPeerConnection.prototype.setLocalDescription=function(){return arguments.length&&arguments[0].type?(arguments[0]=function(e,t){let n=t.sdp;return Object.keys(e._reverseStreams||[]).forEach((t=>{const r=e._reverseStreams[t],o=e._streams[r.id];n=n.replace(new RegExp(r.id,"g"),o.id)})),new RTCSessionDescription({type:t.type,sdp:n})}(this,arguments[0]),s.apply(this,arguments)):s.apply(this,arguments)};const a=Object.getOwnPropertyDescriptor(e.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(e.RTCPeerConnection.prototype,"localDescription",{get(){const e=a.get.apply(this);return""===e.type?e:i(this,e)}}),e.RTCPeerConnection.prototype.removeTrack=function(e){if("closed"===this.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!e._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(e._pc===this))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");let t;this._streams=this._streams||{},Object.keys(this._streams).forEach((n=>{this._streams[n].getTracks().find((t=>e.track===t))&&(t=this._streams[n])})),t&&(1===t.getTracks().length?this.removeStream(this._reverseStreams[t.id]):t.removeTrack(e.track),this.dispatchEvent(new Event("negotiationneeded")))}}function I(e,t){!e.RTCPeerConnection&&e.webkitRTCPeerConnection&&(e.RTCPeerConnection=e.webkitRTCPeerConnection),e.RTCPeerConnection&&t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}))}function L(e,t){m(e,"negotiationneeded",(e=>{const n=e.target;if(!(t.version<72||n.getConfiguration&&"plan-b"===n.getConfiguration().sdpSemantics)||"stable"===n.signalingState)return e}))}function D(e,t){const n=e&&e.navigator,r=e&&e.MediaStreamTrack;if(n.getUserMedia=function(e,t,r){b("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),n.mediaDevices.getUserMedia(e).then(t,r)},!(t.version>55&&"autoGainControl"in n.mediaDevices.getSupportedConstraints())){const e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},t=n.mediaDevices.getUserMedia.bind(n.mediaDevices);if(n.mediaDevices.getUserMedia=function(n){return"object"===typeof n&&"object"===typeof n.audio&&(n=JSON.parse(JSON.stringify(n)),e(n.audio,"autoGainControl","mozAutoGainControl"),e(n.audio,"noiseSuppression","mozNoiseSuppression")),t(n)},r&&r.prototype.getSettings){const t=r.prototype.getSettings;r.prototype.getSettings=function(){const n=t.apply(this,arguments);return e(n,"mozAutoGainControl","autoGainControl"),e(n,"mozNoiseSuppression","noiseSuppression"),n}}if(r&&r.prototype.applyConstraints){const t=r.prototype.applyConstraints;r.prototype.applyConstraints=function(n){return"audio"===this.kind&&"object"===typeof n&&(n=JSON.parse(JSON.stringify(n)),e(n,"autoGainControl","mozAutoGainControl"),e(n,"noiseSuppression","mozNoiseSuppression")),t.apply(this,[n])}}}}function j(e,t){e.navigator.mediaDevices&&"getDisplayMedia"in e.navigator.mediaDevices||e.navigator.mediaDevices&&(e.navigator.mediaDevices.getDisplayMedia=function(n){if(!n||!n.video){const e=new DOMException("getDisplayMedia without video constraints is undefined");return e.name="NotFoundError",e.code=8,Promise.reject(e)}return!0===n.video?n.video={mediaSource:t}:n.video.mediaSource=t,e.navigator.mediaDevices.getUserMedia(n)})}function F(e){"object"===typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function B(e,t){if("object"!==typeof e||!e.RTCPeerConnection&&!e.mozRTCPeerConnection)return;!e.RTCPeerConnection&&e.mozRTCPeerConnection&&(e.RTCPeerConnection=e.mozRTCPeerConnection),t.version<53&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach((function(t){const n=e.RTCPeerConnection.prototype[t],r={[t](){return arguments[0]=new("addIceCandidate"===t?e.RTCIceCandidate:e.RTCSessionDescription)(arguments[0]),n.apply(this,arguments)}};e.RTCPeerConnection.prototype[t]=r[t]}));const n={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},r=e.RTCPeerConnection.prototype.getStats;e.RTCPeerConnection.prototype.getStats=function(){const[e,o,i]=arguments;return r.apply(this,[e||null]).then((e=>{if(t.version<53&&!o)try{e.forEach((e=>{e.type=n[e.type]||e.type}))}catch(r){if("TypeError"!==r.name)throw r;e.forEach(((t,r)=>{e.set(r,Object.assign({},t,{type:n[t.type]||t.type}))}))}return e})).then(o,i)}}function U(e){if("object"!==typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpSender.prototype)return;const t=e.RTCPeerConnection.prototype.getSenders;t&&(e.RTCPeerConnection.prototype.getSenders=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e});const n=e.RTCPeerConnection.prototype.addTrack;n&&(e.RTCPeerConnection.prototype.addTrack=function(){const e=n.apply(this,arguments);return e._pc=this,e}),e.RTCRtpSender.prototype.getStats=function(){return this.track?this._pc.getStats(this.track):Promise.resolve(new Map)}}function z(e){if("object"!==typeof e||!e.RTCPeerConnection||!e.RTCRtpSender)return;if(e.RTCRtpSender&&"getStats"in e.RTCRtpReceiver.prototype)return;const t=e.RTCPeerConnection.prototype.getReceivers;t&&(e.RTCPeerConnection.prototype.getReceivers=function(){const e=t.apply(this,[]);return e.forEach((e=>e._pc=this)),e}),m(e,"track",(e=>(e.receiver._pc=e.srcElement,e))),e.RTCRtpReceiver.prototype.getStats=function(){return this._pc.getStats(this.track)}}function W(e){e.RTCPeerConnection&&!("removeStream"in e.RTCPeerConnection.prototype)&&(e.RTCPeerConnection.prototype.removeStream=function(e){b("removeStream","removeTrack"),this.getSenders().forEach((t=>{t.track&&e.getTracks().includes(t.track)&&this.removeTrack(t)}))})}function V(e){e.DataChannel&&!e.RTCDataChannel&&(e.RTCDataChannel=e.DataChannel)}function H(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.addTransceiver;t&&(e.RTCPeerConnection.prototype.addTransceiver=function(){this.setParametersPromises=[];let e=arguments[1]&&arguments[1].sendEncodings;void 0===e&&(e=[]),e=[...e];const n=e.length>0;n&&e.forEach((e=>{if("rid"in e){if(!/^[a-z0-9]{0,16}$/i.test(e.rid))throw new TypeError("Invalid RID value provided.")}if("scaleResolutionDownBy"in e&&!(parseFloat(e.scaleResolutionDownBy)>=1))throw new RangeError("scale_resolution_down_by must be >= 1.0");if("maxFramerate"in e&&!(parseFloat(e.maxFramerate)>=0))throw new RangeError("max_framerate must be >= 0.0")}));const r=t.apply(this,arguments);if(n){const{sender:t}=r,n=t.getParameters();(!("encodings"in n)||1===n.encodings.length&&0===Object.keys(n.encodings[0]).length)&&(n.encodings=e,t.sendEncodings=e,this.setParametersPromises.push(t.setParameters(n).then((()=>{delete t.sendEncodings})).catch((()=>{delete t.sendEncodings}))))}return r})}function G(e){if("object"!==typeof e||!e.RTCRtpSender)return;const t=e.RTCRtpSender.prototype.getParameters;t&&(e.RTCRtpSender.prototype.getParameters=function(){const e=t.apply(this,arguments);return"encodings"in e||(e.encodings=[].concat(this.sendEncodings||[{}])),e})}function q(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function Y(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype.createAnswer;e.RTCPeerConnection.prototype.createAnswer=function(){return this.setParametersPromises&&this.setParametersPromises.length?Promise.all(this.setParametersPromises).then((()=>t.apply(this,arguments))).finally((()=>{this.setParametersPromises=[]})):t.apply(this,arguments)}}function K(e){if("object"===typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),!("addStream"in e.RTCPeerConnection.prototype)){const t=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(e){this._localStreams||(this._localStreams=[]),this._localStreams.includes(e)||this._localStreams.push(e),e.getAudioTracks().forEach((n=>t.call(this,n,e))),e.getVideoTracks().forEach((n=>t.call(this,n,e)))},e.RTCPeerConnection.prototype.addTrack=function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),o=1;o{this._localStreams?this._localStreams.includes(e)||this._localStreams.push(e):this._localStreams=[e]})),t.apply(this,arguments)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);const t=this._localStreams.indexOf(e);if(-1===t)return;this._localStreams.splice(t,1);const n=e.getTracks();this.getSenders().forEach((e=>{n.includes(e.track)&&this.removeTrack(e)}))})}}function X(e){if("object"===typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),!("onaddstream"in e.RTCPeerConnection.prototype))){Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get(){return this._onaddstream},set(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=e=>{e.streams.forEach((e=>{if(this._remoteStreams||(this._remoteStreams=[]),this._remoteStreams.includes(e))return;this._remoteStreams.push(e);const t=new Event("addstream");t.stream=e,this.dispatchEvent(t)}))})}});const t=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){const e=this;return this._onaddstreampoly||this.addEventListener("track",this._onaddstreampoly=function(t){t.streams.forEach((t=>{if(e._remoteStreams||(e._remoteStreams=[]),e._remoteStreams.indexOf(t)>=0)return;e._remoteStreams.push(t);const n=new Event("addstream");n.stream=t,e.dispatchEvent(n)}))}),t.apply(e,arguments)}}}function $(e){if("object"!==typeof e||!e.RTCPeerConnection)return;const t=e.RTCPeerConnection.prototype,n=t.createOffer,r=t.createAnswer,o=t.setLocalDescription,i=t.setRemoteDescription,s=t.addIceCandidate;t.createOffer=function(e,t){const r=arguments.length>=2?arguments[2]:arguments[0],o=n.apply(this,[r]);return t?(o.then(e,t),Promise.resolve()):o},t.createAnswer=function(e,t){const n=arguments.length>=2?arguments[2]:arguments[0],o=r.apply(this,[n]);return t?(o.then(e,t),Promise.resolve()):o};let a=function(e,t,n){const r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=a,a=function(e,t,n){const r=i.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=a,a=function(e,t,n){const r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=a}function Q(e){const t=e&&e.navigator;if(t.mediaDevices&&t.mediaDevices.getUserMedia){const e=t.mediaDevices,n=e.getUserMedia.bind(e);t.mediaDevices.getUserMedia=e=>n(Z(e))}!t.getUserMedia&&t.mediaDevices&&t.mediaDevices.getUserMedia&&(t.getUserMedia=function(e,n,r){t.mediaDevices.getUserMedia(e).then(n,r)}.bind(t))}function Z(e){return e&&void 0!==e.video?Object.assign({},e,{video:_(e.video)}):e}function J(e){if(!e.RTCPeerConnection)return;const t=e.RTCPeerConnection;e.RTCPeerConnection=function(e,n){if(e&&e.iceServers){const t=[];for(let n=0;nt.generateCertificate})}function ee(e){"object"===typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get(){return{receiver:this.receiver}}})}function te(e){const t=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){"undefined"!==typeof e.offerToReceiveAudio&&(e.offerToReceiveAudio=!!e.offerToReceiveAudio);const t=this.getTransceivers().find((e=>"audio"===e.receiver.track.kind));!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection?t.setDirection("sendonly"):t.direction="sendonly":"recvonly"===t.direction&&(t.setDirection?t.setDirection("inactive"):t.direction="inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio",{direction:"recvonly"}),"undefined"!==typeof e.offerToReceiveVideo&&(e.offerToReceiveVideo=!!e.offerToReceiveVideo);const n=this.getTransceivers().find((e=>"video"===e.receiver.track.kind));!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection?n.setDirection("sendonly"):n.direction="sendonly":"recvonly"===n.direction&&(n.setDirection?n.setDirection("inactive"):n.direction="inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video",{direction:"recvonly"})}return t.apply(this,arguments)}}function ne(e){"object"!==typeof e||e.AudioContext||(e.AudioContext=e.webkitAudioContext)}var re=n(39569),oe=n.n(re);function ie(e){if(!e.RTCIceCandidate||e.RTCIceCandidate&&"foundation"in e.RTCIceCandidate.prototype)return;const t=e.RTCIceCandidate;e.RTCIceCandidate=function(e){if("object"===typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substring(2)),e.candidate&&e.candidate.length){const n=new t(e),r=oe().parseCandidate(e.candidate);for(const e in r)e in n||Object.defineProperty(n,e,{value:r[e]});return n.toJSON=function(){return{candidate:n.candidate,sdpMid:n.sdpMid,sdpMLineIndex:n.sdpMLineIndex,usernameFragment:n.usernameFragment}},n}return new t(e)},e.RTCIceCandidate.prototype=t.prototype,m(e,"icecandidate",(t=>(t.candidate&&Object.defineProperty(t,"candidate",{value:new e.RTCIceCandidate(t.candidate),writable:"false"}),t)))}function se(e){!e.RTCIceCandidate||e.RTCIceCandidate&&"relayProtocol"in e.RTCIceCandidate.prototype||m(e,"icecandidate",(e=>{if(e.candidate){const t=oe().parseCandidate(e.candidate.candidate);"relay"===t.type&&(e.candidate.relayProtocol={0:"tls",1:"tcp",2:"udp"}[t.priority>>24])}return e}))}function ae(e,t){if(!e.RTCPeerConnection)return;"sctp"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"sctp",{get(){return"undefined"===typeof this._sctp?null:this._sctp}});const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(){if(this._sctp=null,"chrome"===t.browser&&t.version>=76){const{sdpSemantics:e}=this.getConfiguration();"plan-b"===e&&Object.defineProperty(this,"sctp",{get(){return"undefined"===typeof this._sctp?null:this._sctp},enumerable:!0,configurable:!0})}if(function(e){if(!e||!e.sdp)return!1;const t=oe().splitSections(e.sdp);return t.shift(),t.some((e=>{const t=oe().parseMLine(e);return t&&"application"===t.kind&&-1!==t.protocol.indexOf("SCTP")}))}(arguments[0])){const e=function(e){const t=e.sdp.match(/mozilla...THIS_IS_SDPARTA-(\d+)/);if(null===t||t.length<2)return-1;const n=parseInt(t[1],10);return n!==n?-1:n}(arguments[0]),n=function(e){let n=65536;return"firefox"===t.browser&&(n=t.version<57?-1===e?16384:2147483637:t.version<60?57===t.version?65535:65536:2147483637),n}(e),r=function(e,n){let r=65536;"firefox"===t.browser&&57===t.version&&(r=65535);const o=oe().matchPrefix(e.sdp,"a=max-message-size:");return o.length>0?r=parseInt(o[0].substring(19),10):"firefox"===t.browser&&-1!==n&&(r=2147483637),r}(arguments[0],e);let o;o=0===n&&0===r?Number.POSITIVE_INFINITY:0===n||0===r?Math.max(n,r):Math.min(n,r);const i={};Object.defineProperty(i,"maxMessageSize",{get:()=>o}),this._sctp=i}return n.apply(this,arguments)}}function le(e){if(!e.RTCPeerConnection||!("createDataChannel"in e.RTCPeerConnection.prototype))return;function t(e,t){const n=e.send;e.send=function(){const r=arguments[0],o=r.length||r.size||r.byteLength;if("open"===e.readyState&&t.sctp&&o>t.sctp.maxMessageSize)throw new TypeError("Message too large (can send a maximum of "+t.sctp.maxMessageSize+" bytes)");return n.apply(e,arguments)}}const n=e.RTCPeerConnection.prototype.createDataChannel;e.RTCPeerConnection.prototype.createDataChannel=function(){const e=n.apply(this,arguments);return t(e,this),e},m(e,"datachannel",(e=>(t(e.channel,e.target),e)))}function ce(e){if(!e.RTCPeerConnection||"connectionState"in e.RTCPeerConnection.prototype)return;const t=e.RTCPeerConnection.prototype;Object.defineProperty(t,"connectionState",{get(){return{completed:"connected",checking:"connecting"}[this.iceConnectionState]||this.iceConnectionState},enumerable:!0,configurable:!0}),Object.defineProperty(t,"onconnectionstatechange",{get(){return this._onconnectionstatechange||null},set(e){this._onconnectionstatechange&&(this.removeEventListener("connectionstatechange",this._onconnectionstatechange),delete this._onconnectionstatechange),e&&this.addEventListener("connectionstatechange",this._onconnectionstatechange=e)},enumerable:!0,configurable:!0}),["setLocalDescription","setRemoteDescription"].forEach((e=>{const n=t[e];t[e]=function(){return this._connectionstatechangepoly||(this._connectionstatechangepoly=e=>{const t=e.target;if(t._lastConnectionState!==t.connectionState){t._lastConnectionState=t.connectionState;const n=new Event("connectionstatechange",e);t.dispatchEvent(n)}return e},this.addEventListener("iceconnectionstatechange",this._connectionstatechangepoly)),n.apply(this,arguments)}}))}function ue(e,t){if(!e.RTCPeerConnection)return;if("chrome"===t.browser&&t.version>=71)return;if("safari"===t.browser&&t.version>=605)return;const n=e.RTCPeerConnection.prototype.setRemoteDescription;e.RTCPeerConnection.prototype.setRemoteDescription=function(t){if(t&&t.sdp&&-1!==t.sdp.indexOf("\na=extmap-allow-mixed")){const n=t.sdp.split("\n").filter((e=>"a=extmap-allow-mixed"!==e.trim())).join("\n");e.RTCSessionDescription&&t instanceof e.RTCSessionDescription?arguments[0]=new e.RTCSessionDescription({type:t.type,sdp:n}):t.sdp=n}return n.apply(this,arguments)}}function de(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.addIceCandidate;n&&0!==n.length&&(e.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?("chrome"===t.browser&&t.version<78||"firefox"===t.browser&&t.version<68||"safari"===t.browser)&&arguments[0]&&""===arguments[0].candidate?Promise.resolve():n.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())})}function he(e,t){if(!e.RTCPeerConnection||!e.RTCPeerConnection.prototype)return;const n=e.RTCPeerConnection.prototype.setLocalDescription;n&&0!==n.length&&(e.RTCPeerConnection.prototype.setLocalDescription=function(){let e=arguments[0]||{};if("object"!==typeof e||e.type&&e.sdp)return n.apply(this,arguments);if(e={type:e.type,sdp:e.sdp},!e.type)switch(this.signalingState){case"stable":case"have-local-offer":case"have-remote-pranswer":e.type="offer";break;default:e.type="answer"}if(e.sdp||"offer"!==e.type&&"answer"!==e.type)return n.apply(this,[e]);return("offer"===e.type?this.createOffer:this.createAnswer).apply(this).then((e=>n.apply(this,[e])))})}const pe=function(){let{window:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{shimChrome:!0,shimFirefox:!0,shimSafari:!0};const n=y,a=function(e){const t={browser:null,version:null};if("undefined"===typeof e||!e.navigator||!e.navigator.userAgent)return t.browser="Not a browser.",t;const{navigator:n}=e;if(n.mozGetUserMedia)t.browser="firefox",t.version=f(n.userAgent,/Firefox\/(\d+)\./,1);else if(n.webkitGetUserMedia||!1===e.isSecureContext&&e.webkitRTCPeerConnection)t.browser="chrome",t.version=f(n.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!e.RTCPeerConnection||!n.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=f(n.userAgent,/AppleWebKit\/(\d+)\./,1),t.supportsUnifiedPlan=e.RTCRtpTransceiver&&"currentDirection"in e.RTCRtpTransceiver.prototype}return t}(e),l={browserDetails:a,commonShim:s,extractVersion:f,disableLog:g,disableWarnings:v,sdp:re};switch(a.browser){case"chrome":if(!r||!I||!t.shimChrome)return n("Chrome shim is not included in this adapter release."),l;if(null===a.version)return n("Chrome shim can not determine version, not shimming."),l;n("adapter.js shimming chrome."),l.browserShim=r,de(e,a),he(e),C(e,a),E(e),I(e,a),T(e),N(e,a),O(e),M(e),P(e),L(e,a),ie(e),se(e),ce(e),ae(e,a),le(e),ue(e,a);break;case"firefox":if(!o||!B||!t.shimFirefox)return n("Firefox shim is not included in this adapter release."),l;n("adapter.js shimming firefox."),l.browserShim=o,de(e,a),he(e),D(e,a),B(e,a),F(e),W(e),U(e),z(e),V(e),H(e),G(e),q(e),Y(e),ie(e),ce(e),ae(e,a),le(e);break;case"safari":if(!i||!t.shimSafari)return n("Safari shim is not included in this adapter release."),l;n("adapter.js shimming safari."),l.browserShim=i,de(e,a),he(e),J(e),te(e),$(e),K(e),X(e),ee(e),Q(e),ne(e),ie(e),se(e),ae(e,a),le(e),ue(e,a);break;default:n("Unsupported browser!")}return l}({window:"undefined"===typeof window?void 0:window}),fe=pe;let me,ge,ve;try{me=new TextDecoder}catch(Fo){}let ye=0;const be=[],we=57342,_e=57343,xe=57337,Se={};let Ae,Ce,ke,Ee,Te,Oe,Me,Pe=be,Re=0,Ne={},Ie=0,Le=0,De=[],je=[],Fe={useRecords:!1,mapsAsObjects:!0},Be=!1,Ue=2;try{new Function("")}catch(Fo){Ue=1/0}class ze{constructor(e){if(e&&(!e.keyMap&&!e._keyMap||e.useRecords||(e.useRecords=!1,e.mapsAsObjects=!0),!1===e.useRecords&&void 0===e.mapsAsObjects&&(e.mapsAsObjects=!0),e.getStructures&&(e.getShared=e.getStructures),e.getShared&&!e.structures&&((e.structures=[]).uninitialized=!0),e.keyMap)){this.mapKey=new Map;for(let[t,n]of Object.entries(e.keyMap))this.mapKey.set(n,t)}Object.assign(this,e)}decodeKey(e){return this.keyMap&&this.mapKey.get(e)||e}encodeKey(e){return this.keyMap&&this.keyMap.hasOwnProperty(e)?this.keyMap[e]:e}encodeKeys(e){if(!this._keyMap)return e;let t=new Map;for(let[n,r]of Object.entries(e))t.set(this._keyMap.hasOwnProperty(n)?this._keyMap[n]:n,r);return t}decodeKeys(e){if(!this._keyMap||"Map"!=e.constructor.name)return e;if(!this._mapKey){this._mapKey=new Map;for(let[e,t]of Object.entries(this._keyMap))this._mapKey.set(t,e)}let t={};return e.forEach(((e,n)=>t[qe(this._mapKey.has(n)?this._mapKey.get(n):n)]=e)),t}mapDecode(e,t){let n=this.decode(e);return this._keyMap&&"Array"===n.constructor.name?n.map((e=>this.decodeKeys(e))):n}decode(e,t){if(ge)return ht((()=>(pt(),this?this.decode(e,t):ze.prototype.decode.call(Fe,e,t))));ve=t>-1?t:e.length,ye=0,Re=0,Le=0,Ce=null,Pe=be,ke=null,ge=e;try{Oe=e.dataView||(e.dataView=new DataView(e.buffer,e.byteOffset,e.byteLength))}catch(Fo){if(ge=null,e instanceof Uint8Array)throw Fo;throw new Error("Source must be a Uint8Array or Buffer but was a "+(e&&"object"==typeof e?e.constructor.name:typeof e))}if(this instanceof ze){if(Ne=this,Te=this.sharedValues&&(this.pack?new Array(this.maxPrivatePackedValues||16).concat(this.sharedValues):this.sharedValues),this.structures)return Ae=this.structures,We();(!Ae||Ae.length>0)&&(Ae=[])}else Ne=Fe,(!Ae||Ae.length>0)&&(Ae=[]),Te=null;return We()}decodeMultiple(e,t){let n,r=0;try{let o=e.length;Be=!0;let i=this?this.decode(e,o):mt.decode(e,o);if(!t){for(n=[i];ye=ke.postBundlePosition){let e=new Error("Unexpected bundle position");throw e.incomplete=!0,e}ye=ke.postBundlePosition,ke=null}if(ye==ve)Ae=null,ge=null,Ee&&(Ee=null);else{if(ye>ve){let e=new Error("Unexpected end of CBOR data");throw e.incomplete=!0,e}if(!Be)throw new Error("Data read, but end of buffer not reached")}return e}catch(Fo){throw pt(),(Fo instanceof RangeError||Fo.message.startsWith("Unexpected end of buffer"))&&(Fo.incomplete=!0),Fo}}function Ve(){let e=ge[ye++],t=e>>5;if(e&=31,e>23)switch(e){case 24:e=ge[ye++];break;case 25:if(7==t)return function(){let e=ge[ye++],t=ge[ye++],n=(127&e)>>2;if(31===n)return t||3&e?NaN:128&e?-1/0:1/0;if(0===n){let n=((3&e)<<8|t)/(1<<24);return 128&e?-n:n}return Je[3]=128&e|56+(n>>1),Je[2]=(7&e)<<5|t>>3,Je[1]=t<<5,Je[0]=0,Ze[0]}();e=Oe.getUint16(ye),ye+=2;break;case 26:if(7==t){let e=Oe.getFloat32(ye);if(Ne.useFloat32>2){let t=ft[(127&ge[ye])<<1|ge[ye+1]>>7];return ye+=4,(t*e+(e>0?.5:-.5)|0)/t}return ye+=4,e}e=Oe.getUint32(ye),ye+=4;break;case 27:if(7==t){let e=Oe.getFloat64(ye);return ye+=8,e}if(t>1){if(Oe.getUint32(ye)>0)throw new Error("JavaScript does not support arrays, maps, or strings with length over 4294967295");e=Oe.getUint32(ye+4)}else Ne.int64AsNumber?(e=4294967296*Oe.getUint32(ye),e+=Oe.getUint32(ye+4)):e=Oe.getBigUint64(ye);ye+=8;break;case 31:switch(t){case 2:case 3:throw new Error("Indefinite length not supported for byte or text strings");case 4:let e,n=[],r=0;for(;(e=Ve())!=Se;)n[r++]=e;return 4==t?n:3==t?n.join(""):Buffer.concat(n);case 5:let o;if(Ne.mapsAsObjects){let e={};if(Ne.keyMap)for(;(o=Ve())!=Se;)e[qe(Ne.decodeKey(o))]=Ve();else for(;(o=Ve())!=Se;)e[qe(o)]=Ve();return e}{Me&&(Ne.mapsAsObjects=!0,Me=!1);let e=new Map;if(Ne.keyMap)for(;(o=Ve())!=Se;)e.set(Ne.decodeKey(o),Ve());else for(;(o=Ve())!=Se;)e.set(o,Ve());return e}case 7:return Se;default:throw new Error("Invalid major type for indefinite length "+t)}default:throw new Error("Unknown token "+e)}switch(t){case 0:return e;case 1:return~e;case 2:return n=e,Ne.copyBuffers?Uint8Array.prototype.slice.call(ge,ye,ye+=n):ge.subarray(ye,ye+=n);case 3:if(Le>=ye)return Ce.slice(ye-Ie,(ye+=e)-Ie);if(0==Le&&ve<140&&e<32){let t=e<16?Qe(e):$e(e);if(null!=t)return t}return Ye(e);case 4:let t=new Array(e);for(let n=0;n=xe){let t=Ae[8191&e];if(t)return t.read||(t.read=Ge(t)),t.read();if(e<65536){if(e==_e){let e=ut(),t=Ve(),n=Ve();tt(t,n);let r={};if(Ne.keyMap)for(let o=2;o23)switch(e){case 24:e=ge[ye++];break;case 25:e=Oe.getUint16(ye),ye+=2;break;case 26:e=Oe.getUint32(ye),ye+=4;break;default:throw new Error("Expected array header, but got "+ge[ye-1])}let t=this.compiledReader;for(;t;){if(t.propertyCount===e)return t(Ve);t=t.next}if(this.slowReads++>=Ue){let n=this.length==e?this:this.slice(0,e);return t=Ne.keyMap?new Function("r","return {"+n.map((e=>Ne.decodeKey(e))).map((e=>He.test(e)?qe(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"):new Function("r","return {"+n.map((e=>He.test(e)?qe(e)+":r()":"["+JSON.stringify(e)+"]:r()")).join(",")+"}"),this.compiledReader&&(t.next=this.compiledReader),t.propertyCount=e,this.compiledReader=t,t(Ve)}let n={};if(Ne.keyMap)for(let r=0;r64&&me)return me.decode(ge.subarray(ye,ye+=e));const n=ye+e,r=[];for(t="";ye65535&&(t-=65536,r.push(t>>>10&1023|55296),t=56320|1023&t),r.push(t)}else r.push(e);r.length>=4096&&(t+=Xe.apply(String,r),r.length=0)}return r.length>0&&(t+=Xe.apply(String,r)),t}let Xe=String.fromCharCode;function $e(e){let t=ye,n=new Array(e);for(let r=0;r0)return void(ye=t);n[r]=e}return Xe.apply(String,n)}function Qe(e){if(e<4){if(e<2){if(0===e)return"";{let e=ge[ye++];return(128&e)>1?void(ye-=1):Xe(e)}}{let t=ge[ye++],n=ge[ye++];if((128&t)>0||(128&n)>0)return void(ye-=2);if(e<3)return Xe(t,n);let r=ge[ye++];return(128&r)>0?void(ye-=3):Xe(t,n,r)}}{let t=ge[ye++],n=ge[ye++],r=ge[ye++],o=ge[ye++];if((128&t)>0||(128&n)>0||(128&r)>0||(128&o)>0)return void(ye-=4);if(e<6){if(4===e)return Xe(t,n,r,o);{let e=ge[ye++];return(128&e)>0?void(ye-=5):Xe(t,n,r,o,e)}}if(e<8){let i=ge[ye++],s=ge[ye++];if((128&i)>0||(128&s)>0)return void(ye-=6);if(e<7)return Xe(t,n,r,o,i,s);let a=ge[ye++];return(128&a)>0?void(ye-=7):Xe(t,n,r,o,i,s,a)}{let i=ge[ye++],s=ge[ye++],a=ge[ye++],l=ge[ye++];if((128&i)>0||(128&s)>0||(128&a)>0||(128&l)>0)return void(ye-=8);if(e<10){if(8===e)return Xe(t,n,r,o,i,s,a,l);{let e=ge[ye++];return(128&e)>0?void(ye-=9):Xe(t,n,r,o,i,s,a,l,e)}}if(e<12){let c=ge[ye++],u=ge[ye++];if((128&c)>0||(128&u)>0)return void(ye-=10);if(e<11)return Xe(t,n,r,o,i,s,a,l,c,u);let d=ge[ye++];return(128&d)>0?void(ye-=11):Xe(t,n,r,o,i,s,a,l,c,u,d)}{let c=ge[ye++],u=ge[ye++],d=ge[ye++],h=ge[ye++];if((128&c)>0||(128&u)>0||(128&d)>0||(128&h)>0)return void(ye-=12);if(e<14){if(12===e)return Xe(t,n,r,o,i,s,a,l,c,u,d,h);{let e=ge[ye++];return(128&e)>0?void(ye-=13):Xe(t,n,r,o,i,s,a,l,c,u,d,h,e)}}{let p=ge[ye++],f=ge[ye++];if((128&p)>0||(128&f)>0)return void(ye-=14);if(e<15)return Xe(t,n,r,o,i,s,a,l,c,u,d,h,p,f);let m=ge[ye++];return(128&m)>0?void(ye-=15):Xe(t,n,r,o,i,s,a,l,c,u,d,h,p,f,m)}}}}}let Ze=new Float32Array(1),Je=new Uint8Array(Ze.buffer,0,4);new Array(4096);class et{constructor(e,t){this.value=e,this.tag=t}}De[0]=e=>new Date(e),De[1]=e=>new Date(Math.round(1e3*e)),De[2]=e=>{let t=BigInt(0);for(let n=0,r=e.byteLength;nBigInt(-1)-De[2](e),De[4]=e=>+(e[1]+"e"+e[0]),De[5]=e=>e[1]*Math.exp(e[0]*Math.log(2));const tt=(e,t)=>{let n=Ae[e-=57344];n&&n.isShared&&((Ae.restoreStructures||(Ae.restoreStructures=[]))[e]=n),Ae[e]=t,t.read=Ge(t)};De[105]=e=>{let t=e.length,n=e[1];tt(e[0],n);let r={};for(let o=2;oke?ke[0].slice(ke.position0,ke.position0+=e):new et(e,14),De[15]=e=>ke?ke[1].slice(ke.position1,ke.position1+=e):new et(e,15);let nt={Error:Error,RegExp:RegExp};De[27]=e=>(nt[e[0]]||Error)(e[1],e[2]);const rt=e=>{if(132!=ge[ye++])throw new Error("Packed values structure must be followed by a 4 element array");let t=e();return Te=Te?t.concat(Te.slice(t.length)):t,Te.prefixes=e(),Te.suffixes=e(),e()};function ot(e,t){return"string"===typeof e?e+t:e instanceof Array?e.concat(t):Object.assign({},e,t)}function it(){if(!Te){if(!Ne.getShared)throw new Error("No packed values available");dt()}return Te}rt.handlesRead=!0,De[51]=rt,De[6]=e=>{if(!Te){if(!Ne.getShared)return new et(e,6);dt()}if("number"==typeof e)return Te[16+(e>=0?2*e:-2*e-1)];throw new Error("No support for non-integer packed references yet")},De[28]=e=>{Ee||(Ee=new Map,Ee.id=0);let t,n=Ee.id++;t=ge[ye]>>5==4?[]:{};let r={target:t};Ee.set(n,r);let o=e();return r.used?Object.assign(t,o):(r.target=o,o)},De[28].handlesRead=!0,De[29]=e=>{let t=Ee.get(e);return t.used=!0,t.target},De[258]=e=>new Set(e),(De[259]=e=>(Ne.mapsAsObjects&&(Ne.mapsAsObjects=!1,Me=!0),e())).handlesRead=!0;je.push(((e,t)=>e>=225&&e<=255?ot(it().prefixes[e-224],t):e>=28704&&e<=32767?ot(it().prefixes[e-28672],t):e>=1879052288&&e<=2147483647?ot(it().prefixes[e-1879048192],t):e>=216&&e<=223?ot(t,it().suffixes[e-216]):e>=27647&&e<=28671?ot(t,it().suffixes[e-27639]):e>=1811940352&&e<=1879048191?ot(t,it().suffixes[e-1811939328]):1399353956==e?{packedValues:Te,structures:Ae.slice(0),version:t}:55799==e?t:void 0));const st=1==new Uint8Array(new Uint16Array([1]).buffer)[0],at=[Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?{name:"BigUint64Array"}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?{name:"BigInt64Array"}:BigInt64Array,Float32Array,Float64Array],lt=[64,68,69,70,71,72,77,78,79,85,86];for(let Bo=0;Bo{if(!e)throw new Error("Could not find typed array for code "+t);return new e(Uint8Array.prototype.slice.call(n,0).buffer)}:n=>{if(!e)throw new Error("Could not find typed array for code "+t);let s=new DataView(n.buffer,n.byteOffset,n.byteLength),a=n.length>>i,l=new e(a),c=s[r];for(let e=0;e23)switch(e){case 24:e=ge[ye++];break;case 25:e=Oe.getUint16(ye),ye+=2;break;case 26:e=Oe.getUint32(ye),ye+=4}return e}function dt(){if(Ne.getShared){let e=ht((()=>(ge=null,Ne.getShared())))||{},t=e.structures||[];Ne.sharedVersion=e.version,Te=Ne.sharedValues=e.packedValues,!0===Ae?Ne.structures=Ae=t:Ae.splice.apply(Ae,[0,t.length].concat(t))}}function ht(e){let t=ve,n=ye,r=Re,o=Ie,i=Le,s=Ce,a=Pe,l=Ee,c=ke,u=new Uint8Array(ge.slice(0,ve)),d=Ae,h=Ne,p=Be,f=e();return ve=t,ye=n,Re=r,Ie=o,Le=i,Ce=s,Pe=a,Ee=l,ke=c,ge=u,Be=p,Ae=d,Ne=h,Oe=new DataView(ge.buffer,ge.byteOffset,ge.byteLength),f}function pt(){ge=null,Ee=null,Ae=null}const ft=new Array(147);for(let Bo=0;Bo<256;Bo++)ft[Bo]=+("1e"+Math.floor(45.15-.30103*Bo));let mt=new ze({useRecords:!1});mt.decode,mt.decodeMultiple;let gt,vt,yt;try{gt=new TextEncoder}catch(Fo){}const bt="object"===typeof globalThis&&globalThis.Buffer,wt="undefined"!==typeof bt,_t=wt?bt.allocUnsafeSlow:Uint8Array,xt=wt?bt:Uint8Array,St=wt?4294967296:2144337920;let At,Ct,kt,Et,Tt=0,Ot=null;const Mt=/[\u0080-\uFFFF]/,Pt=Symbol("record-id");class Rt extends ze{constructor(e){let t,n,r,o,i;super(e),this.offset=0,e=e||{};let s=xt.prototype.utf8Write?function(e,t,n){return Ct.utf8Write(e,t,n)}:!(!gt||!gt.encodeInto)&&function(e,t){return gt.encodeInto(e,Ct.subarray(t)).written},a=this,l=e.structures||e.saveStructures,c=e.maxSharedStructures;if(null==c&&(c=l?128:0),c>8190)throw new Error("Maximum maxSharedStructure is 8190");let u=e.sequential;u&&(c=0),this.structures||(this.structures=[]),this.saveStructures&&(this.saveShared=this.saveStructures);let d,h,p,f=e.sharedValues;if(f){p=Object.create(null);for(let e=0,t=f.length;ethis.encodeKeys(e)));return this.encode(e,t)},this.encode=function(s,l){if(Ct||(Ct=new _t(8192),kt=new DataView(Ct.buffer,0,8192),Tt=0),Et=Ct.length-10,Et-Tt<2048?(Ct=new _t(Ct.length),kt=new DataView(Ct.buffer,0,Ct.length),Et=Ct.length-10,Tt=0):l===Kt&&(Tt=Tt+7&2147483640),t=Tt,a.useSelfDescribedHeader&&(kt.setUint32(Tt,3654940416),Tt+=3),i=a.structuredClone?new Map:null,a.bundleStrings&&"string"!==typeof s?(Ot=[],Ot.size=1/0):Ot=null,n=a.structures,n){if(n.uninitialized){let e=a.getShared()||{};a.structures=n=e.structures||[],a.sharedVersion=e.version;let t=a.sharedValues=e.packedValues;if(t){p={};for(let e=0,n=t.length;ec&&!u&&(e=c),!n.transitions){n.transitions=Object.create(null);for(let t=0;t0){Ct[Tt++]=216,Ct[Tt++]=51,Lt(4);let e=t.values;y(e),Lt(0),Lt(0),h=Object.create(p||null);for(let t=0,n=e.length;tEt&&w(Tt),a.offset=Tt;let e=function(e,t){let n,r=2*t.length,o=e.length-r;t.sort(((e,t)=>e.offset>t.offset?1:-1));for(let i=0;i>8,e[t]=255&i}for(;n=t.pop();){let t=n.offset;e.copyWithin(t+r,t,o),r-=2;let i=t+r;e[i++]=216,e[i++]=28,o=t}return e}(Ct.subarray(t,Tt),i.idsToInsert);return i=null,e}return l&Kt?(Ct.start=t,Ct.end=Tt,Ct):Ct.subarray(t,Tt)}finally{if(n)if(v<10&&v++,n.length>c&&(n.length=c),g>1e4)n.transitions=null,v=0,g=0,m.length>0&&(m=[]);else if(m.length>0&&!u){for(let e=0,t=m.length;ec&&(a.structures=a.structures.slice(0,c));let e=Ct.subarray(t,Tt);return!1===a.updateSharedData()?a.encode(s):e}l&Xt&&(Tt=t)}},this.findCommonStringsToPack=()=>(d=new Map,p||(p=Object.create(null)),e=>{let t=e&&e.threshold||4,n=this.pack?e.maxPrivatePackedValues||16:0;f||(f=this.sharedValues=[]);for(let[o,i]of d)i.count>t&&(p[o]=n++,f.push(o),r=!0);for(;this.saveShared&&!1===this.updateSharedData(););d=null});const y=n=>{Tt>Et&&(Ct=w(Tt));var r,o=typeof n;if("string"===o){if(h){let t=h[n];if(t>=0)return void(t<16?Ct[Tt++]=t+224:(Ct[Tt++]=198,y(1&t?15-t>>1:t-16>>1)));if(d&&!e.pack){let e=d.get(n);e?e.count++:d.set(n,{count:1})}}let o,i=n.length;if(Ot&&i>=4&&i<1024){if((Ot.size+=i)>61440){let e,n=(Ot[0]?3*Ot[0].length+Ot[1].length:0)+10;Tt+n>Et&&(Ct=w(Tt+n)),Ct[Tt++]=217,Ct[Tt++]=223,Ct[Tt++]=249,Ct[Tt++]=Ot.position?132:130,Ct[Tt++]=26,e=Tt-t,Tt+=4,Ot.position&&Wt(t,y),Ot=["",""],Ot.size=0,Ot.position=e}let e=Mt.test(n);return Ot[e?0:1]+=n,Ct[Tt++]=e?206:207,void y(i)}o=i<32?1:i<256?2:i<65536?3:5;let a=3*i;if(Tt+a>Et&&(Ct=w(Tt+a)),i<64||!s){let e,t,s,a=Tt+o;for(e=0;e>6|192,Ct[a++]=63&t|128):55296===(64512&t)&&56320===(64512&(s=n.charCodeAt(e+1)))?(t=65536+((1023&t)<<10)+(1023&s),e++,Ct[a++]=t>>18|240,Ct[a++]=t>>12&63|128,Ct[a++]=t>>6&63|128,Ct[a++]=63&t|128):(Ct[a++]=t>>12|224,Ct[a++]=t>>6&63|128,Ct[a++]=63&t|128);r=a-Tt-o}else r=s(n,Tt+o,a);r<24?Ct[Tt++]=96|r:r<256?(o<2&&Ct.copyWithin(Tt+2,Tt+1,Tt+1+r),Ct[Tt++]=120,Ct[Tt++]=r):r<65536?(o<3&&Ct.copyWithin(Tt+3,Tt+2,Tt+2+r),Ct[Tt++]=121,Ct[Tt++]=r>>8,Ct[Tt++]=255&r):(o<5&&Ct.copyWithin(Tt+5,Tt+3,Tt+3+r),Ct[Tt++]=122,kt.setUint32(Tt,r),Tt+=4),Tt+=r}else if("number"===o)if(this.alwaysUseFloat||n>>>0!==n)if(this.alwaysUseFloat||(n|0)!==n){let e;if((e=this.useFloat32)>0&&n<4294967296&&n>=-2147483648){let t;if(Ct[Tt++]=250,kt.setFloat32(Tt,n),e<4||((t=n*ft[(127&Ct[Tt])<<1|Ct[Tt+1]>>7])|0)===t)return void(Tt+=4);Tt--}Ct[Tt++]=251,kt.setFloat64(Tt,n),Tt+=8}else n>=-24?Ct[Tt++]=31-n:n>=-256?(Ct[Tt++]=56,Ct[Tt++]=~n):n>=-65536?(Ct[Tt++]=57,kt.setUint16(Tt,~n),Tt+=2):(Ct[Tt++]=58,kt.setUint32(Tt,~n),Tt+=4);else n<24?Ct[Tt++]=n:n<256?(Ct[Tt++]=24,Ct[Tt++]=n):n<65536?(Ct[Tt++]=25,Ct[Tt++]=n>>8,Ct[Tt++]=255&n):(Ct[Tt++]=26,kt.setUint32(Tt,n),Tt+=4);else if("object"===o)if(n){if(i){let e=i.get(n);if(e){if(Ct[Tt++]=216,Ct[Tt++]=29,Ct[Tt++]=25,!e.references){let t=i.idsToInsert||(i.idsToInsert=[]);e.references=[],t.push(e)}return e.references.push(Tt-t),void(Tt+=2)}i.set(n,{offset:Tt-t})}let e=n.constructor;if(e===Object)b(n,!0);else if(e===Array){(r=n.length)<24?Ct[Tt++]=128|r:Lt(r);for(let e=0;e>8,Ct[Tt++]=255&r):(Ct[Tt++]=186,kt.setUint32(Tt,r),Tt+=4),a.keyMap)for(let[t,r]of n)y(a.encodeKey(t)),y(r);else for(let[t,r]of n)y(t),y(r);else{for(let e=0,t=vt.length;e>8,Ct[Tt++]=255&r):r>-1&&(Ct[Tt++]=218,kt.setUint32(Tt,r),Tt+=4),void t.encode.call(this,n,y,w)}}if(n[Symbol.iterator]){if(At){let e=new Error("Iterable should be serialized as iterator");throw e.iteratorNotHandled=!0,e}Ct[Tt++]=159;for(let e of n)y(e);return void(Ct[Tt++]=255)}if(n[Symbol.asyncIterator]||jt(n)){let e=new Error("Iterable/blob should be serialized as iterator");throw e.iteratorNotHandled=!0,e}if(this.useToJSON&&n.toJSON){const e=n.toJSON();if(e!==n)return y(e)}b(n,!n.hasOwnProperty)}}else Ct[Tt++]=246;else if("boolean"===o)Ct[Tt++]=n?245:244;else if("bigint"===o){if(n=0)Ct[Tt++]=27,kt.setBigUint64(Tt,n);else if(n>-(BigInt(1)<{let t=Object.keys(e),n=Object.values(e),r=t.length;if(r<24?Ct[Tt++]=160|r:r<256?(Ct[Tt++]=184,Ct[Tt++]=r):r<65536?(Ct[Tt++]=185,Ct[Tt++]=r>>8,Ct[Tt++]=255&r):(Ct[Tt++]=186,kt.setUint32(Tt,r),Tt+=4),a.keyMap)for(let o=0;o{Ct[Tt++]=185;let r=Tt-t;Tt+=2;let o=0;if(a.keyMap)for(let t in e)(n||e.hasOwnProperty(t))&&(y(a.encodeKey(t)),y(e[t]),o++);else for(let t in e)(n||e.hasOwnProperty(t))&&(y(t),y(e[t]),o++);Ct[r+++t]=o>>8,Ct[r+t]=255&o}:(e,t)=>{let n,i,s,a=o.transitions||(o.transitions=Object.create(null)),l=0,u=0;if(this.keyMap){s=Object.keys(e).map((e=>this.encodeKey(e))),u=s.length;for(let e=0;e>8|224,Ct[Tt++]=255&d;else{if(s||(s=a.__keys__||(a.__keys__=Object.keys(e))),void 0===i?(d=o.nextId++,d||(d=0,o.nextId=1),d>=256&&(o.nextId=(d=c)+1)):d=i,o[d]=s,!(d=256-c&&(m.shift()[Pt]=void 0),m.push(a),Lt(u+2),y(57344+d),y(s),null===t)return;for(let n in e)(t||e.hasOwnProperty(n))&&y(e[n]);return}Ct[Tt++]=217,Ct[Tt++]=d>>8|224,Ct[Tt++]=255&d,a=o.transitions;for(let e=0;e{let n;if(e>16777216){if(e-t>St)throw new Error("Encoded buffer would be larger than maximum buffer size");n=Math.min(St,4096*Math.round(Math.max((e-t)*(e>67108864?1.25:2),4194304)/4096))}else n=1+(Math.max(e-t<<2,Ct.length-1)>>12)<<12;let r=new _t(n);return kt=new DataView(r.buffer,0,n),Ct.copy?Ct.copy(r,0,t,e):r.set(Ct.slice(t,e)),Tt-=t,t=0,Et=r.length-10,Ct=r};let _=100,x=1e3;function*S(e,n,r){let o=e.constructor;if(o===Object){let t=!1!==a.useRecords;t?b(e,null):Nt(Object.keys(e).length,160);for(let r in e){let o=e[r];t||y(r),o&&"object"===typeof o?n[r]?yield*S(o,n[r]):yield*A(o,n,r):y(o)}}else if(o===Array){let r=e.length;Lt(r);for(let o=0;o_)?n.element?yield*S(r,n.element):yield*A(r,n,"element"):y(r)}}else if(e[Symbol.iterator]){Ct[Tt++]=159;for(let r of e)r&&("object"===typeof r||Tt-t>_)?n.element?yield*S(r,n.element):yield*A(r,n,"element"):y(r);Ct[Tt++]=255}else jt(e)?(Nt(e.size,64),yield Ct.subarray(t,Tt),yield e,C()):e[Symbol.asyncIterator]?(Ct[Tt++]=159,yield Ct.subarray(t,Tt),yield e,C(),Ct[Tt++]=255):y(e);r&&Tt>t?yield Ct.subarray(t,Tt):Tt-t>_&&(yield Ct.subarray(t,Tt),C())}function*A(e,n,r){let o=Tt-t;try{y(e),Tt-t>_&&(yield Ct.subarray(t,Tt),C())}catch(Fo){if(!Fo.iteratorNotHandled)throw Fo;n[r]={},Tt=t+o,yield*S.call(this,e,n[r])}}function C(){_=x,a.encode(null,$t)}function k(e,t,n){return _=t&&t.chunkThreshold?x=t.chunkThreshold:100,e&&"object"===typeof e?(a.encode(null,$t),n(e,a.iterateProperties||(a.iterateProperties={}),!0)):[a.encode(e)]}async function*E(e,t){for(let n of S(e,t,!0)){let e=n.constructor;if(e===xt||e===Uint8Array)yield n;else if(jt(n)){let e,t=n.stream().getReader();for(;!(e=await t.read()).done;)yield e.value}else if(n[Symbol.asyncIterator])for await(let r of n)C(),r?yield*E(r,t.async||(t.async={})):yield a.encode(r);else yield n}}this.encodeAsIterable=function(e,t){return k(e,t,S)},this.encodeAsAsyncIterable=function(e,t){return k(e,t,E)}}useBuffer(e){Ct=e,kt=new DataView(Ct.buffer,Ct.byteOffset,Ct.byteLength),Tt=0}clearSharedData(){this.structures&&(this.structures=[]),this.sharedValues&&(this.sharedValues=void 0)}updateSharedData(){let e=this.sharedVersion||0;this.sharedVersion=e+1;let t=this.structures.slice(0),n=new It(t,this.sharedValues,this.sharedVersion),r=this.saveShared(n,(t=>(t&&t.version||0)==e));return!1===r?(n=this.getShared()||{},this.structures=n.structures||[],this.sharedValues=n.packedValues,this.sharedVersion=n.version,this.structures.nextId=this.structures.length):t.forEach(((e,t)=>this.structures[t]=e)),r}}function Nt(e,t){e<24?Ct[Tt++]=t|e:e<256?(Ct[Tt++]=24|t,Ct[Tt++]=e):e<65536?(Ct[Tt++]=25|t,Ct[Tt++]=e>>8,Ct[Tt++]=255&e):(Ct[Tt++]=26|t,kt.setUint32(Tt,e),Tt+=4)}class It{constructor(e,t,n){this.structures=e,this.packedValues=t,this.version=n}}function Lt(e){e<24?Ct[Tt++]=128|e:e<256?(Ct[Tt++]=152,Ct[Tt++]=e):e<65536?(Ct[Tt++]=153,Ct[Tt++]=e>>8,Ct[Tt++]=255&e):(Ct[Tt++]=154,kt.setUint32(Tt,e),Tt+=4)}const Dt="undefined"===typeof Blob?function(){}:Blob;function jt(e){if(e instanceof Dt)return!0;let t=e[Symbol.toStringTag];return"Blob"===t||"File"===t}function Ft(e,t){switch(typeof e){case"string":if(e.length>3){if(t.objectMap[e]>-1||t.values.length>=t.maxValues)return;let n=t.get(e);if(n)2==++n.count&&t.values.push(e);else if(t.set(e,{count:1}),t.samplingPackedValues){let n=t.samplingPackedValues.get(e);n?n.count++:t.samplingPackedValues.set(e,{count:1})}}break;case"object":if(e)if(e instanceof Array)for(let n=0,r=e.length;n1&&(e-=4),{tag:e,encode:function(e,t){let n=e.byteLength,r=e.byteOffset||0,o=e.buffer||e;t(wt?bt.from(o,r,n):new Uint8Array(o,r,n))}}}function zt(e,t){let n=e.byteLength;n<24?Ct[Tt++]=64+n:n<256?(Ct[Tt++]=88,Ct[Tt++]=n):n<65536?(Ct[Tt++]=89,Ct[Tt++]=n>>8,Ct[Tt++]=255&n):(Ct[Tt++]=90,kt.setUint32(Tt,n),Tt+=4),Tt+n>=Ct.length&&t(Tt+n),Ct.set(e.buffer?e:new Uint8Array(e),Tt),Tt+=n}function Wt(e,t){kt.setUint32(Ot.position+e,Tt-Ot.position-e+1);let n=Ot;Ot=null,t(n[0]),t(n[1])}yt=[Date,Set,Error,RegExp,et,ArrayBuffer,Uint8Array,Uint8ClampedArray,Uint16Array,Uint32Array,"undefined"==typeof BigUint64Array?function(){}:BigUint64Array,Int8Array,Int16Array,Int32Array,"undefined"==typeof BigInt64Array?function(){}:BigInt64Array,Float32Array,Float64Array,It],vt=[{tag:1,encode(e,t){let n=e.getTime()/1e3;(this.useTimestamp32||0===e.getMilliseconds())&&n>=0&&n<4294967296?(Ct[Tt++]=26,kt.setUint32(Tt,n),Tt+=4):(Ct[Tt++]=251,kt.setFloat64(Tt,n),Tt+=8)}},{tag:258,encode(e,t){t(Array.from(e))}},{tag:27,encode(e,t){t([e.name,e.message])}},{tag:27,encode(e,t){t(["RegExp",e.source,e.flags])}},{getTag:e=>e.tag,encode(e,t){t(e.value)}},{encode(e,t,n){zt(e,n)}},{getTag(e){if(e.constructor===Uint8Array&&(this.tagUint8Array||wt&&!1!==this.tagUint8Array))return 64},encode(e,t,n){zt(e,n)}},Ut(68,1),Ut(69,2),Ut(70,4),Ut(71,8),Ut(72,1),Ut(77,2),Ut(78,4),Ut(79,8),Ut(85,4),Ut(86,8),{encode(e,t){let n=e.packedValues||[],r=e.structures||[];if(n.values.length>0){Ct[Tt++]=216,Ct[Tt++]=51,Lt(4);let e=n.values;t(e),Lt(0),Lt(0),packedObjectMap=Object.create(sharedPackedObjectMap||null);for(let t=0,n=e.length;t=55296&&o<=56319&&r65535&&(u-=65536,i.push(u>>>10&1023|55296),u=56320|1023&u),i.push(u)}else i.push(a);i.length>=4096&&(s+=String.fromCharCode.apply(String,i),i.length=0)}return i.length>0&&(s+=String.fromCharCode.apply(String,i)),s}var un=rn?new TextDecoder:null,dn=rn?"undefined"!==typeof process&&"force"!==(null===(Jt=null===process||void 0===process?void 0:{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_METERED_API_KEY:"0132d438ab19602572c42db0efb136e5cec8"})||void 0===Jt?void 0:Jt.TEXT_DECODER)?200:0:en;var hn=function(e,t){this.type=e,this.data=t},pn=function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},e(t,n)};return function(t,n){if("function"!==typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),fn=function(e){function t(n){var r=e.call(this,n)||this,o=Object.create(t.prototype);return Object.setPrototypeOf(r,o),Object.defineProperty(r,"name",{configurable:!0,enumerable:!1,value:t.name}),r}return pn(t,e),t}(Error),mn=4294967295,gn=17179869183;var vn={type:-1,encode:function(e){return e instanceof Date?function(e){var t,n=e.sec,r=e.nsec;if(n>=0&&r>=0&&n<=gn){if(0===r&&n<=mn){var o=new Uint8Array(4);return(t=new DataView(o.buffer)).setUint32(0,n),o}var i=n/4294967296,s=4294967295&n;return o=new Uint8Array(8),(t=new DataView(o.buffer)).setUint32(0,r<<2|3&i),t.setUint32(4,s),o}return o=new Uint8Array(12),(t=new DataView(o.buffer)).setUint32(0,r),tn(t,4,n),o}(function(e){var t=e.getTime(),n=Math.floor(t/1e3),r=1e6*(t-1e3*n),o=Math.floor(r/1e9);return{sec:n+o,nsec:r-1e9*o}}(e)):null},decode:function(e){var t=function(e){var t=new DataView(e.buffer,e.byteOffset,e.byteLength);switch(e.byteLength){case 4:return{sec:t.getUint32(0),nsec:0};case 8:var n=t.getUint32(0);return{sec:4294967296*(3&n)+t.getUint32(4),nsec:n>>>2};case 12:return{sec:nn(t,4),nsec:t.getUint32(0)};default:throw new fn("Unrecognized data size for timestamp (expected 4, 8, or 12): ".concat(e.length))}}(e);return new Date(1e3*t.sec+t.nsec/1e6)}},yn=function(){function e(){this.builtInEncoders=[],this.builtInDecoders=[],this.encoders=[],this.decoders=[],this.register(vn)}return e.prototype.register=function(e){var t=e.type,n=e.encode,r=e.decode;if(t>=0)this.encoders[t]=n,this.decoders[t]=r;else{var o=1+t;this.builtInEncoders[o]=n,this.builtInDecoders[o]=r}},e.prototype.tryToEncode=function(e,t){for(var n=0;nthis.maxDepth)throw new Error("Too deep objects in depth ".concat(t));null==e?this.encodeNil():"boolean"===typeof e?this.encodeBoolean(e):"number"===typeof e?this.encodeNumber(e):"string"===typeof e?this.encodeString(e):this.encodeObject(e,t)},e.prototype.ensureBufferSizeToWrite=function(e){var t=this.pos+e;this.view.byteLength=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):(this.writeU8(211),this.writeI64(e)):this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))},e.prototype.writeStringHeader=function(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else{if(!(e<4294967296))throw new Error("Too long string: ".concat(e," bytes in UTF-8"));this.writeU8(219),this.writeU32(e)}},e.prototype.encodeString=function(e){if(e.length>an){var t=on(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),ln(e,this.bytes,this.pos),this.pos+=t}else{t=on(e);this.ensureBufferSizeToWrite(5+t),this.writeStringHeader(t),function(e,t,n){for(var r=e.length,o=n,i=0;i>6&31|192;else{if(s>=55296&&s<=56319&&i>12&15|224,t[o++]=s>>6&63|128):(t[o++]=s>>18&7|240,t[o++]=s>>12&63|128,t[o++]=s>>6&63|128)}t[o++]=63&s|128}else t[o++]=s}}(e,this.bytes,this.pos),this.pos+=t}},e.prototype.encodeObject=function(e,t){var n=this.extensionCodec.tryToEncode(e,this.context);if(null!=n)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,t);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else{if("object"!==typeof e)throw new Error("Unrecognized object: ".concat(Object.prototype.toString.apply(e)));this.encodeMap(e,t)}},e.prototype.encodeBinary=function(e){var t=e.byteLength;if(t<256)this.writeU8(196),this.writeU8(t);else if(t<65536)this.writeU8(197),this.writeU16(t);else{if(!(t<4294967296))throw new Error("Too large binary: ".concat(t));this.writeU8(198),this.writeU32(t)}var n=bn(e);this.writeU8a(n)},e.prototype.encodeArray=function(e,t){var n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else{if(!(n<4294967296))throw new Error("Too large array: ".concat(n));this.writeU8(221),this.writeU32(n)}for(var r=0,o=e;r0&&e<=this.maxKeyLength},e.prototype.find=function(e,t,n){e:for(var r=0,o=this.caches[n-1];r=this.maxLengthPerKey?n[Math.random()*n.length|0]=r:n.push(r)},e.prototype.decode=function(e,t,n){var r=this.find(e,t,n);if(null!=r)return this.hit++,r;this.miss++;var o=cn(e,t,n),i=Uint8Array.prototype.slice.call(e,t,t+n);return this.store(i,o),o},e}(),xn=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))},Sn=function(e,t){var n,r,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(i){return function(a){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;s;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,r=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]1||a(e,t)}))})}function a(e,t){try{(n=o[e](t)).value instanceof Cn?Promise.resolve(n.value.v).then(l,c):u(i[0][2],n)}catch(r){u(i[0][3],r)}var n}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),i.shift(),i.length&&a(i[0][0],i[0][1])}},En=function(e){var t=typeof e;return"string"===t||"number"===t},Tn=new DataView(new ArrayBuffer(0)),On=new Uint8Array(Tn.buffer),Mn=function(){try{Tn.getInt8(0)}catch(e){return e.constructor}throw new Error("never reached")}(),Pn=new Mn("Insufficient data"),Rn=new _n;!function(){function e(e,t,n,r,o,i,s,a){void 0===e&&(e=yn.defaultCodec),void 0===t&&(t=void 0),void 0===n&&(n=en),void 0===r&&(r=en),void 0===o&&(o=en),void 0===i&&(i=en),void 0===s&&(s=en),void 0===a&&(a=Rn),this.extensionCodec=e,this.context=t,this.maxStrLength=n,this.maxBinLength=r,this.maxArrayLength=o,this.maxMapLength=i,this.maxExtLength=s,this.keyDecoder=a,this.totalPos=0,this.pos=0,this.view=Tn,this.bytes=On,this.headByte=-1,this.stack=[]}e.prototype.reinitializeState=function(){this.totalPos=0,this.headByte=-1,this.stack.length=0},e.prototype.setBuffer=function(e){this.bytes=bn(e),this.view=function(e){if(e instanceof ArrayBuffer)return new DataView(e);var t=bn(e);return new DataView(t.buffer,t.byteOffset,t.byteLength)}(this.bytes),this.pos=0},e.prototype.appendBuffer=function(e){if(-1!==this.headByte||this.hasRemaining(1)){var t=this.bytes.subarray(this.pos),n=bn(e),r=new Uint8Array(t.length+n.length);r.set(t),r.set(n,t.length),this.setBuffer(r)}else this.setBuffer(e)},e.prototype.hasRemaining=function(e){return this.view.byteLength-this.pos>=e},e.prototype.createExtraByteError=function(e){var t=this.view,n=this.pos;return new RangeError("Extra ".concat(t.byteLength-n," of ").concat(t.byteLength," byte(s) found at buffer[").concat(e,"]"))},e.prototype.decode=function(e){this.reinitializeState(),this.setBuffer(e);var t=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return t},e.prototype.decodeMulti=function(e){return Sn(this,(function(t){switch(t.label){case 0:this.reinitializeState(),this.setBuffer(e),t.label=1;case 1:return this.hasRemaining(1)?[4,this.doDecodeSync()]:[3,3];case 2:return t.sent(),[3,1];case 3:return[2]}}))},e.prototype.decodeAsync=function(e){var t,n,r,o;return xn(this,void 0,void 0,(function(){var i,s,a,l,c,u,d,h;return Sn(this,(function(p){switch(p.label){case 0:i=!1,p.label=1;case 1:p.trys.push([1,6,7,12]),t=An(e),p.label=2;case 2:return[4,t.next()];case 3:if((n=p.sent()).done)return[3,5];if(a=n.value,i)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a);try{s=this.doDecodeSync(),i=!0}catch(f){if(!(f instanceof Mn))throw f}this.totalPos+=this.pos,p.label=4;case 4:return[3,2];case 5:return[3,12];case 6:return l=p.sent(),r={error:l},[3,12];case 7:return p.trys.push([7,,10,11]),n&&!n.done&&(o=t.return)?[4,o.call(t)]:[3,9];case 8:p.sent(),p.label=9;case 9:return[3,11];case 10:if(r)throw r.error;return[7];case 11:return[7];case 12:if(i){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return[2,s]}throw u=(c=this).headByte,d=c.pos,h=c.totalPos,new RangeError("Insufficient data in parsing ".concat(wn(u)," at ").concat(h," (").concat(d," in the current buffer)"))}}))}))},e.prototype.decodeArrayStream=function(e){return this.decodeMultiAsync(e,!0)},e.prototype.decodeStream=function(e){return this.decodeMultiAsync(e,!1)},e.prototype.decodeMultiAsync=function(e,t){return kn(this,arguments,(function(){var n,r,o,i,s,a,l,c,u;return Sn(this,(function(d){switch(d.label){case 0:n=t,r=-1,d.label=1;case 1:d.trys.push([1,13,14,19]),o=An(e),d.label=2;case 2:return[4,Cn(o.next())];case 3:if((i=d.sent()).done)return[3,12];if(s=i.value,t&&0===r)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(r=this.readArraySize(),n=!1,this.complete()),d.label=4;case 4:d.trys.push([4,9,,10]),d.label=5;case 5:return[4,Cn(this.doDecodeSync())];case 6:return[4,d.sent()];case 7:return d.sent(),0===--r?[3,8]:[3,5];case 8:return[3,10];case 9:if(!((a=d.sent())instanceof Mn))throw a;return[3,10];case 10:this.totalPos+=this.pos,d.label=11;case 11:return[3,2];case 12:return[3,19];case 13:return l=d.sent(),c={error:l},[3,19];case 14:return d.trys.push([14,,17,18]),i&&!i.done&&(u=o.return)?[4,Cn(u.call(o))]:[3,16];case 15:d.sent(),d.label=16;case 16:return[3,18];case 17:if(c)throw c.error;return[7];case 18:return[7];case 19:return[2]}}))}))},e.prototype.doDecodeSync=function(){e:for(;;){var e=this.readHeadByte(),t=void 0;if(e>=224)t=e-256;else if(e<192)if(e<128)t=e;else if(e<144){if(0!==(r=e-128)){this.pushMapState(r),this.complete();continue e}t={}}else if(e<160){if(0!==(r=e-144)){this.pushArrayState(r),this.complete();continue e}t=[]}else{var n=e-160;t=this.decodeUtf8String(n,0)}else if(192===e)t=null;else if(194===e)t=!1;else if(195===e)t=!0;else if(202===e)t=this.readF32();else if(203===e)t=this.readF64();else if(204===e)t=this.readU8();else if(205===e)t=this.readU16();else if(206===e)t=this.readU32();else if(207===e)t=this.readU64();else if(208===e)t=this.readI8();else if(209===e)t=this.readI16();else if(210===e)t=this.readI32();else if(211===e)t=this.readI64();else if(217===e){n=this.lookU8();t=this.decodeUtf8String(n,1)}else if(218===e){n=this.lookU16();t=this.decodeUtf8String(n,2)}else if(219===e){n=this.lookU32();t=this.decodeUtf8String(n,4)}else if(220===e){if(0!==(r=this.readU16())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(221===e){if(0!==(r=this.readU32())){this.pushArrayState(r),this.complete();continue e}t=[]}else if(222===e){if(0!==(r=this.readU16())){this.pushMapState(r),this.complete();continue e}t={}}else if(223===e){if(0!==(r=this.readU32())){this.pushMapState(r),this.complete();continue e}t={}}else if(196===e){var r=this.lookU8();t=this.decodeBinary(r,1)}else if(197===e){r=this.lookU16();t=this.decodeBinary(r,2)}else if(198===e){r=this.lookU32();t=this.decodeBinary(r,4)}else if(212===e)t=this.decodeExtension(1,0);else if(213===e)t=this.decodeExtension(2,0);else if(214===e)t=this.decodeExtension(4,0);else if(215===e)t=this.decodeExtension(8,0);else if(216===e)t=this.decodeExtension(16,0);else if(199===e){r=this.lookU8();t=this.decodeExtension(r,1)}else if(200===e){r=this.lookU16();t=this.decodeExtension(r,2)}else{if(201!==e)throw new fn("Unrecognized type byte: ".concat(wn(e)));r=this.lookU32();t=this.decodeExtension(r,4)}this.complete();for(var o=this.stack;o.length>0;){var i=o[o.length-1];if(0===i.type){if(i.array[i.position]=t,i.position++,i.position!==i.size)continue e;o.pop(),t=i.array}else{if(1===i.type){if(!En(t))throw new fn("The type of key must be string or number but "+typeof t);if("__proto__"===t)throw new fn("The key __proto__ is not allowed");i.key=t,i.type=2;continue e}if(i.map[i.key]=t,i.readCount++,i.readCount!==i.size){i.key=null,i.type=1;continue e}o.pop(),t=i.map}}return t}},e.prototype.readHeadByte=function(){return-1===this.headByte&&(this.headByte=this.readU8()),this.headByte},e.prototype.complete=function(){this.headByte=-1},e.prototype.readArraySize=function(){var e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:if(e<160)return e-144;throw new fn("Unrecognized array type byte: ".concat(wn(e)))}},e.prototype.pushMapState=function(e){if(e>this.maxMapLength)throw new fn("Max length exceeded: map length (".concat(e,") > maxMapLengthLength (").concat(this.maxMapLength,")"));this.stack.push({type:1,size:e,key:null,readCount:0,map:{}})},e.prototype.pushArrayState=function(e){if(e>this.maxArrayLength)throw new fn("Max length exceeded: array length (".concat(e,") > maxArrayLength (").concat(this.maxArrayLength,")"));this.stack.push({type:0,size:e,array:new Array(e),position:0})},e.prototype.decodeUtf8String=function(e,t){var n;if(e>this.maxStrLength)throw new fn("Max length exceeded: UTF-8 byte length (".concat(e,") > maxStrLength (").concat(this.maxStrLength,")"));if(this.bytes.byteLengthdn?function(e,t,n){var r=e.subarray(t,t+n);return un.decode(r)}(this.bytes,o,e):cn(this.bytes,o,e),this.pos+=t+e,r},e.prototype.stateIsMapKey=function(){return this.stack.length>0&&1===this.stack[this.stack.length-1].type},e.prototype.decodeBinary=function(e,t){if(e>this.maxBinLength)throw new fn("Max length exceeded: bin length (".concat(e,") > maxBinLength (").concat(this.maxBinLength,")"));if(!this.hasRemaining(e+t))throw Pn;var n=this.pos+t,r=this.bytes.subarray(n,n+e);return this.pos+=t+e,r},e.prototype.decodeExtension=function(e,t){if(e>this.maxExtLength)throw new fn("Max length exceeded: ext length (".concat(e,") > maxExtLength (").concat(this.maxExtLength,")"));var n=this.view.getInt8(this.pos+t),r=this.decodeBinary(e,t+1);return this.extensionCodec.decode(r,n,this.context)},e.prototype.lookU8=function(){return this.view.getUint8(this.pos)},e.prototype.lookU16=function(){return this.view.getUint16(this.pos)},e.prototype.lookU32=function(){return this.view.getUint32(this.pos)},e.prototype.readU8=function(){var e=this.view.getUint8(this.pos);return this.pos++,e},e.prototype.readI8=function(){var e=this.view.getInt8(this.pos);return this.pos++,e},e.prototype.readU16=function(){var e=this.view.getUint16(this.pos);return this.pos+=2,e},e.prototype.readI16=function(){var e=this.view.getInt16(this.pos);return this.pos+=2,e},e.prototype.readU32=function(){var e=this.view.getUint32(this.pos);return this.pos+=4,e},e.prototype.readI32=function(){var e=this.view.getInt32(this.pos);return this.pos+=4,e},e.prototype.readU64=function(){var e,t,n=(e=this.view,t=this.pos,4294967296*e.getUint32(t)+e.getUint32(t+4));return this.pos+=8,n},e.prototype.readI64=function(){var e=nn(this.view,this.pos);return this.pos+=8,e},e.prototype.readF32=function(){var e=this.view.getFloat32(this.pos);return this.pos+=4,e},e.prototype.readF64=function(){var e=this.view.getFloat64(this.pos);return this.pos+=8,e}}();var Nn;function In(e,t,n,r){Object.defineProperty(e,t,{get:n,set:r,enumerable:!0,configurable:!0})}class Ln{constructor(){this.chunkedMTU=16300,this._dataCount=1,this.chunk=e=>{const t=[],n=e.byteLength,r=Math.ceil(n/this.chunkedMTU);let o=0,i=0;for(;i=this.minChromeVersion:"firefox"===e?t>=this.minFirefoxVersion:"safari"===e&&(!this.isIOS&&t>=this.minSafariVersion))}getBrowser(){return jn.browserDetails.browser}getVersion(){return jn.browserDetails.version||0}isUnifiedPlanSupported(){const e=this.getBrowser(),t=jn.browserDetails.version||0;if("chrome"===e&&t=this.minFirefoxVersion)return!0;if(!window.RTCRtpTransceiver||!("currentDirection"in RTCRtpTransceiver.prototype))return!1;let n,r=!1;try{n=new RTCPeerConnection,n.addTransceiver("audio"),r=!0}catch(o){}finally{n&&n.close()}return r}toString(){return"Supports:\n browser:".concat(this.getBrowser(),"\n version:").concat(this.getVersion(),"\n isIOS:").concat(this.isIOS,"\n isWebRTCSupported:").concat(this.isWebRTCSupported(),"\n isBrowserSupported:").concat(this.isBrowserSupported(),"\n isUnifiedPlanSupported:").concat(this.isUnifiedPlanSupported())}constructor(){this.isIOS=["iPad","iPhone","iPod"].includes(navigator.platform),this.supportedBrowsers=["firefox","chrome","safari"],this.minFirefoxVersion=59,this.minChromeVersion=72,this.minSafariVersion=605}},Bn=e=>!e||/^[A-Za-z0-9]+(?:[ _-][A-Za-z0-9]+)*$/.test(e),Un=()=>Math.random().toString(36).slice(2),zn={iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:["turn:eu-0.turn.peerjs.com:3478","turn:us-0.turn.peerjs.com:3478"],username:"peerjs",credential:"peerjsp"}],sdpSemantics:"unified-plan"};const Wn=new class extends Ln{noop(){}blobToArrayBuffer(e,t){const n=new FileReader;return n.onload=function(e){e.target&&t(e.target.result)},n.readAsArrayBuffer(e),n}binaryStringToArrayBuffer(e){const t=new Uint8Array(e.length);for(let n=0;n=3&&this._print(3,...t)}warn(){for(var e=arguments.length,t=new Array(e),n=0;n=2&&this._print(2,...t)}error(){for(var e=arguments.length,t=new Array(e),n=0;n=1&&this._print(1,...t)}setLogFunction(e){this._print=e}_print(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r=3?console.log(...o):e>=2?console.warn("WARNING",...o):e>=1&&console.error("ERROR",...o)}constructor(){this._logLevel=0}},Yn=Object.prototype.hasOwnProperty,Kn="~";function Xn(){}function $n(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function Qn(e,t,n,r,o){if("function"!==typeof n)throw new TypeError("The listener must be a function");var i=new $n(n,r||e,o),s=Kn?Kn+t:t;return e._events[s]?e._events[s].fn?e._events[s]=[e._events[s],i]:e._events[s].push(i):(e._events[s]=i,e._eventsCount++),e}function Zn(e,t){0===--e._eventsCount?e._events=new Xn:delete e._events[t]}function Jn(){this._events=new Xn,this._eventsCount=0}Object.create&&(Xn.prototype=Object.create(null),(new Xn).__proto__||(Kn=!1)),Jn.prototype.eventNames=function(){var e,t,n=[];if(0===this._eventsCount)return n;for(t in e=this._events)Yn.call(e,t)&&n.push(Kn?t.slice(1):t);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(e)):n},Jn.prototype.listeners=function(e){var t=Kn?Kn+e:e,n=this._events[t];if(!n)return[];if(n.fn)return[n.fn];for(var r=0,o=n.length,i=new Array(o);rer)),In(fr,"PeerErrorType",(()=>nr)),In(fr,"BaseConnectionErrorType",(()=>or)),In(fr,"DataConnectionErrorType",(()=>sr)),In(fr,"SerializationType",(()=>lr)),In(fr,"SocketEventType",(()=>ur)),In(fr,"ServerMessageType",(()=>hr)),(tr=er||(er={})).Data="data",tr.Media="media",(rr=nr||(nr={})).BrowserIncompatible="browser-incompatible",rr.Disconnected="disconnected",rr.InvalidID="invalid-id",rr.InvalidKey="invalid-key",rr.Network="network",rr.PeerUnavailable="peer-unavailable",rr.SslUnavailable="ssl-unavailable",rr.ServerError="server-error",rr.SocketError="socket-error",rr.SocketClosed="socket-closed",rr.UnavailableID="unavailable-id",rr.WebRTC="webrtc",(ir=or||(or={})).NegotiationFailed="negotiation-failed",ir.ConnectionClosed="connection-closed",(ar=sr||(sr={})).NotOpenYet="not-open-yet",ar.MessageToBig="message-too-big",(cr=lr||(lr={})).Binary="binary",cr.BinaryUTF8="binary-utf8",cr.JSON="json",cr.None="raw",(dr=ur||(ur={})).Message="message",dr.Disconnected="disconnected",dr.Error="error",dr.Close="close",(pr=hr||(hr={})).Heartbeat="HEARTBEAT",pr.Candidate="CANDIDATE",pr.Offer="OFFER",pr.Answer="ANSWER",pr.Open="OPEN",pr.Error="ERROR",pr.IdTaken="ID-TAKEN",pr.InvalidKey="INVALID-KEY",pr.Leave="LEAVE",pr.Expire="EXPIRE";var mr;mr=JSON.parse('{"name":"peerjs","version":"1.5.2","keywords":["peerjs","webrtc","p2p","rtc"],"description":"PeerJS client","homepage":"https://peerjs.com","bugs":{"url":"https://github.com/peers/peerjs/issues"},"repository":{"type":"git","url":"https://github.com/peers/peerjs"},"license":"MIT","contributors":["Michelle Bu ","afrokick ","ericz ","Jairo ","Jonas Gloning <34194370+jonasgloning@users.noreply.github.com>","Jairo Caro-Accino Viciana ","Carlos Caballero ","hc ","Muhammad Asif ","PrashoonB ","Harsh Bardhan Mishra <47351025+HarshCasper@users.noreply.github.com>","akotynski ","lmb ","Jairooo ","Moritz St\xfcckler ","Simon ","Denis Lukov ","Philipp Hancke ","Hans Oksendahl ","Jess ","khankuan ","DUODVK ","XiZhao ","Matthias Lohr ","=frank tree <=frnktrb@googlemail.com>","Andre Eckardt ","Chris Cowan ","Alex Chuev ","alxnull ","Yemel Jardi ","Ben Parnell ","Benny Lichtner ","fresheneesz ","bob.barstead@exaptive.com ","chandika ","emersion ","Christopher Van ","eddieherm ","Eduardo Pinho ","Evandro Zanatta ","Gardner Bickford ","Gian Luca ","PatrickJS ","jonnyf ","Hizkia Felix ","Hristo Oskov ","Isaac Madwed ","Ilya Konanykhin ","jasonbarry ","Jonathan Burke ","Josh Hamit ","Jordan Austin ","Joel Wetzell ","xizhao ","Alberto Torres ","Jonathan Mayol ","Jefferson Felix ","Rolf Erik Lekang ","Kevin Mai-Husan Chia ","Pepijn de Vos ","JooYoung ","Tobias Speicher ","Steve Blaurock ","Kyrylo Shegeda ","Diwank Singh Tomer ","So\u0308ren Balko ","Arpit Solanki ","Yuki Ito ","Artur Zayats "],"funding":{"type":"opencollective","url":"https://opencollective.com/peer"},"collective":{"type":"opencollective","url":"https://opencollective.com/peer"},"files":["dist/*"],"sideEffects":["lib/global.ts","lib/supports.ts"],"main":"dist/bundler.cjs","module":"dist/bundler.mjs","browser-minified":"dist/peerjs.min.js","browser-unminified":"dist/peerjs.js","browser-minified-cbor":"dist/serializer.cbor.mjs","browser-minified-msgpack":"dist/serializer.msgpack.mjs","types":"dist/types.d.ts","engines":{"node":">= 14"},"targets":{"types":{"source":"lib/exports.ts"},"main":{"source":"lib/exports.ts","sourceMap":{"inlineSources":true}},"module":{"source":"lib/exports.ts","includeNodeModules":["eventemitter3"],"sourceMap":{"inlineSources":true}},"browser-minified":{"context":"browser","outputFormat":"global","optimize":true,"engines":{"browsers":"chrome >= 83, edge >= 83, firefox >= 80, safari >= 15"},"source":"lib/global.ts"},"browser-unminified":{"context":"browser","outputFormat":"global","optimize":false,"engines":{"browsers":"chrome >= 83, edge >= 83, firefox >= 80, safari >= 15"},"source":"lib/global.ts"},"browser-minified-cbor":{"context":"browser","outputFormat":"esmodule","isLibrary":true,"optimize":true,"engines":{"browsers":"chrome >= 83, edge >= 83, firefox >= 102, safari >= 15"},"source":"lib/dataconnection/StreamConnection/Cbor.ts"},"browser-minified-msgpack":{"context":"browser","outputFormat":"esmodule","isLibrary":true,"optimize":true,"engines":{"browsers":"chrome >= 83, edge >= 83, firefox >= 102, safari >= 15"},"source":"lib/dataconnection/StreamConnection/MsgPack.ts"}},"scripts":{"contributors":"git-authors-cli --print=false && prettier --write package.json && git add package.json package-lock.json && git commit -m \\"chore(contributors): update and sort contributors list\\"","check":"tsc --noEmit && tsc -p e2e/tsconfig.json --noEmit","watch":"parcel watch","build":"rm -rf dist && parcel build","prepublishOnly":"npm run build","test":"jest","test:watch":"jest --watch","coverage":"jest --coverage --collectCoverageFrom=\\"./lib/**\\"","format":"prettier --write .","format:check":"prettier --check .","semantic-release":"semantic-release","e2e":"wdio run e2e/wdio.local.conf.ts","e2e:bstack":"wdio run e2e/wdio.bstack.conf.ts"},"devDependencies":{"@parcel/config-default":"^2.9.3","@parcel/packager-ts":"^2.9.3","@parcel/transformer-typescript-tsc":"^2.9.3","@parcel/transformer-typescript-types":"^2.9.3","@semantic-release/changelog":"^6.0.1","@semantic-release/git":"^10.0.1","@swc/core":"^1.3.27","@swc/jest":"^0.2.24","@types/jasmine":"^4.3.4","@wdio/browserstack-service":"^8.11.2","@wdio/cli":"^8.11.2","@wdio/globals":"^8.11.2","@wdio/jasmine-framework":"^8.11.2","@wdio/local-runner":"^8.11.2","@wdio/spec-reporter":"^8.11.2","@wdio/types":"^8.10.4","http-server":"^14.1.1","jest":"^29.3.1","jest-environment-jsdom":"^29.3.1","mock-socket":"^9.0.0","parcel":"^2.9.3","prettier":"^3.0.0","semantic-release":"^21.0.0","ts-node":"^10.9.1","typescript":"^5.0.0","wdio-geckodriver-service":"^5.0.1"},"dependencies":{"@msgpack/msgpack":"^2.8.0","cbor-x":"1.5.4","eventemitter3":"^4.0.7","peerjs-js-binarypack":"^2.1.0","webrtc-adapter":"^8.0.0"},"alias":{"process":false,"buffer":false}}');class gr extends Gn.EventEmitter{constructor(e,t,n,r,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:5e3;super(),this.pingInterval=i,this._disconnected=!0,this._messagesQueue=[];const s=e?"wss://":"ws://";this._baseUrl=s+t+":"+n+r+"peerjs?key="+o}start(e,t){this._id=e;const n="".concat(this._baseUrl,"&id=").concat(e,"&token=").concat(t);!this._socket&&this._disconnected&&(this._socket=new WebSocket(n+"&version="+mr.version),this._disconnected=!1,this._socket.onmessage=e=>{let t;try{t=JSON.parse(e.data),qn.log("Server message received:",t)}catch(n){return void qn.log("Invalid server message",e.data)}this.emit(ur.Message,t)},this._socket.onclose=e=>{this._disconnected||(qn.log("Socket closed.",e),this._cleanup(),this._disconnected=!0,this.emit(ur.Disconnected))},this._socket.onopen=()=>{this._disconnected||(this._sendQueuedMessages(),qn.log("Socket open"),this._scheduleHeartbeat())})}_scheduleHeartbeat(){this._wsPingTimer=setTimeout((()=>{this._sendHeartbeat()}),this.pingInterval)}_sendHeartbeat(){if(!this._wsOpen())return void qn.log("Cannot send heartbeat, because socket closed");const e=JSON.stringify({type:hr.Heartbeat});this._socket.send(e),this._scheduleHeartbeat()}_wsOpen(){return!!this._socket&&1===this._socket.readyState}_sendQueuedMessages(){const e=[...this._messagesQueue];this._messagesQueue=[];for(const t of e)this.send(t)}send(e){if(this._disconnected)return;if(!this._id)return void this._messagesQueue.push(e);if(!e.type)return void this.emit(ur.Error,"Invalid message");if(!this._wsOpen())return;const t=JSON.stringify(e);this._socket.send(t)}close(){this._disconnected||(this._cleanup(),this._disconnected=!0)}_cleanup(){this._socket&&(this._socket.onopen=this._socket.onmessage=this._socket.onclose=null,this._socket.close(),this._socket=void 0),clearTimeout(this._wsPingTimer)}}class vr{constructor(e){this.connection=e}startConnection(e){const t=this._startPeerConnection();if(this.connection.peerConnection=t,this.connection.type===er.Media&&e._stream&&this._addTracksToConnection(e._stream,t),e.originator){const n=this.connection,r={ordered:!!e.reliable},o=t.createDataChannel(n.label,r);n._initializeDataChannel(o),this._makeOffer()}else this.handleSDP("OFFER",e.sdp)}_startPeerConnection(){qn.log("Creating RTCPeerConnection.");const e=new RTCPeerConnection(this.connection.provider.options.config);return this._setupListeners(e),e}_setupListeners(e){const t=this.connection.peer,n=this.connection.connectionId,r=this.connection.type,o=this.connection.provider;qn.log("Listening for ICE candidates."),e.onicecandidate=e=>{e.candidate&&e.candidate.candidate&&(qn.log("Received ICE candidates for ".concat(t,":"),e.candidate),o.socket.send({type:hr.Candidate,payload:{candidate:e.candidate,type:r,connectionId:n},dst:t}))},e.oniceconnectionstatechange=()=>{switch(e.iceConnectionState){case"failed":qn.log("iceConnectionState is failed, closing connections to "+t),this.connection.emitError(or.NegotiationFailed,"Negotiation of connection to "+t+" failed."),this.connection.close();break;case"closed":qn.log("iceConnectionState is closed, closing connections to "+t),this.connection.emitError(or.ConnectionClosed,"Connection to "+t+" closed."),this.connection.close();break;case"disconnected":qn.log("iceConnectionState changed to disconnected on the connection with "+t);break;case"completed":e.onicecandidate=()=>{}}this.connection.emit("iceStateChanged",e.iceConnectionState)},qn.log("Listening for data channel"),e.ondatachannel=e=>{qn.log("Received data channel");const r=e.channel;o.getConnection(t,n)._initializeDataChannel(r)},qn.log("Listening for remote stream"),e.ontrack=e=>{qn.log("Received remote stream");const r=e.streams[0],i=o.getConnection(t,n);if(i.type===er.Media){const e=i;this._addStreamToMediaConnection(r,e)}}}cleanup(){qn.log("Cleaning up PeerConnection to "+this.connection.peer);const e=this.connection.peerConnection;if(!e)return;this.connection.peerConnection=null,e.onicecandidate=e.oniceconnectionstatechange=e.ondatachannel=e.ontrack=()=>{};const t="closed"!==e.signalingState;let n=!1;const r=this.connection.dataChannel;r&&(n=!!r.readyState&&"closed"!==r.readyState),(t||n)&&e.close()}async _makeOffer(){const e=this.connection.peerConnection,t=this.connection.provider;try{const r=await e.createOffer(this.connection.options.constraints);qn.log("Created offer."),this.connection.options.sdpTransform&&"function"===typeof this.connection.options.sdpTransform&&(r.sdp=this.connection.options.sdpTransform(r.sdp)||r.sdp);try{await e.setLocalDescription(r),qn.log("Set localDescription:",r,"for:".concat(this.connection.peer));let n={sdp:r,type:this.connection.type,connectionId:this.connection.connectionId,metadata:this.connection.metadata};if(this.connection.type===er.Data){const e=this.connection;n={...n,label:e.label,reliable:e.reliable,serialization:e.serialization}}t.socket.send({type:hr.Offer,payload:n,dst:this.connection.peer})}catch(n){"OperationError: Failed to set local offer sdp: Called in wrong state: kHaveRemoteOffer"!=n&&(t.emitError(nr.WebRTC,n),qn.log("Failed to setLocalDescription, ",n))}}catch(r){t.emitError(nr.WebRTC,r),qn.log("Failed to createOffer, ",r)}}async _makeAnswer(){const e=this.connection.peerConnection,t=this.connection.provider;try{const r=await e.createAnswer();qn.log("Created answer."),this.connection.options.sdpTransform&&"function"===typeof this.connection.options.sdpTransform&&(r.sdp=this.connection.options.sdpTransform(r.sdp)||r.sdp);try{await e.setLocalDescription(r),qn.log("Set localDescription:",r,"for:".concat(this.connection.peer)),t.socket.send({type:hr.Answer,payload:{sdp:r,type:this.connection.type,connectionId:this.connection.connectionId},dst:this.connection.peer})}catch(n){t.emitError(nr.WebRTC,n),qn.log("Failed to setLocalDescription, ",n)}}catch(r){t.emitError(nr.WebRTC,r),qn.log("Failed to create answer, ",r)}}async handleSDP(e,t){t=new RTCSessionDescription(t);const n=this.connection.peerConnection,r=this.connection.provider;qn.log("Setting remote description",t);const o=this;try{await n.setRemoteDescription(t),qn.log("Set remoteDescription:".concat(e," for:").concat(this.connection.peer)),"OFFER"===e&&await o._makeAnswer()}catch(i){r.emitError(nr.WebRTC,i),qn.log("Failed to setRemoteDescription, ",i)}}async handleCandidate(e){qn.log("handleCandidate:",e);try{await this.connection.peerConnection.addIceCandidate(e),qn.log("Added ICE candidate for:".concat(this.connection.peer))}catch(t){this.connection.provider.emitError(nr.WebRTC,t),qn.log("Failed to handleCandidate, ",t)}}_addTracksToConnection(e,t){if(qn.log("add tracks from stream ".concat(e.id," to peer connection")),!t.addTrack)return qn.error("Your browser does't support RTCPeerConnection#addTrack. Ignored.");e.getTracks().forEach((n=>{t.addTrack(n,e)}))}_addStreamToMediaConnection(e,t){qn.log("add stream ".concat(e.id," to media connection ").concat(t.connectionId)),t.addStream(e)}}class yr extends Gn.EventEmitter{emitError(e,t){qn.error("Error:",t),this.emit("error",new br("".concat(e),t))}}class br extends Error{constructor(e,t){"string"===typeof t?super(t):(super(),Object.assign(this,t)),this.type=e}}class wr extends yr{get open(){return this._open}constructor(e,t,n){super(),this.peer=e,this.provider=t,this.options=n,this._open=!1,this.metadata=n.metadata}}class _r extends wr{get type(){return er.Media}get localStream(){return this._localStream}get remoteStream(){return this._remoteStream}constructor(e,t,n){super(e,t,n),this._localStream=this.options._stream,this.connectionId=this.options.connectionId||_r.ID_PREFIX+Wn.randomToken(),this._negotiator=new vr(this),this._localStream&&this._negotiator.startConnection({_stream:this._localStream,originator:!0})}_initializeDataChannel(e){this.dataChannel=e,this.dataChannel.onopen=()=>{qn.log("DC#".concat(this.connectionId," dc connection success")),this.emit("willCloseOnRemote")},this.dataChannel.onclose=()=>{qn.log("DC#".concat(this.connectionId," dc closed for:"),this.peer),this.close()}}addStream(e){qn.log("Receiving stream",e),this._remoteStream=e,super.emit("stream",e)}handleMessage(e){const t=e.type,n=e.payload;switch(e.type){case hr.Answer:this._negotiator.handleSDP(t,n.sdp),this._open=!0;break;case hr.Candidate:this._negotiator.handleCandidate(n.candidate);break;default:qn.warn("Unrecognized message type:".concat(t," from peer:").concat(this.peer))}}answer(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this._localStream)return void qn.warn("Local stream already exists on this MediaConnection. Are you answering a call twice?");this._localStream=e,t&&t.sdpTransform&&(this.options.sdpTransform=t.sdpTransform),this._negotiator.startConnection({...this.options._payload,_stream:e});const n=this.provider._getMessages(this.connectionId);for(const r of n)this.handleMessage(r);this._open=!0}close(){this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this._localStream=null,this._remoteStream=null,this.provider&&(this.provider._removeConnection(this),this.provider=null),this.options&&this.options._stream&&(this.options._stream=null),this.open&&(this._open=!1,super.emit("close"))}}_r.ID_PREFIX="mc_";class xr{constructor(e){this._options=e}_buildRequest(e){const t=this._options.secure?"https":"http",{host:n,port:r,path:o,key:i}=this._options,s=new URL("".concat(t,"://").concat(n,":").concat(r).concat(o).concat(i,"/").concat(e));return s.searchParams.set("ts","".concat(Date.now()).concat(Math.random())),s.searchParams.set("version",mr.version),fetch(s.href,{referrerPolicy:this._options.referrerPolicy})}async retrieveId(){try{const e=await this._buildRequest("id");if(200!==e.status)throw new Error("Error. Status:".concat(e.status));return e.text()}catch(Fo){qn.error("Error retrieving ID",Fo);let t="";throw"/"===this._options.path&&this._options.host!==Wn.CLOUD_HOST&&(t=" If you passed in a `path` to your self-hosted PeerServer, you'll also need to pass in that same path when creating a new Peer."),new Error("Could not get an ID from the server."+t)}}async listAllPeers(){try{const e=await this._buildRequest("peers");if(200!==e.status){if(401===e.status){let e="";throw e=this._options.host===Wn.CLOUD_HOST?"It looks like you're using the cloud server. You can email team@peerjs.com to enable peer listing for your API key.":"You need to enable `allow_discovery` on your self-hosted PeerServer to use this feature.",new Error("It doesn't look like you have permission to list peers IDs. "+e)}throw new Error("Error. Status:".concat(e.status))}return e.json()}catch(Fo){throw qn.error("Error retrieving list peers",Fo),new Error("Could not get list peers from the server."+Fo)}}}class Sr extends wr{get type(){return er.Data}constructor(e,t,n){super(e,t,n),this.connectionId=this.options.connectionId||Sr.ID_PREFIX+Un(),this.label=this.options.label||this.connectionId,this.reliable=!!this.options.reliable,this._negotiator=new vr(this),this._negotiator.startConnection(this.options._payload||{originator:!0,reliable:this.reliable})}_initializeDataChannel(e){this.dataChannel=e,this.dataChannel.onopen=()=>{qn.log("DC#".concat(this.connectionId," dc connection success")),this._open=!0,this.emit("open")},this.dataChannel.onmessage=e=>{qn.log("DC#".concat(this.connectionId," dc onmessage:"),e.data)},this.dataChannel.onclose=()=>{qn.log("DC#".concat(this.connectionId," dc closed for:"),this.peer),this.close()}}close(e){null!==e&&void 0!==e&&e.flush?this.send({__peerData:{type:"close"}}):(this._negotiator&&(this._negotiator.cleanup(),this._negotiator=null),this.provider&&(this.provider._removeConnection(this),this.provider=null),this.dataChannel&&(this.dataChannel.onopen=null,this.dataChannel.onmessage=null,this.dataChannel.onclose=null,this.dataChannel=null),this.open&&(this._open=!1,super.emit("close")))}send(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.open)return this._send(e,t);this.emitError(sr.NotOpenYet,"Connection is not open. You should listen for the `open` event before sending messages.")}async handleMessage(e){const t=e.payload;switch(e.type){case hr.Answer:await this._negotiator.handleSDP(e.type,t.sdp);break;case hr.Candidate:await this._negotiator.handleCandidate(t.candidate);break;default:qn.warn("Unrecognized message type:",e.type,"from peer:",this.peer)}}}(Nn=Sr).ID_PREFIX="dc_",Nn.MAX_BUFFERED_AMOUNT=8388608;class Ar extends Sr{get bufferSize(){return this._bufferSize}_initializeDataChannel(e){super._initializeDataChannel(e),this.dataChannel.binaryType="arraybuffer",this.dataChannel.addEventListener("message",(e=>this._handleDataMessage(e)))}_bufferedSend(e){!this._buffering&&this._trySend(e)||(this._buffer.push(e),this._bufferSize=this._buffer.length)}_trySend(e){if(!this.open)return!1;if(this.dataChannel.bufferedAmount>Sr.MAX_BUFFERED_AMOUNT)return this._buffering=!0,setTimeout((()=>{this._buffering=!1,this._tryBuffer()}),50),!1;try{this.dataChannel.send(e)}catch(t){return qn.error("DC#:".concat(this.connectionId," Error when sending:"),t),this._buffering=!0,this.close(),!1}return!0}_tryBuffer(){if(!this.open)return;if(0===this._buffer.length)return;const e=this._buffer[0];this._trySend(e)&&(this._buffer.shift(),this._bufferSize=this._buffer.length,this._tryBuffer())}close(e){null!==e&&void 0!==e&&e.flush?this.send({__peerData:{type:"close"}}):(this._buffer=[],this._bufferSize=0,super.close())}constructor(){super(...arguments),this._buffer=[],this._bufferSize=0,this._buffering=!1}}class Cr extends Ar{close(e){super.close(e),this._chunkedData={}}constructor(e,t,n){super(e,t,n),this.chunker=new Ln,this.serialization=lr.Binary,this._chunkedData={}}_handleDataMessage(e){let{data:t}=e;const n=l(t),r=n.__peerData;if(r)return"close"===r.type?void this.close():void this._handleChunk(n);this.emit("data",n)}_handleChunk(e){const t=e.__peerData,n=this._chunkedData[t]||{data:[],count:0,total:e.total};if(n.data[e.n]=new Uint8Array(e.data),n.count++,this._chunkedData[t]=n,n.total===n.count){delete this._chunkedData[t];const e=Dn(n.data);this._handleDataMessage({data:e})}}_send(e,t){const n=c(e);if(n instanceof Promise)return this._send_blob(n);!t&&n.byteLength>this.chunker.chunkedMTU?this._sendChunks(n):this._bufferedSend(n)}async _send_blob(e){const t=await e;t.byteLength>this.chunker.chunkedMTU?this._sendChunks(t):this._bufferedSend(t)}_sendChunks(e){const t=this.chunker.chunk(e);qn.log("DC#".concat(this.connectionId," Try to send ").concat(t.length," chunks..."));for(const n of t)this.send(n,!0)}}class kr extends Ar{_handleDataMessage(e){let{data:t}=e;super.emit("data",t)}_send(e,t){this._bufferedSend(e)}constructor(){super(...arguments),this.serialization=lr.None}}class Er extends Ar{_handleDataMessage(e){let{data:t}=e;const n=this.parse(this.decoder.decode(t)),r=n.__peerData;r&&"close"===r.type?this.close():this.emit("data",n)}_send(e,t){const n=this.encoder.encode(this.stringify(e));n.byteLength>=Wn.chunkedMTU?this.emitError(sr.MessageToBig,"Message too big for JSON channel"):this._bufferedSend(n)}constructor(){super(...arguments),this.serialization=lr.JSON,this.encoder=new TextEncoder,this.decoder=new TextDecoder,this.stringify=JSON.stringify,this.parse=JSON.parse}}class Tr extends yr{get id(){return this._id}get options(){return this._options}get open(){return this._open}get socket(){return this._socket}get connections(){const e=Object.create(null);for(const[t,n]of this._connections)e[t]=n;return e}get destroyed(){return this._destroyed}get disconnected(){return this._disconnected}constructor(e,t){let n;super(),this._serializers={raw:kr,json:Er,binary:Cr,"binary-utf8":Cr,default:Cr},this._id=null,this._lastServerId=null,this._destroyed=!1,this._disconnected=!1,this._open=!1,this._connections=new Map,this._lostMessages=new Map,e&&e.constructor==Object?t=e:e&&(n=e.toString()),t={debug:0,host:Wn.CLOUD_HOST,port:Wn.CLOUD_PORT,path:"/",key:Tr.DEFAULT_KEY,token:Wn.randomToken(),config:Wn.defaultConfig,referrerPolicy:"strict-origin-when-cross-origin",serializers:{},...t},this._options=t,this._serializers={...this._serializers,...this.options.serializers},"/"===this._options.host&&(this._options.host=window.location.hostname),this._options.path&&("/"!==this._options.path[0]&&(this._options.path="/"+this._options.path),"/"!==this._options.path[this._options.path.length-1]&&(this._options.path+="/")),void 0===this._options.secure&&this._options.host!==Wn.CLOUD_HOST?this._options.secure=Wn.isSecure():this._options.host==Wn.CLOUD_HOST&&(this._options.secure=!0),this._options.logFunction&&qn.setLogFunction(this._options.logFunction),qn.logLevel=this._options.debug||0,this._api=new xr(t),this._socket=this._createServerConnection(),Wn.supports.audioVideo||Wn.supports.data?!n||Wn.validateId(n)?n?this._initialize(n):this._api.retrieveId().then((e=>this._initialize(e))).catch((e=>this._abort(nr.ServerError,e))):this._delayedAbort(nr.InvalidID,'ID "'.concat(n,'" is invalid')):this._delayedAbort(nr.BrowserIncompatible,"The current browser does not support WebRTC")}_createServerConnection(){const e=new gr(this._options.secure,this._options.host,this._options.port,this._options.path,this._options.key,this._options.pingInterval);return e.on(ur.Message,(e=>{this._handleMessage(e)})),e.on(ur.Error,(e=>{this._abort(nr.SocketError,e)})),e.on(ur.Disconnected,(()=>{this.disconnected||(this.emitError(nr.Network,"Lost connection to server."),this.disconnect())})),e.on(ur.Close,(()=>{this.disconnected||this._abort(nr.SocketClosed,"Underlying socket is already closed.")})),e}_initialize(e){this._id=e,this.socket.start(e,this._options.token)}_handleMessage(e){const t=e.type,n=e.payload,r=e.src;switch(t){case hr.Open:this._lastServerId=this.id,this._open=!0,this.emit("open",this.id);break;case hr.Error:this._abort(nr.ServerError,n.msg);break;case hr.IdTaken:this._abort(nr.UnavailableID,'ID "'.concat(this.id,'" is taken'));break;case hr.InvalidKey:this._abort(nr.InvalidKey,'API KEY "'.concat(this._options.key,'" is invalid'));break;case hr.Leave:qn.log("Received leave message from ".concat(r)),this._cleanupPeer(r),this._connections.delete(r);break;case hr.Expire:this.emitError(nr.PeerUnavailable,"Could not connect to peer ".concat(r));break;case hr.Offer:{const e=n.connectionId;let t=this.getConnection(r,e);if(t&&(t.close(),qn.warn("Offer received for existing Connection ID:".concat(e))),n.type===er.Media){const o=new _r(r,this,{connectionId:e,_payload:n,metadata:n.metadata});t=o,this._addConnection(r,t),this.emit("call",o)}else{if(n.type!==er.Data)return void qn.warn("Received malformed connection type:".concat(n.type));{const o=new this._serializers[n.serialization](r,this,{connectionId:e,_payload:n,metadata:n.metadata,label:n.label,serialization:n.serialization,reliable:n.reliable});t=o,this._addConnection(r,t),this.emit("connection",o)}}const o=this._getMessages(e);for(const n of o)t.handleMessage(n);break}default:{if(!n)return void qn.warn("You received a malformed message from ".concat(r," of type ").concat(t));const o=n.connectionId,i=this.getConnection(r,o);i&&i.peerConnection?i.handleMessage(e):o?this._storeMessage(o,e):qn.warn("You received an unrecognized message:",e);break}}}_storeMessage(e,t){this._lostMessages.has(e)||this._lostMessages.set(e,[]),this._lostMessages.get(e).push(t)}_getMessages(e){const t=this._lostMessages.get(e);return t?(this._lostMessages.delete(e),t):[]}connect(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t={serialization:"default",...t},this.disconnected)return qn.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect, or call reconnect on this peer if you believe its ID to still be available."),void this.emitError(nr.Disconnected,"Cannot connect to new Peer after disconnecting from server.");const n=new this._serializers[t.serialization](e,this,t);return this._addConnection(e,n),n}call(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.disconnected)return qn.warn("You cannot connect to a new Peer because you called .disconnect() on this Peer and ended your connection with the server. You can create a new Peer to reconnect."),void this.emitError(nr.Disconnected,"Cannot connect to new Peer after disconnecting from server.");if(!t)return void qn.error("To call a peer, you must provide a stream from your browser's `getUserMedia`.");const r=new _r(e,this,{...n,_stream:t});return this._addConnection(e,r),r}_addConnection(e,t){qn.log("add connection ".concat(t.type,":").concat(t.connectionId," to peerId:").concat(e)),this._connections.has(e)||this._connections.set(e,[]),this._connections.get(e).push(t)}_removeConnection(e){const t=this._connections.get(e.peer);if(t){const n=t.indexOf(e);-1!==n&&t.splice(n,1)}this._lostMessages.delete(e.connectionId)}getConnection(e,t){const n=this._connections.get(e);if(!n)return null;for(const r of n)if(r.connectionId===t)return r;return null}_delayedAbort(e,t){setTimeout((()=>{this._abort(e,t)}),0)}_abort(e,t){qn.error("Aborting!"),this.emitError(e,t),this._lastServerId?this.disconnect():this.destroy()}destroy(){this.destroyed||(qn.log("Destroy peer with ID:".concat(this.id)),this.disconnect(),this._cleanup(),this._destroyed=!0,this.emit("close"))}_cleanup(){for(const e of this._connections.keys())this._cleanupPeer(e),this._connections.delete(e);this.socket.removeAllListeners()}_cleanupPeer(e){const t=this._connections.get(e);if(t)for(const n of t)n.close()}disconnect(){if(this.disconnected)return;const e=this.id;qn.log("Disconnect peer with ID:".concat(e)),this._disconnected=!0,this._open=!1,this.socket.close(),this._lastServerId=e,this._id=null,this.emit("disconnected",e)}reconnect(){if(this.disconnected&&!this.destroyed)qn.log("Attempting reconnection to server with ID ".concat(this._lastServerId)),this._disconnected=!1,this._initialize(this._lastServerId);else{if(this.destroyed)throw new Error("This peer cannot reconnect to the server. It has already been destroyed.");if(this.disconnected||this.open)throw new Error("Peer ".concat(this.id," cannot reconnect because it is not disconnected from the server!"));qn.error("In a hurry? We're still trying to make the initial connection!")}}listAllPeers(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e=>{};this._api.listAllPeers().then((t=>e(t))).catch((e=>this._abort(nr.ServerError,e)))}}Tr.DEFAULT_KEY="peerjs";Symbol.for(null);var Or,Mr=new Uint8Array(16);function Pr(){if(!Or&&!(Or="undefined"!==typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!==typeof msCrypto&&"function"===typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Or(Mr)}const Rr=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;const Nr=function(e){return"string"===typeof e&&Rr.test(e)};for(var Ir=[],Lr=0;Lr<256;++Lr)Ir.push((Lr+256).toString(16).substr(1));const Dr=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(Ir[e[t+0]]+Ir[e[t+1]]+Ir[e[t+2]]+Ir[e[t+3]]+"-"+Ir[e[t+4]]+Ir[e[t+5]]+"-"+Ir[e[t+6]]+Ir[e[t+7]]+"-"+Ir[e[t+8]]+Ir[e[t+9]]+"-"+Ir[e[t+10]]+Ir[e[t+11]]+Ir[e[t+12]]+Ir[e[t+13]]+Ir[e[t+14]]+Ir[e[t+15]]).toLowerCase();if(!Nr(n))throw TypeError("Stringified UUID is invalid");return n};const jr=function(e,t,n){var r=(e=e||{}).random||(e.rng||Pr)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var o=0;o<16;++o)t[n+o]=r[o];return t}return Dr(r)};var Fr=n(77910),Br=n(9950),Ur=n(46497),zr=n(23235),Wr=n(44414);const Vr=(0,zr.A)((0,Wr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddCircle"),Hr=(0,zr.A)((0,Wr.jsx)("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m5 11H7v-2h10z"}),"RemoveCircle"),Gr=(0,zr.A)((0,Wr.jsx)("path",{d:"M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2m0 16H8V7h11z"}),"ContentCopyOutlined"),qr=(0,zr.A)((0,Wr.jsx)("path",{d:"m19 8-4 4h3c0 3.31-2.69 6-6 6-1.01 0-1.97-.25-2.8-.7l-1.46 1.46C8.97 19.54 10.43 20 12 20c4.42 0 8-3.58 8-8h3zM6 12c0-3.31 2.69-6 6-6 1.01 0 1.97.25 2.8.7l1.46-1.46C15.03 4.46 13.57 4 12 4c-4.42 0-8 3.58-8 8H1l4 4 4-4z"}),"CachedOutlined");var Yr=n(18160),Kr=n(82053),Xr=n(98587),$r=n(58168),Qr=n(72004),Zr=n(57661),Jr=n(74061),eo=n(99269),to=n(59254),no=n(19608),ro=n(48283),oo=n(8079),io=n(61676),so=n(80863),ao=n(68483);function lo(e){return(0,ao.Ay)("MuiButton",e)}const co=(0,so.A)("MuiButton",["root","text","textInherit","textPrimary","textSecondary","textSuccess","textError","textInfo","textWarning","outlined","outlinedInherit","outlinedPrimary","outlinedSecondary","outlinedSuccess","outlinedError","outlinedInfo","outlinedWarning","contained","containedInherit","containedPrimary","containedSecondary","containedSuccess","containedError","containedInfo","containedWarning","disableElevation","focusVisible","disabled","colorInherit","colorPrimary","colorSecondary","colorSuccess","colorError","colorInfo","colorWarning","textSizeSmall","textSizeMedium","textSizeLarge","outlinedSizeSmall","outlinedSizeMedium","outlinedSizeLarge","containedSizeSmall","containedSizeMedium","containedSizeLarge","sizeMedium","sizeSmall","sizeLarge","fullWidth","startIcon","endIcon","icon","iconSizeSmall","iconSizeMedium","iconSizeLarge"]);const uo=Br.createContext({});const ho=Br.createContext(void 0),po=["children","color","component","className","disabled","disableElevation","disableFocusRipple","endIcon","focusVisibleClassName","fullWidth","size","startIcon","type","variant"],fo=e=>(0,$r.A)({},"small"===e.size&&{"& > *:nth-of-type(1)":{fontSize:18}},"medium"===e.size&&{"& > *:nth-of-type(1)":{fontSize:20}},"large"===e.size&&{"& > *:nth-of-type(1)":{fontSize:22}}),mo=(0,to.Ay)(oo.A,{shouldForwardProp:e=>(0,no.A)(e)||"classes"===e,name:"MuiButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,io.A)(n.color))],t["size".concat((0,io.A)(n.size))],t["".concat(n.variant,"Size").concat((0,io.A)(n.size))],"inherit"===n.color&&t.colorInherit,n.disableElevation&&t.disableElevation,n.fullWidth&&t.fullWidth]}})((e=>{let{theme:t,ownerState:n}=e;var r,o;const i="light"===t.palette.mode?t.palette.grey[300]:t.palette.grey[800],s="light"===t.palette.mode?t.palette.grey.A100:t.palette.grey[700];return(0,$r.A)({},t.typography.button,{minWidth:64,padding:"6px 16px",borderRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create(["background-color","box-shadow","border-color","color"],{duration:t.transitions.duration.short}),"&:hover":(0,$r.A)({textDecoration:"none",backgroundColor:t.vars?"rgba(".concat(t.vars.palette.text.primaryChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,eo.X4)(t.palette.text.primary,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"text"===n.variant&&"inherit"!==n.color&&{backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,eo.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"outlined"===n.variant&&"inherit"!==n.color&&{border:"1px solid ".concat((t.vars||t).palette[n.color].main),backgroundColor:t.vars?"rgba(".concat(t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,eo.X4)(t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"contained"===n.variant&&{backgroundColor:t.vars?t.vars.palette.Button.inheritContainedHoverBg:s,boxShadow:(t.vars||t).shadows[4],"@media (hover: none)":{boxShadow:(t.vars||t).shadows[2],backgroundColor:(t.vars||t).palette.grey[300]}},"contained"===n.variant&&"inherit"!==n.color&&{backgroundColor:(t.vars||t).palette[n.color].dark,"@media (hover: none)":{backgroundColor:(t.vars||t).palette[n.color].main}}),"&:active":(0,$r.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[8]}),["&.".concat(co.focusVisible)]:(0,$r.A)({},"contained"===n.variant&&{boxShadow:(t.vars||t).shadows[6]}),["&.".concat(co.disabled)]:(0,$r.A)({color:(t.vars||t).palette.action.disabled},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.action.disabledBackground)},"contained"===n.variant&&{color:(t.vars||t).palette.action.disabled,boxShadow:(t.vars||t).shadows[0],backgroundColor:(t.vars||t).palette.action.disabledBackground})},"text"===n.variant&&{padding:"6px 8px"},"text"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main},"outlined"===n.variant&&{padding:"5px 15px",border:"1px solid currentColor"},"outlined"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].main,border:t.vars?"1px solid rgba(".concat(t.vars.palette[n.color].mainChannel," / 0.5)"):"1px solid ".concat((0,eo.X4)(t.palette[n.color].main,.5))},"contained"===n.variant&&{color:t.vars?t.vars.palette.text.primary:null==(r=(o=t.palette).getContrastText)?void 0:r.call(o,t.palette.grey[300]),backgroundColor:t.vars?t.vars.palette.Button.inheritContainedBg:i,boxShadow:(t.vars||t).shadows[2]},"contained"===n.variant&&"inherit"!==n.color&&{color:(t.vars||t).palette[n.color].contrastText,backgroundColor:(t.vars||t).palette[n.color].main},"inherit"===n.color&&{color:"inherit",borderColor:"currentColor"},"small"===n.size&&"text"===n.variant&&{padding:"4px 5px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"text"===n.variant&&{padding:"8px 11px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"outlined"===n.variant&&{padding:"3px 9px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"outlined"===n.variant&&{padding:"7px 21px",fontSize:t.typography.pxToRem(15)},"small"===n.size&&"contained"===n.variant&&{padding:"4px 10px",fontSize:t.typography.pxToRem(13)},"large"===n.size&&"contained"===n.variant&&{padding:"8px 22px",fontSize:t.typography.pxToRem(15)},n.fullWidth&&{width:"100%"})}),(e=>{let{ownerState:t}=e;return t.disableElevation&&{boxShadow:"none","&:hover":{boxShadow:"none"},["&.".concat(co.focusVisible)]:{boxShadow:"none"},"&:active":{boxShadow:"none"},["&.".concat(co.disabled)]:{boxShadow:"none"}}})),go=(0,to.Ay)("span",{name:"MuiButton",slot:"StartIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.startIcon,t["iconSize".concat((0,io.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,$r.A)({display:"inherit",marginRight:8,marginLeft:-4},"small"===t.size&&{marginLeft:-2},fo(t))})),vo=(0,to.Ay)("span",{name:"MuiButton",slot:"EndIcon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.endIcon,t["iconSize".concat((0,io.A)(n.size))]]}})((e=>{let{ownerState:t}=e;return(0,$r.A)({display:"inherit",marginRight:-4,marginLeft:8},"small"===t.size&&{marginRight:-2},fo(t))})),yo=Br.forwardRef((function(e,t){const n=Br.useContext(uo),r=Br.useContext(ho),o=(0,Zr.A)(n,e),i=(0,ro.A)({props:o,name:"MuiButton"}),{children:s,color:a="primary",component:l="button",className:c,disabled:u=!1,disableElevation:d=!1,disableFocusRipple:h=!1,endIcon:p,focusVisibleClassName:f,fullWidth:m=!1,size:g="medium",startIcon:v,type:y,variant:b="text"}=i,w=(0,Xr.A)(i,po),_=(0,$r.A)({},i,{color:a,component:l,disabled:u,disableElevation:d,disableFocusRipple:h,fullWidth:m,size:g,type:y,variant:b}),x=(e=>{const{color:t,disableElevation:n,fullWidth:r,size:o,variant:i,classes:s}=e,a={root:["root",i,"".concat(i).concat((0,io.A)(t)),"size".concat((0,io.A)(o)),"".concat(i,"Size").concat((0,io.A)(o)),"color".concat((0,io.A)(t)),n&&"disableElevation",r&&"fullWidth"],label:["label"],startIcon:["icon","startIcon","iconSize".concat((0,io.A)(o))],endIcon:["icon","endIcon","iconSize".concat((0,io.A)(o))]},l=(0,Jr.A)(a,lo,s);return(0,$r.A)({},s,l)})(_),S=v&&(0,Wr.jsx)(go,{className:x.startIcon,ownerState:_,children:v}),A=p&&(0,Wr.jsx)(vo,{className:x.endIcon,ownerState:_,children:p}),C=r||"";return(0,Wr.jsxs)(mo,(0,$r.A)({ownerState:_,className:(0,Qr.A)(n.className,x.root,c,C),component:l,disabled:u,focusRipple:!h,focusVisibleClassName:(0,Qr.A)(x.focusVisible,f),ref:t,type:y},w,{classes:x,children:[S,s,A]}))}));var bo=n(67261),wo=n(32448),_o=n(14857),xo=n(70576),So=n(31506);const Ao=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],Co={entering:{transform:"none"},entered:{transform:"none"}},ko=Br.forwardRef((function(e,t){const n=(0,_o.A)(),r={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:o,appear:i=!0,children:s,easing:a,in:l,onEnter:c,onEntered:u,onEntering:d,onExit:h,onExited:p,onExiting:f,style:m,timeout:g=r,TransitionComponent:v=wo.Ay}=e,y=(0,Xr.A)(e,Ao),b=Br.useRef(null),w=(0,So.A)(b,s.ref,t),_=e=>t=>{if(e){const n=b.current;void 0===t?e(n):e(n,t)}},x=_(d),S=_(((e,t)=>{(0,xo.q)(e);const r=(0,xo.c)({style:m,timeout:g,easing:a},{mode:"enter"});e.style.webkitTransition=n.transitions.create("transform",r),e.style.transition=n.transitions.create("transform",r),c&&c(e,t)})),A=_(u),C=_(f),k=_((e=>{const t=(0,xo.c)({style:m,timeout:g,easing:a},{mode:"exit"});e.style.webkitTransition=n.transitions.create("transform",t),e.style.transition=n.transitions.create("transform",t),h&&h(e)})),E=_(p);return(0,Wr.jsx)(v,(0,$r.A)({appear:i,in:l,nodeRef:b,onEnter:S,onEntered:A,onEntering:x,onExit:k,onExited:E,onExiting:C,addEndListener:e=>{o&&o(b.current,e)},timeout:g},y,{children:(e,t)=>Br.cloneElement(s,(0,$r.A)({style:(0,$r.A)({transform:"scale(0)",visibility:"exited"!==e||l?void 0:"hidden"},Co[e],m,s.props.style),ref:w},t))}))}));var Eo,To,Oo,Mo,Po=n(99986);const Ro="onStateChanged",No="onRefresh";let Io=(0,Fr.Wn)((To=class e extends Fr.yC{getFactory(){return e.factory}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,Wr.jsx)(Lo,{engine:e,size:50,machine:t.machine}),getType:()=>Fr.OB.WebRTC,getName:()=>"EmittingRemote",getTooltip:()=>"Reads messages and send them to a remote location",getMachineCode:()=>"emitrtc"}),this.factory}getState(){return this.config}dispose(){var e;null===(e=this.peer)||void 0===e||e.destroy()}addChannel(){this.config={...this.config,channels:this.config.channels+1},this.getNode().addMachineInPort("Channel "+this.config.channels,this.config.channels),this.send(this.config.channels)}removeChannel(){const e=this.getNode().getPort("Channel "+this.config.channels);void 0!=e&&(this.getNode().removePort(e),this.config={...this.config,channels:this.config.channels-1},this.send(this.config.channels))}setConnectionStatus(e){this.connectionStatus=e,this.dispatchEvent(this.onStatusChanged)}constructor(e){super(),this.config=void 0,this.peer=void 0,this.onStatusChanged=new Event(Ro),this.connectionStatus=void 0,this.connections=new Set,this.config=null!==e&&void 0!==e?e:{channels:1,dataChannelName:window.prompt("pick a unique name"),targetChannelName:void 0};for(let t=0;t{e.on("iceStateChanged",(e=>{"disconnected"===e||"closed"===e||"failed"===e?s.setConnectionStatus({...s.connectionStatus,error:e,status:"ice disconnected"}):s.setConnectionStatus({...s.connectionStatus,error:void 0})})),e.on("error",(t=>{this.connections.delete(e),s.setConnectionStatus({...s.connectionStatus,error:t.message,connections:s.connectionStatus.connections-1})})),e.on("open",(()=>{this.connections.add(e),this.send(s.config.channels),s.setConnectionStatus({...s.connectionStatus,error:void 0,connections:s.connectionStatus.connections+1,status:"connected"})})),e.on("close",(()=>{this.connections.delete(e),s.setConnectionStatus({...s.connectionStatus,error:void 0,connections:s.connectionStatus.connections-1,status:s.connections.size>1?"connected":"waiting"})}))}))}send(e){for(const t of this.connections)t.send(e)}receive(e,t){if(this.connections.size>0){const n={type:e.type,message:{rawData:e.message.rawData,isChannelMessage:e.message.isChannelMessage,type:e.message.type,channel:e.message.channel}};return this.send({messageEvent:n,channel:t}),Fr.LB.Processed}return Fr.LB.Ignored}},To.factory=void 0,Eo=To))||Eo;const Lo=e=>{const[t,n]=Br.useState(e.machine.connectionStatus),[r,o]=Br.useState(!1),[i,s]=Br.useState(e.machine.getState().channels);Br.useEffect((()=>{e.machine.addEventListener(Ro,(()=>{n(e.machine.connectionStatus)}))}),[e.machine]);const a=void 0==t.error?void 0:(0,Wr.jsx)(Yr.A,{severity:"error",children:t.error});return(0,Wr.jsxs)(Ur.S.SettingsBarHorizontal,{children:[(0,Wr.jsxs)(Ur.S.SettingsBarVertical,{children:[(0,Wr.jsxs)(Kr.A,{variant:"body2",align:"center",children:[(0,Wr.jsx)(yo,{size:"small",onClick:()=>{e.machine.addChannel(),e.engine.repaintCanvas(),s(e.machine.getState().channels)},children:(0,Wr.jsx)(Vr,{fontSize:"small"})}),(0,Wr.jsx)(yo,{disabled:1===i,size:"small",onClick:()=>{e.machine.removeChannel(),e.engine.repaintCanvas(),s(e.machine.getState().channels)},children:(0,Wr.jsx)(Hr,{fontSize:"small"})})]}),(0,Wr.jsxs)(Ur.S.SettingsBarHorizontal,{children:[(0,Wr.jsx)(bo.A,{PopperProps:{disablePortal:!0},open:r,disableFocusListener:!0,disableHoverListener:!0,disableTouchListener:!0,followCursor:!0,title:"Copied!",TransitionComponent:ko,children:(0,Wr.jsxs)(Kr.A,{variant:"h6",align:"center",children:["<"+e.machine.getState().dataChannelName+">",(0,Wr.jsx)(yo,{onClick:()=>{navigator.clipboard.writeText(e.machine.getState().dataChannelName),o(!0),setTimeout((()=>{o(!1)}),1e3)},children:(0,Wr.jsx)(Gr,{})})]})}),(0,Wr.jsxs)(Kr.A,{variant:"body2",align:"center",children:[t.connections," connected"]}),(0,Wr.jsx)(Kr.A,{variant:"body2",align:"center",children:t.status}),(0,Wr.jsxs)(yo,{onClick:()=>{e.machine.initPeer()},children:[(0,Wr.jsx)(Kr.A,{variant:"body2",align:"center",children:"Reconnect"}),(0,Wr.jsx)(qr,{})]})]})]}),a]})};let Do=(0,Fr.Wn)((Mo=class e extends Fr.yC{getFactory(){return e.factory}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,Wr.jsx)(jo,{engine:e,size:50,machine:t.machine}),getType:()=>Fr.OB.WebRTC,getName:()=>"ReceivingRemote",getTooltip:()=>"Receives message from remote location",getMachineCode:()=>"receivertc"}),this.factory}getState(){return this.config}dispose(){var e;null===(e=this.peer)||void 0===e||e.destroy()}setConnectionStatus(e){this.connectionStatus=e,this.dispatchEvent(this.onStatusChanged)}constructor(e){var t;super(),this.config=void 0,this.peer=void 0,this.onStatusChanged=new Event(Ro),this.onRefresh=new Event(No),this.connectionStatus=void 0,this.config=null!==e&&void 0!==e?e:{channels:1,dataChannelName:jr(),targetChannelName:null!==(t=window.prompt("target name ?"))&&void 0!==t?t:void 0},this.getNode().addMachineOutPort(Po.fT,0);for(let n=0;n{var t;s.setConnectionStatus({...s.connectionStatus,status:"waiting"});const n=i.connect(null!==(t=s.config.targetChannelName)&&void 0!==t?t:window.prompt("target name?"),{reliable:!0});s.setConnectionStatus({...s.connectionStatus,error:void 0,status:"connecting..."}),n.on("iceStateChanged",(e=>{"disconnected"===e||"closed"===e||"failed"===e?s.setConnectionStatus({...s.connectionStatus,error:e,status:"ice disconnected"}):s.setConnectionStatus({...s.connectionStatus,error:void 0})})),n.on("close",(()=>{s.setConnectionStatus({...s.connectionStatus,error:"closed",status:"disconnected"})})),n.on("error",(e=>{s.setConnectionStatus({...s.connectionStatus,error:e.message})})),n.on("open",(()=>{s.setConnectionStatus({...s.connectionStatus,error:void 0,status:"connected"})})),n.on("data",(e=>{const t=e.messageEvent;if(void 0!=t){const n=t.message.rawData;t.message.rawData=new Uint8Array(n),this.emit(t,e.channel)}else if(Number.isFinite(e)){const t=e+1;for(;tthis.getNode().getOutPorts().length;)this.getNode().addMachineOutPort("Channel "+this.getNode().getOutPorts().length,this.getNode().getOutPorts().length);this.dispatchEvent(this.onRefresh)}else console.warn("unknown RTC message\n"+JSON.stringify(e))}))}))}},Mo.factory=void 0,Oo=Mo))||Oo;const jo=e=>{const[t,n]=Br.useState(e.machine.connectionStatus);Br.useEffect((()=>{const t=()=>{n(e.machine.connectionStatus)};e.machine.addEventListener(Ro,t);const r=()=>{e.engine.repaintCanvas()};return e.machine.addEventListener(No,r),()=>{e.machine.removeEventListener(Ro,t),e.machine.removeEventListener(No,r)}}),[e.machine,e.engine]);const r=void 0==t.error?void 0:(0,Wr.jsx)(Yr.A,{severity:"error",children:t.error});return(0,Wr.jsxs)(Ur.S.SettingsBarHorizontal,{children:[(0,Wr.jsx)(Kr.A,{variant:"h6",align:"center",children:"target: <"+e.machine.getState().targetChannelName+">"}),(0,Wr.jsx)(Kr.A,{variant:"body2",align:"center",children:t.status}),(0,Wr.jsxs)(yo,{onClick:()=>{e.machine.initPeer()},children:[(0,Wr.jsx)(Kr.A,{variant:"body2",align:"center",children:"Reset"}),(0,Wr.jsx)(qr,{})]}),r]})}},39444:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ThruMachine:()=>g});var r,o,i=n(9950),s=n(58747),a=n(31902),l=n(25333),c=n(1183),u=n(60123),d=n(46497),h=n(77910),p=n(802),f=n(30321),m=n(44414);let g=(0,h.Wn)((o=class e extends h.yC{getFactory(){return e.factory}constructor(e){super(),this.config=void 0,this.config=null!==e&&void 0!==e?e:{detune:0,filterType:"none",filters:[],currentCategory:void 0,currentSubcategory:void 0,logSize:10},this.getNode().addMachineOutPort("Out",0),this.getNode().addMachineInPort("In",0)}getState(){return this.config}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,m.jsx)(v,{engine:e,size:50,machine:t.machine}),getName:()=>"Thru",getType:()=>h.OB.Processor,getTooltip:()=>"Reads all MIDI messages, can apply a detune to any incoming NOTEON message as well as filtering specific MIDI messages",getMachineCode:()=>"thru"}),this.factory}setState(e){e.detune!==this.config.detune&&this.emit(p.l8.allnotesoff,0),this.config=e}isFiltered(e){if("none"===this.config.filterType)return!1;for(let t=0;t{var t,n;const[r,o]=i.useState(e.machine.getState()),[h,g]=i.useState([]),v=t=>{e.machine.setState(t),o(t)};function y(e,t,n){const o="create"===n?(0,m.jsx)(l.A,{"aria-label":"add filter",color:"primary",size:"small",disabled:void 0==r.currentCategory&&void 0==r.currentSubcategory,onClick:()=>{const e={Category:r.currentCategory,Subcategory:r.currentSubcategory};v({...r,filters:r.filters.concat(e),currentCategory:void 0,currentSubcategory:void 0})},children:(0,m.jsx)(s.A,{fontSize:"small"})}):(0,m.jsx)(l.A,{"aria-label":"delete filter",color:"primary",size:"small",onClick:()=>{r.filters.splice(n,1),v({...r,filters:r.filters})},children:(0,m.jsx)(a.A,{fontSize:"small"})}),i="create"!==n;return(0,m.jsxs)(d.S.SettingsBarVertical,{children:[(0,m.jsx)(c.A,{value:void 0==e?"":e,type:"number",size:"small",autoComplete:"false",autoCorrect:"false",onChange:e=>"create"===n?v({...r,currentCategory:parseInt(e.target.value)<1?void 0:parseInt(e.target.value)}):void 0,InputProps:{style:{fontSize:"12px",color:"white",height:"20px",width:"80px"},readOnly:i}}),(0,m.jsx)(c.A,{value:void 0==t?"":t,type:"number",size:"small",onChange:e=>"create"===n?v({...r,currentSubcategory:parseInt(e.target.value)<1?void 0:parseInt(e.target.value)}):void 0,InputProps:{style:{fontSize:"12px",color:"white",height:"20px",width:"80px"},readOnly:i}}),o]},n)}i.useEffect((()=>{const t=e=>{const t=e.detail;for(h.push(t);h.length>(null!==(n=r.logSize)&&void 0!==n?n:10);){var n;h.shift()}g([...h])};return e.machine.addEventListener(p.kP,t),()=>{e.machine.removeEventListener(p.kP,t)}}),[e.machine,r.logSize]);const b=r.filters.map(((e,t)=>y(e.Category,e.Subcategory,t))),w=h.map(((e,t)=>{var n;const r="".concat(e.accepted?"\u2714\ufe0f":"\u274c").concat((null!==(n=e.message.type)&&void 0!==n?n:e.message.type).padEnd(12).substring(0,12)," ").concat((e=>{var t,n,r,o;return"".concat(e[0].toString().padStart(3,"0"),"-").concat(null!==(t=null===(n=e[1])||void 0===n?void 0:n.toString().padStart(3,"0"))&&void 0!==t?t:"N/A","-").concat(null!==(r=null===(o=e[2])||void 0===o?void 0:o.toString().padStart(3,"0"))&&void 0!==r?r:"N/A")})(e.message.rawData).padEnd(12).substring(0,12)," #").concat(e.message.channel);return(0,m.jsx)("pre",{children:(0,m.jsx)(d.S.ConsoleLogEntry,{children:r})},t)})),[_,x]=i.useState(!1),[S,A]=i.useState(!1),C=_?"\u25b2":"\u25bc",k=S?"\u25b2":"\u25bc";return(0,m.jsxs)(d.S.SettingsBar,{children:[(0,m.jsxs)(d.S.Slider,{children:[(0,m.jsxs)("span",{children:["Detune (",r.detune,")"]}),(0,m.jsx)("input",{type:"range",min:"-12.0",max:"12.0",step:"1",value:r.detune,onChange:e=>{v({...r,detune:Number(e.target.value)})},list:"detunes",name:"detune"}),(0,m.jsxs)("datalist",{id:"detunes",children:[(0,m.jsx)("option",{value:"-12.0",label:"-1 octave"}),(0,m.jsx)("option",{value:"0",label:"Normal"}),(0,m.jsx)("option",{value:"12.0",label:"+1 octave"})]})]}),"MIDI Filtering:",b,y(r.currentCategory,r.currentSubcategory,"create"),(0,m.jsxs)(d.S.Dropdown,{children:[(0,m.jsx)("span",{children:"filtering type: "}),(0,m.jsxs)("select",{name:"filterType",value:r.filterType,onChange:e=>{v({...r,filterType:e.target.value})},children:[(0,m.jsx)("option",{value:"none",children:"None"}),(0,m.jsx)("option",{value:"allows",children:"Allows"}),(0,m.jsx)("option",{value:"denies",children:"Denies"})]})]}),(0,m.jsxs)(d.S.ExpandButton,{open:_,onClick:()=>{x(!_)},children:[C," Vizualization ",C]}),(0,m.jsx)(d.S.InternalWrapper,{open:_,children:(0,m.jsx)(f.V,{width:200,height:200,midiMessageEmitter:e.machine})}),(0,m.jsxs)(d.S.ExpandButton,{open:S,onClick:()=>{A(!S)},children:[k," Message logs ",k]}),(0,m.jsxs)(d.S.InternalWrapper,{open:S,children:[(null!==(t=r.logSize)&&void 0!==t?t:10)+" max messages",(0,m.jsx)(u.Ay,{"aria-label":"MaxMessages",min:1,max:100,size:"small",onChange:(e,t)=>{"number"===typeof t&&v({...r,logSize:t})},value:null!==(n=r.logSize)&&void 0!==n?n:10}),(0,m.jsx)(d.S.ConsoleLog,{children:(0,m.jsx)(m.Fragment,{children:w})})]})]})}},87100:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ToneJsSampleMachine:()=>g});var r,o,i,s=n(9950),a=n(55076),l=n(46497),c=n(77910),u=n(802),d=n(30321),h=n(44414);function p(e){switch(e){case"Drum":return{urls:{B1:"kick.mp3",C2:"kick.mp3",D2:"snare.mp3","F#2":"hihat.mp3","G#2":"hihat.mp3","A#2":"hihat.mp3"},release:10,baseUrl:"https://tonejs.github.io/audio/drum-samples/CR78/"};case"Kalimba":return{urls:{G3:"Kalimba_1.mp3"},release:10,baseUrl:"https://tonejs.github.io/audio/berklee/"};case"Guitar":return{urls:{A2:"guitar_Astring.mp3"},release:10,baseUrl:"https://tonejs.github.io/audio/berklee/"};default:return function(e){const t=function(e){switch(e){case"bassoon":case"cello":case"flute":case"french-horn":case"guitar-acoustic":case"guitar-electric":case"harmonium":case"organ":case"piano":case"saxophone":case"trombone":case"trumpet":case"violin":return"C4";case"guitar-nylon":case"harp":return"A4";case"bass-electric":case"contrabass":return"E3";case"tuba":case"clarinet":return"D3";case"xylophone":return"C5";default:return"A3"}}(e);return{urls:{[t]:t+".mp3"},release:5,baseUrl:f+e+"/"}}(e)}}const f="https://nbrosowsky.github.io/tonejs-instruments/samples/";const m=["Drum","Kalimba","Guitar","bass-electric","bassoon","cello","clarinet","contrabass","flute","french-horn","guitar-acoustic","guitar-electric","guitar-nylon","harmonium","harp","organ","piano","saxophone","trombone","trumpet","tuba","violin","xylophone"];let g=(r=(0,c.JO)("Drum"),(0,c.Wn)(o=r((i=class e extends c.yC{constructor(e){var t,n;super(),this.sampler=void 0,this.config=void 0,this.analyzer=void 0,this.volume=void 0,this.gainForAnalyser=void 0,this.config=e,this.sampler=new a.LC(p(null!==(t=e.sample)&&void 0!==t?t:"Drum")),this.volume=new a.fS,this.sampler.connect(this.volume),this.volume.volume.value=null!==(n=this.config.volume)&&void 0!==n?n:-15,this.volume.mute=-30===this.config.volume,this.analyzer=a._O.createAnalyser(),this.gainForAnalyser=a._O.createGain(),this.gainForAnalyser.connect(this.analyzer),this.gainForAnalyser.gain.value=1,this.sampler.connect(this.gainForAnalyser),this.volume.toDestination(),this.getNode().addMachineInPort("In",1)}setState(e){if(e.sample!==this.config.sample){const t=new a.LC(p(e.sample));this.sampler.dispose(),this.sampler=t.connect(this.volume),this.sampler.connect(this.gainForAnalyser)}this.volume.volume.value=e.volume,this.volume.mute=-30===e.volume,this.config=e}getState(){return this.config}dispose(){this.sampler.releaseAll(),this.sampler.disconnect(),this.sampler.dispose()}static buildFactory(t){if(void 0==t&&this.factory)return this.factory;if(void 0!=t&&void 0!=this.factories[t])return this.factories[t];const n={createMachine:n=>new e(null!==n&&void 0!==n?n:{sample:null!==t&&void 0!==t?t:"Guitar",volume:-15}),createWidget:(e,t)=>(0,h.jsx)(v,{engine:e,size:50,machine:t.machine}),getName:()=>"ToneJsSample"+(void 0==t?"":" ("+t+")"),getType:()=>c.OB.Output,getTooltip:()=>"Reads MIDI notes and emits sound",getMachineCode:()=>"sample"};return void 0==t?this.factory=n:this.factories[t]=n,n}getFactory(){return e.factory}receive(e,t){if(!this.sampler.loaded)return c.LB.Ignored;if(this.sampler.disposed)return c.LB.Ignored;switch(a._O.lookAhead=0,e.type){case"stop":case"allnotesoff":case"allsoundoff":return this.sampler.releaseAll(),c.LB.Processed;case"noteon":return 0===e.message.rawData[2]?this.sampler.triggerRelease((0,u.q8)(e.message.rawData[1])):this.sampler.triggerAttack((0,u.q8)(e.message.rawData[1]),a._O.currentTime,(0,u.TC)(e.message.rawData[2])),c.LB.Processed;case"noteoff":return this.sampler.triggerRelease((0,u.q8)(e.message.rawData[1])),c.LB.Processed}return c.LB.Ignored}getInChannelCount(){return 1}},i.factory=void 0,i.factories={},o=i))||o)||o);const v=e=>{const[t,n]=s.useState(e.machine.getState());function r(t){e.machine.setState(t),n(e.machine.getState())}return(0,h.jsxs)(l.S.SettingsBar,{children:[(0,h.jsxs)(l.S.Slider,{children:[(0,h.jsx)("span",{children:"Volume: "}),(0,h.jsx)("input",{type:"range",min:"-30.0",max:"5",step:"0.5",value:t.volume,onChange:e=>{r({...t,volume:Number(e.target.value)})},list:"volumes",name:"volume"})]}),(0,h.jsx)(d.I,{width:200,height:50,analyser:e.machine.analyzer}),(0,h.jsxs)(l.S.Dropdown,{children:[(0,h.jsx)("span",{children:"Preset: "}),(0,h.jsx)("select",{name:"sampleSelection",value:t.sample,onChange:e=>{r({...t,sample:e.target.value})},children:m.map((e=>(0,h.jsx)("option",{value:e,children:e},e)))})]})]})}},87784:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ToneJsSynthMachine:()=>h});var r,o,i=n(9950),s=n(55076),a=n(46497),l=n(802),c=n(77910),u=n(30321),d=n(44414);let h=(0,c.Wn)((o=class e extends c.yC{getState(){return this.config}setState(e){if(e.voice!==this.config.voice){this.synth.dispose();const t=new s.Bh(s.Pe,e.voice);this.synth=t.connect(this.destination),this.synth.connect(this.gainForAnalyser)}this.destination.volume.value=e.volume,this.destination.mute=-10===e.volume,this.config=e}constructor(e){super(),this.synth=void 0,this.config=void 0,this.destination=void 0,this.analyzer=void 0,this.gainForAnalyser=void 0,this.destination=new s.fS,this.config=null!==e&&void 0!==e?e:f[0],void 0==this.config.volume&&(this.config={...this.config,volume:5}),this.destination.volume.value=this.config.volume,this.synth=new s.Bh(s.Pe,this.config.voice),this.synth.connect(this.destination),this.analyzer=s._O.createAnalyser(),this.gainForAnalyser=s._O.createGain(),this.synth.connect(this.gainForAnalyser),this.gainForAnalyser.connect(this.analyzer),this.gainForAnalyser.gain.value=10,this.destination.toDestination(),this.getNode().addMachineInPort("In",1)}static buildFactory(){return this.factory||(this.factory={createMachine:t=>new e(t),createWidget:(e,t)=>(0,d.jsx)(p,{engine:e,size:50,machine:t.machine}),getName:()=>"ToneJsSynth",getType:()=>c.OB.Output,getTooltip:()=>"Reads MIDI notes and emits sound",getMachineCode:()=>"tonejssynth"}),this.factory}dispose(){this.synth.releaseAll(),this.synth.disconnect(),this.synth.dispose()}getFactory(){return e.factory}receive(e,t){if(this.synth.disposed)return c.LB.Ignored;switch(e.type){case"stop":case"allnotesoff":case"allsoundoff":return this.synth.releaseAll(),c.LB.Processed;case"noteon":return 0===e.message.rawData[2]?this.synth.triggerRelease((0,l.q8)(e.message.rawData[1])):this.synth.triggerAttack((0,l.q8)(e.message.rawData[1]),s._O.currentTime,(0,l.TC)(e.message.rawData[2])),c.LB.Processed;case"noteoff":return this.synth.triggerRelease((0,l.q8)(e.message.rawData[1])),c.LB.Processed}return c.LB.Ignored}getInChannelCount(){return 1}},o.factory=void 0,r=o))||r;const p=e=>{const[t,n]=i.useState({inError:!1,voiceConfig:e.machine.getState(),editVoice:JSON.stringify(e.machine.getState().voice,null,2)}),[r,o]=i.useState(!1);function s(r,o){let i=!0;try{const n={preset:o,voice:JSON.parse(r),volume:t.voiceConfig.volume};e.machine.setState(n),i=!1}catch{}const s={voiceConfig:e.machine.getState(),editVoice:r,inError:i};n(s)}const l=i.useRef(null);((e,t)=>{i.useEffect((()=>{if(e){e.style.height="0px";const t=e.scrollHeight;e.style.height=t+"px",e.style.width="0px";const n=e.scrollWidth+5;e.style.width=n+"px"}}),[e,t])})(l.current,t.editVoice);const c=r?"\u25b2":"\u25bc";return(0,d.jsxs)(a.S.SettingsBar,{children:[(0,d.jsxs)(a.S.Slider,{children:[(0,d.jsx)("span",{children:"Volume: "}),(0,d.jsx)("input",{type:"range",min:"-10.0",max:"30",step:"0.5",value:t.voiceConfig.volume,onChange:r=>{!function(r){let o={...t,voiceConfig:{...t.voiceConfig,volume:r}};e.machine.setState(o.voiceConfig),n(o)}(Number(r.target.value))},list:"volumes",name:"volume"})]}),(0,d.jsx)(u.I,{width:200,height:50,analyser:e.machine.analyzer}),(0,d.jsxs)(a.S.ExpandButton,{open:r,onClick:()=>{o(!r)},children:[c," Edit ",t.voiceConfig.preset," ",c]}),(0,d.jsxs)(a.S.InternalWrapper,{open:r,children:[(0,d.jsxs)(a.S.Dropdown,{children:[(0,d.jsx)("span",{children:"Preset: "}),(0,d.jsx)("select",{name:"waveform",value:t.voiceConfig.preset,onChange:e=>{var t;"Custom"!==(t=e.target.value)&&s(JSON.stringify(f.filter((e=>e.preset===t))[0].voice,null,2),t)},children:f.map((e=>(0,d.jsx)("option",{value:e.preset,children:e.preset},e.preset)))})]}),(0,d.jsx)(a.S.VoiceInput,{inError:t.inError,value:t.editVoice,onChange:e=>s(e.target.value,"Custom"),spellCheck:!1,ref:l,onKeyDown:e=>{e.stopPropagation()}})]}),(0,d.jsx)("button",{onClick:()=>{s(JSON.stringify(t.voiceConfig.voice,null,2),t.voiceConfig.preset)},disabled:!t.inError,children:"Reset"})]})},f=[{volume:5,preset:"Default",voice:{detune:0,portamento:0,harmonicity:2.5,oscillator:{partialCount:0,partials:[],phase:0,type:"fatsawtooth",count:3,spread:20},envelope:{attack:.1,attackCurve:"linear",decay:.2,decayCurve:"exponential",release:.3,releaseCurve:"exponential",sustain:.2},modulation:{partialCount:0,partials:[],phase:0,type:"square"},modulationEnvelope:{attack:.5,attackCurve:"linear",decay:.01,decayCurve:"exponential",release:.5,releaseCurve:"exponential",sustain:1}}},{volume:5,preset:"Harmonics",voice:{harmonicity:3.999,oscillator:{type:"square"},envelope:{attack:.03,decay:.3,sustain:.7,release:.8},modulation:{volume:12,type:"square6"},modulationEnvelope:{attack:2,decay:3,sustain:.8,release:.1}}},{volume:5,preset:"Tiny",voice:{harmonicity:2,oscillator:{type:"amsine2",modulationType:"sine",harmonicity:1.01},envelope:{attack:.006,decay:4,sustain:.04,release:1.2},modulation:{volume:13,type:"amsine2",modulationType:"sine",harmonicity:12},modulationEnvelope:{attack:.006,decay:.2,sustain:.2,release:.4}}},{volume:5,preset:"Bah",voice:{volume:10,oscillator:{type:"sawtooth"},filter:{Q:2,type:"bandpass",rolloff:-24},envelope:{attack:.01,decay:.1,sustain:.2,release:.6},filterEnvelope:{attack:.02,decay:.4,sustain:1,release:.7,releaseCurve:"linear",baseFrequency:20,octaves:5}}},{volume:5,preset:"BassGuitar",voice:{oscillator:{type:"fmsquare5",modulationType:"triangle",modulationIndex:2,harmonicity:.501},filter:{Q:1,type:"lowpass",rolloff:-24},envelope:{attack:.01,decay:.1,sustain:.4,release:2},filterEnvelope:{attack:.01,decay:.1,sustain:.8,release:1.5,baseFrequency:50,octaves:4.4}}},{volume:5,preset:"Bassy",voice:{portamento:.08,oscillator:{partials:[2,1,3,2,.4]},filter:{Q:4,type:"lowpass",rolloff:-48},envelope:{attack:.04,decay:.06,sustain:.4,release:1},filterEnvelope:{attack:.01,decay:.1,sustain:.6,release:1.5,baseFrequency:50,octaves:3.4}}},{volume:5,preset:"BrassCircuit",voice:{portamento:.01,oscillator:{type:"sawtooth"},filter:{Q:2,type:"lowpass",rolloff:-24},envelope:{attack:.1,decay:.1,sustain:.6,release:.5},filterEnvelope:{attack:.05,decay:.8,sustain:.4,release:1.5,baseFrequency:2e3,octaves:1.5}}},{volume:5,preset:"CoolGuy",voice:{oscillator:{type:"pwm",modulationFrequency:1},filter:{Q:6,rolloff:-24},envelope:{attack:.025,decay:.3,sustain:.9,release:2},filterEnvelope:{attack:.245,decay:.131,sustain:.5,release:2,baseFrequency:20,octaves:7.2,exponent:2}}},{volume:5,preset:"Pianoetta",voice:{oscillator:{type:"square"},filter:{Q:2,type:"lowpass",rolloff:-12},envelope:{attack:.005,decay:3,sustain:0,release:.45},filterEnvelope:{attack:.001,decay:.32,sustain:.9,release:3,baseFrequency:700,octaves:2.3}}},{volume:5,preset:"Pizz",voice:{oscillator:{type:"sawtooth"},filter:{Q:3,type:"highpass",rolloff:-12},envelope:{attack:.01,decay:.3,sustain:0,release:.9},filterEnvelope:{attack:.01,decay:.1,sustain:0,release:.1,baseFrequency:800,octaves:-1.2}}},{volume:5,preset:"AlienChorus",voice:{oscillator:{type:"fatsine4",spread:60,count:10},envelope:{attack:.4,decay:.01,sustain:1,attackCurve:"sine",releaseCurve:"sine",release:.4}}},{volume:5,preset:"DelicateWindPart",voice:{portamento:0,oscillator:{type:"square4"},envelope:{attack:2,decay:1,sustain:.2,release:2}}},{volume:5,preset:"DropPulse",voice:{oscillator:{type:"pulse",width:.8},envelope:{attack:.01,decay:.05,sustain:.2,releaseCurve:"bounce",release:.4}}},{volume:5,preset:"Lectric",voice:{portamento:.2,oscillator:{type:"sawtooth"},envelope:{attack:.03,decay:.1,sustain:.2,release:.02}}},{volume:5,preset:"Marimba",voice:{oscillator:{partials:[1,0,2,0,3]},envelope:{attack:.001,decay:1.2,sustain:0,release:1.2}}},{volume:5,preset:"Steelpan",voice:{oscillator:{type:"fatcustom",partials:[.2,1,0,.5,.1],spread:40,count:3},envelope:{attack:.001,decay:1.6,sustain:0,release:1.6}}},{volume:5,preset:"SuperSaw",voice:{oscillator:{type:"fatsawtooth",count:3,spread:30},envelope:{attack:.01,decay:.1,sustain:.5,release:.4,attackCurve:"exponential"}}},{volume:5,preset:"TreeTrunk",voice:{oscillator:{type:"sine"},envelope:{attack:.001,decay:.1,sustain:.1,release:1.2}}}]},30321:(e,t,n)=>{"use strict";n.d(t,{I:()=>c,V:()=>l});var r=n(9950),o=n(55076),i=n(46497),s=n(802),a=n(44414);const l=e=>{const t=r.useRef(null),[n,o]=r.useState({midiVizualizerOn:!0});return r.useEffect((()=>{var r,o;const i=null!==(r=null===(o=t.current)||void 0===o?void 0:o.getContext("2d"))&&void 0!==r?r:void 0;if(void 0==i)return;const a=e.width/2,l=e.height/2;let c,u,d=0,h=a,p=l,f=0;const m=e=>(f=(f+.1)%255,void 0==e?f:(e+f)%255),g=t=>{if(!n.midiVizualizerOn)return;const r=t.detail;if("noteoff"!==r.type){var o,s,f,g,v;i.beginPath(),i.lineWidth=i.lineWidth+10*Math.random()-5;const t=d*(Math.PI/180),n=((null!==(o=r.message.rawData[0])&&void 0!==o?o:0)+(null!==(s=r.message.rawData[1])&&void 0!==s?s:0)+(null!==(f=r.message.rawData[2])&&void 0!==f?f:0))/765,y=h+Math.cos(t)*e.width*n,b=p+Math.sin(t)*e.height*n;i.strokeStyle="rgb("+m(r.message.rawData[d+2])+" "+m(r.message.rawData[d+1])+" "+m(r.message.rawData[d%3])+")",i.lineTo(null!==(g=c)&&void 0!==g?g:y,null!==(v=u)&&void 0!==v?v:b),i.strokeStyle="rgb("+m(r.message.rawData[d%3])+" "+m(r.message.rawData[(d+1)%3])+" "+m(r.message.rawData[(d+2)%3])+")",i.lineTo(y,b),i.lineTo(y+10*Math.random()-5,b+10*Math.random()-5),c=a+y*(d%2===1?1:-1)+Math.random()*d,u=l+b*(d%2===0?1:-1)+Math.random()*d,h+=10*Math.random()-5,p+=10*Math.random()-5,h>e.width?h=0:h<0&&(h=e.width),p>e.height?p=0:p<0&&(p=e.height),i.stroke()}d=(d+1)%360};return e.midiMessageEmitter.addEventListener(s.kP,g),()=>{e.midiMessageEmitter.removeEventListener(s.kP,g)}}),[e.midiMessageEmitter,n.midiVizualizerOn]),(0,a.jsx)(i.S.SettingsBarHorizontal,{children:(0,a.jsx)("canvas",{ref:t,width:e.width,height:e.height,onClick:e=>o({...n,midiVizualizerOn:!n.midiVizualizerOn})})})},c=e=>{const t=r.useRef(null),n=r.useRef(null),[s,l]=r.useState({oscilloscopeOn:!0,spectrogramOn:!0,oscilloscope:void 0,spectrogram:void 0}),c="rgb(0 0 0)";let d=!0;e.analyser.fftSize=1024;const h=e.analyser.frequencyBinCount,p=new Uint8Array(h),f=e.width/h,m=e.analyser.fftSize,g=new Uint8Array(m),v=e.width/m,y=e.width/50,b=1e3/24,w=(e.analyser.fftSize,o.SD().sampleRate,e.analyser.fftSize,function(e){d&&(e.oscilloscopeOn&&void 0!=e.oscilloscope&&x(e.oscilloscope),e.spectrogramOn&&void 0!=e.spectrogram&&S(e.spectrogram),setTimeout((()=>requestAnimationFrame((function(){w(e)}))),b))}),_=(e,t)=>{let n=-1;if(t[0]!==e||t[t.length-1]>=e)for(let r=1;r{var e,r,o,i;const a=null!==(e=null===(r=t.current)||void 0===r?void 0:r.getContext("2d"))&&void 0!==e?e:void 0,c=null!==(o=null===(i=n.current)||void 0===i?void 0:i.getContext("2d"))&&void 0!==o?o:void 0,u={...s,oscilloscope:a,spectrogram:c};return l(u),w(u),()=>{d=!1}}),[s.oscilloscopeOn,s.spectrogramOn]),(0,a.jsxs)(i.S.SettingsBarHorizontal,{children:[(0,a.jsx)("canvas",{ref:n,width:e.width,height:e.height,onClick:e=>l({...s,spectrogramOn:!s.spectrogramOn})}),(0,a.jsx)("canvas",{ref:t,width:e.width,height:e.height,onClick:e=>l({...s,oscilloscopeOn:!s.oscilloscopeOn})})]})};function u(e){if(0===e.length)throw new Error("Array is empty");let t=e[0];for(let n=1;nt&&(t=e[n]);return t}},50857:(e,t,n)=>{"use strict";n.d(t,{A:()=>oe});var r=function(){function e(e){var t=this;this._insertTag=function(e){var n;n=0===t.tags.length?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling,t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=void 0===e.speedy||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(function(e){var t=document.createElement("style");return t.setAttribute("data-emotion",e.key),void 0!==e.nonce&&t.setAttribute("nonce",e.nonce),t.appendChild(document.createTextNode("")),t.setAttribute("data-s",""),t}(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=function(e){if(e.sheet)return e.sheet;for(var t=0;t0?u(w,--y):0,g--,10===b&&(g=1,m--),b}function A(){return b=y2||T(b)>3?"":" "}function N(e,t){for(;--t&&A()&&!(b<48||b>102||b>57&&b<65||b>70&&b<97););return E(e,k()+(t<6&&32==C()&&32==A()))}function I(e){for(;A();)switch(b){case e:return y;case 34:case 39:34!==e&&39!==e&&I(b);break;case 40:41===e&&I(e);break;case 92:A()}return y}function L(e,t){for(;A()&&e+b!==57&&(e+b!==84||47!==C()););return"/*"+E(t,y-1)+"*"+i(47===e?e:A())}function D(e){for(;!T(C());)A();return E(e,y)}var j="-ms-",F="-moz-",B="-webkit-",U="comm",z="rule",W="decl",V="@keyframes";function H(e,t){for(var n="",r=p(e),o=0;o0&&h(F)-v&&f(b>32?$(F+";",r,n,v-1):$(l(F," ","")+";",r,n,v-2),p);break;case 59:F+=";";default:if(f(j=K(F,t,n,m,g,o,d,O,M=[],I=[],v),s),123===T)if(0===g)Y(F,t,j,j,M,s,v,d,I);else switch(99===y&&110===u(F,3)?100:y){case 100:case 108:case 109:case 115:Y(e,j,j,r&&f(K(e,j,j,0,0,o,d,O,o,M=[],v),I),o,I,v,d,r?M:I);break;default:Y(F,j,j,j,[""],I,0,d,I)}}m=g=b=0,_=E=1,O=F="",v=a;break;case 58:v=1+h(F),b=w;default:if(_<1)if(123==T)--_;else if(125==T&&0==_++&&125==S())continue;switch(F+=i(T),T*_){case 38:E=g>0?1:(F+="\f",-1);break;case 44:d[m++]=(h(F)-1)*E,E=1;break;case 64:45===C()&&(F+=P(A())),y=C(),g=v=h(O=F+=D(k())),T++;break;case 45:45===w&&2==h(F)&&(_=0)}}return s}function K(e,t,n,r,i,s,c,u,h,f,m){for(var g=i-1,v=0===i?s:[""],y=p(v),b=0,w=0,x=0;b0?v[S]+" "+A:l(A,/&\f/g,v[S])))&&(h[x++]=C);return _(e,t,n,0===i?z:u,h,f,m)}function X(e,t,n){return _(e,t,n,U,i(b),d(e,2,-2),0)}function $(e,t,n,r){return _(e,t,n,W,d(e,0,r),d(e,r+1,-1),r)}var Q=function(e,t,n){for(var r=0,o=0;r=o,o=C(),38===r&&12===o&&(t[n]=1),!T(o);)A();return E(e,y)},Z=function(e,t){return M(function(e,t){var n=-1,r=44;do{switch(T(r)){case 0:38===r&&12===C()&&(t[n]=1),e[n]+=Q(y-1,t,n);break;case 2:e[n]+=P(r);break;case 4:if(44===r){e[++n]=58===C()?"&\f":"",t[n]=e[n].length;break}default:e[n]+=i(r)}}while(r=A());return e}(O(e),t))},J=new WeakMap,ee=function(e){if("rule"===e.type&&e.parent&&!(e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;"rule"!==n.type;)if(!(n=n.parent))return;if((1!==e.props.length||58===t.charCodeAt(0)||J.get(n))&&!r){J.set(e,!0);for(var o=[],i=Z(t,o),s=n.props,a=0,l=0;a6)switch(u(e,t+1)){case 109:if(45!==u(e,t+4))break;case 102:return l(e,/(.+:)(.+)-([^]+)/,"$1"+B+"$2-$3$1"+F+(108==u(e,t+3)?"$3":"$2-$3"))+e;case 115:return~c(e,"stretch")?ne(l(e,"stretch","fill-available"),t)+e:e}break;case 4949:if(115!==u(e,t+1))break;case 6444:switch(u(e,h(e)-3-(~c(e,"!important")&&10))){case 107:return l(e,":",":"+B)+e;case 101:return l(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+B+(45===u(e,14)?"inline-":"")+"box$3$1"+B+"$2$3$1"+j+"$2box$3")+e}break;case 5936:switch(u(e,t+11)){case 114:return B+e+j+l(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return B+e+j+l(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return B+e+j+l(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return B+e+j+e+e}return e}var re=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case W:e.return=ne(e.value,e.length);break;case V:return H([x(e,{value:l(e.value,"@","@"+B)})],r);case z:if(e.length)return function(e,t){return e.map(t).join("")}(e.props,(function(t){switch(function(e,t){return(e=t.exec(e))?e[0]:e}(t,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return H([x(e,{props:[l(t,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return H([x(e,{props:[l(t,/:(plac\w+)/,":"+B+"input-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,":-moz-$1")]}),x(e,{props:[l(t,/:(plac\w+)/,j+"input-$1")]})],r)}return""}))}}],oe=function(e){var t=e.key;if("css"===t){var n=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(n,(function(e){-1!==e.getAttribute("data-emotion").indexOf(" ")&&(document.head.appendChild(e),e.setAttribute("data-s",""))}))}var o=e.stylisPlugins||re;var i,s,a={},l=[];i=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+t+' "]'),(function(e){for(var t=e.getAttribute("data-emotion").split(" "),n=1;n{"use strict";function r(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}n.d(t,{A:()=>r})},22899:(e,t,n)=>{"use strict";n.d(t,{C:()=>a,T:()=>c,i:()=>i,w:()=>l});var r=n(9950),o=n(50857),i=(n(21192),n(96477),!0),s=r.createContext("undefined"!==typeof HTMLElement?(0,o.A)({key:"css"}):null);var a=s.Provider,l=function(e){return(0,r.forwardRef)((function(t,n){var o=(0,r.useContext)(s);return e(t,o,n)}))};i||(l=function(e){return function(t){var n=(0,r.useContext)(s);return null===n?(n=(0,o.A)({key:"css"}),r.createElement(s.Provider,{value:n},e(t,n))):e(t,n)}});var c=r.createContext({})},88283:(e,t,n)=>{"use strict";n.d(t,{AH:()=>c,i7:()=>u,mL:()=>l});var r=n(22899),o=n(9950),i=n(71783),s=n(96477),a=n(21192),l=(n(50857),n(23876),(0,r.w)((function(e,t){var n=e.styles,l=(0,a.J)([n],void 0,o.useContext(r.T));if(!r.i){for(var c,u=l.name,d=l.styles,h=l.next;void 0!==h;)u+=" "+h.name,d+=h.styles,h=h.next;var p=!0===t.compat,f=t.insert("",{name:u,styles:d},t.sheet,p);return p?null:o.createElement("style",((c={})["data-emotion"]=t.key+"-global "+u,c.dangerouslySetInnerHTML={__html:f},c.nonce=t.sheet.nonce,c))}var m=o.useRef();return(0,s.i)((function(){var e=t.key+"-global",n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),r=!1,o=document.querySelector('style[data-emotion="'+e+" "+l.name+'"]');return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),null!==o&&(r=!0,o.setAttribute("data-emotion",e),n.hydrate([o])),m.current=[n,r],function(){n.flush()}}),[t]),(0,s.i)((function(){var e=m.current,n=e[0];if(e[1])e[1]=!1;else{if(void 0!==l.next&&(0,i.sk)(t,l.next,!0),n.tags.length){var r=n.tags[n.tags.length-1].nextElementSibling;n.before=r,n.flush()}t.insert("",l,n,!1)}}),[t,l.name]),null})));function c(){for(var e=arguments.length,t=new Array(e),n=0;n{"use strict";n.d(t,{J:()=>f});var r={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},o=n(57923),i=/[A-Z]|^ms/g,s=/_EMO_([^_]+?)_([^]*?)_EMO_/g,a=function(e){return 45===e.charCodeAt(1)},l=function(e){return null!=e&&"boolean"!==typeof e},c=(0,o.A)((function(e){return a(e)?e:e.replace(i,"-$&").toLowerCase()})),u=function(e,t){switch(e){case"animation":case"animationName":if("string"===typeof t)return t.replace(s,(function(e,t,n){return h={name:t,styles:n,next:h},t}))}return 1===r[e]||a(e)||"number"!==typeof t||0===t?t:t+"px"};function d(e,t,n){if(null==n)return"";if(void 0!==n.__emotion_styles)return n;switch(typeof n){case"boolean":return"";case"object":if(1===n.anim)return h={name:n.name,styles:n.styles,next:h},n.name;if(void 0!==n.styles){var r=n.next;if(void 0!==r)for(;void 0!==r;)h={name:r.name,styles:r.styles,next:h},r=r.next;return n.styles+";"}return function(e,t,n){var r="";if(Array.isArray(n))for(var o=0;o=4;++r,o-=4)t=1540483477*(65535&(t=255&e.charCodeAt(r)|(255&e.charCodeAt(++r))<<8|(255&e.charCodeAt(++r))<<16|(255&e.charCodeAt(++r))<<24))+(59797*(t>>>16)<<16),n=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&n)+(59797*(n>>>16)<<16);switch(o){case 3:n^=(255&e.charCodeAt(r+2))<<16;case 2:n^=(255&e.charCodeAt(r+1))<<8;case 1:n=1540483477*(65535&(n^=255&e.charCodeAt(r)))+(59797*(n>>>16)<<16)}return(((n=1540483477*(65535&(n^=n>>>13))+(59797*(n>>>16)<<16))^n>>>15)>>>0).toString(36)}(o)+l;return{name:c,styles:o,next:h}}},46948:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(58168),o=n(9950),i=n(57923),s=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,a=(0,i.A)((function(e){return s.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),l=n(22899),c=n(71783),u=n(21192),d=n(96477),h=a,p=function(e){return"theme"!==e},f=function(e){return"string"===typeof e&&e.charCodeAt(0)>96?h:p},m=function(e,t,n){var r;if(t){var o=t.shouldForwardProp;r=e.__emotion_forwardProp&&o?function(t){return e.__emotion_forwardProp(t)&&o(t)}:o}return"function"!==typeof r&&n&&(r=e.__emotion_forwardProp),r},g=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return(0,c.SF)(t,n,r),(0,d.s)((function(){return(0,c.sk)(t,n,r)})),null},v=function e(t,n){var i,s,a=t.__emotion_real===t,d=a&&t.__emotion_base||t;void 0!==n&&(i=n.label,s=n.target);var h=m(t,n,a),p=h||f(d),v=!p("as");return function(){var y=arguments,b=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&b.push("label:"+i+";"),null==y[0]||void 0===y[0].raw)b.push.apply(b,y);else{0,b.push(y[0][0]);for(var w=y.length,_=1;_{"use strict";var r;n.d(t,{i:()=>a,s:()=>s});var o=n(9950),i=!!(r||(r=n.t(o,2))).useInsertionEffect&&(r||(r=n.t(o,2))).useInsertionEffect,s=i||function(e){return e()},a=i||o.useLayoutEffect},71783:(e,t,n)=>{"use strict";n.d(t,{Rk:()=>r,SF:()=>o,sk:()=>i});function r(e,t,n){var r="";return n.split(" ").forEach((function(n){void 0!==e[n]?t.push(e[n]+";"):r+=n+" "})),r}var o=function(e,t,n){var r=e.key+"-"+t.name;!1===n&&void 0===e.registered[r]&&(e.registered[r]=t.styles)},i=function(e,t,n){o(e,t,n);var r=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+r:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}},5187:(e,t,n)=>{"use strict";n.d(t,{Z:()=>c});var r=n(9950),o=n(17119),i=n(44093),s=n(14131),a=n(25679),l=n(44414);const c=r.forwardRef((function(e,t){const{children:n,container:c,disablePortal:u=!1}=e,[d,h]=r.useState(null),p=(0,i.A)(r.isValidElement(n)?n.ref:null,t);if((0,s.A)((()=>{u||h(function(e){return"function"===typeof e?e():e}(c)||document.body)}),[c,u]),(0,s.A)((()=>{if(d&&!u)return(0,a.A)(t,d),()=>{(0,a.A)(t,null)}}),[t,d,u]),u){if(r.isValidElement(n)){const e={ref:p};return r.cloneElement(n,e)}return(0,l.jsx)(r.Fragment,{children:n})}return(0,l.jsx)(r.Fragment,{children:d?o.createPortal(n,d):d})}))},1534:(e,t,n)=>{"use strict";n.d(t,{X:()=>i});var r=n(58168),o=n(74445);function i(e,t,n){return void 0===e||(0,o.g)(e)?t:(0,r.A)({},t,{ownerState:(0,r.A)({},t.ownerState,n)})}},67176:(e,t,n)=>{"use strict";function r(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(void 0===e)return{};const n={};return Object.keys(e).filter((n=>n.match(/^on[A-Z]/)&&"function"===typeof e[n]&&!t.includes(n))).forEach((t=>{n[t]=e[t]})),n}n.d(t,{h:()=>r})},74445:(e,t,n)=>{"use strict";function r(e){return"string"===typeof e}n.d(t,{g:()=>r})},71324:(e,t,n)=>{"use strict";n.d(t,{p:()=>a});var r=n(58168),o=n(72004),i=n(67176);function s(e){if(void 0===e)return{};const t={};return Object.keys(e).filter((t=>!(t.match(/^on[A-Z]/)&&"function"===typeof e[t]))).forEach((n=>{t[n]=e[n]})),t}function a(e){const{getSlotProps:t,additionalProps:n,externalSlotProps:a,externalForwardedProps:l,className:c}=e;if(!t){const e=(0,o.A)(null==n?void 0:n.className,c,null==l?void 0:l.className,null==a?void 0:a.className),t=(0,r.A)({},null==n?void 0:n.style,null==l?void 0:l.style,null==a?void 0:a.style),i=(0,r.A)({},n,l,a);return e.length>0&&(i.className=e),Object.keys(t).length>0&&(i.style=t),{props:i,internalRef:void 0}}const u=(0,i.h)((0,r.A)({},l,a)),d=s(a),h=s(l),p=t(u),f=(0,o.A)(null==p?void 0:p.className,null==n?void 0:n.className,c,null==l?void 0:l.className,null==a?void 0:a.className),m=(0,r.A)({},null==p?void 0:p.style,null==n?void 0:n.style,null==l?void 0:l.style,null==a?void 0:a.style),g=(0,r.A)({},p,n,h,d);return f.length>0&&(g.className=f),Object.keys(m).length>0&&(g.style=m),{props:g,internalRef:p.ref}}},51163:(e,t,n)=>{"use strict";function r(e,t,n){return"function"===typeof e?e(t,n):e}n.d(t,{Y:()=>r})},43161:(e,t,n)=>{"use strict";n.d(t,{Q:()=>u});var r=n(58168),o=n(98587),i=n(44093),s=n(1534),a=n(71324),l=n(51163);const c=["elementType","externalSlotProps","ownerState","skipResolvingSlotProps"];function u(e){var t;const{elementType:n,externalSlotProps:u,ownerState:d,skipResolvingSlotProps:h=!1}=e,p=(0,o.A)(e,c),f=h?{}:(0,l.Y)(u,d),{props:m,internalRef:g}=(0,a.p)((0,r.A)({},p,{externalSlotProps:f})),v=(0,i.A)(g,null==f?void 0:f.ref,null==(t=e.additionalProps)?void 0:t.ref);return(0,s.X)(n,(0,r.A)({},m,{ref:v}),d)}},89490:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"M10 8.64 15.27 12 10 15.36zM8 5v14l11-7z"}),"PlayArrowOutlined")},55858:(e,t,n)=>{"use strict";var r=n(24994);t.A=void 0;var o=r(n(79526)),i=n(44414);t.A=(0,o.default)((0,i.jsx)("path",{d:"M19.14 12.94c.04-.3.06-.61.06-.94 0-.32-.02-.64-.07-.94l2.03-1.58c.18-.14.23-.41.12-.61l-1.92-3.32c-.12-.22-.37-.29-.59-.22l-2.39.96c-.5-.38-1.03-.7-1.62-.94l-.36-2.54c-.04-.24-.24-.41-.48-.41h-3.84c-.24 0-.43.17-.47.41l-.36 2.54c-.59.24-1.13.57-1.62.94l-2.39-.96c-.22-.08-.47 0-.59.22L2.74 8.87c-.12.21-.08.47.12.61l2.03 1.58c-.05.3-.09.63-.09.94s.02.64.07.94l-2.03 1.58c-.18.14-.23.41-.12.61l1.92 3.32c.12.22.37.29.59.22l2.39-.96c.5.38 1.03.7 1.62.94l.36 2.54c.05.24.24.41.48.41h3.84c.24 0 .44-.17.47-.41l.36-2.54c.59-.24 1.13-.56 1.62-.94l2.39.96c.22.08.47 0 .59-.22l1.92-3.32c.12-.22.07-.47-.12-.61zM12 15.6c-1.98 0-3.6-1.62-3.6-3.6s1.62-3.6 3.6-3.6 3.6 1.62 3.6 3.6-1.62 3.6-3.6 3.6"}),"Settings")},58747:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(23235),o=n(44414);const i=(0,r.A)((0,o.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-2 10h-4v4h-2v-4H7v-2h4V7h2v4h4z"}),"AddBox")},31902:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(23235),o=n(44414);const i=(0,r.A)((0,o.jsx)("path",{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Clear")},79526:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r.createSvgIcon}});var r=n(88943)},18160:(e,t,n)=>{"use strict";n.d(t,{A:()=>U});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(74061),l=n(99269),c=n(74719),u=n(59254),d=n(44093),h=n(51163),p=n(71324),f=n(1534);const m=["className","elementType","ownerState","externalForwardedProps","getSlotOwnerState","internalForwardedProps"],g=["component","slots","slotProps"],v=["component"];function y(e,t){const{className:n,elementType:i,ownerState:s,externalForwardedProps:a,getSlotOwnerState:l,internalForwardedProps:c}=t,u=(0,r.A)(t,m),{component:y,slots:b={[e]:void 0},slotProps:w={[e]:void 0}}=a,_=(0,r.A)(a,g),x=b[e]||i,S=(0,h.Y)(w[e],s),A=(0,p.p)((0,o.A)({className:n},u,{externalForwardedProps:"root"===e?_:void 0,externalSlotProps:S})),{props:{component:C},internalRef:k}=A,E=(0,r.A)(A.props,v),T=(0,d.A)(k,null==S?void 0:S.ref,t.ref),O=l?l(E):{},M=(0,o.A)({},s,O),P="root"===e?C||y:C,R=(0,f.X)(x,(0,o.A)({},"root"===e&&!y&&!b[e]&&c,"root"!==e&&!b[e]&&c,E,P&&{as:P},{ref:T}),M);return Object.keys(O).forEach((e=>{delete R[e]})),[x,R]}var b=n(61676),w=n(2235),_=n(80863),x=n(68483);function S(e){return(0,x.Ay)("MuiAlert",e)}const A=(0,_.A)("MuiAlert",["root","action","icon","message","filled","colorSuccess","colorInfo","colorWarning","colorError","filledSuccess","filledInfo","filledWarning","filledError","outlined","outlinedSuccess","outlinedInfo","outlinedWarning","outlinedError","standard","standardSuccess","standardInfo","standardWarning","standardError"]);var C=n(25333),k=n(23235),E=n(44414);const T=(0,k.A)((0,E.jsx)("path",{d:"M20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4C12.76,4 13.5,4.11 14.2, 4.31L15.77,2.74C14.61,2.26 13.34,2 12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0, 0 22,12M7.91,10.08L6.5,11.5L11,16L21,6L19.59,4.58L11,13.17L7.91,10.08Z"}),"SuccessOutlined"),O=(0,k.A)((0,E.jsx)("path",{d:"M12 5.99L19.53 19H4.47L12 5.99M12 2L1 21h22L12 2zm1 14h-2v2h2v-2zm0-6h-2v4h2v-4z"}),"ReportProblemOutlined"),M=(0,k.A)((0,E.jsx)("path",{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"}),"ErrorOutline"),P=(0,k.A)((0,E.jsx)("path",{d:"M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20, 12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10, 10 0 0,0 12,2M11,17H13V11H11V17Z"}),"InfoOutlined"),R=(0,k.A)((0,E.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"}),"Close"),N=["action","children","className","closeText","color","components","componentsProps","icon","iconMapping","onClose","role","severity","slotProps","slots","variant"],I=(0,c.h)("MuiAlert"),L=(0,u.Ay)(w.A,{name:"MuiAlert",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],t["".concat(n.variant).concat((0,b.A)(n.color||n.severity))]]}})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?l.e$:l.a,r="light"===t.palette.mode?l.a:l.e$;return(0,o.A)({},t.typography.body2,{backgroundColor:"transparent",display:"flex",padding:"6px 16px",variants:[...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[o]=e;return{props:{colorSeverity:o,variant:"standard"},style:{color:t.vars?t.vars.palette.Alert["".concat(o,"Color")]:n(t.palette[o].light,.6),backgroundColor:t.vars?t.vars.palette.Alert["".concat(o,"StandardBg")]:r(t.palette[o].light,.9),["& .".concat(A.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(o,"IconColor")]}:{color:t.palette[o].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.light})).map((e=>{let[r]=e;return{props:{colorSeverity:r,variant:"outlined"},style:{color:t.vars?t.vars.palette.Alert["".concat(r,"Color")]:n(t.palette[r].light,.6),border:"1px solid ".concat((t.vars||t).palette[r].light),["& .".concat(A.icon)]:t.vars?{color:t.vars.palette.Alert["".concat(r,"IconColor")]}:{color:t.palette[r].main}}}})),...Object.entries(t.palette).filter((e=>{let[,t]=e;return t.main&&t.dark})).map((e=>{let[n]=e;return{props:{colorSeverity:n,variant:"filled"},style:(0,o.A)({fontWeight:t.typography.fontWeightMedium},t.vars?{color:t.vars.palette.Alert["".concat(n,"FilledColor")],backgroundColor:t.vars.palette.Alert["".concat(n,"FilledBg")]}:{backgroundColor:"dark"===t.palette.mode?t.palette[n].dark:t.palette[n].main,color:t.palette.getContrastText(t.palette[n].main)})}}))]})})),D=(0,u.Ay)("div",{name:"MuiAlert",slot:"Icon",overridesResolver:(e,t)=>t.icon})({marginRight:12,padding:"7px 0",display:"flex",fontSize:22,opacity:.9}),j=(0,u.Ay)("div",{name:"MuiAlert",slot:"Message",overridesResolver:(e,t)=>t.message})({padding:"8px 0",minWidth:0,overflow:"auto"}),F=(0,u.Ay)("div",{name:"MuiAlert",slot:"Action",overridesResolver:(e,t)=>t.action})({display:"flex",alignItems:"flex-start",padding:"4px 0 0 16px",marginLeft:"auto",marginRight:-8}),B={success:(0,E.jsx)(T,{fontSize:"inherit"}),warning:(0,E.jsx)(O,{fontSize:"inherit"}),error:(0,E.jsx)(M,{fontSize:"inherit"}),info:(0,E.jsx)(P,{fontSize:"inherit"})},U=i.forwardRef((function(e,t){const n=I({props:e,name:"MuiAlert"}),{action:i,children:l,className:c,closeText:u="Close",color:d,components:h={},componentsProps:p={},icon:f,iconMapping:m=B,onClose:g,role:v="alert",severity:w="success",slotProps:_={},slots:x={},variant:A="standard"}=n,k=(0,r.A)(n,N),T=(0,o.A)({},n,{color:d,severity:w,variant:A,colorSeverity:d||w}),O=(e=>{const{variant:t,color:n,severity:r,classes:o}=e,i={root:["root","color".concat((0,b.A)(n||r)),"".concat(t).concat((0,b.A)(n||r)),"".concat(t)],icon:["icon"],message:["message"],action:["action"]};return(0,a.A)(i,S,o)})(T),M={slots:(0,o.A)({closeButton:h.CloseButton,closeIcon:h.CloseIcon},x),slotProps:(0,o.A)({},p,_)},[P,U]=y("closeButton",{elementType:C.A,externalForwardedProps:M,ownerState:T}),[z,W]=y("closeIcon",{elementType:R,externalForwardedProps:M,ownerState:T});return(0,E.jsxs)(L,(0,o.A)({role:v,elevation:0,ownerState:T,className:(0,s.A)(O.root,c),ref:t},k,{children:[!1!==f?(0,E.jsx)(D,{ownerState:T,className:O.icon,children:f||m[w]||B[w]}):null,(0,E.jsx)(j,{ownerState:T,className:O.message,children:l}),null!=i?(0,E.jsx)(F,{ownerState:T,className:O.action,children:i}):null,null==i&&g?(0,E.jsx)(F,{ownerState:T,className:O.action,children:(0,E.jsx)(P,(0,o.A)({size:"small","aria-label":u,title:u,color:"inherit",onClick:g},U,{children:(0,E.jsx)(z,(0,o.A)({fontSize:"small"},W))}))}):null]}))}))},16491:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(98587),i=n(9950),s=n(72004),a=n(86897),l=n(70505),c=n(80237),u=n(85341),d=n(44414);const h=["className","component"];var p=n(41681),f=n(47775),m=n(67550);const g=(0,n(80863).A)("MuiBox",["root"]),v=(0,f.A)(),y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n,defaultClassName:p="MuiBox-root",generateClassName:f}=e,m=(0,a.default)("div",{shouldForwardProp:e=>"theme"!==e&&"sx"!==e&&"as"!==e})(l.A);return i.forwardRef((function(e,i){const a=(0,u.A)(n),l=(0,c.A)(e),{className:g,component:v="div"}=l,y=(0,o.A)(l,h);return(0,d.jsx)(m,(0,r.A)({as:v,ref:i,className:(0,s.A)(g,f?f(p):p),theme:t&&a[t]||a},y))}))}({themeId:m.A,defaultTheme:v,defaultClassName:g.root,generateClassName:p.A.generate}),b=y},8079:(e,t,n)=>{"use strict";n.d(t,{A:()=>K});var r=n(58168),o=n(98587),i=n(9950),s=n(72004),a=n(74061),l=n(59254),c=n(48283),u=n(31506),d=n(1976),h=n(41573),p=n(57528);var f=n(25540),m=n(28555);function g(e,t){var n=Object.create(null);return e&&i.Children.map(e,(function(e){return e})).forEach((function(e){n[e.key]=function(e){return t&&(0,i.isValidElement)(e)?t(e):e}(e)})),n}function v(e,t,n){return null!=n[t]?n[t]:e.props[t]}function y(e,t,n){var r=g(e.children),o=function(e,t){function n(n){return n in t?t[n]:e[n]}e=e||{},t=t||{};var r,o=Object.create(null),i=[];for(var s in e)s in t?i.length&&(o[s]=i,i=[]):i.push(s);var a={};for(var l in t){if(o[l])for(r=0;r{if(!c&&null!=u){const e=setTimeout(u,d);return()=>{clearTimeout(e)}}}),[u,c,d]),(0,A.jsx)("span",{className:f,style:m,children:(0,A.jsx)("span",{className:g})})};var k=n(80863);const E=(0,k.A)("MuiTouchRipple",["root","ripple","rippleVisible","ripplePulsate","child","childLeaving","childPulsate"]);var T,O,M,P;const R=["center","classes","className"];let N,I,L,D;const j=(0,x.i7)(N||(N=T||(T=(0,p.A)(["\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n"])))),F=(0,x.i7)(I||(I=O||(O=(0,p.A)(["\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n"])))),B=(0,x.i7)(L||(L=M||(M=(0,p.A)(["\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n"])))),U=(0,l.Ay)("span",{name:"MuiTouchRipple",slot:"Root"})({overflow:"hidden",pointerEvents:"none",position:"absolute",zIndex:0,top:0,right:0,bottom:0,left:0,borderRadius:"inherit"}),z=(0,l.Ay)(C,{name:"MuiTouchRipple",slot:"Ripple"})(D||(D=P||(P=(0,p.A)(["\n opacity: 0;\n position: absolute;\n\n &."," {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n &."," {\n animation-duration: ","ms;\n }\n\n & ."," {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & ."," {\n opacity: 0;\n animation-name: ",";\n animation-duration: ","ms;\n animation-timing-function: ",";\n }\n\n & ."," {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ",";\n animation-duration: 2500ms;\n animation-timing-function: ",";\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n"]))),E.rippleVisible,j,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),E.ripplePulsate,(e=>{let{theme:t}=e;return t.transitions.duration.shorter}),E.child,E.childLeaving,F,550,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut}),E.childPulsate,B,(e=>{let{theme:t}=e;return t.transitions.easing.easeInOut})),W=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiTouchRipple"}),{center:a=!1,classes:l={},className:u}=n,d=(0,o.A)(n,R),[h,p]=i.useState([]),f=i.useRef(0),m=i.useRef(null);i.useEffect((()=>{m.current&&(m.current(),m.current=null)}),[h]);const g=i.useRef(!1),v=(0,S.A)(),y=i.useRef(null),b=i.useRef(null),w=i.useCallback((e=>{const{pulsate:t,rippleX:n,rippleY:r,rippleSize:o,cb:i}=e;p((e=>[...e,(0,A.jsx)(z,{classes:{ripple:(0,s.A)(l.ripple,E.ripple),rippleVisible:(0,s.A)(l.rippleVisible,E.rippleVisible),ripplePulsate:(0,s.A)(l.ripplePulsate,E.ripplePulsate),child:(0,s.A)(l.child,E.child),childLeaving:(0,s.A)(l.childLeaving,E.childLeaving),childPulsate:(0,s.A)(l.childPulsate,E.childPulsate)},timeout:550,pulsate:t,rippleX:n,rippleY:r,rippleSize:o},f.current)])),f.current+=1,m.current=i}),[l]),x=i.useCallback((function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{pulsate:r=!1,center:o=a||t.pulsate,fakeElement:i=!1}=t;if("mousedown"===(null==e?void 0:e.type)&&g.current)return void(g.current=!1);"touchstart"===(null==e?void 0:e.type)&&(g.current=!0);const s=i?null:b.current,l=s?s.getBoundingClientRect():{width:0,height:0,left:0,top:0};let c,u,d;if(o||void 0===e||0===e.clientX&&0===e.clientY||!e.clientX&&!e.touches)c=Math.round(l.width/2),u=Math.round(l.height/2);else{const{clientX:t,clientY:n}=e.touches&&e.touches.length>0?e.touches[0]:e;c=Math.round(t-l.left),u=Math.round(n-l.top)}if(o)d=Math.sqrt((2*l.width**2+l.height**2)/3),d%2===0&&(d+=1);else{const e=2*Math.max(Math.abs((s?s.clientWidth:0)-c),c)+2,t=2*Math.max(Math.abs((s?s.clientHeight:0)-u),u)+2;d=Math.sqrt(e**2+t**2)}null!=e&&e.touches?null===y.current&&(y.current=()=>{w({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})},v.start(80,(()=>{y.current&&(y.current(),y.current=null)}))):w({pulsate:r,rippleX:c,rippleY:u,rippleSize:d,cb:n})}),[a,w,v]),C=i.useCallback((()=>{x({},{pulsate:!0})}),[x]),k=i.useCallback(((e,t)=>{if(v.clear(),"touchend"===(null==e?void 0:e.type)&&y.current)return y.current(),y.current=null,void v.start(0,(()=>{k(e,t)}));y.current=null,p((e=>e.length>0?e.slice(1):e)),m.current=t}),[v]);return i.useImperativeHandle(t,(()=>({pulsate:C,start:x,stop:k})),[C,x,k]),(0,A.jsx)(U,(0,r.A)({className:(0,s.A)(E.root,l.root,u),ref:b},d,{children:(0,A.jsx)(_,{component:null,exit:!0,children:h})}))}));var V=n(68483);function H(e){return(0,V.Ay)("MuiButtonBase",e)}const G=(0,k.A)("MuiButtonBase",["root","disabled","focusVisible"]),q=["action","centerRipple","children","className","component","disabled","disableRipple","disableTouchRipple","focusRipple","focusVisibleClassName","LinkComponent","onBlur","onClick","onContextMenu","onDragLeave","onFocus","onFocusVisible","onKeyDown","onKeyUp","onMouseDown","onMouseLeave","onMouseUp","onTouchEnd","onTouchMove","onTouchStart","tabIndex","TouchRippleProps","touchRippleRef","type"],Y=(0,l.Ay)("button",{name:"MuiButtonBase",slot:"Root",overridesResolver:(e,t)=>t.root})({display:"inline-flex",alignItems:"center",justifyContent:"center",position:"relative",boxSizing:"border-box",WebkitTapHighlightColor:"transparent",backgroundColor:"transparent",outline:0,border:0,margin:0,borderRadius:0,padding:0,cursor:"pointer",userSelect:"none",verticalAlign:"middle",MozAppearance:"none",WebkitAppearance:"none",textDecoration:"none",color:"inherit","&::-moz-focus-inner":{borderStyle:"none"},["&.".concat(G.disabled)]:{pointerEvents:"none",cursor:"default"},"@media print":{colorAdjust:"exact"}}),K=i.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiButtonBase"}),{action:l,centerRipple:p=!1,children:f,className:m,component:g="button",disabled:v=!1,disableRipple:y=!1,disableTouchRipple:b=!1,focusRipple:w=!1,LinkComponent:_="a",onBlur:x,onClick:S,onContextMenu:C,onDragLeave:k,onFocus:E,onFocusVisible:T,onKeyDown:O,onKeyUp:M,onMouseDown:P,onMouseLeave:R,onMouseUp:N,onTouchEnd:I,onTouchMove:L,onTouchStart:D,tabIndex:j=0,TouchRippleProps:F,touchRippleRef:B,type:U}=n,z=(0,o.A)(n,q),V=i.useRef(null),G=i.useRef(null),K=(0,u.A)(G,B),{isFocusVisibleRef:X,onFocus:$,onBlur:Q,ref:Z}=(0,h.A)(),[J,ee]=i.useState(!1);v&&J&&ee(!1),i.useImperativeHandle(l,(()=>({focusVisible:()=>{ee(!0),V.current.focus()}})),[]);const[te,ne]=i.useState(!1);i.useEffect((()=>{ne(!0)}),[]);const re=te&&!y&&!v;function oe(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:b;return(0,d.A)((r=>{t&&t(r);return!n&&G.current&&G.current[e](r),!0}))}i.useEffect((()=>{J&&w&&!y&&te&&G.current.pulsate()}),[y,w,J,te]);const ie=oe("start",P),se=oe("stop",C),ae=oe("stop",k),le=oe("stop",N),ce=oe("stop",(e=>{J&&e.preventDefault(),R&&R(e)})),ue=oe("start",D),de=oe("stop",I),he=oe("stop",L),pe=oe("stop",(e=>{Q(e),!1===X.current&&ee(!1),x&&x(e)}),!1),fe=(0,d.A)((e=>{V.current||(V.current=e.currentTarget),$(e),!0===X.current&&(ee(!0),T&&T(e)),E&&E(e)})),me=()=>{const e=V.current;return g&&"button"!==g&&!("A"===e.tagName&&e.href)},ge=i.useRef(!1),ve=(0,d.A)((e=>{w&&!ge.current&&J&&G.current&&" "===e.key&&(ge.current=!0,G.current.stop(e,(()=>{G.current.start(e)}))),e.target===e.currentTarget&&me()&&" "===e.key&&e.preventDefault(),O&&O(e),e.target===e.currentTarget&&me()&&"Enter"===e.key&&!v&&(e.preventDefault(),S&&S(e))})),ye=(0,d.A)((e=>{w&&" "===e.key&&G.current&&J&&!e.defaultPrevented&&(ge.current=!1,G.current.stop(e,(()=>{G.current.pulsate(e)}))),M&&M(e),S&&e.target===e.currentTarget&&me()&&" "===e.key&&!e.defaultPrevented&&S(e)}));let be=g;"button"===be&&(z.href||z.to)&&(be=_);const we={};"button"===be?(we.type=void 0===U?"button":U,we.disabled=v):(z.href||z.to||(we.role="button"),v&&(we["aria-disabled"]=v));const _e=(0,u.A)(t,Z,V);const xe=(0,r.A)({},n,{centerRipple:p,component:g,disabled:v,disableRipple:y,disableTouchRipple:b,focusRipple:w,tabIndex:j,focusVisible:J}),Se=(e=>{const{disabled:t,focusVisible:n,focusVisibleClassName:r,classes:o}=e,i={root:["root",t&&"disabled",n&&"focusVisible"]},s=(0,a.A)(i,H,o);return n&&r&&(s.root+=" ".concat(r)),s})(xe);return(0,A.jsxs)(Y,(0,r.A)({as:be,className:(0,s.A)(Se.root,m),ownerState:xe,onBlur:pe,onClick:S,onContextMenu:se,onFocus:fe,onKeyDown:ve,onKeyUp:ye,onMouseDown:ie,onMouseLeave:ce,onMouseUp:le,onDragLeave:ae,onTouchEnd:de,onTouchMove:he,onTouchStart:ue,ref:_e,tabIndex:v?-1:j,type:U},we,z,{children:[f,re?(0,A.jsx)(W,(0,r.A)({ref:K,center:p},F)):null]}))}))},66310:(e,t,n)=>{"use strict";n.d(t,{A:()=>L});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(74061),l=n(99269),c=n(61676),u=n(59254),d=n(19608),h=n(48733),p=n(39766),f=n(8079),m=n(80863),g=n(68483);function v(e){return(0,g.Ay)("PrivateSwitchBase",e)}(0,m.A)("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);var y=n(44414);const b=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],w=(0,u.Ay)(f.A)((e=>{let{ownerState:t}=e;return(0,o.A)({padding:9,borderRadius:"50%"},"start"===t.edge&&{marginLeft:"small"===t.size?-3:-12},"end"===t.edge&&{marginRight:"small"===t.size?-3:-12})})),_=(0,u.Ay)("input",{shouldForwardProp:d.A})({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),x=i.forwardRef((function(e,t){const{autoFocus:n,checked:i,checkedIcon:l,className:u,defaultChecked:d,disabled:f,disableFocusRipple:m=!1,edge:g=!1,icon:x,id:S,inputProps:A,inputRef:C,name:k,onBlur:E,onChange:T,onFocus:O,readOnly:M,required:P=!1,tabIndex:R,type:N,value:I}=e,L=(0,r.A)(e,b),[D,j]=(0,h.A)({controlled:i,default:Boolean(d),name:"SwitchBase",state:"checked"}),F=(0,p.A)();let B=f;F&&"undefined"===typeof B&&(B=F.disabled);const U="checkbox"===N||"radio"===N,z=(0,o.A)({},e,{checked:D,disabled:B,disableFocusRipple:m,edge:g}),W=(e=>{const{classes:t,checked:n,disabled:r,edge:o}=e,i={root:["root",n&&"checked",r&&"disabled",o&&"edge".concat((0,c.A)(o))],input:["input"]};return(0,a.A)(i,v,t)})(z);return(0,y.jsxs)(w,(0,o.A)({component:"span",className:(0,s.A)(W.root,u),centerRipple:!0,focusRipple:!m,disabled:B,tabIndex:null,role:void 0,onFocus:e=>{O&&O(e),F&&F.onFocus&&F.onFocus(e)},onBlur:e=>{E&&E(e),F&&F.onBlur&&F.onBlur(e)},ownerState:z,ref:t},L,{children:[(0,y.jsx)(_,(0,o.A)({autoFocus:n,checked:i,defaultChecked:d,className:W.input,disabled:B,id:U?S:void 0,name:k,onChange:e=>{if(e.nativeEvent.defaultPrevented)return;const t=e.target.checked;j(t),T&&T(e,t)},readOnly:M,ref:C,required:P,ownerState:z,tabIndex:R,type:N},"checkbox"===N&&void 0===I?{}:{value:I},A)),D?l:x]}))}));var S=n(23235);const A=(0,S.A)((0,y.jsx)("path",{d:"M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"}),"CheckBoxOutlineBlank"),C=(0,S.A)((0,y.jsx)("path",{d:"M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"}),"CheckBox"),k=(0,S.A)((0,y.jsx)("path",{d:"M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"}),"IndeterminateCheckBox");var E=n(48283);function T(e){return(0,g.Ay)("MuiCheckbox",e)}const O=(0,m.A)("MuiCheckbox",["root","checked","disabled","indeterminate","colorPrimary","colorSecondary","sizeSmall","sizeMedium"]),M=["checkedIcon","color","icon","indeterminate","indeterminateIcon","inputProps","size","className"],P=(0,u.Ay)(x,{shouldForwardProp:e=>(0,d.A)(e)||"classes"===e,name:"MuiCheckbox",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.indeterminate&&t.indeterminate,t["size".concat((0,c.A)(n.size))],"default"!==n.color&&t["color".concat((0,c.A)(n.color))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({color:(t.vars||t).palette.text.secondary},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat("default"===n.color?t.vars.palette.action.activeChannel:t.vars.palette[n.color].mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)("default"===n.color?t.palette.action.active:t.palette[n.color].main,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"default"!==n.color&&{["&.".concat(O.checked,", &.").concat(O.indeterminate)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(O.disabled)]:{color:(t.vars||t).palette.action.disabled}})})),R=(0,y.jsx)(C,{}),N=(0,y.jsx)(A,{}),I=(0,y.jsx)(k,{}),L=i.forwardRef((function(e,t){var n,l;const u=(0,E.A)({props:e,name:"MuiCheckbox"}),{checkedIcon:d=R,color:h="primary",icon:p=N,indeterminate:f=!1,indeterminateIcon:m=I,inputProps:g,size:v="medium",className:b}=u,w=(0,r.A)(u,M),_=f?m:p,x=f?m:d,S=(0,o.A)({},u,{color:h,indeterminate:f,size:v}),A=(e=>{const{classes:t,indeterminate:n,color:r,size:i}=e,s={root:["root",n&&"indeterminate","color".concat((0,c.A)(r)),"size".concat((0,c.A)(i))]},l=(0,a.A)(s,T,t);return(0,o.A)({},t,l)})(S);return(0,y.jsx)(P,(0,o.A)({type:"checkbox",inputProps:(0,o.A)({"data-indeterminate":f},g),icon:i.cloneElement(_,{fontSize:null!=(n=_.props.fontSize)?n:v}),checkedIcon:i.cloneElement(x,{fontSize:null!=(l=x.props.fontSize)?l:v}),ownerState:S,ref:t,className:(0,s.A)(A.root,b)},w,{classes:A}))}))},15866:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext(void 0)},68624:(e,t,n)=>{"use strict";function r(e){let{props:t,states:n,muiFormControl:r}=e;return n.reduce(((e,n)=>(e[n]=t[n],r&&"undefined"===typeof t[n]&&(e[n]=r[n]),e)),{})}n.d(t,{A:()=>r})},39766:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950),o=n(15866);function i(){return r.useContext(o.A)}},40165:(e,t,n)=>{"use strict";n.d(t,{A:()=>v});var r=n(58168),o=n(98587),i=n(9950),s=n(74522),a=n(32448),l=n(14857),c=n(70576),u=n(31506),d=n(44414);const h=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"];function p(e){return"scale(".concat(e,", ").concat(e**2,")")}const f={entering:{opacity:1,transform:p(1)},entered:{opacity:1,transform:"none"}},m="undefined"!==typeof navigator&&/^((?!chrome|android).)*(safari|mobile)/i.test(navigator.userAgent)&&/(os |version\/)15(.|_)4/i.test(navigator.userAgent),g=i.forwardRef((function(e,t){const{addEndListener:n,appear:g=!0,children:v,easing:y,in:b,onEnter:w,onEntered:_,onEntering:x,onExit:S,onExited:A,onExiting:C,style:k,timeout:E="auto",TransitionComponent:T=a.Ay}=e,O=(0,o.A)(e,h),M=(0,s.A)(),P=i.useRef(),R=(0,l.A)(),N=i.useRef(null),I=(0,u.A)(N,v.ref,t),L=e=>t=>{if(e){const n=N.current;void 0===t?e(n):e(n,t)}},D=L(x),j=L(((e,t)=>{(0,c.q)(e);const{duration:n,delay:r,easing:o}=(0,c.c)({style:k,timeout:E,easing:y},{mode:"enter"});let i;"auto"===E?(i=R.transitions.getAutoHeightDuration(e.clientHeight),P.current=i):i=n,e.style.transition=[R.transitions.create("opacity",{duration:i,delay:r}),R.transitions.create("transform",{duration:m?i:.666*i,delay:r,easing:o})].join(","),w&&w(e,t)})),F=L(_),B=L(C),U=L((e=>{const{duration:t,delay:n,easing:r}=(0,c.c)({style:k,timeout:E,easing:y},{mode:"exit"});let o;"auto"===E?(o=R.transitions.getAutoHeightDuration(e.clientHeight),P.current=o):o=t,e.style.transition=[R.transitions.create("opacity",{duration:o,delay:n}),R.transitions.create("transform",{duration:m?o:.666*o,delay:m?n:n||.333*o,easing:r})].join(","),e.style.opacity=0,e.style.transform=p(.75),S&&S(e)})),z=L(A);return(0,d.jsx)(T,(0,r.A)({appear:g,in:b,nodeRef:N,onEnter:j,onEntered:F,onEntering:D,onExit:U,onExited:z,onExiting:B,addEndListener:e=>{"auto"===E&&M.start(P.current||0,e),n&&n(N.current,e)},timeout:"auto"===E?null:E},O,{children:(e,t)=>i.cloneElement(v,(0,r.A)({style:(0,r.A)({opacity:0,transform:p(.75),visibility:"exited"!==e||b?void 0:"hidden"},f[e],k,v.props.style),ref:I},t))}))}));g.muiSupportAuto=!0;const v=g},25333:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(74061),l=n(99269),c=n(59254),u=n(48283),d=n(8079),h=n(61676),p=n(80863),f=n(68483);function m(e){return(0,f.Ay)("MuiIconButton",e)}const g=(0,p.A)("MuiIconButton",["root","disabled","colorInherit","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","edgeStart","edgeEnd","sizeSmall","sizeMedium","sizeLarge"]);var v=n(44414);const y=["edge","children","className","color","disabled","disableFocusRipple","size"],b=(0,c.Ay)(d.A,{name:"MuiIconButton",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"default"!==n.color&&t["color".concat((0,h.A)(n.color))],n.edge&&t["edge".concat((0,h.A)(n.edge))],t["size".concat((0,h.A)(n.size))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({textAlign:"center",flex:"0 0 auto",fontSize:t.typography.pxToRem(24),padding:8,borderRadius:"50%",overflow:"visible",color:(t.vars||t).palette.action.active,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shortest})},!n.disableRipple&&{"&:hover":{backgroundColor:t.vars?"rgba(".concat(t.vars.palette.action.activeChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(t.palette.action.active,t.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},"start"===n.edge&&{marginLeft:"small"===n.size?-3:-12},"end"===n.edge&&{marginRight:"small"===n.size?-3:-12})}),(e=>{let{theme:t,ownerState:n}=e;var r;const i=null==(r=(t.vars||t).palette)?void 0:r[n.color];return(0,o.A)({},"inherit"===n.color&&{color:"inherit"},"inherit"!==n.color&&"default"!==n.color&&(0,o.A)({color:null==i?void 0:i.main},!n.disableRipple&&{"&:hover":(0,o.A)({},i&&{backgroundColor:t.vars?"rgba(".concat(i.mainChannel," / ").concat(t.vars.palette.action.hoverOpacity,")"):(0,l.X4)(i.main,t.palette.action.hoverOpacity)},{"@media (hover: none)":{backgroundColor:"transparent"}})}),"small"===n.size&&{padding:5,fontSize:t.typography.pxToRem(18)},"large"===n.size&&{padding:12,fontSize:t.typography.pxToRem(28)},{["&.".concat(g.disabled)]:{backgroundColor:"transparent",color:(t.vars||t).palette.action.disabled}})})),w=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiIconButton"}),{edge:i=!1,children:l,className:c,color:d="default",disabled:p=!1,disableFocusRipple:f=!1,size:g="medium"}=n,w=(0,r.A)(n,y),_=(0,o.A)({},n,{edge:i,color:d,disabled:p,disableFocusRipple:f,size:g}),x=(e=>{const{classes:t,disabled:n,color:r,edge:o,size:i}=e,s={root:["root",n&&"disabled","default"!==r&&"color".concat((0,h.A)(r)),o&&"edge".concat((0,h.A)(o)),"size".concat((0,h.A)(i))]};return(0,a.A)(s,m,t)})(_);return(0,v.jsx)(b,(0,o.A)({className:(0,s.A)(x.root,c),centerRipple:!0,focusRipple:!f,disabled:p,ref:t},w,{ownerState:_,children:l}))}))},13372:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9950).createContext({})},63341:(e,t,n)=>{"use strict";n.d(t,{A:()=>Le});var r=n(58168),o=n(98587),i=n(9950),s=(n(26429),n(72004)),a=n(74061),l=n(43161),c=n(44730),u=n(27402),d=n(59254),h=n(48283),p=n(13372),f=n(80863),m=n(68483);function g(e){return(0,m.Ay)("MuiList",e)}(0,f.A)("MuiList",["root","padding","dense","subheader"]);var v=n(44414);const y=["children","className","component","dense","disablePadding","subheader"],b=(0,d.Ay)("ul",{name:"MuiList",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.disablePadding&&t.padding,n.dense&&t.dense,n.subheader&&t.subheader]}})((e=>{let{ownerState:t}=e;return(0,r.A)({listStyle:"none",margin:0,padding:0,position:"relative"},!t.disablePadding&&{paddingTop:8,paddingBottom:8},t.subheader&&{paddingTop:0})})),w=i.forwardRef((function(e,t){const n=(0,h.A)({props:e,name:"MuiList"}),{children:l,className:c,component:u="ul",dense:d=!1,disablePadding:f=!1,subheader:m}=n,w=(0,o.A)(n,y),_=i.useMemo((()=>({dense:d})),[d]),x=(0,r.A)({},n,{component:u,dense:d,disablePadding:f}),S=(e=>{const{classes:t,disablePadding:n,dense:r,subheader:o}=e,i={root:["root",!n&&"padding",r&&"dense",o&&"subheader"]};return(0,a.A)(i,g,t)})(x);return(0,v.jsx)(p.A.Provider,{value:_,children:(0,v.jsxs)(b,(0,r.A)({as:u,className:(0,s.A)(S.root,c),ref:t,ownerState:x},w,{children:[m,l]}))})}));function _(e){const t=e.documentElement.clientWidth;return Math.abs(window.innerWidth-t)}const x=_;var S=n(31506),A=n(79044);const C=["actions","autoFocus","autoFocusItem","children","className","disabledItemsFocusable","disableListWrap","onKeyDown","variant"];function k(e,t,n){return e===t?e.firstChild:t&&t.nextElementSibling?t.nextElementSibling:n?null:e.firstChild}function E(e,t,n){return e===t?n?e.firstChild:e.lastChild:t&&t.previousElementSibling?t.previousElementSibling:n?null:e.lastChild}function T(e,t){if(void 0===t)return!0;let n=e.innerText;return void 0===n&&(n=e.textContent),n=n.trim().toLowerCase(),0!==n.length&&(t.repeating?n[0]===t.keys[0]:0===n.indexOf(t.keys.join("")))}function O(e,t,n,r,o,i){let s=!1,a=o(e,t,!!t&&n);for(;a;){if(a===e.firstChild){if(s)return!1;s=!0}const t=!r&&(a.disabled||"true"===a.getAttribute("aria-disabled"));if(a.hasAttribute("tabindex")&&T(a,i)&&!t)return a.focus(),!0;a=o(e,a,n)}return!1}const M=i.forwardRef((function(e,t){const{actions:n,autoFocus:s=!1,autoFocusItem:a=!1,children:l,className:c,disabledItemsFocusable:d=!1,disableListWrap:h=!1,onKeyDown:p,variant:f="selectedMenu"}=e,m=(0,o.A)(e,C),g=i.useRef(null),y=i.useRef({keys:[],repeating:!0,previousKeyMatched:!0,lastTime:null});(0,A.A)((()=>{s&&g.current.focus()}),[s]),i.useImperativeHandle(n,(()=>({adjustStyleForScrollbar:(e,t)=>{let{direction:n}=t;const r=!g.current.style.width;if(e.clientHeight{i.isValidElement(e)?(e.props.disabled||("selectedMenu"===f&&e.props.selected||-1===_)&&(_=t),_===t&&(e.props.disabled||e.props.muiSkipListHighlight||e.type.muiSkipListHighlight)&&(_+=1,_>=l.length&&(_=-1))):_===t&&(_+=1,_>=l.length&&(_=-1))}));const M=i.Children.map(l,((e,t)=>{if(t===_){const t={};return a&&(t.autoFocus=!0),void 0===e.props.tabIndex&&"selectedMenu"===f&&(t.tabIndex=0),i.cloneElement(e,t)}return e}));return(0,v.jsx)(w,(0,r.A)({role:"menu",ref:b,className:c,onKeyDown:e=>{const t=g.current,n=e.key,r=(0,u.A)(t).activeElement;if("ArrowDown"===n)e.preventDefault(),O(t,r,h,d,k);else if("ArrowUp"===n)e.preventDefault(),O(t,r,h,d,E);else if("Home"===n)e.preventDefault(),O(t,null,h,d,k);else if("End"===n)e.preventDefault(),O(t,null,h,d,E);else if(1===n.length){const o=y.current,i=n.toLowerCase(),s=performance.now();o.keys.length>0&&(s-o.lastTime>500?(o.keys=[],o.repeating=!0,o.previousKeyMatched=!0):o.repeating&&i!==o.keys[0]&&(o.repeating=!1)),o.lastTime=s,o.keys.push(i);const a=r&&!o.repeating&&T(r,o);o.previousKeyMatched&&(a||O(t,r,!1,d,k,o))?e.preventDefault():o.previousKeyMatched=!1}p&&p(e)},tabIndex:s?0:-1},m,{children:M}))}));var P=n(74445),R=n(21209),N=n(70827),I=n(40165),L=n(44093),D=n(3511),j=n(62877),F=n(97603),B=n(67176),U=n(98727);function z(e,t){t?e.setAttribute("aria-hidden","true"):e.removeAttribute("aria-hidden")}function W(e){return parseInt((0,U.A)(e).getComputedStyle(e).paddingRight,10)||0}function V(e,t,n,r,o){const i=[t,n,...r];[].forEach.call(e.children,(e=>{const t=-1===i.indexOf(e),n=!function(e){const t=-1!==["TEMPLATE","SCRIPT","STYLE","LINK","MAP","META","NOSCRIPT","PICTURE","COL","COLGROUP","PARAM","SLOT","SOURCE","TRACK"].indexOf(e.tagName),n="INPUT"===e.tagName&&"hidden"===e.getAttribute("type");return t||n}(e);t&&n&&z(e,o)}))}function H(e,t){let n=-1;return e.some(((e,r)=>!!t(e)&&(n=r,!0))),n}function G(e,t){const n=[],r=e.container;if(!t.disableScrollLock){if(function(e){const t=(0,D.A)(e);return t.body===e?(0,U.A)(e).innerWidth>t.documentElement.clientWidth:e.scrollHeight>e.clientHeight}(r)){const e=_((0,D.A)(r));n.push({value:r.style.paddingRight,property:"padding-right",el:r}),r.style.paddingRight="".concat(W(r)+e,"px");const t=(0,D.A)(r).querySelectorAll(".mui-fixed");[].forEach.call(t,(t=>{n.push({value:t.style.paddingRight,property:"padding-right",el:t}),t.style.paddingRight="".concat(W(t)+e,"px")}))}let e;if(r.parentNode instanceof DocumentFragment)e=(0,D.A)(r).body;else{const t=r.parentElement,n=(0,U.A)(r);e="HTML"===(null==t?void 0:t.nodeName)&&"scroll"===n.getComputedStyle(t).overflowY?t:r}n.push({value:e.style.overflow,property:"overflow",el:e},{value:e.style.overflowX,property:"overflow-x",el:e},{value:e.style.overflowY,property:"overflow-y",el:e}),e.style.overflow="hidden"}return()=>{n.forEach((e=>{let{value:t,el:n,property:r}=e;t?n.style.setProperty(r,t):n.style.removeProperty(r)}))}}const q=new class{constructor(){this.containers=void 0,this.modals=void 0,this.modals=[],this.containers=[]}add(e,t){let n=this.modals.indexOf(e);if(-1!==n)return n;n=this.modals.length,this.modals.push(e),e.modalRef&&z(e.modalRef,!1);const r=function(e){const t=[];return[].forEach.call(e.children,(e=>{"true"===e.getAttribute("aria-hidden")&&t.push(e)})),t}(t);V(t,e.mount,e.modalRef,r,!0);const o=H(this.containers,(e=>e.container===t));return-1!==o?(this.containers[o].modals.push(e),n):(this.containers.push({modals:[e],container:t,restore:null,hiddenSiblings:r}),n)}mount(e,t){const n=H(this.containers,(t=>-1!==t.modals.indexOf(e))),r=this.containers[n];r.restore||(r.restore=G(r,t))}remove(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=this.modals.indexOf(e);if(-1===n)return n;const r=H(this.containers,(t=>-1!==t.modals.indexOf(e))),o=this.containers[r];if(o.modals.splice(o.modals.indexOf(e),1),this.modals.splice(n,1),0===o.modals.length)o.restore&&o.restore(),e.modalRef&&z(e.modalRef,t),V(o.container,e.mount,e.modalRef,o.hiddenSiblings,!1),this.containers.splice(r,1);else{const e=o.modals[o.modals.length-1];e.modalRef&&z(e.modalRef,!1)}return n}isTopModal(e){return this.modals.length>0&&this.modals[this.modals.length-1]===e}};function Y(e){const{container:t,disableEscapeKeyDown:n=!1,disableScrollLock:o=!1,manager:s=q,closeAfterTransition:a=!1,onTransitionEnter:l,onTransitionExited:c,children:u,onClose:d,open:h,rootRef:p}=e,f=i.useRef({}),m=i.useRef(null),g=i.useRef(null),v=(0,L.A)(g,p),[y,b]=i.useState(!h),w=function(e){return!!e&&e.props.hasOwnProperty("in")}(u);let _=!0;"false"!==e["aria-hidden"]&&!1!==e["aria-hidden"]||(_=!1);const x=()=>(f.current.modalRef=g.current,f.current.mount=m.current,f.current),S=()=>{s.mount(x(),{disableScrollLock:o}),g.current&&(g.current.scrollTop=0)},A=(0,j.A)((()=>{const e=function(e){return"function"===typeof e?e():e}(t)||(0,D.A)(m.current).body;s.add(x(),e),g.current&&S()})),C=i.useCallback((()=>s.isTopModal(x())),[s]),k=(0,j.A)((e=>{m.current=e,e&&(h&&C()?S():g.current&&z(g.current,_))})),E=i.useCallback((()=>{s.remove(x(),_)}),[_,s]);i.useEffect((()=>()=>{E()}),[E]),i.useEffect((()=>{h?A():w&&a||E()}),[h,E,w,a,A]);const T=e=>t=>{var r;null==(r=e.onKeyDown)||r.call(e,t),"Escape"===t.key&&229!==t.which&&C()&&(n||(t.stopPropagation(),d&&d(t,"escapeKeyDown")))},O=e=>t=>{var n;null==(n=e.onClick)||n.call(e,t),t.target===t.currentTarget&&d&&d(t,"backdropClick")};return{getRootProps:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const n=(0,B.h)(e);delete n.onTransitionEnter,delete n.onTransitionExited;const o=(0,r.A)({},n,t);return(0,r.A)({role:"presentation"},o,{onKeyDown:T(o),ref:v})},getBackdropProps:function(){const e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(0,r.A)({"aria-hidden":!0},e,{onClick:O(e),open:h})},getTransitionProps:()=>({onEnter:(0,F.A)((()=>{b(!1),l&&l()}),null==u?void 0:u.props.onEnter),onExited:(0,F.A)((()=>{b(!0),c&&c(),a&&E()}),null==u?void 0:u.props.onExited)}),rootRef:v,portalRef:k,isTopModal:C,exited:y,hasTransition:w}}const K=["input","select","textarea","a[href]","button","[tabindex]","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable="false"])'].join(",");function X(e){const t=[],n=[];return Array.from(e.querySelectorAll(K)).forEach(((e,r)=>{const o=function(e){const t=parseInt(e.getAttribute("tabindex")||"",10);return Number.isNaN(t)?"true"===e.contentEditable||("AUDIO"===e.nodeName||"VIDEO"===e.nodeName||"DETAILS"===e.nodeName)&&null===e.getAttribute("tabindex")?0:e.tabIndex:t}(e);-1!==o&&function(e){return!(e.disabled||"INPUT"===e.tagName&&"hidden"===e.type||function(e){if("INPUT"!==e.tagName||"radio"!==e.type)return!1;if(!e.name)return!1;const t=t=>e.ownerDocument.querySelector('input[type="radio"]'.concat(t));let n=t('[name="'.concat(e.name,'"]:checked'));return n||(n=t('[name="'.concat(e.name,'"]'))),n!==e}(e))}(e)&&(0===o?t.push(e):n.push({documentOrder:r,tabIndex:o,node:e}))})),n.sort(((e,t)=>e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex)).map((e=>e.node)).concat(t)}function $(){return!0}function Q(e){const{children:t,disableAutoFocus:n=!1,disableEnforceFocus:r=!1,disableRestoreFocus:o=!1,getTabbable:s=X,isEnabled:a=$,open:l}=e,c=i.useRef(!1),u=i.useRef(null),d=i.useRef(null),h=i.useRef(null),p=i.useRef(null),f=i.useRef(!1),m=i.useRef(null),g=(0,L.A)(t.ref,m),y=i.useRef(null);i.useEffect((()=>{l&&m.current&&(f.current=!n)}),[n,l]),i.useEffect((()=>{if(!l||!m.current)return;const e=(0,D.A)(m.current);return m.current.contains(e.activeElement)||(m.current.hasAttribute("tabIndex")||m.current.setAttribute("tabIndex","-1"),f.current&&m.current.focus()),()=>{o||(h.current&&h.current.focus&&(c.current=!0,h.current.focus()),h.current=null)}}),[l]),i.useEffect((()=>{if(!l||!m.current)return;const e=(0,D.A)(m.current),t=t=>{y.current=t,!r&&a()&&"Tab"===t.key&&e.activeElement===m.current&&t.shiftKey&&(c.current=!0,d.current&&d.current.focus())},n=()=>{const t=m.current;if(null===t)return;if(!e.hasFocus()||!a()||c.current)return void(c.current=!1);if(t.contains(e.activeElement))return;if(r&&e.activeElement!==u.current&&e.activeElement!==d.current)return;if(e.activeElement!==p.current)p.current=null;else if(null!==p.current)return;if(!f.current)return;let n=[];if(e.activeElement!==u.current&&e.activeElement!==d.current||(n=s(m.current)),n.length>0){var o,i;const e=Boolean((null==(o=y.current)?void 0:o.shiftKey)&&"Tab"===(null==(i=y.current)?void 0:i.key)),t=n[0],r=n[n.length-1];"string"!==typeof t&&"string"!==typeof r&&(e?r.focus():t.focus())}else t.focus()};e.addEventListener("focusin",n),e.addEventListener("keydown",t,!0);const o=setInterval((()=>{e.activeElement&&"BODY"===e.activeElement.tagName&&n()}),50);return()=>{clearInterval(o),e.removeEventListener("focusin",n),e.removeEventListener("keydown",t,!0)}}),[n,r,o,a,l,s]);const b=e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0};return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:u,"data-testid":"sentinelStart"}),i.cloneElement(t,{ref:g,onFocus:e=>{null===h.current&&(h.current=e.relatedTarget),f.current=!0,p.current=e.target;const n=t.props.onFocus;n&&n(e)}}),(0,v.jsx)("div",{tabIndex:l?0:-1,onFocus:b,ref:d,"data-testid":"sentinelEnd"})]})}var Z=n(5187),J=n(32448),ee=n(14857),te=n(70576);const ne=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],re={entering:{opacity:1},entered:{opacity:1}},oe=i.forwardRef((function(e,t){const n=(0,ee.A)(),s={enter:n.transitions.duration.enteringScreen,exit:n.transitions.duration.leavingScreen},{addEndListener:a,appear:l=!0,children:c,easing:u,in:d,onEnter:h,onEntered:p,onEntering:f,onExit:m,onExited:g,onExiting:y,style:b,timeout:w=s,TransitionComponent:_=J.Ay}=e,x=(0,o.A)(e,ne),A=i.useRef(null),C=(0,S.A)(A,c.ref,t),k=e=>t=>{if(e){const n=A.current;void 0===t?e(n):e(n,t)}},E=k(f),T=k(((e,t)=>{(0,te.q)(e);const r=(0,te.c)({style:b,timeout:w,easing:u},{mode:"enter"});e.style.webkitTransition=n.transitions.create("opacity",r),e.style.transition=n.transitions.create("opacity",r),h&&h(e,t)})),O=k(p),M=k(y),P=k((e=>{const t=(0,te.c)({style:b,timeout:w,easing:u},{mode:"exit"});e.style.webkitTransition=n.transitions.create("opacity",t),e.style.transition=n.transitions.create("opacity",t),m&&m(e)})),R=k(g);return(0,v.jsx)(_,(0,r.A)({appear:l,in:d,nodeRef:A,onEnter:T,onEntered:O,onEntering:E,onExit:P,onExited:R,onExiting:M,addEndListener:e=>{a&&a(A.current,e)},timeout:w},x,{children:(e,t)=>i.cloneElement(c,(0,r.A)({style:(0,r.A)({opacity:0,visibility:"exited"!==e||d?void 0:"hidden"},re[e],b,c.props.style),ref:C},t))}))}));function ie(e){return(0,m.Ay)("MuiBackdrop",e)}(0,f.A)("MuiBackdrop",["root","invisible"]);const se=["children","className","component","components","componentsProps","invisible","open","slotProps","slots","TransitionComponent","transitionDuration"],ae=(0,d.Ay)("div",{name:"MuiBackdrop",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.invisible&&t.invisible]}})((e=>{let{ownerState:t}=e;return(0,r.A)({position:"fixed",display:"flex",alignItems:"center",justifyContent:"center",right:0,bottom:0,top:0,left:0,backgroundColor:"rgba(0, 0, 0, 0.5)",WebkitTapHighlightColor:"transparent"},t.invisible&&{backgroundColor:"transparent"})})),le=i.forwardRef((function(e,t){var n,i,l;const c=(0,h.A)({props:e,name:"MuiBackdrop"}),{children:u,className:d,component:p="div",components:f={},componentsProps:m={},invisible:g=!1,open:y,slotProps:b={},slots:w={},TransitionComponent:_=oe,transitionDuration:x}=c,S=(0,o.A)(c,se),A=(0,r.A)({},c,{component:p,invisible:g}),C=(e=>{const{classes:t,invisible:n}=e,r={root:["root",n&&"invisible"]};return(0,a.A)(r,ie,t)})(A),k=null!=(n=b.root)?n:m.root;return(0,v.jsx)(_,(0,r.A)({in:y,timeout:x},S,{children:(0,v.jsx)(ae,(0,r.A)({"aria-hidden":!0},k,{as:null!=(i=null!=(l=w.root)?l:f.Root)?i:p,className:(0,s.A)(C.root,d,null==k?void 0:k.className),ownerState:(0,r.A)({},A,null==k?void 0:k.ownerState),classes:C,ref:t,children:u}))}))}));function ce(e){return(0,m.Ay)("MuiModal",e)}(0,f.A)("MuiModal",["root","hidden","backdrop"]);const ue=["BackdropComponent","BackdropProps","classes","className","closeAfterTransition","children","container","component","components","componentsProps","disableAutoFocus","disableEnforceFocus","disableEscapeKeyDown","disablePortal","disableRestoreFocus","disableScrollLock","hideBackdrop","keepMounted","onBackdropClick","onClose","onTransitionEnter","onTransitionExited","open","slotProps","slots","theme"],de=(0,d.Ay)("div",{name:"MuiModal",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,!n.open&&n.exited&&t.hidden]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({position:"fixed",zIndex:(t.vars||t).zIndex.modal,right:0,bottom:0,top:0,left:0},!n.open&&n.exited&&{visibility:"hidden"})})),he=(0,d.Ay)(le,{name:"MuiModal",slot:"Backdrop",overridesResolver:(e,t)=>t.backdrop})({zIndex:-1}),pe=i.forwardRef((function(e,t){var n,c,u,d,p,f;const m=(0,h.A)({name:"MuiModal",props:e}),{BackdropComponent:g=he,BackdropProps:y,className:b,closeAfterTransition:w=!1,children:_,container:x,component:S,components:A={},componentsProps:C={},disableAutoFocus:k=!1,disableEnforceFocus:E=!1,disableEscapeKeyDown:T=!1,disablePortal:O=!1,disableRestoreFocus:M=!1,disableScrollLock:P=!1,hideBackdrop:R=!1,keepMounted:N=!1,onBackdropClick:I,open:L,slotProps:D,slots:j}=m,F=(0,o.A)(m,ue),B=(0,r.A)({},m,{closeAfterTransition:w,disableAutoFocus:k,disableEnforceFocus:E,disableEscapeKeyDown:T,disablePortal:O,disableRestoreFocus:M,disableScrollLock:P,hideBackdrop:R,keepMounted:N}),{getRootProps:U,getBackdropProps:z,getTransitionProps:W,portalRef:V,isTopModal:H,exited:G,hasTransition:q}=Y((0,r.A)({},B,{rootRef:t})),K=(0,r.A)({},B,{exited:G}),X=(e=>{const{open:t,exited:n,classes:r}=e,o={root:["root",!t&&n&&"hidden"],backdrop:["backdrop"]};return(0,a.A)(o,ce,r)})(K),$={};if(void 0===_.props.tabIndex&&($.tabIndex="-1"),q){const{onEnter:e,onExited:t}=W();$.onEnter=e,$.onExited=t}const J=null!=(n=null!=(c=null==j?void 0:j.root)?c:A.Root)?n:de,ee=null!=(u=null!=(d=null==j?void 0:j.backdrop)?d:A.Backdrop)?u:g,te=null!=(p=null==D?void 0:D.root)?p:C.root,ne=null!=(f=null==D?void 0:D.backdrop)?f:C.backdrop,re=(0,l.Q)({elementType:J,externalSlotProps:te,externalForwardedProps:F,getSlotProps:U,additionalProps:{ref:t,as:S},ownerState:K,className:(0,s.A)(b,null==te?void 0:te.className,null==X?void 0:X.root,!K.open&&K.exited&&(null==X?void 0:X.hidden))}),oe=(0,l.Q)({elementType:ee,externalSlotProps:ne,additionalProps:y,getSlotProps:e=>z((0,r.A)({},e,{onClick:t=>{I&&I(t),null!=e&&e.onClick&&e.onClick(t)}})),className:(0,s.A)(null==ne?void 0:ne.className,null==y?void 0:y.className,null==X?void 0:X.backdrop),ownerState:K});return N||L||q&&!G?(0,v.jsx)(Z.Z,{ref:V,container:x,disablePortal:O,children:(0,v.jsxs)(J,(0,r.A)({},re,{children:[!R&&g?(0,v.jsx)(ee,(0,r.A)({},oe)):null,(0,v.jsx)(Q,{disableEnforceFocus:E,disableAutoFocus:k,disableRestoreFocus:M,isEnabled:H,open:L,children:i.cloneElement(_,$)})]}))}):null}));var fe=n(2235);function me(e){return(0,m.Ay)("MuiPopover",e)}(0,f.A)("MuiPopover",["root","paper"]);const ge=["onEntering"],ve=["action","anchorEl","anchorOrigin","anchorPosition","anchorReference","children","className","container","elevation","marginThreshold","open","PaperProps","slots","slotProps","transformOrigin","TransitionComponent","transitionDuration","TransitionProps","disableScrollLock"],ye=["slotProps"];function be(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.height/2:"bottom"===t&&(n=e.height),n}function we(e,t){let n=0;return"number"===typeof t?n=t:"center"===t?n=e.width/2:"right"===t&&(n=e.width),n}function _e(e){return[e.horizontal,e.vertical].map((e=>"number"===typeof e?"".concat(e,"px"):e)).join(" ")}function xe(e){return"function"===typeof e?e():e}const Se=(0,d.Ay)(pe,{name:"MuiPopover",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ae=(0,d.Ay)(fe.A,{name:"MuiPopover",slot:"Paper",overridesResolver:(e,t)=>t.paper})({position:"absolute",overflowY:"auto",overflowX:"hidden",minWidth:16,minHeight:16,maxWidth:"calc(100% - 32px)",maxHeight:"calc(100% - 32px)",outline:0}),Ce=i.forwardRef((function(e,t){var n,c,d;const p=(0,h.A)({props:e,name:"MuiPopover"}),{action:f,anchorEl:m,anchorOrigin:g={vertical:"top",horizontal:"left"},anchorPosition:y,anchorReference:b="anchorEl",children:w,className:_,container:x,elevation:A=8,marginThreshold:C=16,open:k,PaperProps:E={},slots:T,slotProps:O,transformOrigin:M={vertical:"top",horizontal:"left"},TransitionComponent:L=I.A,transitionDuration:D="auto",TransitionProps:{onEntering:j}={},disableScrollLock:F=!1}=p,B=(0,o.A)(p.TransitionProps,ge),U=(0,o.A)(p,ve),z=null!=(n=null==O?void 0:O.paper)?n:E,W=i.useRef(),V=(0,S.A)(W,z.ref),H=(0,r.A)({},p,{anchorOrigin:g,anchorReference:b,elevation:A,marginThreshold:C,externalPaperSlotProps:z,transformOrigin:M,TransitionComponent:L,transitionDuration:D,TransitionProps:B}),G=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"],paper:["paper"]},me,t)})(H),q=i.useCallback((()=>{if("anchorPosition"===b)return y;const e=xe(m),t=(e&&1===e.nodeType?e:(0,u.A)(W.current).body).getBoundingClientRect();return{top:t.top+be(t,g.vertical),left:t.left+we(t,g.horizontal)}}),[m,g.horizontal,g.vertical,y,b]),Y=i.useCallback((e=>({vertical:be(e,M.vertical),horizontal:we(e,M.horizontal)})),[M.horizontal,M.vertical]),K=i.useCallback((e=>{const t={width:e.offsetWidth,height:e.offsetHeight},n=Y(t);if("none"===b)return{top:null,left:null,transformOrigin:_e(n)};const r=q();let o=r.top-n.vertical,i=r.left-n.horizontal;const s=o+t.height,a=i+t.width,l=(0,N.A)(xe(m)),c=l.innerHeight-C,u=l.innerWidth-C;if(null!==C&&oc){const e=s-c;o-=e,n.vertical+=e}if(null!==C&&iu){const e=a-u;i-=e,n.horizontal+=e}return{top:"".concat(Math.round(o),"px"),left:"".concat(Math.round(i),"px"),transformOrigin:_e(n)}}),[m,b,q,Y,C]),[X,$]=i.useState(k),Q=i.useCallback((()=>{const e=W.current;if(!e)return;const t=K(e);null!==t.top&&(e.style.top=t.top),null!==t.left&&(e.style.left=t.left),e.style.transformOrigin=t.transformOrigin,$(!0)}),[K]);i.useEffect((()=>(F&&window.addEventListener("scroll",Q),()=>window.removeEventListener("scroll",Q))),[m,F,Q]);i.useEffect((()=>{k&&Q()})),i.useImperativeHandle(f,(()=>k?{updatePosition:()=>{Q()}}:null),[k,Q]),i.useEffect((()=>{if(!k)return;const e=(0,R.A)((()=>{Q()})),t=(0,N.A)(m);return t.addEventListener("resize",e),()=>{e.clear(),t.removeEventListener("resize",e)}}),[m,k,Q]);let Z=D;"auto"!==D||L.muiSupportAuto||(Z=void 0);const J=x||(m?(0,u.A)(xe(m)).body:void 0),ee=null!=(c=null==T?void 0:T.root)?c:Se,te=null!=(d=null==T?void 0:T.paper)?d:Ae,ne=(0,l.Q)({elementType:te,externalSlotProps:(0,r.A)({},z,{style:X?z.style:(0,r.A)({},z.style,{opacity:0})}),additionalProps:{elevation:A,ref:V},ownerState:H,className:(0,s.A)(G.paper,null==z?void 0:z.className)}),re=(0,l.Q)({elementType:ee,externalSlotProps:(null==O?void 0:O.root)||{},externalForwardedProps:U,additionalProps:{ref:t,slotProps:{backdrop:{invisible:!0}},container:J,open:k},ownerState:H,className:(0,s.A)(G.root,_)}),{slotProps:oe}=re,ie=(0,o.A)(re,ye);return(0,v.jsx)(ee,(0,r.A)({},ie,!(0,P.g)(ee)&&{slotProps:oe,disableScrollLock:F},{children:(0,v.jsx)(L,(0,r.A)({appear:!0,in:k,onEntering:(e,t)=>{j&&j(e,t),Q()},onExited:()=>{$(!1)},timeout:Z},B,{children:(0,v.jsx)(te,(0,r.A)({},ne,{children:w}))}))}))}));var ke=n(19608);function Ee(e){return(0,m.Ay)("MuiMenu",e)}(0,f.A)("MuiMenu",["root","paper","list"]);const Te=["onEntering"],Oe=["autoFocus","children","className","disableAutoFocusItem","MenuListProps","onClose","open","PaperProps","PopoverClasses","transitionDuration","TransitionProps","variant","slots","slotProps"],Me={vertical:"top",horizontal:"right"},Pe={vertical:"top",horizontal:"left"},Re=(0,d.Ay)(Ce,{shouldForwardProp:e=>(0,ke.A)(e)||"classes"===e,name:"MuiMenu",slot:"Root",overridesResolver:(e,t)=>t.root})({}),Ne=(0,d.Ay)(Ae,{name:"MuiMenu",slot:"Paper",overridesResolver:(e,t)=>t.paper})({maxHeight:"calc(100% - 96px)",WebkitOverflowScrolling:"touch"}),Ie=(0,d.Ay)(M,{name:"MuiMenu",slot:"List",overridesResolver:(e,t)=>t.list})({outline:0}),Le=i.forwardRef((function(e,t){var n,u;const d=(0,h.A)({props:e,name:"MuiMenu"}),{autoFocus:p=!0,children:f,className:m,disableAutoFocusItem:g=!1,MenuListProps:y={},onClose:b,open:w,PaperProps:_={},PopoverClasses:x,transitionDuration:S="auto",TransitionProps:{onEntering:A}={},variant:C="selectedMenu",slots:k={},slotProps:E={}}=d,T=(0,o.A)(d.TransitionProps,Te),O=(0,o.A)(d,Oe),M=(0,c.I)(),P=(0,r.A)({},d,{autoFocus:p,disableAutoFocusItem:g,MenuListProps:y,onEntering:A,PaperProps:_,transitionDuration:S,TransitionProps:T,variant:C}),R=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"],paper:["paper"],list:["list"]},Ee,t)})(P),N=p&&!g&&w,I=i.useRef(null);let L=-1;i.Children.map(f,((e,t)=>{i.isValidElement(e)&&(e.props.disabled||("selectedMenu"===C&&e.props.selected||-1===L)&&(L=t))}));const D=null!=(n=k.paper)?n:Ne,j=null!=(u=E.paper)?u:_,F=(0,l.Q)({elementType:k.root,externalSlotProps:E.root,ownerState:P,className:[R.root,m]}),B=(0,l.Q)({elementType:D,externalSlotProps:j,ownerState:P,className:R.paper});return(0,v.jsx)(Re,(0,r.A)({onClose:b,anchorOrigin:{vertical:"bottom",horizontal:M?"right":"left"},transformOrigin:M?Me:Pe,slots:{paper:D,root:k.root},slotProps:{root:F,paper:B},open:w,ref:t,transitionDuration:S,TransitionProps:(0,r.A)({onEntering:(e,t)=>{I.current&&I.current.adjustStyleForScrollbar(e,{direction:M?"rtl":"ltr"}),A&&A(e,t)}},T),ownerState:P},O,{classes:x,children:(0,v.jsx)(Ie,(0,r.A)({onKeyDown:e=>{"Tab"===e.key&&(e.preventDefault(),b&&b(e,"tabKeyDown"))},actions:I,autoFocus:p&&(-1===L||g),autoFocusItem:N,variant:C},y,{className:(0,s.A)(R.list,y.className),children:f}))}))}))},2235:(e,t,n)=>{"use strict";n.d(t,{A:()=>y});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(74061),l=n(99269),c=n(59254);const u=e=>{let t;return t=e<1?5.11916*e**2:4.5*Math.log(e+1)+2,(t/100).toFixed(2)};var d=n(48283),h=n(80863),p=n(68483);function f(e){return(0,p.Ay)("MuiPaper",e)}(0,h.A)("MuiPaper",["root","rounded","outlined","elevation","elevation0","elevation1","elevation2","elevation3","elevation4","elevation5","elevation6","elevation7","elevation8","elevation9","elevation10","elevation11","elevation12","elevation13","elevation14","elevation15","elevation16","elevation17","elevation18","elevation19","elevation20","elevation21","elevation22","elevation23","elevation24"]);var m=n(44414);const g=["className","component","elevation","square","variant"],v=(0,c.Ay)("div",{name:"MuiPaper",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t[n.variant],!n.square&&t.rounded,"elevation"===n.variant&&t["elevation".concat(n.elevation)]]}})((e=>{let{theme:t,ownerState:n}=e;var r;return(0,o.A)({backgroundColor:(t.vars||t).palette.background.paper,color:(t.vars||t).palette.text.primary,transition:t.transitions.create("box-shadow")},!n.square&&{borderRadius:t.shape.borderRadius},"outlined"===n.variant&&{border:"1px solid ".concat((t.vars||t).palette.divider)},"elevation"===n.variant&&(0,o.A)({boxShadow:(t.vars||t).shadows[n.elevation]},!t.vars&&"dark"===t.palette.mode&&{backgroundImage:"linear-gradient(".concat((0,l.X4)("#fff",u(n.elevation)),", ").concat((0,l.X4)("#fff",u(n.elevation)),")")},t.vars&&{backgroundImage:null==(r=t.vars.overlays)?void 0:r[n.elevation]}))})),y=i.forwardRef((function(e,t){const n=(0,d.A)({props:e,name:"MuiPaper"}),{className:i,component:l="div",elevation:c=1,square:u=!1,variant:h="elevation"}=n,p=(0,r.A)(n,g),y=(0,o.A)({},n,{component:l,elevation:c,square:u,variant:h}),b=(e=>{const{square:t,elevation:n,variant:r,classes:o}=e,i={root:["root",r,!t&&"rounded","elevation"===r&&"elevation".concat(n)]};return(0,a.A)(i,f,o)})(y);return(0,m.jsx)(v,(0,o.A)({as:l,ownerState:y,className:(0,s.A)(b.root,i),ref:t},p))}))},60123:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>ne});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(43161),l=n(74445),c=n(74061),u=n(3511),d=n(9543),h=n(68935),p=n(63755),f=n(44093),m=n(14131),g=n(62877);const v={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",whiteSpace:"nowrap",width:"1px"};var y=n(67176);function b(e,t){return e-t}function w(e,t){var n;const{index:r}=null!=(n=e.reduce(((e,n,r)=>{const o=Math.abs(t-n);return null===e||o2&&void 0!==arguments[2]?arguments[2]:(e,t)=>e===t;return e.length===t.length&&e.every(((e,r)=>n(e,t[r])))}(e,t)}const E={horizontal:{offset:e=>({left:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},"horizontal-reverse":{offset:e=>({right:"".concat(e,"%")}),leap:e=>({width:"".concat(e,"%")})},vertical:{offset:e=>({bottom:"".concat(e,"%")}),leap:e=>({height:"".concat(e,"%")})}},T=e=>e;let O;function M(){return void 0===O&&(O="undefined"===typeof CSS||"function"!==typeof CSS.supports||CSS.supports("touch-action","none")),O}function P(e){const{"aria-labelledby":t,defaultValue:n,disabled:r=!1,disableSwap:s=!1,isRtl:a=!1,marks:l=!1,max:c=100,min:O=0,name:P,onChange:R,onChangeCommitted:N,orientation:I="horizontal",rootRef:L,scale:D=T,step:j=1,shiftStep:F=10,tabIndex:B,value:U}=e,z=i.useRef(),[W,V]=i.useState(-1),[H,G]=i.useState(-1),[q,Y]=i.useState(!1),K=i.useRef(0),[X,$]=(0,d.A)({controlled:U,default:null!=n?n:O,name:"Slider"}),Q=R&&((e,t,n)=>{const r=e.nativeEvent||e,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:t,name:P}}),R(o,t,n)}),Z=Array.isArray(X);let J=Z?X.slice().sort(b):[X];J=J.map((e=>null==e?O:(0,h.A)(e,O,c)));const ee=!0===l&&null!==j?[...Array(Math.floor((c-O)/j)+1)].map(((e,t)=>({value:O+j*t}))):l||[],te=ee.map((e=>e.value)),{isFocusVisibleRef:ne,onBlur:re,onFocus:oe,ref:ie}=(0,p.A)(),[se,ae]=i.useState(-1),le=i.useRef(),ce=(0,f.A)(ie,le),ue=(0,f.A)(L,ce),de=e=>t=>{var n;const r=Number(t.currentTarget.getAttribute("data-index"));oe(t),!0===ne.current&&ae(r),G(r),null==e||null==(n=e.onFocus)||n.call(e,t)},he=e=>t=>{var n;re(t),!1===ne.current&&ae(-1),G(-1),null==e||null==(n=e.onBlur)||n.call(e,t)},pe=(e,t)=>{const n=Number(e.currentTarget.getAttribute("data-index")),r=J[n],o=te.indexOf(r);let i=t;if(ee&&null==j){const e=te[te.length-1];i=i>e?e:it=>{var n;if(null!==j){const e=Number(t.currentTarget.getAttribute("data-index")),n=J[e];let r=null;("ArrowLeft"===t.key||"ArrowDown"===t.key)&&t.shiftKey||"PageDown"===t.key?r=Math.max(n-F,O):(("ArrowRight"===t.key||"ArrowUp"===t.key)&&t.shiftKey||"PageUp"===t.key)&&(r=Math.min(n+F,c)),null!==r&&(pe(t,r),t.preventDefault())}null==e||null==(n=e.onKeyDown)||n.call(e,t)};(0,m.A)((()=>{var e;r&&le.current.contains(document.activeElement)&&(null==(e=document.activeElement)||e.blur())}),[r]),r&&-1!==W&&V(-1),r&&-1!==se&&ae(-1);const me=i.useRef();let ge=I;a&&"horizontal"===I&&(ge+="-reverse");const ve=e=>{let{finger:t,move:n=!1}=e;const{current:r}=le,{width:o,height:i,bottom:a,left:l}=r.getBoundingClientRect();let u,d;if(u=0===ge.indexOf("vertical")?(a-t.y)/i:(t.x-l)/o,-1!==ge.indexOf("-reverse")&&(u=1-u),d=function(e,t,n){return(n-t)*e+t}(u,O,c),j)d=S(d,j,O);else{const e=w(te,d);d=te[e]}d=(0,h.A)(d,O,c);let p=0;if(Z){p=n?me.current:w(J,d),s&&(d=(0,h.A)(d,J[p-1]||-1/0,J[p+1]||1/0));const e=d;d=A({values:J,newValue:d,index:p}),s&&n||(p=d.indexOf(e),me.current=p)}return{newValue:d,activeIndex:p}},ye=(0,g.A)((e=>{const t=_(e,z);if(!t)return;if(K.current+=1,"mousemove"===e.type&&0===e.buttons)return void be(e);const{newValue:n,activeIndex:r}=ve({finger:t,move:!0});C({sliderRef:le,activeIndex:r,setActive:V}),$(n),!q&&K.current>2&&Y(!0),Q&&!k(n,X)&&Q(e,n,r)})),be=(0,g.A)((e=>{const t=_(e,z);if(Y(!1),!t)return;const{newValue:n}=ve({finger:t,move:!0});V(-1),"touchend"===e.type&&G(-1),N&&N(e,n),z.current=void 0,_e()})),we=(0,g.A)((e=>{if(r)return;M()||e.preventDefault();const t=e.changedTouches[0];null!=t&&(z.current=t.identifier);const n=_(e,z);if(!1!==n){const{newValue:t,activeIndex:r}=ve({finger:n});C({sliderRef:le,activeIndex:r,setActive:V}),$(t),Q&&!k(t,X)&&Q(e,t,r)}K.current=0;const o=(0,u.A)(le.current);o.addEventListener("touchmove",ye,{passive:!0}),o.addEventListener("touchend",be,{passive:!0})})),_e=i.useCallback((()=>{const e=(0,u.A)(le.current);e.removeEventListener("mousemove",ye),e.removeEventListener("mouseup",be),e.removeEventListener("touchmove",ye),e.removeEventListener("touchend",be)}),[be,ye]);i.useEffect((()=>{const{current:e}=le;return e.addEventListener("touchstart",we,{passive:M()}),()=>{e.removeEventListener("touchstart",we),_e()}}),[_e,we]),i.useEffect((()=>{r&&_e()}),[r,_e]);const xe=x(Z?J[0]:O,O,c),Se=x(J[J.length-1],O,c)-xe,Ae=e=>t=>{var n;null==(n=e.onMouseLeave)||n.call(e,t),G(-1)};return{active:W,axis:ge,axisProps:E,dragging:q,focusedThumbIndex:se,getHiddenInputProps:function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var i;const s=(0,y.h)(n),l={onChange:(u=s||{},e=>{var t;null==(t=u.onChange)||t.call(u,e),pe(e,e.target.valueAsNumber)}),onFocus:de(s||{}),onBlur:he(s||{}),onKeyDown:fe(s||{})};var u;const d=(0,o.A)({},s,l);return(0,o.A)({tabIndex:B,"aria-labelledby":t,"aria-orientation":I,"aria-valuemax":D(c),"aria-valuemin":D(O),name:P,type:"range",min:e.min,max:e.max,step:null===e.step&&e.marks?"any":null!=(i=e.step)?i:void 0,disabled:r},n,d,{style:(0,o.A)({},v,{direction:a?"rtl":"ltr",width:"100%",height:"100%"})})},getRootProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,y.h)(e),n={onMouseDown:(i=t||{},e=>{var t;if(null==(t=i.onMouseDown)||t.call(i,e),r)return;if(e.defaultPrevented)return;if(0!==e.button)return;e.preventDefault();const n=_(e,z);if(!1!==n){const{newValue:t,activeIndex:r}=ve({finger:n});C({sliderRef:le,activeIndex:r,setActive:V}),$(t),Q&&!k(t,X)&&Q(e,t,r)}K.current=0;const o=(0,u.A)(le.current);o.addEventListener("mousemove",ye,{passive:!0}),o.addEventListener("mouseup",be)})};var i;const s=(0,o.A)({},t,n);return(0,o.A)({},e,{ref:ue},s)},getThumbProps:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=(0,y.h)(e),n={onMouseOver:(r=t||{},e=>{var t;null==(t=r.onMouseOver)||t.call(r,e);const n=Number(e.currentTarget.getAttribute("data-index"));G(n)}),onMouseLeave:Ae(t||{})};var r;return(0,o.A)({},e,t,n)},marks:ee,open:H,range:Z,rootRef:ue,trackLeap:Se,trackOffset:xe,values:J,getThumbStyle:e=>({pointerEvents:-1!==W&&W!==e?"none":void 0})}}var R=n(99269),N=n(44730),I=n(74719),L=n(59254),D=n(61960);const j=e=>!e||!(0,l.g)(e);var F=n(61676),B=n(80863),U=n(68483);function z(e){return(0,U.Ay)("MuiSlider",e)}const W=(0,B.A)("MuiSlider",["root","active","colorPrimary","colorSecondary","colorError","colorInfo","colorSuccess","colorWarning","disabled","dragging","focusVisible","mark","markActive","marked","markLabel","markLabelActive","rail","sizeSmall","thumb","thumbColorPrimary","thumbColorSecondary","thumbColorError","thumbColorSuccess","thumbColorInfo","thumbColorWarning","track","trackInverted","trackFalse","thumbSizeSmall","valueLabel","valueLabelOpen","valueLabelCircle","valueLabelLabel","vertical"]);var V=n(44414);const H=["aria-label","aria-valuetext","aria-labelledby","component","components","componentsProps","color","classes","className","disableSwap","disabled","getAriaLabel","getAriaValueText","marks","max","min","name","onChange","onChangeCommitted","orientation","shiftStep","size","step","scale","slotProps","slots","tabIndex","track","value","valueLabelDisplay","valueLabelFormat"],G=(0,I.h)("MuiSlider");function q(e){return e}const Y=(0,L.Ay)("span",{name:"MuiSlider",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,t["color".concat((0,F.A)(n.color))],"medium"!==n.size&&t["size".concat((0,F.A)(n.size))],n.marked&&t.marked,"vertical"===n.orientation&&t.vertical,"inverted"===n.track&&t.trackInverted,!1===n.track&&t.trackFalse]}})((e=>{let{theme:t}=e;var n;return{borderRadius:12,boxSizing:"content-box",display:"inline-block",position:"relative",cursor:"pointer",touchAction:"none",WebkitTapHighlightColor:"transparent","@media print":{colorAdjust:"exact"},["&.".concat(W.disabled)]:{pointerEvents:"none",cursor:"default",color:(t.vars||t).palette.grey[400]},["&.".concat(W.dragging)]:{["& .".concat(W.thumb,", & .").concat(W.track)]:{transition:"none"}},variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e},style:{color:(t.vars||t).palette[e].main}}))),{props:{orientation:"horizontal"},style:{height:4,width:"100%",padding:"13px 0","@media (pointer: coarse)":{padding:"20px 0"}}},{props:{orientation:"horizontal",size:"small"},style:{height:2}},{props:{orientation:"horizontal",marked:!0},style:{marginBottom:20}},{props:{orientation:"vertical"},style:{height:"100%",width:4,padding:"0 13px","@media (pointer: coarse)":{padding:"0 20px"}}},{props:{orientation:"vertical",size:"small"},style:{width:2}},{props:{orientation:"vertical",marked:!0},style:{marginRight:44}}]}})),K=(0,L.Ay)("span",{name:"MuiSlider",slot:"Rail",overridesResolver:(e,t)=>t.rail})({display:"block",position:"absolute",borderRadius:"inherit",backgroundColor:"currentColor",opacity:.38,variants:[{props:{orientation:"horizontal"},style:{width:"100%",height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{height:"100%",width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:"inverted"},style:{opacity:1}}]}),X=(0,L.Ay)("span",{name:"MuiSlider",slot:"Track",overridesResolver:(e,t)=>t.track})((e=>{let{theme:t}=e;var n;return{display:"block",position:"absolute",borderRadius:"inherit",border:"1px solid currentColor",backgroundColor:"currentColor",transition:t.transitions.create(["left","width","bottom","height"],{duration:t.transitions.duration.shortest}),variants:[{props:{size:"small"},style:{border:"none"}},{props:{orientation:"horizontal"},style:{height:"inherit",top:"50%",transform:"translateY(-50%)"}},{props:{orientation:"vertical"},style:{width:"inherit",left:"50%",transform:"translateX(-50%)"}},{props:{track:!1},style:{display:"none"}},...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e,track:"inverted"},style:(0,o.A)({},t.vars?{backgroundColor:t.vars.palette.Slider["".concat(e,"Track")],borderColor:t.vars.palette.Slider["".concat(e,"Track")]}:(0,o.A)({backgroundColor:(0,R.a)(t.palette[e].main,.62),borderColor:(0,R.a)(t.palette[e].main,.62)},t.applyStyles("dark",{backgroundColor:(0,R.e$)(t.palette[e].main,.5)}),t.applyStyles("dark",{borderColor:(0,R.e$)(t.palette[e].main,.5)})))})))]}})),$=(0,L.Ay)("span",{name:"MuiSlider",slot:"Thumb",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.thumb,t["thumbColor".concat((0,F.A)(n.color))],"medium"!==n.size&&t["thumbSize".concat((0,F.A)(n.size))]]}})((e=>{let{theme:t}=e;var n;return{position:"absolute",width:20,height:20,boxSizing:"border-box",borderRadius:"50%",outline:0,backgroundColor:"currentColor",display:"flex",alignItems:"center",justifyContent:"center",transition:t.transitions.create(["box-shadow","left","bottom"],{duration:t.transitions.duration.shortest}),"&::before":{position:"absolute",content:'""',borderRadius:"inherit",width:"100%",height:"100%",boxShadow:(t.vars||t).shadows[2]},"&::after":{position:"absolute",content:'""',borderRadius:"50%",width:42,height:42,top:"50%",left:"50%",transform:"translate(-50%, -50%)"},["&.".concat(W.disabled)]:{"&:hover":{boxShadow:"none"}},variants:[...Object.keys((null!=(n=t.vars)?n:t).palette).filter((e=>{var n;return(null!=(n=t.vars)?n:t).palette[e].main})).map((e=>({props:{color:e},style:{["&:hover, &.".concat(W.focusVisible)]:(0,o.A)({},t.vars?{boxShadow:"0px 0px 0px 8px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)")}:{boxShadow:"0px 0px 0px 8px ".concat((0,R.X4)(t.palette[e].main,.16))},{"@media (hover: none)":{boxShadow:"none"}}),["&.".concat(W.active)]:(0,o.A)({},t.vars?{boxShadow:"0px 0px 0px 14px rgba(".concat(t.vars.palette[e].mainChannel," / 0.16)}")}:{boxShadow:"0px 0px 0px 14px ".concat((0,R.X4)(t.palette[e].main,.16))})}}))),{props:{size:"small"},style:{width:12,height:12,"&::before":{boxShadow:"none"}}},{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-50%, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 50%)"}}]}})),Q=(0,L.Ay)((function(e){const{children:t,className:n,value:r}=e,o=(e=>{const{open:t}=e;return{offset:(0,s.A)(t&&W.valueLabelOpen),circle:W.valueLabelCircle,label:W.valueLabelLabel}})(e);return t?i.cloneElement(t,{className:(0,s.A)(t.props.className)},(0,V.jsxs)(i.Fragment,{children:[t.props.children,(0,V.jsx)("span",{className:(0,s.A)(o.offset,n),"aria-hidden":!0,children:(0,V.jsx)("span",{className:o.circle,children:(0,V.jsx)("span",{className:o.label,children:r})})})]})):null}),{name:"MuiSlider",slot:"ValueLabel",overridesResolver:(e,t)=>t.valueLabel})((e=>{let{theme:t}=e;return(0,o.A)({zIndex:1,whiteSpace:"nowrap"},t.typography.body2,{fontWeight:500,transition:t.transitions.create(["transform"],{duration:t.transitions.duration.shortest}),position:"absolute",backgroundColor:(t.vars||t).palette.grey[600],borderRadius:2,color:(t.vars||t).palette.common.white,display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.75rem",variants:[{props:{orientation:"horizontal"},style:{transform:"translateY(-100%) scale(0)",top:"-10px",transformOrigin:"bottom center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, 50%) rotate(45deg)",backgroundColor:"inherit",bottom:0,left:"50%"},["&.".concat(W.valueLabelOpen)]:{transform:"translateY(-100%) scale(1)"}}},{props:{orientation:"vertical"},style:{transform:"translateY(-50%) scale(0)",right:"30px",top:"50%",transformOrigin:"right center","&::before":{position:"absolute",content:'""',width:8,height:8,transform:"translate(-50%, -50%) rotate(45deg)",backgroundColor:"inherit",right:-8,top:"50%"},["&.".concat(W.valueLabelOpen)]:{transform:"translateY(-50%) scale(1)"}}},{props:{size:"small"},style:{fontSize:t.typography.pxToRem(12),padding:"0.25rem 0.5rem"}},{props:{orientation:"vertical",size:"small"},style:{right:"20px"}}]})})),Z=(0,L.Ay)("span",{name:"MuiSlider",slot:"Mark",shouldForwardProp:e=>(0,D.A)(e)&&"markActive"!==e,overridesResolver:(e,t)=>{const{markActive:n}=e;return[t.mark,n&&t.markActive]}})((e=>{let{theme:t}=e;return{position:"absolute",width:2,height:2,borderRadius:1,backgroundColor:"currentColor",variants:[{props:{orientation:"horizontal"},style:{top:"50%",transform:"translate(-1px, -50%)"}},{props:{orientation:"vertical"},style:{left:"50%",transform:"translate(-50%, 1px)"}},{props:{markActive:!0},style:{backgroundColor:(t.vars||t).palette.background.paper,opacity:.8}}]}})),J=(0,L.Ay)("span",{name:"MuiSlider",slot:"MarkLabel",shouldForwardProp:e=>(0,D.A)(e)&&"markLabelActive"!==e,overridesResolver:(e,t)=>t.markLabel})((e=>{let{theme:t}=e;return(0,o.A)({},t.typography.body2,{color:(t.vars||t).palette.text.secondary,position:"absolute",whiteSpace:"nowrap",variants:[{props:{orientation:"horizontal"},style:{top:30,transform:"translateX(-50%)","@media (pointer: coarse)":{top:40}}},{props:{orientation:"vertical"},style:{left:36,transform:"translateY(50%)","@media (pointer: coarse)":{left:44}}},{props:{markLabelActive:!0},style:{color:(t.vars||t).palette.text.primary}}]})})),ee=e=>{let{children:t}=e;return t},te=i.forwardRef((function(e,t){var n,u,d,h,p,f,m,g,v,y,b,w,_,S,A,C,k,E,T,O,M,R,I,L;const D=G({props:e,name:"MuiSlider"}),B=(0,N.I)(),{"aria-label":U,"aria-valuetext":W,"aria-labelledby":te,component:ne="span",components:re={},componentsProps:oe={},color:ie="primary",classes:se,className:ae,disableSwap:le=!1,disabled:ce=!1,getAriaLabel:ue,getAriaValueText:de,marks:he=!1,max:pe=100,min:fe=0,orientation:me="horizontal",shiftStep:ge=10,size:ve="medium",step:ye=1,scale:be=q,slotProps:we,slots:_e,track:xe="normal",valueLabelDisplay:Se="off",valueLabelFormat:Ae=q}=D,Ce=(0,r.A)(D,H),ke=(0,o.A)({},D,{isRtl:B,max:pe,min:fe,classes:se,disabled:ce,disableSwap:le,orientation:me,marks:he,color:ie,size:ve,step:ye,shiftStep:ge,scale:be,track:xe,valueLabelDisplay:Se,valueLabelFormat:Ae}),{axisProps:Ee,getRootProps:Te,getHiddenInputProps:Oe,getThumbProps:Me,open:Pe,active:Re,axis:Ne,focusedThumbIndex:Ie,range:Le,dragging:De,marks:je,values:Fe,trackOffset:Be,trackLeap:Ue,getThumbStyle:ze}=P((0,o.A)({},ke,{rootRef:t}));ke.marked=je.length>0&&je.some((e=>e.label)),ke.dragging=De,ke.focusedThumbIndex=Ie;const We=(e=>{const{disabled:t,dragging:n,marked:r,orientation:o,track:i,classes:s,color:a,size:l}=e,u={root:["root",t&&"disabled",n&&"dragging",r&&"marked","vertical"===o&&"vertical","inverted"===i&&"trackInverted",!1===i&&"trackFalse",a&&"color".concat((0,F.A)(a)),l&&"size".concat((0,F.A)(l))],rail:["rail"],track:["track"],mark:["mark"],markActive:["markActive"],markLabel:["markLabel"],markLabelActive:["markLabelActive"],valueLabel:["valueLabel"],thumb:["thumb",t&&"disabled",l&&"thumbSize".concat((0,F.A)(l)),a&&"thumbColor".concat((0,F.A)(a))],active:["active"],disabled:["disabled"],focusVisible:["focusVisible"]};return(0,c.A)(u,z,s)})(ke),Ve=null!=(n=null!=(u=null==_e?void 0:_e.root)?u:re.Root)?n:Y,He=null!=(d=null!=(h=null==_e?void 0:_e.rail)?h:re.Rail)?d:K,Ge=null!=(p=null!=(f=null==_e?void 0:_e.track)?f:re.Track)?p:X,qe=null!=(m=null!=(g=null==_e?void 0:_e.thumb)?g:re.Thumb)?m:$,Ye=null!=(v=null!=(y=null==_e?void 0:_e.valueLabel)?y:re.ValueLabel)?v:Q,Ke=null!=(b=null!=(w=null==_e?void 0:_e.mark)?w:re.Mark)?b:Z,Xe=null!=(_=null!=(S=null==_e?void 0:_e.markLabel)?S:re.MarkLabel)?_:J,$e=null!=(A=null!=(C=null==_e?void 0:_e.input)?C:re.Input)?A:"input",Qe=null!=(k=null==we?void 0:we.root)?k:oe.root,Ze=null!=(E=null==we?void 0:we.rail)?E:oe.rail,Je=null!=(T=null==we?void 0:we.track)?T:oe.track,et=null!=(O=null==we?void 0:we.thumb)?O:oe.thumb,tt=null!=(M=null==we?void 0:we.valueLabel)?M:oe.valueLabel,nt=null!=(R=null==we?void 0:we.mark)?R:oe.mark,rt=null!=(I=null==we?void 0:we.markLabel)?I:oe.markLabel,ot=null!=(L=null==we?void 0:we.input)?L:oe.input,it=(0,a.Q)({elementType:Ve,getSlotProps:Te,externalSlotProps:Qe,externalForwardedProps:Ce,additionalProps:(0,o.A)({},j(Ve)&&{as:ne}),ownerState:(0,o.A)({},ke,null==Qe?void 0:Qe.ownerState),className:[We.root,ae]}),st=(0,a.Q)({elementType:He,externalSlotProps:Ze,ownerState:ke,className:We.rail}),at=(0,a.Q)({elementType:Ge,externalSlotProps:Je,additionalProps:{style:(0,o.A)({},Ee[Ne].offset(Be),Ee[Ne].leap(Ue))},ownerState:(0,o.A)({},ke,null==Je?void 0:Je.ownerState),className:We.track}),lt=(0,a.Q)({elementType:qe,getSlotProps:Me,externalSlotProps:et,ownerState:(0,o.A)({},ke,null==et?void 0:et.ownerState),className:We.thumb}),ct=(0,a.Q)({elementType:Ye,externalSlotProps:tt,ownerState:(0,o.A)({},ke,null==tt?void 0:tt.ownerState),className:We.valueLabel}),ut=(0,a.Q)({elementType:Ke,externalSlotProps:nt,ownerState:ke,className:We.mark}),dt=(0,a.Q)({elementType:Xe,externalSlotProps:rt,ownerState:ke,className:We.markLabel}),ht=(0,a.Q)({elementType:$e,getSlotProps:Oe,externalSlotProps:ot,ownerState:ke});return(0,V.jsxs)(Ve,(0,o.A)({},it,{children:[(0,V.jsx)(He,(0,o.A)({},st)),(0,V.jsx)(Ge,(0,o.A)({},at)),je.filter((e=>e.value>=fe&&e.value<=pe)).map(((e,t)=>{const n=x(e.value,fe,pe),r=Ee[Ne].offset(n);let a;return a=!1===xe?-1!==Fe.indexOf(e.value):"normal"===xe&&(Le?e.value>=Fe[0]&&e.value<=Fe[Fe.length-1]:e.value<=Fe[0])||"inverted"===xe&&(Le?e.value<=Fe[0]||e.value>=Fe[Fe.length-1]:e.value>=Fe[0]),(0,V.jsxs)(i.Fragment,{children:[(0,V.jsx)(Ke,(0,o.A)({"data-index":t},ut,!(0,l.g)(Ke)&&{markActive:a},{style:(0,o.A)({},r,ut.style),className:(0,s.A)(ut.className,a&&We.markActive)})),null!=e.label?(0,V.jsx)(Xe,(0,o.A)({"aria-hidden":!0,"data-index":t},dt,!(0,l.g)(Xe)&&{markLabelActive:a},{style:(0,o.A)({},r,dt.style),className:(0,s.A)(We.markLabel,dt.className,a&&We.markLabelActive),children:e.label})):null]},t)})),Fe.map(((e,t)=>{const n=x(e,fe,pe),r=Ee[Ne].offset(n),i="off"===Se?ee:Ye;return(0,V.jsx)(i,(0,o.A)({},!(0,l.g)(i)&&{valueLabelFormat:Ae,valueLabelDisplay:Se,value:"function"===typeof Ae?Ae(be(e),t):Ae,index:t,open:Pe===t||Re===t||"on"===Se,disabled:ce},ct,{children:(0,V.jsx)(qe,(0,o.A)({"data-index":t},lt,{className:(0,s.A)(We.thumb,lt.className,Re===t&&We.active,Ie===t&&We.focusVisible),style:(0,o.A)({},r,ze(t),lt.style),children:(0,V.jsx)($e,(0,o.A)({"data-index":t,"aria-label":ue?ue(t):U,"aria-valuenow":be(e),"aria-labelledby":te,"aria-valuetext":de?de(be(e),t):W,value:Fe[t]},ht))}))}),t)}))]}))})),ne=te},1183:(e,t,n)=>{"use strict";n.d(t,{A:()=>At});var r=n(58168),o=n(98587),i=n(9950),s=n(72004),a=n(74061),l=n(28767),c=n(59254),u=n(48283),d=n(66455),h=n(63999),p=n(44093),f=n(98727),m=n(14131),g=n(62243),v=n(44414);const y=["onChange","maxRows","minRows","style","value"];function b(e){return parseInt(e,10)||0}const w={visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"};const _=i.forwardRef((function(e,t){const{onChange:n,maxRows:s,minRows:a=1,style:l,value:c}=e,u=(0,o.A)(e,y),{current:d}=i.useRef(null!=c),h=i.useRef(null),_=(0,p.A)(t,h),x=i.useRef(null),S=i.useCallback((()=>{const t=h.current,n=(0,f.A)(t).getComputedStyle(t);if("0px"===n.width)return{outerHeightStyle:0,overflowing:!1};const r=x.current;r.style.width=n.width,r.value=t.value||e.placeholder||"x","\n"===r.value.slice(-1)&&(r.value+=" ");const o=n.boxSizing,i=b(n.paddingBottom)+b(n.paddingTop),l=b(n.borderBottomWidth)+b(n.borderTopWidth),c=r.scrollHeight;r.value="x";const u=r.scrollHeight;let d=c;a&&(d=Math.max(Number(a)*u,d)),s&&(d=Math.min(Number(s)*u,d)),d=Math.max(d,u);return{outerHeightStyle:d+("border-box"===o?i+l:0),overflowing:Math.abs(d-c)<=1}}),[s,a,e.placeholder]),A=i.useCallback((()=>{const e=S();if(void 0===(t=e)||null===t||0===Object.keys(t).length||0===t.outerHeightStyle&&!t.overflowing)return;var t;const n=h.current;n.style.height="".concat(e.outerHeightStyle,"px"),n.style.overflow=e.overflowing?"hidden":""}),[S]);(0,m.A)((()=>{const e=()=>{A()};let t;const n=(0,g.A)(e),r=h.current,o=(0,f.A)(r);let i;return o.addEventListener("resize",n),"undefined"!==typeof ResizeObserver&&(i=new ResizeObserver(e),i.observe(r)),()=>{n.clear(),cancelAnimationFrame(t),o.removeEventListener("resize",n),i&&i.disconnect()}}),[S,A]),(0,m.A)((()=>{A()}));return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)("textarea",(0,r.A)({value:c,onChange:e=>{d||A(),n&&n(e)},ref:_,rows:a,style:l},u)),(0,v.jsx)("textarea",{"aria-hidden":!0,className:e.className,readOnly:!0,ref:x,tabIndex:-1,style:(0,r.A)({},w,l,{paddingTop:0,paddingBottom:0})})]})}));var x=n(74445),S=n(68624),A=n(15866),C=n(39766),k=n(61676),E=n(31506),T=n(79044),O=n(33158),M=n(85341);const P=function(e){let{styles:t,themeId:n,defaultTheme:r={}}=e;const o=(0,M.A)(r),i="function"===typeof t?t(n&&o[n]||o):t;return(0,v.jsx)(O.A,{styles:i})};var R=n(60195),N=n(67550);const I=function(e){return(0,v.jsx)(P,(0,r.A)({},e,{defaultTheme:R.A,themeId:N.A}))};function L(e){return null!=e&&!(Array.isArray(e)&&0===e.length)}function D(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e&&(L(e.value)&&""!==e.value||t&&L(e.defaultValue)&&""!==e.defaultValue)}var j=n(80863),F=n(68483);function B(e){return(0,F.Ay)("MuiInputBase",e)}const U=(0,j.A)("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),z=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],W=(e,t)=>{const{ownerState:n}=e;return[t.root,n.formControl&&t.formControl,n.startAdornment&&t.adornedStart,n.endAdornment&&t.adornedEnd,n.error&&t.error,"small"===n.size&&t.sizeSmall,n.multiline&&t.multiline,n.color&&t["color".concat((0,k.A)(n.color))],n.fullWidth&&t.fullWidth,n.hiddenLabel&&t.hiddenLabel]},V=(e,t)=>{const{ownerState:n}=e;return[t.input,"small"===n.size&&t.inputSizeSmall,n.multiline&&t.inputMultiline,"search"===n.type&&t.inputTypeSearch,n.startAdornment&&t.inputAdornedStart,n.endAdornment&&t.inputAdornedEnd,n.hiddenLabel&&t.inputHiddenLabel]},H=(0,c.Ay)("div",{name:"MuiInputBase",slot:"Root",overridesResolver:W})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({},t.typography.body1,{color:(t.vars||t).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",["&.".concat(U.disabled)]:{color:(t.vars||t).palette.text.disabled,cursor:"default"}},n.multiline&&(0,r.A)({padding:"4px 0 5px"},"small"===n.size&&{paddingTop:1}),n.fullWidth&&{width:"100%"})})),G=(0,c.Ay)("input",{name:"MuiInputBase",slot:"Input",overridesResolver:V})((e=>{let{theme:t,ownerState:n}=e;const o="light"===t.palette.mode,i=(0,r.A)({color:"currentColor"},t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:o?.42:.5},{transition:t.transitions.create("opacity",{duration:t.transitions.duration.shorter})}),s={opacity:"0 !important"},a=t.vars?{opacity:t.vars.opacity.inputPlaceholder}:{opacity:o?.42:.5};return(0,r.A)({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":i,"&::-moz-placeholder":i,"&:-ms-input-placeholder":i,"&::-ms-input-placeholder":i,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},["label[data-shrink=false] + .".concat(U.formControl," &")]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":a,"&:focus::-moz-placeholder":a,"&:focus:-ms-input-placeholder":a,"&:focus::-ms-input-placeholder":a},["&.".concat(U.disabled)]:{opacity:1,WebkitTextFillColor:(t.vars||t).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},"small"===n.size&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},"search"===n.type&&{MozAppearance:"textfield"})})),q=(0,v.jsx)(I,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),Y=i.forwardRef((function(e,t){var n;const l=(0,u.A)({props:e,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:d,autoFocus:p,className:f,components:m={},componentsProps:g={},defaultValue:y,disabled:b,disableInjectingGlobalStyles:w,endAdornment:O,fullWidth:M=!1,id:P,inputComponent:R="input",inputProps:N={},inputRef:I,maxRows:L,minRows:j,multiline:F=!1,name:U,onBlur:W,onChange:V,onClick:Y,onFocus:K,onKeyDown:X,onKeyUp:$,placeholder:Q,readOnly:Z,renderSuffix:J,rows:ee,slotProps:te={},slots:ne={},startAdornment:re,type:oe="text",value:ie}=l,se=(0,o.A)(l,z),ae=null!=N.value?N.value:ie,{current:le}=i.useRef(null!=ae),ce=i.useRef(),ue=i.useCallback((e=>{0}),[]),de=(0,E.A)(ce,I,N.ref,ue),[he,pe]=i.useState(!1),fe=(0,C.A)();const me=(0,S.A)({props:l,muiFormControl:fe,states:["color","disabled","error","hiddenLabel","size","required","filled"]});me.focused=fe?fe.focused:he,i.useEffect((()=>{!fe&&b&&he&&(pe(!1),W&&W())}),[fe,b,he,W]);const ge=fe&&fe.onFilled,ve=fe&&fe.onEmpty,ye=i.useCallback((e=>{D(e)?ge&&ge():ve&&ve()}),[ge,ve]);(0,T.A)((()=>{le&&ye({value:ae})}),[ae,ye,le]);i.useEffect((()=>{ye(ce.current)}),[]);let be=R,we=N;F&&"input"===be&&(we=ee?(0,r.A)({type:void 0,minRows:ee,maxRows:ee},we):(0,r.A)({type:void 0,maxRows:L,minRows:j},we),be=_);i.useEffect((()=>{fe&&fe.setAdornedStart(Boolean(re))}),[fe,re]);const _e=(0,r.A)({},l,{color:me.color||"primary",disabled:me.disabled,endAdornment:O,error:me.error,focused:me.focused,formControl:fe,fullWidth:M,hiddenLabel:me.hiddenLabel,multiline:F,size:me.size,startAdornment:re,type:oe}),xe=(e=>{const{classes:t,color:n,disabled:r,error:o,endAdornment:i,focused:s,formControl:l,fullWidth:c,hiddenLabel:u,multiline:d,readOnly:h,size:p,startAdornment:f,type:m}=e,g={root:["root","color".concat((0,k.A)(n)),r&&"disabled",o&&"error",c&&"fullWidth",s&&"focused",l&&"formControl",p&&"medium"!==p&&"size".concat((0,k.A)(p)),d&&"multiline",f&&"adornedStart",i&&"adornedEnd",u&&"hiddenLabel",h&&"readOnly"],input:["input",r&&"disabled","search"===m&&"inputTypeSearch",d&&"inputMultiline","small"===p&&"inputSizeSmall",u&&"inputHiddenLabel",f&&"inputAdornedStart",i&&"inputAdornedEnd",h&&"readOnly"]};return(0,a.A)(g,B,t)})(_e),Se=ne.root||m.Root||H,Ae=te.root||g.root||{},Ce=ne.input||m.Input||G;return we=(0,r.A)({},we,null!=(n=te.input)?n:g.input),(0,v.jsxs)(i.Fragment,{children:[!w&&q,(0,v.jsxs)(Se,(0,r.A)({},Ae,!(0,x.g)(Se)&&{ownerState:(0,r.A)({},_e,Ae.ownerState)},{ref:t,onClick:e=>{ce.current&&e.currentTarget===e.target&&ce.current.focus(),Y&&Y(e)}},se,{className:(0,s.A)(xe.root,Ae.className,f,Z&&"MuiInputBase-readOnly"),children:[re,(0,v.jsx)(A.A.Provider,{value:null,children:(0,v.jsx)(Ce,(0,r.A)({ownerState:_e,"aria-invalid":me.error,"aria-describedby":c,autoComplete:d,autoFocus:p,defaultValue:y,disabled:me.disabled,id:P,onAnimationStart:e=>{ye("mui-auto-fill-cancel"===e.animationName?ce.current:{value:"x"})},name:U,placeholder:Q,readOnly:Z,required:me.required,rows:ee,value:ae,onKeyDown:X,onKeyUp:$,type:oe},we,!(0,x.g)(Ce)&&{as:be,ownerState:(0,r.A)({},_e,we.ownerState)},{ref:de,className:(0,s.A)(xe.input,we.className,Z&&"MuiInputBase-readOnly"),onBlur:e=>{W&&W(e),N.onBlur&&N.onBlur(e),fe&&fe.onBlur?fe.onBlur(e):pe(!1)},onChange:function(e){if(!le){const t=e.target||ce.current;if(null==t)throw new Error((0,h.A)(1));ye({value:t.value})}for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{me.disabled?e.stopPropagation():(K&&K(e),N.onFocus&&N.onFocus(e),fe&&fe.onFocus?fe.onFocus(e):pe(!0))}}))}),O,J?J((0,r.A)({},me,{startAdornment:re})):null]}))]})})),K=Y;var X=n(19608);function $(e){return(0,F.Ay)("MuiInput",e)}const Q=(0,r.A)({},U,(0,j.A)("MuiInput",["root","underline","input"])),Z=["disableUnderline","components","componentsProps","fullWidth","inputComponent","multiline","slotProps","slots","type"],J=(0,c.Ay)(H,{shouldForwardProp:e=>(0,X.A)(e)||"classes"===e,name:"MuiInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...W(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;let o="light"===t.palette.mode?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)";return t.vars&&(o="rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")")),(0,r.A)({position:"relative"},n.formControl&&{"label + &":{marginTop:16}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat((t.vars||t).palette[n.color].main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(Q.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(Q.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(o),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(Q.disabled,", .").concat(Q.error,"):before")]:{borderBottom:"2px solid ".concat((t.vars||t).palette.text.primary),"@media (hover: none)":{borderBottom:"1px solid ".concat(o)}},["&.".concat(Q.disabled,":before")]:{borderBottomStyle:"dotted"}})})),ee=(0,c.Ay)(G,{name:"MuiInput",slot:"Input",overridesResolver:V})({}),te=i.forwardRef((function(e,t){var n,i,s,l;const c=(0,u.A)({props:e,name:"MuiInput"}),{disableUnderline:h,components:p={},componentsProps:f,fullWidth:m=!1,inputComponent:g="input",multiline:y=!1,slotProps:b,slots:w={},type:_="text"}=c,x=(0,o.A)(c,Z),S=(e=>{const{classes:t,disableUnderline:n}=e,o={root:["root",!n&&"underline"],input:["input"]},i=(0,a.A)(o,$,t);return(0,r.A)({},t,i)})(c),A={root:{ownerState:{disableUnderline:h}}},C=(null!=b?b:f)?(0,d.A)(null!=b?b:f,A):A,k=null!=(n=null!=(i=w.root)?i:p.Root)?n:J,E=null!=(s=null!=(l=w.input)?l:p.Input)?s:ee;return(0,v.jsx)(K,(0,r.A)({slots:{root:k,input:E},slotProps:C,fullWidth:m,inputComponent:g,multiline:y,ref:t,type:_},x,{classes:S}))}));te.muiName="Input";const ne=te;function re(e){return(0,F.Ay)("MuiFilledInput",e)}const oe=(0,r.A)({},U,(0,j.A)("MuiFilledInput",["root","underline","input"])),ie=["disableUnderline","components","componentsProps","fullWidth","hiddenLabel","inputComponent","multiline","slotProps","slots","type"],se=(0,c.Ay)(H,{shouldForwardProp:e=>(0,X.A)(e)||"classes"===e,name:"MuiFilledInput",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[...W(e,t),!n.disableUnderline&&t.underline]}})((e=>{let{theme:t,ownerState:n}=e;var o;const i="light"===t.palette.mode,s=i?"rgba(0, 0, 0, 0.42)":"rgba(255, 255, 255, 0.7)",a=i?"rgba(0, 0, 0, 0.06)":"rgba(255, 255, 255, 0.09)",l=i?"rgba(0, 0, 0, 0.09)":"rgba(255, 255, 255, 0.13)",c=i?"rgba(0, 0, 0, 0.12)":"rgba(255, 255, 255, 0.12)";return(0,r.A)({position:"relative",backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a,borderTopLeftRadius:(t.vars||t).shape.borderRadius,borderTopRightRadius:(t.vars||t).shape.borderRadius,transition:t.transitions.create("background-color",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),"&:hover":{backgroundColor:t.vars?t.vars.palette.FilledInput.hoverBg:l,"@media (hover: none)":{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a}},["&.".concat(oe.focused)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.bg:a},["&.".concat(oe.disabled)]:{backgroundColor:t.vars?t.vars.palette.FilledInput.disabledBg:c}},!n.disableUnderline&&{"&::after":{borderBottom:"2px solid ".concat(null==(o=(t.vars||t).palette[n.color||"primary"])?void 0:o.main),left:0,bottom:0,content:'""',position:"absolute",right:0,transform:"scaleX(0)",transition:t.transitions.create("transform",{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut}),pointerEvents:"none"},["&.".concat(oe.focused,":after")]:{transform:"scaleX(1) translateX(0)"},["&.".concat(oe.error)]:{"&::before, &::after":{borderBottomColor:(t.vars||t).palette.error.main}},"&::before":{borderBottom:"1px solid ".concat(t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / ").concat(t.vars.opacity.inputUnderline,")"):s),left:0,bottom:0,content:'"\\00a0"',position:"absolute",right:0,transition:t.transitions.create("border-bottom-color",{duration:t.transitions.duration.shorter}),pointerEvents:"none"},["&:hover:not(.".concat(oe.disabled,", .").concat(oe.error,"):before")]:{borderBottom:"1px solid ".concat((t.vars||t).palette.text.primary)},["&.".concat(oe.disabled,":before")]:{borderBottomStyle:"dotted"}},n.startAdornment&&{paddingLeft:12},n.endAdornment&&{paddingRight:12},n.multiline&&(0,r.A)({padding:"25px 12px 8px"},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9}))})),ae=(0,c.Ay)(G,{name:"MuiFilledInput",slot:"Input",overridesResolver:V})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({paddingTop:25,paddingRight:12,paddingBottom:8,paddingLeft:12},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderTopLeftRadius:"inherit",borderTopRightRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{paddingTop:21,paddingBottom:4},n.hiddenLabel&&{paddingTop:16,paddingBottom:17},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0},n.hiddenLabel&&"small"===n.size&&{paddingTop:8,paddingBottom:9},n.multiline&&{paddingTop:0,paddingBottom:0,paddingLeft:0,paddingRight:0})})),le=i.forwardRef((function(e,t){var n,i,s,l;const c=(0,u.A)({props:e,name:"MuiFilledInput"}),{components:h={},componentsProps:p,fullWidth:f=!1,inputComponent:m="input",multiline:g=!1,slotProps:y,slots:b={},type:w="text"}=c,_=(0,o.A)(c,ie),x=(0,r.A)({},c,{fullWidth:f,inputComponent:m,multiline:g,type:w}),S=(e=>{const{classes:t,disableUnderline:n}=e,o={root:["root",!n&&"underline"],input:["input"]},i=(0,a.A)(o,re,t);return(0,r.A)({},t,i)})(c),A={root:{ownerState:x},input:{ownerState:x}},C=(null!=y?y:p)?(0,d.A)(A,null!=y?y:p):A,k=null!=(n=null!=(i=b.root)?i:h.Root)?n:se,E=null!=(s=null!=(l=b.input)?l:h.Input)?s:ae;return(0,v.jsx)(K,(0,r.A)({slots:{root:k,input:E},componentsProps:C,fullWidth:f,inputComponent:m,multiline:g,ref:t,type:w},_,{classes:S}))}));le.muiName="Input";const ce=le;var ue;const de=["children","classes","className","label","notched"],he=(0,c.Ay)("fieldset",{shouldForwardProp:X.A})({textAlign:"left",position:"absolute",bottom:0,right:0,top:-5,left:0,margin:0,padding:"0 8px",pointerEvents:"none",borderRadius:"inherit",borderStyle:"solid",borderWidth:1,overflow:"hidden",minWidth:"0%"}),pe=(0,c.Ay)("legend",{shouldForwardProp:X.A})((e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({float:"unset",width:"auto",overflow:"hidden"},!t.withLabel&&{padding:0,lineHeight:"11px",transition:n.transitions.create("width",{duration:150,easing:n.transitions.easing.easeOut})},t.withLabel&&(0,r.A)({display:"block",padding:0,height:11,fontSize:"0.75em",visibility:"hidden",maxWidth:.01,transition:n.transitions.create("max-width",{duration:50,easing:n.transitions.easing.easeOut}),whiteSpace:"nowrap","& > span":{paddingLeft:5,paddingRight:5,display:"inline-block",opacity:0,visibility:"visible"}},t.notched&&{maxWidth:"100%",transition:n.transitions.create("max-width",{duration:100,easing:n.transitions.easing.easeOut,delay:50})}))}));function fe(e){return(0,F.Ay)("MuiOutlinedInput",e)}const me=(0,r.A)({},U,(0,j.A)("MuiOutlinedInput",["root","notchedOutline","input"])),ge=["components","fullWidth","inputComponent","label","multiline","notched","slots","type"],ve=(0,c.Ay)(H,{shouldForwardProp:e=>(0,X.A)(e)||"classes"===e,name:"MuiOutlinedInput",slot:"Root",overridesResolver:W})((e=>{let{theme:t,ownerState:n}=e;const o="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return(0,r.A)({position:"relative",borderRadius:(t.vars||t).shape.borderRadius,["&:hover .".concat(me.notchedOutline)]:{borderColor:(t.vars||t).palette.text.primary},"@media (hover: none)":{["&:hover .".concat(me.notchedOutline)]:{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):o}},["&.".concat(me.focused," .").concat(me.notchedOutline)]:{borderColor:(t.vars||t).palette[n.color].main,borderWidth:2},["&.".concat(me.error," .").concat(me.notchedOutline)]:{borderColor:(t.vars||t).palette.error.main},["&.".concat(me.disabled," .").concat(me.notchedOutline)]:{borderColor:(t.vars||t).palette.action.disabled}},n.startAdornment&&{paddingLeft:14},n.endAdornment&&{paddingRight:14},n.multiline&&(0,r.A)({padding:"16.5px 14px"},"small"===n.size&&{padding:"8.5px 14px"}))})),ye=(0,c.Ay)((function(e){const{className:t,label:n,notched:i}=e,s=(0,o.A)(e,de),a=null!=n&&""!==n,l=(0,r.A)({},e,{notched:i,withLabel:a});return(0,v.jsx)(he,(0,r.A)({"aria-hidden":!0,className:t,ownerState:l},s,{children:(0,v.jsx)(pe,{ownerState:l,children:a?(0,v.jsx)("span",{children:n}):ue||(ue=(0,v.jsx)("span",{className:"notranslate",children:"\u200b"}))})}))}),{name:"MuiOutlinedInput",slot:"NotchedOutline",overridesResolver:(e,t)=>t.notchedOutline})((e=>{let{theme:t}=e;const n="light"===t.palette.mode?"rgba(0, 0, 0, 0.23)":"rgba(255, 255, 255, 0.23)";return{borderColor:t.vars?"rgba(".concat(t.vars.palette.common.onBackgroundChannel," / 0.23)"):n}})),be=(0,c.Ay)(G,{name:"MuiOutlinedInput",slot:"Input",overridesResolver:V})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({padding:"16.5px 14px"},!t.vars&&{"&:-webkit-autofill":{WebkitBoxShadow:"light"===t.palette.mode?null:"0 0 0 100px #266798 inset",WebkitTextFillColor:"light"===t.palette.mode?null:"#fff",caretColor:"light"===t.palette.mode?null:"#fff",borderRadius:"inherit"}},t.vars&&{"&:-webkit-autofill":{borderRadius:"inherit"},[t.getColorSchemeSelector("dark")]:{"&:-webkit-autofill":{WebkitBoxShadow:"0 0 0 100px #266798 inset",WebkitTextFillColor:"#fff",caretColor:"#fff"}}},"small"===n.size&&{padding:"8.5px 14px"},n.multiline&&{padding:0},n.startAdornment&&{paddingLeft:0},n.endAdornment&&{paddingRight:0})})),we=i.forwardRef((function(e,t){var n,s,l,c,d;const h=(0,u.A)({props:e,name:"MuiOutlinedInput"}),{components:p={},fullWidth:f=!1,inputComponent:m="input",label:g,multiline:y=!1,notched:b,slots:w={},type:_="text"}=h,x=(0,o.A)(h,ge),A=(e=>{const{classes:t}=e,n=(0,a.A)({root:["root"],notchedOutline:["notchedOutline"],input:["input"]},fe,t);return(0,r.A)({},t,n)})(h),k=(0,C.A)(),E=(0,S.A)({props:h,muiFormControl:k,states:["color","disabled","error","focused","hiddenLabel","size","required"]}),T=(0,r.A)({},h,{color:E.color||"primary",disabled:E.disabled,error:E.error,focused:E.focused,formControl:k,fullWidth:f,hiddenLabel:E.hiddenLabel,multiline:y,size:E.size,type:_}),O=null!=(n=null!=(s=w.root)?s:p.Root)?n:ve,M=null!=(l=null!=(c=w.input)?c:p.Input)?l:be;return(0,v.jsx)(K,(0,r.A)({slots:{root:O,input:M},renderSuffix:e=>(0,v.jsx)(ye,{ownerState:T,className:A.notchedOutline,label:null!=g&&""!==g&&E.required?d||(d=(0,v.jsxs)(i.Fragment,{children:[g,"\u2009","*"]})):g,notched:"undefined"!==typeof b?b:Boolean(e.startAdornment||e.filled||e.focused)}),fullWidth:f,inputComponent:m,multiline:y,ref:t,type:_},x,{classes:(0,r.A)({},A,{notchedOutline:null})}))}));we.muiName="Input";const _e=we;function xe(e){return(0,F.Ay)("MuiFormLabel",e)}const Se=(0,j.A)("MuiFormLabel",["root","colorSecondary","focused","disabled","error","filled","required","asterisk"]),Ae=["children","className","color","component","disabled","error","filled","focused","required"],Ce=(0,c.Ay)("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,r.A)({},t.root,"secondary"===n.color&&t.colorSecondary,n.filled&&t.filled)}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({color:(t.vars||t).palette.text.secondary},t.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",["&.".concat(Se.focused)]:{color:(t.vars||t).palette[n.color].main},["&.".concat(Se.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Se.error)]:{color:(t.vars||t).palette.error.main}})})),ke=(0,c.Ay)("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(e,t)=>t.asterisk})((e=>{let{theme:t}=e;return{["&.".concat(Se.error)]:{color:(t.vars||t).palette.error.main}}})),Ee=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiFormLabel"}),{children:i,className:l,component:c="label"}=n,d=(0,o.A)(n,Ae),h=(0,C.A)(),p=(0,S.A)({props:n,muiFormControl:h,states:["color","required","focused","disabled","error","filled"]}),f=(0,r.A)({},n,{color:p.color||"primary",component:c,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),m=(e=>{const{classes:t,color:n,focused:r,disabled:o,error:i,filled:s,required:l}=e,c={root:["root","color".concat((0,k.A)(n)),o&&"disabled",i&&"error",s&&"filled",r&&"focused",l&&"required"],asterisk:["asterisk",i&&"error"]};return(0,a.A)(c,xe,t)})(f);return(0,v.jsxs)(Ce,(0,r.A)({as:c,ownerState:f,className:(0,s.A)(m.root,l),ref:t},d,{children:[i,p.required&&(0,v.jsxs)(ke,{ownerState:f,"aria-hidden":!0,className:m.asterisk,children:["\u2009","*"]})]}))}));function Te(e){return(0,F.Ay)("MuiInputLabel",e)}(0,j.A)("MuiInputLabel",["root","focused","disabled","error","required","asterisk","formControl","sizeSmall","shrink","animated","standard","filled","outlined"]);const Oe=["disableAnimation","margin","shrink","variant","className"],Me=(0,c.Ay)(Ee,{shouldForwardProp:e=>(0,X.A)(e)||"classes"===e,name:"MuiInputLabel",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["& .".concat(Se.asterisk)]:t.asterisk},t.root,n.formControl&&t.formControl,"small"===n.size&&t.sizeSmall,n.shrink&&t.shrink,!n.disableAnimation&&t.animated,n.focused&&t.focused,t[n.variant]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({display:"block",transformOrigin:"top left",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"100%"},n.formControl&&{position:"absolute",left:0,top:0,transform:"translate(0, 20px) scale(1)"},"small"===n.size&&{transform:"translate(0, 17px) scale(1)"},n.shrink&&{transform:"translate(0, -1.5px) scale(0.75)",transformOrigin:"top left",maxWidth:"133%"},!n.disableAnimation&&{transition:t.transitions.create(["color","transform","max-width"],{duration:t.transitions.duration.shorter,easing:t.transitions.easing.easeOut})},"filled"===n.variant&&(0,r.A)({zIndex:1,pointerEvents:"none",transform:"translate(12px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(12px, 13px) scale(1)"},n.shrink&&(0,r.A)({userSelect:"none",pointerEvents:"auto",transform:"translate(12px, 7px) scale(0.75)",maxWidth:"calc(133% - 24px)"},"small"===n.size&&{transform:"translate(12px, 4px) scale(0.75)"})),"outlined"===n.variant&&(0,r.A)({zIndex:1,pointerEvents:"none",transform:"translate(14px, 16px) scale(1)",maxWidth:"calc(100% - 24px)"},"small"===n.size&&{transform:"translate(14px, 9px) scale(1)"},n.shrink&&{userSelect:"none",pointerEvents:"auto",maxWidth:"calc(133% - 32px)",transform:"translate(14px, -9px) scale(0.75)"}))})),Pe=i.forwardRef((function(e,t){const n=(0,u.A)({name:"MuiInputLabel",props:e}),{disableAnimation:i=!1,shrink:l,className:c}=n,d=(0,o.A)(n,Oe),h=(0,C.A)();let p=l;"undefined"===typeof p&&h&&(p=h.filled||h.focused||h.adornedStart);const f=(0,S.A)({props:n,muiFormControl:h,states:["size","variant","required","focused"]}),m=(0,r.A)({},n,{disableAnimation:i,formControl:h,shrink:p,size:f.size,variant:f.variant,required:f.required,focused:f.focused}),g=(e=>{const{classes:t,formControl:n,size:o,shrink:i,disableAnimation:s,variant:l,required:c}=e,u={root:["root",n&&"formControl",!s&&"animated",i&&"shrink",o&&"normal"!==o&&"size".concat((0,k.A)(o)),l],asterisk:[c&&"asterisk"]},d=(0,a.A)(u,Te,t);return(0,r.A)({},t,d)})(m);return(0,v.jsx)(Me,(0,r.A)({"data-shrink":p,ownerState:m,ref:t,className:(0,s.A)(g.root,c)},d,{classes:g}))}));var Re=n(60096);function Ne(e){return(0,F.Ay)("MuiFormControl",e)}(0,j.A)("MuiFormControl",["root","marginNone","marginNormal","marginDense","fullWidth","disabled"]);const Ie=["children","className","color","component","disabled","error","focused","fullWidth","hiddenLabel","margin","required","size","variant"],Le=(0,c.Ay)("div",{name:"MuiFormControl",slot:"Root",overridesResolver:(e,t)=>{let{ownerState:n}=e;return(0,r.A)({},t.root,t["margin".concat((0,k.A)(n.margin))],n.fullWidth&&t.fullWidth)}})((e=>{let{ownerState:t}=e;return(0,r.A)({display:"inline-flex",flexDirection:"column",position:"relative",minWidth:0,padding:0,margin:0,border:0,verticalAlign:"top"},"normal"===t.margin&&{marginTop:16,marginBottom:8},"dense"===t.margin&&{marginTop:8,marginBottom:4},t.fullWidth&&{width:"100%"})})),De=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiFormControl"}),{children:l,className:c,color:d="primary",component:h="div",disabled:p=!1,error:f=!1,focused:m,fullWidth:g=!1,hiddenLabel:y=!1,margin:b="none",required:w=!1,size:_="medium",variant:x="outlined"}=n,S=(0,o.A)(n,Ie),C=(0,r.A)({},n,{color:d,component:h,disabled:p,error:f,fullWidth:g,hiddenLabel:y,margin:b,required:w,size:_,variant:x}),E=(e=>{const{classes:t,margin:n,fullWidth:r}=e,o={root:["root","none"!==n&&"margin".concat((0,k.A)(n)),r&&"fullWidth"]};return(0,a.A)(o,Ne,t)})(C),[T,O]=i.useState((()=>{let e=!1;return l&&i.Children.forEach(l,(t=>{if(!(0,Re.A)(t,["Input","Select"]))return;const n=(0,Re.A)(t,["Select"])?t.props.input:t;n&&n.props.startAdornment&&(e=!0)})),e})),[M,P]=i.useState((()=>{let e=!1;return l&&i.Children.forEach(l,(t=>{(0,Re.A)(t,["Input","Select"])&&(D(t.props,!0)||D(t.props.inputProps,!0))&&(e=!0)})),e})),[R,N]=i.useState(!1);p&&R&&N(!1);const I=void 0===m||p?R:m;let L;const j=i.useMemo((()=>({adornedStart:T,setAdornedStart:O,color:d,disabled:p,error:f,filled:M,focused:I,fullWidth:g,hiddenLabel:y,size:_,onBlur:()=>{N(!1)},onEmpty:()=>{P(!1)},onFilled:()=>{P(!0)},onFocus:()=>{N(!0)},registerEffect:L,required:w,variant:x})),[T,d,p,f,M,I,g,y,L,w,_,x]);return(0,v.jsx)(A.A.Provider,{value:j,children:(0,v.jsx)(Le,(0,r.A)({as:h,ownerState:C,className:(0,s.A)(E.root,c),ref:t},S,{children:l}))})}));function je(e){return(0,F.Ay)("MuiFormHelperText",e)}const Fe=(0,j.A)("MuiFormHelperText",["root","error","disabled","sizeSmall","sizeMedium","contained","focused","filled","required"]);var Be;const Ue=["children","className","component","disabled","error","filled","focused","margin","required","variant"],ze=(0,c.Ay)("p",{name:"MuiFormHelperText",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.size&&t["size".concat((0,k.A)(n.size))],n.contained&&t.contained,n.filled&&t.filled]}})((e=>{let{theme:t,ownerState:n}=e;return(0,r.A)({color:(t.vars||t).palette.text.secondary},t.typography.caption,{textAlign:"left",marginTop:3,marginRight:0,marginBottom:0,marginLeft:0,["&.".concat(Fe.disabled)]:{color:(t.vars||t).palette.text.disabled},["&.".concat(Fe.error)]:{color:(t.vars||t).palette.error.main}},"small"===n.size&&{marginTop:4},n.contained&&{marginLeft:14,marginRight:14})})),We=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiFormHelperText"}),{children:i,className:l,component:c="p"}=n,d=(0,o.A)(n,Ue),h=(0,C.A)(),p=(0,S.A)({props:n,muiFormControl:h,states:["variant","size","disabled","error","filled","focused","required"]}),f=(0,r.A)({},n,{component:c,contained:"filled"===p.variant||"outlined"===p.variant,variant:p.variant,size:p.size,disabled:p.disabled,error:p.error,filled:p.filled,focused:p.focused,required:p.required}),m=(e=>{const{classes:t,contained:n,size:r,disabled:o,error:i,filled:s,focused:l,required:c}=e,u={root:["root",o&&"disabled",i&&"error",r&&"size".concat((0,k.A)(r)),n&&"contained",l&&"focused",s&&"filled",c&&"required"]};return(0,a.A)(u,je,t)})(f);return(0,v.jsx)(ze,(0,r.A)({as:c,ownerState:f,className:(0,s.A)(m.root,l),ref:t},d,{children:" "===i?Be||(Be=(0,v.jsx)("span",{className:"notranslate",children:"\u200b"})):i}))}));n(26429);var Ve=n(27402),He=n(63341);function Ge(e){return(0,F.Ay)("MuiNativeSelect",e)}const qe=(0,j.A)("MuiNativeSelect",["root","select","multiple","filled","outlined","standard","disabled","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]),Ye=["className","disabled","error","IconComponent","inputRef","variant"],Ke=e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({MozAppearance:"none",WebkitAppearance:"none",userSelect:"none",borderRadius:0,cursor:"pointer","&:focus":(0,r.A)({},n.vars?{backgroundColor:"rgba(".concat(n.vars.palette.common.onBackgroundChannel," / 0.05)")}:{backgroundColor:"light"===n.palette.mode?"rgba(0, 0, 0, 0.05)":"rgba(255, 255, 255, 0.05)"},{borderRadius:0}),"&::-ms-expand":{display:"none"},["&.".concat(qe.disabled)]:{cursor:"default"},"&[multiple]":{height:"auto"},"&:not([multiple]) option, &:not([multiple]) optgroup":{backgroundColor:(n.vars||n).palette.background.paper},"&&&":{paddingRight:24,minWidth:16}},"filled"===t.variant&&{"&&&":{paddingRight:32}},"outlined"===t.variant&&{borderRadius:(n.vars||n).shape.borderRadius,"&:focus":{borderRadius:(n.vars||n).shape.borderRadius},"&&&":{paddingRight:32}})},Xe=(0,c.Ay)("select",{name:"MuiNativeSelect",slot:"Select",shouldForwardProp:X.A,overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.select,t[n.variant],n.error&&t.error,{["&.".concat(qe.multiple)]:t.multiple}]}})(Ke),$e=e=>{let{ownerState:t,theme:n}=e;return(0,r.A)({position:"absolute",right:0,top:"calc(50% - .5em)",pointerEvents:"none",color:(n.vars||n).palette.action.active,["&.".concat(qe.disabled)]:{color:(n.vars||n).palette.action.disabled}},t.open&&{transform:"rotate(180deg)"},"filled"===t.variant&&{right:7},"outlined"===t.variant&&{right:7})},Qe=(0,c.Ay)("svg",{name:"MuiNativeSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,k.A)(n.variant))],n.open&&t.iconOpen]}})($e),Ze=i.forwardRef((function(e,t){const{className:n,disabled:l,error:c,IconComponent:u,inputRef:d,variant:h="standard"}=e,p=(0,o.A)(e,Ye),f=(0,r.A)({},e,{disabled:l,variant:h,error:c}),m=(e=>{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon","icon".concat((0,k.A)(n)),i&&"iconOpen",r&&"disabled"]};return(0,a.A)(l,Ge,t)})(f);return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)(Xe,(0,r.A)({ownerState:f,className:(0,s.A)(m.select,n),disabled:l,ref:d||t},p)),e.multiple?null:(0,v.jsx)(Qe,{as:u,ownerState:f,className:m.icon})]})}));var Je=n(61960),et=n(48733);function tt(e){return(0,F.Ay)("MuiSelect",e)}const nt=(0,j.A)("MuiSelect",["root","select","multiple","filled","outlined","standard","disabled","focused","icon","iconOpen","iconFilled","iconOutlined","iconStandard","nativeInput","error"]);var rt;const ot=["aria-describedby","aria-label","autoFocus","autoWidth","children","className","defaultOpen","defaultValue","disabled","displayEmpty","error","IconComponent","inputRef","labelId","MenuProps","multiple","name","onBlur","onChange","onClose","onFocus","onOpen","open","readOnly","renderValue","SelectDisplayProps","tabIndex","type","value","variant"],it=(0,c.Ay)("div",{name:"MuiSelect",slot:"Select",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[{["&.".concat(nt.select)]:t.select},{["&.".concat(nt.select)]:t[n.variant]},{["&.".concat(nt.error)]:t.error},{["&.".concat(nt.multiple)]:t.multiple}]}})(Ke,{["&.".concat(nt.select)]:{height:"auto",minHeight:"1.4375em",textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden"}}),st=(0,c.Ay)("svg",{name:"MuiSelect",slot:"Icon",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.icon,n.variant&&t["icon".concat((0,k.A)(n.variant))],n.open&&t.iconOpen]}})($e),at=(0,c.Ay)("input",{shouldForwardProp:e=>(0,Je.A)(e)&&"classes"!==e,name:"MuiSelect",slot:"NativeInput",overridesResolver:(e,t)=>t.nativeInput})({bottom:0,left:0,position:"absolute",opacity:0,pointerEvents:"none",width:"100%",boxSizing:"border-box"});function lt(e,t){return"object"===typeof t&&null!==t?e===t:String(e)===String(t)}function ct(e){return null==e||"string"===typeof e&&!e.trim()}const ut=i.forwardRef((function(e,t){var n;const{"aria-describedby":c,"aria-label":u,autoFocus:d,autoWidth:p,children:f,className:m,defaultOpen:g,defaultValue:y,disabled:b,displayEmpty:w,error:_=!1,IconComponent:x,inputRef:S,labelId:A,MenuProps:C={},multiple:T,name:O,onBlur:M,onChange:P,onClose:R,onFocus:N,onOpen:I,open:L,readOnly:j,renderValue:F,SelectDisplayProps:B={},tabIndex:U,value:z,variant:W="standard"}=e,V=(0,o.A)(e,ot),[H,G]=(0,et.A)({controlled:z,default:y,name:"Select"}),[q,Y]=(0,et.A)({controlled:L,default:g,name:"Select"}),K=i.useRef(null),X=i.useRef(null),[$,Q]=i.useState(null),{current:Z}=i.useRef(null!=L),[J,ee]=i.useState(),te=(0,E.A)(t,S),ne=i.useCallback((e=>{X.current=e,e&&Q(e)}),[]),re=null==$?void 0:$.parentNode;i.useImperativeHandle(te,(()=>({focus:()=>{X.current.focus()},node:K.current,value:H})),[H]),i.useEffect((()=>{g&&q&&$&&!Z&&(ee(p?null:re.clientWidth),X.current.focus())}),[$,p]),i.useEffect((()=>{d&&X.current.focus()}),[d]),i.useEffect((()=>{if(!A)return;const e=(0,Ve.A)(X.current).getElementById(A);if(e){const t=()=>{getSelection().isCollapsed&&X.current.focus()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}}}),[A]);const oe=(e,t)=>{e?I&&I(t):R&&R(t),Z||(ee(p?null:re.clientWidth),Y(e))},ie=i.Children.toArray(f),se=e=>t=>{let n;if(t.currentTarget.hasAttribute("tabindex")){if(T){n=Array.isArray(H)?H.slice():[];const t=H.indexOf(e.props.value);-1===t?n.push(e.props.value):n.splice(t,1)}else n=e.props.value;if(e.props.onClick&&e.props.onClick(t),H!==n&&(G(n),P)){const r=t.nativeEvent||t,o=new r.constructor(r.type,r);Object.defineProperty(o,"target",{writable:!0,value:{value:n,name:O}}),P(o,e)}T||oe(!1,t)}},ae=null!==$&&q;let le,ce;delete V["aria-invalid"];const ue=[];let de=!1,he=!1;(D({value:H})||w)&&(F?le=F(H):de=!0);const pe=ie.map((e=>{if(!i.isValidElement(e))return null;let t;if(T){if(!Array.isArray(H))throw new Error((0,h.A)(2));t=H.some((t=>lt(t,e.props.value))),t&&de&&ue.push(e.props.children)}else t=lt(H,e.props.value),t&&de&&(ce=e.props.children);return t&&(he=!0),i.cloneElement(e,{"aria-selected":t?"true":"false",onClick:se(e),onKeyUp:t=>{" "===t.key&&t.preventDefault(),e.props.onKeyUp&&e.props.onKeyUp(t)},role:"option",selected:t,value:void 0,"data-value":e.props.value})}));de&&(le=T?0===ue.length?null:ue.reduce(((e,t,n)=>(e.push(t),n{const{classes:t,variant:n,disabled:r,multiple:o,open:i,error:s}=e,l={select:["select",n,r&&"disabled",o&&"multiple",s&&"error"],icon:["icon","icon".concat((0,k.A)(n)),i&&"iconOpen",r&&"disabled"],nativeInput:["nativeInput"]};return(0,a.A)(l,tt,t)})(ve),be=(0,r.A)({},C.PaperProps,null==(n=C.slotProps)?void 0:n.paper),we=(0,l.A)();return(0,v.jsxs)(i.Fragment,{children:[(0,v.jsx)(it,(0,r.A)({ref:ne,tabIndex:fe,role:"combobox","aria-controls":we,"aria-disabled":b?"true":void 0,"aria-expanded":ae?"true":"false","aria-haspopup":"listbox","aria-label":u,"aria-labelledby":[A,ge].filter(Boolean).join(" ")||void 0,"aria-describedby":c,onKeyDown:e=>{if(!j){-1!==[" ","ArrowUp","ArrowDown","Enter"].indexOf(e.key)&&(e.preventDefault(),oe(!0,e))}},onMouseDown:b||j?null:e=>{0===e.button&&(e.preventDefault(),X.current.focus(),oe(!0,e))},onBlur:e=>{!ae&&M&&(Object.defineProperty(e,"target",{writable:!0,value:{value:H,name:O}}),M(e))},onFocus:N},B,{ownerState:ve,className:(0,s.A)(B.className,ye.select,m),id:ge,children:ct(le)?rt||(rt=(0,v.jsx)("span",{className:"notranslate",children:"\u200b"})):le})),(0,v.jsx)(at,(0,r.A)({"aria-invalid":_,value:Array.isArray(H)?H.join(","):H,name:O,ref:K,"aria-hidden":!0,onChange:e=>{const t=ie.find((t=>t.props.value===e.target.value));void 0!==t&&(G(t.props.value),P&&P(e,t))},tabIndex:-1,disabled:b,className:ye.nativeInput,autoFocus:d,ownerState:ve},V)),(0,v.jsx)(st,{as:x,className:ye.icon,ownerState:ve}),(0,v.jsx)(He.A,(0,r.A)({id:"menu-".concat(O||""),anchorEl:re,open:ae,onClose:e=>{oe(!1,e)},anchorOrigin:{vertical:"bottom",horizontal:"center"},transformOrigin:{vertical:"top",horizontal:"center"}},C,{MenuListProps:(0,r.A)({"aria-labelledby":A,role:"listbox","aria-multiselectable":T?"true":void 0,disableListWrap:!0,id:we},C.MenuListProps),slotProps:(0,r.A)({},C.slotProps,{paper:(0,r.A)({},be,{style:(0,r.A)({minWidth:me},null!=be?be.style:null)})}),children:pe}))]})}));const dt=(0,n(23235).A)((0,v.jsx)("path",{d:"M7 10l5 5 5-5z"}),"ArrowDropDown"),ht=["autoWidth","children","classes","className","defaultOpen","displayEmpty","IconComponent","id","input","inputProps","label","labelId","MenuProps","multiple","native","onClose","onOpen","open","renderValue","SelectDisplayProps","variant"],pt=["root"],ft={name:"MuiSelect",overridesResolver:(e,t)=>t.root,shouldForwardProp:e=>(0,X.A)(e)&&"variant"!==e,slot:"Root"},mt=(0,c.Ay)(ne,ft)(""),gt=(0,c.Ay)(_e,ft)(""),vt=(0,c.Ay)(ce,ft)(""),yt=i.forwardRef((function(e,t){const n=(0,u.A)({name:"MuiSelect",props:e}),{autoWidth:a=!1,children:l,classes:c={},className:h,defaultOpen:p=!1,displayEmpty:f=!1,IconComponent:m=dt,id:g,input:y,inputProps:b,label:w,labelId:_,MenuProps:x,multiple:A=!1,native:k=!1,onClose:T,onOpen:O,open:M,renderValue:P,SelectDisplayProps:R,variant:N="outlined"}=n,I=(0,o.A)(n,ht),L=k?Ze:ut,D=(0,C.A)(),j=(0,S.A)({props:n,muiFormControl:D,states:["variant","error"]}),F=j.variant||N,B=(0,r.A)({},n,{variant:F,classes:c}),U=(e=>{const{classes:t}=e;return t})(B),z=(0,o.A)(U,pt),W=y||{standard:(0,v.jsx)(mt,{ownerState:B}),outlined:(0,v.jsx)(gt,{label:w,ownerState:B}),filled:(0,v.jsx)(vt,{ownerState:B})}[F],V=(0,E.A)(t,W.ref);return(0,v.jsx)(i.Fragment,{children:i.cloneElement(W,(0,r.A)({inputComponent:L,inputProps:(0,r.A)({children:l,error:j.error,IconComponent:m,variant:F,type:void 0,multiple:A},k?{id:g}:{autoWidth:a,defaultOpen:p,displayEmpty:f,labelId:_,MenuProps:x,onClose:T,onOpen:O,open:M,renderValue:P,SelectDisplayProps:(0,r.A)({id:g},R)},b,{classes:b?(0,d.A)(z,b.classes):z},y?y.props.inputProps:{})},(A&&k||f)&&"outlined"===F?{notched:!0}:{},{ref:V,className:(0,s.A)(W.props.className,h,U.root)},!y&&{variant:F},I))})}));yt.muiName="Select";const bt=yt;function wt(e){return(0,F.Ay)("MuiTextField",e)}(0,j.A)("MuiTextField",["root"]);const _t=["autoComplete","autoFocus","children","className","color","defaultValue","disabled","error","FormHelperTextProps","fullWidth","helperText","id","InputLabelProps","inputProps","InputProps","inputRef","label","maxRows","minRows","multiline","name","onBlur","onChange","onFocus","placeholder","required","rows","select","SelectProps","type","value","variant"],xt={standard:ne,filled:ce,outlined:_e},St=(0,c.Ay)(De,{name:"MuiTextField",slot:"Root",overridesResolver:(e,t)=>t.root})({}),At=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTextField"}),{autoComplete:i,autoFocus:c=!1,children:d,className:h,color:p="primary",defaultValue:f,disabled:m=!1,error:g=!1,FormHelperTextProps:y,fullWidth:b=!1,helperText:w,id:_,InputLabelProps:x,inputProps:S,InputProps:A,inputRef:C,label:k,maxRows:E,minRows:T,multiline:O=!1,name:M,onBlur:P,onChange:R,onFocus:N,placeholder:I,required:L=!1,rows:D,select:j=!1,SelectProps:F,type:B,value:U,variant:z="outlined"}=n,W=(0,o.A)(n,_t),V=(0,r.A)({},n,{autoFocus:c,color:p,disabled:m,error:g,fullWidth:b,multiline:O,required:L,select:j,variant:z}),H=(e=>{const{classes:t}=e;return(0,a.A)({root:["root"]},wt,t)})(V);const G={};"outlined"===z&&(x&&"undefined"!==typeof x.shrink&&(G.notched=x.shrink),G.label=k),j&&(F&&F.native||(G.id=void 0),G["aria-describedby"]=void 0);const q=(0,l.A)(_),Y=w&&q?"".concat(q,"-helper-text"):void 0,K=k&&q?"".concat(q,"-label"):void 0,X=xt[z],$=(0,v.jsx)(X,(0,r.A)({"aria-describedby":Y,autoComplete:i,autoFocus:c,defaultValue:f,fullWidth:b,multiline:O,name:M,rows:D,maxRows:E,minRows:T,type:B,value:U,id:q,inputRef:C,onBlur:P,onChange:R,onFocus:N,placeholder:I,inputProps:S},G,A));return(0,v.jsxs)(St,(0,r.A)({className:(0,s.A)(H.root,h),disabled:m,error:g,fullWidth:b,ref:t,required:L,color:p,variant:z,ownerState:V},W,{children:[null!=k&&""!==k&&(0,v.jsx)(Pe,(0,r.A)({htmlFor:q,id:K},x,{children:k})),j?(0,v.jsx)(bt,(0,r.A)({"aria-describedby":Y,id:q,labelId:K,value:U,input:$},F,{children:d})):$,w&&(0,v.jsx)(We,(0,r.A)({id:Y},y,{children:w}))]}))}))},67261:(e,t,n)=>{"use strict";n.d(t,{A:()=>bt});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(74522),l=n(1534),c=n(74061),u=n(99269),d=n(44730),h=n(59254),p=n(14857),f=n(48283),m=n(61676),g=n(40165),v=n(44093),y=n(14131),b=n(3511);function w(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function _(e){return e instanceof w(e).Element||e instanceof Element}function x(e){return e instanceof w(e).HTMLElement||e instanceof HTMLElement}function S(e){return"undefined"!==typeof ShadowRoot&&(e instanceof w(e).ShadowRoot||e instanceof ShadowRoot)}var A=Math.max,C=Math.min,k=Math.round;function E(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function T(){return!/^((?!chrome|android).)*safari/i.test(E())}function O(e,t,n){void 0===t&&(t=!1),void 0===n&&(n=!1);var r=e.getBoundingClientRect(),o=1,i=1;t&&x(e)&&(o=e.offsetWidth>0&&k(r.width)/e.offsetWidth||1,i=e.offsetHeight>0&&k(r.height)/e.offsetHeight||1);var s=(_(e)?w(e):window).visualViewport,a=!T()&&n,l=(r.left+(a&&s?s.offsetLeft:0))/o,c=(r.top+(a&&s?s.offsetTop:0))/i,u=r.width/o,d=r.height/i;return{width:u,height:d,top:c,right:l+u,bottom:c+d,left:l,x:l,y:c}}function M(e){var t=w(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function P(e){return e?(e.nodeName||"").toLowerCase():null}function R(e){return((_(e)?e.ownerDocument:e.document)||window.document).documentElement}function N(e){return O(R(e)).left+M(e).scrollLeft}function I(e){return w(e).getComputedStyle(e)}function L(e){var t=I(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function D(e,t,n){void 0===n&&(n=!1);var r=x(t),o=x(t)&&function(e){var t=e.getBoundingClientRect(),n=k(t.width)/e.offsetWidth||1,r=k(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),i=R(t),s=O(e,o,n),a={scrollLeft:0,scrollTop:0},l={x:0,y:0};return(r||!r&&!n)&&(("body"!==P(t)||L(i))&&(a=function(e){return e!==w(e)&&x(e)?{scrollLeft:(t=e).scrollLeft,scrollTop:t.scrollTop}:M(e);var t}(t)),x(t)?((l=O(t,!0)).x+=t.clientLeft,l.y+=t.clientTop):i&&(l.x=N(i))),{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function j(e){var t=O(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function F(e){return"html"===P(e)?e:e.assignedSlot||e.parentNode||(S(e)?e.host:null)||R(e)}function B(e){return["html","body","#document"].indexOf(P(e))>=0?e.ownerDocument.body:x(e)&&L(e)?e:B(F(e))}function U(e,t){var n;void 0===t&&(t=[]);var r=B(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=w(r),s=o?[i].concat(i.visualViewport||[],L(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(U(F(s)))}function z(e){return["table","td","th"].indexOf(P(e))>=0}function W(e){return x(e)&&"fixed"!==I(e).position?e.offsetParent:null}function V(e){for(var t=w(e),n=W(e);n&&z(n)&&"static"===I(n).position;)n=W(n);return n&&("html"===P(n)||"body"===P(n)&&"static"===I(n).position)?t:n||function(e){var t=/firefox/i.test(E());if(/Trident/i.test(E())&&x(e)&&"fixed"===I(e).position)return null;var n=F(e);for(S(n)&&(n=n.host);x(n)&&["html","body"].indexOf(P(n))<0;){var r=I(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}var H="top",G="bottom",q="right",Y="left",K="auto",X=[H,G,q,Y],$="start",Q="end",Z="clippingParents",J="viewport",ee="popper",te="reference",ne=X.reduce((function(e,t){return e.concat([t+"-"+$,t+"-"+Q])}),[]),re=[].concat(X,[K]).reduce((function(e,t){return e.concat([t,t+"-"+$,t+"-"+Q])}),[]),oe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function ie(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function se(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}var ae={placement:"bottom",modifiers:[],strategy:"absolute"};function le(){for(var e=arguments.length,t=new Array(e),n=0;n=0?"x":"y"}function fe(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?de(o):null,s=o?he(o):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case H:t={x:a,y:n.y-r.height};break;case G:t={x:a,y:n.y+n.height};break;case q:t={x:n.x+n.width,y:l};break;case Y:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?pe(i):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case $:t[c]=t[c]-(n[u]/2-r[u]/2);break;case Q:t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}var me={top:"auto",right:"auto",bottom:"auto",left:"auto"};function ge(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,d=e.isFixed,h=s.x,p=void 0===h?0:h,f=s.y,m=void 0===f?0:f,g="function"===typeof u?u({x:p,y:m}):{x:p,y:m};p=g.x,m=g.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=Y,_=H,x=window;if(c){var S=V(n),A="clientHeight",C="clientWidth";if(S===w(n)&&"static"!==I(S=R(n)).position&&"absolute"===a&&(A="scrollHeight",C="scrollWidth"),o===H||(o===Y||o===q)&&i===Q)_=G,m-=(d&&S===x&&x.visualViewport?x.visualViewport.height:S[A])-r.height,m*=l?1:-1;if(o===Y||(o===H||o===G)&&i===Q)b=q,p-=(d&&S===x&&x.visualViewport?x.visualViewport.width:S[C])-r.width,p*=l?1:-1}var E,T=Object.assign({position:a},c&&me),O=!0===u?function(e,t){var n=e.x,r=e.y,o=t.devicePixelRatio||1;return{x:k(n*o)/o||0,y:k(r*o)/o||0}}({x:p,y:m},w(n)):{x:p,y:m};return p=O.x,m=O.y,l?Object.assign({},T,((E={})[_]=y?"0":"",E[b]=v?"0":"",E.transform=(x.devicePixelRatio||1)<=1?"translate("+p+"px, "+m+"px)":"translate3d("+p+"px, "+m+"px, 0)",E)):Object.assign({},T,((t={})[_]=y?m+"px":"",t[b]=v?p+"px":"",t.transform="",t))}const ve={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,s=re.reduce((function(e,n){return e[n]=function(e,t,n){var r=de(e),o=[Y,H].indexOf(r)>=0?-1:1,i="function"===typeof n?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[Y,q].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}};var ye={left:"right",right:"left",bottom:"top",top:"bottom"};function be(e){return e.replace(/left|right|bottom|top/g,(function(e){return ye[e]}))}var we={start:"end",end:"start"};function _e(e){return e.replace(/start|end/g,(function(e){return we[e]}))}function xe(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&S(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function Se(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ae(e,t,n){return t===J?Se(function(e,t){var n=w(e),r=R(e),o=n.visualViewport,i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;var c=T();(c||!c&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a+N(e),y:l}}(e,n)):_(t)?function(e,t){var n=O(e,!1,"fixed"===t);return n.top=n.top+e.clientTop,n.left=n.left+e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}(t,n):Se(function(e){var t,n=R(e),r=M(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=A(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=A(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+N(e),l=-r.scrollTop;return"rtl"===I(o||n).direction&&(a+=A(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(R(e)))}function Ce(e,t,n,r){var o="clippingParents"===t?function(e){var t=U(F(e)),n=["absolute","fixed"].indexOf(I(e).position)>=0&&x(e)?V(e):e;return _(n)?t.filter((function(e){return _(e)&&xe(e,n)&&"body"!==P(e)})):[]}(e):[].concat(t),i=[].concat(o,[n]),s=i[0],a=i.reduce((function(t,n){var o=Ae(e,n,r);return t.top=A(o.top,t.top),t.right=C(o.right,t.right),t.bottom=C(o.bottom,t.bottom),t.left=A(o.left,t.left),t}),Ae(e,s,r));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function ke(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Ee(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}function Te(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.strategy,s=void 0===i?e.strategy:i,a=n.boundary,l=void 0===a?Z:a,c=n.rootBoundary,u=void 0===c?J:c,d=n.elementContext,h=void 0===d?ee:d,p=n.altBoundary,f=void 0!==p&&p,m=n.padding,g=void 0===m?0:m,v=ke("number"!==typeof g?g:Ee(g,X)),y=h===ee?te:ee,b=e.rects.popper,w=e.elements[f?y:h],x=Ce(_(w)?w:w.contextElement||R(e.elements.popper),l,u,s),S=O(e.elements.reference),A=fe({reference:S,element:b,strategy:"absolute",placement:o}),C=Se(Object.assign({},b,A)),k=h===ee?C:S,E={top:x.top-k.top+v.top,bottom:k.bottom-x.bottom+v.bottom,left:x.left-k.left+v.left,right:k.right-x.right+v.right},T=e.modifiersData.offset;if(h===ee&&T){var M=T[o];Object.keys(E).forEach((function(e){var t=[q,G].indexOf(e)>=0?1:-1,n=[H,G].indexOf(e)>=0?"y":"x";E[e]+=M[n]*t}))}return E}function Oe(e,t,n){return A(e,C(t,n))}const Me={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,p=void 0===h||h,f=n.tetherOffset,m=void 0===f?0:f,g=Te(t,{boundary:l,rootBoundary:c,padding:d,altBoundary:u}),v=de(t.placement),y=he(t.placement),b=!y,w=pe(v),_="x"===w?"y":"x",x=t.modifiersData.popperOffsets,S=t.rects.reference,k=t.rects.popper,E="function"===typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,T="number"===typeof E?{mainAxis:E,altAxis:E}:Object.assign({mainAxis:0,altAxis:0},E),O=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,M={x:0,y:0};if(x){if(i){var P,R="y"===w?H:Y,N="y"===w?G:q,I="y"===w?"height":"width",L=x[w],D=L+g[R],F=L-g[N],B=p?-k[I]/2:0,U=y===$?S[I]:k[I],z=y===$?-k[I]:-S[I],W=t.elements.arrow,K=p&&W?j(W):{width:0,height:0},X=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},Q=X[R],Z=X[N],J=Oe(0,S[I],K[I]),ee=b?S[I]/2-B-J-Q-T.mainAxis:U-J-Q-T.mainAxis,te=b?-S[I]/2+B+J+Z+T.mainAxis:z+J+Z+T.mainAxis,ne=t.elements.arrow&&V(t.elements.arrow),re=ne?"y"===w?ne.clientTop||0:ne.clientLeft||0:0,oe=null!=(P=null==O?void 0:O[w])?P:0,ie=L+te-oe,se=Oe(p?C(D,L+ee-oe-re):D,L,p?A(F,ie):F);x[w]=se,M[w]=se-L}if(a){var ae,le="x"===w?H:Y,ce="x"===w?G:q,ue=x[_],fe="y"===_?"height":"width",me=ue+g[le],ge=ue-g[ce],ve=-1!==[H,Y].indexOf(v),ye=null!=(ae=null==O?void 0:O[_])?ae:0,be=ve?me:ue-S[fe]-k[fe]-ye+T.altAxis,we=ve?ue+S[fe]+k[fe]-ye-T.altAxis:ge,_e=p&&ve?function(e,t,n){var r=Oe(e,t,n);return r>n?n:r}(be,ue,we):Oe(p?be:me,ue,p?we:ge);x[_]=_e,M[_]=_e-ue}t.modifiersData[r]=M}},requiresIfExists:["offset"]};const Pe={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=de(n.placement),l=pe(a),c=[Y,q].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return ke("number"!==typeof(e="function"===typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Ee(e,X))}(o.padding,n),d=j(i),h="y"===l?H:Y,p="y"===l?G:q,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=V(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=u[h],w=v-d[c]-u[p],_=v/2-d[c]/2+y,x=Oe(b,_,w),S=l;n.modifiersData[r]=((t={})[S]=x,t.centerOffset=x-_,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!==typeof r||(r=t.elements.popper.querySelector(r)))&&xe(t.elements.popper,r)&&(t.elements.arrow=r)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Re(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ne(e){return[H,q,G,Y].some((function(t){return e[t]>=0}))}var Ie=ce({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,l=w(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,ue)})),a&&l.addEventListener("resize",n.update,ue),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,ue)})),a&&l.removeEventListener("resize",n.update,ue)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=fe({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a,c={placement:de(t.placement),variation:he(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,ge(Object.assign({},c,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,ge(Object.assign({},c,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},{name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];x(o)&&P(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});x(r)&&P(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]},ve,{name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,p=n.flipVariations,f=void 0===p||p,m=n.allowedAutoPlacements,g=t.options.placement,v=de(g),y=l||(v===g||!f?[be(g)]:function(e){if(de(e)===K)return[];var t=be(e);return[_e(e),t,_e(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat(de(n)===K?function(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?re:l,u=he(r),d=u?a?ne:ne.filter((function(e){return he(e)===u})):X,h=d.filter((function(e){return c.indexOf(e)>=0}));0===h.length&&(h=d);var p=h.reduce((function(t,n){return t[n]=Te(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[de(n)],t}),{});return Object.keys(p).sort((function(e,t){return p[e]-p[t]}))}(t,{placement:n,boundary:u,rootBoundary:d,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),w=t.rects.reference,_=t.rects.popper,x=new Map,S=!0,A=b[0],C=0;C=0,M=O?"width":"height",P=Te(t,{placement:k,boundary:u,rootBoundary:d,altBoundary:h,padding:c}),R=O?T?q:Y:T?G:H;w[M]>_[M]&&(R=be(R));var N=be(R),I=[];if(i&&I.push(P[E]<=0),a&&I.push(P[R]<=0,P[N]<=0),I.every((function(e){return e}))){A=k,S=!1;break}x.set(k,I)}if(S)for(var L=function(e){var t=b.find((function(t){var n=x.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return A=t,"break"},D=f?3:1;D>0;D--){if("break"===L(D))break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},Me,Pe,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Te(t,{elementContext:"reference"}),a=Te(t,{altBoundary:!0}),l=Re(s,r),c=Re(a,o,i),u=Ne(l),d=Ne(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]}),Le=n(5187),De=n(68483);const je="base";function Fe(e,t){const n=De.li[t];return n?(r=n,"".concat(je,"--").concat(r)):function(e,t){return"".concat(je,"-").concat(e,"-").concat(t)}(e,t);var r}const Be="Popper";function Ue(e){return Fe(Be,e)}!function(e,t){const n={};t.forEach((t=>{n[t]=Fe(e,t)}))}(Be,["root"]);var ze=n(43161),We=n(44414);const Ve={disableDefaultClasses:!1},He=i.createContext(Ve);const Ge=["anchorEl","children","direction","disablePortal","modifiers","open","placement","popperOptions","popperRef","slotProps","slots","TransitionProps","ownerState"],qe=["anchorEl","children","container","direction","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","style","transition","slotProps","slots"];function Ye(e){return"function"===typeof e?e():e}function Ke(e){return void 0!==e.nodeType}const Xe=()=>(0,c.A)({root:["root"]},function(e){const{disableDefaultClasses:t}=i.useContext(He);return n=>t?"":e(n)}(Ue)),$e={},Qe=i.forwardRef((function(e,t){var n;const{anchorEl:s,children:a,direction:l,disablePortal:c,modifiers:u,open:d,placement:h,popperOptions:p,popperRef:f,slotProps:m={},slots:g={},TransitionProps:b}=e,w=(0,r.A)(e,Ge),_=i.useRef(null),x=(0,v.A)(_,t),S=i.useRef(null),A=(0,v.A)(S,f),C=i.useRef(A);(0,y.A)((()=>{C.current=A}),[A]),i.useImperativeHandle(f,(()=>S.current),[]);const k=function(e,t){if("ltr"===t)return e;switch(e){case"bottom-end":return"bottom-start";case"bottom-start":return"bottom-end";case"top-end":return"top-start";case"top-start":return"top-end";default:return e}}(h,l),[E,T]=i.useState(k),[O,M]=i.useState(Ye(s));i.useEffect((()=>{S.current&&S.current.forceUpdate()})),i.useEffect((()=>{s&&M(Ye(s))}),[s]),(0,y.A)((()=>{if(!O||!d)return;let e=[{name:"preventOverflow",options:{altBoundary:c}},{name:"flip",options:{altBoundary:c}},{name:"onUpdate",enabled:!0,phase:"afterWrite",fn:e=>{let{state:t}=e;T(t.placement)}}];null!=u&&(e=e.concat(u)),p&&null!=p.modifiers&&(e=e.concat(p.modifiers));const t=Ie(O,_.current,(0,o.A)({placement:k},p,{modifiers:e}));return C.current(t),()=>{t.destroy(),C.current(null)}}),[O,c,u,d,p,k]);const P={placement:E};null!==b&&(P.TransitionProps=b);const R=Xe(),N=null!=(n=g.root)?n:"div",I=(0,ze.Q)({elementType:N,externalSlotProps:m.root,externalForwardedProps:w,additionalProps:{role:"tooltip",ref:x},ownerState:e,className:R.root});return(0,We.jsx)(N,(0,o.A)({},I,{children:"function"===typeof a?a(P):a}))})),Ze=i.forwardRef((function(e,t){const{anchorEl:n,children:s,container:a,direction:l="ltr",disablePortal:c=!1,keepMounted:u=!1,modifiers:d,open:h,placement:p="bottom",popperOptions:f=$e,popperRef:m,style:g,transition:v=!1,slotProps:y={},slots:w={}}=e,_=(0,r.A)(e,qe),[x,S]=i.useState(!0);if(!u&&!h&&(!v||x))return null;let A;if(a)A=a;else if(n){const e=Ye(n);A=e&&Ke(e)?(0,b.A)(e).body:(0,b.A)(null).body}const C=h||!u||v&&!x?void 0:"none",k=v?{in:h,onEnter:()=>{S(!1)},onExited:()=>{S(!0)}}:void 0;return(0,We.jsx)(Le.Z,{disablePortal:c,container:A,children:(0,We.jsx)(Qe,(0,o.A)({anchorEl:n,direction:l,disablePortal:c,modifiers:d,ref:t,open:v?!x:h,placement:p,popperOptions:f,popperRef:m,slotProps:y,slots:w},_,{style:(0,o.A)({position:"fixed",top:0,left:0,display:C},g),TransitionProps:k,children:s}))})}));var Je=n(25329);const et=["anchorEl","component","components","componentsProps","container","disablePortal","keepMounted","modifiers","open","placement","popperOptions","popperRef","transition","slots","slotProps"],tt=(0,h.Ay)(Ze,{name:"MuiPopper",slot:"Root",overridesResolver:(e,t)=>t.root})({}),nt=i.forwardRef((function(e,t){var n;const i=(0,Je.A)(),s=(0,f.A)({props:e,name:"MuiPopper"}),{anchorEl:a,component:l,components:c,componentsProps:u,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:w,slots:_,slotProps:x}=s,S=(0,r.A)(s,et),A=null!=(n=null==_?void 0:_.root)?n:null==c?void 0:c.Root,C=(0,o.A)({anchorEl:a,container:d,disablePortal:h,keepMounted:p,modifiers:m,open:g,placement:v,popperOptions:y,popperRef:b,transition:w},S);return(0,We.jsx)(tt,(0,o.A)({as:l,direction:null==i?void 0:i.direction,slots:{root:A},slotProps:null!=x?x:u},C,{ref:t}))}));var rt=n(1976),ot=n(31506),it=n(31014),st=n(41573),at=n(48733);function lt(e){return(0,De.Ay)("MuiTooltip",e)}const ct=(0,n(80863).A)("MuiTooltip",["popper","popperInteractive","popperArrow","popperClose","tooltip","tooltipArrow","touch","tooltipPlacementLeft","tooltipPlacementRight","tooltipPlacementTop","tooltipPlacementBottom","arrow"]),ut=["arrow","children","classes","components","componentsProps","describeChild","disableFocusListener","disableHoverListener","disableInteractive","disableTouchListener","enterDelay","enterNextDelay","enterTouchDelay","followCursor","id","leaveDelay","leaveTouchDelay","onClose","onOpen","open","placement","PopperComponent","PopperProps","slotProps","slots","title","TransitionComponent","TransitionProps"];const dt=(0,h.Ay)(nt,{name:"MuiTooltip",slot:"Popper",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.popper,!n.disableInteractive&&t.popperInteractive,n.arrow&&t.popperArrow,!n.open&&t.popperClose]}})((e=>{let{theme:t,ownerState:n,open:r}=e;return(0,o.A)({zIndex:(t.vars||t).zIndex.tooltip,pointerEvents:"none"},!n.disableInteractive&&{pointerEvents:"auto"},!r&&{pointerEvents:"none"},n.arrow&&{['&[data-popper-placement*="bottom"] .'.concat(ct.arrow)]:{top:0,marginTop:"-0.71em","&::before":{transformOrigin:"0 100%"}},['&[data-popper-placement*="top"] .'.concat(ct.arrow)]:{bottom:0,marginBottom:"-0.71em","&::before":{transformOrigin:"100% 0"}},['&[data-popper-placement*="right"] .'.concat(ct.arrow)]:(0,o.A)({},n.isRtl?{right:0,marginRight:"-0.71em"}:{left:0,marginLeft:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"100% 100%"}}),['&[data-popper-placement*="left"] .'.concat(ct.arrow)]:(0,o.A)({},n.isRtl?{left:0,marginLeft:"-0.71em"}:{right:0,marginRight:"-0.71em"},{height:"1em",width:"0.71em","&::before":{transformOrigin:"0 0"}})})})),ht=(0,h.Ay)("div",{name:"MuiTooltip",slot:"Tooltip",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.tooltip,n.touch&&t.touch,n.arrow&&t.tooltipArrow,t["tooltipPlacement".concat((0,m.A)(n.placement.split("-")[0]))]]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({backgroundColor:t.vars?t.vars.palette.Tooltip.bg:(0,u.X4)(t.palette.grey[700],.92),borderRadius:(t.vars||t).shape.borderRadius,color:(t.vars||t).palette.common.white,fontFamily:t.typography.fontFamily,padding:"4px 8px",fontSize:t.typography.pxToRem(11),maxWidth:300,margin:2,wordWrap:"break-word",fontWeight:t.typography.fontWeightMedium},n.arrow&&{position:"relative",margin:0},n.touch&&{padding:"8px 16px",fontSize:t.typography.pxToRem(14),lineHeight:"".concat((r=16/14,Math.round(1e5*r)/1e5),"em"),fontWeight:t.typography.fontWeightRegular},{[".".concat(ct.popper,'[data-popper-placement*="left"] &')]:(0,o.A)({transformOrigin:"right center"},n.isRtl?(0,o.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"}):(0,o.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"})),[".".concat(ct.popper,'[data-popper-placement*="right"] &')]:(0,o.A)({transformOrigin:"left center"},n.isRtl?(0,o.A)({marginRight:"14px"},n.touch&&{marginRight:"24px"}):(0,o.A)({marginLeft:"14px"},n.touch&&{marginLeft:"24px"})),[".".concat(ct.popper,'[data-popper-placement*="top"] &')]:(0,o.A)({transformOrigin:"center bottom",marginBottom:"14px"},n.touch&&{marginBottom:"24px"}),[".".concat(ct.popper,'[data-popper-placement*="bottom"] &')]:(0,o.A)({transformOrigin:"center top",marginTop:"14px"},n.touch&&{marginTop:"24px"})});var r})),pt=(0,h.Ay)("span",{name:"MuiTooltip",slot:"Arrow",overridesResolver:(e,t)=>t.arrow})((e=>{let{theme:t}=e;return{overflow:"hidden",position:"absolute",width:"1em",height:"0.71em",boxSizing:"border-box",color:t.vars?t.vars.palette.Tooltip.bg:(0,u.X4)(t.palette.grey[700],.9),"&::before":{content:'""',margin:"auto",display:"block",width:"100%",height:"100%",backgroundColor:"currentColor",transform:"rotate(45deg)"}}}));let ft=!1;const mt=new a.E;let gt={x:0,y:0};function vt(e,t){return function(n){for(var r=arguments.length,o=new Array(r>1?r-1:0),i=1;i{void 0!==Ce.current&&(document.body.style.WebkitUserSelect=Ce.current,Ce.current=void 0),we.clear()}));i.useEffect((()=>ke),[ke]);const Ee=e=>{mt.clear(),ft=!0,xe(!0),Q&&!Se&&Q(e)},Te=(0,rt.A)((e=>{mt.start(800+K,(()=>{ft=!1})),xe(!1),$&&Se&&$(e),ve.start(ce.transitions.duration.shortest,(()=>{me.current=!1}))})),Oe=e=>{me.current&&"touchstart"!==e.type||(de&&de.removeAttribute("title"),ye.clear(),be.clear(),V||ft&&H?ye.start(ft?H:V,(()=>{Ee(e)})):Ee(e))},Me=e=>{ye.clear(),be.start(K,(()=>{Te(e)}))},{isFocusVisibleRef:Pe,onBlur:Re,onFocus:Ne,ref:Ie}=(0,st.A)(),[,Le]=i.useState(!1),De=e=>{Re(e),!1===Pe.current&&(Le(!1),Me(e))},je=e=>{de||he(e.currentTarget),Ne(e),!0===Pe.current&&(Le(!0),Oe(e))},Fe=e=>{me.current=!0;const t=le.props;t.onTouchStart&&t.onTouchStart(e)},Be=e=>{Fe(e),be.clear(),ve.clear(),ke(),Ce.current=document.body.style.WebkitUserSelect,document.body.style.WebkitUserSelect="none",we.start(G,(()=>{document.body.style.WebkitUserSelect=Ce.current,Oe(e)}))},Ue=e=>{le.props.onTouchEnd&&le.props.onTouchEnd(e),ke(),be.start(X,(()=>{Te(e)}))};i.useEffect((()=>{if(Se)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){"Escape"!==e.key&&"Esc"!==e.key||Te(e)}}),[Te,Se]);const ze=(0,ot.A)(le.ref,Ie,he,t);oe||0===oe||(Se=!1);const Ve=i.useRef(),He={},Ge="string"===typeof oe;F?(He.title=Se||!Ge||U?null:oe,He["aria-describedby"]=Se?Ae:null):(He["aria-label"]=Ge?oe:null,He["aria-labelledby"]=Se&&!Ge?Ae:null);const qe=(0,o.A)({},He,ae,le.props,{className:(0,s.A)(ae.className,le.props.className),onTouchStart:Fe,ref:ze},q?{onMouseMove:e=>{const t=le.props;t.onMouseMove&&t.onMouseMove(e),gt={x:e.clientX,y:e.clientY},Ve.current&&Ve.current.update()}}:{});const Ye={};W||(qe.onTouchStart=Be,qe.onTouchEnd=Ue),U||(qe.onMouseOver=vt(Oe,qe.onMouseOver),qe.onMouseLeave=vt(Me,qe.onMouseLeave),ge||(Ye.onMouseOver=Oe,Ye.onMouseLeave=Me)),B||(qe.onFocus=vt(je,qe.onFocus),qe.onBlur=vt(De,qe.onBlur),ge||(Ye.onFocus=je,Ye.onBlur=De));const Ke=i.useMemo((()=>{var e;let t=[{name:"arrow",enabled:Boolean(pe),options:{element:pe,padding:4}}];return null!=(e=te.popperOptions)&&e.modifiers&&(t=t.concat(te.popperOptions.modifiers)),(0,o.A)({},te.popperOptions,{modifiers:t})}),[pe,te]),Xe=(0,o.A)({},N,{isRtl:ue,arrow:I,disableInteractive:ge,placement:J,PopperComponentProp:ee,touch:me.current}),$e=(e=>{const{classes:t,disableInteractive:n,arrow:r,touch:o,placement:i}=e,s={popper:["popper",!n&&"popperInteractive",r&&"popperArrow"],tooltip:["tooltip",r&&"tooltipArrow",o&&"touch","tooltipPlacement".concat((0,m.A)(i.split("-")[0]))],arrow:["arrow"]};return(0,c.A)(s,lt,t)})(Xe),Qe=null!=(n=null!=(u=re.popper)?u:D.Popper)?n:dt,Ze=null!=(h=null!=(v=null!=(y=re.transition)?y:D.Transition)?v:ie)?h:g.A,Je=null!=(b=null!=(w=re.tooltip)?w:D.Tooltip)?b:ht,et=null!=(_=null!=(x=re.arrow)?x:D.Arrow)?_:pt,tt=(0,l.X)(Qe,(0,o.A)({},te,null!=(S=ne.popper)?S:j.popper,{className:(0,s.A)($e.popper,null==te?void 0:te.className,null==(A=null!=(C=ne.popper)?C:j.popper)?void 0:A.className)}),Xe),ct=(0,l.X)(Ze,(0,o.A)({},se,null!=(k=ne.transition)?k:j.transition),Xe),yt=(0,l.X)(Je,(0,o.A)({},null!=(E=ne.tooltip)?E:j.tooltip,{className:(0,s.A)($e.tooltip,null==(T=null!=(O=ne.tooltip)?O:j.tooltip)?void 0:T.className)}),Xe),bt=(0,l.X)(et,(0,o.A)({},null!=(M=ne.arrow)?M:j.arrow,{className:(0,s.A)($e.arrow,null==(P=null!=(R=ne.arrow)?R:j.arrow)?void 0:P.className)}),Xe);return(0,We.jsxs)(i.Fragment,{children:[i.cloneElement(le,qe),(0,We.jsx)(Qe,(0,o.A)({as:null!=ee?ee:nt,placement:J,anchorEl:q?{getBoundingClientRect:()=>({top:gt.y,left:gt.x,right:gt.x,bottom:gt.y,width:0,height:0})}:de,popperRef:Ve,open:!!de&&Se,id:Ae,transition:!0},Ye,tt,{popperOptions:Ke,children:e=>{let{TransitionProps:t}=e;return(0,We.jsx)(Ze,(0,o.A)({timeout:ce.transitions.duration.shorter},t,ct,{children:(0,We.jsxs)(Je,(0,o.A)({},yt,{children:[oe,I?(0,We.jsx)(et,(0,o.A)({},bt,{ref:fe})):null]}))}))}}))]})})),bt=yt},82053:(e,t,n)=>{"use strict";n.d(t,{A:()=>w});var r=n(98587),o=n(58168),i=n(9950),s=n(72004),a=n(80237),l=n(74061),c=n(59254),u=n(48283),d=n(61676),h=n(80863),p=n(68483);function f(e){return(0,p.Ay)("MuiTypography",e)}(0,h.A)("MuiTypography",["root","h1","h2","h3","h4","h5","h6","subtitle1","subtitle2","body1","body2","inherit","button","caption","overline","alignLeft","alignRight","alignCenter","alignJustify","noWrap","gutterBottom","paragraph"]);var m=n(44414);const g=["align","className","component","gutterBottom","noWrap","paragraph","variant","variantMapping"],v=(0,c.Ay)("span",{name:"MuiTypography",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,n.variant&&t[n.variant],"inherit"!==n.align&&t["align".concat((0,d.A)(n.align))],n.noWrap&&t.noWrap,n.gutterBottom&&t.gutterBottom,n.paragraph&&t.paragraph]}})((e=>{let{theme:t,ownerState:n}=e;return(0,o.A)({margin:0},"inherit"===n.variant&&{font:"inherit"},"inherit"!==n.variant&&t.typography[n.variant],"inherit"!==n.align&&{textAlign:n.align},n.noWrap&&{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},n.gutterBottom&&{marginBottom:"0.35em"},n.paragraph&&{marginBottom:16})})),y={h1:"h1",h2:"h2",h3:"h3",h4:"h4",h5:"h5",h6:"h6",subtitle1:"h6",subtitle2:"h6",body1:"p",body2:"p",inherit:"p"},b={primary:"primary.main",textPrimary:"text.primary",secondary:"secondary.main",textSecondary:"text.secondary",error:"error.main"},w=i.forwardRef((function(e,t){const n=(0,u.A)({props:e,name:"MuiTypography"}),i=(e=>b[e]||e)(n.color),c=(0,a.A)((0,o.A)({},n,{color:i})),{align:h="inherit",className:p,component:w,gutterBottom:_=!1,noWrap:x=!1,paragraph:S=!1,variant:A="body1",variantMapping:C=y}=c,k=(0,r.A)(c,g),E=(0,o.A)({},c,{align:h,color:i,className:p,component:w,gutterBottom:_,noWrap:x,paragraph:S,variant:A,variantMapping:C}),T=w||(S?"p":C[A]||y[A])||"span",O=(e=>{const{align:t,gutterBottom:n,noWrap:r,paragraph:o,variant:i,classes:s}=e,a={root:["root",i,"inherit"!==e.align&&"align".concat((0,d.A)(t)),n&&"gutterBottom",r&&"noWrap",o&&"paragraph"]};return(0,l.A)(a,f,s)})(E);return(0,m.jsx)(v,(0,o.A)({as:T,ref:t,ownerState:E,className:(0,s.A)(O.root,p)},k))}))},47775:(e,t,n)=>{"use strict";n.d(t,{A:()=>B});var r=n(58168),o=n(98587),i=n(63999),s=n(66455),a=n(98076),l=n(70505),c=n(12860);var u=n(99269);const d={black:"#000",white:"#fff"},h={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},p={50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff"},f={50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000"},m={50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00"},g={50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff"},v={50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea"},y={50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853"},b=["mode","contrastThreshold","tonalOffset"],w={text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:d.white,default:d.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}},_={text:{primary:d.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:d.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}};function x(e,t,n,r){const o=r.light||r,i=r.dark||1.5*r;e[t]||(e.hasOwnProperty(n)?e[t]=e[n]:"light"===t?e.light=(0,u.a)(e.main,o):"dark"===t&&(e.dark=(0,u.e$)(e.main,i)))}function S(e){const{mode:t="light",contrastThreshold:n=3,tonalOffset:a=.2}=e,l=(0,o.A)(e,b),c=e.primary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:g[200],light:g[50],dark:g[400]}:{main:g[700],light:g[400],dark:g[800]}}(t),S=e.secondary||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:p[200],light:p[50],dark:p[400]}:{main:p[500],light:p[300],dark:p[700]}}(t),A=e.error||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:f[500],light:f[300],dark:f[700]}:{main:f[700],light:f[400],dark:f[800]}}(t),C=e.info||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:v[400],light:v[300],dark:v[700]}:{main:v[700],light:v[500],dark:v[900]}}(t),k=e.success||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:y[400],light:y[300],dark:y[700]}:{main:y[800],light:y[500],dark:y[900]}}(t),E=e.warning||function(){return"dark"===(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"light")?{main:m[400],light:m[300],dark:m[700]}:{main:"#ed6c02",light:m[500],dark:m[900]}}(t);function T(e){return(0,u.eM)(e,_.text.primary)>=n?_.text.primary:w.text.primary}const O=e=>{let{color:t,name:n,mainShade:o=500,lightShade:s=300,darkShade:l=700}=e;if(t=(0,r.A)({},t),!t.main&&t[o]&&(t.main=t[o]),!t.hasOwnProperty("main"))throw new Error((0,i.A)(11,n?" (".concat(n,")"):"",o));if("string"!==typeof t.main)throw new Error((0,i.A)(12,n?" (".concat(n,")"):"",JSON.stringify(t.main)));return x(t,"light",s,a),x(t,"dark",l,a),t.contrastText||(t.contrastText=T(t.main)),t},M={dark:_,light:w};return(0,s.A)((0,r.A)({common:(0,r.A)({},d),mode:t,primary:O({color:c,name:"primary"}),secondary:O({color:S,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:O({color:A,name:"error"}),warning:O({color:E,name:"warning"}),info:O({color:C,name:"info"}),success:O({color:k,name:"success"}),grey:h,contrastThreshold:n,getContrastText:T,augmentColor:O,tonalOffset:a},M[t]),l)}const A=["fontFamily","fontSize","fontWeightLight","fontWeightRegular","fontWeightMedium","fontWeightBold","htmlFontSize","allVariants","pxToRem"];const C={textTransform:"uppercase"},k='"Roboto", "Helvetica", "Arial", sans-serif';function E(e,t){const n="function"===typeof t?t(e):t,{fontFamily:i=k,fontSize:a=14,fontWeightLight:l=300,fontWeightRegular:c=400,fontWeightMedium:u=500,fontWeightBold:d=700,htmlFontSize:h=16,allVariants:p,pxToRem:f}=n,m=(0,o.A)(n,A);const g=a/14,v=f||(e=>"".concat(e/h*g,"rem")),y=(e,t,n,o,s)=>{return(0,r.A)({fontFamily:i,fontWeight:e,fontSize:v(t),lineHeight:n},i===k?{letterSpacing:"".concat((a=o/t,Math.round(1e5*a)/1e5),"em")}:{},s,p);var a},b={h1:y(l,96,1.167,-1.5),h2:y(l,60,1.2,-.5),h3:y(c,48,1.167,0),h4:y(c,34,1.235,.25),h5:y(c,24,1.334,0),h6:y(u,20,1.6,.15),subtitle1:y(c,16,1.75,.15),subtitle2:y(u,14,1.57,.1),body1:y(c,16,1.5,.15),body2:y(c,14,1.43,.15),button:y(u,14,1.75,.4,C),caption:y(c,12,1.66,.4),overline:y(c,12,2.66,1,C),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return(0,s.A)((0,r.A)({htmlFontSize:h,pxToRem:v,fontFamily:i,fontSize:a,fontWeightLight:l,fontWeightRegular:c,fontWeightMedium:u,fontWeightBold:d},b),m,{clone:!1})}function T(){return["".concat(arguments.length<=0?void 0:arguments[0],"px ").concat(arguments.length<=1?void 0:arguments[1],"px ").concat(arguments.length<=2?void 0:arguments[2],"px ").concat(arguments.length<=3?void 0:arguments[3],"px rgba(0,0,0,").concat(.2,")"),"".concat(arguments.length<=4?void 0:arguments[4],"px ").concat(arguments.length<=5?void 0:arguments[5],"px ").concat(arguments.length<=6?void 0:arguments[6],"px ").concat(arguments.length<=7?void 0:arguments[7],"px rgba(0,0,0,").concat(.14,")"),"".concat(arguments.length<=8?void 0:arguments[8],"px ").concat(arguments.length<=9?void 0:arguments[9],"px ").concat(arguments.length<=10?void 0:arguments[10],"px ").concat(arguments.length<=11?void 0:arguments[11],"px rgba(0,0,0,").concat(.12,")")].join(",")}const O=["none",T(0,2,1,-1,0,1,1,0,0,1,3,0),T(0,3,1,-2,0,2,2,0,0,1,5,0),T(0,3,3,-2,0,3,4,0,0,1,8,0),T(0,2,4,-1,0,4,5,0,0,1,10,0),T(0,3,5,-1,0,5,8,0,0,1,14,0),T(0,3,5,-1,0,6,10,0,0,1,18,0),T(0,4,5,-2,0,7,10,1,0,2,16,1),T(0,5,5,-3,0,8,10,1,0,3,14,2),T(0,5,6,-3,0,9,12,1,0,3,16,2),T(0,6,6,-3,0,10,14,1,0,4,18,3),T(0,6,7,-4,0,11,15,1,0,4,20,3),T(0,7,8,-4,0,12,17,2,0,5,22,4),T(0,7,8,-4,0,13,19,2,0,5,24,4),T(0,7,9,-4,0,14,21,2,0,5,26,4),T(0,8,9,-5,0,15,22,2,0,6,28,5),T(0,8,10,-5,0,16,24,2,0,6,30,5),T(0,8,11,-5,0,17,26,2,0,6,32,5),T(0,9,11,-5,0,18,28,2,0,7,34,6),T(0,9,12,-6,0,19,29,2,0,7,36,6),T(0,10,13,-6,0,20,31,3,0,8,38,7),T(0,10,13,-6,0,21,33,3,0,8,40,7),T(0,10,14,-6,0,22,35,3,0,8,42,7),T(0,11,14,-7,0,23,36,3,0,9,44,8),T(0,11,15,-7,0,24,38,3,0,9,46,8)],M=["duration","easing","delay"],P={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},R={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function N(e){return"".concat(Math.round(e),"ms")}function I(e){if(!e)return 0;const t=e/36;return Math.round(10*(4+15*t**.25+t/5))}function L(e){const t=(0,r.A)({},P,e.easing),n=(0,r.A)({},R,e.duration);return(0,r.A)({getAutoHeightDuration:I,create:function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["all"],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{duration:i=n.standard,easing:s=t.easeInOut,delay:a=0}=r;(0,o.A)(r,M);return(Array.isArray(e)?e:[e]).map((e=>"".concat(e," ").concat("string"===typeof i?i:N(i)," ").concat(s," ").concat("string"===typeof a?a:N(a)))).join(",")}},e,{easing:t,duration:n})}const D={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500},j=["breakpoints","mixins","spacing","palette","transitions","typography","shape"];function F(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{mixins:t={},palette:n={},transitions:u={},typography:d={}}=e,h=(0,o.A)(e,j);if(e.vars)throw new Error((0,i.A)(18));const p=S(n),f=(0,c.A)(e);let m=(0,s.A)(f,{mixins:(g=f.breakpoints,v=t,(0,r.A)({toolbar:{minHeight:56,[g.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[g.up("sm")]:{minHeight:64}}},v)),palette:p,shadows:O.slice(),typography:E(p,d),transitions:L(u),zIndex:(0,r.A)({},D)});var g,v;m=(0,s.A)(m,h);for(var y=arguments.length,b=new Array(y>1?y-1:0),w=1;w(0,s.A)(e,t)),m),m.unstable_sxConfig=(0,r.A)({},a.A,null==h?void 0:h.unstable_sxConfig),m.unstable_sx=function(e){return(0,l.A)({sx:e,theme:this})},m}const B=F},60195:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=(0,n(47775).A)()},67550:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r="$$material"},19608:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(61960);const o=e=>(0,r.A)(e)&&"classes"!==e},61960:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}},59254:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a});var r=n(37295),o=n(60195),i=n(67550),s=n(19608);const a=(0,r.Ay)({themeId:i.A,defaultTheme:o.A,rootShouldForwardProp:s.A})},14857:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});n(9950);var r=n(85341),o=n(60195),i=n(67550);function s(){const e=(0,r.A)(o.A);return e[i.A]||e}},48283:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(22880),o=n(60195),i=n(67550);function s(e){let{props:t,name:n}=e;return(0,r.A)({props:t,name:n,defaultTheme:o.A,themeId:i.A})}},70576:(e,t,n)=>{"use strict";n.d(t,{c:()=>o,q:()=>r});const r=e=>e.scrollTop;function o(e,t){var n,r;const{timeout:o,easing:i,style:s={}}=e;return{duration:null!=(n=s.transitionDuration)?n:"number"===typeof o?o:o[t.mode]||0,easing:null!=(r=s.transitionTimingFunction)?r:"object"===typeof i?i[t.mode]:i,delay:s.transitionDelay}}},61676:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(43081).A},23235:(e,t,n)=>{"use strict";n.d(t,{A:()=>b});var r=n(58168),o=n(9950),i=n(98587),s=n(72004),a=n(74061),l=n(61676),c=n(48283),u=n(59254),d=n(80863),h=n(68483);function p(e){return(0,h.Ay)("MuiSvgIcon",e)}(0,d.A)("MuiSvgIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);var f=n(44414);const m=["children","className","color","component","fontSize","htmlColor","inheritViewBox","titleAccess","viewBox"],g=(0,u.Ay)("svg",{name:"MuiSvgIcon",slot:"Root",overridesResolver:(e,t)=>{const{ownerState:n}=e;return[t.root,"inherit"!==n.color&&t["color".concat((0,l.A)(n.color))],t["fontSize".concat((0,l.A)(n.fontSize))]]}})((e=>{let{theme:t,ownerState:n}=e;var r,o,i,s,a,l,c,u,d,h,p,f,m;return{userSelect:"none",width:"1em",height:"1em",display:"inline-block",fill:n.hasSvgAsChild?void 0:"currentColor",flexShrink:0,transition:null==(r=t.transitions)||null==(o=r.create)?void 0:o.call(r,"fill",{duration:null==(i=t.transitions)||null==(i=i.duration)?void 0:i.shorter}),fontSize:{inherit:"inherit",small:(null==(s=t.typography)||null==(a=s.pxToRem)?void 0:a.call(s,20))||"1.25rem",medium:(null==(l=t.typography)||null==(c=l.pxToRem)?void 0:c.call(l,24))||"1.5rem",large:(null==(u=t.typography)||null==(d=u.pxToRem)?void 0:d.call(u,35))||"2.1875rem"}[n.fontSize],color:null!=(h=null==(p=(t.vars||t).palette)||null==(p=p[n.color])?void 0:p.main)?h:{action:null==(f=(t.vars||t).palette)||null==(f=f.action)?void 0:f.active,disabled:null==(m=(t.vars||t).palette)||null==(m=m.action)?void 0:m.disabled,inherit:void 0}[n.color]}})),v=o.forwardRef((function(e,t){const n=(0,c.A)({props:e,name:"MuiSvgIcon"}),{children:u,className:d,color:h="inherit",component:v="svg",fontSize:y="medium",htmlColor:b,inheritViewBox:w=!1,titleAccess:_,viewBox:x="0 0 24 24"}=n,S=(0,i.A)(n,m),A=o.isValidElement(u)&&"svg"===u.type,C=(0,r.A)({},n,{color:h,component:v,fontSize:y,instanceFontSize:e.fontSize,inheritViewBox:w,viewBox:x,hasSvgAsChild:A}),k={};w||(k.viewBox=x);const E=(e=>{const{color:t,fontSize:n,classes:r}=e,o={root:["root","inherit"!==t&&"color".concat((0,l.A)(t)),"fontSize".concat((0,l.A)(n))]};return(0,a.A)(o,p,r)})(C);return(0,f.jsxs)(g,(0,r.A)({as:v,className:(0,s.A)(E.root,d),focusable:"false",color:b,"aria-hidden":!_||void 0,role:_?"img":void 0,ref:t},k,S,A&&u.props,{ownerState:C,children:[A?u.props.children:u,_?(0,f.jsx)("title",{children:_}):null]}))}));v.muiName="SvgIcon";const y=v;function b(e,t){function n(n,o){return(0,f.jsx)(y,(0,r.A)({"data-testid":"".concat(t,"Icon"),ref:o},n,{children:e}))}return n.muiName=y.muiName,o.memo(o.forwardRef(n))}},21209:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(62243).A},88943:(e,t,n)=>{"use strict";n.r(t),n.d(t,{capitalize:()=>o.A,createChainedFunction:()=>i,createSvgIcon:()=>s.A,debounce:()=>a.A,deprecatedPropType:()=>l,isMuiElement:()=>c.A,ownerDocument:()=>u.A,ownerWindow:()=>d.A,requirePropFactory:()=>h,setRef:()=>p,unstable_ClassNameGenerator:()=>_,unstable_useEnhancedEffect:()=>f.A,unstable_useId:()=>m.A,unsupportedProp:()=>g,useControlled:()=>v.A,useEventCallback:()=>y.A,useForkRef:()=>b.A,useIsFocusVisible:()=>w.A});var r=n(41681),o=n(61676);const i=n(97603).A;var s=n(23235),a=n(21209);const l=function(e,t){return()=>null};var c=n(60096),u=n(27402),d=n(70827);n(58168);const h=function(e,t){return()=>null};const p=n(25679).A;var f=n(79044),m=n(31014);const g=function(e,t,n,r,o){return null};var v=n(48733),y=n(1976),b=n(31506),w=n(41573);const _={configure:e=>{r.A.configure(e)}}},60096:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o=function(e,t){var n,o;return r.isValidElement(e)&&-1!==t.indexOf(null!=(n=e.type.muiName)?n:null==(o=e.type)||null==(o=o._payload)||null==(o=o.value)?void 0:o.muiName)}},27402:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(3511).A},70827:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(98727).A},48733:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(9543).A},79044:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(14131).A},1976:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(62877).A},31506:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(44093).A},31014:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(28767).A},41573:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=n(63755).A},74719:(e,t,n)=>{"use strict";n.d(t,{h:()=>o});var r=n(48283);function o(e){return r.A}},33158:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});n(9950);var r=n(88283),o=n(44414);function i(e){const{styles:t,defaultTheme:n={}}=e,i="function"===typeof t?e=>{return t(void 0===(r=e)||null===r||0===Object.keys(r).length?n:e);var r}:t;return(0,o.jsx)(r.mL,{styles:i})}},86897:(e,t,n)=>{"use strict";n.r(t),n.d(t,{GlobalStyles:()=>u.A,StyledEngineProvider:()=>c,ThemeContext:()=>i.T,css:()=>o.AH,default:()=>d,internal_processStyles:()=>h,keyframes:()=>o.i7});var r=n(46948),o=n(88283),i=n(22899),s=(n(9950),n(50857)),a=n(44414);let l;function c(e){const{injectFirst:t,children:n}=e;return t&&l?(0,a.jsx)(i.C,{value:l,children:n}):n}"object"===typeof document&&(l=(0,s.A)({key:"css",prepend:!0}));var u=n(33158);function d(e,t){return(0,r.A)(e,t)}const h=(e,t)=>{Array.isArray(e.__emotion_styles)&&(e.__emotion_styles=t(e.__emotion_styles))}},99269:(e,t,n)=>{"use strict";var r=n(24994);t.X4=p,t.e$=f,t.tL=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.15;return h(e)>.5?f(e,t):m(e,t)},t.eM=function(e,t){const n=h(e),r=h(t);return(Math.max(n,r)+.05)/(Math.min(n,r)+.05)},t.a=m;var o=r(n(99606)),i=r(n(5268));function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return(0,i.default)(e,t,n)}function a(e){e=e.slice(1);const t=new RegExp(".{1,".concat(e.length>=6?2:1,"}"),"g");let n=e.match(t);return n&&1===n[0].length&&(n=n.map((e=>e+e))),n?"rgb".concat(4===n.length?"a":"","(").concat(n.map(((e,t)=>t<3?parseInt(e,16):Math.round(parseInt(e,16)/255*1e3)/1e3)).join(", "),")"):""}function l(e){if(e.type)return e;if("#"===e.charAt(0))return l(a(e));const t=e.indexOf("("),n=e.substring(0,t);if(-1===["rgb","rgba","hsl","hsla","color"].indexOf(n))throw new Error((0,o.default)(9,e));let r,i=e.substring(t+1,e.length-1);if("color"===n){if(i=i.split(" "),r=i.shift(),4===i.length&&"/"===i[3].charAt(0)&&(i[3]=i[3].slice(1)),-1===["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].indexOf(r))throw new Error((0,o.default)(10,r))}else i=i.split(",");return i=i.map((e=>parseFloat(e))),{type:n,values:i,colorSpace:r}}const c=e=>{const t=l(e);return t.values.slice(0,3).map(((e,n)=>-1!==t.type.indexOf("hsl")&&0!==n?"".concat(e,"%"):e)).join(" ")};function u(e){const{type:t,colorSpace:n}=e;let{values:r}=e;return-1!==t.indexOf("rgb")?r=r.map(((e,t)=>t<3?parseInt(e,10):e)):-1!==t.indexOf("hsl")&&(r[1]="".concat(r[1],"%"),r[2]="".concat(r[2],"%")),r=-1!==t.indexOf("color")?"".concat(n," ").concat(r.join(" ")):"".concat(r.join(", ")),"".concat(t,"(").concat(r,")")}function d(e){e=l(e);const{values:t}=e,n=t[0],r=t[1]/100,o=t[2]/100,i=r*Math.min(o,1-o),s=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(e+n/30)%12;return o-i*Math.max(Math.min(t-3,9-t,1),-1)};let a="rgb";const c=[Math.round(255*s(0)),Math.round(255*s(8)),Math.round(255*s(4))];return"hsla"===e.type&&(a+="a",c.push(t[3])),u({type:a,values:c})}function h(e){let t="hsl"===(e=l(e)).type||"hsla"===e.type?l(d(e)).values:e.values;return t=t.map((t=>("color"!==e.type&&(t/=255),t<=.03928?t/12.92:((t+.055)/1.055)**2.4))),Number((.2126*t[0]+.7152*t[1]+.0722*t[2]).toFixed(3))}function p(e,t){return e=l(e),t=s(t),"rgb"!==e.type&&"hsl"!==e.type||(e.type+="a"),"color"===e.type?e.values[3]="/".concat(t):e.values[3]=t,u(e)}function f(e,t){if(e=l(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]*=1-t;else if(-1!==e.type.indexOf("rgb")||-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]*=1-t;return u(e)}function m(e,t){if(e=l(e),t=s(t),-1!==e.type.indexOf("hsl"))e.values[2]+=(100-e.values[2])*t;else if(-1!==e.type.indexOf("rgb"))for(let n=0;n<3;n+=1)e.values[n]+=(255-e.values[n])*t;else if(-1!==e.type.indexOf("color"))for(let n=0;n<3;n+=1)e.values[n]+=(1-e.values[n])*t;return u(e)}},37295:(e,t,n)=>{"use strict";var r=n(24994);t.Ay=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{themeId:t,defaultTheme:n=m,rootShouldForwardProp:r=f,slotShouldForwardProp:l=f}=e,u=e=>(0,c.default)((0,o.default)({},e,{theme:v((0,o.default)({},e,{defaultTheme:n,themeId:t}))}));return u.__mui_systemSx=!0,function(e){let c=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,s.internal_processStyles)(e,(e=>e.filter((e=>!(null!=e&&e.__mui_systemSx)))));const{name:d,slot:p,skipVariantsResolver:m,skipSx:w,overridesResolver:_=y(g(p))}=c,x=(0,i.default)(c,h),S=void 0!==m?m:p&&"Root"!==p&&"root"!==p||!1,A=w||!1;let C=f;"Root"===p||"root"===p?C=r:p?C=l:function(e){return"string"===typeof e&&e.charCodeAt(0)>96}(e)&&(C=void 0);const k=(0,s.default)(e,(0,o.default)({shouldForwardProp:C,label:undefined},x)),E=e=>"function"===typeof e&&e.__emotion_real!==e||(0,a.isPlainObject)(e)?r=>b(e,(0,o.default)({},r,{theme:v({theme:r.theme,defaultTheme:n,themeId:t})})):e,T=function(r){let i=E(r);for(var s=arguments.length,a=new Array(s>1?s-1:0),l=1;l{const r=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));if(!r.components||!r.components[d]||!r.components[d].styleOverrides)return null;const i=r.components[d].styleOverrides,s={};return Object.entries(i).forEach((t=>{let[n,i]=t;s[n]=b(i,(0,o.default)({},e,{theme:r}))})),_(e,s)})),d&&!S&&c.push((e=>{var r;const i=v((0,o.default)({},e,{defaultTheme:n,themeId:t}));return b({variants:null==i||null==(r=i.components)||null==(r=r[d])?void 0:r.variants},(0,o.default)({},e,{theme:i}))})),A||c.push(u);const h=c.length-a.length;if(Array.isArray(r)&&h>0){const e=new Array(h).fill("");i=[...r,...e],i.raw=[...r.raw,...e]}const p=k(i,...c);return e.muiName&&(p.muiName=e.muiName),p};return k.withConfig&&(T.withConfig=k.withConfig),T}};var o=r(n(94634)),i=r(n(54893)),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=o?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(r,i,s):r[i]=e[i]}return r.default=e,n&&n.set(e,r),r}(n(86897)),a=n(89717),l=(r(n(77719)),r(n(55645)),r(n(49904))),c=r(n(28807));const u=["ownerState"],d=["variants"],h=["name","slot","skipVariantsResolver","skipSx","overridesResolver"];function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function f(e){return"ownerState"!==e&&"theme"!==e&&"sx"!==e&&"as"!==e}const m=(0,l.default)(),g=e=>e?e.charAt(0).toLowerCase()+e.slice(1):e;function v(e){let{defaultTheme:t,theme:n,themeId:r}=e;return o=n,0===Object.keys(o).length?t:n[r]||n;var o}function y(e){return e?(t,n)=>n[e]:null}function b(e,t){let{ownerState:n}=t,r=(0,i.default)(t,u);const s="function"===typeof e?e((0,o.default)({ownerState:n},r)):e;if(Array.isArray(s))return s.flatMap((e=>b(e,(0,o.default)({ownerState:n},r))));if(s&&"object"===typeof s&&Array.isArray(s.variants)){const{variants:e=[]}=s;let t=(0,i.default)(s,d);return e.forEach((e=>{let i=!0;"function"===typeof e.props?i=e.props((0,o.default)({ownerState:n},r,n)):Object.keys(e.props).forEach((t=>{(null==n?void 0:n[t])!==e.props[t]&&r[t]!==e.props[t]&&(i=!1)})),i&&(Array.isArray(t)||(t=[t]),t.push("function"===typeof e.style?e.style((0,o.default)({ownerState:n},r,n)):e.style))})),t}return s}},44730:(e,t,n)=>{"use strict";n.d(t,{I:()=>i});var r=n(9950);n(44414);const o=r.createContext();const i=()=>{const e=r.useContext(o);return null!=e&&e}},28286:(e,t,n)=>{"use strict";n.d(t,{EU:()=>a,NI:()=>s,iZ:()=>c,kW:()=>u,vf:()=>l,zu:()=>o});var r=n(66455);const o={xs:0,sm:600,md:900,lg:1200,xl:1536},i={keys:["xs","sm","md","lg","xl"],up:e=>"@media (min-width:".concat(o[e],"px)")};function s(e,t,n){const r=e.theme||{};if(Array.isArray(t)){const e=r.breakpoints||i;return t.reduce(((r,o,i)=>(r[e.up(e.keys[i])]=n(t[i]),r)),{})}if("object"===typeof t){const e=r.breakpoints||i;return Object.keys(t).reduce(((r,i)=>{if(-1!==Object.keys(e.values||o).indexOf(i)){r[e.up(i)]=n(t[i],i)}else{const e=i;r[e]=t[e]}return r}),{})}return n(t)}function a(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};var t;return(null==(t=e.keys)?void 0:t.reduce(((t,n)=>(t[e.up(n)]={},t)),{}))||{}}function l(e,t){return e.reduce(((e,t)=>{const n=e[t];return(!n||0===Object.keys(n).length)&&delete e[t],e}),t)}function c(e){const t=a(e);for(var n=arguments.length,o=new Array(n>1?n-1:0),i=1;i(0,r.A)(e,t)),{});return l(Object.keys(t),s)}function u(e){let{values:t,breakpoints:n,base:r}=e;const o=r||function(e,t){if("object"!==typeof e)return{};const n={},r=Object.keys(t);return Array.isArray(e)?r.forEach(((t,r)=>{r{null!=e[t]&&(n[t]=!0)})),n}(t,n),i=Object.keys(o);if(0===i.length)return t;let s;return i.reduce(((e,n,r)=>(Array.isArray(t)?(e[n]=null!=t[r]?t[r]:t[s],s=r):"object"===typeof t?(e[n]=null!=t[n]?t[n]:t[s],s=n):e[n]=t,e)),{})}},30086:(e,t,n)=>{"use strict";function r(e,t){const n=this;if(n.vars&&"function"===typeof n.getColorSchemeSelector){return{[n.getColorSchemeSelector(e).replace(/(\[[^\]]+\])/,"*:where($1)")]:t}}return n.palette.mode===e?t:{}}n.d(t,{A:()=>r})},83628:(e,t,n)=>{"use strict";n.d(t,{A:()=>a});var r=n(98587),o=n(58168);const i=["values","unit","step"],s=e=>{const t=Object.keys(e).map((t=>({key:t,val:e[t]})))||[];return t.sort(((e,t)=>e.val-t.val)),t.reduce(((e,t)=>(0,o.A)({},e,{[t.key]:t.val})),{})};function a(e){const{values:t={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:n="px",step:a=5}=e,l=(0,r.A)(e,i),c=s(t),u=Object.keys(c);function d(e){const r="number"===typeof t[e]?t[e]:e;return"@media (min-width:".concat(r).concat(n,")")}function h(e){const r="number"===typeof t[e]?t[e]:e;return"@media (max-width:".concat(r-a/100).concat(n,")")}function p(e,r){const o=u.indexOf(r);return"@media (min-width:".concat("number"===typeof t[e]?t[e]:e).concat(n,") and ")+"(max-width:".concat((-1!==o&&"number"===typeof t[u[o]]?t[u[o]]:r)-a/100).concat(n,")")}return(0,o.A)({keys:u,values:c,up:d,down:h,between:p,only:function(e){return u.indexOf(e)+1{"use strict";n.d(t,{A:()=>p});var r=n(58168),o=n(98587),i=n(66455),s=n(83628);const a={borderRadius:4};var l=n(47937);var c=n(70505),u=n(98076),d=n(30086);const h=["breakpoints","palette","spacing","shape"];const p=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{breakpoints:t={},palette:n={},spacing:p,shape:f={}}=e,m=(0,o.A)(e,h),g=(0,s.A)(t),v=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:8;if(e.mui)return e;const t=(0,l.LX)({spacing:e}),n=function(){for(var e=arguments.length,n=new Array(e),r=0;r{const n=t(e);return"number"===typeof n?"".concat(n,"px"):n})).join(" ")};return n.mui=!0,n}(p);let y=(0,i.A)({breakpoints:g,direction:"ltr",components:{},palette:(0,r.A)({mode:"light"},n),spacing:v,shape:(0,r.A)({},a,f)},m);y.applyStyles=d.A;for(var b=arguments.length,w=new Array(b>1?b-1:0),_=1;_(0,i.A)(e,t)),y),y.unstable_sxConfig=(0,r.A)({},u.A,null==m?void 0:m.unstable_sxConfig),y.unstable_sx=function(e){return(0,c.A)({sx:e,theme:this})},y}},49904:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,private_createBreakpoints:()=>o.A,unstable_applyStyles:()=>i.A});var r=n(12860),o=n(83628),i=n(30086)},46206:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(66455);const o=function(e,t){return t?(0,r.A)(e,t,{clone:!1}):e}},47937:(e,t,n)=>{"use strict";n.d(t,{LX:()=>f,MA:()=>p,_W:()=>m,Lc:()=>y,Ms:()=>b});var r=n(28286),o=n(12703),i=n(46206);const s={m:"margin",p:"padding"},a={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},l={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},c=function(e){const t={};return n=>(void 0===t[n]&&(t[n]=e(n)),t[n])}((e=>{if(e.length>2){if(!l[e])return[e];e=l[e]}const[t,n]=e.split(""),r=s[t],o=a[n]||"";return Array.isArray(o)?o.map((e=>r+e)):[r+o]})),u=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],d=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"],h=[...u,...d];function p(e,t,n,r){var i;const s=null!=(i=(0,o.Yn)(e,t,!1))?i:n;return"number"===typeof s?e=>"string"===typeof e?e:s*e:Array.isArray(s)?e=>"string"===typeof e?e:s[e]:"function"===typeof s?s:()=>{}}function f(e){return p(e,"spacing",8)}function m(e,t){if("string"===typeof t||null==t)return t;const n=e(Math.abs(t));return t>=0?n:"number"===typeof n?-n:"-".concat(n)}function g(e,t,n,o){if(-1===t.indexOf(n))return null;const i=function(e,t){return n=>e.reduce(((e,r)=>(e[r]=m(t,n),e)),{})}(c(n),o),s=e[n];return(0,r.NI)(e,s,i)}function v(e,t){const n=f(e.theme);return Object.keys(e).map((r=>g(e,t,r,n))).reduce(i.A,{})}function y(e){return v(e,u)}function b(e){return v(e,d)}function w(e){return v(e,h)}y.propTypes={},y.filterProps=u,b.propTypes={},b.filterProps=d,w.propTypes={},w.filterProps=h},12703:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>a,BO:()=>s,Yn:()=>i});var r=n(43081),o=n(28286);function i(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(!t||"string"!==typeof t)return null;if(e&&e.vars&&n){const n="vars.".concat(t).split(".").reduce(((e,t)=>e&&e[t]?e[t]:null),e);if(null!=n)return n}return t.split(".").reduce(((e,t)=>e&&null!=e[t]?e[t]:null),e)}function s(e,t,n){let r,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:n;return r="function"===typeof e?e(n):Array.isArray(e)?e[n]||o:i(e,n)||o,t&&(r=t(r,o,e)),r}const a=function(e){const{prop:t,cssProperty:n=e.prop,themeKey:a,transform:l}=e,c=e=>{if(null==e[t])return null;const c=e[t],u=i(e.theme,a)||{};return(0,o.NI)(e,c,(e=>{let o=s(u,l,e);return e===o&&"string"===typeof e&&(o=s(u,l,"".concat(t).concat("default"===e?"":(0,r.A)(e)),e)),!1===n?o:{[n]:o}}))};return c.propTypes={},c.filterProps=[t],c}},98076:(e,t,n)=>{"use strict";n.d(t,{A:()=>I});var r=n(47937),o=n(12703),i=n(46206);const s=function(){for(var e=arguments.length,t=new Array(e),n=0;n(t.filterProps.forEach((n=>{e[n]=t})),e)),{}),o=e=>Object.keys(e).reduce(((t,n)=>r[n]?(0,i.A)(t,r[n](e)):t),{});return o.propTypes={},o.filterProps=t.reduce(((e,t)=>e.concat(t.filterProps)),[]),o};var a=n(28286);function l(e){return"number"!==typeof e?e:"".concat(e,"px solid")}function c(e,t){return(0,o.Ay)({prop:e,themeKey:"borders",transform:t})}const u=c("border",l),d=c("borderTop",l),h=c("borderRight",l),p=c("borderBottom",l),f=c("borderLeft",l),m=c("borderColor"),g=c("borderTopColor"),v=c("borderRightColor"),y=c("borderBottomColor"),b=c("borderLeftColor"),w=c("outline",l),_=c("outlineColor"),x=e=>{if(void 0!==e.borderRadius&&null!==e.borderRadius){const t=(0,r.MA)(e.theme,"shape.borderRadius",4,"borderRadius"),n=e=>({borderRadius:(0,r._W)(t,e)});return(0,a.NI)(e,e.borderRadius,n)}return null};x.propTypes={},x.filterProps=["borderRadius"];s(u,d,h,p,f,m,g,v,y,b,x,w,_);const S=e=>{if(void 0!==e.gap&&null!==e.gap){const t=(0,r.MA)(e.theme,"spacing",8,"gap"),n=e=>({gap:(0,r._W)(t,e)});return(0,a.NI)(e,e.gap,n)}return null};S.propTypes={},S.filterProps=["gap"];const A=e=>{if(void 0!==e.columnGap&&null!==e.columnGap){const t=(0,r.MA)(e.theme,"spacing",8,"columnGap"),n=e=>({columnGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.columnGap,n)}return null};A.propTypes={},A.filterProps=["columnGap"];const C=e=>{if(void 0!==e.rowGap&&null!==e.rowGap){const t=(0,r.MA)(e.theme,"spacing",8,"rowGap"),n=e=>({rowGap:(0,r._W)(t,e)});return(0,a.NI)(e,e.rowGap,n)}return null};C.propTypes={},C.filterProps=["rowGap"];s(S,A,C,(0,o.Ay)({prop:"gridColumn"}),(0,o.Ay)({prop:"gridRow"}),(0,o.Ay)({prop:"gridAutoFlow"}),(0,o.Ay)({prop:"gridAutoColumns"}),(0,o.Ay)({prop:"gridAutoRows"}),(0,o.Ay)({prop:"gridTemplateColumns"}),(0,o.Ay)({prop:"gridTemplateRows"}),(0,o.Ay)({prop:"gridTemplateAreas"}),(0,o.Ay)({prop:"gridArea"}));function k(e,t){return"grey"===t?t:e}s((0,o.Ay)({prop:"color",themeKey:"palette",transform:k}),(0,o.Ay)({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:k}),(0,o.Ay)({prop:"backgroundColor",themeKey:"palette",transform:k}));function E(e){return e<=1&&0!==e?"".concat(100*e,"%"):e}const T=(0,o.Ay)({prop:"width",transform:E}),O=e=>{if(void 0!==e.maxWidth&&null!==e.maxWidth){const t=t=>{var n,r;const o=(null==(n=e.theme)||null==(n=n.breakpoints)||null==(n=n.values)?void 0:n[t])||a.zu[t];return o?"px"!==(null==(r=e.theme)||null==(r=r.breakpoints)?void 0:r.unit)?{maxWidth:"".concat(o).concat(e.theme.breakpoints.unit)}:{maxWidth:o}:{maxWidth:E(t)}};return(0,a.NI)(e,e.maxWidth,t)}return null};O.filterProps=["maxWidth"];const M=(0,o.Ay)({prop:"minWidth",transform:E}),P=(0,o.Ay)({prop:"height",transform:E}),R=(0,o.Ay)({prop:"maxHeight",transform:E}),N=(0,o.Ay)({prop:"minHeight",transform:E}),I=((0,o.Ay)({prop:"size",cssProperty:"width",transform:E}),(0,o.Ay)({prop:"size",cssProperty:"height",transform:E}),s(T,O,M,P,R,N,(0,o.Ay)({prop:"boxSizing"})),{border:{themeKey:"borders",transform:l},borderTop:{themeKey:"borders",transform:l},borderRight:{themeKey:"borders",transform:l},borderBottom:{themeKey:"borders",transform:l},borderLeft:{themeKey:"borders",transform:l},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:l},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:x},color:{themeKey:"palette",transform:k},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:k},backgroundColor:{themeKey:"palette",transform:k},p:{style:r.Ms},pt:{style:r.Ms},pr:{style:r.Ms},pb:{style:r.Ms},pl:{style:r.Ms},px:{style:r.Ms},py:{style:r.Ms},padding:{style:r.Ms},paddingTop:{style:r.Ms},paddingRight:{style:r.Ms},paddingBottom:{style:r.Ms},paddingLeft:{style:r.Ms},paddingX:{style:r.Ms},paddingY:{style:r.Ms},paddingInline:{style:r.Ms},paddingInlineStart:{style:r.Ms},paddingInlineEnd:{style:r.Ms},paddingBlock:{style:r.Ms},paddingBlockStart:{style:r.Ms},paddingBlockEnd:{style:r.Ms},m:{style:r.Lc},mt:{style:r.Lc},mr:{style:r.Lc},mb:{style:r.Lc},ml:{style:r.Lc},mx:{style:r.Lc},my:{style:r.Lc},margin:{style:r.Lc},marginTop:{style:r.Lc},marginRight:{style:r.Lc},marginBottom:{style:r.Lc},marginLeft:{style:r.Lc},marginX:{style:r.Lc},marginY:{style:r.Lc},marginInline:{style:r.Lc},marginInlineStart:{style:r.Lc},marginInlineEnd:{style:r.Lc},marginBlock:{style:r.Lc},marginBlockStart:{style:r.Lc},marginBlockEnd:{style:r.Lc},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:S},rowGap:{style:C},columnGap:{style:A},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:E},maxWidth:{style:O},minWidth:{transform:E},height:{transform:E},maxHeight:{transform:E},minHeight:{transform:E},boxSizing:{},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}})},80237:(e,t,n)=>{"use strict";n.d(t,{A:()=>c});var r=n(58168),o=n(98587),i=n(66455),s=n(98076);const a=["sx"],l=e=>{var t,n;const r={systemProps:{},otherProps:{}},o=null!=(t=null==e||null==(n=e.theme)?void 0:n.unstable_sxConfig)?t:s.A;return Object.keys(e).forEach((t=>{o[t]?r.systemProps[t]=e[t]:r.otherProps[t]=e[t]})),r};function c(e){const{sx:t}=e,n=(0,o.A)(e,a),{systemProps:s,otherProps:c}=l(n);let u;return u=Array.isArray(t)?[s,...t]:"function"===typeof t?function(){const e=t(...arguments);return(0,i.Q)(e)?(0,r.A)({},s,e):s}:(0,r.A)({},s,t),(0,r.A)({},c,{sx:u})}},28807:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,extendSxProp:()=>o.A,unstable_createStyleFunctionSx:()=>r.k,unstable_defaultSxConfig:()=>i.A});var r=n(70505),o=n(80237),i=n(98076)},70505:(e,t,n)=>{"use strict";n.d(t,{A:()=>u,k:()=>l});var r=n(43081),o=n(46206),i=n(12703),s=n(28286),a=n(98076);function l(){function e(e,t,n,o){const a={[e]:t,theme:n},l=o[e];if(!l)return{[e]:t};const{cssProperty:c=e,themeKey:u,transform:d,style:h}=l;if(null==t)return null;if("typography"===u&&"inherit"===t)return{[e]:t};const p=(0,i.Yn)(n,u)||{};if(h)return h(a);return(0,s.NI)(a,t,(t=>{let n=(0,i.BO)(p,d,t);return t===n&&"string"===typeof t&&(n=(0,i.BO)(p,d,"".concat(e).concat("default"===t?"":(0,r.A)(t)),t)),!1===c?n:{[c]:n}}))}return function t(n){var r;const{sx:i,theme:l={}}=n||{};if(!i)return null;const c=null!=(r=l.unstable_sxConfig)?r:a.A;function u(n){let r=n;if("function"===typeof n)r=n(l);else if("object"!==typeof n)return n;if(!r)return null;const i=(0,s.EU)(l.breakpoints),a=Object.keys(i);let u=i;return Object.keys(r).forEach((n=>{const i=(a=r[n],d=l,"function"===typeof a?a(d):a);var a,d;if(null!==i&&void 0!==i)if("object"===typeof i)if(c[n])u=(0,o.A)(u,e(n,i,l,c));else{const e=(0,s.NI)({theme:l},i,(e=>({[n]:e})));!function(){for(var e=arguments.length,t=new Array(e),n=0;ne.concat(Object.keys(t))),[]),o=new Set(r);return t.every((e=>o.size===Object.keys(e).length))}(e,i)?u=(0,o.A)(u,e):u[n]=t({sx:i,theme:l})}else u=(0,o.A)(u,e(n,i,l,c))})),(0,s.vf)(a,u)}return Array.isArray(i)?i.map(u):u(i)}}const c=l();c.filterProps=["sx"];const u=c},85341:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var r=n(12860),o=n(9950),i=n(22899);const s=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=o.useContext(i.T);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n},a=(0,r.A)();const l=function(){return s(arguments.length>0&&void 0!==arguments[0]?arguments[0]:a)}},22880:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(57661);var o=n(85341);function i(e){let{props:t,name:n,defaultTheme:i,themeId:s}=e,a=(0,o.A)(i);s&&(a=a[s]||a);const l=function(e){const{theme:t,name:n,props:o}=e;return t&&t.components&&t.components[n]&&t.components[n].defaultProps?(0,r.A)(t.components[n].defaultProps,o):o}({theme:a,name:n,props:t});return l}},25329:(e,t,n)=>{"use strict";t.A=void 0;var r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var r={__proto__:null},o=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var a=o?Object.getOwnPropertyDescriptor(e,s):null;a&&(a.get||a.set)?Object.defineProperty(r,s,a):r[s]=e[s]}return r.default=e,n&&n.set(e,r),r}(n(9950)),o=n(86897);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}t.A=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;const t=r.useContext(o.ThemeContext);return t&&(n=t,0!==Object.keys(n).length)?t:e;var n}},41681:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});const r=e=>e,o=(()=>{let e=r;return{configure(t){e=t},generate:t=>e(t),reset(){e=r}}})()},43081:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(63999);function o(e){if("string"!==typeof e)throw new Error((0,r.A)(7));return e.charAt(0).toUpperCase()+e.slice(1)}},77719:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(43081)},68935:(e,t,n)=>{"use strict";n.d(t,{A:()=>r});const r=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Number.MIN_SAFE_INTEGER,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.MAX_SAFE_INTEGER;return Math.max(t,Math.min(e,n))}},5268:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(68935)},74061:(e,t,n)=>{"use strict";function r(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;const r={};return Object.keys(e).forEach((o=>{r[o]=e[o].reduce(((e,r)=>{if(r){const o=t(r);""!==o&&e.push(o),n&&n[r]&&e.push(n[r])}return e}),[]).join(" ")})),r}n.d(t,{A:()=>r})},97603:(e,t,n)=>{"use strict";function r(){for(var e=arguments.length,t=new Array(e),n=0;nnull==t?e:function(){for(var n=arguments.length,r=new Array(n),o=0;o{}))}n.d(t,{A:()=>r})},62243:(e,t,n)=>{"use strict";function r(e){let t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:166;function r(){for(var r=arguments.length,o=new Array(r),i=0;i{e.apply(this,o)}),n)}return r.clear=()=>{clearTimeout(t)},r}n.d(t,{A:()=>r})},66455:(e,t,n)=>{"use strict";n.d(t,{A:()=>s,Q:()=>o});var r=n(58168);function o(e){if("object"!==typeof e||null===e)return!1;const t=Object.getPrototypeOf(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function i(e){if(!o(e))return e;const t={};return Object.keys(e).forEach((n=>{t[n]=i(e[n])})),t}function s(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{clone:!0};const a=n.clone?(0,r.A)({},e):e;return o(e)&&o(t)&&Object.keys(t).forEach((r=>{"__proto__"!==r&&(o(t[r])&&r in e&&o(e[r])?a[r]=s(e[r],t[r],n):n.clone?a[r]=o(t[r])?i(t[r]):t[r]:a[r]=t[r])})),a}},89717:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A,isPlainObject:()=>r.Q});var r=n(66455)},63999:(e,t,n)=>{"use strict";function r(e){let t="https://mui.com/production-error/?code="+e;for(let n=1;nr})},99606:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>r.A});var r=n(63999)},68483:(e,t,n)=>{"use strict";n.d(t,{Ay:()=>i,li:()=>o});var r=n(41681);const o={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function i(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const i=o[t];return i?"".concat(n,"-").concat(i):"".concat(r.A.generate(e),"-").concat(t)}},80863:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(68483);function o(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Mui";const o={};return t.forEach((t=>{o[t]=(0,r.Ay)(e,t,n)})),o}},55645:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>l,getFunctionName:()=>i});var r=n(26429);const o=/^\s*function(?:\s|\s*\/\*.*\*\/\s*)+([^(\s/]*)\s*/;function i(e){const t="".concat(e).match(o);return t&&t[1]||""}function s(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return e.displayName||e.name||i(e)||t}function a(e,t,n){const r=s(t);return e.displayName||(""!==r?"".concat(n,"(").concat(r,")"):n)}function l(e){if(null!=e){if("string"===typeof e)return e;if("function"===typeof e)return s(e,"Component");if("object"===typeof e)switch(e.$$typeof){case r.ForwardRef:return a(e,e.render,"ForwardRef");case r.Memo:return a(e,e.type,"memo");default:return}}}},3511:(e,t,n)=>{"use strict";function r(e){return e&&e.ownerDocument||document}n.d(t,{A:()=>r})},98727:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(3511);function o(e){return(0,r.A)(e).defaultView||window}},57661:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(58168);function o(e,t){const n=(0,r.A)({},t);return Object.keys(e).forEach((i=>{if(i.toString().match(/^(components|slots)$/))n[i]=(0,r.A)({},e[i],n[i]);else if(i.toString().match(/^(componentsProps|slotProps)$/)){const s=e[i]||{},a=t[i];n[i]={},a&&Object.keys(a)?s&&Object.keys(s)?(n[i]=(0,r.A)({},a),Object.keys(s).forEach((e=>{n[i][e]=o(s[e],a[e])}))):n[i]=a:n[i]=s}else void 0===n[i]&&(n[i]=e[i])})),n}},25679:(e,t,n)=>{"use strict";function r(e,t){"function"===typeof e?e(t):e&&(e.current=t)}n.d(t,{A:()=>r})},9543:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);function o(e){let{controlled:t,default:n,name:o,state:i="value"}=e;const{current:s}=r.useRef(void 0!==t),[a,l]=r.useState(n);return[s?t:a,r.useCallback((e=>{s||l(e)}),[])]}},14131:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(9950);const o="undefined"!==typeof window?r.useLayoutEffect:r.useEffect},62877:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950),o=n(14131);const i=function(e){const t=r.useRef(e);return(0,o.A)((()=>{t.current=e})),r.useRef((function(){return(0,t.current)(...arguments)})).current}},44093:(e,t,n)=>{"use strict";n.d(t,{A:()=>i});var r=n(9950),o=n(25679);function i(){for(var e=arguments.length,t=new Array(e),n=0;nt.every((e=>null==e))?null:e=>{t.forEach((t=>{(0,o.A)(t,e)}))}),t)}},28767:(e,t,n)=>{"use strict";var r;n.d(t,{A:()=>a});var o=n(9950);let i=0;const s=(r||(r=n.t(o,2)))["useId".toString()];function a(e){if(void 0!==s){const t=s();return null!=e?e:t}return function(e){const[t,n]=o.useState(e),r=e||t;return o.useEffect((()=>{null==t&&(i+=1,n("mui-".concat(i)))}),[t]),r}(e)}},63755:(e,t,n)=>{"use strict";n.d(t,{A:()=>p});var r=n(9950),o=n(74522);let i=!0,s=!1;const a=new o.E,l={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function c(e){e.metaKey||e.altKey||e.ctrlKey||(i=!0)}function u(){i=!1}function d(){"hidden"===this.visibilityState&&s&&(i=!0)}function h(e){const{target:t}=e;try{return t.matches(":focus-visible")}catch(n){}return i||function(e){const{type:t,tagName:n}=e;return!("INPUT"!==n||!l[t]||e.readOnly)||"TEXTAREA"===n&&!e.readOnly||!!e.isContentEditable}(t)}function p(){const e=r.useCallback((e=>{var t;null!=e&&((t=e.ownerDocument).addEventListener("keydown",c,!0),t.addEventListener("mousedown",u,!0),t.addEventListener("pointerdown",u,!0),t.addEventListener("touchstart",u,!0),t.addEventListener("visibilitychange",d,!0))}),[]),t=r.useRef(!1);return{isFocusVisibleRef:t,onFocus:function(e){return!!h(e)&&(t.current=!0,!0)},onBlur:function(){return!!t.current&&(s=!0,a.start(100,(()=>{s=!1})),t.current=!1,!0)},ref:e}}},74522:(e,t,n)=>{"use strict";n.d(t,{E:()=>s,A:()=>a});var r=n(9950);const o={};const i=[];class s{constructor(){this.currentId=null,this.clear=()=>{null!==this.currentId&&(clearTimeout(this.currentId),this.currentId=null)},this.disposeEffect=()=>this.clear}static create(){return new s}start(e,t){this.clear(),this.currentId=setTimeout((()=>{this.currentId=null,t()}),e)}}function a(){const e=function(e,t){const n=r.useRef(o);return n.current===o&&(n.current=e(t)),n}(s.create).current;var t;return t=e.disposeEffect,r.useEffect(t,i),e}},68012:(e,t,n)=>{"use strict";n.d(t,{vr:()=>b,bR:()=>o,M_:()=>v,fH:()=>f,p6:()=>m});class r{constructor(e){this.matrix=e}mmul(e){return this.matrix=this.matrix.map(((t,n)=>e.asArray()[0].map(((r,o)=>t.reduce(((t,r,i)=>t+this.matrix[n][i]*e.asArray()[i][o]),0))))),this}asArray(){return this.matrix}get(e,t){return this.asArray()[e][t]}static multiply(){let e=arguments.length<=0?void 0:arguments[0];for(let t=1;t0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;this.x=e,this.y=t}translate(e,t){this.x+=e,this.y+=t}clone(){return new o(this.x,this.y)}toSVG(){return this.x+" "+this.y}asMatrix(){return new r([[this.x],[this.y],[1]])}transform(e){let t=e.mmul(this.asMatrix());this.x=t.get(0,0),this.y=t.get(1,0)}static middlePoint(e,t){return new o((t.x+e.x)/2,(t.y+e.y)/2)}}var i,s=n(26380),a=n.n(s),l=n(55876),c=n.n(l),u=n(79113),d=n.n(u);!function(e){e.TOP_LEFT="TL",e.TOP_RIGHT="TR",e.BOTTOM_RIGHT="BR",e.BOTTOM_LEFT="BL"}(i||(i={}));const h=(e,t,n,r)=>({[i.TOP_LEFT]:new o(e,t),[i.TOP_RIGHT]:new o(e+n,t),[i.BOTTOM_RIGHT]:new o(e+n,t+r),[i.BOTTOM_LEFT]:new o(e,t+r)}),p=()=>({[i.TOP_LEFT]:new o,[i.TOP_RIGHT]:new o,[i.BOTTOM_RIGHT]:new o,[i.BOTTOM_LEFT]:new o}),f=e=>{if(0===e.length)return p();let t=e[0].x,n=e[0].x,r=e[0].y,s=e[0].y;for(let o=1;on&&(n=e[o].x),e[o].ys&&(s=e[o].y);return{[i.TOP_LEFT]:new o(t,r),[i.TOP_RIGHT]:new o(n,r),[i.BOTTOM_RIGHT]:new o(n,s),[i.BOTTOM_LEFT]:new o(t,s)}},m=e=>f(d()(e,(e=>e.getPoints())));class g{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.points=e}serialize(){return c()(this.points,(e=>[e.x,e.y]))}deserialize(e){this.points=c()(e,(e=>new o(e[0],e[1])))}scale(e,t,n){let o=r.createScaleMatrix(e,t,n);a()(this.points,(e=>{e.transform(o)}))}transform(e){a()(this.points,(t=>{t.transform(e)}))}setPoints(e){this.points=e}getPoints(){return this.points}rotate(e){this.transform(r.createRotateMatrix(e/(180/Math.PI),this.getOrigin()))}translate(e,t){a()(this.points,(n=>{n.translate(e,t)}))}doClone(e){this.points=c()(e.points,(e=>e.clone()))}clone(){let e=Object.create(this);return e.doClone(this),e}getOrigin(){if(0===this.points.length)return null;let e=f(this.points);return o.middlePoint(e[i.TOP_LEFT],e[i.BOTTOM_RIGHT])}getBoundingBox(){return f(this.points)}}class v extends g{static fromPositionAndSize(e,t,n,r){return new v(h(e,t,n,r))}static fromPointAndSize(e,t,n){return new v(h(e.x,e.y,t,n))}constructor(e){e||(e=p()),super([e[i.TOP_LEFT],e[i.TOP_RIGHT],e[i.BOTTOM_RIGHT],e[i.BOTTOM_LEFT]])}updateDimensions(e,t,n,r){const o=h(e,t,n,r);this.setPoints([o[i.TOP_LEFT],o[i.TOP_RIGHT],o[i.BOTTOM_RIGHT],o[i.BOTTOM_LEFT]])}setPoints(e){if(4!==e.length)throw"Rectangles must always have 4 points";super.setPoints(e)}containsPoint(e){const t=this.getTopLeft(),n=this.getBottomRight();return e.x>=t.x&&e.x<=n.x&&e.y>=t.y&&e.y<=n.y}getWidth(){return Math.sqrt(Math.pow(this.getTopLeft().x-this.getTopRight().x,2)+Math.pow(this.getTopLeft().y-this.getTopRight().y,2))}getHeight(){return Math.sqrt(Math.pow(this.getBottomLeft().x-this.getTopLeft().x,2)+Math.pow(this.getBottomLeft().y-this.getTopLeft().y,2))}getTopMiddle(){return o.middlePoint(this.getTopLeft(),this.getTopRight())}getBottomMiddle(){return o.middlePoint(this.getBottomLeft(),this.getBottomRight())}getLeftMiddle(){return o.middlePoint(this.getBottomLeft(),this.getTopLeft())}getRightMiddle(){return o.middlePoint(this.getBottomRight(),this.getTopRight())}getTopLeft(){return this.points[0]}getTopRight(){return this.points[1]}getBottomRight(){return this.points[2]}getBottomLeft(){return this.points[3]}}var y;!function(e){e[e.SOURCE=0]="SOURCE",e[e.SOURCE_CONTROL=1]="SOURCE_CONTROL",e[e.TARGET_CONTROL=2]="TARGET_CONTROL",e[e.TARGET=3]="TARGET"}(y||(y={}));class b extends g{constructor(){super([new o(0,0),new o(0,0),new o(0,0),new o(0,0)])}getSVGCurve(){return"M".concat(this.getSource().toSVG()," C").concat(this.getSourceControl().toSVG(),", ").concat(this.getTargetControl().toSVG(),", ").concat(this.getTarget().toSVG())}setPoints(e){if(4!==e.length)throw new Error("BezierCurve must have extactly 4 points");super.setPoints(e)}getSource(){return this.points[y.SOURCE]}getSourceControl(){return this.points[y.SOURCE_CONTROL]}getTargetControl(){return this.points[y.TARGET_CONTROL]}getTarget(){return this.points[y.TARGET]}setSource(e){this.points[y.SOURCE]=e}setSourceControl(e){this.points[y.SOURCE_CONTROL]=e}setTargetControl(e){this.points[y.TARGET_CONTROL]=e}setTarget(e){this.points[y.TARGET]=e}}},61619:(e,t,n)=>{"use strict";n.d(t,{H9:()=>pe,U6:()=>F,IT:()=>B,rc:()=>h,tk:()=>U,Cs:()=>z,$0:()=>T,Qe:()=>D,Nw:()=>ee,CU:()=>me,rY:()=>c,NZ:()=>u,Zr:()=>ie,hG:()=>ye,Bf:()=>ce,CG:()=>ve,fc:()=>le,Uw:()=>he,Z0:()=>i,c7:()=>b});var r=n(95491),o=n.n(r);class i{static UID(){return i.TESTING?(i.TESTING_UID++,"".concat(i.TESTING_UID)):"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}static closest(e,t){return Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;do{if(Element.prototype.matches.call(t,e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),e.closest(t)}}i.TESTING=!1,i.TESTING_UID=0;class s{constructor(){this.listeners={}}fireEventInternal(e,t,n){this.iterateListeners((r=>{if(!e&&!n.firing)return!1;r[t]&&r[t](n)}))}fireEvent(e,t){e=Object.assign({firing:!0,stopPropagation:()=>{e.firing=!1}},e),this.fireEventInternal(!0,"eventWillFire",Object.assign(Object.assign({},e),{function:t})),this.fireEventInternal(!1,t,e),this.fireEventInternal(!0,"eventDidFire",Object.assign(Object.assign({},e),{function:t}))}iterateListeners(e){for(let t in this.listeners){if(!1===e(this.listeners[t]))return}}getListenerHandle(e){for(let t in this.listeners)if(this.listeners[t]===e)return{id:t,listener:e,deregister:()=>{delete this.listeners[t]}}}registerListener(e){const t=i.UID();return this.listeners[t]=e,{id:t,listener:e,deregister:()=>{delete this.listeners[t]}}}deregisterListener(e){if("object"===typeof e)return e.deregister(),!0;const t=this.getListenerHandle(e);return!!t&&(t.deregister(),!0)}}var a=n(83134),l=n.n(a);class c extends s{constructor(){super(),this.factories={}}getFactories(){return l()(this.factories)}clearFactories(){for(let e in this.factories)this.deregisterFactory(e)}getFactory(e){if(!this.factories[e])throw new Error("Cannot find factory with type [".concat(e,"]"));return this.factories[e]}registerFactory(e){e.setFactoryBank(this),this.factories[e.getType()]=e,this.fireEvent({factory:e},"factoryAdded")}deregisterFactory(e){const t=this.factories[e];t.setFactoryBank(null),delete this.factories[e],this.fireEvent({factory:t},"factoryRemoved")}}var u,d=n(68012);!function(e){e.MOUSE_DOWN="mouse-down",e.MOUSE_UP="mouse-up",e.MOUSE_MOVE="mouse-move",e.MOUSE_WHEEL="mouse-wheel",e.KEY_DOWN="key-down",e.KEY_UP="key-up",e.TOUCH_START="touch-start",e.TOUCH_END="touch-end",e.TOUCH_MOVE="touch-move"}(u||(u={}));class h{constructor(e){this.options=e,this.id=i.UID()}setEngine(e){this.engine=e}}var p=n(13386),f=n.n(p),m=n(65724),g=n.n(m);class v{constructor(e){this.actions={},this.engine=e,this.keys={}}getKeys(){return g()(this.keys)}registerAction(e){return e.setEngine(this.engine),this.actions[e.id]=e,()=>{this.deregisterAction(e)}}deregisterAction(e){e.setEngine(null),delete this.actions[e.id]}getActionsForType(e){return f()(this.actions,(t=>t.options.type===e))}getModelForEvent(e){return e.model?e.model:this.engine.getMouseElement(e.event)}getActionsForEvent(e){const{event:t}=e;return"mousedown"===t.type?this.getActionsForType(u.MOUSE_DOWN):"mouseup"===t.type?this.getActionsForType(u.MOUSE_UP):"keydown"===t.type?(this.keys[t.key.toLowerCase()]=!0,this.getActionsForType(u.KEY_DOWN)):"keyup"===t.type?(delete this.keys[t.key.toLowerCase()],this.getActionsForType(u.KEY_UP)):"mousemove"===t.type?this.getActionsForType(u.MOUSE_MOVE):"wheel"===t.type?this.getActionsForType(u.MOUSE_WHEEL):"touchstart"===t.type?this.getActionsForType(u.TOUCH_START):"touchend"===t.type?this.getActionsForType(u.TOUCH_END):"touchmove"===t.type?this.getActionsForType(u.TOUCH_MOVE):[]}fireAction(e){const t=this.getActionsForEvent(e);for(let n of t)n.options.fire(e)}}class y extends h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({type:u.MOUSE_WHEEL,fire:t=>{const{event:n}=t;for(let e of this.engine.getModel().getLayers())e.allowRepaint(!1);const r=this.engine.getModel();if(n.stopPropagation(),n.ctrlKey){const t=this.engine.getModel().getZoomLevel()/100;let o=e.inverseZoom?n.deltaY:-n.deltaY;o/=3,r.getZoomLevel()+o>10&&r.setZoomLevel(r.getZoomLevel()+o);const i=r.getZoomLevel()/100,s=n.currentTarget.getBoundingClientRect(),a=s.width,l=s.height,c=a*i-a*t,u=l*i-l*t,d=n.clientX-s.left,h=n.clientY-s.top,p=(d-r.getOffsetX())/t/a,f=(h-r.getOffsetY())/t/l;r.setOffset(r.getOffsetX()-c*p,r.getOffsetY()-u*f)}else{let t=e.inverseZoom?-n.deltaY:n.deltaY,o=e.inverseZoom?-n.deltaX:n.deltaX;r.setOffset(r.getOffsetX()-o,r.getOffsetY()-t)}this.engine.repaintCanvas();for(let e of this.engine.getModel().getLayers())e.allowRepaint(!0)}})}}class b extends h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({type:u.MOUSE_WHEEL,fire:t=>{const{event:n}=t;for(let e of this.engine.getModel().getLayers())e.allowRepaint(!1);const r=this.engine.getModel();n.stopPropagation();const o=this.engine.getModel().getZoomLevel()/100;let i=e.inverseZoom?-n.deltaY:n.deltaY;n.ctrlKey&&i%1!==0?i/=3:i/=60,r.getZoomLevel()+i>10&&r.setZoomLevel(r.getZoomLevel()+i);const s=r.getZoomLevel()/100,a=n.currentTarget.getBoundingClientRect(),l=a.width,c=a.height,u=l*s-l*o,d=c*s-c*o,h=n.clientX-a.left,p=n.clientY-a.top,f=(h-r.getOffsetX())/o/l,m=(p-r.getOffsetY())/o/c;r.setOffset(r.getOffsetX()-u*f,r.getOffsetY()-d*m),this.engine.repaintCanvas();for(let e of this.engine.getModel().getLayers())e.allowRepaint(!0)}})}}var w=n(26380),_=n.n(w),x=n(59418),S=n.n(x);class A extends h{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=e.keyCodes||[46,8],n=Object.assign({ctrlKey:!1,shiftKey:!1,altKey:!1,metaKey:!1},e.modifiers);super({type:u.KEY_DOWN,fire:e=>{const{keyCode:r,ctrlKey:o,shiftKey:i,altKey:s,metaKey:a}=e.event;-1!==t.indexOf(r)&&S()({ctrlKey:o,shiftKey:i,altKey:s,metaKey:a},n)&&(_()(this.engine.getModel().getSelectedEntities(),(e=>{e.isLocked()||e.remove()})),this.engine.repaintCanvas())}})}}var C=n(47988),k=n.n(C);class E extends s{constructor(e){super(),this.engine=e,this.stateStack=[]}getCurrentState(){return this.currentState}pushState(e){this.stateStack.push(e),this.setState(e)}popState(){this.stateStack.pop(),this.setState(k()(this.stateStack))}setState(e){e.setEngine(this.engine),this.currentState&&this.currentState.deactivated(e);const t=this.currentState;this.currentState=e,this.currentState&&(this.currentState.activated(t),this.fireEvent({newState:e},"stateChanged"))}}class T extends s{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(),this.model=null,this.eventBus=new v(this),this.stateMachine=new E(this),this.layerFactories=new c,this.registerFactoryBank(this.layerFactories),this.options=Object.assign({registerDefaultDeleteItemsAction:!0,registerDefaultZoomCanvasAction:!0,repaintDebounceMs:0},e),!0===this.options.registerDefaultZoomCanvasAction?this.eventBus.registerAction(new b):!0===this.options.registerDefaultPanAndZoomCanvasAction&&this.eventBus.registerAction(new y),!0===this.options.registerDefaultDeleteItemsAction&&this.eventBus.registerAction(new A)}getStateMachine(){return this.stateMachine}getRelativeMousePoint(e){const t=this.getRelativePoint(e.clientX,e.clientY);return new d.bR((t.x-this.model.getOffsetX())/(this.model.getZoomLevel()/100),(t.y-this.model.getOffsetY())/(this.model.getZoomLevel()/100))}getRelativePoint(e,t){const n=this.canvas.getBoundingClientRect();return new d.bR(e-n.left,t-n.top)}registerFactoryBank(e){e.registerListener({factoryAdded:e=>{e.factory.setDiagramEngine(this)},factoryRemoved:e=>{e.factory.setDiagramEngine(null)}})}getActionEventBus(){return this.eventBus}getLayerFactories(){return this.layerFactories}getFactoryForLayer(e){return"string"===typeof e?this.layerFactories.getFactory(e):this.layerFactories.getFactory(e.getType())}setModel(e){this.model=e,this.canvas&&requestAnimationFrame((()=>{this.repaintCanvas()}))}getModel(){return this.model}repaintCanvas(e){const{repaintDebounceMs:t}=this.options,n=()=>{this.iterateListeners((e=>{e.repaintCanvas&&e.repaintCanvas()}))};let r=n;if(t>0&&(r=o()(n,t)),e)return new Promise((e=>{const t=this.registerListener({rendered:()=>{e(),t.deregister()}});r()}));r()}setCanvas(e){this.canvas!==e&&(this.canvas=e,e&&this.fireEvent({},"canvasReady"))}getCanvas(){return this.canvas}getMouseElement(e){return null}zoomToFit(){const e=this.canvas.clientWidth/this.canvas.scrollWidth,t=this.canvas.clientHeight/this.canvas.scrollHeight,n=e0&&void 0!==arguments[0]?arguments[0]:{};super(),this.options=Object.assign({id:i.UID()},e)}getOptions(){return this.options}getID(){return this.options.id}doClone(){}clone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(e[this.options.id])return e[this.options.id];let t=I()(this);return t.options=Object.assign(Object.assign({},this.options),{id:i.UID()}),t.clearListeners(),e[this.options.id]=t,this.doClone(e,t),t}clearListeners(){this.listeners={}}deserialize(e){this.options.id=e.data.id,this.options.locked=e.data.locked}serialize(){return{id:this.options.id,locked:this.options.locked}}fireEvent(e,t){super.fireEvent(Object.assign({entity:this},e),t)}isLocked(){return this.options.locked}setLocked(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.locked=e,this.fireEvent({locked:e},"lockChanged")}}class D extends L{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign({zoom:100,gridSize:0,offsetX:0,offsetY:0},e)),this.layers=[]}getSelectionEntities(){return M()(this.layers,(e=>e.getSelectionEntities()))}getSelectedEntities(){return f()(this.getSelectionEntities(),(e=>e.isSelected()))}clearSelection(){_()(this.getSelectedEntities(),(e=>{e.setSelected(!1)}))}getModels(){return M()(this.layers,(e=>l()(e.getModels())))}addLayer(e){e.setParent(this),e.registerListener({entityRemoved:e=>{}}),this.layers.push(e)}removeLayer(e){const t=this.layers.indexOf(e);return-1!==t&&(this.layers.splice(t,1),!0)}getLayers(){return this.layers}setGridSize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;this.options.gridSize=e,this.fireEvent({size:e},"gridUpdated")}getGridPosition(e){return 0===this.options.gridSize?e:this.options.gridSize*Math.floor((e+this.options.gridSize/2)/this.options.gridSize)}deserializeModel(e,t){const n={},r={},o={},i={data:e,engine:t,registerModel:e=>{n[e.getID()]=e,o[e.getID()]&&o[e.getID()](e)},getModel:e=>n[e]?Promise.resolve(n[e]):(r[e]||(r[e]=new Promise((t=>{o[e]=t}))),r[e])};this.deserialize(i)}deserialize(e){super.deserialize(e),this.options.offsetX=e.data.offsetX,this.options.offsetY=e.data.offsetY,this.options.zoom=e.data.zoom,this.options.gridSize=e.data.gridSize,_()(e.data.layers,(t=>{const n=e.engine.getFactoryForLayer(t.type).generateModel({initialConfig:t});n.deserialize(Object.assign(Object.assign({},e),{data:t})),this.addLayer(n)}))}serialize(){return Object.assign(Object.assign({},super.serialize()),{offsetX:this.options.offsetX,offsetY:this.options.offsetY,zoom:this.options.zoom,gridSize:this.options.gridSize,layers:R()(this.layers,(e=>e.serialize()))})}setZoomLevel(e){this.options.zoom=e,this.fireEvent({zoom:e},"zoomUpdated")}setOffset(e,t){this.options.offsetX=e,this.options.offsetY=t,this.fireEvent({offsetX:e,offsetY:t},"offsetUpdated")}setOffsetX(e){this.setOffset(e,this.options.offsetY)}setOffsetY(e){this.setOffset(this.options.offsetX,e)}getOffsetY(){return this.options.offsetY}getOffsetX(){return this.options.offsetX}getZoomLevel(){return this.options.zoom}}class j{constructor(e){this.type=e}setDiagramEngine(e){this.engine=e}setFactoryBank(e){this.bank=e}getType(){return this.type}}class F extends j{}class B extends F{}class U extends L{constructor(e){super(e)}performanceTune(){return!0}getParentCanvasModel(){return this.parent?this.parent instanceof D?this.parent:this.parent instanceof U?this.parent.getParentCanvasModel():null:null}getParent(){return this.parent}setParent(e){this.parent=e}getSelectionEntities(){return[this]}serialize(){return Object.assign(Object.assign({},super.serialize()),{type:this.options.type,selected:this.options.selected,extras:this.options.extras})}deserialize(e){super.deserialize(e),this.options.extras=e.data.extras,this.options.selected=e.data.selected}getType(){return this.options.type}isSelected(){return this.options.selected}isLocked(){return!!super.isLocked()||!!this.parent&&this.parent.isLocked()}setSelected(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.options.selected!==e&&(this.options.selected=e,this.fireEvent({isSelected:e},"selectionChanged"))}remove(){this.fireEvent({},"entityRemoved")}}class z extends U{constructor(e){super(e),this.position=e.position||new d.bR(0,0)}setPosition(e,t){e instanceof d.bR?this.position=e:this.position=new d.bR(e,t),this.fireEvent({},"positionChanged")}getBoundingBox(){return d.M_.fromPointAndSize(this.position,0,0)}deserialize(e){super.deserialize(e),this.position=new d.bR(e.data.x,e.data.y)}serialize(){return Object.assign(Object.assign({},super.serialize()),{x:this.position.x,y:this.position.y})}getPosition(){return this.position}getX(){return this.position.x}getY(){return this.position.y}}var W,V,H,G,q,Y,K=n(57528),X=n(9950),$=n(46948),Q=n(88283);!function(e){const t=(0,Q.AH)(W||(W=(0,K.A)(["\n\t\ttop: 0;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\tposition: absolute;\n\t\tpointer-events: none;\n\t\ttransform-origin: 0 0;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\toverflow: visible;\n\t"])));e.DivLayer=$.A.div(V||(V=(0,K.A)(["\n\t\t","\n\t"])),t),e.SvgLayer=$.A.svg(H||(H=(0,K.A)(["\n\t\t","\n\t"])),t)}(G||(G={}));class Z extends X.Component{constructor(e){super(e),this.state={}}getTransform(){const e=this.props.layer.getParent();return"\n\t\t\ttranslate(\n\t\t\t\t".concat(e.getOffsetX(),"px,\n\t\t\t\t").concat(e.getOffsetY(),"px)\n\t\t\tscale(\n\t\t\t\t").concat(e.getZoomLevel()/100,"\n\t\t\t)\n \t")}getTransformStyle(){return this.props.layer.getOptions().transformed?{transform:this.getTransform()}:{}}render(){return this.props.layer.getOptions().isSvg?X.createElement(G.SvgLayer,{style:this.getTransformStyle()},this.props.children):X.createElement(G.DivLayer,{style:this.getTransformStyle()},this.props.children)}}class J extends X.Component{shouldComponentUpdate(){return this.props.layer.isRepaintEnabled()}render(){return this.props.engine.getFactoryForLayer(this.props.layer).generateReactWidget({model:this.props.layer})}}!function(e){e.Canvas=$.A.div(q||(q=(0,K.A)(["\n\t\tposition: relative;\n\t\tcursor: move;\n\t\toverflow: hidden;\n\t"])))}(Y||(Y={}));class ee extends X.Component{constructor(e){super(e),this.ref=X.createRef(),this.state={action:null,diagramEngineListener:null}}componentWillUnmount(){this.props.engine.deregisterListener(this.canvasListener),this.props.engine.setCanvas(null),document.removeEventListener("keyup",this.keyUp),document.removeEventListener("keydown",this.keyDown)}registerCanvas(){this.props.engine.setCanvas(this.ref.current),this.props.engine.iterateListeners((e=>{e.rendered&&e.rendered()}))}componentDidUpdate(){this.registerCanvas()}componentDidMount(){this.canvasListener=this.props.engine.registerListener({repaintCanvas:()=>{this.forceUpdate()}}),this.keyDown=e=>{this.props.engine.getActionEventBus().fireAction({event:e})},this.keyUp=e=>{this.props.engine.getActionEventBus().fireAction({event:e})},document.addEventListener("keyup",this.keyUp),document.addEventListener("keydown",this.keyDown),this.registerCanvas()}render(){const e=this.props.engine.getModel();return X.createElement(Y.Canvas,{className:this.props.className,ref:this.ref,onWheel:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onMouseDown:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onMouseUp:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onMouseMove:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onTouchStart:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onTouchEnd:e=>{this.props.engine.getActionEventBus().fireAction({event:e})},onTouchMove:e=>{this.props.engine.getActionEventBus().fireAction({event:e})}},e.getLayers().map((e=>X.createElement(Z,{layer:e,key:e.getID()},X.createElement(J,{layer:e,engine:this.props.engine,key:e.getID()})))))}}var te,ne,re=n(6638),oe=n.n(re);class ie extends U{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.models={},this.repaintEnabled=!0}deserialize(e){super.deserialize(e),this.options.isSvg=!!e.data.isSvg,this.options.transformed=!!e.data.transformed,_()(e.data.models,(t=>{const n=this.getChildModelFactoryBank(e.engine).getFactory(t.type).generateModel({initialConfig:t});n.deserialize(Object.assign(Object.assign({},e),{data:t})),this.addModel(n)}))}serialize(){return Object.assign(Object.assign({},super.serialize()),{isSvg:this.options.isSvg,transformed:this.options.transformed,models:oe()(this.models,(e=>e.serialize()))})}isRepaintEnabled(){return this.repaintEnabled}allowRepaint(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.repaintEnabled=e}remove(){this.parent&&this.parent.removeLayer(this),super.remove()}addModel(e){e.setParent(this),this.models[e.getID()]=e}getSelectionEntities(){return M()(this.models,(e=>e.getSelectionEntities()))}getModels(){return this.models}getModel(e){return this.models[e]}removeModel(e){const t="string"===typeof e?e:e.getID();return!!this.models[t]&&(delete this.models[t],!0)}}class se extends ie{constructor(){super({transformed:!1,isSvg:!1,type:"selection"})}setBox(e){this.box=e}getChildModelFactoryBank(){return null}}!function(e){e.Container=$.A.div(te||(te=(0,K.A)(["\n\t\tposition: absolute;\n\t\tbackground-color: rgba(0, 192, 255, 0.2);\n\t\tborder: solid 2px rgb(0, 192, 255);\n\t"])))}(ne||(ne={}));class ae extends X.Component{render(){const{rect:e}=this.props;return e?X.createElement(ne.Container,{style:{top:e.top,left:e.left,width:e.width,height:e.height}}):null}}class le extends B{constructor(){super("selection")}generateModel(e){return new se}generateReactWidget(e){return X.createElement(ae,{rect:e.model.box})}}class ce extends X.Component{shouldComponentUpdate(e,t,n){return!this.props.model.performanceTune()||(this.props.model!==e.model||!S()(this.props.serialized,e.serialized))}render(){return this.props.children()}}var ue=n(92437),de=n.n(ue);class he{constructor(e){this.actions=[],this.keys=[],this.childStates=[],this.options=e}setEngine(e){this.engine=e}getOptions(){return this.options}eject(){this.engine.getStateMachine().popState()}transitionWithEvent(e,t){this.engine.getStateMachine().pushState(e),this.engine.getActionEventBus().fireAction(t)}registerAction(e){this.actions.push(e)}tryActivateParentState(e){return this.keys.length>0&&!this.isKeysFullfilled(e)&&(this.eject(),!0)}tryActivateChildState(e){const t=this.findStateToActivate(e);return!!t&&(this.engine.getStateMachine().pushState(t),!0)}findStateToActivate(e){for(let t of this.childStates)if(t.isKeysFullfilled(e))return t;return null}isKeysFullfilled(e){return de()(this.keys,e).length===this.keys.length}activated(e){const t=this.engine.getActionEventBus().getKeys();if(!this.tryActivateParentState(t)&&!this.tryActivateChildState(t)){this.handler1=this.engine.getActionEventBus().registerAction(new h({type:u.KEY_DOWN,fire:()=>{this.tryActivateChildState(this.engine.getActionEventBus().getKeys())}})),this.handler2=this.engine.getActionEventBus().registerAction(new h({type:u.KEY_UP,fire:()=>{this.tryActivateParentState(this.engine.getActionEventBus().getKeys())}}));for(let e of this.actions)this.engine.getActionEventBus().registerAction(e)}}deactivated(e){this.handler1&&this.handler1(),this.handler2&&this.handler2();for(let t of this.actions)this.engine.getActionEventBus().deregisterAction(t)}}class pe extends he{constructor(e){super(e),this.registerAction(new h({type:u.MOUSE_DOWN,fire:e=>{const{clientX:t,clientY:n}=e.event;this.handleMoveStart(t,n)}})),this.registerAction(new h({type:u.MOUSE_MOVE,fire:e=>{const{event:t}=e;if(0===t.buttons)return void this.eject();const{clientX:n,clientY:r}=t;this.handleMove(n,r,t)}})),this.registerAction(new h({type:u.MOUSE_UP,fire:()=>this.handleMoveEnd()})),this.registerAction(new h({type:u.TOUCH_START,fire:e=>{const{clientX:t,clientY:n}=e.event.touches[0];this.handleMoveStart(t,n)}})),this.registerAction(new h({type:u.TOUCH_MOVE,fire:e=>{const{event:t}=e,{clientX:n,clientY:r}=t.touches[0];this.handleMove(n,r,t)}})),this.registerAction(new h({type:u.TOUCH_END,fire:()=>this.handleMoveEnd()}))}handleMoveStart(e,t){this.initialX=e,this.initialY=t;const n=this.engine.getRelativePoint(e,t);this.initialXRelative=n.x,this.initialYRelative=n.y}handleMove(e,t,n){this.fireMouseMoved({displacementX:e-this.initialX,displacementY:t-this.initialY,virtualDisplacementX:(e-this.initialX)/(this.engine.getModel().getZoomLevel()/100),virtualDisplacementY:(t-this.initialY)/(this.engine.getModel().getZoomLevel()/100),event:n})}handleMoveEnd(){this.eject()}}var fe=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function s(e){try{l(r.next(e))}catch(t){i(t)}}function a(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}l((r=r.apply(e,t||[])).next())}))};class me extends pe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({name:"drag-canvas"}),this.config=Object.assign({allowDrag:!0},e)}activated(e){const t=Object.create(null,{activated:{get:()=>super.activated}});return fe(this,void 0,void 0,(function*(){t.activated.call(this,e),this.engine.getModel().clearSelection(),yield this.engine.repaintCanvas(!0);for(let e of this.engine.getModel().getLayers())e.allowRepaint(!1);this.initialCanvasX=this.engine.getModel().getOffsetX(),this.initialCanvasY=this.engine.getModel().getOffsetY()}))}deactivated(e){super.deactivated(e);for(let t of this.engine.getModel().getLayers())t.allowRepaint(!0)}fireMouseMoved(e){this.config.allowDrag&&(this.engine.getModel().setOffset(this.initialCanvasX+e.displacementX,this.initialCanvasY+e.displacementY),this.engine.repaintCanvas())}}class ge extends pe{constructor(){super({name:"selection-box"})}activated(e){super.activated(e),this.layer=new se,this.engine.getModel().addLayer(this.layer)}deactivated(e){super.deactivated(e),this.layer.remove(),this.engine.repaintCanvas()}getBoxDimensions(e){let t;if("touches"in e.event){const n=e.event.touches[0];t=this.engine.getRelativePoint(n.clientX,n.clientY)}else t=this.engine.getRelativePoint(e.event.clientX,e.event.clientY);return{left:t.x>this.initialXRelative?this.initialXRelative:t.x,top:t.y>this.initialYRelative?this.initialYRelative:t.y,width:Math.abs(t.x-this.initialXRelative),height:Math.abs(t.y-this.initialYRelative),right:t.x{const t=this.engine.getActionEventBus().getModelForEvent(e);t?(t.setSelected(!0),this.engine.repaintCanvas()):this.transitionWithEvent(new ge,e)}}))}}class ye extends pe{constructor(){super({name:"move-items"}),this.registerAction(new h({type:u.MOUSE_DOWN,fire:e=>{const t=this.engine.getActionEventBus().getModelForEvent(e);t&&(t.isSelected()||this.engine.getModel().clearSelection(),t.setSelected(!0),this.engine.repaintCanvas())}}))}activated(e){super.activated(e),this.initialPositions={}}fireMouseMoved(e){const t=this.engine.getModel().getSelectedEntities(),n=this.engine.getModel();for(let r of t)if(r instanceof z){if(r.isLocked())continue;this.initialPositions[r.getID()]||(this.initialPositions[r.getID()]={point:r.getPosition(),item:r});const t=this.initialPositions[r.getID()].point;r.setPosition(n.getGridPosition(t.x+e.virtualDisplacementX),n.getGridPosition(t.y+e.virtualDisplacementY))}this.engine.repaintCanvas()}}},38657:(e,t,n)=>{"use strict";n.d(t,{kH:()=>ke,E$:()=>$e,X0:()=>Pe,Is:()=>Ie,QO:()=>Qe,DQ:()=>A,iL:()=>_,wD:()=>de,_F:()=>Se,Ay:()=>Nt});var r=n(13386),o=n.n(r),i=n(79113),s=n.n(i),a=n(26380),l=n.n(a),c=n(11032),u=n.n(c),d=n(83134),h=n.n(d),p=n(61619);class f extends p.Cs{constructor(e){super(Object.assign(Object.assign({},e),{type:"point"})),this.parent=e.link}isConnectedToPort(){return null!==this.parent.getPortForPoint(this)}getLink(){return this.getParent()}remove(){this.parent&&this.parent.removePoint(this),super.remove()}isLocked(){return super.isLocked()||this.getParent().isLocked()}}var m=n(55876),g=n.n(m),v=n(60316),y=n.n(v),b=n(68012);class w extends p.tk{constructor(e){super(e),this.points=[new f({link:this}),new f({link:this})],this.sourcePort=null,this.targetPort=null,this.renderedPaths=[],this.labels=[]}getBoundingBox(){return new b.M_((0,b.fH)(g()(this.points,(e=>e.getPosition()))))}getSelectionEntities(){return this.getTargetPort()&&this.getSourcePort()?super.getSelectionEntities().concat(y()(this.points,1,this.points.length-1)):this.getSourcePort()?this.getTargetPort()?super.getSelectionEntities().concat(this.points):super.getSelectionEntities().concat(y()(this.points,1,this.points.length)):super.getSelectionEntities().concat(y()(this.points,0,this.points.length-1))}deserialize(e){super.deserialize(e),this.points=g()(e.data.points||[],(t=>{var n=new f({link:this,position:new b.bR(t.x,t.y)});return n.deserialize(Object.assign(Object.assign({},e),{data:t})),n})),l()(e.data.labels||[],(t=>{let n=e.engine.getFactoryForLabel(t.type).generateModel({});n.deserialize(Object.assign(Object.assign({},e),{data:t})),this.addLabel(n)})),e.data.target&&e.getModel(e.data.targetPort).then((e=>{this.setTargetPort(e)})),e.data.source&&e.getModel(e.data.sourcePort).then((e=>{this.setSourcePort(e)}))}getRenderedPath(){return this.renderedPaths}setRenderedPaths(e){this.renderedPaths=e}serialize(){return Object.assign(Object.assign({},super.serialize()),{source:this.sourcePort?this.sourcePort.getParent().getID():null,sourcePort:this.sourcePort?this.sourcePort.getID():null,target:this.targetPort?this.targetPort.getParent().getID():null,targetPort:this.targetPort?this.targetPort.getID():null,points:g()(this.points,(e=>e.serialize())),labels:g()(this.labels,(e=>e.serialize()))})}doClone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.setPoints(g()(this.getPoints(),(t=>t.clone(e)))),this.sourcePort&&t.setSourcePort(this.sourcePort.clone(e)),this.targetPort&&t.setTargetPort(this.targetPort.clone(e))}clearPort(e){this.sourcePort===e?this.setSourcePort(null):this.targetPort===e&&this.setTargetPort(null)}remove(){this.sourcePort&&(this.sourcePort.removeLink(this),delete this.sourcePort),this.targetPort&&(this.targetPort.removeLink(this),delete this.targetPort),super.remove()}isLastPoint(e){return this.getPointIndex(e)===this.points.length-1}getPointIndex(e){return this.points.indexOf(e)}getPointModel(e){for(var t=0;t2&&void 0!==arguments[2]?arguments[2]:1;return this.addPoint(this.generatePoint(e,t),n)}addLabel(e){e.setParent(this),this.labels.push(e)}getPoints(){return this.points}getLabels(){return this.labels}setPoints(e){l()(e,(e=>{e.setParent(this)})),this.points=e}removePoint(e){this.isLastPoint(e)&&this.remove(),this.points.splice(this.getPointIndex(e),1)}removePointsBefore(e){this.points.splice(0,this.getPointIndex(e))}removePointsAfter(e){this.points.splice(this.getPointIndex(e)+1)}removeMiddlePoints(){this.points.length>2&&this.points.splice(1,this.points.length-2)}addPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return e.setParent(this),this.points.splice(t,0,e),e}generatePoint(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return new f({link:this,position:new b.bR(e,t)})}}class _ extends p.Cs{constructor(e){super(e),this.ports={},this.width=0,this.height=0}getBoundingBox(){return b.M_.fromPointAndSize(this.getPosition(),this.width,this.height)}setPosition(e,t){const n=this.position;e instanceof b.bR?super.setPosition(e):super.setPosition(e,t),l()(this.ports,(e=>{e.setPosition(e.getX()+this.position.x-n.x,e.getY()+this.position.y-n.y)}))}deserialize(e){super.deserialize(e),l()(e.data.ports,(t=>{let n=e.engine.getFactoryForPort(t.type).generateModel({});n.deserialize(Object.assign(Object.assign({},e),{data:t})),e.registerModel(n),this.addPort(n)}))}serialize(){return Object.assign(Object.assign({},super.serialize()),{ports:g()(this.ports,(e=>e.serialize()))})}doClone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.ports={},l()(this.ports,(n=>{t.addPort(n.clone(e))}))}remove(){super.remove(),l()(this.ports,(e=>{l()(e.getLinks(),(e=>{e.remove()}))}))}getPortFromID(e){for(var t in this.ports)if(this.ports[t].getID()===e)return this.ports[t];return null}getLink(e){for(let t in this.ports){const n=this.ports[t].getLinks();if(n[e])return n[e]}}getPort(e){return this.ports[e]}getPorts(){return this.ports}removePort(e){for(let t of h()(e.getLinks()))t.clearPort(e);this.ports[e.getName()]&&(this.ports[e.getName()].setParent(null),delete this.ports[e.getName()])}addPort(e){return e.setParent(this),this.ports[e.getName()]=e,e}updateDimensions(e){let{width:t,height:n}=e;this.width=t,this.height=n}}class x extends p.Zr{constructor(){super({type:"diagram-nodes",isSvg:!1,transformed:!0})}addModel(e){if(!(e instanceof _))throw new Error("Can only add nodes to this layer");e.registerListener({entityRemoved:()=>{this.getParent().removeNode(e)}}),super.addModel(e)}getChildModelFactoryBank(e){return e.getNodeFactories()}getNodes(){return this.getModels()}}class S extends p.Zr{constructor(){super({type:"diagram-links",isSvg:!0,transformed:!0})}addModel(e){if(!(e instanceof w))throw new Error("Can only add links to this layer");e.registerListener({entityRemoved:()=>{this.getParent().removeLink(e)}}),super.addModel(e)}getLinks(){return this.getModels()}getChildModelFactoryBank(e){return e.getLinkFactories()}}class A extends p.Qe{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.addLayer(new S),this.addLayer(new x)}deserialize(e){this.layers=[],super.deserialize(e)}addLayer(e){super.addLayer(e),e instanceof x&&(this.activeNodeLayer=e),e instanceof S&&(this.activeLinkLayer=e)}getLinkLayers(){return o()(this.layers,(e=>e instanceof S))}getNodeLayers(){return o()(this.layers,(e=>e instanceof x))}getActiveNodeLayer(){if(!this.activeNodeLayer){const e=this.getNodeLayers();0===e.length?this.addLayer(new x):this.activeNodeLayer=e[0]}return this.activeNodeLayer}getActiveLinkLayer(){if(!this.activeLinkLayer){const e=this.getLinkLayers();0===e.length?this.addLayer(new S):this.activeLinkLayer=e[0]}return this.activeLinkLayer}getNode(e){for(const t of this.getNodeLayers()){const n=t.getModel(e);if(n)return n}}getLink(e){for(const t of this.getLinkLayers()){const n=t.getModel(e);if(n)return n}}addAll(){for(var e=arguments.length,t=new Array(e),n=0;n{e instanceof w?this.addLink(e):e instanceof _&&this.addNode(e)})),t}addLink(e){return this.getActiveLinkLayer().addModel(e),this.fireEvent({link:e,isCreated:!0},"linksUpdated"),e}addNode(e){return this.getActiveNodeLayer().addModel(e),this.fireEvent({node:e,isCreated:!0},"nodesUpdated"),e}removeLink(e){u()(this.getLinkLayers(),(t=>t.removeModel(e)))&&this.fireEvent({link:e,isCreated:!1},"linksUpdated")}removeNode(e){u()(this.getNodeLayers(),(t=>t.removeModel(e)))&&this.fireEvent({node:e,isCreated:!1},"nodesUpdated")}getLinks(){return s()(this.getLinkLayers(),(e=>h()(e.getModels())))}getNodes(){return s()(this.getNodeLayers(),(e=>h()(e.getModels())))}}class C extends p.tk{constructor(e){super(Object.assign(Object.assign({},e),{offsetX:e.offsetX||0,offsetY:e.offsetY||0}))}deserialize(e){super.deserialize(e),this.options.offsetX=e.data.offsetX,this.options.offsetY=e.data.offsetY}serialize(){return Object.assign(Object.assign({},super.serialize()),{offsetX:this.options.offsetX,offsetY:this.options.offsetY})}}var k,E,T,O,M,P=n(9950),R=n(57528),N=n(46948);!function(e){e.Label=N.A.div(k||(k=(0,R.A)(["\n\t\tdisplay: inline-block;\n\t\tposition: absolute;\n\t"]))),e.Foreign=N.A.foreignObject(E||(E=(0,R.A)(["\n\t\tpointer-events: none;\n\t\toverflow: visible;\n\t"])))}(T||(T={}));class I extends P.Component{constructor(e){super(e),this.findPathAndRelativePositionToRenderLabel=e=>{const t=this.props.label.getParent(),n=t.getRenderedPath().map((e=>e.getTotalLength()));let r=n.reduce(((e,t)=>e+t),0)*(e/(t.getLabels().length+1)),o=0;for(;o{const e=this.findPathAndRelativePositionToRenderLabel(this.props.index+1);if(!e)return;const{path:t,position:n}=e,r=this.ref.current.offsetWidth,o=this.ref.current.offsetHeight,i=t.getPointAtLength(n),s={x:i.x-r/2+this.props.label.getOptions().offsetX,y:i.y-o/2+this.props.label.getOptions().offsetY};this.ref.current.style.transform="translate(".concat(s.x,"px, ").concat(s.y,"px)")},this.ref=P.createRef()}componentDidUpdate(){window.requestAnimationFrame(this.calculateLabelPosition)}componentDidMount(){window.requestAnimationFrame(this.calculateLabelPosition)}render(){const e=this.props.engine.getCanvas();return P.createElement(T.Foreign,{key:this.props.label.getID(),width:null===e||void 0===e?void 0:e.offsetWidth,height:null===e||void 0===e?void 0:e.offsetHeight},P.createElement(T.Label,{ref:this.ref},this.props.engine.getFactoryForLabel(this.props.label).generateReactWidget({model:this.props.label})))}}class L extends P.Component{constructor(e){super(e),this.state={sourcePort:null,targetPort:null}}componentWillUnmount(){this.sourceListener&&this.sourceListener.deregister(),this.targetListener&&this.targetListener.deregister()}static getDerivedStateFromProps(e,t){return{sourcePort:e.link.getSourcePort(),targetPort:e.link.getTargetPort()}}installTarget(){this.targetListener&&this.targetListener.deregister(),this.props.link.getTargetPort()&&(this.targetListener=this.props.link.getTargetPort().registerListener({reportInitialPosition:e=>{this.forceUpdate()}}))}installSource(){this.sourceListener&&this.sourceListener.deregister(),this.props.link.getSourcePort()&&(this.sourceListener=this.props.link.getSourcePort().registerListener({reportInitialPosition:e=>{this.forceUpdate()}}))}componentDidUpdate(e,t,n){t.sourcePort!==this.state.sourcePort&&this.installSource(),t.targetPort!==this.state.targetPort&&this.installTarget()}static generateLinePath(e,t){return"M".concat(e.getX(),",").concat(e.getY()," L ").concat(t.getX(),",").concat(t.getY())}componentDidMount(){this.props.link.getSourcePort()&&this.installSource(),this.props.link.getTargetPort()&&this.installTarget()}render(){const{link:e}=this.props;return e.getSourcePort()&&!e.getSourcePort().reportedPosition||e.getTargetPort()&&!e.getTargetPort().reportedPosition?null:P.createElement(p.Bf,{model:this.props.link,serialized:this.props.link.serialize()},(()=>P.createElement("g",{"data-linkid":this.props.link.getID()},this.props.diagramEngine.generateWidgetForLink(e),g()(this.props.link.getLabels(),((e,t)=>P.createElement(I,{key:e.getID(),engine:this.props.diagramEngine,label:e,index:t}))))))}}!function(e){e.Container=N.A.div(O||(O=(0,R.A)([""])))}(M||(M={}));class D extends P.Component{render(){return P.createElement(P.Fragment,null,g()(this.props.layer.getLinks(),(e=>P.createElement(L,{key:e.getID(),link:e,diagramEngine:this.props.engine}))))}}class j extends p.IT{constructor(){super("diagram-links")}generateModel(e){return new S}generateReactWidget(e){return P.createElement(D,{layer:e.model,engine:this.engine})}}var F=function(){if("undefined"!==typeof Map)return Map;function e(e,t){var n=-1;return e.some((function(e,r){return e[0]===t&&(n=r,!0)})),n}return function(){function t(){this.__entries__=[]}return Object.defineProperty(t.prototype,"size",{get:function(){return this.__entries__.length},enumerable:!0,configurable:!0}),t.prototype.get=function(t){var n=e(this.__entries__,t),r=this.__entries__[n];return r&&r[1]},t.prototype.set=function(t,n){var r=e(this.__entries__,t);~r?this.__entries__[r][1]=n:this.__entries__.push([t,n])},t.prototype.delete=function(t){var n=this.__entries__,r=e(n,t);~r&&n.splice(r,1)},t.prototype.has=function(t){return!!~e(this.__entries__,t)},t.prototype.clear=function(){this.__entries__.splice(0)},t.prototype.forEach=function(e,t){void 0===t&&(t=null);for(var n=0,r=this.__entries__;n0},e.prototype.connect_=function(){B&&!this.connected_&&(document.addEventListener("transitionend",this.onTransitionEnd_),window.addEventListener("resize",this.refresh),V?(this.mutationsObserver_=new MutationObserver(this.refresh),this.mutationsObserver_.observe(document,{attributes:!0,childList:!0,characterData:!0,subtree:!0})):(document.addEventListener("DOMSubtreeModified",this.refresh),this.mutationEventsAdded_=!0),this.connected_=!0)},e.prototype.disconnect_=function(){B&&this.connected_&&(document.removeEventListener("transitionend",this.onTransitionEnd_),window.removeEventListener("resize",this.refresh),this.mutationsObserver_&&this.mutationsObserver_.disconnect(),this.mutationEventsAdded_&&document.removeEventListener("DOMSubtreeModified",this.refresh),this.mutationsObserver_=null,this.mutationEventsAdded_=!1,this.connected_=!1)},e.prototype.onTransitionEnd_=function(e){var t=e.propertyName,n=void 0===t?"":t;W.some((function(e){return!!~n.indexOf(e)}))&&this.refresh()},e.getInstance=function(){return this.instance_||(this.instance_=new e),this.instance_},e.instance_=null,e}(),G=function(e,t){for(var n=0,r=Object.keys(t);n0},e}(),re="undefined"!==typeof WeakMap?new WeakMap:new F,oe=function e(t){if(!(this instanceof e))throw new TypeError("Cannot call a class as a function.");if(!arguments.length)throw new TypeError("1 argument required, but only 0 present.");var n=H.getInstance(),r=new ne(t,n,this);re.set(this,r)};["observe","unobserve","disconnect"].forEach((function(e){oe.prototype[e]=function(){var t;return(t=re.get(this))[e].apply(t,arguments)}}));const ie="undefined"!==typeof U.ResizeObserver?U.ResizeObserver:oe;var se,ae;!function(e){e.Node=N.A.div(se||(se=(0,R.A)(["\n\t\tposition: absolute;\n\t\t-webkit-touch-callout: none; /* iOS Safari */\n\t\t-webkit-user-select: none; /* Chrome/Safari/Opera */\n\t\tuser-select: none;\n\t\tcursor: move;\n\t\tpointer-events: all;\n\t"])))}(ae||(ae={}));class le extends P.Component{constructor(e){super(e),this.ref=P.createRef()}componentWillUnmount(){var e;this.ob.disconnect(),this.ob=null,null===(e=this.listener)||void 0===e||e.deregister(),this.listener=null}componentDidUpdate(e,t,n){this.listener&&this.props.node!==e.node&&(this.listener.deregister(),this.installSelectionListener())}installSelectionListener(){this.listener=this.props.node.registerListener({selectionChanged:e=>{this.forceUpdate()}})}updateSize(e,t){this.props.node.updateDimensions({width:e,height:t});try{l()(this.props.node.getPorts(),(e=>{e.updateCoords(this.props.diagramEngine.getPortCoords(e))}))}catch(n){}}componentDidMount(){this.ob=new ie((e=>{const t=e[0].contentRect;this.updateSize(t.width,t.height)}));const e=this.ref.current.getBoundingClientRect();this.updateSize(e.width,e.height),this.ob.observe(this.ref.current),this.installSelectionListener()}render(){return P.createElement(p.Bf,{model:this.props.node,serialized:this.props.node.serialize()},(()=>P.createElement(ae.Node,{className:"node",ref:this.ref,"data-nodeid":this.props.node.getID(),style:{top:this.props.node.getY(),left:this.props.node.getX()}},this.props.diagramEngine.generateWidgetForNode(this.props.node))))}}class ce extends P.Component{render(){return P.createElement(P.Fragment,null,g()(this.props.layer.getNodes(),(e=>P.createElement(le,{key:e.getID(),diagramEngine:this.props.engine,node:e}))))}}class ue extends p.IT{constructor(){super("diagram-nodes")}generateModel(e){return new x}generateReactWidget(e){return P.createElement(ce,{layer:e.model,engine:this.engine})}}var de,he=n(22419),pe=n.n(he),fe=n(34273),me=n.n(fe);!function(e){e.TOP="top",e.LEFT="left",e.BOTTOM="bottom",e.RIGHT="right"}(de||(de={}));class ge extends p.Cs{constructor(e){super(e),this.links={},this.reportedPosition=!1}deserialize(e){super.deserialize(e),this.reportedPosition=!1,this.options.name=e.data.name,this.options.alignment=e.data.alignment}serialize(){return Object.assign(Object.assign({},super.serialize()),{name:this.options.name,alignment:this.options.alignment,parentNode:this.parent.getID(),links:g()(this.links,(e=>e.getID()))})}setPosition(e,t){let n=this.position;super.setPosition(e,t),l()(this.getLinks(),(r=>{let o=r.getPointForPort(this);o.setPosition(o.getX()+e-n.x,o.getY()+t-n.y)}))}doClone(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;t.links={},t.parent=this.getParent().clone(e)}getNode(){return this.getParent()}getName(){return this.options.name}getMaximumLinks(){return this.options.maximumLinks}setMaximumLinks(e){this.options.maximumLinks=e}removeLink(e){delete this.links[e.getID()]}addLink(e){this.links[e.getID()]=e}getLinks(){return this.links}createLinkModel(){if(pe()(this.options.maximumLinks)){var e=me()(this.links);if(1===this.options.maximumLinks&&e>=1)return h()(this.links)[0];if(e>=this.options.maximumLinks)return null}return null}reportPosition(){l()(this.getLinks(),(e=>{e.getPointForPort(this).setPosition(this.getCenter())})),this.fireEvent({entity:this},"reportInitialPosition")}getCenter(){return new b.bR(this.getX()+this.width/2,this.getY()+this.height/2)}getBoundingBox(){return b.M_.fromPointAndSize(this.position,this.width,this.height)}updateCoords(e){this.width=e.getWidth(),this.height=e.getHeight(),this.setPosition(e.getTopLeft()),this.reportedPosition=!0,this.reportPosition()}canLinkToPort(e){return!0}isLocked(){return super.isLocked()||this.getParent().isLocked()}}var ve,ye,be,we,_e=n(65724),xe=n.n(_e);class Se extends P.Component{constructor(e){super(e),this.ref=P.createRef()}report(){this.props.port.updateCoords(this.props.engine.getPortCoords(this.props.port,this.ref.current))}componentWillUnmount(){this.engineListenerHandle&&this.engineListenerHandle.deregister()}componentDidUpdate(e,t,n){this.props.port.reportedPosition||this.report()}componentDidMount(){this.engineListenerHandle=this.props.engine.registerListener({canvasReady:()=>{this.report()}}),this.props.engine.getCanvas()&&this.report()}getExtraProps(){if(p.Z0.TESTING){return{"data-links":xe()(this.props.port.getNode().getPort(this.props.port.getName()).links).join(",")}}return{}}render(){return P.createElement("div",Object.assign({style:this.props.style,ref:this.ref,className:"port ".concat(this.props.className||""),"data-name":this.props.port.getName(),"data-nodeid":this.props.port.getNode().getID()},this.getExtraProps()),this.props.children)}}class Ae extends p.H9{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super({name:"drag-new-link"}),this.config=Object.assign({allowLooseLinks:!0,allowLinksFromLockedPorts:!1},e),this.registerAction(new p.rc({type:p.NZ.MOUSE_DOWN,fire:e=>{this.port=this.engine.getMouseElement(e.event),this.config.allowLinksFromLockedPorts||!this.port.isLocked()?(this.link=this.port.createLinkModel(),this.link?(this.link.setSelected(!0),this.link.setSourcePort(this.port),this.engine.getModel().addLink(this.link),this.port.reportPosition()):this.eject()):this.eject()}})),this.registerAction(new p.rc({type:p.NZ.MOUSE_UP,fire:e=>{const t=this.engine.getMouseElement(e.event);if(t instanceof ge)return this.port.canLinkToPort(t)?(this.link.setTargetPort(t),t.reportPosition(),void this.engine.repaintCanvas()):(this.link.remove(),void this.engine.repaintCanvas());this.config.allowLooseLinks||(this.link.remove(),this.engine.repaintCanvas())}}))}fireMouseMoved(e){const t=this.port.getPosition(),n=this.engine.getModel().getZoomLevel()/100,r=this.engine.getModel().getOffsetX()/n,o=this.engine.getModel().getOffsetY()/n,i=this.initialXRelative/n,s=this.initialYRelative/n,a=t.x-r+(i-t.x)+e.virtualDisplacementX,l=t.y-o+(s-t.y)+e.virtualDisplacementY;this.link.getLastPoint().setPosition(a,l),this.engine.repaintCanvas()}}class Ce extends p.hG{constructor(){super(),this.registerAction(new p.rc({type:p.NZ.MOUSE_UP,fire:e=>{const t=this.engine.getMouseElement(e.event);t instanceof ge&&l()(this.initialPositions,(e=>{if(e.item instanceof f){const n=e.item.getParent();if(n.getLastPoint()!==e.item)return;n.getSourcePort().canLinkToPort(t)&&(n.setTargetPort(t),t.reportPosition(),this.engine.repaintCanvas())}}))}}))}}class ke extends p.Uw{constructor(){super({name:"default-diagrams"}),this.childStates=[new p.CG],this.dragCanvas=new p.CU,this.dragNewLink=new Ae,this.dragItems=new Ce,this.registerAction(new p.rc({type:p.NZ.MOUSE_DOWN,fire:e=>{const t=this.engine.getActionEventBus().getModelForEvent(e);t?t instanceof ge?this.transitionWithEvent(this.dragNewLink,e):this.transitionWithEvent(this.dragItems,e):this.transitionWithEvent(this.dragCanvas,e)}})),this.registerAction(new p.rc({type:p.NZ.TOUCH_START,fire:e=>{this.transitionWithEvent(this.dragCanvas,e)}}))}}class Ee extends p.$0{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),this.maxNumberPointsPerLink=1e3,this.nodeFactories=new p.rY,this.linkFactories=new p.rY,this.portFactories=new p.rY,this.labelFactories=new p.rY;const e=e=>{e.registerListener({factoryAdded:e=>{e.factory.setDiagramEngine(this)},factoryRemoved:e=>{e.factory.setDiagramEngine(null)}})};e(this.nodeFactories),e(this.linkFactories),e(this.portFactories),e(this.labelFactories)}getMouseElement(e){var t=e.target,n=this.model,r=p.Z0.closest(t,".port[data-name]");if(r){var o=p.Z0.closest(t,".node[data-nodeid]");return n.getNode(o.getAttribute("data-nodeid")).getPort(r.getAttribute("data-name"))}return(r=p.Z0.closest(t,".point[data-id]"))?n.getLink(r.getAttribute("data-linkid")).getPointModel(r.getAttribute("data-id")):(r=p.Z0.closest(t,"[data-linkid]"))?n.getLink(r.getAttribute("data-linkid")):(r=p.Z0.closest(t,".node[data-nodeid]"))?n.getNode(r.getAttribute("data-nodeid")):null}getNodeFactories(){return this.nodeFactories}getLinkFactories(){return this.linkFactories}getLabelFactories(){return this.labelFactories}getPortFactories(){return this.portFactories}getFactoryForNode(e){return"string"===typeof e?this.nodeFactories.getFactory(e):this.nodeFactories.getFactory(e.getType())}getFactoryForLink(e){return"string"===typeof e?this.linkFactories.getFactory(e):this.linkFactories.getFactory(e.getType())}getFactoryForLabel(e){return"string"===typeof e?this.labelFactories.getFactory(e):this.labelFactories.getFactory(e.getType())}getFactoryForPort(e){return"string"===typeof e?this.portFactories.getFactory(e):this.portFactories.getFactory(e.getType())}generateWidgetForLink(e){return this.getFactoryForLink(e).generateReactWidget({model:e})}generateWidgetForNode(e){return this.getFactoryForNode(e).generateReactWidget({model:e})}getNodeElement(e){const t=this.canvas.querySelector('.node[data-nodeid="'.concat(e.getID(),'"]'));if(null===t)throw new Error("Cannot find Node element with nodeID: ["+e.getID()+"]");return t}getNodePortElement(e){var t=this.canvas.querySelector('.port[data-name="'.concat(e.getName(),'"][data-nodeid="').concat(e.getParent().getID(),'"]'));if(null===t)throw new Error("Cannot find Node Port element with nodeID: ["+e.getParent().getID()+"] and name: ["+e.getName()+"]");return t}getPortCenter(e){return this.getPortCoords(e).getOrigin()}getPortCoords(e,t){if(!this.canvas)throw new Error("Canvas needs to be set first");t||(t=this.getNodePortElement(e));const n=t.getBoundingClientRect(),r=this.getRelativeMousePoint({clientX:n.left,clientY:n.top}),o=this.model.getZoomLevel()/100;return b.M_.fromPointAndSize(r,n.width/o,n.height/o)}getNodeDimensions(e){if(!this.canvas)return{width:0,height:0};const t=this.getNodeElement(e).getBoundingClientRect();return{width:t.width,height:t.height}}getBoundingNodesRect(e){if(e)return 0===e.length?new b.M_:new b.M_((0,b.p6)(e.map((e=>e.getBoundingBox()))))}zoomToFitSelectedNodes(e){const t=this.model.getSelectedEntities().filter((e=>e instanceof _));this.zoomToFitNodes({margin:e.margin,maxZoom:e.maxZoom,nodes:t.length>0?t:null})}zoomToFitNodes(e){var t=this;let n=e||0,r=[],o=null;e&&"object"==typeof e&&(n=e.margin||0,r=e.nodes||[],o=e.maxZoom||null),0===r.length&&(r=this.model.getNodes());const i=this.getBoundingNodesRect(r);if(i){let e=this.canvas.getBoundingClientRect();const r=function(){let n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;const r=t.canvas.clientWidth/(i.getWidth()+2*n),s=t.canvas.clientHeight/(i.getHeight()+2*n);let a=ro&&(a=o),{zoom:a,x:e.width/2-((i.getWidth()+2*n)/2+i.getTopLeft().x)*a+n,y:e.height/2-((i.getHeight()+2*n)/2+i.getTopLeft().y)*a+n}};let s=r(0);n&&(s.x0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign({offsetY:null==e.offsetY?-23:e.offsetY,type:"default"},e))}setLabel(e){this.options.label=e}deserialize(e){super.deserialize(e),this.options.label=e.data.label}serialize(){return Object.assign(Object.assign({},super.serialize()),{label:this.options.label})}}!function(e){e.Label=N.A.div(ve||(ve=(0,R.A)(["\n\t\tbackground: rgba(0, 0, 0, 0.8);\n\t\tborder-radius: 5px;\n\t\tcolor: white;\n\t\tfont-size: 12px;\n\t\tpadding: 4px 8px;\n\t\tfont-family: sans-serif;\n\t\tuser-select: none;\n\t"])))}(ye||(ye={}));class Oe extends P.Component{render(){return P.createElement(ye.Label,null,this.props.model.getOptions().label)}}class Me extends p.IT{constructor(){super("default")}generateReactWidget(e){return P.createElement(Oe,{model:e.model})}generateModel(e){return new Te}}class Pe extends w{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign({type:"default",width:e.width||3,color:e.color||"gray",selectedColor:e.selectedColor||"rgb(0,192,255)",curvyness:50},e))}calculateControlOffset(e){return e.getOptions().alignment===de.RIGHT?[this.options.curvyness,0]:e.getOptions().alignment===de.LEFT?[-this.options.curvyness,0]:e.getOptions().alignment===de.TOP?[0,-this.options.curvyness]:[0,this.options.curvyness]}getSVGPath(){if(2==this.points.length){const e=new b.vr;return e.setSource(this.getFirstPoint().getPosition()),e.setTarget(this.getLastPoint().getPosition()),e.setSourceControl(this.getFirstPoint().getPosition().clone()),e.setTargetControl(this.getLastPoint().getPosition().clone()),this.sourcePort&&e.getSourceControl().translate(...this.calculateControlOffset(this.getSourcePort())),this.targetPort&&e.getTargetControl().translate(...this.calculateControlOffset(this.getTargetPort())),e.getSVGCurve()}}serialize(){return Object.assign(Object.assign({},super.serialize()),{width:this.options.width,color:this.options.color,curvyness:this.options.curvyness,selectedColor:this.options.selectedColor})}deserialize(e){super.deserialize(e),this.options.color=e.data.color,this.options.width=e.data.width,this.options.curvyness=e.data.curvyness,this.options.selectedColor=e.data.selectedColor}addLabel(e){if(e instanceof C)return super.addLabel(e);let t=new Te;return t.setLabel(e),super.addLabel(t)}setWidth(e){this.options.width=e,this.fireEvent({width:e},"widthChanged")}setColor(e){this.options.color=e,this.fireEvent({color:e},"colorChanged")}}!function(e){e.PointTop=N.A.circle(be||(be=(0,R.A)(["\n\t\tpointer-events: all;\n\t"])))}(we||(we={}));class Re extends P.Component{constructor(e){super(e),this.state={selected:!1}}render(){const{point:e}=this.props;return P.createElement("g",null,P.createElement("circle",{cx:e.getPosition().x,cy:e.getPosition().y,r:5,fill:this.state.selected||this.props.point.isSelected()?this.props.colorSelected:this.props.color}),P.createElement(we.PointTop,{className:"point",onMouseLeave:()=>{this.setState({selected:!1})},onMouseEnter:()=>{this.setState({selected:!0})},"data-id":e.getID(),"data-linkid":e.getLink().getID(),cx:e.getPosition().x,cy:e.getPosition().y,r:15,opacity:0}))}}class Ne extends P.Component{render(){const e=P.cloneElement(this.props.factory.generateLinkSegment(this.props.link,this.props.selected||this.props.link.isSelected(),this.props.path),{ref:this.props.forwardRef}),t=P.cloneElement(e,Object.assign(Object.assign({strokeLinecap:"round",onMouseLeave:()=>{this.props.onSelection(!1)},onMouseEnter:()=>{this.props.onSelection(!0)}},this.props.extras),{ref:null,"data-linkid":this.props.link.getID(),strokeOpacity:this.props.selected?.1:0,strokeWidth:20,fill:"none",onContextMenu:()=>{this.props.link.isLocked()||(event.preventDefault(),this.props.link.remove())}}));return P.createElement("g",null,e,t)}}const Ie=e=>{const[t,n]=P.useState(!1),r=(0,P.useRef)([]);(0,P.useEffect)((()=>(e.link.setRenderedPaths(r.current.map((e=>e.current)).filter(Boolean)),()=>{e.link.setRenderedPaths([])})),[e.link]);const o=()=>{const e=P.createRef();return r.current.push(e),e},i=(t,n)=>{if(!t.shiftKey&&!e.link.isLocked()&&e.link.getPoints().length-1<=e.diagramEngine.getMaxNumberPointsPerLink()){const r=e.diagramEngine.getRelativeMousePoint(t),o=e.link.point(r.x,r.y,n);t.persist(),t.stopPropagation(),e.diagramEngine.getActionEventBus().fireAction({event:t,model:o})}},s=t=>{var n;return P.createElement(Re,{key:t.getID(),point:t,colorSelected:null!==(n=e.link.getOptions().selectedColor)&&void 0!==n?n:"",color:e.link.getOptions().color})},a=(r,i,s)=>P.createElement(Ne,{key:"link-".concat(s),path:r,selected:t,diagramEngine:e.diagramEngine,factory:e.diagramEngine.getFactoryForLink(e.link),link:e.link,forwardRef:o(),onSelection:n,extras:i}),l=e.link.getPoints(),c=[];if(r.current=[],2===l.length)c.push(a(e.link.getSVGPath(),{onMouseDown:t=>{var n;null===(n=e.selected)||void 0===n||n.call(e,t),i(t,1)}},"0")),null==e.link.getTargetPort()&&c.push(s(l[1]));else{for(let t=0;t{var r;null===(r=e.selected)||void 0===r||r.call(e,n),i(n,t+1)}},t));if((()=>{var t;return null===(t=e.renderPoints)||void 0===t||t})()){for(let e=1;ee.selected&&t))}(Fe||(Fe={}));class $e extends p.IT{constructor(){super(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default")}generateReactWidget(e){return P.createElement(Ie,{link:e.model,diagramEngine:this.engine})}generateModel(e){return new Pe}generateLinkSegment(e,t,n){return P.createElement(Fe.Path,{selected:t,stroke:t?e.getOptions().selectedColor:e.getOptions().color,strokeWidth:e.getOptions().width,d:n})}}class Qe extends ge{constructor(e,t,n){t&&(e={in:!!e,name:t,label:n}),super(Object.assign({label:e.label||e.name,alignment:e.in?de.LEFT:de.RIGHT,type:"default"},e))}deserialize(e){super.deserialize(e),this.options.in=e.data.in,this.options.label=e.data.label}serialize(){return Object.assign(Object.assign({},super.serialize()),{in:this.options.in,label:this.options.label})}link(e,t){let n=this.createLinkModel(t);return n.setSourcePort(this),n.setTargetPort(e),n}canLinkToPort(e){return!(e instanceof Qe)||this.options.in!==e.getOptions().in}createLinkModel(e){let t=super.createLinkModel();return!t&&e?e.generateModel({}):t||new Pe}}class Ze extends _{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};"string"===typeof e&&(e={name:e,color:arguments.length>1?arguments[1]:void 0}),super(Object.assign({type:"default",name:"Untitled",color:"rgb(0,192,255)"},e)),this.portsOut=[],this.portsIn=[]}doClone(e,t){t.portsIn=[],t.portsOut=[],super.doClone(e,t)}removePort(e){super.removePort(e),e.getOptions().in?this.portsIn.splice(this.portsIn.indexOf(e),1):this.portsOut.splice(this.portsOut.indexOf(e),1)}addPort(e){return super.addPort(e),e.getOptions().in?-1===this.portsIn.indexOf(e)&&this.portsIn.push(e):-1===this.portsOut.indexOf(e)&&this.portsOut.push(e),e}addInPort(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=new Qe({in:!0,name:e,label:e,alignment:de.LEFT});return t||this.portsIn.splice(0,0,n),this.addPort(n)}addOutPort(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];const n=new Qe({in:!1,name:e,label:e,alignment:de.RIGHT});return t||this.portsOut.splice(0,0,n),this.addPort(n)}deserialize(e){super.deserialize(e),this.options.name=e.data.name,this.options.color=e.data.color,this.portsIn=g()(e.data.portsInOrder,(e=>this.getPortFromID(e))),this.portsOut=g()(e.data.portsOutOrder,(e=>this.getPortFromID(e)))}serialize(){return Object.assign(Object.assign({},super.serialize()),{name:this.options.name,color:this.options.color,portsInOrder:g()(this.portsIn,(e=>e.getID())),portsOutOrder:g()(this.portsOut,(e=>e.getID()))})}getInPorts(){return this.portsIn}getOutPorts(){return this.portsOut}}!function(e){e.PortLabel=N.A.div(Be||(Be=(0,R.A)(["\n\t\tdisplay: flex;\n\t\tmargin-top: 1px;\n\t\talign-items: center;\n\t"]))),e.Label=N.A.div(Ue||(Ue=(0,R.A)(["\n\t\tpadding: 0 5px;\n\t\tflex-grow: 1;\n\t"]))),e.Port=N.A.div(ze||(ze=(0,R.A)(["\n\t\twidth: 15px;\n\t\theight: 15px;\n\t\tbackground: rgba(255, 255, 255, 0.1);\n\n\t\t&:hover {\n\t\t\tbackground: rgb(192, 255, 0);\n\t\t}\n\t"])))}(We||(We={}));class Je extends P.Component{render(){const e=P.createElement(Se,{engine:this.props.engine,port:this.props.port},P.createElement(We.Port,null)),t=P.createElement(We.Label,null,this.props.port.getOptions().label);return P.createElement(We.PortLabel,null,this.props.port.getOptions().in?e:t,this.props.port.getOptions().in?t:e)}}!function(e){e.Node=N.A.div(Ve||(Ve=(0,R.A)(["\n\t\tbackground-color: ",";\n\t\tborder-radius: 5px;\n\t\tfont-family: sans-serif;\n\t\tcolor: white;\n\t\tborder: solid 2px black;\n\t\toverflow: visible;\n\t\tfont-size: 11px;\n\t\tborder: solid 2px ",";\n\t"])),(e=>e.background),(e=>e.selected?"rgb(0,192,255)":"black")),e.Title=N.A.div(He||(He=(0,R.A)(["\n\t\tbackground: rgba(0, 0, 0, 0.3);\n\t\tdisplay: flex;\n\t\twhite-space: nowrap;\n\t\tjustify-items: center;\n\t"]))),e.TitleName=N.A.div(Ge||(Ge=(0,R.A)(["\n\t\tflex-grow: 1;\n\t\tpadding: 5px 5px;\n\t"]))),e.Ports=N.A.div(qe||(qe=(0,R.A)(["\n\t\tdisplay: flex;\n\t\tbackground-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.2));\n\t"]))),e.PortsContainer=N.A.div(Ye||(Ye=(0,R.A)(["\n\t\tflex-grow: 1;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\n\t\t&:first-of-type {\n\t\t\tmargin-right: 10px;\n\t\t}\n\n\t\t&:only-child {\n\t\t\tmargin-right: 0px;\n\t\t}\n\t"])))}(Ke||(Ke={}));class et extends P.Component{constructor(){super(...arguments),this.generatePort=e=>P.createElement(Je,{engine:this.props.engine,port:e,key:e.getID()})}render(){return P.createElement(Ke.Node,{"data-default-node-name":this.props.node.getOptions().name,selected:this.props.node.isSelected(),background:this.props.node.getOptions().color},P.createElement(Ke.Title,null,P.createElement(Ke.TitleName,null,this.props.node.getOptions().name)),P.createElement(Ke.Ports,null,P.createElement(Ke.PortsContainer,null,g()(this.props.node.getInPorts(),this.generatePort)),P.createElement(Ke.PortsContainer,null,g()(this.props.node.getOutPorts(),this.generatePort))))}}class tt extends p.IT{constructor(){super("default")}generateReactWidget(e){return P.createElement(et,{engine:this.engine,node:e.model})}generateModel(e){return new Ze}}class nt extends p.U6{constructor(){super("default")}generateModel(){return new Qe({name:"unknown"})}}class rt extends Pe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign({type:Ot.NAME},e))}performanceTune(){return!1}}var ot=n(12976),it=n.n(ot),st=n(47988),at=n.n(st),lt=n(1621);const ct=new lt.JumpPointFinder({heuristic:lt.Heuristic.manhattan,diagonalMovement:lt.DiagonalMovement.Never});class ut{constructor(e){this.instance=ct,this.factory=e}calculateDirectPath(e,t){const n=this.factory.getCanvasMatrix(),r=new lt.Grid(n);return ct.findPath(this.factory.translateRoutingX(Math.floor(e.getX()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingY(Math.floor(e.getY()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingX(Math.floor(t.getX()/this.factory.ROUTING_SCALING_FACTOR)),this.factory.translateRoutingY(Math.floor(t.getY()/this.factory.ROUTING_SCALING_FACTOR)),r)}calculateLinkStartEndCoords(e,t){const n=t.findIndex((t=>!!e[t[1]]&&0===e[t[1]][t[0]])),r=t.length-1-t.slice().reverse().findIndex((t=>!!e[t[1]]&&0===e[t[1]][t[0]]));if(-1===n||-1===r)return;const o=t.slice(0,n),i=t.slice(r);return{start:{x:t[n][0],y:t[n][1]},end:{x:t[r][0],y:t[r][1]},pathToStart:o,pathToEnd:i}}calculateDynamicPath(e,t,n,r,o){const i=new lt.Grid(e),s=ct.findPath(t.x,t.y,n.x,n.y,i),a=r.concat(s,o).map((e=>[this.factory.translateRoutingX(e[0],!0),this.factory.translateRoutingY(e[1],!0)]));return lt.Util.compressPath(a)}}class dt extends P.Component{constructor(e){super(e),this.refPaths=[],this.state={selected:!1},this.pathFinding=new ut(this.props.factory)}componentDidUpdate(){this.props.link.setRenderedPaths(this.refPaths.map((e=>e.current)))}componentDidMount(){this.props.link.setRenderedPaths(this.refPaths.map((e=>e.current)))}componentWillUnmount(){this.props.link.setRenderedPaths([])}generateLink(e,t){const n=P.createRef();return this.refPaths.push(n),P.createElement(Ne,{key:"link-".concat(t),path:e,selected:this.state.selected,diagramEngine:this.props.diagramEngine,factory:this.props.diagramEngine.getFactoryForLink(this.props.link),link:this.props.link,forwardRef:n,onSelection:e=>{this.setState({selected:e})},extras:{}})}render(){this.refPaths=[];var e=this.props.link.getPoints(),t=[];const n=this.pathFinding.calculateDirectPath(it()(e),at()(e)),r=this.props.factory.getRoutingMatrix(),o=this.pathFinding.calculateLinkStartEndCoords(r,n);if(o){const{start:e,end:n,pathToStart:i,pathToEnd:s}=o,a=this.pathFinding.calculateDynamicPath(r,e,n,i,s);t.push(this.generateLink(this.props.factory.generateDynamicPath(a),"0"))}return P.createElement(P.Fragment,null,t)}}var ht=n(55117),pt=n.n(ht),ft=n(27532),mt=n.n(ft),gt=n(674),vt=n.n(gt),yt=n(87946),bt=n.n(yt),wt=n(68583),_t=n.n(wt),xt=n(21885),St=n.n(xt),At=n(39939),Ct=n.n(At),kt=n(39874),Et=n.n(kt),Tt=n(93936);class Ot extends $e{constructor(){super(Ot.NAME),this.ROUTING_SCALING_FACTOR=5,this.canvasMatrix=[],this.routingMatrix=[],this.hAdjustmentFactor=0,this.vAdjustmentFactor=0,this.calculateMatrixDimensions=()=>{const e=h()(this.engine.getModel().getNodes()).map((e=>({x:e.getX(),width:e.width,y:e.getY(),height:e.height}))),t=h()(this.engine.getModel().getLinks()),n=s()(t.map((e=>[e.getSourcePort(),e.getTargetPort()]))).filter((e=>null!==e)).map((e=>({x:e.getX(),width:e.width,y:e.getY(),height:e.height}))),r=s()(t.map((e=>e.getPoints()))).map((e=>({x:e.getX(),width:0,y:e.getY(),height:0}))),o=(e,t)=>Et()(t,((t,n)=>t+bt()(e,n,0)),0),i=this.engine.getCanvas(),a=mt()(e,n,r),l=Math.floor(Math.min(bt()(_t()(a,"x"),"x",0),0)/this.ROUTING_SCALING_FACTOR)*this.ROUTING_SCALING_FACTOR,c=St()(a,(e=>o(e,["x","width"]))),u=Math.max(o(c,["x","width"]),i.offsetWidth),d=_t()(a,"y"),p=Math.floor(Math.min(bt()(d,"y",0),0)/this.ROUTING_SCALING_FACTOR)*this.ROUTING_SCALING_FACTOR,f=St()(a,(e=>o(e,["y","height"]))),m=Math.max(o(f,["y","height"]),i.offsetHeight);return{width:Math.ceil(Math.abs(l)+u),hAdjustmentFactor:Math.abs(l)/this.ROUTING_SCALING_FACTOR+1,height:Math.ceil(Math.abs(p)+m),vAdjustmentFactor:Math.abs(p)/this.ROUTING_SCALING_FACTOR+1}},this.markNodes=e=>{h()(this.engine.getModel().getNodes()).forEach((t=>{const n=Math.floor(t.getX()/this.ROUTING_SCALING_FACTOR),r=Math.ceil((t.getX()+t.width)/this.ROUTING_SCALING_FACTOR),o=Math.floor(t.getY()/this.ROUTING_SCALING_FACTOR),i=Math.ceil((t.getY()+t.height)/this.ROUTING_SCALING_FACTOR);for(let s=n-1;s<=r+1;s++)for(let t=o-1;t{s()(h()(this.engine.getModel().getLinks()).map((e=>[].concat(e.getSourcePort(),e.getTargetPort())))).filter((e=>null!==e)).forEach((t=>{const n=Math.floor(t.x/this.ROUTING_SCALING_FACTOR),r=Math.ceil((t.x+t.width)/this.ROUTING_SCALING_FACTOR),o=Math.floor(t.y/this.ROUTING_SCALING_FACTOR),i=Math.ceil((t.y+t.height)/this.ROUTING_SCALING_FACTOR);for(let s=n-1;s<=r+1;s++)for(let t=o-1;t{void 0!==e[n]&&void 0!==e[n][t]&&(e[n][t]=1)}}setDiagramEngine(e){super.setDiagramEngine(e),e.getStateMachine().registerListener({stateChanged:t=>{if(t.newState instanceof p.H9){const t=e.getActionEventBus().registerAction(new p.rc({type:p.NZ.MOUSE_UP,fire:()=>{this.calculateRoutingMatrix(),e.repaintCanvas(),t()}}))}}}),this.listener=e.registerListener({canvasReady:()=>{vt()((()=>{this.calculateRoutingMatrix(),e.repaintCanvas()}))}})}setFactoryBank(e){super.setFactoryBank(e),!e&&this.listener&&this.listener.deregister()}generateReactWidget(e){return P.createElement(dt,{diagramEngine:this.engine,link:e.model,factory:this})}generateModel(e){return new rt}getCanvasMatrix(){return 0===this.canvasMatrix.length&&this.calculateCanvasMatrix(),this.canvasMatrix}calculateCanvasMatrix(){const{width:e,hAdjustmentFactor:t,height:n,vAdjustmentFactor:r}=this.calculateMatrixDimensions();this.hAdjustmentFactor=t,this.vAdjustmentFactor=r;const o=Math.ceil(e/this.ROUTING_SCALING_FACTOR),i=Math.ceil(n/this.ROUTING_SCALING_FACTOR);this.canvasMatrix=Ct()(0,i).map((()=>new Array(o).fill(0)))}getRoutingMatrix(){return 0===this.routingMatrix.length&&this.calculateRoutingMatrix(),this.routingMatrix}calculateRoutingMatrix(){const e=pt()(this.getCanvasMatrix());this.markNodes(e),this.markPorts(e),this.routingMatrix=e}translateRoutingX(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e+this.hAdjustmentFactor*(t?-1:1)}translateRoutingY(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e+this.vAdjustmentFactor*(t?-1:1)}generateDynamicPath(e){let t=Tt();return t=t.moveto(e[0][0]*this.ROUTING_SCALING_FACTOR,e[0][1]*this.ROUTING_SCALING_FACTOR),e.slice(1).forEach((e=>{t=t.lineto(e[0]*this.ROUTING_SCALING_FACTOR,e[1]*this.ROUTING_SCALING_FACTOR)})),t.print()}}Ot.NAME="pathfinding";class Mt extends P.Component{constructor(e){super(e),this.handleMove=function(e){this.draggingEvent(e,this.dragging_index)}.bind(this),this.handleUp=function(e){this.setState({canDrag:!1,selected:!1}),window.removeEventListener("mousemove",this.handleMove),window.removeEventListener("mouseup",this.handleUp)}.bind(this),this.refPaths=[],this.state={selected:!1,canDrag:!1},this.dragging_index=0}componentDidUpdate(){this.props.link.setRenderedPaths(this.refPaths.map((e=>e.current)))}componentDidMount(){this.props.link.setRenderedPaths(this.refPaths.map((e=>e.current)))}componentWillUnmount(){this.props.link.setRenderedPaths([])}generateLink(e,t,n){const r=P.createRef();return this.refPaths.push(r),P.createElement(Ne,{key:"link-".concat(n),path:e,selected:this.state.selected,diagramEngine:this.props.diagramEngine,factory:this.props.diagramEngine.getFactoryForLink(this.props.link),link:this.props.link,forwardRef:r,onSelection:e=>{this.setState({selected:e})},extras:t})}calculatePositions(e,t,n,r){if(0===n){let t=new f({link:this.props.link,position:new b.bR(e[n].getX(),e[n].getY())});return this.props.link.addPoint(t,n),void this.dragging_index++}if(n===e.length-2){let t=new f({link:this.props.link,position:new b.bR(e[n+1].getX(),e[n+1].getY())});return void this.props.link.addPoint(t,n+1)}if(n-2>0){let o={[n-2]:e[n-2].getPosition(),[n+1]:e[n+1].getPosition(),[n-1]:e[n-1].getPosition()};if(Math.abs(o[n-1][r]-o[n+1][r])<5)return o[n-2][r]=this.props.diagramEngine.getRelativeMousePoint(t)[r],o[n+1][r]=this.props.diagramEngine.getRelativeMousePoint(t)[r],e[n-2].setPosition(o[n-2]),e[n+1].setPosition(o[n+1]),e[n-1].remove(),e[n-1].remove(),this.dragging_index--,void this.dragging_index--}if(n+2r.getX()&&(n=e[e.length-1],r=e[0],o=!0);let i=Math.abs(e[0].getY()-e[e.length-1].getY());if(null===this.props.link.getTargetPort()&&2===e.length)[...Array(2)].forEach((e=>{this.props.link.addPoint(new f({link:this.props.link,position:new b.bR(n.getX(),r.getY())}),1)})),this.props.link.setManuallyFirstAndLastPathsDirection(!0,!0);else if(null===this.props.link.getTargetPort()&&null!==this.props.link.getSourcePort())e[1].setPosition(r.getX()+(n.getX()-r.getX())/2,o?r.getY():n.getY()),e[2].setPosition(r.getX()+(n.getX()-r.getX())/2,o?n.getY():r.getY());else if(!this.state.canDrag&&e.length>2)for(let s=1;s{0===e.button&&(this.setState({canDrag:!0}),this.dragging_index=s,window.addEventListener("mousemove",this.handleMove),window.addEventListener("mouseup",this.handleUp))},onMouseEnter:e=>{this.setState({selected:!0}),this.props.link.lastHoverIndexOfPath=s}},s));return this.refPaths=[],P.createElement("g",{"data-default-link-test":this.props.link.getOptions().testName},t)}}Mt.defaultProps={color:"red",width:3,link:null,smooth:!1,diagramEngine:null,factory:null};class Pt extends Pe{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};super(Object.assign({type:Rt.NAME},e)),this.lastHoverIndexOfPath=0,this._lastPathXdirection=!1,this._firstPathXdirection=!1}setFirstAndLastPathsDirection(){let e=this.getPoints();for(let t=1;tr:this._lastPathXdirection=n>r}}addPoint(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return super.addPoint(e,t),this.setFirstAndLastPathsDirection(),e}deserialize(e){super.deserialize(e),this.setFirstAndLastPathsDirection()}setManuallyFirstAndLastPathsDirection(e,t){this._firstPathXdirection=e,this._lastPathXdirection=t}getLastPathXdirection(){return this._lastPathXdirection}getFirstPathXdirection(){return this._firstPathXdirection}setWidth(e){this.options.width=e,this.fireEvent({width:e},"widthChanged")}setColor(e){this.options.color=e,this.fireEvent({color:e},"colorChanged")}}class Rt extends $e{constructor(){super(Rt.NAME)}generateModel(e){return new Pt}generateReactWidget(e){return P.createElement(Mt,{diagramEngine:this.engine,link:e.model,factory:this})}}Rt.NAME="rightAngle";n(9312),n(38829),n(5695),n(21261);const Nt=function(){const e=new Ee(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return e.getLayerFactories().registerFactory(new ue),e.getLayerFactories().registerFactory(new j),e.getLayerFactories().registerFactory(new p.fc),e.getLabelFactories().registerFactory(new Me),e.getNodeFactories().registerFactory(new tt),e.getLinkFactories().registerFactory(new $e),e.getLinkFactories().registerFactory(new Ot),e.getPortFactories().registerFactory(new nt),e.getStateMachine().pushState(new ke),e}},95397:function(e,t,n){!function(e,t,n,r){"use strict";var o=function(e,t,n){return{endTime:t,insertTime:n,type:"exponentialRampToValue",value:e}},i=function(e,t,n){return{endTime:t,insertTime:n,type:"linearRampToValue",value:e}},s=function(e,t){return{startTime:t,type:"setValue",value:e}},a=function(e,t,n){return{duration:n,startTime:t,type:"setValueCurve",values:e}},l=function(e,t,n){var r=n.startTime,o=n.target,i=n.timeConstant;return o+(t-o)*Math.exp((r-e)/i)},c=function(e){return"exponentialRampToValue"===e.type},u=function(e){return"linearRampToValue"===e.type},d=function(e){return c(e)||u(e)},h=function(e){return"setValue"===e.type},p=function(e){return"setValueCurve"===e.type},f=function e(t,n,r,o){var i=t[n];return void 0===i?o:d(i)||h(i)?i.value:p(i)?i.values[i.values.length-1]:l(r,e(t,n-1,i.startTime,o),i)},m=function(e,t,n,r,o){return void 0===n?[r.insertTime,o]:d(n)?[n.endTime,n.value]:h(n)?[n.startTime,n.value]:p(n)?[n.startTime+n.duration,n.values[n.values.length-1]]:[n.startTime,f(e,t-1,n.startTime,o)]},g=function(e){return"cancelAndHold"===e.type},v=function(e){return"cancelScheduledValues"===e.type},y=function(e){return g(e)||v(e)?e.cancelTime:c(e)||u(e)?e.endTime:e.startTime},b=function(e,t,n,r){var o=r.endTime,i=r.value;return n===i?i:0=t:y(n)>=t})),r=this._automationEvents[n];if(-1!==n&&(this._automationEvents=this._automationEvents.slice(0,n)),g(e)){var l=this._automationEvents[this._automationEvents.length-1];if(void 0!==r&&d(r)){if(void 0!==l&&S(l))throw new Error("The internal list is malformed.");var h=void 0===l?r.insertTime:p(l)?l.startTime+l.duration:y(l),f=void 0===l?this._defaultValue:p(l)?l.values[l.values.length-1]:l.value,m=c(r)?b(t,h,f,r):w(t,h,f,r),_=c(r)?o(m,t,this._currenTime):i(m,t,this._currenTime);this._automationEvents.push(_)}if(void 0!==l&&S(l)&&this._automationEvents.push(s(this.getValue(t),t)),void 0!==l&&p(l)&&l.startTime+l.duration>t){var x=t-l.startTime,A=(l.values.length-1)/l.duration,C=Math.max(2,1+Math.ceil(x*A)),k=x/(C-1)*A,E=l.values.slice(0,C);if(k<1)for(var T=1;Tt})),P=-1===M?this._automationEvents[this._automationEvents.length-1]:this._automationEvents[M-1];if(void 0!==P&&p(P)&&y(P)+P.duration>t)return!1;var R=c(e)?o(e.value,e.endTime,this._currenTime):u(e)?i(e.value,t,this._currenTime):e;if(-1===M)this._automationEvents.push(R);else{if(p(e)&&t+e.duration>y(this._automationEvents[M]))return!1;this._automationEvents.splice(M,0,R)}}return!0}},{key:"flush",value:function(e){var t=this._automationEvents.findIndex((function(t){return y(t)>e}));if(t>1){var n=this._automationEvents.slice(t-1),r=n[0];S(r)&&n.unshift(s(f(this._automationEvents,t-2,r.startTime,this._defaultValue),r.startTime)),this._automationEvents=n}}},{key:"getValue",value:function(e){if(0===this._automationEvents.length)return this._defaultValue;var n=this._automationEvents.findIndex((function(t){return y(t)>e})),r=this._automationEvents[n],o=(-1===n?this._automationEvents.length:n)-1,i=this._automationEvents[o];if(void 0!==i&&S(i)&&(void 0===r||!d(r)||r.insertTime>e))return l(e,f(this._automationEvents,o-1,i.startTime,this._defaultValue),i);if(void 0!==i&&h(i)&&(void 0===r||!d(r)))return i.value;if(void 0!==i&&p(i)&&(void 0===r||!d(r)||i.startTime+i.duration>e))return e{e.exports={graphlib:n(98005),layout:n(52776),debug:n(90579),util:{time:n(91790).time,notime:n(91790).notime},version:n(81696)}},95536:(e,t,n)=>{"use strict";var r=n(21387),o=n(63065);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(e){var t=[],n={},o={};function i(s){r.has(o,s)||(o[s]=!0,n[s]=!0,r.forEach(e.outEdges(s),(function(e){r.has(n,e.w)?t.push(e):i(e.w)})),delete n[s])}return r.forEach(e.nodes(),i),t}(e);r.forEach(t,(function(t){var n=e.edge(t);e.removeEdge(t),n.forwardName=t.name,n.reversed=!0,e.setEdge(t.w,t.v,n,r.uniqueId("rev"))}))},undo:function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}}))}}},11133:(e,t,n)=>{var r=n(21387),o=n(91790);function i(e,t,n,r,i,s){var a={width:0,height:0,rank:s,borderType:t},l=i[t][s-1],c=o.addDummyNode(e,"border",a,n);i[t][s]=c,e.setParent(c,r),l&&e.setEdge(l,c,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var o=e.children(n),s=e.node(n);if(o.length&&r.forEach(o,t),r.has(s,"minRank")){s.borderLeft=[],s.borderRight=[];for(var a=s.minRank,l=s.maxRank+1;a{"use strict";var r=n(21387);function o(e){r.forEach(e.nodes(),(function(t){i(e.node(t))})),r.forEach(e.edges(),(function(t){i(e.edge(t))}))}function i(e){var t=e.width;e.width=e.height,e.height=t}function s(e){e.y=-e.y}function a(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){s(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,s),r.has(n,"y")&&s(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"x")&&a(n)}))}(e),o(e))}}},52281:e=>{function t(){var e={};e._next=e._prev=e,this._sentinel=e}function n(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function r(e,t){if("_next"!==e&&"_prev"!==e)return t}e.exports=t,t.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return n(t),t},t.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&n(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t},t.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,r)),n=n._prev;return"["+e.join(", ")+"]"}},90579:(e,t,n)=>{var r=n(21387),o=n(91790),i=n(98005).Graph;e.exports={debugOrdering:function(e){var t=o.buildLayerMatrix(e),n=new i({compound:!0,multigraph:!0}).setGraph({});return r.forEach(e.nodes(),(function(t){n.setNode(t,{label:t}),n.setParent(t,"layer"+e.node(t).rank)})),r.forEach(e.edges(),(function(e){n.setEdge(e.v,e.w,{},e.name)})),r.forEach(t,(function(e,t){var o="layer"+t;n.setNode(o,{rank:"same"}),r.reduce(e,(function(e,t){return n.setEdge(e,t,{style:"invis"}),t}))})),n}}},98005:(e,t,n)=>{var r;try{r=n(57532)}catch(o){}r||(r=window.graphlib),e.exports=r},63065:(e,t,n)=>{var r=n(21387),o=n(98005).Graph,i=n(52281);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,s=0,a=0;r.forEach(e.nodes(),(function(e){n.setNode(e,{v:e,in:0,out:0})})),r.forEach(e.edges(),(function(e){var r=n.edge(e.v,e.w)||0,o=t(e),i=r+o;n.setEdge(e.v,e.w,i),a=Math.max(a,n.node(e.v).out+=o),s=Math.max(s,n.node(e.w).in+=o)}));var c=r.range(a+s+3).map((function(){return new i})),u=s+1;return r.forEach(n.nodes(),(function(e){l(c,u,n.node(e))})),{graph:n,buckets:c,zeroIdx:u}}(e,t||s),c=function(e,t,n){var r,o=[],i=t[t.length-1],s=t[0];for(;e.nodeCount();){for(;r=s.dequeue();)a(e,t,n,r);for(;r=i.dequeue();)a(e,t,n,r);if(e.nodeCount())for(var l=t.length-2;l>0;--l)if(r=t[l].dequeue()){o=o.concat(a(e,t,n,r,!0));break}}return o}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(c,(function(t){return e.outEdges(t.v,t.w)})),!0)};var s=r.constant(1);function a(e,t,n,o,i){var s=i?[]:void 0;return r.forEach(e.inEdges(o.v),(function(r){var o=e.edge(r),a=e.node(r.v);i&&s.push({v:r.v,w:r.w}),a.out-=o,l(t,n,a)})),r.forEach(e.outEdges(o.v),(function(r){var o=e.edge(r),i=r.w,s=e.node(i);s.in-=o,l(t,n,s)})),e.removeNode(o.v),s}function l(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}},52776:(e,t,n)=>{"use strict";var r=n(21387),o=n(95536),i=n(69247),s=n(38439),a=n(91790).normalizeRanks,l=n(28518),c=n(91790).removeEmptyRanks,u=n(38167),d=n(11133),h=n(90044),p=n(84247),f=n(18770),m=n(91790),g=n(98005).Graph;e.exports=function(e,t){var n=t&&t.debugTiming?m.time:m.notime;n("layout",(function(){var t=n(" buildLayoutGraph",(function(){return function(e){var t=new g({multigraph:!0,compound:!0}),n=k(e.graph());return t.setGraph(r.merge({},y,C(n,v),r.pick(n,b))),r.forEach(e.nodes(),(function(n){var o=k(e.node(n));t.setNode(n,r.defaults(C(o,w),_)),t.setParent(n,e.parent(n))})),r.forEach(e.edges(),(function(n){var o=k(e.edge(n));t.setEdge(n,r.merge({},S,C(o,x),r.pick(o,A)))})),t}(e)}));n(" runLayout",(function(){!function(e,t){t(" makeSpaceForEdgeLabels",(function(){!function(e){var t=e.graph();t.ranksep/=2,r.forEach(e.edges(),(function(n){var r=e.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===t.rankdir||"BT"===t.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(e)})),t(" removeSelfEdges",(function(){!function(e){r.forEach(e.edges(),(function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}}))}(e)})),t(" acyclic",(function(){o.run(e)})),t(" nestingGraph.run",(function(){u.run(e)})),t(" rank",(function(){s(m.asNonCompoundGraph(e))})),t(" injectEdgeLabelProxies",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),o={rank:(e.node(t.w).rank-r.rank)/2+r.rank,e:t};m.addDummyNode(e,"edge-proxy",o,"_ep")}}))}(e)})),t(" removeEmptyRanks",(function(){c(e)})),t(" nestingGraph.cleanup",(function(){u.cleanup(e)})),t(" normalizeRanks",(function(){a(e)})),t(" assignRankMinMax",(function(){!function(e){var t=0;r.forEach(e.nodes(),(function(n){var o=e.node(n);o.borderTop&&(o.minRank=e.node(o.borderTop).rank,o.maxRank=e.node(o.borderBottom).rank,t=r.max(t,o.maxRank))})),e.graph().maxRank=t}(e)})),t(" removeEdgeLabelProxies",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);"edge-proxy"===n.dummy&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))}))}(e)})),t(" normalize.run",(function(){i.run(e)})),t(" parentDummyChains",(function(){l(e)})),t(" addBorderSegments",(function(){d(e)})),t(" order",(function(){p(e)})),t(" insertSelfEdges",(function(){!function(e){var t=m.buildLayerMatrix(e);r.forEach(t,(function(t){var n=0;r.forEach(t,(function(t,o){var i=e.node(t);i.order=o+n,r.forEach(i.selfEdges,(function(t){m.addDummyNode(e,"selfedge",{width:t.label.width,height:t.label.height,rank:i.rank,order:o+ ++n,e:t.e,label:t.label},"_se")})),delete i.selfEdges}))}))}(e)})),t(" adjustCoordinateSystem",(function(){h.adjust(e)})),t(" position",(function(){f(e)})),t(" positionSelfEdges",(function(){!function(e){r.forEach(e.nodes(),(function(t){var n=e.node(t);if("selfedge"===n.dummy){var r=e.node(n.e.v),o=r.x+r.width/2,i=r.y,s=n.x-o,a=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:o+2*s/3,y:i-a},{x:o+5*s/6,y:i-a},{x:o+s,y:i},{x:o+5*s/6,y:i+a},{x:o+2*s/3,y:i+a}],n.label.x=n.x,n.label.y=n.y}}))}(e)})),t(" removeBorderNodes",(function(){!function(e){r.forEach(e.nodes(),(function(t){if(e.children(t).length){var n=e.node(t),o=e.node(n.borderTop),i=e.node(n.borderBottom),s=e.node(r.last(n.borderLeft)),a=e.node(r.last(n.borderRight));n.width=Math.abs(a.x-s.x),n.height=Math.abs(i.y-o.y),n.x=s.x+n.width/2,n.y=o.y+n.height/2}})),r.forEach(e.nodes(),(function(t){"border"===e.node(t).dummy&&e.removeNode(t)}))}(e)})),t(" normalize.undo",(function(){i.undo(e)})),t(" fixupEdgeLabelCoords",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(e)})),t(" undoCoordinateSystem",(function(){h.undo(e)})),t(" translateGraph",(function(){!function(e){var t=Number.POSITIVE_INFINITY,n=0,o=Number.POSITIVE_INFINITY,i=0,s=e.graph(),a=s.marginx||0,l=s.marginy||0;function c(e){var r=e.x,s=e.y,a=e.width,l=e.height;t=Math.min(t,r-a/2),n=Math.max(n,r+a/2),o=Math.min(o,s-l/2),i=Math.max(i,s+l/2)}r.forEach(e.nodes(),(function(t){c(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.has(n,"x")&&c(n)})),t-=a,o-=l,r.forEach(e.nodes(),(function(n){var r=e.node(n);r.x-=t,r.y-=o})),r.forEach(e.edges(),(function(n){var i=e.edge(n);r.forEach(i.points,(function(e){e.x-=t,e.y-=o})),r.has(i,"x")&&(i.x-=t),r.has(i,"y")&&(i.y-=o)})),s.width=n-t+a,s.height=i-o+l}(e)})),t(" assignNodeIntersects",(function(){!function(e){r.forEach(e.edges(),(function(t){var n,r,o=e.edge(t),i=e.node(t.v),s=e.node(t.w);o.points?(n=o.points[0],r=o.points[o.points.length-1]):(o.points=[],n=s,r=i),o.points.unshift(m.intersectRect(i,n)),o.points.push(m.intersectRect(s,r))}))}(e)})),t(" reversePoints",(function(){!function(e){r.forEach(e.edges(),(function(t){var n=e.edge(t);n.reversed&&n.points.reverse()}))}(e)})),t(" acyclic.undo",(function(){o.undo(e)}))}(t,n)})),n(" updateInputGraph",(function(){!function(e,t){r.forEach(e.nodes(),(function(n){var r=e.node(n),o=t.node(n);r&&(r.x=o.x,r.y=o.y,t.children(n).length&&(r.width=o.width,r.height=o.height))})),r.forEach(e.edges(),(function(n){var o=e.edge(n),i=t.edge(n);o.points=i.points,r.has(i,"x")&&(o.x=i.x,o.y=i.y)})),e.graph().width=t.graph().width,e.graph().height=t.graph().height}(e,t)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],y={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],w=["width","height"],_={width:0,height:0},x=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},A=["labelpos"];function C(e,t){return r.mapValues(r.pick(e,t),Number)}function k(e){var t={};return r.forEach(e,(function(e,n){t[n.toLowerCase()]=e})),t}},21387:(e,t,n)=>{var r;try{r={cloneDeep:n(55117),constant:n(96800),defaults:n(70210),each:n(28193),filter:n(13386),find:n(75915),flatten:n(32964),forEach:n(26380),forIn:n(20286),has:n(26094),isUndefined:n(97842),last:n(47988),map:n(55876),mapValues:n(6638),max:n(62780),merge:n(23334),min:n(47282),minBy:n(68583),now:n(34378),pick:n(75357),range:n(39939),reduce:n(39874),sortBy:n(21261),uniqueId:n(2810),values:n(83134),zipObject:n(45630)}}catch(o){}r||(r=window._),e.exports=r},38167:(e,t,n)=>{var r=n(21387),o=n(91790);function i(e,t,n,s,a,l,c){var u=e.children(c);if(u.length){var d=o.addBorderNode(e,"_bt"),h=o.addBorderNode(e,"_bb"),p=e.node(c);e.setParent(d,c),p.borderTop=d,e.setParent(h,c),p.borderBottom=h,r.forEach(u,(function(r){i(e,t,n,s,a,l,r);var o=e.node(r),u=o.borderTop?o.borderTop:r,p=o.borderBottom?o.borderBottom:r,f=o.borderTop?s:2*s,m=u!==p?1:a-l[c]+1;e.setEdge(d,u,{weight:f,minlen:m,nestingEdge:!0}),e.setEdge(p,h,{weight:f,minlen:m,nestingEdge:!0})})),e.parent(c)||e.setEdge(t,d,{weight:0,minlen:a+l[c]})}else c!==t&&e.setEdge(t,c,{weight:0,minlen:n})}e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};function n(o,i){var s=e.children(o);s&&s.length&&r.forEach(s,(function(e){n(e,i+1)})),t[o]=i}return r.forEach(e.children(),(function(e){n(e,1)})),t}(e),s=r.max(r.values(n))-1,a=2*s+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=a}));var l=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(r){i(e,t,a,l,s,n,r)})),e.graph().nodeRankFactor=a},cleanup:function(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,r.forEach(e.edges(),(function(t){e.edge(t).nestingEdge&&e.removeEdge(t)}))}}},69247:(e,t,n)=>{"use strict";var r=n(21387),o=n(91790);e.exports={run:function(e){e.graph().dummyChains=[],r.forEach(e.edges(),(function(t){!function(e,t){var n,r,i,s=t.v,a=e.node(s).rank,l=t.w,c=e.node(l).rank,u=t.name,d=e.edge(t),h=d.labelRank;if(c===a+1)return;for(e.removeEdge(t),i=0,++a;a{var r=n(21387);e.exports=function(e,t,n){var o,i={};r.forEach(n,(function(n){for(var r,s,a=e.parent(n);a;){if((r=e.parent(a))?(s=i[r],i[r]=a):(s=o,o=a),s&&s!==a)return void t.setEdge(s,a);a=r}}))}},13922:(e,t,n)=>{var r=n(21387);e.exports=function(e,t){return r.map(t,(function(t){var n=e.inEdges(t);if(n.length){var o=r.reduce(n,(function(t,n){var r=e.edge(n),o=e.node(n.v);return{sum:t.sum+r.weight*o.order,weight:t.weight+r.weight}}),{sum:0,weight:0});return{v:t,barycenter:o.sum/o.weight,weight:o.weight}}return{v:t}}))}},24786:(e,t,n)=>{var r=n(21387),o=n(98005).Graph;e.exports=function(e,t,n){var i=function(e){var t;for(;e.hasNode(t=r.uniqueId("_root")););return t}(e),s=new o({compound:!0}).setGraph({root:i}).setDefaultNodeLabel((function(t){return e.node(t)}));return r.forEach(e.nodes(),(function(o){var a=e.node(o),l=e.parent(o);(a.rank===t||a.minRank<=t&&t<=a.maxRank)&&(s.setNode(o),s.setParent(o,l||i),r.forEach(e[n](o),(function(t){var n=t.v===o?t.w:t.v,i=s.edge(n,o),a=r.isUndefined(i)?0:i.weight;s.setEdge(n,o,{weight:e.edge(t).weight+a})})),r.has(a,"minRank")&&s.setNode(o,{borderLeft:a.borderLeft[t],borderRight:a.borderRight[t]}))})),s}},72789:(e,t,n)=>{"use strict";var r=n(21387);function o(e,t,n){for(var o=r.zipObject(n,r.map(n,(function(e,t){return t}))),i=r.flatten(r.map(t,(function(t){return r.sortBy(r.map(e.outEdges(t),(function(t){return{pos:o[t.w],weight:e.edge(t).weight}})),"pos")})),!0),s=1;s0;)t%2&&(n+=l[t+1]),l[t=t-1>>1]+=e.weight;c+=e.weight*n}))),c}e.exports=function(e,t){for(var n=0,r=1;r{"use strict";var r=n(21387),o=n(31344),i=n(72789),s=n(79818),a=n(24786),l=n(36102),c=n(98005).Graph,u=n(91790);function d(e,t,n){return r.map(t,(function(t){return a(e,t,n)}))}function h(e,t){var n=new c;r.forEach(e,(function(e){var o=e.graph().root,i=s(e,o,n,t);r.forEach(i.vs,(function(t,n){e.node(t).order=n})),l(e,n,i.vs)}))}function p(e,t){r.forEach(t,(function(t){r.forEach(t,(function(t,n){e.node(t).order=n}))}))}e.exports=function(e){var t=u.maxRank(e),n=d(e,r.range(1,t+1),"inEdges"),s=d(e,r.range(t-1,-1,-1),"outEdges"),a=o(e);p(e,a);for(var l,c=Number.POSITIVE_INFINITY,f=0,m=0;m<4;++f,++m){h(f%2?n:s,f%4>=2),a=u.buildLayerMatrix(e);var g=i(e,a);g{"use strict";var r=n(21387);e.exports=function(e){var t={},n=r.filter(e.nodes(),(function(t){return!e.children(t).length})),o=r.max(r.map(n,(function(t){return e.node(t).rank}))),i=r.map(r.range(o+1),(function(){return[]}));var s=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(s,(function n(o){if(r.has(t,o))return;t[o]=!0;var s=e.node(o);i[s.rank].push(o),r.forEach(e.successors(o),n)})),i}},35261:(e,t,n)=>{"use strict";var r=n(21387);e.exports=function(e,t){var n={};return r.forEach(e,(function(e,t){var o=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t};r.isUndefined(e.barycenter)||(o.barycenter=e.barycenter,o.weight=e.weight)})),r.forEach(t.edges(),(function(e){var t=n[e.v],o=n[e.w];r.isUndefined(t)||r.isUndefined(o)||(o.indegree++,t.out.push(n[e.w]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=e.barycenter)&&function(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}(e,t)}}function o(t){return function(n){n.in.push(t),0===--n.indegree&&e.push(n)}}for(;e.length;){var i=e.pop();t.push(i),r.forEach(i.in.reverse(),n(i)),r.forEach(i.out,o(i))}return r.map(r.filter(t,(function(e){return!e.merged})),(function(e){return r.pick(e,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(e){return!e.indegree})))}},79818:(e,t,n)=>{var r=n(21387),o=n(13922),i=n(35261),s=n(9479);e.exports=function e(t,n,a,l){var c=t.children(n),u=t.node(n),d=u?u.borderLeft:void 0,h=u?u.borderRight:void 0,p={};d&&(c=r.filter(c,(function(e){return e!==d&&e!==h})));var f=o(t,c);r.forEach(f,(function(n){if(t.children(n.v).length){var o=e(t,n.v,a,l);p[n.v]=o,r.has(o,"barycenter")&&(i=n,s=o,r.isUndefined(i.barycenter)?(i.barycenter=s.barycenter,i.weight=s.weight):(i.barycenter=(i.barycenter*i.weight+s.barycenter*s.weight)/(i.weight+s.weight),i.weight+=s.weight))}var i,s}));var m=i(f,a);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(m,p);var g=s(m,l);if(d&&(g.vs=r.flatten([d,g.vs,h],!0),t.predecessors(d).length)){var v=t.node(t.predecessors(d)[0]),y=t.node(t.predecessors(h)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+v.order+y.order)/(g.weight+2),g.weight+=2}return g}},9479:(e,t,n)=>{var r=n(21387),o=n(91790);function i(e,t,n){for(var o;t.length&&(o=r.last(t)).i<=n;)t.pop(),e.push(o.vs),n++;return n}e.exports=function(e,t){var n=o.partition(e,(function(e){return r.has(e,"barycenter")})),s=n.lhs,a=r.sortBy(n.rhs,(function(e){return-e.i})),l=[],c=0,u=0,d=0;s.sort((h=!!t,function(e,t){return e.barycentert.barycenter?1:h?t.i-e.i:e.i-t.i})),d=i(l,a,d),r.forEach(s,(function(e){d+=e.vs.length,l.push(e.vs),c+=e.barycenter*e.weight,u+=e.weight,d=i(l,a,d)}));var h;var p={vs:r.flatten(l,!0)};u&&(p.barycenter=c/u,p.weight=u);return p}},28518:(e,t,n)=>{var r=n(21387);e.exports=function(e){var t=function(e){var t={},n=0;function o(i){var s=n;r.forEach(e.children(i),o),t[i]={low:s,lim:n++}}return r.forEach(e.children(),o),t}(e);r.forEach(e.graph().dummyChains,(function(n){for(var r=e.node(n),o=r.edgeObj,i=function(e,t,n,r){var o,i,s=[],a=[],l=Math.min(t[n].low,t[r].low),c=Math.max(t[n].lim,t[r].lim);o=n;do{o=e.parent(o),s.push(o)}while(o&&(t[o].low>l||c>t[o].lim));i=o,o=r;for(;(o=e.parent(o))!==i;)a.push(o);return{path:s.concat(a.reverse()),lca:i}}(e,t,o.v,o.w),s=i.path,a=i.lca,l=0,c=s[l],u=!0;n!==o.w;){if(r=e.node(n),u){for(;(c=s[l])!==a&&e.node(c).maxRank{"use strict";var r=n(21387),o=n(98005).Graph,i=n(91790);function s(e,t){var n={};return r.reduce(t,(function(t,o){var i=0,s=0,a=t.length,c=r.last(o);return r.forEach(o,(function(t,u){var d=function(e,t){if(e.node(t).dummy)return r.find(e.predecessors(t),(function(t){return e.node(t).dummy}))}(e,t),h=d?e.node(d).order:a;(d||t===c)&&(r.forEach(o.slice(s,u+1),(function(t){r.forEach(e.predecessors(t),(function(r){var o=e.node(r),s=o.order;!(sa)&&l(n,t,c)}))}))}return r.reduce(t,(function(t,n){var i,s=-1,a=0;return r.forEach(n,(function(r,l){if("border"===e.node(r).dummy){var c=e.predecessors(r);c.length&&(i=e.node(c[0]).order,o(n,a,l,s,i),a=l,s=i)}o(n,a,n.length,i,t.length)})),n})),n}function l(e,t,n){if(t>n){var r=t;t=n,n=r}var o=e[t];o||(e[t]=o={}),o[n]=!0}function c(e,t,n){if(t>n){var o=t;t=n,n=o}return r.has(e[t],n)}function u(e,t,n,o){var i={},s={},a={};return r.forEach(t,(function(e){r.forEach(e,(function(e,t){i[e]=e,s[e]=e,a[e]=t}))})),r.forEach(t,(function(e){var t=-1;r.forEach(e,(function(e){var l=o(e);if(l.length){l=r.sortBy(l,(function(e){return a[e]}));for(var u=(l.length-1)/2,d=Math.floor(u),h=Math.ceil(u);d<=h;++d){var p=l[d];s[e]===e&&t{"use strict";var r=n(21387),o=n(91790),i=n(68055).positionX;e.exports=function(e){(function(e){var t=o.buildLayerMatrix(e),n=e.graph().ranksep,i=0;r.forEach(t,(function(t){var o=r.max(r.map(t,(function(t){return e.node(t).height})));r.forEach(t,(function(t){e.node(t).y=i+o/2})),i+=o+n}))})(e=o.asNonCompoundGraph(e)),r.forEach(i(e),(function(t,n){e.node(n).x=t}))}},30259:(e,t,n)=>{"use strict";var r=n(21387),o=n(98005).Graph,i=n(89671).slack;function s(e,t){return r.forEach(e.nodes(),(function n(o){r.forEach(t.nodeEdges(o),(function(r){var s=r.v,a=o===s?r.w:s;e.hasNode(a)||i(t,r)||(e.setNode(a,{}),e.setEdge(o,a,{}),n(a))}))})),e.nodeCount()}function a(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function l(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new o({directed:!1}),c=e.nodes()[0],u=e.nodeCount();r.setNode(c,{});for(;s(r,e){"use strict";var r=n(89671).longestPath,o=n(30259),i=n(28670);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":default:a(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":s(e)}};var s=r;function a(e){i(e)}},28670:(e,t,n)=>{"use strict";var r=n(21387),o=n(30259),i=n(89671).slack,s=n(89671).longestPath,a=n(98005).alg.preorder,l=n(98005).alg.postorder,c=n(91790).simplify;function u(e){e=c(e),s(e);var t,n=o(e);for(p(n),d(n,e);t=m(n);)v(n,e,t,g(n,e,t))}function d(e,t){var n=l(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n),o=r.parent;e.edge(n,o).cutvalue=h(e,t,n)}(e,t,n)}))}function h(e,t,n){var o=e.node(n).parent,i=!0,s=t.edge(n,o),a=0;return s||(i=!1,s=t.edge(o,n)),a=s.weight,r.forEach(t.nodeEdges(n),(function(r){var s,l,c=r.v===n,u=c?r.w:r.v;if(u!==o){var d=c===i,h=t.edge(r).weight;if(a+=d?h:-h,s=n,l=u,e.hasEdge(s,l)){var p=e.edge(n,u).cutvalue;a+=d?-p:p}}})),a}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),f(e,{},1,t)}function f(e,t,n,o,i){var s=n,a=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=f(e,t,n,i,o))})),a.low=s,a.lim=n++,i?a.parent=i:delete a.parent,n}function m(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var o=n.v,s=n.w;t.hasEdge(o,s)||(o=n.w,s=n.v);var a=e.node(o),l=e.node(s),c=a,u=!1;a.lim>l.lim&&(c=l,u=!0);var d=r.filter(t.edges(),(function(t){return u===y(e,e.node(t.v),c)&&u!==y(e,e.node(t.w),c)}));return r.minBy(d,(function(e){return i(t,e)}))}function v(e,t,n,o){var i=n.v,s=n.w;e.removeEdge(i,s),e.setEdge(o.v,o.w,{}),p(e),d(e,t),function(e,t){var n=r.find(e.nodes(),(function(e){return!t.node(e).parent})),o=a(e,n);o=o.slice(1),r.forEach(o,(function(n){var r=e.node(n).parent,o=t.edge(n,r),i=!1;o||(o=t.edge(r,n),i=!0),t.node(n).rank=t.node(r).rank+(i?o.minlen:-o.minlen)}))}(e,t)}function y(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}e.exports=u,u.initLowLimValues=p,u.initCutValues=d,u.calcCutValue=h,u.leaveEdge=m,u.enterEdge=g,u.exchangeEdges=v},89671:(e,t,n)=>{"use strict";var r=n(21387);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(function n(o){var i=e.node(o);if(r.has(t,o))return i.rank;t[o]=!0;var s=r.min(r.map(e.outEdges(o),(function(t){return n(t.w)-e.edge(t).minlen})));return s!==Number.POSITIVE_INFINITY&&void 0!==s&&null!==s||(s=0),i.rank=s}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},91790:(e,t,n)=>{"use strict";var r=n(21387),o=n(98005).Graph;function i(e,t,n,o){var i;do{i=r.uniqueId(o)}while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function s(e){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:i,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})})),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),(function(n){e.children(n).length||t.setNode(n,e.node(n))})),r.forEach(e.edges(),(function(n){t.setEdge(n,e.edge(n))})),t},successorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.outEdges(t),(function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),(function(t){var n={};return r.forEach(e.inEdges(t),(function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight})),n}));return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,s=t.x-o,a=t.y-i,l=e.width/2,c=e.height/2;if(!s&&!a)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(a)*l>Math.abs(s)*c?(a<0&&(c=-c),n=c*s/a,r=c):(s<0&&(l=-l),n=l,r=l*a/s);return{x:o+n,y:i+r}},buildLayerMatrix:function(e){var t=r.map(r.range(s(e)+1),(function(){return[]}));return r.forEach(e.nodes(),(function(n){var o=e.node(n),i=o.rank;r.isUndefined(i)||(t[i][o.order]=n)})),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank})));r.forEach(e.nodes(),(function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)}))},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),(function(t){return e.node(t).rank}))),n=[];r.forEach(e.nodes(),(function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)}));var o=0,i=e.graph().nodeRankFactor;r.forEach(n,(function(t,n){r.isUndefined(t)&&n%i!==0?--o:o&&r.forEach(t,(function(t){e.node(t).rank+=o}))}))},addBorderNode:function(e,t,n,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=n,o.order=r);return i(e,"border",o,t)},maxRank:s,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,(function(e){t(e)?n.lhs.push(e):n.rhs.push(e)})),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},81696:e=>{e.exports="0.8.5"},59676:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentCount=void 0;var r=a(n(9950)),o=a(n(11942)),i=n(28463),s=n(90223);function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){return c=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CommentEmbed=void 0;var r=s(n(9950)),o=s(n(11942)),i=n(90223);function s(e){return e&&e.__esModule?e:{default:e}}function a(e){return a="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a(e)}function l(){return l=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function u(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DiscussionEmbed=void 0;var r=a(n(9950)),o=a(n(11942)),i=n(28463),s=n(90223);function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){return c=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Recommendations=void 0;var r=a(n(9950)),o=a(n(11942)),i=n(28463),s=n(90223);function a(e){return e&&e.__esModule?e:{default:e}}function l(e){return l="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function c(){return c=Object.assign||function(e){for(var t=1;t=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function d(e,t){for(var n=0;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CALLBACKS=t.RECOMMENDATIONS_SCRIPT_ID=t.RECOMMENDATIONS_ID=t.COMMENT_EMBED_HEIGHT=t.COMMENT_EMBED_WIDTH=t.COMMENT_COUNT_SCRIPT_ID=t.COMMENT_COUNT_CLASS=t.EMBED_SCRIPT_ID=t.THREAD_ID=void 0;t.THREAD_ID="disqus_thread";t.EMBED_SCRIPT_ID="dsq-embed-scr";t.COMMENT_COUNT_CLASS="disqus-comment-count";t.COMMENT_COUNT_SCRIPT_ID="dsq-count-scr";t.COMMENT_EMBED_WIDTH=420;t.COMMENT_EMBED_HEIGHT=320;t.RECOMMENDATIONS_ID="disqus_recommendations";t.RECOMMENDATIONS_SCRIPT_ID="dsq-recs-scr";t.CALLBACKS=["preData","preInit","onInit","onReady","afterRender","preReset","onIdentify","beforeComment","onNewComment","onPaginate"]},91742:(e,t,n)=>{"use strict";Object.defineProperty(t,"Xz",{enumerable:!0,get:function(){return r.CommentCount}}),t.Ay=void 0;var r=n(59676),o=n(20046),i=n(20187),s=n(39554),a={CommentCount:r.CommentCount,CommentEmbed:o.CommentEmbed,DiscussionEmbed:i.DiscussionEmbed,Recommendations:s.Recommendations};t.Ay=a},28463:(e,t,n)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.insertScript=function(e,t,n){var r=window.document.createElement("script");return r.async=!0,r.src=e,r.id=t,n.appendChild(r),r},t.removeScript=function(e,t){var n=window.document.getElementById(e);n&&t.removeChild(n)},t.removeResources=function(){window.document.querySelectorAll('link[href*="disquscdn.com/next/embed"], link[href*="disquscdn.com/next/recommendations"], link[href*="disqus.com/next/config.js"], script[src*="disquscdn.com/next/embed"], script[src*="disqus.com/count-data.js"], iframe[title="Disqus"]').forEach((function(e){return e.remove()}))},t.debounce=function(e,t,n){var r;return function(){var o=this,i=arguments,s=n&&!r;window.clearTimeout(r),r=setTimeout((function(){r=null,n||e.apply(o,i)}),t),s&&e.apply(o,i)}},t.isReactElement=a,t.shallowComparison=function e(t,n){var r,o=function(e){if("undefined"===typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return s(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,o,i=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,o=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw o}}}}(new Set(Object.keys(t),Object.keys(n)));try{for(o.s();!(r=o.n()).done;){var l=r.value;if("object"===i(t[l])){if(e(t[l],n[l]))return!0}else if(t[l]!==n[l]&&!a(t[l]))return!0}}catch(c){o.e(c)}finally{o.f()}return!1};var r,o=(r=n(9950))&&r.__esModule?r:{default:r};function i(e){return i="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n{var r;!function(){"use strict";var o=!("undefined"===typeof window||!window.document||!window.document.createElement),i={canUseDOM:o,canUseWorkers:"undefined"!==typeof Worker,canUseEventListeners:o&&!(!window.addEventListener&&!window.attachEvent),canUseViewport:o&&!!window.screen};void 0===(r=function(){return i}.call(t,n,t,e))||(e.exports=r)}()},57532:(e,t,n)=>{var r=n(1864);e.exports={Graph:r.Graph,json:n(21568),alg:n(35061),version:r.version}},70629:(e,t,n)=>{var r=n(54735);e.exports=function(e){var t,n={},o=[];function i(o){r.has(n,o)||(n[o]=!0,t.push(o),r.each(e.successors(o),i),r.each(e.predecessors(o),i))}return r.each(e.nodes(),(function(e){t=[],i(e),t.length&&o.push(t)})),o}},91138:(e,t,n)=>{var r=n(54735);function o(e,t,n,i,s,a){r.has(i,t)||(i[t]=!0,n||a.push(t),r.each(s(t),(function(t){o(e,t,n,i,s,a)})),n&&a.push(t))}e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var i=(e.isDirected()?e.successors:e.neighbors).bind(e),s=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);o(e,t,"post"===n,a,i,s)})),s}},46889:(e,t,n)=>{var r=n(9459),o=n(54735);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},9459:(e,t,n)=>{var r=n(54735),o=n(32671);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,s,a={},l=new o,c=function(e){var t=e.v!==i?e.v:e.w,r=a[t],o=n(e),c=s.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);c0&&(i=l.removeMin(),(s=a[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(c);return a}(e,String(t),n||i,r||function(t){return e.outEdges(t)})};var i=r.constant(1)},3936:(e,t,n)=>{var r=n(54735),o=n(88545);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||1===t.length&&e.hasEdge(t[0],t[0])}))}},9436:(e,t,n)=>{var r=n(54735);e.exports=function(e,t,n){return function(e,t,n){var r={},o=e.nodes();return o.forEach((function(e){r[e]={},r[e][e]={distance:0},o.forEach((function(t){e!==t&&(r[e][t]={distance:Number.POSITIVE_INFINITY})})),n(e).forEach((function(n){var o=n.v===e?n.w:n.v,i=t(n);r[e][o]={distance:i,predecessor:e}}))})),o.forEach((function(e){var t=r[e];o.forEach((function(n){var i=r[n];o.forEach((function(n){var r=i[e],o=t[n],s=i[n],a=r.distance+o.distance;a{e.exports={components:n(70629),dijkstra:n(9459),dijkstraAll:n(46889),findCycles:n(3936),floydWarshall:n(9436),isAcyclic:n(2668),postorder:n(45959),preorder:n(39858),prim:n(54421),tarjan:n(88545),topsort:n(21742)}},2668:(e,t,n)=>{var r=n(21742);e.exports=function(e){try{r(e)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},45959:(e,t,n)=>{var r=n(91138);e.exports=function(e,t){return r(e,t,"post")}},39858:(e,t,n)=>{var r=n(91138);e.exports=function(e,t){return r(e,t,"pre")}},54421:(e,t,n)=>{var r=n(54735),o=n(26220),i=n(32671);e.exports=function(e,t){var n,s=new o,a={},l=new i;function c(e){var r=e.v===n?e.w:e.v,o=l.priority(r);if(void 0!==o){var i=t(e);i0;){if(n=l.removeMin(),r.has(a,n))s.setEdge(n,a[n]);else{if(u)throw new Error("Input graph is not connected: "+e);u=!0}e.nodeEdges(n).forEach(c)}return s}},88545:(e,t,n)=>{var r=n(54735);e.exports=function(e){var t=0,n=[],o={},i=[];function s(a){var l=o[a]={onStack:!0,lowlink:t,index:t++};if(n.push(a),e.successors(a).forEach((function(e){r.has(o,e)?o[e].onStack&&(l.lowlink=Math.min(l.lowlink,o[e].index)):(s(e),l.lowlink=Math.min(l.lowlink,o[e].lowlink))})),l.lowlink===l.index){var c,u=[];do{c=n.pop(),o[c].onStack=!1,u.push(c)}while(a!==c);i.push(u)}}return e.nodes().forEach((function(e){r.has(o,e)||s(e)})),i}},21742:(e,t,n)=>{var r=n(54735);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function s(a){if(r.has(n,a))throw new i;r.has(t,a)||(n[a]=!0,t[a]=!0,r.each(e.predecessors(a),s),delete n[a],o.push(a))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},32671:(e,t,n)=>{var r=n(54735);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map((function(e){return e.key}))},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,i=o.length;return n[e]=i,o.push({key:e,priority:t}),this._decrease(i),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priority{"use strict";var r=n(54735);e.exports=a;var o="\0",i="\0",s="\x01";function a(e){this._isDirected=!r.has(e,"directed")||e.directed,this._isMultigraph=!!r.has(e,"multigraph")&&e.multigraph,this._isCompound=!!r.has(e,"compound")&&e.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[i]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function l(e,t){e[t]?e[t]++:e[t]=1}function c(e,t){--e[t]||delete e[t]}function u(e,t,n,i){var a=""+t,l=""+n;if(!e&&a>l){var c=a;a=l,l=c}return a+s+l+s+(r.isUndefined(i)?o:i)}function d(e,t){return u(e,t.v,t.w,t.name)}a.prototype._nodeCount=0,a.prototype._edgeCount=0,a.prototype.isDirected=function(){return this._isDirected},a.prototype.isMultigraph=function(){return this._isMultigraph},a.prototype.isCompound=function(){return this._isCompound},a.prototype.setGraph=function(e){return this._label=e,this},a.prototype.graph=function(){return this._label},a.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},a.prototype.nodeCount=function(){return this._nodeCount},a.prototype.nodes=function(){return r.keys(this._nodes)},a.prototype.sources=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._in[t])}))},a.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),(function(t){return r.isEmpty(e._out[t])}))},a.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,(function(e){n.length>1?o.setNode(e,t):o.setNode(e)})),this},a.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=i,this._children[e]={},this._children[i][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},a.prototype.node=function(e){return this._nodes[e]},a.prototype.hasNode=function(e){return r.has(this._nodes,e)},a.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),(function(e){t.setParent(e)})),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},a.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=i;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},a.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},a.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==i)return t}},a.prototype.children=function(e){if(r.isUndefined(e)&&(e=i),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===i)return this.nodes();if(this.hasNode(e))return[]}},a.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},a.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},a.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},a.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},a.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){e(r)&&t.setNode(r,n)})),r.each(this._edgeObjs,(function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))}));var o={};function i(e){var r=n.parent(e);return void 0===r||t.hasNode(r)?(o[e]=r,r):r in o?o[r]:i(r)}return this._isCompound&&r.each(t.nodes(),(function(e){t.setParent(e,i(e))})),t},a.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},a.prototype.edgeCount=function(){return this._edgeCount},a.prototype.edges=function(){return r.values(this._edgeObjs)},a.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,(function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r})),this},a.prototype.setEdge=function(){var e,t,n,o,i=!1,s=arguments[0];"object"===typeof s&&null!==s&&"v"in s?(e=s.v,t=s.w,n=s.name,2===arguments.length&&(o=arguments[1],i=!0)):(e=s,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],i=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var a=u(this._isDirected,e,t,n);if(r.has(this._edgeLabels,a))return i&&(this._edgeLabels[a]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[a]=i?o:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var o=""+t,i=""+n;if(!e&&o>i){var s=o;o=i,i=s}var a={v:o,w:i};r&&(a.name=r);return a}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[a]=c,l(this._preds[t],e),l(this._sucs[e],t),this._in[t][a]=c,this._out[e][a]=c,this._edgeCount++,this},a.prototype.edge=function(e,t,n){var r=1===arguments.length?d(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},a.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?d(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},a.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?d(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},a.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.v===t})):o}},a.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,(function(e){return e.w===t})):o}},a.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},1864:(e,t,n)=>{e.exports={Graph:n(26220),version:n(83380)}},21568:(e,t,n)=>{var r=n(54735),o=n(26220);function i(e){return r.map(e.nodes(),(function(t){var n=e.node(t),o=e.parent(t),i={v:t};return r.isUndefined(n)||(i.value=n),r.isUndefined(o)||(i.parent=o),i}))}function s(e){return r.map(e.edges(),(function(t){var n=e.edge(t),o={v:t.v,w:t.w};return r.isUndefined(t.name)||(o.name=t.name),r.isUndefined(n)||(o.value=n),o}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:s(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(e){var t=new o(e.options).setGraph(e.value);return r.each(e.nodes,(function(e){t.setNode(e.v,e.value),e.parent&&t.setParent(e.v,e.parent)})),r.each(e.edges,(function(e){t.setEdge({v:e.v,w:e.w,name:e.name},e.value)})),t}}},54735:(e,t,n)=>{var r;try{r={clone:n(46467),constant:n(96800),each:n(28193),filter:n(13386),has:n(26094),isArray:n(12279),isEmpty:n(86791),isFunction:n(93008),isUndefined:n(97842),keys:n(65724),map:n(55876),reduce:n(39874),size:n(34273),transform:n(49010),union:n(92177),values:n(83134)}}catch(o){}r||(r=window._),e.exports=r},83380:e=>{e.exports="2.1.8"},38241:(e,t,n)=>{e.exports=n(2751)},2751:function(e,t,n){e=n.nmd(e),function(){var t,n,r,o,i,s,a,l,c,u,d,h,p,f,m;r=Math.floor,u=Math.min,n=function(e,t){return et?1:0},c=function(e,t,o,i,s){var a;if(null==o&&(o=0),null==s&&(s=n),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);on;0<=n?t++:t--)c.push(t);return c}.apply(this).reverse(),l=[],i=0,s=a.length;im;0<=m?++h:--h)g.push(i(e,r));return g},f=function(e,t,r,o){var i,s,a;for(null==o&&(o=n),i=e[r];r>t&&o(i,s=e[a=r-1>>1])<0;)e[r]=s,r=a;return e[r]=i},m=function(e,t,r){var o,i,s,a,l;for(null==r&&(r=n),i=e.length,l=t,s=e[t],o=2*t+1;o{"use strict";var r=n(50630),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},s={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},a={};function l(e){return r.isMemo(e)?s:a[e.$$typeof]||o}a[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},a[r.Memo]=s;var c=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,h=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,f=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(f){var o=p(n);o&&o!==f&&e(t,o,r)}var s=u(n);d&&(s=s.concat(d(n)));for(var a=l(t),m=l(n),g=0;g{"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,s=n?Symbol.for("react.strict_mode"):60108,a=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,c=n?Symbol.for("react.context"):60110,u=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,h=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,f=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,g=n?Symbol.for("react.lazy"):60116,v=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,w=n?Symbol.for("react.scope"):60119;function _(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case u:case d:case i:case a:case s:case p:return e;default:switch(e=e&&e.$$typeof){case c:case h:case g:case m:case l:return e;default:return t}}case o:return t}}}function x(e){return _(e)===d}t.AsyncMode=u,t.ConcurrentMode=d,t.ContextConsumer=c,t.ContextProvider=l,t.Element=r,t.ForwardRef=h,t.Fragment=i,t.Lazy=g,t.Memo=m,t.Portal=o,t.Profiler=a,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return x(e)||_(e)===u},t.isConcurrentMode=x,t.isContextConsumer=function(e){return _(e)===c},t.isContextProvider=function(e){return _(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return _(e)===h},t.isFragment=function(e){return _(e)===i},t.isLazy=function(e){return _(e)===g},t.isMemo=function(e){return _(e)===m},t.isPortal=function(e){return _(e)===o},t.isProfiler=function(e){return _(e)===a},t.isStrictMode=function(e){return _(e)===s},t.isSuspense=function(e){return _(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===a||e===s||e===p||e===f||"object"===typeof e&&null!==e&&(e.$$typeof===g||e.$$typeof===m||e.$$typeof===l||e.$$typeof===c||e.$$typeof===h||e.$$typeof===y||e.$$typeof===b||e.$$typeof===w||e.$$typeof===v)},t.typeOf=_},50630:(e,t,n)=>{"use strict";e.exports=n(72138)},22434:(e,t,n)=>{var r=n(20220)(n(14759),"DataView");e.exports=r},1111:(e,t,n)=>{var r=n(76958),o=n(41176),i=n(1787),s=n(70231),a=n(27455);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(5088),o=n(10150),i=n(7889),s=n(44349),a=n(33077);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(20220)(n(14759),"Map");e.exports=r},54467:(e,t,n)=>{var r=n(40738),o=n(70708),i=n(26823),s=n(20475),a=n(77859);function l(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t{var r=n(20220)(n(14759),"Promise");e.exports=r},57887:(e,t,n)=>{var r=n(20220)(n(14759),"Set");e.exports=r},36669:(e,t,n)=>{var r=n(54467),o=n(62274),i=n(69757);function s(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new r;++t{var r=n(85661),o=n(44710),i=n(78384),s=n(87379),a=n(80799),l=n(12791);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=o,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},4635:(e,t,n)=>{var r=n(14759).Symbol;e.exports=r},48246:(e,t,n)=>{var r=n(14759).Uint8Array;e.exports=r},94801:(e,t,n)=>{var r=n(20220)(n(14759),"WeakMap");e.exports=r},65507:e=>{e.exports=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}},48951:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=0,i=[];++n{var r=n(11049);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},23259:e=>{e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r{var r=n(44102),o=n(24578),i=n(12279),s=n(6794),a=n(97059),l=n(71641),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),u=!n&&o(e),d=!n&&!u&&s(e),h=!n&&!u&&!d&&l(e),p=n||u||d||h,f=p?r(e.length,String):[],m=f.length;for(var g in e)!t&&!c.call(e,g)||p&&("length"==g||d&&("offset"==g||"parent"==g)||h&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,m))||f.push(g);return f}},61570:e=>{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length,o=Array(r);++n{e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n{e.exports=function(e,t,n,r){var o=-1,i=null==e?0:e.length;for(r&&i&&(n=e[++o]);++o{e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n{var r=n(29343)("length");e.exports=r},51983:(e,t,n)=>{var r=n(10366),o=n(44206);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},77305:(e,t,n)=>{var r=n(10366),o=n(44206),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var s=e[t];i.call(e,t)&&o(s,n)&&(void 0!==n||t in e)||r(e,t,n)}},45099:(e,t,n)=>{var r=n(44206);e.exports=function(e,t){for(var n=e.length;n--;)if(r(e[n][0],t))return n;return-1}},40291:(e,t,n)=>{var r=n(83965),o=n(65724);e.exports=function(e,t){return e&&r(t,o(t),e)}},62064:(e,t,n)=>{var r=n(83965),o=n(31235);e.exports=function(e,t){return e&&r(t,o(t),e)}},10366:(e,t,n)=>{var r=n(88925);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},79645:(e,t,n)=>{var r=n(25535),o=n(48951),i=n(77305),s=n(40291),a=n(62064),l=n(8984),c=n(76321),u=n(21849),d=n(63586),h=n(93660),p=n(36387),f=n(25531),m=n(17203),g=n(10997),v=n(35539),y=n(12279),b=n(6794),w=n(97744),_=n(24567),x=n(5738),S=n(65724),A=n(31235),C="[object Arguments]",k="[object Function]",E="[object Object]",T={};T[C]=T["[object Array]"]=T["[object ArrayBuffer]"]=T["[object DataView]"]=T["[object Boolean]"]=T["[object Date]"]=T["[object Float32Array]"]=T["[object Float64Array]"]=T["[object Int8Array]"]=T["[object Int16Array]"]=T["[object Int32Array]"]=T["[object Map]"]=T["[object Number]"]=T[E]=T["[object RegExp]"]=T["[object Set]"]=T["[object String]"]=T["[object Symbol]"]=T["[object Uint8Array]"]=T["[object Uint8ClampedArray]"]=T["[object Uint16Array]"]=T["[object Uint32Array]"]=!0,T["[object Error]"]=T[k]=T["[object WeakMap]"]=!1,e.exports=function e(t,n,O,M,P,R){var N,I=1&n,L=2&n,D=4&n;if(O&&(N=P?O(t,M,P,R):O(t)),void 0!==N)return N;if(!_(t))return t;var j=y(t);if(j){if(N=m(t),!I)return c(t,N)}else{var F=f(t),B=F==k||"[object GeneratorFunction]"==F;if(b(t))return l(t,I);if(F==E||F==C||B&&!P){if(N=L||B?{}:v(t),!I)return L?d(t,a(N,t)):u(t,s(N,t))}else{if(!T[F])return P?t:{};N=g(t,F,I)}}R||(R=new r);var U=R.get(t);if(U)return U;R.set(t,N),x(t)?t.forEach((function(r){N.add(e(r,n,O,r,t,R))})):w(t)&&t.forEach((function(r,o){N.set(o,e(r,n,O,o,t,R))}));var z=j?void 0:(D?L?p:h:L?A:S)(t);return o(z||t,(function(r,o){z&&(r=t[o=r]),i(N,o,e(r,n,O,o,t,R))})),N}},48230:(e,t,n)=>{var r=n(24567),o=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(o)return o(t);e.prototype=t;var n=new e;return e.prototype=void 0,n}}();e.exports=i},51767:e=>{e.exports=function(e,t,n){if("function"!=typeof e)throw new TypeError("Expected a function");return setTimeout((function(){e.apply(void 0,n)}),t)}},20927:(e,t,n)=>{var r=n(70423),o=n(73267)(r);e.exports=o},57579:(e,t,n)=>{var r=n(20927);e.exports=function(e,t){var n=!0;return r(e,(function(e,r,o){return n=!!t(e,r,o)})),n}},62057:(e,t,n)=>{var r=n(50184);e.exports=function(e,t,n){for(var o=-1,i=e.length;++o{var r=n(20927);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},6993:e=>{e.exports=function(e,t,n,r){for(var o=e.length,i=n+(r?1:-1);r?i--:++i{var r=n(87518),o=n(97989);e.exports=function e(t,n,i,s,a){var l=-1,c=t.length;for(i||(i=o),a||(a=[]);++l0&&i(u)?n>1?e(u,n-1,i,s,a):r(a,u):s||(a[a.length]=u)}return a}},93031:(e,t,n)=>{var r=n(45211)();e.exports=r},70423:(e,t,n)=>{var r=n(93031),o=n(65724);e.exports=function(e,t){return e&&r(e,t,o)}},10052:(e,t,n)=>{var r=n(26463),o=n(92535);e.exports=function(e,t){for(var n=0,i=(t=r(t,e)).length;null!=e&&n{var r=n(87518),o=n(12279);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},22022:(e,t,n)=>{var r=n(4635),o=n(81581),i=n(65336),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?o(e):i(e)}},62033:e=>{e.exports=function(e,t){return e>t}},22320:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e,n){return null!=e&&t.call(e,n)}},14591:e=>{e.exports=function(e,t){return null!=e&&t in Object(e)}},11049:(e,t,n)=>{var r=n(6993),o=n(85381),i=n(97825);e.exports=function(e,t,n){return t===t?i(e,t,n):r(e,o,n)}},96255:(e,t,n)=>{var r=n(36669),o=n(83107),i=n(23259),s=n(61570),a=n(35639),l=n(63445),c=Math.min;e.exports=function(e,t,n){for(var u=n?i:o,d=e[0].length,h=e.length,p=h,f=Array(h),m=1/0,g=[];p--;){var v=e[p];p&&t&&(v=s(v,a(t))),m=c(v.length,m),f[p]=!n&&(t||d>=120&&v.length>=120)?new r(p&&v):void 0}v=e[0];var y=-1,b=f[0];e:for(;++y{var r=n(22022),o=n(39248);e.exports=function(e){return o(e)&&"[object Arguments]"==r(e)}},1404:(e,t,n)=>{var r=n(92130),o=n(39248);e.exports=function e(t,n,i,s,a){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!==t&&n!==n:r(t,n,i,s,e,a))}},92130:(e,t,n)=>{var r=n(25535),o=n(49757),i=n(21416),s=n(16195),a=n(25531),l=n(12279),c=n(6794),u=n(71641),d="[object Arguments]",h="[object Array]",p="[object Object]",f=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,m,g,v){var y=l(e),b=l(t),w=y?h:a(e),_=b?h:a(t),x=(w=w==d?p:w)==p,S=(_=_==d?p:_)==p,A=w==_;if(A&&c(e)){if(!c(t))return!1;y=!0,x=!1}if(A&&!x)return v||(v=new r),y||u(e)?o(e,t,n,m,g,v):i(e,t,w,n,m,g,v);if(!(1&n)){var C=x&&f.call(e,"__wrapped__"),k=S&&f.call(t,"__wrapped__");if(C||k){var E=C?e.value():e,T=k?t.value():t;return v||(v=new r),g(E,T,n,m,v)}}return!!A&&(v||(v=new r),s(e,t,n,m,g,v))}},3530:(e,t,n)=>{var r=n(25531),o=n(39248);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},24489:(e,t,n)=>{var r=n(25535),o=n(1404);e.exports=function(e,t,n,i){var s=n.length,a=s,l=!i;if(null==e)return!a;for(e=Object(e);s--;){var c=n[s];if(l&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s{e.exports=function(e){return e!==e}},57949:(e,t,n)=>{var r=n(93008),o=n(73306),i=n(24567),s=n(29131),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,u=l.toString,d=c.hasOwnProperty,h=RegExp("^"+u.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||o(e))&&(r(e)?h:a).test(s(e))}},63152:(e,t,n)=>{var r=n(25531),o=n(39248);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},38183:(e,t,n)=>{var r=n(22022),o=n(5776),i=n(39248),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&o(e.length)&&!!s[r(e)]}},15127:(e,t,n)=>{var r=n(79769),o=n(44104),i=n(69002),s=n(12279),a=n(78857);e.exports=function(e){return"function"==typeof e?e:null==e?i:"object"==typeof e?s(e)?o(e[0],e[1]):r(e):a(e)}},37462:(e,t,n)=>{var r=n(82161),o=n(25112),i=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))i.call(e,n)&&"constructor"!=n&&t.push(n);return t}},28833:(e,t,n)=>{var r=n(24567),o=n(82161),i=n(7175),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&n.push(a);return n}},17646:e=>{e.exports=function(e,t){return e{var r=n(20927),o=n(97840);e.exports=function(e,t){var n=-1,i=o(e)?Array(e.length):[];return r(e,(function(e,r,o){i[++n]=t(e,r,o)})),i}},79769:(e,t,n)=>{var r=n(24489),o=n(13334),i=n(14243);e.exports=function(e){var t=o(e);return 1==t.length&&t[0][2]?i(t[0][0],t[0][1]):function(n){return n===e||r(n,e,t)}}},44104:(e,t,n)=>{var r=n(1404),o=n(87946),i=n(15321),s=n(65916),a=n(29794),l=n(14243),c=n(92535);e.exports=function(e,t){return s(e)&&a(t)?l(c(e),t):function(n){var s=o(n,e);return void 0===s&&s===t?i(n,e):r(t,s,3)}}},47436:(e,t,n)=>{var r=n(25535),o=n(51983),i=n(93031),s=n(58994),a=n(24567),l=n(31235),c=n(69924);e.exports=function e(t,n,u,d,h){t!==n&&i(n,(function(i,l){if(h||(h=new r),a(i))s(t,n,l,u,e,d,h);else{var p=d?d(c(t,l),i,l+"",t,n,h):void 0;void 0===p&&(p=i),o(t,l,p)}}),l)}},58994:(e,t,n)=>{var r=n(51983),o=n(8984),i=n(58463),s=n(76321),a=n(35539),l=n(24578),c=n(12279),u=n(53815),d=n(6794),h=n(93008),p=n(24567),f=n(75461),m=n(71641),g=n(69924),v=n(28774);e.exports=function(e,t,n,y,b,w,_){var x=g(e,n),S=g(t,n),A=_.get(S);if(A)r(e,n,A);else{var C=w?w(x,S,n+"",e,t,_):void 0,k=void 0===C;if(k){var E=c(S),T=!E&&d(S),O=!E&&!T&&m(S);C=S,E||T||O?c(x)?C=x:u(x)?C=s(x):T?(k=!1,C=o(S,!0)):O?(k=!1,C=i(S,!0)):C=[]:f(S)||l(S)?(C=x,l(x)?C=v(x):p(x)&&!h(x)||(C=a(S))):k=!1}k&&(_.set(S,C),b(C,S,y,w,_),_.delete(S)),r(e,n,C)}}},28245:(e,t,n)=>{var r=n(61570),o=n(10052),i=n(15127),s=n(56602),a=n(67311),l=n(35639),c=n(68152),u=n(69002),d=n(12279);e.exports=function(e,t,n){t=t.length?r(t,(function(e){return d(e)?function(t){return o(t,1===e.length?e[0]:e)}:e})):[u];var h=-1;t=r(t,l(i));var p=s(e,(function(e,n,o){return{criteria:r(t,(function(t){return t(e)})),index:++h,value:e}}));return a(p,(function(e,t){return c(e,t,n)}))}},95271:(e,t,n)=>{var r=n(92038),o=n(15321);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},92038:(e,t,n)=>{var r=n(10052),o=n(76992),i=n(26463);e.exports=function(e,t,n){for(var s=-1,a=t.length,l={};++s{e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},84753:(e,t,n)=>{var r=n(10052);e.exports=function(e){return function(t){return r(t,e)}}},64181:e=>{var t=Math.ceil,n=Math.max;e.exports=function(e,r,o,i){for(var s=-1,a=n(t((r-e)/(o||1)),0),l=Array(a);a--;)l[i?a:++s]=e,e+=o;return l}},93572:e=>{e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},80516:(e,t,n)=>{var r=n(69002),o=n(24295),i=n(1043);e.exports=function(e,t){return i(o(e,t,r),e+"")}},76992:(e,t,n)=>{var r=n(77305),o=n(26463),i=n(97059),s=n(24567),a=n(92535);e.exports=function(e,t,n,l){if(!s(e))return e;for(var c=-1,u=(t=o(t,e)).length,d=u-1,h=e;null!=h&&++c{var r=n(96800),o=n(88925),i=n(69002),s=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=s},4978:e=>{e.exports=function(e,t,n){var r=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(n=n>o?o:n)<0&&(n+=o),o=t>n?0:n-t>>>0,t>>>=0;for(var i=Array(o);++r{var r=n(20927);e.exports=function(e,t){var n;return r(e,(function(e,r,o){return!(n=t(e,r,o))})),!!n}},67311:e=>{e.exports=function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}},44102:e=>{e.exports=function(e,t){for(var n=-1,r=Array(e);++n{var r=n(4635),o=n(61570),i=n(12279),s=n(50184),a=r?r.prototype:void 0,l=a?a.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(i(t))return o(t,e)+"";if(s(t))return l?l.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}},86914:(e,t,n)=>{var r=n(88798),o=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(o,""):e}},35639:e=>{e.exports=function(e){return function(t){return e(t)}}},88183:(e,t,n)=>{var r=n(36669),o=n(83107),i=n(23259),s=n(63445),a=n(3739),l=n(26557);e.exports=function(e,t,n){var c=-1,u=o,d=e.length,h=!0,p=[],f=p;if(n)h=!1,u=i;else if(d>=200){var m=t?null:a(e);if(m)return l(m);h=!1,u=s,f=new r}else f=t?[]:p;e:for(;++c{var r=n(61570);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},34696:e=>{e.exports=function(e,t,n){for(var r=-1,o=e.length,i=t.length,s={};++r{e.exports=function(e,t){return e.has(t)}},77795:(e,t,n)=>{var r=n(53815);e.exports=function(e){return r(e)?e:[]}},39036:(e,t,n)=>{var r=n(69002);e.exports=function(e){return"function"==typeof e?e:r}},26463:(e,t,n)=>{var r=n(12279),o=n(65916),i=n(17044),s=n(54008);e.exports=function(e,t){return r(e)?e:o(e,t)?[e]:i(s(e))}},75871:(e,t,n)=>{var r=n(48246);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},8984:(e,t,n)=>{e=n.nmd(e);var r=n(14759),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=a?a(n):new e.constructor(n);return e.copy(r),r}},93863:(e,t,n)=>{var r=n(75871);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},91991:e=>{var t=/\w*$/;e.exports=function(e){var n=new e.constructor(e.source,t.exec(e));return n.lastIndex=e.lastIndex,n}},42106:(e,t,n)=>{var r=n(4635),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},58463:(e,t,n)=>{var r=n(75871);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},656:(e,t,n)=>{var r=n(50184);e.exports=function(e,t){if(e!==t){var n=void 0!==e,o=null===e,i=e===e,s=r(e),a=void 0!==t,l=null===t,c=t===t,u=r(t);if(!l&&!u&&!s&&e>t||s&&a&&c&&!l&&!u||o&&a&&c||!n&&c||!i)return 1;if(!o&&!s&&!u&&e{var r=n(656);e.exports=function(e,t,n){for(var o=-1,i=e.criteria,s=t.criteria,a=i.length,l=n.length;++o=l?c:c*("desc"==n[o]?-1:1)}return e.index-t.index}},76321:e=>{e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n{var r=n(77305),o=n(10366);e.exports=function(e,t,n,i){var s=!n;n||(n={});for(var a=-1,l=t.length;++a{var r=n(83965),o=n(98194);e.exports=function(e,t){return r(e,o(e),t)}},63586:(e,t,n)=>{var r=n(83965),o=n(9653);e.exports=function(e,t){return r(e,o(e),t)}},64123:(e,t,n)=>{var r=n(14759)["__core-js_shared__"];e.exports=r},64681:(e,t,n)=>{var r=n(80516),o=n(99042);e.exports=function(e){return r((function(t,n){var r=-1,i=n.length,s=i>1?n[i-1]:void 0,a=i>2?n[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,a&&o(n[0],n[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r{var r=n(97840);e.exports=function(e,t){return function(n,o){if(null==n)return n;if(!r(n))return e(n,o);for(var i=n.length,s=t?i:-1,a=Object(n);(t?s--:++s{e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++o];if(!1===n(i[l],l,i))break}return t}}},47372:(e,t,n)=>{var r=n(15127),o=n(97840),i=n(65724);e.exports=function(e){return function(t,n,s){var a=Object(t);if(!o(t)){var l=r(n,3);t=i(t),n=function(e){return l(a[e],e,a)}}var c=e(t,n,s);return c>-1?a[l?t[c]:c]:void 0}}},79954:(e,t,n)=>{var r=n(64181),o=n(99042),i=n(314);e.exports=function(e){return function(t,n,s){return s&&"number"!=typeof s&&o(t,n,s)&&(n=s=void 0),t=i(t),void 0===n?(n=t,t=0):n=i(n),s=void 0===s?t{var r=n(57887),o=n(19208),i=n(26557),s=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=s},88925:(e,t,n)=>{var r=n(20220),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(t){}}();e.exports=o},49757:(e,t,n)=>{var r=n(36669),o=n(56010),i=n(63445);e.exports=function(e,t,n,s,a,l){var c=1&n,u=e.length,d=t.length;if(u!=d&&!(c&&d>u))return!1;var h=l.get(e),p=l.get(t);if(h&&p)return h==t&&p==e;var f=-1,m=!0,g=2&n?new r:void 0;for(l.set(e,t),l.set(t,e);++f{var r=n(4635),o=n(48246),i=n(44206),s=n(49757),a=n(90943),l=n(26557),c=r?r.prototype:void 0,u=c?c.valueOf:void 0;e.exports=function(e,t,n,r,c,d,h){switch(n){case"[object DataView]":if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case"[object ArrayBuffer]":return!(e.byteLength!=t.byteLength||!d(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+e,+t);case"[object Error]":return e.name==t.name&&e.message==t.message;case"[object RegExp]":case"[object String]":return e==t+"";case"[object Map]":var p=a;case"[object Set]":var f=1&r;if(p||(p=l),e.size!=t.size&&!f)return!1;var m=h.get(e);if(m)return m==t;r|=2,h.set(e,t);var g=s(p(e),p(t),r,c,d,h);return h.delete(e),g;case"[object Symbol]":if(u)return u.call(e)==u.call(t)}return!1}},16195:(e,t,n)=>{var r=n(93660),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,s,a){var l=1&n,c=r(e),u=c.length;if(u!=r(t).length&&!l)return!1;for(var d=u;d--;){var h=c[d];if(!(l?h in t:o.call(t,h)))return!1}var p=a.get(e),f=a.get(t);if(p&&f)return p==t&&f==e;var m=!0;a.set(e,t),a.set(t,e);for(var g=l;++d{var r=n(32964),o=n(24295),i=n(1043);e.exports=function(e){return i(o(e,void 0,r),e+"")}},16658:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},93660:(e,t,n)=>{var r=n(54761),o=n(98194),i=n(65724);e.exports=function(e){return r(e,i,o)}},36387:(e,t,n)=>{var r=n(54761),o=n(9653),i=n(31235);e.exports=function(e){return r(e,i,o)}},77101:(e,t,n)=>{var r=n(94672);e.exports=function(e,t){var n=e.__data__;return r(t)?n["string"==typeof t?"string":"hash"]:n.map}},13334:(e,t,n)=>{var r=n(29794),o=n(65724);e.exports=function(e){for(var t=o(e),n=t.length;n--;){var i=t[n],s=e[i];t[n]=[i,s,r(s)]}return t}},20220:(e,t,n)=>{var r=n(57949),o=n(98166);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},42253:(e,t,n)=>{var r=n(62621)(Object.getPrototypeOf,Object);e.exports=r},81581:(e,t,n)=>{var r=n(4635),o=Object.prototype,i=o.hasOwnProperty,s=o.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(l){}var o=s.call(e);return r&&(t?e[a]=n:delete e[a]),o}},98194:(e,t,n)=>{var r=n(46860),o=n(71515),i=Object.prototype.propertyIsEnumerable,s=Object.getOwnPropertySymbols,a=s?function(e){return null==e?[]:(e=Object(e),r(s(e),(function(t){return i.call(e,t)})))}:o;e.exports=a},9653:(e,t,n)=>{var r=n(87518),o=n(42253),i=n(98194),s=n(71515),a=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:s;e.exports=a},25531:(e,t,n)=>{var r=n(22434),o=n(81465),i=n(30202),s=n(57887),a=n(94801),l=n(22022),c=n(29131),u="[object Map]",d="[object Promise]",h="[object Set]",p="[object WeakMap]",f="[object DataView]",m=c(r),g=c(o),v=c(i),y=c(s),b=c(a),w=l;(r&&w(new r(new ArrayBuffer(1)))!=f||o&&w(new o)!=u||i&&w(i.resolve())!=d||s&&w(new s)!=h||a&&w(new a)!=p)&&(w=function(e){var t=l(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case m:return f;case g:return u;case v:return d;case y:return h;case b:return p}return t}),e.exports=w},98166:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},10964:(e,t,n)=>{var r=n(26463),o=n(24578),i=n(12279),s=n(97059),a=n(5776),l=n(92535);e.exports=function(e,t,n){for(var c=-1,u=(t=r(t,e)).length,d=!1;++c{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},76958:(e,t,n)=>{var r=n(73616);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},41176:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},1787:(e,t,n)=>{var r=n(73616),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return o.call(t,e)?t[e]:void 0}},70231:(e,t,n)=>{var r=n(73616),o=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:o.call(t,e)}},27455:(e,t,n)=>{var r=n(73616);e.exports=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},17203:e=>{var t=Object.prototype.hasOwnProperty;e.exports=function(e){var n=e.length,r=new e.constructor(n);return n&&"string"==typeof e[0]&&t.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},10997:(e,t,n)=>{var r=n(75871),o=n(93863),i=n(91991),s=n(42106),a=n(58463);e.exports=function(e,t,n){var l=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new l(+e);case"[object DataView]":return o(e,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return a(e,n);case"[object Map]":case"[object Set]":return new l;case"[object Number]":case"[object String]":return new l(e);case"[object RegExp]":return i(e);case"[object Symbol]":return s(e)}}},35539:(e,t,n)=>{var r=n(48230),o=n(42253),i=n(82161);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},97989:(e,t,n)=>{var r=n(4635),o=n(24578),i=n(12279),s=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(s&&e&&e[s])}},97059:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,n){var r=typeof e;return!!(n=null==n?9007199254740991:n)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e{var r=n(44206),o=n(97840),i=n(97059),s=n(24567);e.exports=function(e,t,n){if(!s(n))return!1;var a=typeof t;return!!("number"==a?o(n)&&i(t,n.length):"string"==a&&t in n)&&r(n[t],e)}},65916:(e,t,n)=>{var r=n(12279),o=n(50184),i=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,s=/^\w*$/;e.exports=function(e,t){if(r(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!o(e))||(s.test(e)||!i.test(e)||null!=t&&e in Object(t))}},94672:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},73306:(e,t,n)=>{var r=n(64123),o=function(){var e=/[^.]+$/.exec(r&&r.keys&&r.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();e.exports=function(e){return!!o&&o in e}},82161:e=>{var t=Object.prototype;e.exports=function(e){var n=e&&e.constructor;return e===("function"==typeof n&&n.prototype||t)}},29794:(e,t,n)=>{var r=n(24567);e.exports=function(e){return e===e&&!r(e)}},5088:e=>{e.exports=function(){this.__data__=[],this.size=0}},10150:(e,t,n)=>{var r=n(45099),o=Array.prototype.splice;e.exports=function(e){var t=this.__data__,n=r(t,e);return!(n<0)&&(n==t.length-1?t.pop():o.call(t,n,1),--this.size,!0)}},7889:(e,t,n)=>{var r=n(45099);e.exports=function(e){var t=this.__data__,n=r(t,e);return n<0?void 0:t[n][1]}},44349:(e,t,n)=>{var r=n(45099);e.exports=function(e){return r(this.__data__,e)>-1}},33077:(e,t,n)=>{var r=n(45099);e.exports=function(e,t){var n=this.__data__,o=r(n,e);return o<0?(++this.size,n.push([e,t])):n[o][1]=t,this}},40738:(e,t,n)=>{var r=n(1111),o=n(85661),i=n(81465);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||o),string:new r}}},70708:(e,t,n)=>{var r=n(77101);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},26823:(e,t,n)=>{var r=n(77101);e.exports=function(e){return r(this,e).get(e)}},20475:(e,t,n)=>{var r=n(77101);e.exports=function(e){return r(this,e).has(e)}},77859:(e,t,n)=>{var r=n(77101);e.exports=function(e,t){var n=r(this,e),o=n.size;return n.set(e,t),this.size+=n.size==o?0:1,this}},90943:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},14243:e=>{e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},23734:(e,t,n)=>{var r=n(42434);e.exports=function(e){var t=r(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}},73616:(e,t,n)=>{var r=n(20220)(Object,"create");e.exports=r},25112:(e,t,n)=>{var r=n(62621)(Object.keys,Object);e.exports=r},7175:e=>{e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},82479:(e,t,n)=>{e=n.nmd(e);var r=n(16658),o=t&&!t.nodeType&&t,i=o&&e&&!e.nodeType&&e,s=i&&i.exports===o&&r.process,a=function(){try{var e=i&&i.require&&i.require("util").types;return e||s&&s.binding&&s.binding("util")}catch(t){}}();e.exports=a},65336:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},62621:e=>{e.exports=function(e,t){return function(n){return e(t(n))}}},24295:(e,t,n)=>{var r=n(65507),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=o(i.length-t,0),l=Array(a);++s{var r=n(16658),o="object"==typeof self&&self&&self.Object===Object&&self,i=r||o||Function("return this")();e.exports=i},69924:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!==typeof e[t])&&"__proto__"!=t)return e[t]}},62274:e=>{e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},69757:e=>{e.exports=function(e){return this.__data__.has(e)}},26557:e=>{e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},1043:(e,t,n)=>{var r=n(65148),o=n(42929)(r);e.exports=o},42929:e=>{var t=Date.now;e.exports=function(e){var n=0,r=0;return function(){var o=t(),i=16-(o-r);if(r=o,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}},44710:(e,t,n)=>{var r=n(85661);e.exports=function(){this.__data__=new r,this.size=0}},78384:e=>{e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},87379:e=>{e.exports=function(e){return this.__data__.get(e)}},80799:e=>{e.exports=function(e){return this.__data__.has(e)}},12791:(e,t,n)=>{var r=n(85661),o=n(81465),i=n(54467);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var s=n.__data__;if(!o||s.length<199)return s.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(s)}return n.set(e,t),this.size=n.size,this}},97825:e=>{e.exports=function(e,t,n){for(var r=n-1,o=e.length;++r{var r=n(77765),o=n(21536),i=n(1093);e.exports=function(e){return o(e)?i(e):r(e)}},17044:(e,t,n)=>{var r=n(23734),o=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,i=/\\(\\)?/g,s=r((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(o,(function(e,n,r,o){t.push(r?o.replace(i,"$1"):n||e)})),t}));e.exports=s},92535:(e,t,n)=>{var r=n(50184);e.exports=function(e){if("string"==typeof e||r(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},29131:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(n){}try{return e+""}catch(n){}}return""}},88798:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},1093:e=>{var t="\\ud800-\\udfff",n="["+t+"]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",s="(?:\\ud83c[\\udde6-\\uddff]){2}",a="[\\ud800-\\udbff][\\udc00-\\udfff]",l="(?:"+r+"|"+o+")"+"?",c="[\\ufe0e\\ufe0f]?",u=c+l+("(?:\\u200d(?:"+[i,s,a].join("|")+")"+c+l+")*"),d="(?:"+[i+r+"?",r,s,a,n].join("|")+")",h=RegExp(o+"(?="+o+")|"+d+u,"g");e.exports=function(e){for(var t=h.lastIndex=0;h.test(e);)++t;return t}},46467:(e,t,n)=>{var r=n(79645);e.exports=function(e){return r(e,4)}},55117:(e,t,n)=>{var r=n(79645);e.exports=function(e){return r(e,5)}},27532:(e,t,n)=>{var r=n(87518),o=n(26810),i=n(76321),s=n(12279);e.exports=function(){var e=arguments.length;if(!e)return[];for(var t=Array(e-1),n=arguments[0],a=e;a--;)t[a-1]=arguments[a];return r(s(n)?i(n):[n],o(t,1))}},96800:e=>{e.exports=function(e){return function(){return e}}},95491:(e,t,n)=>{var r=n(24567),o=n(34378),i=n(72588),s=Math.max,a=Math.min;e.exports=function(e,t,n){var l,c,u,d,h,p,f=0,m=!1,g=!1,v=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function y(t){var n=l,r=c;return l=c=void 0,f=t,d=e.apply(r,n)}function b(e){var n=e-p;return void 0===p||n>=t||n<0||g&&e-f>=u}function w(){var e=o();if(b(e))return _(e);h=setTimeout(w,function(e){var n=t-(e-p);return g?a(n,u-(e-f)):n}(e))}function _(e){return h=void 0,v&&l?y(e):(l=c=void 0,d)}function x(){var e=o(),n=b(e);if(l=arguments,c=this,p=e,n){if(void 0===h)return function(e){return f=e,h=setTimeout(w,t),m?y(e):d}(p);if(g)return clearTimeout(h),h=setTimeout(w,t),y(p)}return void 0===h&&(h=setTimeout(w,t)),d}return t=i(t)||0,r(n)&&(m=!!n.leading,u=(g="maxWait"in n)?s(i(n.maxWait)||0,t):u,v="trailing"in n?!!n.trailing:v),x.cancel=function(){void 0!==h&&clearTimeout(h),f=0,l=p=c=h=void 0},x.flush=function(){return void 0===h?d:_(o())},x}},70210:(e,t,n)=>{var r=n(80516),o=n(44206),i=n(99042),s=n(31235),a=Object.prototype,l=a.hasOwnProperty,c=r((function(e,t){e=Object(e);var n=-1,r=t.length,c=r>2?t[2]:void 0;for(c&&i(t[0],t[1],c)&&(r=1);++n{var r=n(51767),o=n(80516)((function(e,t){return r(e,1,t)}));e.exports=o},28193:(e,t,n)=>{e.exports=n(26380)},44206:e=>{e.exports=function(e,t){return e===t||e!==e&&t!==t}},38829:(e,t,n)=>{var r=n(26675),o=n(57579),i=n(15127),s=n(12279),a=n(99042);e.exports=function(e,t,n){var l=s(e)?r:o;return n&&a(e,t,n)&&(t=void 0),l(e,i(t,3))}},13386:(e,t,n)=>{var r=n(46860),o=n(40900),i=n(15127),s=n(12279);e.exports=function(e,t){return(s(e)?r:o)(e,i(t,3))}},75915:(e,t,n)=>{var r=n(47372)(n(5695));e.exports=r},5695:(e,t,n)=>{var r=n(6993),o=n(15127),i=n(25171),s=Math.max;e.exports=function(e,t,n){var a=null==e?0:e.length;if(!a)return-1;var l=null==n?0:i(n);return l<0&&(l=s(a+l,0)),r(e,o(t,3),l)}},12976:(e,t,n)=>{e.exports=n(60814)},79113:(e,t,n)=>{var r=n(26810),o=n(55876);e.exports=function(e,t){return r(o(e,t),1)}},32964:(e,t,n)=>{var r=n(26810);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},26380:(e,t,n)=>{var r=n(48951),o=n(20927),i=n(39036),s=n(12279);e.exports=function(e,t){return(s(e)?r:o)(e,i(t))}},20286:(e,t,n)=>{var r=n(93031),o=n(39036),i=n(31235);e.exports=function(e,t){return null==e?e:r(e,o(t),i)}},87946:(e,t,n)=>{var r=n(10052);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},26094:(e,t,n)=>{var r=n(22320),o=n(10964);e.exports=function(e,t){return null!=e&&o(e,t,r)}},15321:(e,t,n)=>{var r=n(14591),o=n(10964);e.exports=function(e,t){return null!=e&&o(e,t,r)}},60814:e=>{e.exports=function(e){return e&&e.length?e[0]:void 0}},69002:e=>{e.exports=function(e){return e}},92437:(e,t,n)=>{var r=n(61570),o=n(96255),i=n(80516),s=n(77795),a=i((function(e){var t=r(e,s);return t.length&&t[0]===e[0]?o(t):[]}));e.exports=a},24578:(e,t,n)=>{var r=n(73012),o=n(39248),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return o(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},12279:e=>{var t=Array.isArray;e.exports=t},97840:(e,t,n)=>{var r=n(93008),o=n(5776);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},53815:(e,t,n)=>{var r=n(97840),o=n(39248);e.exports=function(e){return o(e)&&r(e)}},6794:(e,t,n)=>{e=n.nmd(e);var r=n(14759),o=n(63721),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||o;e.exports=l},86791:(e,t,n)=>{var r=n(37462),o=n(25531),i=n(24578),s=n(12279),a=n(97840),l=n(6794),c=n(82161),u=n(71641),d=Object.prototype.hasOwnProperty;e.exports=function(e){if(null==e)return!0;if(a(e)&&(s(e)||"string"==typeof e||"function"==typeof e.splice||l(e)||u(e)||i(e)))return!e.length;var t=o(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(c(e))return!r(e).length;for(var n in e)if(d.call(e,n))return!1;return!0}},59418:(e,t,n)=>{var r=n(1404);e.exports=function(e,t){return r(e,t)}},22419:(e,t,n)=>{var r=n(14759).isFinite;e.exports=function(e){return"number"==typeof e&&r(e)}},93008:(e,t,n)=>{var r=n(22022),o=n(24567);e.exports=function(e){if(!o(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},5776:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},97744:(e,t,n)=>{var r=n(3530),o=n(35639),i=n(82479),s=i&&i.isMap,a=s?o(s):r;e.exports=a},24567:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},39248:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},75461:(e,t,n)=>{var r=n(22022),o=n(42253),i=n(39248),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,u=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=o(e);if(null===t)return!0;var n=c.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&l.call(n)==u}},5738:(e,t,n)=>{var r=n(63152),o=n(35639),i=n(82479),s=i&&i.isSet,a=s?o(s):r;e.exports=a},56801:(e,t,n)=>{var r=n(22022),o=n(12279),i=n(39248);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},50184:(e,t,n)=>{var r=n(22022),o=n(39248);e.exports=function(e){return"symbol"==typeof e||o(e)&&"[object Symbol]"==r(e)}},71641:(e,t,n)=>{var r=n(38183),o=n(35639),i=n(82479),s=i&&i.isTypedArray,a=s?o(s):r;e.exports=a},97842:e=>{e.exports=function(e){return void 0===e}},65724:(e,t,n)=>{var r=n(37405),o=n(37462),i=n(97840);e.exports=function(e){return i(e)?r(e):o(e)}},31235:(e,t,n)=>{var r=n(37405),o=n(28833),i=n(97840);e.exports=function(e){return i(e)?r(e,!0):o(e)}},47988:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},55876:(e,t,n)=>{var r=n(61570),o=n(15127),i=n(56602),s=n(12279);e.exports=function(e,t){return(s(e)?r:i)(e,o(t,3))}},6638:(e,t,n)=>{var r=n(10366),o=n(70423),i=n(15127);e.exports=function(e,t){var n={};return t=i(t,3),o(e,(function(e,o,i){r(n,o,t(e,o,i))})),n}},62780:(e,t,n)=>{var r=n(62057),o=n(62033),i=n(69002);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},21885:(e,t,n)=>{var r=n(62057),o=n(62033),i=n(15127);e.exports=function(e,t){return e&&e.length?r(e,i(t,2),o):void 0}},42434:(e,t,n)=>{var r=n(54467);function o(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=t?t.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var s=e.apply(this,r);return n.cache=i.set(o,s)||i,s};return n.cache=new(o.Cache||r),n}o.Cache=r,e.exports=o},23334:(e,t,n)=>{var r=n(47436),o=n(64681)((function(e,t,n){r(e,t,n)}));e.exports=o},47282:(e,t,n)=>{var r=n(62057),o=n(17646),i=n(69002);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},68583:(e,t,n)=>{var r=n(62057),o=n(15127),i=n(17646);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},19208:e=>{e.exports=function(){}},34378:(e,t,n)=>{var r=n(14759);e.exports=function(){return r.Date.now()}},75357:(e,t,n)=>{var r=n(95271),o=n(65002)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},78857:(e,t,n)=>{var r=n(29343),o=n(84753),i=n(65916),s=n(92535);e.exports=function(e){return i(e)?r(s(e)):o(e)}},39939:(e,t,n)=>{var r=n(79954)();e.exports=r},39874:(e,t,n)=>{var r=n(61516),o=n(20927),i=n(15127),s=n(93572),a=n(12279);e.exports=function(e,t,n){var l=a(e)?r:s,c=arguments.length<3;return l(e,i(t,4),n,c,o)}},34273:(e,t,n)=>{var r=n(37462),o=n(25531),i=n(97840),s=n(56801),a=n(61615);e.exports=function(e){if(null==e)return 0;if(i(e))return s(e)?a(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},60316:(e,t,n)=>{var r=n(4978),o=n(99042),i=n(25171);e.exports=function(e,t,n){var s=null==e?0:e.length;return s?(n&&"number"!=typeof n&&o(e,t,n)?(t=0,n=s):(t=null==t?0:i(t),n=void 0===n?s:i(n)),r(e,t,n)):[]}},11032:(e,t,n)=>{var r=n(56010),o=n(15127),i=n(88258),s=n(12279),a=n(99042);e.exports=function(e,t,n){var l=s(e)?r:i;return n&&a(e,t,n)&&(t=void 0),l(e,o(t,3))}},21261:(e,t,n)=>{var r=n(26810),o=n(28245),i=n(80516),s=n(99042),a=i((function(e,t){if(null==e)return[];var n=t.length;return n>1&&s(e,t[0],t[1])?t=[]:n>2&&s(t[0],t[1],t[2])&&(t=[t[0]]),o(e,r(t,1),[])}));e.exports=a},71515:e=>{e.exports=function(){return[]}},63721:e=>{e.exports=function(){return!1}},314:(e,t,n)=>{var r=n(72588),o=1/0;e.exports=function(e){return e?(e=r(e))===o||e===-1/0?17976931348623157e292*(e<0?-1:1):e===e?e:0:0===e?e:0}},25171:(e,t,n)=>{var r=n(314);e.exports=function(e){var t=r(e),n=t%1;return t===t?n?t-n:t:0}},72588:(e,t,n)=>{var r=n(86914),o=n(24567),i=n(50184),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,l=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(i(e))return NaN;if(o(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=o(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||l.test(e)?c(e.slice(2),n?2:8):s.test(e)?NaN:+e}},28774:(e,t,n)=>{var r=n(83965),o=n(31235);e.exports=function(e){return r(e,o(e))}},54008:(e,t,n)=>{var r=n(91582);e.exports=function(e){return null==e?"":r(e)}},49010:(e,t,n)=>{var r=n(48951),o=n(48230),i=n(70423),s=n(15127),a=n(42253),l=n(12279),c=n(6794),u=n(93008),d=n(24567),h=n(71641);e.exports=function(e,t,n){var p=l(e),f=p||c(e)||h(e);if(t=s(t,4),null==n){var m=e&&e.constructor;n=f?p?new m:[]:d(e)&&u(m)?o(a(e)):{}}return(f?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},92177:(e,t,n)=>{var r=n(26810),o=n(80516),i=n(88183),s=n(53815),a=o((function(e){return i(r(e,1,s,!0))}));e.exports=a},2810:(e,t,n)=>{var r=n(54008),o=0;e.exports=function(e){var t=++o;return r(e)+t}},83134:(e,t,n)=>{var r=n(37696),o=n(65724);e.exports=function(e){return null==e?[]:r(e,o(e))}},45630:(e,t,n)=>{var r=n(77305),o=n(34696);e.exports=function(e,t){return o(e||[],t||[],r)}},80742:(e,t,n)=>{var r,o=function(){var e=String.fromCharCode,t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",r={};function o(e,t){if(!r[e]){r[e]={};for(var n=0;n>>8,n[2*r+1]=s%256}return n},decompressFromUint8Array:function(t){if(null===t||void 0===t)return i.decompress(t);for(var n=new Array(t.length/2),r=0,o=n.length;r>=1}else{for(o=1,r=0;r>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[u]}else for(o=s[u],r=0;r>=1;0==--d&&(d=Math.pow(2,p),p++),s[c]=h++,u=String(l)}if(""!==u){if(Object.prototype.hasOwnProperty.call(a,u)){if(u.charCodeAt(0)<256){for(r=0;r>=1}else{for(o=1,r=0;r>=1}0==--d&&(d=Math.pow(2,p),p++),delete a[u]}else for(o=s[u],r=0;r>=1;0==--d&&(d=Math.pow(2,p),p++)}for(o=2,r=0;r>=1;for(;;){if(m<<=1,g==t-1){f.push(n(m));break}g++}return f.join("")},decompress:function(e){return null==e?"":""==e?null:i._decompress(e.length,32768,(function(t){return e.charCodeAt(t)}))},_decompress:function(t,n,r){var o,i,s,a,l,c,u,d=[],h=4,p=4,f=3,m="",g=[],v={val:r(0),position:n,index:1};for(o=0;o<3;o+=1)d[o]=o;for(s=0,l=Math.pow(2,2),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;switch(s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;u=e(s);break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;u=e(s);break;case 2:return""}for(d[3]=u,i=u,g.push(u);;){if(v.index>t)return"";for(s=0,l=Math.pow(2,f),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;switch(u=s){case 0:for(s=0,l=Math.pow(2,8),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;d[p++]=e(s),u=p-1,h--;break;case 1:for(s=0,l=Math.pow(2,16),c=1;c!=l;)a=v.val&v.position,v.position>>=1,0==v.position&&(v.position=n,v.val=r(v.index++)),s|=(a>0?1:0)*c,c<<=1;d[p++]=e(s),u=p-1,h--;break;case 2:return g.join("")}if(0==h&&(h=Math.pow(2,f),f++),d[u])m=d[u];else{if(u!==p)return null;m=i+i.charAt(0)}g.push(m),d[p++]=i+m.charAt(0),i=m,0==--h&&(h=Math.pow(2,f),f++)}}};return i}();void 0===(r=function(){return o}.call(t,n,t,e))||(e.exports=r)},21830:e=>{!function(){"use strict";const t={debug:!1,parse:function(e,n){if(e instanceof Uint8Array)return t.Uint8(e);if("string"===typeof e)return t.Base64(e);if(e instanceof HTMLElement&&"file"===e.type)return t.addListener(e,n);throw new Error("MidiParser.parse() : Invalid input provided")},addListener:function(e,n){if(!File||!FileReader)throw new Error("The File|FileReader APIs are not supported in this browser. Use instead MidiParser.Base64() or MidiParser.Uint8()");if(void 0===e||!(e instanceof HTMLElement)||"INPUT"!==e.tagName||"file"!==e.type.toLowerCase())return console.warn("MidiParser.addListener() : Provided element is not a valid FILE INPUT element"),!1;n=n||function(){},e.addEventListener("change",(function(e){if(!e.target.files.length)return!1;console.log("MidiParser.addListener() : File detected in INPUT ELEMENT processing data..");let r=new FileReader;r.readAsArrayBuffer(e.target.files[0]),r.onload=function(e){n(t.Uint8(new Uint8Array(e.target.result)))}}))},Base64:function(e){let n=function(e){let t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";if(e=e.replace(/^.*?base64,/,""),e=String(e).replace(/[\t\n\f\r ]+/g,""),!/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/.test(e))throw new TypeError("Failed to execute _atob() : The string to be decoded is not correctly encoded.");e+="==".slice(2-(3&e.length));let n,r,o,i="",s=0;for(;s>16&255):64===o?String.fromCharCode(n>>16&255,n>>8&255):String.fromCharCode(n>>16&255,n>>8&255,255&n);return i}(e=String(e)),r=n.length,o=new Uint8Array(new ArrayBuffer(r));for(let t=0;t1)for(let n=1;n<=e-1;n++)t+=this.data.getUint8(this.pointer)*Math.pow(256,e-n),this.pointer++;return t+=this.data.getUint8(this.pointer),this.pointer++,t},readStr:function(e){let t="";for(let n=1;n<=e;n++)t+=String.fromCharCode(this.readInt(1));return t},readIntVLV:function(){let e=0;if(this.pointer>=this.data.byteLength)return-1;if(this.data.getUint8(this.pointer)<128)e=this.readInt(1);else{let t=[];for(;this.data.getUint8(this.pointer)>=128;)t.push(this.readInt(1)-128);let n=this.readInt(1);for(let r=1;r<=t.length;r++)e+=t[t.length-r]*Math.pow(128,r);e+=n}return e}};if(t.data=new DataView(e.buffer,e.byteOffset,e.byteLength),1297377380!==t.readInt(4))return console.warn("Header validation failed (not MIDI standard or file corrupt.)"),!1;t.readInt(4);let n={};n.formatType=t.readInt(2),n.tracks=t.readInt(2),n.track=[];let r=t.readInt(1),o=t.readInt(1);r>=128?(n.timeDivision=[],n.timeDivision[0]=r-128,n.timeDivision[1]=o):n.timeDivision=256*r+o;for(let i=1;i<=n.tracks;i++){n.track[i-1]={event:[]};let e=t.readInt(4);if(-1===e)break;if(1297379947!==e)return!1;t.readInt(4);let r,o,s=0,a=!1;for(;!a&&(s++,n.track[i-1].event[s-1]={},n.track[i-1].event[s-1].deltaTime=t.readIntVLV(),r=t.readInt(1),-1!==r);)if(r>=128?o=r:(r=o,t.movePointer(-1)),255===r){n.track[i-1].event[s-1].type=255,n.track[i-1].event[s-1].metaType=t.readInt(1);let e=t.readIntVLV();switch(n.track[i-1].event[s-1].metaType){case 47:case-1:a=!0;break;case 1:case 2:case 3:case 4:case 5:case 7:case 6:n.track[i-1].event[s-1].data=t.readStr(e);break;case 33:case 89:case 81:n.track[i-1].event[s-1].data=t.readInt(e);break;case 84:n.track[i-1].event[s-1].data=[],n.track[i-1].event[s-1].data[0]=t.readInt(1),n.track[i-1].event[s-1].data[1]=t.readInt(1),n.track[i-1].event[s-1].data[2]=t.readInt(1),n.track[i-1].event[s-1].data[3]=t.readInt(1),n.track[i-1].event[s-1].data[4]=t.readInt(1);break;case 88:n.track[i-1].event[s-1].data=[],n.track[i-1].event[s-1].data[0]=t.readInt(1),n.track[i-1].event[s-1].data[1]=t.readInt(1),n.track[i-1].event[s-1].data[2]=t.readInt(1),n.track[i-1].event[s-1].data[3]=t.readInt(1);break;default:null!==this.customInterpreter&&(n.track[i-1].event[s-1].data=this.customInterpreter(n.track[i-1].event[s-1].metaType,t,e)),null!==this.customInterpreter&&!1!==n.track[i-1].event[s-1].data||(t.readInt(e),n.track[i-1].event[s-1].data=t.readInt(e),this.debug&&console.info("Unimplemented 0xFF meta event! data block readed as Integer"))}}else switch(r=r.toString(16).split(""),r[1]||r.unshift("0"),n.track[i-1].event[s-1].type=parseInt(r[0],16),n.track[i-1].event[s-1].channel=parseInt(r[1],16),n.track[i-1].event[s-1].type){case 15:if(null!==this.customInterpreter&&(n.track[i-1].event[s-1].data=this.customInterpreter(n.track[i-1].event[s-1].type,t,!1)),null===this.customInterpreter||!1===n.track[i-1].event[s-1].data){let e=t.readIntVLV();n.track[i-1].event[s-1].data=t.readInt(e),this.debug&&console.info("Unimplemented 0xF exclusive events! data block readed as Integer")}break;case 10:case 11:case 14:case 8:case 9:n.track[i-1].event[s-1].data=[],n.track[i-1].event[s-1].data[0]=t.readInt(1),n.track[i-1].event[s-1].data[1]=t.readInt(1);break;case 12:case 13:n.track[i-1].event[s-1].data=t.readInt(1);break;case-1:a=!0;break;default:if(null!==this.customInterpreter&&(n.track[i-1].event[s-1].data=this.customInterpreter(n.track[i-1].event[s-1].metaType,t,!1)),null===this.customInterpreter||!1===n.track[i-1].event[s-1].data)return console.log("Unknown EVENT detected... reading cancelled!"),!1}}return n},customInterpreter:null};e.exports=t}()},1621:(e,t,n)=>{e.exports=n(40072)},40072:(e,t,n)=>{e.exports={Heap:n(38241),Node:n(54404),Grid:n(25424),Util:n(70624),DiagonalMovement:n(2270),Heuristic:n(71334),AStarFinder:n(77549),BestFirstFinder:n(10506),BreadthFirstFinder:n(24824),DijkstraFinder:n(37794),BiAStarFinder:n(23706),BiBestFirstFinder:n(58697),BiBreadthFirstFinder:n(78609),BiDijkstraFinder:n(25099),IDAStarFinder:n(81106),JumpPointFinder:n(64304)}},2270:e=>{e.exports={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4}},25424:(e,t,n)=>{var r=n(54404),o=n(2270);function i(e,t,n){var r;"object"!==typeof e?r=e:(t=e.length,r=e[0].length,n=e),this.width=r,this.height=t,this.nodes=this._buildNodes(r,t,n)}i.prototype._buildNodes=function(e,t,n){var o,i,s=new Array(t);for(o=0;o=0&&e=0&&t{e.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},octile:function(e,t){var n=Math.SQRT2-1;return e{e.exports=function(e,t,n){this.x=e,this.y=t,this.walkable=void 0===n||n}},70624:(e,t)=>{function n(e){for(var t=[[e.x,e.y]];e.parent;)e=e.parent,t.push([e.x,e.y]);return t.reverse()}function r(e,t,n,r){var o,i,s,a,l,c,u=Math.abs,d=[];for(o=e-a&&(l-=a,e+=o),c{var r=n(38241),o=n(70624),i=n(71334),s=n(2270);function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.heuristic=e.heuristic||i.manhattan,this.weight=e.weight||1,this.diagonalMovement=e.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=s.OnlyWhenNoObstacles:this.diagonalMovement=s.IfAtMostOneObstacle:this.diagonalMovement=s.Never),this.diagonalMovement===s.Never?this.heuristic=e.heuristic||i.manhattan:this.heuristic=e.heuristic||i.octile}a.prototype.findPath=function(e,t,n,i,s){var a,l,c,u,d,h,p,f,m=new r((function(e,t){return e.f-t.f})),g=s.getNodeAt(e,t),v=s.getNodeAt(n,i),y=this.heuristic,b=this.diagonalMovement,w=this.weight,_=Math.abs,x=Math.SQRT2;for(g.g=0,g.f=0,m.push(g),g.opened=!0;!m.empty();){if((a=m.pop()).closed=!0,a===v)return o.backtrace(v);for(u=0,d=(l=s.getNeighbors(a,b)).length;u{var r=n(77549);function o(e){r.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return 1e6*t(e,n)}}o.prototype=new r,o.prototype.constructor=o,e.exports=o},23706:(e,t,n)=>{var r=n(38241),o=n(70624),i=n(71334),s=n(2270);function a(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.heuristic=e.heuristic||i.manhattan,this.weight=e.weight||1,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=s.OnlyWhenNoObstacles:this.diagonalMovement=s.IfAtMostOneObstacle:this.diagonalMovement=s.Never),this.diagonalMovement===s.Never?this.heuristic=e.heuristic||i.manhattan:this.heuristic=e.heuristic||i.octile}a.prototype.findPath=function(e,t,n,i,s){var a,l,c,u,d,h,p,f,m=function(e,t){return e.f-t.f},g=new r(m),v=new r(m),y=s.getNodeAt(e,t),b=s.getNodeAt(n,i),w=this.heuristic,_=this.diagonalMovement,x=this.weight,S=Math.abs,A=Math.SQRT2;for(y.g=0,y.f=0,g.push(y),y.opened=1,b.g=0,b.f=0,v.push(b),b.opened=2;!g.empty()&&!v.empty();){for((a=g.pop()).closed=!0,u=0,d=(l=s.getNeighbors(a,_)).length;u{var r=n(23706);function o(e){r.call(this,e);var t=this.heuristic;this.heuristic=function(e,n){return 1e6*t(e,n)}}o.prototype=new r,o.prototype.constructor=o,e.exports=o},78609:(e,t,n)=>{var r=n(70624),o=n(2270);function i(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=o.OnlyWhenNoObstacles:this.diagonalMovement=o.IfAtMostOneObstacle:this.diagonalMovement=o.Never)}i.prototype.findPath=function(e,t,n,o,i){var s,a,l,c,u,d=i.getNodeAt(e,t),h=i.getNodeAt(n,o),p=[],f=[],m=this.diagonalMovement;for(p.push(d),d.opened=!0,d.by=0,f.push(h),h.opened=!0,h.by=1;p.length&&f.length;){for((l=p.shift()).closed=!0,c=0,u=(s=i.getNeighbors(l,m)).length;c{var r=n(23706);function o(e){r.call(this,e),this.heuristic=function(e,t){return 0}}o.prototype=new r,o.prototype.constructor=o,e.exports=o},24824:(e,t,n)=>{var r=n(70624),o=n(2270);function i(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=o.OnlyWhenNoObstacles:this.diagonalMovement=o.IfAtMostOneObstacle:this.diagonalMovement=o.Never)}i.prototype.findPath=function(e,t,n,o,i){var s,a,l,c,u,d=[],h=this.diagonalMovement,p=i.getNodeAt(e,t),f=i.getNodeAt(n,o);for(d.push(p),p.opened=!0;d.length;){if((l=d.shift()).closed=!0,l===f)return r.backtrace(f);for(c=0,u=(s=i.getNeighbors(l,h)).length;c{var r=n(77549);function o(e){r.call(this,e),this.heuristic=function(e,t){return 0}}o.prototype=new r,o.prototype.constructor=o,e.exports=o},81106:(e,t,n)=>{n(70624);var r=n(71334),o=n(54404),i=n(2270);function s(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.heuristic=e.heuristic||r.manhattan,this.weight=e.weight||1,this.trackRecursion=e.trackRecursion||!1,this.timeLimit=e.timeLimit||1/0,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=i.OnlyWhenNoObstacles:this.diagonalMovement=i.IfAtMostOneObstacle:this.diagonalMovement=i.Never),this.diagonalMovement===i.Never?this.heuristic=e.heuristic||r.manhattan:this.heuristic=e.heuristic||r.octile}s.prototype.findPath=function(e,t,n,r,i){var s,a,l,c=(new Date).getTime(),u=function(e,t){return this.heuristic(Math.abs(t.x-e.x),Math.abs(t.y-e.y))}.bind(this),d=function(e,t,n,r,s){if(this.timeLimit>0&&(new Date).getTime()-c>1e3*this.timeLimit)return 1/0;var a,l,h,f,m=t+u(e,p)*this.weight;if(m>n)return m;if(e==p)return r[s]=[e.x,e.y],e;var g,v,y=i.getNeighbors(e,this.diagonalMovement);for(h=0,a=1/0;f=y[h];++h){if(this.trackRecursion&&(f.retainCount=f.retainCount+1||1,!0!==f.tested&&(f.tested=!0)),(l=d(f,t+(v=f,(g=e).x===v.x||g.y===v.y?1:Math.SQRT2),n,r,s+1))instanceof o)return r[s]=[e.x,e.y],l;this.trackRecursion&&0===--f.retainCount&&(f.tested=!1),l{var r=n(55289),o=n(2270);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,s=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i&&0!==s){if(o.isWalkableAt(e-i,t+s)&&!o.isWalkableAt(e-i,t)||o.isWalkableAt(e+i,t-s)&&!o.isWalkableAt(e,t-s))return[e,t];if(this._jump(e+i,t,e,t)||this._jump(e,t+s,e,t))return[e,t]}else if(0!==i){if(o.isWalkableAt(e+i,t+1)&&!o.isWalkableAt(e,t+1)||o.isWalkableAt(e+i,t-1)&&!o.isWalkableAt(e,t-1))return[e,t]}else if(o.isWalkableAt(e+1,t+s)&&!o.isWalkableAt(e+1,t)||o.isWalkableAt(e-1,t+s)&&!o.isWalkableAt(e-1,t))return[e,t];return this._jump(e+i,t+s,e,t)},i.prototype._findNeighbors=function(e){var t,n,r,i,s,a,l,c,u=e.parent,d=e.x,h=e.y,p=this.grid,f=[];if(u)t=u.x,n=u.y,r=(d-t)/Math.max(Math.abs(d-t),1),i=(h-n)/Math.max(Math.abs(h-n),1),0!==r&&0!==i?(p.isWalkableAt(d,h+i)&&f.push([d,h+i]),p.isWalkableAt(d+r,h)&&f.push([d+r,h]),p.isWalkableAt(d+r,h+i)&&f.push([d+r,h+i]),p.isWalkableAt(d-r,h)||f.push([d-r,h+i]),p.isWalkableAt(d,h-i)||f.push([d+r,h-i])):0===r?(p.isWalkableAt(d,h+i)&&f.push([d,h+i]),p.isWalkableAt(d+1,h)||f.push([d+1,h+i]),p.isWalkableAt(d-1,h)||f.push([d-1,h+i])):(p.isWalkableAt(d+r,h)&&f.push([d+r,h]),p.isWalkableAt(d,h+1)||f.push([d+r,h+1]),p.isWalkableAt(d,h-1)||f.push([d+r,h-1]));else for(l=0,c=(s=p.getNeighbors(e,o.Always)).length;l{var r=n(55289),o=n(2270);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,s=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i&&0!==s){if(o.isWalkableAt(e-i,t+s)&&!o.isWalkableAt(e-i,t)||o.isWalkableAt(e+i,t-s)&&!o.isWalkableAt(e,t-s))return[e,t];if(this._jump(e+i,t,e,t)||this._jump(e,t+s,e,t))return[e,t]}else if(0!==i){if(o.isWalkableAt(e+i,t+1)&&!o.isWalkableAt(e,t+1)||o.isWalkableAt(e+i,t-1)&&!o.isWalkableAt(e,t-1))return[e,t]}else if(o.isWalkableAt(e+1,t+s)&&!o.isWalkableAt(e+1,t)||o.isWalkableAt(e-1,t+s)&&!o.isWalkableAt(e-1,t))return[e,t];return o.isWalkableAt(e+i,t)||o.isWalkableAt(e,t+s)?this._jump(e+i,t+s,e,t):null},i.prototype._findNeighbors=function(e){var t,n,r,i,s,a,l,c,u=e.parent,d=e.x,h=e.y,p=this.grid,f=[];if(u)t=u.x,n=u.y,r=(d-t)/Math.max(Math.abs(d-t),1),i=(h-n)/Math.max(Math.abs(h-n),1),0!==r&&0!==i?(p.isWalkableAt(d,h+i)&&f.push([d,h+i]),p.isWalkableAt(d+r,h)&&f.push([d+r,h]),(p.isWalkableAt(d,h+i)||p.isWalkableAt(d+r,h))&&f.push([d+r,h+i]),!p.isWalkableAt(d-r,h)&&p.isWalkableAt(d,h+i)&&f.push([d-r,h+i]),!p.isWalkableAt(d,h-i)&&p.isWalkableAt(d+r,h)&&f.push([d+r,h-i])):0===r?p.isWalkableAt(d,h+i)&&(f.push([d,h+i]),p.isWalkableAt(d+1,h)||f.push([d+1,h+i]),p.isWalkableAt(d-1,h)||f.push([d-1,h+i])):p.isWalkableAt(d+r,h)&&(f.push([d+r,h]),p.isWalkableAt(d,h+1)||f.push([d+r,h+1]),p.isWalkableAt(d,h-1)||f.push([d+r,h-1]));else for(l=0,c=(s=p.getNeighbors(e,o.IfAtMostOneObstacle)).length;l{var r=n(55289),o=n(2270);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,s=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i&&0!==s){if(this._jump(e+i,t,e,t)||this._jump(e,t+s,e,t))return[e,t]}else if(0!==i){if(o.isWalkableAt(e,t-1)&&!o.isWalkableAt(e-i,t-1)||o.isWalkableAt(e,t+1)&&!o.isWalkableAt(e-i,t+1))return[e,t]}else if(0!==s&&(o.isWalkableAt(e-1,t)&&!o.isWalkableAt(e-1,t-s)||o.isWalkableAt(e+1,t)&&!o.isWalkableAt(e+1,t-s)))return[e,t];return o.isWalkableAt(e+i,t)&&o.isWalkableAt(e,t+s)?this._jump(e+i,t+s,e,t):null},i.prototype._findNeighbors=function(e){var t,n,r,i,s,a,l,c,u,d=e.parent,h=e.x,p=e.y,f=this.grid,m=[];if(d){if(t=d.x,n=d.y,r=(h-t)/Math.max(Math.abs(h-t),1),i=(p-n)/Math.max(Math.abs(p-n),1),0!==r&&0!==i)f.isWalkableAt(h,p+i)&&m.push([h,p+i]),f.isWalkableAt(h+r,p)&&m.push([h+r,p]),f.isWalkableAt(h,p+i)&&f.isWalkableAt(h+r,p)&&m.push([h+r,p+i]);else if(0!==r){u=f.isWalkableAt(h+r,p);var g=f.isWalkableAt(h,p+1),v=f.isWalkableAt(h,p-1);u&&(m.push([h+r,p]),g&&m.push([h+r,p+1]),v&&m.push([h+r,p-1])),g&&m.push([h,p+1]),v&&m.push([h,p-1])}else if(0!==i){u=f.isWalkableAt(h,p+i);var y=f.isWalkableAt(h+1,p),b=f.isWalkableAt(h-1,p);u&&(m.push([h,p+i]),y&&m.push([h+1,p+i]),b&&m.push([h-1,p+i])),y&&m.push([h+1,p]),b&&m.push([h-1,p])}}else for(l=0,c=(s=f.getNeighbors(e,o.OnlyWhenNoObstacles)).length;l{var r=n(55289),o=n(2270);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,s=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i){if(o.isWalkableAt(e,t-1)&&!o.isWalkableAt(e-i,t-1)||o.isWalkableAt(e,t+1)&&!o.isWalkableAt(e-i,t+1))return[e,t]}else{if(0===s)throw new Error("Only horizontal and vertical movements are allowed");if(o.isWalkableAt(e-1,t)&&!o.isWalkableAt(e-1,t-s)||o.isWalkableAt(e+1,t)&&!o.isWalkableAt(e+1,t-s))return[e,t];if(this._jump(e+1,t,e,t)||this._jump(e-1,t,e,t))return[e,t]}return this._jump(e+i,t+s,e,t)},i.prototype._findNeighbors=function(e){var t,n,r,i,s,a,l,c,u=e.parent,d=e.x,h=e.y,p=this.grid,f=[];if(u)t=u.x,n=u.y,r=(d-t)/Math.max(Math.abs(d-t),1),i=(h-n)/Math.max(Math.abs(h-n),1),0!==r?(p.isWalkableAt(d,h-1)&&f.push([d,h-1]),p.isWalkableAt(d,h+1)&&f.push([d,h+1]),p.isWalkableAt(d+r,h)&&f.push([d+r,h])):0!==i&&(p.isWalkableAt(d-1,h)&&f.push([d-1,h]),p.isWalkableAt(d+1,h)&&f.push([d+1,h]),p.isWalkableAt(d,h+i)&&f.push([d,h+i]));else for(l=0,c=(s=p.getNeighbors(e,o.Never)).length;l{var r=n(2270),o=n(72479),i=n(52958),s=n(54601),a=n(7177);e.exports=function(e){return(e=e||{}).diagonalMovement===r.Never?new o(e):e.diagonalMovement===r.Always?new i(e):e.diagonalMovement===r.OnlyWhenNoObstacles?new s(e):new a(e)}},55289:(e,t,n)=>{var r=n(38241),o=n(70624),i=n(71334);n(2270);function s(e){e=e||{},this.heuristic=e.heuristic||i.manhattan,this.trackJumpRecursion=e.trackJumpRecursion||!1}s.prototype.findPath=function(e,t,n,i,s){var a,l=this.openList=new r((function(e,t){return e.f-t.f})),c=this.startNode=s.getNodeAt(e,t),u=this.endNode=s.getNodeAt(n,i);for(this.grid=s,c.g=0,c.f=0,l.push(c),c.opened=!0;!l.empty();){if((a=l.pop()).closed=!0,a===u)return o.expandPath(o.backtrace(u));this._identifySuccessors(a)}return[]},s.prototype._identifySuccessors=function(e){var t,n,r,o,s,a,l,c,u,d,h=this.grid,p=this.heuristic,f=this.openList,m=this.endNode.x,g=this.endNode.y,v=e.x,y=e.y,b=Math.abs;Math.max;for(o=0,s=(t=this._findNeighbors(e)).length;o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},r=function(e){return e*e},o=function(e,t){var o=n(e,2),i=o[0],s=o[1],a=n(t,2),l=a[0],c=a[1];return Math.sqrt(r(i-l)+r(s-c))};t.default={distPointToPoint:o,distPointToParabol:function(e,t){var n=o(e,t);return 0==n?1/0:r(n)/(2*Math.abs(e[1]-t[1]))},circumCenter:function(e,t,n){var r=(e[0]-n[0])*(t[1]-n[1])-(t[0]-n[0])*(e[1]-n[1]);return 0==r?[1/0,1/0]:[(((e[0]-n[0])*(e[0]+n[0])+(e[1]-n[1])*(e[1]+n[1]))/2*(t[1]-n[1])-((t[0]-n[0])*(t[0]+n[0])+(t[1]-n[1])*(t[1]+n[1]))/2*(e[1]-n[1]))/r,(((t[0]-n[0])*(t[0]+n[0])+(t[1]-n[1])*(t[1]+n[1]))/2*(e[0]-n[0])-((e[0]-n[0])*(e[0]+n[0])+(e[1]-n[1])*(e[1]+n[1]))/2*(t[0]-n[0]))/r]},parabolsCrossX:function(e,t,n){if(e[1]===t[1])return[(e[0]+t[0])/2,(e[0]+t[0])/2];var r=(e[1]*t[0]-e[0]*t[1]+e[0]*n-t[0]*n+Math.sqrt((e[0]*e[0]+e[1]*e[1]-2*e[0]*t[0]+t[0]*t[0]-2*e[1]*t[1]+t[1]*t[1])*(e[1]*t[1]-e[1]*n-t[1]*n+n*n)))/(e[1]-t[1]),o=(e[1]*t[0]-e[0]*t[1]+e[0]*n-t[0]*n-Math.sqrt((e[0]*e[0]+e[1]*e[1]-2*e[0]*t[0]+t[0]*t[0]-2*e[1]*t[1]+t[1]*t[1])*(e[1]*t[1]-e[1]*n-t[1]*n+n*n)))/(e[1]-t[1]);return r=-n&&e.vec[0]*r>=-n;var i=t.vec[0]*e.vec[1]-t.vec[1]*e.vec[0];if(0===i)return!1;var s=(o*t.vec[0]-r*t.vec[1])/i,a=(o*e.vec[0]-r*e.vec[1])/i;return s>=-n&&a>=n||s>=n&&a>=-n},matrixTransform:function(e,t){return e.map((function(e){return{x:e.x*t[0]+e.y*t[2]+t[4],y:e.x*t[1]+e.y*t[3]+t[5]}}))},transformEllipse:function(e,t,n,r){var o=Math.PI/180,i=1e-10,s=Math.cos(n*o),a=Math.sin(n*o),l=[e*(r[0]*s+r[2]*a),e*(r[1]*s+r[3]*a),t*(-r[0]*a+r[2]*s),t*(-r[1]*a+r[3]*s)],c=l[0]*l[0]+l[2]*l[2],u=l[1]*l[1]+l[3]*l[3],d=((l[0]-l[3])*(l[0]-l[3])+(l[2]+l[1])*(l[2]+l[1]))*((l[0]+l[3])*(l[0]+l[3])+(l[2]-l[1])*(l[2]-l[1])),h=(c+u)/2;if(dMath.abs(f-u)?(f-c)/p:p/(f-u))/Math.PI)>=0?(v=Math.sqrt(f),y=Math.sqrt(m)):(g+=90,v=Math.sqrt(m),y=Math.sqrt(f)),{rx:v,ry:y,ax:g,isDegenerate:v{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(r=(s=a.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(l){o=!0,i=l}finally{try{!r&&a.return&&a.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},o=n(10731),i=function e(t){var n=t||[],i=function(e){return e.command+" "+e.params.map((function(e){return t=6,function(e,t){for(var n=e.length;"0"===e.charAt(n-1);)n-=1;return"."===e.charAt(n-1)&&(n-=1),e.substr(0,n)}(e.toFixed(t));var t})).join(" ")},s=function(e,t){var n=e.command,r=e.params;switch(n){case"M":case"L":case"T":return[r[0],r[1]];case"H":return[r[0],t[1]];case"V":return[t[0],r[0]];case"Z":return null;case"C":return[r[4],r[5]];case"S":case"Q":return[r[2],r[3]];case"A":return[r[5],r[6]]}},a=function(e,t,n){var r=e.params,i={V:function(e,t,n){var i=[{x:n[0],y:r[0]}],s=(0,o.matrixTransform)(i,t);return s[0].x===(0,o.matrixTransform)([{x:n[0],y:n[1]}],t)[0].x?{command:"V",params:[s[0].y]}:{command:"L",params:[s[0].x,s[0].y]}},H:function(e,t,n){var i=[{x:r[0],y:n[1]}],s=(0,o.matrixTransform)(i,t);return s[0].y===(0,o.matrixTransform)([{x:n[0],y:n[1]}],t)[0].y?{command:"H",params:[s[0].x]}:{command:"L",params:[s[0].x,s[0].y]}},A:function(e,t,n){var i=(0,o.transformEllipse)(r[0],r[1],r[2],t),s=r[4];t[0]*t[3]-t[1]*t[2]<0&&(s=s?"0":"1");var a=[{x:r[5],y:r[6]}],l=(0,o.matrixTransform)(a,t);return i.isDegenerate?{command:"L",params:[l[0].x,l[0].y]}:{command:"A",params:[i.rx,i.ry,i.ax,r[3],s,l[0].x,l[0].y]}},C:function(e,t,n){var i=[{x:r[0],y:r[1]},{x:r[2],y:r[3]},{x:r[4],y:r[5]}],s=(0,o.matrixTransform)(i,t);return{command:"C",params:[s[0].x,s[0].y,s[1].x,s[1].y,s[2].x,s[2].y]}},Z:function(e,t,n){return{command:"Z",params:[]}},default:function(e,t,n){var i=[{x:r[0],y:r[1]}],s=(0,o.matrixTransform)(i,t),a=e.params.slice(0,e.params.length);return a.splice(0,2,s[0].x,s[0].y),{command:e.command,params:a}}};return i[e.command]?i[e.command](e,t,n):i.default(e,t,n)},l=function(e,t){return function(n){var r="object"===typeof n?e.map((function(e){return n[e]})):arguments;return t.apply(null,r)}},c=function(t){return e(function(e,t){var n=e.slice(0,e.length);return n.push(t),n}(n,t))};return{moveto:l(["x","y"],(function(e,t){return c({command:"M",params:[e,t]})})),lineto:l(["x","y"],(function(e,t){return c({command:"L",params:[e,t]})})),hlineto:l(["x"],(function(e){return c({command:"H",params:[e]})})),vlineto:l(["y"],(function(e){return c({command:"V",params:[e]})})),closepath:function(){return c({command:"Z",params:[]})},curveto:l(["x1","y1","x2","y2","x","y"],(function(e,t,n,r,o,i){return c({command:"C",params:[e,t,n,r,o,i]})})),smoothcurveto:l(["x2","y2","x","y"],(function(e,t,n,r){return c({command:"S",params:[e,t,n,r]})})),qcurveto:l(["x1","y1","x","y"],(function(e,t,n,r){return c({command:"Q",params:[e,t,n,r]})})),smoothqcurveto:l(["x","y"],(function(e,t){return c({command:"T",params:[e,t]})})),arc:l(["rx","ry","xrot","largeArcFlag","sweepFlag","x","y"],(function(e,t,n,r,o,i,s){return c({command:"A",params:[e,t,n,r,o,i,s]})})),translate:l(["dx","dy"],(function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(0===t&&0===r)return e(n);var o=function(){var o=[0,0],i=[1,0,0,1,t,r],l=n.map((function(e){var t=a(e,i,o);return o=s(e,o),t}));return{v:e(l)}}();return"object"===typeof o?o.v:void 0})),rotate:l(["angle","rx","ry"],(function(t){var r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],o=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(0===t)return e(n);var i=function(){var i=void 0,l=void 0,c=n;0!==r&&0!==o&&(i=[0,0],l=[1,0,0,1,-r,-o],c=c.map((function(e){var t=a(e,l,i);return i=s(e,i),t})));var u=t*Math.PI/180,d=Math.cos(u),h=Math.sin(u);return i=[0,0],l=[d,h,-h,d,0,0],c=c.map((function(e){var t=a(e,l,i);return i=s(e,i),t})),0!==r&&0!==o&&(i=[0,0],l=[1,0,0,1,r,o],c=c.map((function(e){var t=a(e,l,i);return i=s(e,i),t}))),{v:e(c)}}();return"object"===typeof i?i.v:void 0})),scale:l(["sx","sy"],(function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],r=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){if(1===t&&1===r)return e(n);var o=function(){var o=[0,0],i=[t,0,0,r,0,0],l=n.map((function(e){var t=a(e,i,o);return o=s(e,o),t}));return{v:e(l)}}();return"object"===typeof o?o.v:void 0}()})),shearX:l(["angle"],(function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r=function(){var r=[0,0],o=[1,0,Math.tan(t*Math.PI/180),1,0,0],i=n.map((function(e){var t=a(e,o,r);return r=s(e,r),t}));return{v:e(i)}}();return"object"===typeof r?r.v:void 0})),shearY:l(["angle"],(function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r=function(){var r=[0,0],o=[1,Math.tan(t*Math.PI/180),0,1,0,0],i=n.map((function(e){var t=a(e,o,r);return r=s(e,r),t}));return{v:e(i)}}();return"object"===typeof r?r.v:void 0})),print:function(){return n.map(i).join(" ")},toString:function(){return(void 0).print()},points:function(){var e=[],t=[0,0],r=!0,o=!1,i=void 0;try{for(var a,l=n[Symbol.iterator]();!(r=(a=l.next()).done);r=!0){var c=a.value,u=s(c,t);t=u,u&&e.push(u)}}catch(d){o=!0,i=d}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return e},instructions:function(){return n.slice(0,n.length)},connect:function(t){var o=this.points(),i=o[o.length-1],s=t.points()[0],a=void 0;return"Z"!==n[n.length-1].command?(a=t.instructions().slice(1),function(e,t){var n=r(e,2),o=n[0],i=n[1],s=r(t,2),a=s[0],l=s[1];return o===a&&i===l}(i,s)||a.unshift({command:"L",params:s})):a=t.instructions(),e(this.instructions().concat(a))}}};t.default=function(){return i()},e.exports=t.default},43488:(e,t,n)=>{"use strict";var r=n(93959);function o(){}function i(){}i.resetWarningCache=o,e.exports=function(){function e(e,t,n,o,i,s){if(s!==r){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:i,resetWarningCache:o};return n.PropTypes=n,n}},11942:(e,t,n)=>{e.exports=n(43488)()},93959:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},38345:(e,t,n)=>{"use strict";var r=n(9950),o=n(75340);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n