loukai-app 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +558 -0
- package/bin/loukai.js +32 -0
- package/package.json +243 -0
- package/src/main/appState.js +250 -0
- package/src/main/audioEngine.js +478 -0
- package/src/main/creator/conversionService.js +503 -0
- package/src/main/creator/downloadManager.js +1128 -0
- package/src/main/creator/ffmpegService.js +487 -0
- package/src/main/creator/installLogger.js +51 -0
- package/src/main/creator/keyDetection.js +212 -0
- package/src/main/creator/llmService.js +370 -0
- package/src/main/creator/lrclibService.js +340 -0
- package/src/main/creator/python/crepe_runner.py +189 -0
- package/src/main/creator/python/demucs_runner.py +158 -0
- package/src/main/creator/python/whisper_runner.py +172 -0
- package/src/main/creator/pythonRunner.js +268 -0
- package/src/main/creator/stemBuilder.js +491 -0
- package/src/main/creator/systemChecker.js +474 -0
- package/src/main/handlers/appHandlers.js +45 -0
- package/src/main/handlers/audioHandlers.js +33 -0
- package/src/main/handlers/autotuneHandlers.js +28 -0
- package/src/main/handlers/canvasHandlers.js +84 -0
- package/src/main/handlers/creatorHandlers.js +159 -0
- package/src/main/handlers/editorHandlers.js +98 -0
- package/src/main/handlers/effectsHandlers.js +100 -0
- package/src/main/handlers/fileHandlers.js +45 -0
- package/src/main/handlers/index.js +78 -0
- package/src/main/handlers/libraryHandlers.js +96 -0
- package/src/main/handlers/mixerHandlers.js +64 -0
- package/src/main/handlers/playerHandlers.js +39 -0
- package/src/main/handlers/preferencesHandlers.js +46 -0
- package/src/main/handlers/queueHandlers.js +81 -0
- package/src/main/handlers/rendererHandlers.js +63 -0
- package/src/main/handlers/settingsHandlers.js +42 -0
- package/src/main/handlers/webServerHandlers.js +105 -0
- package/src/main/main.js +2351 -0
- package/src/main/preload.js +252 -0
- package/src/main/settingsManager.js +139 -0
- package/src/main/statePersistence.js +193 -0
- package/src/main/utils/pathValidator.js +112 -0
- package/src/main/webServer.js +2535 -0
- package/src/native/autotune.js +417 -0
- package/src/renderer/adapters/ElectronBridge.js +677 -0
- package/src/renderer/canvas.html +80 -0
- package/src/renderer/components/App.jsx +303 -0
- package/src/renderer/components/AppRoot.jsx +37 -0
- package/src/renderer/components/AudioDeviceSettings.jsx +145 -0
- package/src/renderer/components/EffectsPanelWrapper.jsx +267 -0
- package/src/renderer/components/MixerTab.jsx +233 -0
- package/src/renderer/components/MixerTabWrapper.jsx +31 -0
- package/src/renderer/components/PortalSelect.jsx +239 -0
- package/src/renderer/components/QueueTab.jsx +116 -0
- package/src/renderer/components/RequestsListWrapper.jsx +78 -0
- package/src/renderer/components/ServerTab.jsx +472 -0
- package/src/renderer/components/SongInfoBarWrapper.jsx +77 -0
- package/src/renderer/components/StatusBar.jsx +92 -0
- package/src/renderer/components/TabNavigation.jsx +77 -0
- package/src/renderer/components/TransportControlsWrapper.jsx +69 -0
- package/src/renderer/components/creator/CreateTab.jsx +1236 -0
- package/src/renderer/dist/assets/kaiPlayer-CoMx__a_.js +2 -0
- package/src/renderer/dist/assets/kaiPlayer-CoMx__a_.js.map +1 -0
- package/src/renderer/dist/assets/microphoneEngine-BaCUhhQc.js +2 -0
- package/src/renderer/dist/assets/microphoneEngine-BaCUhhQc.js.map +1 -0
- package/src/renderer/dist/assets/player-DVrqp7N5.js +3 -0
- package/src/renderer/dist/assets/player-DVrqp7N5.js.map +1 -0
- package/src/renderer/dist/assets/songLoaders-BaTgGib4.js +2 -0
- package/src/renderer/dist/assets/songLoaders-BaTgGib4.js.map +1 -0
- package/src/renderer/dist/assets/webrtcManager-BhCHWceK.js +2 -0
- package/src/renderer/dist/assets/webrtcManager-BhCHWceK.js.map +1 -0
- package/src/renderer/dist/js/autoTuneWorklet.js +224 -0
- package/src/renderer/dist/js/micPitchDetectorWorklet.js +137 -0
- package/src/renderer/dist/js/musicAnalysisWorklet.js +216 -0
- package/src/renderer/dist/js/phaseVocoderWorklet.js +341 -0
- package/src/renderer/dist/js/soundtouch-worklet.js +1395 -0
- package/src/renderer/dist/renderer.css +1 -0
- package/src/renderer/dist/renderer.js +62 -0
- package/src/renderer/dist/renderer.js.map +1 -0
- package/src/renderer/dist/renderer.woff2 +0 -0
- package/src/renderer/hooks/useKeyboardShortcuts.js +154 -0
- package/src/renderer/index.html +24 -0
- package/src/renderer/index.html.backup +372 -0
- package/src/renderer/js/PlayerInterface.js +267 -0
- package/src/renderer/js/autoTuneWorklet.js +224 -0
- package/src/renderer/js/butterchurnVerify.js +46 -0
- package/src/renderer/js/canvas-app.js +114 -0
- package/src/renderer/js/cdgPlayer.js +685 -0
- package/src/renderer/js/kaiPlayer.js +1200 -0
- package/src/renderer/js/karaokeRenderer.js +3392 -0
- package/src/renderer/js/micPitchDetectorWorklet.js +137 -0
- package/src/renderer/js/microphoneEngine.js +656 -0
- package/src/renderer/js/musicAnalysisWorklet.js +216 -0
- package/src/renderer/js/phaseVocoderWorklet.js +341 -0
- package/src/renderer/js/player.js +232 -0
- package/src/renderer/js/referencePitchTracker.js +130 -0
- package/src/renderer/js/songLoaders.js +334 -0
- package/src/renderer/js/soundtouch-worklet.js +1395 -0
- package/src/renderer/js/webrtcManager.js +511 -0
- package/src/renderer/lib/butterchurn.min.js +6739 -0
- package/src/renderer/lib/butterchurnPresets.min.js +1 -0
- package/src/renderer/lib/cdgraphics-wrapper.js +16 -0
- package/src/renderer/lib/cdgraphics.js +299 -0
- package/src/renderer/public/js/autoTuneWorklet.js +224 -0
- package/src/renderer/public/js/micPitchDetectorWorklet.js +137 -0
- package/src/renderer/public/js/musicAnalysisWorklet.js +216 -0
- package/src/renderer/public/js/phaseVocoderWorklet.js +341 -0
- package/src/renderer/public/js/soundtouch-worklet.js +1395 -0
- package/src/renderer/react-entry.jsx +44 -0
- package/src/renderer/styles/tailwind.css +106 -0
- package/src/renderer/utils/qrCodeGenerator.js +98 -0
- package/src/renderer/vite.config.js +31 -0
- package/src/shared/adapters/BridgeInterface.js +195 -0
- package/src/shared/components/EffectsPanel.jsx +177 -0
- package/src/shared/components/LibraryPanel.jsx +701 -0
- package/src/shared/components/LineDetailCanvas.jsx +167 -0
- package/src/shared/components/LyricLine.jsx +505 -0
- package/src/shared/components/LyricRejection.jsx +84 -0
- package/src/shared/components/LyricSuggestion.jsx +80 -0
- package/src/shared/components/LyricsEditorCanvas.jsx +271 -0
- package/src/shared/components/MixerPanel.jsx +94 -0
- package/src/shared/components/PlayerControls.jsx +206 -0
- package/src/shared/components/PortalSelect.jsx +239 -0
- package/src/shared/components/QueueList.jsx +365 -0
- package/src/shared/components/QuickSearch.jsx +126 -0
- package/src/shared/components/RequestsList.jsx +121 -0
- package/src/shared/components/SongEditor.jsx +1362 -0
- package/src/shared/components/SongInfoBar.jsx +81 -0
- package/src/shared/components/ThemeToggle.jsx +106 -0
- package/src/shared/components/Toast.jsx +30 -0
- package/src/shared/components/VisualizationSettings.jsx +243 -0
- package/src/shared/constants.js +95 -0
- package/src/shared/context/BridgeContext.jsx +32 -0
- package/src/shared/contexts/AudioContext.jsx +37 -0
- package/src/shared/contexts/PlayerContext.jsx +66 -0
- package/src/shared/contexts/SettingsContext.jsx +50 -0
- package/src/shared/defaults.js +158 -0
- package/src/shared/formatUtils.js +59 -0
- package/src/shared/formatUtils.test.js +207 -0
- package/src/shared/hooks/useAppState.js +97 -0
- package/src/shared/hooks/useAudioEngine.js +264 -0
- package/src/shared/hooks/usePlayer.js +89 -0
- package/src/shared/hooks/useSettingsPersistence.js +74 -0
- package/src/shared/hooks/useWebRTC.js +118 -0
- package/src/shared/ipcContracts.js +299 -0
- package/src/shared/package.json +3 -0
- package/src/shared/services/creatorService.js +373 -0
- package/src/shared/services/creatorService.test.js +413 -0
- package/src/shared/services/editorService.js +213 -0
- package/src/shared/services/editorService.test.js +219 -0
- package/src/shared/services/effectsService.js +271 -0
- package/src/shared/services/effectsService.test.js +418 -0
- package/src/shared/services/libraryService.js +438 -0
- package/src/shared/services/libraryService.test.js +474 -0
- package/src/shared/services/mixerService.js +172 -0
- package/src/shared/services/mixerService.test.js +399 -0
- package/src/shared/services/playerService.js +221 -0
- package/src/shared/services/playerService.test.js +357 -0
- package/src/shared/services/preferencesService.js +219 -0
- package/src/shared/services/queueService.js +226 -0
- package/src/shared/services/queueService.test.js +430 -0
- package/src/shared/services/requestsService.js +155 -0
- package/src/shared/services/requestsService.test.js +362 -0
- package/src/shared/services/serverSettingsService.js +151 -0
- package/src/shared/services/settingsService.js +257 -0
- package/src/shared/services/settingsService.test.js +295 -0
- package/src/shared/state/StateManager.js +263 -0
- package/src/shared/utils/audio.js +42 -0
- package/src/shared/utils/format.js +32 -0
- package/src/shared/utils/lyricsUtils.js +162 -0
- package/src/test/setup.js +40 -0
- package/src/utils/cdgLoader.js +180 -0
- package/src/utils/m4aLoader.js +333 -0
- package/src/web/App.jsx +578 -0
- package/src/web/adapters/WebBridge.js +428 -0
- package/src/web/components/PlayerSettingsPanel.jsx +231 -0
- package/src/web/components/SongSearch.jsx +180 -0
- package/src/web/dist/assets/index-0H-RnRrV.js +51 -0
- package/src/web/dist/assets/index-0H-RnRrV.js.map +1 -0
- package/src/web/dist/assets/index-DYW2zB0u.css +1 -0
- package/src/web/dist/index.html +15 -0
- package/src/web/index.html +14 -0
- package/src/web/main.jsx +10 -0
- package/src/web/package-lock.json +1765 -0
- package/src/web/pages/SongRequestPage.jsx +619 -0
- package/src/web/styles/tailwind.css +68 -0
- package/src/web/vite.config.js +27 -0
- package/static/fonts/material-icons.woff2 +0 -0
- package/static/images/butterchurn-screenshots/Aderrasi - Potion of Spirits.png +0 -0
- package/static/images/butterchurn-screenshots/Aderrasi - Songflower _Moss Posy_.png +0 -0
- package/static/images/butterchurn-screenshots/Aderrasi - Storm of the Eye _Thunder_ - mash0000 - quasi pseudo meta concentrics.png +0 -0
- package/static/images/butterchurn-screenshots/Aderrasi _ Geiss - Airhandler _Kali Mix_ - Canvas Mix.png +0 -0
- package/static/images/butterchurn-screenshots/An AdamFX n Martin Infusion 2 flexi - Why The Sky Looks Diffrent Today - AdamFx n Martin Infusion - Tack Tile Disfunction B.png +0 -0
- package/static/images/butterchurn-screenshots/Cope - The Neverending Explosion of Red Liquid Fire.png +0 -0
- proton lights __Krash_s beat code_ _Phat_remix02b.png +0 -0
- package/static/images/butterchurn-screenshots/Eo_S_ _ Phat - cubetrace - v2.png +0 -0
- package/static/images/butterchurn-screenshots/Eo_S_ _ Zylot - skylight _Stained Glass Majesty mix_.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - alien fish pond.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - area 51.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - infused with the spiral.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - mindblob _shiny mix_.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - mindblob mix.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - predator-prey-spirals.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - smashing fractals _acid etching mix_.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi - truly soft piece of software - this is generic texturing _Jelly_ .png +0 -0
- package/static/images/butterchurn-screenshots/Flexi _ Martin - astral projection.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi _ Martin - cascading decay swing.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi _ amandio c - piercing 05 - Kopie _2_ - Kopie.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi _ stahlregen - jelly showoff parade.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi_ fishbrain_ Geiss _ Martin - tokamak witchery.png +0 -0
- package/static/images/butterchurn-screenshots/Flexi_ martin _ geiss - dedicated to the sherwin maxawow.png +0 -0
- package/static/images/butterchurn-screenshots/Fumbling_Foo _ Flexi_ Martin_ Orb_ Unchained - Star Nova v7b.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss - Cauldron - painterly 2 _saturation remix_.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss - Reaction Diffusion 2.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss - Spiral Artifact.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss - Thumb Drum.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss _ Flexi _ Martin - disconnected.png +0 -0
- package/static/images/butterchurn-screenshots/Geiss_ Flexi _ Stahlregen - Thumbdrum Tokamak _crossfiring aftermath jelly mashup_.png +0 -0
- package/static/images/butterchurn-screenshots/Goody - The Wild Vort.png +0 -0
- package/static/images/butterchurn-screenshots/Idiot - Star Of Annon.png +0 -0
- package/static/images/butterchurn-screenshots/Krash _ Illusion - Spiral Movement.png +0 -0
- package/static/images/butterchurn-screenshots/Martin - QBikal - Surface Turbulence IIb.png +0 -0
- package/static/images/butterchurn-screenshots/Martin - acid wiring.png +0 -0
- package/static/images/butterchurn-screenshots/Martin - charisma.png +0 -0
- package/static/images/butterchurn-screenshots/Martin - liquid arrows.png +0 -0
- package/static/images/butterchurn-screenshots/Milk Artist At our Best - FED - SlowFast Ft AdamFX n Martin - HD CosmoFX.png +0 -0
- package/static/images/butterchurn-screenshots/ORB - Waaa.png +0 -0
- package/static/images/butterchurn-screenshots/Phat_fiShbRaiN_Eo_S_Mandala_Chasers_remix.png +0 -0
- package/static/images/butterchurn-screenshots/Rovastar - Oozing Resistance.png +0 -0
- package/static/images/butterchurn-screenshots/Rovastar _ Loadus _ Geiss - FractalDrop _Triple Mix_.png +0 -0
- package/static/images/butterchurn-screenshots/TonyMilkdrop - Leonardo Da Vinci_s Balloon _Flexi - merry-go-round _ techstyle_.png +0 -0
- package/static/images/butterchurn-screenshots/TonyMilkdrop - Magellan_s Nebula _Flexi - you enter first _ multiverse_.png +0 -0
- package/static/images/butterchurn-screenshots/Unchained - Rewop.png +0 -0
- package/static/images/butterchurn-screenshots/Unchained - Unified Drag 2.png +0 -0
- package/static/images/butterchurn-screenshots/Unchained _ Rovastar - Wormhole Pillars _Hall of Shadows mix_.png +0 -0
- package/static/images/butterchurn-screenshots/Zylot - Paint Spill _Music Reactive Paint Mix_.png +0 -0
- package/static/images/butterchurn-screenshots/Zylot - Star Ornament.png +0 -0
- package/static/images/butterchurn-screenshots/Zylot - True Visionary _Final Mix_.png +0 -0
- package/static/images/butterchurn-screenshots/_Aderrasi - Wanderer in Curved Space - mash0000 - faclempt kibitzing meshuggana schmaltz _Geiss color mix_.png +0 -0
- package/static/images/butterchurn-screenshots/_Geiss - Artifact 01.png +0 -0
- package/static/images/butterchurn-screenshots/_Geiss - Desert Rose 2.png +0 -0
- package/static/images/butterchurn-screenshots/_Geiss - untitled.png +0 -0
- package/static/images/butterchurn-screenshots/_Mig_049.png +0 -0
- package/static/images/butterchurn-screenshots/_Mig_085.png +0 -0
- package/static/images/butterchurn-screenshots/_Rovastar _ Geiss - Hurricane Nightmare _Posterize Mix_.png +0 -0
- package/static/images/butterchurn-screenshots/___ Royal - Mashup _197_.png +0 -0
- package/static/images/butterchurn-screenshots/___ Royal - Mashup _220_.png +0 -0
- package/static/images/butterchurn-screenshots/___ Royal - Mashup _431_.png +0 -0
- package/static/images/butterchurn-screenshots/cope _ martin - mother-of-pearl.png +0 -0
- package/static/images/butterchurn-screenshots/fiShbRaiN _ Flexi - witchcraft 2_0.png +0 -0
- package/static/images/butterchurn-screenshots/flexi - bouncing balls _double mindblob neon mix_.png +0 -0
- package/static/images/butterchurn-screenshots/flexi - mom_ why the sky looks different today.png +0 -0
- package/static/images/butterchurn-screenshots/flexi - patternton_ district of media_ capitol of the united abstractions of fractopia.png +0 -0
- package/static/images/butterchurn-screenshots/flexi - swing out on the spiral.png +0 -0
- package/static/images/butterchurn-screenshots/flexi - what is the matrix.png +0 -0
- package/static/images/butterchurn-screenshots/flexi _ amandio c - organic _random mashup_.png +0 -0
- package/static/images/butterchurn-screenshots/flexi _ amandio c - organic12-3d-2_milk.png +0 -0
- package/static/images/butterchurn-screenshots/flexi _ fishbrain - neon mindblob grafitti.png +0 -0
- package/static/images/butterchurn-screenshots/flexi _ geiss - pogo cubes vs_ tokamak vs_ game of life _stahls jelly 4_5 finish_.png +0 -0
- package/static/images/butterchurn-screenshots/high-altitude basket unraveling - singh grooves nitrogen argon nz_.png +0 -0
- package/static/images/butterchurn-screenshots/martin - The Bridge of Khazad-Dum.png +0 -0
- package/static/images/butterchurn-screenshots/martin - angel flight.png +0 -0
- package/static/images/butterchurn-screenshots/martin - another kind of groove.png +0 -0
- package/static/images/butterchurn-screenshots/martin - bombyx mori.png +0 -0
- package/static/images/butterchurn-screenshots/martin - castle in the air.png +0 -0
- package/static/images/butterchurn-screenshots/martin - chain breaker.png +0 -0
- package/static/images/butterchurn-screenshots/martin - disco mix 4.png +0 -0
- package/static/images/butterchurn-screenshots/martin - extreme heat.png +0 -0
- package/static/images/butterchurn-screenshots/martin - frosty caves 2.png +0 -0
- package/static/images/butterchurn-screenshots/martin - fruit machine.png +0 -0
- package/static/images/butterchurn-screenshots/martin - ghost city.png +0 -0
- package/static/images/butterchurn-screenshots/martin - glass corridor.png +0 -0
- package/static/images/butterchurn-screenshots/martin - infinity _2010 update_.png +0 -0
- package/static/images/butterchurn-screenshots/martin - mandelbox explorer - high speed demo version.png +0 -0
- package/static/images/butterchurn-screenshots/martin - mucus cervix.png +0 -0
- package/static/images/butterchurn-screenshots/martin - reflections on black tiles.png +0 -0
- package/static/images/butterchurn-screenshots/martin - stormy sea _2010 update_.png +0 -0
- package/static/images/butterchurn-screenshots/martin - witchcraft reloaded.png +0 -0
- package/static/images/butterchurn-screenshots/martin _ flexi - diamond cutter _prismaticvortex_com_ - camille - i wish i wish i wish i was constrained.png +0 -0
- package/static/images/butterchurn-screenshots/martin _shadow harlequins shape code_ - fata morgana.png +0 -0
- package/static/images/butterchurn-screenshots/martin_ flexi_ fishbrain _ sto - enterstate _random mashup_.png +0 -0
- package/static/images/butterchurn-screenshots/sawtooth grin roam.png +0 -0
- package/static/images/butterchurn-screenshots/shifter - dark tides bdrv mix 2.png +0 -0
- package/static/images/butterchurn-screenshots/suksma - Rovastar - Sunflower Passion _Enlightment Mix__Phat_edit _ flexi und martin shaders - circumflex in character classes in regular expression.png +0 -0
- package/static/images/butterchurn-screenshots/suksma - heretical crosscut playpen.png +0 -0
- package/static/images/butterchurn-screenshots/suksma - uninitialized variabowl _hydroponic chronic_.png +0 -0
- package/static/images/butterchurn-screenshots/suksma - vector exp 1 - couldn_t not.png +0 -0
- package/static/images/butterchurn-screenshots/yin - 191 - Temporal singularities.png +0 -0
- package/static/images/logo-512.png +0 -0
- package/static/images/logo.png +0 -0
- package/static/loukai-logo.png +0 -0
- package/static/screenshot-generator.html +610 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"mappings":";;;;;;;;;6CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,GACX,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EACjE,MAASF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,EAEX,CACA,OAAAG,GAAA,SAAmBP,EACnBO,GAAA,IAAcN,EACdM,GAAA,KAAeN,2CC9BbO,GAAA,QAAiBC,GAAA;;;;;;;;6CCQnB,IAAIV,EAAqB,OAAO,IAAI,4BAA4B,EAC9DW,EAAoB,OAAO,IAAI,cAAc,EAC7CV,EAAsB,OAAO,IAAI,gBAAgB,EACjDW,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAsB,OAAO,IAAI,gBAAgB,EACjDC,EAAqB,OAAO,IAAI,eAAe,EAC/CC,EAAyB,OAAO,IAAI,mBAAmB,EACvDC,EAAsB,OAA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GACA,CAACmM,IAEO77B,EAAag9B,EAAiB,EAAG,EAAE,IAAzC,EAA4C,MAAMroC,EACtD4nC,GAAsBz8B,EACtBk9B,EAAgB,cAAgBO,GAC9BC,GAAoB,KAClB,KACAR,EACAD,EACA9lB,GACAklB,GACAD,GACAp8B,EACA4vB,GACAsM,GACA/J,GACA4J,GACAuB,EACA,YACA,GACA,GAEFH,GAEF,MAAMtoC,CAChB,CACQ6oC,GACER,EACAD,EACA9lB,GACAklB,GACAD,GACAp8B,EACA4vB,GACAsM,GACA/J,GACA4J,GACAuB,EACA,KACA,GACA,EAEV,CACA,CACI,KACJ,OAAW,IACTP,GAAsB9E,CAAa,CACrC,CACA,SAASyF,GACPv9B,EACAqzB,EACAmK,EACAC,EACAC,EACA79B,EACAwB,EACAC,EACAC,EACAo8B,EACAX,EACAY,EACAC,EACAC,EACA,CAGA,GAFA99B,EAAK,cAAgB,GACrB49B,EAAwBvK,EAAa,aAEnCuK,EAAwB,OACVA,EAAwB,YAAtC,SACA,CACAA,EAAwB,CACtB,YAAa,KACb,MAAO,EACP,SAAU,EACV,SAAU,EACV,gBAAiB,GACjB,iBAAkB,GAClB,yBAA0B,GAC1B,UAAWv1B,IAEbsyB,GACEtH,EACAxzB,EACA+9B,GAEF,IAAIG,IACDl+B,EAAQ,YAAcA,EACnB+4B,GAA+Bp6B,GAAG,GACjCqB,EAAQ,WAAaA,EACpBoa,GAAiCzb,GAAG,EACpC,EAKR,GAJAu/B,GAAgBC,GACdJ,EACAG,IAEWA,KAAT,KAAwB,CAC1BzB,GAAsBz8B,EACtBG,EAAK,oBAAsB+9B,GACzBE,GAAW,KACT,KACAj+B,EACAqzB,EACAxzB,EACA29B,EACAC,EACAC,EACAr8B,EACAC,EACAC,EACAy7B,EACAY,EACA,KACAC,EACAC,CACV,GAEMnB,GAAkB38B,EAAMH,EAAOwB,EAAa,CAACs8B,CAAwB,EACrE,MACN,CACA,CACEM,GACEj+B,EACAqzB,EACAxzB,EACA29B,EACAC,EAC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AACkiC,GAAA,CAAI,OAAA99B,EAAA,CAAgB,EACvB,EACF,GAEF,QAAQ,IAAI,qBAAqB,EAErC,CAAC,EAGD,OAAO,iBAAiB,eAAgB,IAAM,CAC5CA,GAAO,YACT,CAAC","names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","jsxRuntimeModule","require$$0","REACT_PORTAL_TYPE","REACT_STRICT_MODE_TYPE","REACT_PROFILER_TYPE","REACT_CONSUMER_TYPE","REACT_CONTEXT_TYPE","REACT_FORWARD_REF_TYPE","REACT_SUSPENSE_TYPE","REACT_MEMO_TYPE","REACT_LAZY_TYPE","REACT_ACTIVITY_TYPE","MAYBE_ITERATOR_SYMBOL","getIteratorFn","maybeIterable","ReactNoopUpdateQueue","assign","emptyObject","Component","props","context","updater","partialState","callback","ComponentDummy","PureComponent","pureComponentPrototype","isArrayImpl","noop","ReactSharedInternals","hasOwnProperty","ReactElement","refProp","cloneAndReplaceKey","oldElement","newKey","isValidElement","object","escape","escaperLookup","match","userProvidedKeyEscapeRegex","getElementKey","element","index","resolveThenable","thenable","fulfilledValue","error","mapIntoArray","children","array","escapedPrefix","nameSoFar","invokeCallback","c","nextNamePrefix","i","mapChildren","func","result","count","child","lazyInitializer","payload","ctor","moduleObject","reportGlobalError","event","Children","forEachFunc","forEachContext","n","react_production","size","fn","childArray","defaultValue","childrenLength","render","compare","scope","prevTransition","currentTransition","returnValue","onStartTransitionFinish","usable","action","initialState","permalink","deps","Context","value","initialValue","create","ref","passthrough","reducer","initialArg","init","subscribe","getSnapshot","getServerSnapshot","reactModule","push","heap","node","a","parentIndex","parent","peek","pop","first","last","length","halfLength","leftIndex","left","rightIndex","right","b","diff","exports","localPerformance","localDate","initialTime","taskQueue","timerQueue","taskIdCounter","currentTask","currentPriorityLevel","isPerformingWork","isHostCallbackScheduled","isHostTimeoutScheduled","needsPaint","localSetTimeout","localClearTimeout","localSetImmediate","advanceTimers","currentTime","timer","handleTimeout","isMessageLoopRunning","schedulePerformWorkUntilDeadline","firstTimer","requestHostTimeout","taskTimeoutID","frameInterval","startTime","shouldYieldToHost","performWorkUntilDeadline","hasMoreWork","previousPriorityLevel","continuationCallback","channel","port","ms","task","fps","eventHandler","priorityLevel","options","timeout","parentPriorityLevel","schedulerModule","React","formatProdErrorMessage","code","url","Internals","createPortal$1","containerInfo","implementation","getCrossOriginStringAs","as","input","reactDom_production","container","previousTransition","previousUpdatePriority","href","crossOrigin","integrity","fetchPriority","form","checkDCE","err","reactDomModule","Scheduler","require$$1","ReactDOM","require$$2","isValidContainer","getNearestMountedFiber","fiber","nearestMounted","getSuspenseInstanceFromFiber","suspenseState","getActivityInstanceFromFiber","activityState","assertIsMounted","findCurrentFiberUsingSlowPath","alternate","parentA","parentB","didFindChild","child$0","findCurrentHostFiberImpl","tag","REACT_LEGACY_ELEMENT_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_MEMO_CACHE_SENTINEL","REACT_CLIENT_REFERENCE","getComponentNameFromType","innerType","ReactDOMSharedInternals","sharedNotPendingObject","valueStack","createCursor","cursor","contextStackCursor","contextFiberStackCursor","rootInstanceStackCursor","hostTransitionProviderCursor","pushHostContainer","nextRootInstance","getOwnHostContext","getChildHostContextProd","popHostContainer","pushHostContext","JSCompiler_inline_result","popHostContext","HostTransitionContext","prefix","suffix","describeBuiltInComponentFrame","name","x","reentry","describeNativeComponentFrame","construct","previousPrepareStackTrace","RunInRootFrame","Fake","control","x$1","x$2","sample","namePropDescriptor","_RunInRootFrame$Deter","sampleStack","controlStack","sampleLines","controlLines","frame","describeFiber","childFiber","getStackByFiberInDevAndProd","workInProgress","info","previous","scheduleCallback$3","cancelCallback$1","shouldYield","requestPaint","now","getCurrentPriorityLevel","ImmediatePriority","UserBlockingPriority","NormalPriority$1","LowPriority","IdlePriority","log$1","unstable_setDisableYieldValue","rendererID","injectedHook","setIsStrictModeForDevtools","newIsStrictMode","clz32","clz32Fallback","log","LN2","nextTransitionUpdateLane","nextTransitionDeferredLane","nextRetryLane","getHighestPriorityLanes","lanes","pendingSyncLanes","getNextLanes","root","wipLanes","rootHasPendingCommit","pendingLanes","nextLanes","suspendedLanes","pingedLanes","nonIdlePendingLanes","checkIfRootIsPrerendering","renderLanes","computeExpirationTime","lane","claimNextRetryLane","createLaneMap","initial","laneMap","markRootUpdated$1","updateLane","markRootFinished","finishedLanes","remainingLanes","spawnedLane","updatedLanes","suspendedRetryLanes","previouslyPendingLanes","entanglements","expirationTimes","hiddenUpdates","index$7","hiddenUpdatesForLane","update","markSpawnedDeferredLane","entangledLanes","spawnedLaneIndex","markRootEntangled","rootEntangledLanes","index$8","getBumpedLaneForHydration","renderLane","getBumpedLaneForHydrationByLane","lanesToEventPriority","resolveUpdatePriority","updatePriority","getEventPriority","runWithPriority","priority","previousPriority","randomKey","internalInstanceKey","internalPropsKey","internalContainerInstanceKey","internalEventHandlersKey","internalEventHandlerListenersKey","internalEventHandlesSetKey","internalRootNodeResourcesKey","internalHoistableMarker","detachDeletedInstance","getClosestInstanceFromNode","targetNode","targetInst","parentNode","getParentHydrationBoundary","getInstanceFromNode","getNodeFromInstance","inst","getResourcesFromRoot","resources","markNodeAsHoistable","allNativeEvents","registrationNameDependencies","registerTwoPhaseEvent","registrationName","dependencies","registerDirectEvent","VALID_ATTRIBUTE_NAME_REGEX","illegalAttributeNameCache","validatedAttributeNameCache","isAttributeNameSafe","attributeName","setValueForAttribute","prefix$10","setValueForKnownAttribute","setValueForNamespacedAttribute","namespace","getToStringValue","isCheckable","elem","trackValueOnNode","valueField","currentValue","descriptor","get","set","track","updateValueIfChanged","tracker","lastValue","getActiveElement","doc","escapeSelectorAttributeValueInsideDoubleQuotesRegex","escapeSelectorAttributeValueInsideDoubleQuotes","ch","updateInput","lastDefaultValue","checked","defaultChecked","setDefaultValue","initInput","isHydrating","updateOptions","multiple","propValue","setDefaultSelected","updateTextarea","initTextarea","setTextContent","text","firstChild","unitlessNumbers","setValueForStyle","style","styleName","isCustomProperty","setValueForStyles","styles","prevStyles","styleName$16","styleName$17","isCustomElement","tagName","aliases","isJavaScriptProtocol","sanitizeURL","noop$1","currentReplayingEvent","getEventTarget","nativeEvent","restoreTarget","restoreQueue","restoreStateOfTarget","target","internalInstance","otherNode","otherProps","isInsideEventHandler","batchedUpdates$1","flushSyncWork$1","getListener","stateNode","canUseDOM","passiveBrowserEventsSupported","startText","fallbackText","getData","start","startValue","startLength","end","endValue","endLength","minEnd","getEventCharCode","keyCode","functionThatReturnsTrue","functionThatReturnsFalse","createSyntheticEvent","Interface","SyntheticBaseEvent","reactName","reactEventType","nativeEventTarget","EventInterface","SyntheticEvent","UIEventInterface","SyntheticUIEvent","lastMovementX","lastMovementY","lastMouseEvent","MouseEventInterface","getEventModifierState","SyntheticMouseEvent","DragEventInterface","SyntheticDragEvent","FocusEventInterface","SyntheticFocusEvent","AnimationEventInterface","SyntheticAnimationEvent","ClipboardEventInterface","SyntheticClipboardEvent","CompositionEventInterface","SyntheticCompositionEvent","normalizeKey","translateToKey","modifierKeyToProp","modifierStateGetter","keyArg","KeyboardEventInterface","SyntheticKeyboardEvent","PointerEventInterface","SyntheticPointerEvent","TouchEventInterface","SyntheticTouchEvent","TransitionEventInterface","SyntheticTransitionEvent","WheelEventInterface","SyntheticWheelEvent","ToggleEventInterface","SyntheticToggleEvent","END_KEYCODES","canUseCompositionEvent","documentMode","canUseTextInputEvent","useFallbackCompositionData","SPACEBAR_CHAR","hasSpaceKeypress","isFallbackCompositionEnd","domEventName","getDataFromCustomEvent","isComposing","getNativeBeforeInputChars","getFallbackBeforeInputChars","supportedInputTypes","isTextInputElement","nodeName","createAndAccumulateChangeEvent","dispatchQueue","accumulateTwoPhaseListeners","activeElement$1","activeElementInst$1","runEventInBatch","processDispatchQueue","getInstIfValueChanged","getTargetInstForChangeEvent","isInputEventSupported","JSCompiler_inline_result$jscomp$286","isSupported$jscomp$inline_427","element$jscomp$inline_428","stopWatchingForValueChange","handlePropertyChange","handleEventsForInputEventPolyfill","getTargetInstForInputEventPolyfill","getTargetInstForClickEvent","getTargetInstForInputOrChangeEvent","is","y","objectIs","shallowEqual","objA","objB","keysA","keysB","currentKey","getLeafNode","getNodeForCharacterOffset","offset","nodeEnd","containsNode","outerNode","innerNode","getActiveElementDeep","hasSelectionCapabilities","skipSelectionChangeEvent","activeElement","activeElementInst","lastSelection","mouseDown","constructSelectEvent","makePrefixMap","styleProp","eventName","prefixes","vendorPrefixes","prefixedEventNames","getVendorPrefixedEventName","prefixMap","ANIMATION_END","ANIMATION_ITERATION","ANIMATION_START","TRANSITION_RUN","TRANSITION_START","TRANSITION_CANCEL","TRANSITION_END","topLevelEventsToReactNames","simpleEventPluginEvents","registerSimpleEvent","concurrentQueues","concurrentQueuesIndex","concurrentlyUpdatedLanes","finishQueueingConcurrentUpdates","endIndex","queue","pending","markUpdateLaneFromFiberToRoot","enqueueUpdate$1","enqueueConcurrentHookUpdate","getRootForUpdatedFiber","enqueueConcurrentRenderForLane","sourceFiber","isHidden","nestedUpdateCount","rootWithNestedUpdates","emptyContextObject","FiberNode","pendingProps","mode","createFiberImplClass","shouldConstruct","createWorkInProgress","current","resetWorkInProgress","createFiberFromTypeAndProps","owner","fiberTag","isHostHoistableType","createFiberFromFragment","elements","createFiberFromText","content","createFiberFromDehydratedFragment","dehydratedNode","createFiberFromPortal","portal","CapturedStacks","createCapturedValueAtFiber","source","existing","forkStack","forkStackIndex","treeForkProvider","treeForkCount","idStack","idStackIndex","treeContextProvider","treeContextId","treeContextOverflow","pushTreeFork","totalChildren","pushTreeId","baseIdWithLeadingBit","baseLength","numberOfOverflowBits","pushMaterializedTreeId","popTreeContext","restoreSuspendedTreeContext","suspendedContext","hydrationParentFiber","nextHydratableInstance","hydrationErrors","rootOrSingletonContext","HydrationMismatchException","throwOnHydrationMismatch","queueHydrationError","prepareToHydrateHostInstance","instance","listenToNonDelegatedEvent","mediaEventTypes","checkForUnmatchedText","popToNextHostParent","popHydrationState","JSCompiler_temp","shouldSetTextContent","getNextHydratableInstanceAfterHydrationBoundary","isSingletonScope","previousHydratableOnEnteringScopedSingleton","getNextHydratable","resetHydrationState","upgradeHydrationErrorsToRecoverable","queuedErrors","workInProgressRootRecoverableErrors","valueCursor","currentlyRenderingFiber$1","lastContextDependency","pushProvider","providerFiber","nextValue","popProvider","scheduleContextWorkOnParentPath","propagationRoot","propagateContextChanges","contexts","forcePropagateEntireTree","list","nextFiber","dependency","propagateParentContextChanges","isInsidePropagationBailout","currentParent","checkIfContextChanged","currentDependencies","prepareToReadContext","readContext","readContextForConsumer","readContextDuringReconciliation","consumer","AbortControllerLocal","listeners","signal","listener","scheduleCallback$2","NormalPriority","CacheContext","createCache","releaseCache","cache","currentEntangledListeners","currentEntangledPendingCount","currentEntangledLane","currentEntangledActionThenable","entangleAsyncAction","transition","entangledListeners","requestTransitionLane","resolve","pingEngtangledActionScope","chainThenableValue","thenableWithOverride","prevOnStartTransitionFinish","globalMostRecentTransitionTime","resumedCache","peekCacheFromPool","cacheResumedFromPreviousRender","workInProgressRoot","pushTransition","offscreenWorkInProgress","prevCachePool","getSuspendedCache","cacheFromPool","SuspenseException","SuspenseyCommitException","SuspenseActionException","noopSuspenseyCommitThenable","isThenableResolved","trackUsedThenable","thenableState","checkIfUseWrappedInAsyncCatch","fulfilledThenable","rejectedThenable","suspendedThenable","resolveLazy","lazyType","getSuspendedThenable","rejectedReason","thenableState$1","thenableIndexCounter$1","unwrapThenable","coerceRef","throwOnInvalidObjectTypeImpl","returnFiber","newChild","createChildReconciler","shouldTrackSideEffects","deleteChild","childToDelete","deletions","deleteRemainingChildren","currentFirstChild","mapRemainingChildren","existingChildren","useFiber","placeChild","newFiber","lastPlacedIndex","newIndex","placeSingleChild","updateTextNode","textContent","updateElement","elementType","updateFragment","updatePortal","fragment","createChild","updateSlot","oldFiber","updateFromMap","newIdx","reconcileChildrenArray","newChildren","resultingFirstChild","previousNewFiber","nextOldFiber","reconcileChildrenIterator","step","reconcileChildFibersImpl","firstChildFiber","reconcileChildFibers","mountChildFibers","hasForceUpdate","initializeUpdateQueue","cloneUpdateQueue","createUpdate","enqueueUpdate","updateQueue","executionContext","entangleTransitions","queueLanes","enqueueCapturedUpdate","capturedUpdate","newFirst","newLast","clone","didReadFromEntangledAsyncAction","suspendIfUpdateReadFromEntangledAsyncAction","entangledActionThenable","processUpdateQueue","workInProgress$jscomp$0","instance$jscomp$0","firstBaseUpdate","lastBaseUpdate","pendingQueue","lastPendingUpdate","firstPendingUpdate","newState","isHiddenUpdate","workInProgressRootRenderLanes","workInProgressRootSkippedLanes","callCallback","commitCallbacks","callbacks","currentTreeHiddenStackCursor","prevEntangledRenderLanesCursor","pushHiddenContext","entangledRenderLanes","reuseHiddenContextOnStack","popHiddenContext","suspenseHandlerStackCursor","shellBoundary","pushPrimaryTreeSuspenseHandler","handler","suspenseStackCursor","pushDehydratedActivitySuspenseHandler","pushOffscreenSuspenseHandler","reuseSuspenseHandlerOnStack","popSuspenseHandler","findFirstSuspended","row","state","isSuspenseInstancePending","isSuspenseInstanceFallback","currentlyRenderingFiber","currentHook","workInProgressHook","didScheduleRenderPhaseUpdate","didScheduleRenderPhaseUpdateDuringThisPass","shouldDoubleInvokeUserFnsInHooksDEV","localIdCounter","thenableIndexCounter","globalClientIdCounter","throwInvalidHookError","areHookInputsEqual","nextDeps","prevDeps","renderWithHooks","secondArg","nextRenderLanes","HooksDispatcherOnMount","HooksDispatcherOnUpdate","renderWithHooksAgain","finishRenderingHooks","ContextOnlyDispatcher","didRenderTooFewHooks","didReceiveUpdate","numberOfReRenders","HooksDispatcherOnRerender","TransitionAwareHostComponent","dispatcher","maybeThenable","useThenable","checkDidRenderIdHook","didRenderIdHook","bailoutHooks","resetHooksOnUnwind","mountWorkInProgressHook","hook","updateWorkInProgressHook","nextCurrentHook","nextWorkInProgressHook","createFunctionComponentUpdateQueue","use","useMemoCache","memoCache","basicStateReducer","updateReducer","updateReducerImpl","baseQueue","baseFirst","newBaseQueueFirst","newBaseQueueLast","didReadFromEntangledAsyncAction$60","revertLane","rerenderReducer","dispatch","lastRenderPhaseUpdate","updateSyncExternalStore","isHydrating$jscomp$0","snapshotChanged","updateEffect","subscribeToStore","pushSimpleEffect","updateStoreInstance","pushStoreConsistencyCheck","renderedSnapshot","nextSnapshot","checkIfSnapshotChanged","forceStoreRerender","latestGetSnapshot","scheduleUpdateOnFiber","mountStateImpl","initialStateInitializer","updateOptimisticImpl","dispatchActionState","actionQueue","setPendingState","setState","isRenderPhaseUpdate","actionNode","runActionStateAction","prevState","handleActionReturnValue","onActionError","error$66","nextState","onActionSuccess","notifyActionListeners","actionStateReducer","oldState","mountActionState","initialStateProp","ssrFormState","JSCompiler_inline_result$jscomp$0","inRootOrSingleton","dispatchSetState","dispatchOptimisticSetState","updateActionState","stateHook","updateActionStateImpl","currentStateHook","actionStateActionEffect","rerenderActionState","updateRef","mountEffectImpl","fiberFlags","hookFlags","updateEffectImpl","mountEffect","useEffectEventImpl","componentUpdateQueue","events","updateEvent","updateInsertionEffect","updateLayoutEffect","imperativeHandleEffect","refCleanup","updateImperativeHandle","mountDebugValue","updateCallback","updateMemo","nextCreate","mountDeferredValueImpl","requestDeferredLane","updateDeferredValueImpl","prevValue","startTransition","pendingState","finishedState","thenableForFinishedState","dispatchSetStateInternal","requestUpdateLane","startHostTransition","formFiber","formData","ensureFormComponentIsStateful","requestFormReset$1","existingStateHook","initialResetState","useHostTransitionStatus","updateId","updateRefresh","refreshCache","provider","root$69","dispatchReducerAction","enqueueRenderPhaseUpdate","entangleTransitionUpdate","currentState","eagerState","throwIfDuringRender","identifierPrefix","idWithLeadingBit","booleanOrThenable","applyDerivedStateFromProps","getDerivedStateFromProps","nextProps","classComponentUpdater","checkShouldComponentUpdate","oldProps","newProps","nextContext","callComponentWillReceiveProps","resolveClassComponentProps","baseProps","propName$73","defaultOnUncaughtError","defaultOnCaughtError","defaultOnRecoverableError","logUncaughtError","errorInfo","onUncaughtError","e$74","logCaughtError","boundary","onCaughtError","e$75","createRootErrorUpdate","createClassErrorUpdate","initializeClassErrorUpdate","getDerivedStateFromError","legacyErrorBoundariesThatAlreadyFailed","stack","throwException","rootRenderLanes","renderDidSuspendDelayIfPossible","workInProgressRootExitStatus","attachPingListener","wrapperError","workInProgressRootConcurrentErrors","SelectiveHydrationException","reconcileChildren","nextChildren","updateForwardRef","propsWithoutRef","bailoutOnAlreadyFinishedWork","updateMemoComponent","updateSimpleMemoComponent","checkScheduledUpdateOrContext","prevProps","updateFunctionComponent","updateOffscreenComponent","deferHiddenOffscreenComponent","bailoutOffscreenComponent","nextBaseLanes","remainingChildLanes","mountActivityChildren","mountWorkInProgressOffscreenFiber","retryActivityComponentWithoutHydrating","updateActivityComponent","didSuspend","canHydrateHydrationBoundary","dehydrated","markRef","replayFunctionComponent","updateClassComponent","contextType","unresolvedOldProps","oldContext","contextType$jscomp$0","mountHostRootWithoutHydrating","SUSPENDED_MARKER","mountSuspenseOffscreenState","getRemainingWorkInPrimaryTree","primaryTreeDidDefer","workInProgressDeferredLane","updateSuspenseComponent","showFallback","nextPrimaryChildren","mountSuspensePrimaryChildren","retrySuspenseComponentWithoutHydrating","digest","primaryChildren","offscreenProps","scheduleSuspenseWorkOnFiber","initSuspenseListRenderState","isBackwards","tail","lastContentRow","tailMode","renderState","updateSuspenseListComponent","revealOrder","suspenseContext","shouldForceFallback","attemptEarlyBailoutIfNoScheduledUpdate","state$102","didSuspendBefore","beginWork","$$typeof","getResource","getOwnerDocumentFromRootContainer","setInitialProperties","resolveSingletonInstance","canHydrateInstance","canHydrateTextInstance","markUpdate","preloadInstanceAndSuspendIfNeeded","shouldRemainOnPreviousScreen","preloadResourceAndSuspendIfNeeded","resource","preloadResource","scheduleRetryEffect","retryQueue","workInProgressSuspendedRetryLanes","cutOffTailIfNeeded","hasRenderedATailFallback","lastTailNode","lastTailNode$106","bubbleProperties","completedWork","didBailout","newChildLanes","subtreeFlags","child$107","completeWork","nextResource","ownerDocument","listenToAllSupportedEvents","workInProgressRootRenderTargetTime","unwindWork","unwindInterruptedWork","interruptedWork","commitHookEffectListMount","flags","finishedWork","lastEffect","firstEffect","captureCommitPhaseError","commitHookEffectListUnmount","nearestMountedAncestor$jscomp$0","destroy","nearestMountedAncestor","destroy_","commitClassCallbacks","safelyCallComponentWillUnmount","safelyAttachRef","instanceToUse","safelyDetachRef","error$140","commitHostMount","commitHostUpdate","domElement","updateProperties","isHostParent","getHostSibling","insertOrAppendPlacementNodeIntoContainer","before","insertOrAppendPlacementNode","commitHostSingletonAcquisition","singleton","attributes","offscreenSubtreeIsHidden","offscreenSubtreeWasHidden","needsFormReset","PossiblyWeakSet","nextEffect","commitBeforeMutationEffects","eventsEnabled","_enabled","selection","anchorOffset","focusNode","indexWithinAnchor","indexWithinFocus","next","selectionInformation","resolvedPrevProps","clearContainerSparingly","commitLayoutEffectOnFiber","finishedRoot","recursivelyTraverseLayoutEffects","error$139","commitActivityHydrationCallbacks","commitSuspenseHydrationCallbacks","retryDehydratedSuspenseBoundary","registerSuspenseInstanceRetry","prevOffscreenSubtreeWasHidden","recursivelyTraverseReappearLayoutEffects","detachFiberAfterEffects","hostParent","hostParentIsContainer","recursivelyTraverseDeletionEffects","commitDeletionEffectsOnFiber","deletedFiber","prevHostParent","prevHostParentIsContainer","releaseSingletonInstance","clearHydrationBoundary","retryIfBlockedOn","getRetryCache","retryCache","attachSuspenseRetryListeners","wakeables","wakeable","retry","resolveRetryWakeable","recursivelyTraverseMutationEffects","root$jscomp$0","parentFiber","commitMutationEffectsOnFiber","currentHoistableRoot","commitReconciliationEffects","hoistableRoot","currentResource","maybeNodes","getHydratableHoistableCache","mountHoistable","acquireResource","tagCaches","getHoistableRoot","recursivelyResetForms","globalMostRecentFallbackTime","wasHidden","prevOffscreenSubtreeIsHidden","recursivelyTraverseDisappearLayoutEffects","display","hideOrUnhideDehydratedBoundary","hostParentFiber","parent$141","before$142","parent$143","before$144","finishedRoot$jscomp$0","includeWorkInProgressEffects","hiddenCallbacks","commitOffscreenPassiveMountEffects","previousCache","commitCachePassiveMountEffect","recursivelyTraversePassiveMountEffects","committedLanes","committedTransitions","commitPassiveMountOnFiber","_finishedWork$memoize2","id","onPostCommit","recursivelyTraverseAtomicPassiveEffects","recursivelyTraverseReconnectPassiveEffects","committedLanes$jscomp$0","committedTransitions$jscomp$0","suspenseyCommitFlag","recursivelyAccumulateSuspenseyCommit","suspendedState","accumulateSuspenseyCommitOnFiber","suspendResource","previousHoistableRoot","detachAlternateSiblings","previousFiber","recursivelyTraversePassiveUnmountEffects","commitPassiveUnmountEffectsInsideOfDeletedTree_begin","commitPassiveUnmountOnFiber","recursivelyTraverseDisconnectPassiveEffects","deletedSubtreeRoot","sibling","DefaultAsyncDispatcher","resourceType","cacheForType","PossiblyWeakMap","workInProgressSuspendedReason","workInProgressThrownValue","workInProgressRootDidSkipSuspendedSiblings","workInProgressRootIsPrerendering","workInProgressRootDidAttachPingListener","workInProgressRootInterleavedUpdatedLanes","workInProgressRootPingedLanes","workInProgressRootDidIncludeRecursiveRenderUpdate","workInProgressTransitions","pendingEffectsStatus","pendingEffectsRoot","pendingFinishedWork","pendingEffectsLanes","pendingEffectsRemainingLanes","pendingPassiveTransitions","pendingRecoverableErrors","prepareFreshStack","markRootSuspended","ensureRootIsScheduled","performWorkOnRoot","forceSync","shouldTimeSlice","exitStatus","renderRootConcurrent","renderRootSync","renderWasConcurrent","isRenderConsistentWithExternalStores","wasRootDehydrated","scheduleTimeout","commitRootWhenReady","recoverableErrors","transitions","didIncludeRenderPhaseUpdate","didSkipSuspendedSiblings","suspendedCommitReason","completedRenderStartTime","completedRenderEndTime","timeoutOffset","waitForCommitToBeReady","commitRoot","check","didAttemptEntireTree","index$6","flushSyncWorkAcrossRoots_impl","resetWorkInProgressStack","timeoutHandle","cancelTimeout","allEntangledLanes","index$4","handleThrow","thrownValue","pushDispatcher","prevDispatcher","pushAsyncDispatcher","prevAsyncDispatcher","shouldYieldForPrerendering","prevExecutionContext","unitOfWork","reason","throwAndUnwindWorkLoop","workLoopSync","thrownValue$165","performUnitOfWork","replaySuspendedUnitOfWork","hostFiber","completeUnitOfWork","workLoopConcurrentByScheduler","thrownValue$167","suspendedReason","unwindUnitOfWork","skipSiblings","flushPendingEffects","scheduleCallback$1","flushPassiveEffects","flushMutationEffects","flushLayoutEffects","flushSpawnedWork","rootMutationHasEffect","priorSelectionInformation","curFocusedElem","priorFocusedElem","priorSelectionRange","win","start$jscomp$0","end$jscomp$0","startMarker","endMarker","range","rootHasLayoutEffect","releaseRootPooledCache","onRecoverableError","recoverableError","renderPriority","captureCommitPhaseErrorOnRoot","rootFiber","pingCache","threadIDs","pingSuspendedRoot","retryTimedOutBoundary","boundaryFiber","retryLane","firstScheduledRoot","lastScheduledRoot","didScheduleMicrotask","mightHavePendingSyncWork","isFlushingWork","currentEventTransitionLane","scheduleImmediateRootScheduleTask","syncTransitionLanes","onlyLegacy","didPerformSomeWork","root$170","performSyncWorkOnRoot","processRootScheduleInImmediateTask","processRootScheduleInMicrotask","shouldAttemptEagerTransition","prev","scheduleTaskForRootDuringMicrotask","index$5","expirationTime","performWorkOnRootViaSchedulerTask","didTimeout","originalCallbackNode","workInProgressRootRenderLanes$jscomp$0","scheduleMicrotask","actionScopeLane","coerceFormActionProp","actionProp","createFormDataWithSubmitter","submitter","temp","extractEvents$1","maybeTargetInst","i$jscomp$inline_1577","eventName$jscomp$inline_1578","domEventName$jscomp$inline_1579","capitalizedEvent$jscomp$inline_1580","nonDelegatedEvents","eventSystemFlags","_dispatchQueue$i","previousInstance","i$jscomp$0","_dispatchListeners$i","currentTarget","targetElement","listenerSetKey","addTrappedEventListener","listenToNativeEvent","isCapturePhaseListener","listeningMarker","rootContainerElement","targetContainer","listenerWrapper","dispatchDiscreteEvent","dispatchContinuousEvent","dispatchEvent","dispatchEventForPluginEventSystem","targetInst$jscomp$0","ancestorInst","nodeTag","grandTag","SyntheticEventCtor","inCapturePhase","accumulateTargetOnly","reactEventName","lastHostComponent","_instance","createDispatchListener","getParent","tempB","accumulateEnterLeaveListenersForEvent","getTargetInstFunc","handleEventFunc","fallbackData","eventType","targetFiber","captureName","_instance2","common","_instance3","NORMALIZE_NEWLINES_REGEX","NORMALIZE_NULL_AND_REPLACEMENT_REGEX","normalizeMarkupForTextOrAttribute","markup","serverText","clientText","setProp","setPropOnCustomElement","hasSrc","hasSrcSet","propKey","propValue$184","lastProps","lastProp","propKey$201","propKey$217","propKey$222","propKey$227","propKey$232","isLikelyStaticResource","initiatorType","estimateBandwidth","bits","resourceEntries","entry","transferSize","duration","overlapEntry","overlapStartTime","overlapTransferSize","overlapInitiatorType","namespaceURI","parentNamespace","currentPopstateTransitionEvent","localPromise","handleErrorInNextTick","parentInstance","hydrationInstance","depth","nextNode","node$jscomp$0","nextNode$jscomp$0","suspenseInstance","anyProps","nodeType","data","targetInstance","rootContainerInstance","preloadPropsMap","preconnectsSet","previousDispatcher","flushSyncWork","requestFormReset","prefetchDNS","preconnect","preload","preloadModule","preinitScript","preinitStyle","preinitModuleScript","previousWasRendering","wasRendering","formInst","globalDocument","preconnectAs","rel","limitedEscapedHref","preloadSelector","getStyleKey","getScriptKey","getStylesheetSelectorFromKey","getScriptSelectorFromKey","precedence","adoptPreloadPropsForStylesheet","link","reject","insertStylesheet","src","scripts","adoptPreloadPropsForScript","currentProps","styles$243","resource$244","preloadStylesheet","stylesheetPropsFromRawProps","rawProps","preloadProps","styleProps","instance$249","linkInstance","nodes","prior","stylesheetProps","scriptProps","keyAttribute","caches","nodeKey","hostContext","onUnsuspend","estimatedBytesWithinLimit","insertSuspendedStylesheets","commit","stylesheetTimer","unsuspend","imgTimer","precedencesByRoot","insertStylesheetIntoRoot","precedences","FiberRootNode","hydrate","onDefaultTransitionIndicator","formState","createFiberRoot","initialChildren","hydrationCallbacks","isStrictMode","getContextForSubtree","parentComponent","updateContainerImpl","markRetryLaneImpl","markRetryLaneIfNotHydrated","attemptContinuousHydration","attemptHydrationAtCurrentPriority","blockedOn","findInstanceBlockingEvent","return_targetInst","clearIfContinuousEvent","queueIfContinuousEvent","discreteReplayableEvents","findInstanceBlockingTarget","hasScheduledReplayAttempt","queuedFocus","queuedDrag","queuedMouse","queuedPointers","queuedPointerCaptures","queuedExplicitHydrationTargets","accumulateOrCreateContinuousQueuedReplayableEvent","existingQueuedEvent","pointerId","attemptExplicitHydrationTarget","queuedTarget","attemptReplayContinuousQueuedEvent","queuedEvent","targetContainers","nextBlockedOn","nativeEventClone","attemptReplayContinuousQueuedEventInMap","map","replayUnblockedEvents","scheduleCallbackIfUnblocked","unblocked","lastScheduledReplayQueue","scheduleReplayQueueIfNeeded","formReplayingQueue","submitterOrAction","unblock","formProps","defaultOnDefaultTransitionIndicator","handleNavigate","pendingResolve","handleNavigateComplete","isCancelled","startFakeNavigation","currentEntry","ReactDOMRoot","internalRoot","ReactDOMHydrationRoot","isomorphicReactPackageVersion$jscomp$inline_1840","componentOrElement","internals$jscomp$inline_2347","hook$jscomp$inline_2348","reactDomClient_production","clientModule","BridgeInterface","_positionSec","_song","_id","_fromIndex","_toIndex","_bus","_gainDb","_muted","_effectName","_query","_path","_updates","_prefs","_requestId","_domain","_callback","EFFECTS_DEFAULTS","AUTOTUNE_DEFAULTS","AUDIO_DEVICE_DEFAULTS","LLM_DEFAULTS","CREATOR_DEFAULTS","WAVEFORM_DEFAULTS","UI_DEFAULTS","ElectronBridge","song","songId","bus","gainDb","kaiPlayer","muted","stemId","stream","devices","audioDevices","device","deviceType","deviceId","preferences","iemMonoVocals","micToSpeakers","enableMic","settings","effectName","enabled","query","path","songData","audioFiles","blob","downloadUrl","updates","metadata","lyrics","format","r","s","prefs","cleanPrefs","player","wrappedCallback","requestId","password","latencyMs","mixer","effects","domain","PlayerContext","createContext","PlayerProvider","currentSong","setCurrentSong","useState","isPlaying","setIsPlaying","currentPosition","setCurrentPosition","setDuration","useEffect","handlePlaybackState","handleSongChanged","jsx","usePlayerState","useContext","AudioContext","AudioProvider","setKaiPlayer","setPlayer","setDevices","useAudio","SettingsContext","SettingsProvider","devicePreferences","setDevicePreferences","waveformPreferences","setWaveformPreferences","autoTunePreferences","setAutoTunePreferences","useSettings","useAudioEngine","mounted","initializeAudio","KAIPlayer","__vitePreload","PlayerController","audioEngine","playerController","handleSetMasterGain","handleToggleMasterMute","handleSetMasterMute","appState","msg","handleSongLoaded","handleSongData","isSameSong","isCDG","loadCDGSong","loadKAISong","handleTogglePlayback","handleRestart","handleSetPosition","positionSec","handleWaveformSettings","useSettingsPersistence","isLoadedRef","useRef","loadSettings","waveform","autotune","useWebRTC","webrtcManagerRef","loadWebRTC","module","setupIPCHandlers","manager","answer","candidate","AppInitializer","AppRoot","getFormatIcon","formatDuration","seconds","minutes","remainingSeconds","SongInfoModal","onClose","jsxs","e","LibraryPanel","bridge","showSetFolder","showFullRefresh","songs","setSongs","filteredSongs","setFilteredSongs","currentLetter","setCurrentLetter","availableLetters","setAvailableLetters","currentPage","setCurrentPage","searchTerm","setSearchTerm","songsFolder","setSongsFolder","loading","setLoading","modalSong","setModalSong","scanProgress","setScanProgress","pageSize","loadLetterPage","useCallback","letter","page","songsList","sortedSongs","artist","firstChar","artistA","artistB","calculateAvailableLetters","shouldAutoSelect","letterSet","letters","l","firstLetter","loadLibrary","folder","librarySongs","handleScanProgress","handleScanComplete","handleFolderSet","handleSongUpdated","prevSongs","songIndex","updatedSongs","prevFiltered","updatedFiltered","handleLibraryRefreshed","handleSearch","term","searchLower","results","handleSetFolder","handleSync","handleRefresh","handleAddToQueue","handleShowInfo","totalPages","startIndex","currentPageSongs","getPageNumbers","_","pages","halfRange","startPage","endPage","allLetters","Fragment","isAvailable","isActive","EffectsPanel","currentEffect","disabledEffects","currentCategory","onSearch","onCategoryChange","onSelectEffect","onRandomEffect","onEnableEffect","onDisableEffect","filteredEffects","effect","categories","sanitizeFilename","cat","isDisabled","screenshotPath","EffectsPanelWrapper","setEffects","setCurrentEffect","setDisabledEffects","setCurrentCategory","loadEffects","presets","parseMetadata","author","displayName","category","parts","nameLower","effectsList","loadDisabledEffects","waveformPrefs","selectEffect","randomEffect","enabledEffects","randomIndex","enableEffect","updated","disableEffect","handleGetEffectsList","serializableEffects","handleGetCurrentEffect","handleGetDisabledEffects","onSelectFromAdmin","onNextFromAdmin","nextIndex","onPreviousFromAdmin","currentIndex","prevIndex","onRandomFromAdmin","onDisableFromAdmin","onEnableFromAdmin","RequestsList","requests","onApprove","onReject","handleApprove","handleReject","pendingRequests","otherRequests","request","statusColors","badgeColors","RequestsListWrapper","setRequests","loadRequests","interval","onNewRequest","onApproved","onRejected","requestsList","LyricsEditorCanvas","lyricsData","selectedLineIndex","onLineSelect","vocalsWaveform","songDuration","canvasRef","lyricRectanglesRef","CANVAS_WIDTH","CANVAS_HEIGHT","canvas","ctx","width","height","drawWaveform","backupLines","regularLines","line","drawLyricRectangle","playheadX","triangleHeight","triangleWidth","centerY","scale","lineData","lineIndex","fillColor","outlineColor","isSelected","startX","rectWidth","rectMargin","rectHeight","handleCanvasClick","rect","scaleX","scaleY","lineElement","LineDetailCanvas","selectedLine","lineStart","lineEnd","lineDuration","drawWaveformSegment","drawWordRectangles","endTime","totalDuration","samplesPerSecond","startSample","endSample","lineWaveform","wordTimings","wordStart","wordEnd","PortalSelect","onChange","placeholder","className","isOpen","setIsOpen","position","setPosition","focusedIndex","setFocusedIndex","triggerRef","dropdownRef","DROPDOWN_MAX_HEIGHT","selectedOption","opt","displayText","selectedIndex","updatePosition","spaceBelow","spaceAbove","estimatedHeight","openUpward","handleClickOutside","handleScroll","handleSelect","optionValue","handleKeyDown","char","idx","createPortal","option","SINGER_OPTIONS","SMALL_INCREMENT","LARGE_INCREMENT","REPEAT_DELAY","REPEAT_INTERVAL","PortalTooltip","targetRect","visible","TimeAdjustButton","direction","onAdjust","tooltip","isStart","showTooltip","setShowTooltip","tooltipRect","setTooltipRect","buttonRef","intervalRef","timeoutRef","tooltipTimeoutRef","doAdjust","delta","increment","startRepeat","stopRepeat","handleMouseEnter","handleMouseLeave","symbol","tooltipText","IconButton","icon","onClick","disabled","wrapperRef","LineNumberButton","LyricLine","onSelect","onUpdate","onDelete","onAddAfter","onSplit","onPlaySection","onAdjustStartTime","onAdjustEndTime","canAddAfter","canSplit","hasOverlap","singer","isBackup","handleStartTimeChange","handleEndTimeChange","handleTextChange","handleSingerChange","newSinger","_backup","lineWithoutBackup","handleToggleDisabled","handleLineNumberClick","containerClasses","Toast","message","typeStyles","iconName","LyricRejection","rejection","rejectionIndex","onAccept","handleCopy","formatTime","mins","secs","LyricSuggestion","suggestion","suggestionIndex","canSplitLine","punctuationMatch","splitIndex","firstLineText","secondLineText","splitLine","textWords","timingWordCount","splitWordIndex","lastWordOfFirstLine","splitTime","firstLine","newLineStart","secondLineWordTiming","timing","absoluteStart","absoluteEnd","secondLine","firstLineRatio","SongEditor","searchResults","setSearchResults","isSearching","setIsSearching","loadedSong","setLoadedSong","setSongData","isSaving","setIsSaving","activeTab","setActiveTab","setMetadata","setLyricsData","originalLyricsData","setOriginalLyricsData","setSelectedLineIndex","setSongDuration","rejections","setRejections","suggestions","setSuggestions","hasChanges","setHasChanges","audioElements","setAudioElements","audioContext","setAudioContext","playingLineEndTime","setPlayingLineEndTime","setVocalsWaveform","animationFrameRef","toast","setToast","checkOverlap","currentLine","previousLine","currentIsBackup","previousIsBackup","currentStart","previousEnd","handleLineUpdate","updatedLine","handlePlayLineSection","audio","playPromises","cleanupAudio","selectPreviousEnabledLine","selectNextEnabledLine","playCurrentLine","adjustStartTime","newStart","adjustEndTime","currentEnd","newEnd","handleLoadSong","hasLyrics","sortedLyrics","aStart","bStart","corrections","kaiRejections","kaiSuggestions","loadAudioFiles","file","gainNode","vocalsFile","vocalsElement","el","setupAudioPlaybackMonitoring","analyzeVocalsWaveform","handlePause","audioElement","rawAudioData","arrayBuffer","tempContext","channelData","targetSamples","downsampleFactor","max","j","togglePlayback","toggleMute","newMuted","showToast","handleLineDelete","handleAddLineAfter","nextLine","currentEndTime","gap","usableGap","margin","newLine","handleLineSplit","splitResult","handleAddLineAtStart","canAddLineAtStart","canAddLineAfter","handleMetadataChange","field","handleSave","handleClose","handleExportLyrics","lyricsText","handleResetLyrics","handleAcceptRejection","targetLineIndex","handleDeleteRejection","handleAcceptSuggestion","insertionIndex","handleDeleteSuggestion","MixerPanel","mixerState","onSetMasterGain","onToggleMasterMute","onGainChange","onMuteToggle","handleGainChange","handleMuteToggle","buses","handleGainChangeLocal","busId","handleMuteToggleLocal","handleDoubleClick","gain","AudioDeviceSettings","selected","onDeviceChange","onSettingChange","onRefreshDevices","paOptions","dev","iemOptions","inputOptions","MixerTab","setMixerState","setAudioDevices","selectedDevices","setSelectedDevices","audioSettings","setAudioSettings","unsubscribe","busLevelMixer","outputDevices","d","inputDevices","restored","savedDevice","deviceList","matchedDevice","lowerType","handleDeviceChange","handleSettingChange","setting","handleRefreshDevices","TooltipButton","iconSize","QueueList","currentSongId","onPlayFromQueue","onRemoveFromQueue","onLoad","onRemove","onClearQueue","onClear","onShuffleQueue","onReorderQueue","onQuickSearch","draggedIndex","setDraggedIndex","dragOverIndex","setDragOverIndex","handlePlay","handleRemove","handleClear","handleDragStart","handleDragOver","handleDragLeave","handleDrop","dropIndex","item","targetIndex","handleDragEnd","isCurrentSong","requesterText","isDragging","isDragOver","itemClasses","QuickSearch","requester","showSearchDropdown","setShowSearchDropdown","searchInputRef","handleQuickSearch","handleAddFromSearch","queueItem","QueueTab","setQueue","setCurrentIndex","queueData","q","handlePlayFromQueue","handleRemoveFromQueue","handleClearQueue","handleShuffleQueue","handleReorderQueue","ThemeToggle","theme","setTheme","savedTheme","applyTheme","mediaQuery","handleChange","newTheme","cycleTheme","themes","nextTheme","getIcon","getTitle","SongInfoBar","onMenuClick","sidebarCollapsed","formatIcon","songDisplay","SongInfoBarWrapper","setSidebarCollapsed","collapsed","sidebar","handleMenuClick","newCollapsedState","PlayerControls","playback","isLoading","onPlay","onPause","onRestart","onNext","onSeek","onPreviousEffect","onNextEffect","onOpenCanvasWindow","interpolatedPosition","setInterpolatedPosition","lastReportedPosition","lastReportedTime","animate","elapsed","newPosition","truncateEffectName","handleProgressClick","progress","usePlayer","TransportControlsWrapper","_bridge","play","pause","restart","seek","handleEffectChanged","handlePreviousEffect","handleNextEffect","handleOpenCanvasWindow","StatusBar","statusText","_setStatusText","webUrl","setWebUrl","latency","setLatency","xruns","setXruns","unsubscribers","unsubLatency","unsubXrun","pollInterval","unsub","handleUrlClick","TabNavigation","requestsCount","tabs","handleTabClick","tabId","pane","targetPane","tab","canPromise","toSJISFunction","CODEWORDS_COUNT","utils","version","digit","f","kanji","fromString","string","level","BitBuffer","bufIndex","num","bit","bitBuffer","BitMatrix","col","reserved","bitMatrix","getSymbolSize","posCount","intervals","positions","coords","pos","posLength","FINDER_PATTERN_SIZE","finderPattern","PenaltyScores","mask","points","sameCountCol","sameCountRow","lastCol","lastRow","bitsCol","bitsRow","darkCount","modulesCount","getMaskAt","maskPattern","pattern","setupFormatFunc","numPatterns","bestPattern","lowerPenalty","penalty","ECLevel","EC_BLOCKS_TABLE","EC_CODEWORDS_TABLE","errorCorrectionCode","errorCorrectionLevel","EXP_TABLE","LOG_TABLE","galoisField","GF","p1","p2","coeff","divident","divisor","degree","poly","Polynomial","ReedSolomonEncoder","paddedData","remainder","buff","reedSolomonEncoder","versionCheck","numeric","alphanumeric","byte","regex","TEST_KANJI","TEST_NUMERIC","TEST_ALPHANUMERIC","str","VersionCheck","Regex","dataStr","Utils","ECCode","Mode","require$$3","require$$4","G18","G18_BCH","getBestVersionForDataLength","currentVersion","getReservedBitsCount","getTotalBitsFromDataArray","segments","totalBits","reservedBits","getBestVersionForMixedData","totalCodewords","ecTotalCodewords","dataTotalCodewordsBits","usableBits","seg","ecl","G15","G15_MASK","G15_BCH","formatInfo","NumericData","group","remainingNum","numericData","ALPHA_NUM_CHARS","AlphanumericData","alphanumericData","ByteData","byteData","KanjiData","kanjiData","dijkstra","graph","predecessors","costs","open","closest","u","cost_of_s_to_u","adjacent_nodes","cost_of_e","cost_of_s_to_u_plus_cost_of_e","cost_of_s_to_v","first_visit","opts","T","t","cost","require$$5","require$$6","require$$7","getStringByteLength","getSegments","getSegmentsFromString","numSegs","alphaNumSegs","byteSegs","kanjiSegs","s1","s2","obj","getSegmentBitsLength","mergeSegments","segs","acc","curr","prevSeg","buildNodes","buildGraph","table","prevNodeIds","nodeGroup","currentNodeIds","prevNodeId","buildSingleSegment","modesHint","bestMode","optimizedSegs","AlignmentPattern","FinderPattern","MaskPattern","require$$8","Version","require$$9","FormatInfo","require$$10","require$$11","Segments","require$$12","setupFinderPattern","matrix","setupTimingPattern","setupAlignmentPattern","setupVersionInfo","mod","setupFormatInfo","setupData","inc","bitIndex","byteIndex","dark","createData","buffer","remainingByte","createCodewords","dataTotalCodewords","ecTotalBlocks","blocksInGroup2","blocksInGroup1","totalCodewordsInGroup1","dataCodewordsInGroup1","dataCodewordsInGroup2","ecCount","rs","dcData","ecData","maxDataSize","dataSize","createSymbol","estimatedVersion","rawSegments","bestVersion","dataBits","moduleCount","modules","qrcode","hex2rgba","hex","hexCode","hexValue","qrSize","imgData","qr","symbolSize","scaledMargin","palette","posDst","pxColor","iSrc","jSrc","clearCanvas","getCanvasElement","qrData","canvasEl","image","rendererOpts","getColorAttrib","color","attrib","alpha","svgCmd","cmd","qrToPath","moveBy","newRow","lineLength","svgTag","cb","qrcodesize","bg","viewBox","QRCode","CanvasRenderer","SvgRenderer","renderCanvas","renderFunc","args","argsNum","isLastArgCb","browser","generateQRCode","defaultOptions","generateQRCodeCanvas","ServerTab","serverUrl","setServerUrl","serverPort","setServerPort","setSettings","adminPassword","setAdminPassword","hasPassword","setHasPassword","setPendingRequests","totalRequests","setTotalRequests","setMessage","qrCodeDataUrl","setQrCodeDataUrl","updateRequestsStats","serverSettings","passwordSet","handleSaveSettings","showMessage","handleSetPassword","handleOpenServer","handleOpenAdmin","handleClearRequests","isServerRunning","VisualizationSettings","externalWaveform","externalAutotune","onWaveformChange","onAutotuneChange","waveformSettings","setWaveformSettings","autotuneSettings","setAutotuneSettings","unsubWaveform","unsubAutotune","handleWaveformChange","newSettings","handleAutotuneChange","toggleCanvasFullscreen","karaokeCanvas","STYLES","Spinner","sizeClasses","ErrorDisplay","onDismiss","MissingLinesDetails","missingLines","SongTitle","title","formatProviderName","CreateTab","status","setStatus","components","setComponents","installProgress","setInstallProgress","setError","activeSubTab","setActiveSubTab","selectedFile","setSelectedFile","fileLoading","setFileLoading","conversionProgress","setConversionProgress","completedFile","setCompletedFile","llmStats","setLlmStats","processingTime","setProcessingTime","consoleLog","setConsoleLog","isLyricsOnlyMode","setIsLyricsOnlyMode","consoleEndRef","conversionStartTimeRef","setOptions","llmSettings","setLlmSettings","llmTestResult","setLlmTestResult","outputToSongsFolder","setOutputToSongsFolder","whisperModel","setWhisperModel","enableCrepe","setEnableCrepe","checkComponents","outputToSongs","whisper","crepe","onInstallProgress","_event","onInstallError","onConversionProgress","onConversionConsole","onConversionComplete","onConversionError","handleInstall","handleSelectFile","handleSearchLyrics","handleStartConversion","outputDir","lyricsOnlyMode","handleCancelConversion","handleCreateAnother","handleOpenInEditor","editorPane","handleSaveLLMSettings","handleTestLLMConnection","componentDisplay","label","comp","isInstalled","corr","App","retryInterval","retryCount","maxRetries","updateQRCode","showQrCode","updateQueueDisplay","displayQueue","queueToDisplay","nextSongs","pendingCount","verifyButterchurn","testCanvas","testGL"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77],"sources":["../../../node_modules/react/cjs/react-jsx-runtime.production.js","../../../node_modules/react/jsx-runtime.js","../../../node_modules/react/cjs/react.production.js","../../../node_modules/react/index.js","../../../node_modules/scheduler/cjs/scheduler.production.js","../../../node_modules/scheduler/index.js","../../../node_modules/react-dom/cjs/react-dom.production.js","../../../node_modules/react-dom/index.js","../../../node_modules/react-dom/cjs/react-dom-client.production.js","../../../node_modules/react-dom/client.js","../../shared/adapters/BridgeInterface.js","../../shared/defaults.js","../adapters/ElectronBridge.js","../../shared/contexts/PlayerContext.jsx","../../shared/contexts/AudioContext.jsx","../../shared/contexts/SettingsContext.jsx","../../shared/hooks/useAudioEngine.js","../../shared/hooks/useSettingsPersistence.js","../../shared/hooks/useWebRTC.js","../components/AppRoot.jsx","../../shared/formatUtils.js","../../shared/components/LibraryPanel.jsx","../../shared/components/EffectsPanel.jsx","../components/EffectsPanelWrapper.jsx","../../shared/components/RequestsList.jsx","../components/RequestsListWrapper.jsx","../../shared/components/LyricsEditorCanvas.jsx","../../shared/components/LineDetailCanvas.jsx","../../shared/components/PortalSelect.jsx","../../shared/components/LyricLine.jsx","../../shared/components/Toast.jsx","../../shared/components/LyricRejection.jsx","../../shared/components/LyricSuggestion.jsx","../../shared/utils/lyricsUtils.js","../../shared/components/SongEditor.jsx","../../shared/components/MixerPanel.jsx","../components/PortalSelect.jsx","../components/AudioDeviceSettings.jsx","../components/MixerTab.jsx","../../shared/components/QueueList.jsx","../../shared/components/QuickSearch.jsx","../components/QueueTab.jsx","../../shared/components/ThemeToggle.jsx","../../shared/components/SongInfoBar.jsx","../components/SongInfoBarWrapper.jsx","../../shared/components/PlayerControls.jsx","../../shared/hooks/usePlayer.js","../components/TransportControlsWrapper.jsx","../components/StatusBar.jsx","../components/TabNavigation.jsx","../../../node_modules/qrcode/lib/can-promise.js","../../../node_modules/qrcode/lib/core/utils.js","../../../node_modules/qrcode/lib/core/error-correction-level.js","../../../node_modules/qrcode/lib/core/bit-buffer.js","../../../node_modules/qrcode/lib/core/bit-matrix.js","../../../node_modules/qrcode/lib/core/alignment-pattern.js","../../../node_modules/qrcode/lib/core/finder-pattern.js","../../../node_modules/qrcode/lib/core/mask-pattern.js","../../../node_modules/qrcode/lib/core/error-correction-code.js","../../../node_modules/qrcode/lib/core/galois-field.js","../../../node_modules/qrcode/lib/core/polynomial.js","../../../node_modules/qrcode/lib/core/reed-solomon-encoder.js","../../../node_modules/qrcode/lib/core/version-check.js","../../../node_modules/qrcode/lib/core/regex.js","../../../node_modules/qrcode/lib/core/mode.js","../../../node_modules/qrcode/lib/core/version.js","../../../node_modules/qrcode/lib/core/format-info.js","../../../node_modules/qrcode/lib/core/numeric-data.js","../../../node_modules/qrcode/lib/core/alphanumeric-data.js","../../../node_modules/qrcode/lib/core/byte-data.js","../../../node_modules/qrcode/lib/core/kanji-data.js","../../../node_modules/dijkstrajs/dijkstra.js","../../../node_modules/qrcode/lib/core/segments.js","../../../node_modules/qrcode/lib/core/qrcode.js","../../../node_modules/qrcode/lib/renderer/utils.js","../../../node_modules/qrcode/lib/renderer/canvas.js","../../../node_modules/qrcode/lib/renderer/svg-tag.js","../../../node_modules/qrcode/lib/browser.js","../utils/qrCodeGenerator.js","../components/ServerTab.jsx","../../shared/components/VisualizationSettings.jsx","../hooks/useKeyboardShortcuts.js","../components/creator/CreateTab.jsx","../components/App.jsx","../js/butterchurnVerify.js","../react-entry.jsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray;\nfunction noop() {}\nvar ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, props) {\n var refProp = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== refProp ? refProp : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(oldElement.type, newKey, oldElement.props);\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop, noop)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n };\nexports.Activity = REACT_ACTIVITY_TYPE;\nexports.Children = Children;\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.__COMPILER_RUNTIME = {\n __proto__: null,\n c: function (size) {\n return ReactSharedInternals.H.useMemoCache(size);\n }\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cacheSignal = function () {\n return null;\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useEffectEvent = function (callback) {\n return ReactSharedInternals.H.useEffectEvent(callback);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.2.0\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * scheduler.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nfunction push(heap, node) {\n var index = heap.length;\n heap.push(node);\n a: for (; 0 < index; ) {\n var parentIndex = (index - 1) >>> 1,\n parent = heap[parentIndex];\n if (0 < compare(parent, node))\n (heap[parentIndex] = node), (heap[index] = parent), (index = parentIndex);\n else break a;\n }\n}\nfunction peek(heap) {\n return 0 === heap.length ? null : heap[0];\n}\nfunction pop(heap) {\n if (0 === heap.length) return null;\n var first = heap[0],\n last = heap.pop();\n if (last !== first) {\n heap[0] = last;\n a: for (\n var index = 0, length = heap.length, halfLength = length >>> 1;\n index < halfLength;\n\n ) {\n var leftIndex = 2 * (index + 1) - 1,\n left = heap[leftIndex],\n rightIndex = leftIndex + 1,\n right = heap[rightIndex];\n if (0 > compare(left, last))\n rightIndex < length && 0 > compare(right, left)\n ? ((heap[index] = right),\n (heap[rightIndex] = last),\n (index = rightIndex))\n : ((heap[index] = left),\n (heap[leftIndex] = last),\n (index = leftIndex));\n else if (rightIndex < length && 0 > compare(right, last))\n (heap[index] = right), (heap[rightIndex] = last), (index = rightIndex);\n else break a;\n }\n }\n return first;\n}\nfunction compare(a, b) {\n var diff = a.sortIndex - b.sortIndex;\n return 0 !== diff ? diff : a.id - b.id;\n}\nexports.unstable_now = void 0;\nif (\"object\" === typeof performance && \"function\" === typeof performance.now) {\n var localPerformance = performance;\n exports.unstable_now = function () {\n return localPerformance.now();\n };\n} else {\n var localDate = Date,\n initialTime = localDate.now();\n exports.unstable_now = function () {\n return localDate.now() - initialTime;\n };\n}\nvar taskQueue = [],\n timerQueue = [],\n taskIdCounter = 1,\n currentTask = null,\n currentPriorityLevel = 3,\n isPerformingWork = !1,\n isHostCallbackScheduled = !1,\n isHostTimeoutScheduled = !1,\n needsPaint = !1,\n localSetTimeout = \"function\" === typeof setTimeout ? setTimeout : null,\n localClearTimeout = \"function\" === typeof clearTimeout ? clearTimeout : null,\n localSetImmediate = \"undefined\" !== typeof setImmediate ? setImmediate : null;\nfunction advanceTimers(currentTime) {\n for (var timer = peek(timerQueue); null !== timer; ) {\n if (null === timer.callback) pop(timerQueue);\n else if (timer.startTime <= currentTime)\n pop(timerQueue),\n (timer.sortIndex = timer.expirationTime),\n push(taskQueue, timer);\n else break;\n timer = peek(timerQueue);\n }\n}\nfunction handleTimeout(currentTime) {\n isHostTimeoutScheduled = !1;\n advanceTimers(currentTime);\n if (!isHostCallbackScheduled)\n if (null !== peek(taskQueue))\n (isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline());\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);\n }\n}\nvar isMessageLoopRunning = !1,\n taskTimeoutID = -1,\n frameInterval = 5,\n startTime = -1;\nfunction shouldYieldToHost() {\n return needsPaint\n ? !0\n : exports.unstable_now() - startTime < frameInterval\n ? !1\n : !0;\n}\nfunction performWorkUntilDeadline() {\n needsPaint = !1;\n if (isMessageLoopRunning) {\n var currentTime = exports.unstable_now();\n startTime = currentTime;\n var hasMoreWork = !0;\n try {\n a: {\n isHostCallbackScheduled = !1;\n isHostTimeoutScheduled &&\n ((isHostTimeoutScheduled = !1),\n localClearTimeout(taskTimeoutID),\n (taskTimeoutID = -1));\n isPerformingWork = !0;\n var previousPriorityLevel = currentPriorityLevel;\n try {\n b: {\n advanceTimers(currentTime);\n for (\n currentTask = peek(taskQueue);\n null !== currentTask &&\n !(\n currentTask.expirationTime > currentTime && shouldYieldToHost()\n );\n\n ) {\n var callback = currentTask.callback;\n if (\"function\" === typeof callback) {\n currentTask.callback = null;\n currentPriorityLevel = currentTask.priorityLevel;\n var continuationCallback = callback(\n currentTask.expirationTime <= currentTime\n );\n currentTime = exports.unstable_now();\n if (\"function\" === typeof continuationCallback) {\n currentTask.callback = continuationCallback;\n advanceTimers(currentTime);\n hasMoreWork = !0;\n break b;\n }\n currentTask === peek(taskQueue) && pop(taskQueue);\n advanceTimers(currentTime);\n } else pop(taskQueue);\n currentTask = peek(taskQueue);\n }\n if (null !== currentTask) hasMoreWork = !0;\n else {\n var firstTimer = peek(timerQueue);\n null !== firstTimer &&\n requestHostTimeout(\n handleTimeout,\n firstTimer.startTime - currentTime\n );\n hasMoreWork = !1;\n }\n }\n break a;\n } finally {\n (currentTask = null),\n (currentPriorityLevel = previousPriorityLevel),\n (isPerformingWork = !1);\n }\n hasMoreWork = void 0;\n }\n } finally {\n hasMoreWork\n ? schedulePerformWorkUntilDeadline()\n : (isMessageLoopRunning = !1);\n }\n }\n}\nvar schedulePerformWorkUntilDeadline;\nif (\"function\" === typeof localSetImmediate)\n schedulePerformWorkUntilDeadline = function () {\n localSetImmediate(performWorkUntilDeadline);\n };\nelse if (\"undefined\" !== typeof MessageChannel) {\n var channel = new MessageChannel(),\n port = channel.port2;\n channel.port1.onmessage = performWorkUntilDeadline;\n schedulePerformWorkUntilDeadline = function () {\n port.postMessage(null);\n };\n} else\n schedulePerformWorkUntilDeadline = function () {\n localSetTimeout(performWorkUntilDeadline, 0);\n };\nfunction requestHostTimeout(callback, ms) {\n taskTimeoutID = localSetTimeout(function () {\n callback(exports.unstable_now());\n }, ms);\n}\nexports.unstable_IdlePriority = 5;\nexports.unstable_ImmediatePriority = 1;\nexports.unstable_LowPriority = 4;\nexports.unstable_NormalPriority = 3;\nexports.unstable_Profiling = null;\nexports.unstable_UserBlockingPriority = 2;\nexports.unstable_cancelCallback = function (task) {\n task.callback = null;\n};\nexports.unstable_forceFrameRate = function (fps) {\n 0 > fps || 125 < fps\n ? console.error(\n \"forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported\"\n )\n : (frameInterval = 0 < fps ? Math.floor(1e3 / fps) : 5);\n};\nexports.unstable_getCurrentPriorityLevel = function () {\n return currentPriorityLevel;\n};\nexports.unstable_next = function (eventHandler) {\n switch (currentPriorityLevel) {\n case 1:\n case 2:\n case 3:\n var priorityLevel = 3;\n break;\n default:\n priorityLevel = currentPriorityLevel;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_requestPaint = function () {\n needsPaint = !0;\n};\nexports.unstable_runWithPriority = function (priorityLevel, eventHandler) {\n switch (priorityLevel) {\n case 1:\n case 2:\n case 3:\n case 4:\n case 5:\n break;\n default:\n priorityLevel = 3;\n }\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = priorityLevel;\n try {\n return eventHandler();\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n};\nexports.unstable_scheduleCallback = function (\n priorityLevel,\n callback,\n options\n) {\n var currentTime = exports.unstable_now();\n \"object\" === typeof options && null !== options\n ? ((options = options.delay),\n (options =\n \"number\" === typeof options && 0 < options\n ? currentTime + options\n : currentTime))\n : (options = currentTime);\n switch (priorityLevel) {\n case 1:\n var timeout = -1;\n break;\n case 2:\n timeout = 250;\n break;\n case 5:\n timeout = 1073741823;\n break;\n case 4:\n timeout = 1e4;\n break;\n default:\n timeout = 5e3;\n }\n timeout = options + timeout;\n priorityLevel = {\n id: taskIdCounter++,\n callback: callback,\n priorityLevel: priorityLevel,\n startTime: options,\n expirationTime: timeout,\n sortIndex: -1\n };\n options > currentTime\n ? ((priorityLevel.sortIndex = options),\n push(timerQueue, priorityLevel),\n null === peek(taskQueue) &&\n priorityLevel === peek(timerQueue) &&\n (isHostTimeoutScheduled\n ? (localClearTimeout(taskTimeoutID), (taskTimeoutID = -1))\n : (isHostTimeoutScheduled = !0),\n requestHostTimeout(handleTimeout, options - currentTime)))\n : ((priorityLevel.sortIndex = timeout),\n push(taskQueue, priorityLevel),\n isHostCallbackScheduled ||\n isPerformingWork ||\n ((isHostCallbackScheduled = !0),\n isMessageLoopRunning ||\n ((isMessageLoopRunning = !0), schedulePerformWorkUntilDeadline())));\n return priorityLevel;\n};\nexports.unstable_shouldYield = shouldYieldToHost;\nexports.unstable_wrapCallback = function (callback) {\n var parentPriorityLevel = currentPriorityLevel;\n return function () {\n var previousPriorityLevel = currentPriorityLevel;\n currentPriorityLevel = parentPriorityLevel;\n try {\n return callback.apply(this, arguments);\n } finally {\n currentPriorityLevel = previousPriorityLevel;\n }\n };\n};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/scheduler.production.js');\n} else {\n module.exports = require('./cjs/scheduler.development.js');\n}\n","/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.2.0\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","/**\n * @license React\n * react-dom-client.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n/*\n Modernizr 3.0.0pre (Custom Build) | MIT\n*/\n\"use strict\";\nvar Scheduler = require(\"scheduler\"),\n React = require(\"react\"),\n ReactDOM = require(\"react-dom\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction isValidContainer(node) {\n return !(\n !node ||\n (1 !== node.nodeType && 9 !== node.nodeType && 11 !== node.nodeType)\n );\n}\nfunction getNearestMountedFiber(fiber) {\n var node = fiber,\n nearestMounted = fiber;\n if (fiber.alternate) for (; node.return; ) node = node.return;\n else {\n fiber = node;\n do\n (node = fiber),\n 0 !== (node.flags & 4098) && (nearestMounted = node.return),\n (fiber = node.return);\n while (fiber);\n }\n return 3 === node.tag ? nearestMounted : null;\n}\nfunction getSuspenseInstanceFromFiber(fiber) {\n if (13 === fiber.tag) {\n var suspenseState = fiber.memoizedState;\n null === suspenseState &&\n ((fiber = fiber.alternate),\n null !== fiber && (suspenseState = fiber.memoizedState));\n if (null !== suspenseState) return suspenseState.dehydrated;\n }\n return null;\n}\nfunction getActivityInstanceFromFiber(fiber) {\n if (31 === fiber.tag) {\n var activityState = fiber.memoizedState;\n null === activityState &&\n ((fiber = fiber.alternate),\n null !== fiber && (activityState = fiber.memoizedState));\n if (null !== activityState) return activityState.dehydrated;\n }\n return null;\n}\nfunction assertIsMounted(fiber) {\n if (getNearestMountedFiber(fiber) !== fiber)\n throw Error(formatProdErrorMessage(188));\n}\nfunction findCurrentFiberUsingSlowPath(fiber) {\n var alternate = fiber.alternate;\n if (!alternate) {\n alternate = getNearestMountedFiber(fiber);\n if (null === alternate) throw Error(formatProdErrorMessage(188));\n return alternate !== fiber ? null : fiber;\n }\n for (var a = fiber, b = alternate; ; ) {\n var parentA = a.return;\n if (null === parentA) break;\n var parentB = parentA.alternate;\n if (null === parentB) {\n b = parentA.return;\n if (null !== b) {\n a = b;\n continue;\n }\n break;\n }\n if (parentA.child === parentB.child) {\n for (parentB = parentA.child; parentB; ) {\n if (parentB === a) return assertIsMounted(parentA), fiber;\n if (parentB === b) return assertIsMounted(parentA), alternate;\n parentB = parentB.sibling;\n }\n throw Error(formatProdErrorMessage(188));\n }\n if (a.return !== b.return) (a = parentA), (b = parentB);\n else {\n for (var didFindChild = !1, child$0 = parentA.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentA;\n b = parentB;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentA;\n a = parentB;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) {\n for (child$0 = parentB.child; child$0; ) {\n if (child$0 === a) {\n didFindChild = !0;\n a = parentB;\n b = parentA;\n break;\n }\n if (child$0 === b) {\n didFindChild = !0;\n b = parentB;\n a = parentA;\n break;\n }\n child$0 = child$0.sibling;\n }\n if (!didFindChild) throw Error(formatProdErrorMessage(189));\n }\n }\n if (a.alternate !== b) throw Error(formatProdErrorMessage(190));\n }\n if (3 !== a.tag) throw Error(formatProdErrorMessage(188));\n return a.stateNode.current === a ? fiber : alternate;\n}\nfunction findCurrentHostFiberImpl(node) {\n var tag = node.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return node;\n for (node = node.child; null !== node; ) {\n tag = findCurrentHostFiberImpl(node);\n if (null !== tag) return tag;\n node = node.sibling;\n }\n return null;\n}\nvar assign = Object.assign,\n REACT_LEGACY_ELEMENT_TYPE = Symbol.for(\"react.element\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\");\nSymbol.for(\"react.scope\");\nvar REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\");\nSymbol.for(\"react.legacy_hidden\");\nSymbol.for(\"react.tracing_marker\");\nvar REACT_MEMO_CACHE_SENTINEL = Symbol.for(\"react.memo_cache_sentinel\");\nSymbol.for(\"react.view_transition\");\nvar MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (type.$$typeof) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return type.displayName || \"Context\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n}\nvar isArrayImpl = Array.isArray,\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n ReactDOMSharedInternals =\n ReactDOM.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n sharedNotPendingObject = {\n pending: !1,\n data: null,\n method: null,\n action: null\n },\n valueStack = [],\n index = -1;\nfunction createCursor(defaultValue) {\n return { current: defaultValue };\n}\nfunction pop(cursor) {\n 0 > index ||\n ((cursor.current = valueStack[index]), (valueStack[index] = null), index--);\n}\nfunction push(cursor, value) {\n index++;\n valueStack[index] = cursor.current;\n cursor.current = value;\n}\nvar contextStackCursor = createCursor(null),\n contextFiberStackCursor = createCursor(null),\n rootInstanceStackCursor = createCursor(null),\n hostTransitionProviderCursor = createCursor(null);\nfunction pushHostContainer(fiber, nextRootInstance) {\n push(rootInstanceStackCursor, nextRootInstance);\n push(contextFiberStackCursor, fiber);\n push(contextStackCursor, null);\n switch (nextRootInstance.nodeType) {\n case 9:\n case 11:\n fiber = (fiber = nextRootInstance.documentElement)\n ? (fiber = fiber.namespaceURI)\n ? getOwnHostContext(fiber)\n : 0\n : 0;\n break;\n default:\n if (\n ((fiber = nextRootInstance.tagName),\n (nextRootInstance = nextRootInstance.namespaceURI))\n )\n (nextRootInstance = getOwnHostContext(nextRootInstance)),\n (fiber = getChildHostContextProd(nextRootInstance, fiber));\n else\n switch (fiber) {\n case \"svg\":\n fiber = 1;\n break;\n case \"math\":\n fiber = 2;\n break;\n default:\n fiber = 0;\n }\n }\n pop(contextStackCursor);\n push(contextStackCursor, fiber);\n}\nfunction popHostContainer() {\n pop(contextStackCursor);\n pop(contextFiberStackCursor);\n pop(rootInstanceStackCursor);\n}\nfunction pushHostContext(fiber) {\n null !== fiber.memoizedState && push(hostTransitionProviderCursor, fiber);\n var context = contextStackCursor.current;\n var JSCompiler_inline_result = getChildHostContextProd(context, fiber.type);\n context !== JSCompiler_inline_result &&\n (push(contextFiberStackCursor, fiber),\n push(contextStackCursor, JSCompiler_inline_result));\n}\nfunction popHostContext(fiber) {\n contextFiberStackCursor.current === fiber &&\n (pop(contextStackCursor), pop(contextFiberStackCursor));\n hostTransitionProviderCursor.current === fiber &&\n (pop(hostTransitionProviderCursor),\n (HostTransitionContext._currentValue = sharedNotPendingObject));\n}\nvar prefix, suffix;\nfunction describeBuiltInComponentFrame(name) {\n if (void 0 === prefix)\n try {\n throw Error();\n } catch (x) {\n var match = x.stack.trim().match(/\\n( *(at )?)/);\n prefix = (match && match[1]) || \"\";\n suffix =\n -1 < x.stack.indexOf(\"\\n at\")\n ? \" (<anonymous>)\"\n : -1 < x.stack.indexOf(\"@\")\n ? \"@unknown:0:0\"\n : \"\";\n }\n return \"\\n\" + prefix + name + suffix;\n}\nvar reentry = !1;\nfunction describeNativeComponentFrame(fn, construct) {\n if (!fn || reentry) return \"\";\n reentry = !0;\n var previousPrepareStackTrace = Error.prepareStackTrace;\n Error.prepareStackTrace = void 0;\n try {\n var RunInRootFrame = {\n DetermineComponentFrameRoot: function () {\n try {\n if (construct) {\n var Fake = function () {\n throw Error();\n };\n Object.defineProperty(Fake.prototype, \"props\", {\n set: function () {\n throw Error();\n }\n });\n if (\"object\" === typeof Reflect && Reflect.construct) {\n try {\n Reflect.construct(Fake, []);\n } catch (x) {\n var control = x;\n }\n Reflect.construct(fn, [], Fake);\n } else {\n try {\n Fake.call();\n } catch (x$1) {\n control = x$1;\n }\n fn.call(Fake.prototype);\n }\n } else {\n try {\n throw Error();\n } catch (x$2) {\n control = x$2;\n }\n (Fake = fn()) &&\n \"function\" === typeof Fake.catch &&\n Fake.catch(function () {});\n }\n } catch (sample) {\n if (sample && control && \"string\" === typeof sample.stack)\n return [sample.stack, control.stack];\n }\n return [null, null];\n }\n };\n RunInRootFrame.DetermineComponentFrameRoot.displayName =\n \"DetermineComponentFrameRoot\";\n var namePropDescriptor = Object.getOwnPropertyDescriptor(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\"\n );\n namePropDescriptor &&\n namePropDescriptor.configurable &&\n Object.defineProperty(\n RunInRootFrame.DetermineComponentFrameRoot,\n \"name\",\n { value: \"DetermineComponentFrameRoot\" }\n );\n var _RunInRootFrame$Deter = RunInRootFrame.DetermineComponentFrameRoot(),\n sampleStack = _RunInRootFrame$Deter[0],\n controlStack = _RunInRootFrame$Deter[1];\n if (sampleStack && controlStack) {\n var sampleLines = sampleStack.split(\"\\n\"),\n controlLines = controlStack.split(\"\\n\");\n for (\n namePropDescriptor = RunInRootFrame = 0;\n RunInRootFrame < sampleLines.length &&\n !sampleLines[RunInRootFrame].includes(\"DetermineComponentFrameRoot\");\n\n )\n RunInRootFrame++;\n for (\n ;\n namePropDescriptor < controlLines.length &&\n !controlLines[namePropDescriptor].includes(\n \"DetermineComponentFrameRoot\"\n );\n\n )\n namePropDescriptor++;\n if (\n RunInRootFrame === sampleLines.length ||\n namePropDescriptor === controlLines.length\n )\n for (\n RunInRootFrame = sampleLines.length - 1,\n namePropDescriptor = controlLines.length - 1;\n 1 <= RunInRootFrame &&\n 0 <= namePropDescriptor &&\n sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor];\n\n )\n namePropDescriptor--;\n for (\n ;\n 1 <= RunInRootFrame && 0 <= namePropDescriptor;\n RunInRootFrame--, namePropDescriptor--\n )\n if (sampleLines[RunInRootFrame] !== controlLines[namePropDescriptor]) {\n if (1 !== RunInRootFrame || 1 !== namePropDescriptor) {\n do\n if (\n (RunInRootFrame--,\n namePropDescriptor--,\n 0 > namePropDescriptor ||\n sampleLines[RunInRootFrame] !==\n controlLines[namePropDescriptor])\n ) {\n var frame =\n \"\\n\" +\n sampleLines[RunInRootFrame].replace(\" at new \", \" at \");\n fn.displayName &&\n frame.includes(\"<anonymous>\") &&\n (frame = frame.replace(\"<anonymous>\", fn.displayName));\n return frame;\n }\n while (1 <= RunInRootFrame && 0 <= namePropDescriptor);\n }\n break;\n }\n }\n } finally {\n (reentry = !1), (Error.prepareStackTrace = previousPrepareStackTrace);\n }\n return (previousPrepareStackTrace = fn ? fn.displayName || fn.name : \"\")\n ? describeBuiltInComponentFrame(previousPrepareStackTrace)\n : \"\";\n}\nfunction describeFiber(fiber, childFiber) {\n switch (fiber.tag) {\n case 26:\n case 27:\n case 5:\n return describeBuiltInComponentFrame(fiber.type);\n case 16:\n return describeBuiltInComponentFrame(\"Lazy\");\n case 13:\n return fiber.child !== childFiber && null !== childFiber\n ? describeBuiltInComponentFrame(\"Suspense Fallback\")\n : describeBuiltInComponentFrame(\"Suspense\");\n case 19:\n return describeBuiltInComponentFrame(\"SuspenseList\");\n case 0:\n case 15:\n return describeNativeComponentFrame(fiber.type, !1);\n case 11:\n return describeNativeComponentFrame(fiber.type.render, !1);\n case 1:\n return describeNativeComponentFrame(fiber.type, !0);\n case 31:\n return describeBuiltInComponentFrame(\"Activity\");\n default:\n return \"\";\n }\n}\nfunction getStackByFiberInDevAndProd(workInProgress) {\n try {\n var info = \"\",\n previous = null;\n do\n (info += describeFiber(workInProgress, previous)),\n (previous = workInProgress),\n (workInProgress = workInProgress.return);\n while (workInProgress);\n return info;\n } catch (x) {\n return \"\\nError generating stack: \" + x.message + \"\\n\" + x.stack;\n }\n}\nvar hasOwnProperty = Object.prototype.hasOwnProperty,\n scheduleCallback$3 = Scheduler.unstable_scheduleCallback,\n cancelCallback$1 = Scheduler.unstable_cancelCallback,\n shouldYield = Scheduler.unstable_shouldYield,\n requestPaint = Scheduler.unstable_requestPaint,\n now = Scheduler.unstable_now,\n getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel,\n ImmediatePriority = Scheduler.unstable_ImmediatePriority,\n UserBlockingPriority = Scheduler.unstable_UserBlockingPriority,\n NormalPriority$1 = Scheduler.unstable_NormalPriority,\n LowPriority = Scheduler.unstable_LowPriority,\n IdlePriority = Scheduler.unstable_IdlePriority,\n log$1 = Scheduler.log,\n unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue,\n rendererID = null,\n injectedHook = null;\nfunction setIsStrictModeForDevtools(newIsStrictMode) {\n \"function\" === typeof log$1 && unstable_setDisableYieldValue(newIsStrictMode);\n if (injectedHook && \"function\" === typeof injectedHook.setStrictMode)\n try {\n injectedHook.setStrictMode(rendererID, newIsStrictMode);\n } catch (err) {}\n}\nvar clz32 = Math.clz32 ? Math.clz32 : clz32Fallback,\n log = Math.log,\n LN2 = Math.LN2;\nfunction clz32Fallback(x) {\n x >>>= 0;\n return 0 === x ? 32 : (31 - ((log(x) / LN2) | 0)) | 0;\n}\nvar nextTransitionUpdateLane = 256,\n nextTransitionDeferredLane = 262144,\n nextRetryLane = 4194304;\nfunction getHighestPriorityLanes(lanes) {\n var pendingSyncLanes = lanes & 42;\n if (0 !== pendingSyncLanes) return pendingSyncLanes;\n switch (lanes & -lanes) {\n case 1:\n return 1;\n case 2:\n return 2;\n case 4:\n return 4;\n case 8:\n return 8;\n case 16:\n return 16;\n case 32:\n return 32;\n case 64:\n return 64;\n case 128:\n return 128;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n return lanes & 261888;\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return lanes & 3932160;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return lanes & 62914560;\n case 67108864:\n return 67108864;\n case 134217728:\n return 134217728;\n case 268435456:\n return 268435456;\n case 536870912:\n return 536870912;\n case 1073741824:\n return 0;\n default:\n return lanes;\n }\n}\nfunction getNextLanes(root, wipLanes, rootHasPendingCommit) {\n var pendingLanes = root.pendingLanes;\n if (0 === pendingLanes) return 0;\n var nextLanes = 0,\n suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes;\n root = root.warmLanes;\n var nonIdlePendingLanes = pendingLanes & 134217727;\n 0 !== nonIdlePendingLanes\n ? ((pendingLanes = nonIdlePendingLanes & ~suspendedLanes),\n 0 !== pendingLanes\n ? (nextLanes = getHighestPriorityLanes(pendingLanes))\n : ((pingedLanes &= nonIdlePendingLanes),\n 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = nonIdlePendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit)))))\n : ((nonIdlePendingLanes = pendingLanes & ~suspendedLanes),\n 0 !== nonIdlePendingLanes\n ? (nextLanes = getHighestPriorityLanes(nonIdlePendingLanes))\n : 0 !== pingedLanes\n ? (nextLanes = getHighestPriorityLanes(pingedLanes))\n : rootHasPendingCommit ||\n ((rootHasPendingCommit = pendingLanes & ~root),\n 0 !== rootHasPendingCommit &&\n (nextLanes = getHighestPriorityLanes(rootHasPendingCommit))));\n return 0 === nextLanes\n ? 0\n : 0 !== wipLanes &&\n wipLanes !== nextLanes &&\n 0 === (wipLanes & suspendedLanes) &&\n ((suspendedLanes = nextLanes & -nextLanes),\n (rootHasPendingCommit = wipLanes & -wipLanes),\n suspendedLanes >= rootHasPendingCommit ||\n (32 === suspendedLanes && 0 !== (rootHasPendingCommit & 4194048)))\n ? wipLanes\n : nextLanes;\n}\nfunction checkIfRootIsPrerendering(root, renderLanes) {\n return (\n 0 ===\n (root.pendingLanes &\n ~(root.suspendedLanes & ~root.pingedLanes) &\n renderLanes)\n );\n}\nfunction computeExpirationTime(lane, currentTime) {\n switch (lane) {\n case 1:\n case 2:\n case 4:\n case 8:\n case 64:\n return currentTime + 250;\n case 16:\n case 32:\n case 128:\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n return currentTime + 5e3;\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n return -1;\n case 67108864:\n case 134217728:\n case 268435456:\n case 536870912:\n case 1073741824:\n return -1;\n default:\n return -1;\n }\n}\nfunction claimNextRetryLane() {\n var lane = nextRetryLane;\n nextRetryLane <<= 1;\n 0 === (nextRetryLane & 62914560) && (nextRetryLane = 4194304);\n return lane;\n}\nfunction createLaneMap(initial) {\n for (var laneMap = [], i = 0; 31 > i; i++) laneMap.push(initial);\n return laneMap;\n}\nfunction markRootUpdated$1(root, updateLane) {\n root.pendingLanes |= updateLane;\n 268435456 !== updateLane &&\n ((root.suspendedLanes = 0), (root.pingedLanes = 0), (root.warmLanes = 0));\n}\nfunction markRootFinished(\n root,\n finishedLanes,\n remainingLanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n var previouslyPendingLanes = root.pendingLanes;\n root.pendingLanes = remainingLanes;\n root.suspendedLanes = 0;\n root.pingedLanes = 0;\n root.warmLanes = 0;\n root.expiredLanes &= remainingLanes;\n root.entangledLanes &= remainingLanes;\n root.errorRecoveryDisabledLanes &= remainingLanes;\n root.shellSuspendCounter = 0;\n var entanglements = root.entanglements,\n expirationTimes = root.expirationTimes,\n hiddenUpdates = root.hiddenUpdates;\n for (\n remainingLanes = previouslyPendingLanes & ~remainingLanes;\n 0 < remainingLanes;\n\n ) {\n var index$7 = 31 - clz32(remainingLanes),\n lane = 1 << index$7;\n entanglements[index$7] = 0;\n expirationTimes[index$7] = -1;\n var hiddenUpdatesForLane = hiddenUpdates[index$7];\n if (null !== hiddenUpdatesForLane)\n for (\n hiddenUpdates[index$7] = null, index$7 = 0;\n index$7 < hiddenUpdatesForLane.length;\n index$7++\n ) {\n var update = hiddenUpdatesForLane[index$7];\n null !== update && (update.lane &= -536870913);\n }\n remainingLanes &= ~lane;\n }\n 0 !== spawnedLane && markSpawnedDeferredLane(root, spawnedLane, 0);\n 0 !== suspendedRetryLanes &&\n 0 === updatedLanes &&\n 0 !== root.tag &&\n (root.suspendedLanes |=\n suspendedRetryLanes & ~(previouslyPendingLanes & ~finishedLanes));\n}\nfunction markSpawnedDeferredLane(root, spawnedLane, entangledLanes) {\n root.pendingLanes |= spawnedLane;\n root.suspendedLanes &= ~spawnedLane;\n var spawnedLaneIndex = 31 - clz32(spawnedLane);\n root.entangledLanes |= spawnedLane;\n root.entanglements[spawnedLaneIndex] =\n root.entanglements[spawnedLaneIndex] |\n 1073741824 |\n (entangledLanes & 261930);\n}\nfunction markRootEntangled(root, entangledLanes) {\n var rootEntangledLanes = (root.entangledLanes |= entangledLanes);\n for (root = root.entanglements; rootEntangledLanes; ) {\n var index$8 = 31 - clz32(rootEntangledLanes),\n lane = 1 << index$8;\n (lane & entangledLanes) | (root[index$8] & entangledLanes) &&\n (root[index$8] |= entangledLanes);\n rootEntangledLanes &= ~lane;\n }\n}\nfunction getBumpedLaneForHydration(root, renderLanes) {\n var renderLane = renderLanes & -renderLanes;\n renderLane =\n 0 !== (renderLane & 42) ? 1 : getBumpedLaneForHydrationByLane(renderLane);\n return 0 !== (renderLane & (root.suspendedLanes | renderLanes))\n ? 0\n : renderLane;\n}\nfunction getBumpedLaneForHydrationByLane(lane) {\n switch (lane) {\n case 2:\n lane = 1;\n break;\n case 8:\n lane = 4;\n break;\n case 32:\n lane = 16;\n break;\n case 256:\n case 512:\n case 1024:\n case 2048:\n case 4096:\n case 8192:\n case 16384:\n case 32768:\n case 65536:\n case 131072:\n case 262144:\n case 524288:\n case 1048576:\n case 2097152:\n case 4194304:\n case 8388608:\n case 16777216:\n case 33554432:\n lane = 128;\n break;\n case 268435456:\n lane = 134217728;\n break;\n default:\n lane = 0;\n }\n return lane;\n}\nfunction lanesToEventPriority(lanes) {\n lanes &= -lanes;\n return 2 < lanes\n ? 8 < lanes\n ? 0 !== (lanes & 134217727)\n ? 32\n : 268435456\n : 8\n : 2;\n}\nfunction resolveUpdatePriority() {\n var updatePriority = ReactDOMSharedInternals.p;\n if (0 !== updatePriority) return updatePriority;\n updatePriority = window.event;\n return void 0 === updatePriority ? 32 : getEventPriority(updatePriority.type);\n}\nfunction runWithPriority(priority, fn) {\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n return (ReactDOMSharedInternals.p = priority), fn();\n } finally {\n ReactDOMSharedInternals.p = previousPriority;\n }\n}\nvar randomKey = Math.random().toString(36).slice(2),\n internalInstanceKey = \"__reactFiber$\" + randomKey,\n internalPropsKey = \"__reactProps$\" + randomKey,\n internalContainerInstanceKey = \"__reactContainer$\" + randomKey,\n internalEventHandlersKey = \"__reactEvents$\" + randomKey,\n internalEventHandlerListenersKey = \"__reactListeners$\" + randomKey,\n internalEventHandlesSetKey = \"__reactHandles$\" + randomKey,\n internalRootNodeResourcesKey = \"__reactResources$\" + randomKey,\n internalHoistableMarker = \"__reactMarker$\" + randomKey;\nfunction detachDeletedInstance(node) {\n delete node[internalInstanceKey];\n delete node[internalPropsKey];\n delete node[internalEventHandlersKey];\n delete node[internalEventHandlerListenersKey];\n delete node[internalEventHandlesSetKey];\n}\nfunction getClosestInstanceFromNode(targetNode) {\n var targetInst = targetNode[internalInstanceKey];\n if (targetInst) return targetInst;\n for (var parentNode = targetNode.parentNode; parentNode; ) {\n if (\n (targetInst =\n parentNode[internalContainerInstanceKey] ||\n parentNode[internalInstanceKey])\n ) {\n parentNode = targetInst.alternate;\n if (\n null !== targetInst.child ||\n (null !== parentNode && null !== parentNode.child)\n )\n for (\n targetNode = getParentHydrationBoundary(targetNode);\n null !== targetNode;\n\n ) {\n if ((parentNode = targetNode[internalInstanceKey])) return parentNode;\n targetNode = getParentHydrationBoundary(targetNode);\n }\n return targetInst;\n }\n targetNode = parentNode;\n parentNode = targetNode.parentNode;\n }\n return null;\n}\nfunction getInstanceFromNode(node) {\n if (\n (node = node[internalInstanceKey] || node[internalContainerInstanceKey])\n ) {\n var tag = node.tag;\n if (\n 5 === tag ||\n 6 === tag ||\n 13 === tag ||\n 31 === tag ||\n 26 === tag ||\n 27 === tag ||\n 3 === tag\n )\n return node;\n }\n return null;\n}\nfunction getNodeFromInstance(inst) {\n var tag = inst.tag;\n if (5 === tag || 26 === tag || 27 === tag || 6 === tag) return inst.stateNode;\n throw Error(formatProdErrorMessage(33));\n}\nfunction getResourcesFromRoot(root) {\n var resources = root[internalRootNodeResourcesKey];\n resources ||\n (resources = root[internalRootNodeResourcesKey] =\n { hoistableStyles: new Map(), hoistableScripts: new Map() });\n return resources;\n}\nfunction markNodeAsHoistable(node) {\n node[internalHoistableMarker] = !0;\n}\nvar allNativeEvents = new Set(),\n registrationNameDependencies = {};\nfunction registerTwoPhaseEvent(registrationName, dependencies) {\n registerDirectEvent(registrationName, dependencies);\n registerDirectEvent(registrationName + \"Capture\", dependencies);\n}\nfunction registerDirectEvent(registrationName, dependencies) {\n registrationNameDependencies[registrationName] = dependencies;\n for (\n registrationName = 0;\n registrationName < dependencies.length;\n registrationName++\n )\n allNativeEvents.add(dependencies[registrationName]);\n}\nvar VALID_ATTRIBUTE_NAME_REGEX = RegExp(\n \"^[:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD][:A-Z_a-z\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD\\\\-.0-9\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040]*$\"\n ),\n illegalAttributeNameCache = {},\n validatedAttributeNameCache = {};\nfunction isAttributeNameSafe(attributeName) {\n if (hasOwnProperty.call(validatedAttributeNameCache, attributeName))\n return !0;\n if (hasOwnProperty.call(illegalAttributeNameCache, attributeName)) return !1;\n if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName))\n return (validatedAttributeNameCache[attributeName] = !0);\n illegalAttributeNameCache[attributeName] = !0;\n return !1;\n}\nfunction setValueForAttribute(node, name, value) {\n if (isAttributeNameSafe(name))\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n node.removeAttribute(name);\n return;\n case \"boolean\":\n var prefix$10 = name.toLowerCase().slice(0, 5);\n if (\"data-\" !== prefix$10 && \"aria-\" !== prefix$10) {\n node.removeAttribute(name);\n return;\n }\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForKnownAttribute(node, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttribute(name, \"\" + value);\n }\n}\nfunction setValueForNamespacedAttribute(node, namespace, name, value) {\n if (null === value) node.removeAttribute(name);\n else {\n switch (typeof value) {\n case \"undefined\":\n case \"function\":\n case \"symbol\":\n case \"boolean\":\n node.removeAttribute(name);\n return;\n }\n node.setAttributeNS(namespace, name, \"\" + value);\n }\n}\nfunction getToStringValue(value) {\n switch (typeof value) {\n case \"bigint\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"undefined\":\n return value;\n case \"object\":\n return value;\n default:\n return \"\";\n }\n}\nfunction isCheckable(elem) {\n var type = elem.type;\n return (\n (elem = elem.nodeName) &&\n \"input\" === elem.toLowerCase() &&\n (\"checkbox\" === type || \"radio\" === type)\n );\n}\nfunction trackValueOnNode(node, valueField, currentValue) {\n var descriptor = Object.getOwnPropertyDescriptor(\n node.constructor.prototype,\n valueField\n );\n if (\n !node.hasOwnProperty(valueField) &&\n \"undefined\" !== typeof descriptor &&\n \"function\" === typeof descriptor.get &&\n \"function\" === typeof descriptor.set\n ) {\n var get = descriptor.get,\n set = descriptor.set;\n Object.defineProperty(node, valueField, {\n configurable: !0,\n get: function () {\n return get.call(this);\n },\n set: function (value) {\n currentValue = \"\" + value;\n set.call(this, value);\n }\n });\n Object.defineProperty(node, valueField, {\n enumerable: descriptor.enumerable\n });\n return {\n getValue: function () {\n return currentValue;\n },\n setValue: function (value) {\n currentValue = \"\" + value;\n },\n stopTracking: function () {\n node._valueTracker = null;\n delete node[valueField];\n }\n };\n }\n}\nfunction track(node) {\n if (!node._valueTracker) {\n var valueField = isCheckable(node) ? \"checked\" : \"value\";\n node._valueTracker = trackValueOnNode(\n node,\n valueField,\n \"\" + node[valueField]\n );\n }\n}\nfunction updateValueIfChanged(node) {\n if (!node) return !1;\n var tracker = node._valueTracker;\n if (!tracker) return !0;\n var lastValue = tracker.getValue();\n var value = \"\";\n node &&\n (value = isCheckable(node)\n ? node.checked\n ? \"true\"\n : \"false\"\n : node.value);\n node = value;\n return node !== lastValue ? (tracker.setValue(node), !0) : !1;\n}\nfunction getActiveElement(doc) {\n doc = doc || (\"undefined\" !== typeof document ? document : void 0);\n if (\"undefined\" === typeof doc) return null;\n try {\n return doc.activeElement || doc.body;\n } catch (e) {\n return doc.body;\n }\n}\nvar escapeSelectorAttributeValueInsideDoubleQuotesRegex = /[\\n\"\\\\]/g;\nfunction escapeSelectorAttributeValueInsideDoubleQuotes(value) {\n return value.replace(\n escapeSelectorAttributeValueInsideDoubleQuotesRegex,\n function (ch) {\n return \"\\\\\" + ch.charCodeAt(0).toString(16) + \" \";\n }\n );\n}\nfunction updateInput(\n element,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n) {\n element.name = \"\";\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type\n ? (element.type = type)\n : element.removeAttribute(\"type\");\n if (null != value)\n if (\"number\" === type) {\n if ((0 === value && \"\" === element.value) || element.value != value)\n element.value = \"\" + getToStringValue(value);\n } else\n element.value !== \"\" + getToStringValue(value) &&\n (element.value = \"\" + getToStringValue(value));\n else\n (\"submit\" !== type && \"reset\" !== type) || element.removeAttribute(\"value\");\n null != value\n ? setDefaultValue(element, type, getToStringValue(value))\n : null != defaultValue\n ? setDefaultValue(element, type, getToStringValue(defaultValue))\n : null != lastDefaultValue && element.removeAttribute(\"value\");\n null == checked &&\n null != defaultChecked &&\n (element.defaultChecked = !!defaultChecked);\n null != checked &&\n (element.checked =\n checked && \"function\" !== typeof checked && \"symbol\" !== typeof checked);\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name\n ? (element.name = \"\" + getToStringValue(name))\n : element.removeAttribute(\"name\");\n}\nfunction initInput(\n element,\n value,\n defaultValue,\n checked,\n defaultChecked,\n type,\n name,\n isHydrating\n) {\n null != type &&\n \"function\" !== typeof type &&\n \"symbol\" !== typeof type &&\n \"boolean\" !== typeof type &&\n (element.type = type);\n if (null != value || null != defaultValue) {\n if (\n !(\n (\"submit\" !== type && \"reset\" !== type) ||\n (void 0 !== value && null !== value)\n )\n ) {\n track(element);\n return;\n }\n defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n value = null != value ? \"\" + getToStringValue(value) : defaultValue;\n isHydrating || value === element.value || (element.value = value);\n element.defaultValue = value;\n }\n checked = null != checked ? checked : defaultChecked;\n checked =\n \"function\" !== typeof checked && \"symbol\" !== typeof checked && !!checked;\n element.checked = isHydrating ? element.checked : !!checked;\n element.defaultChecked = !!checked;\n null != name &&\n \"function\" !== typeof name &&\n \"symbol\" !== typeof name &&\n \"boolean\" !== typeof name &&\n (element.name = name);\n track(element);\n}\nfunction setDefaultValue(node, type, value) {\n (\"number\" === type && getActiveElement(node.ownerDocument) === node) ||\n node.defaultValue === \"\" + value ||\n (node.defaultValue = \"\" + value);\n}\nfunction updateOptions(node, multiple, propValue, setDefaultSelected) {\n node = node.options;\n if (multiple) {\n multiple = {};\n for (var i = 0; i < propValue.length; i++)\n multiple[\"$\" + propValue[i]] = !0;\n for (propValue = 0; propValue < node.length; propValue++)\n (i = multiple.hasOwnProperty(\"$\" + node[propValue].value)),\n node[propValue].selected !== i && (node[propValue].selected = i),\n i && setDefaultSelected && (node[propValue].defaultSelected = !0);\n } else {\n propValue = \"\" + getToStringValue(propValue);\n multiple = null;\n for (i = 0; i < node.length; i++) {\n if (node[i].value === propValue) {\n node[i].selected = !0;\n setDefaultSelected && (node[i].defaultSelected = !0);\n return;\n }\n null !== multiple || node[i].disabled || (multiple = node[i]);\n }\n null !== multiple && (multiple.selected = !0);\n }\n}\nfunction updateTextarea(element, value, defaultValue) {\n if (\n null != value &&\n ((value = \"\" + getToStringValue(value)),\n value !== element.value && (element.value = value),\n null == defaultValue)\n ) {\n element.defaultValue !== value && (element.defaultValue = value);\n return;\n }\n element.defaultValue =\n null != defaultValue ? \"\" + getToStringValue(defaultValue) : \"\";\n}\nfunction initTextarea(element, value, defaultValue, children) {\n if (null == value) {\n if (null != children) {\n if (null != defaultValue) throw Error(formatProdErrorMessage(92));\n if (isArrayImpl(children)) {\n if (1 < children.length) throw Error(formatProdErrorMessage(93));\n children = children[0];\n }\n defaultValue = children;\n }\n null == defaultValue && (defaultValue = \"\");\n value = defaultValue;\n }\n defaultValue = getToStringValue(value);\n element.defaultValue = defaultValue;\n children = element.textContent;\n children === defaultValue &&\n \"\" !== children &&\n null !== children &&\n (element.value = children);\n track(element);\n}\nfunction setTextContent(node, text) {\n if (text) {\n var firstChild = node.firstChild;\n if (\n firstChild &&\n firstChild === node.lastChild &&\n 3 === firstChild.nodeType\n ) {\n firstChild.nodeValue = text;\n return;\n }\n }\n node.textContent = text;\n}\nvar unitlessNumbers = new Set(\n \"animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp\".split(\n \" \"\n )\n);\nfunction setValueForStyle(style, styleName, value) {\n var isCustomProperty = 0 === styleName.indexOf(\"--\");\n null == value || \"boolean\" === typeof value || \"\" === value\n ? isCustomProperty\n ? style.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (style.cssFloat = \"\")\n : (style[styleName] = \"\")\n : isCustomProperty\n ? style.setProperty(styleName, value)\n : \"number\" !== typeof value ||\n 0 === value ||\n unitlessNumbers.has(styleName)\n ? \"float\" === styleName\n ? (style.cssFloat = value)\n : (style[styleName] = (\"\" + value).trim())\n : (style[styleName] = value + \"px\");\n}\nfunction setValueForStyles(node, styles, prevStyles) {\n if (null != styles && \"object\" !== typeof styles)\n throw Error(formatProdErrorMessage(62));\n node = node.style;\n if (null != prevStyles) {\n for (var styleName in prevStyles)\n !prevStyles.hasOwnProperty(styleName) ||\n (null != styles && styles.hasOwnProperty(styleName)) ||\n (0 === styleName.indexOf(\"--\")\n ? node.setProperty(styleName, \"\")\n : \"float\" === styleName\n ? (node.cssFloat = \"\")\n : (node[styleName] = \"\"));\n for (var styleName$16 in styles)\n (styleName = styles[styleName$16]),\n styles.hasOwnProperty(styleName$16) &&\n prevStyles[styleName$16] !== styleName &&\n setValueForStyle(node, styleName$16, styleName);\n } else\n for (var styleName$17 in styles)\n styles.hasOwnProperty(styleName$17) &&\n setValueForStyle(node, styleName$17, styles[styleName$17]);\n}\nfunction isCustomElement(tagName) {\n if (-1 === tagName.indexOf(\"-\")) return !1;\n switch (tagName) {\n case \"annotation-xml\":\n case \"color-profile\":\n case \"font-face\":\n case \"font-face-src\":\n case \"font-face-uri\":\n case \"font-face-format\":\n case \"font-face-name\":\n case \"missing-glyph\":\n return !1;\n default:\n return !0;\n }\n}\nvar aliases = new Map([\n [\"acceptCharset\", \"accept-charset\"],\n [\"htmlFor\", \"for\"],\n [\"httpEquiv\", \"http-equiv\"],\n [\"crossOrigin\", \"crossorigin\"],\n [\"accentHeight\", \"accent-height\"],\n [\"alignmentBaseline\", \"alignment-baseline\"],\n [\"arabicForm\", \"arabic-form\"],\n [\"baselineShift\", \"baseline-shift\"],\n [\"capHeight\", \"cap-height\"],\n [\"clipPath\", \"clip-path\"],\n [\"clipRule\", \"clip-rule\"],\n [\"colorInterpolation\", \"color-interpolation\"],\n [\"colorInterpolationFilters\", \"color-interpolation-filters\"],\n [\"colorProfile\", \"color-profile\"],\n [\"colorRendering\", \"color-rendering\"],\n [\"dominantBaseline\", \"dominant-baseline\"],\n [\"enableBackground\", \"enable-background\"],\n [\"fillOpacity\", \"fill-opacity\"],\n [\"fillRule\", \"fill-rule\"],\n [\"floodColor\", \"flood-color\"],\n [\"floodOpacity\", \"flood-opacity\"],\n [\"fontFamily\", \"font-family\"],\n [\"fontSize\", \"font-size\"],\n [\"fontSizeAdjust\", \"font-size-adjust\"],\n [\"fontStretch\", \"font-stretch\"],\n [\"fontStyle\", \"font-style\"],\n [\"fontVariant\", \"font-variant\"],\n [\"fontWeight\", \"font-weight\"],\n [\"glyphName\", \"glyph-name\"],\n [\"glyphOrientationHorizontal\", \"glyph-orientation-horizontal\"],\n [\"glyphOrientationVertical\", \"glyph-orientation-vertical\"],\n [\"horizAdvX\", \"horiz-adv-x\"],\n [\"horizOriginX\", \"horiz-origin-x\"],\n [\"imageRendering\", \"image-rendering\"],\n [\"letterSpacing\", \"letter-spacing\"],\n [\"lightingColor\", \"lighting-color\"],\n [\"markerEnd\", \"marker-end\"],\n [\"markerMid\", \"marker-mid\"],\n [\"markerStart\", \"marker-start\"],\n [\"overlinePosition\", \"overline-position\"],\n [\"overlineThickness\", \"overline-thickness\"],\n [\"paintOrder\", \"paint-order\"],\n [\"panose-1\", \"panose-1\"],\n [\"pointerEvents\", \"pointer-events\"],\n [\"renderingIntent\", \"rendering-intent\"],\n [\"shapeRendering\", \"shape-rendering\"],\n [\"stopColor\", \"stop-color\"],\n [\"stopOpacity\", \"stop-opacity\"],\n [\"strikethroughPosition\", \"strikethrough-position\"],\n [\"strikethroughThickness\", \"strikethrough-thickness\"],\n [\"strokeDasharray\", \"stroke-dasharray\"],\n [\"strokeDashoffset\", \"stroke-dashoffset\"],\n [\"strokeLinecap\", \"stroke-linecap\"],\n [\"strokeLinejoin\", \"stroke-linejoin\"],\n [\"strokeMiterlimit\", \"stroke-miterlimit\"],\n [\"strokeOpacity\", \"stroke-opacity\"],\n [\"strokeWidth\", \"stroke-width\"],\n [\"textAnchor\", \"text-anchor\"],\n [\"textDecoration\", \"text-decoration\"],\n [\"textRendering\", \"text-rendering\"],\n [\"transformOrigin\", \"transform-origin\"],\n [\"underlinePosition\", \"underline-position\"],\n [\"underlineThickness\", \"underline-thickness\"],\n [\"unicodeBidi\", \"unicode-bidi\"],\n [\"unicodeRange\", \"unicode-range\"],\n [\"unitsPerEm\", \"units-per-em\"],\n [\"vAlphabetic\", \"v-alphabetic\"],\n [\"vHanging\", \"v-hanging\"],\n [\"vIdeographic\", \"v-ideographic\"],\n [\"vMathematical\", \"v-mathematical\"],\n [\"vectorEffect\", \"vector-effect\"],\n [\"vertAdvY\", \"vert-adv-y\"],\n [\"vertOriginX\", \"vert-origin-x\"],\n [\"vertOriginY\", \"vert-origin-y\"],\n [\"wordSpacing\", \"word-spacing\"],\n [\"writingMode\", \"writing-mode\"],\n [\"xmlnsXlink\", \"xmlns:xlink\"],\n [\"xHeight\", \"x-height\"]\n ]),\n isJavaScriptProtocol =\n /^[\\u0000-\\u001F ]*j[\\r\\n\\t]*a[\\r\\n\\t]*v[\\r\\n\\t]*a[\\r\\n\\t]*s[\\r\\n\\t]*c[\\r\\n\\t]*r[\\r\\n\\t]*i[\\r\\n\\t]*p[\\r\\n\\t]*t[\\r\\n\\t]*:/i;\nfunction sanitizeURL(url) {\n return isJavaScriptProtocol.test(\"\" + url)\n ? \"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')\"\n : url;\n}\nfunction noop$1() {}\nvar currentReplayingEvent = null;\nfunction getEventTarget(nativeEvent) {\n nativeEvent = nativeEvent.target || nativeEvent.srcElement || window;\n nativeEvent.correspondingUseElement &&\n (nativeEvent = nativeEvent.correspondingUseElement);\n return 3 === nativeEvent.nodeType ? nativeEvent.parentNode : nativeEvent;\n}\nvar restoreTarget = null,\n restoreQueue = null;\nfunction restoreStateOfTarget(target) {\n var internalInstance = getInstanceFromNode(target);\n if (internalInstance && (target = internalInstance.stateNode)) {\n var props = target[internalPropsKey] || null;\n a: switch (((target = internalInstance.stateNode), internalInstance.type)) {\n case \"input\":\n updateInput(\n target,\n props.value,\n props.defaultValue,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name\n );\n internalInstance = props.name;\n if (\"radio\" === props.type && null != internalInstance) {\n for (props = target; props.parentNode; ) props = props.parentNode;\n props = props.querySelectorAll(\n 'input[name=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n \"\" + internalInstance\n ) +\n '\"][type=\"radio\"]'\n );\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n ) {\n var otherNode = props[internalInstance];\n if (otherNode !== target && otherNode.form === target.form) {\n var otherProps = otherNode[internalPropsKey] || null;\n if (!otherProps) throw Error(formatProdErrorMessage(90));\n updateInput(\n otherNode,\n otherProps.value,\n otherProps.defaultValue,\n otherProps.defaultValue,\n otherProps.checked,\n otherProps.defaultChecked,\n otherProps.type,\n otherProps.name\n );\n }\n }\n for (\n internalInstance = 0;\n internalInstance < props.length;\n internalInstance++\n )\n (otherNode = props[internalInstance]),\n otherNode.form === target.form && updateValueIfChanged(otherNode);\n }\n break a;\n case \"textarea\":\n updateTextarea(target, props.value, props.defaultValue);\n break a;\n case \"select\":\n (internalInstance = props.value),\n null != internalInstance &&\n updateOptions(target, !!props.multiple, internalInstance, !1);\n }\n }\n}\nvar isInsideEventHandler = !1;\nfunction batchedUpdates$1(fn, a, b) {\n if (isInsideEventHandler) return fn(a, b);\n isInsideEventHandler = !0;\n try {\n var JSCompiler_inline_result = fn(a);\n return JSCompiler_inline_result;\n } finally {\n if (\n ((isInsideEventHandler = !1),\n null !== restoreTarget || null !== restoreQueue)\n )\n if (\n (flushSyncWork$1(),\n restoreTarget &&\n ((a = restoreTarget),\n (fn = restoreQueue),\n (restoreQueue = restoreTarget = null),\n restoreStateOfTarget(a),\n fn))\n )\n for (a = 0; a < fn.length; a++) restoreStateOfTarget(fn[a]);\n }\n}\nfunction getListener(inst, registrationName) {\n var stateNode = inst.stateNode;\n if (null === stateNode) return null;\n var props = stateNode[internalPropsKey] || null;\n if (null === props) return null;\n stateNode = props[registrationName];\n a: switch (registrationName) {\n case \"onClick\":\n case \"onClickCapture\":\n case \"onDoubleClick\":\n case \"onDoubleClickCapture\":\n case \"onMouseDown\":\n case \"onMouseDownCapture\":\n case \"onMouseMove\":\n case \"onMouseMoveCapture\":\n case \"onMouseUp\":\n case \"onMouseUpCapture\":\n case \"onMouseEnter\":\n (props = !props.disabled) ||\n ((inst = inst.type),\n (props = !(\n \"button\" === inst ||\n \"input\" === inst ||\n \"select\" === inst ||\n \"textarea\" === inst\n )));\n inst = !props;\n break a;\n default:\n inst = !1;\n }\n if (inst) return null;\n if (stateNode && \"function\" !== typeof stateNode)\n throw Error(\n formatProdErrorMessage(231, registrationName, typeof stateNode)\n );\n return stateNode;\n}\nvar canUseDOM = !(\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ),\n passiveBrowserEventsSupported = !1;\nif (canUseDOM)\n try {\n var options = {};\n Object.defineProperty(options, \"passive\", {\n get: function () {\n passiveBrowserEventsSupported = !0;\n }\n });\n window.addEventListener(\"test\", options, options);\n window.removeEventListener(\"test\", options, options);\n } catch (e) {\n passiveBrowserEventsSupported = !1;\n }\nvar root = null,\n startText = null,\n fallbackText = null;\nfunction getData() {\n if (fallbackText) return fallbackText;\n var start,\n startValue = startText,\n startLength = startValue.length,\n end,\n endValue = \"value\" in root ? root.value : root.textContent,\n endLength = endValue.length;\n for (\n start = 0;\n start < startLength && startValue[start] === endValue[start];\n start++\n );\n var minEnd = startLength - start;\n for (\n end = 1;\n end <= minEnd &&\n startValue[startLength - end] === endValue[endLength - end];\n end++\n );\n return (fallbackText = endValue.slice(start, 1 < end ? 1 - end : void 0));\n}\nfunction getEventCharCode(nativeEvent) {\n var keyCode = nativeEvent.keyCode;\n \"charCode\" in nativeEvent\n ? ((nativeEvent = nativeEvent.charCode),\n 0 === nativeEvent && 13 === keyCode && (nativeEvent = 13))\n : (nativeEvent = keyCode);\n 10 === nativeEvent && (nativeEvent = 13);\n return 32 <= nativeEvent || 13 === nativeEvent ? nativeEvent : 0;\n}\nfunction functionThatReturnsTrue() {\n return !0;\n}\nfunction functionThatReturnsFalse() {\n return !1;\n}\nfunction createSyntheticEvent(Interface) {\n function SyntheticBaseEvent(\n reactName,\n reactEventType,\n targetInst,\n nativeEvent,\n nativeEventTarget\n ) {\n this._reactName = reactName;\n this._targetInst = targetInst;\n this.type = reactEventType;\n this.nativeEvent = nativeEvent;\n this.target = nativeEventTarget;\n this.currentTarget = null;\n for (var propName in Interface)\n Interface.hasOwnProperty(propName) &&\n ((reactName = Interface[propName]),\n (this[propName] = reactName\n ? reactName(nativeEvent)\n : nativeEvent[propName]));\n this.isDefaultPrevented = (\n null != nativeEvent.defaultPrevented\n ? nativeEvent.defaultPrevented\n : !1 === nativeEvent.returnValue\n )\n ? functionThatReturnsTrue\n : functionThatReturnsFalse;\n this.isPropagationStopped = functionThatReturnsFalse;\n return this;\n }\n assign(SyntheticBaseEvent.prototype, {\n preventDefault: function () {\n this.defaultPrevented = !0;\n var event = this.nativeEvent;\n event &&\n (event.preventDefault\n ? event.preventDefault()\n : \"unknown\" !== typeof event.returnValue && (event.returnValue = !1),\n (this.isDefaultPrevented = functionThatReturnsTrue));\n },\n stopPropagation: function () {\n var event = this.nativeEvent;\n event &&\n (event.stopPropagation\n ? event.stopPropagation()\n : \"unknown\" !== typeof event.cancelBubble &&\n (event.cancelBubble = !0),\n (this.isPropagationStopped = functionThatReturnsTrue));\n },\n persist: function () {},\n isPersistent: functionThatReturnsTrue\n });\n return SyntheticBaseEvent;\n}\nvar EventInterface = {\n eventPhase: 0,\n bubbles: 0,\n cancelable: 0,\n timeStamp: function (event) {\n return event.timeStamp || Date.now();\n },\n defaultPrevented: 0,\n isTrusted: 0\n },\n SyntheticEvent = createSyntheticEvent(EventInterface),\n UIEventInterface = assign({}, EventInterface, { view: 0, detail: 0 }),\n SyntheticUIEvent = createSyntheticEvent(UIEventInterface),\n lastMovementX,\n lastMovementY,\n lastMouseEvent,\n MouseEventInterface = assign({}, UIEventInterface, {\n screenX: 0,\n screenY: 0,\n clientX: 0,\n clientY: 0,\n pageX: 0,\n pageY: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n getModifierState: getEventModifierState,\n button: 0,\n buttons: 0,\n relatedTarget: function (event) {\n return void 0 === event.relatedTarget\n ? event.fromElement === event.srcElement\n ? event.toElement\n : event.fromElement\n : event.relatedTarget;\n },\n movementX: function (event) {\n if (\"movementX\" in event) return event.movementX;\n event !== lastMouseEvent &&\n (lastMouseEvent && \"mousemove\" === event.type\n ? ((lastMovementX = event.screenX - lastMouseEvent.screenX),\n (lastMovementY = event.screenY - lastMouseEvent.screenY))\n : (lastMovementY = lastMovementX = 0),\n (lastMouseEvent = event));\n return lastMovementX;\n },\n movementY: function (event) {\n return \"movementY\" in event ? event.movementY : lastMovementY;\n }\n }),\n SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface),\n DragEventInterface = assign({}, MouseEventInterface, { dataTransfer: 0 }),\n SyntheticDragEvent = createSyntheticEvent(DragEventInterface),\n FocusEventInterface = assign({}, UIEventInterface, { relatedTarget: 0 }),\n SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface),\n AnimationEventInterface = assign({}, EventInterface, {\n animationName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface),\n ClipboardEventInterface = assign({}, EventInterface, {\n clipboardData: function (event) {\n return \"clipboardData\" in event\n ? event.clipboardData\n : window.clipboardData;\n }\n }),\n SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface),\n CompositionEventInterface = assign({}, EventInterface, { data: 0 }),\n SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface),\n normalizeKey = {\n Esc: \"Escape\",\n Spacebar: \" \",\n Left: \"ArrowLeft\",\n Up: \"ArrowUp\",\n Right: \"ArrowRight\",\n Down: \"ArrowDown\",\n Del: \"Delete\",\n Win: \"OS\",\n Menu: \"ContextMenu\",\n Apps: \"ContextMenu\",\n Scroll: \"ScrollLock\",\n MozPrintableKey: \"Unidentified\"\n },\n translateToKey = {\n 8: \"Backspace\",\n 9: \"Tab\",\n 12: \"Clear\",\n 13: \"Enter\",\n 16: \"Shift\",\n 17: \"Control\",\n 18: \"Alt\",\n 19: \"Pause\",\n 20: \"CapsLock\",\n 27: \"Escape\",\n 32: \" \",\n 33: \"PageUp\",\n 34: \"PageDown\",\n 35: \"End\",\n 36: \"Home\",\n 37: \"ArrowLeft\",\n 38: \"ArrowUp\",\n 39: \"ArrowRight\",\n 40: \"ArrowDown\",\n 45: \"Insert\",\n 46: \"Delete\",\n 112: \"F1\",\n 113: \"F2\",\n 114: \"F3\",\n 115: \"F4\",\n 116: \"F5\",\n 117: \"F6\",\n 118: \"F7\",\n 119: \"F8\",\n 120: \"F9\",\n 121: \"F10\",\n 122: \"F11\",\n 123: \"F12\",\n 144: \"NumLock\",\n 145: \"ScrollLock\",\n 224: \"Meta\"\n },\n modifierKeyToProp = {\n Alt: \"altKey\",\n Control: \"ctrlKey\",\n Meta: \"metaKey\",\n Shift: \"shiftKey\"\n };\nfunction modifierStateGetter(keyArg) {\n var nativeEvent = this.nativeEvent;\n return nativeEvent.getModifierState\n ? nativeEvent.getModifierState(keyArg)\n : (keyArg = modifierKeyToProp[keyArg])\n ? !!nativeEvent[keyArg]\n : !1;\n}\nfunction getEventModifierState() {\n return modifierStateGetter;\n}\nvar KeyboardEventInterface = assign({}, UIEventInterface, {\n key: function (nativeEvent) {\n if (nativeEvent.key) {\n var key = normalizeKey[nativeEvent.key] || nativeEvent.key;\n if (\"Unidentified\" !== key) return key;\n }\n return \"keypress\" === nativeEvent.type\n ? ((nativeEvent = getEventCharCode(nativeEvent)),\n 13 === nativeEvent ? \"Enter\" : String.fromCharCode(nativeEvent))\n : \"keydown\" === nativeEvent.type || \"keyup\" === nativeEvent.type\n ? translateToKey[nativeEvent.keyCode] || \"Unidentified\"\n : \"\";\n },\n code: 0,\n location: 0,\n ctrlKey: 0,\n shiftKey: 0,\n altKey: 0,\n metaKey: 0,\n repeat: 0,\n locale: 0,\n getModifierState: getEventModifierState,\n charCode: function (event) {\n return \"keypress\" === event.type ? getEventCharCode(event) : 0;\n },\n keyCode: function (event) {\n return \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n },\n which: function (event) {\n return \"keypress\" === event.type\n ? getEventCharCode(event)\n : \"keydown\" === event.type || \"keyup\" === event.type\n ? event.keyCode\n : 0;\n }\n }),\n SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface),\n PointerEventInterface = assign({}, MouseEventInterface, {\n pointerId: 0,\n width: 0,\n height: 0,\n pressure: 0,\n tangentialPressure: 0,\n tiltX: 0,\n tiltY: 0,\n twist: 0,\n pointerType: 0,\n isPrimary: 0\n }),\n SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface),\n TouchEventInterface = assign({}, UIEventInterface, {\n touches: 0,\n targetTouches: 0,\n changedTouches: 0,\n altKey: 0,\n metaKey: 0,\n ctrlKey: 0,\n shiftKey: 0,\n getModifierState: getEventModifierState\n }),\n SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface),\n TransitionEventInterface = assign({}, EventInterface, {\n propertyName: 0,\n elapsedTime: 0,\n pseudoElement: 0\n }),\n SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface),\n WheelEventInterface = assign({}, MouseEventInterface, {\n deltaX: function (event) {\n return \"deltaX\" in event\n ? event.deltaX\n : \"wheelDeltaX\" in event\n ? -event.wheelDeltaX\n : 0;\n },\n deltaY: function (event) {\n return \"deltaY\" in event\n ? event.deltaY\n : \"wheelDeltaY\" in event\n ? -event.wheelDeltaY\n : \"wheelDelta\" in event\n ? -event.wheelDelta\n : 0;\n },\n deltaZ: 0,\n deltaMode: 0\n }),\n SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface),\n ToggleEventInterface = assign({}, EventInterface, {\n newState: 0,\n oldState: 0\n }),\n SyntheticToggleEvent = createSyntheticEvent(ToggleEventInterface),\n END_KEYCODES = [9, 13, 27, 32],\n canUseCompositionEvent = canUseDOM && \"CompositionEvent\" in window,\n documentMode = null;\ncanUseDOM &&\n \"documentMode\" in document &&\n (documentMode = document.documentMode);\nvar canUseTextInputEvent = canUseDOM && \"TextEvent\" in window && !documentMode,\n useFallbackCompositionData =\n canUseDOM &&\n (!canUseCompositionEvent ||\n (documentMode && 8 < documentMode && 11 >= documentMode)),\n SPACEBAR_CHAR = String.fromCharCode(32),\n hasSpaceKeypress = !1;\nfunction isFallbackCompositionEnd(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"keyup\":\n return -1 !== END_KEYCODES.indexOf(nativeEvent.keyCode);\n case \"keydown\":\n return 229 !== nativeEvent.keyCode;\n case \"keypress\":\n case \"mousedown\":\n case \"focusout\":\n return !0;\n default:\n return !1;\n }\n}\nfunction getDataFromCustomEvent(nativeEvent) {\n nativeEvent = nativeEvent.detail;\n return \"object\" === typeof nativeEvent && \"data\" in nativeEvent\n ? nativeEvent.data\n : null;\n}\nvar isComposing = !1;\nfunction getNativeBeforeInputChars(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"compositionend\":\n return getDataFromCustomEvent(nativeEvent);\n case \"keypress\":\n if (32 !== nativeEvent.which) return null;\n hasSpaceKeypress = !0;\n return SPACEBAR_CHAR;\n case \"textInput\":\n return (\n (domEventName = nativeEvent.data),\n domEventName === SPACEBAR_CHAR && hasSpaceKeypress ? null : domEventName\n );\n default:\n return null;\n }\n}\nfunction getFallbackBeforeInputChars(domEventName, nativeEvent) {\n if (isComposing)\n return \"compositionend\" === domEventName ||\n (!canUseCompositionEvent &&\n isFallbackCompositionEnd(domEventName, nativeEvent))\n ? ((domEventName = getData()),\n (fallbackText = startText = root = null),\n (isComposing = !1),\n domEventName)\n : null;\n switch (domEventName) {\n case \"paste\":\n return null;\n case \"keypress\":\n if (\n !(nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) ||\n (nativeEvent.ctrlKey && nativeEvent.altKey)\n ) {\n if (nativeEvent.char && 1 < nativeEvent.char.length)\n return nativeEvent.char;\n if (nativeEvent.which) return String.fromCharCode(nativeEvent.which);\n }\n return null;\n case \"compositionend\":\n return useFallbackCompositionData && \"ko\" !== nativeEvent.locale\n ? null\n : nativeEvent.data;\n default:\n return null;\n }\n}\nvar supportedInputTypes = {\n color: !0,\n date: !0,\n datetime: !0,\n \"datetime-local\": !0,\n email: !0,\n month: !0,\n number: !0,\n password: !0,\n range: !0,\n search: !0,\n tel: !0,\n text: !0,\n time: !0,\n url: !0,\n week: !0\n};\nfunction isTextInputElement(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return \"input\" === nodeName\n ? !!supportedInputTypes[elem.type]\n : \"textarea\" === nodeName\n ? !0\n : !1;\n}\nfunction createAndAccumulateChangeEvent(\n dispatchQueue,\n inst,\n nativeEvent,\n target\n) {\n restoreTarget\n ? restoreQueue\n ? restoreQueue.push(target)\n : (restoreQueue = [target])\n : (restoreTarget = target);\n inst = accumulateTwoPhaseListeners(inst, \"onChange\");\n 0 < inst.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onChange\",\n \"change\",\n null,\n nativeEvent,\n target\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: inst }));\n}\nvar activeElement$1 = null,\n activeElementInst$1 = null;\nfunction runEventInBatch(dispatchQueue) {\n processDispatchQueue(dispatchQueue, 0);\n}\nfunction getInstIfValueChanged(targetInst) {\n var targetNode = getNodeFromInstance(targetInst);\n if (updateValueIfChanged(targetNode)) return targetInst;\n}\nfunction getTargetInstForChangeEvent(domEventName, targetInst) {\n if (\"change\" === domEventName) return targetInst;\n}\nvar isInputEventSupported = !1;\nif (canUseDOM) {\n var JSCompiler_inline_result$jscomp$286;\n if (canUseDOM) {\n var isSupported$jscomp$inline_427 = \"oninput\" in document;\n if (!isSupported$jscomp$inline_427) {\n var element$jscomp$inline_428 = document.createElement(\"div\");\n element$jscomp$inline_428.setAttribute(\"oninput\", \"return;\");\n isSupported$jscomp$inline_427 =\n \"function\" === typeof element$jscomp$inline_428.oninput;\n }\n JSCompiler_inline_result$jscomp$286 = isSupported$jscomp$inline_427;\n } else JSCompiler_inline_result$jscomp$286 = !1;\n isInputEventSupported =\n JSCompiler_inline_result$jscomp$286 &&\n (!document.documentMode || 9 < document.documentMode);\n}\nfunction stopWatchingForValueChange() {\n activeElement$1 &&\n (activeElement$1.detachEvent(\"onpropertychange\", handlePropertyChange),\n (activeElementInst$1 = activeElement$1 = null));\n}\nfunction handlePropertyChange(nativeEvent) {\n if (\n \"value\" === nativeEvent.propertyName &&\n getInstIfValueChanged(activeElementInst$1)\n ) {\n var dispatchQueue = [];\n createAndAccumulateChangeEvent(\n dispatchQueue,\n activeElementInst$1,\n nativeEvent,\n getEventTarget(nativeEvent)\n );\n batchedUpdates$1(runEventInBatch, dispatchQueue);\n }\n}\nfunction handleEventsForInputEventPolyfill(domEventName, target, targetInst) {\n \"focusin\" === domEventName\n ? (stopWatchingForValueChange(),\n (activeElement$1 = target),\n (activeElementInst$1 = targetInst),\n activeElement$1.attachEvent(\"onpropertychange\", handlePropertyChange))\n : \"focusout\" === domEventName && stopWatchingForValueChange();\n}\nfunction getTargetInstForInputEventPolyfill(domEventName) {\n if (\n \"selectionchange\" === domEventName ||\n \"keyup\" === domEventName ||\n \"keydown\" === domEventName\n )\n return getInstIfValueChanged(activeElementInst$1);\n}\nfunction getTargetInstForClickEvent(domEventName, targetInst) {\n if (\"click\" === domEventName) return getInstIfValueChanged(targetInst);\n}\nfunction getTargetInstForInputOrChangeEvent(domEventName, targetInst) {\n if (\"input\" === domEventName || \"change\" === domEventName)\n return getInstIfValueChanged(targetInst);\n}\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is;\nfunction shallowEqual(objA, objB) {\n if (objectIs(objA, objB)) return !0;\n if (\n \"object\" !== typeof objA ||\n null === objA ||\n \"object\" !== typeof objB ||\n null === objB\n )\n return !1;\n var keysA = Object.keys(objA),\n keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return !1;\n for (keysB = 0; keysB < keysA.length; keysB++) {\n var currentKey = keysA[keysB];\n if (\n !hasOwnProperty.call(objB, currentKey) ||\n !objectIs(objA[currentKey], objB[currentKey])\n )\n return !1;\n }\n return !0;\n}\nfunction getLeafNode(node) {\n for (; node && node.firstChild; ) node = node.firstChild;\n return node;\n}\nfunction getNodeForCharacterOffset(root, offset) {\n var node = getLeafNode(root);\n root = 0;\n for (var nodeEnd; node; ) {\n if (3 === node.nodeType) {\n nodeEnd = root + node.textContent.length;\n if (root <= offset && nodeEnd >= offset)\n return { node: node, offset: offset - root };\n root = nodeEnd;\n }\n a: {\n for (; node; ) {\n if (node.nextSibling) {\n node = node.nextSibling;\n break a;\n }\n node = node.parentNode;\n }\n node = void 0;\n }\n node = getLeafNode(node);\n }\n}\nfunction containsNode(outerNode, innerNode) {\n return outerNode && innerNode\n ? outerNode === innerNode\n ? !0\n : outerNode && 3 === outerNode.nodeType\n ? !1\n : innerNode && 3 === innerNode.nodeType\n ? containsNode(outerNode, innerNode.parentNode)\n : \"contains\" in outerNode\n ? outerNode.contains(innerNode)\n : outerNode.compareDocumentPosition\n ? !!(outerNode.compareDocumentPosition(innerNode) & 16)\n : !1\n : !1;\n}\nfunction getActiveElementDeep(containerInfo) {\n containerInfo =\n null != containerInfo &&\n null != containerInfo.ownerDocument &&\n null != containerInfo.ownerDocument.defaultView\n ? containerInfo.ownerDocument.defaultView\n : window;\n for (\n var element = getActiveElement(containerInfo.document);\n element instanceof containerInfo.HTMLIFrameElement;\n\n ) {\n try {\n var JSCompiler_inline_result =\n \"string\" === typeof element.contentWindow.location.href;\n } catch (err) {\n JSCompiler_inline_result = !1;\n }\n if (JSCompiler_inline_result) containerInfo = element.contentWindow;\n else break;\n element = getActiveElement(containerInfo.document);\n }\n return element;\n}\nfunction hasSelectionCapabilities(elem) {\n var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();\n return (\n nodeName &&\n ((\"input\" === nodeName &&\n (\"text\" === elem.type ||\n \"search\" === elem.type ||\n \"tel\" === elem.type ||\n \"url\" === elem.type ||\n \"password\" === elem.type)) ||\n \"textarea\" === nodeName ||\n \"true\" === elem.contentEditable)\n );\n}\nvar skipSelectionChangeEvent =\n canUseDOM && \"documentMode\" in document && 11 >= document.documentMode,\n activeElement = null,\n activeElementInst = null,\n lastSelection = null,\n mouseDown = !1;\nfunction constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {\n var doc =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget.document\n : 9 === nativeEventTarget.nodeType\n ? nativeEventTarget\n : nativeEventTarget.ownerDocument;\n mouseDown ||\n null == activeElement ||\n activeElement !== getActiveElement(doc) ||\n ((doc = activeElement),\n \"selectionStart\" in doc && hasSelectionCapabilities(doc)\n ? (doc = { start: doc.selectionStart, end: doc.selectionEnd })\n : ((doc = (\n (doc.ownerDocument && doc.ownerDocument.defaultView) ||\n window\n ).getSelection()),\n (doc = {\n anchorNode: doc.anchorNode,\n anchorOffset: doc.anchorOffset,\n focusNode: doc.focusNode,\n focusOffset: doc.focusOffset\n })),\n (lastSelection && shallowEqual(lastSelection, doc)) ||\n ((lastSelection = doc),\n (doc = accumulateTwoPhaseListeners(activeElementInst, \"onSelect\")),\n 0 < doc.length &&\n ((nativeEvent = new SyntheticEvent(\n \"onSelect\",\n \"select\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: nativeEvent, listeners: doc }),\n (nativeEvent.target = activeElement))));\n}\nfunction makePrefixMap(styleProp, eventName) {\n var prefixes = {};\n prefixes[styleProp.toLowerCase()] = eventName.toLowerCase();\n prefixes[\"Webkit\" + styleProp] = \"webkit\" + eventName;\n prefixes[\"Moz\" + styleProp] = \"moz\" + eventName;\n return prefixes;\n}\nvar vendorPrefixes = {\n animationend: makePrefixMap(\"Animation\", \"AnimationEnd\"),\n animationiteration: makePrefixMap(\"Animation\", \"AnimationIteration\"),\n animationstart: makePrefixMap(\"Animation\", \"AnimationStart\"),\n transitionrun: makePrefixMap(\"Transition\", \"TransitionRun\"),\n transitionstart: makePrefixMap(\"Transition\", \"TransitionStart\"),\n transitioncancel: makePrefixMap(\"Transition\", \"TransitionCancel\"),\n transitionend: makePrefixMap(\"Transition\", \"TransitionEnd\")\n },\n prefixedEventNames = {},\n style = {};\ncanUseDOM &&\n ((style = document.createElement(\"div\").style),\n \"AnimationEvent\" in window ||\n (delete vendorPrefixes.animationend.animation,\n delete vendorPrefixes.animationiteration.animation,\n delete vendorPrefixes.animationstart.animation),\n \"TransitionEvent\" in window ||\n delete vendorPrefixes.transitionend.transition);\nfunction getVendorPrefixedEventName(eventName) {\n if (prefixedEventNames[eventName]) return prefixedEventNames[eventName];\n if (!vendorPrefixes[eventName]) return eventName;\n var prefixMap = vendorPrefixes[eventName],\n styleProp;\n for (styleProp in prefixMap)\n if (prefixMap.hasOwnProperty(styleProp) && styleProp in style)\n return (prefixedEventNames[eventName] = prefixMap[styleProp]);\n return eventName;\n}\nvar ANIMATION_END = getVendorPrefixedEventName(\"animationend\"),\n ANIMATION_ITERATION = getVendorPrefixedEventName(\"animationiteration\"),\n ANIMATION_START = getVendorPrefixedEventName(\"animationstart\"),\n TRANSITION_RUN = getVendorPrefixedEventName(\"transitionrun\"),\n TRANSITION_START = getVendorPrefixedEventName(\"transitionstart\"),\n TRANSITION_CANCEL = getVendorPrefixedEventName(\"transitioncancel\"),\n TRANSITION_END = getVendorPrefixedEventName(\"transitionend\"),\n topLevelEventsToReactNames = new Map(),\n simpleEventPluginEvents =\n \"abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel\".split(\n \" \"\n );\nsimpleEventPluginEvents.push(\"scrollEnd\");\nfunction registerSimpleEvent(domEventName, reactName) {\n topLevelEventsToReactNames.set(domEventName, reactName);\n registerTwoPhaseEvent(reactName, [domEventName]);\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n },\n concurrentQueues = [],\n concurrentQueuesIndex = 0,\n concurrentlyUpdatedLanes = 0;\nfunction finishQueueingConcurrentUpdates() {\n for (\n var endIndex = concurrentQueuesIndex,\n i = (concurrentlyUpdatedLanes = concurrentQueuesIndex = 0);\n i < endIndex;\n\n ) {\n var fiber = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var queue = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var update = concurrentQueues[i];\n concurrentQueues[i++] = null;\n var lane = concurrentQueues[i];\n concurrentQueues[i++] = null;\n if (null !== queue && null !== update) {\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n }\n 0 !== lane && markUpdateLaneFromFiberToRoot(fiber, update, lane);\n }\n}\nfunction enqueueUpdate$1(fiber, queue, update, lane) {\n concurrentQueues[concurrentQueuesIndex++] = fiber;\n concurrentQueues[concurrentQueuesIndex++] = queue;\n concurrentQueues[concurrentQueuesIndex++] = update;\n concurrentQueues[concurrentQueuesIndex++] = lane;\n concurrentlyUpdatedLanes |= lane;\n fiber.lanes |= lane;\n fiber = fiber.alternate;\n null !== fiber && (fiber.lanes |= lane);\n}\nfunction enqueueConcurrentHookUpdate(fiber, queue, update, lane) {\n enqueueUpdate$1(fiber, queue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction enqueueConcurrentRenderForLane(fiber, lane) {\n enqueueUpdate$1(fiber, null, null, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction markUpdateLaneFromFiberToRoot(sourceFiber, update, lane) {\n sourceFiber.lanes |= lane;\n var alternate = sourceFiber.alternate;\n null !== alternate && (alternate.lanes |= lane);\n for (var isHidden = !1, parent = sourceFiber.return; null !== parent; )\n (parent.childLanes |= lane),\n (alternate = parent.alternate),\n null !== alternate && (alternate.childLanes |= lane),\n 22 === parent.tag &&\n ((sourceFiber = parent.stateNode),\n null === sourceFiber || sourceFiber._visibility & 1 || (isHidden = !0)),\n (sourceFiber = parent),\n (parent = parent.return);\n return 3 === sourceFiber.tag\n ? ((parent = sourceFiber.stateNode),\n isHidden &&\n null !== update &&\n ((isHidden = 31 - clz32(lane)),\n (sourceFiber = parent.hiddenUpdates),\n (alternate = sourceFiber[isHidden]),\n null === alternate\n ? (sourceFiber[isHidden] = [update])\n : alternate.push(update),\n (update.lane = lane | 536870912)),\n parent)\n : null;\n}\nfunction getRootForUpdatedFiber(sourceFiber) {\n if (50 < nestedUpdateCount)\n throw (\n ((nestedUpdateCount = 0),\n (rootWithNestedUpdates = null),\n Error(formatProdErrorMessage(185)))\n );\n for (var parent = sourceFiber.return; null !== parent; )\n (sourceFiber = parent), (parent = sourceFiber.return);\n return 3 === sourceFiber.tag ? sourceFiber.stateNode : null;\n}\nvar emptyContextObject = {};\nfunction FiberNode(tag, pendingProps, key, mode) {\n this.tag = tag;\n this.key = key;\n this.sibling =\n this.child =\n this.return =\n this.stateNode =\n this.type =\n this.elementType =\n null;\n this.index = 0;\n this.refCleanup = this.ref = null;\n this.pendingProps = pendingProps;\n this.dependencies =\n this.memoizedState =\n this.updateQueue =\n this.memoizedProps =\n null;\n this.mode = mode;\n this.subtreeFlags = this.flags = 0;\n this.deletions = null;\n this.childLanes = this.lanes = 0;\n this.alternate = null;\n}\nfunction createFiberImplClass(tag, pendingProps, key, mode) {\n return new FiberNode(tag, pendingProps, key, mode);\n}\nfunction shouldConstruct(Component) {\n Component = Component.prototype;\n return !(!Component || !Component.isReactComponent);\n}\nfunction createWorkInProgress(current, pendingProps) {\n var workInProgress = current.alternate;\n null === workInProgress\n ? ((workInProgress = createFiberImplClass(\n current.tag,\n pendingProps,\n current.key,\n current.mode\n )),\n (workInProgress.elementType = current.elementType),\n (workInProgress.type = current.type),\n (workInProgress.stateNode = current.stateNode),\n (workInProgress.alternate = current),\n (current.alternate = workInProgress))\n : ((workInProgress.pendingProps = pendingProps),\n (workInProgress.type = current.type),\n (workInProgress.flags = 0),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null));\n workInProgress.flags = current.flags & 65011712;\n workInProgress.childLanes = current.childLanes;\n workInProgress.lanes = current.lanes;\n workInProgress.child = current.child;\n workInProgress.memoizedProps = current.memoizedProps;\n workInProgress.memoizedState = current.memoizedState;\n workInProgress.updateQueue = current.updateQueue;\n pendingProps = current.dependencies;\n workInProgress.dependencies =\n null === pendingProps\n ? null\n : { lanes: pendingProps.lanes, firstContext: pendingProps.firstContext };\n workInProgress.sibling = current.sibling;\n workInProgress.index = current.index;\n workInProgress.ref = current.ref;\n workInProgress.refCleanup = current.refCleanup;\n return workInProgress;\n}\nfunction resetWorkInProgress(workInProgress, renderLanes) {\n workInProgress.flags &= 65011714;\n var current = workInProgress.alternate;\n null === current\n ? ((workInProgress.childLanes = 0),\n (workInProgress.lanes = renderLanes),\n (workInProgress.child = null),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.memoizedProps = null),\n (workInProgress.memoizedState = null),\n (workInProgress.updateQueue = null),\n (workInProgress.dependencies = null),\n (workInProgress.stateNode = null))\n : ((workInProgress.childLanes = current.childLanes),\n (workInProgress.lanes = current.lanes),\n (workInProgress.child = current.child),\n (workInProgress.subtreeFlags = 0),\n (workInProgress.deletions = null),\n (workInProgress.memoizedProps = current.memoizedProps),\n (workInProgress.memoizedState = current.memoizedState),\n (workInProgress.updateQueue = current.updateQueue),\n (workInProgress.type = current.type),\n (renderLanes = current.dependencies),\n (workInProgress.dependencies =\n null === renderLanes\n ? null\n : {\n lanes: renderLanes.lanes,\n firstContext: renderLanes.firstContext\n }));\n return workInProgress;\n}\nfunction createFiberFromTypeAndProps(\n type,\n key,\n pendingProps,\n owner,\n mode,\n lanes\n) {\n var fiberTag = 0;\n owner = type;\n if (\"function\" === typeof type) shouldConstruct(type) && (fiberTag = 1);\n else if (\"string\" === typeof type)\n fiberTag = isHostHoistableType(\n type,\n pendingProps,\n contextStackCursor.current\n )\n ? 26\n : \"html\" === type || \"head\" === type || \"body\" === type\n ? 27\n : 5;\n else\n a: switch (type) {\n case REACT_ACTIVITY_TYPE:\n return (\n (type = createFiberImplClass(31, pendingProps, key, mode)),\n (type.elementType = REACT_ACTIVITY_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_FRAGMENT_TYPE:\n return createFiberFromFragment(pendingProps.children, mode, lanes, key);\n case REACT_STRICT_MODE_TYPE:\n fiberTag = 8;\n mode |= 24;\n break;\n case REACT_PROFILER_TYPE:\n return (\n (type = createFiberImplClass(12, pendingProps, key, mode | 2)),\n (type.elementType = REACT_PROFILER_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_TYPE:\n return (\n (type = createFiberImplClass(13, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_TYPE),\n (type.lanes = lanes),\n type\n );\n case REACT_SUSPENSE_LIST_TYPE:\n return (\n (type = createFiberImplClass(19, pendingProps, key, mode)),\n (type.elementType = REACT_SUSPENSE_LIST_TYPE),\n (type.lanes = lanes),\n type\n );\n default:\n if (\"object\" === typeof type && null !== type)\n switch (type.$$typeof) {\n case REACT_CONTEXT_TYPE:\n fiberTag = 10;\n break a;\n case REACT_CONSUMER_TYPE:\n fiberTag = 9;\n break a;\n case REACT_FORWARD_REF_TYPE:\n fiberTag = 11;\n break a;\n case REACT_MEMO_TYPE:\n fiberTag = 14;\n break a;\n case REACT_LAZY_TYPE:\n fiberTag = 16;\n owner = null;\n break a;\n }\n fiberTag = 29;\n pendingProps = Error(\n formatProdErrorMessage(130, null === type ? \"null\" : typeof type, \"\")\n );\n owner = null;\n }\n key = createFiberImplClass(fiberTag, pendingProps, key, mode);\n key.elementType = type;\n key.type = owner;\n key.lanes = lanes;\n return key;\n}\nfunction createFiberFromFragment(elements, mode, lanes, key) {\n elements = createFiberImplClass(7, elements, key, mode);\n elements.lanes = lanes;\n return elements;\n}\nfunction createFiberFromText(content, mode, lanes) {\n content = createFiberImplClass(6, content, null, mode);\n content.lanes = lanes;\n return content;\n}\nfunction createFiberFromDehydratedFragment(dehydratedNode) {\n var fiber = createFiberImplClass(18, null, null, 0);\n fiber.stateNode = dehydratedNode;\n return fiber;\n}\nfunction createFiberFromPortal(portal, mode, lanes) {\n mode = createFiberImplClass(\n 4,\n null !== portal.children ? portal.children : [],\n portal.key,\n mode\n );\n mode.lanes = lanes;\n mode.stateNode = {\n containerInfo: portal.containerInfo,\n pendingChildren: null,\n implementation: portal.implementation\n };\n return mode;\n}\nvar CapturedStacks = new WeakMap();\nfunction createCapturedValueAtFiber(value, source) {\n if (\"object\" === typeof value && null !== value) {\n var existing = CapturedStacks.get(value);\n if (void 0 !== existing) return existing;\n source = {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n CapturedStacks.set(value, source);\n return source;\n }\n return {\n value: value,\n source: source,\n stack: getStackByFiberInDevAndProd(source)\n };\n}\nvar forkStack = [],\n forkStackIndex = 0,\n treeForkProvider = null,\n treeForkCount = 0,\n idStack = [],\n idStackIndex = 0,\n treeContextProvider = null,\n treeContextId = 1,\n treeContextOverflow = \"\";\nfunction pushTreeFork(workInProgress, totalChildren) {\n forkStack[forkStackIndex++] = treeForkCount;\n forkStack[forkStackIndex++] = treeForkProvider;\n treeForkProvider = workInProgress;\n treeForkCount = totalChildren;\n}\nfunction pushTreeId(workInProgress, totalChildren, index) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextProvider = workInProgress;\n var baseIdWithLeadingBit = treeContextId;\n workInProgress = treeContextOverflow;\n var baseLength = 32 - clz32(baseIdWithLeadingBit) - 1;\n baseIdWithLeadingBit &= ~(1 << baseLength);\n index += 1;\n var length = 32 - clz32(totalChildren) + baseLength;\n if (30 < length) {\n var numberOfOverflowBits = baseLength - (baseLength % 5);\n length = (\n baseIdWithLeadingBit &\n ((1 << numberOfOverflowBits) - 1)\n ).toString(32);\n baseIdWithLeadingBit >>= numberOfOverflowBits;\n baseLength -= numberOfOverflowBits;\n treeContextId =\n (1 << (32 - clz32(totalChildren) + baseLength)) |\n (index << baseLength) |\n baseIdWithLeadingBit;\n treeContextOverflow = length + workInProgress;\n } else\n (treeContextId =\n (1 << length) | (index << baseLength) | baseIdWithLeadingBit),\n (treeContextOverflow = workInProgress);\n}\nfunction pushMaterializedTreeId(workInProgress) {\n null !== workInProgress.return &&\n (pushTreeFork(workInProgress, 1), pushTreeId(workInProgress, 1, 0));\n}\nfunction popTreeContext(workInProgress) {\n for (; workInProgress === treeForkProvider; )\n (treeForkProvider = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null),\n (treeForkCount = forkStack[--forkStackIndex]),\n (forkStack[forkStackIndex] = null);\n for (; workInProgress === treeContextProvider; )\n (treeContextProvider = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextOverflow = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null),\n (treeContextId = idStack[--idStackIndex]),\n (idStack[idStackIndex] = null);\n}\nfunction restoreSuspendedTreeContext(workInProgress, suspendedContext) {\n idStack[idStackIndex++] = treeContextId;\n idStack[idStackIndex++] = treeContextOverflow;\n idStack[idStackIndex++] = treeContextProvider;\n treeContextId = suspendedContext.id;\n treeContextOverflow = suspendedContext.overflow;\n treeContextProvider = workInProgress;\n}\nvar hydrationParentFiber = null,\n nextHydratableInstance = null,\n isHydrating = !1,\n hydrationErrors = null,\n rootOrSingletonContext = !1,\n HydrationMismatchException = Error(formatProdErrorMessage(519));\nfunction throwOnHydrationMismatch(fiber) {\n var error = Error(\n formatProdErrorMessage(\n 418,\n 1 < arguments.length && void 0 !== arguments[1] && arguments[1]\n ? \"text\"\n : \"HTML\",\n \"\"\n )\n );\n queueHydrationError(createCapturedValueAtFiber(error, fiber));\n throw HydrationMismatchException;\n}\nfunction prepareToHydrateHostInstance(fiber) {\n var instance = fiber.stateNode,\n type = fiber.type,\n props = fiber.memoizedProps;\n instance[internalInstanceKey] = fiber;\n instance[internalPropsKey] = props;\n switch (type) {\n case \"dialog\":\n listenToNonDelegatedEvent(\"cancel\", instance);\n listenToNonDelegatedEvent(\"close\", instance);\n break;\n case \"iframe\":\n case \"object\":\n case \"embed\":\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"video\":\n case \"audio\":\n for (type = 0; type < mediaEventTypes.length; type++)\n listenToNonDelegatedEvent(mediaEventTypes[type], instance);\n break;\n case \"source\":\n listenToNonDelegatedEvent(\"error\", instance);\n break;\n case \"img\":\n case \"image\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", instance);\n listenToNonDelegatedEvent(\"load\", instance);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", instance);\n break;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n initInput(\n instance,\n props.value,\n props.defaultValue,\n props.checked,\n props.defaultChecked,\n props.type,\n props.name,\n !0\n );\n break;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", instance);\n break;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", instance),\n initTextarea(instance, props.value, props.defaultValue, props.children);\n }\n type = props.children;\n (\"string\" !== typeof type &&\n \"number\" !== typeof type &&\n \"bigint\" !== typeof type) ||\n instance.textContent === \"\" + type ||\n !0 === props.suppressHydrationWarning ||\n checkForUnmatchedText(instance.textContent, type)\n ? (null != props.popover &&\n (listenToNonDelegatedEvent(\"beforetoggle\", instance),\n listenToNonDelegatedEvent(\"toggle\", instance)),\n null != props.onScroll && listenToNonDelegatedEvent(\"scroll\", instance),\n null != props.onScrollEnd &&\n listenToNonDelegatedEvent(\"scrollend\", instance),\n null != props.onClick && (instance.onclick = noop$1),\n (instance = !0))\n : (instance = !1);\n instance || throwOnHydrationMismatch(fiber, !0);\n}\nfunction popToNextHostParent(fiber) {\n for (hydrationParentFiber = fiber.return; hydrationParentFiber; )\n switch (hydrationParentFiber.tag) {\n case 5:\n case 31:\n case 13:\n rootOrSingletonContext = !1;\n return;\n case 27:\n case 3:\n rootOrSingletonContext = !0;\n return;\n default:\n hydrationParentFiber = hydrationParentFiber.return;\n }\n}\nfunction popHydrationState(fiber) {\n if (fiber !== hydrationParentFiber) return !1;\n if (!isHydrating) return popToNextHostParent(fiber), (isHydrating = !0), !1;\n var tag = fiber.tag,\n JSCompiler_temp;\n if ((JSCompiler_temp = 3 !== tag && 27 !== tag)) {\n if ((JSCompiler_temp = 5 === tag))\n (JSCompiler_temp = fiber.type),\n (JSCompiler_temp =\n !(\"form\" !== JSCompiler_temp && \"button\" !== JSCompiler_temp) ||\n shouldSetTextContent(fiber.type, fiber.memoizedProps));\n JSCompiler_temp = !JSCompiler_temp;\n }\n JSCompiler_temp && nextHydratableInstance && throwOnHydrationMismatch(fiber);\n popToNextHostParent(fiber);\n if (13 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else if (31 === tag) {\n fiber = fiber.memoizedState;\n fiber = null !== fiber ? fiber.dehydrated : null;\n if (!fiber) throw Error(formatProdErrorMessage(317));\n nextHydratableInstance =\n getNextHydratableInstanceAfterHydrationBoundary(fiber);\n } else\n 27 === tag\n ? ((tag = nextHydratableInstance),\n isSingletonScope(fiber.type)\n ? ((fiber = previousHydratableOnEnteringScopedSingleton),\n (previousHydratableOnEnteringScopedSingleton = null),\n (nextHydratableInstance = fiber))\n : (nextHydratableInstance = tag))\n : (nextHydratableInstance = hydrationParentFiber\n ? getNextHydratable(fiber.stateNode.nextSibling)\n : null);\n return !0;\n}\nfunction resetHydrationState() {\n nextHydratableInstance = hydrationParentFiber = null;\n isHydrating = !1;\n}\nfunction upgradeHydrationErrorsToRecoverable() {\n var queuedErrors = hydrationErrors;\n null !== queuedErrors &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = queuedErrors)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n queuedErrors\n ),\n (hydrationErrors = null));\n return queuedErrors;\n}\nfunction queueHydrationError(error) {\n null === hydrationErrors\n ? (hydrationErrors = [error])\n : hydrationErrors.push(error);\n}\nvar valueCursor = createCursor(null),\n currentlyRenderingFiber$1 = null,\n lastContextDependency = null;\nfunction pushProvider(providerFiber, context, nextValue) {\n push(valueCursor, context._currentValue);\n context._currentValue = nextValue;\n}\nfunction popProvider(context) {\n context._currentValue = valueCursor.current;\n pop(valueCursor);\n}\nfunction scheduleContextWorkOnParentPath(parent, renderLanes, propagationRoot) {\n for (; null !== parent; ) {\n var alternate = parent.alternate;\n (parent.childLanes & renderLanes) !== renderLanes\n ? ((parent.childLanes |= renderLanes),\n null !== alternate && (alternate.childLanes |= renderLanes))\n : null !== alternate &&\n (alternate.childLanes & renderLanes) !== renderLanes &&\n (alternate.childLanes |= renderLanes);\n if (parent === propagationRoot) break;\n parent = parent.return;\n }\n}\nfunction propagateContextChanges(\n workInProgress,\n contexts,\n renderLanes,\n forcePropagateEntireTree\n) {\n var fiber = workInProgress.child;\n null !== fiber && (fiber.return = workInProgress);\n for (; null !== fiber; ) {\n var list = fiber.dependencies;\n if (null !== list) {\n var nextFiber = fiber.child;\n list = list.firstContext;\n a: for (; null !== list; ) {\n var dependency = list;\n list = fiber;\n for (var i = 0; i < contexts.length; i++)\n if (dependency.context === contexts[i]) {\n list.lanes |= renderLanes;\n dependency = list.alternate;\n null !== dependency && (dependency.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(\n list.return,\n renderLanes,\n workInProgress\n );\n forcePropagateEntireTree || (nextFiber = null);\n break a;\n }\n list = dependency.next;\n }\n } else if (18 === fiber.tag) {\n nextFiber = fiber.return;\n if (null === nextFiber) throw Error(formatProdErrorMessage(341));\n nextFiber.lanes |= renderLanes;\n list = nextFiber.alternate;\n null !== list && (list.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(nextFiber, renderLanes, workInProgress);\n nextFiber = null;\n } else nextFiber = fiber.child;\n if (null !== nextFiber) nextFiber.return = fiber;\n else\n for (nextFiber = fiber; null !== nextFiber; ) {\n if (nextFiber === workInProgress) {\n nextFiber = null;\n break;\n }\n fiber = nextFiber.sibling;\n if (null !== fiber) {\n fiber.return = nextFiber.return;\n nextFiber = fiber;\n break;\n }\n nextFiber = nextFiber.return;\n }\n fiber = nextFiber;\n }\n}\nfunction propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n forcePropagateEntireTree\n) {\n current = null;\n for (\n var parent = workInProgress, isInsidePropagationBailout = !1;\n null !== parent;\n\n ) {\n if (!isInsidePropagationBailout)\n if (0 !== (parent.flags & 524288)) isInsidePropagationBailout = !0;\n else if (0 !== (parent.flags & 262144)) break;\n if (10 === parent.tag) {\n var currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent = currentParent.memoizedProps;\n if (null !== currentParent) {\n var context = parent.type;\n objectIs(parent.pendingProps.value, currentParent.value) ||\n (null !== current ? current.push(context) : (current = [context]));\n }\n } else if (parent === hostTransitionProviderCursor.current) {\n currentParent = parent.alternate;\n if (null === currentParent) throw Error(formatProdErrorMessage(387));\n currentParent.memoizedState.memoizedState !==\n parent.memoizedState.memoizedState &&\n (null !== current\n ? current.push(HostTransitionContext)\n : (current = [HostTransitionContext]));\n }\n parent = parent.return;\n }\n null !== current &&\n propagateContextChanges(\n workInProgress,\n current,\n renderLanes,\n forcePropagateEntireTree\n );\n workInProgress.flags |= 262144;\n}\nfunction checkIfContextChanged(currentDependencies) {\n for (\n currentDependencies = currentDependencies.firstContext;\n null !== currentDependencies;\n\n ) {\n if (\n !objectIs(\n currentDependencies.context._currentValue,\n currentDependencies.memoizedValue\n )\n )\n return !0;\n currentDependencies = currentDependencies.next;\n }\n return !1;\n}\nfunction prepareToReadContext(workInProgress) {\n currentlyRenderingFiber$1 = workInProgress;\n lastContextDependency = null;\n workInProgress = workInProgress.dependencies;\n null !== workInProgress && (workInProgress.firstContext = null);\n}\nfunction readContext(context) {\n return readContextForConsumer(currentlyRenderingFiber$1, context);\n}\nfunction readContextDuringReconciliation(consumer, context) {\n null === currentlyRenderingFiber$1 && prepareToReadContext(consumer);\n return readContextForConsumer(consumer, context);\n}\nfunction readContextForConsumer(consumer, context) {\n var value = context._currentValue;\n context = { context: context, memoizedValue: value, next: null };\n if (null === lastContextDependency) {\n if (null === consumer) throw Error(formatProdErrorMessage(308));\n lastContextDependency = context;\n consumer.dependencies = { lanes: 0, firstContext: context };\n consumer.flags |= 524288;\n } else lastContextDependency = lastContextDependency.next = context;\n return value;\n}\nvar AbortControllerLocal =\n \"undefined\" !== typeof AbortController\n ? AbortController\n : function () {\n var listeners = [],\n signal = (this.signal = {\n aborted: !1,\n addEventListener: function (type, listener) {\n listeners.push(listener);\n }\n });\n this.abort = function () {\n signal.aborted = !0;\n listeners.forEach(function (listener) {\n return listener();\n });\n };\n },\n scheduleCallback$2 = Scheduler.unstable_scheduleCallback,\n NormalPriority = Scheduler.unstable_NormalPriority,\n CacheContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Consumer: null,\n Provider: null,\n _currentValue: null,\n _currentValue2: null,\n _threadCount: 0\n };\nfunction createCache() {\n return {\n controller: new AbortControllerLocal(),\n data: new Map(),\n refCount: 0\n };\n}\nfunction releaseCache(cache) {\n cache.refCount--;\n 0 === cache.refCount &&\n scheduleCallback$2(NormalPriority, function () {\n cache.controller.abort();\n });\n}\nvar currentEntangledListeners = null,\n currentEntangledPendingCount = 0,\n currentEntangledLane = 0,\n currentEntangledActionThenable = null;\nfunction entangleAsyncAction(transition, thenable) {\n if (null === currentEntangledListeners) {\n var entangledListeners = (currentEntangledListeners = []);\n currentEntangledPendingCount = 0;\n currentEntangledLane = requestTransitionLane();\n currentEntangledActionThenable = {\n status: \"pending\",\n value: void 0,\n then: function (resolve) {\n entangledListeners.push(resolve);\n }\n };\n }\n currentEntangledPendingCount++;\n thenable.then(pingEngtangledActionScope, pingEngtangledActionScope);\n return thenable;\n}\nfunction pingEngtangledActionScope() {\n if (\n 0 === --currentEntangledPendingCount &&\n null !== currentEntangledListeners\n ) {\n null !== currentEntangledActionThenable &&\n (currentEntangledActionThenable.status = \"fulfilled\");\n var listeners = currentEntangledListeners;\n currentEntangledListeners = null;\n currentEntangledLane = 0;\n currentEntangledActionThenable = null;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])();\n }\n}\nfunction chainThenableValue(thenable, result) {\n var listeners = [],\n thenableWithOverride = {\n status: \"pending\",\n value: null,\n reason: null,\n then: function (resolve) {\n listeners.push(resolve);\n }\n };\n thenable.then(\n function () {\n thenableWithOverride.status = \"fulfilled\";\n thenableWithOverride.value = result;\n for (var i = 0; i < listeners.length; i++) (0, listeners[i])(result);\n },\n function (error) {\n thenableWithOverride.status = \"rejected\";\n thenableWithOverride.reason = error;\n for (error = 0; error < listeners.length; error++)\n (0, listeners[error])(void 0);\n }\n );\n return thenableWithOverride;\n}\nvar prevOnStartTransitionFinish = ReactSharedInternals.S;\nReactSharedInternals.S = function (transition, returnValue) {\n globalMostRecentTransitionTime = now();\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n entangleAsyncAction(transition, returnValue);\n null !== prevOnStartTransitionFinish &&\n prevOnStartTransitionFinish(transition, returnValue);\n};\nvar resumedCache = createCursor(null);\nfunction peekCacheFromPool() {\n var cacheResumedFromPreviousRender = resumedCache.current;\n return null !== cacheResumedFromPreviousRender\n ? cacheResumedFromPreviousRender\n : workInProgressRoot.pooledCache;\n}\nfunction pushTransition(offscreenWorkInProgress, prevCachePool) {\n null === prevCachePool\n ? push(resumedCache, resumedCache.current)\n : push(resumedCache, prevCachePool.pool);\n}\nfunction getSuspendedCache() {\n var cacheFromPool = peekCacheFromPool();\n return null === cacheFromPool\n ? null\n : { parent: CacheContext._currentValue, pool: cacheFromPool };\n}\nvar SuspenseException = Error(formatProdErrorMessage(460)),\n SuspenseyCommitException = Error(formatProdErrorMessage(474)),\n SuspenseActionException = Error(formatProdErrorMessage(542)),\n noopSuspenseyCommitThenable = { then: function () {} };\nfunction isThenableResolved(thenable) {\n thenable = thenable.status;\n return \"fulfilled\" === thenable || \"rejected\" === thenable;\n}\nfunction trackUsedThenable(thenableState, thenable, index) {\n index = thenableState[index];\n void 0 === index\n ? thenableState.push(thenable)\n : index !== thenable && (thenable.then(noop$1, noop$1), (thenable = index));\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n default:\n if (\"string\" === typeof thenable.status) thenable.then(noop$1, noop$1);\n else {\n thenableState = workInProgressRoot;\n if (null !== thenableState && 100 < thenableState.shellSuspendCounter)\n throw Error(formatProdErrorMessage(482));\n thenableState = thenable;\n thenableState.status = \"pending\";\n thenableState.then(\n function (fulfilledValue) {\n if (\"pending\" === thenable.status) {\n var fulfilledThenable = thenable;\n fulfilledThenable.status = \"fulfilled\";\n fulfilledThenable.value = fulfilledValue;\n }\n },\n function (error) {\n if (\"pending\" === thenable.status) {\n var rejectedThenable = thenable;\n rejectedThenable.status = \"rejected\";\n rejectedThenable.reason = error;\n }\n }\n );\n }\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw (\n ((thenableState = thenable.reason),\n checkIfUseWrappedInAsyncCatch(thenableState),\n thenableState)\n );\n }\n suspendedThenable = thenable;\n throw SuspenseException;\n }\n}\nfunction resolveLazy(lazyType) {\n try {\n var init = lazyType._init;\n return init(lazyType._payload);\n } catch (x) {\n if (null !== x && \"object\" === typeof x && \"function\" === typeof x.then)\n throw ((suspendedThenable = x), SuspenseException);\n throw x;\n }\n}\nvar suspendedThenable = null;\nfunction getSuspendedThenable() {\n if (null === suspendedThenable) throw Error(formatProdErrorMessage(459));\n var thenable = suspendedThenable;\n suspendedThenable = null;\n return thenable;\n}\nfunction checkIfUseWrappedInAsyncCatch(rejectedReason) {\n if (\n rejectedReason === SuspenseException ||\n rejectedReason === SuspenseActionException\n )\n throw Error(formatProdErrorMessage(483));\n}\nvar thenableState$1 = null,\n thenableIndexCounter$1 = 0;\nfunction unwrapThenable(thenable) {\n var index = thenableIndexCounter$1;\n thenableIndexCounter$1 += 1;\n null === thenableState$1 && (thenableState$1 = []);\n return trackUsedThenable(thenableState$1, thenable, index);\n}\nfunction coerceRef(workInProgress, element) {\n element = element.props.ref;\n workInProgress.ref = void 0 !== element ? element : null;\n}\nfunction throwOnInvalidObjectTypeImpl(returnFiber, newChild) {\n if (newChild.$$typeof === REACT_LEGACY_ELEMENT_TYPE)\n throw Error(formatProdErrorMessage(525));\n returnFiber = Object.prototype.toString.call(newChild);\n throw Error(\n formatProdErrorMessage(\n 31,\n \"[object Object]\" === returnFiber\n ? \"object with keys {\" + Object.keys(newChild).join(\", \") + \"}\"\n : returnFiber\n )\n );\n}\nfunction createChildReconciler(shouldTrackSideEffects) {\n function deleteChild(returnFiber, childToDelete) {\n if (shouldTrackSideEffects) {\n var deletions = returnFiber.deletions;\n null === deletions\n ? ((returnFiber.deletions = [childToDelete]), (returnFiber.flags |= 16))\n : deletions.push(childToDelete);\n }\n }\n function deleteRemainingChildren(returnFiber, currentFirstChild) {\n if (!shouldTrackSideEffects) return null;\n for (; null !== currentFirstChild; )\n deleteChild(returnFiber, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return null;\n }\n function mapRemainingChildren(currentFirstChild) {\n for (var existingChildren = new Map(); null !== currentFirstChild; )\n null !== currentFirstChild.key\n ? existingChildren.set(currentFirstChild.key, currentFirstChild)\n : existingChildren.set(currentFirstChild.index, currentFirstChild),\n (currentFirstChild = currentFirstChild.sibling);\n return existingChildren;\n }\n function useFiber(fiber, pendingProps) {\n fiber = createWorkInProgress(fiber, pendingProps);\n fiber.index = 0;\n fiber.sibling = null;\n return fiber;\n }\n function placeChild(newFiber, lastPlacedIndex, newIndex) {\n newFiber.index = newIndex;\n if (!shouldTrackSideEffects)\n return (newFiber.flags |= 1048576), lastPlacedIndex;\n newIndex = newFiber.alternate;\n if (null !== newIndex)\n return (\n (newIndex = newIndex.index),\n newIndex < lastPlacedIndex\n ? ((newFiber.flags |= 67108866), lastPlacedIndex)\n : newIndex\n );\n newFiber.flags |= 67108866;\n return lastPlacedIndex;\n }\n function placeSingleChild(newFiber) {\n shouldTrackSideEffects &&\n null === newFiber.alternate &&\n (newFiber.flags |= 67108866);\n return newFiber;\n }\n function updateTextNode(returnFiber, current, textContent, lanes) {\n if (null === current || 6 !== current.tag)\n return (\n (current = createFiberFromText(textContent, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, textContent);\n current.return = returnFiber;\n return current;\n }\n function updateElement(returnFiber, current, element, lanes) {\n var elementType = element.type;\n if (elementType === REACT_FRAGMENT_TYPE)\n return updateFragment(\n returnFiber,\n current,\n element.props.children,\n lanes,\n element.key\n );\n if (\n null !== current &&\n (current.elementType === elementType ||\n (\"object\" === typeof elementType &&\n null !== elementType &&\n elementType.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(elementType) === current.type))\n )\n return (\n (current = useFiber(current, element.props)),\n coerceRef(current, element),\n (current.return = returnFiber),\n current\n );\n current = createFiberFromTypeAndProps(\n element.type,\n element.key,\n element.props,\n null,\n returnFiber.mode,\n lanes\n );\n coerceRef(current, element);\n current.return = returnFiber;\n return current;\n }\n function updatePortal(returnFiber, current, portal, lanes) {\n if (\n null === current ||\n 4 !== current.tag ||\n current.stateNode.containerInfo !== portal.containerInfo ||\n current.stateNode.implementation !== portal.implementation\n )\n return (\n (current = createFiberFromPortal(portal, returnFiber.mode, lanes)),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, portal.children || []);\n current.return = returnFiber;\n return current;\n }\n function updateFragment(returnFiber, current, fragment, lanes, key) {\n if (null === current || 7 !== current.tag)\n return (\n (current = createFiberFromFragment(\n fragment,\n returnFiber.mode,\n lanes,\n key\n )),\n (current.return = returnFiber),\n current\n );\n current = useFiber(current, fragment);\n current.return = returnFiber;\n return current;\n }\n function createChild(returnFiber, newChild, lanes) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (newChild = createFiberFromText(\n \"\" + newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n lanes\n );\n case REACT_PORTAL_TYPE:\n return (\n (newChild = createFiberFromPortal(\n newChild,\n returnFiber.mode,\n lanes\n )),\n (newChild.return = returnFiber),\n newChild\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n createChild(returnFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (newChild = createFiberFromFragment(\n newChild,\n returnFiber.mode,\n lanes,\n null\n )),\n (newChild.return = returnFiber),\n newChild\n );\n if (\"function\" === typeof newChild.then)\n return createChild(returnFiber, unwrapThenable(newChild), lanes);\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return createChild(\n returnFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateSlot(returnFiber, oldFiber, newChild, lanes) {\n var key = null !== oldFiber ? oldFiber.key : null;\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return null !== key\n ? null\n : updateTextNode(returnFiber, oldFiber, \"\" + newChild, lanes);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return newChild.key === key\n ? updateElement(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_PORTAL_TYPE:\n return newChild.key === key\n ? updatePortal(returnFiber, oldFiber, newChild, lanes)\n : null;\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateSlot(returnFiber, oldFiber, newChild, lanes)\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return null !== key\n ? null\n : updateFragment(returnFiber, oldFiber, newChild, lanes, null);\n if (\"function\" === typeof newChild.then)\n return updateSlot(\n returnFiber,\n oldFiber,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateSlot(\n returnFiber,\n oldFiber,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n ) {\n if (\n (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n )\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateTextNode(returnFiber, existingChildren, \"\" + newChild, lanes)\n );\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updateElement(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_PORTAL_TYPE:\n return (\n (existingChildren =\n existingChildren.get(\n null === newChild.key ? newIdx : newChild.key\n ) || null),\n updatePortal(returnFiber, existingChildren, newChild, lanes)\n );\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild) || getIteratorFn(newChild))\n return (\n (existingChildren = existingChildren.get(newIdx) || null),\n updateFragment(returnFiber, existingChildren, newChild, lanes, null)\n );\n if (\"function\" === typeof newChild.then)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return updateFromMap(\n existingChildren,\n returnFiber,\n newIdx,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return null;\n }\n function reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null;\n null !== oldFiber && newIdx < newChildren.length;\n newIdx++\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(\n returnFiber,\n oldFiber,\n newChildren[newIdx],\n lanes\n );\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (newIdx === newChildren.length)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; newIdx < newChildren.length; newIdx++)\n (oldFiber = createChild(returnFiber, newChildren[newIdx], lanes)),\n null !== oldFiber &&\n ((currentFirstChild = placeChild(\n oldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = oldFiber)\n : (previousNewFiber.sibling = oldFiber),\n (previousNewFiber = oldFiber));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n newIdx < newChildren.length;\n newIdx++\n )\n (nextOldFiber = updateFromMap(\n oldFiber,\n returnFiber,\n newIdx,\n newChildren[newIdx],\n lanes\n )),\n null !== nextOldFiber &&\n (shouldTrackSideEffects &&\n null !== nextOldFiber.alternate &&\n oldFiber.delete(\n null === nextOldFiber.key ? newIdx : nextOldFiber.key\n ),\n (currentFirstChild = placeChild(\n nextOldFiber,\n currentFirstChild,\n newIdx\n )),\n null === previousNewFiber\n ? (resultingFirstChild = nextOldFiber)\n : (previousNewFiber.sibling = nextOldFiber),\n (previousNewFiber = nextOldFiber));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChildren,\n lanes\n ) {\n if (null == newChildren) throw Error(formatProdErrorMessage(151));\n for (\n var resultingFirstChild = null,\n previousNewFiber = null,\n oldFiber = currentFirstChild,\n newIdx = (currentFirstChild = 0),\n nextOldFiber = null,\n step = newChildren.next();\n null !== oldFiber && !step.done;\n newIdx++, step = newChildren.next()\n ) {\n oldFiber.index > newIdx\n ? ((nextOldFiber = oldFiber), (oldFiber = null))\n : (nextOldFiber = oldFiber.sibling);\n var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);\n if (null === newFiber) {\n null === oldFiber && (oldFiber = nextOldFiber);\n break;\n }\n shouldTrackSideEffects &&\n oldFiber &&\n null === newFiber.alternate &&\n deleteChild(returnFiber, oldFiber);\n currentFirstChild = placeChild(newFiber, currentFirstChild, newIdx);\n null === previousNewFiber\n ? (resultingFirstChild = newFiber)\n : (previousNewFiber.sibling = newFiber);\n previousNewFiber = newFiber;\n oldFiber = nextOldFiber;\n }\n if (step.done)\n return (\n deleteRemainingChildren(returnFiber, oldFiber),\n isHydrating && pushTreeFork(returnFiber, newIdx),\n resultingFirstChild\n );\n if (null === oldFiber) {\n for (; !step.done; newIdx++, step = newChildren.next())\n (step = createChild(returnFiber, step.value, lanes)),\n null !== step &&\n ((currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n for (\n oldFiber = mapRemainingChildren(oldFiber);\n !step.done;\n newIdx++, step = newChildren.next()\n )\n (step = updateFromMap(oldFiber, returnFiber, newIdx, step.value, lanes)),\n null !== step &&\n (shouldTrackSideEffects &&\n null !== step.alternate &&\n oldFiber.delete(null === step.key ? newIdx : step.key),\n (currentFirstChild = placeChild(step, currentFirstChild, newIdx)),\n null === previousNewFiber\n ? (resultingFirstChild = step)\n : (previousNewFiber.sibling = step),\n (previousNewFiber = step));\n shouldTrackSideEffects &&\n oldFiber.forEach(function (child) {\n return deleteChild(returnFiber, child);\n });\n isHydrating && pushTreeFork(returnFiber, newIdx);\n return resultingFirstChild;\n }\n function reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n ) {\n \"object\" === typeof newChild &&\n null !== newChild &&\n newChild.type === REACT_FRAGMENT_TYPE &&\n null === newChild.key &&\n (newChild = newChild.props.children);\n if (\"object\" === typeof newChild && null !== newChild) {\n switch (newChild.$$typeof) {\n case REACT_ELEMENT_TYPE:\n a: {\n for (var key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key) {\n key = newChild.type;\n if (key === REACT_FRAGMENT_TYPE) {\n if (7 === currentFirstChild.tag) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(\n currentFirstChild,\n newChild.props.children\n );\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n } else if (\n currentFirstChild.elementType === key ||\n (\"object\" === typeof key &&\n null !== key &&\n key.$$typeof === REACT_LAZY_TYPE &&\n resolveLazy(key) === currentFirstChild.type)\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.props);\n coerceRef(lanes, newChild);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n }\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n } else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n newChild.type === REACT_FRAGMENT_TYPE\n ? ((lanes = createFiberFromFragment(\n newChild.props.children,\n returnFiber.mode,\n lanes,\n newChild.key\n )),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : ((lanes = createFiberFromTypeAndProps(\n newChild.type,\n newChild.key,\n newChild.props,\n null,\n returnFiber.mode,\n lanes\n )),\n coerceRef(lanes, newChild),\n (lanes.return = returnFiber),\n (returnFiber = lanes));\n }\n return placeSingleChild(returnFiber);\n case REACT_PORTAL_TYPE:\n a: {\n for (key = newChild.key; null !== currentFirstChild; ) {\n if (currentFirstChild.key === key)\n if (\n 4 === currentFirstChild.tag &&\n currentFirstChild.stateNode.containerInfo ===\n newChild.containerInfo &&\n currentFirstChild.stateNode.implementation ===\n newChild.implementation\n ) {\n deleteRemainingChildren(\n returnFiber,\n currentFirstChild.sibling\n );\n lanes = useFiber(currentFirstChild, newChild.children || []);\n lanes.return = returnFiber;\n returnFiber = lanes;\n break a;\n } else {\n deleteRemainingChildren(returnFiber, currentFirstChild);\n break;\n }\n else deleteChild(returnFiber, currentFirstChild);\n currentFirstChild = currentFirstChild.sibling;\n }\n lanes = createFiberFromPortal(newChild, returnFiber.mode, lanes);\n lanes.return = returnFiber;\n returnFiber = lanes;\n }\n return placeSingleChild(returnFiber);\n case REACT_LAZY_TYPE:\n return (\n (newChild = resolveLazy(newChild)),\n reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n )\n );\n }\n if (isArrayImpl(newChild))\n return reconcileChildrenArray(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n if (getIteratorFn(newChild)) {\n key = getIteratorFn(newChild);\n if (\"function\" !== typeof key) throw Error(formatProdErrorMessage(150));\n newChild = key.call(newChild);\n return reconcileChildrenIterator(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n }\n if (\"function\" === typeof newChild.then)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n unwrapThenable(newChild),\n lanes\n );\n if (newChild.$$typeof === REACT_CONTEXT_TYPE)\n return reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n readContextDuringReconciliation(returnFiber, newChild),\n lanes\n );\n throwOnInvalidObjectTypeImpl(returnFiber, newChild);\n }\n return (\"string\" === typeof newChild && \"\" !== newChild) ||\n \"number\" === typeof newChild ||\n \"bigint\" === typeof newChild\n ? ((newChild = \"\" + newChild),\n null !== currentFirstChild && 6 === currentFirstChild.tag\n ? (deleteRemainingChildren(returnFiber, currentFirstChild.sibling),\n (lanes = useFiber(currentFirstChild, newChild)),\n (lanes.return = returnFiber),\n (returnFiber = lanes))\n : (deleteRemainingChildren(returnFiber, currentFirstChild),\n (lanes = createFiberFromText(newChild, returnFiber.mode, lanes)),\n (lanes.return = returnFiber),\n (returnFiber = lanes)),\n placeSingleChild(returnFiber))\n : deleteRemainingChildren(returnFiber, currentFirstChild);\n }\n return function (returnFiber, currentFirstChild, newChild, lanes) {\n try {\n thenableIndexCounter$1 = 0;\n var firstChildFiber = reconcileChildFibersImpl(\n returnFiber,\n currentFirstChild,\n newChild,\n lanes\n );\n thenableState$1 = null;\n return firstChildFiber;\n } catch (x) {\n if (x === SuspenseException || x === SuspenseActionException) throw x;\n var fiber = createFiberImplClass(29, x, null, returnFiber.mode);\n fiber.lanes = lanes;\n fiber.return = returnFiber;\n return fiber;\n } finally {\n }\n };\n}\nvar reconcileChildFibers = createChildReconciler(!0),\n mountChildFibers = createChildReconciler(!1),\n hasForceUpdate = !1;\nfunction initializeUpdateQueue(fiber) {\n fiber.updateQueue = {\n baseState: fiber.memoizedState,\n firstBaseUpdate: null,\n lastBaseUpdate: null,\n shared: { pending: null, lanes: 0, hiddenCallbacks: null },\n callbacks: null\n };\n}\nfunction cloneUpdateQueue(current, workInProgress) {\n current = current.updateQueue;\n workInProgress.updateQueue === current &&\n (workInProgress.updateQueue = {\n baseState: current.baseState,\n firstBaseUpdate: current.firstBaseUpdate,\n lastBaseUpdate: current.lastBaseUpdate,\n shared: current.shared,\n callbacks: null\n });\n}\nfunction createUpdate(lane) {\n return { lane: lane, tag: 0, payload: null, callback: null, next: null };\n}\nfunction enqueueUpdate(fiber, update, lane) {\n var updateQueue = fiber.updateQueue;\n if (null === updateQueue) return null;\n updateQueue = updateQueue.shared;\n if (0 !== (executionContext & 2)) {\n var pending = updateQueue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n updateQueue.pending = update;\n update = getRootForUpdatedFiber(fiber);\n markUpdateLaneFromFiberToRoot(fiber, null, lane);\n return update;\n }\n enqueueUpdate$1(fiber, updateQueue, update, lane);\n return getRootForUpdatedFiber(fiber);\n}\nfunction entangleTransitions(root, fiber, lane) {\n fiber = fiber.updateQueue;\n if (null !== fiber && ((fiber = fiber.shared), 0 !== (lane & 4194048))) {\n var queueLanes = fiber.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n fiber.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nfunction enqueueCapturedUpdate(workInProgress, capturedUpdate) {\n var queue = workInProgress.updateQueue,\n current = workInProgress.alternate;\n if (\n null !== current &&\n ((current = current.updateQueue), queue === current)\n ) {\n var newFirst = null,\n newLast = null;\n queue = queue.firstBaseUpdate;\n if (null !== queue) {\n do {\n var clone = {\n lane: queue.lane,\n tag: queue.tag,\n payload: queue.payload,\n callback: null,\n next: null\n };\n null === newLast\n ? (newFirst = newLast = clone)\n : (newLast = newLast.next = clone);\n queue = queue.next;\n } while (null !== queue);\n null === newLast\n ? (newFirst = newLast = capturedUpdate)\n : (newLast = newLast.next = capturedUpdate);\n } else newFirst = newLast = capturedUpdate;\n queue = {\n baseState: current.baseState,\n firstBaseUpdate: newFirst,\n lastBaseUpdate: newLast,\n shared: current.shared,\n callbacks: current.callbacks\n };\n workInProgress.updateQueue = queue;\n return;\n }\n workInProgress = queue.lastBaseUpdate;\n null === workInProgress\n ? (queue.firstBaseUpdate = capturedUpdate)\n : (workInProgress.next = capturedUpdate);\n queue.lastBaseUpdate = capturedUpdate;\n}\nvar didReadFromEntangledAsyncAction = !1;\nfunction suspendIfUpdateReadFromEntangledAsyncAction() {\n if (didReadFromEntangledAsyncAction) {\n var entangledActionThenable = currentEntangledActionThenable;\n if (null !== entangledActionThenable) throw entangledActionThenable;\n }\n}\nfunction processUpdateQueue(\n workInProgress$jscomp$0,\n props,\n instance$jscomp$0,\n renderLanes\n) {\n didReadFromEntangledAsyncAction = !1;\n var queue = workInProgress$jscomp$0.updateQueue;\n hasForceUpdate = !1;\n var firstBaseUpdate = queue.firstBaseUpdate,\n lastBaseUpdate = queue.lastBaseUpdate,\n pendingQueue = queue.shared.pending;\n if (null !== pendingQueue) {\n queue.shared.pending = null;\n var lastPendingUpdate = pendingQueue,\n firstPendingUpdate = lastPendingUpdate.next;\n lastPendingUpdate.next = null;\n null === lastBaseUpdate\n ? (firstBaseUpdate = firstPendingUpdate)\n : (lastBaseUpdate.next = firstPendingUpdate);\n lastBaseUpdate = lastPendingUpdate;\n var current = workInProgress$jscomp$0.alternate;\n null !== current &&\n ((current = current.updateQueue),\n (pendingQueue = current.lastBaseUpdate),\n pendingQueue !== lastBaseUpdate &&\n (null === pendingQueue\n ? (current.firstBaseUpdate = firstPendingUpdate)\n : (pendingQueue.next = firstPendingUpdate),\n (current.lastBaseUpdate = lastPendingUpdate)));\n }\n if (null !== firstBaseUpdate) {\n var newState = queue.baseState;\n lastBaseUpdate = 0;\n current = firstPendingUpdate = lastPendingUpdate = null;\n pendingQueue = firstBaseUpdate;\n do {\n var updateLane = pendingQueue.lane & -536870913,\n isHiddenUpdate = updateLane !== pendingQueue.lane;\n if (\n isHiddenUpdate\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n 0 !== updateLane &&\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction = !0);\n null !== current &&\n (current = current.next =\n {\n lane: 0,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: null,\n next: null\n });\n a: {\n var workInProgress = workInProgress$jscomp$0,\n update = pendingQueue;\n updateLane = props;\n var instance = instance$jscomp$0;\n switch (update.tag) {\n case 1:\n workInProgress = update.payload;\n if (\"function\" === typeof workInProgress) {\n newState = workInProgress.call(instance, newState, updateLane);\n break a;\n }\n newState = workInProgress;\n break a;\n case 3:\n workInProgress.flags = (workInProgress.flags & -65537) | 128;\n case 0:\n workInProgress = update.payload;\n updateLane =\n \"function\" === typeof workInProgress\n ? workInProgress.call(instance, newState, updateLane)\n : workInProgress;\n if (null === updateLane || void 0 === updateLane) break a;\n newState = assign({}, newState, updateLane);\n break a;\n case 2:\n hasForceUpdate = !0;\n }\n }\n updateLane = pendingQueue.callback;\n null !== updateLane &&\n ((workInProgress$jscomp$0.flags |= 64),\n isHiddenUpdate && (workInProgress$jscomp$0.flags |= 8192),\n (isHiddenUpdate = queue.callbacks),\n null === isHiddenUpdate\n ? (queue.callbacks = [updateLane])\n : isHiddenUpdate.push(updateLane));\n } else\n (isHiddenUpdate = {\n lane: updateLane,\n tag: pendingQueue.tag,\n payload: pendingQueue.payload,\n callback: pendingQueue.callback,\n next: null\n }),\n null === current\n ? ((firstPendingUpdate = current = isHiddenUpdate),\n (lastPendingUpdate = newState))\n : (current = current.next = isHiddenUpdate),\n (lastBaseUpdate |= updateLane);\n pendingQueue = pendingQueue.next;\n if (null === pendingQueue)\n if (((pendingQueue = queue.shared.pending), null === pendingQueue))\n break;\n else\n (isHiddenUpdate = pendingQueue),\n (pendingQueue = isHiddenUpdate.next),\n (isHiddenUpdate.next = null),\n (queue.lastBaseUpdate = isHiddenUpdate),\n (queue.shared.pending = null);\n } while (1);\n null === current && (lastPendingUpdate = newState);\n queue.baseState = lastPendingUpdate;\n queue.firstBaseUpdate = firstPendingUpdate;\n queue.lastBaseUpdate = current;\n null === firstBaseUpdate && (queue.shared.lanes = 0);\n workInProgressRootSkippedLanes |= lastBaseUpdate;\n workInProgress$jscomp$0.lanes = lastBaseUpdate;\n workInProgress$jscomp$0.memoizedState = newState;\n }\n}\nfunction callCallback(callback, context) {\n if (\"function\" !== typeof callback)\n throw Error(formatProdErrorMessage(191, callback));\n callback.call(context);\n}\nfunction commitCallbacks(updateQueue, context) {\n var callbacks = updateQueue.callbacks;\n if (null !== callbacks)\n for (\n updateQueue.callbacks = null, updateQueue = 0;\n updateQueue < callbacks.length;\n updateQueue++\n )\n callCallback(callbacks[updateQueue], context);\n}\nvar currentTreeHiddenStackCursor = createCursor(null),\n prevEntangledRenderLanesCursor = createCursor(0);\nfunction pushHiddenContext(fiber, context) {\n fiber = entangledRenderLanes;\n push(prevEntangledRenderLanesCursor, fiber);\n push(currentTreeHiddenStackCursor, context);\n entangledRenderLanes = fiber | context.baseLanes;\n}\nfunction reuseHiddenContextOnStack() {\n push(prevEntangledRenderLanesCursor, entangledRenderLanes);\n push(currentTreeHiddenStackCursor, currentTreeHiddenStackCursor.current);\n}\nfunction popHiddenContext() {\n entangledRenderLanes = prevEntangledRenderLanesCursor.current;\n pop(currentTreeHiddenStackCursor);\n pop(prevEntangledRenderLanesCursor);\n}\nvar suspenseHandlerStackCursor = createCursor(null),\n shellBoundary = null;\nfunction pushPrimaryTreeSuspenseHandler(handler) {\n var current = handler.alternate;\n push(suspenseStackCursor, suspenseStackCursor.current & 1);\n push(suspenseHandlerStackCursor, handler);\n null === shellBoundary &&\n (null === current || null !== currentTreeHiddenStackCursor.current\n ? (shellBoundary = handler)\n : null !== current.memoizedState && (shellBoundary = handler));\n}\nfunction pushDehydratedActivitySuspenseHandler(fiber) {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, fiber);\n null === shellBoundary && (shellBoundary = fiber);\n}\nfunction pushOffscreenSuspenseHandler(fiber) {\n 22 === fiber.tag\n ? (push(suspenseStackCursor, suspenseStackCursor.current),\n push(suspenseHandlerStackCursor, fiber),\n null === shellBoundary && (shellBoundary = fiber))\n : reuseSuspenseHandlerOnStack(fiber);\n}\nfunction reuseSuspenseHandlerOnStack() {\n push(suspenseStackCursor, suspenseStackCursor.current);\n push(suspenseHandlerStackCursor, suspenseHandlerStackCursor.current);\n}\nfunction popSuspenseHandler(fiber) {\n pop(suspenseHandlerStackCursor);\n shellBoundary === fiber && (shellBoundary = null);\n pop(suspenseStackCursor);\n}\nvar suspenseStackCursor = createCursor(0);\nfunction findFirstSuspended(row) {\n for (var node = row; null !== node; ) {\n if (13 === node.tag) {\n var state = node.memoizedState;\n if (\n null !== state &&\n ((state = state.dehydrated),\n null === state ||\n isSuspenseInstancePending(state) ||\n isSuspenseInstanceFallback(state))\n )\n return node;\n } else if (\n 19 === node.tag &&\n (\"forwards\" === node.memoizedProps.revealOrder ||\n \"backwards\" === node.memoizedProps.revealOrder ||\n \"unstable_legacy-backwards\" === node.memoizedProps.revealOrder ||\n \"together\" === node.memoizedProps.revealOrder)\n ) {\n if (0 !== (node.flags & 128)) return node;\n } else if (null !== node.child) {\n node.child.return = node;\n node = node.child;\n continue;\n }\n if (node === row) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === row) return null;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n return null;\n}\nvar renderLanes = 0,\n currentlyRenderingFiber = null,\n currentHook = null,\n workInProgressHook = null,\n didScheduleRenderPhaseUpdate = !1,\n didScheduleRenderPhaseUpdateDuringThisPass = !1,\n shouldDoubleInvokeUserFnsInHooksDEV = !1,\n localIdCounter = 0,\n thenableIndexCounter = 0,\n thenableState = null,\n globalClientIdCounter = 0;\nfunction throwInvalidHookError() {\n throw Error(formatProdErrorMessage(321));\n}\nfunction areHookInputsEqual(nextDeps, prevDeps) {\n if (null === prevDeps) return !1;\n for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++)\n if (!objectIs(nextDeps[i], prevDeps[i])) return !1;\n return !0;\n}\nfunction renderWithHooks(\n current,\n workInProgress,\n Component,\n props,\n secondArg,\n nextRenderLanes\n) {\n renderLanes = nextRenderLanes;\n currentlyRenderingFiber = workInProgress;\n workInProgress.memoizedState = null;\n workInProgress.updateQueue = null;\n workInProgress.lanes = 0;\n ReactSharedInternals.H =\n null === current || null === current.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate;\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n nextRenderLanes = Component(props, secondArg);\n shouldDoubleInvokeUserFnsInHooksDEV = !1;\n didScheduleRenderPhaseUpdateDuringThisPass &&\n (nextRenderLanes = renderWithHooksAgain(\n workInProgress,\n Component,\n props,\n secondArg\n ));\n finishRenderingHooks(current);\n return nextRenderLanes;\n}\nfunction finishRenderingHooks(current) {\n ReactSharedInternals.H = ContextOnlyDispatcher;\n var didRenderTooFewHooks = null !== currentHook && null !== currentHook.next;\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdate = !1;\n thenableIndexCounter = 0;\n thenableState = null;\n if (didRenderTooFewHooks) throw Error(formatProdErrorMessage(300));\n null === current ||\n didReceiveUpdate ||\n ((current = current.dependencies),\n null !== current &&\n checkIfContextChanged(current) &&\n (didReceiveUpdate = !0));\n}\nfunction renderWithHooksAgain(workInProgress, Component, props, secondArg) {\n currentlyRenderingFiber = workInProgress;\n var numberOfReRenders = 0;\n do {\n didScheduleRenderPhaseUpdateDuringThisPass && (thenableState = null);\n thenableIndexCounter = 0;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n if (25 <= numberOfReRenders) throw Error(formatProdErrorMessage(301));\n numberOfReRenders += 1;\n workInProgressHook = currentHook = null;\n if (null != workInProgress.updateQueue) {\n var children = workInProgress.updateQueue;\n children.lastEffect = null;\n children.events = null;\n children.stores = null;\n null != children.memoCache && (children.memoCache.index = 0);\n }\n ReactSharedInternals.H = HooksDispatcherOnRerender;\n children = Component(props, secondArg);\n } while (didScheduleRenderPhaseUpdateDuringThisPass);\n return children;\n}\nfunction TransitionAwareHostComponent() {\n var dispatcher = ReactSharedInternals.H,\n maybeThenable = dispatcher.useState()[0];\n maybeThenable =\n \"function\" === typeof maybeThenable.then\n ? useThenable(maybeThenable)\n : maybeThenable;\n dispatcher = dispatcher.useState()[0];\n (null !== currentHook ? currentHook.memoizedState : null) !== dispatcher &&\n (currentlyRenderingFiber.flags |= 1024);\n return maybeThenable;\n}\nfunction checkDidRenderIdHook() {\n var didRenderIdHook = 0 !== localIdCounter;\n localIdCounter = 0;\n return didRenderIdHook;\n}\nfunction bailoutHooks(current, workInProgress, lanes) {\n workInProgress.updateQueue = current.updateQueue;\n workInProgress.flags &= -2053;\n current.lanes &= ~lanes;\n}\nfunction resetHooksOnUnwind(workInProgress) {\n if (didScheduleRenderPhaseUpdate) {\n for (\n workInProgress = workInProgress.memoizedState;\n null !== workInProgress;\n\n ) {\n var queue = workInProgress.queue;\n null !== queue && (queue.pending = null);\n workInProgress = workInProgress.next;\n }\n didScheduleRenderPhaseUpdate = !1;\n }\n renderLanes = 0;\n workInProgressHook = currentHook = currentlyRenderingFiber = null;\n didScheduleRenderPhaseUpdateDuringThisPass = !1;\n thenableIndexCounter = localIdCounter = 0;\n thenableState = null;\n}\nfunction mountWorkInProgressHook() {\n var hook = {\n memoizedState: null,\n baseState: null,\n baseQueue: null,\n queue: null,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook = hook)\n : (workInProgressHook = workInProgressHook.next = hook);\n return workInProgressHook;\n}\nfunction updateWorkInProgressHook() {\n if (null === currentHook) {\n var nextCurrentHook = currentlyRenderingFiber.alternate;\n nextCurrentHook =\n null !== nextCurrentHook ? nextCurrentHook.memoizedState : null;\n } else nextCurrentHook = currentHook.next;\n var nextWorkInProgressHook =\n null === workInProgressHook\n ? currentlyRenderingFiber.memoizedState\n : workInProgressHook.next;\n if (null !== nextWorkInProgressHook)\n (workInProgressHook = nextWorkInProgressHook),\n (currentHook = nextCurrentHook);\n else {\n if (null === nextCurrentHook) {\n if (null === currentlyRenderingFiber.alternate)\n throw Error(formatProdErrorMessage(467));\n throw Error(formatProdErrorMessage(310));\n }\n currentHook = nextCurrentHook;\n nextCurrentHook = {\n memoizedState: currentHook.memoizedState,\n baseState: currentHook.baseState,\n baseQueue: currentHook.baseQueue,\n queue: currentHook.queue,\n next: null\n };\n null === workInProgressHook\n ? (currentlyRenderingFiber.memoizedState = workInProgressHook =\n nextCurrentHook)\n : (workInProgressHook = workInProgressHook.next = nextCurrentHook);\n }\n return workInProgressHook;\n}\nfunction createFunctionComponentUpdateQueue() {\n return { lastEffect: null, events: null, stores: null, memoCache: null };\n}\nfunction useThenable(thenable) {\n var index = thenableIndexCounter;\n thenableIndexCounter += 1;\n null === thenableState && (thenableState = []);\n thenable = trackUsedThenable(thenableState, thenable, index);\n index = currentlyRenderingFiber;\n null ===\n (null === workInProgressHook\n ? index.memoizedState\n : workInProgressHook.next) &&\n ((index = index.alternate),\n (ReactSharedInternals.H =\n null === index || null === index.memoizedState\n ? HooksDispatcherOnMount\n : HooksDispatcherOnUpdate));\n return thenable;\n}\nfunction use(usable) {\n if (null !== usable && \"object\" === typeof usable) {\n if (\"function\" === typeof usable.then) return useThenable(usable);\n if (usable.$$typeof === REACT_CONTEXT_TYPE) return readContext(usable);\n }\n throw Error(formatProdErrorMessage(438, String(usable)));\n}\nfunction useMemoCache(size) {\n var memoCache = null,\n updateQueue = currentlyRenderingFiber.updateQueue;\n null !== updateQueue && (memoCache = updateQueue.memoCache);\n if (null == memoCache) {\n var current = currentlyRenderingFiber.alternate;\n null !== current &&\n ((current = current.updateQueue),\n null !== current &&\n ((current = current.memoCache),\n null != current &&\n (memoCache = {\n data: current.data.map(function (array) {\n return array.slice();\n }),\n index: 0\n })));\n }\n null == memoCache && (memoCache = { data: [], index: 0 });\n null === updateQueue &&\n ((updateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = updateQueue));\n updateQueue.memoCache = memoCache;\n updateQueue = memoCache.data[memoCache.index];\n if (void 0 === updateQueue)\n for (\n updateQueue = memoCache.data[memoCache.index] = Array(size), current = 0;\n current < size;\n current++\n )\n updateQueue[current] = REACT_MEMO_CACHE_SENTINEL;\n memoCache.index++;\n return updateQueue;\n}\nfunction basicStateReducer(state, action) {\n return \"function\" === typeof action ? action(state) : action;\n}\nfunction updateReducer(reducer) {\n var hook = updateWorkInProgressHook();\n return updateReducerImpl(hook, currentHook, reducer);\n}\nfunction updateReducerImpl(hook, current, reducer) {\n var queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var baseQueue = hook.baseQueue,\n pendingQueue = queue.pending;\n if (null !== pendingQueue) {\n if (null !== baseQueue) {\n var baseFirst = baseQueue.next;\n baseQueue.next = pendingQueue.next;\n pendingQueue.next = baseFirst;\n }\n current.baseQueue = baseQueue = pendingQueue;\n queue.pending = null;\n }\n pendingQueue = hook.baseState;\n if (null === baseQueue) hook.memoizedState = pendingQueue;\n else {\n current = baseQueue.next;\n var newBaseQueueFirst = (baseFirst = null),\n newBaseQueueLast = null,\n update = current,\n didReadFromEntangledAsyncAction$60 = !1;\n do {\n var updateLane = update.lane & -536870913;\n if (\n updateLane !== update.lane\n ? (workInProgressRootRenderLanes & updateLane) === updateLane\n : (renderLanes & updateLane) === updateLane\n ) {\n var revertLane = update.revertLane;\n if (0 === revertLane)\n null !== newBaseQueueLast &&\n (newBaseQueueLast = newBaseQueueLast.next =\n {\n lane: 0,\n revertLane: 0,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n updateLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n else if ((renderLanes & revertLane) === revertLane) {\n update = update.next;\n revertLane === currentEntangledLane &&\n (didReadFromEntangledAsyncAction$60 = !0);\n continue;\n } else\n (updateLane = {\n lane: 0,\n revertLane: update.revertLane,\n gesture: null,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = updateLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = updateLane),\n (currentlyRenderingFiber.lanes |= revertLane),\n (workInProgressRootSkippedLanes |= revertLane);\n updateLane = update.action;\n shouldDoubleInvokeUserFnsInHooksDEV &&\n reducer(pendingQueue, updateLane);\n pendingQueue = update.hasEagerState\n ? update.eagerState\n : reducer(pendingQueue, updateLane);\n } else\n (revertLane = {\n lane: updateLane,\n revertLane: update.revertLane,\n gesture: update.gesture,\n action: update.action,\n hasEagerState: update.hasEagerState,\n eagerState: update.eagerState,\n next: null\n }),\n null === newBaseQueueLast\n ? ((newBaseQueueFirst = newBaseQueueLast = revertLane),\n (baseFirst = pendingQueue))\n : (newBaseQueueLast = newBaseQueueLast.next = revertLane),\n (currentlyRenderingFiber.lanes |= updateLane),\n (workInProgressRootSkippedLanes |= updateLane);\n update = update.next;\n } while (null !== update && update !== current);\n null === newBaseQueueLast\n ? (baseFirst = pendingQueue)\n : (newBaseQueueLast.next = newBaseQueueFirst);\n if (\n !objectIs(pendingQueue, hook.memoizedState) &&\n ((didReceiveUpdate = !0),\n didReadFromEntangledAsyncAction$60 &&\n ((reducer = currentEntangledActionThenable), null !== reducer))\n )\n throw reducer;\n hook.memoizedState = pendingQueue;\n hook.baseState = baseFirst;\n hook.baseQueue = newBaseQueueLast;\n queue.lastRenderedState = pendingQueue;\n }\n null === baseQueue && (queue.lanes = 0);\n return [hook.memoizedState, queue.dispatch];\n}\nfunction rerenderReducer(reducer) {\n var hook = updateWorkInProgressHook(),\n queue = hook.queue;\n if (null === queue) throw Error(formatProdErrorMessage(311));\n queue.lastRenderedReducer = reducer;\n var dispatch = queue.dispatch,\n lastRenderPhaseUpdate = queue.pending,\n newState = hook.memoizedState;\n if (null !== lastRenderPhaseUpdate) {\n queue.pending = null;\n var update = (lastRenderPhaseUpdate = lastRenderPhaseUpdate.next);\n do (newState = reducer(newState, update.action)), (update = update.next);\n while (update !== lastRenderPhaseUpdate);\n objectIs(newState, hook.memoizedState) || (didReceiveUpdate = !0);\n hook.memoizedState = newState;\n null === hook.baseQueue && (hook.baseState = newState);\n queue.lastRenderedState = newState;\n }\n return [newState, dispatch];\n}\nfunction updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = updateWorkInProgressHook(),\n isHydrating$jscomp$0 = isHydrating;\n if (isHydrating$jscomp$0) {\n if (void 0 === getServerSnapshot) throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else getServerSnapshot = getSnapshot();\n var snapshotChanged = !objectIs(\n (currentHook || hook).memoizedState,\n getServerSnapshot\n );\n snapshotChanged &&\n ((hook.memoizedState = getServerSnapshot), (didReceiveUpdate = !0));\n hook = hook.queue;\n updateEffect(subscribeToStore.bind(null, fiber, hook, subscribe), [\n subscribe\n ]);\n if (\n hook.getSnapshot !== getSnapshot ||\n snapshotChanged ||\n (null !== workInProgressHook && workInProgressHook.memoizedState.tag & 1)\n ) {\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n hook,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n if (null === workInProgressRoot) throw Error(formatProdErrorMessage(349));\n isHydrating$jscomp$0 ||\n 0 !== (renderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n return getServerSnapshot;\n}\nfunction pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {\n fiber.flags |= 16384;\n fiber = { getSnapshot: getSnapshot, value: renderedSnapshot };\n getSnapshot = currentlyRenderingFiber.updateQueue;\n null === getSnapshot\n ? ((getSnapshot = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = getSnapshot),\n (getSnapshot.stores = [fiber]))\n : ((renderedSnapshot = getSnapshot.stores),\n null === renderedSnapshot\n ? (getSnapshot.stores = [fiber])\n : renderedSnapshot.push(fiber));\n}\nfunction updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {\n inst.value = nextSnapshot;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n}\nfunction subscribeToStore(fiber, inst, subscribe) {\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceStoreRerender(fiber);\n });\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction forceStoreRerender(fiber) {\n var root = enqueueConcurrentRenderForLane(fiber, 2);\n null !== root && scheduleUpdateOnFiber(root, fiber, 2);\n}\nfunction mountStateImpl(initialState) {\n var hook = mountWorkInProgressHook();\n if (\"function\" === typeof initialState) {\n var initialStateInitializer = initialState;\n initialState = initialStateInitializer();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n initialStateInitializer();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n }\n hook.memoizedState = hook.baseState = initialState;\n hook.queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialState\n };\n return hook;\n}\nfunction updateOptimisticImpl(hook, current, passthrough, reducer) {\n hook.baseState = passthrough;\n return updateReducerImpl(\n hook,\n currentHook,\n \"function\" === typeof reducer ? reducer : basicStateReducer\n );\n}\nfunction dispatchActionState(\n fiber,\n actionQueue,\n setPendingState,\n setState,\n payload\n) {\n if (isRenderPhaseUpdate(fiber)) throw Error(formatProdErrorMessage(485));\n fiber = actionQueue.action;\n if (null !== fiber) {\n var actionNode = {\n payload: payload,\n action: fiber,\n next: null,\n isTransition: !0,\n status: \"pending\",\n value: null,\n reason: null,\n listeners: [],\n then: function (listener) {\n actionNode.listeners.push(listener);\n }\n };\n null !== ReactSharedInternals.T\n ? setPendingState(!0)\n : (actionNode.isTransition = !1);\n setState(actionNode);\n setPendingState = actionQueue.pending;\n null === setPendingState\n ? ((actionNode.next = actionQueue.pending = actionNode),\n runActionStateAction(actionQueue, actionNode))\n : ((actionNode.next = setPendingState.next),\n (actionQueue.pending = setPendingState.next = actionNode));\n }\n}\nfunction runActionStateAction(actionQueue, node) {\n var action = node.action,\n payload = node.payload,\n prevState = actionQueue.state;\n if (node.isTransition) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = action(prevState, payload),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n handleActionReturnValue(actionQueue, node, returnValue);\n } catch (error) {\n onActionError(actionQueue, node, error);\n } finally {\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n } else\n try {\n (prevTransition = action(prevState, payload)),\n handleActionReturnValue(actionQueue, node, prevTransition);\n } catch (error$66) {\n onActionError(actionQueue, node, error$66);\n }\n}\nfunction handleActionReturnValue(actionQueue, node, returnValue) {\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ? returnValue.then(\n function (nextState) {\n onActionSuccess(actionQueue, node, nextState);\n },\n function (error) {\n return onActionError(actionQueue, node, error);\n }\n )\n : onActionSuccess(actionQueue, node, returnValue);\n}\nfunction onActionSuccess(actionQueue, actionNode, nextState) {\n actionNode.status = \"fulfilled\";\n actionNode.value = nextState;\n notifyActionListeners(actionNode);\n actionQueue.state = nextState;\n actionNode = actionQueue.pending;\n null !== actionNode &&\n ((nextState = actionNode.next),\n nextState === actionNode\n ? (actionQueue.pending = null)\n : ((nextState = nextState.next),\n (actionNode.next = nextState),\n runActionStateAction(actionQueue, nextState)));\n}\nfunction onActionError(actionQueue, actionNode, error) {\n var last = actionQueue.pending;\n actionQueue.pending = null;\n if (null !== last) {\n last = last.next;\n do\n (actionNode.status = \"rejected\"),\n (actionNode.reason = error),\n notifyActionListeners(actionNode),\n (actionNode = actionNode.next);\n while (actionNode !== last);\n }\n actionQueue.action = null;\n}\nfunction notifyActionListeners(actionNode) {\n actionNode = actionNode.listeners;\n for (var i = 0; i < actionNode.length; i++) (0, actionNode[i])();\n}\nfunction actionStateReducer(oldState, newState) {\n return newState;\n}\nfunction mountActionState(action, initialStateProp) {\n if (isHydrating) {\n var ssrFormState = workInProgressRoot.formState;\n if (null !== ssrFormState) {\n a: {\n var JSCompiler_inline_result = currentlyRenderingFiber;\n if (isHydrating) {\n if (nextHydratableInstance) {\n b: {\n var JSCompiler_inline_result$jscomp$0 = nextHydratableInstance;\n for (\n var inRootOrSingleton = rootOrSingletonContext;\n 8 !== JSCompiler_inline_result$jscomp$0.nodeType;\n\n ) {\n if (!inRootOrSingleton) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n JSCompiler_inline_result$jscomp$0 = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n if (null === JSCompiler_inline_result$jscomp$0) {\n JSCompiler_inline_result$jscomp$0 = null;\n break b;\n }\n }\n inRootOrSingleton = JSCompiler_inline_result$jscomp$0.data;\n JSCompiler_inline_result$jscomp$0 =\n \"F!\" === inRootOrSingleton || \"F\" === inRootOrSingleton\n ? JSCompiler_inline_result$jscomp$0\n : null;\n }\n if (JSCompiler_inline_result$jscomp$0) {\n nextHydratableInstance = getNextHydratable(\n JSCompiler_inline_result$jscomp$0.nextSibling\n );\n JSCompiler_inline_result =\n \"F!\" === JSCompiler_inline_result$jscomp$0.data;\n break a;\n }\n }\n throwOnHydrationMismatch(JSCompiler_inline_result);\n }\n JSCompiler_inline_result = !1;\n }\n JSCompiler_inline_result && (initialStateProp = ssrFormState[0]);\n }\n }\n ssrFormState = mountWorkInProgressHook();\n ssrFormState.memoizedState = ssrFormState.baseState = initialStateProp;\n JSCompiler_inline_result = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: actionStateReducer,\n lastRenderedState: initialStateProp\n };\n ssrFormState.queue = JSCompiler_inline_result;\n ssrFormState = dispatchSetState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result\n );\n JSCompiler_inline_result.dispatch = ssrFormState;\n JSCompiler_inline_result = mountStateImpl(!1);\n inRootOrSingleton = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !1,\n JSCompiler_inline_result.queue\n );\n JSCompiler_inline_result = mountWorkInProgressHook();\n JSCompiler_inline_result$jscomp$0 = {\n state: initialStateProp,\n dispatch: null,\n action: action,\n pending: null\n };\n JSCompiler_inline_result.queue = JSCompiler_inline_result$jscomp$0;\n ssrFormState = dispatchActionState.bind(\n null,\n currentlyRenderingFiber,\n JSCompiler_inline_result$jscomp$0,\n inRootOrSingleton,\n ssrFormState\n );\n JSCompiler_inline_result$jscomp$0.dispatch = ssrFormState;\n JSCompiler_inline_result.memoizedState = action;\n return [initialStateProp, ssrFormState, !1];\n}\nfunction updateActionState(action) {\n var stateHook = updateWorkInProgressHook();\n return updateActionStateImpl(stateHook, currentHook, action);\n}\nfunction updateActionStateImpl(stateHook, currentStateHook, action) {\n currentStateHook = updateReducerImpl(\n stateHook,\n currentStateHook,\n actionStateReducer\n )[0];\n stateHook = updateReducer(basicStateReducer)[0];\n if (\n \"object\" === typeof currentStateHook &&\n null !== currentStateHook &&\n \"function\" === typeof currentStateHook.then\n )\n try {\n var state = useThenable(currentStateHook);\n } catch (x) {\n if (x === SuspenseException) throw SuspenseActionException;\n throw x;\n }\n else state = currentStateHook;\n currentStateHook = updateWorkInProgressHook();\n var actionQueue = currentStateHook.queue,\n dispatch = actionQueue.dispatch;\n action !== currentStateHook.memoizedState &&\n ((currentlyRenderingFiber.flags |= 2048),\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n actionStateActionEffect.bind(null, actionQueue, action),\n null\n ));\n return [state, dispatch, stateHook];\n}\nfunction actionStateActionEffect(actionQueue, action) {\n actionQueue.action = action;\n}\nfunction rerenderActionState(action) {\n var stateHook = updateWorkInProgressHook(),\n currentStateHook = currentHook;\n if (null !== currentStateHook)\n return updateActionStateImpl(stateHook, currentStateHook, action);\n updateWorkInProgressHook();\n stateHook = stateHook.memoizedState;\n currentStateHook = updateWorkInProgressHook();\n var dispatch = currentStateHook.queue.dispatch;\n currentStateHook.memoizedState = action;\n return [stateHook, dispatch, !1];\n}\nfunction pushSimpleEffect(tag, inst, create, deps) {\n tag = { tag: tag, create: create, deps: deps, inst: inst, next: null };\n inst = currentlyRenderingFiber.updateQueue;\n null === inst &&\n ((inst = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = inst));\n create = inst.lastEffect;\n null === create\n ? (inst.lastEffect = tag.next = tag)\n : ((deps = create.next),\n (create.next = tag),\n (tag.next = deps),\n (inst.lastEffect = tag));\n return tag;\n}\nfunction updateRef() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction mountEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = mountWorkInProgressHook();\n currentlyRenderingFiber.flags |= fiberFlags;\n hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n { destroy: void 0 },\n create,\n void 0 === deps ? null : deps\n );\n}\nfunction updateEffectImpl(fiberFlags, hookFlags, create, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var inst = hook.memoizedState.inst;\n null !== currentHook &&\n null !== deps &&\n areHookInputsEqual(deps, currentHook.memoizedState.deps)\n ? (hook.memoizedState = pushSimpleEffect(hookFlags, inst, create, deps))\n : ((currentlyRenderingFiber.flags |= fiberFlags),\n (hook.memoizedState = pushSimpleEffect(\n 1 | hookFlags,\n inst,\n create,\n deps\n )));\n}\nfunction mountEffect(create, deps) {\n mountEffectImpl(8390656, 8, create, deps);\n}\nfunction updateEffect(create, deps) {\n updateEffectImpl(2048, 8, create, deps);\n}\nfunction useEffectEventImpl(payload) {\n currentlyRenderingFiber.flags |= 4;\n var componentUpdateQueue = currentlyRenderingFiber.updateQueue;\n if (null === componentUpdateQueue)\n (componentUpdateQueue = createFunctionComponentUpdateQueue()),\n (currentlyRenderingFiber.updateQueue = componentUpdateQueue),\n (componentUpdateQueue.events = [payload]);\n else {\n var events = componentUpdateQueue.events;\n null === events\n ? (componentUpdateQueue.events = [payload])\n : events.push(payload);\n }\n}\nfunction updateEvent(callback) {\n var ref = updateWorkInProgressHook().memoizedState;\n useEffectEventImpl({ ref: ref, nextImpl: callback });\n return function () {\n if (0 !== (executionContext & 2)) throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n}\nfunction updateInsertionEffect(create, deps) {\n return updateEffectImpl(4, 2, create, deps);\n}\nfunction updateLayoutEffect(create, deps) {\n return updateEffectImpl(4, 4, create, deps);\n}\nfunction imperativeHandleEffect(create, ref) {\n if (\"function\" === typeof ref) {\n create = create();\n var refCleanup = ref(create);\n return function () {\n \"function\" === typeof refCleanup ? refCleanup() : ref(null);\n };\n }\n if (null !== ref && void 0 !== ref)\n return (\n (create = create()),\n (ref.current = create),\n function () {\n ref.current = null;\n }\n );\n}\nfunction updateImperativeHandle(ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n updateEffectImpl(4, 4, imperativeHandleEffect.bind(null, create, ref), deps);\n}\nfunction mountDebugValue() {}\nfunction updateCallback(callback, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n hook.memoizedState = [callback, deps];\n return callback;\n}\nfunction updateMemo(nextCreate, deps) {\n var hook = updateWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var prevState = hook.memoizedState;\n if (null !== deps && areHookInputsEqual(deps, prevState[1]))\n return prevState[0];\n prevState = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [prevState, deps];\n return prevState;\n}\nfunction mountDeferredValueImpl(hook, value, initialValue) {\n if (\n void 0 === initialValue ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (hook.memoizedState = value);\n hook.memoizedState = initialValue;\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return initialValue;\n}\nfunction updateDeferredValueImpl(hook, prevValue, value, initialValue) {\n if (objectIs(value, prevValue)) return value;\n if (null !== currentTreeHiddenStackCursor.current)\n return (\n (hook = mountDeferredValueImpl(hook, value, initialValue)),\n objectIs(hook, prevValue) || (didReceiveUpdate = !0),\n hook\n );\n if (\n 0 === (renderLanes & 42) ||\n (0 !== (renderLanes & 1073741824) &&\n 0 === (workInProgressRootRenderLanes & 261930))\n )\n return (didReceiveUpdate = !0), (hook.memoizedState = value);\n hook = requestDeferredLane();\n currentlyRenderingFiber.lanes |= hook;\n workInProgressRootSkippedLanes |= hook;\n return prevValue;\n}\nfunction startTransition(fiber, queue, pendingState, finishedState, callback) {\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p =\n 0 !== previousPriority && 8 > previousPriority ? previousPriority : 8;\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n dispatchOptimisticSetState(fiber, !1, queue, pendingState);\n try {\n var returnValue = callback(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n if (\n null !== returnValue &&\n \"object\" === typeof returnValue &&\n \"function\" === typeof returnValue.then\n ) {\n var thenableForFinishedState = chainThenableValue(\n returnValue,\n finishedState\n );\n dispatchSetStateInternal(\n fiber,\n queue,\n thenableForFinishedState,\n requestUpdateLane(fiber)\n );\n } else\n dispatchSetStateInternal(\n fiber,\n queue,\n finishedState,\n requestUpdateLane(fiber)\n );\n } catch (error) {\n dispatchSetStateInternal(\n fiber,\n queue,\n { then: function () {}, status: \"rejected\", reason: error },\n requestUpdateLane()\n );\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n null !== prevTransition &&\n null !== currentTransition.types &&\n (prevTransition.types = currentTransition.types),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction noop() {}\nfunction startHostTransition(formFiber, pendingState, action, formData) {\n if (5 !== formFiber.tag) throw Error(formatProdErrorMessage(476));\n var queue = ensureFormComponentIsStateful(formFiber).queue;\n startTransition(\n formFiber,\n queue,\n pendingState,\n sharedNotPendingObject,\n null === action\n ? noop\n : function () {\n requestFormReset$1(formFiber);\n return action(formData);\n }\n );\n}\nfunction ensureFormComponentIsStateful(formFiber) {\n var existingStateHook = formFiber.memoizedState;\n if (null !== existingStateHook) return existingStateHook;\n existingStateHook = {\n memoizedState: sharedNotPendingObject,\n baseState: sharedNotPendingObject,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: sharedNotPendingObject\n },\n next: null\n };\n var initialResetState = {};\n existingStateHook.next = {\n memoizedState: initialResetState,\n baseState: initialResetState,\n baseQueue: null,\n queue: {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: basicStateReducer,\n lastRenderedState: initialResetState\n },\n next: null\n };\n formFiber.memoizedState = existingStateHook;\n formFiber = formFiber.alternate;\n null !== formFiber && (formFiber.memoizedState = existingStateHook);\n return existingStateHook;\n}\nfunction requestFormReset$1(formFiber) {\n var stateHook = ensureFormComponentIsStateful(formFiber);\n null === stateHook.next && (stateHook = formFiber.alternate.memoizedState);\n dispatchSetStateInternal(\n formFiber,\n stateHook.next.queue,\n {},\n requestUpdateLane()\n );\n}\nfunction useHostTransitionStatus() {\n return readContext(HostTransitionContext);\n}\nfunction updateId() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction updateRefresh() {\n return updateWorkInProgressHook().memoizedState;\n}\nfunction refreshCache(fiber) {\n for (var provider = fiber.return; null !== provider; ) {\n switch (provider.tag) {\n case 24:\n case 3:\n var lane = requestUpdateLane();\n fiber = createUpdate(lane);\n var root$69 = enqueueUpdate(provider, fiber, lane);\n null !== root$69 &&\n (scheduleUpdateOnFiber(root$69, provider, lane),\n entangleTransitions(root$69, provider, lane));\n provider = { cache: createCache() };\n fiber.payload = provider;\n return;\n }\n provider = provider.return;\n }\n}\nfunction dispatchReducerAction(fiber, queue, action) {\n var lane = requestUpdateLane();\n action = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n isRenderPhaseUpdate(fiber)\n ? enqueueRenderPhaseUpdate(queue, action)\n : ((action = enqueueConcurrentHookUpdate(fiber, queue, action, lane)),\n null !== action &&\n (scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane)));\n}\nfunction dispatchSetState(fiber, queue, action) {\n var lane = requestUpdateLane();\n dispatchSetStateInternal(fiber, queue, action, lane);\n}\nfunction dispatchSetStateInternal(fiber, queue, action, lane) {\n var update = {\n lane: lane,\n revertLane: 0,\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) enqueueRenderPhaseUpdate(queue, update);\n else {\n var alternate = fiber.alternate;\n if (\n 0 === fiber.lanes &&\n (null === alternate || 0 === alternate.lanes) &&\n ((alternate = queue.lastRenderedReducer), null !== alternate)\n )\n try {\n var currentState = queue.lastRenderedState,\n eagerState = alternate(currentState, action);\n update.hasEagerState = !0;\n update.eagerState = eagerState;\n if (objectIs(eagerState, currentState))\n return (\n enqueueUpdate$1(fiber, queue, update, 0),\n null === workInProgressRoot && finishQueueingConcurrentUpdates(),\n !1\n );\n } catch (error) {\n } finally {\n }\n action = enqueueConcurrentHookUpdate(fiber, queue, update, lane);\n if (null !== action)\n return (\n scheduleUpdateOnFiber(action, fiber, lane),\n entangleTransitionUpdate(action, queue, lane),\n !0\n );\n }\n return !1;\n}\nfunction dispatchOptimisticSetState(fiber, throwIfDuringRender, queue, action) {\n action = {\n lane: 2,\n revertLane: requestTransitionLane(),\n gesture: null,\n action: action,\n hasEagerState: !1,\n eagerState: null,\n next: null\n };\n if (isRenderPhaseUpdate(fiber)) {\n if (throwIfDuringRender) throw Error(formatProdErrorMessage(479));\n } else\n (throwIfDuringRender = enqueueConcurrentHookUpdate(\n fiber,\n queue,\n action,\n 2\n )),\n null !== throwIfDuringRender &&\n scheduleUpdateOnFiber(throwIfDuringRender, fiber, 2);\n}\nfunction isRenderPhaseUpdate(fiber) {\n var alternate = fiber.alternate;\n return (\n fiber === currentlyRenderingFiber ||\n (null !== alternate && alternate === currentlyRenderingFiber)\n );\n}\nfunction enqueueRenderPhaseUpdate(queue, update) {\n didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate =\n !0;\n var pending = queue.pending;\n null === pending\n ? (update.next = update)\n : ((update.next = pending.next), (pending.next = update));\n queue.pending = update;\n}\nfunction entangleTransitionUpdate(root, queue, lane) {\n if (0 !== (lane & 4194048)) {\n var queueLanes = queue.lanes;\n queueLanes &= root.pendingLanes;\n lane |= queueLanes;\n queue.lanes = lane;\n markRootEntangled(root, lane);\n }\n}\nvar ContextOnlyDispatcher = {\n readContext: readContext,\n use: use,\n useCallback: throwInvalidHookError,\n useContext: throwInvalidHookError,\n useEffect: throwInvalidHookError,\n useImperativeHandle: throwInvalidHookError,\n useLayoutEffect: throwInvalidHookError,\n useInsertionEffect: throwInvalidHookError,\n useMemo: throwInvalidHookError,\n useReducer: throwInvalidHookError,\n useRef: throwInvalidHookError,\n useState: throwInvalidHookError,\n useDebugValue: throwInvalidHookError,\n useDeferredValue: throwInvalidHookError,\n useTransition: throwInvalidHookError,\n useSyncExternalStore: throwInvalidHookError,\n useId: throwInvalidHookError,\n useHostTransitionStatus: throwInvalidHookError,\n useFormState: throwInvalidHookError,\n useActionState: throwInvalidHookError,\n useOptimistic: throwInvalidHookError,\n useMemoCache: throwInvalidHookError,\n useCacheRefresh: throwInvalidHookError\n};\nContextOnlyDispatcher.useEffectEvent = throwInvalidHookError;\nvar HooksDispatcherOnMount = {\n readContext: readContext,\n use: use,\n useCallback: function (callback, deps) {\n mountWorkInProgressHook().memoizedState = [\n callback,\n void 0 === deps ? null : deps\n ];\n return callback;\n },\n useContext: readContext,\n useEffect: mountEffect,\n useImperativeHandle: function (ref, create, deps) {\n deps = null !== deps && void 0 !== deps ? deps.concat([ref]) : null;\n mountEffectImpl(\n 4194308,\n 4,\n imperativeHandleEffect.bind(null, create, ref),\n deps\n );\n },\n useLayoutEffect: function (create, deps) {\n return mountEffectImpl(4194308, 4, create, deps);\n },\n useInsertionEffect: function (create, deps) {\n mountEffectImpl(4, 2, create, deps);\n },\n useMemo: function (nextCreate, deps) {\n var hook = mountWorkInProgressHook();\n deps = void 0 === deps ? null : deps;\n var nextValue = nextCreate();\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n nextCreate();\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n hook.memoizedState = [nextValue, deps];\n return nextValue;\n },\n useReducer: function (reducer, initialArg, init) {\n var hook = mountWorkInProgressHook();\n if (void 0 !== init) {\n var initialState = init(initialArg);\n if (shouldDoubleInvokeUserFnsInHooksDEV) {\n setIsStrictModeForDevtools(!0);\n try {\n init(initialArg);\n } finally {\n setIsStrictModeForDevtools(!1);\n }\n }\n } else initialState = initialArg;\n hook.memoizedState = hook.baseState = initialState;\n reducer = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: reducer,\n lastRenderedState: initialState\n };\n hook.queue = reducer;\n reducer = reducer.dispatch = dispatchReducerAction.bind(\n null,\n currentlyRenderingFiber,\n reducer\n );\n return [hook.memoizedState, reducer];\n },\n useRef: function (initialValue) {\n var hook = mountWorkInProgressHook();\n initialValue = { current: initialValue };\n return (hook.memoizedState = initialValue);\n },\n useState: function (initialState) {\n initialState = mountStateImpl(initialState);\n var queue = initialState.queue,\n dispatch = dispatchSetState.bind(null, currentlyRenderingFiber, queue);\n queue.dispatch = dispatch;\n return [initialState.memoizedState, dispatch];\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = mountWorkInProgressHook();\n return mountDeferredValueImpl(hook, value, initialValue);\n },\n useTransition: function () {\n var stateHook = mountStateImpl(!1);\n stateHook = startTransition.bind(\n null,\n currentlyRenderingFiber,\n stateHook.queue,\n !0,\n !1\n );\n mountWorkInProgressHook().memoizedState = stateHook;\n return [!1, stateHook];\n },\n useSyncExternalStore: function (subscribe, getSnapshot, getServerSnapshot) {\n var fiber = currentlyRenderingFiber,\n hook = mountWorkInProgressHook();\n if (isHydrating) {\n if (void 0 === getServerSnapshot)\n throw Error(formatProdErrorMessage(407));\n getServerSnapshot = getServerSnapshot();\n } else {\n getServerSnapshot = getSnapshot();\n if (null === workInProgressRoot)\n throw Error(formatProdErrorMessage(349));\n 0 !== (workInProgressRootRenderLanes & 127) ||\n pushStoreConsistencyCheck(fiber, getSnapshot, getServerSnapshot);\n }\n hook.memoizedState = getServerSnapshot;\n var inst = { value: getServerSnapshot, getSnapshot: getSnapshot };\n hook.queue = inst;\n mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [\n subscribe\n ]);\n fiber.flags |= 2048;\n pushSimpleEffect(\n 9,\n { destroy: void 0 },\n updateStoreInstance.bind(\n null,\n fiber,\n inst,\n getServerSnapshot,\n getSnapshot\n ),\n null\n );\n return getServerSnapshot;\n },\n useId: function () {\n var hook = mountWorkInProgressHook(),\n identifierPrefix = workInProgressRoot.identifierPrefix;\n if (isHydrating) {\n var JSCompiler_inline_result = treeContextOverflow;\n var idWithLeadingBit = treeContextId;\n JSCompiler_inline_result =\n (\n idWithLeadingBit & ~(1 << (32 - clz32(idWithLeadingBit) - 1))\n ).toString(32) + JSCompiler_inline_result;\n identifierPrefix =\n \"_\" + identifierPrefix + \"R_\" + JSCompiler_inline_result;\n JSCompiler_inline_result = localIdCounter++;\n 0 < JSCompiler_inline_result &&\n (identifierPrefix += \"H\" + JSCompiler_inline_result.toString(32));\n identifierPrefix += \"_\";\n } else\n (JSCompiler_inline_result = globalClientIdCounter++),\n (identifierPrefix =\n \"_\" +\n identifierPrefix +\n \"r_\" +\n JSCompiler_inline_result.toString(32) +\n \"_\");\n return (hook.memoizedState = identifierPrefix);\n },\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: mountActionState,\n useActionState: mountActionState,\n useOptimistic: function (passthrough) {\n var hook = mountWorkInProgressHook();\n hook.memoizedState = hook.baseState = passthrough;\n var queue = {\n pending: null,\n lanes: 0,\n dispatch: null,\n lastRenderedReducer: null,\n lastRenderedState: null\n };\n hook.queue = queue;\n hook = dispatchOptimisticSetState.bind(\n null,\n currentlyRenderingFiber,\n !0,\n queue\n );\n queue.dispatch = hook;\n return [passthrough, hook];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: function () {\n return (mountWorkInProgressHook().memoizedState = refreshCache.bind(\n null,\n currentlyRenderingFiber\n ));\n },\n useEffectEvent: function (callback) {\n var hook = mountWorkInProgressHook(),\n ref = { impl: callback };\n hook.memoizedState = ref;\n return function () {\n if (0 !== (executionContext & 2))\n throw Error(formatProdErrorMessage(440));\n return ref.impl.apply(void 0, arguments);\n };\n }\n },\n HooksDispatcherOnUpdate = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: updateReducer,\n useRef: updateRef,\n useState: function () {\n return updateReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = updateReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: updateActionState,\n useActionState: updateActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n };\nHooksDispatcherOnUpdate.useEffectEvent = updateEvent;\nvar HooksDispatcherOnRerender = {\n readContext: readContext,\n use: use,\n useCallback: updateCallback,\n useContext: readContext,\n useEffect: updateEffect,\n useImperativeHandle: updateImperativeHandle,\n useInsertionEffect: updateInsertionEffect,\n useLayoutEffect: updateLayoutEffect,\n useMemo: updateMemo,\n useReducer: rerenderReducer,\n useRef: updateRef,\n useState: function () {\n return rerenderReducer(basicStateReducer);\n },\n useDebugValue: mountDebugValue,\n useDeferredValue: function (value, initialValue) {\n var hook = updateWorkInProgressHook();\n return null === currentHook\n ? mountDeferredValueImpl(hook, value, initialValue)\n : updateDeferredValueImpl(\n hook,\n currentHook.memoizedState,\n value,\n initialValue\n );\n },\n useTransition: function () {\n var booleanOrThenable = rerenderReducer(basicStateReducer)[0],\n start = updateWorkInProgressHook().memoizedState;\n return [\n \"boolean\" === typeof booleanOrThenable\n ? booleanOrThenable\n : useThenable(booleanOrThenable),\n start\n ];\n },\n useSyncExternalStore: updateSyncExternalStore,\n useId: updateId,\n useHostTransitionStatus: useHostTransitionStatus,\n useFormState: rerenderActionState,\n useActionState: rerenderActionState,\n useOptimistic: function (passthrough, reducer) {\n var hook = updateWorkInProgressHook();\n if (null !== currentHook)\n return updateOptimisticImpl(hook, currentHook, passthrough, reducer);\n hook.baseState = passthrough;\n return [passthrough, hook.queue.dispatch];\n },\n useMemoCache: useMemoCache,\n useCacheRefresh: updateRefresh\n};\nHooksDispatcherOnRerender.useEffectEvent = updateEvent;\nfunction applyDerivedStateFromProps(\n workInProgress,\n ctor,\n getDerivedStateFromProps,\n nextProps\n) {\n ctor = workInProgress.memoizedState;\n getDerivedStateFromProps = getDerivedStateFromProps(nextProps, ctor);\n getDerivedStateFromProps =\n null === getDerivedStateFromProps || void 0 === getDerivedStateFromProps\n ? ctor\n : assign({}, ctor, getDerivedStateFromProps);\n workInProgress.memoizedState = getDerivedStateFromProps;\n 0 === workInProgress.lanes &&\n (workInProgress.updateQueue.baseState = getDerivedStateFromProps);\n}\nvar classComponentUpdater = {\n enqueueSetState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueReplaceState: function (inst, payload, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 1;\n update.payload = payload;\n void 0 !== callback && null !== callback && (update.callback = callback);\n payload = enqueueUpdate(inst, update, lane);\n null !== payload &&\n (scheduleUpdateOnFiber(payload, inst, lane),\n entangleTransitions(payload, inst, lane));\n },\n enqueueForceUpdate: function (inst, callback) {\n inst = inst._reactInternals;\n var lane = requestUpdateLane(),\n update = createUpdate(lane);\n update.tag = 2;\n void 0 !== callback && null !== callback && (update.callback = callback);\n callback = enqueueUpdate(inst, update, lane);\n null !== callback &&\n (scheduleUpdateOnFiber(callback, inst, lane),\n entangleTransitions(callback, inst, lane));\n }\n};\nfunction checkShouldComponentUpdate(\n workInProgress,\n ctor,\n oldProps,\n newProps,\n oldState,\n newState,\n nextContext\n) {\n workInProgress = workInProgress.stateNode;\n return \"function\" === typeof workInProgress.shouldComponentUpdate\n ? workInProgress.shouldComponentUpdate(newProps, newState, nextContext)\n : ctor.prototype && ctor.prototype.isPureReactComponent\n ? !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState)\n : !0;\n}\nfunction callComponentWillReceiveProps(\n workInProgress,\n instance,\n newProps,\n nextContext\n) {\n workInProgress = instance.state;\n \"function\" === typeof instance.componentWillReceiveProps &&\n instance.componentWillReceiveProps(newProps, nextContext);\n \"function\" === typeof instance.UNSAFE_componentWillReceiveProps &&\n instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);\n instance.state !== workInProgress &&\n classComponentUpdater.enqueueReplaceState(instance, instance.state, null);\n}\nfunction resolveClassComponentProps(Component, baseProps) {\n var newProps = baseProps;\n if (\"ref\" in baseProps) {\n newProps = {};\n for (var propName in baseProps)\n \"ref\" !== propName && (newProps[propName] = baseProps[propName]);\n }\n if ((Component = Component.defaultProps)) {\n newProps === baseProps && (newProps = assign({}, newProps));\n for (var propName$73 in Component)\n void 0 === newProps[propName$73] &&\n (newProps[propName$73] = Component[propName$73]);\n }\n return newProps;\n}\nfunction defaultOnUncaughtError(error) {\n reportGlobalError(error);\n}\nfunction defaultOnCaughtError(error) {\n console.error(error);\n}\nfunction defaultOnRecoverableError(error) {\n reportGlobalError(error);\n}\nfunction logUncaughtError(root, errorInfo) {\n try {\n var onUncaughtError = root.onUncaughtError;\n onUncaughtError(errorInfo.value, { componentStack: errorInfo.stack });\n } catch (e$74) {\n setTimeout(function () {\n throw e$74;\n });\n }\n}\nfunction logCaughtError(root, boundary, errorInfo) {\n try {\n var onCaughtError = root.onCaughtError;\n onCaughtError(errorInfo.value, {\n componentStack: errorInfo.stack,\n errorBoundary: 1 === boundary.tag ? boundary.stateNode : null\n });\n } catch (e$75) {\n setTimeout(function () {\n throw e$75;\n });\n }\n}\nfunction createRootErrorUpdate(root, errorInfo, lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n lane.payload = { element: null };\n lane.callback = function () {\n logUncaughtError(root, errorInfo);\n };\n return lane;\n}\nfunction createClassErrorUpdate(lane) {\n lane = createUpdate(lane);\n lane.tag = 3;\n return lane;\n}\nfunction initializeClassErrorUpdate(update, root, fiber, errorInfo) {\n var getDerivedStateFromError = fiber.type.getDerivedStateFromError;\n if (\"function\" === typeof getDerivedStateFromError) {\n var error = errorInfo.value;\n update.payload = function () {\n return getDerivedStateFromError(error);\n };\n update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n };\n }\n var inst = fiber.stateNode;\n null !== inst &&\n \"function\" === typeof inst.componentDidCatch &&\n (update.callback = function () {\n logCaughtError(root, fiber, errorInfo);\n \"function\" !== typeof getDerivedStateFromError &&\n (null === legacyErrorBoundariesThatAlreadyFailed\n ? (legacyErrorBoundariesThatAlreadyFailed = new Set([this]))\n : legacyErrorBoundariesThatAlreadyFailed.add(this));\n var stack = errorInfo.stack;\n this.componentDidCatch(errorInfo.value, {\n componentStack: null !== stack ? stack : \"\"\n });\n });\n}\nfunction throwException(\n root,\n returnFiber,\n sourceFiber,\n value,\n rootRenderLanes\n) {\n sourceFiber.flags |= 32768;\n if (\n null !== value &&\n \"object\" === typeof value &&\n \"function\" === typeof value.then\n ) {\n returnFiber = sourceFiber.alternate;\n null !== returnFiber &&\n propagateParentContextChanges(\n returnFiber,\n sourceFiber,\n rootRenderLanes,\n !0\n );\n sourceFiber = suspenseHandlerStackCursor.current;\n if (null !== sourceFiber) {\n switch (sourceFiber.tag) {\n case 31:\n case 13:\n return (\n null === shellBoundary\n ? renderDidSuspendDelayIfPossible()\n : null === sourceFiber.alternate &&\n 0 === workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 3),\n (sourceFiber.flags &= -257),\n (sourceFiber.flags |= 65536),\n (sourceFiber.lanes = rootRenderLanes),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? (sourceFiber.updateQueue = new Set([value]))\n : returnFiber.add(value),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n case 22:\n return (\n (sourceFiber.flags |= 65536),\n value === noopSuspenseyCommitThenable\n ? (sourceFiber.flags |= 16384)\n : ((returnFiber = sourceFiber.updateQueue),\n null === returnFiber\n ? ((returnFiber = {\n transitions: null,\n markerInstances: null,\n retryQueue: new Set([value])\n }),\n (sourceFiber.updateQueue = returnFiber))\n : ((sourceFiber = returnFiber.retryQueue),\n null === sourceFiber\n ? (returnFiber.retryQueue = new Set([value]))\n : sourceFiber.add(value)),\n attachPingListener(root, value, rootRenderLanes)),\n !1\n );\n }\n throw Error(formatProdErrorMessage(435, sourceFiber.tag));\n }\n attachPingListener(root, value, rootRenderLanes);\n renderDidSuspendDelayIfPossible();\n return !1;\n }\n if (isHydrating)\n return (\n (returnFiber = suspenseHandlerStackCursor.current),\n null !== returnFiber\n ? (0 === (returnFiber.flags & 65536) && (returnFiber.flags |= 256),\n (returnFiber.flags |= 65536),\n (returnFiber.lanes = rootRenderLanes),\n value !== HydrationMismatchException &&\n ((root = Error(formatProdErrorMessage(422), { cause: value })),\n queueHydrationError(createCapturedValueAtFiber(root, sourceFiber))))\n : (value !== HydrationMismatchException &&\n ((returnFiber = Error(formatProdErrorMessage(423), {\n cause: value\n })),\n queueHydrationError(\n createCapturedValueAtFiber(returnFiber, sourceFiber)\n )),\n (root = root.current.alternate),\n (root.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (root.lanes |= rootRenderLanes),\n (value = createCapturedValueAtFiber(value, sourceFiber)),\n (rootRenderLanes = createRootErrorUpdate(\n root.stateNode,\n value,\n rootRenderLanes\n )),\n enqueueCapturedUpdate(root, rootRenderLanes),\n 4 !== workInProgressRootExitStatus &&\n (workInProgressRootExitStatus = 2)),\n !1\n );\n var wrapperError = Error(formatProdErrorMessage(520), { cause: value });\n wrapperError = createCapturedValueAtFiber(wrapperError, sourceFiber);\n null === workInProgressRootConcurrentErrors\n ? (workInProgressRootConcurrentErrors = [wrapperError])\n : workInProgressRootConcurrentErrors.push(wrapperError);\n 4 !== workInProgressRootExitStatus && (workInProgressRootExitStatus = 2);\n if (null === returnFiber) return !0;\n value = createCapturedValueAtFiber(value, sourceFiber);\n sourceFiber = returnFiber;\n do {\n switch (sourceFiber.tag) {\n case 3:\n return (\n (sourceFiber.flags |= 65536),\n (root = rootRenderLanes & -rootRenderLanes),\n (sourceFiber.lanes |= root),\n (root = createRootErrorUpdate(sourceFiber.stateNode, value, root)),\n enqueueCapturedUpdate(sourceFiber, root),\n !1\n );\n case 1:\n if (\n ((returnFiber = sourceFiber.type),\n (wrapperError = sourceFiber.stateNode),\n 0 === (sourceFiber.flags & 128) &&\n (\"function\" === typeof returnFiber.getDerivedStateFromError ||\n (null !== wrapperError &&\n \"function\" === typeof wrapperError.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(wrapperError)))))\n )\n return (\n (sourceFiber.flags |= 65536),\n (rootRenderLanes &= -rootRenderLanes),\n (sourceFiber.lanes |= rootRenderLanes),\n (rootRenderLanes = createClassErrorUpdate(rootRenderLanes)),\n initializeClassErrorUpdate(\n rootRenderLanes,\n root,\n sourceFiber,\n value\n ),\n enqueueCapturedUpdate(sourceFiber, rootRenderLanes),\n !1\n );\n }\n sourceFiber = sourceFiber.return;\n } while (null !== sourceFiber);\n return !1;\n}\nvar SelectiveHydrationException = Error(formatProdErrorMessage(461)),\n didReceiveUpdate = !1;\nfunction reconcileChildren(current, workInProgress, nextChildren, renderLanes) {\n workInProgress.child =\n null === current\n ? mountChildFibers(workInProgress, null, nextChildren, renderLanes)\n : reconcileChildFibers(\n workInProgress,\n current.child,\n nextChildren,\n renderLanes\n );\n}\nfunction updateForwardRef(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n Component = Component.render;\n var ref = workInProgress.ref;\n if (\"ref\" in nextProps) {\n var propsWithoutRef = {};\n for (var key in nextProps)\n \"ref\" !== key && (propsWithoutRef[key] = nextProps[key]);\n } else propsWithoutRef = nextProps;\n prepareToReadContext(workInProgress);\n nextProps = renderWithHooks(\n current,\n workInProgress,\n Component,\n propsWithoutRef,\n ref,\n renderLanes\n );\n key = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && key && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null === current) {\n var type = Component.type;\n if (\n \"function\" === typeof type &&\n !shouldConstruct(type) &&\n void 0 === type.defaultProps &&\n null === Component.compare\n )\n return (\n (workInProgress.tag = 15),\n (workInProgress.type = type),\n updateSimpleMemoComponent(\n current,\n workInProgress,\n type,\n nextProps,\n renderLanes\n )\n );\n current = createFiberFromTypeAndProps(\n Component.type,\n null,\n nextProps,\n workInProgress,\n workInProgress.mode,\n renderLanes\n );\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n }\n type = current.child;\n if (!checkScheduledUpdateOrContext(current, renderLanes)) {\n var prevProps = type.memoizedProps;\n Component = Component.compare;\n Component = null !== Component ? Component : shallowEqual;\n if (Component(prevProps, nextProps) && current.ref === workInProgress.ref)\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n }\n workInProgress.flags |= 1;\n current = createWorkInProgress(type, nextProps);\n current.ref = workInProgress.ref;\n current.return = workInProgress;\n return (workInProgress.child = current);\n}\nfunction updateSimpleMemoComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n if (null !== current) {\n var prevProps = current.memoizedProps;\n if (\n shallowEqual(prevProps, nextProps) &&\n current.ref === workInProgress.ref\n )\n if (\n ((didReceiveUpdate = !1),\n (workInProgress.pendingProps = nextProps = prevProps),\n checkScheduledUpdateOrContext(current, renderLanes))\n )\n 0 !== (current.flags & 131072) && (didReceiveUpdate = !0);\n else\n return (\n (workInProgress.lanes = current.lanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n }\n return updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n );\n}\nfunction updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n nextProps\n) {\n var nextChildren = nextProps.children,\n prevState = null !== current ? current.memoizedState : null;\n null === current &&\n null === workInProgress.stateNode &&\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n if (\"hidden\" === nextProps.mode) {\n if (0 !== (workInProgress.flags & 128)) {\n prevState =\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes;\n if (null !== current) {\n nextProps = workInProgress.child = current.child;\n for (nextChildren = 0; null !== nextProps; )\n (nextChildren =\n nextChildren | nextProps.lanes | nextProps.childLanes),\n (nextProps = nextProps.sibling);\n nextProps = nextChildren & ~prevState;\n } else (nextProps = 0), (workInProgress.child = null);\n return deferHiddenOffscreenComponent(\n current,\n workInProgress,\n prevState,\n renderLanes,\n nextProps\n );\n }\n if (0 !== (renderLanes & 536870912))\n (workInProgress.memoizedState = { baseLanes: 0, cachePool: null }),\n null !== current &&\n pushTransition(\n workInProgress,\n null !== prevState ? prevState.cachePool : null\n ),\n null !== prevState\n ? pushHiddenContext(workInProgress, prevState)\n : reuseHiddenContextOnStack(),\n pushOffscreenSuspenseHandler(workInProgress);\n else\n return (\n (nextProps = workInProgress.lanes = 536870912),\n deferHiddenOffscreenComponent(\n current,\n workInProgress,\n null !== prevState ? prevState.baseLanes | renderLanes : renderLanes,\n renderLanes,\n nextProps\n )\n );\n } else\n null !== prevState\n ? (pushTransition(workInProgress, prevState.cachePool),\n pushHiddenContext(workInProgress, prevState),\n reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.memoizedState = null))\n : (null !== current && pushTransition(workInProgress, null),\n reuseHiddenContextOnStack(),\n reuseSuspenseHandlerOnStack(workInProgress));\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nfunction bailoutOffscreenComponent(current, workInProgress) {\n (null !== current && 22 === current.tag) ||\n null !== workInProgress.stateNode ||\n (workInProgress.stateNode = {\n _visibility: 1,\n _pendingMarkers: null,\n _retryCache: null,\n _transitions: null\n });\n return workInProgress.sibling;\n}\nfunction deferHiddenOffscreenComponent(\n current,\n workInProgress,\n nextBaseLanes,\n renderLanes,\n remainingChildLanes\n) {\n var JSCompiler_inline_result = peekCacheFromPool();\n JSCompiler_inline_result =\n null === JSCompiler_inline_result\n ? null\n : { parent: CacheContext._currentValue, pool: JSCompiler_inline_result };\n workInProgress.memoizedState = {\n baseLanes: nextBaseLanes,\n cachePool: JSCompiler_inline_result\n };\n null !== current && pushTransition(workInProgress, null);\n reuseHiddenContextOnStack();\n pushOffscreenSuspenseHandler(workInProgress);\n null !== current &&\n propagateParentContextChanges(current, workInProgress, renderLanes, !0);\n workInProgress.childLanes = remainingChildLanes;\n return null;\n}\nfunction mountActivityChildren(workInProgress, nextProps) {\n nextProps = mountWorkInProgressOffscreenFiber(\n { mode: nextProps.mode, children: nextProps.children },\n workInProgress.mode\n );\n nextProps.ref = workInProgress.ref;\n workInProgress.child = nextProps;\n nextProps.return = workInProgress;\n return nextProps;\n}\nfunction retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountActivityChildren(workInProgress, workInProgress.pendingProps);\n current.flags |= 2;\n popSuspenseHandler(workInProgress);\n workInProgress.memoizedState = null;\n return current;\n}\nfunction updateActivityComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n didSuspend = 0 !== (workInProgress.flags & 128);\n workInProgress.flags &= -129;\n if (null === current) {\n if (isHydrating) {\n if (\"hidden\" === nextProps.mode)\n return (\n (current = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.lanes = 536870912),\n bailoutOffscreenComponent(null, current)\n );\n pushDehydratedActivitySuspenseHandler(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" === current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n workInProgress.lanes = 536870912;\n return null;\n }\n return mountActivityChildren(workInProgress, nextProps);\n }\n var prevState = current.memoizedState;\n if (null !== prevState) {\n var dehydrated = prevState.dehydrated;\n pushDehydratedActivitySuspenseHandler(workInProgress);\n if (didSuspend)\n if (workInProgress.flags & 256)\n (workInProgress.flags &= -257),\n (workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n ));\n else if (null !== workInProgress.memoizedState)\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null);\n else throw Error(formatProdErrorMessage(558));\n else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (didSuspend = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || didSuspend)\n ) {\n nextProps = workInProgressRoot;\n if (\n null !== nextProps &&\n ((dehydrated = getBumpedLaneForHydration(nextProps, renderLanes)),\n 0 !== dehydrated && dehydrated !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = dehydrated),\n enqueueConcurrentRenderForLane(current, dehydrated),\n scheduleUpdateOnFiber(nextProps, current, dehydrated),\n SelectiveHydrationException)\n );\n renderDidSuspendDelayIfPossible();\n workInProgress = retryActivityComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n (current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(dehydrated.nextSibling)),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountActivityChildren(workInProgress, nextProps)),\n (workInProgress.flags |= 4096);\n return workInProgress;\n }\n current = createWorkInProgress(current.child, {\n mode: nextProps.mode,\n children: nextProps.children\n });\n current.ref = workInProgress.ref;\n workInProgress.child = current;\n current.return = workInProgress;\n return current;\n}\nfunction markRef(current, workInProgress) {\n var ref = workInProgress.ref;\n if (null === ref)\n null !== current &&\n null !== current.ref &&\n (workInProgress.flags |= 4194816);\n else {\n if (\"function\" !== typeof ref && \"object\" !== typeof ref)\n throw Error(formatProdErrorMessage(284));\n if (null === current || current.ref !== ref)\n workInProgress.flags |= 4194816;\n }\n}\nfunction updateFunctionComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n Component = renderWithHooks(\n current,\n workInProgress,\n Component,\n nextProps,\n void 0,\n renderLanes\n );\n nextProps = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && nextProps && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, Component, renderLanes);\n return workInProgress.child;\n}\nfunction replayFunctionComponent(\n current,\n workInProgress,\n nextProps,\n Component,\n secondArg,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n workInProgress.updateQueue = null;\n nextProps = renderWithHooksAgain(\n workInProgress,\n Component,\n nextProps,\n secondArg\n );\n finishRenderingHooks(current);\n Component = checkDidRenderIdHook();\n if (null !== current && !didReceiveUpdate)\n return (\n bailoutHooks(current, workInProgress, renderLanes),\n bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes)\n );\n isHydrating && Component && pushMaterializedTreeId(workInProgress);\n workInProgress.flags |= 1;\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n return workInProgress.child;\n}\nfunction updateClassComponent(\n current,\n workInProgress,\n Component,\n nextProps,\n renderLanes\n) {\n prepareToReadContext(workInProgress);\n if (null === workInProgress.stateNode) {\n var context = emptyContextObject,\n contextType = Component.contextType;\n \"object\" === typeof contextType &&\n null !== contextType &&\n (context = readContext(contextType));\n context = new Component(nextProps, context);\n workInProgress.memoizedState =\n null !== context.state && void 0 !== context.state ? context.state : null;\n context.updater = classComponentUpdater;\n workInProgress.stateNode = context;\n context._reactInternals = workInProgress;\n context = workInProgress.stateNode;\n context.props = nextProps;\n context.state = workInProgress.memoizedState;\n context.refs = {};\n initializeUpdateQueue(workInProgress);\n contextType = Component.contextType;\n context.context =\n \"object\" === typeof contextType && null !== contextType\n ? readContext(contextType)\n : emptyContextObject;\n context.state = workInProgress.memoizedState;\n contextType = Component.getDerivedStateFromProps;\n \"function\" === typeof contextType &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n contextType,\n nextProps\n ),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof Component.getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n ((contextType = context.state),\n \"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount(),\n contextType !== context.state &&\n classComponentUpdater.enqueueReplaceState(context, context.state, null),\n processUpdateQueue(workInProgress, nextProps, context, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction(),\n (context.state = workInProgress.memoizedState));\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308);\n nextProps = !0;\n } else if (null === current) {\n context = workInProgress.stateNode;\n var unresolvedOldProps = workInProgress.memoizedProps,\n oldProps = resolveClassComponentProps(Component, unresolvedOldProps);\n context.props = oldProps;\n var oldContext = context.context,\n contextType$jscomp$0 = Component.contextType;\n contextType = emptyContextObject;\n \"object\" === typeof contextType$jscomp$0 &&\n null !== contextType$jscomp$0 &&\n (contextType = readContext(contextType$jscomp$0));\n var getDerivedStateFromProps = Component.getDerivedStateFromProps;\n contextType$jscomp$0 =\n \"function\" === typeof getDerivedStateFromProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate;\n unresolvedOldProps = workInProgress.pendingProps !== unresolvedOldProps;\n contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((unresolvedOldProps || oldContext !== contextType) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n contextType\n ));\n hasForceUpdate = !1;\n var oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n oldContext = workInProgress.memoizedState;\n unresolvedOldProps || oldState !== oldContext || hasForceUpdate\n ? (\"function\" === typeof getDerivedStateFromProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n getDerivedStateFromProps,\n nextProps\n ),\n (oldContext = workInProgress.memoizedState)),\n (oldProps =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n oldProps,\n nextProps,\n oldState,\n oldContext,\n contextType\n ))\n ? (contextType$jscomp$0 ||\n (\"function\" !== typeof context.UNSAFE_componentWillMount &&\n \"function\" !== typeof context.componentWillMount) ||\n (\"function\" === typeof context.componentWillMount &&\n context.componentWillMount(),\n \"function\" === typeof context.UNSAFE_componentWillMount &&\n context.UNSAFE_componentWillMount()),\n \"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = oldContext)),\n (context.props = nextProps),\n (context.state = oldContext),\n (context.context = contextType),\n (nextProps = oldProps))\n : (\"function\" === typeof context.componentDidMount &&\n (workInProgress.flags |= 4194308),\n (nextProps = !1));\n } else {\n context = workInProgress.stateNode;\n cloneUpdateQueue(current, workInProgress);\n contextType = workInProgress.memoizedProps;\n contextType$jscomp$0 = resolveClassComponentProps(Component, contextType);\n context.props = contextType$jscomp$0;\n getDerivedStateFromProps = workInProgress.pendingProps;\n oldState = context.context;\n oldContext = Component.contextType;\n oldProps = emptyContextObject;\n \"object\" === typeof oldContext &&\n null !== oldContext &&\n (oldProps = readContext(oldContext));\n unresolvedOldProps = Component.getDerivedStateFromProps;\n (oldContext =\n \"function\" === typeof unresolvedOldProps ||\n \"function\" === typeof context.getSnapshotBeforeUpdate) ||\n (\"function\" !== typeof context.UNSAFE_componentWillReceiveProps &&\n \"function\" !== typeof context.componentWillReceiveProps) ||\n ((contextType !== getDerivedStateFromProps || oldState !== oldProps) &&\n callComponentWillReceiveProps(\n workInProgress,\n context,\n nextProps,\n oldProps\n ));\n hasForceUpdate = !1;\n oldState = workInProgress.memoizedState;\n context.state = oldState;\n processUpdateQueue(workInProgress, nextProps, context, renderLanes);\n suspendIfUpdateReadFromEntangledAsyncAction();\n var newState = workInProgress.memoizedState;\n contextType !== getDerivedStateFromProps ||\n oldState !== newState ||\n hasForceUpdate ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies))\n ? (\"function\" === typeof unresolvedOldProps &&\n (applyDerivedStateFromProps(\n workInProgress,\n Component,\n unresolvedOldProps,\n nextProps\n ),\n (newState = workInProgress.memoizedState)),\n (contextType$jscomp$0 =\n hasForceUpdate ||\n checkShouldComponentUpdate(\n workInProgress,\n Component,\n contextType$jscomp$0,\n nextProps,\n oldState,\n newState,\n oldProps\n ) ||\n (null !== current &&\n null !== current.dependencies &&\n checkIfContextChanged(current.dependencies)))\n ? (oldContext ||\n (\"function\" !== typeof context.UNSAFE_componentWillUpdate &&\n \"function\" !== typeof context.componentWillUpdate) ||\n (\"function\" === typeof context.componentWillUpdate &&\n context.componentWillUpdate(nextProps, newState, oldProps),\n \"function\" === typeof context.UNSAFE_componentWillUpdate &&\n context.UNSAFE_componentWillUpdate(\n nextProps,\n newState,\n oldProps\n )),\n \"function\" === typeof context.componentDidUpdate &&\n (workInProgress.flags |= 4),\n \"function\" === typeof context.getSnapshotBeforeUpdate &&\n (workInProgress.flags |= 1024))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (workInProgress.memoizedProps = nextProps),\n (workInProgress.memoizedState = newState)),\n (context.props = nextProps),\n (context.state = newState),\n (context.context = oldProps),\n (nextProps = contextType$jscomp$0))\n : (\"function\" !== typeof context.componentDidUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 4),\n \"function\" !== typeof context.getSnapshotBeforeUpdate ||\n (contextType === current.memoizedProps &&\n oldState === current.memoizedState) ||\n (workInProgress.flags |= 1024),\n (nextProps = !1));\n }\n context = nextProps;\n markRef(current, workInProgress);\n nextProps = 0 !== (workInProgress.flags & 128);\n context || nextProps\n ? ((context = workInProgress.stateNode),\n (Component =\n nextProps && \"function\" !== typeof Component.getDerivedStateFromError\n ? null\n : context.render()),\n (workInProgress.flags |= 1),\n null !== current && nextProps\n ? ((workInProgress.child = reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n )),\n (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n Component,\n renderLanes\n )))\n : reconcileChildren(current, workInProgress, Component, renderLanes),\n (workInProgress.memoizedState = context.state),\n (current = workInProgress.child))\n : (current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n ));\n return current;\n}\nfunction mountHostRootWithoutHydrating(\n current,\n workInProgress,\n nextChildren,\n renderLanes\n) {\n resetHydrationState();\n workInProgress.flags |= 256;\n reconcileChildren(current, workInProgress, nextChildren, renderLanes);\n return workInProgress.child;\n}\nvar SUSPENDED_MARKER = {\n dehydrated: null,\n treeContext: null,\n retryLane: 0,\n hydrationErrors: null\n};\nfunction mountSuspenseOffscreenState(renderLanes) {\n return { baseLanes: renderLanes, cachePool: getSuspendedCache() };\n}\nfunction getRemainingWorkInPrimaryTree(\n current,\n primaryTreeDidDefer,\n renderLanes\n) {\n current = null !== current ? current.childLanes & ~renderLanes : 0;\n primaryTreeDidDefer && (current |= workInProgressDeferredLane);\n return current;\n}\nfunction updateSuspenseComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n showFallback = !1,\n didSuspend = 0 !== (workInProgress.flags & 128),\n JSCompiler_temp;\n (JSCompiler_temp = didSuspend) ||\n (JSCompiler_temp =\n null !== current && null === current.memoizedState\n ? !1\n : 0 !== (suspenseStackCursor.current & 2));\n JSCompiler_temp && ((showFallback = !0), (workInProgress.flags &= -129));\n JSCompiler_temp = 0 !== (workInProgress.flags & 32);\n workInProgress.flags &= -33;\n if (null === current) {\n if (isHydrating) {\n showFallback\n ? pushPrimaryTreeSuspenseHandler(workInProgress)\n : reuseSuspenseHandlerOnStack(workInProgress);\n (current = nextHydratableInstance)\n ? ((current = canHydrateHydrationBoundary(\n current,\n rootOrSingletonContext\n )),\n (current = null !== current && \"&\" !== current.data ? current : null),\n null !== current &&\n ((workInProgress.memoizedState = {\n dehydrated: current,\n treeContext:\n null !== treeContextProvider\n ? { id: treeContextId, overflow: treeContextOverflow }\n : null,\n retryLane: 536870912,\n hydrationErrors: null\n }),\n (renderLanes = createFiberFromDehydratedFragment(current)),\n (renderLanes.return = workInProgress),\n (workInProgress.child = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null)))\n : (current = null);\n if (null === current) throw throwOnHydrationMismatch(workInProgress);\n isSuspenseInstanceFallback(current)\n ? (workInProgress.lanes = 32)\n : (workInProgress.lanes = 536870912);\n return null;\n }\n var nextPrimaryChildren = nextProps.children;\n nextProps = nextProps.fallback;\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (showFallback = workInProgress.mode),\n (nextPrimaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"hidden\", children: nextPrimaryChildren },\n showFallback\n )),\n (nextProps = createFiberFromFragment(\n nextProps,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.sibling = nextProps),\n (workInProgress.child = nextPrimaryChildren),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState = mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(null, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n return mountSuspensePrimaryChildren(workInProgress, nextPrimaryChildren);\n }\n var prevState = current.memoizedState;\n if (\n null !== prevState &&\n ((nextPrimaryChildren = prevState.dehydrated), null !== nextPrimaryChildren)\n ) {\n if (didSuspend)\n workInProgress.flags & 256\n ? (pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags &= -257),\n (workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n )))\n : null !== workInProgress.memoizedState\n ? (reuseSuspenseHandlerOnStack(workInProgress),\n (workInProgress.child = current.child),\n (workInProgress.flags |= 128),\n (workInProgress = null))\n : (reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (nextProps = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: nextProps.children },\n showFallback\n )),\n (nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2),\n (nextProps.return = workInProgress),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n reconcileChildFibers(\n workInProgress,\n current.child,\n null,\n renderLanes\n ),\n (nextProps = workInProgress.child),\n (nextProps.memoizedState =\n mountSuspenseOffscreenState(renderLanes)),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n (workInProgress = bailoutOffscreenComponent(null, nextProps)));\n else if (\n (pushPrimaryTreeSuspenseHandler(workInProgress),\n isSuspenseInstanceFallback(nextPrimaryChildren))\n ) {\n JSCompiler_temp =\n nextPrimaryChildren.nextSibling &&\n nextPrimaryChildren.nextSibling.dataset;\n if (JSCompiler_temp) var digest = JSCompiler_temp.dgst;\n JSCompiler_temp = digest;\n nextProps = Error(formatProdErrorMessage(419));\n nextProps.stack = \"\";\n nextProps.digest = JSCompiler_temp;\n queueHydrationError({ value: nextProps, source: null, stack: null });\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else if (\n (didReceiveUpdate ||\n propagateParentContextChanges(current, workInProgress, renderLanes, !1),\n (JSCompiler_temp = 0 !== (renderLanes & current.childLanes)),\n didReceiveUpdate || JSCompiler_temp)\n ) {\n JSCompiler_temp = workInProgressRoot;\n if (\n null !== JSCompiler_temp &&\n ((nextProps = getBumpedLaneForHydration(JSCompiler_temp, renderLanes)),\n 0 !== nextProps && nextProps !== prevState.retryLane)\n )\n throw (\n ((prevState.retryLane = nextProps),\n enqueueConcurrentRenderForLane(current, nextProps),\n scheduleUpdateOnFiber(JSCompiler_temp, current, nextProps),\n SelectiveHydrationException)\n );\n isSuspenseInstancePending(nextPrimaryChildren) ||\n renderDidSuspendDelayIfPossible();\n workInProgress = retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n );\n } else\n isSuspenseInstancePending(nextPrimaryChildren)\n ? ((workInProgress.flags |= 192),\n (workInProgress.child = current.child),\n (workInProgress = null))\n : ((current = prevState.treeContext),\n (nextHydratableInstance = getNextHydratable(\n nextPrimaryChildren.nextSibling\n )),\n (hydrationParentFiber = workInProgress),\n (isHydrating = !0),\n (hydrationErrors = null),\n (rootOrSingletonContext = !1),\n null !== current &&\n restoreSuspendedTreeContext(workInProgress, current),\n (workInProgress = mountSuspensePrimaryChildren(\n workInProgress,\n nextProps.children\n )),\n (workInProgress.flags |= 4096));\n return workInProgress;\n }\n if (showFallback)\n return (\n reuseSuspenseHandlerOnStack(workInProgress),\n (nextPrimaryChildren = nextProps.fallback),\n (showFallback = workInProgress.mode),\n (prevState = current.child),\n (digest = prevState.sibling),\n (nextProps = createWorkInProgress(prevState, {\n mode: \"hidden\",\n children: nextProps.children\n })),\n (nextProps.subtreeFlags = prevState.subtreeFlags & 65011712),\n null !== digest\n ? (nextPrimaryChildren = createWorkInProgress(\n digest,\n nextPrimaryChildren\n ))\n : ((nextPrimaryChildren = createFiberFromFragment(\n nextPrimaryChildren,\n showFallback,\n renderLanes,\n null\n )),\n (nextPrimaryChildren.flags |= 2)),\n (nextPrimaryChildren.return = workInProgress),\n (nextProps.return = workInProgress),\n (nextProps.sibling = nextPrimaryChildren),\n (workInProgress.child = nextProps),\n bailoutOffscreenComponent(null, nextProps),\n (nextProps = workInProgress.child),\n (nextPrimaryChildren = current.child.memoizedState),\n null === nextPrimaryChildren\n ? (nextPrimaryChildren = mountSuspenseOffscreenState(renderLanes))\n : ((showFallback = nextPrimaryChildren.cachePool),\n null !== showFallback\n ? ((prevState = CacheContext._currentValue),\n (showFallback =\n showFallback.parent !== prevState\n ? { parent: prevState, pool: prevState }\n : showFallback))\n : (showFallback = getSuspendedCache()),\n (nextPrimaryChildren = {\n baseLanes: nextPrimaryChildren.baseLanes | renderLanes,\n cachePool: showFallback\n })),\n (nextProps.memoizedState = nextPrimaryChildren),\n (nextProps.childLanes = getRemainingWorkInPrimaryTree(\n current,\n JSCompiler_temp,\n renderLanes\n )),\n (workInProgress.memoizedState = SUSPENDED_MARKER),\n bailoutOffscreenComponent(current.child, nextProps)\n );\n pushPrimaryTreeSuspenseHandler(workInProgress);\n renderLanes = current.child;\n current = renderLanes.sibling;\n renderLanes = createWorkInProgress(renderLanes, {\n mode: \"visible\",\n children: nextProps.children\n });\n renderLanes.return = workInProgress;\n renderLanes.sibling = null;\n null !== current &&\n ((JSCompiler_temp = workInProgress.deletions),\n null === JSCompiler_temp\n ? ((workInProgress.deletions = [current]), (workInProgress.flags |= 16))\n : JSCompiler_temp.push(current));\n workInProgress.child = renderLanes;\n workInProgress.memoizedState = null;\n return renderLanes;\n}\nfunction mountSuspensePrimaryChildren(workInProgress, primaryChildren) {\n primaryChildren = mountWorkInProgressOffscreenFiber(\n { mode: \"visible\", children: primaryChildren },\n workInProgress.mode\n );\n primaryChildren.return = workInProgress;\n return (workInProgress.child = primaryChildren);\n}\nfunction mountWorkInProgressOffscreenFiber(offscreenProps, mode) {\n offscreenProps = createFiberImplClass(22, offscreenProps, null, mode);\n offscreenProps.lanes = 0;\n return offscreenProps;\n}\nfunction retrySuspenseComponentWithoutHydrating(\n current,\n workInProgress,\n renderLanes\n) {\n reconcileChildFibers(workInProgress, current.child, null, renderLanes);\n current = mountSuspensePrimaryChildren(\n workInProgress,\n workInProgress.pendingProps.children\n );\n current.flags |= 2;\n workInProgress.memoizedState = null;\n return current;\n}\nfunction scheduleSuspenseWorkOnFiber(fiber, renderLanes, propagationRoot) {\n fiber.lanes |= renderLanes;\n var alternate = fiber.alternate;\n null !== alternate && (alternate.lanes |= renderLanes);\n scheduleContextWorkOnParentPath(fiber.return, renderLanes, propagationRoot);\n}\nfunction initSuspenseListRenderState(\n workInProgress,\n isBackwards,\n tail,\n lastContentRow,\n tailMode,\n treeForkCount\n) {\n var renderState = workInProgress.memoizedState;\n null === renderState\n ? (workInProgress.memoizedState = {\n isBackwards: isBackwards,\n rendering: null,\n renderingStartTime: 0,\n last: lastContentRow,\n tail: tail,\n tailMode: tailMode,\n treeForkCount: treeForkCount\n })\n : ((renderState.isBackwards = isBackwards),\n (renderState.rendering = null),\n (renderState.renderingStartTime = 0),\n (renderState.last = lastContentRow),\n (renderState.tail = tail),\n (renderState.tailMode = tailMode),\n (renderState.treeForkCount = treeForkCount));\n}\nfunction updateSuspenseListComponent(current, workInProgress, renderLanes) {\n var nextProps = workInProgress.pendingProps,\n revealOrder = nextProps.revealOrder,\n tailMode = nextProps.tail;\n nextProps = nextProps.children;\n var suspenseContext = suspenseStackCursor.current,\n shouldForceFallback = 0 !== (suspenseContext & 2);\n shouldForceFallback\n ? ((suspenseContext = (suspenseContext & 1) | 2),\n (workInProgress.flags |= 128))\n : (suspenseContext &= 1);\n push(suspenseStackCursor, suspenseContext);\n reconcileChildren(current, workInProgress, nextProps, renderLanes);\n nextProps = isHydrating ? treeForkCount : 0;\n if (!shouldForceFallback && null !== current && 0 !== (current.flags & 128))\n a: for (current = workInProgress.child; null !== current; ) {\n if (13 === current.tag)\n null !== current.memoizedState &&\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (19 === current.tag)\n scheduleSuspenseWorkOnFiber(current, renderLanes, workInProgress);\n else if (null !== current.child) {\n current.child.return = current;\n current = current.child;\n continue;\n }\n if (current === workInProgress) break a;\n for (; null === current.sibling; ) {\n if (null === current.return || current.return === workInProgress)\n break a;\n current = current.return;\n }\n current.sibling.return = current.return;\n current = current.sibling;\n }\n switch (revealOrder) {\n case \"forwards\":\n renderLanes = workInProgress.child;\n for (revealOrder = null; null !== renderLanes; )\n (current = renderLanes.alternate),\n null !== current &&\n null === findFirstSuspended(current) &&\n (revealOrder = renderLanes),\n (renderLanes = renderLanes.sibling);\n renderLanes = revealOrder;\n null === renderLanes\n ? ((revealOrder = workInProgress.child), (workInProgress.child = null))\n : ((revealOrder = renderLanes.sibling), (renderLanes.sibling = null));\n initSuspenseListRenderState(\n workInProgress,\n !1,\n revealOrder,\n renderLanes,\n tailMode,\n nextProps\n );\n break;\n case \"backwards\":\n case \"unstable_legacy-backwards\":\n renderLanes = null;\n revealOrder = workInProgress.child;\n for (workInProgress.child = null; null !== revealOrder; ) {\n current = revealOrder.alternate;\n if (null !== current && null === findFirstSuspended(current)) {\n workInProgress.child = revealOrder;\n break;\n }\n current = revealOrder.sibling;\n revealOrder.sibling = renderLanes;\n renderLanes = revealOrder;\n revealOrder = current;\n }\n initSuspenseListRenderState(\n workInProgress,\n !0,\n renderLanes,\n null,\n tailMode,\n nextProps\n );\n break;\n case \"together\":\n initSuspenseListRenderState(\n workInProgress,\n !1,\n null,\n null,\n void 0,\n nextProps\n );\n break;\n default:\n workInProgress.memoizedState = null;\n }\n return workInProgress.child;\n}\nfunction bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes) {\n null !== current && (workInProgress.dependencies = current.dependencies);\n workInProgressRootSkippedLanes |= workInProgress.lanes;\n if (0 === (renderLanes & workInProgress.childLanes))\n if (null !== current) {\n if (\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n 0 === (renderLanes & workInProgress.childLanes))\n )\n return null;\n } else return null;\n if (null !== current && workInProgress.child !== current.child)\n throw Error(formatProdErrorMessage(153));\n if (null !== workInProgress.child) {\n current = workInProgress.child;\n renderLanes = createWorkInProgress(current, current.pendingProps);\n workInProgress.child = renderLanes;\n for (renderLanes.return = workInProgress; null !== current.sibling; )\n (current = current.sibling),\n (renderLanes = renderLanes.sibling =\n createWorkInProgress(current, current.pendingProps)),\n (renderLanes.return = workInProgress);\n renderLanes.sibling = null;\n }\n return workInProgress.child;\n}\nfunction checkScheduledUpdateOrContext(current, renderLanes) {\n if (0 !== (current.lanes & renderLanes)) return !0;\n current = current.dependencies;\n return null !== current && checkIfContextChanged(current) ? !0 : !1;\n}\nfunction attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n) {\n switch (workInProgress.tag) {\n case 3:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n resetHydrationState();\n break;\n case 27:\n case 5:\n pushHostContext(workInProgress);\n break;\n case 4:\n pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);\n break;\n case 10:\n pushProvider(\n workInProgress,\n workInProgress.type,\n workInProgress.memoizedProps.value\n );\n break;\n case 31:\n if (null !== workInProgress.memoizedState)\n return (\n (workInProgress.flags |= 128),\n pushDehydratedActivitySuspenseHandler(workInProgress),\n null\n );\n break;\n case 13:\n var state$102 = workInProgress.memoizedState;\n if (null !== state$102) {\n if (null !== state$102.dehydrated)\n return (\n pushPrimaryTreeSuspenseHandler(workInProgress),\n (workInProgress.flags |= 128),\n null\n );\n if (0 !== (renderLanes & workInProgress.child.childLanes))\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n pushPrimaryTreeSuspenseHandler(workInProgress);\n current = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n return null !== current ? current.sibling : null;\n }\n pushPrimaryTreeSuspenseHandler(workInProgress);\n break;\n case 19:\n var didSuspendBefore = 0 !== (current.flags & 128);\n state$102 = 0 !== (renderLanes & workInProgress.childLanes);\n state$102 ||\n (propagateParentContextChanges(\n current,\n workInProgress,\n renderLanes,\n !1\n ),\n (state$102 = 0 !== (renderLanes & workInProgress.childLanes)));\n if (didSuspendBefore) {\n if (state$102)\n return updateSuspenseListComponent(\n current,\n workInProgress,\n renderLanes\n );\n workInProgress.flags |= 128;\n }\n didSuspendBefore = workInProgress.memoizedState;\n null !== didSuspendBefore &&\n ((didSuspendBefore.rendering = null),\n (didSuspendBefore.tail = null),\n (didSuspendBefore.lastEffect = null));\n push(suspenseStackCursor, suspenseStackCursor.current);\n if (state$102) break;\n else return null;\n case 22:\n return (\n (workInProgress.lanes = 0),\n updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n )\n );\n case 24:\n pushProvider(workInProgress, CacheContext, current.memoizedState.cache);\n }\n return bailoutOnAlreadyFinishedWork(current, workInProgress, renderLanes);\n}\nfunction beginWork(current, workInProgress, renderLanes) {\n if (null !== current)\n if (current.memoizedProps !== workInProgress.pendingProps)\n didReceiveUpdate = !0;\n else {\n if (\n !checkScheduledUpdateOrContext(current, renderLanes) &&\n 0 === (workInProgress.flags & 128)\n )\n return (\n (didReceiveUpdate = !1),\n attemptEarlyBailoutIfNoScheduledUpdate(\n current,\n workInProgress,\n renderLanes\n )\n );\n didReceiveUpdate = 0 !== (current.flags & 131072) ? !0 : !1;\n }\n else\n (didReceiveUpdate = !1),\n isHydrating &&\n 0 !== (workInProgress.flags & 1048576) &&\n pushTreeId(workInProgress, treeForkCount, workInProgress.index);\n workInProgress.lanes = 0;\n switch (workInProgress.tag) {\n case 16:\n a: {\n var props = workInProgress.pendingProps;\n current = resolveLazy(workInProgress.elementType);\n workInProgress.type = current;\n if (\"function\" === typeof current)\n shouldConstruct(current)\n ? ((props = resolveClassComponentProps(current, props)),\n (workInProgress.tag = 1),\n (workInProgress = updateClassComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )))\n : ((workInProgress.tag = 0),\n (workInProgress = updateFunctionComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n )));\n else {\n if (void 0 !== current && null !== current) {\n var $$typeof = current.$$typeof;\n if ($$typeof === REACT_FORWARD_REF_TYPE) {\n workInProgress.tag = 11;\n workInProgress = updateForwardRef(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n } else if ($$typeof === REACT_MEMO_TYPE) {\n workInProgress.tag = 14;\n workInProgress = updateMemoComponent(\n null,\n workInProgress,\n current,\n props,\n renderLanes\n );\n break a;\n }\n }\n workInProgress = getComponentNameFromType(current) || current;\n throw Error(formatProdErrorMessage(306, workInProgress, \"\"));\n }\n }\n return workInProgress;\n case 0:\n return updateFunctionComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 1:\n return (\n (props = workInProgress.type),\n ($$typeof = resolveClassComponentProps(\n props,\n workInProgress.pendingProps\n )),\n updateClassComponent(\n current,\n workInProgress,\n props,\n $$typeof,\n renderLanes\n )\n );\n case 3:\n a: {\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n );\n if (null === current) throw Error(formatProdErrorMessage(387));\n props = workInProgress.pendingProps;\n var prevState = workInProgress.memoizedState;\n $$typeof = prevState.element;\n cloneUpdateQueue(current, workInProgress);\n processUpdateQueue(workInProgress, props, null, renderLanes);\n var nextState = workInProgress.memoizedState;\n props = nextState.cache;\n pushProvider(workInProgress, CacheContext, props);\n props !== prevState.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n );\n suspendIfUpdateReadFromEntangledAsyncAction();\n props = nextState.element;\n if (prevState.isDehydrated)\n if (\n ((prevState = {\n element: props,\n isDehydrated: !1,\n cache: nextState.cache\n }),\n (workInProgress.updateQueue.baseState = prevState),\n (workInProgress.memoizedState = prevState),\n workInProgress.flags & 256)\n ) {\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else if (props !== $$typeof) {\n $$typeof = createCapturedValueAtFiber(\n Error(formatProdErrorMessage(424)),\n workInProgress\n );\n queueHydrationError($$typeof);\n workInProgress = mountHostRootWithoutHydrating(\n current,\n workInProgress,\n props,\n renderLanes\n );\n break a;\n } else {\n current = workInProgress.stateNode.containerInfo;\n switch (current.nodeType) {\n case 9:\n current = current.body;\n break;\n default:\n current =\n \"HTML\" === current.nodeName\n ? current.ownerDocument.body\n : current;\n }\n nextHydratableInstance = getNextHydratable(current.firstChild);\n hydrationParentFiber = workInProgress;\n isHydrating = !0;\n hydrationErrors = null;\n rootOrSingletonContext = !0;\n renderLanes = mountChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n );\n for (workInProgress.child = renderLanes; renderLanes; )\n (renderLanes.flags = (renderLanes.flags & -3) | 4096),\n (renderLanes = renderLanes.sibling);\n }\n else {\n resetHydrationState();\n if (props === $$typeof) {\n workInProgress = bailoutOnAlreadyFinishedWork(\n current,\n workInProgress,\n renderLanes\n );\n break a;\n }\n reconcileChildren(current, workInProgress, props, renderLanes);\n }\n workInProgress = workInProgress.child;\n }\n return workInProgress;\n case 26:\n return (\n markRef(current, workInProgress),\n null === current\n ? (renderLanes = getResource(\n workInProgress.type,\n null,\n workInProgress.pendingProps,\n null\n ))\n ? (workInProgress.memoizedState = renderLanes)\n : isHydrating ||\n ((renderLanes = workInProgress.type),\n (current = workInProgress.pendingProps),\n (props = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n ).createElement(renderLanes)),\n (props[internalInstanceKey] = workInProgress),\n (props[internalPropsKey] = current),\n setInitialProperties(props, renderLanes, current),\n markNodeAsHoistable(props),\n (workInProgress.stateNode = props))\n : (workInProgress.memoizedState = getResource(\n workInProgress.type,\n current.memoizedProps,\n workInProgress.pendingProps,\n current.memoizedState\n )),\n null\n );\n case 27:\n return (\n pushHostContext(workInProgress),\n null === current &&\n isHydrating &&\n ((props = workInProgress.stateNode =\n resolveSingletonInstance(\n workInProgress.type,\n workInProgress.pendingProps,\n rootInstanceStackCursor.current\n )),\n (hydrationParentFiber = workInProgress),\n (rootOrSingletonContext = !0),\n ($$typeof = nextHydratableInstance),\n isSingletonScope(workInProgress.type)\n ? ((previousHydratableOnEnteringScopedSingleton = $$typeof),\n (nextHydratableInstance = getNextHydratable(props.firstChild)))\n : (nextHydratableInstance = $$typeof)),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n markRef(current, workInProgress),\n null === current && (workInProgress.flags |= 4194304),\n workInProgress.child\n );\n case 5:\n if (null === current && isHydrating) {\n if (($$typeof = props = nextHydratableInstance))\n (props = canHydrateInstance(\n props,\n workInProgress.type,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== props\n ? ((workInProgress.stateNode = props),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = getNextHydratable(props.firstChild)),\n (rootOrSingletonContext = !1),\n ($$typeof = !0))\n : ($$typeof = !1);\n $$typeof || throwOnHydrationMismatch(workInProgress);\n }\n pushHostContext(workInProgress);\n $$typeof = workInProgress.type;\n prevState = workInProgress.pendingProps;\n nextState = null !== current ? current.memoizedProps : null;\n props = prevState.children;\n shouldSetTextContent($$typeof, prevState)\n ? (props = null)\n : null !== nextState &&\n shouldSetTextContent($$typeof, nextState) &&\n (workInProgress.flags |= 32);\n null !== workInProgress.memoizedState &&\n (($$typeof = renderWithHooks(\n current,\n workInProgress,\n TransitionAwareHostComponent,\n null,\n null,\n renderLanes\n )),\n (HostTransitionContext._currentValue = $$typeof));\n markRef(current, workInProgress);\n reconcileChildren(current, workInProgress, props, renderLanes);\n return workInProgress.child;\n case 6:\n if (null === current && isHydrating) {\n if ((current = renderLanes = nextHydratableInstance))\n (renderLanes = canHydrateTextInstance(\n renderLanes,\n workInProgress.pendingProps,\n rootOrSingletonContext\n )),\n null !== renderLanes\n ? ((workInProgress.stateNode = renderLanes),\n (hydrationParentFiber = workInProgress),\n (nextHydratableInstance = null),\n (current = !0))\n : (current = !1);\n current || throwOnHydrationMismatch(workInProgress);\n }\n return null;\n case 13:\n return updateSuspenseComponent(current, workInProgress, renderLanes);\n case 4:\n return (\n pushHostContainer(\n workInProgress,\n workInProgress.stateNode.containerInfo\n ),\n (props = workInProgress.pendingProps),\n null === current\n ? (workInProgress.child = reconcileChildFibers(\n workInProgress,\n null,\n props,\n renderLanes\n ))\n : reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 11:\n return updateForwardRef(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 7:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps,\n renderLanes\n ),\n workInProgress.child\n );\n case 8:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 12:\n return (\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 10:\n return (\n (props = workInProgress.pendingProps),\n pushProvider(workInProgress, workInProgress.type, props.value),\n reconcileChildren(current, workInProgress, props.children, renderLanes),\n workInProgress.child\n );\n case 9:\n return (\n ($$typeof = workInProgress.type._context),\n (props = workInProgress.pendingProps.children),\n prepareToReadContext(workInProgress),\n ($$typeof = readContext($$typeof)),\n (props = props($$typeof)),\n (workInProgress.flags |= 1),\n reconcileChildren(current, workInProgress, props, renderLanes),\n workInProgress.child\n );\n case 14:\n return updateMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 15:\n return updateSimpleMemoComponent(\n current,\n workInProgress,\n workInProgress.type,\n workInProgress.pendingProps,\n renderLanes\n );\n case 19:\n return updateSuspenseListComponent(current, workInProgress, renderLanes);\n case 31:\n return updateActivityComponent(current, workInProgress, renderLanes);\n case 22:\n return updateOffscreenComponent(\n current,\n workInProgress,\n renderLanes,\n workInProgress.pendingProps\n );\n case 24:\n return (\n prepareToReadContext(workInProgress),\n (props = readContext(CacheContext)),\n null === current\n ? (($$typeof = peekCacheFromPool()),\n null === $$typeof &&\n (($$typeof = workInProgressRoot),\n (prevState = createCache()),\n ($$typeof.pooledCache = prevState),\n prevState.refCount++,\n null !== prevState && ($$typeof.pooledCacheLanes |= renderLanes),\n ($$typeof = prevState)),\n (workInProgress.memoizedState = { parent: props, cache: $$typeof }),\n initializeUpdateQueue(workInProgress),\n pushProvider(workInProgress, CacheContext, $$typeof))\n : (0 !== (current.lanes & renderLanes) &&\n (cloneUpdateQueue(current, workInProgress),\n processUpdateQueue(workInProgress, null, null, renderLanes),\n suspendIfUpdateReadFromEntangledAsyncAction()),\n ($$typeof = current.memoizedState),\n (prevState = workInProgress.memoizedState),\n $$typeof.parent !== props\n ? (($$typeof = { parent: props, cache: props }),\n (workInProgress.memoizedState = $$typeof),\n 0 === workInProgress.lanes &&\n (workInProgress.memoizedState =\n workInProgress.updateQueue.baseState =\n $$typeof),\n pushProvider(workInProgress, CacheContext, props))\n : ((props = prevState.cache),\n pushProvider(workInProgress, CacheContext, props),\n props !== $$typeof.cache &&\n propagateContextChanges(\n workInProgress,\n [CacheContext],\n renderLanes,\n !0\n ))),\n reconcileChildren(\n current,\n workInProgress,\n workInProgress.pendingProps.children,\n renderLanes\n ),\n workInProgress.child\n );\n case 29:\n throw workInProgress.pendingProps;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction markUpdate(workInProgress) {\n workInProgress.flags |= 4;\n}\nfunction preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n oldProps,\n newProps,\n renderLanes\n) {\n if ((type = 0 !== (workInProgress.mode & 32))) type = !1;\n if (type) {\n if (\n ((workInProgress.flags |= 16777216),\n (renderLanes & 335544128) === renderLanes)\n )\n if (workInProgress.stateNode.complete) workInProgress.flags |= 8192;\n else if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n } else workInProgress.flags &= -16777217;\n}\nfunction preloadResourceAndSuspendIfNeeded(workInProgress, resource) {\n if (\"stylesheet\" !== resource.type || 0 !== (resource.state.loading & 4))\n workInProgress.flags &= -16777217;\n else if (((workInProgress.flags |= 16777216), !preloadResource(resource)))\n if (shouldRemainOnPreviousScreen()) workInProgress.flags |= 8192;\n else\n throw (\n ((suspendedThenable = noopSuspenseyCommitThenable),\n SuspenseyCommitException)\n );\n}\nfunction scheduleRetryEffect(workInProgress, retryQueue) {\n null !== retryQueue && (workInProgress.flags |= 4);\n workInProgress.flags & 16384 &&\n ((retryQueue =\n 22 !== workInProgress.tag ? claimNextRetryLane() : 536870912),\n (workInProgress.lanes |= retryQueue),\n (workInProgressSuspendedRetryLanes |= retryQueue));\n}\nfunction cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {\n if (!isHydrating)\n switch (renderState.tailMode) {\n case \"hidden\":\n hasRenderedATailFallback = renderState.tail;\n for (var lastTailNode = null; null !== hasRenderedATailFallback; )\n null !== hasRenderedATailFallback.alternate &&\n (lastTailNode = hasRenderedATailFallback),\n (hasRenderedATailFallback = hasRenderedATailFallback.sibling);\n null === lastTailNode\n ? (renderState.tail = null)\n : (lastTailNode.sibling = null);\n break;\n case \"collapsed\":\n lastTailNode = renderState.tail;\n for (var lastTailNode$106 = null; null !== lastTailNode; )\n null !== lastTailNode.alternate && (lastTailNode$106 = lastTailNode),\n (lastTailNode = lastTailNode.sibling);\n null === lastTailNode$106\n ? hasRenderedATailFallback || null === renderState.tail\n ? (renderState.tail = null)\n : (renderState.tail.sibling = null)\n : (lastTailNode$106.sibling = null);\n }\n}\nfunction bubbleProperties(completedWork) {\n var didBailout =\n null !== completedWork.alternate &&\n completedWork.alternate.child === completedWork.child,\n newChildLanes = 0,\n subtreeFlags = 0;\n if (didBailout)\n for (var child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags & 65011712),\n (subtreeFlags |= child$107.flags & 65011712),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n else\n for (child$107 = completedWork.child; null !== child$107; )\n (newChildLanes |= child$107.lanes | child$107.childLanes),\n (subtreeFlags |= child$107.subtreeFlags),\n (subtreeFlags |= child$107.flags),\n (child$107.return = completedWork),\n (child$107 = child$107.sibling);\n completedWork.subtreeFlags |= subtreeFlags;\n completedWork.childLanes = newChildLanes;\n return didBailout;\n}\nfunction completeWork(current, workInProgress, renderLanes) {\n var newProps = workInProgress.pendingProps;\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 16:\n case 15:\n case 0:\n case 11:\n case 7:\n case 8:\n case 12:\n case 9:\n case 14:\n return bubbleProperties(workInProgress), null;\n case 1:\n return bubbleProperties(workInProgress), null;\n case 3:\n renderLanes = workInProgress.stateNode;\n newProps = null;\n null !== current && (newProps = current.memoizedState.cache);\n workInProgress.memoizedState.cache !== newProps &&\n (workInProgress.flags |= 2048);\n popProvider(CacheContext);\n popHostContainer();\n renderLanes.pendingContext &&\n ((renderLanes.context = renderLanes.pendingContext),\n (renderLanes.pendingContext = null));\n if (null === current || null === current.child)\n popHydrationState(workInProgress)\n ? markUpdate(workInProgress)\n : null === current ||\n (current.memoizedState.isDehydrated &&\n 0 === (workInProgress.flags & 256)) ||\n ((workInProgress.flags |= 1024),\n upgradeHydrationErrorsToRecoverable());\n bubbleProperties(workInProgress);\n return null;\n case 26:\n var type = workInProgress.type,\n nextResource = workInProgress.memoizedState;\n null === current\n ? (markUpdate(workInProgress),\n null !== nextResource\n ? (bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n null,\n newProps,\n renderLanes\n )))\n : nextResource\n ? nextResource !== current.memoizedState\n ? (markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadResourceAndSuspendIfNeeded(workInProgress, nextResource))\n : (bubbleProperties(workInProgress),\n (workInProgress.flags &= -16777217))\n : ((current = current.memoizedProps),\n current !== newProps && markUpdate(workInProgress),\n bubbleProperties(workInProgress),\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n type,\n current,\n newProps,\n renderLanes\n ));\n return null;\n case 27:\n popHostContext(workInProgress);\n renderLanes = rootInstanceStackCursor.current;\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n current = contextStackCursor.current;\n popHydrationState(workInProgress)\n ? prepareToHydrateHostInstance(workInProgress, current)\n : ((current = resolveSingletonInstance(type, newProps, renderLanes)),\n (workInProgress.stateNode = current),\n markUpdate(workInProgress));\n }\n bubbleProperties(workInProgress);\n return null;\n case 5:\n popHostContext(workInProgress);\n type = workInProgress.type;\n if (null !== current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (!newProps) {\n if (null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n bubbleProperties(workInProgress);\n return null;\n }\n nextResource = contextStackCursor.current;\n if (popHydrationState(workInProgress))\n prepareToHydrateHostInstance(workInProgress, nextResource);\n else {\n var ownerDocument = getOwnerDocumentFromRootContainer(\n rootInstanceStackCursor.current\n );\n switch (nextResource) {\n case 1:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case 2:\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n default:\n switch (type) {\n case \"svg\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/2000/svg\",\n type\n );\n break;\n case \"math\":\n nextResource = ownerDocument.createElementNS(\n \"http://www.w3.org/1998/Math/MathML\",\n type\n );\n break;\n case \"script\":\n nextResource = ownerDocument.createElement(\"div\");\n nextResource.innerHTML = \"<script>\\x3c/script>\";\n nextResource = nextResource.removeChild(\n nextResource.firstChild\n );\n break;\n case \"select\":\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(\"select\", {\n is: newProps.is\n })\n : ownerDocument.createElement(\"select\");\n newProps.multiple\n ? (nextResource.multiple = !0)\n : newProps.size && (nextResource.size = newProps.size);\n break;\n default:\n nextResource =\n \"string\" === typeof newProps.is\n ? ownerDocument.createElement(type, { is: newProps.is })\n : ownerDocument.createElement(type);\n }\n }\n nextResource[internalInstanceKey] = workInProgress;\n nextResource[internalPropsKey] = newProps;\n a: for (\n ownerDocument = workInProgress.child;\n null !== ownerDocument;\n\n ) {\n if (5 === ownerDocument.tag || 6 === ownerDocument.tag)\n nextResource.appendChild(ownerDocument.stateNode);\n else if (\n 4 !== ownerDocument.tag &&\n 27 !== ownerDocument.tag &&\n null !== ownerDocument.child\n ) {\n ownerDocument.child.return = ownerDocument;\n ownerDocument = ownerDocument.child;\n continue;\n }\n if (ownerDocument === workInProgress) break a;\n for (; null === ownerDocument.sibling; ) {\n if (\n null === ownerDocument.return ||\n ownerDocument.return === workInProgress\n )\n break a;\n ownerDocument = ownerDocument.return;\n }\n ownerDocument.sibling.return = ownerDocument.return;\n ownerDocument = ownerDocument.sibling;\n }\n workInProgress.stateNode = nextResource;\n a: switch (\n (setInitialProperties(nextResource, type, newProps), type)\n ) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n newProps = !!newProps.autoFocus;\n break a;\n case \"img\":\n newProps = !0;\n break a;\n default:\n newProps = !1;\n }\n newProps && markUpdate(workInProgress);\n }\n }\n bubbleProperties(workInProgress);\n preloadInstanceAndSuspendIfNeeded(\n workInProgress,\n workInProgress.type,\n null === current ? null : current.memoizedProps,\n workInProgress.pendingProps,\n renderLanes\n );\n return null;\n case 6:\n if (current && null != workInProgress.stateNode)\n current.memoizedProps !== newProps && markUpdate(workInProgress);\n else {\n if (\"string\" !== typeof newProps && null === workInProgress.stateNode)\n throw Error(formatProdErrorMessage(166));\n current = rootInstanceStackCursor.current;\n if (popHydrationState(workInProgress)) {\n current = workInProgress.stateNode;\n renderLanes = workInProgress.memoizedProps;\n newProps = null;\n type = hydrationParentFiber;\n if (null !== type)\n switch (type.tag) {\n case 27:\n case 5:\n newProps = type.memoizedProps;\n }\n current[internalInstanceKey] = workInProgress;\n current =\n current.nodeValue === renderLanes ||\n (null !== newProps && !0 === newProps.suppressHydrationWarning) ||\n checkForUnmatchedText(current.nodeValue, renderLanes)\n ? !0\n : !1;\n current || throwOnHydrationMismatch(workInProgress, !0);\n } else\n (current =\n getOwnerDocumentFromRootContainer(current).createTextNode(\n newProps\n )),\n (current[internalInstanceKey] = workInProgress),\n (workInProgress.stateNode = current);\n }\n bubbleProperties(workInProgress);\n return null;\n case 31:\n renderLanes = workInProgress.memoizedState;\n if (null === current || null !== current.memoizedState) {\n newProps = popHydrationState(workInProgress);\n if (null !== renderLanes) {\n if (null === current) {\n if (!newProps) throw Error(formatProdErrorMessage(318));\n current = workInProgress.memoizedState;\n current = null !== current ? current.dehydrated : null;\n if (!current) throw Error(formatProdErrorMessage(557));\n current[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n current = !1;\n } else\n (renderLanes = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = renderLanes),\n (current = !0);\n if (!current) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n if (0 !== (workInProgress.flags & 128))\n throw Error(formatProdErrorMessage(558));\n }\n bubbleProperties(workInProgress);\n return null;\n case 13:\n newProps = workInProgress.memoizedState;\n if (\n null === current ||\n (null !== current.memoizedState &&\n null !== current.memoizedState.dehydrated)\n ) {\n type = popHydrationState(workInProgress);\n if (null !== newProps && null !== newProps.dehydrated) {\n if (null === current) {\n if (!type) throw Error(formatProdErrorMessage(318));\n type = workInProgress.memoizedState;\n type = null !== type ? type.dehydrated : null;\n if (!type) throw Error(formatProdErrorMessage(317));\n type[internalInstanceKey] = workInProgress;\n } else\n resetHydrationState(),\n 0 === (workInProgress.flags & 128) &&\n (workInProgress.memoizedState = null),\n (workInProgress.flags |= 4);\n bubbleProperties(workInProgress);\n type = !1;\n } else\n (type = upgradeHydrationErrorsToRecoverable()),\n null !== current &&\n null !== current.memoizedState &&\n (current.memoizedState.hydrationErrors = type),\n (type = !0);\n if (!type) {\n if (workInProgress.flags & 256)\n return popSuspenseHandler(workInProgress), workInProgress;\n popSuspenseHandler(workInProgress);\n return null;\n }\n }\n popSuspenseHandler(workInProgress);\n if (0 !== (workInProgress.flags & 128))\n return (workInProgress.lanes = renderLanes), workInProgress;\n renderLanes = null !== newProps;\n current = null !== current && null !== current.memoizedState;\n renderLanes &&\n ((newProps = workInProgress.child),\n (type = null),\n null !== newProps.alternate &&\n null !== newProps.alternate.memoizedState &&\n null !== newProps.alternate.memoizedState.cachePool &&\n (type = newProps.alternate.memoizedState.cachePool.pool),\n (nextResource = null),\n null !== newProps.memoizedState &&\n null !== newProps.memoizedState.cachePool &&\n (nextResource = newProps.memoizedState.cachePool.pool),\n nextResource !== type && (newProps.flags |= 2048));\n renderLanes !== current &&\n renderLanes &&\n (workInProgress.child.flags |= 8192);\n scheduleRetryEffect(workInProgress, workInProgress.updateQueue);\n bubbleProperties(workInProgress);\n return null;\n case 4:\n return (\n popHostContainer(),\n null === current &&\n listenToAllSupportedEvents(workInProgress.stateNode.containerInfo),\n bubbleProperties(workInProgress),\n null\n );\n case 10:\n return (\n popProvider(workInProgress.type), bubbleProperties(workInProgress), null\n );\n case 19:\n pop(suspenseStackCursor);\n newProps = workInProgress.memoizedState;\n if (null === newProps) return bubbleProperties(workInProgress), null;\n type = 0 !== (workInProgress.flags & 128);\n nextResource = newProps.rendering;\n if (null === nextResource)\n if (type) cutOffTailIfNeeded(newProps, !1);\n else {\n if (\n 0 !== workInProgressRootExitStatus ||\n (null !== current && 0 !== (current.flags & 128))\n )\n for (current = workInProgress.child; null !== current; ) {\n nextResource = findFirstSuspended(current);\n if (null !== nextResource) {\n workInProgress.flags |= 128;\n cutOffTailIfNeeded(newProps, !1);\n current = nextResource.updateQueue;\n workInProgress.updateQueue = current;\n scheduleRetryEffect(workInProgress, current);\n workInProgress.subtreeFlags = 0;\n current = renderLanes;\n for (renderLanes = workInProgress.child; null !== renderLanes; )\n resetWorkInProgress(renderLanes, current),\n (renderLanes = renderLanes.sibling);\n push(\n suspenseStackCursor,\n (suspenseStackCursor.current & 1) | 2\n );\n isHydrating &&\n pushTreeFork(workInProgress, newProps.treeForkCount);\n return workInProgress.child;\n }\n current = current.sibling;\n }\n null !== newProps.tail &&\n now() > workInProgressRootRenderTargetTime &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n }\n else {\n if (!type)\n if (\n ((current = findFirstSuspended(nextResource)), null !== current)\n ) {\n if (\n ((workInProgress.flags |= 128),\n (type = !0),\n (current = current.updateQueue),\n (workInProgress.updateQueue = current),\n scheduleRetryEffect(workInProgress, current),\n cutOffTailIfNeeded(newProps, !0),\n null === newProps.tail &&\n \"hidden\" === newProps.tailMode &&\n !nextResource.alternate &&\n !isHydrating)\n )\n return bubbleProperties(workInProgress), null;\n } else\n 2 * now() - newProps.renderingStartTime >\n workInProgressRootRenderTargetTime &&\n 536870912 !== renderLanes &&\n ((workInProgress.flags |= 128),\n (type = !0),\n cutOffTailIfNeeded(newProps, !1),\n (workInProgress.lanes = 4194304));\n newProps.isBackwards\n ? ((nextResource.sibling = workInProgress.child),\n (workInProgress.child = nextResource))\n : ((current = newProps.last),\n null !== current\n ? (current.sibling = nextResource)\n : (workInProgress.child = nextResource),\n (newProps.last = nextResource));\n }\n if (null !== newProps.tail)\n return (\n (current = newProps.tail),\n (newProps.rendering = current),\n (newProps.tail = current.sibling),\n (newProps.renderingStartTime = now()),\n (current.sibling = null),\n (renderLanes = suspenseStackCursor.current),\n push(\n suspenseStackCursor,\n type ? (renderLanes & 1) | 2 : renderLanes & 1\n ),\n isHydrating && pushTreeFork(workInProgress, newProps.treeForkCount),\n current\n );\n bubbleProperties(workInProgress);\n return null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n (newProps = null !== workInProgress.memoizedState),\n null !== current\n ? (null !== current.memoizedState) !== newProps &&\n (workInProgress.flags |= 8192)\n : newProps && (workInProgress.flags |= 8192),\n newProps\n ? 0 !== (renderLanes & 536870912) &&\n 0 === (workInProgress.flags & 128) &&\n (bubbleProperties(workInProgress),\n workInProgress.subtreeFlags & 6 && (workInProgress.flags |= 8192))\n : bubbleProperties(workInProgress),\n (renderLanes = workInProgress.updateQueue),\n null !== renderLanes &&\n scheduleRetryEffect(workInProgress, renderLanes.retryQueue),\n (renderLanes = null),\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (renderLanes = current.memoizedState.cachePool.pool),\n (newProps = null),\n null !== workInProgress.memoizedState &&\n null !== workInProgress.memoizedState.cachePool &&\n (newProps = workInProgress.memoizedState.cachePool.pool),\n newProps !== renderLanes && (workInProgress.flags |= 2048),\n null !== current && pop(resumedCache),\n null\n );\n case 24:\n return (\n (renderLanes = null),\n null !== current && (renderLanes = current.memoizedState.cache),\n workInProgress.memoizedState.cache !== renderLanes &&\n (workInProgress.flags |= 2048),\n popProvider(CacheContext),\n bubbleProperties(workInProgress),\n null\n );\n case 25:\n return null;\n case 30:\n return null;\n }\n throw Error(formatProdErrorMessage(156, workInProgress.tag));\n}\nfunction unwindWork(current, workInProgress) {\n popTreeContext(workInProgress);\n switch (workInProgress.tag) {\n case 1:\n return (\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 3:\n return (\n popProvider(CacheContext),\n popHostContainer(),\n (current = workInProgress.flags),\n 0 !== (current & 65536) && 0 === (current & 128)\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 26:\n case 27:\n case 5:\n return popHostContext(workInProgress), null;\n case 31:\n if (null !== workInProgress.memoizedState) {\n popSuspenseHandler(workInProgress);\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 13:\n popSuspenseHandler(workInProgress);\n current = workInProgress.memoizedState;\n if (null !== current && null !== current.dehydrated) {\n if (null === workInProgress.alternate)\n throw Error(formatProdErrorMessage(340));\n resetHydrationState();\n }\n current = workInProgress.flags;\n return current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null;\n case 19:\n return pop(suspenseStackCursor), null;\n case 4:\n return popHostContainer(), null;\n case 10:\n return popProvider(workInProgress.type), null;\n case 22:\n case 23:\n return (\n popSuspenseHandler(workInProgress),\n popHiddenContext(),\n null !== current && pop(resumedCache),\n (current = workInProgress.flags),\n current & 65536\n ? ((workInProgress.flags = (current & -65537) | 128), workInProgress)\n : null\n );\n case 24:\n return popProvider(CacheContext), null;\n case 25:\n return null;\n default:\n return null;\n }\n}\nfunction unwindInterruptedWork(current, interruptedWork) {\n popTreeContext(interruptedWork);\n switch (interruptedWork.tag) {\n case 3:\n popProvider(CacheContext);\n popHostContainer();\n break;\n case 26:\n case 27:\n case 5:\n popHostContext(interruptedWork);\n break;\n case 4:\n popHostContainer();\n break;\n case 31:\n null !== interruptedWork.memoizedState &&\n popSuspenseHandler(interruptedWork);\n break;\n case 13:\n popSuspenseHandler(interruptedWork);\n break;\n case 19:\n pop(suspenseStackCursor);\n break;\n case 10:\n popProvider(interruptedWork.type);\n break;\n case 22:\n case 23:\n popSuspenseHandler(interruptedWork);\n popHiddenContext();\n null !== current && pop(resumedCache);\n break;\n case 24:\n popProvider(CacheContext);\n }\n}\nfunction commitHookEffectListMount(flags, finishedWork) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n lastEffect = void 0;\n var create = updateQueue.create,\n inst = updateQueue.inst;\n lastEffect = create();\n inst.destroy = lastEffect;\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHookEffectListUnmount(\n flags,\n finishedWork,\n nearestMountedAncestor$jscomp$0\n) {\n try {\n var updateQueue = finishedWork.updateQueue,\n lastEffect = null !== updateQueue ? updateQueue.lastEffect : null;\n if (null !== lastEffect) {\n var firstEffect = lastEffect.next;\n updateQueue = firstEffect;\n do {\n if ((updateQueue.tag & flags) === flags) {\n var inst = updateQueue.inst,\n destroy = inst.destroy;\n if (void 0 !== destroy) {\n inst.destroy = void 0;\n lastEffect = finishedWork;\n var nearestMountedAncestor = nearestMountedAncestor$jscomp$0,\n destroy_ = destroy;\n try {\n destroy_();\n } catch (error) {\n captureCommitPhaseError(\n lastEffect,\n nearestMountedAncestor,\n error\n );\n }\n }\n }\n updateQueue = updateQueue.next;\n } while (updateQueue !== firstEffect);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitClassCallbacks(finishedWork) {\n var updateQueue = finishedWork.updateQueue;\n if (null !== updateQueue) {\n var instance = finishedWork.stateNode;\n try {\n commitCallbacks(updateQueue, instance);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction safelyCallComponentWillUnmount(\n current,\n nearestMountedAncestor,\n instance\n) {\n instance.props = resolveClassComponentProps(\n current.type,\n current.memoizedProps\n );\n instance.state = current.memoizedState;\n try {\n instance.componentWillUnmount();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyAttachRef(current, nearestMountedAncestor) {\n try {\n var ref = current.ref;\n if (null !== ref) {\n switch (current.tag) {\n case 26:\n case 27:\n case 5:\n var instanceToUse = current.stateNode;\n break;\n case 30:\n instanceToUse = current.stateNode;\n break;\n default:\n instanceToUse = current.stateNode;\n }\n \"function\" === typeof ref\n ? (current.refCleanup = ref(instanceToUse))\n : (ref.current = instanceToUse);\n }\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n }\n}\nfunction safelyDetachRef(current, nearestMountedAncestor) {\n var ref = current.ref,\n refCleanup = current.refCleanup;\n if (null !== ref)\n if (\"function\" === typeof refCleanup)\n try {\n refCleanup();\n } catch (error) {\n captureCommitPhaseError(current, nearestMountedAncestor, error);\n } finally {\n (current.refCleanup = null),\n (current = current.alternate),\n null != current && (current.refCleanup = null);\n }\n else if (\"function\" === typeof ref)\n try {\n ref(null);\n } catch (error$140) {\n captureCommitPhaseError(current, nearestMountedAncestor, error$140);\n }\n else ref.current = null;\n}\nfunction commitHostMount(finishedWork) {\n var type = finishedWork.type,\n props = finishedWork.memoizedProps,\n instance = finishedWork.stateNode;\n try {\n a: switch (type) {\n case \"button\":\n case \"input\":\n case \"select\":\n case \"textarea\":\n props.autoFocus && instance.focus();\n break a;\n case \"img\":\n props.src\n ? (instance.src = props.src)\n : props.srcSet && (instance.srcset = props.srcSet);\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction commitHostUpdate(finishedWork, newProps, oldProps) {\n try {\n var domElement = finishedWork.stateNode;\n updateProperties(domElement, finishedWork.type, oldProps, newProps);\n domElement[internalPropsKey] = newProps;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction isHostParent(fiber) {\n return (\n 5 === fiber.tag ||\n 3 === fiber.tag ||\n 26 === fiber.tag ||\n (27 === fiber.tag && isSingletonScope(fiber.type)) ||\n 4 === fiber.tag\n );\n}\nfunction getHostSibling(fiber) {\n a: for (;;) {\n for (; null === fiber.sibling; ) {\n if (null === fiber.return || isHostParent(fiber.return)) return null;\n fiber = fiber.return;\n }\n fiber.sibling.return = fiber.return;\n for (\n fiber = fiber.sibling;\n 5 !== fiber.tag && 6 !== fiber.tag && 18 !== fiber.tag;\n\n ) {\n if (27 === fiber.tag && isSingletonScope(fiber.type)) continue a;\n if (fiber.flags & 2) continue a;\n if (null === fiber.child || 4 === fiber.tag) continue a;\n else (fiber.child.return = fiber), (fiber = fiber.child);\n }\n if (!(fiber.flags & 2)) return fiber.stateNode;\n }\n}\nfunction insertOrAppendPlacementNodeIntoContainer(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before\n ? (9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent\n ).insertBefore(node, before)\n : ((before =\n 9 === parent.nodeType\n ? parent.body\n : \"HTML\" === parent.nodeName\n ? parent.ownerDocument.body\n : parent),\n before.appendChild(node),\n (parent = parent._reactRootContainer),\n (null !== parent && void 0 !== parent) ||\n null !== before.onclick ||\n (before.onclick = noop$1));\n else if (\n 4 !== tag &&\n (27 === tag &&\n isSingletonScope(node.type) &&\n ((parent = node.stateNode), (before = null)),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNodeIntoContainer(node, before, parent),\n (node = node.sibling);\n}\nfunction insertOrAppendPlacementNode(node, before, parent) {\n var tag = node.tag;\n if (5 === tag || 6 === tag)\n (node = node.stateNode),\n before ? parent.insertBefore(node, before) : parent.appendChild(node);\n else if (\n 4 !== tag &&\n (27 === tag && isSingletonScope(node.type) && (parent = node.stateNode),\n (node = node.child),\n null !== node)\n )\n for (\n insertOrAppendPlacementNode(node, before, parent), node = node.sibling;\n null !== node;\n\n )\n insertOrAppendPlacementNode(node, before, parent), (node = node.sibling);\n}\nfunction commitHostSingletonAcquisition(finishedWork) {\n var singleton = finishedWork.stateNode,\n props = finishedWork.memoizedProps;\n try {\n for (\n var type = finishedWork.type, attributes = singleton.attributes;\n attributes.length;\n\n )\n singleton.removeAttributeNode(attributes[0]);\n setInitialProperties(singleton, type, props);\n singleton[internalInstanceKey] = finishedWork;\n singleton[internalPropsKey] = props;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nvar offscreenSubtreeIsHidden = !1,\n offscreenSubtreeWasHidden = !1,\n needsFormReset = !1,\n PossiblyWeakSet = \"function\" === typeof WeakSet ? WeakSet : Set,\n nextEffect = null;\nfunction commitBeforeMutationEffects(root, firstChild) {\n root = root.containerInfo;\n eventsEnabled = _enabled;\n root = getActiveElementDeep(root);\n if (hasSelectionCapabilities(root)) {\n if (\"selectionStart\" in root)\n var JSCompiler_temp = {\n start: root.selectionStart,\n end: root.selectionEnd\n };\n else\n a: {\n JSCompiler_temp =\n ((JSCompiler_temp = root.ownerDocument) &&\n JSCompiler_temp.defaultView) ||\n window;\n var selection =\n JSCompiler_temp.getSelection && JSCompiler_temp.getSelection();\n if (selection && 0 !== selection.rangeCount) {\n JSCompiler_temp = selection.anchorNode;\n var anchorOffset = selection.anchorOffset,\n focusNode = selection.focusNode;\n selection = selection.focusOffset;\n try {\n JSCompiler_temp.nodeType, focusNode.nodeType;\n } catch (e$20) {\n JSCompiler_temp = null;\n break a;\n }\n var length = 0,\n start = -1,\n end = -1,\n indexWithinAnchor = 0,\n indexWithinFocus = 0,\n node = root,\n parentNode = null;\n b: for (;;) {\n for (var next; ; ) {\n node !== JSCompiler_temp ||\n (0 !== anchorOffset && 3 !== node.nodeType) ||\n (start = length + anchorOffset);\n node !== focusNode ||\n (0 !== selection && 3 !== node.nodeType) ||\n (end = length + selection);\n 3 === node.nodeType && (length += node.nodeValue.length);\n if (null === (next = node.firstChild)) break;\n parentNode = node;\n node = next;\n }\n for (;;) {\n if (node === root) break b;\n parentNode === JSCompiler_temp &&\n ++indexWithinAnchor === anchorOffset &&\n (start = length);\n parentNode === focusNode &&\n ++indexWithinFocus === selection &&\n (end = length);\n if (null !== (next = node.nextSibling)) break;\n node = parentNode;\n parentNode = node.parentNode;\n }\n node = next;\n }\n JSCompiler_temp =\n -1 === start || -1 === end ? null : { start: start, end: end };\n } else JSCompiler_temp = null;\n }\n JSCompiler_temp = JSCompiler_temp || { start: 0, end: 0 };\n } else JSCompiler_temp = null;\n selectionInformation = { focusedElem: root, selectionRange: JSCompiler_temp };\n _enabled = !1;\n for (nextEffect = firstChild; null !== nextEffect; )\n if (\n ((firstChild = nextEffect),\n (root = firstChild.child),\n 0 !== (firstChild.subtreeFlags & 1028) && null !== root)\n )\n (root.return = firstChild), (nextEffect = root);\n else\n for (; null !== nextEffect; ) {\n firstChild = nextEffect;\n focusNode = firstChild.alternate;\n root = firstChild.flags;\n switch (firstChild.tag) {\n case 0:\n if (\n 0 !== (root & 4) &&\n ((root = firstChild.updateQueue),\n (root = null !== root ? root.events : null),\n null !== root)\n )\n for (\n JSCompiler_temp = 0;\n JSCompiler_temp < root.length;\n JSCompiler_temp++\n )\n (anchorOffset = root[JSCompiler_temp]),\n (anchorOffset.ref.impl = anchorOffset.nextImpl);\n break;\n case 11:\n case 15:\n break;\n case 1:\n if (0 !== (root & 1024) && null !== focusNode) {\n root = void 0;\n JSCompiler_temp = firstChild;\n anchorOffset = focusNode.memoizedProps;\n focusNode = focusNode.memoizedState;\n selection = JSCompiler_temp.stateNode;\n try {\n var resolvedPrevProps = resolveClassComponentProps(\n JSCompiler_temp.type,\n anchorOffset\n );\n root = selection.getSnapshotBeforeUpdate(\n resolvedPrevProps,\n focusNode\n );\n selection.__reactInternalSnapshotBeforeUpdate = root;\n } catch (error) {\n captureCommitPhaseError(\n JSCompiler_temp,\n JSCompiler_temp.return,\n error\n );\n }\n }\n break;\n case 3:\n if (0 !== (root & 1024))\n if (\n ((root = firstChild.stateNode.containerInfo),\n (JSCompiler_temp = root.nodeType),\n 9 === JSCompiler_temp)\n )\n clearContainerSparingly(root);\n else if (1 === JSCompiler_temp)\n switch (root.nodeName) {\n case \"HEAD\":\n case \"HTML\":\n case \"BODY\":\n clearContainerSparingly(root);\n break;\n default:\n root.textContent = \"\";\n }\n break;\n case 5:\n case 26:\n case 27:\n case 6:\n case 4:\n case 17:\n break;\n default:\n if (0 !== (root & 1024)) throw Error(formatProdErrorMessage(163));\n }\n root = firstChild.sibling;\n if (null !== root) {\n root.return = firstChild.return;\n nextEffect = root;\n break;\n }\n nextEffect = firstChild.return;\n }\n}\nfunction commitLayoutEffectOnFiber(finishedRoot, current, finishedWork) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitHookEffectListMount(5, finishedWork);\n break;\n case 1:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (flags & 4)\n if (((finishedRoot = finishedWork.stateNode), null === current))\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n else {\n var prevProps = resolveClassComponentProps(\n finishedWork.type,\n current.memoizedProps\n );\n current = current.memoizedState;\n try {\n finishedRoot.componentDidUpdate(\n prevProps,\n current,\n finishedRoot.__reactInternalSnapshotBeforeUpdate\n );\n } catch (error$139) {\n captureCommitPhaseError(\n finishedWork,\n finishedWork.return,\n error$139\n );\n }\n }\n flags & 64 && commitClassCallbacks(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n if (\n flags & 64 &&\n ((finishedRoot = finishedWork.updateQueue), null !== finishedRoot)\n ) {\n current = null;\n if (null !== finishedWork.child)\n switch (finishedWork.child.tag) {\n case 27:\n case 5:\n current = finishedWork.child.stateNode;\n break;\n case 1:\n current = finishedWork.child.stateNode;\n }\n try {\n commitCallbacks(finishedRoot, current);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 27:\n null === current &&\n flags & 4 &&\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n null === current && flags & 4 && commitHostMount(finishedWork);\n flags & 512 && safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n break;\n case 31:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n flags & 4 && commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n flags & 64 &&\n ((finishedRoot = finishedWork.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated),\n null !== finishedRoot &&\n ((finishedWork = retryDehydratedSuspenseBoundary.bind(\n null,\n finishedWork\n )),\n registerSuspenseInstanceRetry(finishedRoot, finishedWork))));\n break;\n case 22:\n flags = null !== finishedWork.memoizedState || offscreenSubtreeIsHidden;\n if (!flags) {\n current =\n (null !== current && null !== current.memoizedState) ||\n offscreenSubtreeWasHidden;\n prevProps = offscreenSubtreeIsHidden;\n var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = flags;\n (offscreenSubtreeWasHidden = current) && !prevOffscreenSubtreeWasHidden\n ? recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n 0 !== (finishedWork.subtreeFlags & 8772)\n )\n : recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n offscreenSubtreeIsHidden = prevProps;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n }\n break;\n case 30:\n break;\n default:\n recursivelyTraverseLayoutEffects(finishedRoot, finishedWork);\n }\n}\nfunction detachFiberAfterEffects(fiber) {\n var alternate = fiber.alternate;\n null !== alternate &&\n ((fiber.alternate = null), detachFiberAfterEffects(alternate));\n fiber.child = null;\n fiber.deletions = null;\n fiber.sibling = null;\n 5 === fiber.tag &&\n ((alternate = fiber.stateNode),\n null !== alternate && detachDeletedInstance(alternate));\n fiber.stateNode = null;\n fiber.return = null;\n fiber.dependencies = null;\n fiber.memoizedProps = null;\n fiber.memoizedState = null;\n fiber.pendingProps = null;\n fiber.stateNode = null;\n fiber.updateQueue = null;\n}\nvar hostParent = null,\n hostParentIsContainer = !1;\nfunction recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n parent\n) {\n for (parent = parent.child; null !== parent; )\n commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, parent),\n (parent = parent.sibling);\n}\nfunction commitDeletionEffectsOnFiber(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n) {\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberUnmount)\n try {\n injectedHook.onCommitFiberUnmount(rendererID, deletedFiber);\n } catch (err) {}\n switch (deletedFiber.tag) {\n case 26:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n deletedFiber.memoizedState\n ? deletedFiber.memoizedState.count--\n : deletedFiber.stateNode &&\n ((deletedFiber = deletedFiber.stateNode),\n deletedFiber.parentNode.removeChild(deletedFiber));\n break;\n case 27:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n var prevHostParent = hostParent,\n prevHostParentIsContainer = hostParentIsContainer;\n isSingletonScope(deletedFiber.type) &&\n ((hostParent = deletedFiber.stateNode), (hostParentIsContainer = !1));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n releaseSingletonInstance(deletedFiber.stateNode);\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 5:\n offscreenSubtreeWasHidden ||\n safelyDetachRef(deletedFiber, nearestMountedAncestor);\n case 6:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = null;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n if (null !== hostParent)\n if (hostParentIsContainer)\n try {\n (9 === hostParent.nodeType\n ? hostParent.body\n : \"HTML\" === hostParent.nodeName\n ? hostParent.ownerDocument.body\n : hostParent\n ).removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n else\n try {\n hostParent.removeChild(deletedFiber.stateNode);\n } catch (error) {\n captureCommitPhaseError(\n deletedFiber,\n nearestMountedAncestor,\n error\n );\n }\n break;\n case 18:\n null !== hostParent &&\n (hostParentIsContainer\n ? ((finishedRoot = hostParent),\n clearHydrationBoundary(\n 9 === finishedRoot.nodeType\n ? finishedRoot.body\n : \"HTML\" === finishedRoot.nodeName\n ? finishedRoot.ownerDocument.body\n : finishedRoot,\n deletedFiber.stateNode\n ),\n retryIfBlockedOn(finishedRoot))\n : clearHydrationBoundary(hostParent, deletedFiber.stateNode));\n break;\n case 4:\n prevHostParent = hostParent;\n prevHostParentIsContainer = hostParentIsContainer;\n hostParent = deletedFiber.stateNode.containerInfo;\n hostParentIsContainer = !0;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n hostParent = prevHostParent;\n hostParentIsContainer = prevHostParentIsContainer;\n break;\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(2, deletedFiber, nearestMountedAncestor);\n offscreenSubtreeWasHidden ||\n commitHookEffectListUnmount(4, deletedFiber, nearestMountedAncestor);\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 1:\n offscreenSubtreeWasHidden ||\n (safelyDetachRef(deletedFiber, nearestMountedAncestor),\n (prevHostParent = deletedFiber.stateNode),\n \"function\" === typeof prevHostParent.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n deletedFiber,\n nearestMountedAncestor,\n prevHostParent\n ));\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 21:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n break;\n case 22:\n offscreenSubtreeWasHidden =\n (prevHostParent = offscreenSubtreeWasHidden) ||\n null !== deletedFiber.memoizedState;\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n offscreenSubtreeWasHidden = prevHostParent;\n break;\n default:\n recursivelyTraverseDeletionEffects(\n finishedRoot,\n nearestMountedAncestor,\n deletedFiber\n );\n }\n}\nfunction commitActivityHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState), null !== finishedRoot))\n ) {\n finishedRoot = finishedRoot.dehydrated;\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n}\nfunction commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {\n if (\n null === finishedWork.memoizedState &&\n ((finishedRoot = finishedWork.alternate),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.memoizedState),\n null !== finishedRoot &&\n ((finishedRoot = finishedRoot.dehydrated), null !== finishedRoot)))\n )\n try {\n retryIfBlockedOn(finishedRoot);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n}\nfunction getRetryCache(finishedWork) {\n switch (finishedWork.tag) {\n case 31:\n case 13:\n case 19:\n var retryCache = finishedWork.stateNode;\n null === retryCache &&\n (retryCache = finishedWork.stateNode = new PossiblyWeakSet());\n return retryCache;\n case 22:\n return (\n (finishedWork = finishedWork.stateNode),\n (retryCache = finishedWork._retryCache),\n null === retryCache &&\n (retryCache = finishedWork._retryCache = new PossiblyWeakSet()),\n retryCache\n );\n default:\n throw Error(formatProdErrorMessage(435, finishedWork.tag));\n }\n}\nfunction attachSuspenseRetryListeners(finishedWork, wakeables) {\n var retryCache = getRetryCache(finishedWork);\n wakeables.forEach(function (wakeable) {\n if (!retryCache.has(wakeable)) {\n retryCache.add(wakeable);\n var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);\n wakeable.then(retry, retry);\n }\n });\n}\nfunction recursivelyTraverseMutationEffects(root$jscomp$0, parentFiber) {\n var deletions = parentFiber.deletions;\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i],\n root = root$jscomp$0,\n returnFiber = parentFiber,\n parent = returnFiber;\n a: for (; null !== parent; ) {\n switch (parent.tag) {\n case 27:\n if (isSingletonScope(parent.type)) {\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n }\n break;\n case 5:\n hostParent = parent.stateNode;\n hostParentIsContainer = !1;\n break a;\n case 3:\n case 4:\n hostParent = parent.stateNode.containerInfo;\n hostParentIsContainer = !0;\n break a;\n }\n parent = parent.return;\n }\n if (null === hostParent) throw Error(formatProdErrorMessage(160));\n commitDeletionEffectsOnFiber(root, returnFiber, childToDelete);\n hostParent = null;\n hostParentIsContainer = !1;\n root = childToDelete.alternate;\n null !== root && (root.return = null);\n childToDelete.return = null;\n }\n if (parentFiber.subtreeFlags & 13886)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitMutationEffectsOnFiber(parentFiber, root$jscomp$0),\n (parentFiber = parentFiber.sibling);\n}\nvar currentHoistableRoot = null;\nfunction commitMutationEffectsOnFiber(finishedWork, root) {\n var current = finishedWork.alternate,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n (commitHookEffectListUnmount(3, finishedWork, finishedWork.return),\n commitHookEffectListMount(3, finishedWork),\n commitHookEffectListUnmount(5, finishedWork, finishedWork.return));\n break;\n case 1:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n flags & 64 &&\n offscreenSubtreeIsHidden &&\n ((finishedWork = finishedWork.updateQueue),\n null !== finishedWork &&\n ((flags = finishedWork.callbacks),\n null !== flags &&\n ((current = finishedWork.shared.hiddenCallbacks),\n (finishedWork.shared.hiddenCallbacks =\n null === current ? flags : current.concat(flags)))));\n break;\n case 26:\n var hoistableRoot = currentHoistableRoot;\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (flags & 4) {\n var currentResource = null !== current ? current.memoizedState : null;\n flags = finishedWork.memoizedState;\n if (null === current)\n if (null === flags)\n if (null === finishedWork.stateNode) {\n a: {\n flags = finishedWork.type;\n current = finishedWork.memoizedProps;\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n b: switch (flags) {\n case \"title\":\n currentResource =\n hoistableRoot.getElementsByTagName(\"title\")[0];\n if (\n !currentResource ||\n currentResource[internalHoistableMarker] ||\n currentResource[internalInstanceKey] ||\n \"http://www.w3.org/2000/svg\" ===\n currentResource.namespaceURI ||\n currentResource.hasAttribute(\"itemprop\")\n )\n (currentResource = hoistableRoot.createElement(flags)),\n hoistableRoot.head.insertBefore(\n currentResource,\n hoistableRoot.querySelector(\"head > title\")\n );\n setInitialProperties(currentResource, flags, current);\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n break a;\n case \"link\":\n var maybeNodes = getHydratableHoistableCache(\n \"link\",\n \"href\",\n hoistableRoot\n ).get(flags + (current.href || \"\"));\n if (maybeNodes)\n for (var i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"href\") ===\n (null == current.href || \"\" === current.href\n ? null\n : current.href) &&\n currentResource.getAttribute(\"rel\") ===\n (null == current.rel ? null : current.rel) &&\n currentResource.getAttribute(\"title\") ===\n (null == current.title ? null : current.title) &&\n currentResource.getAttribute(\"crossorigin\") ===\n (null == current.crossOrigin\n ? null\n : current.crossOrigin))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n case \"meta\":\n if (\n (maybeNodes = getHydratableHoistableCache(\n \"meta\",\n \"content\",\n hoistableRoot\n ).get(flags + (current.content || \"\")))\n )\n for (i = 0; i < maybeNodes.length; i++)\n if (\n ((currentResource = maybeNodes[i]),\n currentResource.getAttribute(\"content\") ===\n (null == current.content\n ? null\n : \"\" + current.content) &&\n currentResource.getAttribute(\"name\") ===\n (null == current.name ? null : current.name) &&\n currentResource.getAttribute(\"property\") ===\n (null == current.property\n ? null\n : current.property) &&\n currentResource.getAttribute(\"http-equiv\") ===\n (null == current.httpEquiv\n ? null\n : current.httpEquiv) &&\n currentResource.getAttribute(\"charset\") ===\n (null == current.charSet\n ? null\n : current.charSet))\n ) {\n maybeNodes.splice(i, 1);\n break b;\n }\n currentResource = hoistableRoot.createElement(flags);\n setInitialProperties(currentResource, flags, current);\n hoistableRoot.head.appendChild(currentResource);\n break;\n default:\n throw Error(formatProdErrorMessage(468, flags));\n }\n currentResource[internalInstanceKey] = finishedWork;\n markNodeAsHoistable(currentResource);\n flags = currentResource;\n }\n finishedWork.stateNode = flags;\n } else\n mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n );\n else\n finishedWork.stateNode = acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n );\n else\n currentResource !== flags\n ? (null === currentResource\n ? null !== current.stateNode &&\n ((current = current.stateNode),\n current.parentNode.removeChild(current))\n : currentResource.count--,\n null === flags\n ? mountHoistable(\n hoistableRoot,\n finishedWork.type,\n finishedWork.stateNode\n )\n : acquireResource(\n hoistableRoot,\n flags,\n finishedWork.memoizedProps\n ))\n : null === flags &&\n null !== finishedWork.stateNode &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n }\n break;\n case 27:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n null !== current &&\n flags & 4 &&\n commitHostUpdate(\n finishedWork,\n finishedWork.memoizedProps,\n current.memoizedProps\n );\n break;\n case 5:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 512 &&\n (offscreenSubtreeWasHidden ||\n null === current ||\n safelyDetachRef(current, current.return));\n if (finishedWork.flags & 32) {\n hoistableRoot = finishedWork.stateNode;\n try {\n setTextContent(hoistableRoot, \"\");\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n flags & 4 &&\n null != finishedWork.stateNode &&\n ((hoistableRoot = finishedWork.memoizedProps),\n commitHostUpdate(\n finishedWork,\n hoistableRoot,\n null !== current ? current.memoizedProps : hoistableRoot\n ));\n flags & 1024 && (needsFormReset = !0);\n break;\n case 6:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n if (flags & 4) {\n if (null === finishedWork.stateNode)\n throw Error(formatProdErrorMessage(162));\n flags = finishedWork.memoizedProps;\n current = finishedWork.stateNode;\n try {\n current.nodeValue = flags;\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n }\n break;\n case 3:\n tagCaches = null;\n hoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(root.containerInfo);\n recursivelyTraverseMutationEffects(root, finishedWork);\n currentHoistableRoot = hoistableRoot;\n commitReconciliationEffects(finishedWork);\n if (flags & 4 && null !== current && current.memoizedState.isDehydrated)\n try {\n retryIfBlockedOn(root.containerInfo);\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n needsFormReset &&\n ((needsFormReset = !1), recursivelyResetForms(finishedWork));\n break;\n case 4:\n flags = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(\n finishedWork.stateNode.containerInfo\n );\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n currentHoistableRoot = flags;\n break;\n case 12:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n break;\n case 31:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 13:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n finishedWork.child.flags & 8192 &&\n (null !== finishedWork.memoizedState) !==\n (null !== current && null !== current.memoizedState) &&\n (globalMostRecentFallbackTime = now());\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 22:\n hoistableRoot = null !== finishedWork.memoizedState;\n var wasHidden = null !== current && null !== current.memoizedState,\n prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden,\n prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden || hoistableRoot;\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || wasHidden;\n recursivelyTraverseMutationEffects(root, finishedWork);\n offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;\n offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;\n commitReconciliationEffects(finishedWork);\n if (flags & 8192)\n a: for (\n root = finishedWork.stateNode,\n root._visibility = hoistableRoot\n ? root._visibility & -2\n : root._visibility | 1,\n hoistableRoot &&\n (null === current ||\n wasHidden ||\n offscreenSubtreeIsHidden ||\n offscreenSubtreeWasHidden ||\n recursivelyTraverseDisappearLayoutEffects(finishedWork)),\n current = null,\n root = finishedWork;\n ;\n\n ) {\n if (5 === root.tag || 26 === root.tag) {\n if (null === current) {\n wasHidden = current = root;\n try {\n if (((currentResource = wasHidden.stateNode), hoistableRoot))\n (maybeNodes = currentResource.style),\n \"function\" === typeof maybeNodes.setProperty\n ? maybeNodes.setProperty(\"display\", \"none\", \"important\")\n : (maybeNodes.display = \"none\");\n else {\n i = wasHidden.stateNode;\n var styleProp = wasHidden.memoizedProps.style,\n display =\n void 0 !== styleProp &&\n null !== styleProp &&\n styleProp.hasOwnProperty(\"display\")\n ? styleProp.display\n : null;\n i.style.display =\n null == display || \"boolean\" === typeof display\n ? \"\"\n : (\"\" + display).trim();\n }\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (6 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n wasHidden.stateNode.nodeValue = hoistableRoot\n ? \"\"\n : wasHidden.memoizedProps;\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (18 === root.tag) {\n if (null === current) {\n wasHidden = root;\n try {\n var instance = wasHidden.stateNode;\n hoistableRoot\n ? hideOrUnhideDehydratedBoundary(instance, !0)\n : hideOrUnhideDehydratedBoundary(wasHidden.stateNode, !1);\n } catch (error) {\n captureCommitPhaseError(wasHidden, wasHidden.return, error);\n }\n }\n } else if (\n ((22 !== root.tag && 23 !== root.tag) ||\n null === root.memoizedState ||\n root === finishedWork) &&\n null !== root.child\n ) {\n root.child.return = root;\n root = root.child;\n continue;\n }\n if (root === finishedWork) break a;\n for (; null === root.sibling; ) {\n if (null === root.return || root.return === finishedWork) break a;\n current === root && (current = null);\n root = root.return;\n }\n current === root && (current = null);\n root.sibling.return = root.return;\n root = root.sibling;\n }\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((current = flags.retryQueue),\n null !== current &&\n ((flags.retryQueue = null),\n attachSuspenseRetryListeners(finishedWork, current))));\n break;\n case 19:\n recursivelyTraverseMutationEffects(root, finishedWork);\n commitReconciliationEffects(finishedWork);\n flags & 4 &&\n ((flags = finishedWork.updateQueue),\n null !== flags &&\n ((finishedWork.updateQueue = null),\n attachSuspenseRetryListeners(finishedWork, flags)));\n break;\n case 30:\n break;\n case 21:\n break;\n default:\n recursivelyTraverseMutationEffects(root, finishedWork),\n commitReconciliationEffects(finishedWork);\n }\n}\nfunction commitReconciliationEffects(finishedWork) {\n var flags = finishedWork.flags;\n if (flags & 2) {\n try {\n for (\n var hostParentFiber, parentFiber = finishedWork.return;\n null !== parentFiber;\n\n ) {\n if (isHostParent(parentFiber)) {\n hostParentFiber = parentFiber;\n break;\n }\n parentFiber = parentFiber.return;\n }\n if (null == hostParentFiber) throw Error(formatProdErrorMessage(160));\n switch (hostParentFiber.tag) {\n case 27:\n var parent = hostParentFiber.stateNode,\n before = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before, parent);\n break;\n case 5:\n var parent$141 = hostParentFiber.stateNode;\n hostParentFiber.flags & 32 &&\n (setTextContent(parent$141, \"\"), (hostParentFiber.flags &= -33));\n var before$142 = getHostSibling(finishedWork);\n insertOrAppendPlacementNode(finishedWork, before$142, parent$141);\n break;\n case 3:\n case 4:\n var parent$143 = hostParentFiber.stateNode.containerInfo,\n before$144 = getHostSibling(finishedWork);\n insertOrAppendPlacementNodeIntoContainer(\n finishedWork,\n before$144,\n parent$143\n );\n break;\n default:\n throw Error(formatProdErrorMessage(161));\n }\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n finishedWork.flags &= -3;\n }\n flags & 4096 && (finishedWork.flags &= -4097);\n}\nfunction recursivelyResetForms(parentFiber) {\n if (parentFiber.subtreeFlags & 1024)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var fiber = parentFiber;\n recursivelyResetForms(fiber);\n 5 === fiber.tag && fiber.flags & 1024 && fiber.stateNode.reset();\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseLayoutEffects(root, parentFiber) {\n if (parentFiber.subtreeFlags & 8772)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitLayoutEffectOnFiber(root, parentFiber.alternate, parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction recursivelyTraverseDisappearLayoutEffects(parentFiber) {\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedWork = parentFiber;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 14:\n case 15:\n commitHookEffectListUnmount(4, finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 1:\n safelyDetachRef(finishedWork, finishedWork.return);\n var instance = finishedWork.stateNode;\n \"function\" === typeof instance.componentWillUnmount &&\n safelyCallComponentWillUnmount(\n finishedWork,\n finishedWork.return,\n instance\n );\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 27:\n releaseSingletonInstance(finishedWork.stateNode);\n case 26:\n case 5:\n safelyDetachRef(finishedWork, finishedWork.return);\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n case 30:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n break;\n default:\n recursivelyTraverseDisappearLayoutEffects(finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseReappearLayoutEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects && 0 !== (parentFiber.subtreeFlags & 8772);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var current = parentFiber.alternate,\n finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(4, finishedWork);\n break;\n case 1:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n current = finishedWork;\n finishedRoot = current.stateNode;\n if (\"function\" === typeof finishedRoot.componentDidMount)\n try {\n finishedRoot.componentDidMount();\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n current = finishedWork;\n finishedRoot = current.updateQueue;\n if (null !== finishedRoot) {\n var instance = current.stateNode;\n try {\n var hiddenCallbacks = finishedRoot.shared.hiddenCallbacks;\n if (null !== hiddenCallbacks)\n for (\n finishedRoot.shared.hiddenCallbacks = null, finishedRoot = 0;\n finishedRoot < hiddenCallbacks.length;\n finishedRoot++\n )\n callCallback(hiddenCallbacks[finishedRoot], instance);\n } catch (error) {\n captureCommitPhaseError(current, current.return, error);\n }\n }\n includeWorkInProgressEffects &&\n flags & 64 &&\n commitClassCallbacks(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 27:\n commitHostSingletonAcquisition(finishedWork);\n case 26:\n case 5:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n null === current &&\n flags & 4 &&\n commitHostMount(finishedWork);\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 12:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n break;\n case 31:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitActivityHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 13:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 4 &&\n commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);\n break;\n case 22:\n null === finishedWork.memoizedState &&\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n safelyAttachRef(finishedWork, finishedWork.return);\n break;\n case 30:\n break;\n default:\n recursivelyTraverseReappearLayoutEffects(\n finishedRoot,\n finishedWork,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitOffscreenPassiveMountEffects(current, finishedWork) {\n var previousCache = null;\n null !== current &&\n null !== current.memoizedState &&\n null !== current.memoizedState.cachePool &&\n (previousCache = current.memoizedState.cachePool.pool);\n current = null;\n null !== finishedWork.memoizedState &&\n null !== finishedWork.memoizedState.cachePool &&\n (current = finishedWork.memoizedState.cachePool.pool);\n current !== previousCache &&\n (null != current && current.refCount++,\n null != previousCache && releaseCache(previousCache));\n}\nfunction commitCachePassiveMountEffect(current, finishedWork) {\n current = null;\n null !== finishedWork.alternate &&\n (current = finishedWork.alternate.memoizedState.cache);\n finishedWork = finishedWork.memoizedState.cache;\n finishedWork !== current &&\n (finishedWork.refCount++, null != current && releaseCache(current));\n}\nfunction recursivelyTraversePassiveMountEffects(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveMountOnFiber(\n root,\n parentFiber,\n committedLanes,\n committedTransitions\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveMountOnFiber(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n) {\n var flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 && commitHookEffectListMount(9, finishedWork);\n break;\n case 1:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 3:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n ((finishedRoot = null),\n null !== finishedWork.alternate &&\n (finishedRoot = finishedWork.alternate.memoizedState.cache),\n (finishedWork = finishedWork.memoizedState.cache),\n finishedWork !== finishedRoot &&\n (finishedWork.refCount++,\n null != finishedRoot && releaseCache(finishedRoot)));\n break;\n case 12:\n if (flags & 2048) {\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n finishedRoot = finishedWork.stateNode;\n try {\n var _finishedWork$memoize2 = finishedWork.memoizedProps,\n id = _finishedWork$memoize2.id,\n onPostCommit = _finishedWork$memoize2.onPostCommit;\n \"function\" === typeof onPostCommit &&\n onPostCommit(\n id,\n null === finishedWork.alternate ? \"mount\" : \"update\",\n finishedRoot.passiveEffectDuration,\n -0\n );\n } catch (error) {\n captureCommitPhaseError(finishedWork, finishedWork.return, error);\n }\n } else\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 31:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 13:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n break;\n case 23:\n break;\n case 22:\n _finishedWork$memoize2 = finishedWork.stateNode;\n id = finishedWork.alternate;\n null !== finishedWork.memoizedState\n ? _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork)\n : _finishedWork$memoize2._visibility & 2\n ? recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n )\n : ((_finishedWork$memoize2._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n 0 !== (finishedWork.subtreeFlags & 10256) || !1\n ));\n flags & 2048 && commitOffscreenPassiveMountEffects(id, finishedWork);\n break;\n case 24:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraversePassiveMountEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions\n );\n }\n}\nfunction recursivelyTraverseReconnectPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber,\n committedLanes$jscomp$0,\n committedTransitions$jscomp$0,\n includeWorkInProgressEffects\n) {\n includeWorkInProgressEffects =\n includeWorkInProgressEffects &&\n (0 !== (parentFiber.subtreeFlags & 10256) || !1);\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n committedLanes = committedLanes$jscomp$0,\n committedTransitions = committedTransitions$jscomp$0,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n commitHookEffectListMount(8, finishedWork);\n break;\n case 23:\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState\n ? instance._visibility & 2\n ? recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n )\n : recursivelyTraverseAtomicPassiveEffects(\n finishedRoot,\n finishedWork\n )\n : ((instance._visibility |= 2),\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n ));\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n includeWorkInProgressEffects &&\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseReconnectPassiveEffects(\n finishedRoot,\n finishedWork,\n committedLanes,\n committedTransitions,\n includeWorkInProgressEffects\n );\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction recursivelyTraverseAtomicPassiveEffects(\n finishedRoot$jscomp$0,\n parentFiber\n) {\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n var finishedRoot = finishedRoot$jscomp$0,\n finishedWork = parentFiber,\n flags = finishedWork.flags;\n switch (finishedWork.tag) {\n case 22:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitOffscreenPassiveMountEffects(\n finishedWork.alternate,\n finishedWork\n );\n break;\n case 24:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n flags & 2048 &&\n commitCachePassiveMountEffect(finishedWork.alternate, finishedWork);\n break;\n default:\n recursivelyTraverseAtomicPassiveEffects(finishedRoot, finishedWork);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nvar suspenseyCommitFlag = 8192;\nfunction recursivelyAccumulateSuspenseyCommit(\n parentFiber,\n committedLanes,\n suspendedState\n) {\n if (parentFiber.subtreeFlags & suspenseyCommitFlag)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n accumulateSuspenseyCommitOnFiber(\n parentFiber,\n committedLanes,\n suspendedState\n ),\n (parentFiber = parentFiber.sibling);\n}\nfunction accumulateSuspenseyCommitOnFiber(\n fiber,\n committedLanes,\n suspendedState\n) {\n switch (fiber.tag) {\n case 26:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n fiber.flags & suspenseyCommitFlag &&\n null !== fiber.memoizedState &&\n suspendResource(\n suspendedState,\n currentHoistableRoot,\n fiber.memoizedState,\n fiber.memoizedProps\n );\n break;\n case 5:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n break;\n case 3:\n case 4:\n var previousHoistableRoot = currentHoistableRoot;\n currentHoistableRoot = getHoistableRoot(fiber.stateNode.containerInfo);\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n currentHoistableRoot = previousHoistableRoot;\n break;\n case 22:\n null === fiber.memoizedState &&\n ((previousHoistableRoot = fiber.alternate),\n null !== previousHoistableRoot &&\n null !== previousHoistableRoot.memoizedState\n ? ((previousHoistableRoot = suspenseyCommitFlag),\n (suspenseyCommitFlag = 16777216),\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ),\n (suspenseyCommitFlag = previousHoistableRoot))\n : recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n ));\n break;\n default:\n recursivelyAccumulateSuspenseyCommit(\n fiber,\n committedLanes,\n suspendedState\n );\n }\n}\nfunction detachAlternateSiblings(parentFiber) {\n var previousFiber = parentFiber.alternate;\n if (\n null !== previousFiber &&\n ((parentFiber = previousFiber.child), null !== parentFiber)\n ) {\n previousFiber.child = null;\n do\n (previousFiber = parentFiber.sibling),\n (parentFiber.sibling = null),\n (parentFiber = previousFiber);\n while (null !== parentFiber);\n }\n}\nfunction recursivelyTraversePassiveUnmountEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n if (parentFiber.subtreeFlags & 10256)\n for (parentFiber = parentFiber.child; null !== parentFiber; )\n commitPassiveUnmountOnFiber(parentFiber),\n (parentFiber = parentFiber.sibling);\n}\nfunction commitPassiveUnmountOnFiber(finishedWork) {\n switch (finishedWork.tag) {\n case 0:\n case 11:\n case 15:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n finishedWork.flags & 2048 &&\n commitHookEffectListUnmount(9, finishedWork, finishedWork.return);\n break;\n case 3:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 12:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n case 22:\n var instance = finishedWork.stateNode;\n null !== finishedWork.memoizedState &&\n instance._visibility & 2 &&\n (null === finishedWork.return || 13 !== finishedWork.return.tag)\n ? ((instance._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(finishedWork))\n : recursivelyTraversePassiveUnmountEffects(finishedWork);\n break;\n default:\n recursivelyTraversePassiveUnmountEffects(finishedWork);\n }\n}\nfunction recursivelyTraverseDisconnectPassiveEffects(parentFiber) {\n var deletions = parentFiber.deletions;\n if (0 !== (parentFiber.flags & 16)) {\n if (null !== deletions)\n for (var i = 0; i < deletions.length; i++) {\n var childToDelete = deletions[i];\n nextEffect = childToDelete;\n commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n childToDelete,\n parentFiber\n );\n }\n detachAlternateSiblings(parentFiber);\n }\n for (parentFiber = parentFiber.child; null !== parentFiber; ) {\n deletions = parentFiber;\n switch (deletions.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, deletions, deletions.return);\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n break;\n case 22:\n i = deletions.stateNode;\n i._visibility & 2 &&\n ((i._visibility &= -3),\n recursivelyTraverseDisconnectPassiveEffects(deletions));\n break;\n default:\n recursivelyTraverseDisconnectPassiveEffects(deletions);\n }\n parentFiber = parentFiber.sibling;\n }\n}\nfunction commitPassiveUnmountEffectsInsideOfDeletedTree_begin(\n deletedSubtreeRoot,\n nearestMountedAncestor\n) {\n for (; null !== nextEffect; ) {\n var fiber = nextEffect;\n switch (fiber.tag) {\n case 0:\n case 11:\n case 15:\n commitHookEffectListUnmount(8, fiber, nearestMountedAncestor);\n break;\n case 23:\n case 22:\n if (\n null !== fiber.memoizedState &&\n null !== fiber.memoizedState.cachePool\n ) {\n var cache = fiber.memoizedState.cachePool.pool;\n null != cache && cache.refCount++;\n }\n break;\n case 24:\n releaseCache(fiber.memoizedState.cache);\n }\n cache = fiber.child;\n if (null !== cache) (cache.return = fiber), (nextEffect = cache);\n else\n a: for (fiber = deletedSubtreeRoot; null !== nextEffect; ) {\n cache = nextEffect;\n var sibling = cache.sibling,\n returnFiber = cache.return;\n detachFiberAfterEffects(cache);\n if (cache === fiber) {\n nextEffect = null;\n break a;\n }\n if (null !== sibling) {\n sibling.return = returnFiber;\n nextEffect = sibling;\n break a;\n }\n nextEffect = returnFiber;\n }\n }\n}\nvar DefaultAsyncDispatcher = {\n getCacheForType: function (resourceType) {\n var cache = readContext(CacheContext),\n cacheForType = cache.data.get(resourceType);\n void 0 === cacheForType &&\n ((cacheForType = resourceType()),\n cache.data.set(resourceType, cacheForType));\n return cacheForType;\n },\n cacheSignal: function () {\n return readContext(CacheContext).controller.signal;\n }\n },\n PossiblyWeakMap = \"function\" === typeof WeakMap ? WeakMap : Map,\n executionContext = 0,\n workInProgressRoot = null,\n workInProgress = null,\n workInProgressRootRenderLanes = 0,\n workInProgressSuspendedReason = 0,\n workInProgressThrownValue = null,\n workInProgressRootDidSkipSuspendedSiblings = !1,\n workInProgressRootIsPrerendering = !1,\n workInProgressRootDidAttachPingListener = !1,\n entangledRenderLanes = 0,\n workInProgressRootExitStatus = 0,\n workInProgressRootSkippedLanes = 0,\n workInProgressRootInterleavedUpdatedLanes = 0,\n workInProgressRootPingedLanes = 0,\n workInProgressDeferredLane = 0,\n workInProgressSuspendedRetryLanes = 0,\n workInProgressRootConcurrentErrors = null,\n workInProgressRootRecoverableErrors = null,\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1,\n globalMostRecentFallbackTime = 0,\n globalMostRecentTransitionTime = 0,\n workInProgressRootRenderTargetTime = Infinity,\n workInProgressTransitions = null,\n legacyErrorBoundariesThatAlreadyFailed = null,\n pendingEffectsStatus = 0,\n pendingEffectsRoot = null,\n pendingFinishedWork = null,\n pendingEffectsLanes = 0,\n pendingEffectsRemainingLanes = 0,\n pendingPassiveTransitions = null,\n pendingRecoverableErrors = null,\n nestedUpdateCount = 0,\n rootWithNestedUpdates = null;\nfunction requestUpdateLane() {\n return 0 !== (executionContext & 2) && 0 !== workInProgressRootRenderLanes\n ? workInProgressRootRenderLanes & -workInProgressRootRenderLanes\n : null !== ReactSharedInternals.T\n ? requestTransitionLane()\n : resolveUpdatePriority();\n}\nfunction requestDeferredLane() {\n if (0 === workInProgressDeferredLane)\n if (0 === (workInProgressRootRenderLanes & 536870912) || isHydrating) {\n var lane = nextTransitionDeferredLane;\n nextTransitionDeferredLane <<= 1;\n 0 === (nextTransitionDeferredLane & 3932160) &&\n (nextTransitionDeferredLane = 262144);\n workInProgressDeferredLane = lane;\n } else workInProgressDeferredLane = 536870912;\n lane = suspenseHandlerStackCursor.current;\n null !== lane && (lane.flags |= 32);\n return workInProgressDeferredLane;\n}\nfunction scheduleUpdateOnFiber(root, fiber, lane) {\n if (\n (root === workInProgressRoot &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n prepareFreshStack(root, 0),\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n markRootUpdated$1(root, lane);\n if (0 === (executionContext & 2) || root !== workInProgressRoot)\n root === workInProgressRoot &&\n (0 === (executionContext & 2) &&\n (workInProgressRootInterleavedUpdatedLanes |= lane),\n 4 === workInProgressRootExitStatus &&\n markRootSuspended(\n root,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n )),\n ensureRootIsScheduled(root);\n}\nfunction performWorkOnRoot(root$jscomp$0, lanes, forceSync) {\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n var shouldTimeSlice =\n (!forceSync &&\n 0 === (lanes & 127) &&\n 0 === (lanes & root$jscomp$0.expiredLanes)) ||\n checkIfRootIsPrerendering(root$jscomp$0, lanes),\n exitStatus = shouldTimeSlice\n ? renderRootConcurrent(root$jscomp$0, lanes)\n : renderRootSync(root$jscomp$0, lanes, !0),\n renderWasConcurrent = shouldTimeSlice;\n do {\n if (0 === exitStatus) {\n workInProgressRootIsPrerendering &&\n !shouldTimeSlice &&\n markRootSuspended(root$jscomp$0, lanes, 0, !1);\n break;\n } else {\n forceSync = root$jscomp$0.current.alternate;\n if (\n renderWasConcurrent &&\n !isRenderConsistentWithExternalStores(forceSync)\n ) {\n exitStatus = renderRootSync(root$jscomp$0, lanes, !1);\n renderWasConcurrent = !1;\n continue;\n }\n if (2 === exitStatus) {\n renderWasConcurrent = lanes;\n if (root$jscomp$0.errorRecoveryDisabledLanes & renderWasConcurrent)\n var JSCompiler_inline_result = 0;\n else\n (JSCompiler_inline_result = root$jscomp$0.pendingLanes & -536870913),\n (JSCompiler_inline_result =\n 0 !== JSCompiler_inline_result\n ? JSCompiler_inline_result\n : JSCompiler_inline_result & 536870912\n ? 536870912\n : 0);\n if (0 !== JSCompiler_inline_result) {\n lanes = JSCompiler_inline_result;\n a: {\n var root = root$jscomp$0;\n exitStatus = workInProgressRootConcurrentErrors;\n var wasRootDehydrated = root.current.memoizedState.isDehydrated;\n wasRootDehydrated &&\n (prepareFreshStack(root, JSCompiler_inline_result).flags |= 256);\n JSCompiler_inline_result = renderRootSync(\n root,\n JSCompiler_inline_result,\n !1\n );\n if (2 !== JSCompiler_inline_result) {\n if (\n workInProgressRootDidAttachPingListener &&\n !wasRootDehydrated\n ) {\n root.errorRecoveryDisabledLanes |= renderWasConcurrent;\n workInProgressRootInterleavedUpdatedLanes |=\n renderWasConcurrent;\n exitStatus = 4;\n break a;\n }\n renderWasConcurrent = workInProgressRootRecoverableErrors;\n workInProgressRootRecoverableErrors = exitStatus;\n null !== renderWasConcurrent &&\n (null === workInProgressRootRecoverableErrors\n ? (workInProgressRootRecoverableErrors = renderWasConcurrent)\n : workInProgressRootRecoverableErrors.push.apply(\n workInProgressRootRecoverableErrors,\n renderWasConcurrent\n ));\n }\n exitStatus = JSCompiler_inline_result;\n }\n renderWasConcurrent = !1;\n if (2 !== exitStatus) continue;\n }\n }\n if (1 === exitStatus) {\n prepareFreshStack(root$jscomp$0, 0);\n markRootSuspended(root$jscomp$0, lanes, 0, !0);\n break;\n }\n a: {\n shouldTimeSlice = root$jscomp$0;\n renderWasConcurrent = exitStatus;\n switch (renderWasConcurrent) {\n case 0:\n case 1:\n throw Error(formatProdErrorMessage(345));\n case 4:\n if ((lanes & 4194048) !== lanes) break;\n case 6:\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n break a;\n case 2:\n workInProgressRootRecoverableErrors = null;\n break;\n case 3:\n case 5:\n break;\n default:\n throw Error(formatProdErrorMessage(329));\n }\n if (\n (lanes & 62914560) === lanes &&\n ((exitStatus = globalMostRecentFallbackTime + 300 - now()),\n 10 < exitStatus)\n ) {\n markRootSuspended(\n shouldTimeSlice,\n lanes,\n workInProgressDeferredLane,\n !workInProgressRootDidSkipSuspendedSiblings\n );\n if (0 !== getNextLanes(shouldTimeSlice, 0, !0)) break a;\n pendingEffectsLanes = lanes;\n shouldTimeSlice.timeoutHandle = scheduleTimeout(\n commitRootWhenReady.bind(\n null,\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n \"Throttled\",\n -0,\n 0\n ),\n exitStatus\n );\n break a;\n }\n commitRootWhenReady(\n shouldTimeSlice,\n forceSync,\n workInProgressRootRecoverableErrors,\n workInProgressTransitions,\n workInProgressRootDidIncludeRecursiveRenderUpdate,\n lanes,\n workInProgressDeferredLane,\n workInProgressRootInterleavedUpdatedLanes,\n workInProgressSuspendedRetryLanes,\n workInProgressRootDidSkipSuspendedSiblings,\n renderWasConcurrent,\n null,\n -0,\n 0\n );\n }\n }\n break;\n } while (1);\n ensureRootIsScheduled(root$jscomp$0);\n}\nfunction commitRootWhenReady(\n root,\n finishedWork,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n lanes,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n didSkipSuspendedSiblings,\n exitStatus,\n suspendedCommitReason,\n completedRenderStartTime,\n completedRenderEndTime\n) {\n root.timeoutHandle = -1;\n suspendedCommitReason = finishedWork.subtreeFlags;\n if (\n suspendedCommitReason & 8192 ||\n 16785408 === (suspendedCommitReason & 16785408)\n ) {\n suspendedCommitReason = {\n stylesheets: null,\n count: 0,\n imgCount: 0,\n imgBytes: 0,\n suspenseyImages: [],\n waitingForImages: !0,\n waitingForViewTransition: !1,\n unsuspend: noop$1\n };\n accumulateSuspenseyCommitOnFiber(\n finishedWork,\n lanes,\n suspendedCommitReason\n );\n var timeoutOffset =\n (lanes & 62914560) === lanes\n ? globalMostRecentFallbackTime - now()\n : (lanes & 4194048) === lanes\n ? globalMostRecentTransitionTime - now()\n : 0;\n timeoutOffset = waitForCommitToBeReady(\n suspendedCommitReason,\n timeoutOffset\n );\n if (null !== timeoutOffset) {\n pendingEffectsLanes = lanes;\n root.cancelPendingCommit = timeoutOffset(\n commitRoot.bind(\n null,\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes,\n exitStatus,\n suspendedCommitReason,\n null,\n completedRenderStartTime,\n completedRenderEndTime\n )\n );\n markRootSuspended(root, lanes, spawnedLane, !didSkipSuspendedSiblings);\n return;\n }\n }\n commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n}\nfunction isRenderConsistentWithExternalStores(finishedWork) {\n for (var node = finishedWork; ; ) {\n var tag = node.tag;\n if (\n (0 === tag || 11 === tag || 15 === tag) &&\n node.flags & 16384 &&\n ((tag = node.updateQueue),\n null !== tag && ((tag = tag.stores), null !== tag))\n )\n for (var i = 0; i < tag.length; i++) {\n var check = tag[i],\n getSnapshot = check.getSnapshot;\n check = check.value;\n try {\n if (!objectIs(getSnapshot(), check)) return !1;\n } catch (error) {\n return !1;\n }\n }\n tag = node.child;\n if (node.subtreeFlags & 16384 && null !== tag)\n (tag.return = node), (node = tag);\n else {\n if (node === finishedWork) break;\n for (; null === node.sibling; ) {\n if (null === node.return || node.return === finishedWork) return !0;\n node = node.return;\n }\n node.sibling.return = node.return;\n node = node.sibling;\n }\n }\n return !0;\n}\nfunction markRootSuspended(\n root,\n suspendedLanes,\n spawnedLane,\n didAttemptEntireTree\n) {\n suspendedLanes &= ~workInProgressRootPingedLanes;\n suspendedLanes &= ~workInProgressRootInterleavedUpdatedLanes;\n root.suspendedLanes |= suspendedLanes;\n root.pingedLanes &= ~suspendedLanes;\n didAttemptEntireTree && (root.warmLanes |= suspendedLanes);\n didAttemptEntireTree = root.expirationTimes;\n for (var lanes = suspendedLanes; 0 < lanes; ) {\n var index$6 = 31 - clz32(lanes),\n lane = 1 << index$6;\n didAttemptEntireTree[index$6] = -1;\n lanes &= ~lane;\n }\n 0 !== spawnedLane &&\n markSpawnedDeferredLane(root, spawnedLane, suspendedLanes);\n}\nfunction flushSyncWork$1() {\n return 0 === (executionContext & 6)\n ? (flushSyncWorkAcrossRoots_impl(0, !1), !1)\n : !0;\n}\nfunction resetWorkInProgressStack() {\n if (null !== workInProgress) {\n if (0 === workInProgressSuspendedReason)\n var interruptedWork = workInProgress.return;\n else\n (interruptedWork = workInProgress),\n (lastContextDependency = currentlyRenderingFiber$1 = null),\n resetHooksOnUnwind(interruptedWork),\n (thenableState$1 = null),\n (thenableIndexCounter$1 = 0),\n (interruptedWork = workInProgress);\n for (; null !== interruptedWork; )\n unwindInterruptedWork(interruptedWork.alternate, interruptedWork),\n (interruptedWork = interruptedWork.return);\n workInProgress = null;\n }\n}\nfunction prepareFreshStack(root, lanes) {\n var timeoutHandle = root.timeoutHandle;\n -1 !== timeoutHandle &&\n ((root.timeoutHandle = -1), cancelTimeout(timeoutHandle));\n timeoutHandle = root.cancelPendingCommit;\n null !== timeoutHandle &&\n ((root.cancelPendingCommit = null), timeoutHandle());\n pendingEffectsLanes = 0;\n resetWorkInProgressStack();\n workInProgressRoot = root;\n workInProgress = timeoutHandle = createWorkInProgress(root.current, null);\n workInProgressRootRenderLanes = lanes;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n workInProgressRootDidSkipSuspendedSiblings = !1;\n workInProgressRootIsPrerendering = checkIfRootIsPrerendering(root, lanes);\n workInProgressRootDidAttachPingListener = !1;\n workInProgressSuspendedRetryLanes =\n workInProgressDeferredLane =\n workInProgressRootPingedLanes =\n workInProgressRootInterleavedUpdatedLanes =\n workInProgressRootSkippedLanes =\n workInProgressRootExitStatus =\n 0;\n workInProgressRootRecoverableErrors = workInProgressRootConcurrentErrors =\n null;\n workInProgressRootDidIncludeRecursiveRenderUpdate = !1;\n 0 !== (lanes & 8) && (lanes |= lanes & 32);\n var allEntangledLanes = root.entangledLanes;\n if (0 !== allEntangledLanes)\n for (\n root = root.entanglements, allEntangledLanes &= lanes;\n 0 < allEntangledLanes;\n\n ) {\n var index$4 = 31 - clz32(allEntangledLanes),\n lane = 1 << index$4;\n lanes |= root[index$4];\n allEntangledLanes &= ~lane;\n }\n entangledRenderLanes = lanes;\n finishQueueingConcurrentUpdates();\n return timeoutHandle;\n}\nfunction handleThrow(root, thrownValue) {\n currentlyRenderingFiber = null;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n thrownValue === SuspenseException || thrownValue === SuspenseActionException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 3))\n : thrownValue === SuspenseyCommitException\n ? ((thrownValue = getSuspendedThenable()),\n (workInProgressSuspendedReason = 4))\n : (workInProgressSuspendedReason =\n thrownValue === SelectiveHydrationException\n ? 8\n : null !== thrownValue &&\n \"object\" === typeof thrownValue &&\n \"function\" === typeof thrownValue.then\n ? 6\n : 1);\n workInProgressThrownValue = thrownValue;\n null === workInProgress &&\n ((workInProgressRootExitStatus = 1),\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n ));\n}\nfunction shouldRemainOnPreviousScreen() {\n var handler = suspenseHandlerStackCursor.current;\n return null === handler\n ? !0\n : (workInProgressRootRenderLanes & 4194048) ===\n workInProgressRootRenderLanes\n ? null === shellBoundary\n ? !0\n : !1\n : (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n ? handler === shellBoundary\n : !1;\n}\nfunction pushDispatcher() {\n var prevDispatcher = ReactSharedInternals.H;\n ReactSharedInternals.H = ContextOnlyDispatcher;\n return null === prevDispatcher ? ContextOnlyDispatcher : prevDispatcher;\n}\nfunction pushAsyncDispatcher() {\n var prevAsyncDispatcher = ReactSharedInternals.A;\n ReactSharedInternals.A = DefaultAsyncDispatcher;\n return prevAsyncDispatcher;\n}\nfunction renderDidSuspendDelayIfPossible() {\n workInProgressRootExitStatus = 4;\n workInProgressRootDidSkipSuspendedSiblings ||\n ((workInProgressRootRenderLanes & 4194048) !==\n workInProgressRootRenderLanes &&\n null !== suspenseHandlerStackCursor.current) ||\n (workInProgressRootIsPrerendering = !0);\n (0 === (workInProgressRootSkippedLanes & 134217727) &&\n 0 === (workInProgressRootInterleavedUpdatedLanes & 134217727)) ||\n null === workInProgressRoot ||\n markRootSuspended(\n workInProgressRoot,\n workInProgressRootRenderLanes,\n workInProgressDeferredLane,\n !1\n );\n}\nfunction renderRootSync(root, lanes, shouldYieldForPrerendering) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n if (workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes)\n (workInProgressTransitions = null), prepareFreshStack(root, lanes);\n lanes = !1;\n var exitStatus = workInProgressRootExitStatus;\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n var unitOfWork = workInProgress,\n thrownValue = workInProgressThrownValue;\n switch (workInProgressSuspendedReason) {\n case 8:\n resetWorkInProgressStack();\n exitStatus = 6;\n break a;\n case 3:\n case 2:\n case 9:\n case 6:\n null === suspenseHandlerStackCursor.current && (lanes = !0);\n var reason = workInProgressSuspendedReason;\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n if (\n shouldYieldForPrerendering &&\n workInProgressRootIsPrerendering\n ) {\n exitStatus = 0;\n break a;\n }\n break;\n default:\n (reason = workInProgressSuspendedReason),\n (workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, unitOfWork, thrownValue, reason);\n }\n }\n workLoopSync();\n exitStatus = workInProgressRootExitStatus;\n break;\n } catch (thrownValue$165) {\n handleThrow(root, thrownValue$165);\n }\n while (1);\n lanes && root.shellSuspendCounter++;\n lastContextDependency = currentlyRenderingFiber$1 = null;\n executionContext = prevExecutionContext;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n null === workInProgress &&\n ((workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0),\n finishQueueingConcurrentUpdates());\n return exitStatus;\n}\nfunction workLoopSync() {\n for (; null !== workInProgress; ) performUnitOfWork(workInProgress);\n}\nfunction renderRootConcurrent(root, lanes) {\n var prevExecutionContext = executionContext;\n executionContext |= 2;\n var prevDispatcher = pushDispatcher(),\n prevAsyncDispatcher = pushAsyncDispatcher();\n workInProgressRoot !== root || workInProgressRootRenderLanes !== lanes\n ? ((workInProgressTransitions = null),\n (workInProgressRootRenderTargetTime = now() + 500),\n prepareFreshStack(root, lanes))\n : (workInProgressRootIsPrerendering = checkIfRootIsPrerendering(\n root,\n lanes\n ));\n a: do\n try {\n if (0 !== workInProgressSuspendedReason && null !== workInProgress) {\n lanes = workInProgress;\n var thrownValue = workInProgressThrownValue;\n b: switch (workInProgressSuspendedReason) {\n case 1:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 1);\n break;\n case 2:\n case 9:\n if (isThenableResolved(thrownValue)) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n replaySuspendedUnitOfWork(lanes);\n break;\n }\n lanes = function () {\n (2 !== workInProgressSuspendedReason &&\n 9 !== workInProgressSuspendedReason) ||\n workInProgressRoot !== root ||\n (workInProgressSuspendedReason = 7);\n ensureRootIsScheduled(root);\n };\n thrownValue.then(lanes, lanes);\n break a;\n case 3:\n workInProgressSuspendedReason = 7;\n break a;\n case 4:\n workInProgressSuspendedReason = 5;\n break a;\n case 7:\n isThenableResolved(thrownValue)\n ? ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n replaySuspendedUnitOfWork(lanes))\n : ((workInProgressSuspendedReason = 0),\n (workInProgressThrownValue = null),\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 7));\n break;\n case 5:\n var resource = null;\n switch (workInProgress.tag) {\n case 26:\n resource = workInProgress.memoizedState;\n case 5:\n case 27:\n var hostFiber = workInProgress;\n if (\n resource\n ? preloadResource(resource)\n : hostFiber.stateNode.complete\n ) {\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n var sibling = hostFiber.sibling;\n if (null !== sibling) workInProgress = sibling;\n else {\n var returnFiber = hostFiber.return;\n null !== returnFiber\n ? ((workInProgress = returnFiber),\n completeUnitOfWork(returnFiber))\n : (workInProgress = null);\n }\n break b;\n }\n }\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 5);\n break;\n case 6:\n workInProgressSuspendedReason = 0;\n workInProgressThrownValue = null;\n throwAndUnwindWorkLoop(root, lanes, thrownValue, 6);\n break;\n case 8:\n resetWorkInProgressStack();\n workInProgressRootExitStatus = 6;\n break a;\n default:\n throw Error(formatProdErrorMessage(462));\n }\n }\n workLoopConcurrentByScheduler();\n break;\n } catch (thrownValue$167) {\n handleThrow(root, thrownValue$167);\n }\n while (1);\n lastContextDependency = currentlyRenderingFiber$1 = null;\n ReactSharedInternals.H = prevDispatcher;\n ReactSharedInternals.A = prevAsyncDispatcher;\n executionContext = prevExecutionContext;\n if (null !== workInProgress) return 0;\n workInProgressRoot = null;\n workInProgressRootRenderLanes = 0;\n finishQueueingConcurrentUpdates();\n return workInProgressRootExitStatus;\n}\nfunction workLoopConcurrentByScheduler() {\n for (; null !== workInProgress && !shouldYield(); )\n performUnitOfWork(workInProgress);\n}\nfunction performUnitOfWork(unitOfWork) {\n var next = beginWork(unitOfWork.alternate, unitOfWork, entangledRenderLanes);\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction replaySuspendedUnitOfWork(unitOfWork) {\n var next = unitOfWork;\n var current = next.alternate;\n switch (next.tag) {\n case 15:\n case 0:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type,\n void 0,\n workInProgressRootRenderLanes\n );\n break;\n case 11:\n next = replayFunctionComponent(\n current,\n next,\n next.pendingProps,\n next.type.render,\n next.ref,\n workInProgressRootRenderLanes\n );\n break;\n case 5:\n resetHooksOnUnwind(next);\n default:\n unwindInterruptedWork(current, next),\n (next = workInProgress =\n resetWorkInProgress(next, entangledRenderLanes)),\n (next = beginWork(current, next, entangledRenderLanes));\n }\n unitOfWork.memoizedProps = unitOfWork.pendingProps;\n null === next ? completeUnitOfWork(unitOfWork) : (workInProgress = next);\n}\nfunction throwAndUnwindWorkLoop(\n root,\n unitOfWork,\n thrownValue,\n suspendedReason\n) {\n lastContextDependency = currentlyRenderingFiber$1 = null;\n resetHooksOnUnwind(unitOfWork);\n thenableState$1 = null;\n thenableIndexCounter$1 = 0;\n var returnFiber = unitOfWork.return;\n try {\n if (\n throwException(\n root,\n returnFiber,\n unitOfWork,\n thrownValue,\n workInProgressRootRenderLanes\n )\n ) {\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n } catch (error) {\n if (null !== returnFiber) throw ((workInProgress = returnFiber), error);\n workInProgressRootExitStatus = 1;\n logUncaughtError(\n root,\n createCapturedValueAtFiber(thrownValue, root.current)\n );\n workInProgress = null;\n return;\n }\n if (unitOfWork.flags & 32768) {\n if (isHydrating || 1 === suspendedReason) root = !0;\n else if (\n workInProgressRootIsPrerendering ||\n 0 !== (workInProgressRootRenderLanes & 536870912)\n )\n root = !1;\n else if (\n ((workInProgressRootDidSkipSuspendedSiblings = root = !0),\n 2 === suspendedReason ||\n 9 === suspendedReason ||\n 3 === suspendedReason ||\n 6 === suspendedReason)\n )\n (suspendedReason = suspenseHandlerStackCursor.current),\n null !== suspendedReason &&\n 13 === suspendedReason.tag &&\n (suspendedReason.flags |= 16384);\n unwindUnitOfWork(unitOfWork, root);\n } else completeUnitOfWork(unitOfWork);\n}\nfunction completeUnitOfWork(unitOfWork) {\n var completedWork = unitOfWork;\n do {\n if (0 !== (completedWork.flags & 32768)) {\n unwindUnitOfWork(\n completedWork,\n workInProgressRootDidSkipSuspendedSiblings\n );\n return;\n }\n unitOfWork = completedWork.return;\n var next = completeWork(\n completedWork.alternate,\n completedWork,\n entangledRenderLanes\n );\n if (null !== next) {\n workInProgress = next;\n return;\n }\n completedWork = completedWork.sibling;\n if (null !== completedWork) {\n workInProgress = completedWork;\n return;\n }\n workInProgress = completedWork = unitOfWork;\n } while (null !== completedWork);\n 0 === workInProgressRootExitStatus && (workInProgressRootExitStatus = 5);\n}\nfunction unwindUnitOfWork(unitOfWork, skipSiblings) {\n do {\n var next = unwindWork(unitOfWork.alternate, unitOfWork);\n if (null !== next) {\n next.flags &= 32767;\n workInProgress = next;\n return;\n }\n next = unitOfWork.return;\n null !== next &&\n ((next.flags |= 32768), (next.subtreeFlags = 0), (next.deletions = null));\n if (\n !skipSiblings &&\n ((unitOfWork = unitOfWork.sibling), null !== unitOfWork)\n ) {\n workInProgress = unitOfWork;\n return;\n }\n workInProgress = unitOfWork = next;\n } while (null !== unitOfWork);\n workInProgressRootExitStatus = 6;\n workInProgress = null;\n}\nfunction commitRoot(\n root,\n finishedWork,\n lanes,\n recoverableErrors,\n transitions,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n) {\n root.cancelPendingCommit = null;\n do flushPendingEffects();\n while (0 !== pendingEffectsStatus);\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(327));\n if (null !== finishedWork) {\n if (finishedWork === root.current) throw Error(formatProdErrorMessage(177));\n didIncludeRenderPhaseUpdate = finishedWork.lanes | finishedWork.childLanes;\n didIncludeRenderPhaseUpdate |= concurrentlyUpdatedLanes;\n markRootFinished(\n root,\n lanes,\n didIncludeRenderPhaseUpdate,\n spawnedLane,\n updatedLanes,\n suspendedRetryLanes\n );\n root === workInProgressRoot &&\n ((workInProgress = workInProgressRoot = null),\n (workInProgressRootRenderLanes = 0));\n pendingFinishedWork = finishedWork;\n pendingEffectsRoot = root;\n pendingEffectsLanes = lanes;\n pendingEffectsRemainingLanes = didIncludeRenderPhaseUpdate;\n pendingPassiveTransitions = transitions;\n pendingRecoverableErrors = recoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? ((root.callbackNode = null),\n (root.callbackPriority = 0),\n scheduleCallback$1(NormalPriority$1, function () {\n flushPassiveEffects();\n return null;\n }))\n : ((root.callbackNode = null), (root.callbackPriority = 0));\n recoverableErrors = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || recoverableErrors) {\n recoverableErrors = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n transitions = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n spawnedLane = executionContext;\n executionContext |= 4;\n try {\n commitBeforeMutationEffects(root, finishedWork, lanes);\n } finally {\n (executionContext = spawnedLane),\n (ReactDOMSharedInternals.p = transitions),\n (ReactSharedInternals.T = recoverableErrors);\n }\n }\n pendingEffectsStatus = 1;\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n }\n}\nfunction flushMutationEffects() {\n if (1 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootMutationHasEffect = 0 !== (finishedWork.flags & 13878);\n if (0 !== (finishedWork.subtreeFlags & 13878) || rootMutationHasEffect) {\n rootMutationHasEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitMutationEffectsOnFiber(finishedWork, root);\n var priorSelectionInformation = selectionInformation,\n curFocusedElem = getActiveElementDeep(root.containerInfo),\n priorFocusedElem = priorSelectionInformation.focusedElem,\n priorSelectionRange = priorSelectionInformation.selectionRange;\n if (\n curFocusedElem !== priorFocusedElem &&\n priorFocusedElem &&\n priorFocusedElem.ownerDocument &&\n containsNode(\n priorFocusedElem.ownerDocument.documentElement,\n priorFocusedElem\n )\n ) {\n if (\n null !== priorSelectionRange &&\n hasSelectionCapabilities(priorFocusedElem)\n ) {\n var start = priorSelectionRange.start,\n end = priorSelectionRange.end;\n void 0 === end && (end = start);\n if (\"selectionStart\" in priorFocusedElem)\n (priorFocusedElem.selectionStart = start),\n (priorFocusedElem.selectionEnd = Math.min(\n end,\n priorFocusedElem.value.length\n ));\n else {\n var doc = priorFocusedElem.ownerDocument || document,\n win = (doc && doc.defaultView) || window;\n if (win.getSelection) {\n var selection = win.getSelection(),\n length = priorFocusedElem.textContent.length,\n start$jscomp$0 = Math.min(priorSelectionRange.start, length),\n end$jscomp$0 =\n void 0 === priorSelectionRange.end\n ? start$jscomp$0\n : Math.min(priorSelectionRange.end, length);\n !selection.extend &&\n start$jscomp$0 > end$jscomp$0 &&\n ((curFocusedElem = end$jscomp$0),\n (end$jscomp$0 = start$jscomp$0),\n (start$jscomp$0 = curFocusedElem));\n var startMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n start$jscomp$0\n ),\n endMarker = getNodeForCharacterOffset(\n priorFocusedElem,\n end$jscomp$0\n );\n if (\n startMarker &&\n endMarker &&\n (1 !== selection.rangeCount ||\n selection.anchorNode !== startMarker.node ||\n selection.anchorOffset !== startMarker.offset ||\n selection.focusNode !== endMarker.node ||\n selection.focusOffset !== endMarker.offset)\n ) {\n var range = doc.createRange();\n range.setStart(startMarker.node, startMarker.offset);\n selection.removeAllRanges();\n start$jscomp$0 > end$jscomp$0\n ? (selection.addRange(range),\n selection.extend(endMarker.node, endMarker.offset))\n : (range.setEnd(endMarker.node, endMarker.offset),\n selection.addRange(range));\n }\n }\n }\n }\n doc = [];\n for (\n selection = priorFocusedElem;\n (selection = selection.parentNode);\n\n )\n 1 === selection.nodeType &&\n doc.push({\n element: selection,\n left: selection.scrollLeft,\n top: selection.scrollTop\n });\n \"function\" === typeof priorFocusedElem.focus &&\n priorFocusedElem.focus();\n for (\n priorFocusedElem = 0;\n priorFocusedElem < doc.length;\n priorFocusedElem++\n ) {\n var info = doc[priorFocusedElem];\n info.element.scrollLeft = info.left;\n info.element.scrollTop = info.top;\n }\n }\n _enabled = !!eventsEnabled;\n selectionInformation = eventsEnabled = null;\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootMutationHasEffect);\n }\n }\n root.current = finishedWork;\n pendingEffectsStatus = 2;\n }\n}\nfunction flushLayoutEffects() {\n if (2 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n rootHasLayoutEffect = 0 !== (finishedWork.flags & 8772);\n if (0 !== (finishedWork.subtreeFlags & 8772) || rootHasLayoutEffect) {\n rootHasLayoutEffect = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n try {\n commitLayoutEffectOnFiber(root, finishedWork.alternate, finishedWork);\n } finally {\n (executionContext = prevExecutionContext),\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = rootHasLayoutEffect);\n }\n }\n pendingEffectsStatus = 3;\n }\n}\nfunction flushSpawnedWork() {\n if (4 === pendingEffectsStatus || 3 === pendingEffectsStatus) {\n pendingEffectsStatus = 0;\n requestPaint();\n var root = pendingEffectsRoot,\n finishedWork = pendingFinishedWork,\n lanes = pendingEffectsLanes,\n recoverableErrors = pendingRecoverableErrors;\n 0 !== (finishedWork.subtreeFlags & 10256) ||\n 0 !== (finishedWork.flags & 10256)\n ? (pendingEffectsStatus = 5)\n : ((pendingEffectsStatus = 0),\n (pendingFinishedWork = pendingEffectsRoot = null),\n releaseRootPooledCache(root, root.pendingLanes));\n var remainingLanes = root.pendingLanes;\n 0 === remainingLanes && (legacyErrorBoundariesThatAlreadyFailed = null);\n lanesToEventPriority(lanes);\n finishedWork = finishedWork.stateNode;\n if (injectedHook && \"function\" === typeof injectedHook.onCommitFiberRoot)\n try {\n injectedHook.onCommitFiberRoot(\n rendererID,\n finishedWork,\n void 0,\n 128 === (finishedWork.current.flags & 128)\n );\n } catch (err) {}\n if (null !== recoverableErrors) {\n finishedWork = ReactSharedInternals.T;\n remainingLanes = ReactDOMSharedInternals.p;\n ReactDOMSharedInternals.p = 2;\n ReactSharedInternals.T = null;\n try {\n for (\n var onRecoverableError = root.onRecoverableError, i = 0;\n i < recoverableErrors.length;\n i++\n ) {\n var recoverableError = recoverableErrors[i];\n onRecoverableError(recoverableError.value, {\n componentStack: recoverableError.stack\n });\n }\n } finally {\n (ReactSharedInternals.T = finishedWork),\n (ReactDOMSharedInternals.p = remainingLanes);\n }\n }\n 0 !== (pendingEffectsLanes & 3) && flushPendingEffects();\n ensureRootIsScheduled(root);\n remainingLanes = root.pendingLanes;\n 0 !== (lanes & 261930) && 0 !== (remainingLanes & 42)\n ? root === rootWithNestedUpdates\n ? nestedUpdateCount++\n : ((nestedUpdateCount = 0), (rootWithNestedUpdates = root))\n : (nestedUpdateCount = 0);\n flushSyncWorkAcrossRoots_impl(0, !1);\n }\n}\nfunction releaseRootPooledCache(root, remainingLanes) {\n 0 === (root.pooledCacheLanes &= remainingLanes) &&\n ((remainingLanes = root.pooledCache),\n null != remainingLanes &&\n ((root.pooledCache = null), releaseCache(remainingLanes)));\n}\nfunction flushPendingEffects() {\n flushMutationEffects();\n flushLayoutEffects();\n flushSpawnedWork();\n return flushPassiveEffects();\n}\nfunction flushPassiveEffects() {\n if (5 !== pendingEffectsStatus) return !1;\n var root = pendingEffectsRoot,\n remainingLanes = pendingEffectsRemainingLanes;\n pendingEffectsRemainingLanes = 0;\n var renderPriority = lanesToEventPriority(pendingEffectsLanes),\n prevTransition = ReactSharedInternals.T,\n previousPriority = ReactDOMSharedInternals.p;\n try {\n ReactDOMSharedInternals.p = 32 > renderPriority ? 32 : renderPriority;\n ReactSharedInternals.T = null;\n renderPriority = pendingPassiveTransitions;\n pendingPassiveTransitions = null;\n var root$jscomp$0 = pendingEffectsRoot,\n lanes = pendingEffectsLanes;\n pendingEffectsStatus = 0;\n pendingFinishedWork = pendingEffectsRoot = null;\n pendingEffectsLanes = 0;\n if (0 !== (executionContext & 6)) throw Error(formatProdErrorMessage(331));\n var prevExecutionContext = executionContext;\n executionContext |= 4;\n commitPassiveUnmountOnFiber(root$jscomp$0.current);\n commitPassiveMountOnFiber(\n root$jscomp$0,\n root$jscomp$0.current,\n lanes,\n renderPriority\n );\n executionContext = prevExecutionContext;\n flushSyncWorkAcrossRoots_impl(0, !1);\n if (\n injectedHook &&\n \"function\" === typeof injectedHook.onPostCommitFiberRoot\n )\n try {\n injectedHook.onPostCommitFiberRoot(rendererID, root$jscomp$0);\n } catch (err) {}\n return !0;\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition),\n releaseRootPooledCache(root, remainingLanes);\n }\n}\nfunction captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n sourceFiber = createRootErrorUpdate(rootFiber.stateNode, sourceFiber, 2);\n rootFiber = enqueueUpdate(rootFiber, sourceFiber, 2);\n null !== rootFiber &&\n (markRootUpdated$1(rootFiber, 2), ensureRootIsScheduled(rootFiber));\n}\nfunction captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error) {\n if (3 === sourceFiber.tag)\n captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error);\n else\n for (; null !== nearestMountedAncestor; ) {\n if (3 === nearestMountedAncestor.tag) {\n captureCommitPhaseErrorOnRoot(\n nearestMountedAncestor,\n sourceFiber,\n error\n );\n break;\n } else if (1 === nearestMountedAncestor.tag) {\n var instance = nearestMountedAncestor.stateNode;\n if (\n \"function\" ===\n typeof nearestMountedAncestor.type.getDerivedStateFromError ||\n (\"function\" === typeof instance.componentDidCatch &&\n (null === legacyErrorBoundariesThatAlreadyFailed ||\n !legacyErrorBoundariesThatAlreadyFailed.has(instance)))\n ) {\n sourceFiber = createCapturedValueAtFiber(error, sourceFiber);\n error = createClassErrorUpdate(2);\n instance = enqueueUpdate(nearestMountedAncestor, error, 2);\n null !== instance &&\n (initializeClassErrorUpdate(\n error,\n instance,\n nearestMountedAncestor,\n sourceFiber\n ),\n markRootUpdated$1(instance, 2),\n ensureRootIsScheduled(instance));\n break;\n }\n }\n nearestMountedAncestor = nearestMountedAncestor.return;\n }\n}\nfunction attachPingListener(root, wakeable, lanes) {\n var pingCache = root.pingCache;\n if (null === pingCache) {\n pingCache = root.pingCache = new PossiblyWeakMap();\n var threadIDs = new Set();\n pingCache.set(wakeable, threadIDs);\n } else\n (threadIDs = pingCache.get(wakeable)),\n void 0 === threadIDs &&\n ((threadIDs = new Set()), pingCache.set(wakeable, threadIDs));\n threadIDs.has(lanes) ||\n ((workInProgressRootDidAttachPingListener = !0),\n threadIDs.add(lanes),\n (root = pingSuspendedRoot.bind(null, root, wakeable, lanes)),\n wakeable.then(root, root));\n}\nfunction pingSuspendedRoot(root, wakeable, pingedLanes) {\n var pingCache = root.pingCache;\n null !== pingCache && pingCache.delete(wakeable);\n root.pingedLanes |= root.suspendedLanes & pingedLanes;\n root.warmLanes &= ~pingedLanes;\n workInProgressRoot === root &&\n (workInProgressRootRenderLanes & pingedLanes) === pingedLanes &&\n (4 === workInProgressRootExitStatus ||\n (3 === workInProgressRootExitStatus &&\n (workInProgressRootRenderLanes & 62914560) ===\n workInProgressRootRenderLanes &&\n 300 > now() - globalMostRecentFallbackTime)\n ? 0 === (executionContext & 2) && prepareFreshStack(root, 0)\n : (workInProgressRootPingedLanes |= pingedLanes),\n workInProgressSuspendedRetryLanes === workInProgressRootRenderLanes &&\n (workInProgressSuspendedRetryLanes = 0));\n ensureRootIsScheduled(root);\n}\nfunction retryTimedOutBoundary(boundaryFiber, retryLane) {\n 0 === retryLane && (retryLane = claimNextRetryLane());\n boundaryFiber = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);\n null !== boundaryFiber &&\n (markRootUpdated$1(boundaryFiber, retryLane),\n ensureRootIsScheduled(boundaryFiber));\n}\nfunction retryDehydratedSuspenseBoundary(boundaryFiber) {\n var suspenseState = boundaryFiber.memoizedState,\n retryLane = 0;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction resolveRetryWakeable(boundaryFiber, wakeable) {\n var retryLane = 0;\n switch (boundaryFiber.tag) {\n case 31:\n case 13:\n var retryCache = boundaryFiber.stateNode;\n var suspenseState = boundaryFiber.memoizedState;\n null !== suspenseState && (retryLane = suspenseState.retryLane);\n break;\n case 19:\n retryCache = boundaryFiber.stateNode;\n break;\n case 22:\n retryCache = boundaryFiber.stateNode._retryCache;\n break;\n default:\n throw Error(formatProdErrorMessage(314));\n }\n null !== retryCache && retryCache.delete(wakeable);\n retryTimedOutBoundary(boundaryFiber, retryLane);\n}\nfunction scheduleCallback$1(priorityLevel, callback) {\n return scheduleCallback$3(priorityLevel, callback);\n}\nvar firstScheduledRoot = null,\n lastScheduledRoot = null,\n didScheduleMicrotask = !1,\n mightHavePendingSyncWork = !1,\n isFlushingWork = !1,\n currentEventTransitionLane = 0;\nfunction ensureRootIsScheduled(root) {\n root !== lastScheduledRoot &&\n null === root.next &&\n (null === lastScheduledRoot\n ? (firstScheduledRoot = lastScheduledRoot = root)\n : (lastScheduledRoot = lastScheduledRoot.next = root));\n mightHavePendingSyncWork = !0;\n didScheduleMicrotask ||\n ((didScheduleMicrotask = !0), scheduleImmediateRootScheduleTask());\n}\nfunction flushSyncWorkAcrossRoots_impl(syncTransitionLanes, onlyLegacy) {\n if (!isFlushingWork && mightHavePendingSyncWork) {\n isFlushingWork = !0;\n do {\n var didPerformSomeWork = !1;\n for (var root$170 = firstScheduledRoot; null !== root$170; ) {\n if (!onlyLegacy)\n if (0 !== syncTransitionLanes) {\n var pendingLanes = root$170.pendingLanes;\n if (0 === pendingLanes) var JSCompiler_inline_result = 0;\n else {\n var suspendedLanes = root$170.suspendedLanes,\n pingedLanes = root$170.pingedLanes;\n JSCompiler_inline_result =\n (1 << (31 - clz32(42 | syncTransitionLanes) + 1)) - 1;\n JSCompiler_inline_result &=\n pendingLanes & ~(suspendedLanes & ~pingedLanes);\n JSCompiler_inline_result =\n JSCompiler_inline_result & 201326741\n ? (JSCompiler_inline_result & 201326741) | 1\n : JSCompiler_inline_result\n ? JSCompiler_inline_result | 2\n : 0;\n }\n 0 !== JSCompiler_inline_result &&\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n } else\n (JSCompiler_inline_result = workInProgressRootRenderLanes),\n (JSCompiler_inline_result = getNextLanes(\n root$170,\n root$170 === workInProgressRoot ? JSCompiler_inline_result : 0,\n null !== root$170.cancelPendingCommit ||\n -1 !== root$170.timeoutHandle\n )),\n 0 === (JSCompiler_inline_result & 3) ||\n checkIfRootIsPrerendering(root$170, JSCompiler_inline_result) ||\n ((didPerformSomeWork = !0),\n performSyncWorkOnRoot(root$170, JSCompiler_inline_result));\n root$170 = root$170.next;\n }\n } while (didPerformSomeWork);\n isFlushingWork = !1;\n }\n}\nfunction processRootScheduleInImmediateTask() {\n processRootScheduleInMicrotask();\n}\nfunction processRootScheduleInMicrotask() {\n mightHavePendingSyncWork = didScheduleMicrotask = !1;\n var syncTransitionLanes = 0;\n 0 !== currentEventTransitionLane &&\n shouldAttemptEagerTransition() &&\n (syncTransitionLanes = currentEventTransitionLane);\n for (\n var currentTime = now(), prev = null, root = firstScheduledRoot;\n null !== root;\n\n ) {\n var next = root.next,\n nextLanes = scheduleTaskForRootDuringMicrotask(root, currentTime);\n if (0 === nextLanes)\n (root.next = null),\n null === prev ? (firstScheduledRoot = next) : (prev.next = next),\n null === next && (lastScheduledRoot = prev);\n else if (\n ((prev = root), 0 !== syncTransitionLanes || 0 !== (nextLanes & 3))\n )\n mightHavePendingSyncWork = !0;\n root = next;\n }\n (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus) ||\n flushSyncWorkAcrossRoots_impl(syncTransitionLanes, !1);\n 0 !== currentEventTransitionLane && (currentEventTransitionLane = 0);\n}\nfunction scheduleTaskForRootDuringMicrotask(root, currentTime) {\n for (\n var suspendedLanes = root.suspendedLanes,\n pingedLanes = root.pingedLanes,\n expirationTimes = root.expirationTimes,\n lanes = root.pendingLanes & -62914561;\n 0 < lanes;\n\n ) {\n var index$5 = 31 - clz32(lanes),\n lane = 1 << index$5,\n expirationTime = expirationTimes[index$5];\n if (-1 === expirationTime) {\n if (0 === (lane & suspendedLanes) || 0 !== (lane & pingedLanes))\n expirationTimes[index$5] = computeExpirationTime(lane, currentTime);\n } else expirationTime <= currentTime && (root.expiredLanes |= lane);\n lanes &= ~lane;\n }\n currentTime = workInProgressRoot;\n suspendedLanes = workInProgressRootRenderLanes;\n suspendedLanes = getNextLanes(\n root,\n root === currentTime ? suspendedLanes : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n pingedLanes = root.callbackNode;\n if (\n 0 === suspendedLanes ||\n (root === currentTime &&\n (2 === workInProgressSuspendedReason ||\n 9 === workInProgressSuspendedReason)) ||\n null !== root.cancelPendingCommit\n )\n return (\n null !== pingedLanes &&\n null !== pingedLanes &&\n cancelCallback$1(pingedLanes),\n (root.callbackNode = null),\n (root.callbackPriority = 0)\n );\n if (\n 0 === (suspendedLanes & 3) ||\n checkIfRootIsPrerendering(root, suspendedLanes)\n ) {\n currentTime = suspendedLanes & -suspendedLanes;\n if (currentTime === root.callbackPriority) return currentTime;\n null !== pingedLanes && cancelCallback$1(pingedLanes);\n switch (lanesToEventPriority(suspendedLanes)) {\n case 2:\n case 8:\n suspendedLanes = UserBlockingPriority;\n break;\n case 32:\n suspendedLanes = NormalPriority$1;\n break;\n case 268435456:\n suspendedLanes = IdlePriority;\n break;\n default:\n suspendedLanes = NormalPriority$1;\n }\n pingedLanes = performWorkOnRootViaSchedulerTask.bind(null, root);\n suspendedLanes = scheduleCallback$3(suspendedLanes, pingedLanes);\n root.callbackPriority = currentTime;\n root.callbackNode = suspendedLanes;\n return currentTime;\n }\n null !== pingedLanes && null !== pingedLanes && cancelCallback$1(pingedLanes);\n root.callbackPriority = 2;\n root.callbackNode = null;\n return 2;\n}\nfunction performWorkOnRootViaSchedulerTask(root, didTimeout) {\n if (0 !== pendingEffectsStatus && 5 !== pendingEffectsStatus)\n return (root.callbackNode = null), (root.callbackPriority = 0), null;\n var originalCallbackNode = root.callbackNode;\n if (flushPendingEffects() && root.callbackNode !== originalCallbackNode)\n return null;\n var workInProgressRootRenderLanes$jscomp$0 = workInProgressRootRenderLanes;\n workInProgressRootRenderLanes$jscomp$0 = getNextLanes(\n root,\n root === workInProgressRoot ? workInProgressRootRenderLanes$jscomp$0 : 0,\n null !== root.cancelPendingCommit || -1 !== root.timeoutHandle\n );\n if (0 === workInProgressRootRenderLanes$jscomp$0) return null;\n performWorkOnRoot(root, workInProgressRootRenderLanes$jscomp$0, didTimeout);\n scheduleTaskForRootDuringMicrotask(root, now());\n return null != root.callbackNode && root.callbackNode === originalCallbackNode\n ? performWorkOnRootViaSchedulerTask.bind(null, root)\n : null;\n}\nfunction performSyncWorkOnRoot(root, lanes) {\n if (flushPendingEffects()) return null;\n performWorkOnRoot(root, lanes, !0);\n}\nfunction scheduleImmediateRootScheduleTask() {\n scheduleMicrotask(function () {\n 0 !== (executionContext & 6)\n ? scheduleCallback$3(\n ImmediatePriority,\n processRootScheduleInImmediateTask\n )\n : processRootScheduleInMicrotask();\n });\n}\nfunction requestTransitionLane() {\n if (0 === currentEventTransitionLane) {\n var actionScopeLane = currentEntangledLane;\n 0 === actionScopeLane &&\n ((actionScopeLane = nextTransitionUpdateLane),\n (nextTransitionUpdateLane <<= 1),\n 0 === (nextTransitionUpdateLane & 261888) &&\n (nextTransitionUpdateLane = 256));\n currentEventTransitionLane = actionScopeLane;\n }\n return currentEventTransitionLane;\n}\nfunction coerceFormActionProp(actionProp) {\n return null == actionProp ||\n \"symbol\" === typeof actionProp ||\n \"boolean\" === typeof actionProp\n ? null\n : \"function\" === typeof actionProp\n ? actionProp\n : sanitizeURL(\"\" + actionProp);\n}\nfunction createFormDataWithSubmitter(form, submitter) {\n var temp = submitter.ownerDocument.createElement(\"input\");\n temp.name = submitter.name;\n temp.value = submitter.value;\n form.id && temp.setAttribute(\"form\", form.id);\n submitter.parentNode.insertBefore(temp, submitter);\n form = new FormData(form);\n temp.parentNode.removeChild(temp);\n return form;\n}\nfunction extractEvents$1(\n dispatchQueue,\n domEventName,\n maybeTargetInst,\n nativeEvent,\n nativeEventTarget\n) {\n if (\n \"submit\" === domEventName &&\n maybeTargetInst &&\n maybeTargetInst.stateNode === nativeEventTarget\n ) {\n var action = coerceFormActionProp(\n (nativeEventTarget[internalPropsKey] || null).action\n ),\n submitter = nativeEvent.submitter;\n submitter &&\n ((domEventName = (domEventName = submitter[internalPropsKey] || null)\n ? coerceFormActionProp(domEventName.formAction)\n : submitter.getAttribute(\"formAction\")),\n null !== domEventName && ((action = domEventName), (submitter = null)));\n var event = new SyntheticEvent(\n \"action\",\n \"action\",\n null,\n nativeEvent,\n nativeEventTarget\n );\n dispatchQueue.push({\n event: event,\n listeners: [\n {\n instance: null,\n listener: function () {\n if (nativeEvent.defaultPrevented) {\n if (0 !== currentEventTransitionLane) {\n var formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget);\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n null,\n formData\n );\n }\n } else\n \"function\" === typeof action &&\n (event.preventDefault(),\n (formData = submitter\n ? createFormDataWithSubmitter(nativeEventTarget, submitter)\n : new FormData(nativeEventTarget)),\n startHostTransition(\n maybeTargetInst,\n {\n pending: !0,\n data: formData,\n method: nativeEventTarget.method,\n action: action\n },\n action,\n formData\n ));\n },\n currentTarget: nativeEventTarget\n }\n ]\n });\n }\n}\nfor (\n var i$jscomp$inline_1577 = 0;\n i$jscomp$inline_1577 < simpleEventPluginEvents.length;\n i$jscomp$inline_1577++\n) {\n var eventName$jscomp$inline_1578 =\n simpleEventPluginEvents[i$jscomp$inline_1577],\n domEventName$jscomp$inline_1579 =\n eventName$jscomp$inline_1578.toLowerCase(),\n capitalizedEvent$jscomp$inline_1580 =\n eventName$jscomp$inline_1578[0].toUpperCase() +\n eventName$jscomp$inline_1578.slice(1);\n registerSimpleEvent(\n domEventName$jscomp$inline_1579,\n \"on\" + capitalizedEvent$jscomp$inline_1580\n );\n}\nregisterSimpleEvent(ANIMATION_END, \"onAnimationEnd\");\nregisterSimpleEvent(ANIMATION_ITERATION, \"onAnimationIteration\");\nregisterSimpleEvent(ANIMATION_START, \"onAnimationStart\");\nregisterSimpleEvent(\"dblclick\", \"onDoubleClick\");\nregisterSimpleEvent(\"focusin\", \"onFocus\");\nregisterSimpleEvent(\"focusout\", \"onBlur\");\nregisterSimpleEvent(TRANSITION_RUN, \"onTransitionRun\");\nregisterSimpleEvent(TRANSITION_START, \"onTransitionStart\");\nregisterSimpleEvent(TRANSITION_CANCEL, \"onTransitionCancel\");\nregisterSimpleEvent(TRANSITION_END, \"onTransitionEnd\");\nregisterDirectEvent(\"onMouseEnter\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onMouseLeave\", [\"mouseout\", \"mouseover\"]);\nregisterDirectEvent(\"onPointerEnter\", [\"pointerout\", \"pointerover\"]);\nregisterDirectEvent(\"onPointerLeave\", [\"pointerout\", \"pointerover\"]);\nregisterTwoPhaseEvent(\n \"onChange\",\n \"change click focusin focusout input keydown keyup selectionchange\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onSelect\",\n \"focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange\".split(\n \" \"\n )\n);\nregisterTwoPhaseEvent(\"onBeforeInput\", [\n \"compositionend\",\n \"keypress\",\n \"textInput\",\n \"paste\"\n]);\nregisterTwoPhaseEvent(\n \"onCompositionEnd\",\n \"compositionend focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionStart\",\n \"compositionstart focusout keydown keypress keyup mousedown\".split(\" \")\n);\nregisterTwoPhaseEvent(\n \"onCompositionUpdate\",\n \"compositionupdate focusout keydown keypress keyup mousedown\".split(\" \")\n);\nvar mediaEventTypes =\n \"abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting\".split(\n \" \"\n ),\n nonDelegatedEvents = new Set(\n \"beforetoggle cancel close invalid load scroll scrollend toggle\"\n .split(\" \")\n .concat(mediaEventTypes)\n );\nfunction processDispatchQueue(dispatchQueue, eventSystemFlags) {\n eventSystemFlags = 0 !== (eventSystemFlags & 4);\n for (var i = 0; i < dispatchQueue.length; i++) {\n var _dispatchQueue$i = dispatchQueue[i],\n event = _dispatchQueue$i.event;\n _dispatchQueue$i = _dispatchQueue$i.listeners;\n a: {\n var previousInstance = void 0;\n if (eventSystemFlags)\n for (\n var i$jscomp$0 = _dispatchQueue$i.length - 1;\n 0 <= i$jscomp$0;\n i$jscomp$0--\n ) {\n var _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0],\n instance = _dispatchListeners$i.instance,\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n else\n for (\n i$jscomp$0 = 0;\n i$jscomp$0 < _dispatchQueue$i.length;\n i$jscomp$0++\n ) {\n _dispatchListeners$i = _dispatchQueue$i[i$jscomp$0];\n instance = _dispatchListeners$i.instance;\n currentTarget = _dispatchListeners$i.currentTarget;\n _dispatchListeners$i = _dispatchListeners$i.listener;\n if (instance !== previousInstance && event.isPropagationStopped())\n break a;\n previousInstance = _dispatchListeners$i;\n event.currentTarget = currentTarget;\n try {\n previousInstance(event);\n } catch (error) {\n reportGlobalError(error);\n }\n event.currentTarget = null;\n previousInstance = instance;\n }\n }\n }\n}\nfunction listenToNonDelegatedEvent(domEventName, targetElement) {\n var JSCompiler_inline_result = targetElement[internalEventHandlersKey];\n void 0 === JSCompiler_inline_result &&\n (JSCompiler_inline_result = targetElement[internalEventHandlersKey] =\n new Set());\n var listenerSetKey = domEventName + \"__bubble\";\n JSCompiler_inline_result.has(listenerSetKey) ||\n (addTrappedEventListener(targetElement, domEventName, 2, !1),\n JSCompiler_inline_result.add(listenerSetKey));\n}\nfunction listenToNativeEvent(domEventName, isCapturePhaseListener, target) {\n var eventSystemFlags = 0;\n isCapturePhaseListener && (eventSystemFlags |= 4);\n addTrappedEventListener(\n target,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n );\n}\nvar listeningMarker = \"_reactListening\" + Math.random().toString(36).slice(2);\nfunction listenToAllSupportedEvents(rootContainerElement) {\n if (!rootContainerElement[listeningMarker]) {\n rootContainerElement[listeningMarker] = !0;\n allNativeEvents.forEach(function (domEventName) {\n \"selectionchange\" !== domEventName &&\n (nonDelegatedEvents.has(domEventName) ||\n listenToNativeEvent(domEventName, !1, rootContainerElement),\n listenToNativeEvent(domEventName, !0, rootContainerElement));\n });\n var ownerDocument =\n 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n null === ownerDocument ||\n ownerDocument[listeningMarker] ||\n ((ownerDocument[listeningMarker] = !0),\n listenToNativeEvent(\"selectionchange\", !1, ownerDocument));\n }\n}\nfunction addTrappedEventListener(\n targetContainer,\n domEventName,\n eventSystemFlags,\n isCapturePhaseListener\n) {\n switch (getEventPriority(domEventName)) {\n case 2:\n var listenerWrapper = dispatchDiscreteEvent;\n break;\n case 8:\n listenerWrapper = dispatchContinuousEvent;\n break;\n default:\n listenerWrapper = dispatchEvent;\n }\n eventSystemFlags = listenerWrapper.bind(\n null,\n domEventName,\n eventSystemFlags,\n targetContainer\n );\n listenerWrapper = void 0;\n !passiveBrowserEventsSupported ||\n (\"touchstart\" !== domEventName &&\n \"touchmove\" !== domEventName &&\n \"wheel\" !== domEventName) ||\n (listenerWrapper = !0);\n isCapturePhaseListener\n ? void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n capture: !0,\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !0)\n : void 0 !== listenerWrapper\n ? targetContainer.addEventListener(domEventName, eventSystemFlags, {\n passive: listenerWrapper\n })\n : targetContainer.addEventListener(domEventName, eventSystemFlags, !1);\n}\nfunction dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n targetInst$jscomp$0,\n targetContainer\n) {\n var ancestorInst = targetInst$jscomp$0;\n if (\n 0 === (eventSystemFlags & 1) &&\n 0 === (eventSystemFlags & 2) &&\n null !== targetInst$jscomp$0\n )\n a: for (;;) {\n if (null === targetInst$jscomp$0) return;\n var nodeTag = targetInst$jscomp$0.tag;\n if (3 === nodeTag || 4 === nodeTag) {\n var container = targetInst$jscomp$0.stateNode.containerInfo;\n if (container === targetContainer) break;\n if (4 === nodeTag)\n for (nodeTag = targetInst$jscomp$0.return; null !== nodeTag; ) {\n var grandTag = nodeTag.tag;\n if (\n (3 === grandTag || 4 === grandTag) &&\n nodeTag.stateNode.containerInfo === targetContainer\n )\n return;\n nodeTag = nodeTag.return;\n }\n for (; null !== container; ) {\n nodeTag = getClosestInstanceFromNode(container);\n if (null === nodeTag) return;\n grandTag = nodeTag.tag;\n if (\n 5 === grandTag ||\n 6 === grandTag ||\n 26 === grandTag ||\n 27 === grandTag\n ) {\n targetInst$jscomp$0 = ancestorInst = nodeTag;\n continue a;\n }\n container = container.parentNode;\n }\n }\n targetInst$jscomp$0 = targetInst$jscomp$0.return;\n }\n batchedUpdates$1(function () {\n var targetInst = ancestorInst,\n nativeEventTarget = getEventTarget(nativeEvent),\n dispatchQueue = [];\n a: {\n var reactName = topLevelEventsToReactNames.get(domEventName);\n if (void 0 !== reactName) {\n var SyntheticEventCtor = SyntheticEvent,\n reactEventType = domEventName;\n switch (domEventName) {\n case \"keypress\":\n if (0 === getEventCharCode(nativeEvent)) break a;\n case \"keydown\":\n case \"keyup\":\n SyntheticEventCtor = SyntheticKeyboardEvent;\n break;\n case \"focusin\":\n reactEventType = \"focus\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"focusout\":\n reactEventType = \"blur\";\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"beforeblur\":\n case \"afterblur\":\n SyntheticEventCtor = SyntheticFocusEvent;\n break;\n case \"click\":\n if (2 === nativeEvent.button) break a;\n case \"auxclick\":\n case \"dblclick\":\n case \"mousedown\":\n case \"mousemove\":\n case \"mouseup\":\n case \"mouseout\":\n case \"mouseover\":\n case \"contextmenu\":\n SyntheticEventCtor = SyntheticMouseEvent;\n break;\n case \"drag\":\n case \"dragend\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"dragstart\":\n case \"drop\":\n SyntheticEventCtor = SyntheticDragEvent;\n break;\n case \"touchcancel\":\n case \"touchend\":\n case \"touchmove\":\n case \"touchstart\":\n SyntheticEventCtor = SyntheticTouchEvent;\n break;\n case ANIMATION_END:\n case ANIMATION_ITERATION:\n case ANIMATION_START:\n SyntheticEventCtor = SyntheticAnimationEvent;\n break;\n case TRANSITION_END:\n SyntheticEventCtor = SyntheticTransitionEvent;\n break;\n case \"scroll\":\n case \"scrollend\":\n SyntheticEventCtor = SyntheticUIEvent;\n break;\n case \"wheel\":\n SyntheticEventCtor = SyntheticWheelEvent;\n break;\n case \"copy\":\n case \"cut\":\n case \"paste\":\n SyntheticEventCtor = SyntheticClipboardEvent;\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"pointerup\":\n SyntheticEventCtor = SyntheticPointerEvent;\n break;\n case \"toggle\":\n case \"beforetoggle\":\n SyntheticEventCtor = SyntheticToggleEvent;\n }\n var inCapturePhase = 0 !== (eventSystemFlags & 4),\n accumulateTargetOnly =\n !inCapturePhase &&\n (\"scroll\" === domEventName || \"scrollend\" === domEventName),\n reactEventName = inCapturePhase\n ? null !== reactName\n ? reactName + \"Capture\"\n : null\n : reactName;\n inCapturePhase = [];\n for (\n var instance = targetInst, lastHostComponent;\n null !== instance;\n\n ) {\n var _instance = instance;\n lastHostComponent = _instance.stateNode;\n _instance = _instance.tag;\n (5 !== _instance && 26 !== _instance && 27 !== _instance) ||\n null === lastHostComponent ||\n null === reactEventName ||\n ((_instance = getListener(instance, reactEventName)),\n null != _instance &&\n inCapturePhase.push(\n createDispatchListener(instance, _instance, lastHostComponent)\n ));\n if (accumulateTargetOnly) break;\n instance = instance.return;\n }\n 0 < inCapturePhase.length &&\n ((reactName = new SyntheticEventCtor(\n reactName,\n reactEventType,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: reactName, listeners: inCapturePhase }));\n }\n }\n if (0 === (eventSystemFlags & 7)) {\n a: {\n reactName =\n \"mouseover\" === domEventName || \"pointerover\" === domEventName;\n SyntheticEventCtor =\n \"mouseout\" === domEventName || \"pointerout\" === domEventName;\n if (\n reactName &&\n nativeEvent !== currentReplayingEvent &&\n (reactEventType =\n nativeEvent.relatedTarget || nativeEvent.fromElement) &&\n (getClosestInstanceFromNode(reactEventType) ||\n reactEventType[internalContainerInstanceKey])\n )\n break a;\n if (SyntheticEventCtor || reactName) {\n reactName =\n nativeEventTarget.window === nativeEventTarget\n ? nativeEventTarget\n : (reactName = nativeEventTarget.ownerDocument)\n ? reactName.defaultView || reactName.parentWindow\n : window;\n if (SyntheticEventCtor) {\n if (\n ((reactEventType =\n nativeEvent.relatedTarget || nativeEvent.toElement),\n (SyntheticEventCtor = targetInst),\n (reactEventType = reactEventType\n ? getClosestInstanceFromNode(reactEventType)\n : null),\n null !== reactEventType &&\n ((accumulateTargetOnly =\n getNearestMountedFiber(reactEventType)),\n (inCapturePhase = reactEventType.tag),\n reactEventType !== accumulateTargetOnly ||\n (5 !== inCapturePhase &&\n 27 !== inCapturePhase &&\n 6 !== inCapturePhase)))\n )\n reactEventType = null;\n } else (SyntheticEventCtor = null), (reactEventType = targetInst);\n if (SyntheticEventCtor !== reactEventType) {\n inCapturePhase = SyntheticMouseEvent;\n _instance = \"onMouseLeave\";\n reactEventName = \"onMouseEnter\";\n instance = \"mouse\";\n if (\"pointerout\" === domEventName || \"pointerover\" === domEventName)\n (inCapturePhase = SyntheticPointerEvent),\n (_instance = \"onPointerLeave\"),\n (reactEventName = \"onPointerEnter\"),\n (instance = \"pointer\");\n accumulateTargetOnly =\n null == SyntheticEventCtor\n ? reactName\n : getNodeFromInstance(SyntheticEventCtor);\n lastHostComponent =\n null == reactEventType\n ? reactName\n : getNodeFromInstance(reactEventType);\n reactName = new inCapturePhase(\n _instance,\n instance + \"leave\",\n SyntheticEventCtor,\n nativeEvent,\n nativeEventTarget\n );\n reactName.target = accumulateTargetOnly;\n reactName.relatedTarget = lastHostComponent;\n _instance = null;\n getClosestInstanceFromNode(nativeEventTarget) === targetInst &&\n ((inCapturePhase = new inCapturePhase(\n reactEventName,\n instance + \"enter\",\n reactEventType,\n nativeEvent,\n nativeEventTarget\n )),\n (inCapturePhase.target = lastHostComponent),\n (inCapturePhase.relatedTarget = accumulateTargetOnly),\n (_instance = inCapturePhase));\n accumulateTargetOnly = _instance;\n if (SyntheticEventCtor && reactEventType)\n b: {\n inCapturePhase = getParent;\n reactEventName = SyntheticEventCtor;\n instance = reactEventType;\n lastHostComponent = 0;\n for (\n _instance = reactEventName;\n _instance;\n _instance = inCapturePhase(_instance)\n )\n lastHostComponent++;\n _instance = 0;\n for (var tempB = instance; tempB; tempB = inCapturePhase(tempB))\n _instance++;\n for (; 0 < lastHostComponent - _instance; )\n (reactEventName = inCapturePhase(reactEventName)),\n lastHostComponent--;\n for (; 0 < _instance - lastHostComponent; )\n (instance = inCapturePhase(instance)), _instance--;\n for (; lastHostComponent--; ) {\n if (\n reactEventName === instance ||\n (null !== instance && reactEventName === instance.alternate)\n ) {\n inCapturePhase = reactEventName;\n break b;\n }\n reactEventName = inCapturePhase(reactEventName);\n instance = inCapturePhase(instance);\n }\n inCapturePhase = null;\n }\n else inCapturePhase = null;\n null !== SyntheticEventCtor &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n reactName,\n SyntheticEventCtor,\n inCapturePhase,\n !1\n );\n null !== reactEventType &&\n null !== accumulateTargetOnly &&\n accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n accumulateTargetOnly,\n reactEventType,\n inCapturePhase,\n !0\n );\n }\n }\n }\n a: {\n reactName = targetInst ? getNodeFromInstance(targetInst) : window;\n SyntheticEventCtor =\n reactName.nodeName && reactName.nodeName.toLowerCase();\n if (\n \"select\" === SyntheticEventCtor ||\n (\"input\" === SyntheticEventCtor && \"file\" === reactName.type)\n )\n var getTargetInstFunc = getTargetInstForChangeEvent;\n else if (isTextInputElement(reactName))\n if (isInputEventSupported)\n getTargetInstFunc = getTargetInstForInputOrChangeEvent;\n else {\n getTargetInstFunc = getTargetInstForInputEventPolyfill;\n var handleEventFunc = handleEventsForInputEventPolyfill;\n }\n else\n (SyntheticEventCtor = reactName.nodeName),\n !SyntheticEventCtor ||\n \"input\" !== SyntheticEventCtor.toLowerCase() ||\n (\"checkbox\" !== reactName.type && \"radio\" !== reactName.type)\n ? targetInst &&\n isCustomElement(targetInst.elementType) &&\n (getTargetInstFunc = getTargetInstForChangeEvent)\n : (getTargetInstFunc = getTargetInstForClickEvent);\n if (\n getTargetInstFunc &&\n (getTargetInstFunc = getTargetInstFunc(domEventName, targetInst))\n ) {\n createAndAccumulateChangeEvent(\n dispatchQueue,\n getTargetInstFunc,\n nativeEvent,\n nativeEventTarget\n );\n break a;\n }\n handleEventFunc && handleEventFunc(domEventName, reactName, targetInst);\n \"focusout\" === domEventName &&\n targetInst &&\n \"number\" === reactName.type &&\n null != targetInst.memoizedProps.value &&\n setDefaultValue(reactName, \"number\", reactName.value);\n }\n handleEventFunc = targetInst ? getNodeFromInstance(targetInst) : window;\n switch (domEventName) {\n case \"focusin\":\n if (\n isTextInputElement(handleEventFunc) ||\n \"true\" === handleEventFunc.contentEditable\n )\n (activeElement = handleEventFunc),\n (activeElementInst = targetInst),\n (lastSelection = null);\n break;\n case \"focusout\":\n lastSelection = activeElementInst = activeElement = null;\n break;\n case \"mousedown\":\n mouseDown = !0;\n break;\n case \"contextmenu\":\n case \"mouseup\":\n case \"dragend\":\n mouseDown = !1;\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n break;\n case \"selectionchange\":\n if (skipSelectionChangeEvent) break;\n case \"keydown\":\n case \"keyup\":\n constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);\n }\n var fallbackData;\n if (canUseCompositionEvent)\n b: {\n switch (domEventName) {\n case \"compositionstart\":\n var eventType = \"onCompositionStart\";\n break b;\n case \"compositionend\":\n eventType = \"onCompositionEnd\";\n break b;\n case \"compositionupdate\":\n eventType = \"onCompositionUpdate\";\n break b;\n }\n eventType = void 0;\n }\n else\n isComposing\n ? isFallbackCompositionEnd(domEventName, nativeEvent) &&\n (eventType = \"onCompositionEnd\")\n : \"keydown\" === domEventName &&\n 229 === nativeEvent.keyCode &&\n (eventType = \"onCompositionStart\");\n eventType &&\n (useFallbackCompositionData &&\n \"ko\" !== nativeEvent.locale &&\n (isComposing || \"onCompositionStart\" !== eventType\n ? \"onCompositionEnd\" === eventType &&\n isComposing &&\n (fallbackData = getData())\n : ((root = nativeEventTarget),\n (startText = \"value\" in root ? root.value : root.textContent),\n (isComposing = !0))),\n (handleEventFunc = accumulateTwoPhaseListeners(targetInst, eventType)),\n 0 < handleEventFunc.length &&\n ((eventType = new SyntheticCompositionEvent(\n eventType,\n domEventName,\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({ event: eventType, listeners: handleEventFunc }),\n fallbackData\n ? (eventType.data = fallbackData)\n : ((fallbackData = getDataFromCustomEvent(nativeEvent)),\n null !== fallbackData && (eventType.data = fallbackData))));\n if (\n (fallbackData = canUseTextInputEvent\n ? getNativeBeforeInputChars(domEventName, nativeEvent)\n : getFallbackBeforeInputChars(domEventName, nativeEvent))\n )\n (eventType = accumulateTwoPhaseListeners(targetInst, \"onBeforeInput\")),\n 0 < eventType.length &&\n ((handleEventFunc = new SyntheticCompositionEvent(\n \"onBeforeInput\",\n \"beforeinput\",\n null,\n nativeEvent,\n nativeEventTarget\n )),\n dispatchQueue.push({\n event: handleEventFunc,\n listeners: eventType\n }),\n (handleEventFunc.data = fallbackData));\n extractEvents$1(\n dispatchQueue,\n domEventName,\n targetInst,\n nativeEvent,\n nativeEventTarget\n );\n }\n processDispatchQueue(dispatchQueue, eventSystemFlags);\n });\n}\nfunction createDispatchListener(instance, listener, currentTarget) {\n return {\n instance: instance,\n listener: listener,\n currentTarget: currentTarget\n };\n}\nfunction accumulateTwoPhaseListeners(targetFiber, reactName) {\n for (\n var captureName = reactName + \"Capture\", listeners = [];\n null !== targetFiber;\n\n ) {\n var _instance2 = targetFiber,\n stateNode = _instance2.stateNode;\n _instance2 = _instance2.tag;\n (5 !== _instance2 && 26 !== _instance2 && 27 !== _instance2) ||\n null === stateNode ||\n ((_instance2 = getListener(targetFiber, captureName)),\n null != _instance2 &&\n listeners.unshift(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ),\n (_instance2 = getListener(targetFiber, reactName)),\n null != _instance2 &&\n listeners.push(\n createDispatchListener(targetFiber, _instance2, stateNode)\n ));\n if (3 === targetFiber.tag) return listeners;\n targetFiber = targetFiber.return;\n }\n return [];\n}\nfunction getParent(inst) {\n if (null === inst) return null;\n do inst = inst.return;\n while (inst && 5 !== inst.tag && 27 !== inst.tag);\n return inst ? inst : null;\n}\nfunction accumulateEnterLeaveListenersForEvent(\n dispatchQueue,\n event,\n target,\n common,\n inCapturePhase\n) {\n for (\n var registrationName = event._reactName, listeners = [];\n null !== target && target !== common;\n\n ) {\n var _instance3 = target,\n alternate = _instance3.alternate,\n stateNode = _instance3.stateNode;\n _instance3 = _instance3.tag;\n if (null !== alternate && alternate === common) break;\n (5 !== _instance3 && 26 !== _instance3 && 27 !== _instance3) ||\n null === stateNode ||\n ((alternate = stateNode),\n inCapturePhase\n ? ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.unshift(\n createDispatchListener(target, stateNode, alternate)\n ))\n : inCapturePhase ||\n ((stateNode = getListener(target, registrationName)),\n null != stateNode &&\n listeners.push(\n createDispatchListener(target, stateNode, alternate)\n )));\n target = target.return;\n }\n 0 !== listeners.length &&\n dispatchQueue.push({ event: event, listeners: listeners });\n}\nvar NORMALIZE_NEWLINES_REGEX = /\\r\\n?/g,\n NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\\u0000|\\uFFFD/g;\nfunction normalizeMarkupForTextOrAttribute(markup) {\n return (\"string\" === typeof markup ? markup : \"\" + markup)\n .replace(NORMALIZE_NEWLINES_REGEX, \"\\n\")\n .replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, \"\");\n}\nfunction checkForUnmatchedText(serverText, clientText) {\n clientText = normalizeMarkupForTextOrAttribute(clientText);\n return normalizeMarkupForTextOrAttribute(serverText) === clientText ? !0 : !1;\n}\nfunction setProp(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"children\":\n \"string\" === typeof value\n ? \"body\" === tag ||\n (\"textarea\" === tag && \"\" === value) ||\n setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n \"body\" !== tag &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"className\":\n setValueForKnownAttribute(domElement, \"class\", value);\n break;\n case \"tabIndex\":\n setValueForKnownAttribute(domElement, \"tabindex\", value);\n break;\n case \"dir\":\n case \"role\":\n case \"viewBox\":\n case \"width\":\n case \"height\":\n setValueForKnownAttribute(domElement, key, value);\n break;\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"data\":\n if (\"object\" !== tag) {\n setValueForKnownAttribute(domElement, \"data\", value);\n break;\n }\n case \"src\":\n case \"href\":\n if (\"\" === value && (\"a\" !== tag || \"href\" !== key)) {\n domElement.removeAttribute(key);\n break;\n }\n if (\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"action\":\n case \"formAction\":\n if (\"function\" === typeof value) {\n domElement.setAttribute(\n key,\n \"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')\"\n );\n break;\n } else\n \"function\" === typeof prevValue &&\n (\"formAction\" === key\n ? (\"input\" !== tag &&\n setProp(domElement, tag, \"name\", props.name, props, null),\n setProp(\n domElement,\n tag,\n \"formEncType\",\n props.formEncType,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formMethod\",\n props.formMethod,\n props,\n null\n ),\n setProp(\n domElement,\n tag,\n \"formTarget\",\n props.formTarget,\n props,\n null\n ))\n : (setProp(domElement, tag, \"encType\", props.encType, props, null),\n setProp(domElement, tag, \"method\", props.method, props, null),\n setProp(domElement, tag, \"target\", props.target, props, null)));\n if (\n null == value ||\n \"symbol\" === typeof value ||\n \"boolean\" === typeof value\n ) {\n domElement.removeAttribute(key);\n break;\n }\n value = sanitizeURL(\"\" + value);\n domElement.setAttribute(key, value);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"multiple\":\n domElement.multiple =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"muted\":\n domElement.muted =\n value && \"function\" !== typeof value && \"symbol\" !== typeof value;\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"defaultValue\":\n case \"defaultChecked\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"autoFocus\":\n break;\n case \"xlinkHref\":\n if (\n null == value ||\n \"function\" === typeof value ||\n \"boolean\" === typeof value ||\n \"symbol\" === typeof value\n ) {\n domElement.removeAttribute(\"xlink:href\");\n break;\n }\n key = sanitizeURL(\"\" + value);\n domElement.setAttributeNS(\n \"http://www.w3.org/1999/xlink\",\n \"xlink:href\",\n key\n );\n break;\n case \"contentEditable\":\n case \"spellCheck\":\n case \"draggable\":\n case \"value\":\n case \"autoReverse\":\n case \"externalResourcesRequired\":\n case \"focusable\":\n case \"preserveAlpha\":\n null != value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\" + value)\n : domElement.removeAttribute(key);\n break;\n case \"inert\":\n case \"allowFullScreen\":\n case \"async\":\n case \"autoPlay\":\n case \"controls\":\n case \"default\":\n case \"defer\":\n case \"disabled\":\n case \"disablePictureInPicture\":\n case \"disableRemotePlayback\":\n case \"formNoValidate\":\n case \"hidden\":\n case \"loop\":\n case \"noModule\":\n case \"noValidate\":\n case \"open\":\n case \"playsInline\":\n case \"readOnly\":\n case \"required\":\n case \"reversed\":\n case \"scoped\":\n case \"seamless\":\n case \"itemScope\":\n value && \"function\" !== typeof value && \"symbol\" !== typeof value\n ? domElement.setAttribute(key, \"\")\n : domElement.removeAttribute(key);\n break;\n case \"capture\":\n case \"download\":\n !0 === value\n ? domElement.setAttribute(key, \"\")\n : !1 !== value &&\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"cols\":\n case \"rows\":\n case \"size\":\n case \"span\":\n null != value &&\n \"function\" !== typeof value &&\n \"symbol\" !== typeof value &&\n !isNaN(value) &&\n 1 <= value\n ? domElement.setAttribute(key, value)\n : domElement.removeAttribute(key);\n break;\n case \"rowSpan\":\n case \"start\":\n null == value ||\n \"function\" === typeof value ||\n \"symbol\" === typeof value ||\n isNaN(value)\n ? domElement.removeAttribute(key)\n : domElement.setAttribute(key, value);\n break;\n case \"popover\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n setValueForAttribute(domElement, \"popover\", value);\n break;\n case \"xlinkActuate\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:actuate\",\n value\n );\n break;\n case \"xlinkArcrole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:arcrole\",\n value\n );\n break;\n case \"xlinkRole\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:role\",\n value\n );\n break;\n case \"xlinkShow\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:show\",\n value\n );\n break;\n case \"xlinkTitle\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:title\",\n value\n );\n break;\n case \"xlinkType\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/1999/xlink\",\n \"xlink:type\",\n value\n );\n break;\n case \"xmlBase\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:base\",\n value\n );\n break;\n case \"xmlLang\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:lang\",\n value\n );\n break;\n case \"xmlSpace\":\n setValueForNamespacedAttribute(\n domElement,\n \"http://www.w3.org/XML/1998/namespace\",\n \"xml:space\",\n value\n );\n break;\n case \"is\":\n setValueForAttribute(domElement, \"is\", value);\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (\n !(2 < key.length) ||\n (\"o\" !== key[0] && \"O\" !== key[0]) ||\n (\"n\" !== key[1] && \"N\" !== key[1])\n )\n (key = aliases.get(key) || key),\n setValueForAttribute(domElement, key, value);\n }\n}\nfunction setPropOnCustomElement(domElement, tag, key, value, props, prevValue) {\n switch (key) {\n case \"style\":\n setValueForStyles(domElement, value, prevValue);\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != value) {\n if (\"object\" !== typeof value || !(\"__html\" in value))\n throw Error(formatProdErrorMessage(61));\n key = value.__html;\n if (null != key) {\n if (null != props.children) throw Error(formatProdErrorMessage(60));\n domElement.innerHTML = key;\n }\n }\n break;\n case \"children\":\n \"string\" === typeof value\n ? setTextContent(domElement, value)\n : (\"number\" === typeof value || \"bigint\" === typeof value) &&\n setTextContent(domElement, \"\" + value);\n break;\n case \"onScroll\":\n null != value && listenToNonDelegatedEvent(\"scroll\", domElement);\n break;\n case \"onScrollEnd\":\n null != value && listenToNonDelegatedEvent(\"scrollend\", domElement);\n break;\n case \"onClick\":\n null != value && (domElement.onclick = noop$1);\n break;\n case \"suppressContentEditableWarning\":\n case \"suppressHydrationWarning\":\n case \"innerHTML\":\n case \"ref\":\n break;\n case \"innerText\":\n case \"textContent\":\n break;\n default:\n if (!registrationNameDependencies.hasOwnProperty(key))\n a: {\n if (\n \"o\" === key[0] &&\n \"n\" === key[1] &&\n ((props = key.endsWith(\"Capture\")),\n (tag = key.slice(2, props ? key.length - 7 : void 0)),\n (prevValue = domElement[internalPropsKey] || null),\n (prevValue = null != prevValue ? prevValue[key] : null),\n \"function\" === typeof prevValue &&\n domElement.removeEventListener(tag, prevValue, props),\n \"function\" === typeof value)\n ) {\n \"function\" !== typeof prevValue &&\n null !== prevValue &&\n (key in domElement\n ? (domElement[key] = null)\n : domElement.hasAttribute(key) &&\n domElement.removeAttribute(key));\n domElement.addEventListener(tag, value, props);\n break a;\n }\n key in domElement\n ? (domElement[key] = value)\n : !0 === value\n ? domElement.setAttribute(key, \"\")\n : setValueForAttribute(domElement, key, value);\n }\n }\n}\nfunction setInitialProperties(domElement, tag, props) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"img\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n var hasSrc = !1,\n hasSrcSet = !1,\n propKey;\n for (propKey in props)\n if (props.hasOwnProperty(propKey)) {\n var propValue = props[propKey];\n if (null != propValue)\n switch (propKey) {\n case \"src\":\n hasSrc = !0;\n break;\n case \"srcSet\":\n hasSrcSet = !0;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, propKey, propValue, props, null);\n }\n }\n hasSrcSet &&\n setProp(domElement, tag, \"srcSet\", props.srcSet, props, null);\n hasSrc && setProp(domElement, tag, \"src\", props.src, props, null);\n return;\n case \"input\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n var defaultValue = (propKey = propValue = hasSrcSet = null),\n checked = null,\n defaultChecked = null;\n for (hasSrc in props)\n if (props.hasOwnProperty(hasSrc)) {\n var propValue$184 = props[hasSrc];\n if (null != propValue$184)\n switch (hasSrc) {\n case \"name\":\n hasSrcSet = propValue$184;\n break;\n case \"type\":\n propValue = propValue$184;\n break;\n case \"checked\":\n checked = propValue$184;\n break;\n case \"defaultChecked\":\n defaultChecked = propValue$184;\n break;\n case \"value\":\n propKey = propValue$184;\n break;\n case \"defaultValue\":\n defaultValue = propValue$184;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propValue$184)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(domElement, tag, hasSrc, propValue$184, props, null);\n }\n }\n initInput(\n domElement,\n propKey,\n defaultValue,\n checked,\n defaultChecked,\n propValue,\n hasSrcSet,\n !1\n );\n return;\n case \"select\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n hasSrc = propValue = propKey = null;\n for (hasSrcSet in props)\n if (\n props.hasOwnProperty(hasSrcSet) &&\n ((defaultValue = props[hasSrcSet]), null != defaultValue)\n )\n switch (hasSrcSet) {\n case \"value\":\n propKey = defaultValue;\n break;\n case \"defaultValue\":\n propValue = defaultValue;\n break;\n case \"multiple\":\n hasSrc = defaultValue;\n default:\n setProp(domElement, tag, hasSrcSet, defaultValue, props, null);\n }\n tag = propKey;\n props = propValue;\n domElement.multiple = !!hasSrc;\n null != tag\n ? updateOptions(domElement, !!hasSrc, tag, !1)\n : null != props && updateOptions(domElement, !!hasSrc, props, !0);\n return;\n case \"textarea\":\n listenToNonDelegatedEvent(\"invalid\", domElement);\n propKey = hasSrcSet = hasSrc = null;\n for (propValue in props)\n if (\n props.hasOwnProperty(propValue) &&\n ((defaultValue = props[propValue]), null != defaultValue)\n )\n switch (propValue) {\n case \"value\":\n hasSrc = defaultValue;\n break;\n case \"defaultValue\":\n hasSrcSet = defaultValue;\n break;\n case \"children\":\n propKey = defaultValue;\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != defaultValue) throw Error(formatProdErrorMessage(91));\n break;\n default:\n setProp(domElement, tag, propValue, defaultValue, props, null);\n }\n initTextarea(domElement, hasSrc, hasSrcSet, propKey);\n return;\n case \"option\":\n for (checked in props)\n if (\n props.hasOwnProperty(checked) &&\n ((hasSrc = props[checked]), null != hasSrc)\n )\n switch (checked) {\n case \"selected\":\n domElement.selected =\n hasSrc &&\n \"function\" !== typeof hasSrc &&\n \"symbol\" !== typeof hasSrc;\n break;\n default:\n setProp(domElement, tag, checked, hasSrc, props, null);\n }\n return;\n case \"dialog\":\n listenToNonDelegatedEvent(\"beforetoggle\", domElement);\n listenToNonDelegatedEvent(\"toggle\", domElement);\n listenToNonDelegatedEvent(\"cancel\", domElement);\n listenToNonDelegatedEvent(\"close\", domElement);\n break;\n case \"iframe\":\n case \"object\":\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"video\":\n case \"audio\":\n for (hasSrc = 0; hasSrc < mediaEventTypes.length; hasSrc++)\n listenToNonDelegatedEvent(mediaEventTypes[hasSrc], domElement);\n break;\n case \"image\":\n listenToNonDelegatedEvent(\"error\", domElement);\n listenToNonDelegatedEvent(\"load\", domElement);\n break;\n case \"details\":\n listenToNonDelegatedEvent(\"toggle\", domElement);\n break;\n case \"embed\":\n case \"source\":\n case \"link\":\n listenToNonDelegatedEvent(\"error\", domElement),\n listenToNonDelegatedEvent(\"load\", domElement);\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (defaultChecked in props)\n if (\n props.hasOwnProperty(defaultChecked) &&\n ((hasSrc = props[defaultChecked]), null != hasSrc)\n )\n switch (defaultChecked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n throw Error(formatProdErrorMessage(137, tag));\n default:\n setProp(domElement, tag, defaultChecked, hasSrc, props, null);\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (propValue$184 in props)\n props.hasOwnProperty(propValue$184) &&\n ((hasSrc = props[propValue$184]),\n void 0 !== hasSrc &&\n setPropOnCustomElement(\n domElement,\n tag,\n propValue$184,\n hasSrc,\n props,\n void 0\n ));\n return;\n }\n }\n for (defaultValue in props)\n props.hasOwnProperty(defaultValue) &&\n ((hasSrc = props[defaultValue]),\n null != hasSrc &&\n setProp(domElement, tag, defaultValue, hasSrc, props, null));\n}\nfunction updateProperties(domElement, tag, lastProps, nextProps) {\n switch (tag) {\n case \"div\":\n case \"span\":\n case \"svg\":\n case \"path\":\n case \"a\":\n case \"g\":\n case \"p\":\n case \"li\":\n break;\n case \"input\":\n var name = null,\n type = null,\n value = null,\n defaultValue = null,\n lastDefaultValue = null,\n checked = null,\n defaultChecked = null;\n for (propKey in lastProps) {\n var lastProp = lastProps[propKey];\n if (lastProps.hasOwnProperty(propKey) && null != lastProp)\n switch (propKey) {\n case \"checked\":\n break;\n case \"value\":\n break;\n case \"defaultValue\":\n lastDefaultValue = lastProp;\n default:\n nextProps.hasOwnProperty(propKey) ||\n setProp(domElement, tag, propKey, null, nextProps, lastProp);\n }\n }\n for (var propKey$201 in nextProps) {\n var propKey = nextProps[propKey$201];\n lastProp = lastProps[propKey$201];\n if (\n nextProps.hasOwnProperty(propKey$201) &&\n (null != propKey || null != lastProp)\n )\n switch (propKey$201) {\n case \"type\":\n type = propKey;\n break;\n case \"name\":\n name = propKey;\n break;\n case \"checked\":\n checked = propKey;\n break;\n case \"defaultChecked\":\n defaultChecked = propKey;\n break;\n case \"value\":\n value = propKey;\n break;\n case \"defaultValue\":\n defaultValue = propKey;\n break;\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n propKey !== lastProp &&\n setProp(\n domElement,\n tag,\n propKey$201,\n propKey,\n nextProps,\n lastProp\n );\n }\n }\n updateInput(\n domElement,\n value,\n defaultValue,\n lastDefaultValue,\n checked,\n defaultChecked,\n type,\n name\n );\n return;\n case \"select\":\n propKey = value = defaultValue = propKey$201 = null;\n for (type in lastProps)\n if (\n ((lastDefaultValue = lastProps[type]),\n lastProps.hasOwnProperty(type) && null != lastDefaultValue)\n )\n switch (type) {\n case \"value\":\n break;\n case \"multiple\":\n propKey = lastDefaultValue;\n default:\n nextProps.hasOwnProperty(type) ||\n setProp(\n domElement,\n tag,\n type,\n null,\n nextProps,\n lastDefaultValue\n );\n }\n for (name in nextProps)\n if (\n ((type = nextProps[name]),\n (lastDefaultValue = lastProps[name]),\n nextProps.hasOwnProperty(name) &&\n (null != type || null != lastDefaultValue))\n )\n switch (name) {\n case \"value\":\n propKey$201 = type;\n break;\n case \"defaultValue\":\n defaultValue = type;\n break;\n case \"multiple\":\n value = type;\n default:\n type !== lastDefaultValue &&\n setProp(\n domElement,\n tag,\n name,\n type,\n nextProps,\n lastDefaultValue\n );\n }\n tag = defaultValue;\n lastProps = value;\n nextProps = propKey;\n null != propKey$201\n ? updateOptions(domElement, !!lastProps, propKey$201, !1)\n : !!nextProps !== !!lastProps &&\n (null != tag\n ? updateOptions(domElement, !!lastProps, tag, !0)\n : updateOptions(domElement, !!lastProps, lastProps ? [] : \"\", !1));\n return;\n case \"textarea\":\n propKey = propKey$201 = null;\n for (defaultValue in lastProps)\n if (\n ((name = lastProps[defaultValue]),\n lastProps.hasOwnProperty(defaultValue) &&\n null != name &&\n !nextProps.hasOwnProperty(defaultValue))\n )\n switch (defaultValue) {\n case \"value\":\n break;\n case \"children\":\n break;\n default:\n setProp(domElement, tag, defaultValue, null, nextProps, name);\n }\n for (value in nextProps)\n if (\n ((name = nextProps[value]),\n (type = lastProps[value]),\n nextProps.hasOwnProperty(value) && (null != name || null != type))\n )\n switch (value) {\n case \"value\":\n propKey$201 = name;\n break;\n case \"defaultValue\":\n propKey = name;\n break;\n case \"children\":\n break;\n case \"dangerouslySetInnerHTML\":\n if (null != name) throw Error(formatProdErrorMessage(91));\n break;\n default:\n name !== type &&\n setProp(domElement, tag, value, name, nextProps, type);\n }\n updateTextarea(domElement, propKey$201, propKey);\n return;\n case \"option\":\n for (var propKey$217 in lastProps)\n if (\n ((propKey$201 = lastProps[propKey$217]),\n lastProps.hasOwnProperty(propKey$217) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$217))\n )\n switch (propKey$217) {\n case \"selected\":\n domElement.selected = !1;\n break;\n default:\n setProp(\n domElement,\n tag,\n propKey$217,\n null,\n nextProps,\n propKey$201\n );\n }\n for (lastDefaultValue in nextProps)\n if (\n ((propKey$201 = nextProps[lastDefaultValue]),\n (propKey = lastProps[lastDefaultValue]),\n nextProps.hasOwnProperty(lastDefaultValue) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (lastDefaultValue) {\n case \"selected\":\n domElement.selected =\n propKey$201 &&\n \"function\" !== typeof propKey$201 &&\n \"symbol\" !== typeof propKey$201;\n break;\n default:\n setProp(\n domElement,\n tag,\n lastDefaultValue,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n case \"img\":\n case \"link\":\n case \"area\":\n case \"base\":\n case \"br\":\n case \"col\":\n case \"embed\":\n case \"hr\":\n case \"keygen\":\n case \"meta\":\n case \"param\":\n case \"source\":\n case \"track\":\n case \"wbr\":\n case \"menuitem\":\n for (var propKey$222 in lastProps)\n (propKey$201 = lastProps[propKey$222]),\n lastProps.hasOwnProperty(propKey$222) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$222) &&\n setProp(domElement, tag, propKey$222, null, nextProps, propKey$201);\n for (checked in nextProps)\n if (\n ((propKey$201 = nextProps[checked]),\n (propKey = lastProps[checked]),\n nextProps.hasOwnProperty(checked) &&\n propKey$201 !== propKey &&\n (null != propKey$201 || null != propKey))\n )\n switch (checked) {\n case \"children\":\n case \"dangerouslySetInnerHTML\":\n if (null != propKey$201)\n throw Error(formatProdErrorMessage(137, tag));\n break;\n default:\n setProp(\n domElement,\n tag,\n checked,\n propKey$201,\n nextProps,\n propKey\n );\n }\n return;\n default:\n if (isCustomElement(tag)) {\n for (var propKey$227 in lastProps)\n (propKey$201 = lastProps[propKey$227]),\n lastProps.hasOwnProperty(propKey$227) &&\n void 0 !== propKey$201 &&\n !nextProps.hasOwnProperty(propKey$227) &&\n setPropOnCustomElement(\n domElement,\n tag,\n propKey$227,\n void 0,\n nextProps,\n propKey$201\n );\n for (defaultChecked in nextProps)\n (propKey$201 = nextProps[defaultChecked]),\n (propKey = lastProps[defaultChecked]),\n !nextProps.hasOwnProperty(defaultChecked) ||\n propKey$201 === propKey ||\n (void 0 === propKey$201 && void 0 === propKey) ||\n setPropOnCustomElement(\n domElement,\n tag,\n defaultChecked,\n propKey$201,\n nextProps,\n propKey\n );\n return;\n }\n }\n for (var propKey$232 in lastProps)\n (propKey$201 = lastProps[propKey$232]),\n lastProps.hasOwnProperty(propKey$232) &&\n null != propKey$201 &&\n !nextProps.hasOwnProperty(propKey$232) &&\n setProp(domElement, tag, propKey$232, null, nextProps, propKey$201);\n for (lastProp in nextProps)\n (propKey$201 = nextProps[lastProp]),\n (propKey = lastProps[lastProp]),\n !nextProps.hasOwnProperty(lastProp) ||\n propKey$201 === propKey ||\n (null == propKey$201 && null == propKey) ||\n setProp(domElement, tag, lastProp, propKey$201, nextProps, propKey);\n}\nfunction isLikelyStaticResource(initiatorType) {\n switch (initiatorType) {\n case \"css\":\n case \"script\":\n case \"font\":\n case \"img\":\n case \"image\":\n case \"input\":\n case \"link\":\n return !0;\n default:\n return !1;\n }\n}\nfunction estimateBandwidth() {\n if (\"function\" === typeof performance.getEntriesByType) {\n for (\n var count = 0,\n bits = 0,\n resourceEntries = performance.getEntriesByType(\"resource\"),\n i = 0;\n i < resourceEntries.length;\n i++\n ) {\n var entry = resourceEntries[i],\n transferSize = entry.transferSize,\n initiatorType = entry.initiatorType,\n duration = entry.duration;\n if (transferSize && duration && isLikelyStaticResource(initiatorType)) {\n initiatorType = 0;\n duration = entry.responseEnd;\n for (i += 1; i < resourceEntries.length; i++) {\n var overlapEntry = resourceEntries[i],\n overlapStartTime = overlapEntry.startTime;\n if (overlapStartTime > duration) break;\n var overlapTransferSize = overlapEntry.transferSize,\n overlapInitiatorType = overlapEntry.initiatorType;\n overlapTransferSize &&\n isLikelyStaticResource(overlapInitiatorType) &&\n ((overlapEntry = overlapEntry.responseEnd),\n (initiatorType +=\n overlapTransferSize *\n (overlapEntry < duration\n ? 1\n : (duration - overlapStartTime) /\n (overlapEntry - overlapStartTime))));\n }\n --i;\n bits += (8 * (transferSize + initiatorType)) / (entry.duration / 1e3);\n count++;\n if (10 < count) break;\n }\n }\n if (0 < count) return bits / count / 1e6;\n }\n return navigator.connection &&\n ((count = navigator.connection.downlink), \"number\" === typeof count)\n ? count\n : 5;\n}\nvar eventsEnabled = null,\n selectionInformation = null;\nfunction getOwnerDocumentFromRootContainer(rootContainerElement) {\n return 9 === rootContainerElement.nodeType\n ? rootContainerElement\n : rootContainerElement.ownerDocument;\n}\nfunction getOwnHostContext(namespaceURI) {\n switch (namespaceURI) {\n case \"http://www.w3.org/2000/svg\":\n return 1;\n case \"http://www.w3.org/1998/Math/MathML\":\n return 2;\n default:\n return 0;\n }\n}\nfunction getChildHostContextProd(parentNamespace, type) {\n if (0 === parentNamespace)\n switch (type) {\n case \"svg\":\n return 1;\n case \"math\":\n return 2;\n default:\n return 0;\n }\n return 1 === parentNamespace && \"foreignObject\" === type\n ? 0\n : parentNamespace;\n}\nfunction shouldSetTextContent(type, props) {\n return (\n \"textarea\" === type ||\n \"noscript\" === type ||\n \"string\" === typeof props.children ||\n \"number\" === typeof props.children ||\n \"bigint\" === typeof props.children ||\n (\"object\" === typeof props.dangerouslySetInnerHTML &&\n null !== props.dangerouslySetInnerHTML &&\n null != props.dangerouslySetInnerHTML.__html)\n );\n}\nvar currentPopstateTransitionEvent = null;\nfunction shouldAttemptEagerTransition() {\n var event = window.event;\n if (event && \"popstate\" === event.type) {\n if (event === currentPopstateTransitionEvent) return !1;\n currentPopstateTransitionEvent = event;\n return !0;\n }\n currentPopstateTransitionEvent = null;\n return !1;\n}\nvar scheduleTimeout = \"function\" === typeof setTimeout ? setTimeout : void 0,\n cancelTimeout = \"function\" === typeof clearTimeout ? clearTimeout : void 0,\n localPromise = \"function\" === typeof Promise ? Promise : void 0,\n scheduleMicrotask =\n \"function\" === typeof queueMicrotask\n ? queueMicrotask\n : \"undefined\" !== typeof localPromise\n ? function (callback) {\n return localPromise\n .resolve(null)\n .then(callback)\n .catch(handleErrorInNextTick);\n }\n : scheduleTimeout;\nfunction handleErrorInNextTick(error) {\n setTimeout(function () {\n throw error;\n });\n}\nfunction isSingletonScope(type) {\n return \"head\" === type;\n}\nfunction clearHydrationBoundary(parentInstance, hydrationInstance) {\n var node = hydrationInstance,\n depth = 0;\n do {\n var nextNode = node.nextSibling;\n parentInstance.removeChild(node);\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node || \"/&\" === node)) {\n if (0 === depth) {\n parentInstance.removeChild(nextNode);\n retryIfBlockedOn(hydrationInstance);\n return;\n }\n depth--;\n } else if (\n \"$\" === node ||\n \"$?\" === node ||\n \"$~\" === node ||\n \"$!\" === node ||\n \"&\" === node\n )\n depth++;\n else if (\"html\" === node)\n releaseSingletonInstance(parentInstance.ownerDocument.documentElement);\n else if (\"head\" === node) {\n node = parentInstance.ownerDocument.head;\n releaseSingletonInstance(node);\n for (var node$jscomp$0 = node.firstChild; node$jscomp$0; ) {\n var nextNode$jscomp$0 = node$jscomp$0.nextSibling,\n nodeName = node$jscomp$0.nodeName;\n node$jscomp$0[internalHoistableMarker] ||\n \"SCRIPT\" === nodeName ||\n \"STYLE\" === nodeName ||\n (\"LINK\" === nodeName &&\n \"stylesheet\" === node$jscomp$0.rel.toLowerCase()) ||\n node.removeChild(node$jscomp$0);\n node$jscomp$0 = nextNode$jscomp$0;\n }\n } else\n \"body\" === node &&\n releaseSingletonInstance(parentInstance.ownerDocument.body);\n node = nextNode;\n } while (node);\n retryIfBlockedOn(hydrationInstance);\n}\nfunction hideOrUnhideDehydratedBoundary(suspenseInstance, isHidden) {\n var node = suspenseInstance;\n suspenseInstance = 0;\n do {\n var nextNode = node.nextSibling;\n 1 === node.nodeType\n ? isHidden\n ? ((node._stashedDisplay = node.style.display),\n (node.style.display = \"none\"))\n : ((node.style.display = node._stashedDisplay || \"\"),\n \"\" === node.getAttribute(\"style\") && node.removeAttribute(\"style\"))\n : 3 === node.nodeType &&\n (isHidden\n ? ((node._stashedText = node.nodeValue), (node.nodeValue = \"\"))\n : (node.nodeValue = node._stashedText || \"\"));\n if (nextNode && 8 === nextNode.nodeType)\n if (((node = nextNode.data), \"/$\" === node))\n if (0 === suspenseInstance) break;\n else suspenseInstance--;\n else\n (\"$\" !== node && \"$?\" !== node && \"$~\" !== node && \"$!\" !== node) ||\n suspenseInstance++;\n node = nextNode;\n } while (node);\n}\nfunction clearContainerSparingly(container) {\n var nextNode = container.firstChild;\n nextNode && 10 === nextNode.nodeType && (nextNode = nextNode.nextSibling);\n for (; nextNode; ) {\n var node = nextNode;\n nextNode = nextNode.nextSibling;\n switch (node.nodeName) {\n case \"HTML\":\n case \"HEAD\":\n case \"BODY\":\n clearContainerSparingly(node);\n detachDeletedInstance(node);\n continue;\n case \"SCRIPT\":\n case \"STYLE\":\n continue;\n case \"LINK\":\n if (\"stylesheet\" === node.rel.toLowerCase()) continue;\n }\n container.removeChild(node);\n }\n}\nfunction canHydrateInstance(instance, type, props, inRootOrSingleton) {\n for (; 1 === instance.nodeType; ) {\n var anyProps = props;\n if (instance.nodeName.toLowerCase() !== type.toLowerCase()) {\n if (\n !inRootOrSingleton &&\n (\"INPUT\" !== instance.nodeName || \"hidden\" !== instance.type)\n )\n break;\n } else if (!inRootOrSingleton)\n if (\"input\" === type && \"hidden\" === instance.type) {\n var name = null == anyProps.name ? null : \"\" + anyProps.name;\n if (\n \"hidden\" === anyProps.type &&\n instance.getAttribute(\"name\") === name\n )\n return instance;\n } else return instance;\n else if (!instance[internalHoistableMarker])\n switch (type) {\n case \"meta\":\n if (!instance.hasAttribute(\"itemprop\")) break;\n return instance;\n case \"link\":\n name = instance.getAttribute(\"rel\");\n if (\"stylesheet\" === name && instance.hasAttribute(\"data-precedence\"))\n break;\n else if (\n name !== anyProps.rel ||\n instance.getAttribute(\"href\") !==\n (null == anyProps.href || \"\" === anyProps.href\n ? null\n : anyProps.href) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin) ||\n instance.getAttribute(\"title\") !==\n (null == anyProps.title ? null : anyProps.title)\n )\n break;\n return instance;\n case \"style\":\n if (instance.hasAttribute(\"data-precedence\")) break;\n return instance;\n case \"script\":\n name = instance.getAttribute(\"src\");\n if (\n (name !== (null == anyProps.src ? null : anyProps.src) ||\n instance.getAttribute(\"type\") !==\n (null == anyProps.type ? null : anyProps.type) ||\n instance.getAttribute(\"crossorigin\") !==\n (null == anyProps.crossOrigin ? null : anyProps.crossOrigin)) &&\n name &&\n instance.hasAttribute(\"async\") &&\n !instance.hasAttribute(\"itemprop\")\n )\n break;\n return instance;\n default:\n return instance;\n }\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) break;\n }\n return null;\n}\nfunction canHydrateTextInstance(instance, text, inRootOrSingleton) {\n if (\"\" === text) return null;\n for (; 3 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction canHydrateHydrationBoundary(instance, inRootOrSingleton) {\n for (; 8 !== instance.nodeType; ) {\n if (\n (1 !== instance.nodeType ||\n \"INPUT\" !== instance.nodeName ||\n \"hidden\" !== instance.type) &&\n !inRootOrSingleton\n )\n return null;\n instance = getNextHydratable(instance.nextSibling);\n if (null === instance) return null;\n }\n return instance;\n}\nfunction isSuspenseInstancePending(instance) {\n return \"$?\" === instance.data || \"$~\" === instance.data;\n}\nfunction isSuspenseInstanceFallback(instance) {\n return (\n \"$!\" === instance.data ||\n (\"$?\" === instance.data && \"loading\" !== instance.ownerDocument.readyState)\n );\n}\nfunction registerSuspenseInstanceRetry(instance, callback) {\n var ownerDocument = instance.ownerDocument;\n if (\"$~\" === instance.data) instance._reactRetry = callback;\n else if (\"$?\" !== instance.data || \"loading\" !== ownerDocument.readyState)\n callback();\n else {\n var listener = function () {\n callback();\n ownerDocument.removeEventListener(\"DOMContentLoaded\", listener);\n };\n ownerDocument.addEventListener(\"DOMContentLoaded\", listener);\n instance._reactRetry = listener;\n }\n}\nfunction getNextHydratable(node) {\n for (; null != node; node = node.nextSibling) {\n var nodeType = node.nodeType;\n if (1 === nodeType || 3 === nodeType) break;\n if (8 === nodeType) {\n nodeType = node.data;\n if (\n \"$\" === nodeType ||\n \"$!\" === nodeType ||\n \"$?\" === nodeType ||\n \"$~\" === nodeType ||\n \"&\" === nodeType ||\n \"F!\" === nodeType ||\n \"F\" === nodeType\n )\n break;\n if (\"/$\" === nodeType || \"/&\" === nodeType) return null;\n }\n }\n return node;\n}\nvar previousHydratableOnEnteringScopedSingleton = null;\nfunction getNextHydratableInstanceAfterHydrationBoundary(hydrationInstance) {\n hydrationInstance = hydrationInstance.nextSibling;\n for (var depth = 0; hydrationInstance; ) {\n if (8 === hydrationInstance.nodeType) {\n var data = hydrationInstance.data;\n if (\"/$\" === data || \"/&\" === data) {\n if (0 === depth)\n return getNextHydratable(hydrationInstance.nextSibling);\n depth--;\n } else\n (\"$\" !== data &&\n \"$!\" !== data &&\n \"$?\" !== data &&\n \"$~\" !== data &&\n \"&\" !== data) ||\n depth++;\n }\n hydrationInstance = hydrationInstance.nextSibling;\n }\n return null;\n}\nfunction getParentHydrationBoundary(targetInstance) {\n targetInstance = targetInstance.previousSibling;\n for (var depth = 0; targetInstance; ) {\n if (8 === targetInstance.nodeType) {\n var data = targetInstance.data;\n if (\n \"$\" === data ||\n \"$!\" === data ||\n \"$?\" === data ||\n \"$~\" === data ||\n \"&\" === data\n ) {\n if (0 === depth) return targetInstance;\n depth--;\n } else (\"/$\" !== data && \"/&\" !== data) || depth++;\n }\n targetInstance = targetInstance.previousSibling;\n }\n return null;\n}\nfunction resolveSingletonInstance(type, props, rootContainerInstance) {\n props = getOwnerDocumentFromRootContainer(rootContainerInstance);\n switch (type) {\n case \"html\":\n type = props.documentElement;\n if (!type) throw Error(formatProdErrorMessage(452));\n return type;\n case \"head\":\n type = props.head;\n if (!type) throw Error(formatProdErrorMessage(453));\n return type;\n case \"body\":\n type = props.body;\n if (!type) throw Error(formatProdErrorMessage(454));\n return type;\n default:\n throw Error(formatProdErrorMessage(451));\n }\n}\nfunction releaseSingletonInstance(instance) {\n for (var attributes = instance.attributes; attributes.length; )\n instance.removeAttributeNode(attributes[0]);\n detachDeletedInstance(instance);\n}\nvar preloadPropsMap = new Map(),\n preconnectsSet = new Set();\nfunction getHoistableRoot(container) {\n return \"function\" === typeof container.getRootNode\n ? container.getRootNode()\n : 9 === container.nodeType\n ? container\n : container.ownerDocument;\n}\nvar previousDispatcher = ReactDOMSharedInternals.d;\nReactDOMSharedInternals.d = {\n f: flushSyncWork,\n r: requestFormReset,\n D: prefetchDNS,\n C: preconnect,\n L: preload,\n m: preloadModule,\n X: preinitScript,\n S: preinitStyle,\n M: preinitModuleScript\n};\nfunction flushSyncWork() {\n var previousWasRendering = previousDispatcher.f(),\n wasRendering = flushSyncWork$1();\n return previousWasRendering || wasRendering;\n}\nfunction requestFormReset(form) {\n var formInst = getInstanceFromNode(form);\n null !== formInst && 5 === formInst.tag && \"form\" === formInst.type\n ? requestFormReset$1(formInst)\n : previousDispatcher.r(form);\n}\nvar globalDocument = \"undefined\" === typeof document ? null : document;\nfunction preconnectAs(rel, href, crossOrigin) {\n var ownerDocument = globalDocument;\n if (ownerDocument && \"string\" === typeof href && href) {\n var limitedEscapedHref =\n escapeSelectorAttributeValueInsideDoubleQuotes(href);\n limitedEscapedHref =\n 'link[rel=\"' + rel + '\"][href=\"' + limitedEscapedHref + '\"]';\n \"string\" === typeof crossOrigin &&\n (limitedEscapedHref += '[crossorigin=\"' + crossOrigin + '\"]');\n preconnectsSet.has(limitedEscapedHref) ||\n (preconnectsSet.add(limitedEscapedHref),\n (rel = { rel: rel, crossOrigin: crossOrigin, href: href }),\n null === ownerDocument.querySelector(limitedEscapedHref) &&\n ((href = ownerDocument.createElement(\"link\")),\n setInitialProperties(href, \"link\", rel),\n markNodeAsHoistable(href),\n ownerDocument.head.appendChild(href)));\n }\n}\nfunction prefetchDNS(href) {\n previousDispatcher.D(href);\n preconnectAs(\"dns-prefetch\", href, null);\n}\nfunction preconnect(href, crossOrigin) {\n previousDispatcher.C(href, crossOrigin);\n preconnectAs(\"preconnect\", href, crossOrigin);\n}\nfunction preload(href, as, options) {\n previousDispatcher.L(href, as, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href && as) {\n var preloadSelector =\n 'link[rel=\"preload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"]';\n \"image\" === as\n ? options && options.imageSrcSet\n ? ((preloadSelector +=\n '[imagesrcset=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSrcSet\n ) +\n '\"]'),\n \"string\" === typeof options.imageSizes &&\n (preloadSelector +=\n '[imagesizes=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(\n options.imageSizes\n ) +\n '\"]'))\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]')\n : (preloadSelector +=\n '[href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]');\n var key = preloadSelector;\n switch (as) {\n case \"style\":\n key = getStyleKey(href);\n break;\n case \"script\":\n key = getScriptKey(href);\n }\n preloadPropsMap.has(key) ||\n ((href = assign(\n {\n rel: \"preload\",\n href:\n \"image\" === as && options && options.imageSrcSet ? void 0 : href,\n as: as\n },\n options\n )),\n preloadPropsMap.set(key, href),\n null !== ownerDocument.querySelector(preloadSelector) ||\n (\"style\" === as &&\n ownerDocument.querySelector(getStylesheetSelectorFromKey(key))) ||\n (\"script\" === as &&\n ownerDocument.querySelector(getScriptSelectorFromKey(key))) ||\n ((as = ownerDocument.createElement(\"link\")),\n setInitialProperties(as, \"link\", href),\n markNodeAsHoistable(as),\n ownerDocument.head.appendChild(as)));\n }\n}\nfunction preloadModule(href, options) {\n previousDispatcher.m(href, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var as = options && \"string\" === typeof options.as ? options.as : \"script\",\n preloadSelector =\n 'link[rel=\"modulepreload\"][as=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(as) +\n '\"][href=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(href) +\n '\"]',\n key = preloadSelector;\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n key = getScriptKey(href);\n }\n if (\n !preloadPropsMap.has(key) &&\n ((href = assign({ rel: \"modulepreload\", href: href }, options)),\n preloadPropsMap.set(key, href),\n null === ownerDocument.querySelector(preloadSelector))\n ) {\n switch (as) {\n case \"audioworklet\":\n case \"paintworklet\":\n case \"serviceworker\":\n case \"sharedworker\":\n case \"worker\":\n case \"script\":\n if (ownerDocument.querySelector(getScriptSelectorFromKey(key)))\n return;\n }\n as = ownerDocument.createElement(\"link\");\n setInitialProperties(as, \"link\", href);\n markNodeAsHoistable(as);\n ownerDocument.head.appendChild(as);\n }\n }\n}\nfunction preinitStyle(href, precedence, options) {\n previousDispatcher.S(href, precedence, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && href) {\n var styles = getResourcesFromRoot(ownerDocument).hoistableStyles,\n key = getStyleKey(href);\n precedence = precedence || \"default\";\n var resource = styles.get(key);\n if (!resource) {\n var state = { loading: 0, preload: null };\n if (\n (resource = ownerDocument.querySelector(\n getStylesheetSelectorFromKey(key)\n ))\n )\n state.loading = 5;\n else {\n href = assign(\n { rel: \"stylesheet\", href: href, \"data-precedence\": precedence },\n options\n );\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(href, options);\n var link = (resource = ownerDocument.createElement(\"link\"));\n markNodeAsHoistable(link);\n setInitialProperties(link, \"link\", href);\n link._p = new Promise(function (resolve, reject) {\n link.onload = resolve;\n link.onerror = reject;\n });\n link.addEventListener(\"load\", function () {\n state.loading |= 1;\n });\n link.addEventListener(\"error\", function () {\n state.loading |= 2;\n });\n state.loading |= 4;\n insertStylesheet(resource, precedence, ownerDocument);\n }\n resource = {\n type: \"stylesheet\",\n instance: resource,\n count: 1,\n state: state\n };\n styles.set(key, resource);\n }\n }\n}\nfunction preinitScript(src, options) {\n previousDispatcher.X(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0 }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction preinitModuleScript(src, options) {\n previousDispatcher.M(src, options);\n var ownerDocument = globalDocument;\n if (ownerDocument && src) {\n var scripts = getResourcesFromRoot(ownerDocument).hoistableScripts,\n key = getScriptKey(src),\n resource = scripts.get(key);\n resource ||\n ((resource = ownerDocument.querySelector(getScriptSelectorFromKey(key))),\n resource ||\n ((src = assign({ src: src, async: !0, type: \"module\" }, options)),\n (options = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForScript(src, options),\n (resource = ownerDocument.createElement(\"script\")),\n markNodeAsHoistable(resource),\n setInitialProperties(resource, \"link\", src),\n ownerDocument.head.appendChild(resource)),\n (resource = {\n type: \"script\",\n instance: resource,\n count: 1,\n state: null\n }),\n scripts.set(key, resource));\n }\n}\nfunction getResource(type, currentProps, pendingProps, currentResource) {\n var JSCompiler_inline_result = (JSCompiler_inline_result =\n rootInstanceStackCursor.current)\n ? getHoistableRoot(JSCompiler_inline_result)\n : null;\n if (!JSCompiler_inline_result) throw Error(formatProdErrorMessage(446));\n switch (type) {\n case \"meta\":\n case \"title\":\n return null;\n case \"style\":\n return \"string\" === typeof pendingProps.precedence &&\n \"string\" === typeof pendingProps.href\n ? ((currentProps = getStyleKey(pendingProps.href)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"style\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null };\n case \"link\":\n if (\n \"stylesheet\" === pendingProps.rel &&\n \"string\" === typeof pendingProps.href &&\n \"string\" === typeof pendingProps.precedence\n ) {\n type = getStyleKey(pendingProps.href);\n var styles$243 = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableStyles,\n resource$244 = styles$243.get(type);\n resource$244 ||\n ((JSCompiler_inline_result =\n JSCompiler_inline_result.ownerDocument || JSCompiler_inline_result),\n (resource$244 = {\n type: \"stylesheet\",\n instance: null,\n count: 0,\n state: { loading: 0, preload: null }\n }),\n styles$243.set(type, resource$244),\n (styles$243 = JSCompiler_inline_result.querySelector(\n getStylesheetSelectorFromKey(type)\n )) &&\n !styles$243._p &&\n ((resource$244.instance = styles$243),\n (resource$244.state.loading = 5)),\n preloadPropsMap.has(type) ||\n ((pendingProps = {\n rel: \"preload\",\n as: \"style\",\n href: pendingProps.href,\n crossOrigin: pendingProps.crossOrigin,\n integrity: pendingProps.integrity,\n media: pendingProps.media,\n hrefLang: pendingProps.hrefLang,\n referrerPolicy: pendingProps.referrerPolicy\n }),\n preloadPropsMap.set(type, pendingProps),\n styles$243 ||\n preloadStylesheet(\n JSCompiler_inline_result,\n type,\n pendingProps,\n resource$244.state\n )));\n if (currentProps && null === currentResource)\n throw Error(formatProdErrorMessage(528, \"\"));\n return resource$244;\n }\n if (currentProps && null !== currentResource)\n throw Error(formatProdErrorMessage(529, \"\"));\n return null;\n case \"script\":\n return (\n (currentProps = pendingProps.async),\n (pendingProps = pendingProps.src),\n \"string\" === typeof pendingProps &&\n currentProps &&\n \"function\" !== typeof currentProps &&\n \"symbol\" !== typeof currentProps\n ? ((currentProps = getScriptKey(pendingProps)),\n (pendingProps = getResourcesFromRoot(\n JSCompiler_inline_result\n ).hoistableScripts),\n (currentResource = pendingProps.get(currentProps)),\n currentResource ||\n ((currentResource = {\n type: \"script\",\n instance: null,\n count: 0,\n state: null\n }),\n pendingProps.set(currentProps, currentResource)),\n currentResource)\n : { type: \"void\", instance: null, count: 0, state: null }\n );\n default:\n throw Error(formatProdErrorMessage(444, type));\n }\n}\nfunction getStyleKey(href) {\n return 'href=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(href) + '\"';\n}\nfunction getStylesheetSelectorFromKey(key) {\n return 'link[rel=\"stylesheet\"][' + key + \"]\";\n}\nfunction stylesheetPropsFromRawProps(rawProps) {\n return assign({}, rawProps, {\n \"data-precedence\": rawProps.precedence,\n precedence: null\n });\n}\nfunction preloadStylesheet(ownerDocument, key, preloadProps, state) {\n ownerDocument.querySelector('link[rel=\"preload\"][as=\"style\"][' + key + \"]\")\n ? (state.loading = 1)\n : ((key = ownerDocument.createElement(\"link\")),\n (state.preload = key),\n key.addEventListener(\"load\", function () {\n return (state.loading |= 1);\n }),\n key.addEventListener(\"error\", function () {\n return (state.loading |= 2);\n }),\n setInitialProperties(key, \"link\", preloadProps),\n markNodeAsHoistable(key),\n ownerDocument.head.appendChild(key));\n}\nfunction getScriptKey(src) {\n return '[src=\"' + escapeSelectorAttributeValueInsideDoubleQuotes(src) + '\"]';\n}\nfunction getScriptSelectorFromKey(key) {\n return \"script[async]\" + key;\n}\nfunction acquireResource(hoistableRoot, resource, props) {\n resource.count++;\n if (null === resource.instance)\n switch (resource.type) {\n case \"style\":\n var instance = hoistableRoot.querySelector(\n 'style[data-href~=\"' +\n escapeSelectorAttributeValueInsideDoubleQuotes(props.href) +\n '\"]'\n );\n if (instance)\n return (\n (resource.instance = instance),\n markNodeAsHoistable(instance),\n instance\n );\n var styleProps = assign({}, props, {\n \"data-href\": props.href,\n \"data-precedence\": props.precedence,\n href: null,\n precedence: null\n });\n instance = (hoistableRoot.ownerDocument || hoistableRoot).createElement(\n \"style\"\n );\n markNodeAsHoistable(instance);\n setInitialProperties(instance, \"style\", styleProps);\n insertStylesheet(instance, props.precedence, hoistableRoot);\n return (resource.instance = instance);\n case \"stylesheet\":\n styleProps = getStyleKey(props.href);\n var instance$249 = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(styleProps)\n );\n if (instance$249)\n return (\n (resource.state.loading |= 4),\n (resource.instance = instance$249),\n markNodeAsHoistable(instance$249),\n instance$249\n );\n instance = stylesheetPropsFromRawProps(props);\n (styleProps = preloadPropsMap.get(styleProps)) &&\n adoptPreloadPropsForStylesheet(instance, styleProps);\n instance$249 = (\n hoistableRoot.ownerDocument || hoistableRoot\n ).createElement(\"link\");\n markNodeAsHoistable(instance$249);\n var linkInstance = instance$249;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance$249, \"link\", instance);\n resource.state.loading |= 4;\n insertStylesheet(instance$249, props.precedence, hoistableRoot);\n return (resource.instance = instance$249);\n case \"script\":\n instance$249 = getScriptKey(props.src);\n if (\n (styleProps = hoistableRoot.querySelector(\n getScriptSelectorFromKey(instance$249)\n ))\n )\n return (\n (resource.instance = styleProps),\n markNodeAsHoistable(styleProps),\n styleProps\n );\n instance = props;\n if ((styleProps = preloadPropsMap.get(instance$249)))\n (instance = assign({}, props)),\n adoptPreloadPropsForScript(instance, styleProps);\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n styleProps = hoistableRoot.createElement(\"script\");\n markNodeAsHoistable(styleProps);\n setInitialProperties(styleProps, \"link\", instance);\n hoistableRoot.head.appendChild(styleProps);\n return (resource.instance = styleProps);\n case \"void\":\n return null;\n default:\n throw Error(formatProdErrorMessage(443, resource.type));\n }\n else\n \"stylesheet\" === resource.type &&\n 0 === (resource.state.loading & 4) &&\n ((instance = resource.instance),\n (resource.state.loading |= 4),\n insertStylesheet(instance, props.precedence, hoistableRoot));\n return resource.instance;\n}\nfunction insertStylesheet(instance, precedence, root) {\n for (\n var nodes = root.querySelectorAll(\n 'link[rel=\"stylesheet\"][data-precedence],style[data-precedence]'\n ),\n last = nodes.length ? nodes[nodes.length - 1] : null,\n prior = last,\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (node.dataset.precedence === precedence) prior = node;\n else if (prior !== last) break;\n }\n prior\n ? prior.parentNode.insertBefore(instance, prior.nextSibling)\n : ((precedence = 9 === root.nodeType ? root.head : root),\n precedence.insertBefore(instance, precedence.firstChild));\n}\nfunction adoptPreloadPropsForStylesheet(stylesheetProps, preloadProps) {\n null == stylesheetProps.crossOrigin &&\n (stylesheetProps.crossOrigin = preloadProps.crossOrigin);\n null == stylesheetProps.referrerPolicy &&\n (stylesheetProps.referrerPolicy = preloadProps.referrerPolicy);\n null == stylesheetProps.title && (stylesheetProps.title = preloadProps.title);\n}\nfunction adoptPreloadPropsForScript(scriptProps, preloadProps) {\n null == scriptProps.crossOrigin &&\n (scriptProps.crossOrigin = preloadProps.crossOrigin);\n null == scriptProps.referrerPolicy &&\n (scriptProps.referrerPolicy = preloadProps.referrerPolicy);\n null == scriptProps.integrity &&\n (scriptProps.integrity = preloadProps.integrity);\n}\nvar tagCaches = null;\nfunction getHydratableHoistableCache(type, keyAttribute, ownerDocument) {\n if (null === tagCaches) {\n var cache = new Map();\n var caches = (tagCaches = new Map());\n caches.set(ownerDocument, cache);\n } else\n (caches = tagCaches),\n (cache = caches.get(ownerDocument)),\n cache || ((cache = new Map()), caches.set(ownerDocument, cache));\n if (cache.has(type)) return cache;\n cache.set(type, null);\n ownerDocument = ownerDocument.getElementsByTagName(type);\n for (caches = 0; caches < ownerDocument.length; caches++) {\n var node = ownerDocument[caches];\n if (\n !(\n node[internalHoistableMarker] ||\n node[internalInstanceKey] ||\n (\"link\" === type && \"stylesheet\" === node.getAttribute(\"rel\"))\n ) &&\n \"http://www.w3.org/2000/svg\" !== node.namespaceURI\n ) {\n var nodeKey = node.getAttribute(keyAttribute) || \"\";\n nodeKey = type + nodeKey;\n var existing = cache.get(nodeKey);\n existing ? existing.push(node) : cache.set(nodeKey, [node]);\n }\n }\n return cache;\n}\nfunction mountHoistable(hoistableRoot, type, instance) {\n hoistableRoot = hoistableRoot.ownerDocument || hoistableRoot;\n hoistableRoot.head.insertBefore(\n instance,\n \"title\" === type ? hoistableRoot.querySelector(\"head > title\") : null\n );\n}\nfunction isHostHoistableType(type, props, hostContext) {\n if (1 === hostContext || null != props.itemProp) return !1;\n switch (type) {\n case \"meta\":\n case \"title\":\n return !0;\n case \"style\":\n if (\n \"string\" !== typeof props.precedence ||\n \"string\" !== typeof props.href ||\n \"\" === props.href\n )\n break;\n return !0;\n case \"link\":\n if (\n \"string\" !== typeof props.rel ||\n \"string\" !== typeof props.href ||\n \"\" === props.href ||\n props.onLoad ||\n props.onError\n )\n break;\n switch (props.rel) {\n case \"stylesheet\":\n return (\n (type = props.disabled),\n \"string\" === typeof props.precedence && null == type\n );\n default:\n return !0;\n }\n case \"script\":\n if (\n props.async &&\n \"function\" !== typeof props.async &&\n \"symbol\" !== typeof props.async &&\n !props.onLoad &&\n !props.onError &&\n props.src &&\n \"string\" === typeof props.src\n )\n return !0;\n }\n return !1;\n}\nfunction preloadResource(resource) {\n return \"stylesheet\" === resource.type && 0 === (resource.state.loading & 3)\n ? !1\n : !0;\n}\nfunction suspendResource(state, hoistableRoot, resource, props) {\n if (\n \"stylesheet\" === resource.type &&\n (\"string\" !== typeof props.media ||\n !1 !== matchMedia(props.media).matches) &&\n 0 === (resource.state.loading & 4)\n ) {\n if (null === resource.instance) {\n var key = getStyleKey(props.href),\n instance = hoistableRoot.querySelector(\n getStylesheetSelectorFromKey(key)\n );\n if (instance) {\n hoistableRoot = instance._p;\n null !== hoistableRoot &&\n \"object\" === typeof hoistableRoot &&\n \"function\" === typeof hoistableRoot.then &&\n (state.count++,\n (state = onUnsuspend.bind(state)),\n hoistableRoot.then(state, state));\n resource.state.loading |= 4;\n resource.instance = instance;\n markNodeAsHoistable(instance);\n return;\n }\n instance = hoistableRoot.ownerDocument || hoistableRoot;\n props = stylesheetPropsFromRawProps(props);\n (key = preloadPropsMap.get(key)) &&\n adoptPreloadPropsForStylesheet(props, key);\n instance = instance.createElement(\"link\");\n markNodeAsHoistable(instance);\n var linkInstance = instance;\n linkInstance._p = new Promise(function (resolve, reject) {\n linkInstance.onload = resolve;\n linkInstance.onerror = reject;\n });\n setInitialProperties(instance, \"link\", props);\n resource.instance = instance;\n }\n null === state.stylesheets && (state.stylesheets = new Map());\n state.stylesheets.set(resource, hoistableRoot);\n (hoistableRoot = resource.state.preload) &&\n 0 === (resource.state.loading & 3) &&\n (state.count++,\n (resource = onUnsuspend.bind(state)),\n hoistableRoot.addEventListener(\"load\", resource),\n hoistableRoot.addEventListener(\"error\", resource));\n }\n}\nvar estimatedBytesWithinLimit = 0;\nfunction waitForCommitToBeReady(state, timeoutOffset) {\n state.stylesheets &&\n 0 === state.count &&\n insertSuspendedStylesheets(state, state.stylesheets);\n return 0 < state.count || 0 < state.imgCount\n ? function (commit) {\n var stylesheetTimer = setTimeout(function () {\n state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets);\n if (state.unsuspend) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n }, 6e4 + timeoutOffset);\n 0 < state.imgBytes &&\n 0 === estimatedBytesWithinLimit &&\n (estimatedBytesWithinLimit = 62500 * estimateBandwidth());\n var imgTimer = setTimeout(\n function () {\n state.waitingForImages = !1;\n if (\n 0 === state.count &&\n (state.stylesheets &&\n insertSuspendedStylesheets(state, state.stylesheets),\n state.unsuspend)\n ) {\n var unsuspend = state.unsuspend;\n state.unsuspend = null;\n unsuspend();\n }\n },\n (state.imgBytes > estimatedBytesWithinLimit ? 50 : 800) +\n timeoutOffset\n );\n state.unsuspend = commit;\n return function () {\n state.unsuspend = null;\n clearTimeout(stylesheetTimer);\n clearTimeout(imgTimer);\n };\n }\n : null;\n}\nfunction onUnsuspend() {\n this.count--;\n if (0 === this.count && (0 === this.imgCount || !this.waitingForImages))\n if (this.stylesheets) insertSuspendedStylesheets(this, this.stylesheets);\n else if (this.unsuspend) {\n var unsuspend = this.unsuspend;\n this.unsuspend = null;\n unsuspend();\n }\n}\nvar precedencesByRoot = null;\nfunction insertSuspendedStylesheets(state, resources) {\n state.stylesheets = null;\n null !== state.unsuspend &&\n (state.count++,\n (precedencesByRoot = new Map()),\n resources.forEach(insertStylesheetIntoRoot, state),\n (precedencesByRoot = null),\n onUnsuspend.call(state));\n}\nfunction insertStylesheetIntoRoot(root, resource) {\n if (!(resource.state.loading & 4)) {\n var precedences = precedencesByRoot.get(root);\n if (precedences) var last = precedences.get(null);\n else {\n precedences = new Map();\n precedencesByRoot.set(root, precedences);\n for (\n var nodes = root.querySelectorAll(\n \"link[data-precedence],style[data-precedence]\"\n ),\n i = 0;\n i < nodes.length;\n i++\n ) {\n var node = nodes[i];\n if (\n \"LINK\" === node.nodeName ||\n \"not all\" !== node.getAttribute(\"media\")\n )\n precedences.set(node.dataset.precedence, node), (last = node);\n }\n last && precedences.set(null, last);\n }\n nodes = resource.instance;\n node = nodes.getAttribute(\"data-precedence\");\n i = precedences.get(node) || last;\n i === last && precedences.set(null, nodes);\n precedences.set(node, nodes);\n this.count++;\n last = onUnsuspend.bind(this);\n nodes.addEventListener(\"load\", last);\n nodes.addEventListener(\"error\", last);\n i\n ? i.parentNode.insertBefore(nodes, i.nextSibling)\n : ((root = 9 === root.nodeType ? root.head : root),\n root.insertBefore(nodes, root.firstChild));\n resource.state.loading |= 4;\n }\n}\nvar HostTransitionContext = {\n $$typeof: REACT_CONTEXT_TYPE,\n Provider: null,\n Consumer: null,\n _currentValue: sharedNotPendingObject,\n _currentValue2: sharedNotPendingObject,\n _threadCount: 0\n};\nfunction FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n) {\n this.tag = 1;\n this.containerInfo = containerInfo;\n this.pingCache = this.current = this.pendingChildren = null;\n this.timeoutHandle = -1;\n this.callbackNode =\n this.next =\n this.pendingContext =\n this.context =\n this.cancelPendingCommit =\n null;\n this.callbackPriority = 0;\n this.expirationTimes = createLaneMap(-1);\n this.entangledLanes =\n this.shellSuspendCounter =\n this.errorRecoveryDisabledLanes =\n this.expiredLanes =\n this.warmLanes =\n this.pingedLanes =\n this.suspendedLanes =\n this.pendingLanes =\n 0;\n this.entanglements = createLaneMap(0);\n this.hiddenUpdates = createLaneMap(null);\n this.identifierPrefix = identifierPrefix;\n this.onUncaughtError = onUncaughtError;\n this.onCaughtError = onCaughtError;\n this.onRecoverableError = onRecoverableError;\n this.pooledCache = null;\n this.pooledCacheLanes = 0;\n this.formState = formState;\n this.incompleteTransitions = new Map();\n}\nfunction createFiberRoot(\n containerInfo,\n tag,\n hydrate,\n initialChildren,\n hydrationCallbacks,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator\n) {\n containerInfo = new FiberRootNode(\n containerInfo,\n tag,\n hydrate,\n identifierPrefix,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n onDefaultTransitionIndicator,\n formState\n );\n tag = 1;\n !0 === isStrictMode && (tag |= 24);\n isStrictMode = createFiberImplClass(3, null, null, tag);\n containerInfo.current = isStrictMode;\n isStrictMode.stateNode = containerInfo;\n tag = createCache();\n tag.refCount++;\n containerInfo.pooledCache = tag;\n tag.refCount++;\n isStrictMode.memoizedState = {\n element: initialChildren,\n isDehydrated: hydrate,\n cache: tag\n };\n initializeUpdateQueue(isStrictMode);\n return containerInfo;\n}\nfunction getContextForSubtree(parentComponent) {\n if (!parentComponent) return emptyContextObject;\n parentComponent = emptyContextObject;\n return parentComponent;\n}\nfunction updateContainerImpl(\n rootFiber,\n lane,\n element,\n container,\n parentComponent,\n callback\n) {\n parentComponent = getContextForSubtree(parentComponent);\n null === container.context\n ? (container.context = parentComponent)\n : (container.pendingContext = parentComponent);\n container = createUpdate(lane);\n container.payload = { element: element };\n callback = void 0 === callback ? null : callback;\n null !== callback && (container.callback = callback);\n element = enqueueUpdate(rootFiber, container, lane);\n null !== element &&\n (scheduleUpdateOnFiber(element, rootFiber, lane),\n entangleTransitions(element, rootFiber, lane));\n}\nfunction markRetryLaneImpl(fiber, retryLane) {\n fiber = fiber.memoizedState;\n if (null !== fiber && null !== fiber.dehydrated) {\n var a = fiber.retryLane;\n fiber.retryLane = 0 !== a && a < retryLane ? a : retryLane;\n }\n}\nfunction markRetryLaneIfNotHydrated(fiber, retryLane) {\n markRetryLaneImpl(fiber, retryLane);\n (fiber = fiber.alternate) && markRetryLaneImpl(fiber, retryLane);\n}\nfunction attemptContinuousHydration(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var root = enqueueConcurrentRenderForLane(fiber, 67108864);\n null !== root && scheduleUpdateOnFiber(root, fiber, 67108864);\n markRetryLaneIfNotHydrated(fiber, 67108864);\n }\n}\nfunction attemptHydrationAtCurrentPriority(fiber) {\n if (13 === fiber.tag || 31 === fiber.tag) {\n var lane = requestUpdateLane();\n lane = getBumpedLaneForHydrationByLane(lane);\n var root = enqueueConcurrentRenderForLane(fiber, lane);\n null !== root && scheduleUpdateOnFiber(root, fiber, lane);\n markRetryLaneIfNotHydrated(fiber, lane);\n }\n}\nvar _enabled = !0;\nfunction dispatchDiscreteEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 2),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchContinuousEvent(\n domEventName,\n eventSystemFlags,\n container,\n nativeEvent\n) {\n var prevTransition = ReactSharedInternals.T;\n ReactSharedInternals.T = null;\n var previousPriority = ReactDOMSharedInternals.p;\n try {\n (ReactDOMSharedInternals.p = 8),\n dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);\n } finally {\n (ReactDOMSharedInternals.p = previousPriority),\n (ReactSharedInternals.T = prevTransition);\n }\n}\nfunction dispatchEvent(\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (_enabled) {\n var blockedOn = findInstanceBlockingEvent(nativeEvent);\n if (null === blockedOn)\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n ),\n clearIfContinuousEvent(domEventName, nativeEvent);\n else if (\n queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n )\n nativeEvent.stopPropagation();\n else if (\n (clearIfContinuousEvent(domEventName, nativeEvent),\n eventSystemFlags & 4 &&\n -1 < discreteReplayableEvents.indexOf(domEventName))\n ) {\n for (; null !== blockedOn; ) {\n var fiber = getInstanceFromNode(blockedOn);\n if (null !== fiber)\n switch (fiber.tag) {\n case 3:\n fiber = fiber.stateNode;\n if (fiber.current.memoizedState.isDehydrated) {\n var lanes = getHighestPriorityLanes(fiber.pendingLanes);\n if (0 !== lanes) {\n var root = fiber;\n root.pendingLanes |= 2;\n for (root.entangledLanes |= 2; lanes; ) {\n var lane = 1 << (31 - clz32(lanes));\n root.entanglements[1] |= lane;\n lanes &= ~lane;\n }\n ensureRootIsScheduled(fiber);\n 0 === (executionContext & 6) &&\n ((workInProgressRootRenderTargetTime = now() + 500),\n flushSyncWorkAcrossRoots_impl(0, !1));\n }\n }\n break;\n case 31:\n case 13:\n (root = enqueueConcurrentRenderForLane(fiber, 2)),\n null !== root && scheduleUpdateOnFiber(root, fiber, 2),\n flushSyncWork$1(),\n markRetryLaneIfNotHydrated(fiber, 2);\n }\n fiber = findInstanceBlockingEvent(nativeEvent);\n null === fiber &&\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n return_targetInst,\n targetContainer\n );\n if (fiber === blockedOn) break;\n blockedOn = fiber;\n }\n null !== blockedOn && nativeEvent.stopPropagation();\n } else\n dispatchEventForPluginEventSystem(\n domEventName,\n eventSystemFlags,\n nativeEvent,\n null,\n targetContainer\n );\n }\n}\nfunction findInstanceBlockingEvent(nativeEvent) {\n nativeEvent = getEventTarget(nativeEvent);\n return findInstanceBlockingTarget(nativeEvent);\n}\nvar return_targetInst = null;\nfunction findInstanceBlockingTarget(targetNode) {\n return_targetInst = null;\n targetNode = getClosestInstanceFromNode(targetNode);\n if (null !== targetNode) {\n var nearestMounted = getNearestMountedFiber(targetNode);\n if (null === nearestMounted) targetNode = null;\n else {\n var tag = nearestMounted.tag;\n if (13 === tag) {\n targetNode = getSuspenseInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (31 === tag) {\n targetNode = getActivityInstanceFromFiber(nearestMounted);\n if (null !== targetNode) return targetNode;\n targetNode = null;\n } else if (3 === tag) {\n if (nearestMounted.stateNode.current.memoizedState.isDehydrated)\n return 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n targetNode = null;\n } else nearestMounted !== targetNode && (targetNode = null);\n }\n }\n return_targetInst = targetNode;\n return null;\n}\nfunction getEventPriority(domEventName) {\n switch (domEventName) {\n case \"beforetoggle\":\n case \"cancel\":\n case \"click\":\n case \"close\":\n case \"contextmenu\":\n case \"copy\":\n case \"cut\":\n case \"auxclick\":\n case \"dblclick\":\n case \"dragend\":\n case \"dragstart\":\n case \"drop\":\n case \"focusin\":\n case \"focusout\":\n case \"input\":\n case \"invalid\":\n case \"keydown\":\n case \"keypress\":\n case \"keyup\":\n case \"mousedown\":\n case \"mouseup\":\n case \"paste\":\n case \"pause\":\n case \"play\":\n case \"pointercancel\":\n case \"pointerdown\":\n case \"pointerup\":\n case \"ratechange\":\n case \"reset\":\n case \"resize\":\n case \"seeked\":\n case \"submit\":\n case \"toggle\":\n case \"touchcancel\":\n case \"touchend\":\n case \"touchstart\":\n case \"volumechange\":\n case \"change\":\n case \"selectionchange\":\n case \"textInput\":\n case \"compositionstart\":\n case \"compositionend\":\n case \"compositionupdate\":\n case \"beforeblur\":\n case \"afterblur\":\n case \"beforeinput\":\n case \"blur\":\n case \"fullscreenchange\":\n case \"focus\":\n case \"hashchange\":\n case \"popstate\":\n case \"select\":\n case \"selectstart\":\n return 2;\n case \"drag\":\n case \"dragenter\":\n case \"dragexit\":\n case \"dragleave\":\n case \"dragover\":\n case \"mousemove\":\n case \"mouseout\":\n case \"mouseover\":\n case \"pointermove\":\n case \"pointerout\":\n case \"pointerover\":\n case \"scroll\":\n case \"touchmove\":\n case \"wheel\":\n case \"mouseenter\":\n case \"mouseleave\":\n case \"pointerenter\":\n case \"pointerleave\":\n return 8;\n case \"message\":\n switch (getCurrentPriorityLevel()) {\n case ImmediatePriority:\n return 2;\n case UserBlockingPriority:\n return 8;\n case NormalPriority$1:\n case LowPriority:\n return 32;\n case IdlePriority:\n return 268435456;\n default:\n return 32;\n }\n default:\n return 32;\n }\n}\nvar hasScheduledReplayAttempt = !1,\n queuedFocus = null,\n queuedDrag = null,\n queuedMouse = null,\n queuedPointers = new Map(),\n queuedPointerCaptures = new Map(),\n queuedExplicitHydrationTargets = [],\n discreteReplayableEvents =\n \"mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset\".split(\n \" \"\n );\nfunction clearIfContinuousEvent(domEventName, nativeEvent) {\n switch (domEventName) {\n case \"focusin\":\n case \"focusout\":\n queuedFocus = null;\n break;\n case \"dragenter\":\n case \"dragleave\":\n queuedDrag = null;\n break;\n case \"mouseover\":\n case \"mouseout\":\n queuedMouse = null;\n break;\n case \"pointerover\":\n case \"pointerout\":\n queuedPointers.delete(nativeEvent.pointerId);\n break;\n case \"gotpointercapture\":\n case \"lostpointercapture\":\n queuedPointerCaptures.delete(nativeEvent.pointerId);\n }\n}\nfunction accumulateOrCreateContinuousQueuedReplayableEvent(\n existingQueuedEvent,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n if (\n null === existingQueuedEvent ||\n existingQueuedEvent.nativeEvent !== nativeEvent\n )\n return (\n (existingQueuedEvent = {\n blockedOn: blockedOn,\n domEventName: domEventName,\n eventSystemFlags: eventSystemFlags,\n nativeEvent: nativeEvent,\n targetContainers: [targetContainer]\n }),\n null !== blockedOn &&\n ((blockedOn = getInstanceFromNode(blockedOn)),\n null !== blockedOn && attemptContinuousHydration(blockedOn)),\n existingQueuedEvent\n );\n existingQueuedEvent.eventSystemFlags |= eventSystemFlags;\n blockedOn = existingQueuedEvent.targetContainers;\n null !== targetContainer &&\n -1 === blockedOn.indexOf(targetContainer) &&\n blockedOn.push(targetContainer);\n return existingQueuedEvent;\n}\nfunction queueIfContinuousEvent(\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n) {\n switch (domEventName) {\n case \"focusin\":\n return (\n (queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedFocus,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"dragenter\":\n return (\n (queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedDrag,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"mouseover\":\n return (\n (queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedMouse,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )),\n !0\n );\n case \"pointerover\":\n var pointerId = nativeEvent.pointerId;\n queuedPointers.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointers.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n );\n return !0;\n case \"gotpointercapture\":\n return (\n (pointerId = nativeEvent.pointerId),\n queuedPointerCaptures.set(\n pointerId,\n accumulateOrCreateContinuousQueuedReplayableEvent(\n queuedPointerCaptures.get(pointerId) || null,\n blockedOn,\n domEventName,\n eventSystemFlags,\n targetContainer,\n nativeEvent\n )\n ),\n !0\n );\n }\n return !1;\n}\nfunction attemptExplicitHydrationTarget(queuedTarget) {\n var targetInst = getClosestInstanceFromNode(queuedTarget.target);\n if (null !== targetInst) {\n var nearestMounted = getNearestMountedFiber(targetInst);\n if (null !== nearestMounted)\n if (((targetInst = nearestMounted.tag), 13 === targetInst)) {\n if (\n ((targetInst = getSuspenseInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (31 === targetInst) {\n if (\n ((targetInst = getActivityInstanceFromFiber(nearestMounted)),\n null !== targetInst)\n ) {\n queuedTarget.blockedOn = targetInst;\n runWithPriority(queuedTarget.priority, function () {\n attemptHydrationAtCurrentPriority(nearestMounted);\n });\n return;\n }\n } else if (\n 3 === targetInst &&\n nearestMounted.stateNode.current.memoizedState.isDehydrated\n ) {\n queuedTarget.blockedOn =\n 3 === nearestMounted.tag\n ? nearestMounted.stateNode.containerInfo\n : null;\n return;\n }\n }\n queuedTarget.blockedOn = null;\n}\nfunction attemptReplayContinuousQueuedEvent(queuedEvent) {\n if (null !== queuedEvent.blockedOn) return !1;\n for (\n var targetContainers = queuedEvent.targetContainers;\n 0 < targetContainers.length;\n\n ) {\n var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.nativeEvent);\n if (null === nextBlockedOn) {\n nextBlockedOn = queuedEvent.nativeEvent;\n var nativeEventClone = new nextBlockedOn.constructor(\n nextBlockedOn.type,\n nextBlockedOn\n );\n currentReplayingEvent = nativeEventClone;\n nextBlockedOn.target.dispatchEvent(nativeEventClone);\n currentReplayingEvent = null;\n } else\n return (\n (targetContainers = getInstanceFromNode(nextBlockedOn)),\n null !== targetContainers &&\n attemptContinuousHydration(targetContainers),\n (queuedEvent.blockedOn = nextBlockedOn),\n !1\n );\n targetContainers.shift();\n }\n return !0;\n}\nfunction attemptReplayContinuousQueuedEventInMap(queuedEvent, key, map) {\n attemptReplayContinuousQueuedEvent(queuedEvent) && map.delete(key);\n}\nfunction replayUnblockedEvents() {\n hasScheduledReplayAttempt = !1;\n null !== queuedFocus &&\n attemptReplayContinuousQueuedEvent(queuedFocus) &&\n (queuedFocus = null);\n null !== queuedDrag &&\n attemptReplayContinuousQueuedEvent(queuedDrag) &&\n (queuedDrag = null);\n null !== queuedMouse &&\n attemptReplayContinuousQueuedEvent(queuedMouse) &&\n (queuedMouse = null);\n queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);\n queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);\n}\nfunction scheduleCallbackIfUnblocked(queuedEvent, unblocked) {\n queuedEvent.blockedOn === unblocked &&\n ((queuedEvent.blockedOn = null),\n hasScheduledReplayAttempt ||\n ((hasScheduledReplayAttempt = !0),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n replayUnblockedEvents\n )));\n}\nvar lastScheduledReplayQueue = null;\nfunction scheduleReplayQueueIfNeeded(formReplayingQueue) {\n lastScheduledReplayQueue !== formReplayingQueue &&\n ((lastScheduledReplayQueue = formReplayingQueue),\n Scheduler.unstable_scheduleCallback(\n Scheduler.unstable_NormalPriority,\n function () {\n lastScheduledReplayQueue === formReplayingQueue &&\n (lastScheduledReplayQueue = null);\n for (var i = 0; i < formReplayingQueue.length; i += 3) {\n var form = formReplayingQueue[i],\n submitterOrAction = formReplayingQueue[i + 1],\n formData = formReplayingQueue[i + 2];\n if (\"function\" !== typeof submitterOrAction)\n if (null === findInstanceBlockingTarget(submitterOrAction || form))\n continue;\n else break;\n var formInst = getInstanceFromNode(form);\n null !== formInst &&\n (formReplayingQueue.splice(i, 3),\n (i -= 3),\n startHostTransition(\n formInst,\n {\n pending: !0,\n data: formData,\n method: form.method,\n action: submitterOrAction\n },\n submitterOrAction,\n formData\n ));\n }\n }\n ));\n}\nfunction retryIfBlockedOn(unblocked) {\n function unblock(queuedEvent) {\n return scheduleCallbackIfUnblocked(queuedEvent, unblocked);\n }\n null !== queuedFocus && scheduleCallbackIfUnblocked(queuedFocus, unblocked);\n null !== queuedDrag && scheduleCallbackIfUnblocked(queuedDrag, unblocked);\n null !== queuedMouse && scheduleCallbackIfUnblocked(queuedMouse, unblocked);\n queuedPointers.forEach(unblock);\n queuedPointerCaptures.forEach(unblock);\n for (var i = 0; i < queuedExplicitHydrationTargets.length; i++) {\n var queuedTarget = queuedExplicitHydrationTargets[i];\n queuedTarget.blockedOn === unblocked && (queuedTarget.blockedOn = null);\n }\n for (\n ;\n 0 < queuedExplicitHydrationTargets.length &&\n ((i = queuedExplicitHydrationTargets[0]), null === i.blockedOn);\n\n )\n attemptExplicitHydrationTarget(i),\n null === i.blockedOn && queuedExplicitHydrationTargets.shift();\n i = (unblocked.ownerDocument || unblocked).$$reactFormReplay;\n if (null != i)\n for (queuedTarget = 0; queuedTarget < i.length; queuedTarget += 3) {\n var form = i[queuedTarget],\n submitterOrAction = i[queuedTarget + 1],\n formProps = form[internalPropsKey] || null;\n if (\"function\" === typeof submitterOrAction)\n formProps || scheduleReplayQueueIfNeeded(i);\n else if (formProps) {\n var action = null;\n if (submitterOrAction && submitterOrAction.hasAttribute(\"formAction\"))\n if (\n ((form = submitterOrAction),\n (formProps = submitterOrAction[internalPropsKey] || null))\n )\n action = formProps.formAction;\n else {\n if (null !== findInstanceBlockingTarget(form)) continue;\n }\n else action = formProps.action;\n \"function\" === typeof action\n ? (i[queuedTarget + 1] = action)\n : (i.splice(queuedTarget, 3), (queuedTarget -= 3));\n scheduleReplayQueueIfNeeded(i);\n }\n }\n}\nfunction defaultOnDefaultTransitionIndicator() {\n function handleNavigate(event) {\n event.canIntercept &&\n \"react-transition\" === event.info &&\n event.intercept({\n handler: function () {\n return new Promise(function (resolve) {\n return (pendingResolve = resolve);\n });\n },\n focusReset: \"manual\",\n scroll: \"manual\"\n });\n }\n function handleNavigateComplete() {\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n isCancelled || setTimeout(startFakeNavigation, 20);\n }\n function startFakeNavigation() {\n if (!isCancelled && !navigation.transition) {\n var currentEntry = navigation.currentEntry;\n currentEntry &&\n null != currentEntry.url &&\n navigation.navigate(currentEntry.url, {\n state: currentEntry.getState(),\n info: \"react-transition\",\n history: \"replace\"\n });\n }\n }\n if (\"object\" === typeof navigation) {\n var isCancelled = !1,\n pendingResolve = null;\n navigation.addEventListener(\"navigate\", handleNavigate);\n navigation.addEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.addEventListener(\"navigateerror\", handleNavigateComplete);\n setTimeout(startFakeNavigation, 100);\n return function () {\n isCancelled = !0;\n navigation.removeEventListener(\"navigate\", handleNavigate);\n navigation.removeEventListener(\"navigatesuccess\", handleNavigateComplete);\n navigation.removeEventListener(\"navigateerror\", handleNavigateComplete);\n null !== pendingResolve && (pendingResolve(), (pendingResolve = null));\n };\n }\n}\nfunction ReactDOMRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render =\n function (children) {\n var root = this._internalRoot;\n if (null === root) throw Error(formatProdErrorMessage(409));\n var current = root.current,\n lane = requestUpdateLane();\n updateContainerImpl(current, lane, children, root, null, null);\n };\nReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount =\n function () {\n var root = this._internalRoot;\n if (null !== root) {\n this._internalRoot = null;\n var container = root.containerInfo;\n updateContainerImpl(root.current, 2, null, root, null, null);\n flushSyncWork$1();\n container[internalContainerInstanceKey] = null;\n }\n };\nfunction ReactDOMHydrationRoot(internalRoot) {\n this._internalRoot = internalRoot;\n}\nReactDOMHydrationRoot.prototype.unstable_scheduleHydration = function (target) {\n if (target) {\n var updatePriority = resolveUpdatePriority();\n target = { blockedOn: null, target: target, priority: updatePriority };\n for (\n var i = 0;\n i < queuedExplicitHydrationTargets.length &&\n 0 !== updatePriority &&\n updatePriority < queuedExplicitHydrationTargets[i].priority;\n i++\n );\n queuedExplicitHydrationTargets.splice(i, 0, target);\n 0 === i && attemptExplicitHydrationTarget(target);\n }\n};\nvar isomorphicReactPackageVersion$jscomp$inline_1840 = React.version;\nif (\n \"19.2.0\" !==\n isomorphicReactPackageVersion$jscomp$inline_1840\n)\n throw Error(\n formatProdErrorMessage(\n 527,\n isomorphicReactPackageVersion$jscomp$inline_1840,\n \"19.2.0\"\n )\n );\nReactDOMSharedInternals.findDOMNode = function (componentOrElement) {\n var fiber = componentOrElement._reactInternals;\n if (void 0 === fiber) {\n if (\"function\" === typeof componentOrElement.render)\n throw Error(formatProdErrorMessage(188));\n componentOrElement = Object.keys(componentOrElement).join(\",\");\n throw Error(formatProdErrorMessage(268, componentOrElement));\n }\n componentOrElement = findCurrentFiberUsingSlowPath(fiber);\n componentOrElement =\n null !== componentOrElement\n ? findCurrentHostFiberImpl(componentOrElement)\n : null;\n componentOrElement =\n null === componentOrElement ? null : componentOrElement.stateNode;\n return componentOrElement;\n};\nvar internals$jscomp$inline_2347 = {\n bundleType: 0,\n version: \"19.2.0\",\n rendererPackageName: \"react-dom\",\n currentDispatcherRef: ReactSharedInternals,\n reconcilerVersion: \"19.2.0\"\n};\nif (\"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {\n var hook$jscomp$inline_2348 = __REACT_DEVTOOLS_GLOBAL_HOOK__;\n if (\n !hook$jscomp$inline_2348.isDisabled &&\n hook$jscomp$inline_2348.supportsFiber\n )\n try {\n (rendererID = hook$jscomp$inline_2348.inject(\n internals$jscomp$inline_2347\n )),\n (injectedHook = hook$jscomp$inline_2348);\n } catch (err) {}\n}\nexports.createRoot = function (container, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError));\n options = createFiberRoot(\n container,\n 1,\n !1,\n null,\n null,\n isStrictMode,\n identifierPrefix,\n null,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n container[internalContainerInstanceKey] = options.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMRoot(options);\n};\nexports.hydrateRoot = function (container, initialChildren, options) {\n if (!isValidContainer(container)) throw Error(formatProdErrorMessage(299));\n var isStrictMode = !1,\n identifierPrefix = \"\",\n onUncaughtError = defaultOnUncaughtError,\n onCaughtError = defaultOnCaughtError,\n onRecoverableError = defaultOnRecoverableError,\n formState = null;\n null !== options &&\n void 0 !== options &&\n (!0 === options.unstable_strictMode && (isStrictMode = !0),\n void 0 !== options.identifierPrefix &&\n (identifierPrefix = options.identifierPrefix),\n void 0 !== options.onUncaughtError &&\n (onUncaughtError = options.onUncaughtError),\n void 0 !== options.onCaughtError && (onCaughtError = options.onCaughtError),\n void 0 !== options.onRecoverableError &&\n (onRecoverableError = options.onRecoverableError),\n void 0 !== options.formState && (formState = options.formState));\n initialChildren = createFiberRoot(\n container,\n 1,\n !0,\n initialChildren,\n null != options ? options : null,\n isStrictMode,\n identifierPrefix,\n formState,\n onUncaughtError,\n onCaughtError,\n onRecoverableError,\n defaultOnDefaultTransitionIndicator\n );\n initialChildren.context = getContextForSubtree(null);\n options = initialChildren.current;\n isStrictMode = requestUpdateLane();\n isStrictMode = getBumpedLaneForHydrationByLane(isStrictMode);\n identifierPrefix = createUpdate(isStrictMode);\n identifierPrefix.callback = null;\n enqueueUpdate(options, identifierPrefix, isStrictMode);\n options = isStrictMode;\n initialChildren.current.lanes = options;\n markRootUpdated$1(initialChildren, options);\n ensureRootIsScheduled(initialChildren);\n container[internalContainerInstanceKey] = initialChildren.current;\n listenToAllSupportedEvents(container);\n return new ReactDOMHydrationRoot(initialChildren);\n};\nexports.version = \"19.2.0\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom-client.production.js');\n} else {\n module.exports = require('./cjs/react-dom-client.development.js');\n}\n","/**\n * BridgeInterface - Abstract base class for platform-specific communication\n *\n * This defines the contract that both ElectronBridge and WebBridge must implement.\n * Components use this interface and don't care about the underlying transport.\n *\n * Platform-specific implementations:\n * - ElectronBridge: Uses window.kaiAPI (IPC to main process)\n * - WebBridge: Uses fetch() and Socket.IO (REST + WebSocket)\n */\n\nexport class BridgeInterface {\n // ===== Player Controls =====\n\n play() {\n return Promise.reject(new Error('play() not implemented'));\n }\n\n pause() {\n return Promise.reject(new Error('pause() not implemented'));\n }\n\n restart() {\n return Promise.reject(new Error('restart() not implemented'));\n }\n\n seek(_positionSec) {\n return Promise.reject(new Error('seek() not implemented'));\n }\n\n getPlaybackState() {\n return Promise.reject(new Error('getPlaybackState() not implemented'));\n }\n\n // ===== Queue Management =====\n\n getQueue() {\n return Promise.reject(new Error('getQueue() not implemented'));\n }\n\n addToQueue(_song) {\n return Promise.reject(new Error('addToQueue() not implemented'));\n }\n\n removeFromQueue(_id) {\n return Promise.reject(new Error('removeFromQueue() not implemented'));\n }\n\n clearQueue() {\n return Promise.reject(new Error('clearQueue() not implemented'));\n }\n\n reorderQueue(_fromIndex, _toIndex) {\n return Promise.reject(new Error('reorderQueue() not implemented'));\n }\n\n playNext() {\n return Promise.reject(new Error('playNext() not implemented'));\n }\n\n // ===== Mixer Controls =====\n\n getMixerState() {\n return Promise.reject(new Error('getMixerState() not implemented'));\n }\n\n setMasterGain(_bus, _gainDb) {\n return Promise.reject(new Error('setMasterGain() not implemented'));\n }\n\n toggleMasterMute(_bus) {\n return Promise.reject(new Error('toggleMasterMute() not implemented'));\n }\n\n setMasterMute(_bus, _muted) {\n return Promise.reject(new Error('setMasterMute() not implemented'));\n }\n\n // ===== Effects Controls =====\n\n getEffects() {\n return Promise.reject(new Error('getEffects() not implemented'));\n }\n\n selectEffect(_effectName) {\n return Promise.reject(new Error('selectEffect() not implemented'));\n }\n\n toggleEffect(_effectName, _enabled) {\n return Promise.reject(new Error('toggleEffect() not implemented'));\n }\n\n nextEffect() {\n return Promise.reject(new Error('nextEffect() not implemented'));\n }\n\n previousEffect() {\n return Promise.reject(new Error('previousEffect() not implemented'));\n }\n\n randomEffect() {\n return Promise.reject(new Error('randomEffect() not implemented'));\n }\n\n // ===== Library Management =====\n\n getLibrary() {\n return Promise.reject(new Error('getLibrary() not implemented'));\n }\n\n scanLibrary() {\n return Promise.reject(new Error('scanLibrary() not implemented'));\n }\n\n searchSongs(_query) {\n return Promise.reject(new Error('searchSongs() not implemented'));\n }\n\n loadSongForEditing(_path) {\n return Promise.reject(new Error('loadSongForEditing() not implemented'));\n }\n\n saveSongEdits(_updates) {\n return Promise.reject(new Error('saveSongEdits() not implemented'));\n }\n\n // ===== Preferences =====\n\n getPreferences() {\n return Promise.reject(new Error('getPreferences() not implemented'));\n }\n\n updateAutoTunePreferences(_prefs) {\n return Promise.reject(new Error('updateAutoTunePreferences() not implemented'));\n }\n\n updateMicrophonePreferences(_prefs) {\n return Promise.reject(new Error('updateMicrophonePreferences() not implemented'));\n }\n\n updateEffectsPreferences(_prefs) {\n return Promise.reject(new Error('updateEffectsPreferences() not implemented'));\n }\n\n // ===== Song Requests =====\n\n getRequests() {\n return Promise.reject(new Error('getRequests() not implemented'));\n }\n\n approveRequest(_requestId) {\n return Promise.reject(new Error('approveRequest() not implemented'));\n }\n\n rejectRequest(_requestId) {\n return Promise.reject(new Error('rejectRequest() not implemented'));\n }\n\n // ===== State Subscriptions =====\n\n /**\n * Subscribe to state changes for a specific domain\n * @param {string} domain - State domain (mixer, queue, playback, effects, etc.)\n * @param {Function} callback - Callback function (receives updated state)\n * @returns {Function} Unsubscribe function\n */\n onStateChange(_domain, _callback) {\n throw new Error('onStateChange() not implemented');\n }\n\n /**\n * Unsubscribe from state changes\n * @param {string} domain - State domain\n * @param {Function} callback - Callback to remove\n */\n offStateChange(_domain, _callback) {\n throw new Error('offStateChange() not implemented');\n }\n\n // ===== Lifecycle =====\n\n /**\n * Initialize the bridge (e.g., connect sockets)\n */\n async connect() {\n // Optional - override if needed\n }\n\n /**\n * Clean up resources (e.g., disconnect sockets)\n */\n async disconnect() {\n // Optional - override if needed\n }\n}\n","/**\n * Unified defaults for all settings\n * Single source of truth - import this everywhere instead of defining defaults inline\n */\n\nexport const MIXER_DEFAULTS = {\n PA: { gain: 0, muted: false, mono: false },\n IEM: { gain: 0, muted: true, mono: true },\n mic: { gain: 0, muted: true },\n stems: {\n vocals: { gain: 0, muted: false },\n instrumental: { gain: 0, muted: false },\n bass: { gain: 0, muted: false },\n drums: { gain: 0, muted: false },\n },\n};\n\nexport const EFFECTS_DEFAULTS = {\n current: null,\n disabled: [],\n enableWaveforms: false,\n enableEffects: true,\n randomEffectOnSong: false,\n overlayOpacity: 0.7,\n showUpcomingLyrics: true,\n};\n\nexport const AUTOTUNE_DEFAULTS = {\n enabled: false,\n strength: 50,\n speed: 20,\n preferVocals: false,\n};\n\nexport const MICROPHONE_DEFAULTS = {\n enabled: false,\n gain: 1.0,\n toSpeakers: true,\n};\n\nexport const AUDIO_DEVICE_DEFAULTS = {\n PA: { id: 'default', name: 'Default Output' },\n IEM: { id: 'default', name: 'Default Output' },\n input: { id: 'default', name: 'Default Input' },\n};\n\nexport const SERVER_DEFAULTS = {\n requireKJApproval: true,\n allowSongRequests: true,\n serverName: 'Loukai Karaoke',\n port: 3069,\n maxRequestsPerIP: 10,\n showQrCode: true,\n displayQueue: true,\n};\n\nexport const LLM_DEFAULTS = {\n enabled: true,\n provider: 'lmstudio',\n model: '',\n apiKey: '',\n baseUrl: 'http://localhost:1234/v1',\n};\n\nexport const CREATOR_DEFAULTS = {\n outputToSongsFolder: false,\n whisperModel: 'large-v3-turbo',\n enableCrepe: true,\n llm: LLM_DEFAULTS,\n};\n\n// Waveform preferences (alias for effects for backward compatibility)\nexport const WAVEFORM_DEFAULTS = {\n enableWaveforms: EFFECTS_DEFAULTS.enableWaveforms,\n enableEffects: EFFECTS_DEFAULTS.enableEffects,\n randomEffectOnSong: EFFECTS_DEFAULTS.randomEffectOnSong,\n overlayOpacity: EFFECTS_DEFAULTS.overlayOpacity,\n showUpcomingLyrics: EFFECTS_DEFAULTS.showUpcomingLyrics,\n};\n\n// UI defaults\nexport const UI_DEFAULTS = {\n sidebarCollapsed: true, // Start with sidebar collapsed for less overwhelming first experience\n};\n\n// All defaults in one object\nexport const ALL_DEFAULTS = {\n mixer: MIXER_DEFAULTS,\n effects: EFFECTS_DEFAULTS,\n autoTune: AUTOTUNE_DEFAULTS,\n microphone: MICROPHONE_DEFAULTS,\n audioDevices: AUDIO_DEVICE_DEFAULTS,\n server: SERVER_DEFAULTS,\n creator: CREATOR_DEFAULTS,\n waveformPreferences: WAVEFORM_DEFAULTS,\n autoTunePreferences: AUTOTUNE_DEFAULTS,\n ui: UI_DEFAULTS,\n sidebarCollapsed: UI_DEFAULTS.sidebarCollapsed,\n iemMonoVocals: true,\n songsFolder: null,\n lastOpenedFile: null,\n windowBounds: null,\n};\n\n/**\n * Deep merge saved settings over defaults\n * @param {Object} saved - Saved settings from disk\n * @param {Object} defaults - Default values\n * @returns {Object} Merged settings\n */\nexport function mergeWithDefaults(saved, defaults = ALL_DEFAULTS) {\n if (!saved) return { ...defaults };\n\n const result = {};\n for (const key of Object.keys(defaults)) {\n const defaultValue = defaults[key];\n const savedValue = saved[key];\n\n if (\n defaultValue !== null &&\n typeof defaultValue === 'object' &&\n !Array.isArray(defaultValue) &&\n savedValue !== null &&\n typeof savedValue === 'object' &&\n !Array.isArray(savedValue)\n ) {\n // Deep merge objects\n result[key] = { ...defaultValue, ...savedValue };\n } else if (savedValue !== undefined) {\n result[key] = savedValue;\n } else {\n result[key] = defaultValue;\n }\n }\n\n // Include any extra keys from saved that aren't in defaults\n for (const key of Object.keys(saved)) {\n if (!(key in result)) {\n result[key] = saved[key];\n }\n }\n\n return result;\n}\n\nexport default {\n MIXER_DEFAULTS,\n EFFECTS_DEFAULTS,\n AUTOTUNE_DEFAULTS,\n MICROPHONE_DEFAULTS,\n AUDIO_DEVICE_DEFAULTS,\n SERVER_DEFAULTS,\n LLM_DEFAULTS,\n CREATOR_DEFAULTS,\n WAVEFORM_DEFAULTS,\n ALL_DEFAULTS,\n mergeWithDefaults,\n};\n","/**\n * ElectronBridge - Electron-specific implementation of BridgeInterface\n *\n * Wraps window.kaiAPI (IPC interface exposed by preload script)\n * This is the ONLY place in React code that touches window.kaiAPI\n *\n * Components use this bridge and never directly access window.*\n */\n\nimport { BridgeInterface } from '../../shared/adapters/BridgeInterface.js';\nimport { WAVEFORM_DEFAULTS, AUTOTUNE_DEFAULTS } from '../../shared/defaults.js';\n\nlet _instance = null;\n\nexport class ElectronBridge extends BridgeInterface {\n constructor() {\n if (_instance) {\n return _instance;\n }\n super();\n this.api = window.kaiAPI;\n\n _instance = this;\n }\n\n static getInstance() {\n if (!_instance) {\n _instance = new ElectronBridge();\n }\n return _instance;\n }\n\n // ===== Player Controls =====\n // NOTE: Play/pause/seek handled via React hooks (usePlayer)\n\n async getPlaybackState() {\n const state = await this.api.app.getState();\n return state.playback;\n }\n\n // ===== Queue Management =====\n\n async getQueue() {\n const state = await this.api.app.getState();\n return { queue: state.queue, currentSong: state.currentSong };\n }\n\n async addToQueue(song) {\n return await this.api.queue.addSong(song);\n }\n\n async removeFromQueue(id) {\n return await this.api.queue.removeSong(id);\n }\n\n async clearQueue() {\n return await this.api.queue.clear();\n }\n\n async reorderQueue(songId, newIndex) {\n return await this.api.queue.reorderQueue(songId, newIndex);\n }\n\n async playNext() {\n return await this.api.player.next();\n }\n\n async playFromQueue(songId) {\n // Load song from queue by ID (uses queue service)\n return await this.api.queue.load(songId);\n }\n\n // ===== Mixer Controls =====\n\n async getMixerState() {\n const state = await this.api.app.getState();\n return state.mixer;\n }\n\n setMasterGain(bus, gainDb) {\n // Apply locally - kaiPlayer will report back to main process via reportMixerState()\n const kaiPlayer = window.app?.player?.kaiPlayer;\n if (kaiPlayer) {\n return kaiPlayer.setMasterGain(bus, gainDb);\n }\n return { success: false, error: 'Audio engine not initialized' };\n }\n\n toggleMasterMute(bus) {\n // Apply locally - kaiPlayer will report back to main process via reportMixerState()\n const kaiPlayer = window.app?.player?.kaiPlayer;\n if (kaiPlayer) {\n return kaiPlayer.toggleMasterMute(bus);\n }\n return { success: false, error: 'Audio engine not initialized' };\n }\n\n setMasterMute(bus, muted) {\n // Apply locally - kaiPlayer will report back to main process via reportMixerState()\n const kaiPlayer = window.app?.player?.kaiPlayer;\n if (kaiPlayer) {\n return kaiPlayer.setMasterMute(bus, muted);\n }\n return { success: false, error: 'Audio engine not initialized' };\n }\n\n async toggleMute(stemId, bus) {\n return await this.api.mixer.toggleMute(stemId, bus);\n }\n\n // ===== Audio Device Management =====\n\n async getAudioDevices() {\n // Enumerate devices directly in renderer (main process doesn't have access to navigator.mediaDevices)\n try {\n if (!navigator.mediaDevices || !navigator.mediaDevices.enumerateDevices) {\n console.warn('MediaDevices API not available');\n return [];\n }\n\n // Request permission first to get device labels\n await navigator.mediaDevices\n .getUserMedia({ audio: true })\n .then((stream) => {\n stream.getTracks().forEach((track) => track.stop());\n })\n .catch((err) => {\n console.warn('Microphone permission denied:', err);\n });\n\n const devices = await navigator.mediaDevices.enumerateDevices();\n const audioDevices = [];\n\n devices.forEach((device, index) => {\n if (device.kind === 'audiooutput' || device.kind === 'audioinput') {\n audioDevices.push({\n id: device.deviceId,\n deviceId: device.deviceId,\n label:\n device.label ||\n `${device.kind === 'audiooutput' ? 'Speaker' : 'Microphone'} ${index + 1}`,\n name:\n device.label ||\n `${device.kind === 'audiooutput' ? 'Speaker' : 'Microphone'} ${index + 1}`,\n maxInputChannels: device.kind === 'audioinput' ? 2 : 0,\n maxOutputChannels: device.kind === 'audiooutput' ? 2 : 0,\n defaultSampleRate: 48000,\n hostApi: 'Web Audio API',\n deviceKind: device.kind,\n groupId: device.groupId,\n });\n }\n });\n\n return audioDevices;\n } catch (error) {\n console.error('Failed to enumerate audio devices:', error);\n return [];\n }\n }\n\n async setAudioDevice(deviceType, deviceId) {\n console.log(`🎧 Setting ${deviceType} device to:`, deviceId);\n\n // Notify main process (for persistence)\n await this.api.audio.setDevice(deviceType, deviceId);\n\n // Apply to kaiPlayer immediately (if it exists)\n const kaiPlayer = window.app?.player?.kaiPlayer;\n if (kaiPlayer && (deviceType === 'PA' || deviceType === 'IEM')) {\n try {\n await kaiPlayer.setOutputDevice(deviceType, deviceId);\n console.log(`✅ Applied ${deviceType} device change to kaiPlayer`);\n } catch (error) {\n console.error(`❌ Failed to apply ${deviceType} device to kaiPlayer:`, error);\n }\n } else if (kaiPlayer && deviceType === 'input') {\n try {\n // For input device, restart microphone with new device\n kaiPlayer.inputDevice = deviceId;\n if (kaiPlayer.mixerState.enableMic) {\n await kaiPlayer.startMicrophoneInput(deviceId);\n }\n console.log(`✅ Applied input device change to kaiPlayer`);\n } catch (error) {\n console.error(`❌ Failed to apply input device to kaiPlayer:`, error);\n }\n }\n\n return { success: true };\n }\n\n async getDevicePreferences() {\n return await this.api.settings.get('devicePreferences', {});\n }\n\n async saveDevicePreferences(preferences) {\n return await this.api.settings.set('devicePreferences', preferences);\n }\n\n async getAudioSettings() {\n const iemMonoVocals = await this.api.settings.get('iemMonoVocals', true);\n const micToSpeakers = await this.api.settings.get('micToSpeakers', true);\n const enableMic = await this.api.settings.get('enableMic', true);\n return { iemMonoVocals, micToSpeakers, enableMic };\n }\n\n async saveAudioSettings(settings) {\n // Save to disk\n if (settings.iemMonoVocals !== undefined) {\n await this.api.settings.set('iemMonoVocals', settings.iemMonoVocals);\n }\n if (settings.micToSpeakers !== undefined) {\n await this.api.settings.set('micToSpeakers', settings.micToSpeakers);\n }\n if (settings.enableMic !== undefined) {\n await this.api.settings.set('enableMic', settings.enableMic);\n }\n\n // Apply settings to kaiPlayer in real-time (if it exists)\n const kaiPlayer = window.app?.player?.kaiPlayer;\n if (kaiPlayer) {\n if (settings.iemMonoVocals !== undefined) {\n kaiPlayer.setIEMMonoVocals(settings.iemMonoVocals);\n console.log('🎧 Applied IEM mono vocals:', settings.iemMonoVocals);\n }\n if (settings.micToSpeakers !== undefined) {\n kaiPlayer.setMicToSpeakers(settings.micToSpeakers);\n console.log('🎧 Applied mic to speakers:', settings.micToSpeakers);\n }\n if (settings.enableMic !== undefined) {\n kaiPlayer.setEnableMic(settings.enableMic);\n console.log('🎧 Applied enable mic:', settings.enableMic);\n }\n }\n\n console.log('✅ Audio settings saved and applied:', settings);\n }\n\n // ===== Effects Controls =====\n\n async getEffects() {\n return await this.api.effects.getList();\n }\n\n async selectEffect(effectName) {\n return await this.api.effects.select(effectName);\n }\n\n async enableEffect(effectName) {\n return await this.api.effects.toggle(effectName, true);\n }\n\n async disableEffect(effectName) {\n return await this.api.effects.toggle(effectName, false);\n }\n\n async toggleEffect(effectName, enabled) {\n return await this.api.effects.toggle(effectName, enabled);\n }\n\n async nextEffect() {\n return await this.api.effects.next();\n }\n\n async previousEffect() {\n return await this.api.effects.previous();\n }\n\n async randomEffect() {\n return await this.api.effects.random();\n }\n\n // ===== Library Management =====\n\n async getLibrary() {\n return await this.api.library.getSongs();\n }\n\n async scanLibrary() {\n return await this.api.library.scanFolder();\n }\n\n async searchSongs(query) {\n return await this.api.library.search(query);\n }\n\n async getSongsFolder() {\n const result = await this.api.library.getSongsFolder();\n return result.folder;\n }\n\n async setSongsFolder() {\n const result = await this.api.library.setSongsFolder();\n return result.folder;\n }\n\n async getCachedLibrary() {\n const result = await this.api.library.getCachedSongs();\n return result;\n }\n\n async syncLibrary() {\n const result = await this.api.library.syncLibrary();\n return result;\n }\n\n async loadSong(path) {\n return await this.api.file.loadKaiFromPath(path);\n }\n\n // ===== Song Editor =====\n\n async loadSongForEditing(path) {\n // Load the KAI file for editing (using editor.loadKai which doesn't affect playback)\n const result = await this.api.editor.loadKai(path);\n if (!result.success) {\n return { success: false, error: result.error };\n }\n\n const songData = result.data;\n\n // Create blob URLs for audio files (for Audio element playback)\n const audioFiles =\n songData.audio?.sources?.map((source) => {\n // Create blob URL from audioData buffer\n const blob = new Blob([source.audioData], { type: 'audio/mpeg' });\n const downloadUrl = URL.createObjectURL(blob);\n\n return {\n name: source.name,\n filename: source.filename,\n audioData: source.audioData, // Keep raw data for waveform analysis\n downloadUrl: downloadUrl, // Blob URL for Audio element\n };\n }) || [];\n\n // Return in the format expected by SongEditor\n return {\n success: true,\n data: {\n format: 'kai',\n metadata: songData.metadata || {},\n lyrics: songData.lyrics || [],\n audioFiles: audioFiles,\n songJson: songData.originalSongJson || {},\n },\n };\n }\n\n async saveSongEdits(updates) {\n const { path, metadata, lyrics, format } = updates;\n\n if (format === 'kai') {\n // Build the song object for KaiWriter\n const songData = {\n song: {\n title: metadata.title,\n artist: metadata.artist,\n album: metadata.album,\n year: metadata.year,\n genre: metadata.genre,\n key: metadata.key,\n },\n lyrics: lyrics,\n };\n\n // Include meta if rejections/suggestions were updated\n if (metadata.rejections !== undefined || metadata.suggestions !== undefined) {\n songData.meta = { corrections: {} };\n\n if (metadata.rejections !== undefined) {\n songData.meta.corrections.rejected = metadata.rejections.map((r) => ({\n line: r.line_num,\n start: r.start_time,\n end: r.end_time,\n old: r.old_text,\n new: r.new_text,\n reason: r.reason,\n word_retention: r.retention_rate,\n }));\n }\n\n if (metadata.suggestions !== undefined) {\n songData.meta.corrections.missing_lines_suggested = metadata.suggestions.map((s) => ({\n suggested_text: s.suggested_text,\n start: s.start_time,\n end: s.end_time,\n confidence: s.confidence,\n reason: s.reason,\n pitch_activity: s.pitch_activity,\n }));\n }\n }\n\n const result = await this.api.editor.saveKai(songData, path);\n return result;\n }\n\n return { success: false, error: 'Unsupported format' };\n }\n\n // ===== Preferences =====\n\n async getPreferences() {\n const state = await this.api.app.getState();\n return state.preferences;\n }\n\n async updateAutoTunePreferences(prefs) {\n return await this.api.preferences.setAutoTune(prefs);\n }\n\n async updateMicrophonePreferences(prefs) {\n return await this.api.preferences.setMicrophone(prefs);\n }\n\n async updateEffectsPreferences(prefs) {\n return await this.api.preferences.setEffects(prefs);\n }\n\n async getWaveformPreferences() {\n return await this.api.settings.get('waveformPreferences', WAVEFORM_DEFAULTS);\n }\n\n async saveWaveformPreferences(prefs) {\n // Extract only serializable values (avoid React synthetic objects)\n const cleanPrefs = {\n enableWaveforms: prefs.enableWaveforms,\n enableEffects: prefs.enableEffects,\n randomEffectOnSong: prefs.randomEffectOnSong,\n showUpcomingLyrics: prefs.showUpcomingLyrics,\n overlayOpacity: prefs.overlayOpacity,\n };\n\n const result = await this.api.settings.set('waveformPreferences', cleanPrefs);\n\n // Settings saved and broadcast via IPC (applied by useAudioEngine hook)\n console.log('✅ Waveform preferences saved and broadcast:', cleanPrefs);\n\n return result;\n }\n\n async getAutotunePreferences() {\n return await this.api.settings.get('autoTunePreferences', AUTOTUNE_DEFAULTS);\n }\n\n async saveAutotunePreferences(prefs) {\n // Extract only serializable values (avoid React synthetic objects)\n const cleanPrefs = {\n enabled: prefs.enabled,\n strength: prefs.strength,\n speed: prefs.speed,\n preferVocals: prefs.preferVocals,\n };\n\n // Save to disk\n const result = await this.api.settings.set('autoTunePreferences', cleanPrefs);\n\n // Apply settings to player in real-time (if it exists)\n // This ensures mid-song adjustments work immediately\n const player = window.app?.player?.kaiPlayer || window.app?.player?.cdgPlayer;\n if (player) {\n try {\n // Apply all settings at once\n await player.setAutoTuneSettings(cleanPrefs);\n console.log('🎤 Applied auto-tune settings in real-time:', cleanPrefs);\n } catch (error) {\n console.error('❌ Failed to apply auto-tune settings to player:', error);\n }\n }\n\n return result;\n }\n\n async setAutotuneEnabled(enabled) {\n // Apply to player immediately\n const player = window.app?.player?.kaiPlayer || window.app?.player?.cdgPlayer;\n if (player) {\n try {\n await player.setAutoTuneSettings({ enabled });\n console.log('🎤 Applied auto-tune enabled:', enabled);\n } catch (error) {\n console.error('❌ Failed to apply auto-tune enabled:', error);\n }\n }\n\n // Also notify main process for persistence\n return await this.api.autotune.setEnabled(enabled);\n }\n\n async setAutotuneSettings(settings) {\n // Apply to player immediately\n const player = window.app?.player?.kaiPlayer || window.app?.player?.cdgPlayer;\n if (player) {\n try {\n await player.setAutoTuneSettings(settings);\n console.log('🎤 Applied auto-tune settings:', settings);\n } catch (error) {\n console.error('❌ Failed to apply auto-tune settings:', error);\n }\n }\n\n // Also notify main process for persistence\n return await this.api.autotune.setSettings(settings);\n }\n\n // Subscribe to settings changes from external sources (e.g., web admin)\n onSettingsChanged(type, callback) {\n const eventMap = {\n waveform: 'waveform:settingsChanged',\n autotune: 'autotune:settingsChanged',\n };\n\n const eventName = eventMap[type];\n if (!eventName) return () => {};\n\n // Wrap callback to handle IPC event signature (event, settings)\n const wrappedCallback = (event, settings) => {\n callback(settings);\n };\n\n this.api.events.on(eventName, wrappedCallback);\n\n return () => {\n this.api.events.off?.(eventName, wrappedCallback);\n };\n }\n\n // ===== Song Requests =====\n\n async getRequests() {\n return await this.api.webServer.getSongRequests();\n }\n\n async approveRequest(requestId) {\n return await this.api.webServer.approveRequest(requestId);\n }\n\n async rejectRequest(requestId) {\n return await this.api.webServer.rejectRequest(requestId);\n }\n\n // ===== Server Management =====\n\n async getServerUrl() {\n return await this.api.webServer.getUrl();\n }\n\n async getServerSettings() {\n return await this.api.webServer.getSettings();\n }\n\n async updateServerSettings(settings) {\n return await this.api.webServer.updateSettings(settings);\n }\n\n async getAdminPasswordStatus() {\n return await this.api.settings.get('server.adminPasswordHash');\n }\n\n async setAdminPassword(password) {\n return await this.api.webServer.setAdminPassword(password);\n }\n\n async clearAllRequests() {\n return await this.api.webServer.clearAllRequests();\n }\n\n // ===== System =====\n\n async openExternal(url) {\n return await this.api.shell.openExternal(url);\n }\n\n // ===== Audio Monitoring =====\n\n onLatencyUpdate(callback) {\n const handler = (event, latencyMs) => callback(latencyMs);\n this.api.audio.onLatencyUpdate(handler);\n return () => this.api.audio.removeLatencyListener?.(handler);\n }\n\n onXRunUpdate(callback) {\n const handler = (event, count) => callback(count);\n this.api.audio.onXRun(handler);\n return () => this.api.audio.removeXRunListener?.(handler);\n }\n\n // ===== State Subscriptions =====\n\n onPlaybackStateChanged(callback) {\n // Use IPC event instead of polling\n const handler = (event, state) => callback(state);\n this.api.player.onPlaybackState(handler);\n\n // Return cleanup function\n return () => this.api.player.removePlaybackListener(handler);\n }\n\n onCurrentSongChanged(callback) {\n // Use IPC event instead of polling\n const handler = (event, song) => callback(song);\n this.api.song.onChanged(handler);\n\n // Return cleanup function\n return () => this.api.song.removeChangedListener(handler);\n }\n\n onQueueChanged(callback) {\n // Use IPC event instead of polling\n const handler = (event, queue) => {\n // Get current song from app state\n this.api.app.getState().then((state) => {\n callback({ queue, currentSong: state.currentSong });\n });\n };\n this.api.queue.onUpdated(handler);\n\n // Return cleanup function\n return () => this.api.queue.removeUpdatedListener(handler);\n }\n\n onMixerChanged(callback) {\n // Use IPC event instead of polling\n const handler = (event, mixer) => callback(mixer);\n this.api.mixer.onStateChange(handler);\n\n // Return cleanup function\n return () => this.api.mixer.removeStateListener(handler);\n }\n\n onEffectChanged(callback) {\n // Use IPC event instead of polling\n const handler = (event, effects) => callback(effects);\n this.api.effects.onChanged(handler);\n\n // Return cleanup function\n return () => this.api.effects.removeChangedListener(handler);\n }\n\n onStateChange(domain, callback) {\n // Use the specific on* methods for each domain\n switch (domain) {\n case 'playback':\n return this.onPlaybackStateChanged(callback);\n case 'mixer':\n return this.onMixerChanged(callback);\n case 'queue':\n return this.onQueueChanged(callback);\n case 'effects':\n return this.onEffectChanged(callback);\n case 'preferences': {\n const handler = (event, prefs) => callback(prefs);\n this.api.preferences.onUpdated(handler);\n return () => this.api.preferences.removeUpdatedListener(handler);\n }\n default:\n console.warn(`No state change handler for domain: ${domain}`);\n return () => {};\n }\n }\n\n // ===== Lifecycle =====\n\n connect() {\n // Already connected via IPC - nothing to do\n console.log('✅ ElectronBridge connected');\n return Promise.resolve();\n }\n\n disconnect() {\n // Cleanup is now handled by the cleanup functions returned from each subscription\n // Components should call the cleanup functions when they unmount\n console.log('✅ ElectronBridge disconnected');\n }\n}\n","/**\n * PlayerContext - Playback state management\n *\n * Manages current song, playback state, and position\n * Syncs with main process via IPC events\n */\n\nimport { createContext, useContext, useState, useEffect } from 'react';\n\nconst PlayerContext = createContext(null);\n\nexport function PlayerProvider({ children }) {\n const [currentSong, setCurrentSong] = useState(null);\n const [isPlaying, setIsPlaying] = useState(false);\n const [currentPosition, setCurrentPosition] = useState(0);\n const [duration, setDuration] = useState(0);\n\n // Sync state with IPC events from main process\n useEffect(() => {\n if (!window.kaiAPI?.player || !window.kaiAPI?.song) return;\n\n const handlePlaybackState = (event, state) => {\n setIsPlaying(state.isPlaying);\n setCurrentPosition(state.position);\n setDuration(state.duration);\n };\n\n const handleSongChanged = (event, song) => {\n setCurrentSong(song);\n };\n\n // Subscribe to events\n window.kaiAPI.player.onPlaybackState(handlePlaybackState);\n window.kaiAPI.song.onChanged(handleSongChanged);\n\n // Cleanup\n return () => {\n window.kaiAPI.player.removePlaybackListener(handlePlaybackState);\n window.kaiAPI.song.removeChangedListener(handleSongChanged);\n };\n }, []);\n\n const value = {\n // State\n currentSong,\n isPlaying,\n currentPosition,\n duration,\n\n // Actions\n setCurrentSong,\n setIsPlaying,\n setCurrentPosition,\n setDuration,\n };\n\n return <PlayerContext.Provider value={value}>{children}</PlayerContext.Provider>;\n}\n\nexport function usePlayerState() {\n const context = useContext(PlayerContext);\n if (!context) {\n throw new Error('usePlayerState must be used within PlayerProvider');\n }\n return context;\n}\n","/**\n * AudioContext - Audio engine state management\n *\n * Manages audio engine instances (kaiPlayer, player controller)\n */\n\nimport { createContext, useContext, useState } from 'react';\n\nconst AudioContext = createContext(null);\n\nexport function AudioProvider({ children }) {\n const [kaiPlayer, setKaiPlayer] = useState(null);\n const [player, setPlayer] = useState(null);\n const [devices, setDevices] = useState([]);\n\n const value = {\n // Audio engines\n kaiPlayer,\n player,\n devices,\n\n // Actions\n setKaiPlayer,\n setPlayer,\n setDevices,\n };\n\n return <AudioContext.Provider value={value}>{children}</AudioContext.Provider>;\n}\n\nexport function useAudio() {\n const context = useContext(AudioContext);\n if (!context) {\n throw new Error('useAudio must be used within AudioProvider');\n }\n return context;\n}\n","/**\n * SettingsContext - Application settings/preferences\n *\n * Manages device preferences, waveform settings, autotune settings\n * Uses unified defaults from shared/defaults.js\n */\n\nimport { createContext, useContext, useState } from 'react';\nimport { AUDIO_DEVICE_DEFAULTS, WAVEFORM_DEFAULTS, AUTOTUNE_DEFAULTS } from '../defaults.js';\n\nconst SettingsContext = createContext(null);\n\nexport function SettingsProvider({ children }) {\n const [devicePreferences, setDevicePreferences] = useState({\n ...AUDIO_DEVICE_DEFAULTS,\n });\n\n const [waveformPreferences, setWaveformPreferences] = useState({\n ...WAVEFORM_DEFAULTS,\n micToSpeakers: true,\n enableMic: true,\n disabledEffects: [],\n });\n\n const [autoTunePreferences, setAutoTunePreferences] = useState({\n ...AUTOTUNE_DEFAULTS,\n });\n\n const value = {\n // Settings\n devicePreferences,\n waveformPreferences,\n autoTunePreferences,\n\n // Actions\n setDevicePreferences,\n setWaveformPreferences,\n setAutoTunePreferences,\n };\n\n return <SettingsContext.Provider value={value}>{children}</SettingsContext.Provider>;\n}\n\nexport function useSettings() {\n const context = useContext(SettingsContext);\n if (!context) {\n throw new Error('useSettings must be used within SettingsProvider');\n }\n return context;\n}\n","/**\n * useAudioEngine - Audio engine initialization hook\n *\n * Initializes KAIPlayer and PlayerController\n * Handles song loading events from main process\n */\n\nimport { useEffect } from 'react';\nimport { useAudio } from '../contexts/AudioContext.jsx';\n\nexport function useAudioEngine() {\n const { kaiPlayer, player, setKaiPlayer, setPlayer } = useAudio();\n\n // Initialize audio engine\n useEffect(() => {\n let mounted = true;\n\n async function initializeAudio() {\n try {\n // Dynamically import to avoid circular deps\n const { KAIPlayer } = await import('../../renderer/js/kaiPlayer.js');\n const { PlayerController } = await import('../../renderer/js/player.js');\n\n const audioEngine = new KAIPlayer();\n await audioEngine.initialize();\n\n if (!mounted) return;\n\n const playerController = new PlayerController(audioEngine);\n\n setKaiPlayer(audioEngine);\n setPlayer(playerController);\n\n // Expose player globally for legacy code that needs direct access\n window.app = window.app || {};\n window.app.player = playerController;\n\n console.log('✅ Audio engine initialized');\n } catch (error) {\n console.error('❌ Failed to initialize audio engine:', error);\n }\n }\n\n if (!kaiPlayer) {\n initializeAudio();\n }\n\n return () => {\n mounted = false;\n };\n }, [kaiPlayer, setKaiPlayer, setPlayer]);\n\n // Handle mixer changes from main process (web admin or other sources)\n useEffect(() => {\n if (!kaiPlayer || !window.kaiAPI?.mixer) return;\n\n const handleSetMasterGain = (event, { bus, gainDb }) => {\n console.log(`🎚️ Received mixer:setMasterGain from main: ${bus} = ${gainDb}dB`);\n kaiPlayer.setMasterGain(bus, gainDb);\n };\n\n const handleToggleMasterMute = (event, { bus, muted }) => {\n // IMPORTANT: Despite the event name being \"toggle\", the event includes the explicit muted value\n // Don't call toggleMasterMute() as that would toggle again - use setMasterMute()\n console.log(`🎚️ Received mixer:toggleMasterMute from main: ${bus} = ${muted}`);\n kaiPlayer.setMasterMute(bus, muted);\n };\n\n const handleSetMasterMute = (event, { bus, muted }) => {\n console.log(`🎚️ Received mixer:setMasterMute from main: ${bus} = ${muted}`);\n kaiPlayer.setMasterMute(bus, muted);\n };\n\n window.kaiAPI.mixer.onSetMasterGain(handleSetMasterGain);\n window.kaiAPI.mixer.onToggleMasterMute(handleToggleMasterMute);\n window.kaiAPI.mixer.onSetMasterMute(handleSetMasterMute);\n\n console.log('✅ Mixer IPC listeners registered');\n\n // Note: Cleanup would require preload.js to expose removeListener methods\n // These are long-lived listeners so cleanup is not critical\n return () => {\n console.log('🧹 Mixer IPC listeners cleanup');\n };\n }, [kaiPlayer]);\n\n // Handle song loading events\n useEffect(() => {\n if (!player || !kaiPlayer || !window.kaiAPI?.song) return;\n\n // Create mutable app state object (needed by songLoaders)\n const appState = {\n player,\n kaiPlayer,\n currentSong: null,\n _pendingMetadata: null,\n randomEffectTimeout: null,\n handleSongEnded: async () => {\n // Song ended - reset position to 0 and pause to show title screen\n if (player && player.currentPlayer) {\n await player.currentPlayer.seek(0);\n await player.pause();\n }\n\n // Trigger next song via IPC\n if (window.kaiAPI?.player) {\n await window.kaiAPI.player.next();\n }\n },\n updateStatus: (msg) => console.log('📊', msg),\n updateEffectDisplay: () => {}, // TODO: implement if needed\n };\n\n const handleSongLoaded = async (event, metadata) => {\n console.log('🎵 Song loading:', metadata?.title || 'Unknown');\n appState._pendingMetadata = metadata;\n\n // Stop current playback\n if (kaiPlayer) {\n await kaiPlayer.pause();\n }\n if (player) {\n await player.pause();\n // Also stop CDG renderer if it's playing\n if (player.cdgPlayer && player.cdgPlayer.isPlaying) {\n player.cdgPlayer.pause();\n }\n }\n\n // Notify PlayerController to load song metadata (lyrics, etc.)\n if (player && player.onSongLoaded) {\n player.onSongLoaded(metadata);\n }\n };\n\n const handleSongData = async (event, songData) => {\n console.log('🎵 Song data received:', songData.format, songData.originalFilePath);\n\n // Check if this is the same song\n const isSameSong =\n appState.currentSong && appState.currentSong.originalFilePath === songData.originalFilePath;\n\n appState.currentSong = songData;\n\n // Reset play state when loading a new song\n if (!isSameSong) {\n if (kaiPlayer) {\n await kaiPlayer.pause();\n }\n if (player?.cdgPlayer?.isPlaying) {\n player.cdgPlayer.pause();\n }\n if (player?.currentPlayer?.isPlaying) {\n await player.currentPlayer.pause();\n }\n }\n\n // Use pending metadata if available\n const metadata = appState._pendingMetadata || songData.metadata || {};\n\n // Detect format: CDG or KAI\n const isCDG = songData.format === 'cdg';\n\n try {\n // Load song using songLoaders\n const { loadCDGSong, loadKAISong } = await import('../../renderer/js/songLoaders.js');\n\n if (isCDG) {\n await loadCDGSong(appState, songData, metadata);\n } else {\n await loadKAISong(appState, songData, metadata);\n }\n\n console.log('✅ Song loaded successfully');\n } catch (error) {\n console.error('❌ Failed to load song:', error);\n }\n\n // Clear pending metadata\n appState._pendingMetadata = null;\n };\n\n window.kaiAPI.song.onLoaded(handleSongLoaded);\n window.kaiAPI.song.onData(handleSongData);\n\n // Handle playback control events from main process (web admin commands)\n const handleTogglePlayback = async () => {\n console.log('🌐 Remote play/pause command');\n if (!player) return;\n\n if (player.isPlaying) {\n await player.pause();\n } else {\n await player.play();\n }\n };\n\n const handleRestart = async () => {\n console.log('🌐 Remote restart command');\n if (!player || !player.currentPlayer) return;\n\n // Seek to 0 based on format\n if (player.currentFormat === 'kai' && kaiPlayer) {\n await kaiPlayer.seek(0);\n } else if (player.currentFormat === 'cdg' && player.cdgPlayer) {\n await player.cdgPlayer.seek(0);\n }\n\n if (!player.isPlaying) {\n await player.play();\n }\n };\n\n const handleSetPosition = async (event, positionSec) => {\n console.log('🌐 Remote seek command:', positionSec);\n if (!player || !player.currentPlayer) return;\n\n // Seek based on format\n if (player.currentFormat === 'kai' && kaiPlayer) {\n await kaiPlayer.seek(positionSec);\n } else if (player.currentFormat === 'cdg' && player.cdgPlayer) {\n await player.cdgPlayer.seek(positionSec);\n }\n\n if (player.currentPlayer.reportStateChange) {\n player.currentPlayer.reportStateChange();\n }\n };\n\n window.kaiAPI.player.onTogglePlayback(handleTogglePlayback);\n window.kaiAPI.player.onRestart(handleRestart);\n window.kaiAPI.player.onSetPosition(handleSetPosition);\n\n // Handle settings changes (from local UI or remote web admin)\n const handleWaveformSettings = (event, settings) => {\n console.log('🎨 Waveform settings changed:', settings);\n if (player && player.applyWaveformSettings) {\n player.applyWaveformSettings(settings);\n }\n };\n\n if (window.kaiAPI.events) {\n window.kaiAPI.events.on('waveform:settingsChanged', handleWaveformSettings);\n }\n\n return () => {\n window.kaiAPI.song.removeSongListener(handleSongLoaded);\n window.kaiAPI.song.removeDataListener?.(handleSongData);\n window.kaiAPI.player.removeTogglePlaybackListener(handleTogglePlayback);\n window.kaiAPI.player.removeRestartListener(handleRestart);\n window.kaiAPI.player.removeSetPositionListener(handleSetPosition);\n\n if (window.kaiAPI.events) {\n window.kaiAPI.events.off?.('waveform:settingsChanged', handleWaveformSettings);\n }\n\n if (appState.randomEffectTimeout) {\n clearTimeout(appState.randomEffectTimeout);\n }\n };\n }, [player, kaiPlayer]);\n\n return { kaiPlayer, player };\n}\n","/**\n * useSettingsPersistence - Settings load/save via IPC\n *\n * Loads settings from storage and saves changes\n */\n\nimport { useEffect, useRef } from 'react';\nimport { useSettings } from '../contexts/SettingsContext.jsx';\n\nexport function useSettingsPersistence() {\n const {\n devicePreferences,\n waveformPreferences,\n autoTunePreferences,\n setDevicePreferences,\n setWaveformPreferences,\n setAutoTunePreferences,\n } = useSettings();\n\n // Track whether initial load has completed to prevent saving hardcoded defaults\n const isLoadedRef = useRef(false);\n\n // Load settings on mount\n useEffect(() => {\n async function loadSettings() {\n if (!window.kaiAPI?.settings) return;\n\n try {\n const devices = await window.kaiAPI.settings.get('devicePreferences', null);\n if (devices) setDevicePreferences(devices);\n\n const waveform = await window.kaiAPI.settings.get('waveformPreferences', null);\n if (waveform) setWaveformPreferences(waveform);\n\n const autotune = await window.kaiAPI.settings.get('autoTunePreferences', null);\n if (autotune) setAutoTunePreferences(autotune);\n\n isLoadedRef.current = true; // Mark as loaded to enable saving\n } catch (error) {\n console.error('Failed to load settings:', error);\n isLoadedRef.current = true; // Enable saving even on error\n }\n }\n\n loadSettings();\n }, [setDevicePreferences, setWaveformPreferences, setAutoTunePreferences]);\n\n // Save device preferences when changed (only after initial load)\n useEffect(() => {\n if (!window.kaiAPI?.settings || !isLoadedRef.current) return;\n window.kaiAPI.settings.set('devicePreferences', devicePreferences);\n }, [devicePreferences]);\n\n // Save waveform preferences when changed (only after initial load)\n useEffect(() => {\n if (!window.kaiAPI?.settings || !isLoadedRef.current) return;\n window.kaiAPI.settings.set('waveformPreferences', waveformPreferences);\n }, [waveformPreferences]);\n\n // Save autotune preferences when changed (only after initial load)\n useEffect(() => {\n if (!window.kaiAPI?.settings || !isLoadedRef.current) return;\n window.kaiAPI.settings.set('autoTunePreferences', autoTunePreferences);\n }, [autoTunePreferences]);\n\n return {\n devicePreferences,\n waveformPreferences,\n autoTunePreferences,\n setDevicePreferences,\n setWaveformPreferences,\n setAutoTunePreferences,\n };\n}\n","/**\n * useWebRTC - WebRTC manager wrapper\n *\n * Wraps webrtcManager for streaming functionality\n */\n\nimport { useEffect, useRef } from 'react';\n\nexport function useWebRTC() {\n const webrtcManagerRef = useRef(null);\n\n useEffect(() => {\n async function loadWebRTC() {\n try {\n const module = await import('../../renderer/js/webrtcManager.js');\n webrtcManagerRef.current = module.default;\n console.log('✅ WebRTC manager loaded');\n\n // Setup IPC handlers for WebRTC commands from main process\n if (window.kaiAPI?.events) {\n setupIPCHandlers(webrtcManagerRef.current);\n }\n } catch (error) {\n console.error('❌ Failed to load WebRTC manager:', error);\n }\n }\n\n loadWebRTC();\n }, []);\n\n // Setup IPC handlers for WebRTC commands\n function setupIPCHandlers(manager) {\n if (!window.kaiAPI?.events) return;\n\n // Setup sender\n window.kaiAPI.events.on('webrtc:setupSender', async () => {\n const result = await manager.setupSender();\n if (window.kaiAPI?.renderer) {\n window.kaiAPI.renderer.sendWebRTCResponse('setupSender', result);\n }\n });\n\n // Create offer\n window.kaiAPI.events.on('webrtc:createOffer', async () => {\n const result = await manager.createOffer();\n if (window.kaiAPI?.renderer) {\n window.kaiAPI.renderer.sendWebRTCResponse('createOffer', result);\n }\n });\n\n // Set answer\n window.kaiAPI.events.on('webrtc:setAnswer', async (event, answer) => {\n const result = await manager.setAnswer(answer);\n if (window.kaiAPI?.renderer) {\n window.kaiAPI.renderer.sendWebRTCResponse('setAnswer', result);\n }\n });\n\n // Get sender status\n window.kaiAPI.events.on('webrtc:getSenderStatus', () => {\n const result = manager.getSenderStatus();\n if (window.kaiAPI?.renderer) {\n window.kaiAPI.renderer.sendWebRTCResponse('getSenderStatus', result);\n }\n });\n\n // Add ICE candidate\n window.kaiAPI.events.on('webrtc:addICECandidate', async (event, candidate) => {\n await manager.addICECandidate(candidate);\n });\n\n // Cleanup sender\n window.kaiAPI.events.on('webrtc:cleanupSender', async () => {\n await manager.cleanupSender();\n });\n\n console.log('✅ Main window WebRTC IPC handlers registered');\n }\n\n const setupSender = async () => {\n if (!webrtcManagerRef.current) return null;\n return await webrtcManagerRef.current.setupSender();\n };\n\n const createOffer = async () => {\n if (!webrtcManagerRef.current) return null;\n return await webrtcManagerRef.current.createOffer();\n };\n\n const setAnswer = async (answer) => {\n if (!webrtcManagerRef.current) return null;\n return await webrtcManagerRef.current.setAnswer(answer);\n };\n\n const getSenderStatus = () => {\n if (!webrtcManagerRef.current) return null;\n return webrtcManagerRef.current.getSenderStatus();\n };\n\n const addICECandidate = async (candidate) => {\n if (!webrtcManagerRef.current) return;\n await webrtcManagerRef.current.addICECandidate(candidate);\n };\n\n const cleanupSender = async () => {\n if (!webrtcManagerRef.current) return;\n await webrtcManagerRef.current.cleanupSender();\n };\n\n return {\n setupSender,\n createOffer,\n setAnswer,\n getSenderStatus,\n addICECandidate,\n cleanupSender,\n };\n}\n","/**\n * AppRoot - Top-level app component\n *\n * Wraps app with context providers and initializes audio engine\n */\n\nimport { PlayerProvider } from '../../shared/contexts/PlayerContext.jsx';\nimport { AudioProvider } from '../../shared/contexts/AudioContext.jsx';\nimport { SettingsProvider } from '../../shared/contexts/SettingsContext.jsx';\nimport { useAudioEngine } from '../../shared/hooks/useAudioEngine.js';\nimport { useSettingsPersistence } from '../../shared/hooks/useSettingsPersistence.js';\nimport { useWebRTC } from '../../shared/hooks/useWebRTC.js';\n\nfunction AppInitializer({ children }) {\n // Initialize audio engine\n useAudioEngine();\n\n // Load/save settings\n useSettingsPersistence();\n\n // Initialize WebRTC\n useWebRTC();\n\n return <>{children}</>;\n}\n\nexport function AppRoot({ children }) {\n return (\n <SettingsProvider>\n <AudioProvider>\n <PlayerProvider>\n <AppInitializer>{children}</AppInitializer>\n </PlayerProvider>\n </AudioProvider>\n </SettingsProvider>\n );\n}\n","/**\n * Shared utility functions for formatting and display\n * Used across renderer, web UI, and main process\n */\n\nexport function getFormatIcon(format) {\n switch (format) {\n case 'm4a-stems':\n return '⚡'; // M4A stems format\n case 'cdg-archive':\n case 'cdg-pair':\n return '💿';\n default:\n return '🎵'; // Default music icon\n }\n}\n\n/**\n * Format duration in seconds to MM:SS format\n * @param {number} seconds - Duration in seconds\n * @returns {string} Formatted duration (e.g., \"3:45\")\n */\nexport function formatDuration(seconds) {\n if (!seconds || seconds <= 0) return '-';\n\n const minutes = Math.floor(seconds / 60);\n const remainingSeconds = Math.floor(seconds % 60);\n\n return `${minutes}:${remainingSeconds.toString().padStart(2, '0')}`;\n}\n\n/**\n * Format time in seconds to MM:SS.T format (with tenths)\n * @param {number} seconds - Time in seconds\n * @returns {string} Formatted time (e.g., \"3:45.7\")\n */\nexport function formatTime(seconds) {\n if (!seconds || isNaN(seconds)) return '0:00.0';\n\n const mins = Math.floor(seconds / 60);\n const secs = Math.floor(seconds % 60);\n const tenths = Math.floor((seconds % 1) * 10);\n return `${mins}:${secs.toString().padStart(2, '0')}.${tenths}`;\n}\n\n/**\n * Format file size in bytes to human-readable format\n * @param {number} bytes - File size in bytes\n * @returns {string} Formatted size (e.g., \"1.2 MB\")\n */\nexport function formatFileSize(bytes) {\n if (bytes === 0) return '0 B';\n\n const k = 1024;\n const sizes = ['B', 'KB', 'MB', 'GB'];\n const i = Math.floor(Math.log(bytes) / Math.log(k));\n\n return parseFloat((bytes / Math.pow(k, i)).toFixed(1)) + ' ' + sizes[i];\n}\n","/**\n * LibraryPanel - Full library browser with alphabet filtering and pagination\n *\n * Features:\n * - Alphabet navigation (A-Z, #)\n * - Pagination (100 songs per page)\n * - Search functionality\n * - Table view with sorting\n * - Add to queue / Load song actions\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { getFormatIcon, formatDuration } from '../formatUtils.js';\n\nfunction SongInfoModal({ song, onClose }) {\n if (!song) return null;\n\n console.log('🎵 SongInfoModal rendering for:', song.title);\n\n return (\n <div\n className=\"fixed inset-0 bg-black/70 flex items-center justify-center z-[10000]\"\n onClick={onClose}\n >\n <div\n className=\"bg-gray-800 dark:bg-gray-900 border border-gray-600 dark:border-gray-700 rounded-lg w-[90%] max-w-[500px] max-h-[80vh] overflow-hidden flex flex-col\"\n onClick={(e) => e.stopPropagation()}\n >\n <div className=\"flex justify-between items-center px-5 py-4 border-b border-gray-700 dark:border-gray-800\">\n <h2 className=\"m-0 text-lg font-semibold text-white\">Song Information</h2>\n <button\n className=\"bg-none border-none text-white text-[32px] leading-none cursor-pointer p-0 w-8 h-8 flex items-center justify-center rounded transition-colors hover:bg-gray-700 dark:hover:bg-gray-800\"\n onClick={onClose}\n >\n ×\n </button>\n </div>\n <div className=\"p-5 overflow-y-auto\">\n <div className=\"space-y-0\">\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Title:</span>\n <span className=\"text-white\">{song.title}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Artist:</span>\n <span className=\"text-white\">{song.artist}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Album:</span>\n <span className=\"text-white\">{song.album || 'N/A'}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Genre:</span>\n <span className=\"text-white\">{song.genre || 'N/A'}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Key:</span>\n <span className=\"text-white\">{song.key || 'N/A'}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Year:</span>\n <span className=\"text-white\">{song.year || 'N/A'}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Duration:</span>\n <span className=\"text-white\">{formatDuration(song.duration)}</span>\n </div>\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Format:</span>\n <span className=\"text-white\">{song.format || 'N/A'}</span>\n </div>\n {song.tags && song.tags.length > 0 && (\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5 border-b border-gray-700/50 dark:border-gray-800/50\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Tags:</span>\n <span className=\"text-white flex flex-wrap gap-1.5\">\n {song.tags.map((tag) => (\n <span\n key={tag}\n className={`px-2 py-0.5 rounded-full text-xs font-medium ${\n tag === 'edited'\n ? 'bg-blue-600/30 text-blue-300'\n : tag === 'ai_corrected'\n ? 'bg-purple-600/30 text-purple-300'\n : 'bg-gray-600/30 text-gray-300'\n }`}\n >\n {tag}\n </span>\n ))}\n </span>\n </div>\n )}\n <div className=\"grid grid-cols-[120px_1fr] gap-3 py-2.5\">\n <span className=\"font-semibold text-gray-300 dark:text-gray-400\">Path:</span>\n <span className=\"text-white break-all text-[11px]\">{song.path}</span>\n </div>\n </div>\n </div>\n </div>\n </div>\n );\n}\n\nexport function LibraryPanel({ bridge, showSetFolder = false, showFullRefresh = false }) {\n const [songs, setSongs] = useState([]);\n const [filteredSongs, setFilteredSongs] = useState([]);\n const [currentLetter, setCurrentLetter] = useState(null);\n const [availableLetters, setAvailableLetters] = useState([]);\n const [currentPage, setCurrentPage] = useState(1);\n const [searchTerm, setSearchTerm] = useState('');\n const [songsFolder, setSongsFolder] = useState(null);\n const [loading, setLoading] = useState(false);\n const [modalSong, setModalSong] = useState(null);\n const [scanProgress, setScanProgress] = useState(null); // { current, total }\n\n const pageSize = 100;\n\n // Wrap functions in useCallback to stabilize references for useEffect dependencies\n const loadLetterPage = useCallback((letter, page, songsList) => {\n setCurrentLetter(letter);\n setCurrentPage(page);\n setSearchTerm('');\n\n // Filter songs by first letter of artist\n const letterSongs = songsList.filter((song) => {\n const artist = song.artist || song.title || song.name;\n if (!artist) return false;\n\n const firstChar = artist.trim()[0].toUpperCase();\n if (letter === '#') {\n return !/[A-Z]/.test(firstChar);\n }\n return firstChar === letter;\n });\n\n // Sort and paginate\n const sortedSongs = letterSongs.sort((a, b) => {\n const artistA = (a.artist || a.title || '').toLowerCase();\n const artistB = (b.artist || b.title || '').toLowerCase();\n return artistA.localeCompare(artistB);\n });\n\n setFilteredSongs(sortedSongs);\n }, []);\n\n const calculateAvailableLetters = useCallback(\n (songsList, shouldAutoSelect = true) => {\n const letterSet = new Set();\n\n songsList.forEach((song) => {\n const artist = song.artist || song.title || song.name;\n if (artist) {\n const firstChar = artist.trim()[0].toUpperCase();\n if (/[A-Z]/.test(firstChar)) {\n letterSet.add(firstChar);\n } else {\n letterSet.add('#');\n }\n }\n });\n\n let letters = Array.from(letterSet).sort();\n // Put '#' at the end\n if (letters.includes('#')) {\n letters = letters.filter((l) => l !== '#');\n letters.push('#');\n }\n\n setAvailableLetters(letters);\n\n // Auto-select first letter if requested and songs exist\n if (shouldAutoSelect && letters.length > 0) {\n const firstLetter = letters.includes('A') ? 'A' : letters[0];\n loadLetterPage(firstLetter, 1, songsList);\n }\n },\n [loadLetterPage]\n );\n\n const loadLibrary = useCallback(async () => {\n try {\n setLoading(true);\n const folder = await bridge.getSongsFolder();\n console.log('📁 Songs folder:', folder);\n setSongsFolder(folder);\n\n if (folder) {\n const result = await bridge.getCachedLibrary();\n console.log('📚 Cached library result:', result);\n const librarySongs = result.files || [];\n console.log('🎵 Library songs count:', librarySongs.length);\n setSongs(librarySongs);\n calculateAvailableLetters(librarySongs); // This will auto-select first letter\n } else {\n console.log('❌ No songs folder set');\n }\n } catch (error) {\n console.error('Failed to load library:', error);\n } finally {\n setLoading(false);\n }\n }, [bridge, calculateAvailableLetters]);\n\n // Listen for scan progress events (Electron renderer only)\n useEffect(() => {\n if (typeof window !== 'undefined' && window.kaiAPI?.events) {\n const handleScanProgress = (event, data) => {\n setScanProgress({ current: data.current, total: data.total });\n };\n\n const handleScanComplete = (event, data) => {\n console.log(`📚 Background scan complete: ${data.count} songs`);\n setScanProgress(null);\n loadLibrary(); // Reload library with new scanned songs\n };\n\n const handleFolderSet = (event, folder) => {\n console.log(`📁 Songs folder updated: ${folder}`);\n setSongsFolder(folder);\n loadLibrary(); // Reload library with new folder\n };\n\n const handleSongUpdated = (event, data) => {\n console.log(`🎵 Song updated: ${data.path}`);\n // Update the song in the songs list\n setSongs((prevSongs) => {\n const songIndex = prevSongs.findIndex((s) => s.path === data.path);\n if (songIndex !== -1) {\n const updatedSongs = [...prevSongs];\n updatedSongs[songIndex] = { ...updatedSongs[songIndex], ...data.metadata };\n return updatedSongs;\n }\n return prevSongs;\n });\n\n // Update filtered songs if they're currently displayed\n setFilteredSongs((prevFiltered) => {\n const songIndex = prevFiltered.findIndex((s) => s.path === data.path);\n if (songIndex !== -1) {\n const updatedFiltered = [...prevFiltered];\n updatedFiltered[songIndex] = { ...updatedFiltered[songIndex], ...data.metadata };\n return updatedFiltered;\n }\n return prevFiltered;\n });\n };\n\n window.kaiAPI.events.on('library:scanProgress', handleScanProgress);\n window.kaiAPI.events.on('library:scanComplete', handleScanComplete);\n window.kaiAPI.events.on('library:folderSet', handleFolderSet);\n window.kaiAPI.events.on('library:songUpdated', handleSongUpdated);\n\n return () => {\n window.kaiAPI.events.removeListener('library:scanProgress', handleScanProgress);\n window.kaiAPI.events.removeListener('library:scanComplete', handleScanComplete);\n window.kaiAPI.events.removeListener('library:folderSet', handleFolderSet);\n window.kaiAPI.events.removeListener('library:songUpdated', handleSongUpdated);\n };\n }\n }, [loadLibrary]);\n\n // Listen for library updates from socket (Web admin only)\n useEffect(() => {\n if (bridge?.socket) {\n const handleLibraryRefreshed = (data) => {\n console.log(`📚 Library refreshed from remote: ${data.count} songs`);\n loadLibrary(); // Reload library\n };\n\n const handleSongUpdated = (data) => {\n console.log(`🎵 Song updated: ${data.path}`);\n // Update the song in the songs list\n setSongs((prevSongs) => {\n const songIndex = prevSongs.findIndex((s) => s.path === data.path);\n if (songIndex !== -1) {\n const updatedSongs = [...prevSongs];\n updatedSongs[songIndex] = { ...updatedSongs[songIndex], ...data.metadata };\n return updatedSongs;\n }\n return prevSongs;\n });\n\n // Update filtered songs if they're currently displayed\n setFilteredSongs((prevFiltered) => {\n const songIndex = prevFiltered.findIndex((s) => s.path === data.path);\n if (songIndex !== -1) {\n const updatedFiltered = [...prevFiltered];\n updatedFiltered[songIndex] = { ...updatedFiltered[songIndex], ...data.metadata };\n return updatedFiltered;\n }\n return prevFiltered;\n });\n };\n\n bridge.socket.on('library-refreshed', handleLibraryRefreshed);\n bridge.socket.on('library:songUpdated', handleSongUpdated);\n\n return () => {\n bridge.socket.off('library-refreshed', handleLibraryRefreshed);\n bridge.socket.off('library:songUpdated', handleSongUpdated);\n };\n }\n }, [bridge, loadLibrary]);\n\n // Load library on mount\n useEffect(() => {\n loadLibrary();\n }, [loadLibrary]);\n\n const handleSearch = (term) => {\n setSearchTerm(term);\n setCurrentLetter(null);\n setCurrentPage(1);\n\n if (!term.trim()) {\n setFilteredSongs([]);\n return;\n }\n\n const searchLower = term.toLowerCase();\n const results = songs.filter((song) => {\n return (\n (song.title || '').toLowerCase().includes(searchLower) ||\n (song.artist || '').toLowerCase().includes(searchLower) ||\n (song.album || '').toLowerCase().includes(searchLower)\n );\n });\n\n setFilteredSongs(results);\n };\n\n const handleSetFolder = async () => {\n try {\n const folder = await bridge.setSongsFolder();\n if (folder) {\n setSongsFolder(folder);\n await loadLibrary();\n }\n } catch (error) {\n console.error('Failed to set folder:', error);\n }\n };\n\n const handleSync = async () => {\n if (!songsFolder) return;\n\n try {\n setLoading(true);\n await bridge.syncLibrary();\n await loadLibrary();\n } catch (error) {\n console.error('Failed to sync:', error);\n } finally {\n setLoading(false);\n setScanProgress(null); // Clear progress when done\n }\n };\n\n const handleRefresh = async () => {\n if (!songsFolder) return;\n\n try {\n setLoading(true);\n await bridge.scanLibrary();\n await loadLibrary();\n } catch (error) {\n console.error('Failed to refresh:', error);\n } finally {\n setLoading(false);\n setScanProgress(null); // Clear progress when done\n }\n };\n\n const handleAddToQueue = async (song) => {\n try {\n await bridge.addToQueue({\n path: song.path,\n title: song.title,\n artist: song.artist,\n duration: song.duration,\n });\n } catch (error) {\n console.error('Failed to add to queue:', error);\n }\n };\n\n const handleShowInfo = (song) => {\n console.log('📋 Opening song info modal for:', song.title);\n setModalSong(song);\n };\n\n // Pagination\n const totalPages = Math.ceil(filteredSongs.length / pageSize);\n const startIndex = (currentPage - 1) * pageSize;\n const endIndex = startIndex + pageSize;\n const currentPageSongs = filteredSongs.slice(startIndex, endIndex);\n\n // Smart pagination - show limited page numbers around current page\n const getPageNumbers = () => {\n const maxButtons = 7; // Show max 7 page buttons\n if (totalPages <= maxButtons) {\n // Show all pages if total is small\n return Array.from({ length: totalPages }, (_, i) => i + 1);\n }\n\n const pages = [];\n const halfRange = Math.floor((maxButtons - 3) / 2); // Reserve 3 for first, last, and ellipsis\n\n // Always show first page\n pages.push(1);\n\n let startPage = Math.max(2, currentPage - halfRange);\n let endPage = Math.min(totalPages - 1, currentPage + halfRange);\n\n // Adjust if we're near the beginning\n if (currentPage <= halfRange + 2) {\n endPage = Math.min(maxButtons - 1, totalPages - 1);\n }\n\n // Adjust if we're near the end\n if (currentPage >= totalPages - halfRange - 1) {\n startPage = Math.max(2, totalPages - maxButtons + 2);\n }\n\n // Add ellipsis if needed before\n if (startPage > 2) {\n pages.push('...');\n }\n\n // Add middle pages\n for (let i = startPage; i <= endPage; i++) {\n pages.push(i);\n }\n\n // Add ellipsis if needed after\n if (endPage < totalPages - 1) {\n pages.push('...');\n }\n\n // Always show last page\n if (totalPages > 1) {\n pages.push(totalPages);\n }\n\n return pages;\n };\n\n const allLetters = [...'ABCDEFGHIJKLMNOPQRSTUVWXYZ'.split(''), '#'];\n\n return (\n <div className=\"flex flex-col h-full gap-1 overflow-hidden\">\n {/* Header Controls */}\n <div className=\"flex flex-col gap-1.5 pb-1 border-b border-gray-200 dark:border-gray-700 shrink-0\">\n <div className=\"flex gap-2 flex-wrap items-center\">\n {showSetFolder && (\n <button\n onClick={handleSetFolder}\n className=\"flex items-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white cursor-pointer text-sm hover:bg-gray-200 dark:hover:bg-gray-750 disabled:opacity-50 disabled:cursor-not-allowed\"\n >\n <span className=\"material-icons text-lg\">folder_open</span>\n Set Songs Folder\n </button>\n )}\n <button\n onClick={handleSync}\n className=\"flex items-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white cursor-pointer text-sm hover:bg-gray-200 dark:hover:bg-gray-750 disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={!songsFolder || loading}\n >\n <span className=\"material-icons text-lg\">sync</span>\n Sync\n </button>\n {showFullRefresh && (\n <button\n onClick={handleRefresh}\n className=\"flex items-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white cursor-pointer text-sm hover:bg-gray-200 dark:hover:bg-gray-750 disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={!songsFolder || loading}\n >\n <span className=\"material-icons text-lg\">refresh</span>\n Full Refresh\n </button>\n )}\n <div className=\"flex-1 min-w-[200px]\">\n <input\n type=\"text\"\n className=\"w-full px-3 py-2 bg-white dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white text-sm focus:outline-none focus:border-blue-500\"\n placeholder=\"Search songs...\"\n value={searchTerm}\n onChange={(e) => handleSearch(e.target.value)}\n />\n </div>\n </div>\n <div className=\"flex gap-4 text-xs text-gray-500 dark:text-gray-400\">\n <span>{songs.length} songs</span>\n {songsFolder && <span>{songsFolder}</span>}\n </div>\n {scanProgress && (\n <div className=\"flex flex-col gap-1 py-2\">\n <div className=\"w-full h-5 bg-gray-100 dark:bg-gray-900 border border-gray-200 dark:border-gray-700 rounded overflow-hidden\">\n <div\n className=\"h-full bg-blue-600 transition-all duration-300\"\n style={{\n width: `${scanProgress.total > 0 ? Math.round((scanProgress.current / scanProgress.total) * 100) : 0}%`,\n }}\n />\n </div>\n <div className=\"text-xs text-gray-700 dark:text-gray-300 text-center\">\n {scanProgress.message ? (\n scanProgress.message\n ) : (\n <>\n Scanning: {scanProgress.current} / {scanProgress.total} files (\n {scanProgress.total > 0\n ? Math.round((scanProgress.current / scanProgress.total) * 100)\n : 0}\n %)\n </>\n )}\n </div>\n </div>\n )}\n </div>\n\n {/* Alphabet Navigation */}\n {!searchTerm && !scanProgress && (\n <div className=\"flex flex-col gap-1 py-1 px-2 bg-gray-100 dark:bg-gray-800/50 rounded-md shrink-0\">\n <div className=\"text-xs font-semibold text-gray-600 dark:text-gray-300\">\n Browse by Artist:\n </div>\n <div className=\"flex flex-wrap gap-1\">\n {allLetters.map((letter) => {\n const isAvailable = availableLetters.includes(letter);\n const isActive = currentLetter === letter;\n\n return (\n <button\n key={letter}\n className={`w-8 h-8 p-0 rounded text-sm font-semibold cursor-pointer transition-all ${isActive ? 'bg-blue-600 border-blue-600 text-white' : isAvailable ? 'bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-750 hover:scale-105' : 'bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-gray-400 dark:text-gray-600 opacity-30 cursor-not-allowed'}`}\n onClick={() => isAvailable && loadLetterPage(letter, 1, songs)}\n disabled={!isAvailable}\n >\n {letter}\n </button>\n );\n })}\n </div>\n </div>\n )}\n\n {/* Library Table */}\n {loading ? (\n <div className=\"flex-1 flex flex-col items-center justify-center gap-3 p-16 text-center text-base text-gray-700 dark:text-gray-300\">\n Loading library...\n </div>\n ) : filteredSongs.length > 0 ? (\n <>\n <div className=\"flex-1 min-h-0 overflow-y-auto border border-gray-200 dark:border-gray-700 rounded-md\">\n <table className=\"w-full border-collapse\">\n <thead className=\"sticky top-0 bg-gray-100 dark:bg-gray-800 z-10\">\n <tr>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Title\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Artist\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Album\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Genre\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Key\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Duration\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Year\n </th>\n <th className=\"px-3 py-2 text-left text-xs font-semibold text-gray-700 dark:text-gray-300 border-b-2 border-gray-200 dark:border-gray-700\">\n Actions\n </th>\n </tr>\n </thead>\n <tbody className=\"bg-white dark:bg-gray-900 text-gray-900 dark:text-white\">\n {currentPageSongs.map((song, index) => (\n <tr key={index} className=\"hover:bg-gray-50 dark:hover:bg-gray-800/50\">\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n <span className=\"mr-1.5 text-base\">{getFormatIcon(song.format)}</span>\n {song.title}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {song.artist}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {song.album || '-'}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {song.genre || '-'}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {song.key || '-'}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {formatDuration(song.duration)}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n {song.year || '-'}\n </td>\n <td className=\"px-3 py-1.5 text-xs leading-relaxed border-b border-gray-200 dark:border-gray-800/50\">\n <div className=\"flex flex-row gap-1 items-center\">\n <button\n className=\"w-7 h-7 min-w-[28px] min-h-[28px] max-w-[28px] max-h-[28px] p-0 flex items-center justify-center bg-transparent border border-gray-200 dark:border-gray-700 rounded text-gray-700 dark:text-white cursor-pointer transition-all flex-shrink-0 hover:bg-gray-100 dark:hover:bg-gray-800 hover:border-blue-600\"\n onClick={() => handleAddToQueue(song)}\n title=\"Add to Queue\"\n >\n <span className=\"material-icons text-base leading-none\">\n playlist_add\n </span>\n </button>\n <button\n className=\"w-7 h-7 min-w-[28px] min-h-[28px] max-w-[28px] max-h-[28px] p-0 flex items-center justify-center bg-transparent border border-gray-200 dark:border-gray-700 rounded text-gray-700 dark:text-white cursor-pointer transition-all flex-shrink-0 hover:bg-gray-100 dark:hover:bg-gray-800 hover:border-blue-600\"\n onClick={() => handleShowInfo(song)}\n title=\"Song Info\"\n >\n <span className=\"material-icons text-base leading-none\">info</span>\n </button>\n </div>\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n </div>\n\n {/* Pagination */}\n {totalPages > 1 && !scanProgress && (\n <div className=\"flex items-center justify-center gap-3 py-1.5 px-2 bg-gray-100 dark:bg-gray-800/50 rounded-md text-sm shrink-0\">\n <button\n className=\"px-4 py-1.5 bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-750 disabled:opacity-40 disabled:cursor-not-allowed\"\n onClick={() => setCurrentPage(currentPage - 1)}\n disabled={currentPage === 1}\n >\n Previous\n </button>\n <div className=\"flex gap-1 items-center\">\n {getPageNumbers().map((page, index) => {\n if (page === '...') {\n return (\n <span\n key={`ellipsis-${index}`}\n className=\"px-2 py-1.5 text-gray-700 dark:text-gray-300 select-none\"\n >\n ...\n </span>\n );\n }\n return (\n <button\n key={page}\n className={`min-w-[36px] px-2 py-1.5 rounded cursor-pointer ${page === currentPage ? 'bg-blue-600 border-blue-600 font-semibold text-white' : 'bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-750'}`}\n onClick={() => setCurrentPage(page)}\n >\n {page}\n </button>\n );\n })}\n </div>\n <span className=\"text-xs text-gray-500 dark:text-gray-400\">\n ({filteredSongs.length} songs)\n </span>\n <button\n className=\"px-4 py-1.5 bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded text-gray-900 dark:text-white cursor-pointer hover:bg-gray-200 dark:hover:bg-gray-750 disabled:opacity-40 disabled:cursor-not-allowed\"\n onClick={() => setCurrentPage(currentPage + 1)}\n disabled={currentPage === totalPages}\n >\n Next\n </button>\n </div>\n )}\n </>\n ) : (\n <div className=\"flex-1 flex flex-col items-center justify-center gap-3 p-16 text-center\">\n <div className=\"text-5xl opacity-50\">🎵</div>\n <div className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n {songsFolder ? 'No songs found' : 'No songs library set'}\n </div>\n <div className=\"text-sm text-gray-500 dark:text-gray-400\">\n {songsFolder\n ? 'Try syncing or refreshing your library'\n : 'Click \"Set Songs Folder\" to choose your music library'}\n </div>\n </div>\n )}\n\n {/* Song Info Modal */}\n {modalSong && <SongInfoModal song={modalSong} onClose={() => setModalSong(null)} />}\n </div>\n );\n}\n","/**\n * EffectsPanel - Unified effects browser and control panel\n *\n * Based on renderer's effects design (grid layout with categories)\n * Works with both ElectronBridge and WebBridge via callbacks\n */\n\nexport function EffectsPanel({\n effects = [],\n currentEffect = null,\n disabledEffects = [],\n searchTerm = '',\n currentCategory = 'all',\n onSearch,\n onCategoryChange,\n onSelectEffect,\n onRandomEffect,\n onEnableEffect,\n onDisableEffect,\n}) {\n // Filter effects based on category and search\n let filteredEffects = [...effects];\n\n if (currentCategory !== 'all') {\n filteredEffects = filteredEffects.filter((effect) => effect.category === currentCategory);\n }\n\n if (searchTerm.trim()) {\n const searchLower = searchTerm.toLowerCase();\n filteredEffects = filteredEffects.filter(\n (effect) =>\n effect.name?.toLowerCase().includes(searchLower) ||\n effect.displayName?.toLowerCase().includes(searchLower) ||\n effect.author?.toLowerCase().includes(searchLower)\n );\n }\n\n const categories = [\n { id: 'all', label: 'All' },\n { id: 'geiss', label: 'Geiss' },\n { id: 'martin', label: 'Martin' },\n { id: 'flexi', label: 'Flexi' },\n { id: 'shifter', label: 'Shifter' },\n { id: 'other', label: 'Other' },\n ];\n\n const sanitizeFilename = (name) => {\n return name.replace(/[^a-zA-Z0-9-_\\s]/g, '_');\n };\n\n return (\n <div className=\"h-full flex flex-col bg-gray-50 dark:bg-gray-900\">\n <div className=\"p-4 bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 flex justify-between items-center\">\n <div className=\"flex-1 max-w-md\">\n <input\n type=\"text\"\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-900 text-gray-900 dark:text-white text-sm focus:outline-none focus:border-blue-500\"\n placeholder=\"Search effects...\"\n value={searchTerm}\n onChange={(e) => onSearch && onSearch(e.target.value)}\n />\n </div>\n <div className=\"flex items-center gap-4 text-gray-600 dark:text-gray-400\">\n <span id=\"effectsCount\" className=\"text-sm\">\n {currentCategory === 'all' && !searchTerm.trim()\n ? `${effects.length} effects`\n : `${filteredEffects.length} of ${effects.length} effects`}\n </span>\n {onRandomEffect && (\n <button\n onClick={onRandomEffect}\n className=\"px-4 py-2 bg-blue-600 border-none rounded text-white cursor-pointer text-sm transition-colors flex items-center gap-1.5 hover:bg-blue-700\"\n >\n <span className=\"material-icons text-lg\">casino</span>\n Random\n </button>\n )}\n </div>\n </div>\n\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n <div className=\"p-2.5 px-4 bg-gray-100 dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 flex gap-2.5\">\n {categories.map((cat) => (\n <button\n key={cat.id}\n className={`px-3 py-1.5 rounded text-xs cursor-pointer transition-all ${currentCategory === cat.id ? 'bg-blue-600 border-blue-600 text-white' : 'bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 text-gray-700 dark:text-gray-300 hover:bg-gray-200 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white'}`}\n onClick={() => onCategoryChange && onCategoryChange(cat.id)}\n >\n {cat.label}\n </button>\n ))}\n </div>\n\n <div className=\"flex-1 overflow-y-auto p-4\">\n {filteredEffects.length === 0 ? (\n <div className=\"text-center p-10 text-gray-500 dark:text-gray-400 flex flex-col items-center\">\n <span className=\"material-icons text-5xl mb-2.5\">search_off</span>\n <div className=\"text-base\">No effects found</div>\n </div>\n ) : (\n <div className=\"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4\">\n {filteredEffects.map((effect) => {\n const isActive = currentEffect === effect.name;\n const isDisabled = disabledEffects.includes(effect.name);\n const sanitizedName = sanitizeFilename(effect.name);\n const screenshotPath = `../../static/images/butterchurn-screenshots/${sanitizedName}.png`;\n\n return (\n <div\n key={effect.name}\n className={`rounded-md p-0 cursor-pointer transition-all overflow-hidden flex flex-col ${isActive ? 'bg-blue-100 dark:bg-blue-900/40 border border-blue-600' : 'bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-700 hover:border-blue-600'} ${isDisabled ? 'opacity-60' : ''}`}\n onClick={() => !isDisabled && onSelectEffect && onSelectEffect(effect.name)}\n >\n <div className=\"relative w-full h-[150px] bg-gray-200 dark:bg-gray-900 overflow-hidden\">\n <img\n src={screenshotPath}\n alt={effect.displayName}\n className=\"w-full h-full object-cover transition-transform hover:scale-105\"\n onError={(e) => {\n e.target.style.display = 'none';\n e.target.nextElementSibling.style.display = 'flex';\n }}\n />\n <div className=\"absolute top-0 left-0 w-full h-full hidden items-center justify-center bg-gray-200 dark:bg-gray-900 text-gray-400 dark:text-gray-600\">\n <span className=\"material-icons text-5xl\">image_not_supported</span>\n </div>\n </div>\n <div className={`p-4 flex-1 ${isDisabled ? 'opacity-60' : ''}`}>\n <div className=\"inline-block bg-blue-600 text-white px-1.5 py-0.5 rounded text-[11px] mb-2\">\n {effect.category}\n </div>\n <div\n className={`font-bold mb-1.5 text-sm ${isDisabled ? 'text-gray-500 dark:text-gray-500' : 'text-gray-900 dark:text-white'}`}\n >\n {effect.displayName}\n </div>\n <div\n className={`text-xs mb-1.5 ${isDisabled ? 'text-gray-400 dark:text-gray-600' : 'text-gray-600 dark:text-gray-400'}`}\n >\n by {effect.author}\n </div>\n <div className=\"flex gap-2 mt-2.5\">\n <button\n className={`flex-1 px-3 py-1.5 rounded text-xs cursor-pointer transition-colors ${isDisabled ? 'bg-gray-300 dark:bg-gray-700 text-gray-500 dark:text-gray-500 cursor-not-allowed opacity-50' : 'bg-blue-600 border-blue-600 text-white hover:bg-blue-700'}`}\n onClick={(e) => {\n e.stopPropagation();\n !isDisabled && onSelectEffect && onSelectEffect(effect.name);\n }}\n disabled={isDisabled}\n >\n Use\n </button>\n <button\n className=\"flex-1 px-3 py-1.5 border border-gray-300 dark:border-gray-600 rounded bg-gray-100 dark:bg-gray-700 text-gray-900 dark:text-gray-300 text-xs cursor-pointer transition-colors hover:bg-gray-200 dark:hover:bg-gray-600 hover:text-gray-900 dark:hover:text-white\"\n onClick={(e) => {\n e.stopPropagation();\n if (isDisabled) {\n onEnableEffect && onEnableEffect(effect.name);\n } else {\n onDisableEffect && onDisableEffect(effect.name);\n }\n }}\n >\n {isDisabled ? 'Enable' : 'Disable'}\n </button>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n","/**\n * EffectsPanelWrapper - State management wrapper for shared EffectsPanel\n * Loads effects directly from butterchurnPresets (like vanilla effects.js did)\n */\n\nimport { useState, useEffect, useCallback } from 'react';\nimport { EffectsPanel } from '../../shared/components/EffectsPanel.jsx';\n\nexport function EffectsPanelWrapper({ bridge }) {\n const [effects, setEffects] = useState([]);\n const [currentEffect, setCurrentEffect] = useState([]);\n const [disabledEffects, setDisabledEffects] = useState([]);\n const [searchTerm, setSearchTerm] = useState('');\n const [currentCategory, setCurrentCategory] = useState('all');\n\n // Wrap functions in useCallback to prevent recreating them on every render\n const loadEffects = useCallback(() => {\n try {\n if (\n !window.butterchurnPresets ||\n typeof window.butterchurnPresets.getPresets !== 'function'\n ) {\n console.error('Butterchurn presets not available');\n return;\n }\n\n const presets = window.butterchurnPresets.getPresets();\n const parseMetadata = (name) => {\n let author = 'Unknown';\n let displayName = name;\n let category = 'other';\n\n if (name.includes(' - ')) {\n const parts = name.split(' - ');\n if (parts.length >= 2) {\n author = parts[0].trim();\n displayName = parts.slice(1).join(' - ').trim();\n }\n }\n\n const nameLower = name.toLowerCase();\n if (nameLower.includes('geiss') || author.toLowerCase().includes('geiss')) {\n category = 'geiss';\n } else if (nameLower.includes('martin') || author.toLowerCase().includes('martin')) {\n category = 'martin';\n } else if (nameLower.includes('flexi') || author.toLowerCase().includes('flexi')) {\n category = 'flexi';\n } else if (nameLower.includes('shifter') || author.toLowerCase().includes('shifter')) {\n category = 'shifter';\n }\n\n return { author, displayName, category };\n };\n\n const effectsList = Object.keys(presets).map((name) => {\n const metadata = parseMetadata(name);\n return {\n name,\n displayName: metadata.displayName,\n author: metadata.author,\n category: metadata.category,\n preset: presets[name],\n };\n });\n\n console.log('🎨 Loaded', effectsList.length, 'Butterchurn presets');\n setEffects(effectsList);\n } catch (error) {\n console.error('Failed to load effects:', error);\n }\n }, []);\n\n const loadDisabledEffects = useCallback(async () => {\n try {\n const waveformPrefs = await bridge.getWaveformPreferences();\n if (waveformPrefs?.disabledEffects) {\n setDisabledEffects(waveformPrefs.disabledEffects);\n }\n } catch (error) {\n console.error('Failed to load disabled effects:', error);\n }\n }, [bridge]);\n\n const selectEffect = useCallback(\n async (effectName) => {\n const preset = effects.find((e) => e.name === effectName);\n if (!preset) return;\n\n setCurrentEffect(effectName);\n\n // Apply effect to Butterchurn directly\n try {\n if (window.app?.player?.karaokeRenderer) {\n window.app.player.karaokeRenderer.switchToPreset(effectName, 2.0);\n }\n } catch (error) {\n console.error('Failed to apply effect to Butterchurn:', error);\n }\n\n // Notify main process for state management via bridge\n try {\n await bridge.selectEffect(effectName);\n } catch (error) {\n console.error('Failed to notify main process:', error);\n }\n },\n [effects, bridge]\n );\n\n const randomEffect = useCallback(() => {\n const enabledEffects = effects.filter((e) => !disabledEffects.includes(e.name));\n if (enabledEffects.length === 0) return;\n\n const randomIndex = Math.floor(Math.random() * enabledEffects.length);\n const randomEffect = enabledEffects[randomIndex];\n selectEffect(randomEffect.name);\n }, [effects, disabledEffects, selectEffect]);\n\n const enableEffect = useCallback(\n async (effectName) => {\n const updated = disabledEffects.filter((e) => e !== effectName);\n setDisabledEffects(updated);\n\n // Save to settings via bridge\n try {\n await bridge.enableEffect(effectName);\n } catch (error) {\n console.error('Failed to enable effect:', error);\n }\n },\n [disabledEffects, bridge]\n );\n\n const disableEffect = useCallback(\n async (effectName) => {\n const updated = [...disabledEffects, effectName];\n setDisabledEffects(updated);\n\n // Save to settings via bridge\n try {\n await bridge.disableEffect(effectName);\n } catch (error) {\n console.error('Failed to disable effect:', error);\n }\n },\n [disabledEffects, bridge]\n );\n\n useEffect(() => {\n loadEffects();\n loadDisabledEffects();\n }, [loadEffects, loadDisabledEffects]);\n\n // Respond to IPC requests for effects list (for web admin API)\n useEffect(() => {\n if (!window.kaiAPI?.events) return;\n\n const handleGetEffectsList = () => {\n // Strip out preset data (not serializable) - only send metadata\n const serializableEffects = effects.map((e) => ({\n name: e.name,\n displayName: e.displayName,\n author: e.author,\n category: e.category,\n }));\n\n window.kaiAPI.renderer.sendEffectsList(serializableEffects);\n };\n\n const handleGetCurrentEffect = () => {\n window.kaiAPI.renderer.sendCurrentEffect(currentEffect);\n };\n\n const handleGetDisabledEffects = () => {\n window.kaiAPI.renderer.sendDisabledEffects(disabledEffects);\n };\n\n window.kaiAPI.events.on('effects:getList', handleGetEffectsList);\n window.kaiAPI.events.on('effects:getCurrent', handleGetCurrentEffect);\n window.kaiAPI.events.on('effects:getDisabled', handleGetDisabledEffects);\n\n return () => {\n window.kaiAPI.events.removeListener('effects:getList', handleGetEffectsList);\n window.kaiAPI.events.removeListener('effects:getCurrent', handleGetCurrentEffect);\n window.kaiAPI.events.removeListener('effects:getDisabled', handleGetDisabledEffects);\n };\n }, [effects, currentEffect, disabledEffects]);\n\n // Listen for effects commands from web admin\n useEffect(() => {\n if (!window.kaiAPI?.events || effects.length === 0) return;\n\n const onSelectFromAdmin = (event, effectName) => {\n selectEffect(effectName);\n };\n\n const onNextFromAdmin = () => {\n const enabledEffects = effects.filter((e) => !disabledEffects.includes(e.name));\n if (enabledEffects.length === 0) return;\n\n const currentIndex = enabledEffects.findIndex((e) => e.name === currentEffect);\n const nextIndex = (currentIndex + 1) % enabledEffects.length;\n selectEffect(enabledEffects[nextIndex].name);\n };\n\n const onPreviousFromAdmin = () => {\n const enabledEffects = effects.filter((e) => !disabledEffects.includes(e.name));\n if (enabledEffects.length === 0) return;\n\n const currentIndex = enabledEffects.findIndex((e) => e.name === currentEffect);\n const prevIndex = currentIndex <= 0 ? enabledEffects.length - 1 : currentIndex - 1;\n selectEffect(enabledEffects[prevIndex].name);\n };\n\n const onRandomFromAdmin = () => {\n randomEffect();\n };\n\n const onDisableFromAdmin = (event, effectName) => {\n disableEffect(effectName);\n };\n\n const onEnableFromAdmin = (event, effectName) => {\n enableEffect(effectName);\n };\n\n window.kaiAPI.events.on('effects:select', onSelectFromAdmin);\n window.kaiAPI.events.on('effects:next', onNextFromAdmin);\n window.kaiAPI.events.on('effects:previous', onPreviousFromAdmin);\n window.kaiAPI.events.on('effects:random', onRandomFromAdmin);\n window.kaiAPI.events.on('effects:disable', onDisableFromAdmin);\n window.kaiAPI.events.on('effects:enable', onEnableFromAdmin);\n\n return () => {\n window.kaiAPI.events.removeListener('effects:select', onSelectFromAdmin);\n window.kaiAPI.events.removeListener('effects:next', onNextFromAdmin);\n window.kaiAPI.events.removeListener('effects:previous', onPreviousFromAdmin);\n window.kaiAPI.events.removeListener('effects:random', onRandomFromAdmin);\n window.kaiAPI.events.removeListener('effects:disable', onDisableFromAdmin);\n window.kaiAPI.events.removeListener('effects:enable', onEnableFromAdmin);\n };\n }, [\n effects,\n currentEffect,\n disabledEffects,\n selectEffect,\n randomEffect,\n disableEffect,\n enableEffect,\n ]);\n\n return (\n <EffectsPanel\n effects={effects}\n currentEffect={currentEffect}\n disabledEffects={disabledEffects}\n searchTerm={searchTerm}\n currentCategory={currentCategory}\n onSearch={setSearchTerm}\n onCategoryChange={setCurrentCategory}\n onSelectEffect={selectEffect}\n onRandomEffect={randomEffect}\n onEnableEffect={enableEffect}\n onDisableEffect={disableEffect}\n />\n );\n}\n","export function RequestsList({ requests, onApprove, onReject }) {\n const handleApprove = async (requestId) => {\n if (onApprove) {\n await onApprove(requestId);\n }\n };\n\n const handleReject = async (requestId) => {\n if (onReject) {\n await onReject(requestId);\n }\n };\n\n const pendingRequests = requests.filter((r) => r.status === 'pending');\n const otherRequests = requests.filter((r) => r.status !== 'pending');\n\n return (\n <div className=\"p-4 space-y-6\">\n {pendingRequests.length > 0 && (\n <div className=\"space-y-3\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-100\">\n Pending Approval ({pendingRequests.length})\n </h3>\n <div className=\"space-y-2\">\n {pendingRequests.map((request) => (\n <div\n key={request.id}\n className=\"bg-yellow-50 dark:bg-yellow-900/20 border border-yellow-200 dark:border-yellow-800 rounded-lg p-4 flex items-center justify-between gap-4\"\n >\n <div className=\"flex-1 min-w-0\">\n <div className=\"font-medium text-gray-900 dark:text-gray-100 truncate\">\n <strong>{request.song.title}</strong>\n {request.song.artist && (\n <span className=\"text-gray-600 dark:text-gray-400\">\n {' '}\n - {request.song.artist}\n </span>\n )}\n </div>\n <div className=\"flex items-center gap-3 mt-1 text-sm text-gray-600 dark:text-gray-400\">\n <span>From: {request.requesterName}</span>\n {request.message && <span className=\"italic\">\"{request.message}\"</span>}\n </div>\n </div>\n <div className=\"flex items-center gap-2 flex-shrink-0\">\n <button\n className=\"px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white text-sm rounded-lg transition\"\n onClick={() => handleApprove(request.id)}\n >\n ✓ Approve\n </button>\n <button\n className=\"px-3 py-1.5 bg-red-600 hover:bg-red-700 text-white text-sm rounded-lg transition\"\n onClick={() => handleReject(request.id)}\n >\n ✗ Reject\n </button>\n </div>\n </div>\n ))}\n </div>\n </div>\n )}\n\n {otherRequests.length > 0 && (\n <div className=\"space-y-3\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-100\">\n Recent Requests\n </h3>\n <div className=\"space-y-2\">\n {otherRequests.slice(0, 10).map((request) => {\n const statusColors = {\n approved: 'bg-green-50 dark:bg-green-900/20 border-green-200 dark:border-green-800',\n rejected: 'bg-red-50 dark:bg-red-900/20 border-red-200 dark:border-red-800',\n };\n const badgeColors = {\n approved: 'bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200',\n rejected: 'bg-red-100 dark:bg-red-900 text-red-800 dark:text-red-200',\n };\n\n return (\n <div\n key={request.id}\n className={`${statusColors[request.status] || 'bg-gray-50 dark:bg-gray-800 border-gray-200 dark:border-gray-700'} border rounded-lg p-4`}\n >\n <div className=\"flex items-center justify-between gap-4\">\n <div className=\"flex-1 min-w-0\">\n <div className=\"font-medium text-gray-900 dark:text-gray-100 truncate\">\n <strong>{request.song.title}</strong>\n {request.song.artist && (\n <span className=\"text-gray-600 dark:text-gray-400\">\n {' '}\n - {request.song.artist}\n </span>\n )}\n </div>\n <div className=\"flex items-center gap-3 mt-1 text-sm text-gray-600 dark:text-gray-400\">\n <span>From: {request.requesterName}</span>\n <span\n className={`px-2 py-0.5 rounded-full text-xs font-medium ${badgeColors[request.status] || 'bg-gray-100 dark:bg-gray-700 text-gray-800 dark:text-gray-200'}`}\n >\n {request.status}\n </span>\n </div>\n </div>\n </div>\n </div>\n );\n })}\n </div>\n </div>\n )}\n\n {requests.length === 0 && (\n <div className=\"text-center py-12 text-gray-500 dark:text-gray-400\">\n <p>No song requests yet</p>\n </div>\n )}\n </div>\n );\n}\n","/**\n * RequestsListWrapper - State management wrapper for shared RequestsList\n * Loads requests from IPC and listens for updates\n */\n\nimport { useState, useEffect } from 'react';\nimport { RequestsList } from '../../shared/components/RequestsList.jsx';\n\nexport function RequestsListWrapper() {\n const [requests, setRequests] = useState([]);\n\n useEffect(() => {\n loadRequests();\n\n // Auto-refresh every 5 seconds\n const interval = setInterval(loadRequests, 5000);\n\n // Listen for real-time updates\n if (window.kaiAPI?.events) {\n const onNewRequest = (event, request) => {\n console.log('📨 New song request:', request);\n loadRequests();\n };\n\n const onApproved = (event, request) => {\n console.log('✅ Request approved:', request);\n loadRequests();\n };\n\n const onRejected = (event, request) => {\n console.log('❌ Request rejected:', request);\n loadRequests();\n };\n\n window.kaiAPI.events.on('songRequest:new', onNewRequest);\n window.kaiAPI.events.on('songRequest:approved', onApproved);\n window.kaiAPI.events.on('songRequest:rejected', onRejected);\n\n return () => {\n clearInterval(interval);\n window.kaiAPI.events.removeListener('songRequest:new', onNewRequest);\n window.kaiAPI.events.removeListener('songRequest:approved', onApproved);\n window.kaiAPI.events.removeListener('songRequest:rejected', onRejected);\n };\n }\n\n return () => clearInterval(interval);\n }, []);\n\n const loadRequests = async () => {\n try {\n const requestsList = await window.kaiAPI.webServer.getSongRequests();\n setRequests(requestsList || []);\n } catch (error) {\n console.error('Failed to load requests:', error);\n }\n };\n\n const handleApprove = async (requestId) => {\n try {\n await window.kaiAPI.webServer.approveRequest(requestId);\n await loadRequests();\n } catch (error) {\n console.error('Failed to approve request:', error);\n }\n };\n\n const handleReject = async (requestId) => {\n try {\n await window.kaiAPI.webServer.rejectRequest(requestId);\n await loadRequests();\n } catch (error) {\n console.error('Failed to reject request:', error);\n }\n };\n\n return <RequestsList requests={requests} onApprove={handleApprove} onReject={handleReject} />;\n}\n","/**\n * LyricsEditorCanvas - Canvas-based lyrics timeline visualization\n *\n * Features:\n * - Waveform visualization from vocals track\n * - Lyric lines rendered as colored rectangles\n * - Playhead showing current playback position\n * - Click-to-select lyric lines\n * - Backup vs lead singer color coding\n */\n\nimport { useEffect, useRef } from 'react';\n\nexport function LyricsEditorCanvas({\n lyricsData,\n selectedLineIndex,\n onLineSelect,\n vocalsWaveform,\n songDuration,\n currentPosition,\n isPlaying,\n}) {\n const canvasRef = useRef(null);\n const lyricRectanglesRef = useRef([]);\n\n const CANVAS_WIDTH = 3800;\n const CANVAS_HEIGHT = 120;\n\n // Draw canvas\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n\n const ctx = canvas.getContext('2d');\n const width = canvas.width;\n const height = canvas.height;\n\n // Clear canvas\n ctx.clearRect(0, 0, width, height);\n\n // Draw background\n ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';\n ctx.fillRect(0, 0, width, height);\n\n // Draw waveform if available\n if (vocalsWaveform && vocalsWaveform.length > 0) {\n drawWaveform(ctx, vocalsWaveform, width, height);\n }\n\n // Draw lyric rectangles\n if (songDuration > 0 && lyricsData && lyricsData.length > 0) {\n lyricRectanglesRef.current = [];\n\n // Separate backup and regular lines for rendering order\n const backupLines = [];\n const regularLines = [];\n\n lyricsData.forEach((line, index) => {\n // Skip disabled lines\n if (line.disabled === true) return;\n\n if (line.backup === true) {\n backupLines.push({ line, index });\n } else {\n regularLines.push({ line, index });\n }\n });\n\n // Draw backup lines first (yellow, behind)\n backupLines.forEach(({ line, index }) => {\n drawLyricRectangle(\n ctx,\n line,\n index,\n songDuration,\n width,\n height,\n 'rgba(255, 200, 0, 0.35)',\n 'rgba(255, 200, 0, 0.7)',\n selectedLineIndex === index\n );\n });\n\n // Draw regular lines second (blue, in front)\n regularLines.forEach(({ line, index }) => {\n drawLyricRectangle(\n ctx,\n line,\n index,\n songDuration,\n width,\n height,\n 'rgba(0, 100, 255, 0.35)',\n 'rgba(0, 255, 255, 0.9)',\n selectedLineIndex === index\n );\n });\n }\n\n // Draw playhead if playing or paused with position\n if (currentPosition > 0 && songDuration > 0) {\n const playheadX = (currentPosition / songDuration) * width;\n\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.9)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(playheadX, 0);\n ctx.lineTo(playheadX, height);\n ctx.stroke();\n\n // Draw triangular tic marks (relative to height)\n ctx.fillStyle = 'rgba(255, 255, 255, 0.9)';\n\n const triangleHeight = height * 0.1; // 10% of canvas height\n const triangleWidth = 6;\n\n // Top triangle (pointing down)\n ctx.beginPath();\n ctx.moveTo(playheadX, triangleHeight); // Bottom point\n ctx.lineTo(playheadX - triangleWidth, 0); // Top left\n ctx.lineTo(playheadX + triangleWidth, 0); // Top right\n ctx.closePath();\n ctx.fill();\n\n // Bottom triangle (pointing up)\n ctx.beginPath();\n ctx.moveTo(playheadX, height - triangleHeight); // Top point\n ctx.lineTo(playheadX - triangleWidth, height); // Bottom left\n ctx.lineTo(playheadX + triangleWidth, height); // Bottom right\n ctx.closePath();\n ctx.fill();\n }\n }, [lyricsData, selectedLineIndex, vocalsWaveform, songDuration, currentPosition, isPlaying]);\n\n // Draw waveform\n const drawWaveform = (ctx, waveform, width, height) => {\n const centerY = height / 2;\n const scale = height / 256;\n\n // Draw waveform\n ctx.strokeStyle = '#ffffff';\n ctx.lineWidth = 1;\n ctx.beginPath();\n\n for (let i = 0; i < waveform.length; i++) {\n const x = (i / waveform.length) * width;\n const value = waveform[i];\n const y = centerY - value * scale;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n ctx.stroke();\n\n // Mirror for bottom half\n ctx.beginPath();\n for (let i = 0; i < waveform.length; i++) {\n const x = (i / waveform.length) * width;\n const value = waveform[i];\n const y = centerY + value * scale;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n ctx.stroke();\n\n // Draw center line\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.moveTo(0, centerY);\n ctx.lineTo(width, centerY);\n ctx.stroke();\n };\n\n // Draw lyric rectangle\n const drawLyricRectangle = (\n ctx,\n lineData,\n lineIndex,\n songDuration,\n width,\n height,\n fillColor,\n outlineColor,\n isSelected\n ) => {\n const startTime = lineData.start || lineData.startTimeSec || 0;\n const endTime = lineData.end || lineData.endTimeSec || startTime + 3;\n const duration = endTime - startTime;\n\n if (duration > 0) {\n const startX = (startTime / songDuration) * width;\n const rectWidth = (duration / songDuration) * width;\n\n // Rectangle dimensions relative to canvas height\n const rectMargin = height * 0.05; // 5% margin from top/bottom\n const rectHeight = height - rectMargin * 2; // Use most of canvas height\n\n // Store rectangle bounds for click detection\n lyricRectanglesRef.current.push({\n x: startX,\n y: rectMargin,\n width: rectWidth,\n height: rectHeight,\n lineIndex: lineIndex,\n });\n\n // Draw rectangle\n ctx.fillStyle = fillColor;\n ctx.fillRect(startX, rectMargin, rectWidth, rectHeight);\n\n // Draw outline if selected\n if (isSelected) {\n ctx.strokeStyle = outlineColor;\n ctx.lineWidth = 2;\n ctx.strokeRect(startX, rectMargin, rectWidth, rectHeight);\n }\n }\n };\n\n // Handle canvas click\n const handleCanvasClick = (e) => {\n if (!lyricRectanglesRef.current.length || !songDuration) return;\n\n const canvas = canvasRef.current;\n const rect = canvas.getBoundingClientRect();\n const scaleX = canvas.width / rect.width;\n const scaleY = canvas.height / rect.height;\n\n const x = (e.clientX - rect.left) * scaleX;\n const y = (e.clientY - rect.top) * scaleY;\n\n // Check if click is inside any rectangle (reverse order)\n for (let i = lyricRectanglesRef.current.length - 1; i >= 0; i--) {\n const r = lyricRectanglesRef.current[i];\n if (x >= r.x && x <= r.x + r.width && y >= r.y && y <= r.y + r.height) {\n onLineSelect(r.lineIndex);\n\n // Scroll the corresponding line into view\n const lineElement = document.querySelector(\n `.lyric-line-editor[data-index=\"${r.lineIndex}\"]`\n );\n if (lineElement) {\n lineElement.scrollIntoView({ behavior: 'smooth', block: 'center' });\n }\n break;\n }\n }\n };\n\n return (\n <div className=\"w-full\">\n <canvas\n ref={canvasRef}\n width={CANVAS_WIDTH}\n height={CANVAS_HEIGHT}\n onClick={handleCanvasClick}\n className=\"w-full h-auto cursor-pointer block\"\n />\n </div>\n );\n}\n","/**\n * LineDetailCanvas - Zoomed waveform view for selected lyric line\n *\n * Features:\n * - Shows waveform for just the selected line's time range\n * - Stretched to fill canvas width for detailed editing\n * - Displays word timing markers (if available)\n * - Playhead for current position within the line\n */\n\nimport { useEffect, useRef } from 'react';\n\nexport function LineDetailCanvas({\n selectedLine,\n vocalsWaveform,\n songDuration,\n currentPosition,\n isPlaying,\n}) {\n const canvasRef = useRef(null);\n\n const CANVAS_WIDTH = 3800;\n const CANVAS_HEIGHT = 120;\n\n // Draw canvas\n useEffect(() => {\n const canvas = canvasRef.current;\n if (!canvas) return;\n\n const ctx = canvas.getContext('2d');\n const width = canvas.width;\n const height = canvas.height;\n\n // Clear canvas\n ctx.clearRect(0, 0, width, height);\n\n // Draw black background (always, like full song canvas)\n ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';\n ctx.fillRect(0, 0, width, height);\n\n // If no line selected or no waveform, just show empty canvas\n if (!selectedLine || !vocalsWaveform) return;\n\n const lineStart = selectedLine.start || selectedLine.startTimeSec || 0;\n const lineEnd = selectedLine.end || selectedLine.endTimeSec || lineStart + 3;\n const lineDuration = lineEnd - lineStart;\n\n // Draw waveform segment for this line (stretched to full width)\n drawWaveformSegment(ctx, vocalsWaveform, lineStart, lineEnd, songDuration, width, height);\n\n // Draw word timing rectangles if available\n if (selectedLine.word_timing && Array.isArray(selectedLine.word_timing)) {\n drawWordRectangles(ctx, selectedLine.word_timing, lineDuration, width, height);\n }\n\n // Draw playhead if playing and within this line's range\n if (isPlaying && currentPosition >= lineStart && currentPosition <= lineEnd) {\n const relativePosition = currentPosition - lineStart;\n const x = (relativePosition / lineDuration) * width;\n\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.9)';\n ctx.lineWidth = 2;\n ctx.beginPath();\n ctx.moveTo(x, 0);\n ctx.lineTo(x, height);\n ctx.stroke();\n }\n }, [selectedLine, vocalsWaveform, songDuration, currentPosition, isPlaying]);\n\n // Draw waveform segment for the selected line (stretched to full canvas width)\n const drawWaveformSegment = (ctx, waveform, startTime, endTime, totalDuration, width, height) => {\n if (!waveform || waveform.length === 0) return;\n\n const _lineDuration = endTime - startTime;\n const samplesPerSecond = waveform.length / totalDuration;\n const startSample = Math.floor(startTime * samplesPerSecond);\n const endSample = Math.floor(endTime * samplesPerSecond);\n const lineWaveform = waveform.slice(startSample, endSample);\n\n if (lineWaveform.length === 0) return;\n\n const centerY = height / 2;\n const scale = height / 256;\n\n // Draw waveform (top half)\n ctx.strokeStyle = '#ffffff';\n ctx.lineWidth = 1;\n ctx.beginPath();\n\n for (let i = 0; i < lineWaveform.length; i++) {\n const x = (i / lineWaveform.length) * width;\n const value = lineWaveform[i];\n const y = centerY - value * scale;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n ctx.stroke();\n\n // Mirror for bottom half\n ctx.beginPath();\n for (let i = 0; i < lineWaveform.length; i++) {\n const x = (i / lineWaveform.length) * width;\n const value = lineWaveform[i];\n const y = centerY + value * scale;\n\n if (i === 0) {\n ctx.moveTo(x, y);\n } else {\n ctx.lineTo(x, y);\n }\n }\n\n ctx.stroke();\n\n // Draw center line\n ctx.strokeStyle = 'rgba(255, 255, 255, 0.3)';\n ctx.lineWidth = 1;\n ctx.beginPath();\n ctx.moveTo(0, centerY);\n ctx.lineTo(width, centerY);\n ctx.stroke();\n };\n\n // Draw word timing rectangles (similar to line rectangles in song canvas)\n const drawWordRectangles = (ctx, wordTimings, lineDuration, width, height) => {\n if (!wordTimings || wordTimings.length === 0) return;\n\n // Rectangle dimensions relative to canvas height (same as song canvas)\n const rectMargin = height * 0.05; // 5% margin from top/bottom\n const rectHeight = height - rectMargin * 2; // Use most of canvas height\n\n // Use green color for word rectangles (different from line colors)\n const fillColor = 'rgba(0, 255, 100, 0.35)';\n const outlineColor = 'rgba(0, 255, 100, 0.7)';\n\n wordTimings.forEach(([wordStart, wordEnd]) => {\n // Word timings are relative to line start (0 to lineDuration)\n const startX = (wordStart / lineDuration) * width;\n const rectWidth = ((wordEnd - wordStart) / lineDuration) * width;\n\n // Draw filled rectangle\n ctx.fillStyle = fillColor;\n ctx.fillRect(startX, rectMargin, rectWidth, rectHeight);\n\n // Draw outline\n ctx.strokeStyle = outlineColor;\n ctx.lineWidth = 1;\n ctx.strokeRect(startX, rectMargin, rectWidth, rectHeight);\n });\n };\n\n return (\n <div className=\"w-full\">\n <canvas\n ref={canvasRef}\n width={CANVAS_WIDTH}\n height={CANVAS_HEIGHT}\n className=\"w-full h-auto cursor-crosshair block\"\n />\n </div>\n );\n}\n","/**\n * PortalSelect - Custom select component using portal for dropdown positioning\n *\n * DESIGN EXCEPTION: We normally prefer native HTML elements (see SYSTEM_ARCHITECTURE.md),\n * but native <select> dropdowns are broken on Linux due to Electron 38+ Wayland bugs.\n * The dropdown renders at the top-left corner instead of below the select element.\n * See: https://github.com/electron/electron/issues/44607\n *\n * This component renders the dropdown via a React portal to document.body,\n * bypassing the Wayland popup positioning bug. We maintain as much native\n * behavior as possible: keyboard navigation, focus management, escape to close.\n *\n * This workaround should be removed when Electron fixes Wayland popup positioning.\n */\n\nimport React, { useState, useRef, useEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport function PortalSelect({\n id,\n value,\n onChange,\n options = [],\n placeholder = 'Select...',\n className = '',\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const [position, setPosition] = useState({ top: 0, left: 0, minWidth: 0, openUpward: false });\n const [focusedIndex, setFocusedIndex] = useState(-1);\n const triggerRef = useRef(null);\n const dropdownRef = useRef(null);\n\n // Estimated dropdown height for positioning calculation\n const DROPDOWN_MAX_HEIGHT = 240; // matches max-h-60 (15rem = 240px)\n\n // Find the selected option's label\n const selectedOption = options.find((opt) => opt.value === value);\n const displayText = selectedOption ? selectedOption.label : placeholder;\n\n // Find index of currently selected value\n const selectedIndex = options.findIndex((opt) => opt.value === value);\n\n // Update dropdown position when opened\n const updatePosition = useCallback(() => {\n if (triggerRef.current) {\n const rect = triggerRef.current.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n // Determine if we should open upward\n const estimatedHeight = Math.min(options.length * 40, DROPDOWN_MAX_HEIGHT);\n const openUpward = spaceBelow < estimatedHeight && spaceAbove > spaceBelow;\n\n setPosition({\n top: openUpward ? rect.top - 2 : rect.bottom + 2,\n left: rect.left,\n minWidth: rect.width,\n openUpward,\n });\n }\n }, [options.length]);\n\n useEffect(() => {\n if (isOpen) {\n updatePosition();\n setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);\n }\n }, [isOpen, updatePosition, selectedIndex]);\n\n // Close dropdown when clicking outside\n useEffect(() => {\n if (!isOpen) return;\n\n const handleClickOutside = (event) => {\n if (\n triggerRef.current &&\n !triggerRef.current.contains(event.target) &&\n dropdownRef.current &&\n !dropdownRef.current.contains(event.target)\n ) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [isOpen]);\n\n // Close on scroll outside dropdown to prevent misalignment\n useEffect(() => {\n if (!isOpen) return;\n\n const handleScroll = (event) => {\n // Don't close if scrolling within the dropdown itself\n if (dropdownRef.current && dropdownRef.current.contains(event.target)) {\n return;\n }\n setIsOpen(false);\n };\n window.addEventListener('scroll', handleScroll, true);\n return () => window.removeEventListener('scroll', handleScroll, true);\n }, [isOpen]);\n\n const handleSelect = useCallback(\n (optionValue) => {\n onChange?.({ target: { value: optionValue } });\n setIsOpen(false);\n triggerRef.current?.focus();\n },\n [onChange]\n );\n\n // Keyboard navigation matching native select behavior\n const handleKeyDown = useCallback(\n (event) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (isOpen && focusedIndex >= 0) {\n handleSelect(options[focusedIndex].value);\n } else {\n setIsOpen(!isOpen);\n }\n break;\n case 'Escape':\n event.preventDefault();\n setIsOpen(false);\n triggerRef.current?.focus();\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n } else {\n setFocusedIndex((prev) => Math.min(prev + 1, options.length - 1));\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (isOpen) {\n setFocusedIndex((prev) => Math.max(prev - 1, 0));\n }\n break;\n case 'Home':\n event.preventDefault();\n if (isOpen) setFocusedIndex(0);\n break;\n case 'End':\n event.preventDefault();\n if (isOpen) setFocusedIndex(options.length - 1);\n break;\n case 'Tab':\n if (isOpen) setIsOpen(false);\n break;\n default:\n // Type-to-search: find first option starting with pressed key\n if (event.key.length === 1 && isOpen) {\n const char = event.key.toLowerCase();\n const idx = options.findIndex((opt) => opt.label.toLowerCase().startsWith(char));\n if (idx >= 0) setFocusedIndex(idx);\n }\n }\n },\n [isOpen, focusedIndex, options, handleSelect]\n );\n\n // Scroll focused option into view\n useEffect(() => {\n if (isOpen && dropdownRef.current && focusedIndex >= 0) {\n const focusedElement = dropdownRef.current.children[focusedIndex];\n focusedElement?.scrollIntoView({ block: 'nearest' });\n }\n }, [isOpen, focusedIndex]);\n\n return (\n <>\n {/* Trigger Button - styled to match native select */}\n <button\n ref={triggerRef}\n id={id}\n type=\"button\"\n className={`w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-gray-100 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-between text-left ${className}`}\n onClick={() => setIsOpen(!isOpen)}\n onKeyDown={handleKeyDown}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-labelledby={id}\n >\n <span className=\"truncate\">{displayText}</span>\n <svg\n className={`w-4 h-4 ml-2 flex-shrink-0 transition-transform ${isOpen ? 'rotate-180' : ''}`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n\n {/* Dropdown Portal - renders at document.body to bypass Wayland positioning bug */}\n {isOpen &&\n createPortal(\n <div\n ref={dropdownRef}\n className=\"fixed z-[9999] bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded shadow-lg max-h-60 overflow-y-auto\"\n style={{\n ...(position.openUpward\n ? { bottom: window.innerHeight - position.top, left: position.left }\n : { top: position.top, left: position.left }),\n minWidth: position.minWidth,\n }}\n role=\"listbox\"\n onKeyDown={handleKeyDown}\n >\n {options.map((option, index) => (\n <div\n key={option.value}\n className={`px-3 py-2 cursor-pointer transition-colors whitespace-nowrap ${\n index === focusedIndex\n ? 'bg-blue-500 text-white'\n : option.value === value\n ? 'bg-blue-100 dark:bg-blue-900 text-blue-900 dark:text-blue-100'\n : 'text-gray-900 dark:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-600'\n }`}\n onClick={() => handleSelect(option.value)}\n role=\"option\"\n aria-selected={option.value === value}\n >\n {option.label}\n </div>\n ))}\n </div>,\n document.body\n )}\n </>\n );\n}\n","/**\n * LyricLine - Individual lyric line editor component\n *\n * Features:\n * - Editable timing (start/end) with < > adjustment buttons\n * - Editable text\n * - Enable/disable toggle\n * - Singer assignment dropdown\n * - Delete button\n * - Add line after button\n * - Click line number to play that section\n *\n * Keyboard shortcuts (when not in text input):\n * - d/f: Adjust start time (-/+0.1s, shift for 0.5s)\n * - j/k: Adjust end time (-/+0.1s, shift for 0.5s)\n */\n\nimport { useState, useRef, useCallback, useEffect } from 'react';\nimport { createPortal } from 'react-dom';\nimport { PortalSelect } from './PortalSelect.jsx';\n\n// Singer options for the dropdown\nconst SINGER_OPTIONS = [\n { value: '', label: 'Lead' },\n { value: 'B', label: 'Singer B' },\n { value: 'duet', label: 'Duet' },\n { value: 'backup', label: 'Backup' },\n { value: 'backup:PA', label: 'Backup PA 🔊' },\n];\n\n// Small/large increment values in seconds\nconst SMALL_INCREMENT = 0.1;\nconst LARGE_INCREMENT = 0.5;\n\n// Hold-to-repeat delay and interval in milliseconds\nconst REPEAT_DELAY = 400;\nconst REPEAT_INTERVAL = 80;\n\n/**\n * PortalTooltip - Tooltip that renders via portal for consistent positioning\n */\nfunction PortalTooltip({ text, targetRect, visible }) {\n if (!visible || !targetRect) return null;\n\n // Position tooltip above the button, centered\n const style = {\n position: 'fixed',\n left: targetRect.left + targetRect.width / 2,\n top: targetRect.top - 4,\n transform: 'translate(-50%, -100%)',\n zIndex: 10000,\n };\n\n return createPortal(\n <div\n style={style}\n className=\"px-2 py-1 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded shadow-lg whitespace-nowrap pointer-events-none\"\n >\n {text}\n {/* Arrow pointing down */}\n <div className=\"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-gray-900 dark:border-t-gray-700\" />\n </div>,\n document.body\n );\n}\n\n/**\n * TimeAdjustButton - Button for adjusting time values with hold-to-repeat\n */\nfunction TimeAdjustButton({ direction, onAdjust, tooltip, isStart }) {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipRect, setTooltipRect] = useState(null);\n const buttonRef = useRef(null);\n const intervalRef = useRef(null);\n const timeoutRef = useRef(null);\n const tooltipTimeoutRef = useRef(null);\n\n const doAdjust = useCallback(\n (e) => {\n const delta = direction === 'decrease' ? -1 : 1;\n const increment = e.shiftKey ? LARGE_INCREMENT : SMALL_INCREMENT;\n onAdjust(delta * increment);\n },\n [direction, onAdjust]\n );\n\n const startRepeat = useCallback(\n (e) => {\n // Prevent text selection during hold\n e.preventDefault();\n // Hide tooltip during adjustment\n setShowTooltip(false);\n // Do first adjustment immediately\n doAdjust(e);\n\n // Start repeating after delay\n timeoutRef.current = setTimeout(() => {\n intervalRef.current = setInterval(() => {\n // Use small increment for repeat (shift state may have changed)\n const delta = direction === 'decrease' ? -1 : 1;\n onAdjust(delta * SMALL_INCREMENT);\n }, REPEAT_INTERVAL);\n }, REPEAT_DELAY);\n },\n [direction, onAdjust, doAdjust]\n );\n\n const stopRepeat = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n\n const handleMouseEnter = useCallback(() => {\n // Delay tooltip show slightly to avoid flicker\n tooltipTimeoutRef.current = setTimeout(() => {\n if (buttonRef.current) {\n setTooltipRect(buttonRef.current.getBoundingClientRect());\n setShowTooltip(true);\n }\n }, 400);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n if (tooltipTimeoutRef.current) {\n clearTimeout(tooltipTimeoutRef.current);\n tooltipTimeoutRef.current = null;\n }\n setShowTooltip(false);\n stopRepeat();\n }, [stopRepeat]);\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n if (tooltipTimeoutRef.current) clearTimeout(tooltipTimeoutRef.current);\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n if (intervalRef.current) clearInterval(intervalRef.current);\n };\n }, []);\n\n const symbol = direction === 'decrease' ? '‹' : '›';\n const shortcutKey = isStart\n ? direction === 'decrease'\n ? 'd'\n : 'f'\n : direction === 'decrease'\n ? 'j'\n : 'k';\n\n const tooltipText = `${tooltip} (${shortcutKey}, shift for ±0.5s)`;\n\n return (\n <>\n <button\n ref={buttonRef}\n type=\"button\"\n className=\"w-6 h-7 flex items-center justify-center bg-gray-200 dark:bg-gray-600 hover:bg-blue-500 hover:text-white dark:hover:bg-blue-500 border border-gray-300 dark:border-gray-500 rounded text-gray-700 dark:text-gray-200 font-bold text-base cursor-pointer transition-colors select-none\"\n onMouseDown={startRepeat}\n onMouseUp={stopRepeat}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onClick={(e) => e.stopPropagation()}\n >\n {symbol}\n </button>\n <PortalTooltip text={tooltipText} targetRect={tooltipRect} visible={showTooltip} />\n </>\n );\n}\n\n/**\n * IconButton - Button with icon and portal tooltip\n * Wraps button in span to ensure tooltip works even when disabled\n */\nfunction IconButton({ icon, tooltip, onClick, className, disabled = false }) {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipRect, setTooltipRect] = useState(null);\n const wrapperRef = useRef(null);\n const tooltipTimeoutRef = useRef(null);\n\n const handleMouseEnter = useCallback(() => {\n tooltipTimeoutRef.current = setTimeout(() => {\n if (wrapperRef.current) {\n setTooltipRect(wrapperRef.current.getBoundingClientRect());\n setShowTooltip(true);\n }\n }, 400);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n if (tooltipTimeoutRef.current) {\n clearTimeout(tooltipTimeoutRef.current);\n tooltipTimeoutRef.current = null;\n }\n setShowTooltip(false);\n }, []);\n\n useEffect(() => {\n return () => {\n if (tooltipTimeoutRef.current) clearTimeout(tooltipTimeoutRef.current);\n };\n }, []);\n\n return (\n <>\n <span\n ref={wrapperRef}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className=\"inline-flex\"\n >\n <button type=\"button\" className={className} disabled={disabled} onClick={onClick}>\n <span className=\"material-icons text-base\">{icon}</span>\n </button>\n </span>\n <PortalTooltip text={tooltip} targetRect={tooltipRect} visible={showTooltip} />\n </>\n );\n}\n\n/**\n * LineNumberButton - Clickable line number with play functionality and tooltip\n */\nfunction LineNumberButton({ index, onClick }) {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipRect, setTooltipRect] = useState(null);\n const buttonRef = useRef(null);\n const tooltipTimeoutRef = useRef(null);\n\n const handleMouseEnter = useCallback(() => {\n tooltipTimeoutRef.current = setTimeout(() => {\n if (buttonRef.current) {\n setTooltipRect(buttonRef.current.getBoundingClientRect());\n setShowTooltip(true);\n }\n }, 400);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n if (tooltipTimeoutRef.current) {\n clearTimeout(tooltipTimeoutRef.current);\n tooltipTimeoutRef.current = null;\n }\n setShowTooltip(false);\n }, []);\n\n useEffect(() => {\n return () => {\n if (tooltipTimeoutRef.current) clearTimeout(tooltipTimeoutRef.current);\n };\n }, []);\n\n const tooltipText = `Play line ${index + 1} (p)`;\n\n return (\n <>\n <span\n ref={buttonRef}\n className=\"flex items-center justify-center min-w-[36px] h-9 bg-gray-200 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-sm font-semibold text-gray-700 dark:text-gray-200 cursor-pointer transition-all flex-shrink-0 hover:bg-blue-600 hover:text-white dark:hover:bg-blue-500\"\n onClick={onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n >\n {index + 1}\n </span>\n <PortalTooltip text={tooltipText} targetRect={tooltipRect} visible={showTooltip} />\n </>\n );\n}\n\nexport function LyricLine({\n line,\n index,\n isSelected,\n onSelect,\n onUpdate,\n onDelete,\n onAddAfter,\n onSplit,\n onPlaySection,\n onAdjustStartTime,\n onAdjustEndTime,\n canAddAfter,\n canSplit,\n hasOverlap = false,\n}) {\n const startTime = line.start || line.startTimeSec || 0;\n const endTime = line.end || line.endTimeSec || startTime + 3;\n const text = line.text || '';\n const disabled = line.disabled === true;\n // Support new singer field, with backward compatibility for legacy backup boolean\n const singer = line.singer || (line.backup === true ? 'backup' : '');\n const isBackup = singer?.startsWith('backup') || false;\n\n const handleStartTimeChange = (e) => {\n const value = parseFloat(e.target.value) || 0;\n onUpdate(index, { ...line, start: value, startTimeSec: value });\n };\n\n const handleEndTimeChange = (e) => {\n const value = parseFloat(e.target.value) || 0;\n onUpdate(index, { ...line, end: value, endTimeSec: value });\n };\n\n const handleTextChange = (e) => {\n onUpdate(index, { ...line, text: e.target.value });\n };\n\n const handleSingerChange = (e) => {\n const newSinger = e.target.value || undefined;\n // Remove legacy backup field when using new singer field\n const { backup: _backup, ...lineWithoutBackup } = line;\n onSelect(index); // Select this line to ensure immediate visual update\n onUpdate(index, { ...lineWithoutBackup, singer: newSinger });\n };\n\n const handleToggleDisabled = () => {\n onUpdate(index, { ...line, disabled: !disabled });\n };\n\n const handleLineNumberClick = (e) => {\n e.stopPropagation();\n onSelect(index); // Select the line\n onPlaySection(startTime, endTime); // And play it\n };\n\n // Build container classes with proper precedence\n let containerClasses =\n 'lyric-line-editor flex items-center gap-2.5 mb-2.5 p-2 border-2 rounded transition-all cursor-pointer';\n\n // Conditional states - backup background takes priority, selection adds border\n if (isBackup) {\n // Backup lines always show yellow background\n containerClasses += ' bg-yellow-50 dark:bg-yellow-900/20';\n containerClasses += isSelected\n ? ' border-blue-500 dark:border-blue-400'\n : ' border-yellow-400 dark:border-yellow-600';\n } else if (isSelected) {\n containerClasses += ' border-blue-500 bg-blue-100 dark:border-blue-400 dark:bg-blue-900/40';\n } else if (disabled) {\n containerClasses +=\n ' opacity-50 bg-gray-100 dark:bg-gray-900 border-gray-300 dark:border-gray-600';\n } else {\n // Default state\n containerClasses +=\n ' bg-white dark:bg-gray-800 border-gray-300 dark:border-gray-600 hover:bg-gray-50 dark:hover:bg-gray-750 hover:border-gray-400 dark:hover:border-gray-500';\n }\n\n return (\n <div\n className={containerClasses}\n data-index={index}\n data-start-time={startTime}\n data-end-time={endTime}\n onClick={() => onSelect(index)}\n >\n <LineNumberButton index={index} onClick={handleLineNumberClick} />\n\n <div className=\"flex items-center gap-1 flex-shrink-0\">\n {/* Start time with adjustment buttons */}\n <TimeAdjustButton\n direction=\"decrease\"\n onAdjust={onAdjustStartTime}\n tooltip=\"Earlier\"\n isStart={true}\n />\n <input\n type=\"number\"\n className={`w-[58px] px-1 py-1.5 bg-gray-100 dark:bg-gray-700 rounded text-gray-900 dark:text-white text-xs text-center font-mono focus:outline-none [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none ${\n hasOverlap\n ? 'border-2 border-red-500 dark:border-red-400 focus:border-red-600 dark:focus:border-red-300'\n : 'border border-gray-300 dark:border-gray-600 focus:border-blue-500 dark:focus:border-blue-400'\n }`}\n value={startTime.toFixed(1)}\n onChange={handleStartTimeChange}\n step=\"0.1\"\n min=\"0\"\n onClick={(e) => {\n e.stopPropagation();\n onSelect(index);\n }}\n title={\n hasOverlap\n ? 'Warning: This line overlaps with the previous line for the same singer'\n : 'Start time (d/f to adjust)'\n }\n />\n <TimeAdjustButton\n direction=\"increase\"\n onAdjust={onAdjustStartTime}\n tooltip=\"Later\"\n isStart={true}\n />\n\n <span className=\"text-gray-500 dark:text-gray-400 font-semibold mx-0.5\">—</span>\n\n {/* End time with adjustment buttons */}\n <TimeAdjustButton\n direction=\"decrease\"\n onAdjust={onAdjustEndTime}\n tooltip=\"Earlier\"\n isStart={false}\n />\n <input\n type=\"number\"\n className=\"w-[58px] px-1 py-1.5 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white text-xs text-center font-mono focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none\"\n value={endTime.toFixed(1)}\n onChange={handleEndTimeChange}\n step=\"0.1\"\n min=\"0\"\n onClick={(e) => {\n e.stopPropagation();\n onSelect(index);\n }}\n title=\"End time (j/k to adjust)\"\n />\n <TimeAdjustButton\n direction=\"increase\"\n onAdjust={onAdjustEndTime}\n tooltip=\"Later\"\n isStart={false}\n />\n </div>\n\n <input\n type=\"text\"\n className=\"flex-1 px-3 py-2 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white text-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 dark:focus:ring-blue-400 dark:focus:border-blue-400\"\n value={text}\n onChange={handleTextChange}\n placeholder=\"Enter lyrics...\"\n onClick={(e) => {\n e.stopPropagation();\n onSelect(index);\n }}\n disabled={disabled}\n />\n\n <div\n className=\"flex items-center gap-1 flex-shrink-0 w-28\"\n onClick={(e) => {\n e.stopPropagation();\n onSelect(index);\n }}\n >\n <PortalSelect\n value={singer}\n onChange={handleSingerChange}\n options={SINGER_OPTIONS}\n className=\"text-xs py-1 px-2\"\n />\n </div>\n\n <div className=\"flex items-center gap-1.5 flex-shrink-0\">\n <IconButton\n icon={!disabled ? 'visibility' : 'visibility_off'}\n tooltip={!disabled ? 'Disable line' : 'Enable line'}\n className={`w-8 h-8 p-0 flex items-center justify-center border border-gray-300 dark:border-gray-600 rounded cursor-pointer transition-all ${!disabled ? 'bg-gray-200 dark:bg-gray-700 text-green-600 dark:text-green-400 hover:bg-gray-300 dark:hover:bg-gray-600' : 'bg-gray-200 dark:bg-gray-700 text-red-600 dark:text-red-400 hover:bg-gray-300 dark:hover:bg-gray-600'}`}\n onClick={(e) => {\n e.stopPropagation();\n handleToggleDisabled();\n }}\n />\n <IconButton\n icon=\"delete\"\n tooltip=\"Delete line\"\n className=\"w-8 h-8 p-0 flex items-center justify-center border border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 rounded cursor-pointer transition-all hover:bg-red-600 hover:border-red-600 hover:text-white dark:hover:bg-red-500 dark:hover:border-red-500\"\n onClick={(e) => {\n e.stopPropagation();\n if (confirm('Delete this lyric line?')) {\n onDelete(index);\n }\n }}\n />\n <IconButton\n icon=\"call_split\"\n tooltip={canSplit ? 'Split at punctuation' : 'No punctuation to split on'}\n className={`w-8 h-8 p-0 flex items-center justify-center border rounded cursor-pointer transition-all ${canSplit ? 'border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-blue-600 hover:border-blue-600 hover:text-white dark:hover:bg-blue-500 dark:hover:border-blue-500' : 'opacity-30 cursor-not-allowed border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200'}`}\n disabled={!canSplit}\n onClick={(e) => {\n e.stopPropagation();\n if (canSplit) {\n onSplit(index);\n }\n }}\n />\n <IconButton\n icon=\"add\"\n tooltip={canAddAfter ? 'Add line after' : 'No room (need 0.6s gap)'}\n className={`w-8 h-8 p-0 flex items-center justify-center border rounded cursor-pointer transition-all ${canAddAfter ? 'border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200 hover:bg-green-600 hover:border-green-600 hover:text-white dark:hover:bg-green-500 dark:hover:border-green-500' : 'opacity-30 cursor-not-allowed border-gray-300 dark:border-gray-600 bg-gray-200 dark:bg-gray-700 text-gray-700 dark:text-gray-200'}`}\n disabled={!canAddAfter}\n onClick={(e) => {\n e.stopPropagation();\n onAddAfter(index);\n }}\n />\n </div>\n </div>\n );\n}\n","import { useEffect } from 'react';\n\nexport function Toast({ message, type = 'info', onClose, duration = 3000 }) {\n useEffect(() => {\n if (duration > 0) {\n const timer = setTimeout(onClose, duration);\n return () => clearTimeout(timer);\n }\n }, [duration, onClose]);\n\n const typeStyles = {\n success: 'bg-green-600 border-green-500',\n error: 'bg-red-600 border-red-500',\n info: 'bg-blue-600 border-blue-500',\n };\n\n const iconName = type === 'success' ? 'check_circle' : type === 'error' ? 'error' : 'info';\n\n return (\n <div\n className={`fixed top-4 right-4 z-50 ${typeStyles[type]} border-l-4 rounded-lg shadow-lg px-6 py-4 cursor-pointer transition-opacity hover:opacity-90`}\n onClick={onClose}\n >\n <div className=\"flex items-center gap-3 text-white\">\n <span className=\"material-icons text-2xl\">{iconName}</span>\n <span className=\"font-medium\">{message}</span>\n </div>\n </div>\n );\n}\n","/**\n * LyricRejection - AI correction rejection display component\n *\n * Features:\n * - Shows old vs new text comparison\n * - Displays rejection reason and retention rate\n * - Copy, Accept, Delete actions\n */\n\nexport function LyricRejection({ rejection, rejectionIndex, onAccept, onDelete }) {\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(rejection.new_text);\n // Could show temporary \"Copied!\" feedback\n } catch (error) {\n console.error('Failed to copy text:', error);\n }\n };\n\n return (\n <div className=\"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-4 space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"flex items-center gap-2 text-red-700 dark:text-red-300 font-medium\">\n <span className=\"material-icons\">block</span>\n Rejected Update (Line {rejection.line_num})\n </span>\n <button\n className=\"p-1 hover:bg-red-100 dark:hover:bg-red-900 rounded transition\"\n title=\"Delete this rejection\"\n onClick={() => onDelete(rejectionIndex)}\n >\n <span className=\"material-icons text-gray-600 dark:text-gray-400\">delete</span>\n </button>\n </div>\n <div className=\"space-y-3\">\n <div className=\"grid grid-cols-1 md:grid-cols-2 gap-3\">\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Original:\n </label>\n <div className=\"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded p-3 text-gray-900 dark:text-gray-100\">\n {rejection.old_text}\n </div>\n </div>\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Proposed:\n </label>\n <div className=\"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded p-3 text-gray-900 dark:text-gray-100\">\n {rejection.new_text}\n </div>\n <div className=\"flex gap-2 mt-2\">\n <button\n className=\"flex items-center gap-1 px-3 py-1.5 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100 text-sm rounded-lg transition\"\n title=\"Copy proposed text\"\n onClick={handleCopy}\n >\n <span className=\"material-icons text-sm\">content_copy</span>\n Copy\n </button>\n <button\n className=\"flex items-center gap-1 px-3 py-1.5 bg-green-600 hover:bg-green-700 text-white text-sm rounded-lg transition\"\n title=\"Accept proposed text and replace current lyric\"\n onClick={() => onAccept(rejectionIndex)}\n >\n <span className=\"material-icons text-sm\">check_circle</span>\n Accept\n </button>\n </div>\n </div>\n </div>\n <div className=\"flex flex-wrap gap-3 text-sm text-gray-600 dark:text-gray-400\">\n <span>Reason: {rejection.reason}</span>\n {rejection.retention_rate !== undefined && (\n <span>\n Retention: {(rejection.retention_rate * 100).toFixed(1)}% (min:{' '}\n {(rejection.min_required * 100).toFixed(1)}%)\n </span>\n )}\n </div>\n </div>\n </div>\n );\n}\n","/**\n * LyricSuggestion - AI missing line suggestion display component\n *\n * Features:\n * - Shows suggested missing line with timing\n * - Displays confidence, reason, pitch activity\n * - Add as New Line, Copy, Delete actions\n */\n\nfunction formatTime(seconds) {\n if (!seconds || isNaN(seconds)) return '0:00';\n const mins = Math.floor(seconds / 60);\n const secs = Math.floor(seconds % 60);\n return `${mins}:${secs.toString().padStart(2, '0')}`;\n}\n\nexport function LyricSuggestion({ suggestion, suggestionIndex, onAccept, onDelete }) {\n const handleCopy = async () => {\n try {\n await navigator.clipboard.writeText(suggestion.suggested_text);\n // Could show temporary \"Copied!\" feedback\n } catch (error) {\n console.error('Failed to copy text:', error);\n }\n };\n\n const startTime = formatTime(suggestion.start_time);\n const endTime = formatTime(suggestion.end_time);\n\n return (\n <div className=\"bg-blue-50 dark:bg-blue-900/20 border border-blue-200 dark:border-blue-800 rounded-lg p-4 space-y-3\">\n <div className=\"flex items-center justify-between\">\n <span className=\"flex items-center gap-2 text-blue-700 dark:text-blue-300 font-medium\">\n <span className=\"material-icons\">lightbulb</span>\n Suggested Missing Line ({startTime} - {endTime})\n </span>\n <button\n className=\"p-1 hover:bg-blue-100 dark:hover:bg-blue-900 rounded transition\"\n title=\"Delete this suggestion\"\n onClick={() => onDelete(suggestionIndex)}\n >\n <span className=\"material-icons text-gray-600 dark:text-gray-400\">delete</span>\n </button>\n </div>\n <div className=\"space-y-3\">\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Suggested Text:\n </label>\n <div className=\"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded p-3 text-gray-900 dark:text-gray-100\">\n {suggestion.suggested_text}\n </div>\n </div>\n <div className=\"flex flex-wrap gap-3 text-sm text-gray-600 dark:text-gray-400\">\n <span>Confidence: {suggestion.confidence}</span>\n <span>Reason: {suggestion.reason}</span>\n {suggestion.pitch_activity && <span>Pitch Activity: {suggestion.pitch_activity}</span>}\n </div>\n <div className=\"flex gap-2\">\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded-lg transition\"\n title=\"Add this as a new lyric line\"\n onClick={() => onAccept(suggestionIndex)}\n >\n <span className=\"material-icons text-sm\">add_circle</span>\n Add as New Line\n </button>\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100 rounded-lg transition\"\n title=\"Copy suggested text\"\n onClick={handleCopy}\n >\n <span className=\"material-icons text-sm\">content_copy</span>\n Copy Text\n </button>\n </div>\n </div>\n </div>\n );\n}\n","/**\n * Lyrics utility functions - pure JavaScript utilities for lyric manipulation\n * No Node.js dependencies - safe for browser/renderer contexts\n */\n\n/**\n * Check if a line can be split\n * @param {Object} line - Line to check (with text)\n * @returns {boolean} True if line can be split\n */\nexport function canSplitLine(line) {\n if (!line || !line.text) {\n return false;\n }\n\n const text = line.text.trim();\n\n // Find first sentence-ending punctuation (. ! ?)\n const punctuationMatch = text.match(/[.!?]/);\n\n if (!punctuationMatch) {\n return false;\n }\n\n const splitIndex = punctuationMatch.index + 1;\n const firstLineText = text.substring(0, splitIndex).trim();\n const secondLineText = text.substring(splitIndex).trim();\n\n // Must have text on both sides (prevents splitting if punctuation is at the end)\n // Example: \"Hello world.\" → false (only one sentence)\n // Example: \"Hello world. Hi\" → true (two sentences)\n return firstLineText.length > 0 && secondLineText.length > 0;\n}\n\n/**\n * Split a lyric line at the first sentence-ending punctuation\n * @param {Object} line - Line to split (with start, end, text, word_timing)\n * @param {number} lineIndex - Index of the line (for logging)\n * @returns {Array<Object>|null} Two new lines, or null if cannot split\n */\nexport function splitLine(line, lineIndex = 0) {\n if (!line || !line.text) {\n console.warn('Cannot split line: missing text');\n return null;\n }\n\n const text = line.text.trim();\n\n // Find first sentence-ending punctuation (. ! ?)\n const punctuationMatch = text.match(/[.!?]/);\n\n if (!punctuationMatch) {\n console.log(`Line ${lineIndex}: No punctuation found, cannot split`);\n return null;\n }\n\n const splitIndex = punctuationMatch.index + 1; // Include the punctuation\n const firstLineText = text.substring(0, splitIndex).trim();\n const secondLineText = text.substring(splitIndex).trim();\n\n if (!firstLineText || !secondLineText) {\n console.log(`Line ${lineIndex}: Split would create empty line, aborting`);\n return null;\n }\n\n const duration = line.end - line.start;\n\n // Try to use word-level timing if available and accurate\n if (line.word_timing && Array.isArray(line.word_timing)) {\n console.log(`Line ${lineIndex}: Attempting word-timing based split`);\n\n // Validate word timing matches the text\n const textWords = text.split(/\\s+/);\n const timingWordCount = line.word_timing.length;\n\n if (timingWordCount !== textWords.length) {\n console.warn(\n `Line ${lineIndex}: Word count mismatch (timing: ${timingWordCount}, text: ${textWords.length}), falling back to percentage split`\n );\n } else {\n // Word counts match, try to find the split point\n const firstLineWords = firstLineText.split(/\\s+/);\n const splitWordIndex = firstLineWords.length;\n\n if (splitWordIndex > 0 && splitWordIndex < line.word_timing.length) {\n // Get timing of the word just before the split\n const lastWordOfFirstLine = line.word_timing[splitWordIndex - 1];\n const splitTime = line.start + lastWordOfFirstLine[1]; // end time of last word (relative to line start)\n\n // First line: same start, new end\n const firstLine = {\n ...line,\n text: firstLineText,\n end: splitTime,\n word_timing: line.word_timing.slice(0, splitWordIndex),\n };\n\n // Second line: new start, same end\n // Adjust word_timing to be relative to new line start\n const newLineStart = splitTime;\n const secondLineWordTiming = line.word_timing.slice(splitWordIndex).map((timing) => {\n const absoluteStart = line.start + timing[0];\n const absoluteEnd = line.start + timing[1];\n return [absoluteStart - newLineStart, absoluteEnd - newLineStart];\n });\n\n const secondLine = {\n ...line,\n text: secondLineText,\n start: newLineStart,\n end: line.end,\n word_timing: secondLineWordTiming,\n };\n\n console.log(`✅ Line ${lineIndex}: Split using word-timing at ${splitTime.toFixed(2)}s`);\n console.log(\n ` Line 1: ${firstLine.start.toFixed(2)}-${firstLine.end.toFixed(2)}s \"${firstLineText}\"`\n );\n console.log(\n ` Line 2: ${secondLine.start.toFixed(2)}-${secondLine.end.toFixed(2)}s \"${secondLineText}\"`\n );\n\n return [firstLine, secondLine];\n }\n }\n }\n\n // Fallback: split time based on text length percentage\n console.log(`Line ${lineIndex}: Using percentage-based time split`);\n\n const firstLineRatio = firstLineText.length / text.length;\n const splitTime = line.start + duration * firstLineRatio;\n\n const firstLine = {\n ...line,\n text: firstLineText,\n end: splitTime,\n // Remove word_timing since it's no longer accurate\n word_timing: undefined,\n };\n\n const secondLine = {\n ...line,\n text: secondLineText,\n start: splitTime,\n end: line.end,\n // Remove word_timing since it's no longer accurate\n word_timing: undefined,\n };\n\n console.log(\n `✅ Line ${lineIndex}: Split using percentage (${(firstLineRatio * 100).toFixed(1)}% / ${((1 - firstLineRatio) * 100).toFixed(1)}%)`\n );\n console.log(\n ` Line 1: ${firstLine.start.toFixed(2)}-${firstLine.end.toFixed(2)}s \"${firstLineText}\"`\n );\n console.log(\n ` Line 2: ${secondLine.start.toFixed(2)}-${secondLine.end.toFixed(2)}s \"${secondLineText}\"`\n );\n\n return [firstLine, secondLine];\n}\n","/**\n * SongEditor - Comprehensive song metadata and lyrics editor\n *\n * Features:\n * - Search and load any song from library\n * - Edit ID3 metadata for CDG+MP3 files\n * - Edit ID3 metadata + lyrics for KAI files\n * - Edit metadata + lyrics for M4A Stems files\n * - Auto-detects file format and shows appropriate editing options\n * - Supports both Electron (IPC) and Web (REST) environments\n */\n\nimport { useState, useEffect, useRef, useCallback } from 'react';\nimport { getFormatIcon } from '../formatUtils.js';\nimport { LyricsEditorCanvas } from './LyricsEditorCanvas.jsx';\nimport { LineDetailCanvas } from './LineDetailCanvas.jsx';\nimport { LyricLine } from './LyricLine.jsx';\nimport { Toast } from './Toast.jsx';\nimport { LyricRejection } from './LyricRejection.jsx';\nimport { LyricSuggestion } from './LyricSuggestion.jsx';\nimport { splitLine, canSplitLine } from '../utils/lyricsUtils.js';\n\nexport function SongEditor({ bridge }) {\n const [searchTerm, setSearchTerm] = useState('');\n const [searchResults, setSearchResults] = useState([]);\n const [isSearching, setIsSearching] = useState(false);\n const [loadedSong, setLoadedSong] = useState(null);\n const [songData, setSongData] = useState(null);\n const [isSaving, setIsSaving] = useState(false);\n const [activeTab, setActiveTab] = useState('metadata'); // 'metadata' or 'lyrics'\n\n // Metadata form state\n const [metadata, setMetadata] = useState({\n title: '',\n artist: '',\n album: '',\n year: '',\n genre: '',\n key: '',\n });\n\n // Lyrics state (for KAI files) - now array format for full editing\n const [lyricsData, setLyricsData] = useState([]);\n const [originalLyricsData, setOriginalLyricsData] = useState([]);\n const [selectedLineIndex, setSelectedLineIndex] = useState(null);\n const [songDuration, setSongDuration] = useState(0);\n const [rejections, setRejections] = useState([]);\n const [suggestions, setSuggestions] = useState([]);\n const [hasChanges, setHasChanges] = useState(false);\n\n // Audio playback state (for KAI files)\n const [audioElements, setAudioElements] = useState([]);\n const [audioContext, setAudioContext] = useState(null);\n const [isPlaying, setIsPlaying] = useState(false);\n const [currentPosition, setCurrentPosition] = useState(0);\n const [playingLineEndTime, setPlayingLineEndTime] = useState(null);\n\n // Waveform visualization\n const [vocalsWaveform, setVocalsWaveform] = useState(null);\n\n // Animation frame ref for smooth playhead\n const animationFrameRef = useRef(null);\n\n // Toast notification state\n const [toast, setToast] = useState(null);\n\n // Check if a line overlaps with the previous line (for same singer)\n const checkOverlap = useCallback(\n (index) => {\n if (index === 0 || index >= lyricsData.length) {\n return false; // First line can't overlap, or invalid index\n }\n\n const currentLine = lyricsData[index];\n const previousLine = lyricsData[index - 1];\n\n // Get singer type (backup vs lead)\n const currentIsBackup = currentLine.backup === true;\n const previousIsBackup = previousLine.backup === true;\n\n // Only check overlap if same singer type\n if (currentIsBackup !== previousIsBackup) {\n return false;\n }\n\n // Get timing values\n const currentStart = currentLine.start || currentLine.startTimeSec || 0;\n const previousEnd = previousLine.end || previousLine.endTimeSec || 0;\n\n // Overlap occurs when current starts before previous ends\n return currentStart < previousEnd;\n },\n [lyricsData]\n );\n\n // Lyrics editing handlers - wrap in useCallback for stable references\n const handleLineUpdate = useCallback((index, updatedLine) => {\n setLyricsData((prev) => prev.map((line, i) => (i === index ? updatedLine : line)));\n setHasChanges(true);\n }, []);\n\n const handlePlayLineSection = useCallback(\n async (startTime, endTime) => {\n if (!audioElements.length) {\n console.warn('No audio elements available for playback');\n return;\n }\n\n console.log(`🎵 Playing section: ${startTime}s - ${endTime}s`);\n\n // Clear end time first to prevent premature stop\n setPlayingLineEndTime(null);\n\n // Set audio position\n audioElements.forEach(({ audio }) => {\n audio.currentTime = startTime;\n });\n\n // Immediately update currentPosition state so canvas shows correct position\n setCurrentPosition(startTime);\n\n // Start playback with error handling\n try {\n const playPromises = audioElements.map(({ audio }) => audio.play());\n await Promise.all(playPromises);\n setIsPlaying(true);\n console.log('✅ Audio playback started');\n } catch (error) {\n console.error('Failed to play audio:', error);\n setToast({\n message: `Failed to play audio: ${error.message}`,\n type: 'error',\n });\n return;\n }\n\n // Set end time after position has been set\n // Use a small timeout to ensure currentTime has updated\n setTimeout(() => {\n setPlayingLineEndTime(endTime);\n }, 50);\n },\n [audioElements]\n );\n\n // Cleanup audio on unmount or song change\n const cleanupAudio = useCallback(() => {\n // Stop and cleanup existing audio\n audioElements.forEach(({ audio, source }) => {\n audio.pause();\n audio.currentTime = 0;\n try {\n source.disconnect();\n } catch {\n // Ignore disconnect errors\n }\n });\n\n if (audioContext) {\n audioContext.close();\n }\n\n setAudioElements([]);\n setAudioContext(null);\n setIsPlaying(false);\n }, [audioElements, audioContext]);\n\n // Navigate to previous enabled line\n const selectPreviousEnabledLine = useCallback(() => {\n if (selectedLineIndex === null || selectedLineIndex === 0) {\n return; // Already at first line\n }\n\n // Find previous enabled line\n for (let i = selectedLineIndex - 1; i >= 0; i--) {\n if (!lyricsData[i].disabled) {\n setSelectedLineIndex(i);\n return;\n }\n }\n }, [selectedLineIndex, lyricsData]);\n\n // Navigate to next enabled line\n const selectNextEnabledLine = useCallback(() => {\n if (selectedLineIndex === null) {\n // No selection, select first enabled line\n for (let i = 0; i < lyricsData.length; i++) {\n if (!lyricsData[i].disabled) {\n setSelectedLineIndex(i);\n return;\n }\n }\n return;\n }\n\n if (selectedLineIndex >= lyricsData.length - 1) {\n return; // Already at last line\n }\n\n // Find next enabled line\n for (let i = selectedLineIndex + 1; i < lyricsData.length; i++) {\n if (!lyricsData[i].disabled) {\n setSelectedLineIndex(i);\n return;\n }\n }\n }, [selectedLineIndex, lyricsData]);\n\n // Play currently selected line\n const playCurrentLine = useCallback(() => {\n if (selectedLineIndex === null || !lyricsData[selectedLineIndex]) {\n return;\n }\n\n const line = lyricsData[selectedLineIndex];\n const startTime = line.start || line.startTimeSec || 0;\n const endTime = line.end || line.endTimeSec || startTime + 3;\n handlePlayLineSection(startTime, endTime);\n }, [selectedLineIndex, lyricsData, handlePlayLineSection]);\n\n // Adjust start time of selected line\n const adjustStartTime = useCallback(\n (delta) => {\n if (selectedLineIndex === null || !lyricsData[selectedLineIndex]) {\n return;\n }\n\n const line = lyricsData[selectedLineIndex];\n const currentStart = line.start || line.startTimeSec || 0;\n const newStart = Math.max(0, currentStart + delta); // Don't go below 0\n\n const updatedLine = {\n ...line,\n start: newStart,\n startTimeSec: newStart,\n };\n\n handleLineUpdate(selectedLineIndex, updatedLine);\n },\n [selectedLineIndex, lyricsData, handleLineUpdate]\n );\n\n // Adjust end time of selected line\n const adjustEndTime = useCallback(\n (delta) => {\n if (selectedLineIndex === null || !lyricsData[selectedLineIndex]) {\n return;\n }\n\n const line = lyricsData[selectedLineIndex];\n const currentEnd = line.end || line.endTimeSec || 0;\n const newEnd = Math.max(0, currentEnd + delta); // Don't go below 0\n\n const updatedLine = {\n ...line,\n end: newEnd,\n endTimeSec: newEnd,\n };\n\n handleLineUpdate(selectedLineIndex, updatedLine);\n },\n [selectedLineIndex, lyricsData, handleLineUpdate]\n );\n\n // Keyboard shortcuts\n useEffect(() => {\n const handleKeyDown = (e) => {\n // Ignore if typing in an input field\n const target = e.target;\n if (target.tagName === 'INPUT' || target.tagName === 'TEXTAREA') {\n return;\n }\n\n // Only apply shortcuts when on lyrics tab with a song loaded\n if (activeTab !== 'lyrics' || !lyricsData.length) {\n return;\n }\n\n // Increment size: 0.1s normal, 0.5s with shift\n const increment = e.shiftKey ? 0.5 : 0.1;\n\n switch (e.key.toLowerCase()) {\n case 'q': // Previous enabled line\n e.preventDefault();\n selectPreviousEnabledLine();\n break;\n case 'o': // Next enabled line\n e.preventDefault();\n selectNextEnabledLine();\n break;\n case 'p': // Play current line\n e.preventDefault();\n playCurrentLine();\n break;\n case 'd': // Decrease start time\n e.preventDefault();\n adjustStartTime(-increment);\n break;\n case 'f': // Increase start time\n e.preventDefault();\n adjustStartTime(increment);\n break;\n case 'j': // Decrease end time\n e.preventDefault();\n adjustEndTime(-increment);\n break;\n case 'k': // Increase end time\n e.preventDefault();\n adjustEndTime(increment);\n break;\n }\n };\n\n window.addEventListener('keydown', handleKeyDown);\n return () => window.removeEventListener('keydown', handleKeyDown);\n }, [\n activeTab,\n lyricsData,\n selectedLineIndex,\n audioElements,\n selectPreviousEnabledLine,\n selectNextEnabledLine,\n playCurrentLine,\n adjustStartTime,\n adjustEndTime,\n ]);\n\n // Search for songs\n const handleSearch = async (term) => {\n setSearchTerm(term);\n\n if (!term.trim()) {\n setSearchResults([]);\n return;\n }\n\n try {\n setIsSearching(true);\n const result = await bridge.searchSongs(term);\n setSearchResults(result.songs || []);\n } catch (error) {\n console.error('Search failed:', error);\n } finally {\n setIsSearching(false);\n }\n };\n\n // Load a song for editing\n const handleLoadSong = async (song) => {\n try {\n console.log('🔍 Loading song for editing:', song.path);\n const result = await bridge.loadSongForEditing(song.path);\n\n if (result.success) {\n setLoadedSong(song);\n setSongData(result.data);\n\n // Populate metadata form\n setMetadata({\n title: result.data.metadata?.title || song.title || '',\n artist: result.data.metadata?.artist || song.artist || '',\n album: result.data.metadata?.album || song.album || '',\n year: result.data.metadata?.year || song.year || '',\n genre: result.data.metadata?.genre || song.genre || '',\n key: result.data.metadata?.key || song.key || '',\n });\n\n // Populate lyrics if KAI or M4A file - server sends actual array with timing\n const hasLyrics = result.data.format === 'kai' || result.data.format === 'm4a-stems';\n if (hasLyrics) {\n const lyrics = result.data.lyrics || [];\n // Sort lyrics by start time to ensure proper order\n const sortedLyrics = [...lyrics].sort((a, b) => {\n const aStart = a.start || a.startTimeSec || 0;\n const bStart = b.start || b.startTimeSec || 0;\n return aStart - bStart;\n });\n setLyricsData(JSON.parse(JSON.stringify(sortedLyrics)));\n setOriginalLyricsData(JSON.parse(JSON.stringify(sortedLyrics)));\n setSongDuration(\n result.data.metadata?.duration || result.data.songJson?.duration_sec || 0\n );\n\n // Load AI corrections if available\n // Check both 'rejected' (user-rejected) and 'applied' (LLM-applied) for compatibility\n const corrections = result.data.songJson?.meta?.corrections || {};\n const kaiRejections = corrections.rejected || corrections.applied || [];\n setRejections(\n kaiRejections.map((rejection) => ({\n line_num: rejection.line,\n start_time: rejection.start,\n end_time: rejection.end,\n old_text: rejection.old,\n new_text: rejection.new,\n reason: rejection.reason,\n retention_rate: rejection.word_retention,\n min_required: 0.5,\n }))\n );\n\n const kaiSuggestions = corrections.missing_lines_suggested || [];\n setSuggestions(\n kaiSuggestions.map((suggestion) => ({\n suggested_text: suggestion.suggested_text,\n start_time: suggestion.start,\n end_time: suggestion.end,\n confidence: suggestion.confidence,\n reason: suggestion.reason,\n pitch_activity: suggestion.pitch_activity,\n }))\n );\n\n setHasChanges(false);\n } else {\n setLyricsData([]);\n setOriginalLyricsData([]);\n setSongDuration(0);\n setRejections([]);\n setSuggestions([]);\n setHasChanges(false);\n }\n\n // Clear search\n setSearchResults([]);\n setSearchTerm('');\n\n // Default to lyrics tab for KAI/M4A files, metadata for others\n setActiveTab(hasLyrics ? 'lyrics' : 'metadata');\n\n // Load audio if KAI or M4A file\n if (hasLyrics && result.data.audioFiles) {\n loadAudioFiles(result.data.audioFiles);\n }\n }\n } catch (error) {\n console.error('Failed to load song:', error);\n }\n };\n\n // Load audio files for KAI and M4A songs\n const loadAudioFiles = (audioFiles) => {\n try {\n // Clean up existing audio\n cleanupAudio();\n\n // Create new AudioContext (using default device)\n const ctx = new (window.AudioContext || window.webkitAudioContext)();\n setAudioContext(ctx);\n\n // Create audio elements for each source\n const elements = audioFiles.map((file) => {\n const audio = new Audio(file.downloadUrl);\n audio.crossOrigin = 'anonymous'; // For CORS if needed\n audio.preload = 'auto';\n audio.volume = 1.0;\n\n // Create media element source for the audio context\n const source = ctx.createMediaElementSource(audio);\n const gainNode = ctx.createGain();\n\n source.connect(gainNode);\n gainNode.connect(ctx.destination);\n\n // Only vocals unmuted by default\n const isVocals = file.name.toLowerCase().includes('vocal');\n const muted = !isVocals;\n gainNode.gain.value = muted ? 0 : 1;\n\n return {\n name: file.name,\n audio: audio,\n source: source,\n gainNode: gainNode,\n muted: muted,\n audioData: file.audioData, // Keep reference to raw audio data (Electron only)\n };\n });\n\n setAudioElements(elements);\n console.log(`🎵 Loaded ${elements.length} audio sources for playback`);\n\n // Find vocals track and analyze waveform\n const vocalsFile = audioFiles.find((file) => file.name.toLowerCase().includes('vocal'));\n const vocalsElement = elements.find((el) => el.name.toLowerCase().includes('vocal'));\n\n if (vocalsElement) {\n setupAudioPlaybackMonitoring(vocalsElement.audio);\n // Pass both audio element and raw data (if available)\n analyzeVocalsWaveform(vocalsElement.audio, vocalsFile?.audioData);\n } else if (elements[0]) {\n // Fallback to first track if no vocals\n setupAudioPlaybackMonitoring(elements[0].audio);\n analyzeVocalsWaveform(elements[0].audio, audioFiles[0]?.audioData);\n }\n } catch (error) {\n console.error('Failed to load audio files:', error);\n }\n };\n\n // Setup audio playback monitoring for playhead\n const setupAudioPlaybackMonitoring = (audio) => {\n const handlePause = () => {\n setPlayingLineEndTime(null);\n setIsPlaying(false);\n };\n\n audio.addEventListener('pause', handlePause);\n };\n\n // Smooth playhead animation using requestAnimationFrame\n useEffect(() => {\n if (isPlaying && audioElements.length > 0) {\n const updatePosition = () => {\n const audio = audioElements[0]?.audio;\n if (audio && !audio.paused) {\n setCurrentPosition(audio.currentTime);\n animationFrameRef.current = requestAnimationFrame(updatePosition);\n }\n };\n\n animationFrameRef.current = requestAnimationFrame(updatePosition);\n\n return () => {\n if (animationFrameRef.current) {\n cancelAnimationFrame(animationFrameRef.current);\n }\n };\n }\n }, [isPlaying, audioElements]);\n\n // Check if playback should stop at line end time\n useEffect(() => {\n if (playingLineEndTime !== null && currentPosition >= playingLineEndTime) {\n // Pause all audio elements\n audioElements.forEach(({ audio }) => audio.pause());\n setPlayingLineEndTime(null);\n setIsPlaying(false);\n }\n }, [currentPosition, playingLineEndTime, audioElements]);\n\n // Analyze vocals waveform\n const analyzeVocalsWaveform = async (audioElement, rawAudioData) => {\n try {\n let arrayBuffer;\n\n // Try to use raw audio data first (Electron with Buffer data)\n if (rawAudioData) {\n if (rawAudioData instanceof ArrayBuffer) {\n arrayBuffer = rawAudioData;\n } else if (rawAudioData.buffer instanceof ArrayBuffer) {\n // It's a typed array (like Uint8Array or Buffer)\n arrayBuffer = rawAudioData.buffer.slice(\n rawAudioData.byteOffset,\n rawAudioData.byteOffset + rawAudioData.byteLength\n );\n }\n }\n\n // Fall back to fetching from audio element src (Web with blob URLs)\n if (!arrayBuffer && audioElement?.src) {\n const response = await fetch(audioElement.src);\n arrayBuffer = await response.arrayBuffer();\n }\n\n if (!arrayBuffer) {\n throw new Error('No audio data available for waveform analysis');\n }\n\n // Create temporary audio context for analysis\n const tempContext = new (window.AudioContext || window.webkitAudioContext)();\n const audioBuffer = await tempContext.decodeAudioData(arrayBuffer);\n\n // Get channel data\n const channelData = audioBuffer.getChannelData(0);\n const targetSamples = 3800;\n const downsampleFactor = Math.floor(channelData.length / targetSamples);\n\n // Create waveform data\n const waveform = new Int8Array(targetSamples);\n\n for (let i = 0; i < targetSamples; i++) {\n const start = i * downsampleFactor;\n const end = Math.min(start + downsampleFactor, channelData.length);\n\n let max = 0;\n for (let j = start; j < end; j++) {\n max = Math.max(max, Math.abs(channelData[j]));\n }\n\n waveform[i] = Math.floor(max * 127);\n }\n\n setVocalsWaveform(waveform);\n tempContext.close();\n\n console.log('✅ Waveform analysis complete');\n } catch (error) {\n console.error('Failed to analyze waveform:', error);\n }\n };\n\n // Play/pause audio\n const togglePlayback = () => {\n if (!audioElements.length) return;\n\n if (isPlaying) {\n audioElements.forEach(({ audio }) => audio.pause());\n setIsPlaying(false);\n } else {\n audioElements.forEach(({ audio }) => audio.play());\n setIsPlaying(true);\n }\n };\n\n // Toggle mute for individual source\n const toggleMute = (index) => {\n setAudioElements((prev) =>\n prev.map((el, i) => {\n if (i === index) {\n const newMuted = !el.muted;\n el.gainNode.gain.value = newMuted ? 0 : 1;\n return { ...el, muted: newMuted };\n }\n return el;\n })\n );\n };\n\n // Cleanup on component unmount only (not when cleanupAudio changes)\n useEffect(() => {\n return () => {\n // Direct cleanup without using the callback (to avoid dependency issues)\n audioElements.forEach(({ audio, source }) => {\n audio.pause();\n audio.currentTime = 0;\n try {\n source.disconnect();\n } catch {\n // Ignore disconnect errors\n }\n });\n\n if (audioContext) {\n audioContext.close();\n }\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []); // Only run on unmount\n\n // Show toast notification\n const showToast = (message, type = 'success') => {\n setToast({ message, type });\n };\n\n const handleLineDelete = (index) => {\n setLyricsData((prev) => prev.filter((_, i) => i !== index));\n setSelectedLineIndex(null);\n setHasChanges(true);\n };\n\n const handleAddLineAfter = (index) => {\n const currentLine = lyricsData[index];\n const nextLine = lyricsData[index + 1];\n\n const currentEndTime = currentLine.end || currentLine.endTimeSec || 0;\n const nextStartTime = nextLine\n ? nextLine.start || nextLine.startTimeSec || currentEndTime + 3\n : currentEndTime + 3;\n\n const gap = nextStartTime - currentEndTime;\n const usableGap = gap * 0.8;\n const margin = gap * 0.1;\n\n const newLine = {\n start: currentEndTime + margin,\n startTimeSec: currentEndTime + margin,\n end: currentEndTime + margin + usableGap,\n endTimeSec: currentEndTime + margin + usableGap,\n text: '',\n };\n\n setLyricsData((prev) => [...prev.slice(0, index + 1), newLine, ...prev.slice(index + 1)]);\n setHasChanges(true);\n };\n\n const handleLineSplit = (index) => {\n const line = lyricsData[index];\n\n // Try to split the line\n const splitResult = splitLine(line, index);\n\n if (!splitResult) {\n // Show toast if split failed\n showToast('Cannot split line: no punctuation found or would create empty line', 'error');\n return;\n }\n\n const [firstLine, secondLine] = splitResult;\n\n // Replace the line at index with the two new lines\n setLyricsData((prev) => [\n ...prev.slice(0, index),\n firstLine,\n secondLine,\n ...prev.slice(index + 1),\n ]);\n\n // Select the second line\n setSelectedLineIndex(index + 1);\n setHasChanges(true);\n showToast('Line split successfully', 'success');\n };\n\n const handleAddLineAtStart = () => {\n const firstLine = lyricsData[0];\n if (!firstLine) {\n // No lines exist, create a default one\n const newLine = {\n start: 0,\n startTimeSec: 0,\n end: 3,\n endTimeSec: 3,\n text: '',\n };\n setLyricsData([newLine]);\n setHasChanges(true);\n return;\n }\n\n const firstLineStart = firstLine.start || firstLine.startTimeSec || 0;\n\n // Create a line from 0 to 80% of available space\n const gap = firstLineStart;\n const usableGap = gap * 0.8;\n\n const newLine = {\n start: 0,\n startTimeSec: 0,\n end: usableGap,\n endTimeSec: usableGap,\n text: '',\n };\n\n setLyricsData((prev) => [newLine, ...prev]);\n setHasChanges(true);\n };\n\n const canAddLineAtStart = () => {\n const firstLine = lyricsData[0];\n if (!firstLine) return true;\n const firstLineStart = firstLine.start || firstLine.startTimeSec || 0;\n return firstLineStart >= 0.6;\n };\n\n const canAddLineAfter = (index) => {\n const currentLine = lyricsData[index];\n const nextLine = lyricsData[index + 1];\n\n if (!nextLine) return true;\n\n const currentEndTime = currentLine.end || currentLine.endTimeSec || 0;\n const nextStartTime = nextLine.start || nextLine.startTimeSec || 0;\n const gap = nextStartTime - currentEndTime;\n\n return gap >= 0.6;\n };\n\n const canSplit = (index) => {\n if (index < 0 || index >= lyricsData.length) return false;\n return canSplitLine(lyricsData[index]);\n };\n\n // Handle metadata field changes\n const handleMetadataChange = (field, value) => {\n setMetadata((prev) => ({\n ...prev,\n [field]: value,\n }));\n };\n\n // Save changes\n const handleSave = async () => {\n if (!loadedSong || !songData) return;\n\n try {\n setIsSaving(true);\n\n // Sort lyrics by start time before saving\n const sortedLyrics = [...lyricsData].sort((a, b) => {\n const aStart = a.start || a.startTimeSec || 0;\n const bStart = b.start || b.startTimeSec || 0;\n return aStart - bStart;\n });\n\n const updates = {\n path: loadedSong.path,\n format: songData.format,\n metadata: {\n ...metadata,\n // Include rejections and suggestions so they can be saved to meta object\n rejections,\n suggestions,\n },\n // Include lyrics for both KAI and M4A formats\n ...((songData.format === 'kai' || songData.format === 'm4a-stems') && {\n lyrics: sortedLyrics,\n }),\n };\n\n const result = await bridge.saveSongEdits(updates);\n\n if (result.success) {\n console.log('✅ Song saved successfully');\n showToast('Song saved successfully', 'success');\n setHasChanges(false);\n // Update original data after successful save\n setOriginalLyricsData(JSON.parse(JSON.stringify(lyricsData)));\n } else {\n console.error('❌ Save failed:', result.error);\n showToast(`Save failed: ${result.error}`, 'error');\n }\n } catch (error) {\n console.error('Failed to save song:', error);\n showToast(`Save failed: ${error.message}`, 'error');\n } finally {\n setIsSaving(false);\n }\n };\n\n // Close editor\n const handleClose = () => {\n setLoadedSong(null);\n setSongData(null);\n setMetadata({\n title: '',\n artist: '',\n album: '',\n year: '',\n genre: '',\n key: '',\n });\n setLyricsData([]);\n };\n\n // Add to queue\n const handleAddToQueue = async () => {\n if (!loadedSong) return;\n\n try {\n await bridge.addToQueue(loadedSong);\n console.log('✅ Added to queue:', loadedSong.path);\n showToast(`Added \"${metadata.title || loadedSong.title}\" to queue`, 'success');\n } catch (error) {\n console.error('Failed to add to queue:', error);\n showToast('Failed to add to queue', 'error');\n }\n };\n\n // Export lyrics as text file\n const handleExportLyrics = () => {\n if (!lyricsData || lyricsData.length === 0) return;\n\n const lyricsText = lyricsData.map((line) => line.text || '').join('\\n');\n const blob = new Blob([lyricsText], { type: 'text/plain' });\n const url = URL.createObjectURL(blob);\n\n const a = document.createElement('a');\n a.href = url;\n a.download = `${metadata.title || loadedSong?.title || 'lyrics'}.txt`;\n document.body.appendChild(a);\n a.click();\n document.body.removeChild(a);\n\n URL.revokeObjectURL(url);\n showToast('Lyrics exported successfully', 'success');\n };\n\n // Reset to original lyrics\n const handleResetLyrics = () => {\n if (!confirm('Reset all changes to original lyrics?')) return;\n\n setLyricsData(JSON.parse(JSON.stringify(originalLyricsData)));\n setHasChanges(false);\n showToast('Reset to original lyrics', 'success');\n };\n\n // Handle rejection acceptance\n const handleAcceptRejection = (rejectionIndex) => {\n const rejection = rejections[rejectionIndex];\n if (!rejection) return;\n\n // Find the lyric line to update by matching timing\n let targetLineIndex = -1;\n\n for (let i = 0; i < lyricsData.length; i++) {\n const line = lyricsData[i];\n const lineStart = line.start || line.startTimeSec || 0;\n const lineEnd = line.end || line.endTimeSec || 0;\n\n // Match by timing\n if (rejection.start_time !== undefined && rejection.end_time !== undefined) {\n if (\n Math.abs(lineStart - rejection.start_time) < 0.1 &&\n Math.abs(lineEnd - rejection.end_time) < 0.1\n ) {\n targetLineIndex = i;\n break;\n }\n } else if (rejection.old_text && line.text === rejection.old_text) {\n // Fallback: match by old text content\n targetLineIndex = i;\n break;\n }\n }\n\n // If no timing match found, fallback to line number approach\n if (targetLineIndex === -1) {\n const lineIndex = rejection.line_num - 1;\n if (lineIndex >= 0 && lineIndex < lyricsData.length) {\n targetLineIndex = lineIndex;\n }\n }\n\n if (targetLineIndex >= 0 && targetLineIndex < lyricsData.length) {\n // Update the lyric text with the proposed text\n const updatedLine = { ...lyricsData[targetLineIndex], text: rejection.new_text };\n setLyricsData((prev) => prev.map((line, i) => (i === targetLineIndex ? updatedLine : line)));\n\n // Remove the rejection from the list\n setRejections((prev) => prev.filter((_, i) => i !== rejectionIndex));\n setHasChanges(true);\n showToast('Accepted proposed text', 'success');\n } else {\n showToast('Could not find matching lyric line', 'error');\n }\n };\n\n // Handle rejection deletion\n const handleDeleteRejection = (rejectionIndex) => {\n setRejections((prev) => prev.filter((_, i) => i !== rejectionIndex));\n setHasChanges(true);\n };\n\n // Handle suggestion acceptance\n const handleAcceptSuggestion = (suggestionIndex) => {\n const suggestion = suggestions[suggestionIndex];\n if (!suggestion) return;\n\n // Find the best insertion point based on timing\n let insertionIndex = lyricsData.length; // Default to end\n\n for (let i = 0; i < lyricsData.length; i++) {\n const line = lyricsData[i];\n const lineStart = line.start || line.startTimeSec || 0;\n\n if (suggestion.start_time < lineStart) {\n insertionIndex = i;\n break;\n }\n }\n\n // Create new lyric line from suggestion\n const newLine = {\n start: suggestion.start_time,\n startTimeSec: suggestion.start_time,\n end: suggestion.end_time,\n endTimeSec: suggestion.end_time,\n text: suggestion.suggested_text,\n };\n\n // Insert the new line at the correct position\n setLyricsData((prev) => [\n ...prev.slice(0, insertionIndex),\n newLine,\n ...prev.slice(insertionIndex),\n ]);\n\n // Remove the suggestion from the list\n setSuggestions((prev) => prev.filter((_, i) => i !== suggestionIndex));\n setHasChanges(true);\n showToast('Added suggested line', 'success');\n };\n\n // Handle suggestion deletion\n const handleDeleteSuggestion = (suggestionIndex) => {\n setSuggestions((prev) => prev.filter((_, i) => i !== suggestionIndex));\n setHasChanges(true);\n };\n\n return (\n <div className=\"flex flex-col h-full overflow-hidden bg-gray-50 dark:bg-gray-900 p-4\">\n {!loadedSong ? (\n // Search view\n <div className=\"flex flex-col gap-6 max-w-[800px] mx-auto w-full\">\n <div className=\"relative flex items-center\">\n <input\n type=\"text\"\n className=\"w-full px-5 py-4 bg-white dark:bg-gray-800 border-2 border-gray-300 dark:border-gray-600 rounded-lg text-gray-900 dark:text-white text-base transition-colors focus:outline-none focus:border-blue-600\"\n placeholder=\"Search by title, artist, or album...\"\n value={searchTerm}\n onChange={(e) => handleSearch(e.target.value)}\n />\n {isSearching && <span className=\"absolute right-5 text-xl animate-spin\">🔍</span>}\n\n {searchResults.length > 0 && (\n <div className=\"absolute top-full left-0 right-0 max-h-[400px] overflow-y-auto bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md shadow-lg z-[100] mt-1\">\n {searchResults.map((song, index) => (\n <div\n key={index}\n className=\"flex items-center gap-3 px-4 py-3 cursor-pointer transition-colors border-b border-gray-200 dark:border-gray-700 last:border-b-0 hover:bg-gray-100 dark:hover:bg-gray-700\"\n onClick={() => handleLoadSong(song)}\n >\n <span className=\"text-xl flex-shrink-0\">{getFormatIcon(song.format)}</span>\n <div className=\"flex-1 min-w-0\">\n <div className=\"text-[15px] font-semibold text-gray-900 dark:text-white mb-0.5 whitespace-nowrap overflow-hidden text-ellipsis\">\n {song.title}\n </div>\n <div className=\"text-xs text-gray-600 dark:text-gray-400 whitespace-nowrap overflow-hidden text-ellipsis\">\n {song.artist} {song.album && `• ${song.album}`}\n </div>\n </div>\n </div>\n ))}\n </div>\n )}\n </div>\n\n {searchTerm && !isSearching && searchResults.length === 0 && (\n <div className=\"flex flex-col items-center justify-center p-16 text-center\">\n <div className=\"text-6xl mb-4 opacity-50\">🔍</div>\n <div className=\"text-xl font-semibold text-gray-900 dark:text-white mb-2\">\n No songs found\n </div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400\">\n Try a different search term\n </div>\n </div>\n )}\n\n {!searchTerm && (\n <div className=\"flex flex-col items-center justify-center p-16 text-center\">\n <div className=\"text-6xl mb-4 opacity-50\">🎵</div>\n <div className=\"text-xl font-semibold text-gray-900 dark:text-white mb-2\">\n Search for a song to get started\n </div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400\">\n You can edit metadata and lyrics for any song in your library\n </div>\n </div>\n )}\n </div>\n ) : (\n // Edit view\n <div className=\"flex flex-col gap-3 h-full overflow-hidden\">\n <div className=\"flex items-center justify-between gap-4 flex-shrink-0\">\n <div className=\"flex-1 min-w-0\">\n <h2 className=\"text-lg font-semibold m-0 text-gray-900 dark:text-white whitespace-nowrap overflow-hidden text-ellipsis\">\n {loadedSong.title}\n </h2>\n <p className=\"text-xs text-gray-600 dark:text-gray-400 m-0 mt-0.5\">\n {loadedSong.artist} • {songData.format?.toUpperCase()}\n </p>\n </div>\n <div className=\"flex gap-2 flex-shrink-0\">\n <button\n onClick={handleAddToQueue}\n className=\"flex items-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white cursor-pointer text-sm transition-colors hover:bg-gray-200 dark:hover:bg-gray-600\"\n >\n <span className=\"material-icons text-lg\">playlist_add</span>\n Add to Queue\n </button>\n <button\n onClick={handleClose}\n className=\"flex items-center gap-1.5 px-3 py-2 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white cursor-pointer text-sm transition-colors hover:bg-gray-200 dark:hover:bg-gray-600\"\n >\n <span className=\"material-icons text-lg\">close</span>\n Close\n </button>\n <button\n onClick={handleSave}\n className={`flex items-center gap-1.5 px-3 py-2 rounded text-white cursor-pointer text-sm transition-colors ${hasChanges ? 'bg-blue-600 border-blue-600 hover:bg-blue-700' : 'bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 text-gray-900 dark:text-white hover:bg-gray-200 dark:hover:bg-gray-600'} disabled:opacity-50 disabled:cursor-not-allowed`}\n disabled={isSaving}\n >\n <span className=\"material-icons text-lg\">save</span>\n {isSaving ? 'Saving...' : hasChanges ? 'Save*' : 'Save'}\n </button>\n </div>\n </div>\n\n {/* Tab navigation for KAI and M4A files */}\n {(songData.format === 'kai' || songData.format === 'm4a-stems') && (\n <div className=\"flex gap-1 border-b-2 border-gray-200 dark:border-gray-700 pb-0\">\n <button\n className={`px-6 py-3 bg-transparent border-none border-b-[3px] font-semibold text-[15px] cursor-pointer transition-all -mb-0.5 ${activeTab === 'lyrics' ? 'text-blue-600 border-b-blue-600' : 'text-gray-600 dark:text-gray-400 border-b-transparent hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700'}`}\n onClick={() => setActiveTab('lyrics')}\n >\n Lyrics\n </button>\n <button\n className={`px-6 py-3 bg-transparent border-none border-b-[3px] font-semibold text-[15px] cursor-pointer transition-all -mb-0.5 ${activeTab === 'metadata' ? 'text-blue-600 border-b-blue-600' : 'text-gray-600 dark:text-gray-400 border-b-transparent hover:text-gray-900 dark:hover:text-white hover:bg-gray-100 dark:hover:bg-gray-700'}`}\n onClick={() => setActiveTab('metadata')}\n >\n Metadata\n </button>\n </div>\n )}\n\n {/* Metadata form */}\n {(activeTab === 'metadata' ||\n (songData.format !== 'kai' && songData.format !== 'm4a-stems')) && (\n <div className=\"flex flex-col gap-6 overflow-y-auto flex-1 pb-6\">\n <h3 className=\"text-lg font-semibold m-0 text-gray-900 dark:text-white\">Metadata</h3>\n <div className=\"grid grid-cols-[repeat(auto-fit,minmax(250px,1fr))] gap-5\">\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Title\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.title}\n onChange={(e) => handleMetadataChange('title', e.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Artist\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.artist}\n onChange={(e) => handleMetadataChange('artist', e.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Album\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.album}\n onChange={(e) => handleMetadataChange('album', e.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Year\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.year}\n onChange={(e) => handleMetadataChange('year', e.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Genre\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.genre}\n onChange={(e) => handleMetadataChange('genre', e.target.value)}\n />\n </div>\n <div className=\"flex flex-col gap-2\">\n <label className=\"text-xs font-semibold text-gray-600 dark:text-gray-400 uppercase tracking-wider\">\n Key\n </label>\n <input\n type=\"text\"\n className=\"px-4 py-3 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md text-gray-900 dark:text-white text-[15px] transition-colors focus:outline-none focus:border-blue-600\"\n value={metadata.key}\n onChange={(e) => handleMetadataChange('key', e.target.value)}\n />\n </div>\n </div>\n </div>\n )}\n\n {/* Lyrics editor for KAI and M4A files */}\n {(songData.format === 'kai' || songData.format === 'm4a-stems') &&\n activeTab === 'lyrics' && (\n <>\n {/* Waveform canvas */}\n <LyricsEditorCanvas\n lyricsData={lyricsData}\n selectedLineIndex={selectedLineIndex}\n onLineSelect={setSelectedLineIndex}\n vocalsWaveform={vocalsWaveform}\n songDuration={songDuration}\n currentPosition={currentPosition}\n isPlaying={isPlaying}\n />\n\n {/* Line detail canvas - zoomed view of selected line */}\n <LineDetailCanvas\n selectedLine={selectedLineIndex !== null ? lyricsData[selectedLineIndex] : null}\n vocalsWaveform={vocalsWaveform}\n songDuration={songDuration}\n currentPosition={currentPosition}\n isPlaying={isPlaying}\n />\n\n {/* Audio playback controls */}\n {audioElements.length > 0 && (\n <div className=\"flex items-center gap-2 px-2 py-1.5 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded flex-shrink-0\">\n <button\n onClick={togglePlayback}\n className=\"flex items-center gap-1.5 px-3 py-1 bg-blue-600 border-blue-600 rounded text-white cursor-pointer text-xs transition-colors hover:bg-blue-700\"\n >\n <span className=\"material-icons text-base\">\n {isPlaying ? 'pause' : 'play_arrow'}\n </span>\n {isPlaying ? 'Pause' : 'Play'}\n </button>\n <div className=\"flex gap-1.5 flex-wrap flex-1 items-center\">\n {audioElements.map((el, index) => (\n <div\n key={index}\n className=\"flex items-center gap-1 px-1.5 py-0.5 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded\"\n >\n <span className=\"text-[11px] font-semibold text-gray-900 dark:text-white min-w-[45px]\">\n {el.name}\n </span>\n <button\n onClick={() => toggleMute(index)}\n className={`flex items-center justify-center w-6 h-6 p-0.5 rounded cursor-pointer transition-colors ${el.muted ? 'bg-red-600 text-white hover:bg-red-700' : 'bg-green-600 text-white hover:bg-green-700'}`}\n title={el.muted ? 'Unmute' : 'Mute'}\n >\n <span className=\"material-icons text-sm\">\n {el.muted ? 'volume_off' : 'volume_up'}\n </span>\n </button>\n </div>\n ))}\n </div>\n <button\n onClick={handleExportLyrics}\n className=\"flex items-center gap-1.5 px-3 py-1 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white cursor-pointer text-xs transition-colors hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={!lyricsData || lyricsData.length === 0}\n title=\"Export lyrics as text file\"\n >\n <span className=\"material-icons text-base\">download</span>\n Export\n </button>\n <button\n onClick={handleResetLyrics}\n className=\"flex items-center gap-1.5 px-3 py-1 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white cursor-pointer text-xs transition-colors hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={!hasChanges}\n title=\"Reset to original lyrics\"\n >\n <span className=\"material-icons text-base\">restore</span>\n Reset\n </button>\n <button\n onClick={handleAddLineAtStart}\n className=\"flex items-center gap-1.5 px-3 py-1 bg-gray-100 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white cursor-pointer text-xs transition-colors hover:bg-gray-200 dark:hover:bg-gray-600 disabled:opacity-50 disabled:cursor-not-allowed\"\n disabled={!canAddLineAtStart()}\n title={\n canAddLineAtStart()\n ? 'Add line at beginning'\n : 'Not enough space (need 0.6s gap)'\n }\n >\n <span className=\"material-icons text-base\">add</span>\n Add First Line\n </button>\n </div>\n )}\n\n {/* Scrollable container for lyrics and corrections */}\n <div className=\"flex-1 overflow-y-auto overflow-x-hidden min-h-0\">\n {/* Lyrics lines */}\n <div className=\"flex flex-col gap-0 p-3 overflow-y-auto flex-1\">\n {lyricsData && lyricsData.length > 0 ? (\n lyricsData.map((line, index) => (\n <LyricLine\n key={`lyric-${index}`}\n line={line}\n index={index}\n isSelected={selectedLineIndex === index}\n onSelect={setSelectedLineIndex}\n onUpdate={handleLineUpdate}\n onDelete={handleLineDelete}\n onAddAfter={handleAddLineAfter}\n onSplit={handleLineSplit}\n onPlaySection={handlePlayLineSection}\n onAdjustStartTime={(delta) => {\n setSelectedLineIndex(index);\n const currentStart = line.start || line.startTimeSec || 0;\n const newStart = Math.max(0, currentStart + delta);\n handleLineUpdate(index, {\n ...line,\n start: newStart,\n startTimeSec: newStart,\n });\n }}\n onAdjustEndTime={(delta) => {\n setSelectedLineIndex(index);\n const currentEnd = line.end || line.endTimeSec || 0;\n const newEnd = Math.max(0, currentEnd + delta);\n handleLineUpdate(index, {\n ...line,\n end: newEnd,\n endTimeSec: newEnd,\n });\n }}\n canAddAfter={canAddLineAfter(index)}\n canSplit={canSplit(index)}\n hasOverlap={checkOverlap(index)}\n />\n ))\n ) : (\n <div className=\"text-center p-10 text-gray-500 dark:text-gray-400 text-base\">\n No lyrics available. Load a KAI file with lyrics to edit.\n </div>\n )}\n </div>\n\n {/* AI Corrections Section */}\n {(rejections.length > 0 || suggestions.length > 0) && (\n <div className=\"mb-6 p-4 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-md\">\n <h3 className=\"text-base font-semibold m-0 mb-4 text-gray-900 dark:text-white\">\n AI Corrections & Suggestions\n </h3>\n\n {rejections.map((rejection, rejectionIndex) => (\n <LyricRejection\n key={`rejection-${rejectionIndex}`}\n rejection={rejection}\n rejectionIndex={rejectionIndex}\n onAccept={handleAcceptRejection}\n onDelete={handleDeleteRejection}\n />\n ))}\n\n {suggestions.map((suggestion, suggestionIndex) => (\n <LyricSuggestion\n key={`suggestion-${suggestionIndex}`}\n suggestion={suggestion}\n suggestionIndex={suggestionIndex}\n onAccept={handleAcceptSuggestion}\n onDelete={handleDeleteSuggestion}\n />\n ))}\n </div>\n )}\n </div>\n </>\n )}\n </div>\n )}\n\n {/* Toast notification */}\n {toast && <Toast message={toast.message} type={toast.type} onClose={() => setToast(null)} />}\n </div>\n );\n}\n","/**\n * MixerPanel - Unified mixer control panel\n *\n * Based on renderer's mixer design\n * Works with both ElectronBridge and WebBridge via callbacks\n */\n\nexport function MixerPanel({\n mixer, // Support both 'mixer' (web) and 'mixerState' (renderer)\n mixerState,\n onSetMasterGain,\n onToggleMasterMute,\n onGainChange, // Alias for web compatibility\n onMuteToggle, // Alias for web compatibility\n className = '',\n}) {\n // Support both prop names - prefer mixerState if provided, then mixer, then empty object\n const state = mixerState || mixer || {};\n const handleGainChange = onSetMasterGain || onGainChange;\n const handleMuteToggle = onToggleMasterMute || onMuteToggle;\n const buses = [\n { id: 'PA', label: 'PA (Main)', description: 'Music + Mic to audience' },\n { id: 'IEM', label: 'IEM (Monitors)', description: 'Vocals only (mono)' },\n { id: 'mic', label: 'Mic Input', description: 'Microphone gain' },\n ];\n\n const handleGainChangeLocal = (busId, value) => {\n if (handleGainChange) {\n handleGainChange(busId, parseFloat(value));\n }\n };\n\n const handleMuteToggleLocal = (busId) => {\n if (handleMuteToggle) {\n handleMuteToggle(busId);\n }\n };\n\n const handleDoubleClick = (busId, e) => {\n e.target.value = 0;\n handleGainChangeLocal(busId, 0);\n };\n\n return (\n <div className={`flex gap-4 p-4 ${className}`}>\n {buses.map((bus) => {\n const gain = state[bus.id]?.gain ?? 0;\n const muted = state[bus.id]?.muted ?? false;\n\n return (\n <div\n key={bus.id}\n className=\"flex-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 flex flex-col items-center gap-3\"\n data-bus={bus.id}\n >\n <div className=\"text-center\">\n <div className=\"font-semibold text-gray-900 dark:text-gray-100\">{bus.label}</div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400\">{bus.description}</div>\n </div>\n\n <div className=\"flex flex-col items-center gap-2 w-full\">\n <input\n type=\"range\"\n className=\"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer accent-blue-600\"\n min=\"-60\"\n max=\"12\"\n step=\"0.5\"\n value={gain}\n onChange={(e) => handleGainChangeLocal(bus.id, e.target.value)}\n onDoubleClick={(e) => handleDoubleClick(bus.id, e)}\n data-bus={bus.id}\n />\n <div className=\"text-sm font-mono text-gray-700 dark:text-gray-300\">\n {gain.toFixed(1)} dB\n </div>\n </div>\n\n <button\n className={`px-4 py-2 rounded-lg font-semibold transition ${\n muted\n ? 'bg-red-600 hover:bg-red-700 text-white'\n : 'bg-gray-200 hover:bg-gray-300 dark:bg-gray-700 dark:hover:bg-gray-600 text-gray-900 dark:text-gray-100'\n }`}\n onClick={() => handleMuteToggleLocal(bus.id)}\n data-bus={bus.id}\n >\n MUTE\n </button>\n </div>\n );\n })}\n </div>\n );\n}\n","/**\n * PortalSelect - Custom select component using portal for dropdown positioning\n *\n * DESIGN EXCEPTION: We normally prefer native HTML elements (see SYSTEM_ARCHITECTURE.md),\n * but native <select> dropdowns are broken on Linux due to Electron 38+ Wayland bugs.\n * The dropdown renders at the top-left corner instead of below the select element.\n * See: https://github.com/electron/electron/issues/44607\n *\n * This component renders the dropdown via a React portal to document.body,\n * bypassing the Wayland popup positioning bug. We maintain as much native\n * behavior as possible: keyboard navigation, focus management, escape to close.\n *\n * This workaround should be removed when Electron fixes Wayland popup positioning.\n */\n\nimport React, { useState, useRef, useEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\n\nexport function PortalSelect({\n id,\n value,\n onChange,\n options = [],\n placeholder = 'Select...',\n className = '',\n}) {\n const [isOpen, setIsOpen] = useState(false);\n const [position, setPosition] = useState({ top: 0, left: 0, minWidth: 0, openUpward: false });\n const [focusedIndex, setFocusedIndex] = useState(-1);\n const triggerRef = useRef(null);\n const dropdownRef = useRef(null);\n\n // Estimated dropdown height for positioning calculation\n const DROPDOWN_MAX_HEIGHT = 240; // matches max-h-60 (15rem = 240px)\n\n // Find the selected option's label\n const selectedOption = options.find((opt) => opt.value === value);\n const displayText = selectedOption ? selectedOption.label : placeholder;\n\n // Find index of currently selected value\n const selectedIndex = options.findIndex((opt) => opt.value === value);\n\n // Update dropdown position when opened\n const updatePosition = useCallback(() => {\n if (triggerRef.current) {\n const rect = triggerRef.current.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n // Determine if we should open upward\n const estimatedHeight = Math.min(options.length * 40, DROPDOWN_MAX_HEIGHT);\n const openUpward = spaceBelow < estimatedHeight && spaceAbove > spaceBelow;\n\n setPosition({\n top: openUpward ? rect.top - 2 : rect.bottom + 2,\n left: rect.left,\n minWidth: rect.width,\n openUpward,\n });\n }\n }, [options.length]);\n\n useEffect(() => {\n if (isOpen) {\n updatePosition();\n setFocusedIndex(selectedIndex >= 0 ? selectedIndex : 0);\n }\n }, [isOpen, updatePosition, selectedIndex]);\n\n // Close dropdown when clicking outside\n useEffect(() => {\n if (!isOpen) return;\n\n const handleClickOutside = (event) => {\n if (\n triggerRef.current &&\n !triggerRef.current.contains(event.target) &&\n dropdownRef.current &&\n !dropdownRef.current.contains(event.target)\n ) {\n setIsOpen(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, [isOpen]);\n\n // Close on scroll outside dropdown to prevent misalignment\n useEffect(() => {\n if (!isOpen) return;\n\n const handleScroll = (event) => {\n // Don't close if scrolling within the dropdown itself\n if (dropdownRef.current && dropdownRef.current.contains(event.target)) {\n return;\n }\n setIsOpen(false);\n };\n window.addEventListener('scroll', handleScroll, true);\n return () => window.removeEventListener('scroll', handleScroll, true);\n }, [isOpen]);\n\n const handleSelect = useCallback(\n (optionValue) => {\n onChange?.({ target: { value: optionValue } });\n setIsOpen(false);\n triggerRef.current?.focus();\n },\n [onChange]\n );\n\n // Keyboard navigation matching native select behavior\n const handleKeyDown = useCallback(\n (event) => {\n switch (event.key) {\n case 'Enter':\n case ' ':\n event.preventDefault();\n if (isOpen && focusedIndex >= 0) {\n handleSelect(options[focusedIndex].value);\n } else {\n setIsOpen(!isOpen);\n }\n break;\n case 'Escape':\n event.preventDefault();\n setIsOpen(false);\n triggerRef.current?.focus();\n break;\n case 'ArrowDown':\n event.preventDefault();\n if (!isOpen) {\n setIsOpen(true);\n } else {\n setFocusedIndex((prev) => Math.min(prev + 1, options.length - 1));\n }\n break;\n case 'ArrowUp':\n event.preventDefault();\n if (isOpen) {\n setFocusedIndex((prev) => Math.max(prev - 1, 0));\n }\n break;\n case 'Home':\n event.preventDefault();\n if (isOpen) setFocusedIndex(0);\n break;\n case 'End':\n event.preventDefault();\n if (isOpen) setFocusedIndex(options.length - 1);\n break;\n case 'Tab':\n if (isOpen) setIsOpen(false);\n break;\n default:\n // Type-to-search: find first option starting with pressed key\n if (event.key.length === 1 && isOpen) {\n const char = event.key.toLowerCase();\n const idx = options.findIndex((opt) => opt.label.toLowerCase().startsWith(char));\n if (idx >= 0) setFocusedIndex(idx);\n }\n }\n },\n [isOpen, focusedIndex, options, handleSelect]\n );\n\n // Scroll focused option into view\n useEffect(() => {\n if (isOpen && dropdownRef.current && focusedIndex >= 0) {\n const focusedElement = dropdownRef.current.children[focusedIndex];\n focusedElement?.scrollIntoView({ block: 'nearest' });\n }\n }, [isOpen, focusedIndex]);\n\n return (\n <>\n {/* Trigger Button - styled to match native select */}\n <button\n ref={triggerRef}\n id={id}\n type=\"button\"\n className={`w-full px-3 py-2 bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-gray-100 cursor-pointer focus:outline-none focus:ring-2 focus:ring-blue-500 flex items-center justify-between text-left ${className}`}\n onClick={() => setIsOpen(!isOpen)}\n onKeyDown={handleKeyDown}\n aria-haspopup=\"listbox\"\n aria-expanded={isOpen}\n aria-labelledby={id}\n >\n <span className=\"truncate\">{displayText}</span>\n <svg\n className={`w-4 h-4 ml-2 flex-shrink-0 transition-transform ${isOpen ? 'rotate-180' : ''}`}\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M19 9l-7 7-7-7\" />\n </svg>\n </button>\n\n {/* Dropdown Portal - renders at document.body to bypass Wayland positioning bug */}\n {isOpen &&\n createPortal(\n <div\n ref={dropdownRef}\n className=\"fixed z-[9999] bg-white dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded shadow-lg max-h-60 overflow-y-auto\"\n style={{\n ...(position.openUpward\n ? { bottom: window.innerHeight - position.top, left: position.left }\n : { top: position.top, left: position.left }),\n minWidth: position.minWidth,\n }}\n role=\"listbox\"\n onKeyDown={handleKeyDown}\n >\n {options.map((option, index) => (\n <div\n key={option.value}\n className={`px-3 py-2 cursor-pointer transition-colors whitespace-nowrap ${\n index === focusedIndex\n ? 'bg-blue-500 text-white'\n : option.value === value\n ? 'bg-blue-100 dark:bg-blue-900 text-blue-900 dark:text-blue-100'\n : 'text-gray-900 dark:text-gray-100 hover:bg-gray-100 dark:hover:bg-gray-600'\n }`}\n onClick={() => handleSelect(option.value)}\n role=\"option\"\n aria-selected={option.value === value}\n >\n {option.label}\n </div>\n ))}\n </div>,\n document.body\n )}\n </>\n );\n}\n","/**\n * AudioDeviceSettings - Renderer-only audio device configuration\n *\n * This component is Electron-specific because it requires access to\n * native audio device enumeration via Web Audio API.\n *\n * NOT shared with web admin (browser can't access system audio devices).\n *\n * NOTE: Uses PortalSelect instead of native <select> due to Electron Wayland bug.\n * See PortalSelect.jsx for details.\n */\n\nimport React from 'react';\nimport { PortalSelect } from './PortalSelect.jsx';\n\nexport function AudioDeviceSettings({\n devices = { pa: [], iem: [], input: [] },\n selected = { pa: '', iem: '', input: '' },\n settings = { iemMonoVocals: true, micToSpeakers: true, enableMic: true },\n onDeviceChange,\n onSettingChange,\n onRefreshDevices,\n}) {\n // Convert device arrays to PortalSelect options format\n const paOptions = [\n { value: '', label: 'Default' },\n ...(devices.pa || []).map((dev) => ({\n value: dev.deviceId,\n label: dev.label || dev.deviceId,\n })),\n ];\n\n const iemOptions = [\n { value: '', label: 'Default' },\n ...(devices.iem || []).map((dev) => ({\n value: dev.deviceId,\n label: dev.label || dev.deviceId,\n })),\n ];\n\n const inputOptions = [\n { value: '', label: 'Default' },\n ...(devices.input || []).map((dev) => ({\n value: dev.deviceId,\n label: dev.label || dev.deviceId,\n })),\n ];\n\n return (\n <>\n {/* Audio Device Settings */}\n <div className=\"my-5 p-5 bg-gray-50 dark:bg-gray-800 rounded-lg\">\n <h3 className=\"flex items-center justify-between m-0 mb-4 text-lg text-gray-900 dark:text-gray-100\">\n Audio Devices\n <button\n onClick={onRefreshDevices}\n className=\"px-3 py-1 bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors text-base\"\n title=\"Refresh device list\"\n >\n ↻\n </button>\n </h3>\n\n <div className=\"my-3\">\n <label className=\"block mb-2 text-gray-600 dark:text-gray-400 text-sm\">PA Output:</label>\n <PortalSelect\n id=\"paDeviceSelect\"\n value={selected.pa || ''}\n onChange={(e) => onDeviceChange && onDeviceChange('pa', e.target.value)}\n options={paOptions}\n placeholder=\"Default\"\n />\n </div>\n\n <div className=\"my-3\">\n <label className=\"block mb-2 text-gray-600 dark:text-gray-400 text-sm\">IEM Output:</label>\n <PortalSelect\n id=\"iemDeviceSelect\"\n value={selected.iem || ''}\n onChange={(e) => onDeviceChange && onDeviceChange('iem', e.target.value)}\n options={iemOptions}\n placeholder=\"Default\"\n />\n </div>\n\n <div className=\"my-3\">\n <label className=\"flex items-center cursor-pointer select-none text-gray-900 dark:text-gray-100\">\n <input\n type=\"checkbox\"\n id=\"iemMonoVocals\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.iemMonoVocals ?? true}\n onChange={(e) =>\n onSettingChange && onSettingChange('iemMonoVocals', e.target.checked)\n }\n />\n IEM Vocals in Mono (for single earpiece)\n </label>\n </div>\n </div>\n\n {/* Mic Options */}\n <div className=\"my-5 p-5 bg-gray-50 dark:bg-gray-800 rounded-lg\">\n <h3 className=\"m-0 mb-4 text-lg text-gray-900 dark:text-gray-100\">Mic Options</h3>\n\n <div className=\"my-3\">\n <label className=\"block mb-2 text-gray-600 dark:text-gray-400 text-sm\">Mic Input:</label>\n <PortalSelect\n id=\"inputDeviceSelect\"\n value={selected.input || ''}\n onChange={(e) => onDeviceChange && onDeviceChange('input', e.target.value)}\n options={inputOptions}\n placeholder=\"Default\"\n />\n </div>\n\n <div className=\"flex flex-col gap-3\">\n <label className=\"flex items-center cursor-pointer text-gray-900 dark:text-gray-100 select-none\">\n <input\n type=\"checkbox\"\n id=\"micToSpeakers\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.micToSpeakers ?? true}\n onChange={(e) =>\n onSettingChange && onSettingChange('micToSpeakers', e.target.checked)\n }\n />\n <span>Mic to Speakers</span>\n </label>\n\n <label className=\"flex items-center cursor-pointer text-gray-900 dark:text-gray-100 select-none\">\n <input\n type=\"checkbox\"\n id=\"enableMic\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.enableMic ?? true}\n onChange={(e) => onSettingChange && onSettingChange('enableMic', e.target.checked)}\n />\n <span>Enable Mic</span>\n </label>\n </div>\n </div>\n </>\n );\n}\n","/**\n * MixerTab - Complete audio settings tab for renderer\n *\n * Combines:\n * - MixerPanel (shared gain controls)\n * - AudioDeviceSettings (renderer-only device selection)\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { MixerPanel } from '../../shared/components/MixerPanel.jsx';\nimport { AudioDeviceSettings } from './AudioDeviceSettings.jsx';\n\nexport function MixerTab({ bridge }) {\n const [mixerState, setMixerState] = useState({\n PA: { gain: 0, muted: false },\n IEM: { gain: 0, muted: false },\n mic: { gain: 0, muted: false },\n });\n const [audioDevices, setAudioDevices] = useState({ pa: [], iem: [], input: [] });\n const [selectedDevices, setSelectedDevices] = useState({ pa: '', iem: '', input: '' });\n const [audioSettings, setAudioSettings] = useState({\n iemMonoVocals: true,\n micToSpeakers: true,\n enableMic: true,\n });\n\n // Subscribe to mixer state updates\n useEffect(() => {\n if (!bridge) return;\n\n const unsubscribe = bridge.onMixerChanged?.((mixer) => {\n // Extract only bus-level mixer (PA, IEM, mic) - ignore stem mixer properties\n const busLevelMixer = {\n PA: mixer.PA || { gain: 0, muted: false },\n IEM: mixer.IEM || { gain: 0, muted: false },\n mic: mixer.mic || { gain: 0, muted: false },\n };\n\n setMixerState(busLevelMixer);\n });\n\n // Fetch initial state\n bridge\n .getMixerState?.()\n .then((state) => {\n // Extract only bus-level mixer (PA, IEM, mic)\n const busLevelMixer = {\n PA: state.PA || { gain: 0, muted: false },\n IEM: state.IEM || { gain: 0, muted: false },\n mic: state.mic || { gain: 0, muted: false },\n };\n\n setMixerState(busLevelMixer);\n })\n .catch(console.error);\n\n return () => unsubscribe && unsubscribe();\n }, [bridge]);\n\n // Fetch audio devices on mount\n useEffect(() => {\n if (!bridge) return;\n\n const loadDevicesAndPreferences = async () => {\n try {\n // Load audio settings\n const settings = await bridge.getAudioSettings?.();\n if (settings) {\n setAudioSettings(settings);\n }\n\n // Enumerate devices\n const devices = await bridge.getAudioDevices?.();\n const outputDevices = devices.filter((d) => d.maxOutputChannels > 0);\n const inputDevices = devices.filter((d) => d.maxInputChannels > 0);\n\n setAudioDevices({\n pa: outputDevices,\n iem: outputDevices,\n input: inputDevices,\n });\n\n // Load saved device preferences\n const preferences = await bridge.getDevicePreferences?.();\n\n // Restore device selections\n const restored = {};\n for (const [type, savedDevice] of Object.entries(preferences || {})) {\n if (!savedDevice) continue;\n\n const deviceList = type === 'input' ? inputDevices : outputDevices;\n\n // Try to match by ID first\n let matchedDevice = deviceList.find((d) => d.deviceId === savedDevice.id);\n\n // If no ID match, try matching by name\n if (!matchedDevice && savedDevice.name) {\n matchedDevice = deviceList.find(\n (d) => d.label === savedDevice.name || d.name === savedDevice.name\n );\n }\n\n if (matchedDevice) {\n const lowerType = type.toLowerCase();\n restored[lowerType] = matchedDevice.deviceId;\n\n // Set the device via bridge - sequential initialization to ensure proper device setup\n // eslint-disable-next-line no-await-in-loop\n await bridge.setAudioDevice?.(type, matchedDevice.deviceId);\n }\n }\n\n if (Object.keys(restored).length > 0) {\n setSelectedDevices((prev) => ({ ...prev, ...restored }));\n }\n } catch (error) {\n console.error('Failed to load devices and preferences:', error);\n }\n };\n\n loadDevicesAndPreferences();\n }, [bridge]);\n\n // Mixer gain/mute controls\n const handleSetMasterGain = (bus, gain) => {\n bridge?.setMasterGain?.(bus, gain);\n };\n\n const handleToggleMasterMute = (bus) => {\n bridge?.toggleMasterMute?.(bus);\n };\n\n // Device selection\n const handleDeviceChange = async (type, deviceId) => {\n // Map type to uppercase for bridge (pa -> PA, iem -> IEM, input -> input)\n const deviceType = type === 'pa' ? 'PA' : type === 'iem' ? 'IEM' : type;\n\n try {\n await bridge?.setAudioDevice?.(deviceType, deviceId);\n setSelectedDevices((prev) => ({ ...prev, [type]: deviceId }));\n\n // Save device preference\n const preferences = (await bridge.getDevicePreferences?.()) || {};\n\n if (!deviceId || deviceId === '') {\n // User selected \"Default\" - save empty preference\n preferences[deviceType] = {\n id: '',\n name: 'Default',\n deviceKind: 'default',\n };\n console.log(`💾 Saving default device preference for ${deviceType}`);\n } else {\n // Look up the specific device\n const deviceList =\n type === 'input'\n ? audioDevices.input\n : type === 'iem'\n ? audioDevices.iem\n : audioDevices.pa;\n const device = deviceList.find((d) => d.deviceId === deviceId);\n\n if (device) {\n preferences[deviceType] = {\n id: deviceId,\n name: device.label || device.name,\n deviceKind: device.deviceKind,\n };\n console.log(`💾 Saving device preference for ${deviceType}:`, preferences[deviceType]);\n } else {\n console.warn(`⚠️ Device not found in list for ${type}:`, deviceId);\n return; // Don't save if device not found\n }\n }\n\n await bridge.saveDevicePreferences?.(preferences);\n console.log(`✅ Device preferences saved successfully`);\n } catch (error) {\n console.error('Failed to change device:', error);\n }\n };\n\n // Audio settings\n const handleSettingChange = async (setting, value) => {\n setAudioSettings((prev) => ({ ...prev, [setting]: value }));\n\n // Save audio setting\n try {\n await bridge.saveAudioSettings?.({ [setting]: value });\n } catch (error) {\n console.error('Failed to save audio setting:', error);\n }\n };\n\n // Refresh devices\n const handleRefreshDevices = () => {\n bridge\n ?.getAudioDevices?.()\n .then((devices) => {\n const outputDevices = devices.filter((d) => d.maxOutputChannels > 0);\n const inputDevices = devices.filter((d) => d.maxInputChannels > 0);\n\n setAudioDevices({\n pa: outputDevices,\n iem: outputDevices,\n input: inputDevices,\n });\n })\n .catch(console.error);\n };\n\n return (\n <div className=\"p-5 h-full overflow-y-auto\">\n <div className=\"mb-8\">\n <h2 className=\"m-0 mb-5 text-2xl text-gray-900 dark:text-gray-100\">Audio Mixer</h2>\n <MixerPanel\n mixerState={mixerState}\n onSetMasterGain={handleSetMasterGain}\n onToggleMasterMute={handleToggleMasterMute}\n />\n </div>\n\n <AudioDeviceSettings\n devices={audioDevices}\n selected={selectedDevices}\n settings={audioSettings}\n onDeviceChange={handleDeviceChange}\n onSettingChange={handleSettingChange}\n onRefreshDevices={handleRefreshDevices}\n />\n </div>\n );\n}\n","/**\n * QueueList - Unified queue display component\n *\n * Based on renderer's player-queue-sidebar design\n * Works with both ElectronBridge and WebBridge via callbacks\n */\n\nimport { useState, useRef, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\n\n/**\n * PortalTooltip - Tooltip that renders via portal for consistent positioning on Wayland\n */\nfunction PortalTooltip({ text, targetRect, visible }) {\n if (!visible || !targetRect) return null;\n\n const style = {\n position: 'fixed',\n left: targetRect.left + targetRect.width / 2,\n top: targetRect.top - 4,\n transform: 'translate(-50%, -100%)',\n zIndex: 10000,\n };\n\n return createPortal(\n <div\n style={style}\n className=\"px-2 py-1 bg-gray-900 dark:bg-gray-700 text-white text-xs rounded shadow-lg whitespace-nowrap pointer-events-none\"\n >\n {text}\n <div className=\"absolute left-1/2 -translate-x-1/2 top-full w-0 h-0 border-l-4 border-r-4 border-t-4 border-l-transparent border-r-transparent border-t-gray-900 dark:border-t-gray-700\" />\n </div>,\n document.body\n );\n}\n\n/**\n * TooltipButton - Button with portal-based tooltip\n */\nfunction TooltipButton({ icon, tooltip, onClick, className, iconSize = 'text-base' }) {\n const [showTooltip, setShowTooltip] = useState(false);\n const [tooltipRect, setTooltipRect] = useState(null);\n const buttonRef = useRef(null);\n const tooltipTimeoutRef = useRef(null);\n\n const handleMouseEnter = useCallback(() => {\n tooltipTimeoutRef.current = setTimeout(() => {\n if (buttonRef.current) {\n setTooltipRect(buttonRef.current.getBoundingClientRect());\n setShowTooltip(true);\n }\n }, 400);\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n if (tooltipTimeoutRef.current) {\n clearTimeout(tooltipTimeoutRef.current);\n tooltipTimeoutRef.current = null;\n }\n setShowTooltip(false);\n }, []);\n\n return (\n <>\n <button\n ref={buttonRef}\n onClick={onClick}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n className={className}\n >\n <span className={`material-icons ${iconSize}`}>{icon}</span>\n </button>\n <PortalTooltip text={tooltip} targetRect={tooltipRect} visible={showTooltip} />\n </>\n );\n}\n\nexport function QueueList({\n queue = [],\n currentIndex = -1,\n currentSongId = null, // Support web's currentSongId prop\n onPlayFromQueue,\n onRemoveFromQueue,\n onLoad, // Alias for web compatibility\n onRemove, // Alias for web compatibility\n onClearQueue,\n onClear, // Alias for web compatibility\n onShuffleQueue,\n onReorderQueue, // New: drag and drop reordering\n onQuickSearch,\n className = '',\n}) {\n const [draggedIndex, setDraggedIndex] = useState(null);\n const [dragOverIndex, setDragOverIndex] = useState(null);\n\n // Support both prop names\n const handlePlay = onPlayFromQueue || onLoad;\n const handleRemove = onRemoveFromQueue || onRemove;\n const handleClear = onClearQueue || onClear;\n\n // Drag and drop handlers\n const handleDragStart = (e, index) => {\n if (!onReorderQueue) return;\n setDraggedIndex(index);\n e.dataTransfer.effectAllowed = 'move';\n e.dataTransfer.setData('text/html', e.currentTarget);\n };\n\n const handleDragOver = (e, index) => {\n if (!onReorderQueue || draggedIndex === null) return;\n e.preventDefault();\n e.dataTransfer.dropEffect = 'move';\n setDragOverIndex(index);\n };\n\n const handleDragLeave = () => {\n setDragOverIndex(null);\n };\n\n const handleDrop = (e, dropIndex) => {\n if (!onReorderQueue || draggedIndex === null) return;\n e.preventDefault();\n\n if (draggedIndex !== dropIndex) {\n const item = queue[draggedIndex];\n // When moving down, account for the shift caused by removing the dragged item\n // Without this adjustment, items dropped below their origin end up one position too far down\n let targetIndex = dropIndex;\n if (draggedIndex < dropIndex) {\n targetIndex = dropIndex - 1;\n }\n onReorderQueue(item.id, targetIndex);\n }\n\n setDraggedIndex(null);\n setDragOverIndex(null);\n };\n\n const handleDragEnd = () => {\n setDraggedIndex(null);\n setDragOverIndex(null);\n };\n\n if (queue.length === 0) {\n return (\n <div className={`flex flex-col gap-1 flex-1 min-h-0 ${className}`}>\n {onQuickSearch && (\n <div className=\"relative mb-2\">\n <input\n type=\"text\"\n id=\"quickLibrarySearch\"\n className=\"w-full px-3 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white text-sm focus:outline-none focus:border-blue-500 dark:focus:border-blue-400\"\n placeholder=\"Search...\"\n onInput={(e) => onQuickSearch(e.target.value)}\n />\n <div\n className=\"absolute top-full left-0 right-0 mt-1 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded shadow-lg z-50 hidden\"\n id=\"quickSearchResults\"\n >\n <div className=\"p-4 text-center text-sm text-gray-500 dark:text-gray-400\">\n Type to search your library\n </div>\n </div>\n </div>\n )}\n\n <div className=\"flex justify-between items-center py-1\">\n <h4 className=\"m-0 text-base font-semibold text-gray-900 dark:text-white\">Queue</h4>\n <div className=\"flex gap-1\">\n {handleClear && (\n <TooltipButton\n icon=\"delete\"\n tooltip=\"Clear Queue\"\n onClick={handleClear}\n iconSize=\"text-lg\"\n className=\"p-1.5 px-2 bg-gray-200 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n {onShuffleQueue && (\n <TooltipButton\n icon=\"shuffle\"\n tooltip=\"Shuffle\"\n onClick={onShuffleQueue}\n iconSize=\"text-lg\"\n className=\"p-1.5 px-2 bg-gray-200 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n </div>\n </div>\n\n <div className=\"flex-1 overflow-y-auto flex flex-col gap-1\">\n <div className=\"flex flex-col items-center justify-center p-8 text-gray-400 dark:text-gray-500\">\n <span className=\"material-icons text-5xl mb-2 opacity-50\">queue_music</span>\n <div className=\"text-sm\">Queue is empty</div>\n </div>\n </div>\n </div>\n );\n }\n\n return (\n <div className={`flex flex-col gap-1 flex-1 min-h-0 ${className}`}>\n {onQuickSearch && (\n <div className=\"relative mb-2\">\n <input\n type=\"text\"\n id=\"quickLibrarySearch\"\n className=\"w-full px-3 py-2 bg-gray-100 dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded text-gray-900 dark:text-white text-sm focus:outline-none focus:border-blue-500 dark:focus:border-blue-400\"\n placeholder=\"Search...\"\n onInput={(e) => onQuickSearch(e.target.value)}\n />\n <div\n className=\"absolute top-full left-0 right-0 mt-1 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded shadow-lg z-50 hidden\"\n id=\"quickSearchResults\"\n >\n <div className=\"p-4 text-center text-sm text-gray-500 dark:text-gray-400\">\n Type to search your library\n </div>\n </div>\n </div>\n )}\n\n <div className=\"flex justify-between items-center py-1\">\n <h4 className=\"m-0 text-base font-semibold text-gray-900 dark:text-white\">Queue</h4>\n <div className=\"flex gap-1\">\n {handleClear && (\n <TooltipButton\n icon=\"delete\"\n tooltip=\"Clear Queue\"\n onClick={handleClear}\n iconSize=\"text-lg\"\n className=\"p-1.5 px-2 bg-gray-200 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n {onShuffleQueue && (\n <TooltipButton\n icon=\"shuffle\"\n tooltip=\"Shuffle\"\n onClick={onShuffleQueue}\n iconSize=\"text-lg\"\n className=\"p-1.5 px-2 bg-gray-200 dark:bg-gray-700 border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n </div>\n </div>\n\n <div className=\"flex-1 overflow-y-auto flex flex-col gap-1\">\n {queue.map((item, index) => {\n // Support both currentIndex (renderer) and currentSongId (web)\n // ONLY match by queueItemId - no path fallback to avoid duplicate song highlighting\n let isCurrentSong = false;\n\n // Renderer uses currentIndex\n if (currentIndex >= 0 && index === currentIndex) {\n isCurrentSong = true;\n }\n // Web uses currentSongId (queueItemId only - must be a number)\n else if (typeof currentSongId === 'number') {\n isCurrentSong = item.id === currentSongId;\n }\n\n const requesterText = item.requester ? ` • Singer: ${item.requester}` : '';\n\n const isDragging = draggedIndex === index;\n const isDragOver = dragOverIndex === index;\n\n // Build item classes\n const itemClasses = [\n 'flex items-center gap-2 px-2 py-1.5 rounded transition-all',\n 'bg-gray-100 dark:bg-gray-800 border border-gray-200 dark:border-gray-700',\n 'hover:bg-gray-200 dark:hover:bg-gray-750',\n ];\n\n if (isCurrentSong) {\n itemClasses.push(\n 'bg-green-100 dark:bg-green-900/20 border-green-500 dark:border-green-600'\n );\n }\n if (isDragging) {\n itemClasses.push('opacity-50 cursor-grabbing');\n }\n if (isDragOver) {\n itemClasses.push('border-t-2 border-t-cyan-500');\n }\n if (onReorderQueue) {\n itemClasses.push('cursor-grab');\n }\n\n return (\n <div\n key={item.id}\n className={itemClasses.join(' ')}\n data-item-id={item.id}\n draggable={Boolean(onReorderQueue)}\n onDragStart={(e) => handleDragStart(e, index)}\n onDragOver={(e) => handleDragOver(e, index)}\n onDragLeave={handleDragLeave}\n onDrop={(e) => handleDrop(e, index)}\n onDragEnd={handleDragEnd}\n >\n <div className=\"flex items-center justify-center w-8 h-8 bg-gray-200 dark:bg-gray-700 rounded text-xs font-semibold text-gray-600 dark:text-gray-400 flex-shrink-0\">\n {index + 1}\n </div>\n <div className=\"flex-1 min-w-0\">\n <div\n className=\"font-medium text-gray-900 dark:text-white whitespace-nowrap overflow-hidden text-ellipsis mb-0.5 text-sm\"\n title={item.title}\n >\n {item.title}\n </div>\n <div\n className=\"text-xs text-gray-500 dark:text-gray-400 whitespace-nowrap overflow-hidden text-ellipsis\"\n title={`${item.artist}${requesterText}`}\n >\n {item.artist}\n {requesterText}\n </div>\n </div>\n <div className=\"flex gap-1 flex-shrink-0\">\n {/* Up/Down reorder buttons - only show if more than one item */}\n {onReorderQueue && queue.length > 1 && (\n <>\n {index > 0 && (\n <TooltipButton\n icon=\"arrow_upward\"\n tooltip=\"Move Up\"\n onClick={() => onReorderQueue(item.id, index - 1)}\n className=\"p-1 bg-transparent border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n {index < queue.length - 1 && (\n <TooltipButton\n icon=\"arrow_downward\"\n tooltip=\"Move Down\"\n onClick={() => onReorderQueue(item.id, index + 1)}\n className=\"p-1 bg-transparent border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n </>\n )}\n {handlePlay && (\n <TooltipButton\n icon=\"queue_play_next\"\n tooltip=\"Load Song\"\n onClick={() => handlePlay(item.id || item.path)}\n className=\"p-1 px-2 bg-transparent border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n {handleRemove && (\n <TooltipButton\n icon=\"close\"\n tooltip=\"Remove\"\n onClick={() => handleRemove(item.id)}\n className=\"p-1 px-2 bg-transparent border border-gray-300 dark:border-gray-600 rounded cursor-pointer flex items-center justify-center transition-all text-gray-700 dark:text-gray-200 hover:bg-gray-300 dark:hover:bg-gray-600\"\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n","/**\n * QuickSearch - Shared quick search component\n * Used by both renderer and web admin for quick library search above queue\n */\n\nimport React, { useState, useEffect, useRef } from 'react';\nimport { getFormatIcon } from '../formatUtils.js';\n\nexport function QuickSearch({ bridge, requester = 'KJ' }) {\n const [searchResults, setSearchResults] = useState([]);\n const [showSearchDropdown, setShowSearchDropdown] = useState(false);\n const [searchTerm, setSearchTerm] = useState('');\n const searchInputRef = useRef(null);\n const dropdownRef = useRef(null);\n\n // Handle quick search\n const handleQuickSearch = async (value) => {\n setSearchTerm(value);\n\n if (!value.trim()) {\n setShowSearchDropdown(false);\n setSearchResults([]);\n return;\n }\n\n try {\n const result = await bridge.searchSongs(value);\n const songs = result.songs || [];\n setSearchResults(songs.slice(0, 8)); // Limit to 8 results\n setShowSearchDropdown(true);\n } catch (error) {\n console.error('Quick search error:', error);\n setSearchResults([]);\n setShowSearchDropdown(true);\n }\n };\n\n // Add song to queue from search\n const handleAddFromSearch = async (song) => {\n const queueItem = {\n path: song.path,\n title: song.title || song.name.replace('.kai', ''),\n artist: song.artist || 'Unknown Artist',\n duration: song.duration,\n requester: requester,\n addedVia: requester === 'Web Admin' ? 'web' : 'ui',\n };\n\n await bridge.addToQueue(queueItem);\n\n // Clear search\n setSearchTerm('');\n setShowSearchDropdown(false);\n setSearchResults([]);\n };\n\n // Click outside to close dropdown\n useEffect(() => {\n const handleClickOutside = (e) => {\n if (\n dropdownRef.current &&\n !dropdownRef.current.contains(e.target) &&\n searchInputRef.current &&\n !searchInputRef.current.contains(e.target)\n ) {\n setShowSearchDropdown(false);\n }\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n return () => document.removeEventListener('mousedown', handleClickOutside);\n }, []);\n\n return (\n <div className=\"relative p-2\">\n <input\n ref={searchInputRef}\n type=\"text\"\n className=\"w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 text-gray-900 dark:text-gray-100 placeholder-gray-500 dark:placeholder-gray-400 focus:ring-2 focus:ring-blue-500 focus:border-transparent\"\n placeholder=\"Quick search library...\"\n value={searchTerm}\n onChange={(e) => handleQuickSearch(e.target.value)}\n onFocus={() => searchTerm && setShowSearchDropdown(true)}\n />\n\n {showSearchDropdown && (\n <div\n ref={dropdownRef}\n className=\"absolute left-2 right-2 mt-1 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg shadow-lg max-h-80 overflow-y-auto z-50\"\n >\n {searchResults.length === 0 ? (\n <div className=\"p-4 text-center text-gray-500 dark:text-gray-400\">\n {searchTerm ? 'No matches found' : 'Type to search your library'}\n </div>\n ) : (\n searchResults.map((song) => (\n <div\n key={song.path}\n className=\"flex items-center justify-between gap-3 p-3 hover:bg-gray-100 dark:hover:bg-gray-700 border-b border-gray-200 dark:border-gray-700 last:border-b-0\"\n >\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-center gap-2 text-gray-900 dark:text-gray-100 font-medium truncate\">\n <span className=\"text-lg\">{getFormatIcon(song.format)}</span>\n {song.title}\n </div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400 truncate\">\n {song.artist}\n </div>\n </div>\n <button\n className=\"p-2 hover:bg-gray-200 dark:hover:bg-gray-600 rounded-lg transition flex-shrink-0\"\n onClick={() => handleAddFromSearch(song)}\n title=\"Add to Queue\"\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300\">\n playlist_add\n </span>\n </button>\n </div>\n ))\n )}\n </div>\n )}\n </div>\n );\n}\n","/**\n * QueueTab - Queue management tab for renderer\n *\n * Combines:\n * - QueueList (shared queue display)\n * - QuickSearch (shared quick search)\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { QueueList } from '../../shared/components/QueueList.jsx';\nimport { QuickSearch } from '../../shared/components/QuickSearch.jsx';\n\nexport function QueueTab({ bridge }) {\n const [queue, setQueue] = useState([]);\n const [currentIndex, setCurrentIndex] = useState(-1);\n\n // Subscribe to queue updates\n useEffect(() => {\n if (!bridge) return;\n\n const unsubscribe = bridge.onQueueChanged?.((queueData) => {\n setQueue(queueData.queue || []);\n // Update current index if current song changed\n if (queueData.currentSong && queueData.currentSong.queueItemId) {\n const queue = queueData.queue || [];\n const index = queue.findIndex((item) => item.id === queueData.currentSong.queueItemId);\n setCurrentIndex(index);\n } else {\n setCurrentIndex(-1);\n }\n });\n\n // Fetch initial state\n bridge\n .getQueue?.()\n .then((data) => {\n setQueue(data.queue || []);\n if (data.currentSong && data.currentSong.queueItemId) {\n const queue = data.queue || [];\n const index = queue.findIndex((item) => item.id === data.currentSong.queueItemId);\n setCurrentIndex(index);\n } else {\n setCurrentIndex(-1);\n }\n })\n .catch(console.error);\n\n return () => unsubscribe && unsubscribe();\n }, [bridge]);\n\n // Listen for current song changes to update currentIndex\n useEffect(() => {\n if (!bridge) return;\n\n const unsubscribe = bridge.onCurrentSongChanged?.((song) => {\n if (song && song.queueItemId) {\n console.log(\n '🎵 Matching by queueItemId:',\n song.queueItemId,\n 'in queue:',\n queue.map((q) => q.id)\n );\n const index = queue.findIndex((item) => item.id === song.queueItemId);\n console.log(' → Found at index:', index);\n setCurrentIndex(index);\n } else {\n console.log('🎵 No queueItemId, setting currentIndex to -1');\n setCurrentIndex(-1);\n }\n });\n\n return () => unsubscribe && unsubscribe();\n }, [bridge, queue]);\n\n // Queue operations\n const handlePlayFromQueue = async (songId) => {\n // Pass the ID to the bridge (it will handle queue lookup)\n await bridge.playFromQueue(songId);\n };\n\n const handleRemoveFromQueue = async (songId) => {\n await bridge.removeFromQueue(songId);\n };\n\n const handleClearQueue = async () => {\n if (queue.length > 0 && confirm('Are you sure you want to clear the queue?')) {\n await bridge.clearQueue();\n }\n };\n\n const handleShuffleQueue = () => {\n // TODO: Add shuffle to bridge\n console.warn('Shuffle not implemented in bridge yet');\n };\n\n const handleReorderQueue = async (songId, newIndex) => {\n await bridge.reorderQueue(songId, newIndex);\n };\n\n return (\n <div className=\"flex flex-col flex-1 gap-2 p-2 box-border min-h-0 overflow-hidden\">\n <QuickSearch bridge={bridge} requester=\"KJ\" />\n\n {/* Queue list */}\n <QueueList\n queue={queue}\n currentIndex={currentIndex}\n onPlayFromQueue={handlePlayFromQueue}\n onRemoveFromQueue={handleRemoveFromQueue}\n onClearQueue={handleClearQueue}\n onShuffleQueue={handleShuffleQueue}\n onReorderQueue={handleReorderQueue}\n />\n </div>\n );\n}\n","/**\n * ThemeToggle - Dark/Light/System mode toggle button\n *\n * Manages theme state and applies dark class to document root\n * Supports: light, dark, system (follows OS preference)\n */\n\nimport { useState, useEffect } from 'react';\n\nexport function ThemeToggle({ className = '' }) {\n const [theme, setTheme] = useState('dark');\n\n useEffect(() => {\n // Check for saved theme or default to dark\n const savedTheme = localStorage.getItem('theme') || 'dark';\n setTheme(savedTheme);\n applyTheme(savedTheme);\n\n // Listen for system theme changes\n const mediaQuery = window.matchMedia('(prefers-color-scheme: dark)');\n const handleChange = () => {\n if (theme === 'system') {\n applyTheme('system');\n }\n };\n mediaQuery.addEventListener('change', handleChange);\n return () => mediaQuery.removeEventListener('change', handleChange);\n }, [theme]);\n\n const applyTheme = (newTheme) => {\n if (newTheme === 'dark') {\n document.documentElement.classList.add('dark');\n } else if (newTheme === 'light') {\n document.documentElement.classList.remove('dark');\n } else {\n // system\n const isDark = window.matchMedia('(prefers-color-scheme: dark)').matches;\n if (isDark) {\n document.documentElement.classList.add('dark');\n } else {\n document.documentElement.classList.remove('dark');\n }\n }\n };\n\n const cycleTheme = () => {\n const themes = ['light', 'dark', 'system'];\n const currentIndex = themes.indexOf(theme);\n const nextTheme = themes[(currentIndex + 1) % themes.length];\n setTheme(nextTheme);\n localStorage.setItem('theme', nextTheme);\n applyTheme(nextTheme);\n };\n\n const getIcon = () => {\n if (theme === 'light') {\n return (\n <svg className=\"w-5 h-5 text-yellow-500\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 2a1 1 0 011 1v1a1 1 0 11-2 0V3a1 1 0 011-1zm4 8a4 4 0 11-8 0 4 4 0 018 0zm-.464 4.95l.707.707a1 1 0 001.414-1.414l-.707-.707a1 1 0 00-1.414 1.414zm2.12-10.607a1 1 0 010 1.414l-.706.707a1 1 0 11-1.414-1.414l.707-.707a1 1 0 011.414 0zM17 11a1 1 0 100-2h-1a1 1 0 100 2h1zm-7 4a1 1 0 011 1v1a1 1 0 11-2 0v-1a1 1 0 011-1zM5.05 6.464A1 1 0 106.465 5.05l-.708-.707a1 1 0 00-1.414 1.414l.707.707zm1.414 8.486l-.707.707a1 1 0 01-1.414-1.414l.707-.707a1 1 0 011.414 1.414zM4 11a1 1 0 100-2H3a1 1 0 000 2h1z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n } else if (theme === 'dark') {\n return (\n <svg className=\"w-5 h-5 text-blue-400\" fill=\"currentColor\" viewBox=\"0 0 20 20\">\n <path d=\"M17.293 13.293A8 8 0 016.707 2.707a8.001 8.001 0 1010.586 10.586z\" />\n </svg>\n );\n } else {\n // system\n return (\n <svg\n className=\"w-5 h-5 text-gray-500 dark:text-gray-400\"\n fill=\"currentColor\"\n viewBox=\"0 0 20 20\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M3 5a2 2 0 012-2h10a2 2 0 012 2v8a2 2 0 01-2 2h-2.22l.123.489.804.804A1 1 0 0113 18H7a1 1 0 01-.707-1.707l.804-.804L7.22 15H5a2 2 0 01-2-2V5zm5.771 7H5V5h10v7H8.771z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n };\n\n const getTitle = () => {\n if (theme === 'light') return 'Light mode (click for dark)';\n if (theme === 'dark') return 'Dark mode (click for system)';\n return 'System mode (click for light)';\n };\n\n return (\n <button\n onClick={cycleTheme}\n className={`p-2 rounded-lg transition-colors hover:bg-gray-200 dark:hover:bg-gray-700 ${className}`}\n title={getTitle()}\n aria-label={getTitle()}\n >\n {getIcon()}\n </button>\n );\n}\n","/**\n * SongInfoBar - Displays current song info at the top\n *\n * Shows song title, artist, format icon, and optional hamburger menu\n * Works with both ElectronBridge and WebBridge\n */\n\nimport { getFormatIcon } from '../formatUtils.js';\nimport { ThemeToggle } from './ThemeToggle.jsx';\n\nexport function SongInfoBar({\n currentSong,\n onMenuClick,\n sidebarCollapsed = false,\n className = '',\n}) {\n const formatIcon = currentSong?.format ? getFormatIcon(currentSong.format) : '';\n\n // Check for loading state\n const songDisplay = currentSong?.isLoading\n ? '⏳ Loading...'\n : currentSong\n ? `${currentSong.title || 'Unknown'} - ${currentSong.artist || 'Unknown Artist'}`\n : 'No song loaded';\n\n return (\n <div\n className={`bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 px-4 py-2 flex items-center justify-between ${className}`}\n >\n <div className=\"flex items-center\">\n {onMenuClick && (\n <button\n onClick={onMenuClick}\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition flex items-center justify-center\"\n title={sidebarCollapsed ? 'Show sidebar' : 'Hide sidebar'}\n aria-label={sidebarCollapsed ? 'Show sidebar' : 'Hide sidebar'}\n >\n {sidebarCollapsed ? (\n <svg\n className=\"w-5 h-5 text-gray-700 dark:text-gray-300\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 6h16M4 12h16m-7 6h7\"\n />\n </svg>\n ) : (\n <svg\n className=\"w-5 h-5 text-gray-700 dark:text-gray-300\"\n fill=\"none\"\n stroke=\"currentColor\"\n viewBox=\"0 0 24 24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n strokeWidth={2}\n d=\"M4 6h16M4 12h16M4 18h16\"\n />\n </svg>\n )}\n </button>\n )}\n </div>\n <div className=\"flex-1 flex items-center justify-center\">\n <div className=\"flex items-center gap-2 text-gray-900 dark:text-gray-100\">\n {formatIcon && <span className=\"text-xl\">{formatIcon}</span>}\n <span className=\"font-medium truncate max-w-2xl\">{songDisplay}</span>\n </div>\n </div>\n <div className=\"flex items-center gap-2\">\n <ThemeToggle />\n </div>\n </div>\n );\n}\n","/**\n * SongInfoBarWrapper - Renderer-specific wrapper for SongInfoBar\n * Manages state and bridge integration\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { SongInfoBar } from '../../shared/components/SongInfoBar.jsx';\nimport { UI_DEFAULTS } from '../../shared/defaults.js';\n\nexport function SongInfoBarWrapper({ bridge }) {\n const [currentSong, setCurrentSong] = useState(null);\n const [sidebarCollapsed, setSidebarCollapsed] = useState(UI_DEFAULTS.sidebarCollapsed);\n\n useEffect(() => {\n if (!bridge) return;\n\n // Subscribe to current song changes\n const unsubscribe = bridge.onCurrentSongChanged?.((song) => {\n setCurrentSong(song);\n });\n\n // Fetch initial state\n bridge\n .getQueue?.()\n .then((data) => {\n if (data.currentSong) {\n setCurrentSong(data.currentSong);\n }\n })\n .catch(console.error);\n\n // Load sidebar state\n bridge.api?.settings\n .get('sidebarCollapsed', UI_DEFAULTS.sidebarCollapsed)\n .then((collapsed) => {\n setSidebarCollapsed(collapsed);\n // Apply initial state to sidebar\n const sidebar = document.getElementById('app-sidebar');\n if (sidebar && collapsed) {\n sidebar.classList.add('-ml-80', 'w-0', 'p-0', 'border-0');\n }\n })\n .catch(console.error);\n\n return () => unsubscribe && unsubscribe();\n }, [bridge]);\n\n const handleMenuClick = async () => {\n const sidebar = document.getElementById('app-sidebar');\n if (!sidebar) return;\n\n const newCollapsedState = !sidebarCollapsed;\n setSidebarCollapsed(newCollapsedState);\n\n // Toggle Tailwind classes\n if (newCollapsedState) {\n sidebar.classList.add('-ml-80', 'w-0', 'p-0', 'border-0');\n } else {\n sidebar.classList.remove('-ml-80', 'w-0', 'p-0', 'border-0');\n }\n\n // Save state\n try {\n await bridge.api?.settings.set('sidebarCollapsed', newCollapsedState);\n } catch (error) {\n console.error('Failed to save sidebar state:', error);\n }\n };\n\n return (\n <SongInfoBar\n currentSong={currentSong}\n onMenuClick={handleMenuClick}\n sidebarCollapsed={sidebarCollapsed}\n />\n );\n}\n","/**\n * PlayerControls - Unified player transport controls\n *\n * Based on renderer UI (better styling than web admin)\n * Works with both ElectronBridge and WebBridge via callbacks\n */\n\nimport { useState, useEffect, useRef } from 'react';\nimport { formatDuration } from '../formatUtils.js';\n\nexport function PlayerControls({\n playback,\n currentSong,\n currentEffect,\n isLoading,\n onPlay,\n onPause,\n onRestart,\n onNext,\n onSeek,\n onPreviousEffect,\n onNextEffect,\n onOpenCanvasWindow,\n className = '',\n}) {\n const { isPlaying, position = 0, duration = 0 } = playback || {};\n\n // Smooth position interpolation for 60fps progress bar updates\n const [interpolatedPosition, setInterpolatedPosition] = useState(position);\n const lastReportedPosition = useRef(position);\n const lastReportedTime = useRef(performance.now());\n const animationFrameRef = useRef(null);\n\n // Derive loading state from currentSong if not explicitly provided\n const loading = isLoading !== undefined ? isLoading : currentSong?.isLoading || false;\n\n // Update refs when position changes from IPC\n useEffect(() => {\n lastReportedPosition.current = position;\n lastReportedTime.current = performance.now();\n setInterpolatedPosition(position);\n }, [position]);\n\n // Smooth interpolation when playing\n useEffect(() => {\n if (!isPlaying) {\n // Stop interpolation when paused\n if (animationFrameRef.current) {\n cancelAnimationFrame(animationFrameRef.current);\n animationFrameRef.current = null;\n }\n return;\n }\n\n // Interpolate position on every frame\n const animate = () => {\n const now = performance.now();\n const elapsed = (now - lastReportedTime.current) / 1000; // Convert to seconds\n const newPosition = Math.min(lastReportedPosition.current + elapsed, duration || Infinity);\n setInterpolatedPosition(newPosition);\n animationFrameRef.current = requestAnimationFrame(animate);\n };\n\n animationFrameRef.current = requestAnimationFrame(animate);\n\n return () => {\n if (animationFrameRef.current) {\n cancelAnimationFrame(animationFrameRef.current);\n }\n };\n }, [isPlaying, duration]);\n\n // Truncate effect name to 28 characters with ellipsis\n const truncateEffectName = (name) => {\n if (!name || name === 'No Effect') return name;\n return name.length > 28 ? name.substring(0, 28) + '…' : name;\n };\n\n const handleProgressClick = (e) => {\n if (!duration || !onSeek) return;\n const rect = e.currentTarget.getBoundingClientRect();\n const x = e.clientX - rect.left;\n const progress = Math.max(0, Math.min(1, x / rect.width));\n const newPosition = progress * duration;\n onSeek(newPosition);\n };\n\n // Use interpolated position for smooth 60fps progress bar\n const progress = duration > 0 ? (interpolatedPosition / duration) * 100 : 0;\n\n return (\n <div\n className={`bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 p-4 ${className}`}\n >\n <div className=\"flex items-center gap-3\">\n {/* Transport Controls */}\n <button\n onClick={onRestart}\n title=\"Restart Track\"\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition disabled:opacity-50 flex items-center justify-center\"\n disabled={loading}\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300 text-2xl leading-none\">\n replay\n </span>\n </button>\n\n <button\n onClick={isPlaying ? onPause : onPlay}\n title={loading ? 'Loading...' : isPlaying ? 'Pause' : 'Play'}\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition disabled:opacity-50 flex items-center justify-center\"\n disabled={loading}\n >\n {loading ? (\n <span className=\"material-icons text-gray-700 dark:text-gray-300 text-2xl leading-none animate-spin\">\n hourglass_empty\n </span>\n ) : (\n <span className=\"material-icons text-blue-600 dark:text-blue-400 text-2xl leading-none\">\n {isPlaying ? 'pause' : 'play_arrow'}\n </span>\n )}\n </button>\n\n <button\n onClick={onNext}\n title=\"Next Track\"\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition disabled:opacity-50 flex items-center justify-center\"\n disabled={loading}\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300 text-2xl leading-none\">\n skip_next\n </span>\n </button>\n\n {/* Progress Bar */}\n <div className=\"flex-1 mx-4\">\n <div\n className=\"relative h-2 bg-gray-200 dark:bg-gray-700 rounded-full cursor-pointer\"\n onClick={handleProgressClick}\n >\n <div\n className=\"absolute inset-y-0 left-0 bg-blue-600 rounded-full\"\n style={{ width: `${progress}%` }}\n />\n <div\n className=\"absolute top-1/2 -translate-y-1/2 w-4 h-4 bg-blue-600 rounded-full shadow-lg\"\n style={{ left: `calc(${progress}% - 8px)` }}\n />\n </div>\n </div>\n\n {/* Time Display */}\n <div className=\"flex items-center gap-1 text-sm font-mono text-gray-700 dark:text-gray-300 flex-shrink-0\">\n <span>{formatDuration(interpolatedPosition)}</span>\n <span>/</span>\n <span>{formatDuration(duration)}</span>\n </div>\n\n {/* Divider */}\n <div className=\"w-px h-8 bg-gray-200 dark:bg-gray-700 mx-2\" />\n\n {/* Effects Controls */}\n {onPreviousEffect && (\n <button\n onClick={onPreviousEffect}\n title=\"Previous Effect\"\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition flex items-center justify-center\"\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300 leading-none\">\n chevron_left\n </span>\n </button>\n )}\n <span\n className=\"px-3 py-1 bg-gray-100 dark:bg-gray-900 text-gray-700 dark:text-gray-300 rounded-lg text-sm font-medium min-w-[120px] text-center\"\n title={currentEffect || 'No Effect'}\n >\n {truncateEffectName(currentEffect || 'No Effect')}\n </span>\n {onNextEffect && (\n <button\n onClick={onNextEffect}\n title=\"Next Effect\"\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition flex items-center justify-center\"\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300 leading-none\">\n chevron_right\n </span>\n </button>\n )}\n {onOpenCanvasWindow && (\n <button\n onClick={onOpenCanvasWindow}\n className=\"p-2 hover:bg-gray-100 dark:hover:bg-gray-700 rounded-lg transition flex items-center justify-center\"\n title=\"Open Canvas Window\"\n >\n <span className=\"material-icons text-gray-700 dark:text-gray-300 leading-none\">\n open_in_new\n </span>\n </button>\n )}\n </div>\n </div>\n );\n}\n","/**\n * usePlayer - Playback control hook\n *\n * Directly controls audio engine in renderer process\n * Only uses IPC for next song (queue management in main process)\n */\n\nimport { usePlayerState } from '../contexts/PlayerContext.jsx';\nimport { useAudio } from '../contexts/AudioContext.jsx';\n\nexport function usePlayer() {\n const { currentSong, isPlaying } = usePlayerState();\n const { kaiPlayer, player } = useAudio();\n\n const togglePlayback = async () => {\n if (!currentSong || !player || !player.currentPlayer) return;\n\n if (isPlaying) {\n await player.pause();\n } else {\n await player.play();\n }\n };\n\n const play = async () => {\n if (!player || !player.currentPlayer || isPlaying) return;\n await player.play();\n };\n\n const pause = async () => {\n if (!player || !player.currentPlayer || !isPlaying) return;\n await player.pause();\n };\n\n const seek = async (positionSec) => {\n if (!player || !player.currentPlayer) return;\n\n // For KAI format, use kaiPlayer.seek()\n if (player.currentFormat === 'kai' && kaiPlayer) {\n await kaiPlayer.seek(positionSec);\n }\n // For CDG format, seek is handled differently\n else if (player.currentFormat === 'cdg' && player.cdgPlayer) {\n await player.cdgPlayer.seek(positionSec);\n }\n\n // Report state change\n if (player.currentPlayer.reportStateChange) {\n player.currentPlayer.reportStateChange();\n }\n };\n\n const restart = async () => {\n if (!player || !player.currentPlayer) return;\n\n // Seek to 0\n if (player.currentFormat === 'kai' && kaiPlayer) {\n await kaiPlayer.seek(0);\n } else if (player.currentFormat === 'cdg' && player.cdgPlayer) {\n await player.cdgPlayer.seek(0);\n }\n\n // Start playing if not already\n if (!isPlaying) {\n await player.currentPlayer.play();\n player.isPlaying = true;\n }\n\n // Report state change\n if (player.currentPlayer.reportStateChange) {\n player.currentPlayer.reportStateChange();\n }\n };\n\n const next = async () => {\n // Next song requires queue management in main process\n if (!window.kaiAPI?.player) return;\n await window.kaiAPI.player.next();\n };\n\n return {\n togglePlayback,\n play,\n pause,\n seek,\n restart,\n next,\n };\n}\n","/**\n * TransportControlsWrapper - Renderer-specific wrapper for PlayerControls\n * Uses React Context and hooks instead of bridge\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { PlayerControls } from '../../shared/components/PlayerControls.jsx';\nimport { usePlayerState } from '../../shared/contexts/PlayerContext.jsx';\nimport { usePlayer } from '../../shared/hooks/usePlayer.js';\n\nexport function TransportControlsWrapper({ bridge: _bridge }) {\n const { currentSong, isPlaying, currentPosition, duration } = usePlayerState();\n const { play, pause, restart, next, seek } = usePlayer();\n const [currentEffect, setCurrentEffect] = useState('');\n\n // Subscribe to effects state (TODO: move to EffectsContext in future)\n useEffect(() => {\n if (!window.kaiAPI?.effects) return;\n\n const handleEffectChanged = (event, effects) => {\n setCurrentEffect(effects.current || '');\n };\n\n window.kaiAPI.effects.onChanged(handleEffectChanged);\n\n return () => {\n window.kaiAPI.effects.removeChangedListener(handleEffectChanged);\n };\n }, []);\n\n // Effect callbacks (TODO: move to useEffects hook in future)\n const handlePreviousEffect = () => {\n if (window.kaiAPI?.effects) {\n window.kaiAPI.effects.previous();\n }\n };\n\n const handleNextEffect = () => {\n if (window.kaiAPI?.effects) {\n window.kaiAPI.effects.next();\n }\n };\n\n const handleOpenCanvasWindow = () => {\n if (window.kaiAPI?.window?.openCanvas) {\n window.kaiAPI.window.openCanvas();\n }\n };\n\n const playback = { isPlaying, position: currentPosition, duration };\n const isLoading = currentSong?.isLoading || false;\n\n return (\n <PlayerControls\n playback={playback}\n currentSong={currentSong}\n currentEffect={currentEffect}\n isLoading={isLoading}\n onPlay={play}\n onPause={pause}\n onRestart={restart}\n onNext={next}\n onSeek={seek}\n onPreviousEffect={handlePreviousEffect}\n onNextEffect={handleNextEffect}\n onOpenCanvasWindow={handleOpenCanvasWindow}\n />\n );\n}\n","/**\n * StatusBar - Renderer status bar component\n *\n * Displays status messages, server URL, latency, and xruns\n */\n\nimport React, { useState, useEffect } from 'react';\n\nexport function StatusBar({ bridge }) {\n const [statusText, _setStatusText] = useState('Ready');\n const [webUrl, setWebUrl] = useState(null);\n const [latency, setLatency] = useState(null);\n const [xruns, setXruns] = useState(0);\n\n useEffect(() => {\n if (!bridge) return;\n\n const unsubscribers = [];\n\n // Listen for audio latency updates\n if (bridge.onLatencyUpdate) {\n const unsubLatency = bridge.onLatencyUpdate((latencyMs) => {\n setLatency(latencyMs);\n });\n if (unsubLatency) unsubscribers.push(unsubLatency);\n }\n\n // Listen for xrun updates\n if (bridge.onXRunUpdate) {\n const unsubXrun = bridge.onXRunUpdate((count) => {\n setXruns(count);\n });\n if (unsubXrun) unsubscribers.push(unsubXrun);\n }\n\n // Get initial server URL\n if (bridge.getServerUrl) {\n bridge\n .getServerUrl()\n .then((url) => {\n setWebUrl(url || null);\n })\n .catch(console.error);\n }\n\n // Poll for server URL updates (every 5 seconds)\n const pollInterval = setInterval(() => {\n if (bridge.getServerUrl) {\n bridge\n .getServerUrl()\n .then((url) => {\n setWebUrl(url || null);\n })\n .catch(console.error);\n }\n }, 5000);\n\n return () => {\n unsubscribers.forEach((unsub) => unsub && unsub());\n clearInterval(pollInterval);\n };\n }, [bridge]);\n\n const handleUrlClick = () => {\n if (webUrl && bridge?.openExternal) {\n bridge.openExternal(webUrl);\n }\n };\n\n return (\n <div className=\"flex justify-between items-center h-6 bg-white dark:bg-gray-800 border-t border-gray-200 dark:border-gray-700 px-4 text-xs text-gray-600 dark:text-gray-400\">\n <div className=\"flex-1\">\n <span>{statusText}</span>\n </div>\n <div className=\"flex-1 text-center\">\n {webUrl && (\n <span\n className=\"text-blue-500 dark:text-blue-400 cursor-pointer hover:underline\"\n onClick={handleUrlClick}\n title=\"Click to open in browser\"\n >\n 🌐 {webUrl}\n </span>\n )}\n </div>\n <div className=\"flex-1 flex gap-4 justify-end\">\n <span>Latency: {latency !== null ? `${latency.toFixed(1)} ms` : '-- ms'}</span>\n <span>XRuns: {xruns}</span>\n </div>\n </div>\n );\n}\n","/**\n * TabNavigation - Renderer tab navigation component\n *\n * Manages tab switching between different app sections\n */\n\nimport React, { useState } from 'react';\n\nexport function TabNavigation({ requestsCount = 0 }) {\n const [activeTab, setActiveTab] = useState('player');\n\n const tabs = [\n { id: 'player', label: '🎵 Player' },\n { id: 'library', label: '📚 Library' },\n { id: 'mixer', label: '🎛️ Audio' },\n { id: 'effects', label: '✨ Effects' },\n { id: 'requests', label: '🎤 Requests', badge: requestsCount },\n { id: 'server', label: '🌐 Server' },\n { id: 'create', label: '⚡ Create' },\n { id: 'editor', label: '✏️ Edit' },\n ];\n\n const handleTabClick = (tabId) => {\n // Hide all tab panes\n document.querySelectorAll('[id$=\"-tab\"]').forEach((pane) => {\n pane.classList.add('hidden');\n pane.classList.remove('block', 'flex');\n });\n\n // Show selected tab pane\n const targetPane = document.getElementById(`${tabId}-tab`);\n if (targetPane) {\n targetPane.classList.remove('hidden');\n // Use flex for player tab to maintain layout\n if (tabId === 'player') {\n targetPane.classList.add('flex');\n } else {\n targetPane.classList.add('block');\n }\n }\n\n setActiveTab(tabId);\n\n // Handle resize for player tab to update canvas styling\n if (tabId === 'player' && window.kaiPlayerApp?.player?.karaokeRenderer?.resizeHandler) {\n setTimeout(() => {\n window.kaiPlayerApp.player.karaokeRenderer.resizeHandler();\n }, 10);\n }\n };\n\n return (\n <div className=\"flex border-b border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-800\">\n {tabs.map((tab) => (\n <button\n key={tab.id}\n className={`\n px-6 py-3 font-medium transition-colors relative inline-flex items-center gap-2\n ${\n activeTab === tab.id\n ? 'text-blue-600 dark:text-blue-400 border-b-2 border-blue-600 dark:border-blue-400 bg-gray-50 dark:bg-gray-900'\n : 'text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-200 hover:bg-gray-50 dark:hover:bg-gray-700'\n }\n `}\n onClick={() => handleTabClick(tab.id)}\n >\n {tab.label}\n {tab.badge > 0 && (\n <span className=\"inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 bg-red-600 text-white rounded-full text-xs font-semibold\">\n {tab.badge}\n </span>\n )}\n </button>\n ))}\n </div>\n );\n}\n","// can-promise has a crash in some versions of react native that dont have\n// standard global objects\n// https://github.com/soldair/node-qrcode/issues/157\n\nmodule.exports = function () {\n return typeof Promise === 'function' && Promise.prototype && Promise.prototype.then\n}\n","let toSJISFunction\nconst CODEWORDS_COUNT = [\n 0, // Not used\n 26, 44, 70, 100, 134, 172, 196, 242, 292, 346,\n 404, 466, 532, 581, 655, 733, 815, 901, 991, 1085,\n 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051, 2185,\n 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706\n]\n\n/**\n * Returns the QR Code size for the specified version\n *\n * @param {Number} version QR Code version\n * @return {Number} size of QR code\n */\nexports.getSymbolSize = function getSymbolSize (version) {\n if (!version) throw new Error('\"version\" cannot be null or undefined')\n if (version < 1 || version > 40) throw new Error('\"version\" should be in range from 1 to 40')\n return version * 4 + 17\n}\n\n/**\n * Returns the total number of codewords used to store data and EC information.\n *\n * @param {Number} version QR Code version\n * @return {Number} Data length in bits\n */\nexports.getSymbolTotalCodewords = function getSymbolTotalCodewords (version) {\n return CODEWORDS_COUNT[version]\n}\n\n/**\n * Encode data with Bose-Chaudhuri-Hocquenghem\n *\n * @param {Number} data Value to encode\n * @return {Number} Encoded value\n */\nexports.getBCHDigit = function (data) {\n let digit = 0\n\n while (data !== 0) {\n digit++\n data >>>= 1\n }\n\n return digit\n}\n\nexports.setToSJISFunction = function setToSJISFunction (f) {\n if (typeof f !== 'function') {\n throw new Error('\"toSJISFunc\" is not a valid function.')\n }\n\n toSJISFunction = f\n}\n\nexports.isKanjiModeEnabled = function () {\n return typeof toSJISFunction !== 'undefined'\n}\n\nexports.toSJIS = function toSJIS (kanji) {\n return toSJISFunction(kanji)\n}\n","exports.L = { bit: 1 }\nexports.M = { bit: 0 }\nexports.Q = { bit: 3 }\nexports.H = { bit: 2 }\n\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'l':\n case 'low':\n return exports.L\n\n case 'm':\n case 'medium':\n return exports.M\n\n case 'q':\n case 'quartile':\n return exports.Q\n\n case 'h':\n case 'high':\n return exports.H\n\n default:\n throw new Error('Unknown EC Level: ' + string)\n }\n}\n\nexports.isValid = function isValid (level) {\n return level && typeof level.bit !== 'undefined' &&\n level.bit >= 0 && level.bit < 4\n}\n\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","function BitBuffer () {\n this.buffer = []\n this.length = 0\n}\n\nBitBuffer.prototype = {\n\n get: function (index) {\n const bufIndex = Math.floor(index / 8)\n return ((this.buffer[bufIndex] >>> (7 - index % 8)) & 1) === 1\n },\n\n put: function (num, length) {\n for (let i = 0; i < length; i++) {\n this.putBit(((num >>> (length - i - 1)) & 1) === 1)\n }\n },\n\n getLengthInBits: function () {\n return this.length\n },\n\n putBit: function (bit) {\n const bufIndex = Math.floor(this.length / 8)\n if (this.buffer.length <= bufIndex) {\n this.buffer.push(0)\n }\n\n if (bit) {\n this.buffer[bufIndex] |= (0x80 >>> (this.length % 8))\n }\n\n this.length++\n }\n}\n\nmodule.exports = BitBuffer\n","/**\n * Helper class to handle QR Code symbol modules\n *\n * @param {Number} size Symbol size\n */\nfunction BitMatrix (size) {\n if (!size || size < 1) {\n throw new Error('BitMatrix size must be defined and greater than 0')\n }\n\n this.size = size\n this.data = new Uint8Array(size * size)\n this.reservedBit = new Uint8Array(size * size)\n}\n\n/**\n * Set bit value at specified location\n * If reserved flag is set, this bit will be ignored during masking process\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n * @param {Boolean} reserved\n */\nBitMatrix.prototype.set = function (row, col, value, reserved) {\n const index = row * this.size + col\n this.data[index] = value\n if (reserved) this.reservedBit[index] = true\n}\n\n/**\n * Returns bit value at specified location\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.get = function (row, col) {\n return this.data[row * this.size + col]\n}\n\n/**\n * Applies xor operator at specified location\n * (used during masking process)\n *\n * @param {Number} row\n * @param {Number} col\n * @param {Boolean} value\n */\nBitMatrix.prototype.xor = function (row, col, value) {\n this.data[row * this.size + col] ^= value\n}\n\n/**\n * Check if bit at specified location is reserved\n *\n * @param {Number} row\n * @param {Number} col\n * @return {Boolean}\n */\nBitMatrix.prototype.isReserved = function (row, col) {\n return this.reservedBit[row * this.size + col]\n}\n\nmodule.exports = BitMatrix\n","/**\n * Alignment pattern are fixed reference pattern in defined positions\n * in a matrix symbology, which enables the decode software to re-synchronise\n * the coordinate mapping of the image modules in the event of moderate amounts\n * of distortion of the image.\n *\n * Alignment patterns are present only in QR Code symbols of version 2 or larger\n * and their number depends on the symbol version.\n */\n\nconst getSymbolSize = require('./utils').getSymbolSize\n\n/**\n * Calculate the row/column coordinates of the center module of each alignment pattern\n * for the specified QR Code version.\n *\n * The alignment patterns are positioned symmetrically on either side of the diagonal\n * running from the top left corner of the symbol to the bottom right corner.\n *\n * Since positions are simmetrical only half of the coordinates are returned.\n * Each item of the array will represent in turn the x and y coordinate.\n * @see {@link getPositions}\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinate\n */\nexports.getRowColCoords = function getRowColCoords (version) {\n if (version === 1) return []\n\n const posCount = Math.floor(version / 7) + 2\n const size = getSymbolSize(version)\n const intervals = size === 145 ? 26 : Math.ceil((size - 13) / (2 * posCount - 2)) * 2\n const positions = [size - 7] // Last coord is always (size - 7)\n\n for (let i = 1; i < posCount - 1; i++) {\n positions[i] = positions[i - 1] - intervals\n }\n\n positions.push(6) // First coord is always 6\n\n return positions.reverse()\n}\n\n/**\n * Returns an array containing the positions of each alignment pattern.\n * Each array's element represent the center point of the pattern as (x, y) coordinates\n *\n * Coordinates are calculated expanding the row/column coordinates returned by {@link getRowColCoords}\n * and filtering out the items that overlaps with finder pattern\n *\n * @example\n * For a Version 7 symbol {@link getRowColCoords} returns values 6, 22 and 38.\n * The alignment patterns, therefore, are to be centered on (row, column)\n * positions (6,22), (22,6), (22,22), (22,38), (38,22), (38,38).\n * Note that the coordinates (6,6), (6,38), (38,6) are occupied by finder patterns\n * and are not therefore used for alignment patterns.\n *\n * let pos = getPositions(7)\n * // [[6,22], [22,6], [22,22], [22,38], [38,22], [38,38]]\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const coords = []\n const pos = exports.getRowColCoords(version)\n const posLength = pos.length\n\n for (let i = 0; i < posLength; i++) {\n for (let j = 0; j < posLength; j++) {\n // Skip if position is occupied by finder patterns\n if ((i === 0 && j === 0) || // top-left\n (i === 0 && j === posLength - 1) || // bottom-left\n (i === posLength - 1 && j === 0)) { // top-right\n continue\n }\n\n coords.push([pos[i], pos[j]])\n }\n }\n\n return coords\n}\n","const getSymbolSize = require('./utils').getSymbolSize\nconst FINDER_PATTERN_SIZE = 7\n\n/**\n * Returns an array containing the positions of each finder pattern.\n * Each array's element represent the top-left point of the pattern as (x, y) coordinates\n *\n * @param {Number} version QR Code version\n * @return {Array} Array of coordinates\n */\nexports.getPositions = function getPositions (version) {\n const size = getSymbolSize(version)\n\n return [\n // top-left\n [0, 0],\n // top-right\n [size - FINDER_PATTERN_SIZE, 0],\n // bottom-left\n [0, size - FINDER_PATTERN_SIZE]\n ]\n}\n","/**\n * Data mask pattern reference\n * @type {Object}\n */\nexports.Patterns = {\n PATTERN000: 0,\n PATTERN001: 1,\n PATTERN010: 2,\n PATTERN011: 3,\n PATTERN100: 4,\n PATTERN101: 5,\n PATTERN110: 6,\n PATTERN111: 7\n}\n\n/**\n * Weighted penalty scores for the undesirable features\n * @type {Object}\n */\nconst PenaltyScores = {\n N1: 3,\n N2: 3,\n N3: 40,\n N4: 10\n}\n\n/**\n * Check if mask pattern value is valid\n *\n * @param {Number} mask Mask pattern\n * @return {Boolean} true if valid, false otherwise\n */\nexports.isValid = function isValid (mask) {\n return mask != null && mask !== '' && !isNaN(mask) && mask >= 0 && mask <= 7\n}\n\n/**\n * Returns mask pattern from a value.\n * If value is not valid, returns undefined\n *\n * @param {Number|String} value Mask pattern value\n * @return {Number} Valid mask pattern or undefined\n */\nexports.from = function from (value) {\n return exports.isValid(value) ? parseInt(value, 10) : undefined\n}\n\n/**\n* Find adjacent modules in row/column with the same color\n* and assign a penalty value.\n*\n* Points: N1 + i\n* i is the amount by which the number of adjacent modules of the same color exceeds 5\n*/\nexports.getPenaltyN1 = function getPenaltyN1 (data) {\n const size = data.size\n let points = 0\n let sameCountCol = 0\n let sameCountRow = 0\n let lastCol = null\n let lastRow = null\n\n for (let row = 0; row < size; row++) {\n sameCountCol = sameCountRow = 0\n lastCol = lastRow = null\n\n for (let col = 0; col < size; col++) {\n let module = data.get(row, col)\n if (module === lastCol) {\n sameCountCol++\n } else {\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n lastCol = module\n sameCountCol = 1\n }\n\n module = data.get(col, row)\n if (module === lastRow) {\n sameCountRow++\n } else {\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n lastRow = module\n sameCountRow = 1\n }\n }\n\n if (sameCountCol >= 5) points += PenaltyScores.N1 + (sameCountCol - 5)\n if (sameCountRow >= 5) points += PenaltyScores.N1 + (sameCountRow - 5)\n }\n\n return points\n}\n\n/**\n * Find 2x2 blocks with the same color and assign a penalty value\n *\n * Points: N2 * (m - 1) * (n - 1)\n */\nexports.getPenaltyN2 = function getPenaltyN2 (data) {\n const size = data.size\n let points = 0\n\n for (let row = 0; row < size - 1; row++) {\n for (let col = 0; col < size - 1; col++) {\n const last = data.get(row, col) +\n data.get(row, col + 1) +\n data.get(row + 1, col) +\n data.get(row + 1, col + 1)\n\n if (last === 4 || last === 0) points++\n }\n }\n\n return points * PenaltyScores.N2\n}\n\n/**\n * Find 1:1:3:1:1 ratio (dark:light:dark:light:dark) pattern in row/column,\n * preceded or followed by light area 4 modules wide\n *\n * Points: N3 * number of pattern found\n */\nexports.getPenaltyN3 = function getPenaltyN3 (data) {\n const size = data.size\n let points = 0\n let bitsCol = 0\n let bitsRow = 0\n\n for (let row = 0; row < size; row++) {\n bitsCol = bitsRow = 0\n for (let col = 0; col < size; col++) {\n bitsCol = ((bitsCol << 1) & 0x7FF) | data.get(row, col)\n if (col >= 10 && (bitsCol === 0x5D0 || bitsCol === 0x05D)) points++\n\n bitsRow = ((bitsRow << 1) & 0x7FF) | data.get(col, row)\n if (col >= 10 && (bitsRow === 0x5D0 || bitsRow === 0x05D)) points++\n }\n }\n\n return points * PenaltyScores.N3\n}\n\n/**\n * Calculate proportion of dark modules in entire symbol\n *\n * Points: N4 * k\n *\n * k is the rating of the deviation of the proportion of dark modules\n * in the symbol from 50% in steps of 5%\n */\nexports.getPenaltyN4 = function getPenaltyN4 (data) {\n let darkCount = 0\n const modulesCount = data.data.length\n\n for (let i = 0; i < modulesCount; i++) darkCount += data.data[i]\n\n const k = Math.abs(Math.ceil((darkCount * 100 / modulesCount) / 5) - 10)\n\n return k * PenaltyScores.N4\n}\n\n/**\n * Return mask value at given position\n *\n * @param {Number} maskPattern Pattern reference value\n * @param {Number} i Row\n * @param {Number} j Column\n * @return {Boolean} Mask value\n */\nfunction getMaskAt (maskPattern, i, j) {\n switch (maskPattern) {\n case exports.Patterns.PATTERN000: return (i + j) % 2 === 0\n case exports.Patterns.PATTERN001: return i % 2 === 0\n case exports.Patterns.PATTERN010: return j % 3 === 0\n case exports.Patterns.PATTERN011: return (i + j) % 3 === 0\n case exports.Patterns.PATTERN100: return (Math.floor(i / 2) + Math.floor(j / 3)) % 2 === 0\n case exports.Patterns.PATTERN101: return (i * j) % 2 + (i * j) % 3 === 0\n case exports.Patterns.PATTERN110: return ((i * j) % 2 + (i * j) % 3) % 2 === 0\n case exports.Patterns.PATTERN111: return ((i * j) % 3 + (i + j) % 2) % 2 === 0\n\n default: throw new Error('bad maskPattern:' + maskPattern)\n }\n}\n\n/**\n * Apply a mask pattern to a BitMatrix\n *\n * @param {Number} pattern Pattern reference number\n * @param {BitMatrix} data BitMatrix data\n */\nexports.applyMask = function applyMask (pattern, data) {\n const size = data.size\n\n for (let col = 0; col < size; col++) {\n for (let row = 0; row < size; row++) {\n if (data.isReserved(row, col)) continue\n data.xor(row, col, getMaskAt(pattern, row, col))\n }\n }\n}\n\n/**\n * Returns the best mask pattern for data\n *\n * @param {BitMatrix} data\n * @return {Number} Mask pattern reference number\n */\nexports.getBestMask = function getBestMask (data, setupFormatFunc) {\n const numPatterns = Object.keys(exports.Patterns).length\n let bestPattern = 0\n let lowerPenalty = Infinity\n\n for (let p = 0; p < numPatterns; p++) {\n setupFormatFunc(p)\n exports.applyMask(p, data)\n\n // Calculate penalty\n const penalty =\n exports.getPenaltyN1(data) +\n exports.getPenaltyN2(data) +\n exports.getPenaltyN3(data) +\n exports.getPenaltyN4(data)\n\n // Undo previously applied mask\n exports.applyMask(p, data)\n\n if (penalty < lowerPenalty) {\n lowerPenalty = penalty\n bestPattern = p\n }\n }\n\n return bestPattern\n}\n","const ECLevel = require('./error-correction-level')\r\n\r\nconst EC_BLOCKS_TABLE = [\r\n// L M Q H\r\n 1, 1, 1, 1,\r\n 1, 1, 1, 1,\r\n 1, 1, 2, 2,\r\n 1, 2, 2, 4,\r\n 1, 2, 4, 4,\r\n 2, 4, 4, 4,\r\n 2, 4, 6, 5,\r\n 2, 4, 6, 6,\r\n 2, 5, 8, 8,\r\n 4, 5, 8, 8,\r\n 4, 5, 8, 11,\r\n 4, 8, 10, 11,\r\n 4, 9, 12, 16,\r\n 4, 9, 16, 16,\r\n 6, 10, 12, 18,\r\n 6, 10, 17, 16,\r\n 6, 11, 16, 19,\r\n 6, 13, 18, 21,\r\n 7, 14, 21, 25,\r\n 8, 16, 20, 25,\r\n 8, 17, 23, 25,\r\n 9, 17, 23, 34,\r\n 9, 18, 25, 30,\r\n 10, 20, 27, 32,\r\n 12, 21, 29, 35,\r\n 12, 23, 34, 37,\r\n 12, 25, 34, 40,\r\n 13, 26, 35, 42,\r\n 14, 28, 38, 45,\r\n 15, 29, 40, 48,\r\n 16, 31, 43, 51,\r\n 17, 33, 45, 54,\r\n 18, 35, 48, 57,\r\n 19, 37, 51, 60,\r\n 19, 38, 53, 63,\r\n 20, 40, 56, 66,\r\n 21, 43, 59, 70,\r\n 22, 45, 62, 74,\r\n 24, 47, 65, 77,\r\n 25, 49, 68, 81\r\n]\r\n\r\nconst EC_CODEWORDS_TABLE = [\r\n// L M Q H\r\n 7, 10, 13, 17,\r\n 10, 16, 22, 28,\r\n 15, 26, 36, 44,\r\n 20, 36, 52, 64,\r\n 26, 48, 72, 88,\r\n 36, 64, 96, 112,\r\n 40, 72, 108, 130,\r\n 48, 88, 132, 156,\r\n 60, 110, 160, 192,\r\n 72, 130, 192, 224,\r\n 80, 150, 224, 264,\r\n 96, 176, 260, 308,\r\n 104, 198, 288, 352,\r\n 120, 216, 320, 384,\r\n 132, 240, 360, 432,\r\n 144, 280, 408, 480,\r\n 168, 308, 448, 532,\r\n 180, 338, 504, 588,\r\n 196, 364, 546, 650,\r\n 224, 416, 600, 700,\r\n 224, 442, 644, 750,\r\n 252, 476, 690, 816,\r\n 270, 504, 750, 900,\r\n 300, 560, 810, 960,\r\n 312, 588, 870, 1050,\r\n 336, 644, 952, 1110,\r\n 360, 700, 1020, 1200,\r\n 390, 728, 1050, 1260,\r\n 420, 784, 1140, 1350,\r\n 450, 812, 1200, 1440,\r\n 480, 868, 1290, 1530,\r\n 510, 924, 1350, 1620,\r\n 540, 980, 1440, 1710,\r\n 570, 1036, 1530, 1800,\r\n 570, 1064, 1590, 1890,\r\n 600, 1120, 1680, 1980,\r\n 630, 1204, 1770, 2100,\r\n 660, 1260, 1860, 2220,\r\n 720, 1316, 1950, 2310,\r\n 750, 1372, 2040, 2430\r\n]\r\n\r\n/**\r\n * Returns the number of error correction block that the QR Code should contain\r\n * for the specified version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction blocks\r\n */\r\nexports.getBlocksCount = function getBlocksCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_BLOCKS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n\r\n/**\r\n * Returns the number of error correction codewords to use for the specified\r\n * version and error correction level.\r\n *\r\n * @param {Number} version QR Code version\r\n * @param {Number} errorCorrectionLevel Error correction level\r\n * @return {Number} Number of error correction codewords\r\n */\r\nexports.getTotalCodewordsCount = function getTotalCodewordsCount (version, errorCorrectionLevel) {\r\n switch (errorCorrectionLevel) {\r\n case ECLevel.L:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 0]\r\n case ECLevel.M:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 1]\r\n case ECLevel.Q:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 2]\r\n case ECLevel.H:\r\n return EC_CODEWORDS_TABLE[(version - 1) * 4 + 3]\r\n default:\r\n return undefined\r\n }\r\n}\r\n","const EXP_TABLE = new Uint8Array(512)\nconst LOG_TABLE = new Uint8Array(256)\n/**\n * Precompute the log and anti-log tables for faster computation later\n *\n * For each possible value in the galois field 2^8, we will pre-compute\n * the logarithm and anti-logarithm (exponential) of this value\n *\n * ref {@link https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_for_coders#Introduction_to_mathematical_fields}\n */\n;(function initTables () {\n let x = 1\n for (let i = 0; i < 255; i++) {\n EXP_TABLE[i] = x\n LOG_TABLE[x] = i\n\n x <<= 1 // multiply by 2\n\n // The QR code specification says to use byte-wise modulo 100011101 arithmetic.\n // This means that when a number is 256 or larger, it should be XORed with 0x11D.\n if (x & 0x100) { // similar to x >= 256, but a lot faster (because 0x100 == 256)\n x ^= 0x11D\n }\n }\n\n // Optimization: double the size of the anti-log table so that we don't need to mod 255 to\n // stay inside the bounds (because we will mainly use this table for the multiplication of\n // two GF numbers, no more).\n // @see {@link mul}\n for (let i = 255; i < 512; i++) {\n EXP_TABLE[i] = EXP_TABLE[i - 255]\n }\n}())\n\n/**\n * Returns log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.log = function log (n) {\n if (n < 1) throw new Error('log(' + n + ')')\n return LOG_TABLE[n]\n}\n\n/**\n * Returns anti-log value of n inside Galois Field\n *\n * @param {Number} n\n * @return {Number}\n */\nexports.exp = function exp (n) {\n return EXP_TABLE[n]\n}\n\n/**\n * Multiplies two number inside Galois Field\n *\n * @param {Number} x\n * @param {Number} y\n * @return {Number}\n */\nexports.mul = function mul (x, y) {\n if (x === 0 || y === 0) return 0\n\n // should be EXP_TABLE[(LOG_TABLE[x] + LOG_TABLE[y]) % 255] if EXP_TABLE wasn't oversized\n // @see {@link initTables}\n return EXP_TABLE[LOG_TABLE[x] + LOG_TABLE[y]]\n}\n","const GF = require('./galois-field')\n\n/**\n * Multiplies two polynomials inside Galois Field\n *\n * @param {Uint8Array} p1 Polynomial\n * @param {Uint8Array} p2 Polynomial\n * @return {Uint8Array} Product of p1 and p2\n */\nexports.mul = function mul (p1, p2) {\n const coeff = new Uint8Array(p1.length + p2.length - 1)\n\n for (let i = 0; i < p1.length; i++) {\n for (let j = 0; j < p2.length; j++) {\n coeff[i + j] ^= GF.mul(p1[i], p2[j])\n }\n }\n\n return coeff\n}\n\n/**\n * Calculate the remainder of polynomials division\n *\n * @param {Uint8Array} divident Polynomial\n * @param {Uint8Array} divisor Polynomial\n * @return {Uint8Array} Remainder\n */\nexports.mod = function mod (divident, divisor) {\n let result = new Uint8Array(divident)\n\n while ((result.length - divisor.length) >= 0) {\n const coeff = result[0]\n\n for (let i = 0; i < divisor.length; i++) {\n result[i] ^= GF.mul(divisor[i], coeff)\n }\n\n // remove all zeros from buffer head\n let offset = 0\n while (offset < result.length && result[offset] === 0) offset++\n result = result.slice(offset)\n }\n\n return result\n}\n\n/**\n * Generate an irreducible generator polynomial of specified degree\n * (used by Reed-Solomon encoder)\n *\n * @param {Number} degree Degree of the generator polynomial\n * @return {Uint8Array} Buffer containing polynomial coefficients\n */\nexports.generateECPolynomial = function generateECPolynomial (degree) {\n let poly = new Uint8Array([1])\n for (let i = 0; i < degree; i++) {\n poly = exports.mul(poly, new Uint8Array([1, GF.exp(i)]))\n }\n\n return poly\n}\n","const Polynomial = require('./polynomial')\n\nfunction ReedSolomonEncoder (degree) {\n this.genPoly = undefined\n this.degree = degree\n\n if (this.degree) this.initialize(this.degree)\n}\n\n/**\n * Initialize the encoder.\n * The input param should correspond to the number of error correction codewords.\n *\n * @param {Number} degree\n */\nReedSolomonEncoder.prototype.initialize = function initialize (degree) {\n // create an irreducible generator polynomial\n this.degree = degree\n this.genPoly = Polynomial.generateECPolynomial(this.degree)\n}\n\n/**\n * Encodes a chunk of data\n *\n * @param {Uint8Array} data Buffer containing input data\n * @return {Uint8Array} Buffer containing encoded data\n */\nReedSolomonEncoder.prototype.encode = function encode (data) {\n if (!this.genPoly) {\n throw new Error('Encoder not initialized')\n }\n\n // Calculate EC for this data block\n // extends data size to data+genPoly size\n const paddedData = new Uint8Array(data.length + this.degree)\n paddedData.set(data)\n\n // The error correction codewords are the remainder after dividing the data codewords\n // by a generator polynomial\n const remainder = Polynomial.mod(paddedData, this.genPoly)\n\n // return EC data blocks (last n byte, where n is the degree of genPoly)\n // If coefficients number in remainder are less than genPoly degree,\n // pad with 0s to the left to reach the needed number of coefficients\n const start = this.degree - remainder.length\n if (start > 0) {\n const buff = new Uint8Array(this.degree)\n buff.set(remainder, start)\n\n return buff\n }\n\n return remainder\n}\n\nmodule.exports = ReedSolomonEncoder\n","/**\n * Check if QR Code version is valid\n *\n * @param {Number} version QR Code version\n * @return {Boolean} true if valid version, false otherwise\n */\nexports.isValid = function isValid (version) {\n return !isNaN(version) && version >= 1 && version <= 40\n}\n","const numeric = '[0-9]+'\nconst alphanumeric = '[A-Z $%*+\\\\-./:]+'\nlet kanji = '(?:[u3000-u303F]|[u3040-u309F]|[u30A0-u30FF]|' +\n '[uFF00-uFFEF]|[u4E00-u9FAF]|[u2605-u2606]|[u2190-u2195]|u203B|' +\n '[u2010u2015u2018u2019u2025u2026u201Cu201Du2225u2260]|' +\n '[u0391-u0451]|[u00A7u00A8u00B1u00B4u00D7u00F7])+'\nkanji = kanji.replace(/u/g, '\\\\u')\n\nconst byte = '(?:(?![A-Z0-9 $%*+\\\\-./:]|' + kanji + ')(?:.|[\\r\\n]))+'\n\nexports.KANJI = new RegExp(kanji, 'g')\nexports.BYTE_KANJI = new RegExp('[^A-Z0-9 $%*+\\\\-./:]+', 'g')\nexports.BYTE = new RegExp(byte, 'g')\nexports.NUMERIC = new RegExp(numeric, 'g')\nexports.ALPHANUMERIC = new RegExp(alphanumeric, 'g')\n\nconst TEST_KANJI = new RegExp('^' + kanji + '$')\nconst TEST_NUMERIC = new RegExp('^' + numeric + '$')\nconst TEST_ALPHANUMERIC = new RegExp('^[A-Z0-9 $%*+\\\\-./:]+$')\n\nexports.testKanji = function testKanji (str) {\n return TEST_KANJI.test(str)\n}\n\nexports.testNumeric = function testNumeric (str) {\n return TEST_NUMERIC.test(str)\n}\n\nexports.testAlphanumeric = function testAlphanumeric (str) {\n return TEST_ALPHANUMERIC.test(str)\n}\n","const VersionCheck = require('./version-check')\nconst Regex = require('./regex')\n\n/**\n * Numeric mode encodes data from the decimal digit set (0 - 9)\n * (byte values 30HEX to 39HEX).\n * Normally, 3 data characters are represented by 10 bits.\n *\n * @type {Object}\n */\nexports.NUMERIC = {\n id: 'Numeric',\n bit: 1 << 0,\n ccBits: [10, 12, 14]\n}\n\n/**\n * Alphanumeric mode encodes data from a set of 45 characters,\n * i.e. 10 numeric digits (0 - 9),\n * 26 alphabetic characters (A - Z),\n * and 9 symbols (SP, $, %, *, +, -, ., /, :).\n * Normally, two input characters are represented by 11 bits.\n *\n * @type {Object}\n */\nexports.ALPHANUMERIC = {\n id: 'Alphanumeric',\n bit: 1 << 1,\n ccBits: [9, 11, 13]\n}\n\n/**\n * In byte mode, data is encoded at 8 bits per character.\n *\n * @type {Object}\n */\nexports.BYTE = {\n id: 'Byte',\n bit: 1 << 2,\n ccBits: [8, 16, 16]\n}\n\n/**\n * The Kanji mode efficiently encodes Kanji characters in accordance with\n * the Shift JIS system based on JIS X 0208.\n * The Shift JIS values are shifted from the JIS X 0208 values.\n * JIS X 0208 gives details of the shift coded representation.\n * Each two-byte character value is compacted to a 13-bit binary codeword.\n *\n * @type {Object}\n */\nexports.KANJI = {\n id: 'Kanji',\n bit: 1 << 3,\n ccBits: [8, 10, 12]\n}\n\n/**\n * Mixed mode will contain a sequences of data in a combination of any of\n * the modes described above\n *\n * @type {Object}\n */\nexports.MIXED = {\n bit: -1\n}\n\n/**\n * Returns the number of bits needed to store the data length\n * according to QR Code specifications.\n *\n * @param {Mode} mode Data mode\n * @param {Number} version QR Code version\n * @return {Number} Number of bits\n */\nexports.getCharCountIndicator = function getCharCountIndicator (mode, version) {\n if (!mode.ccBits) throw new Error('Invalid mode: ' + mode)\n\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid version: ' + version)\n }\n\n if (version >= 1 && version < 10) return mode.ccBits[0]\n else if (version < 27) return mode.ccBits[1]\n return mode.ccBits[2]\n}\n\n/**\n * Returns the most efficient mode to store the specified data\n *\n * @param {String} dataStr Input data string\n * @return {Mode} Best mode\n */\nexports.getBestModeForData = function getBestModeForData (dataStr) {\n if (Regex.testNumeric(dataStr)) return exports.NUMERIC\n else if (Regex.testAlphanumeric(dataStr)) return exports.ALPHANUMERIC\n else if (Regex.testKanji(dataStr)) return exports.KANJI\n else return exports.BYTE\n}\n\n/**\n * Return mode name as string\n *\n * @param {Mode} mode Mode object\n * @returns {String} Mode name\n */\nexports.toString = function toString (mode) {\n if (mode && mode.id) return mode.id\n throw new Error('Invalid mode')\n}\n\n/**\n * Check if input param is a valid mode object\n *\n * @param {Mode} mode Mode object\n * @returns {Boolean} True if valid mode, false otherwise\n */\nexports.isValid = function isValid (mode) {\n return mode && mode.bit && mode.ccBits\n}\n\n/**\n * Get mode object from its name\n *\n * @param {String} string Mode name\n * @returns {Mode} Mode object\n */\nfunction fromString (string) {\n if (typeof string !== 'string') {\n throw new Error('Param is not a string')\n }\n\n const lcStr = string.toLowerCase()\n\n switch (lcStr) {\n case 'numeric':\n return exports.NUMERIC\n case 'alphanumeric':\n return exports.ALPHANUMERIC\n case 'kanji':\n return exports.KANJI\n case 'byte':\n return exports.BYTE\n default:\n throw new Error('Unknown mode: ' + string)\n }\n}\n\n/**\n * Returns mode from a value.\n * If value is not a valid mode, returns defaultValue\n *\n * @param {Mode|String} value Encoding mode\n * @param {Mode} defaultValue Fallback value\n * @return {Mode} Encoding mode\n */\nexports.from = function from (value, defaultValue) {\n if (exports.isValid(value)) {\n return value\n }\n\n try {\n return fromString(value)\n } catch (e) {\n return defaultValue\n }\n}\n","const Utils = require('./utils')\nconst ECCode = require('./error-correction-code')\nconst ECLevel = require('./error-correction-level')\nconst Mode = require('./mode')\nconst VersionCheck = require('./version-check')\n\n// Generator polynomial used to encode version information\nconst G18 = (1 << 12) | (1 << 11) | (1 << 10) | (1 << 9) | (1 << 8) | (1 << 5) | (1 << 2) | (1 << 0)\nconst G18_BCH = Utils.getBCHDigit(G18)\n\nfunction getBestVersionForDataLength (mode, length, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, mode)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\nfunction getReservedBitsCount (mode, version) {\n // Character count indicator + mode indicator bits\n return Mode.getCharCountIndicator(mode, version) + 4\n}\n\nfunction getTotalBitsFromDataArray (segments, version) {\n let totalBits = 0\n\n segments.forEach(function (data) {\n const reservedBits = getReservedBitsCount(data.mode, version)\n totalBits += reservedBits + data.getBitsLength()\n })\n\n return totalBits\n}\n\nfunction getBestVersionForMixedData (segments, errorCorrectionLevel) {\n for (let currentVersion = 1; currentVersion <= 40; currentVersion++) {\n const length = getTotalBitsFromDataArray(segments, currentVersion)\n if (length <= exports.getCapacity(currentVersion, errorCorrectionLevel, Mode.MIXED)) {\n return currentVersion\n }\n }\n\n return undefined\n}\n\n/**\n * Returns version number from a value.\n * If value is not a valid version, returns defaultValue\n *\n * @param {Number|String} value QR Code version\n * @param {Number} defaultValue Fallback value\n * @return {Number} QR Code version number\n */\nexports.from = function from (value, defaultValue) {\n if (VersionCheck.isValid(value)) {\n return parseInt(value, 10)\n }\n\n return defaultValue\n}\n\n/**\n * Returns how much data can be stored with the specified QR code version\n * and error correction level\n *\n * @param {Number} version QR Code version (1-40)\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} Quantity of storable data\n */\nexports.getCapacity = function getCapacity (version, errorCorrectionLevel, mode) {\n if (!VersionCheck.isValid(version)) {\n throw new Error('Invalid QR Code version')\n }\n\n // Use Byte mode as default\n if (typeof mode === 'undefined') mode = Mode.BYTE\n\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n if (mode === Mode.MIXED) return dataTotalCodewordsBits\n\n const usableBits = dataTotalCodewordsBits - getReservedBitsCount(mode, version)\n\n // Return max number of storable codewords\n switch (mode) {\n case Mode.NUMERIC:\n return Math.floor((usableBits / 10) * 3)\n\n case Mode.ALPHANUMERIC:\n return Math.floor((usableBits / 11) * 2)\n\n case Mode.KANJI:\n return Math.floor(usableBits / 13)\n\n case Mode.BYTE:\n default:\n return Math.floor(usableBits / 8)\n }\n}\n\n/**\n * Returns the minimum version needed to contain the amount of data\n *\n * @param {Segment} data Segment of data\n * @param {Number} [errorCorrectionLevel=H] Error correction level\n * @param {Mode} mode Data mode\n * @return {Number} QR Code version\n */\nexports.getBestVersionForData = function getBestVersionForData (data, errorCorrectionLevel) {\n let seg\n\n const ecl = ECLevel.from(errorCorrectionLevel, ECLevel.M)\n\n if (Array.isArray(data)) {\n if (data.length > 1) {\n return getBestVersionForMixedData(data, ecl)\n }\n\n if (data.length === 0) {\n return 1\n }\n\n seg = data[0]\n } else {\n seg = data\n }\n\n return getBestVersionForDataLength(seg.mode, seg.getLength(), ecl)\n}\n\n/**\n * Returns version information with relative error correction bits\n *\n * The version information is included in QR Code symbols of version 7 or larger.\n * It consists of an 18-bit sequence containing 6 data bits,\n * with 12 error correction bits calculated using the (18, 6) Golay code.\n *\n * @param {Number} version QR Code version\n * @return {Number} Encoded version info bits\n */\nexports.getEncodedBits = function getEncodedBits (version) {\n if (!VersionCheck.isValid(version) || version < 7) {\n throw new Error('Invalid QR Code version')\n }\n\n let d = version << 12\n\n while (Utils.getBCHDigit(d) - G18_BCH >= 0) {\n d ^= (G18 << (Utils.getBCHDigit(d) - G18_BCH))\n }\n\n return (version << 12) | d\n}\n","const Utils = require('./utils')\n\nconst G15 = (1 << 10) | (1 << 8) | (1 << 5) | (1 << 4) | (1 << 2) | (1 << 1) | (1 << 0)\nconst G15_MASK = (1 << 14) | (1 << 12) | (1 << 10) | (1 << 4) | (1 << 1)\nconst G15_BCH = Utils.getBCHDigit(G15)\n\n/**\n * Returns format information with relative error correction bits\n *\n * The format information is a 15-bit sequence containing 5 data bits,\n * with 10 error correction bits calculated using the (15, 5) BCH code.\n *\n * @param {Number} errorCorrectionLevel Error correction level\n * @param {Number} mask Mask pattern\n * @return {Number} Encoded format information bits\n */\nexports.getEncodedBits = function getEncodedBits (errorCorrectionLevel, mask) {\n const data = ((errorCorrectionLevel.bit << 3) | mask)\n let d = data << 10\n\n while (Utils.getBCHDigit(d) - G15_BCH >= 0) {\n d ^= (G15 << (Utils.getBCHDigit(d) - G15_BCH))\n }\n\n // xor final data with mask pattern in order to ensure that\n // no combination of Error Correction Level and data mask pattern\n // will result in an all-zero data string\n return ((data << 10) | d) ^ G15_MASK\n}\n","const Mode = require('./mode')\n\nfunction NumericData (data) {\n this.mode = Mode.NUMERIC\n this.data = data.toString()\n}\n\nNumericData.getBitsLength = function getBitsLength (length) {\n return 10 * Math.floor(length / 3) + ((length % 3) ? ((length % 3) * 3 + 1) : 0)\n}\n\nNumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nNumericData.prototype.getBitsLength = function getBitsLength () {\n return NumericData.getBitsLength(this.data.length)\n}\n\nNumericData.prototype.write = function write (bitBuffer) {\n let i, group, value\n\n // The input data string is divided into groups of three digits,\n // and each group is converted to its 10-bit binary equivalent.\n for (i = 0; i + 3 <= this.data.length; i += 3) {\n group = this.data.substr(i, 3)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, 10)\n }\n\n // If the number of input digits is not an exact multiple of three,\n // the final one or two digits are converted to 4 or 7 bits respectively.\n const remainingNum = this.data.length - i\n if (remainingNum > 0) {\n group = this.data.substr(i)\n value = parseInt(group, 10)\n\n bitBuffer.put(value, remainingNum * 3 + 1)\n }\n}\n\nmodule.exports = NumericData\n","const Mode = require('./mode')\n\n/**\n * Array of characters available in alphanumeric mode\n *\n * As per QR Code specification, to each character\n * is assigned a value from 0 to 44 which in this case coincides\n * with the array index\n *\n * @type {Array}\n */\nconst ALPHA_NUM_CHARS = [\n '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M',\n 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',\n ' ', '$', '%', '*', '+', '-', '.', '/', ':'\n]\n\nfunction AlphanumericData (data) {\n this.mode = Mode.ALPHANUMERIC\n this.data = data\n}\n\nAlphanumericData.getBitsLength = function getBitsLength (length) {\n return 11 * Math.floor(length / 2) + 6 * (length % 2)\n}\n\nAlphanumericData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nAlphanumericData.prototype.getBitsLength = function getBitsLength () {\n return AlphanumericData.getBitsLength(this.data.length)\n}\n\nAlphanumericData.prototype.write = function write (bitBuffer) {\n let i\n\n // Input data characters are divided into groups of two characters\n // and encoded as 11-bit binary codes.\n for (i = 0; i + 2 <= this.data.length; i += 2) {\n // The character value of the first character is multiplied by 45\n let value = ALPHA_NUM_CHARS.indexOf(this.data[i]) * 45\n\n // The character value of the second digit is added to the product\n value += ALPHA_NUM_CHARS.indexOf(this.data[i + 1])\n\n // The sum is then stored as 11-bit binary number\n bitBuffer.put(value, 11)\n }\n\n // If the number of input data characters is not a multiple of two,\n // the character value of the final character is encoded as a 6-bit binary number.\n if (this.data.length % 2) {\n bitBuffer.put(ALPHA_NUM_CHARS.indexOf(this.data[i]), 6)\n }\n}\n\nmodule.exports = AlphanumericData\n","const Mode = require('./mode')\n\nfunction ByteData (data) {\n this.mode = Mode.BYTE\n if (typeof (data) === 'string') {\n this.data = new TextEncoder().encode(data)\n } else {\n this.data = new Uint8Array(data)\n }\n}\n\nByteData.getBitsLength = function getBitsLength (length) {\n return length * 8\n}\n\nByteData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nByteData.prototype.getBitsLength = function getBitsLength () {\n return ByteData.getBitsLength(this.data.length)\n}\n\nByteData.prototype.write = function (bitBuffer) {\n for (let i = 0, l = this.data.length; i < l; i++) {\n bitBuffer.put(this.data[i], 8)\n }\n}\n\nmodule.exports = ByteData\n","const Mode = require('./mode')\nconst Utils = require('./utils')\n\nfunction KanjiData (data) {\n this.mode = Mode.KANJI\n this.data = data\n}\n\nKanjiData.getBitsLength = function getBitsLength (length) {\n return length * 13\n}\n\nKanjiData.prototype.getLength = function getLength () {\n return this.data.length\n}\n\nKanjiData.prototype.getBitsLength = function getBitsLength () {\n return KanjiData.getBitsLength(this.data.length)\n}\n\nKanjiData.prototype.write = function (bitBuffer) {\n let i\n\n // In the Shift JIS system, Kanji characters are represented by a two byte combination.\n // These byte values are shifted from the JIS X 0208 values.\n // JIS X 0208 gives details of the shift coded representation.\n for (i = 0; i < this.data.length; i++) {\n let value = Utils.toSJIS(this.data[i])\n\n // For characters with Shift JIS values from 0x8140 to 0x9FFC:\n if (value >= 0x8140 && value <= 0x9FFC) {\n // Subtract 0x8140 from Shift JIS value\n value -= 0x8140\n\n // For characters with Shift JIS values from 0xE040 to 0xEBBF\n } else if (value >= 0xE040 && value <= 0xEBBF) {\n // Subtract 0xC140 from Shift JIS value\n value -= 0xC140\n } else {\n throw new Error(\n 'Invalid SJIS character: ' + this.data[i] + '\\n' +\n 'Make sure your charset is UTF-8')\n }\n\n // Multiply most significant byte of result by 0xC0\n // and add least significant byte to product\n value = (((value >>> 8) & 0xff) * 0xC0) + (value & 0xff)\n\n // Convert result to a 13-bit binary string\n bitBuffer.put(value, 13)\n }\n}\n\nmodule.exports = KanjiData\n","'use strict';\n\n/******************************************************************************\n * Created 2008-08-19.\n *\n * Dijkstra path-finding functions. Adapted from the Dijkstar Python project.\n *\n * Copyright (C) 2008\n * Wyatt Baldwin <self@wyattbaldwin.com>\n * All rights reserved\n *\n * Licensed under the MIT license.\n *\n * http://www.opensource.org/licenses/mit-license.php\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n *****************************************************************************/\nvar dijkstra = {\n single_source_shortest_paths: function(graph, s, d) {\n // Predecessor map for each node that has been encountered.\n // node ID => predecessor node ID\n var predecessors = {};\n\n // Costs of shortest paths from s to all nodes encountered.\n // node ID => cost\n var costs = {};\n costs[s] = 0;\n\n // Costs of shortest paths from s to all nodes encountered; differs from\n // `costs` in that it provides easy access to the node that currently has\n // the known shortest path from s.\n // XXX: Do we actually need both `costs` and `open`?\n var open = dijkstra.PriorityQueue.make();\n open.push(s, 0);\n\n var closest,\n u, v,\n cost_of_s_to_u,\n adjacent_nodes,\n cost_of_e,\n cost_of_s_to_u_plus_cost_of_e,\n cost_of_s_to_v,\n first_visit;\n while (!open.empty()) {\n // In the nodes remaining in graph that have a known cost from s,\n // find the node, u, that currently has the shortest path from s.\n closest = open.pop();\n u = closest.value;\n cost_of_s_to_u = closest.cost;\n\n // Get nodes adjacent to u...\n adjacent_nodes = graph[u] || {};\n\n // ...and explore the edges that connect u to those nodes, updating\n // the cost of the shortest paths to any or all of those nodes as\n // necessary. v is the node across the current edge from u.\n for (v in adjacent_nodes) {\n if (adjacent_nodes.hasOwnProperty(v)) {\n // Get the cost of the edge running from u to v.\n cost_of_e = adjacent_nodes[v];\n\n // Cost of s to u plus the cost of u to v across e--this is *a*\n // cost from s to v that may or may not be less than the current\n // known cost to v.\n cost_of_s_to_u_plus_cost_of_e = cost_of_s_to_u + cost_of_e;\n\n // If we haven't visited v yet OR if the current known cost from s to\n // v is greater than the new cost we just found (cost of s to u plus\n // cost of u to v across e), update v's cost in the cost list and\n // update v's predecessor in the predecessor list (it's now u).\n cost_of_s_to_v = costs[v];\n first_visit = (typeof costs[v] === 'undefined');\n if (first_visit || cost_of_s_to_v > cost_of_s_to_u_plus_cost_of_e) {\n costs[v] = cost_of_s_to_u_plus_cost_of_e;\n open.push(v, cost_of_s_to_u_plus_cost_of_e);\n predecessors[v] = u;\n }\n }\n }\n }\n\n if (typeof d !== 'undefined' && typeof costs[d] === 'undefined') {\n var msg = ['Could not find a path from ', s, ' to ', d, '.'].join('');\n throw new Error(msg);\n }\n\n return predecessors;\n },\n\n extract_shortest_path_from_predecessor_list: function(predecessors, d) {\n var nodes = [];\n var u = d;\n var predecessor;\n while (u) {\n nodes.push(u);\n predecessor = predecessors[u];\n u = predecessors[u];\n }\n nodes.reverse();\n return nodes;\n },\n\n find_path: function(graph, s, d) {\n var predecessors = dijkstra.single_source_shortest_paths(graph, s, d);\n return dijkstra.extract_shortest_path_from_predecessor_list(\n predecessors, d);\n },\n\n /**\n * A very naive priority queue implementation.\n */\n PriorityQueue: {\n make: function (opts) {\n var T = dijkstra.PriorityQueue,\n t = {},\n key;\n opts = opts || {};\n for (key in T) {\n if (T.hasOwnProperty(key)) {\n t[key] = T[key];\n }\n }\n t.queue = [];\n t.sorter = opts.sorter || T.default_sorter;\n return t;\n },\n\n default_sorter: function (a, b) {\n return a.cost - b.cost;\n },\n\n /**\n * Add a new item to the queue and ensure the highest priority element\n * is at the front of the queue.\n */\n push: function (value, cost) {\n var item = {value: value, cost: cost};\n this.queue.push(item);\n this.queue.sort(this.sorter);\n },\n\n /**\n * Return the highest priority element in the queue.\n */\n pop: function () {\n return this.queue.shift();\n },\n\n empty: function () {\n return this.queue.length === 0;\n }\n }\n};\n\n\n// node.js module exports\nif (typeof module !== 'undefined') {\n module.exports = dijkstra;\n}\n","const Mode = require('./mode')\nconst NumericData = require('./numeric-data')\nconst AlphanumericData = require('./alphanumeric-data')\nconst ByteData = require('./byte-data')\nconst KanjiData = require('./kanji-data')\nconst Regex = require('./regex')\nconst Utils = require('./utils')\nconst dijkstra = require('dijkstrajs')\n\n/**\n * Returns UTF8 byte length\n *\n * @param {String} str Input string\n * @return {Number} Number of byte\n */\nfunction getStringByteLength (str) {\n return unescape(encodeURIComponent(str)).length\n}\n\n/**\n * Get a list of segments of the specified mode\n * from a string\n *\n * @param {Mode} mode Segment mode\n * @param {String} str String to process\n * @return {Array} Array of object with segments data\n */\nfunction getSegments (regex, mode, str) {\n const segments = []\n let result\n\n while ((result = regex.exec(str)) !== null) {\n segments.push({\n data: result[0],\n index: result.index,\n mode: mode,\n length: result[0].length\n })\n }\n\n return segments\n}\n\n/**\n * Extracts a series of segments with the appropriate\n * modes from a string\n *\n * @param {String} dataStr Input string\n * @return {Array} Array of object with segments data\n */\nfunction getSegmentsFromString (dataStr) {\n const numSegs = getSegments(Regex.NUMERIC, Mode.NUMERIC, dataStr)\n const alphaNumSegs = getSegments(Regex.ALPHANUMERIC, Mode.ALPHANUMERIC, dataStr)\n let byteSegs\n let kanjiSegs\n\n if (Utils.isKanjiModeEnabled()) {\n byteSegs = getSegments(Regex.BYTE, Mode.BYTE, dataStr)\n kanjiSegs = getSegments(Regex.KANJI, Mode.KANJI, dataStr)\n } else {\n byteSegs = getSegments(Regex.BYTE_KANJI, Mode.BYTE, dataStr)\n kanjiSegs = []\n }\n\n const segs = numSegs.concat(alphaNumSegs, byteSegs, kanjiSegs)\n\n return segs\n .sort(function (s1, s2) {\n return s1.index - s2.index\n })\n .map(function (obj) {\n return {\n data: obj.data,\n mode: obj.mode,\n length: obj.length\n }\n })\n}\n\n/**\n * Returns how many bits are needed to encode a string of\n * specified length with the specified mode\n *\n * @param {Number} length String length\n * @param {Mode} mode Segment mode\n * @return {Number} Bit length\n */\nfunction getSegmentBitsLength (length, mode) {\n switch (mode) {\n case Mode.NUMERIC:\n return NumericData.getBitsLength(length)\n case Mode.ALPHANUMERIC:\n return AlphanumericData.getBitsLength(length)\n case Mode.KANJI:\n return KanjiData.getBitsLength(length)\n case Mode.BYTE:\n return ByteData.getBitsLength(length)\n }\n}\n\n/**\n * Merges adjacent segments which have the same mode\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction mergeSegments (segs) {\n return segs.reduce(function (acc, curr) {\n const prevSeg = acc.length - 1 >= 0 ? acc[acc.length - 1] : null\n if (prevSeg && prevSeg.mode === curr.mode) {\n acc[acc.length - 1].data += curr.data\n return acc\n }\n\n acc.push(curr)\n return acc\n }, [])\n}\n\n/**\n * Generates a list of all possible nodes combination which\n * will be used to build a segments graph.\n *\n * Nodes are divided by groups. Each group will contain a list of all the modes\n * in which is possible to encode the given text.\n *\n * For example the text '12345' can be encoded as Numeric, Alphanumeric or Byte.\n * The group for '12345' will contain then 3 objects, one for each\n * possible encoding mode.\n *\n * Each node represents a possible segment.\n *\n * @param {Array} segs Array of object with segments data\n * @return {Array} Array of object with segments data\n */\nfunction buildNodes (segs) {\n const nodes = []\n for (let i = 0; i < segs.length; i++) {\n const seg = segs[i]\n\n switch (seg.mode) {\n case Mode.NUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.ALPHANUMERIC, length: seg.length },\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.ALPHANUMERIC:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: seg.length }\n ])\n break\n case Mode.KANJI:\n nodes.push([seg,\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n break\n case Mode.BYTE:\n nodes.push([\n { data: seg.data, mode: Mode.BYTE, length: getStringByteLength(seg.data) }\n ])\n }\n }\n\n return nodes\n}\n\n/**\n * Builds a graph from a list of nodes.\n * All segments in each node group will be connected with all the segments of\n * the next group and so on.\n *\n * At each connection will be assigned a weight depending on the\n * segment's byte length.\n *\n * @param {Array} nodes Array of object with segments data\n * @param {Number} version QR Code version\n * @return {Object} Graph of all possible segments\n */\nfunction buildGraph (nodes, version) {\n const table = {}\n const graph = { start: {} }\n let prevNodeIds = ['start']\n\n for (let i = 0; i < nodes.length; i++) {\n const nodeGroup = nodes[i]\n const currentNodeIds = []\n\n for (let j = 0; j < nodeGroup.length; j++) {\n const node = nodeGroup[j]\n const key = '' + i + j\n\n currentNodeIds.push(key)\n table[key] = { node: node, lastCount: 0 }\n graph[key] = {}\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n const prevNodeId = prevNodeIds[n]\n\n if (table[prevNodeId] && table[prevNodeId].node.mode === node.mode) {\n graph[prevNodeId][key] =\n getSegmentBitsLength(table[prevNodeId].lastCount + node.length, node.mode) -\n getSegmentBitsLength(table[prevNodeId].lastCount, node.mode)\n\n table[prevNodeId].lastCount += node.length\n } else {\n if (table[prevNodeId]) table[prevNodeId].lastCount = node.length\n\n graph[prevNodeId][key] = getSegmentBitsLength(node.length, node.mode) +\n 4 + Mode.getCharCountIndicator(node.mode, version) // switch cost\n }\n }\n }\n\n prevNodeIds = currentNodeIds\n }\n\n for (let n = 0; n < prevNodeIds.length; n++) {\n graph[prevNodeIds[n]].end = 0\n }\n\n return { map: graph, table: table }\n}\n\n/**\n * Builds a segment from a specified data and mode.\n * If a mode is not specified, the more suitable will be used.\n *\n * @param {String} data Input data\n * @param {Mode | String} modesHint Data mode\n * @return {Segment} Segment\n */\nfunction buildSingleSegment (data, modesHint) {\n let mode\n const bestMode = Mode.getBestModeForData(data)\n\n mode = Mode.from(modesHint, bestMode)\n\n // Make sure data can be encoded\n if (mode !== Mode.BYTE && mode.bit < bestMode.bit) {\n throw new Error('\"' + data + '\"' +\n ' cannot be encoded with mode ' + Mode.toString(mode) +\n '.\\n Suggested mode is: ' + Mode.toString(bestMode))\n }\n\n // Use Mode.BYTE if Kanji support is disabled\n if (mode === Mode.KANJI && !Utils.isKanjiModeEnabled()) {\n mode = Mode.BYTE\n }\n\n switch (mode) {\n case Mode.NUMERIC:\n return new NumericData(data)\n\n case Mode.ALPHANUMERIC:\n return new AlphanumericData(data)\n\n case Mode.KANJI:\n return new KanjiData(data)\n\n case Mode.BYTE:\n return new ByteData(data)\n }\n}\n\n/**\n * Builds a list of segments from an array.\n * Array can contain Strings or Objects with segment's info.\n *\n * For each item which is a string, will be generated a segment with the given\n * string and the more appropriate encoding mode.\n *\n * For each item which is an object, will be generated a segment with the given\n * data and mode.\n * Objects must contain at least the property \"data\".\n * If property \"mode\" is not present, the more suitable mode will be used.\n *\n * @param {Array} array Array of objects with segments data\n * @return {Array} Array of Segments\n */\nexports.fromArray = function fromArray (array) {\n return array.reduce(function (acc, seg) {\n if (typeof seg === 'string') {\n acc.push(buildSingleSegment(seg, null))\n } else if (seg.data) {\n acc.push(buildSingleSegment(seg.data, seg.mode))\n }\n\n return acc\n }, [])\n}\n\n/**\n * Builds an optimized sequence of segments from a string,\n * which will produce the shortest possible bitstream.\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @return {Array} Array of segments\n */\nexports.fromString = function fromString (data, version) {\n const segs = getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n\n const nodes = buildNodes(segs)\n const graph = buildGraph(nodes, version)\n const path = dijkstra.find_path(graph.map, 'start', 'end')\n\n const optimizedSegs = []\n for (let i = 1; i < path.length - 1; i++) {\n optimizedSegs.push(graph.table[path[i]].node)\n }\n\n return exports.fromArray(mergeSegments(optimizedSegs))\n}\n\n/**\n * Splits a string in various segments with the modes which\n * best represent their content.\n * The produced segments are far from being optimized.\n * The output of this function is only used to estimate a QR Code version\n * which may contain the data.\n *\n * @param {string} data Input string\n * @return {Array} Array of segments\n */\nexports.rawSplit = function rawSplit (data) {\n return exports.fromArray(\n getSegmentsFromString(data, Utils.isKanjiModeEnabled())\n )\n}\n","const Utils = require('./utils')\nconst ECLevel = require('./error-correction-level')\nconst BitBuffer = require('./bit-buffer')\nconst BitMatrix = require('./bit-matrix')\nconst AlignmentPattern = require('./alignment-pattern')\nconst FinderPattern = require('./finder-pattern')\nconst MaskPattern = require('./mask-pattern')\nconst ECCode = require('./error-correction-code')\nconst ReedSolomonEncoder = require('./reed-solomon-encoder')\nconst Version = require('./version')\nconst FormatInfo = require('./format-info')\nconst Mode = require('./mode')\nconst Segments = require('./segments')\n\n/**\n * QRCode for JavaScript\n *\n * modified by Ryan Day for nodejs support\n * Copyright (c) 2011 Ryan Day\n *\n * Licensed under the MIT license:\n * http://www.opensource.org/licenses/mit-license.php\n *\n//---------------------------------------------------------------------\n// QRCode for JavaScript\n//\n// Copyright (c) 2009 Kazuhiko Arase\n//\n// URL: http://www.d-project.com/\n//\n// Licensed under the MIT license:\n// http://www.opensource.org/licenses/mit-license.php\n//\n// The word \"QR Code\" is registered trademark of\n// DENSO WAVE INCORPORATED\n// http://www.denso-wave.com/qrcode/faqpatent-e.html\n//\n//---------------------------------------------------------------------\n*/\n\n/**\n * Add finder patterns bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupFinderPattern (matrix, version) {\n const size = matrix.size\n const pos = FinderPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -1; r <= 7; r++) {\n if (row + r <= -1 || size <= row + r) continue\n\n for (let c = -1; c <= 7; c++) {\n if (col + c <= -1 || size <= col + c) continue\n\n if ((r >= 0 && r <= 6 && (c === 0 || c === 6)) ||\n (c >= 0 && c <= 6 && (r === 0 || r === 6)) ||\n (r >= 2 && r <= 4 && c >= 2 && c <= 4)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add timing pattern bits to matrix\n *\n * Note: this function must be called before {@link setupAlignmentPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n */\nfunction setupTimingPattern (matrix) {\n const size = matrix.size\n\n for (let r = 8; r < size - 8; r++) {\n const value = r % 2 === 0\n matrix.set(r, 6, value, true)\n matrix.set(6, r, value, true)\n }\n}\n\n/**\n * Add alignment patterns bits to matrix\n *\n * Note: this function must be called after {@link setupTimingPattern}\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupAlignmentPattern (matrix, version) {\n const pos = AlignmentPattern.getPositions(version)\n\n for (let i = 0; i < pos.length; i++) {\n const row = pos[i][0]\n const col = pos[i][1]\n\n for (let r = -2; r <= 2; r++) {\n for (let c = -2; c <= 2; c++) {\n if (r === -2 || r === 2 || c === -2 || c === 2 ||\n (r === 0 && c === 0)) {\n matrix.set(row + r, col + c, true, true)\n } else {\n matrix.set(row + r, col + c, false, true)\n }\n }\n }\n }\n}\n\n/**\n * Add version info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Number} version QR Code version\n */\nfunction setupVersionInfo (matrix, version) {\n const size = matrix.size\n const bits = Version.getEncodedBits(version)\n let row, col, mod\n\n for (let i = 0; i < 18; i++) {\n row = Math.floor(i / 3)\n col = i % 3 + size - 8 - 3\n mod = ((bits >> i) & 1) === 1\n\n matrix.set(row, col, mod, true)\n matrix.set(col, row, mod, true)\n }\n}\n\n/**\n * Add format info bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {Number} maskPattern Mask pattern reference value\n */\nfunction setupFormatInfo (matrix, errorCorrectionLevel, maskPattern) {\n const size = matrix.size\n const bits = FormatInfo.getEncodedBits(errorCorrectionLevel, maskPattern)\n let i, mod\n\n for (i = 0; i < 15; i++) {\n mod = ((bits >> i) & 1) === 1\n\n // vertical\n if (i < 6) {\n matrix.set(i, 8, mod, true)\n } else if (i < 8) {\n matrix.set(i + 1, 8, mod, true)\n } else {\n matrix.set(size - 15 + i, 8, mod, true)\n }\n\n // horizontal\n if (i < 8) {\n matrix.set(8, size - i - 1, mod, true)\n } else if (i < 9) {\n matrix.set(8, 15 - i - 1 + 1, mod, true)\n } else {\n matrix.set(8, 15 - i - 1, mod, true)\n }\n }\n\n // fixed module\n matrix.set(size - 8, 8, 1, true)\n}\n\n/**\n * Add encoded data bits to matrix\n *\n * @param {BitMatrix} matrix Modules matrix\n * @param {Uint8Array} data Data codewords\n */\nfunction setupData (matrix, data) {\n const size = matrix.size\n let inc = -1\n let row = size - 1\n let bitIndex = 7\n let byteIndex = 0\n\n for (let col = size - 1; col > 0; col -= 2) {\n if (col === 6) col--\n\n while (true) {\n for (let c = 0; c < 2; c++) {\n if (!matrix.isReserved(row, col - c)) {\n let dark = false\n\n if (byteIndex < data.length) {\n dark = (((data[byteIndex] >>> bitIndex) & 1) === 1)\n }\n\n matrix.set(row, col - c, dark)\n bitIndex--\n\n if (bitIndex === -1) {\n byteIndex++\n bitIndex = 7\n }\n }\n }\n\n row += inc\n\n if (row < 0 || size <= row) {\n row -= inc\n inc = -inc\n break\n }\n }\n }\n}\n\n/**\n * Create encoded codewords from data input\n *\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @param {ByteData} data Data input\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createData (version, errorCorrectionLevel, segments) {\n // Prepare data buffer\n const buffer = new BitBuffer()\n\n segments.forEach(function (data) {\n // prefix data with mode indicator (4 bits)\n buffer.put(data.mode.bit, 4)\n\n // Prefix data with character count indicator.\n // The character count indicator is a string of bits that represents the\n // number of characters that are being encoded.\n // The character count indicator must be placed after the mode indicator\n // and must be a certain number of bits long, depending on the QR version\n // and data mode\n // @see {@link Mode.getCharCountIndicator}.\n buffer.put(data.getLength(), Mode.getCharCountIndicator(data.mode, version))\n\n // add binary data sequence to buffer\n data.write(buffer)\n })\n\n // Calculate required number of bits\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n const dataTotalCodewordsBits = (totalCodewords - ecTotalCodewords) * 8\n\n // Add a terminator.\n // If the bit string is shorter than the total number of required bits,\n // a terminator of up to four 0s must be added to the right side of the string.\n // If the bit string is more than four bits shorter than the required number of bits,\n // add four 0s to the end.\n if (buffer.getLengthInBits() + 4 <= dataTotalCodewordsBits) {\n buffer.put(0, 4)\n }\n\n // If the bit string is fewer than four bits shorter, add only the number of 0s that\n // are needed to reach the required number of bits.\n\n // After adding the terminator, if the number of bits in the string is not a multiple of 8,\n // pad the string on the right with 0s to make the string's length a multiple of 8.\n while (buffer.getLengthInBits() % 8 !== 0) {\n buffer.putBit(0)\n }\n\n // Add pad bytes if the string is still shorter than the total number of required bits.\n // Extend the buffer to fill the data capacity of the symbol corresponding to\n // the Version and Error Correction Level by adding the Pad Codewords 11101100 (0xEC)\n // and 00010001 (0x11) alternately.\n const remainingByte = (dataTotalCodewordsBits - buffer.getLengthInBits()) / 8\n for (let i = 0; i < remainingByte; i++) {\n buffer.put(i % 2 ? 0x11 : 0xEC, 8)\n }\n\n return createCodewords(buffer, version, errorCorrectionLevel)\n}\n\n/**\n * Encode input data with Reed-Solomon and return codewords with\n * relative error correction bits\n *\n * @param {BitBuffer} bitBuffer Data to encode\n * @param {Number} version QR Code version\n * @param {ErrorCorrectionLevel} errorCorrectionLevel Error correction level\n * @return {Uint8Array} Buffer containing encoded codewords\n */\nfunction createCodewords (bitBuffer, version, errorCorrectionLevel) {\n // Total codewords for this QR code version (Data + Error correction)\n const totalCodewords = Utils.getSymbolTotalCodewords(version)\n\n // Total number of error correction codewords\n const ecTotalCodewords = ECCode.getTotalCodewordsCount(version, errorCorrectionLevel)\n\n // Total number of data codewords\n const dataTotalCodewords = totalCodewords - ecTotalCodewords\n\n // Total number of blocks\n const ecTotalBlocks = ECCode.getBlocksCount(version, errorCorrectionLevel)\n\n // Calculate how many blocks each group should contain\n const blocksInGroup2 = totalCodewords % ecTotalBlocks\n const blocksInGroup1 = ecTotalBlocks - blocksInGroup2\n\n const totalCodewordsInGroup1 = Math.floor(totalCodewords / ecTotalBlocks)\n\n const dataCodewordsInGroup1 = Math.floor(dataTotalCodewords / ecTotalBlocks)\n const dataCodewordsInGroup2 = dataCodewordsInGroup1 + 1\n\n // Number of EC codewords is the same for both groups\n const ecCount = totalCodewordsInGroup1 - dataCodewordsInGroup1\n\n // Initialize a Reed-Solomon encoder with a generator polynomial of degree ecCount\n const rs = new ReedSolomonEncoder(ecCount)\n\n let offset = 0\n const dcData = new Array(ecTotalBlocks)\n const ecData = new Array(ecTotalBlocks)\n let maxDataSize = 0\n const buffer = new Uint8Array(bitBuffer.buffer)\n\n // Divide the buffer into the required number of blocks\n for (let b = 0; b < ecTotalBlocks; b++) {\n const dataSize = b < blocksInGroup1 ? dataCodewordsInGroup1 : dataCodewordsInGroup2\n\n // extract a block of data from buffer\n dcData[b] = buffer.slice(offset, offset + dataSize)\n\n // Calculate EC codewords for this data block\n ecData[b] = rs.encode(dcData[b])\n\n offset += dataSize\n maxDataSize = Math.max(maxDataSize, dataSize)\n }\n\n // Create final data\n // Interleave the data and error correction codewords from each block\n const data = new Uint8Array(totalCodewords)\n let index = 0\n let i, r\n\n // Add data codewords\n for (i = 0; i < maxDataSize; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n if (i < dcData[r].length) {\n data[index++] = dcData[r][i]\n }\n }\n }\n\n // Apped EC codewords\n for (i = 0; i < ecCount; i++) {\n for (r = 0; r < ecTotalBlocks; r++) {\n data[index++] = ecData[r][i]\n }\n }\n\n return data\n}\n\n/**\n * Build QR Code symbol\n *\n * @param {String} data Input string\n * @param {Number} version QR Code version\n * @param {ErrorCorretionLevel} errorCorrectionLevel Error level\n * @param {MaskPattern} maskPattern Mask pattern\n * @return {Object} Object containing symbol data\n */\nfunction createSymbol (data, version, errorCorrectionLevel, maskPattern) {\n let segments\n\n if (Array.isArray(data)) {\n segments = Segments.fromArray(data)\n } else if (typeof data === 'string') {\n let estimatedVersion = version\n\n if (!estimatedVersion) {\n const rawSegments = Segments.rawSplit(data)\n\n // Estimate best version that can contain raw splitted segments\n estimatedVersion = Version.getBestVersionForData(rawSegments, errorCorrectionLevel)\n }\n\n // Build optimized segments\n // If estimated version is undefined, try with the highest version\n segments = Segments.fromString(data, estimatedVersion || 40)\n } else {\n throw new Error('Invalid data')\n }\n\n // Get the min version that can contain data\n const bestVersion = Version.getBestVersionForData(segments, errorCorrectionLevel)\n\n // If no version is found, data cannot be stored\n if (!bestVersion) {\n throw new Error('The amount of data is too big to be stored in a QR Code')\n }\n\n // If not specified, use min version as default\n if (!version) {\n version = bestVersion\n\n // Check if the specified version can contain the data\n } else if (version < bestVersion) {\n throw new Error('\\n' +\n 'The chosen QR Code version cannot contain this amount of data.\\n' +\n 'Minimum version required to store current data is: ' + bestVersion + '.\\n'\n )\n }\n\n const dataBits = createData(version, errorCorrectionLevel, segments)\n\n // Allocate matrix buffer\n const moduleCount = Utils.getSymbolSize(version)\n const modules = new BitMatrix(moduleCount)\n\n // Add function modules\n setupFinderPattern(modules, version)\n setupTimingPattern(modules)\n setupAlignmentPattern(modules, version)\n\n // Add temporary dummy bits for format info just to set them as reserved.\n // This is needed to prevent these bits from being masked by {@link MaskPattern.applyMask}\n // since the masking operation must be performed only on the encoding region.\n // These blocks will be replaced with correct values later in code.\n setupFormatInfo(modules, errorCorrectionLevel, 0)\n\n if (version >= 7) {\n setupVersionInfo(modules, version)\n }\n\n // Add data codewords\n setupData(modules, dataBits)\n\n if (isNaN(maskPattern)) {\n // Find best mask pattern\n maskPattern = MaskPattern.getBestMask(modules,\n setupFormatInfo.bind(null, modules, errorCorrectionLevel))\n }\n\n // Apply mask pattern\n MaskPattern.applyMask(maskPattern, modules)\n\n // Replace format info bits with correct values\n setupFormatInfo(modules, errorCorrectionLevel, maskPattern)\n\n return {\n modules: modules,\n version: version,\n errorCorrectionLevel: errorCorrectionLevel,\n maskPattern: maskPattern,\n segments: segments\n }\n}\n\n/**\n * QR Code\n *\n * @param {String | Array} data Input data\n * @param {Object} options Optional configurations\n * @param {Number} options.version QR Code version\n * @param {String} options.errorCorrectionLevel Error correction level\n * @param {Function} options.toSJISFunc Helper func to convert utf8 to sjis\n */\nexports.create = function create (data, options) {\n if (typeof data === 'undefined' || data === '') {\n throw new Error('No input text')\n }\n\n let errorCorrectionLevel = ECLevel.M\n let version\n let mask\n\n if (typeof options !== 'undefined') {\n // Use higher error correction level as default\n errorCorrectionLevel = ECLevel.from(options.errorCorrectionLevel, ECLevel.M)\n version = Version.from(options.version)\n mask = MaskPattern.from(options.maskPattern)\n\n if (options.toSJISFunc) {\n Utils.setToSJISFunction(options.toSJISFunc)\n }\n }\n\n return createSymbol(data, version, errorCorrectionLevel, mask)\n}\n","function hex2rgba (hex) {\n if (typeof hex === 'number') {\n hex = hex.toString()\n }\n\n if (typeof hex !== 'string') {\n throw new Error('Color should be defined as hex string')\n }\n\n let hexCode = hex.slice().replace('#', '').split('')\n if (hexCode.length < 3 || hexCode.length === 5 || hexCode.length > 8) {\n throw new Error('Invalid hex color: ' + hex)\n }\n\n // Convert from short to long form (fff -> ffffff)\n if (hexCode.length === 3 || hexCode.length === 4) {\n hexCode = Array.prototype.concat.apply([], hexCode.map(function (c) {\n return [c, c]\n }))\n }\n\n // Add default alpha value\n if (hexCode.length === 6) hexCode.push('F', 'F')\n\n const hexValue = parseInt(hexCode.join(''), 16)\n\n return {\n r: (hexValue >> 24) & 255,\n g: (hexValue >> 16) & 255,\n b: (hexValue >> 8) & 255,\n a: hexValue & 255,\n hex: '#' + hexCode.slice(0, 6).join('')\n }\n}\n\nexports.getOptions = function getOptions (options) {\n if (!options) options = {}\n if (!options.color) options.color = {}\n\n const margin = typeof options.margin === 'undefined' ||\n options.margin === null ||\n options.margin < 0\n ? 4\n : options.margin\n\n const width = options.width && options.width >= 21 ? options.width : undefined\n const scale = options.scale || 4\n\n return {\n width: width,\n scale: width ? 4 : scale,\n margin: margin,\n color: {\n dark: hex2rgba(options.color.dark || '#000000ff'),\n light: hex2rgba(options.color.light || '#ffffffff')\n },\n type: options.type,\n rendererOpts: options.rendererOpts || {}\n }\n}\n\nexports.getScale = function getScale (qrSize, opts) {\n return opts.width && opts.width >= qrSize + opts.margin * 2\n ? opts.width / (qrSize + opts.margin * 2)\n : opts.scale\n}\n\nexports.getImageWidth = function getImageWidth (qrSize, opts) {\n const scale = exports.getScale(qrSize, opts)\n return Math.floor((qrSize + opts.margin * 2) * scale)\n}\n\nexports.qrToImageData = function qrToImageData (imgData, qr, opts) {\n const size = qr.modules.size\n const data = qr.modules.data\n const scale = exports.getScale(size, opts)\n const symbolSize = Math.floor((size + opts.margin * 2) * scale)\n const scaledMargin = opts.margin * scale\n const palette = [opts.color.light, opts.color.dark]\n\n for (let i = 0; i < symbolSize; i++) {\n for (let j = 0; j < symbolSize; j++) {\n let posDst = (i * symbolSize + j) * 4\n let pxColor = opts.color.light\n\n if (i >= scaledMargin && j >= scaledMargin &&\n i < symbolSize - scaledMargin && j < symbolSize - scaledMargin) {\n const iSrc = Math.floor((i - scaledMargin) / scale)\n const jSrc = Math.floor((j - scaledMargin) / scale)\n pxColor = palette[data[iSrc * size + jSrc] ? 1 : 0]\n }\n\n imgData[posDst++] = pxColor.r\n imgData[posDst++] = pxColor.g\n imgData[posDst++] = pxColor.b\n imgData[posDst] = pxColor.a\n }\n }\n}\n","const Utils = require('./utils')\n\nfunction clearCanvas (ctx, canvas, size) {\n ctx.clearRect(0, 0, canvas.width, canvas.height)\n\n if (!canvas.style) canvas.style = {}\n canvas.height = size\n canvas.width = size\n canvas.style.height = size + 'px'\n canvas.style.width = size + 'px'\n}\n\nfunction getCanvasElement () {\n try {\n return document.createElement('canvas')\n } catch (e) {\n throw new Error('You need to specify a canvas element')\n }\n}\n\nexports.render = function render (qrData, canvas, options) {\n let opts = options\n let canvasEl = canvas\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!canvas) {\n canvasEl = getCanvasElement()\n }\n\n opts = Utils.getOptions(opts)\n const size = Utils.getImageWidth(qrData.modules.size, opts)\n\n const ctx = canvasEl.getContext('2d')\n const image = ctx.createImageData(size, size)\n Utils.qrToImageData(image.data, qrData, opts)\n\n clearCanvas(ctx, canvasEl, size)\n ctx.putImageData(image, 0, 0)\n\n return canvasEl\n}\n\nexports.renderToDataURL = function renderToDataURL (qrData, canvas, options) {\n let opts = options\n\n if (typeof opts === 'undefined' && (!canvas || !canvas.getContext)) {\n opts = canvas\n canvas = undefined\n }\n\n if (!opts) opts = {}\n\n const canvasEl = exports.render(qrData, canvas, opts)\n\n const type = opts.type || 'image/png'\n const rendererOpts = opts.rendererOpts || {}\n\n return canvasEl.toDataURL(type, rendererOpts.quality)\n}\n","const Utils = require('./utils')\n\nfunction getColorAttrib (color, attrib) {\n const alpha = color.a / 255\n const str = attrib + '=\"' + color.hex + '\"'\n\n return alpha < 1\n ? str + ' ' + attrib + '-opacity=\"' + alpha.toFixed(2).slice(1) + '\"'\n : str\n}\n\nfunction svgCmd (cmd, x, y) {\n let str = cmd + x\n if (typeof y !== 'undefined') str += ' ' + y\n\n return str\n}\n\nfunction qrToPath (data, size, margin) {\n let path = ''\n let moveBy = 0\n let newRow = false\n let lineLength = 0\n\n for (let i = 0; i < data.length; i++) {\n const col = Math.floor(i % size)\n const row = Math.floor(i / size)\n\n if (!col && !newRow) newRow = true\n\n if (data[i]) {\n lineLength++\n\n if (!(i > 0 && col > 0 && data[i - 1])) {\n path += newRow\n ? svgCmd('M', col + margin, 0.5 + row + margin)\n : svgCmd('m', moveBy, 0)\n\n moveBy = 0\n newRow = false\n }\n\n if (!(col + 1 < size && data[i + 1])) {\n path += svgCmd('h', lineLength)\n lineLength = 0\n }\n } else {\n moveBy++\n }\n }\n\n return path\n}\n\nexports.render = function render (qrData, options, cb) {\n const opts = Utils.getOptions(options)\n const size = qrData.modules.size\n const data = qrData.modules.data\n const qrcodesize = size + opts.margin * 2\n\n const bg = !opts.color.light.a\n ? ''\n : '<path ' + getColorAttrib(opts.color.light, 'fill') +\n ' d=\"M0 0h' + qrcodesize + 'v' + qrcodesize + 'H0z\"/>'\n\n const path =\n '<path ' + getColorAttrib(opts.color.dark, 'stroke') +\n ' d=\"' + qrToPath(data, size, opts.margin) + '\"/>'\n\n const viewBox = 'viewBox=\"' + '0 0 ' + qrcodesize + ' ' + qrcodesize + '\"'\n\n const width = !opts.width ? '' : 'width=\"' + opts.width + '\" height=\"' + opts.width + '\" '\n\n const svgTag = '<svg xmlns=\"http://www.w3.org/2000/svg\" ' + width + viewBox + ' shape-rendering=\"crispEdges\">' + bg + path + '</svg>\\n'\n\n if (typeof cb === 'function') {\n cb(null, svgTag)\n }\n\n return svgTag\n}\n","\nconst canPromise = require('./can-promise')\n\nconst QRCode = require('./core/qrcode')\nconst CanvasRenderer = require('./renderer/canvas')\nconst SvgRenderer = require('./renderer/svg-tag.js')\n\nfunction renderCanvas (renderFunc, canvas, text, opts, cb) {\n const args = [].slice.call(arguments, 1)\n const argsNum = args.length\n const isLastArgCb = typeof args[argsNum - 1] === 'function'\n\n if (!isLastArgCb && !canPromise()) {\n throw new Error('Callback required as last argument')\n }\n\n if (isLastArgCb) {\n if (argsNum < 2) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 2) {\n cb = text\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 3) {\n if (canvas.getContext && typeof cb === 'undefined') {\n cb = opts\n opts = undefined\n } else {\n cb = opts\n opts = text\n text = canvas\n canvas = undefined\n }\n }\n } else {\n if (argsNum < 1) {\n throw new Error('Too few arguments provided')\n }\n\n if (argsNum === 1) {\n text = canvas\n canvas = opts = undefined\n } else if (argsNum === 2 && !canvas.getContext) {\n opts = text\n text = canvas\n canvas = undefined\n }\n\n return new Promise(function (resolve, reject) {\n try {\n const data = QRCode.create(text, opts)\n resolve(renderFunc(data, canvas, opts))\n } catch (e) {\n reject(e)\n }\n })\n }\n\n try {\n const data = QRCode.create(text, opts)\n cb(null, renderFunc(data, canvas, opts))\n } catch (e) {\n cb(e)\n }\n}\n\nexports.create = QRCode.create\nexports.toCanvas = renderCanvas.bind(null, CanvasRenderer.render)\nexports.toDataURL = renderCanvas.bind(null, CanvasRenderer.renderToDataURL)\n\n// only svg for now.\nexports.toString = renderCanvas.bind(null, function (data, _, opts) {\n return SvgRenderer.render(data, opts)\n})\n","/**\n * QR Code Generator Utility\n * Generates QR codes to canvas for server URLs\n */\n\nimport QRCode from 'qrcode';\n\n/**\n * Generate QR code data URL\n * @param {string} text - Text to encode (server URL)\n * @param {Object} options - QR code options\n * @returns {Promise<string>} Data URL of QR code image\n */\nexport async function generateQRCode(text, options = {}) {\n const defaultOptions = {\n width: 200,\n margin: 2,\n color: {\n dark: '#000000',\n light: '#FFFFFF',\n },\n errorCorrectionLevel: 'M',\n ...options,\n };\n\n try {\n const dataUrl = await QRCode.toDataURL(text, defaultOptions);\n return dataUrl;\n } catch (error) {\n console.error('Error generating QR code:', error);\n return null;\n }\n}\n\n/**\n * Generate QR code to an offscreen canvas\n * @param {string} text - Text to encode (server URL)\n * @param {number} size - Size of QR code in pixels\n * @returns {Promise<HTMLCanvasElement>} Canvas with QR code\n */\nexport async function generateQRCodeCanvas(text, size = 200) {\n const canvas = document.createElement('canvas');\n canvas.width = size;\n canvas.height = size;\n\n try {\n await QRCode.toCanvas(canvas, text, {\n width: size,\n margin: 2,\n color: {\n dark: '#000000',\n light: '#FFFFFF',\n },\n errorCorrectionLevel: 'M',\n });\n return canvas;\n } catch (error) {\n console.error('Error generating QR code canvas:', error);\n return null;\n }\n}\n\n/**\n * Generate QR code with label overlay\n * @param {string} text - Text to encode (server URL)\n * @param {string} label - Label text to display below QR code\n * @param {number} qrSize - Size of QR code\n * @returns {Promise<HTMLCanvasElement>} Canvas with QR code and label\n */\nexport async function generateQRCodeWithLabel(text, label, qrSize = 200) {\n // Generate QR code\n const qrCanvas = await generateQRCodeCanvas(text, qrSize);\n if (!qrCanvas) return null;\n\n // Create final canvas with extra space for label\n const padding = 20;\n const labelHeight = 40;\n const finalCanvas = document.createElement('canvas');\n finalCanvas.width = qrSize + padding * 2;\n finalCanvas.height = qrSize + labelHeight + padding * 2;\n\n const ctx = finalCanvas.getContext('2d');\n\n // White background\n ctx.fillStyle = '#FFFFFF';\n ctx.fillRect(0, 0, finalCanvas.width, finalCanvas.height);\n\n // Draw QR code\n ctx.drawImage(qrCanvas, padding, padding);\n\n // Draw label\n ctx.fillStyle = '#000000';\n ctx.font = 'bold 16px Arial';\n ctx.textAlign = 'center';\n ctx.fillText(label, finalCanvas.width / 2, qrSize + padding + 25);\n\n return finalCanvas;\n}\n","/**\n * ServerTab - Server settings and management component\n */\n\nimport React, { useState, useEffect, useCallback } from 'react';\nimport { generateQRCode } from '../utils/qrCodeGenerator.js';\n\nexport function ServerTab({ bridge }) {\n const [serverUrl, setServerUrl] = useState(null);\n const [serverPort, setServerPort] = useState(null);\n const [settings, setSettings] = useState({\n serverName: 'Loukai Karaoke',\n port: 3069,\n allowSongRequests: true,\n requireKJApproval: true,\n streamVocalsToClients: false,\n showQrCode: true,\n displayQueue: true,\n });\n const [adminPassword, setAdminPassword] = useState('');\n const [hasPassword, setHasPassword] = useState(false);\n const [pendingRequests, setPendingRequests] = useState(0);\n const [totalRequests, setTotalRequests] = useState(0);\n const [message, setMessage] = useState(null);\n const [qrCodeDataUrl, setQrCodeDataUrl] = useState(null);\n\n // Wrap in useCallback to stabilize reference\n const updateRequestsStats = useCallback(async () => {\n try {\n if (!bridge?.getRequests) return;\n const requests = await bridge.getRequests();\n const pending = requests.filter((r) => r.status === 'pending').length;\n setPendingRequests(pending);\n setTotalRequests(requests.length);\n } catch {\n // Silently fail\n }\n }, [bridge]);\n\n // Load initial server status and settings\n useEffect(() => {\n if (!bridge) return;\n\n const loadData = async () => {\n try {\n // Get server URL\n const url = await bridge.getServerUrl();\n setServerUrl(url);\n if (url) {\n const port = new URL(url).port;\n setServerPort(port);\n }\n\n // Get settings\n const serverSettings = await bridge.getServerSettings();\n if (serverSettings) {\n setSettings({\n serverName: serverSettings.serverName || 'Loukai Karaoke',\n port: serverSettings.port || 3069,\n allowSongRequests: serverSettings.allowSongRequests !== false,\n requireKJApproval: serverSettings.requireKJApproval !== false,\n streamVocalsToClients: serverSettings.streamVocalsToClients === true,\n showQrCode: serverSettings.showQrCode !== false,\n displayQueue: serverSettings.displayQueue !== false,\n });\n }\n\n // Check password status\n if (bridge.getAdminPasswordStatus) {\n const passwordSet = await bridge.getAdminPasswordStatus();\n setHasPassword(passwordSet);\n }\n\n // Get request stats\n updateRequestsStats();\n } catch (error) {\n console.error('Failed to load server data:', error);\n }\n };\n\n loadData();\n\n // Poll for server URL and request stats\n const pollInterval = setInterval(() => {\n if (bridge.getServerUrl) {\n bridge\n .getServerUrl()\n .then((url) => {\n setServerUrl(url);\n if (url) {\n const port = new URL(url).port;\n setServerPort(port);\n // Generate QR code when URL is available\n generateQRCode(url, { width: 300 }).then(setQrCodeDataUrl).catch(console.error);\n }\n })\n .catch(console.error);\n }\n updateRequestsStats();\n }, 5000);\n\n return () => clearInterval(pollInterval);\n }, [bridge, updateRequestsStats]);\n\n const handleSaveSettings = async () => {\n try {\n await bridge.updateServerSettings(settings);\n showMessage('Settings saved successfully', 'success');\n } catch (error) {\n console.error('Failed to save settings:', error);\n showMessage('Failed to save settings', 'error');\n }\n };\n\n const handleSetPassword = async () => {\n const password = adminPassword.trim();\n\n if (!password) {\n showMessage('Please enter a password', 'error');\n return;\n }\n\n if (password.length < 6) {\n showMessage('Password must be at least 6 characters', 'error');\n return;\n }\n\n try {\n if (bridge.setAdminPassword) {\n await bridge.setAdminPassword(password);\n setAdminPassword('');\n setHasPassword(true);\n showMessage('Admin password set successfully', 'success');\n }\n } catch (error) {\n console.error('Failed to set password:', error);\n showMessage('Failed to set admin password', 'error');\n }\n };\n\n const handleOpenServer = () => {\n if (serverUrl && bridge?.openExternal) {\n bridge.openExternal(serverUrl);\n }\n };\n\n const handleOpenAdmin = () => {\n try {\n if (serverPort && bridge?.openExternal) {\n bridge.openExternal(`http://localhost:${serverPort}/admin`);\n }\n } catch (error) {\n console.error('Failed to open admin panel:', error);\n }\n };\n\n const handleClearRequests = async () => {\n if (!confirm('Are you sure you want to clear all song requests? This cannot be undone.')) {\n return;\n }\n\n try {\n if (bridge.clearAllRequests) {\n await bridge.clearAllRequests();\n showMessage('All requests cleared', 'success');\n updateRequestsStats();\n }\n } catch (error) {\n console.error('Failed to clear requests:', error);\n showMessage('Failed to clear requests', 'error');\n }\n };\n\n const showMessage = (text, type = 'info') => {\n setMessage({ text, type });\n setTimeout(() => setMessage(null), 3000);\n };\n\n const handleSettingChange = (key, value) => {\n setSettings((prev) => ({ ...prev, [key]: value }));\n };\n\n const isServerRunning = Boolean(serverUrl);\n\n return (\n <div className=\"p-5 h-full overflow-y-auto bg-white dark:bg-gray-900\">\n {message && (\n <div\n className={`fixed top-5 right-5 px-5 py-3 rounded text-white font-medium z-[10000] shadow-lg animate-slide-in ${\n message.type === 'success'\n ? 'bg-green-600'\n : message.type === 'error'\n ? 'bg-red-600'\n : 'bg-blue-500'\n }`}\n >\n {message.text}\n </div>\n )}\n\n <div className=\"flex items-center justify-between mb-8 pb-4 border-b border-gray-200 dark:border-gray-700\">\n <h2 className=\"text-2xl font-semibold text-gray-900 dark:text-gray-100\">\n Web Server Settings\n </h2>\n <div className=\"flex items-center gap-2\">\n <span\n className={`w-3 h-3 rounded-full ${isServerRunning ? 'bg-green-500' : 'bg-red-500'}`}\n />\n <span className=\"text-gray-700 dark:text-gray-300\">\n {isServerRunning ? `Running on port ${serverPort}` : 'Not running'}\n </span>\n </div>\n </div>\n\n <div className=\"space-y-6\">\n {/* Server Control */}\n <div className=\"bg-gray-50 dark:bg-gray-800 rounded-lg p-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4\">\n Server Control\n </h3>\n <div className=\"space-y-4\">\n <div className=\"flex items-center justify-between gap-4\">\n <label className=\"text-sm font-medium text-gray-700 dark:text-gray-300\">\n Server Status:\n </label>\n <div className=\"flex items-center gap-3 flex-1\">\n <span className=\"text-gray-900 dark:text-gray-100 flex-1\">\n {serverUrl || 'Not running'}\n </span>\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 disabled:bg-gray-400 disabled:cursor-not-allowed text-white rounded transition-colors\"\n onClick={handleOpenServer}\n disabled={!isServerRunning}\n >\n <span className=\"material-icons text-lg\">open_in_new</span>\n Open in Browser\n </button>\n </div>\n </div>\n </div>\n </div>\n\n {/* Server Settings */}\n <div className=\"bg-gray-50 dark:bg-gray-800 rounded-lg p-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4\">\n General Settings\n </h3>\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor=\"serverName\"\n className=\"block text-sm font-medium text-gray-700 dark:text-gray-300\"\n >\n Server Name:\n </label>\n <input\n type=\"text\"\n id=\"serverName\"\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"Loukai Karaoke\"\n value={settings.serverName}\n onChange={(e) => handleSettingChange('serverName', e.target.value)}\n />\n </div>\n\n <div className=\"space-y-2\">\n <label\n htmlFor=\"serverPort\"\n className=\"block text-sm font-medium text-gray-700 dark:text-gray-300\"\n >\n Port:\n </label>\n <input\n type=\"number\"\n id=\"serverPort\"\n className=\"w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"3069\"\n min=\"1024\"\n max=\"65535\"\n value={settings.port}\n onChange={(e) => handleSettingChange('port', parseInt(e.target.value) || 3069)}\n />\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n Server must be restarted for port changes to take effect\n </p>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n id=\"allowSongRequests\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.allowSongRequests}\n onChange={(e) => handleSettingChange('allowSongRequests', e.target.checked)}\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Allow Song Requests</span>\n </label>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n id=\"requireKJApproval\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.requireKJApproval}\n onChange={(e) => handleSettingChange('requireKJApproval', e.target.checked)}\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Require KJ Approval</span>\n </label>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n id=\"streamVocalsToClients\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.streamVocalsToClients}\n onChange={(e) => handleSettingChange('streamVocalsToClients', e.target.checked)}\n />\n <span className=\"text-gray-900 dark:text-gray-100\">\n Stream Vocals to Clients (LAN only)\n </span>\n </label>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n id=\"showQrCode\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.showQrCode}\n onChange={(e) => handleSettingChange('showQrCode', e.target.checked)}\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Show QR code</span>\n </label>\n </div>\n\n <div className=\"flex items-center\">\n <label className=\"flex items-center cursor-pointer select-none\">\n <input\n type=\"checkbox\"\n id=\"displayQueue\"\n className=\"w-4 h-4 mr-2 cursor-pointer\"\n checked={settings.displayQueue}\n onChange={(e) => handleSettingChange('displayQueue', e.target.checked)}\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Display queue</span>\n </label>\n </div>\n\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors\"\n onClick={handleSaveSettings}\n >\n <span className=\"material-icons text-lg\">save</span>\n Save Settings\n </button>\n </div>\n </div>\n\n {/* Admin Password */}\n <div className=\"bg-gray-50 dark:bg-gray-800 rounded-lg p-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4\">\n Admin Security\n </h3>\n <div className=\"space-y-4\">\n <div className=\"space-y-2\">\n <label\n htmlFor=\"adminPassword\"\n className=\"block text-sm font-medium text-gray-700 dark:text-gray-300\"\n >\n Admin Password:\n </label>\n <div className=\"flex gap-2\">\n <input\n type=\"password\"\n id=\"adminPassword\"\n className=\"flex-1 px-3 py-2 border border-gray-300 dark:border-gray-600 rounded bg-white dark:bg-gray-700 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500\"\n placeholder=\"Enter new admin password\"\n value={adminPassword}\n onChange={(e) => setAdminPassword(e.target.value)}\n />\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors\"\n onClick={handleSetPassword}\n >\n <span className=\"material-icons text-lg\">security</span>\n Set Password\n </button>\n </div>\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n KJs will need this password to access the admin panel\n </p>\n </div>\n\n <div\n className={`px-4 py-2 rounded ${hasPassword ? 'bg-green-100 dark:bg-green-900 text-green-800 dark:text-green-200' : 'bg-gray-100 dark:bg-gray-700 text-gray-700 dark:text-gray-300'}`}\n >\n {hasPassword ? 'Admin password is set' : 'No admin password set'}\n </div>\n </div>\n </div>\n\n {/* Song Requests */}\n <div className=\"bg-gray-50 dark:bg-gray-800 rounded-lg p-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4\">\n Song Requests\n </h3>\n <div className=\"space-y-4\">\n <div className=\"grid grid-cols-2 gap-4\">\n <div className=\"bg-white dark:bg-gray-700 rounded-lg p-4 text-center\">\n <div className=\"text-3xl font-bold text-blue-600 dark:text-blue-400\">\n {pendingRequests}\n </div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400\">Pending</div>\n </div>\n <div className=\"bg-white dark:bg-gray-700 rounded-lg p-4 text-center\">\n <div className=\"text-3xl font-bold text-gray-700 dark:text-gray-300\">\n {totalRequests}\n </div>\n <div className=\"text-sm text-gray-600 dark:text-gray-400\">Total</div>\n </div>\n </div>\n <div className=\"flex gap-2\">\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white rounded transition-colors flex-1\"\n onClick={handleOpenAdmin}\n >\n <span className=\"material-icons text-lg\">admin_panel_settings</span>\n Open Admin Panel\n </button>\n <button\n className=\"flex items-center gap-2 px-4 py-2 bg-red-600 hover:bg-red-700 text-white rounded transition-colors flex-1\"\n onClick={handleClearRequests}\n >\n <span className=\"material-icons text-lg\">delete_sweep</span>\n Clear All Requests\n </button>\n </div>\n </div>\n </div>\n\n {/* QR Code */}\n {qrCodeDataUrl && (\n <div className=\"bg-gray-50 dark:bg-gray-800 rounded-lg p-6\">\n <h3 className=\"text-lg font-medium text-gray-900 dark:text-gray-100 mb-4\">\n Quick Access QR Code\n </h3>\n <div className=\"flex flex-col items-center gap-4\">\n <img\n src={qrCodeDataUrl}\n alt=\"Server URL QR Code\"\n className=\"border-4 border-white rounded-lg shadow-lg\"\n style={{ width: '300px', height: '300px' }}\n />\n <p className=\"text-sm text-gray-600 dark:text-gray-400 text-center\">\n Scan this QR code to access the song request page\n </p>\n <p className=\"text-xs text-gray-500 dark:text-gray-500 text-center font-mono\">\n {serverUrl}\n </p>\n </div>\n </div>\n )}\n </div>\n </div>\n );\n}\n","/**\n * VisualizationSettings - Shared waveform and auto-tune settings component\n *\n * Used by both renderer and web admin for controlling:\n * - Waveform visualization options\n * - Auto-tune settings\n *\n * Uses unified defaults from shared/defaults.js\n */\n\nimport React, { useState, useEffect } from 'react';\nimport { WAVEFORM_DEFAULTS, AUTOTUNE_DEFAULTS } from '../defaults.js';\n\nexport function VisualizationSettings({\n bridge,\n waveformSettings: externalWaveform = null,\n autotuneSettings: externalAutotune = null,\n onWaveformChange = null,\n onAutotuneChange = null,\n}) {\n const [waveformSettings, setWaveformSettings] = useState({ ...WAVEFORM_DEFAULTS });\n\n const [autotuneSettings, setAutotuneSettings] = useState({\n ...AUTOTUNE_DEFAULTS,\n preferVocals: true,\n });\n\n // Load preferences on mount\n useEffect(() => {\n if (!bridge) return;\n\n const loadPreferences = async () => {\n try {\n const waveform = await bridge.getWaveformPreferences?.();\n if (waveform) {\n setWaveformSettings((prev) => ({ ...prev, ...waveform }));\n }\n\n const autotune = await bridge.getAutotunePreferences?.();\n if (autotune) {\n setAutotuneSettings((prev) => ({ ...prev, ...autotune }));\n }\n } catch (error) {\n console.error('Failed to load preferences:', error);\n }\n };\n\n loadPreferences();\n }, [bridge]);\n\n // Sync with external settings (from socket events in web UI)\n useEffect(() => {\n if (externalWaveform) {\n setWaveformSettings((prev) => ({ ...prev, ...externalWaveform }));\n }\n }, [externalWaveform]);\n\n useEffect(() => {\n if (externalAutotune) {\n setAutotuneSettings((prev) => ({ ...prev, ...externalAutotune }));\n }\n }, [externalAutotune]);\n\n // Listen for settings changes from external sources (web admin → renderer)\n useEffect(() => {\n if (!bridge) return;\n\n const unsubWaveform = bridge.onSettingsChanged?.('waveform', (settings) => {\n setWaveformSettings((prev) => ({ ...prev, ...settings }));\n });\n\n const unsubAutotune = bridge.onSettingsChanged?.('autotune', (settings) => {\n setAutotuneSettings((prev) => ({ ...prev, ...settings }));\n });\n\n return () => {\n unsubWaveform?.();\n unsubAutotune?.();\n };\n }, [bridge]);\n\n // Waveform setting change\n const handleWaveformChange = async (key, value) => {\n const newSettings = { ...waveformSettings, [key]: value };\n setWaveformSettings(newSettings);\n\n // Notify parent if callback provided (web UI)\n if (onWaveformChange) {\n onWaveformChange(newSettings);\n }\n\n try {\n await bridge.saveWaveformPreferences?.(newSettings);\n } catch (error) {\n console.error('Failed to save waveform preferences:', error);\n }\n };\n\n // Auto-tune setting change\n const handleAutotuneChange = async (key, value) => {\n const newSettings = { ...autotuneSettings, [key]: value };\n setAutotuneSettings(newSettings);\n\n // Notify parent if callback provided (web UI)\n if (onAutotuneChange) {\n onAutotuneChange(newSettings);\n }\n\n try {\n // saveAutotunePreferences now handles both persistence AND real-time application\n await bridge.saveAutotunePreferences?.(newSettings);\n } catch (error) {\n console.error('Failed to save autotune preferences:', error);\n }\n };\n\n return (\n <div className=\"p-4 space-y-6\">\n {/* Waveform Options */}\n <div className=\"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 space-y-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-100\">Waveform Options</h3>\n <div className=\"space-y-3\">\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={waveformSettings.enableWaveforms}\n onChange={(e) => handleWaveformChange('enableWaveforms', e.target.checked)}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Enable Waveforms</span>\n </label>\n\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={waveformSettings.enableEffects}\n onChange={(e) => handleWaveformChange('enableEffects', e.target.checked)}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Enable Background Effects</span>\n </label>\n\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={waveformSettings.randomEffectOnSong}\n onChange={(e) => handleWaveformChange('randomEffectOnSong', e.target.checked)}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Random Effect on New Song</span>\n </label>\n\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={waveformSettings.showUpcomingLyrics}\n onChange={(e) => handleWaveformChange('showUpcomingLyrics', e.target.checked)}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Show Upcoming Lyrics</span>\n </label>\n\n <div className=\"space-y-2\">\n <label className=\"flex items-center justify-between text-gray-900 dark:text-gray-100\">\n <span>Overlay Opacity:</span>\n <span className=\"font-mono text-sm\">\n {waveformSettings.overlayOpacity.toFixed(2)}\n </span>\n </label>\n <input\n type=\"range\"\n min=\"0\"\n max=\"1\"\n step=\"0.01\"\n value={waveformSettings.overlayOpacity}\n onChange={(e) => handleWaveformChange('overlayOpacity', parseFloat(e.target.value))}\n className=\"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer accent-blue-600\"\n />\n </div>\n </div>\n </div>\n\n {/* Auto-Tune Settings */}\n <div className=\"bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-lg p-4 space-y-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-gray-100\">Auto-Tune</h3>\n <div className=\"space-y-3\">\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={autotuneSettings.enabled}\n onChange={(e) => handleAutotuneChange('enabled', e.target.checked)}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">Enable Auto-Tune</span>\n </label>\n\n <label className=\"flex items-center gap-3 cursor-pointer\">\n <input\n type=\"checkbox\"\n checked={autotuneSettings.preferVocals}\n onChange={(e) => handleAutotuneChange('preferVocals', e.target.checked)}\n disabled={!autotuneSettings.enabled}\n className=\"w-4 h-4 text-blue-600 rounded focus:ring-2 focus:ring-blue-500 disabled:opacity-50 disabled:cursor-not-allowed\"\n />\n <span className=\"text-gray-900 dark:text-gray-100\">\n Prefer Vocals for Pitch Reference\n </span>\n </label>\n\n <div className=\"space-y-2\">\n <label className=\"flex items-center justify-between text-gray-900 dark:text-gray-100\">\n <span>Strength:</span>\n <span className=\"font-mono text-sm\">{autotuneSettings.strength}%</span>\n </label>\n <input\n type=\"range\"\n min=\"0\"\n max=\"100\"\n value={autotuneSettings.strength}\n onChange={(e) => handleAutotuneChange('strength', parseInt(e.target.value))}\n className=\"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer accent-blue-600\"\n />\n </div>\n\n <div className=\"space-y-2\">\n <label className=\"flex items-center justify-between text-gray-900 dark:text-gray-100\">\n <span>Speed:</span>\n <span className=\"font-mono text-sm\">{autotuneSettings.speed}</span>\n </label>\n <input\n type=\"range\"\n min=\"1\"\n max=\"100\"\n value={autotuneSettings.speed}\n onChange={(e) => handleAutotuneChange('speed', parseInt(e.target.value))}\n className=\"w-full h-2 bg-gray-200 dark:bg-gray-700 rounded-lg appearance-none cursor-pointer accent-blue-600\"\n />\n </div>\n </div>\n </div>\n </div>\n );\n}\n","/**\n * useKeyboardShortcuts - React hook for keyboard shortcuts\n *\n * Provides global keyboard shortcuts for player controls, vocals toggle, fullscreen, etc.\n * Follows the bridge pattern - does not use window globals.\n */\n\nimport { useEffect } from 'react';\n\n/**\n * Hook for setting up keyboard shortcuts\n *\n * @param {Object} options - Configuration options\n * @param {Function} options.onTogglePlayback - Called when spacebar is pressed\n * @param {Function} options.onToggleVocalsGlobal - Called when V is pressed (no modifier)\n * @param {Function} options.onToggleVocalsPA - Called when Ctrl/Cmd+V is pressed\n * @param {Function} options.onToggleStemMute - Called when 1-9 is pressed (no modifier), receives stemIndex\n * @param {Function} options.onToggleStemSolo - Called when Shift+1-9 is pressed, receives stemIndex\n */\nexport function useKeyboardShortcuts(options = {}) {\n const {\n onTogglePlayback,\n onToggleVocalsGlobal,\n onToggleVocalsPA,\n onToggleStemMute,\n onToggleStemSolo,\n } = options;\n\n useEffect(() => {\n const handleKeyDown = async (e) => {\n // Ignore keyboard shortcuts when typing in input fields\n if (\n e.target.tagName === 'INPUT' ||\n e.target.tagName === 'SELECT' ||\n e.target.tagName === 'TEXTAREA'\n ) {\n return;\n }\n\n switch (e.key) {\n case 'Escape':\n // Exit fullscreen if in fullscreen mode\n if (document.fullscreenElement) {\n e.preventDefault();\n await toggleCanvasFullscreen();\n }\n break;\n\n case ' ':\n e.preventDefault();\n if (onTogglePlayback) {\n await onTogglePlayback();\n }\n break;\n\n case 'v':\n case 'V':\n if (e.ctrlKey || e.metaKey) {\n // Ctrl/Cmd+V: Toggle vocals PA only\n if (onToggleVocalsPA) {\n await onToggleVocalsPA();\n }\n } else {\n // V: Toggle vocals global (PA + IEM)\n if (onToggleVocalsGlobal) {\n await onToggleVocalsGlobal();\n }\n }\n break;\n\n case 'a':\n case 'A':\n if (e.ctrlKey || e.metaKey) {\n // Reserved for future use (select all, etc.)\n e.preventDefault();\n }\n break;\n\n case 'b':\n case 'B':\n // Reserved for future use\n break;\n\n case 's':\n case 'S':\n if (e.ctrlKey || e.metaKey) {\n // Reserved for future use (save, etc.)\n e.preventDefault();\n }\n break;\n\n case 'f':\n case 'F':\n e.preventDefault();\n await toggleCanvasFullscreen();\n break;\n\n default:\n // Number keys 1-9 for stem mute/solo\n if (e.key >= '1' && e.key <= '9') {\n const stemIndex = parseInt(e.key) - 1;\n if (e.shiftKey) {\n if (onToggleStemSolo) {\n await onToggleStemSolo(stemIndex);\n }\n } else {\n if (onToggleStemMute) {\n await onToggleStemMute(stemIndex);\n }\n }\n }\n break;\n }\n };\n\n // Add event listener\n document.addEventListener('keydown', handleKeyDown);\n\n // Cleanup on unmount\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [\n onTogglePlayback,\n onToggleVocalsGlobal,\n onToggleVocalsPA,\n onToggleStemMute,\n onToggleStemSolo,\n ]);\n}\n\n/**\n * Toggle canvas fullscreen\n * This is a utility function that directly manipulates the DOM\n */\nexport async function toggleCanvasFullscreen() {\n try {\n const karaokeCanvas = document.getElementById('karaokeCanvas');\n if (!karaokeCanvas) {\n console.warn('karaokeCanvas element not found');\n return;\n }\n\n if (!document.fullscreenElement) {\n // Enter fullscreen\n await karaokeCanvas.requestFullscreen();\n } else {\n // Exit fullscreen\n await document.exitFullscreen();\n }\n } catch (error) {\n console.error('❌ Canvas fullscreen toggle failed:', error);\n }\n}\n","/**\n * CreateTab - Create karaoke files from audio\n *\n * Handles the full workflow:\n * 1. Check/install Python dependencies\n * 2. Select audio file\n * 3. Configure options (stems, whisper model, etc.)\n * 4. Run conversion pipeline\n * 5. Output .stem.m4a file\n */\n\nimport { useState, useEffect, useCallback, useRef } from 'react';\nimport { LLM_DEFAULTS, CREATOR_DEFAULTS } from '../../../shared/defaults.js';\nimport { PortalSelect } from '../PortalSelect.jsx';\n\n// ============================================================================\n// Shared Styles\n// ============================================================================\nconst STYLES = {\n input:\n 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white',\n select:\n 'w-full px-3 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-700 text-gray-900 dark:text-white',\n btnPrimary:\n 'px-6 py-3 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors',\n btnSecondary:\n 'px-6 py-3 bg-gray-600 hover:bg-gray-700 text-white font-medium rounded-lg transition-colors',\n btnSuccess:\n 'px-4 py-2 bg-green-600 hover:bg-green-700 text-white font-medium rounded-lg transition-colors',\n sectionTitle: 'text-lg font-semibold text-gray-900 dark:text-white mb-4',\n card: 'bg-gray-100 dark:bg-gray-800 rounded-lg p-6',\n};\n\n// ============================================================================\n// Helper Components\n// ============================================================================\n\nfunction Spinner({ message, size = 'md' }) {\n const sizeClasses = {\n sm: 'h-8 w-8',\n md: 'h-12 w-12',\n };\n return (\n <div className=\"text-center\">\n <div\n className={`animate-spin rounded-full ${sizeClasses[size]} border-b-2 border-blue-500 mx-auto mb-3`}\n />\n {message && <p className=\"text-gray-600 dark:text-gray-400\">{message}</p>}\n </div>\n );\n}\n\nfunction ErrorDisplay({ error, onDismiss }) {\n if (!error) return null;\n return (\n <div className=\"bg-red-100 dark:bg-red-900/30 border border-red-400 dark:border-red-600 text-red-700 dark:text-red-400 px-4 py-3 rounded mb-6 select-text\">\n {onDismiss && (\n <button\n className=\"float-right text-red-700 dark:text-red-400 hover:text-red-900 dark:hover:text-red-300 text-xl leading-none\"\n onClick={onDismiss}\n >\n ×\n </button>\n )}\n <div className=\"font-mono text-sm whitespace-pre-wrap overflow-x-auto max-h-96\">{error}</div>\n </div>\n );\n}\n\nfunction MissingLinesDetails({ missingLines }) {\n if (!missingLines || missingLines.length === 0) return null;\n return (\n <details className=\"text-xs text-gray-700 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 rounded p-2\">\n <summary className=\"cursor-pointer font-semibold\">\n 💡 {missingLines.length} missing line{missingLines.length !== 1 ? 's' : ''} suggested (not\n applied)\n </summary>\n <ul className=\"mt-2 space-y-1 ml-4 list-disc max-h-40 overflow-y-auto\">\n {missingLines.map((line, i) => (\n <li key={i}>\n <span className=\"text-blue-600 dark:text-blue-400\">\"{line.suggested_text}\"</span>{' '}\n <span className=\"text-gray-500 dark:text-gray-400\">\n ({line.start?.toFixed(1)}s-{line.end?.toFixed(1)}s, {line.confidence} confidence)\n </span>\n {line.reason && (\n <div className=\"text-gray-500 dark:text-gray-400 ml-2\">→ {line.reason}</div>\n )}\n </li>\n ))}\n </ul>\n </details>\n );\n}\n\nfunction SongTitle({ artist, title }) {\n return artist ? `${artist} - ${title}` : title;\n}\n\n// Format LLM provider name for display\nfunction formatProviderName(provider) {\n const names = {\n anthropic: 'Anthropic Claude',\n openai: 'OpenAI',\n gemini: 'Google Gemini',\n lmstudio: 'Local LLM Server',\n };\n return names[provider] || provider;\n}\n\nexport function CreateTab({ bridge: _bridge }) {\n const [status, setStatus] = useState('checking'); // checking, setup, ready, creating, complete, installing\n const [components, setComponents] = useState(null);\n const [installProgress, setInstallProgress] = useState(null);\n const [error, setError] = useState(null);\n\n // Sub-tab state: 'create' or 'settings'\n const [activeSubTab, setActiveSubTab] = useState('create');\n\n // File and conversion state\n const [selectedFile, setSelectedFile] = useState(null);\n const [fileLoading, setFileLoading] = useState(false); // Loading state for file selection\n const [conversionProgress, setConversionProgress] = useState(null);\n const [completedFile, setCompletedFile] = useState(null);\n const [llmStats, setLlmStats] = useState(null);\n const [songDuration, setSongDuration] = useState(null);\n const [processingTime, setProcessingTime] = useState(null);\n const [consoleLog, setConsoleLog] = useState([]);\n const [isLyricsOnlyMode, setIsLyricsOnlyMode] = useState(false); // Track if we started in lyrics-only mode\n const consoleEndRef = useRef(null);\n const conversionStartTimeRef = useRef(null);\n\n // Options\n const [options, setOptions] = useState({\n title: '',\n artist: '',\n numStems: 4, // Always 4 stems for .stem.m4a format\n language: 'en',\n referenceLyrics: '',\n });\n\n // LLM settings - uses unified defaults from shared/defaults.js\n const [llmSettings, setLlmSettings] = useState({ ...LLM_DEFAULTS });\n const [llmTestResult, setLlmTestResult] = useState(null);\n\n // Output settings\n const [outputToSongsFolder, setOutputToSongsFolder] = useState(false);\n const [whisperModel, setWhisperModel] = useState(CREATOR_DEFAULTS.whisperModel);\n const [enableCrepe, setEnableCrepe] = useState(CREATOR_DEFAULTS.enableCrepe);\n\n const checkComponents = useCallback(async () => {\n setStatus('checking');\n setError(null);\n\n try {\n const result = await window.kaiAPI?.creator?.checkComponents();\n\n if (result?.success) {\n setComponents(result);\n\n if (result.allInstalled) {\n setStatus('ready');\n } else {\n setStatus('setup');\n }\n } else {\n setError(result?.error || 'Failed to check components');\n setStatus('setup');\n }\n } catch (err) {\n console.error('Error checking components:', err);\n setError(err.message);\n setStatus('setup');\n }\n }, []);\n\n useEffect(() => {\n checkComponents();\n\n // Load LLM settings\n const loadLLMSettings = async () => {\n try {\n const settings = await window.kaiAPI?.creator?.getLLMSettings();\n if (settings) {\n setLlmSettings(settings);\n }\n } catch (err) {\n console.error('Failed to load LLM settings:', err);\n }\n };\n loadLLMSettings();\n\n // Load output settings\n const loadOutputSettings = async () => {\n try {\n const outputToSongs = await window.kaiAPI?.settings?.get(\n 'creator.outputToSongsFolder',\n false\n );\n setOutputToSongsFolder(outputToSongs);\n const whisper = await window.kaiAPI?.settings?.get(\n 'creator.whisperModel',\n CREATOR_DEFAULTS.whisperModel\n );\n setWhisperModel(whisper);\n const crepe = await window.kaiAPI?.settings?.get(\n 'creator.enableCrepe',\n CREATOR_DEFAULTS.enableCrepe\n );\n setEnableCrepe(crepe);\n } catch (err) {\n console.error('Failed to load output settings:', err);\n }\n };\n loadOutputSettings();\n\n // Listen for installation progress\n const onInstallProgress = (_event, progress) => {\n setInstallProgress(progress);\n if (progress.step === 'complete') {\n setStatus('checking');\n checkComponents();\n }\n };\n\n const onInstallError = (_event, err) => {\n setError(err.error);\n setStatus('setup');\n };\n\n // Listen for conversion progress\n const onConversionProgress = (_event, progress) => {\n setConversionProgress(progress);\n };\n\n const onConversionConsole = (_event, data) => {\n const line = data.line;\n\n setConsoleLog((prev) => {\n // If line contains progress indicators (%, |, ━), replace last line\n // This handles tqdm and pip progress bars that use \\r\n if (line.match(/\\d+%|[│┃║▌▍▎▏█]|━|█/) && prev.length > 0) {\n // Check if last line was also a progress line\n const lastLine = prev[prev.length - 1];\n if (lastLine.match(/\\d+%|[│┃║▌▍▎▏█]|━|█/)) {\n // Replace last line\n return [...prev.slice(0, -1), line];\n }\n }\n\n // Otherwise append new line\n return [...prev, line];\n });\n\n // Auto-scroll to bottom\n setTimeout(() => {\n consoleEndRef.current?.scrollIntoView({ behavior: 'smooth' });\n }, 100);\n };\n\n const onConversionComplete = async (_event, result) => {\n const endTime = Date.now();\n const elapsed = conversionStartTimeRef.current\n ? (endTime - conversionStartTimeRef.current) / 1000\n : null;\n\n setCompletedFile(result.outputPath);\n setLlmStats(result.llmStats);\n setSongDuration(result.duration);\n setProcessingTime(elapsed);\n setStatus('complete');\n setConversionProgress(null);\n\n // If saved to songs folder, trigger a library sync to pick up the new file\n if (result.savedToSongsFolder) {\n try {\n await window.kaiAPI?.library?.syncLibrary?.();\n } catch (err) {\n console.error('Failed to sync library after creation:', err);\n }\n }\n };\n\n const onConversionError = (_event, err) => {\n setError(err.error);\n setStatus('ready');\n setConversionProgress(null);\n };\n\n window.kaiAPI?.creator?.onInstallProgress(onInstallProgress);\n window.kaiAPI?.creator?.onInstallError(onInstallError);\n window.kaiAPI?.creator?.onConversionProgress(onConversionProgress);\n window.kaiAPI?.creator?.onConversionConsole(onConversionConsole);\n window.kaiAPI?.creator?.onConversionComplete(onConversionComplete);\n window.kaiAPI?.creator?.onConversionError(onConversionError);\n\n return () => {\n window.kaiAPI?.creator?.removeInstallProgressListener(onInstallProgress);\n window.kaiAPI?.creator?.removeInstallErrorListener(onInstallError);\n window.kaiAPI?.creator?.removeConversionProgressListener(onConversionProgress);\n window.kaiAPI?.creator?.removeConversionConsoleListener(onConversionConsole);\n window.kaiAPI?.creator?.removeConversionCompleteListener(onConversionComplete);\n window.kaiAPI?.creator?.removeConversionErrorListener(onConversionError);\n };\n }, [checkComponents]);\n\n const handleInstall = async () => {\n setStatus('installing');\n setInstallProgress({ step: 'starting', message: 'Starting installation...', progress: 0 });\n setError(null);\n\n try {\n const result = await window.kaiAPI?.creator?.installComponents();\n if (!result?.success) {\n setError(result?.error || 'Installation failed');\n setStatus('setup');\n }\n } catch (err) {\n setError(err.message);\n setStatus('setup');\n }\n };\n\n const handleSelectFile = async () => {\n try {\n setFileLoading(true);\n setError(null);\n const result = await window.kaiAPI?.creator?.selectFile();\n\n if (result?.cancelled) {\n setFileLoading(false);\n return;\n }\n\n if (result?.success && result.file) {\n setSelectedFile(result.file);\n setOptions((prev) => ({\n ...prev,\n title: result.file.title || prev.title,\n artist: result.file.artist || prev.artist,\n // Auto-populate lyrics if found (prefer plain text)\n referenceLyrics: result.lyrics?.plainLyrics || prev.referenceLyrics,\n }));\n setError(null);\n } else {\n setError(result?.error || 'Failed to select file');\n }\n } catch (err) {\n setError(err.message);\n } finally {\n setFileLoading(false);\n }\n };\n\n const handleSearchLyrics = async () => {\n if (!options.title) {\n setError('Please enter a title to search for lyrics');\n return;\n }\n\n try {\n const result = await window.kaiAPI?.creator?.searchLyrics(options.title, options.artist);\n\n if (result?.success) {\n setOptions((prev) => ({\n ...prev,\n // Prefer plain lyrics (no timestamps) for Whisper reference\n referenceLyrics: result.plainLyrics || '',\n }));\n setError(null);\n } else {\n setError(result?.error || 'No lyrics found');\n }\n } catch (err) {\n setError(err.message);\n }\n };\n\n const handleStartConversion = async () => {\n if (!selectedFile) {\n setError('Please select a file first');\n return;\n }\n\n setStatus('creating');\n setError(null);\n setConsoleLog([]); // Clear console log\n setConversionProgress({ step: 'starting', message: 'Starting conversion...', progress: 0 });\n conversionStartTimeRef.current = Date.now();\n\n try {\n // Get output directory based on settings\n let outputDir = undefined; // Default: same directory as source file\n if (outputToSongsFolder) {\n const songsFolder = await window.kaiAPI?.library?.getSongsFolder?.();\n if (songsFolder) {\n outputDir = songsFolder;\n }\n }\n\n // Determine if this is a lyrics-only conversion (stem file without lyrics)\n const lyricsOnlyMode = selectedFile.hasStems && !selectedFile.hasLyrics;\n setIsLyricsOnlyMode(lyricsOnlyMode);\n\n const result = await window.kaiAPI?.creator?.startConversion({\n inputPath: selectedFile.path,\n title: options.title || selectedFile.title,\n artist: options.artist || selectedFile.artist,\n tags: selectedFile.tags || {}, // Preserve all original ID3 tags\n numStems: options.numStems,\n whisperModel: whisperModel,\n language: options.language,\n enableCrepe: enableCrepe,\n referenceLyrics: options.referenceLyrics,\n outputDir,\n // Lyrics-only mode options\n lyricsOnlyMode,\n vocalsTrackIndex: selectedFile.vocalsTrackIndex ?? 4,\n });\n\n if (!result?.success) {\n setError(result?.error || 'Conversion failed');\n setStatus('ready');\n setConversionProgress(null);\n }\n } catch (err) {\n setError(err.message);\n setStatus('ready');\n setConversionProgress(null);\n }\n };\n\n const handleCancelConversion = async () => {\n try {\n await window.kaiAPI?.creator?.cancelConversion();\n setStatus('ready');\n setConversionProgress(null);\n } catch (err) {\n setError(err.message);\n }\n };\n\n const handleCreateAnother = () => {\n setSelectedFile(null);\n setCompletedFile(null);\n setLlmStats(null);\n setSongDuration(null);\n setProcessingTime(null);\n setIsLyricsOnlyMode(false);\n conversionStartTimeRef.current = null;\n setOptions({\n title: '',\n artist: '',\n numStems: 4,\n language: 'en',\n referenceLyrics: '',\n });\n setStatus('ready');\n };\n\n const handleOpenInEditor = async () => {\n if (!completedFile) return;\n\n try {\n // Load the song into the editor\n await window.kaiAPI?.editor?.loadKai?.(completedFile);\n\n // Switch to the editor tab by manipulating DOM (same pattern as TabNavigation)\n document.querySelectorAll('[id$=\"-tab\"]').forEach((pane) => {\n pane.classList.add('hidden');\n pane.classList.remove('block', 'flex');\n });\n const editorPane = document.getElementById('editor-tab');\n if (editorPane) {\n editorPane.classList.remove('hidden');\n editorPane.classList.add('block');\n }\n } catch (err) {\n console.error('Failed to open in editor:', err);\n setError(`Failed to open in editor: ${err.message}`);\n }\n };\n\n const handleSaveLLMSettings = async () => {\n try {\n await window.kaiAPI?.creator?.saveLLMSettings(llmSettings);\n setLlmTestResult({ success: true, message: 'Settings saved!' });\n setTimeout(() => setLlmTestResult(null), 3000);\n } catch (err) {\n setLlmTestResult({ success: false, message: err.message });\n }\n };\n\n const handleTestLLMConnection = async () => {\n if (!llmSettings.apiKey && llmSettings.provider !== 'lmstudio') {\n setLlmTestResult({ success: false, message: 'API key required' });\n return;\n }\n\n setLlmTestResult({ testing: true, message: 'Testing connection...' });\n\n try {\n const result = await window.kaiAPI?.creator?.testLLMConnection(llmSettings);\n setLlmTestResult(result);\n setTimeout(() => setLlmTestResult(null), 3000);\n } catch (err) {\n setLlmTestResult({ success: false, message: err.message });\n }\n };\n\n const formatDuration = (seconds) => {\n if (!seconds) return '--:--';\n const mins = Math.floor(seconds / 60);\n const secs = Math.floor(seconds % 60);\n return `${mins}:${secs.toString().padStart(2, '0')}`;\n };\n\n if (status === 'checking') {\n return (\n <div className=\"flex items-center justify-center h-full\">\n <Spinner message=\"Checking AI tools...\" />\n </div>\n );\n }\n\n // Component display configuration\n const componentDisplay = [\n { key: 'python', label: 'Python 3.10+' },\n { key: 'pytorch', label: 'PyTorch' },\n { key: 'soundfile', label: 'SoundFile (Audio)' },\n { key: 'demucs', label: 'Demucs (Stems)' },\n { key: 'whisper', label: 'Whisper (Lyrics)' },\n { key: 'crepe', label: 'CREPE (Pitch)' },\n { key: 'ffmpeg', label: 'FFmpeg' },\n { key: 'whisperModel', label: 'Whisper Model' },\n { key: 'demucsModel', label: 'Demucs Model' },\n ];\n\n if (status === 'installing') {\n return (\n <div className=\"flex items-center justify-center h-full p-8\">\n <div className=\"max-w-lg text-center\">\n <div className=\"text-6xl mb-6\">⚡</div>\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-4\">\n Installing AI Tools\n </h2>\n\n <div className=\"mb-6\">\n <div className=\"h-2 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden\">\n <div\n className=\"h-full bg-blue-600 transition-all duration-300\"\n style={{ width: `${installProgress?.progress || 0}%` }}\n />\n </div>\n <p className=\"text-gray-600 dark:text-gray-400 mt-2 break-words\">\n {installProgress?.message || 'Starting...'}\n </p>\n </div>\n\n <button\n className={STYLES.btnSecondary}\n onClick={() => window.kaiAPI?.creator?.cancelInstall()}\n >\n Cancel\n </button>\n </div>\n </div>\n );\n }\n\n if (status === 'setup') {\n return (\n <div className=\"flex items-center justify-center h-full p-8\">\n <div className=\"max-w-lg text-center\">\n <div className=\"text-6xl mb-6\">⚡</div>\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-4\">\n AI Tools Setup Required\n </h2>\n <p className=\"text-gray-600 dark:text-gray-400 mb-6\">\n To create karaoke files, you need to install AI processing tools. This includes stem\n separation (Demucs), lyrics transcription (Whisper), and pitch detection (CREPE).\n </p>\n\n <ErrorDisplay error={error} />\n\n <div className=\"bg-gray-100 dark:bg-gray-800 rounded-lg p-4 mb-6 text-left\">\n <div className=\"space-y-2\">\n {componentDisplay.map(({ key, label }) => {\n const comp = components?.[key];\n const isInstalled = comp?.installed;\n const version = comp?.version;\n const device = comp?.device;\n\n return (\n <div key={key} className=\"flex items-center justify-between\">\n <span className=\"text-gray-700 dark:text-gray-300\">{label}</span>\n <span className={isInstalled ? 'text-green-500' : 'text-gray-400'}>\n {isInstalled\n ? `✓ ${version || ''}${device ? ` (${device})` : ''}`.trim() ||\n '✓ Installed'\n : '○ Not installed'}\n </span>\n </div>\n );\n })}\n </div>\n </div>\n\n <div className=\"text-sm text-gray-500 dark:text-gray-400 mb-6\">\n <p>Download size: ~2-4 GB</p>\n <p>Disk space required: ~5 GB</p>\n </div>\n\n <button className={STYLES.btnPrimary} onClick={handleInstall}>\n Install AI Tools\n </button>\n </div>\n </div>\n );\n }\n\n // Creating state - show progress\n if (status === 'creating') {\n return (\n <div className=\"h-full flex flex-col p-8\">\n <div className=\"max-w-4xl mx-auto w-full\">\n <div className=\"text-center mb-6\">\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-4\">\n {isLyricsOnlyMode\n ? 'Adding Lyrics to Stem File 🎤'\n : 'Creating Stems+Karaoke File ⚡'}\n </h2>\n\n <div className=\"bg-gray-100 dark:bg-gray-800 rounded-lg p-4 mb-4\">\n <p className=\"text-gray-700 dark:text-gray-300 font-medium\">\n <SongTitle artist={options.artist} title={options.title} />\n </p>\n </div>\n\n <div className=\"mb-6\">\n <div className=\"h-3 bg-gray-200 dark:bg-gray-700 rounded-full overflow-hidden\">\n <div\n className=\"h-full bg-blue-600 transition-all duration-300\"\n style={{ width: `${conversionProgress?.progress || 0}%` }}\n />\n </div>\n <p className=\"text-gray-600 dark:text-gray-400 mt-3\">\n {conversionProgress?.message || 'Starting...'}\n </p>\n </div>\n\n {/* Console Log Panel */}\n {consoleLog.length > 0 && (\n <div className=\"mb-6 bg-gray-900 dark:bg-black rounded-lg p-4 h-48 overflow-y-auto\">\n <div className=\"text-xs font-mono text-green-400 whitespace-pre-wrap select-text leading-tight\">\n {consoleLog.map((line, i) => (\n <div key={i}>{line}</div>\n ))}\n <div ref={consoleEndRef} />\n </div>\n </div>\n )}\n\n <button className={STYLES.btnSecondary} onClick={handleCancelConversion}>\n Cancel\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n // Complete state - show success\n if (status === 'complete') {\n return (\n <div className=\"flex items-center justify-center h-full p-8\">\n <div className=\"max-w-lg w-full text-center\">\n <div className=\"text-6xl mb-6\">✅</div>\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-4\">\n {isLyricsOnlyMode ? 'Lyrics Added!' : 'Karaoke File Created!'}\n </h2>\n\n <div className=\"bg-green-100 dark:bg-green-900/30 rounded-lg p-4 mb-6\">\n <p className=\"text-green-700 dark:text-green-400 font-medium\">\n <SongTitle artist={options.artist} title={options.title} />\n </p>\n\n {/* Processing Stats */}\n <div className=\"text-sm text-gray-600 dark:text-gray-400 mt-2 space-y-1\">\n {songDuration && <p>🎵 Song length: {formatDuration(songDuration)}</p>}\n {processingTime && (\n <p>\n ⏱️ Processing time: {formatDuration(processingTime)}\n {songDuration && (\n <span className=\"ml-2 text-xs\">\n ({(songDuration / processingTime).toFixed(1)}x realtime)\n </span>\n )}\n </p>\n )}\n </div>\n\n {/* LLM Stats */}\n {llmStats?.failed ? (\n <div className=\"mt-2\">\n <p className=\"text-sm text-yellow-600 dark:text-yellow-400\">\n ⚠️ AI correction failed ({formatProviderName(llmStats.provider)}):{' '}\n {llmStats.error || 'Unknown error'}\n </p>\n </div>\n ) : llmStats && llmStats.corrections_applied > 0 ? (\n <div className=\"mt-2 space-y-2\">\n <p className=\"text-sm text-green-600 dark:text-green-400\">\n ✨ {formatProviderName(llmStats.provider)}: {llmStats.suggestions_made} suggestion\n {llmStats.suggestions_made !== 1 ? 's' : ''} ({llmStats.corrections_applied}{' '}\n applied\n {llmStats.missing_lines_suggested > 0 &&\n `, ${llmStats.missing_lines_suggested} for review`}\n )\n </p>\n {llmStats.corrections && llmStats.corrections.length > 0 && (\n <details className=\"text-xs text-gray-700 dark:text-gray-300 bg-gray-50 dark:bg-gray-800 rounded p-2\">\n <summary className=\"cursor-pointer font-semibold\">\n ✅ {llmStats.corrections.length} correction\n {llmStats.corrections.length !== 1 ? 's' : ''} applied\n </summary>\n <ul className=\"mt-2 space-y-1 ml-4 list-disc max-h-40 overflow-y-auto\">\n {llmStats.corrections.map((corr, i) => (\n <li key={i}>\n Line #{corr.line_num}:{' '}\n <span className=\"text-red-600 dark:text-red-400 line-through\">\n {corr.old_text}\n </span>{' '}\n →{' '}\n <span className=\"text-green-600 dark:text-green-400\">\n {corr.new_text}\n </span>\n </li>\n ))}\n </ul>\n </details>\n )}\n <MissingLinesDetails missingLines={llmStats.missing_lines} />\n </div>\n ) : llmStats && llmStats.corrections_applied === 0 ? (\n <div className=\"mt-2\">\n <p className=\"text-sm text-gray-600 dark:text-gray-400\">\n ✓ {formatProviderName(llmStats.provider)}: No corrections applied\n {llmStats.missing_lines_suggested > 0\n ? `, ${llmStats.missing_lines_suggested} missing line${llmStats.missing_lines_suggested !== 1 ? 's' : ''} suggested`\n : ''}\n </p>\n <MissingLinesDetails missingLines={llmStats.missing_lines} />\n </div>\n ) : (\n <p className=\"text-sm text-gray-600 dark:text-gray-400 mt-2\">\n AI correction not used\n </p>\n )}\n\n <p className=\"text-sm text-green-600 dark:text-green-500 mt-2 break-all\">\n {completedFile}\n </p>\n </div>\n\n <div className=\"flex gap-4 justify-center\">\n {outputToSongsFolder && (\n <button className={STYLES.btnPrimary} onClick={handleOpenInEditor}>\n Open in Editor\n </button>\n )}\n <button\n className={outputToSongsFolder ? STYLES.btnSecondary : STYLES.btnPrimary}\n onClick={handleCreateAnother}\n >\n Create Another\n </button>\n </div>\n </div>\n </div>\n );\n }\n\n // Ready state - show create interface\n return (\n <div className=\"h-full overflow-y-auto p-6\">\n <div className=\"max-w-2xl mx-auto\">\n {/* Sub-tab navigation */}\n <div className=\"flex border-b border-gray-300 dark:border-gray-600 mb-6\">\n <button\n className={`px-4 py-2 font-medium transition-colors ${\n activeSubTab === 'create'\n ? 'text-blue-600 dark:text-blue-400 border-b-2 border-blue-600 dark:border-blue-400'\n : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'\n }`}\n onClick={() => setActiveSubTab('create')}\n >\n Create\n </button>\n <button\n className={`px-4 py-2 font-medium transition-colors ${\n activeSubTab === 'settings'\n ? 'text-blue-600 dark:text-blue-400 border-b-2 border-blue-600 dark:border-blue-400'\n : 'text-gray-500 dark:text-gray-400 hover:text-gray-700 dark:hover:text-gray-300'\n }`}\n onClick={() => setActiveSubTab('settings')}\n >\n Settings\n </button>\n </div>\n\n <ErrorDisplay error={error} onDismiss={() => setError(null)} />\n\n {/* Settings Sub-tab */}\n {activeSubTab === 'settings' && (\n <div className=\"space-y-6\">\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white\">Creator Settings</h2>\n\n {/* Output Location */}\n <div className={STYLES.card}>\n <h3 className={STYLES.sectionTitle}>Output Location</h3>\n <label className=\"flex items-center cursor-pointer\">\n <input\n type=\"checkbox\"\n className=\"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500\"\n checked={outputToSongsFolder}\n onChange={async (e) => {\n const value = e.target.checked;\n setOutputToSongsFolder(value);\n await window.kaiAPI?.settings?.set('creator.outputToSongsFolder', value);\n }}\n />\n <span className=\"ml-2 text-sm text-gray-700 dark:text-gray-300\">\n Save output files to karaoke songs folder\n </span>\n </label>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-2\">\n When enabled, created .stem.m4a files will be saved to your configured songs library\n folder instead of next to the source file.\n </p>\n </div>\n\n {/* Whisper Model */}\n <div className={STYLES.card}>\n <h3 className={STYLES.sectionTitle}>Whisper Model</h3>\n <div className=\"w-64\">\n <PortalSelect\n value={whisperModel}\n onChange={async (e) => {\n const value = e.target.value;\n setWhisperModel(value);\n await window.kaiAPI?.settings?.set('creator.whisperModel', value);\n }}\n options={[\n { value: 'large-v3-turbo', label: 'Large V3 Turbo (recommended)' },\n { value: 'large-v3', label: 'Large V3 (slower, slightly better)' },\n { value: 'medium', label: 'Medium (faster)' },\n { value: 'small', label: 'Small (fastest)' },\n ]}\n />\n </div>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-2\">\n Larger models are more accurate but slower. Large V3 Turbo is recommended for most\n users.\n </p>\n </div>\n\n {/* Pitch Detection */}\n <div className={STYLES.card}>\n <h3 className={STYLES.sectionTitle}>Pitch Detection</h3>\n <label className=\"flex items-center cursor-pointer\">\n <input\n type=\"checkbox\"\n className=\"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500\"\n checked={enableCrepe}\n onChange={async (e) => {\n const value = e.target.checked;\n setEnableCrepe(value);\n await window.kaiAPI?.settings?.set('creator.enableCrepe', value);\n }}\n />\n <span className=\"ml-2 text-sm text-gray-700 dark:text-gray-300\">\n Enable pitch detection (CREPE)\n </span>\n </label>\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-2\">\n Analyzes vocal pitch for karaoke scoring features. Adds processing time but enables\n pitch visualization.\n </p>\n </div>\n\n {/* LLM Settings */}\n <div className={STYLES.card}>\n <h3 className={STYLES.sectionTitle}>AI Lyrics Correction</h3>\n\n <div className=\"space-y-4\">\n <label className=\"flex items-center cursor-pointer\">\n <input\n type=\"checkbox\"\n className=\"w-4 h-4 rounded border-gray-300 text-blue-600 focus:ring-blue-500\"\n checked={llmSettings.enabled}\n onChange={(e) =>\n setLlmSettings((prev) => ({ ...prev, enabled: e.target.checked }))\n }\n />\n <span className=\"ml-2 text-sm text-gray-700 dark:text-gray-300\">\n Use AI to improve lyrics accuracy (compares Whisper output to reference lyrics)\n </span>\n </label>\n\n {llmSettings.enabled && (\n <>\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n AI Provider\n </label>\n <PortalSelect\n value={llmSettings.provider}\n onChange={(e) =>\n setLlmSettings((prev) => ({ ...prev, provider: e.target.value }))\n }\n options={[\n {\n value: 'lmstudio',\n label: 'Local LLM Server (LM Studio, Ollama, etc.)',\n },\n { value: 'anthropic', label: 'Anthropic Claude' },\n { value: 'openai', label: 'OpenAI' },\n { value: 'gemini', label: 'Google Gemini' },\n ]}\n />\n </div>\n\n {llmSettings.provider !== 'lmstudio' && (\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n API Key\n </label>\n <input\n type=\"password\"\n className={STYLES.input}\n value={llmSettings.apiKey}\n onChange={(e) =>\n setLlmSettings((prev) => ({ ...prev, apiKey: e.target.value }))\n }\n placeholder={`Enter ${llmSettings.provider} API key...`}\n />\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-1\">\n {llmSettings.provider === 'anthropic' && (\n <>\n Get your key from{' '}\n <a\n href=\"https://console.anthropic.com/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:underline\"\n >\n console.anthropic.com\n </a>\n </>\n )}\n {llmSettings.provider === 'openai' && (\n <>\n Get your key from{' '}\n <a\n href=\"https://platform.openai.com/api-keys\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:underline\"\n >\n platform.openai.com\n </a>\n </>\n )}\n {llmSettings.provider === 'gemini' && (\n <>\n Get your key from{' '}\n <a\n href=\"https://aistudio.google.com/app/apikey\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:underline\"\n >\n Google AI Studio\n </a>\n </>\n )}\n </p>\n </div>\n )}\n\n {llmSettings.provider === 'lmstudio' && (\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Server Base URL\n </label>\n <input\n type=\"text\"\n className={STYLES.input}\n value={llmSettings.baseUrl}\n onChange={(e) =>\n setLlmSettings((prev) => ({ ...prev, baseUrl: e.target.value }))\n }\n placeholder=\"http://localhost:1234/v1\"\n />\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-1\">\n OpenAI-compatible API endpoint (LM Studio, Ollama, text-generation-webui,\n etc.)\n </p>\n </div>\n )}\n\n <div className=\"flex gap-2\">\n <button\n className={STYLES.btnSuccess}\n onClick={handleTestLLMConnection}\n disabled={llmTestResult?.testing}\n >\n {llmTestResult?.testing ? 'Testing...' : 'Test Connection'}\n </button>\n <button\n className=\"px-4 py-2 bg-blue-600 hover:bg-blue-700 text-white font-medium rounded-lg transition-colors\"\n onClick={handleSaveLLMSettings}\n >\n Save Settings\n </button>\n </div>\n\n {llmTestResult && !llmTestResult.testing && (\n <div\n className={`px-4 py-2 rounded-lg ${\n llmTestResult.success\n ? 'bg-green-100 dark:bg-green-900/30 text-green-700 dark:text-green-400'\n : 'bg-red-100 dark:bg-red-900/30 text-red-700 dark:text-red-400'\n }`}\n >\n {llmTestResult.success ? '✓' : '✗'}{' '}\n {llmTestResult.message || llmTestResult.error}\n </div>\n )}\n </>\n )}\n </div>\n </div>\n </div>\n )}\n\n {/* Create Sub-tab */}\n {activeSubTab === 'create' && (\n <>\n <h2 className=\"text-2xl font-bold text-gray-900 dark:text-white mb-6\">\n Create Stems+Karaoke File\n </h2>\n\n {/* File Selection */}\n <div className={`${STYLES.card} mb-6`}>\n <h3 className={STYLES.sectionTitle}>1. Select Audio File</h3>\n\n {fileLoading ? (\n <div className=\"flex items-center justify-center py-8\">\n <Spinner size=\"sm\" message=\"Reading file info & searching lyrics...\" />\n </div>\n ) : selectedFile ? (\n <div>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex-1 min-w-0\">\n <p className=\"text-gray-900 dark:text-white font-medium truncate\">\n {selectedFile.name}\n </p>\n <p className=\"text-sm text-gray-600 dark:text-gray-400\">\n {formatDuration(selectedFile.duration)} •{' '}\n {selectedFile.codec?.toUpperCase() || 'Unknown'}{' '}\n {selectedFile.isVideo && '• Video'}\n </p>\n </div>\n <button\n className=\"ml-4 px-4 py-2 bg-gray-600 hover:bg-gray-700 text-white font-medium rounded-lg transition-colors\"\n onClick={handleSelectFile}\n >\n Change\n </button>\n </div>\n {/* Stem file detection indicator */}\n {selectedFile.hasStems && !selectedFile.hasLyrics && (\n <div className=\"mt-3 px-3 py-2 bg-purple-100 dark:bg-purple-900/30 border border-purple-300 dark:border-purple-700 rounded-lg\">\n <p className=\"text-sm text-purple-700 dark:text-purple-300 font-medium\">\n 🎛️ Stem file detected ({selectedFile.audioStreamCount} tracks)\n </p>\n <p className=\"text-xs text-purple-600 dark:text-purple-400 mt-1\">\n Stems: {selectedFile.stemNames?.join(', ')} • Will add lyrics only (no stem\n separation needed)\n </p>\n </div>\n )}\n {selectedFile.hasStems && selectedFile.hasLyrics && (\n <div className=\"mt-3 px-3 py-2 bg-yellow-100 dark:bg-yellow-900/30 border border-yellow-300 dark:border-yellow-700 rounded-lg\">\n <p className=\"text-sm text-yellow-700 dark:text-yellow-300 font-medium\">\n ⚠️ This file already has karaoke lyrics\n </p>\n <p className=\"text-xs text-yellow-600 dark:text-yellow-400 mt-1\">\n Processing will replace existing lyrics with new transcription\n </p>\n </div>\n )}\n </div>\n ) : (\n <button\n className=\"w-full px-6 py-4 border-2 border-dashed border-gray-300 dark:border-gray-600 rounded-lg hover:border-blue-500 dark:hover:border-blue-400 transition-colors\"\n onClick={handleSelectFile}\n >\n <div className=\"text-gray-600 dark:text-gray-400\">\n <div className=\"text-3xl mb-2\">🎵</div>\n <p>Click to select an audio or video file</p>\n <p className=\"text-sm mt-1\">\n MP3, WAV, FLAC, OGG, M4A, MP4, MKV, AVI, MOV, WEBM\n </p>\n </div>\n </button>\n )}\n </div>\n\n {/* Song Info */}\n <div className={`${STYLES.card} mb-6`}>\n <h3 className={STYLES.sectionTitle}>2. Song Information</h3>\n\n {fileLoading ? (\n <div className=\"flex items-center justify-center py-8\">\n <Spinner size=\"sm\" message=\"Loading song metadata...\" />\n </div>\n ) : (\n <>\n <div className=\"grid grid-cols-3 gap-4 mb-4\">\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Title\n </label>\n <input\n type=\"text\"\n className={STYLES.input}\n value={options.title}\n onChange={(e) => setOptions((prev) => ({ ...prev, title: e.target.value }))}\n placeholder=\"Song title\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Artist\n </label>\n <input\n type=\"text\"\n className={STYLES.input}\n value={options.artist}\n onChange={(e) =>\n setOptions((prev) => ({ ...prev, artist: e.target.value }))\n }\n placeholder=\"Artist name\"\n />\n </div>\n <div>\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1\">\n Language\n </label>\n <PortalSelect\n value={options.language}\n onChange={(e) =>\n setOptions((prev) => ({ ...prev, language: e.target.value }))\n }\n options={[\n { value: 'en', label: 'English' },\n { value: 'es', label: 'Spanish' },\n { value: 'fr', label: 'French' },\n { value: 'de', label: 'German' },\n { value: 'it', label: 'Italian' },\n { value: 'pt', label: 'Portuguese' },\n { value: 'ja', label: 'Japanese' },\n { value: 'ko', label: 'Korean' },\n { value: 'zh', label: 'Chinese' },\n ]}\n />\n </div>\n </div>\n\n <div>\n <div className=\"flex items-center justify-between mb-1\">\n <label className=\"block text-sm font-medium text-gray-700 dark:text-gray-300\">\n Reference Lyrics (optional)\n </label>\n <button\n className=\"text-sm text-blue-600 dark:text-blue-400 hover:underline\"\n onClick={handleSearchLyrics}\n >\n Search LRCLIB\n </button>\n </div>\n <textarea\n className={`${STYLES.input} h-24 resize-none`}\n value={options.referenceLyrics}\n onChange={(e) =>\n setOptions((prev) => ({ ...prev, referenceLyrics: e.target.value }))\n }\n placeholder=\"Paste lyrics here to improve transcription accuracy...\"\n />\n <p className=\"text-xs text-gray-500 dark:text-gray-400 mt-1\">\n Reference lyrics help Whisper recognize song-specific vocabulary\n </p>\n </div>\n </>\n )}\n </div>\n\n {/* Create Button */}\n <div className=\"text-center\">\n <button\n className={`px-8 py-4 ${\n selectedFile?.hasStems && !selectedFile?.hasLyrics\n ? 'bg-purple-600 hover:bg-purple-700'\n : 'bg-blue-600 hover:bg-blue-700'\n } disabled:bg-gray-400 disabled:cursor-not-allowed text-white font-bold text-lg rounded-lg transition-colors`}\n onClick={handleStartConversion}\n disabled={!selectedFile}\n >\n {selectedFile?.hasStems && !selectedFile?.hasLyrics\n ? 'Add Lyrics to Stem File'\n : 'Create Stems+Karaoke File'}\n </button>\n <p className=\"text-sm text-gray-500 dark:text-gray-400 mt-3\">\n {selectedFile?.hasStems && !selectedFile?.hasLyrics\n ? 'Lyrics-only mode is much faster (typically under 1 minute)'\n : 'Processing time depends on song length and your hardware (typically 2-10 minutes)'}\n </p>\n </div>\n </>\n )}\n </div>\n </div>\n );\n}\n","/**\n * App - Main application component\n *\n * Contains the complete UI layout with all tabs and components\n */\n\nimport { useState, useEffect } from 'react';\nimport { LibraryPanel } from '../../shared/components/LibraryPanel.jsx';\nimport { EffectsPanelWrapper } from './EffectsPanelWrapper.jsx';\nimport { RequestsListWrapper } from './RequestsListWrapper.jsx';\nimport { SongEditor } from '../../shared/components/SongEditor.jsx';\nimport { MixerTab } from './MixerTab.jsx';\nimport { QueueTab } from './QueueTab.jsx';\nimport { SongInfoBarWrapper } from './SongInfoBarWrapper.jsx';\nimport { TransportControlsWrapper } from './TransportControlsWrapper.jsx';\nimport { StatusBar } from './StatusBar.jsx';\nimport { TabNavigation } from './TabNavigation.jsx';\nimport { ServerTab } from './ServerTab.jsx';\nimport { VisualizationSettings } from '../../shared/components/VisualizationSettings.jsx';\nimport { toggleCanvasFullscreen } from '../hooks/useKeyboardShortcuts.js';\nimport { CreateTab } from './creator/CreateTab.jsx';\n\nexport function App({ bridge }) {\n const [requests, setRequests] = useState([]);\n\n // Update QR code on players when server URL or settings change\n useEffect(() => {\n let retryInterval;\n let retryCount = 0;\n const maxRetries = 20; // 10 seconds at 500ms intervals\n\n const updateQRCode = async () => {\n try {\n // Get server URL and settings\n const url = await window.kaiAPI?.webServer?.getUrl?.();\n const settings = await window.kaiAPI?.webServer?.getSettings?.();\n const showQrCode = settings?.showQrCode !== false; // Default to true\n\n // Update both players\n const player = window.app?.player;\n if (player && url) {\n if (player.karaokeRenderer) {\n await player.karaokeRenderer.setServerQRCode(url, showQrCode);\n }\n if (player.cdgPlayer) {\n await player.cdgPlayer.setServerQRCode(url, showQrCode);\n }\n // Stop retry once we have URL\n if (retryInterval) {\n clearInterval(retryInterval);\n retryInterval = null;\n }\n }\n } catch (error) {\n console.error('Error updating QR code:', error);\n }\n };\n\n // Initial update\n updateQRCode();\n\n // Retry every 500ms for first 10 seconds (in case server isn't ready)\n retryInterval = setInterval(() => {\n retryCount++;\n updateQRCode();\n if (retryCount >= maxRetries && retryInterval) {\n clearInterval(retryInterval);\n retryInterval = null;\n }\n }, 500);\n\n // Listen for settings changes (event-based, no polling)\n if (window.kaiAPI?.events) {\n window.kaiAPI.events.on('settings-update', updateQRCode);\n }\n\n return () => {\n if (retryInterval) clearInterval(retryInterval);\n if (window.kaiAPI?.events) {\n window.kaiAPI.events.off?.('settings-update', updateQRCode);\n }\n };\n }, []);\n\n // Update queue display on players when queue or settings change\n useEffect(() => {\n const updateQueueDisplay = async () => {\n try {\n // Get queue and settings\n const queueData = await window.kaiAPI?.queue?.get?.();\n const settings = await window.kaiAPI?.webServer?.getSettings?.();\n const displayQueue = settings?.displayQueue !== false; // Default to true\n\n // Extract next 1-3 songs (excluding currently loaded/playing song)\n // queueData is an object like { queue: [...], currentSong: {...} }\n const queue = queueData?.queue || [];\n\n // If there's a loaded song in the player, skip the first queue item\n // (because that's the currently loaded song)\n let queueToDisplay = queue;\n const player = window.app?.player;\n const hasLoadedSong = player?.karaokeRenderer?.songMetadata || player?.cdgPlayer?.cdgData;\n\n if (hasLoadedSong && queue.length > 0) {\n // Skip first item - it's the currently loaded song\n queueToDisplay = queue.slice(1);\n }\n\n const nextSongs = queueToDisplay.slice(0, 3); // Get next 3 songs at most\n\n // Update both players\n if (player) {\n if (player.karaokeRenderer) {\n player.karaokeRenderer.setQueueDisplay(nextSongs, displayQueue);\n }\n if (player.cdgPlayer) {\n player.cdgPlayer.setQueueDisplay(nextSongs, displayQueue);\n }\n }\n } catch (error) {\n console.error('Error updating queue display:', error);\n }\n };\n\n // Initial update\n updateQueueDisplay();\n\n // Listen for queue changes (event-based, no polling)\n if (window.kaiAPI?.queue) {\n window.kaiAPI.queue.onUpdated?.(updateQueueDisplay);\n }\n\n // Listen for settings changes (event-based, no polling)\n if (window.kaiAPI?.events) {\n window.kaiAPI.events.on('settings-update', updateQueueDisplay);\n }\n\n // Listen for song loads (so we update when a song from queue is loaded)\n if (window.kaiAPI?.song) {\n window.kaiAPI.song.onChanged?.(updateQueueDisplay);\n }\n\n return () => {\n if (window.kaiAPI?.queue) {\n window.kaiAPI.queue.removeUpdatedListener?.(updateQueueDisplay);\n }\n if (window.kaiAPI?.events) {\n window.kaiAPI.events.off?.('settings-update', updateQueueDisplay);\n }\n if (window.kaiAPI?.song) {\n window.kaiAPI.song.removeChangedListener?.(updateQueueDisplay);\n }\n };\n }, []);\n\n // Load and subscribe to requests\n useEffect(() => {\n const loadRequests = async () => {\n try {\n const requestsList = await window.kaiAPI.webServer.getSongRequests();\n setRequests(requestsList || []);\n } catch (error) {\n console.error('Failed to load requests:', error);\n }\n };\n\n loadRequests();\n\n // Auto-refresh every 5 seconds\n const interval = setInterval(loadRequests, 5000);\n\n // Listen for real-time updates\n if (window.kaiAPI?.events) {\n const onNewRequest = (event, request) => {\n console.log('📨 New song request:', request);\n loadRequests();\n };\n\n const onApproved = (event, request) => {\n console.log('✅ Request approved:', request);\n loadRequests();\n };\n\n const onRejected = (event, request) => {\n console.log('❌ Request rejected:', request);\n loadRequests();\n };\n\n window.kaiAPI.events.on('songRequest:new', onNewRequest);\n window.kaiAPI.events.on('songRequest:approved', onApproved);\n window.kaiAPI.events.on('songRequest:rejected', onRejected);\n\n return () => {\n clearInterval(interval);\n window.kaiAPI.events.removeListener('songRequest:new', onNewRequest);\n window.kaiAPI.events.removeListener('songRequest:approved', onApproved);\n window.kaiAPI.events.removeListener('songRequest:rejected', onRejected);\n };\n }\n\n return () => clearInterval(interval);\n }, []);\n\n // Calculate pending requests count\n const pendingCount = requests.filter((r) => r.status === 'pending').length;\n\n return (\n <div className=\"flex flex-col h-screen bg-gray-50 dark:bg-gray-900\">\n {/* Song Info Bar */}\n <SongInfoBarWrapper bridge={bridge} />\n\n {/* Main Content */}\n <div className=\"flex flex-1 overflow-hidden\">\n {/* Sidebar */}\n <div\n id=\"app-sidebar\"\n className=\"w-80 bg-white dark:bg-gray-800 p-4 overflow-y-auto border-r border-gray-200 dark:border-gray-700 transition-all duration-300\"\n >\n <VisualizationSettings bridge={bridge} />\n </div>\n\n {/* Center Content */}\n <div className=\"flex-1 flex flex-col overflow-hidden\">\n {/* Tab Navigation */}\n <TabNavigation requestsCount={pendingCount} />\n\n {/* Tab Content */}\n <div className=\"flex-1 overflow-auto\">\n {/* Library Tab */}\n <div id=\"library-tab\" className=\"hidden h-full\">\n <LibraryPanel bridge={bridge} showSetFolder={true} showFullRefresh={true} />\n </div>\n\n {/* Mixer Tab */}\n <div id=\"mixer-tab\" className=\"hidden h-full overflow-auto\">\n <MixerTab bridge={bridge} />\n </div>\n\n {/* Player Tab */}\n <div id=\"player-tab\" className=\"h-full flex flex-col\">\n {/* Top Section: Queue Sidebar + Canvas */}\n <div className=\"flex flex-1 gap-1 min-h-0\">\n {/* Queue Sidebar (Left 30%) */}\n <div className=\"w-[30%] min-w-[280px] flex flex-col min-h-0\">\n <QueueTab bridge={bridge} />\n </div>\n\n {/* Canvas Area (Right 70%) */}\n <div className=\"flex-1 flex flex-col p-0 m-0 min-w-0\">\n <div\n className=\"flex-1 flex items-center justify-center bg-white dark:bg-gray-900 cursor-pointer\"\n onClick={toggleCanvasFullscreen}\n >\n <canvas\n id=\"karaokeCanvas\"\n width=\"1920\"\n height=\"1080\"\n className=\"max-w-full max-h-full w-auto h-auto\"\n />\n <div id=\"lyricsContainer\" className=\"hidden\">\n <div className=\"text-center text-gray-500\">No lyrics available</div>\n </div>\n </div>\n </div>\n </div>\n\n {/* Bottom Section: Transport Controls */}\n <TransportControlsWrapper bridge={bridge} />\n </div>\n\n {/* Effects Tab */}\n <div id=\"effects-tab\" className=\"hidden h-full\">\n <EffectsPanelWrapper bridge={bridge} />\n </div>\n\n {/* Song Requests Tab */}\n <div id=\"requests-tab\" className=\"hidden h-full\">\n <RequestsListWrapper />\n </div>\n\n {/* Server Tab */}\n <div id=\"server-tab\" className=\"hidden h-full overflow-auto\">\n <ServerTab bridge={bridge} />\n </div>\n\n {/* Lyrics Editor Tab */}\n <div id=\"editor-tab\" className=\"hidden h-full\">\n <SongEditor bridge={bridge} />\n </div>\n\n {/* Create Tab */}\n <div id=\"create-tab\" className=\"hidden h-full overflow-auto\">\n <CreateTab bridge={bridge} />\n </div>\n </div>\n </div>\n </div>\n\n {/* Status Bar */}\n <StatusBar bridge={bridge} />\n </div>\n );\n}\n","/**\n * butterchurnVerify.js\n * Verifies Butterchurn libraries loaded correctly and checks WebGL compatibility\n * This runs early in the app lifecycle to catch any issues\n */\n\nexport function verifyButterchurn() {\n console.log('Butterchurn libraries loaded:', {\n butterchurn: typeof window.butterchurn,\n presets: typeof window.butterchurnPresets,\n });\n\n // Verify presets are available and debug butterchurn structure\n if (window.butterchurnPresets && typeof window.butterchurnPresets.getPresets === 'function') {\n const presets = window.butterchurnPresets.getPresets();\n console.log(\n 'SUCCESS: Butterchurn loaded with',\n Object.keys(presets).length,\n 'presets available'\n );\n } else {\n console.error('FAILED: Butterchurn presets not properly loaded');\n return false;\n }\n\n // WebGL compatibility test\n try {\n const testCanvas = document.createElement('canvas');\n const testGL = testCanvas.getContext('webgl2') || testCanvas.getContext('webgl');\n console.log('WebGL context test:', {\n hasWebGL: Boolean(testGL),\n version: testGL ? testGL.getParameter(testGL.VERSION) : 'none',\n renderer: testGL ? testGL.getParameter(testGL.RENDERER) : 'none',\n });\n\n if (!testGL) {\n console.error('FAILED: WebGL not available - Butterchurn effects will not work');\n return false;\n }\n } catch (e) {\n console.error('WebGL test error:', e);\n return false;\n }\n\n return true;\n}\n","/**\n * React Entry Point for Electron Renderer\n *\n * Single entry point - mounts ONE React app with shared context\n */\n\nimport React from 'react';\nimport ReactDOM from 'react-dom/client';\nimport './styles/tailwind.css';\nimport { ElectronBridge } from './adapters/ElectronBridge.js';\nimport { AppRoot } from './components/AppRoot.jsx';\nimport { App } from './components/App.jsx';\nimport { verifyButterchurn } from './js/butterchurnVerify.js';\n\nconsole.log('🚀 Initializing application...');\n\n// Verify Butterchurn libraries loaded correctly\nverifyButterchurn();\n\n// Get the ElectronBridge singleton instance\nconst bridge = ElectronBridge.getInstance();\n\n// Connect bridge and mount React app\nbridge.connect().then(() => {\n console.log('✅ ElectronBridge connected');\n\n // Mount single React app to root\n const root = document.getElementById('root');\n if (root) {\n ReactDOM.createRoot(root).render(\n <React.StrictMode>\n <AppRoot>\n <App bridge={bridge} />\n </AppRoot>\n </React.StrictMode>\n );\n console.log('✅ React app mounted');\n }\n});\n\n// Cleanup on window unload\nwindow.addEventListener('beforeunload', () => {\n bridge.disconnect();\n});\n"],"file":"renderer.js"}
|