From b7f6d687947d84347734b391e5f71df47711eec1 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Sat, 28 Dec 2024 19:02:51 +0800 Subject: bump --- dot-config/Kvantum/KvArcDark#/KvArcDark#.kvconfig | 74 ++++++++++----------- dot-config/Thunar/accels.scm | 43 +++++++----- dot-config/dconf/user | Bin 70062 -> 70331 bytes dot-config/hypr/colors.conf | 40 +++++------ dot-config/hypr/hyprlandd.conf | 10 +-- dot-config/rofi/shared/colors.rasi | 14 ++-- dot-config/spicetify/Extracted/Raw/xpui/1186.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/1677.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/1706.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/2979.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/3282.css | 1 + dot-config/spicetify/Extracted/Raw/xpui/3282.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/3848.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/4003.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/4168.css | 72 ++++++++++++++++++++ dot-config/spicetify/Extracted/Raw/xpui/4168.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/4518.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/4553.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/4884.css | 1 + dot-config/spicetify/Extracted/Raw/xpui/4884.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/5125.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/5505.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/5663.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/5727.css | 1 + dot-config/spicetify/Extracted/Raw/xpui/5727.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/581.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/6704.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/7037.css | 1 + dot-config/spicetify/Extracted/Raw/xpui/7037.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/7607.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/838.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/8676.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/8858.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/8925.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/94.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/9512.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/9549.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/9705.css | 1 + dot-config/spicetify/Extracted/Raw/xpui/9705.js | 2 + dot-config/spicetify/Extracted/Raw/xpui/9928.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/1186.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/1677.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/1706.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/2979.js | 2 + .../spicetify/Extracted/Themed/xpui/3282.css | 1 + dot-config/spicetify/Extracted/Themed/xpui/3282.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/3848.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/4003.js | 2 + .../spicetify/Extracted/Themed/xpui/4168.css | 72 ++++++++++++++++++++ dot-config/spicetify/Extracted/Themed/xpui/4168.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/4518.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/4553.js | 2 + .../spicetify/Extracted/Themed/xpui/4884.css | 1 + dot-config/spicetify/Extracted/Themed/xpui/4884.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/5125.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/5505.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/5663.js | 2 + .../spicetify/Extracted/Themed/xpui/5727.css | 1 + dot-config/spicetify/Extracted/Themed/xpui/5727.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/581.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/6704.js | 2 + .../spicetify/Extracted/Themed/xpui/7037.css | 1 + dot-config/spicetify/Extracted/Themed/xpui/7037.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/7607.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/838.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/8676.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/8858.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/8925.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/94.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/9512.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/9549.js | 2 + .../spicetify/Extracted/Themed/xpui/9705.css | 1 + dot-config/spicetify/Extracted/Themed/xpui/9705.js | 2 + dot-config/spicetify/Extracted/Themed/xpui/9928.js | 2 + dot-config/spicetify/config-xpui.ini | 4 +- dot-config/swaync/colors.css | 36 +++++----- dot-config/waybar/colors.css | 38 +++++------ 77 files changed, 400 insertions(+), 125 deletions(-) create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/1186.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/1677.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/1706.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/2979.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/3282.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/3282.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/3848.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4003.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4168.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4168.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4518.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4553.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4884.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/4884.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/5125.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/5505.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/5663.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/5727.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/5727.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/581.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/6704.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/7037.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/7037.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/7607.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/838.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/8676.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/8858.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/8925.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/94.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/9512.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/9549.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/9705.css create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/9705.js create mode 100755 dot-config/spicetify/Extracted/Raw/xpui/9928.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/1186.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/1677.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/1706.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/2979.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/3282.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/3282.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/3848.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4003.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4168.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4168.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4518.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4553.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4884.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/4884.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/5125.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/5505.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/5663.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/5727.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/5727.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/581.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/6704.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/7037.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/7037.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/7607.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/838.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/8676.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/8858.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/8925.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/94.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/9512.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/9549.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/9705.css create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/9705.js create mode 100755 dot-config/spicetify/Extracted/Themed/xpui/9928.js (limited to 'dot-config') diff --git a/dot-config/Kvantum/KvArcDark#/KvArcDark#.kvconfig b/dot-config/Kvantum/KvArcDark#/KvArcDark#.kvconfig index 017b3705..d8c52784 100644 --- a/dot-config/Kvantum/KvArcDark#/KvArcDark#.kvconfig +++ b/dot-config/Kvantum/KvArcDark#/KvArcDark#.kvconfig @@ -74,25 +74,25 @@ submenu_delay=250 tooltip_blur_radius=0 [GeneralColors] -window.color=#424749 -base.color=#424749 -alt.base.color=#8F9E90 -button.color=#2D4623 -light.color=#7F8F80 -mid.light.color=#7F8F80 -dark.color=#464B4D -mid.color=#484D4E -highlight.color=#2D4623 -inactive.highlight.color=#2D4623 -text.color=#BBD2BC -window.text.color=#BBD2BC -button.text.color=#BBD2BC -disabled.text.color=#839384 -tooltip.text.color=#BBD2BC -highlight.text.color=#BBD2BC -link.color=#5A2A2B -link.visited.color=#5A2A2B -progress.indicator.text.color=#BBD2BC +window.color=#3A3742 +base.color=#3A3742 +alt.base.color=#B0B0B4 +button.color=#857AB3 +light.color=#A2A2A7 +mid.light.color=#A2A2A7 +dark.color=#3E3B46 +mid.color=#403D48 +highlight.color=#857AB3 +inactive.highlight.color=#857AB3 +text.color=#EEEEF5 +window.text.color=#EEEEF5 +button.text.color=#EEEEF5 +disabled.text.color=#A7A7AC +tooltip.text.color=#EEEEF5 +highlight.text.color=#EEEEF5 +link.color=#6C6E8E +link.visited.color=#6C6E8E +progress.indicator.text.color=#EEEEF5 [Hacks] transparent_ktitle_label=true @@ -128,10 +128,10 @@ frame.right=3 interior=true interior.element=button indicator.size=9 -text.normal.color=#BBD2BC -text.focus.color=#BBD2BC -text.press.color=#BBD2BC -text.toggle.color=#BBD2BC +text.normal.color=#EEEEF5 +text.focus.color=#EEEEF5 +text.press.color=#EEEEF5 +text.toggle.color=#EEEEF5 text.shadow=0 text.margin=1 text.iconspacing=4 @@ -185,8 +185,8 @@ text.normal.color=#ffffffc8 inherits=PanelButtonCommand frame=false interior=false -text.normal.color=#BBD2BC -text.focus.color=#BBD2BC +text.normal.color=#EEEEF5 +text.focus.color=#EEEEF5 text.bold=true [IndicatorSpinBox] @@ -196,21 +196,21 @@ interior=true frame.left=1 indicator.element=spin indicator.size=10 -text.normal.color=#BBD2BC +text.normal.color=#EEEEF5 [RadioButton] inherits=PanelButtonCommand frame=false interior.element=radio -text.normal.color=#BBD2BC -text.focus.color=#BBD2BC +text.normal.color=#EEEEF5 +text.focus.color=#EEEEF5 [CheckBox] inherits=PanelButtonCommand frame=false interior.element=checkbox -text.normal.color=#BBD2BC -text.focus.color=#BBD2BC +text.normal.color=#EEEEF5 +text.focus.color=#EEEEF5 [Focus] inherits=PanelButtonCommand @@ -250,9 +250,9 @@ indicator.size=9 [ToolboxTab] inherits=PanelButtonCommand -text.normal.color=#BBD2BC -text.press.color=#BBD2BC -text.focus.color=#BBD2BC +text.normal.color=#EEEEF5 +text.press.color=#EEEEF5 +text.focus.color=#EEEEF5 [Tab] inherits=PanelButtonCommand @@ -267,10 +267,10 @@ frame.top=4 frame.bottom=4 frame.left=4 frame.right=4 -text.normal.color=#BBD2BC -text.focus.color=#BBD2BC +text.normal.color=#EEEEF5 +text.focus.color=#EEEEF5 text.press.color={color15} -text.toggle.color=#BBD2BC +text.toggle.color=#EEEEF5 frame.expansion=0 [TabFrame] @@ -473,7 +473,7 @@ frame.left=1 frame.right=1 frame.element=menu interior.element=menu -text.normal.color=#BBD2BC +text.normal.color=#EEEEF5 text.shadow=false frame.expansion=0 diff --git a/dot-config/Thunar/accels.scm b/dot-config/Thunar/accels.scm index ee385f01..97624bc6 100755 --- a/dot-config/Thunar/accels.scm +++ b/dot-config/Thunar/accels.scm @@ -4,11 +4,13 @@ ; (gtk_accel_path "/ThunarBookmarks/25078f7c4b1b447498db786655330d9f" "") ; (gtk_accel_path "/ThunarStandardView/sort-by-type" "") ; (gtk_accel_path "/ThunarStatusBar/toggle-last-modified" "") -(gtk_accel_path "/ThunarActions/uca-action-1622790717174452-1" "F3") +; (gtk_accel_path "/Thunarwindow/menu" "") ; (gtk_accel_path "/ThunarActionManager/cut" "x") +(gtk_accel_path "/ThunarActions/uca-action-1622790717174452-1" "F3") ; (gtk_accel_path "/ThunarStandardView/sort-by-size" "") ; (gtk_accel_path "/ThunarWindow/file-menu" "") ; (gtk_accel_path "/ThunarWindow/close-tab" "w") +; (gtk_accel_path "/ThunarWindow/switch-previous-tab-alt" "ISO_Left_Tab") ; (gtk_accel_path "/ThunarStatusBar/toggle-size" "") ; (gtk_accel_path "/ThunarWindow/new-window" "n") ; (gtk_accel_path "/ThunarWindow/clear-directory-specific-settings" "") @@ -42,49 +44,53 @@ ; (gtk_accel_path "/ThunarActionManager/cut-2" "") ; (gtk_accel_path "/ThunarStandardView/sort-by-dtime" "") ; (gtk_accel_path "/ThunarWindow/switch-next-tab" "Page_Down") -; (gtk_accel_path "/ThunarActionManager/paste-2" "Insert") ; (gtk_accel_path "/ThunarWindow/open-templates" "") +; (gtk_accel_path "/ThunarActionManager/paste-2" "Insert") ; (gtk_accel_path "/ThunarStatusBar/toggle-filetype" "") ; (gtk_accel_path "/ThunarWindow/close-all-windows" "w") ; (gtk_accel_path "/ThunarStandardView/create-document" "") ; (gtk_accel_path "/ThunarWindow/detach-tab" "") ; (gtk_accel_path "/ThunarWindow/cancel-search" "Escape") ; (gtk_accel_path "/ThunarWindow/zoom-in-alt2" "equal") +; (gtk_accel_path "/ThunarStatusBar/toggle-hidden-count" "") ; (gtk_accel_path "/ThunarShortcutsPane/sendto-shortcuts" "d") ; (gtk_accel_path "/ThunarActionManager/undo" "z") ; (gtk_accel_path "/ThunarStandardView/toggle-sort-order" "") -; (gtk_accel_path "/ThunarWindow/reload-alt" "F5") ; (gtk_accel_path "/ThunarWindow/view-location-selector-entry" "") ; (gtk_accel_path "/ThunarActionManager/paste" "v") ; (gtk_accel_path "/ThunarWindow/zoom-in-alt1" "KP_Add") ; (gtk_accel_path "/ThunarWindow/view-menubar" "m") -; (gtk_accel_path "/ThunarStandardView/back" "Left") +; (gtk_accel_path "/ThunarActionManager/restore-show" "") ; (gtk_accel_path "/ThunarWindow/open-desktop" "") ; (gtk_accel_path "/ThunarWindow/view-as-detailed-list" "2") -; (gtk_accel_path "/ThunarActionManager/restore-show" "") +; (gtk_accel_path "/ThunarStandardView/back" "Left") ; (gtk_accel_path "/ThunarWindow/zoom-out" "minus") ; (gtk_accel_path "/ThunarStatusBar/toggle-display-name" "") ; (gtk_accel_path "/ThunarWindow/sendto-menu" "") ; (gtk_accel_path "/ThunarWindow/go-menu" "") ; (gtk_accel_path "/ThunarWindow/remove-from-recent" "") ; (gtk_accel_path "/ThunarActionManager/open-with-other" "") -; (gtk_accel_path "/ThunarStandardView/invert-selection" "") +; (gtk_accel_path "/ThunarStandardView/invert-selection" "i") ; (gtk_accel_path "/ThunarBookmarks/3b616cd47a6533718043eca0de76abf3" "") ; (gtk_accel_path "/ThunarWindow/view-side-pane-shortcuts" "b") +; (gtk_accel_path "/ThunarWindow/reload-alt-2" "Reload") ; (gtk_accel_path "/ThunarWindow/view-location-selector-menu" "") ; (gtk_accel_path "/ThunarWindow/edit-menu" "") -; (gtk_accel_path "/ThunarWindow/reload" "r") -; (gtk_accel_path "/ThunarBookmarks/a8f834d2affc908bb8a2a2b4f72cc825" "") ; (gtk_accel_path "/ThunarActionManager/copy" "c") +; (gtk_accel_path "/ThunarStandardView/sort-by-mtime" "") +; (gtk_accel_path "/ThunarBookmarks/a8f834d2affc908bb8a2a2b4f72cc825" "") +; (gtk_accel_path "/ThunarStandardView/forward-alt" "Forward") ; (gtk_accel_path "/ThunarActionManager/move-to-trash" "") -; (gtk_accel_path "/ThunarStandardView/unselect-all-files" "Escape") +; (gtk_accel_path "/ThunarWindow/reload-alt-1" "F5") ; (gtk_accel_path "/ThunarActionManager/delete-3" "KP_Delete") -; (gtk_accel_path "/ThunarStandardView/sort-by-mtime" "") ; (gtk_accel_path "/ThunarStandardView/arrange-items-menu" "") -; (gtk_accel_path "/ThunarWindow/toggle-side-pane" "F9") -; (gtk_accel_path "/ThunarWindow/open-computer" "") +; (gtk_accel_path "/ThunarStandardView/unselect-all-files" "Escape") +; (gtk_accel_path "/ThunarWindow/contents/help-menu" "") ; (gtk_accel_path "/ThunarWindow/bookmarks-menu" "") +; (gtk_accel_path "/ThunarWindow/reload" "r") +; (gtk_accel_path "/ThunarWindow/open-computer" "") ; (gtk_accel_path "/ThunarWindow/toggle-image-preview" "") +; (gtk_accel_path "/ThunarWindow/toggle-side-pane" "F9") ; (gtk_accel_path "/ThunarWindow/view-as-icons" "1") ; (gtk_accel_path "/ThunarActionManager/delete-2" "Delete") ; (gtk_accel_path "/ThunarWindow/zoom-in" "plus") @@ -96,33 +102,36 @@ ; (gtk_accel_path "/ThunarWindow/search" "f") ; (gtk_accel_path "/ThunarWindow/new-tab" "t") ; (gtk_accel_path "/ThunarWindow/zoom-reset" "0") -; (gtk_accel_path "/ThunarWindow/contents/help-menu" "") +; (gtk_accel_path "/ThunarStandardView/back-alt2" "Back") ; (gtk_accel_path "/ThunarActionManager/open-in-new-tab" "p") ; (gtk_accel_path "/ThunarWindow/view-location-selector-buttons" "") ; (gtk_accel_path "/ThunarBookmarks/63019fc71eea97b467f394a1762f75f8" "") ; (gtk_accel_path "/ThunarActionManager/redo" "z") ; (gtk_accel_path "/ThunarWindow/open-trash" "") +; (gtk_accel_path "/ThunarActionManager/trash-delete-2" "KP_Delete") ; (gtk_accel_path "/ThunarActionManager/open-in-new-window" "o") ; (gtk_accel_path "/ThunarWindow/view-statusbar" "") ; (gtk_accel_path "/ThunarActionManager/open-location" "") ; (gtk_accel_path "/ThunarStandardView/duplicate" "") ; (gtk_accel_path "/ThunarBookmarks/c4263fd857020f222a59a40ceaa8e0fc" "") -; (gtk_accel_path "/ThunarActionManager/trash-delete-2" "KP_Delete") +; (gtk_accel_path "/ThunarStandardView/back-alt1" "BackSpace") ; (gtk_accel_path "/ThunarStandardView/create-folder" "n") ; (gtk_accel_path "/ThunarWindow/open-home" "Home") +; (gtk_accel_path "/ThunarWindow/switch-focused-split-view-pane" "") ; (gtk_accel_path "/ThunarWindow/show-hidden" "h") ; (gtk_accel_path "/ThunarStandardView/set-default-app" "") ; (gtk_accel_path "/ThunarWindow/empty-trash" "") -; (gtk_accel_path "/ThunarStandardView/back-alt" "BackSpace") ; (gtk_accel_path "/ThunarBookmarks/5c1b3e9a85ac77fb8262ac48ee3ca8ab" "") ; (gtk_accel_path "/ThunarWindow/preferences" "") ; (gtk_accel_path "/ThunarActionManager/delete" "") +; (gtk_accel_path "/ThunarWindow/open-network" "") ; (gtk_accel_path "/ThunarWindow/view-side-pane-tree" "e") ; (gtk_accel_path "/ThunarWindow/open-file-system" "") -; (gtk_accel_path "/ThunarWindow/open-network" "") +; (gtk_accel_path "/ThunarWindow/search-alt" "Search") +; (gtk_accel_path "/ThunarWindow/switch-next-tab-alt" "Tab") ; (gtk_accel_path "/ThunarActionManager/sendto-desktop" "") ; (gtk_accel_path "/ThunarStandardView/make-link" "") ; (gtk_accel_path "/ThunarBookmarks/29defdfa1adb3ece15ecb7dd781daf5c" "") -; (gtk_accel_path "/ThunarBookmarks/95a813d900daa66deea133551f8f2b0b" "") ; (gtk_accel_path "/ThunarWindow/zoom-reset-alt" "KP_0") +; (gtk_accel_path "/ThunarBookmarks/95a813d900daa66deea133551f8f2b0b" "") ; (gtk_accel_path "/ThunarWindow/about" "") diff --git a/dot-config/dconf/user b/dot-config/dconf/user index 05bd1603..326080ce 100644 Binary files a/dot-config/dconf/user and b/dot-config/dconf/user differ diff --git a/dot-config/hypr/colors.conf b/dot-config/hypr/colors.conf index 1545a9d6..34e4a097 100644 --- a/dot-config/hypr/colors.conf +++ b/dot-config/hypr/colors.conf @@ -1,20 +1,20 @@ -$wallpaper = /home/system/.cache/blue-fantasy-river.3840x2160.mp4.png -$background = rgb(1C2122) -$foreground = rgb(D6E5D6) -$cursor = rgb(D6E5D6) -$color0 = rgb(424749) -$color1 = rgb(063A24) -$color2 = rgb(5A2A2B) -$color3 = rgb(014736) -$color4 = rgb(2D4623) -$color5 = rgb(673D49) -$color6 = rgb(89B68A) -$color7 = rgb(BBD2BC) -$color8 = rgb(839384) -$color9 = rgb(063A24) -$color10 = rgb(5A2A2B) -$color11 = rgb(014736) -$color12 = rgb(2D4623) -$color13 = rgb(673D49) -$color14 = rgb(89B68A) -$color15 = rgb(BBD2BC) +$wallpaper = /home/system/.cache/7952139-uhd_3840_2160_30fps.mp4.png +$background = rgb(120E19) +$foreground = rgb(F9F9FE) +$cursor = rgb(F9F9FE) +$color0 = rgb(3A3742) +$color1 = rgb(0D0640) +$color2 = rgb(6C6E8E) +$color3 = rgb(8576B6) +$color4 = rgb(857AB3) +$color5 = rgb(ADADC7) +$color6 = rgb(EEEFFC) +$color7 = rgb(EEEEF5) +$color8 = rgb(A7A7AC) +$color9 = rgb(0D0640) +$color10 = rgb(6C6E8E) +$color11 = rgb(8576B6) +$color12 = rgb(857AB3) +$color13 = rgb(ADADC7) +$color14 = rgb(EEEFFC) +$color15 = rgb(EEEEF5) diff --git a/dot-config/hypr/hyprlandd.conf b/dot-config/hypr/hyprlandd.conf index b7634275..8b2f7a84 100644 --- a/dot-config/hypr/hyprlandd.conf +++ b/dot-config/hypr/hyprlandd.conf @@ -129,9 +129,9 @@ animations { animation = fade, 1, 4, md3_decel - animation = windows, 1, 3, overshot, popout 15% + # animation = windows, 1, 3, overshot, popout 15% # animation = windowsOut, 1, 2, slow-fast, popin 15% - animation = windowsOut, 1, 2, slow-fast, popout 15% + # animation = windowsOut, 1, 2, slow-fast, popout 15% # animation = windowsMove, 1, 2, md3_accel # when new window appears, it will block it for a while since its slower then windowIn animation animation = workspaces, 1, 6, fast-slow, slide animation = workspacesIn, 1, 6, fast-slow, slidefade @@ -217,10 +217,10 @@ input { cursor { # allow_dumb_copy = true - no_hardware_cursors = true - no_break_fs_vrr = true + no_hardware_cursors = false + # no_break_fs_vrr = true # zoom_rigid = true - persistent_warps = true + # persistent_warps = true } plugin { diff --git a/dot-config/rofi/shared/colors.rasi b/dot-config/rofi/shared/colors.rasi index 3f0d39b6..028ab6c4 100644 --- a/dot-config/rofi/shared/colors.rasi +++ b/dot-config/rofi/shared/colors.rasi @@ -1,9 +1,9 @@ * { - background: #1C212225; - background-alt: #01473625; - foreground: #D6E5D6; - selected: #673D4940; - active: #063A2410; - urgent: #2D462375; - Prompt: #1C2122; + background: #120E1925; + background-alt: #8576B625; + foreground: #F9F9FE; + selected: #ADADC740; + active: #0D064010; + urgent: #857AB375; + Prompt: #120E19; } diff --git a/dot-config/spicetify/Extracted/Raw/xpui/1186.js b/dot-config/spicetify/Extracted/Raw/xpui/1186.js new file mode 100755 index 00000000..d452398f --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/1186.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1186],{18278:(e,t,n)=>{n.d(t,{A:()=>ve});var a=n(30758),o=n(62411),c=n(74159),r=n(14414),i=n(7315),s=n(86677),l=n(14343),d=n(31417),u=n(65503),m=n(81670),h=n(8725),g=n(95530),f=n(92483),x=n(85823),j=n(48945),v=n(44971);const b=["Escape","ArrowDown","ArrowUp","Tab"],y=e=>b.includes(e);var R=n(57776),C=n(59147);const p=new R.l("searchConcertLocations","query","43ededefcba8b3f519fd0c2d6c025dfeec9f742cf47d04a3c3711d95b27deda3",null);var _=n(37178),w=n(62021);const N="pdkMNbSQl8Yi5tl0iOF9",D="lbKmnVjXCdZ3kRBxjKQZ",k="VAJ54U4IyPKmKRWXweMn",L="r3oh3bOf2I7DZQEND5Uz",S="XwomR4z9c60ph1tYBcdm",I="bQATTxDxEbS7xXRsr_Mt",M="wFdZQwoko8rVRTLeFG5G",E="jcDbJiJUoAVWZ7h1Rhhy",Z="UkSUgC7NQnYbptBJEAM9",B="xfncDja0wZotJaVS3aq9",V="gJedMi0s8_RQ4d2aWYzI";var A=n(86070);const O=({onCancel:e,onChange:t,onBack:n,title:o,children:c})=>{const[r,s]=(0,w.x)("recent-locations",[]),[l,b]=(0,a.useState)(""),R=(0,_.W)(),O=(0,a.useRef)(null),T=(0,a.useRef)(null),q=(0,a.useRef)(-1),{data:z}=(F={query:l},(0,C.I)(p,F,U));var F,U;const H=(e=>"items"in(e?.concertLocations??{}))(z)?z.concertLocations.items:[];return(0,A.jsx)("div",{onKeyDown:e=>{const t=e.key;if(!y(t))return;e.preventDefault();const n=((e,t,n)=>{switch(n){case"ArrowDown":case"Tab":return Math.min(e+1,t);case"ArrowUp":return Math.max(e-1,-1);default:return e}})(q?.current??-1,H.length,t),a=O.current?.childNodes[n]?.firstChild;n>=0&&a instanceof HTMLButtonElement&&a.focus(),-1===n&&T.current?.focus(),q.current=n},"data-interaction-context":"location-selector",children:(0,A.jsx)(v.A,{isOpen:!0,onRequestClose:e,children:(0,A.jsxs)("section",{className:N,children:[n&&(0,A.jsx)("div",{className:L,children:(0,A.jsx)(u.H,{iconOnly:R?m.V:h.g,size:"small",onClick:n,"aria-label":d.Ru.get("navbar.go-back")})}),(0,A.jsx)("div",{className:k,children:(0,A.jsx)(u.H,{iconOnly:i.M,size:"small",onClick:e,"aria-label":d.Ru.get("close")})}),(0,A.jsxs)("div",{className:D,children:[(0,A.jsxs)("div",{className:S,children:[(0,A.jsx)(g.E,{as:"h3",variant:"bodyMediumBold",children:o??d.Ru.get("concert.location.search.header")}),(0,A.jsx)(f.E,{iconLeading:(0,A.jsx)(x.C,{}),children:(0,A.jsx)(j.Z,{placeholder:d.Ru.get("concert.location.search.placeholder"),onChange:e=>b(e.currentTarget.value),value:l,ref:T,autoFocus:!0})})]}),!l&&(0,A.jsx)(A.Fragment,{children:c}),l&&z?.concertLocations&&0===H.length&&(0,A.jsx)(g.E,{as:"p",variant:"bodyMedium",children:d.Ru.get("concert.error.no_locations_found_subtitle")}),l&&(0,A.jsx)("ol",{className:I,ref:O,children:H.map(((e,n)=>(0,A.jsx)("li",{children:(0,A.jsx)("button",{tabIndex:n+1,className:B,onClick:()=>{const n={geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geoHash,fullName:e.fullName};r.find((e=>e.geonameId===n.geonameId))||s([...r,n]),t(n)},children:e.fullName})},e.geonameId)))}),!!r?.length&&!l&&(0,A.jsxs)("div",{className:M,children:[(0,A.jsx)("div",{className:E,children:(0,A.jsx)(g.E,{as:"h3",variant:"bodyMediumBold",children:d.Ru.get("concert.location.search.recent")})}),(0,A.jsx)("ol",{children:r.map(((e,n)=>(0,A.jsxs)("li",{className:Z,children:[(0,A.jsx)("button",{tabIndex:n+1,className:B,onClick:()=>t({geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geohash}),children:(0,A.jsx)("div",{className:V,children:e.fullName??[e.name,e.country].join(d.Ru.getSeparator())})}),(0,A.jsx)(u.H,{"aria-label":d.Ru.get("remove"),iconOnly:i.M,size:"small",onClick:t=>{t.stopPropagation(),s(r.filter((t=>t.geonameId!==e.geonameId)))}})]},e.geonameId)))})]})]})]})})})};var T=n(88751);const q=new R.l("saveLocation","mutation","5502351e9f201ae29014ca55d3b24b755ba261a1a9eb35fb498cb4c7df419353",null);var z=n(29195);const F="WZzy7tMC5xlIMwoZ32JU",U="LkdC_QJiLoD0OTOWnkJV",H="WqruN54NvYqlA2XlTJ0Z",W="GS4yLEr0XMj8kw2iMAd8",J="prICvcudVq_SL6dqkZBw",$="YLM_DWbpYGBpvqtDEhum",G="h8jjXJERT64OZi2sHCbi",K=(e,t)=>e(q,{geonameId:t}),Q=({onCancel:e,onSave:t,location:n,storeConcertLocation:o=K})=>{const[c,l]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),{getGraphQLLoader:g}=(0,z.mv)(),f=g();return(0,A.jsx)("div",{onKeyDown:t=>{const n=t.key;y(n)&&"Escape"===n&&e()},"data-interaction-context":"location-selector",children:(0,A.jsx)(v.A,{isOpen:!0,onRequestClose:e,children:(0,A.jsxs)("section",{className:F,children:[(0,A.jsx)("div",{className:H,children:(0,A.jsx)(u.H,{iconOnly:i.M,size:"medium",onClick:e,"aria-label":d.Ru.get("close")})}),(0,A.jsxs)("div",{className:U,children:[(0,A.jsx)("div",{className:W,children:(0,A.jsx)(T.Z,{variant:"celloCanon",children:d.Ru.get("concerts.location.change.confirm",n.name)})}),(0,A.jsx)("div",{className:J,children:(0,A.jsx)(r.t,{size:"xlarge"})}),(0,A.jsx)("div",{className:$,children:(0,A.jsx)(T.Z,{semanticColor:"textSubdued",children:d.Ru.get("concerts.location.change.info")})}),(0,A.jsx)(s.$,{onClick:async()=>{l(!0),h(!1);try{const a=await o(f,String(n.geonameId));if(e=a?.data?.storeUserLocation,void 0===e||!("success"in e)||!0!==e.success)throw Error();t()}catch{h(!0),l(!1)}var e},disabled:c,children:d.Ru.get("concerts.location.change.button")}),m&&(0,A.jsx)("div",{className:G,children:(0,A.jsx)(T.Z,{semanticColor:"textWarning",children:d.Ru.get("concerts.location.change.error")})})]})]})})})};var P=n(16273),X=n(67499);const Y=()=>(0,A.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,A.jsx)("path",{d:"M6.94875 9.48555V14.9935C6.94875 15.5494 7.42943 16 8.02239 16C8.42905 16 8.80081 15.7846 8.98268 15.4436L15.6347 2.9711L15.9539 2.07322C16.1803 1.43663 15.5343 0.830999 14.8552 1.0432L13.8975 1.34249L0.593494 7.57874C0.229762 7.74924 0 8.09776 0 8.47901C0 9.03491 0.480685 9.48555 1.07364 9.48555H6.94875Z",fill:"currentColor"})}),ee=new R.l("concertLocationsByLatLon","query","8a059d072a17a1199feb21fe846271f1680eda87010c832852ced0c55c6c7c96",null);var te=n(81834),ne=n(27963),ae=n(50671);const oe="LUZuAtOgmXbneOoxnP8P",ce="dIOLAcD26GH01pNjZHBL",re="tXNcvSNL8Kx6wKUOej2I",ie="XZ1RzeF1kz6ch8idhAAD",se="GQeQjsi5dPF4PFO7BzvL",le=e=>{const[t,n]=(0,a.useState)(!1),[o,c]=(0,a.useState)(!1),r=(()=>{const e=ee,{name:t,sha256Hash:n}=e,o=(0,P.jE)(),{request:c}=(0,a.useContext)(te.j);return a=>o.ensureQueryData({queryFn:()=>(0,ne.c)(c,e,a),queryKey:[t,a,n]})})(),i=(0,ae.t)(e.spec);return(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)("div",{children:d.Ru.get("concert.location.search.current_location.error")}),(0,A.jsx)("button",{ref:i,className:re,onClick:async()=>{c(!0),e.getCurrentPosition((async t=>{const a=await r({lat:t.coords.latitude,lon:t.coords.longitude});if(o=a?.data?.concertLocations,void 0===o||!("items"in o))return c(!1),n(!0);var o;const[i]=a.data.concertLocations.items;return e.onChange({geonameId:Number(i.geonameId),name:i.name})}))},children:(0,A.jsx)(g.E,{semanticColor:"textSubdued",className:se,children:o?(0,A.jsx)(X.U,{}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Y,{})," ",d.Ru.get("concert.location.search.current_location")]})})})]})},de=new R.l("userLocation","query","079939378ca79b67c6d047be9152ea940d21f10bbfa2f5d4cf4d8320d87774c2",null),ue=(e,t)=>(0,C.I)(de,e,t),me="Hj5kpRfIocJic5jcxsW_",he="aJduGcVsoCwJvV1jVqjl",ge=({onClick:e})=>{const{data:t}=ue({});return t?(0,A.jsxs)("div",{className:me,children:[(0,A.jsxs)("div",{className:he,children:[(0,A.jsx)(r.t,{size:"small"}),(0,A.jsxs)("div",{children:[(0,A.jsx)(T.Z,{as:"div",semanticColor:"textPositive",variant:"ballad",children:t.me?.profile?.location?.name}),(0,A.jsx)(T.Z,{as:"div",semanticColor:"textSubdued",children:d.Ru.get("concerts.location.preferred")})]}),(0,A.jsx)(c.n,{onClick:e,size:"small",children:d.Ru.get("concerts.location.change")})]}),(0,A.jsx)(T.Z,{semanticColor:"textSubdued",variant:"finale",children:d.Ru.get("concerts.location.preferred.info")})]}):null};var fe=n(38501),xe=n(36061),je=n(33329);const ve=e=>{const{isAnonymous:t}=(0,o.d4)(xe.Ht),{data:n,invalidate:u}=ue({}),m=n?.me?.profile?.location,[h,g]=(0,a.useState)(),{handleLocationChange:f,locationStr:x,headerSpec:j}=e,[v,b]=(0,a.useState)(e.isDialogDefaultOpen??!1),[y,R]=(0,a.useState)(e.dialog??"browse"),[C,p]=(0,a.useState)();(0,a.useEffect)((()=>{h||g(m?.name)}),[m?.name,g,h]);const _=(0,a.useMemo)((()=>j?.changeLocationButtonFactory()),[j]),w=(0,a.useMemo)((()=>j?.changeLocationUiFactory({identifier:x})),[j,x]),N=(0,a.useMemo)((()=>w&&"currentLocationButtonFactory"in w?w?.currentLocationButtonFactory():void 0),[w]),D=(0,je.s)(),k=(0,l.NC)(fe.tE2),L=()=>{_&&!v&&D.logInteraction(_.hitUiReveal()),b(!v)},S=()=>{b(!1),R(e.dialog??"browse"),p(void 0)},I=e=>{f(e),S()},M=void 0!==h&&e.locationStr!==d.Ru.get("concerts.default_location")&&h!==e.locationStr;h!==m?.name&&e.locationStr===m?.name&&g(m.name);const E=M?(0,A.jsxs)("div",{className:ce,children:[m&&(0,A.jsx)(c.n,{size:"small",iconOnly:i.M,"aria-label":d.Ru.get("close"),onClick:()=>f({geonameId:Number(m.geonameId),name:m.name})}),(0,A.jsx)(s.$,{size:"small",iconTrailing:i.M,onClick:()=>b(!0),className:ie,children:x})]}):(0,A.jsx)(c.n,{iconLeading:r.t,onClick:L,size:"small",className:ie,children:x}),Z=e.action?(0,a.cloneElement)(e.action,{onClick:L}):E;return(0,A.jsxs)("div",{className:oe,children:[Z,v&&"browse"===y&&(0,A.jsx)(O,{title:d.Ru.get("concert.location.search.header"),onChange:I,onCancel:S,spec:w,children:!t&&(0,A.jsx)(ge,{onClick:()=>R("preferred")})}),v&&"preferred"===y&&(0,A.jsx)(O,{title:d.Ru.get("concerts.location.preferred"),onChange:e=>{R("confirm"),p(e)},onCancel:S,onBack:e.dialog?void 0:()=>R("browse"),spec:w,children:k&&"geolocation"in navigator&&(0,A.jsx)(le,{spec:N,getCurrentPosition:navigator.geolocation.getCurrentPosition.bind(navigator.geolocation),onChange:e=>{N?.hitUiReveal(),R("confirm"),p(e)}})}),v&&"confirm"===y&&C&&(0,A.jsx)(Q,{location:C,onCancel:S,onSave:async()=>{g(void 0),await u(),I(C)}})]})}},7834:(e,t,n)=>{n.d(t,{k:()=>f});var a=n(95530),o=n(86677),c=n(61759),r=n(31417),i=n(18278),s=n(57776),l=n(59147);const d=new s.l("inferredUserLocation","query","5db4c507ea735d2a1f37bd1166eca2c1a0e3387bb875ebca5d6031b6eccceeba",null);var u=n(50671),m=n(21549);const h="g8vV54lx3mRkeseb5Bf2";var g=n(86070);const f=e=>{const{data:t}=(n={},(0,l.I)(d,n,s));var n,s;const{spec:f}=(0,m.r)(c.F,{}),x=(0,u.t)(f);return t&&t.me?.profile?.location?.isInferred?(0,g.jsxs)("div",{className:h,ref:x,children:[(0,g.jsx)(a.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:r.Ru.get("concert.feed.set_location")}),(0,g.jsx)(a.E,{paddingBottom:"tighter-2",children:r.Ru.get("concert.feed.set_location_description")}),(0,g.jsx)(i.A,{locationStr:"london",dialog:"preferred",headerSpec:f,handleLocationChange:e.onLocationChange,action:(0,g.jsx)(o.$,{children:r.Ru.get("concert.feed.set_location_button")})})]}):null}},21113:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(30758),o=n(95530),c=n(10887),r=n(21082),i=n(54926);const s="D_V60ibMxH9Vy7kyvWvc",l="anRK1X9LKn5HxZQJB5Tl",d="shUifmqVle_F5ILRpCqe",u="_WibGTg4OzGdsTf18zK1",m="LHhL2094jqvK0MNwlGAu",h="yRQGIh3Y05BG51IHUW2b",g="fT86P9Div4C8GXI9hZ36",f="G8sU0RZZT_ZhaEv7B26V";var x=n(86070);const j=(0,a.memo)((({date:e,image:t,title:n,subTitle:a,dateRange:j,uri:v,onClick:b})=>{const y=e?(0,i.l4)(e):void 0;return(0,x.jsxs)(r.N,{to:v,className:s,"data-testid":"concert-row",onClick:b,children:[(0,x.jsx)("time",{dateTime:e,className:l,children:y&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o.E,{as:"div",variant:"bodySmall",children:(0,i.tj)(y)}),(0,x.jsx)(o.E,{variant:"bodyMediumBold",children:(0,i.Py)(y)})]})}),t&&(0,x.jsx)(c._,{src:t,alt:"",role:"presentation",className:d}),(0,x.jsxs)("div",{className:m,children:[(0,x.jsxs)("div",{className:h,children:[(0,x.jsx)(o.E,{variant:"bodyMedium",className:u,children:n}),(0,x.jsx)(o.E,{variant:"bodySmall","data-testid":"event-venue",semanticColor:"textSubdued",children:a})]}),(0,x.jsx)(o.E,{as:"span",variant:"bodyMedium",semanticColor:"textSubdued",className:g,children:j}),(0,x.jsx)("div",{className:f,children:y&&(0,x.jsx)(o.E,{variant:"bodyMedium",semanticColor:"textSubdued",children:(0,i.WB)(y)})})]})]})}))},15558:(e,t,n)=>{n.d(t,{$V:()=>a,Bw:()=>l,Lw:()=>s,V5:()=>u,dR:()=>r,eO:()=>i,m4:()=>m,se:()=>c,w1:()=>d,ys:()=>o});const a=e=>"data"in e&&Object.keys(e.data).length>0,o=e=>"concerts"in(e??{}),c=e=>null!=e,r=e=>"__typename"in e&&"AllEvents"===e.__typename,i=e=>"__typename"in e,s=e=>"__typename"in e,l=e=>!!e&&"sections"in e,d=e=>"__typename"in e,u=e=>Object.keys(e).includes("data"),m=e=>void 0!==e&&Object.keys(e).includes("uri")},54926:(e,t,n)=>{n.d(t,{Fn:()=>m,MW:()=>h,Py:()=>d,VJ:()=>u,Vi:()=>j,WB:()=>g,WZ:()=>f,Y:()=>i,dp:()=>s,l4:()=>r,m7:()=>x,tX:()=>b,tj:()=>l});var a=n(12058),o=n(31417),c=n(15558);const r=e=>new Date(e.substring(0,16)),i=e=>o.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric"}),s=e=>o.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}),l=e=>o.Ru.formatDate(e,{month:"short"}),d=e=>o.Ru.formatDate(e,{day:"numeric"}),u=e=>o.Ru.formatDate(e,{weekday:"short"}),m=e=>o.Ru.formatDate(e,{month:"short",day:"numeric"}),h=e=>o.Ru.formatDate(e,{weekday:"short",hour:"numeric",minute:"numeric"}),g=e=>o.Ru.formatDate(e,{hour:"numeric",minute:"numeric"}),f=(e,t)=>{if(e.toDateString()===t.toDateString())return i(e);if(e.getMonth()===t.getMonth()){return`${o.Ru.formatDate(e,{day:"numeric",month:"short"})}–${o.Ru.formatDate(t,{day:"numeric"})}`}return`${o.Ru.formatDate(e,{day:"numeric",month:"short"})}–${o.Ru.formatDate(t,{day:"numeric",month:"short"})}`},x=e=>{if(!e)return!1;const t=new Date(e);return new Date>t},j=e=>{const[t]=e,n=e[e.length-1];return(0,c.$V)(t)&&(0,c.$V)(n)?{startDate:r(t.data.startDateIsoString),endDate:r(n.data.startDateIsoString)}:{startDate:new Date,endDate:new Date}},v={month:"short",day:"numeric"},b=e=>{if((0,a.r)(e.from,e.to))return o.Ru.formatDate(e.from,v);return`${o.Ru.formatDate(e.from,v).replace(/ /g," ")} - ${o.Ru.formatDate(e.to,v).replace(/ /g," ")}`}},73812:(e,t,n)=>{n.d(t,{Ac:()=>c,a9:()=>r,i3:()=>l,im:()=>s,re:()=>i,tI:()=>o});var a=n(31417);const o=(e,t,n)=>!!e&&(t||!n.length),c=e=>1===e.length?a.Ru.get("concert.header.upcoming_concert_title_1",...e):2===e.length?a.Ru.get("concert.header.upcoming_concert_title_2",...e):3===e.length?a.Ru.get("concert.header.upcoming_concert_title_3",...e):4===e.length?a.Ru.get("concert.header.upcoming_concert_title_4",...e):e.length>4?a.Ru.get("concert.header.upcoming_concert_title_more",...e):"",r=e=>{const t=(e=>e.artists.map((e=>e.name)))(e);return o(e.title,e.festival,t)?e.title:c(t)},i=e=>1===e.length?a.Ru.get("concert.header.entity_title_1",...e):2===e.length?a.Ru.get("concert.header.entity_title_2",...e):3===e.length?a.Ru.get("concert.header.entity_title_3",...e):4===e.length?a.Ru.get("concert.header.entity_title_4",...e):e.length>4?a.Ru.get("concert.header.entity_title_more",...e):"",s=({name:e,city:t,region:n,country:o})=>[e,t,n,o].filter((e=>!!e&&"unknown"!==e.toLowerCase())).join(a.Ru.getSeparator()),l=e=>{if(!e.artists||0===e.artists.items.length)return e.title;if(e.festival)return e.title;const t=e.artists.items.map((e=>e.profile.name));return i(t)}},10266:(e,t,n)=>{n.d(t,{K9:()=>c,gq:()=>r,zV:()=>i});const a=(e,t)=>t.formatDate(e,{year:"numeric",month:"numeric",day:"numeric"}),o=(e,t)=>t.formatDate(e,{hour:"numeric",minute:"numeric"}),c=(e,t,n,c,r)=>{if(!e||!r)return"";if(e&&t&&n&&c){const i=a(c,r),s=o(c,r);return r.get("concert.entity_metadata.title_with_date_and_time",e,t,n,i,s)}return r.get("concert.entity_metadata.title",e,t,n)},r=e=>{if(!e)return"";return`${e} Tickets - ${(new Date).getFullYear()} Concert Tour Dates | Spotify`},i=e=>`Concert Tickets & Tour Dates for you${e?` in ${e}`:""} | Spotify`}}]); +//# sourceMappingURL=1186.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/1677.js b/dot-config/spicetify/Extracted/Raw/xpui/1677.js new file mode 100755 index 00000000..cd8089bc --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/1677.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1677],{72954:(e,a,s)=>{s.d(a,{w:()=>m});var n=s(30758),t=s(97500),i=s.n(t),o=s(62955),l=s(31417),r=s(881),c=s(9547);const d="pvGZ831aNzHTQMZ8CA_u";var u=s(86070);const m=(0,n.memo)((function({onClick:e=(()=>{}),size:a,className:s,uri:t,sharingInfo:m,interactionData:h,ariaLabel:x=l.Ru.get("mwp.list.item.share"),condensedAll:p,placement:g,semanticColor:j,disableTooltip:b}){const{onCopyLink:v}=(0,c.L)({sharingInfo:m,uri:t,interactionData:h}),y=(0,n.useCallback)((()=>{v(),e()}),[e,v]);return(0,u.jsx)(r.a,{ariaLabel:x,size:a,onClick:y,className:i()(d,s),icon:o.C,condensedAll:p,placement:g,condensed:!0,semanticColor:j,disableTooltip:b})}))},33934:(e,a,s)=>{s.d(a,{k:()=>ce});var n=s(30758),t=s(97500),i=s.n(t),o=s(85387),l=s(95530),r=s(6772),c=s(23041),d=s(79871),u=s(6593),m=s(97848),h=s(22726),x=s(31417),p=s(96164),g=s(86677),j=s(17866);const b="rFwxt8s8DYY8p1O7tYZW",v="sA2HogGQNi8R_zpCWei5",y="H92pPTuqDR5DcoTtjcb3";var C=s(86070);const k=({cardHeaderText:e,buttonText:a,buttonTarget:s,className:t})=>{const o=(0,n.useCallback)((e=>{e.stopPropagation()}),[]),r=(0,h.o_h)(s).toURLPath(!0);return(0,C.jsxs)("div",{className:i()(b,t),onClick:o,children:[(0,C.jsxs)("div",{className:v,children:[(0,C.jsx)(p.p,{className:y,size:"small",semanticColor:"textBase"}),(0,C.jsx)(l.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:e})]}),(0,C.jsx)(g.$,{size:"small",colorSet:"invertedLight",component:j.v,href:r,children:a})]})};var f=s(91305),N=s(2668),E=s(53187),T=s(58110),w=s(72954),R=s(75830),P=s(91676),I=s(68204),S=s(31650),D=s(98712),B=s(19546),M=s(85346),L=s(35035),z=s(21549);const U="T9iBYqbERZHdwDl0U2tC",A="DS4BYgmEO7Wy5RutUt60",H="N2Fkohxhgu1_QAWUDc4O",F="hGbRiYkIjjy4sJvor0A2",G="OgaF7O4ER8AvZfFd6JdJ",O="bdGDIiYj50H66Hx5uevz",_="kiT5NMttSzIDbtqBKc1J",Z="TG1hsDPHeO5QUf4EQasO",Y="_NdByrVnM0OS7aK_GfRn",V="afJf_mGi7ghd5WYQwPLb",W="UpgTvLnGW6GFjAUfaPXH",Q="kxVuYXZ4sVWn6XuJgFhX",q="UvdRnanMNuY384mjTf2l",J="fmu47VumZ84IoKgMK1yU",X="dUScIGoP9fWn5IVsztB7",$={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},K=n.memo((function({episodeUri:e,showUri:a,sharingInfo:s,size:t,canDownload:o,requestId:l,onMarkAsPlayed:r,onMoreButtonClick:c,name:d,fullyPlayed:u,index:m}){const h=(0,M.T)(e),{spec:p,logger:g}=(0,z.r)(f.d,{data:{uri:e,reason:l||"",position:m}}),j=t===D.E.LARGE?"medium":"small",b=(0,n.useMemo)((()=>(0,C.jsx)(N.e,{uri:e,size:j,className:i()({[G]:(0,B.X)(h)}),onClick:(a,s)=>{s===L.NV.ADD?g.logInteraction(p.downloadButtonFactory().hitDownload({itemToDownload:e})):L.NV.REMOVE&&g.logInteraction(p.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:o,condensed:!0})),[e,h,p,g,j,o]),v=(0,n.useMemo)((()=>(0,C.jsx)(w.w,{uri:e,sharingInfo:s,interactionData:$,size:j,onClick:()=>{g.logInteraction(p.copyLinkFactory().hitShare({entityToBeShared:e,shareId:s?.shareId||""}))}})),[e,s,p,g,j]),y=(0,n.useMemo)((()=>(0,C.jsx)(T.b,{uri:e,size:j,className:G,onClick:a=>{a?g.logInteraction(p.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):g.logInteraction(p.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))},condensed:!0})),[e,p,g,j]),k=(0,S.v)(e),U=(0,n.useMemo)((()=>(0,C.jsx)(I.g,{size:j,uri:e,className:G})),[e,j]),A=(0,n.useMemo)((()=>(0,C.jsx)(R.b,{menu:(0,C.jsx)(P.b,{uri:e,showUri:a,isPlayed:u,onMarkAsPlayed:r}),children:(0,C.jsx)(E.e,{size:j,label:x.Ru.get("more.label.context",d),onClick:c})})),[e,u,d,r,c,a,j]);return(0,C.jsxs)(C.Fragment,{children:[k?U:y,b,v,A]})}));var ee=s(21082),ae=s(60281),se=s(34733),ne=s(33593),te=s(32255),ie=s(69624),oe=s(7307),le=s(72051),re=s(55769);const ce=n.memo(n.forwardRef((function({uri:e,name:a,showName:s,showUri:t,size:p,description:g,durationMs:j,images:b,badges:v,fullyPlayed:y,releaseDate:f,resumePositionMs:N,isCurrentlyPlaying:E,isPlaying:T,onContextMenu:w,onTouchStart:R,onTouchEnd:P,handlePlaybackClick:I,draggable:S,handleDragStart:B,handleClick:M,position:L,index:z,isPlayable:G,isPaywalled:$,isUserSubscribed:ce,episodeSharingInfo:de,playButtonWrapper:ue=null,highlightText:me=(e=>e),onMarkAsPlayed:he,contentInformation:xe,requestId:pe,mediaTypes:ge,onMoreButtonClick:je,status:be,variant:ve="default"},ye){const Ce=(0,o.Zp)(),ke=E&&T,fe=p===D.E.LARGE,Ne=(0,h.o_h)(e).toURLPath(!0),Ee=(0,h.o_h)(t)?.toURLPath(!0),Te=(0,ae.hD)(e,f?.isoString,N,y),we=$&&!ce,Re=ge?.includes(le.C.Video)??!1,Pe=we||G,Ie=x.Ru.get("tracklist.a11y.play",a,s),Se=x.Ru.get("tracklist.a11y.pause",a,s),De=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Ce(Ne),M&&M(e)}),[Ce,Ne,M]),Be=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Ee&&Ce(Ee)}),[Ee,Ce]),Me=(0,n.useCallback)((e=>{e.stopPropagation(),we||I(e)}),[I,we]),Le=(0,C.jsx)(se.R,{size:"small",version:"next-best-episode"===ve?se.H.primary:se.H.secondary,onClick:Me,isPlaying:ke,disabled:!Pe,locked:we,ariaPlayLabel:Ie,ariaPauseLabel:Se}),ze=ue?ue(Le):Le,Ue=(0,C.jsx)(C.Fragment,{children:be&&(0,C.jsx)(l.E,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:r.vw,children:be})}),Ae=(0,C.jsxs)(c.d,{className:H,href:Ne,onClick:De,lineClamp:2,children:[Te&&(0,C.jsx)(ae.Tc,{}),me(a)]}),He=(0,C.jsxs)(d.j,{lineClamp:2,paddingBottom:fe?r.v4:void 0,children:[Re&&(0,C.jsx)(ne.T,{className:V}),s&&Ee&&(0,C.jsx)(ee.N,{to:Ee,onClick:Be,children:(0,C.jsx)(l.E,{variant:"bodySmall",semanticColor:"textSubdued",children:me(s)})})]}),Fe=(0,C.jsxs)("div",{className:q,children:[(0,C.jsx)(u.v,{lineClamp:2,paddingBottom:fe?r.vw:void 0,children:me(g??"")}),(0,C.jsxs)("div",{className:O,children:[(0,C.jsx)("div",{className:W,children:v}),(0,C.jsx)(re.j,{isPlaying:ke,fullyPlayed:y,durationMs:j,releaseDate:f,resumePositionMs:N,position:E?L:void 0})]})]}),Ge=(0,C.jsxs)("div",{className:Q,children:[(0,C.jsx)("div",{onClick:e=>{e.stopPropagation()},className:F,children:(0,C.jsx)(K,{episodeUri:e,showUri:t??"",sharingInfo:de,size:p,canDownload:!$||$&&ce,requestId:pe,index:z,name:a,fullyPlayed:y,onMarkAsPlayed:he,onMoreButtonClick:je})}),(0,C.jsx)("div",{children:ze})]}),Oe="default"===ve&&(0,C.jsx)("div",{className:_,children:(0,C.jsx)(te.b,{className:i()(Z,{[Y]:fe}),type:oe.c.EPISODE,size:(e=>{switch(e){case D.E.LARGE:return ie.Qe.SIZE_112;case D.E.MEDIUM:return ie.Qe.SIZE_64;default:return ie.Qe.SIZE_48}})(p),title:a,shape:te.u.ROUNDED_CORNERS,images:b})});return(0,C.jsxs)("div",{className:i()(U,{[A]:E,[X]:"next-best-episode"===ve}),"data-testid":`episode-${z}`,draggable:S&&!!B,onDragStart:B,onClick:De,onContextMenu:w,onTouchStart:R,onTouchEnd:P,children:[xe&&(0,C.jsx)(k,{className:J,cardHeaderText:xe.cardHeaderText,buttonText:xe.buttonText,buttonTarget:xe.buttonTarget}),(0,C.jsx)(m.v,{size:"xxl",ref:ye,media:Oe,title:Ae,id:`episode-${z}`,subtitle:s&&Ee?He:Fe,pretitle:Ue,body:s&&Ee?Fe:void 0,variant:"naked",footer:Ge,hoverBackgroundColor:"backgroundHighlight",layout:fe?"wide":"regular",horizontalGap:fe?r.lT:r.CJ,verticalGap:r.v4,paddingBlockStart:r.CD,paddingBlockEnd:r.CD})]})})))},23798:(e,a,s)=>{s.d(a,{N:()=>D});var n=s(97500),t=s.n(n),i=s(50498),o=s(17763),l=s(89887),r=s(95530),c=s(86677),d=s(30758),u=s(77141);const m="pH79IoVAcUC3Hn_VbS3B",h="v24nSqF2h73Ep3EJNkNl",x="OPvfrmGjqSYso3Me5FCd",p="TCbF8QBxkRc0mqI5_lzg",g="ZYBmZ8ghf3oA7NH2mI7r",j="Jtt6TUrz6TioPQsKXIY7",b="yzZ_VZHrZBb3REPcU7tD";var v=s(86070);const y=({"aria-label":e,children:a})=>{const s=(0,d.useRef)(null),n=(0,o.Oj)();return(0,v.jsx)(u.s,{focusTrapOptions:{initialFocus:()=>s.current??!1,onPostDeactivate:()=>{n({type:"close"})}},children:(0,v.jsx)("div",{"aria-label":e,tabIndex:-1,ref:s,className:h,children:a})})},C=({title:e,body:a,cta:s,onClose:n})=>(0,v.jsxs)(y,{"aria-label":e,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:e}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,v.jsx)("div",{className:g,children:(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",onClick:n,children:s})})]});var k=s(65503),f=s(31417);const N=({onClose:e})=>{const a=f.Ru.get("paywalls.modal-heading"),s=(0,v.jsxs)(v.Fragment,{children:[f.Ru.get("paywalls.modal-body-p1"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),f.Ru.get("paywalls.modal-body-p2"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),f.Ru.get("paywalls.modal-body-p3")]});return(0,v.jsxs)(y,{"aria-label":a,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:a}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:s}),(0,v.jsx)("div",{className:g,children:(0,v.jsx)(k.H,{size:"small",semanticColor:"textBase",onClick:e,children:f.Ru.get("close")})})]})};var E=s(79871),T=s(96250);const w=({upsellExplanation:e,gatedEntityRelations:a,onClose:s})=>{const n=e.title,i=a.entitiesWithValueProps.at(0),o=i?.summary?.forUserWithoutAccess,l=i?.valueProps.map((({displayText:e})=>e))??[],d=l?.length>1;return(0,v.jsxs)(y,{"aria-label":n,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:n}),(0,v.jsxs)(r.E,{as:"div",variant:"bodySmall",className:p,children:[o,l&&d&&(0,v.jsx)(E.j,{hasTextSeparator:!0,semanticColor:"textBase",children:l})]}),(0,v.jsxs)("div",{className:t()(g,j),children:[(0,v.jsx)(k.H,{size:"small",condensed:!0,onClick:s,children:f.Ru.get("action-trigger.button.not-now")}),(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:e.url,iconTrailing:T.H,children:e.cta})]})]})},R=({title:e,body:a,cta:s,url:n,onClose:t})=>(0,v.jsxs)(y,{"aria-label":e,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:e}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,v.jsxs)("div",{className:g,children:[(0,v.jsx)(k.H,{size:"small",semanticColor:"textBase",onClick:t,children:f.Ru.get("close")}),(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:n,children:s})]})]});var P=s(6038),I=s(62270);const S=({showUri:e})=>{const a=(0,o.Oj)(),s=function(e){const a=(0,I.T)(),[s,n]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const s=await a.getAccessInfo(e);n(s)}catch(e){console.error(e),n(void 0)}}()}),[a,e]),s}(e);if(null===s)return null;let n=(0,v.jsx)(N,{onClose:()=>a({type:"close"})});return s?.basic&&(n=(0,v.jsx)(C,{...s.basic,onClose:()=>a({type:"close"})})),s?.upsellLink&&(n=(0,v.jsx)(R,{...s.upsellLink,onClose:()=>a({type:"close"})})),s?.gatedEntityRelations&&s?.upsellLink&&(n=(0,v.jsx)(w,{upsellExplanation:s.upsellLink,gatedEntityRelations:s.gatedEntityRelations,onClose:()=>a({type:"close"})})),(0,v.jsxs)(i.A,{colorSet:"announcement",className:m,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},children:[n,(0,v.jsx)("div",{"data-popper-arrow":"",className:t()(b)})]})},D=({children:e,enabled:a,showUri:s,renderInline:n=!0})=>a&&s?(0,v.jsx)(P.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:n,content:(0,v.jsx)(S,{showUri:s}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},54003:(e,a,s)=>{s.d(a,{y:()=>o});var n=s(31417),t=s(64281),i=s(86070);const o=()=>(0,i.jsx)(t.E,{ariaLabel:n.Ru.get("paid"),text:n.Ru.get("paid")})},19546:(e,a,s)=>{s.d(a,{X:()=>t});var n=s(35035);function t(e){return[n.kw.YES,n.kw.DOWNLOADING,n.kw.WAITING].includes(e)}}}]); +//# sourceMappingURL=1677.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/1706.js b/dot-config/spicetify/Extracted/Raw/xpui/1706.js new file mode 100755 index 00000000..b2e7c106 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/1706.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1706],{41706:(e,s,a)=>{a.d(s,{A:()=>Ce});var l=a(97500),t=a.n(l),r=a(62411),i=a(85505),n=a(14343),c=a(36132),o=a(22726),u=a(15292),d=a(22212),g=a(30758),m=a(95530),h=a(31417),v=a(70076),b=a(30147),y=a(87182);const x="lyrics-lyrics-contentContainer",S="lyrics-lyrics-contentWrapper",p="GML6YUVCeJvRhGznLnqm";var j=a(86070);const L=({trackUri:e,data:s,format:a,spec:l,logger:t,isSnippet:r})=>{const i=(0,y.z)(),n=(0,b.v7)(),{isTimeSynced:c}=s,o=(0,g.useCallback)(((e,s)=>{if(l&&t){const e=l.lyricsLineFactory().hitSeekToTime({msToSeekTo:s});t.logInteraction(e)}e.currentTarget.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),i.seekTo(s);const a=i.getState();a&&!a.isPaused||i.resume()}),[t,i,l]),u=(0,g.useCallback)((({lineRef:e,firstUpdate:s,isFirstLine:a,isActiveLine:l,activeLineIndex:t,hasSkipped:r,shouldAnimateScroll:i})=>{if(e.current&&n.current&&(l||a&&t<0)){const a=e.current.getBoundingClientRect().top,l=n.current.getBoundingClientRect().height,t=l/4,c=a>=t&&a<=l-t;if(!c&&!(s||r))return;const o="visible"===document.visibilityState&&i&&c?"smooth":"auto";e.current?.scrollIntoView({behavior:o,block:"center",inline:"center"})}}),[n]);return(0,j.jsx)("div",{className:x,children:(0,j.jsxs)("div",{className:S,children:[!r&&!c&&(0,j.jsx)(m.E,{as:"p",variant:"bodySmall",className:p,dir:"auto",children:h.Ru.get("web-player.lyrics.unsynced")}),(0,j.jsx)(v.x,{trackUri:e,data:s,format:a,onLineClick:c?o:void 0,onActiveLineChange:u,isSnippet:r},e)]})})};var f=a(26926),N=a(85907);const w="e7eFLioNSG5PAi1qVFT4",R="vkO5F4KbLk8mbjZoy1Lf",C=(0,g.memo)((function({version:e}){const{getMessage:s}=(()=>{const e=[h.Ru.get("web-player.lyrics.noLyrics0"),h.Ru.get("web-player.lyrics.noLyrics1"),h.Ru.get("web-player.lyrics.noLyrics2"),h.Ru.get("web-player.lyrics.noLyrics3")];return{getMessage:s=>{let a;switch(s){case"ad":a=h.Ru.get("web-player.lyrics.ad");break;case"error":a=h.Ru.get("web-player.lyrics.error");break;case"unavailable":a=e[Math.floor(Math.random()*e.length)];break;default:(0,N.k)(s),a=""}return a}}})();return(0,j.jsx)("div",{className:w,children:(0,j.jsx)("span",{className:R,children:s(e)})})}));var k=a(85387),A=a(60749),E=a(86677),G=a(54454),I=a(19329),F=a(50671);const T="hS_lrRHiW4BSWL8WcE8Q",_="O7ooKKJG0MArEwDgD6IV",O="XZ1MeB_1byeFy7W6Eg6u",Y="lq_cmE3Xcg5QJhvbBnPR",B="zPI8TW58LMxEQDIq_GdA",U="lyrics",D=({spec:e,logger:s})=>{const{openURLWithSessionTransfer:a}=(0,I.L)(),l=(0,G.k)(),{url:t,isExternal:r}=l,i=(0,k.Zp)(),n=(0,g.useCallback)((()=>{const l=new URL(t),n=new URLSearchParams(l.search);n.append("ref",U),l.search=n.toString();const c=l.href;if(!1===r){const e=(0,A.PI)({ref:U});i({pathname:"/premium",search:e.toString()})}else a(c);s.logInteraction(e.lyricsUpsellFactory().lyricsUpsellButtonFactory().hitNavigateToExternalUri({destination:c}))}),[t,r,s,e,i,a]),c=(0,F.t)(e.lyricsUpsellFactory());return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:T}),(0,j.jsx)("div",{className:_,children:(0,j.jsxs)("div",{className:B,ref:c,children:[(0,j.jsx)(m.E,{semanticColor:"textBase",variant:"titleLarge",className:Y,children:h.Ru.get("web-player.lyrics.upsell.title")}),(0,j.jsx)(E.$,{className:O,size:"small",onClick:n,colorSet:"invertedLight",children:h.Ru.get("web-player.lyrics.upsell.button")})]})})]})};var z=a(15262),W=a(15525),V=a(61690),H=a(22699),J=a(53860),M=a(84703),q=a(75830),P=a(10994),Z=a(41874),K=a(12864),Q=a(90862),X=a(77153);const $="na1tzIwfHqXPiMw_7NOd",ee="lVJJcrObmZtZsWaq8H3A",se=[{volume:Q.Y9.SING_ALONG_OFF,icon:(0,j.jsx)(z.X,{size:"small"}),get label(){return h.Ru.get("singalong.off")}},{volume:Q.Y9.HIGH,icon:(0,j.jsx)(W.C,{size:"small"}),get label(){return h.Ru.get("singalong.more-vocal")}},{volume:Q.Y9.LOW,icon:(0,j.jsx)(V.D,{size:"small"}),get label(){return h.Ru.get("singalong.less-vocal")}}],ae=g.memo((function({currentTrackUri:e}){const{isSupported:s,volume:a,setVocalVolume:l}=(e=>{const s=(0,X.S)(),[a,l]=(0,g.useState)(Q.Y9.SING_ALONG_OFF),{isSupported:t}=s.getCapabilities();return(0,g.useEffect)((()=>{s.setStatus(Q.nW.DISABLED).then((()=>{l(Q.Y9.SING_ALONG_OFF)}))}),[e,s]),(0,g.useEffect)((()=>()=>{s.setStatus(Q.nW.DISABLED)}),[s]),{isSupported:t,volume:a,setVocalVolume:(0,g.useCallback)((async e=>{e===Q.Y9.SING_ALONG_OFF?await s.setStatus(Q.nW.DISABLED):await s.setStatus(Q.nW.ENABLED),await s.setVocalVolume(e),l(e)}),[s])}})(e),r=(0,g.useCallback)((e=>{s&&l(e.volume)}),[s,l]);if(!s)return null;const i=se.find((e=>e.volume===a)),n=i?.volume===Q.Y9.SING_ALONG_OFF;return(0,j.jsx)(q.b,{menu:(0,j.jsxs)(P.W,{children:[(0,j.jsx)(Z.y,{children:h.Ru.get("singalong.title")}),se.map((e=>(0,j.jsx)(K.D,{role:"menuitemradio","aria-checked":a===e.volume,"aria-label":e.label,onClick:()=>r(e),leadingIcon:e.icon,children:e.label},e.volume)))]}),children:(e,s,a)=>(0,j.jsxs)("button",{onClick:s,ref:a,type:"button",className:t()($,{[ee]:n}),children:[n?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(H.q,{size:"small"}),(0,j.jsx)(m.E,{variant:"bodySmall",children:h.Ru.get("singalong.button")})]}):(0,j.jsxs)(j.Fragment,{children:[i.icon,(0,j.jsx)(m.E,{variant:"bodySmall",children:i.label})]}),e?(0,j.jsx)(J.J,{size:"small"}):(0,j.jsx)(M.y,{size:"small"})]})})}));var le=a(62752),te=a(18893),re=a(18133),ie=a(84291),ne=a(38501),ce=a(411),oe=a(36475),ue=a(79237),de=a(5179),ge=a(58685),me=a(21549);const he="lyrics-lyrics-container",ve="VznvlkEh9fhk1AKhhZwe",be="iSeDDdAUlWo8OJbCKDLw",ye="rSXzEXBdsRTaK6qSBHYg",xe="UdJMosuRv5_ySWnmSPZH",Se="zEwFftu1Dw68QKaKj_EE",pe="lyrics-lyrics-background",je=(0,j.jsx)("div",{className:Se,children:(0,j.jsx)(d.m,{})}),Le=(0,j.jsx)(C,{version:"error"}),fe=(0,j.jsx)(C,{version:"ad"}),Ne=(0,j.jsx)(C,{version:"unavailable"}),we={active:i.ONy,inactive:i.Ql9,passed:i.Ql9,background:i.wdA,messaging:i.ONy},Re=(e,s)=>{switch(s){case ne.bYw.CONTROL:default:return e;case ne.bYw.EMPTY_LYRICS:return{...e,lyrics:[]};case ne.bYw.TRUNCATED_LYRICS:return{...e,lyrics:e.lyrics.slice(0,5)}}},Ce=({format:e})=>{const s=(0,re.X)(),a=(0,ue.v)((e=>e.activeDevice?.isLocal)),l=(0,ge.o)((e=>e?.item),((e,s)=>e?.uri===s?.uri)),i=l?.uri||"",{spec:d,logger:g}=(0,me.r)(c.V,{data:{uri:i}}),{data:m,loading:h,error:v}=(0,te.J)(),b=(0,n.NC)(ne.bOR),y=(0,n.NC)(ne.JSO,{loadingValue:ne.bYw.CONTROL}),x=(0,de.H)(),S=x?.higherContrast;let p=!1,N=we;m?.hasLyrics&&(b&&(p=m.showUpsell),y!==ne.bYw.TRUNCATED_LYRICS&&y!==ne.bYw.EMPTY_LYRICS||(p=!0),N={active:S?.textBase.toCSS(oe.a.RGBA)??m.colors.activeText,inactive:S?.textSubdued.toCSS(oe.a.RGBA)??m.colors.text,passed:S?.textBase.toCSS(oe.a.RGBA)??ce.Q.fromCSS(m.colors.activeText,.7).toCSS(oe.a.RGBA),background:S?.backgroundBase.toCSS(oe.a.RGBA)??m.colors.background,messaging:S?.textSubdued.toCSS(oe.a.RGBA)??m.colors.text}),(0,ie.z)(N.background,we.background);const w=(0,ge.o)((e=>e?.nextItems?.[0]),((e,s)=>e?.uri===s?.uri));(0,le.I)(w?.uri,w?.images);let R=je,C=!1;if(i)if((0,o.AIy)(i))R=fe;else if(v)R=Le;else if(h)R=je;else if(m)if(m.hasLyrics){const l=a??!1;C=s&&m.hasVocalRemoval&&l,R=(0,j.jsx)(L,{trackUri:i,data:Re(m,y),format:e,spec:d,logger:g,isSnippet:p})}else R=Ne;const k=(0,r.d4)((e=>e.ads.leaderboard.isEnabled)),A={"--lyrics-color-active":N.active,"--lyrics-color-inactive":N.inactive,"--lyrics-color-passed":N.passed,"--lyrics-color-background":N.background,"--lyrics-color-messaging":N.messaging,"--show-gradient-over-lyrics":p?"block":void 0};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(u.Q,{usePlayingItem:!0,children:"Spotify"}),(0,j.jsxs)("div",{className:t()(he,{[ve]:k}),style:A,children:[(0,j.jsx)("div",{className:pe}),R,(0,j.jsxs)("div",{className:be,children:[(0,j.jsx)("div",{className:ye,children:"cinema"!==e&&(0,j.jsx)(f.R,{})}),(0,j.jsx)("div",{className:xe,children:C?(0,j.jsx)(ae,{currentTrackUri:i}):null})]}),p&&(0,j.jsx)(D,{spec:d,logger:g})]})]})}},26926:(e,s,a)=>{a.d(s,{R:()=>G});var l=a(30758),t=a(97500),r=a.n(t),i=a(62411),n=a(37442),c=a(45867),o=a(95530),u=a(84703),d=a(14343),g=a(31417),m=a(75830),h=a(10994),v=a(12864),b=a(18893),y=a(30631),x=a(28874),S=a(43329);const p="ZEIqEgvTSLMYDUyg4fwD",j="JCMG2XpPpmwVFJCmRsv8",L="G5xyHz2quLjuzQhFHUb4",f="qYiwqn2o_ph2NxiAfCpG",N="aENlvMWeYBOLGGB34Tpl",w="GdrYdqKUxEn8rN8JLnFW",R="AH1Gz87FuBEFAIF3XbA4";var C=a(86070);const k=e=>{try{if(e){const s=new Intl.DisplayNames([e],{type:"language"}).of(e);return s?s.charAt(0).toUpperCase()+s.slice(1):e}return""}catch(s){return e||""}},A=()=>{const e=(0,i.wA)(),{data:s}=(0,b.J)(),a=(0,i.d4)(x.s),t=(0,l.useCallback)((()=>{e(a?(0,y.gL)(""):(0,y.gL)(navigator.language))}),[e,a]);return s?.hasLyrics&&(s.alternatives||[]).length>0?(0,C.jsx)("button",{className:p,onClick:t,children:(0,C.jsx)("div",{className:r()(f,{[L]:a}),children:(0,C.jsx)(n.H,{fill:"white",size:"small"})})}):null},E=()=>{const e=(0,i.wA)(),{data:s}=(0,b.J)(),a=(0,i.d4)(x.s),[t,d]=(0,l.useState)(!1),S=s?.hasLyrics&&(s.alternatives||[]).length>0,A=a&&s?.hasLyrics&&(s.alternatives||[]).find((e=>e.language.substring(0,2)===a.substring(0,2)));if(!S)return null;const E=(0,C.jsx)(h.W,{children:[{language:""},...s.alternatives||[]].map((({language:s})=>{let l=g.Ru.get("web-player.lyrics.translation.none");return s&&(l=k(s)),(0,C.jsx)(v.D,{trailingIcon:s===a?(0,C.jsx)(c.i,{size:"small",semanticColor:"textBrightAccent"}):null,role:"menuitem",onClick:()=>{e((0,y.gL)(s))},children:l},s)}))});return(0,C.jsx)("div",{className:p,children:(0,C.jsx)(m.b,{renderInline:!0,menu:E,onShow:()=>d(!0),onHide:()=>d(!1),children:(0,C.jsxs)("div",{className:r()(j,{[L]:A}),children:[(0,C.jsx)("div",{className:f,children:A?(0,C.jsx)(n.H,{fill:"black",size:"small"}):(0,C.jsx)(n.H,{size:"small"})}),(0,C.jsxs)("div",{className:R,children:[(0,C.jsx)(o.E,{variant:"bodySmallBold",children:a?A?g.Ru.get("web-player.lyrics.translating.to",k(a)):g.Ru.get("web-player.lyrics.translation.not_available",k(a)):g.Ru.get("web-player.lyrics.translate")}),(0,C.jsx)(u.y,{className:r()(N,{[w]:t}),size:"small"})]})]})})})},G=()=>{switch((0,d.NC)(S.Tc,{loadingValue:S.LZ.CONTROL})){case S.LZ.CONTROL:default:return null;case S.LZ.SYSTEM_LANGUAGE:return(0,C.jsx)(A,{});case S.LZ.ALL_LANGUAGES:return(0,C.jsx)(E,{})}}}}]); +//# sourceMappingURL=1706.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/2979.js b/dot-config/spicetify/Extracted/Raw/xpui/2979.js new file mode 100755 index 00000000..fc18b389 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/2979.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[2979],{89702:(e,t,r)=>{r.d(t,{R:()=>T});var n=r(30758),l=r(71217),o=r(22949);function u(e,t,r=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,o.fk)(e))return;const n=e.querySelector('[tabindex="0"]');t===l.O.UP&&(0,o.MS)(n,s(e,n,l.O.UP,r)),t===l.O.DOWN&&(0,o.MS)(n,s(e,n,l.O.DOWN,r)),t===l.O.RIGHT&&(0,o.MS)(n,c(n,l.O.RIGHT,r)),t===l.O.LEFT&&(0,o.MS)(n,c(n,l.O.LEFT,r)),t===l.O.HOME&&(0,o.MS)(n,a(l.O.HOME,r)??n),t===l.O.END&&(0,o.MS)(n,a(l.O.END,r)??n)}function s(e,t,r,n=!1){const u=t.closest('li[role="row"]');if(!u)return t;let s=u;const a=Array.from(e.querySelectorAll('li[role="row"]')),i=Array.from(u.querySelectorAll(o.nu)),f=a.indexOf(u);if(f<0)return t;const d=(n&&t!==i[0]||!n&&t!==u)&&!(t instanceof HTMLLIElement);if(r===l.O.UP){if(document.activeElement===e){s=a[a.length-1];return(n?s.querySelector(o.nu):s)??t}if(d)return c(t,l.O.LEFT,n);let r=f-1;if(-1===r)return t;s=a[r],r-=1}else if(r===l.O.DOWN){if(document.activeElement===e){s=a[0];return(n?s.querySelector(o.nu):s)??t}if(d)return c(t,l.O.RIGHT,n);let r=f+1;if(r===a.length)return t;s=a[r],r+=1}return(n?s.querySelector(o.nu):s)??t}function c(e,t,r=!1){const n=e.closest('li[role="row"]');if(!n)return e;let u=e;const s=Array.from(n.querySelectorAll(o.nu)),c=s.indexOf(e);let a=0;if(t===l.O.RIGHT&&c-1!==s.length)a=c+1;else{if(t===l.O.LEFT&&-1===c)return n;if(t===l.O.LEFT&&0!==c)a=c-1;else if(t===l.O.LEFT&&0===c){return(r?n.querySelector(o.nu):n)??n}}return u=s.at(a),u??e}function a(e,t=!1){const{currentFocus:r,listEl:n}=function(){const e=document.activeElement,t=e?.closest("ul");return((0,l.I)(e)||e instanceof HTMLLIElement)&&t?{currentFocus:e,listEl:t}:{currentFocus:null,listEl:null}}();if(null===r||null===n)return null;const u=r.closest('li[role="row"]');if(!u)return r;const s=Array.from(n.querySelectorAll('li[role="row"]')),c=Array.from(u.querySelectorAll(o.nu));if(s.indexOf(u)<0)return r;const a=t&&r===c[0]||!t&&r===u;if(e===l.O.HOME){if(a){return(t?s[0].querySelector(o.nu):s[0])??r}return(t?c[1]:c[0])??r}if(e===l.O.END){if(a){return(t?s[s.length-1].querySelector(o.nu):s[s.length-1])??r}return c[c.length-1]??r}return r}var i=r(43356),f=r(35662),d=r(86070);const T=(0,n.forwardRef)((({onKeyDown:e,children:t,firstInteractiveIsWrapper:r=!1,...s},c)=>{const a=(0,f.N)(c);(0,i.R)(a);const T=(0,n.useCallback)((t=>{a.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Home"!==t.key&&"End"!==t.key||t.preventDefault(),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===t.key&&u(a.current,l.O.UP,r),"ArrowDown"===t.key&&u(a.current,l.O.DOWN,r),"ArrowRight"===t.key&&u(a.current,l.O.RIGHT,r),"ArrowLeft"===t.key&&u(a.current,l.O.LEFT,r),"Home"===t.key&&u(a.current,l.O.HOME,r),"End"===t.key&&u(a.current,l.O.END,r),e?.(t))}),[r,a,e]),S=(0,n.useCallback)((e=>{if(!a.current)return;const t=e.target,r=a.current.querySelector('[tabindex="0"]');t.closest('li[role="row"]')&&t!==r&&(0,o.MS)(r,t,{preventScroll:!0})}),[a]);return(0,d.jsx)("ul",{role:"treegrid",ref:a,onKeyDown:T,onFocus:S,tabIndex:0,...s,children:t})}))},20616:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(30758),l=r(73891),o=r(86070);const u=({children:e,innerRef:t,reRunOnDOMUpdate:r=!1,...u})=>{const s=(0,n.useRef)(null),c=t??s;return(0,l.g)(c,r),(0,o.jsx)("li",{ref:c,"aria-expanded":"true","aria-level":1,role:"row",...u,children:e})}},42583:(e,t,r)=>{r.d(t,{Nz:()=>s,Vp:()=>o,Vv:()=>c,wD:()=>a,xz:()=>u});var n=r(76123),l=r(96566);const o=[n.fl.TRACKS,n.fl.LOCAL_TRACKS,n.fl.ALBUMS,n.fl.ARTISTS,n.fl.PLAYLISTS,n.fl.PLAYLISTS_V2,n.fl.FOLDERS,n.fl.EPISODES,n.fl.CHAPTERS,n.fl.SHOWS,n.fl.AUDIOBOOKS,n.fl.PSEUDO_PLAYLISTS],u={[n.fl.TRACKS]:"tracks",[n.fl.ALBUMS]:"albums",[n.fl.ARTISTS]:"artists",[n.fl.PLAYLISTS]:"playlists",[n.fl.FOLDERS]:"folders",[n.fl.SHOWS]:"shows",[n.fl.EPISODES]:"episodes",[n.fl.CHAPTERS]:"chapters",[n.fl.LOCAL_TRACKS]:"local-tracks",[n.fl.AUDIOBOOKS]:"audiobooks",[n.fl.PSEUDO_PLAYLISTS]:"pseudo-playlists"};let s=function(e){return e.ON="on",e.BEFORE="before",e.AFTER="after",e}({});const c=(0,l.g)(s);function a(e){return o.includes(e)}},50925:(e,t,r)=>{r.d(t,{A:()=>O});var n=r(30758),l=r(88308),o=r(76123),u=r(42583);function s(e,t,r,n){if(e.defaultPrevented)return null;const l=t.includes(u.Nz.BEFORE),o=t.includes(u.Nz.AFTER);let s=u.Nz.ON;if(e.currentTarget instanceof HTMLElement&&(l||o)){const{top:o,height:c,left:a,width:i,right:f}=e.currentTarget.getBoundingClientRect(),d=t.includes(u.Nz.ON);if("horizontal"===r)if(d&&l){(n?e.clientX>Math.round(f)-i/4:e.clientXMath.round(f)-i/2:e.clientX!!(0,u.wD)(e)&&t.includes(e))).filter(u.wD)}var i=r(13719);function f(e,t,r){const n=a(e,t);if(!n.length)return function(e,t){return e.split(/[\s,;]+/g).map((e=>(0,c.o_h)(e?.trim()))).filter(i.P).reduce(((e,r)=>{const n=o.Ay[r.type];return(0,u.wD)(n)&&t.includes(n)?(e[n]||=[],e[n].push(r.toURI()),e):e}),{})}(e.dataTransfer?.getData("text/plain"),t);const l=Object.fromEntries(n.map((t=>[t,e.dataTransfer?.getData(t)?.split("\n").filter(Boolean)??[]])));if(r){const{[o.fl.PLAYLISTS]:e,...t}=l,r=Array.from(new Set([...l[o.fl.PLAYLISTS_V2]??[],...(l[o.fl.PLAYLISTS]??[]).map(d)]));return{...t,...r.length?{[o.fl.PLAYLISTS_V2]:r}:null}}return l}function d(e){const t=(0,c.o_h)(e);return t?.type===c.NQG.PLAYLIST?(0,c.Pse)(t.id).toURI():e}var T=r(97503),S=r(37178);const p={droppableMimeTypes:"albums artists episodes chapters folders playlists shows tracks local-tracks audiobooks pseudo-playlists",useDropTarget:"main-useDropTarget-base","useDropTarget--albums":"main-useDropTarget-album","useDropTarget--artists":"main-useDropTarget-artist","useDropTarget--episodes":"main-useDropTarget-episode","useDropTarget--chapters":"OxrHhBsQAggwnv6RmqRy","useDropTarget--folders":"main-useDropTarget-folder","useDropTarget--playlists":"main-useDropTarget-playlist","useDropTarget--shows":"main-useDropTarget-show","useDropTarget--tracks":"main-useDropTarget-track","useDropTarget--local-tracks":"main-useDropTarget-local","useDropTarget--audiobooks":"main-useDropTarget-audiobook","useDropTarget--pseudo-playlists":"main-useDropTarget-pseudoPlaylist"};function O({uri:e,id:t=e,allowedMimeTypesByDropPosition:r,onDrop:c,onLongDragOver:i,longDragOverTimeout:d=1e3,reorderDirection:O="vertical"}){const E=(0,l.lB)((()=>r),[r]),m=(0,S.W)(),y=(0,T.wK)(),D=!!t&&1===y.length&&y[0]===t,L=Object.values(E).every((e=>e.includes(o.fl.PLAYLISTS_V2)&&!e.includes(o.fl.PLAYLISTS))),[A,v]=(0,n.useState)(null),h=(0,n.useCallback)((e=>D?[]:Object.entries(E).filter((([t,r])=>a(e,r).length>0)).map((([e])=>e)).filter(u.Vv)),[D,E]),w=(0,n.useRef)(!0),R=(0,n.useRef)(null),k=(0,n.useRef)(c);k.current=c;const I=(0,n.useRef)(i);I.current=i;const b=(0,n.useCallback)((()=>{w.current=!0,v(null),R.current&&(window.clearTimeout(R.current),R.current=null)}),[]);(0,n.useEffect)((()=>b),[b]);const N=(0,n.useCallback)((e=>{const t=h(e);t.length&&(v(s(e,t,O,m)),e.dataTransfer&&!e.defaultPrevented&&(e.dataTransfer.dropEffect=t.includes(u.Nz.ON)?"copy":"move"),e.preventDefault())}),[h,m,O]),P=(0,n.useCallback)((e=>{if(h(e).length&&!e.defaultPrevented){if(w.current){w.current=!1;const t=e.currentTarget,r=()=>{document.contains(t)||(b(),document.removeEventListener("dragenter",r))};document.addEventListener("dragenter",r),document.addEventListener("dragend",(()=>{document.removeEventListener("dragenter",r),b()}),{once:!0}),I.current&&(R.current=window.setTimeout((()=>{I.current?.()}),d))}e.preventDefault()}}),[h,d,b]),F=(0,n.useCallback)((e=>{h(e).length&&(function(e){return null===e.relatedTarget&&g?!document.elementsFromPoint(e.clientX,e.clientY).includes(e.currentTarget):!e.currentTarget.contains(e.relatedTarget instanceof Node?e.relatedTarget:null)}(e)&&b(),e.preventDefault())}),[h,b]),M=(0,n.useCallback)((e=>{const t=s(e,h(e),O,m);if(!e.defaultPrevented&&t){const r=f(e,E[t]??[],L),n=function(e){return{sectionId:parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,contextUri:e.dataTransfer.getData("text/x-spotify-context"),itemIds:e.dataTransfer.getData(o.fl.UIDS)?.split("\n").filter(Boolean)??[]}}(e);Object.keys(r).length&&k.current&&(k.current(r,t,n),e.preventDefault())}b()}),[h,O,m,b,E,L]),H=(0,n.useMemo)((()=>`${p.useDropTarget} ${Array.from(new Set(Object.values(E).flat()))?.map((e=>p[`useDropTarget--${u.xz[e]}`]??"")).join(" ")}`),[E]);return(0,n.useMemo)((()=>({dropPosition:A,className:H,onDragEnter:P,onDragLeave:F,onDragOver:N,onDrop:M})),[H,A,P,F,N,M])}const g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},43356:(e,t,r)=>{r.d(t,{R:()=>l});var n=r(30758);const l=e=>{const[t,r]=(0,n.useState)(null);(0,n.useEffect)((()=>{const t=e.current;if(!t)return()=>{};const n=({target:e})=>{e instanceof HTMLElement&&r(e)};return t.addEventListener("focusout",n),()=>{t.removeEventListener("focusout",n)}}),[e]),(0,n.useEffect)((()=>{const n=e.current;if(!t||!n)return;const l=n.contains(t),o=n.contains(document.activeElement);!l&&!o&&n.focus({preventScroll:!0}),r(null)}),[e,t])}},35662:(e,t,r)=>{r.d(t,{N:()=>l});var n=r(30758);function l(e){const t=(0,n.useRef)(null);return(0,n.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}}}]); +//# sourceMappingURL=2979.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/3282.css b/dot-config/spicetify/Extracted/Raw/xpui/3282.css new file mode 100755 index 00000000..9320bad5 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/3282.css @@ -0,0 +1 @@ +.dRD7dgAMZVRuTdelaf6B{inline-size:420px!important;left:50%;padding:32px;position:fixed!important;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-padding-before:32px!important;padding-block-start:32px!important}.dRD7dgAMZVRuTdelaf6B h1{font-size:1.5rem}.sFr9SHK1H3ZYdz2_jWqY{color:inherit;text-decoration:underline}.sFr9SHK1H3ZYdz2_jWqY:hover{text-decoration:none}.AckhtqapSIpyTPpQGw7y{text-transform:uppercase} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/3282.js b/dot-config/spicetify/Extracted/Raw/xpui/3282.js new file mode 100755 index 00000000..8457fc37 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/3282.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3282],{80901:(e,t,i)=>{i.r(t),i.d(t,{SNACKBAR_ID:()=>y,default:()=>S});var a=i(30758),r=i(60348),n=i(63123),o=i(83967),s=i(31417),c=i(26344),u=i(60749),l=i(37339),d=i(95530),f=i(86677);const g="dRD7dgAMZVRuTdelaf6B",m="sFr9SHK1H3ZYdz2_jWqY",h="AckhtqapSIpyTPpQGw7y";var v=i(86070);const p="dialog-robot";const b=()=>{const[e,t]=(0,a.useState)(!0);return e?(0,v.jsx)(l.j,{"data-testid":p,id:p,"aria-label":"Dialog robot",dialogTitle:s.Ru.get("user-fraud-verification.dialog-alert.title"),colorSet:"invertedLight",className:g,body:(0,v.jsx)(d.E,{as:"p",children:(i=s.Ru.get("user-fraud-verification.dialog-alert.describe"),r=e=>(0,v.jsx)(u.N_,{to:"/playlist/37i9dQZF1DWUcRrhkfhG22",className:m,children:e},e),i.split(/(\{0\}.*)\{1\}/).map((e=>e.startsWith("{0}")?r(e.split("{0}")[1]):e)))}),footer:(0,v.jsx)(f.$,{className:h,onClick:()=>t(!1),children:s.Ru.get("user-fraud-verification.dialog-alert.ok")})}):null;var i,r};var R=i(55623),_=i(6582),T=i(29195),I=i(1599),k=i(12641),x=i(21398);var N=i(66737);const y="snackbar-user-fraud-verification",S=({verificationId:e})=>{const t=(0,a.useRef)(Date.now()),[i,u]=(0,a.useState)(!1),[l,d]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),m=(0,T.vh)(),h=(()=>{const e=(0,T.vh)(),{mutate:t}=(0,R.n)({mutationFn:e=>{const t=I.n.getInstance();return(0,k.s)(t,e)},onError:(t,i)=>{e.send((0,_.D)({id:i,method:"IN_APP_VERIFICATION_V0",error_message:t instanceof x.O?t.message:null,http_method:"put",http_path:`/verification/${i}`}))}});return t})(),{isTrustedRef:p,isTrustedFn:S}=(0,N.d)(),j=async(i,a)=>{const r=Date.now()-t.current,{type:n}=a;await S(a),m.send((0,o.Y)({id:e,method:"IN_APP_VERIFICATION_V0",action:i,interaction_details:{reaction_time:`${r}`,event_triggered:JSON.stringify({type:n,isTrusted:p.current})}})),e&&h(e)};return l?null:f?(0,v.jsx)(b,{}):i?(0,v.jsx)(r.qb,{"data-testid":y,className:(0,n.Ju)("announcement"),showSnackbar:!0,children:s.Ru.get("user-fraud-verification.snackbar.message")}):(0,v.jsx)(c.T,{"aria-label":s.Ru.get("user-fraud-verification.confirm-dialog.title"),titleText:s.Ru.get("user-fraud-verification.confirm-dialog.title"),descriptionText:s.Ru.get("user-fraud-verification.confirm-dialog.description"),onConfirm:e=>{j("human",e),u(!0)},onClose:e=>{j("robot",e),g(!0)},onOutside:e=>{j("robot",e),d(!0)},confirmText:s.Ru.get("user-fraud-verification.confirm-dialog.confirm"),confirmLabel:s.Ru.get("user-fraud-verification.confirm-dialog.label"),cancelText:s.Ru.get("user-fraud-verification.confirm-dialog.cancel")})}}}]); +//# sourceMappingURL=3282.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/3848.js b/dot-config/spicetify/Extracted/Raw/xpui/3848.js new file mode 100755 index 00000000..1725b1b7 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/3848.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3848],{60965:(e,t,l)=>{l.d(t,{R:()=>n});var s=l(30758),a=l(70381);const n=()=>{const[e,t]=(0,s.useState)(!1),l=(0,a.K)(a.X.CollaborativePlaylists);return(0,s.useEffect)((()=>{l&&t(!0)}),[l,t]),{toggleActivationVisible:e,setToggleActivationVisible:t}}},77:(e,t,l)=>{l.d(t,{u:()=>ee,Y:()=>te});var s=l(30758),a=l(97500),n=l.n(a),i=l(62411),o=l(65503),r=l(91227),u=l(31417),c=l(75830),f=l(99701),d=l(95530),h=l(2792),b=l(26209),m=l(10994),S=l(12864),g=l(91128),y=l(88091),v=l(23289);const p="zNnlcxsmnV1RiWXSd4IA",F="a3sk2brhAAMoZderfRfg";var R=l(86070);const j=({icon:e,name:t,isActive:l,onClick:s,isDsaRestricted:a})=>{const n=l?"textBrightAccent":void 0;return(0,R.jsx)(S.D,{role:"menuitemradio",leadingIcon:(0,R.jsx)(e,{iconSize:16,semanticColor:n}),onClick:s,"aria-checked":l,disabled:a,children:(0,R.jsx)(d.E,{variant:"bodySmall",semanticColor:n,children:t})})},A=({shuffleMode:e,onClick:t,spec:l,logger:a,isDsaRestricted:n})=>{const r=(0,i.wA)(),c=(0,s.useCallback)((()=>{r(g.cI.actions.open())}),[r]),f=(0,s.useCallback)((()=>{t(v.j.ON,(e=>{l&&(e?a.logInteraction(l?.toggleShuffleButtonFactory().hitShuffleDisable()):a.logInteraction(l?.toggleShuffleButtonFactory().hitShuffleEnable()))}))}),[a,t,l]),S=(0,s.useCallback)((()=>{const e=e=>{l&&(e?a.logInteraction(l?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"smart_shuffle",selectedMode:"linear"})):a.logInteraction(l?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"linear",selectedMode:"smart_shuffle"})))};n||t(v.j.SMART_SHUFFLE,e)}),[n,a,t,l]),A=n?u.Ru.get("web-player.smart-shuffle.dsa-message"):u.Ru.get("web-player.smart-shuffle.menu-text");return(0,R.jsxs)(m.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,R.jsx)(j,{icon:h.p,name:u.Ru.get("web-player.smart-shuffle.shuffle"),isActive:e===v.j.ON,onClick:f}),(0,R.jsx)(j,{icon:b.k,name:u.Ru.get("web-player.smart-shuffle.smart-shuffle"),isActive:e===v.j.SMART_SHUFFLE,onClick:S,isDsaRestricted:n}),(0,R.jsx)(d.E,{className:p,variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:A}),!n&&(0,R.jsx)(y.u,{children:(0,R.jsx)(o.H,{role:"menuitem",className:F,semanticColor:"textSubdued",onClick:c,size:"small",children:u.Ru.get("web-player.smart-shuffle.menu-button")})})]})},E={[v.j.OFF]:{icon:h.p,label:e=>e?u.Ru.get("web-player.smart-shuffle.button-disable-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-disable-shuffle-generic")},[v.j.ON]:{icon:h.p,semanticColor:"textBrightAccent",label:e=>e?u.Ru.get("web-player.smart-shuffle.button-enable-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-enable-shuffle-generic")},[v.j.SMART_SHUFFLE]:{icon:b.k,semanticColor:"textBrightAccent",label:e=>e?u.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-generic")}};var M=l(50498),w=l(85434),x=l(42257),C=l(72750);const D={bottomEnd:x.dw.topStart,top:x.dw.bottom},k=({placement:e,onHide:t,label:l})=>((0,C.g)(t),(0,R.jsx)("div",{children:(0,R.jsx)(M.A,{arrow:D[e],colorSet:"announcement",onClose:t,children:l})})),O=e=>{const{placement:t,visible:l,children:s}=e;return(0,R.jsx)(w.W,{placement:t,withPortal:!0,overlay:l&&(0,R.jsx)(k,{...e}),children:s})};var L=l(50486),T=l(39566),B=l(24549),H=l(30157);function I(){return(0,H.N)(B.X)}var N=l(6102),U=l(16273),_=l(11336),P=l(58685),q=l(32257),z=l(2679),V=l(40638);const K=e=>["use-shuffle",e,"shuffle-mode"];const X=e=>{const t=(e=>{const t=I(),l=!(0,T.n)();let s=(0,L.I)({queryKey:["use-shuffle",e,"can-smart-shuffle"],queryFn:()=>t.getAvailableShuffleModes(e),staleTime:36e5,gcTime:72e5}).data;return l&&(s=[v.j.OFF,v.j.ON]),s})(e),[l,a]=function(e){const t=I(),l=(0,U.jE)(),a=(0,s.useRef)(null),{isActive:n}=(0,z.l_)(e),i=(0,P.o)(q.l),[o]=(0,V.d7)(i,1e3),r=(0,L.I)({queryKey:K(e),queryFn:async()=>await t.getShuffle(e),staleTime:0,gcTime:72e5}).data;(0,s.useEffect)((()=>{l.invalidateQueries({queryKey:K(e)})}),[e,o,l]);const u=(0,s.useCallback)((s=>{const n=K(e);if(a.current&&clearTimeout(a.current),s!==v.j.SMART_SHUFFLE)return t.setShuffle(e,s);l.setQueryData(n,v.j.SMART_SHUFFLE),a.current=setTimeout((()=>t.setShuffle(e,s)),1e3)}),[e,l,t]);return(0,s.useEffect)((()=>{const s=t.getEvents(),a=K(e),i=s.addListener(_.S.UPDATE,(({data:t})=>{t.contextURI===e&&l.setQueryData(a,t.shuffleMode)})),o=s.addListener(_.S.UPDATE_COMPLETE,(({data:t})=>{t.contextURI!==e||n||l.invalidateQueries({queryKey:a})})),r=s.addListener(_.S.UPDATE_ERROR,(()=>{l.invalidateQueries({queryKey:a})}));return()=>{i(),o(),r()}}),[e,n,o,l,t]),[r??v.j.OFF,u]}(e),n=(0,N.p)(),i=(0,s.useMemo)((()=>{if(!t)return;const e=void 0!==l?t.indexOf(l):-1;let s=t[(e+1)%t.length];return n||s!==v.j.SMART_SHUFFLE||(s=t[(e+2)%t.length]),s}),[l,t,n]),o=(0,s.useCallback)((()=>{if(void 0!==i)return a(i),i}),[i,a]);return{shuffleMode:l,nextShuffleMode:i,availableShuffleModes:t,setShuffleMode:a,cycleShuffleMode:o,isDsaRestricted:!n}};var Q=l(18576),Z=l(53133),W=l(62021),G=l(33329),Y=l(21549);const J="E1ikFpkPVaoLplbQdrTP",$="nozebc1PGSbzmePU25qY",ee=({label:e,shuffleModeConfig:t,size:l="large",onClick:a,disabled:i=!1,activationVisible:r=!1,shuffleIsOn:u,focusOnRender:c=!1,offsetDotDistance:d=!0,withPadding:h=!1,className:b,showDelayOnHover:m})=>{const S=(0,s.useRef)(null);return(0,s.useEffect)((()=>{c&&S.current?.focus()}),[c]),(0,R.jsx)(f.Zp,{label:e,showDelay:m,children:(0,R.jsx)(o.H,{onClick:i?void 0:a,iconOnly:t.icon,semanticColor:t.semanticColor,size:l,"aria-describedby":r?"smartShuffleActivationDescription":void 0,"aria-label":e,"aria-disabled":i,condensedAll:!h,className:n()({[J]:u,[$]:d},b),ref:S})})},te=({entityName:e,contextUri:t,activationPlacement:l,size:a,isActive:n=!1,offsetDotDistance:o=!0,withPadding:f=!1,disabled:d=!1,shuffleContext:h,withActivation:b=!0,withSnackbar:m=!0,className:S,showDelayOnHover:g})=>{const{shuffleMode:y,nextShuffleMode:p,availableShuffleModes:F,setShuffleMode:j,cycleShuffleMode:M,isDsaRestricted:w}=X(t),{spec:x}=(0,Y.r)(r.a,{data:{uri:t}}),C=(0,s.useMemo)((()=>x.menuShuffleButtonFactory()),[x]),D=(0,G.s)(),{enqueueSnackbar:k}=(0,Z.d)(),[L,T]=(0,s.useState)(!1),{isOpen:B}=(0,i.d4)((e=>e.ui.introducingSmartShuffleModal)),H=E[y],I=void 0!==p?E[p]:void 0,U=F?.includes(v.j.SMART_SHUFFLE),[_,P,q,z]=(0,Q.Z)(F,h,b,y),V=(0,s.useCallback)((e=>{e===v.j.SMART_SHUFFLE?k(n?u.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle"):u.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle-not-active-playlist")):y===v.j.SMART_SHUFFLE&&k(u.Ru.get("web-player.smart-shuffle.disabled-smart-shuffle"))}),[y,k,n]),K=()=>{z(!1),P(!1)},J=(0,s.useCallback)((e=>e===v.j.SMART_SHUFFLE?"smart_shuffle":e===v.j.ON?"shuffle":"linear"),[]),[$,te]=(0,W.x)("smart-shuffle-menu",0),le=(0,N.p)(),se=$>=3||!U,ae={label:I?.label?.(e,!!U&&le)??u.Ru.get("web-player.smart-shuffle.smart-shuffle"),shuffleModeConfig:H,size:a,activationVisible:_,shuffleIsOn:y!==v.j.OFF,offsetDotDistance:o,withPadding:f,disabled:d,className:S};return se?(0,R.jsx)(O,{visible:q,onHide:K,placement:l,label:u.Ru.get("web-player.smart-shuffle.activation-text"),children:(0,R.jsx)(ee,{...ae,onClick:()=>{const e=y,t=M();K(),m&&V(t),U?D.logInteraction(x.regularShuffleButtonFactory().hitSelectShuffleMode({previousMode:J(e),selectedMode:J(t)})):D.logInteraction(t===v.j.ON?x.regularShuffleButtonFactory().hitShuffleEnable():x.regularShuffleButtonFactory().hitShuffleDisable())},focusOnRender:L,showDelayOnHover:g})}):(0,R.jsx)(O,{visible:_,onHide:K,placement:l,label:u.Ru.get("web-player.smart-shuffle.activation-message"),children:(0,R.jsx)(c.b,{menu:(0,R.jsx)(A,{shuffleMode:y,onClick:(e,t)=>{const l=e===y?v.j.OFF:e;j(l),V(l),t(l===v.j.OFF)},spec:C,logger:D,isDsaRestricted:w}),onHide:()=>{$+1===3&&(T(!0),D.logImpression(x.tristateOnboardingTooltipFactory().impression())),te($+1)},onShow:()=>{K(),D.logInteraction(x.menuShuffleButtonFactory().hitUiReveal())},onClickOutside:e=>{B||e()},children:(e,t)=>(0,R.jsx)(ee,{...ae,onClick:e=>{t(e)},showDelayOnHover:g})})})}},70381:(e,t,l)=>{l.d(t,{X:()=>n.X,K:()=>a});var s=l(85387);function a(e){const{search:t}=(0,s.zy)();return new URLSearchParams(t).get("feature-activation")===e}var n=l(41547)},41547:(e,t,l)=>{l.d(t,{X:()=>s});let s=function(e){return e.SmartShuffle="smart-shuffle",e.GroupSessions="group-sessions",e.Blend="blend",e.CollaborativePlaylists="collaborative-playlists",e.Dj="dj",e.VeryHighQualityAudio="very-high-quality-audio",e.LiveEvents="live-events",e}({})},18576:(e,t,l)=>{l.d(t,{b:()=>r,Z:()=>u});var s=l(30758),a=l(70381),n=l(60965),i=l(46922),o=l(23289);const r={playlistActionBar:"playlist-action-bar"},u=(e,t,l,u)=>{const{seen:c,setSeen:f}=(0,i.i)(),[d,h]=(0,s.useState)(!c),[b,m]=(0,s.useState)(!1),{toggleActivationVisible:S}=(0,n.R)(),g=(0,a.K)(a.X.SmartShuffle),y=d&&!!e?.includes(o.j.SMART_SHUFFLE)&&!S&&l;return(0,s.useLayoutEffect)((()=>{y&&f(!0),g&&t===r.playlistActionBar&&u===o.j.OFF&&m(!0)}),[y,f,g,t,m,u]),[y,h,b,m]}},41364:(e,t,l)=>{l.d(t,{X:()=>i});var s=l(14343),a=l(43329);let n=function(e){return e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e}({});const i=(e=!1)=>((e=!1)=>(0,s.NC)(a.uy,e?void 0:{loadingValue:!1})?n.ENABLED:n.DISABLED)(e)===n.ENABLED},46922:(e,t,l)=>{l.d(t,{i:()=>a});var s=l(62021);const a=()=>{const[e,t]=(0,s.x)("smart-shuffle-seen",!1);return{seen:e,setSeen:t}}}}]); +//# sourceMappingURL=3848.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4003.js b/dot-config/spicetify/Extracted/Raw/xpui/4003.js new file mode 100755 index 00000000..78dd791e --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4003.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4003],{39325:(e,a,s)=>{s.d(a,{S:()=>o});var t=s(62411),r=s(86677),c=s(41575),i=s(31417),n=s(89775);const l="nHCJskDZVlmDhNNS9Ixv";var d=s(86070);const o=({isPremium:e})=>{const a=(0,t.wA)();return(0,d.jsx)("div",{className:l,children:e?(0,d.jsx)(r.$,{size:"small",colorSet:"overMedia",onClick:()=>a((0,n.On)()),children:i.Ru.get("ad-formats.hideAnnouncements")}):(0,d.jsx)(c.v,{colorSet:"overMedia",children:i.Ru.get("ad-formats.sponsored")})})}},57137:(e,a,s)=>{s.d(a,{z:()=>j});var t=s(30758),r=s(97500),c=s.n(r),i=s(62411),n=s(66201),l=s(53247),d=s(50279),o=s(51776),h=s(78464);const u="utUDWsORU96S7boXm2Aq",m="G7JYBeU1c2QawLyFs5VK",g="vYl1kgf1_R18FCmHgdw2",x="vZkc6VwrFz0EjVBuHGmx";var v=s(86070);const j=(0,n.H)((({children:e,fetchingState:a,hideHpto:s},r)=>{const n=(0,i.d4)(d.Dr),j=(0,i.wA)(),p=(0,t.useRef)(null);(0,t.useEffect)((()=>(p.current&&j((0,l.$t)(p.current)),()=>{j((0,l.IH)(!0))})),[j]),(0,t.useEffect)((()=>{a===o.C.FETCHED&&j((0,l.bW)())}),[a,j]);const k=(0,t.useCallback)((e=>{j((0,l.yF)(String(e)))}),[j]);return(0,v.jsx)(h.s,{onError:k,children:(0,v.jsx)("div",{"data-testid":"hpto-parent-container",className:c()(u,"contentSpacing",{[m]:a===o.C.FAILED||!n||s}),children:(0,v.jsx)("div",{"data-testid":"test-hpto-ref",ref:e=>{p.current=e,"function"==typeof r?r(e):r&&(r.current=e)},className:c()(g,{[x]:a===o.C.FETCHING||s}),children:e})})})}))},56751:(e,a,s)=>{s.d(a,{Z:()=>u});var t=s(30758),r=s(62411),c=s(39325),i=s(53247),n=s(50279),l=s(21082);const d="iVAZDcTm1XGjxwKlQisz",o="_I_1HMbDnNlNAaViEnbp";var h=s(86070);const u=({isPremium:e,backgroundColor:a,backgroundImage:s,backgroundUrl:u,bannerMode:m,html:g})=>{const x=(0,r.wA)(),[v,j]=(0,t.useState)(!1),p=(0,r.d4)(n.$F)?.media,k=g||p;return(0,t.useEffect)((()=>{"html"===m&&j(!0)}),[m]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.N,{draggable:!1,to:u||"",className:d,onClick:()=>{u&&x((0,i.i2)("event_clicked"))},style:{backgroundColor:a,backgroundImage:v?`url(${s})`:"none",backgroundSize:"cover"},children:(0,h.jsx)("iframe",{"data-testid":"html-hpto-iframe",className:o,srcDoc:k,scrolling:"no",marginWidth:0,marginHeight:0,style:{display:v?"":"none"},"aria-hidden":!0})}),(0,h.jsx)(c.S,{isPremium:e})]})}},67313:(e,a,s)=>{s.d(a,{L:()=>h});var t=s(30758),r=s(62411),c=s(39325),i=s(53247),n=s(21082);const l="xXj7eFQ8SoDKYXy6L3E1",d="F68SsPm8lZFktQ1lWsQz";var o=s(86070);const h=({isPremium:e,backgroundColor:a,backgroundImage:s,clickThroughUrl:h})=>{(0,t.useEffect)((()=>{if(!s)throw Error("[Image HPTO] Missing background image")}),[s]);const u=(0,r.wA)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.N,{"data-testid":"hpto-image",draggable:!1,onClick:()=>{u((0,i.i2)("event_clicked"))},className:l,style:{backgroundColor:a},to:h,children:(0,o.jsx)("img",{draggable:!1,className:d,alt:"",src:s})}),(0,o.jsx)(c.S,{isPremium:e})]})}},39085:(e,a,s)=>{s.d(a,{E:()=>ce});var t=s(97500),r=s.n(t),c=s(20886),i=s(62411),n=s(95530),l=s(22726),d=s(31417),o=s(39325),h=s(53247),u=s(30758),m=s(86677),g=s(74159),x=s(38157),v=s(75830),j=s(78516),p=s(7520),k=s(91676),b=s(15552),f=s(76720),N=s(40675),y=s(29454),C=s(54622),w=s(89402),S=s(51354),V=s(24533),M=s(28340);const R="x8e0kqJPS0bM4dVK7ESH",A="gZ2Nla3mdRREDCwybK6X",E="SChMe0Tert7lmc5jqH01",z="AwF4EfqLOIJ2xO7CjHoX",F="UlkNeRDFoia4UDWtrOr4",I="k_RKSQxa2u5_6KmcOoSw",_="_mWmycP_WIvMNQdKoAFb",B="O3UuqEx6ibrxyOJIdpdg",H="akCwgJVf4B4ep6KYwrk5",T="bIA4qeTh_LSwQJuVxDzl",L="ajr9pah2nj_5cXrAofU_",P="gvn0k6QI7Yl_A0u46hKn",Q="obTnuSx7ZKIIY1_fwJhe",D="IiLMLyxs074DwmEH4x5b",U="RJjM91y1EBycwhT_wH59",G="mxn5B5ceO2ksvMlI1bYz",K="l8wtkGVi89_AsA3nXDSR",O="Th1XPPdXMnxNCDrYsnwb",W="SJMBltbXfqUiByDAkUN_",Y="Nayn_JfAUsSO0EFapLuY",J="YqlFpeC9yMVhGmd84Gdo",X="HksuyUyj1n3aTnB4nHLd",$="DT8FJnRKoRVWo77CPQbQ";var q=s(86070);const Z=(e,a)=>{switch(e){case l.NQG.ALBUM:case l.NQG.TRACK:case l.NQG.EPISODE:case l.NQG.PLAYLIST:return a?d.Ru.get("ad-formats.remove"):d.Ru.get("ad-formats.save");default:return a?d.Ru.get("unfollow"):d.Ru.get("follow")}},ee=({playBtnUri:e,uri:a,uriType:s})=>{const t=(0,i.wA)(),[c,n]=(0,V.A)(a),o=(0,w.W)(),R="SMALL"===(0,S.y)()?"small":"medium",{togglePlay:A,isPlaying:E}=(0,M.P)({uri:e},{featureIdentifier:"hpto"}),z=(0,u.useCallback)((()=>{A(),t((0,h.i2)("event_clicked","ne-play-button"))}),[t,A]),F=(0,u.useCallback)((async()=>{try{await n(!c)}catch{(0,h.yF)(`invalid button uri type ${a}`)}o({targetUri:a,intent:c?"unsave":"save",type:"click"})}),[c,n,a,o]),I=(0,u.useCallback)((()=>{t((0,h.i2)("event_clicked","ne-more-button"))}),[t]);let _=null;return _=(0,l._Tv)(a)?(0,q.jsx)(j.h,{uri:a}):(0,l.ecE)(a)?(0,q.jsx)(p.t,{uri:a}):(0,l.tbX)(a)?(0,q.jsx)(N.W,{uri:a}):(0,l.WB1)(a)?(0,q.jsx)(y.H,{uri:a}):(0,l.U_m)(a)?(0,q.jsx)(C.P,{uri:a}):(0,l.gHQ)(a)?(0,q.jsx)(k.b,{uri:a}):(0,l.PkR)(a)?(0,q.jsx)(f.A,{uri:a}):(0,q.jsx)(b.h,{uri:a}),(0,q.jsxs)("div",{className:O,"data-testid":"hpto-native-buttons",children:[(0,q.jsx)(m.$,{onClick:z,size:R,children:E?d.Ru.get("pause"):d.Ru.get("play")}),(0,q.jsx)(g.n,{className:r()({[$]:c}),onClick:F,size:R,children:Z(s,c)}),(0,q.jsx)(v.b,{menu:_,children:(0,q.jsx)(x.e,{onClick:I,size:R,className:W})})]})},ae=({className:e})=>(0,q.jsx)("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:"150",height:"20",viewBox:"0 0 147 20",children:(0,q.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,q.jsx)("path",{fill:"#FFF",d:"M70 5H71V16H70z"}),(0,q.jsxs)("g",{children:[(0,q.jsx)("path",{fill:"#84BD00",d:"M10.001.045C4.489.045.02 4.49.02 9.975c0 5.486 4.469 9.932 9.981 9.932 5.513 0 9.981-4.446 9.981-9.931 0-5.485-4.468-9.931-9.981-9.931"}),(0,q.jsx)("path",{fill:"#000",d:"M15.544 10.6C12.463 8.717 7.956 8.186 4.33 9.28a.775.775 0 00-.519.967.78.78 0 00.972.515c3.173-.958 7.263-.483 9.945 1.158a.78.78 0 001.07-.255.772.772 0 00-.255-1.065"}),(0,q.jsx)("path",{fill:"#000",d:"M16.858 7.251c-3.704-2.187-9.565-2.393-13.09-1.328A.928.928 0 104.31 7.7c3.07-.927 8.378-.752 11.595 1.149a.936.936 0 001.28-.325.926.926 0 00-.327-1.273"}),(0,q.jsx)("path",{fill:"#000",d:"M14.372 13.518c-2.63-1.6-5.892-1.972-9.694-1.107a.618.618 0 10.277 1.206c3.474-.79 6.424-.467 8.768.958a.624.624 0 00.855-.206.617.617 0 00-.206-.851"})]}),(0,q.jsxs)("g",{fill:"#FFF",transform:"translate(25 5)",children:[(0,q.jsx)("path",{d:"M3.806 4.194C2.23 3.822 1.95 3.56 1.95 3.013c0-.518.493-.867 1.226-.867.711 0 1.416.265 2.156.81a.104.104 0 00.146-.023l.77-1.073a.102.102 0 00-.02-.139C5.347 1.023 4.357.684 3.199.684 1.496.684.307 1.694.307 3.14c0 1.55 1.026 2.099 2.799 2.522 1.508.344 1.763.632 1.763 1.147 0 .57-.515.924-1.343.924-.92 0-1.672-.306-2.511-1.025a.109.109 0 00-.076-.025.103.103 0 00-.071.036L.005 7.734a.1.1 0 00.01.142 5.18 5.18 0 003.476 1.318c1.834 0 3.02-.991 3.02-2.525 0-1.297-.784-2.014-2.705-2.475"}),(0,q.jsx)("path",{d:"M10.661 2.656c-.795 0-1.447.31-1.985.944v-.714a.103.103 0 00-.103-.102H7.16a.103.103 0 00-.103.102v7.935c0 .057.046.102.103.102h1.412a.103.103 0 00.103-.102V8.316c.538.597 1.19.889 1.985.889 1.478 0 2.973-1.125 2.973-3.274 0-2.15-1.495-3.275-2.973-3.275zm1.332 3.275c0 1.094-.682 1.858-1.659 1.858-.965 0-1.693-.798-1.693-1.858s.728-1.858 1.693-1.858c.961 0 1.659.78 1.659 1.858z"}),(0,q.jsx)("path",{d:"M17.468 2.656c-1.903 0-3.393 1.449-3.393 3.298 0 1.83 1.48 3.263 3.37 3.263 1.91 0 3.405-1.444 3.405-3.286 0-1.836-1.485-3.275-3.382-3.275zm0 5.145c-1.012 0-1.775-.804-1.775-1.87 0-1.07.737-1.847 1.752-1.847 1.019 0 1.787.804 1.787 1.87 0 1.07-.742 1.847-1.764 1.847z"}),(0,q.jsx)("path",{d:"M24.913 2.784H23.36v-1.57a.103.103 0 00-.104-.103h-1.411a.103.103 0 00-.104.102v1.57h-.679a.103.103 0 00-.102.103v1.2c0 .056.046.102.102.102h.68v3.104c0 1.254.63 1.89 1.876 1.89.507 0 .927-.103 1.323-.325a.102.102 0 00.052-.089V7.626a.102.102 0 00-.049-.087.104.104 0 00-.1-.004 1.797 1.797 0 01-.83.197c-.452 0-.654-.203-.654-.659V4.188h1.553a.103.103 0 00.103-.102v-1.2a.103.103 0 00-.103-.102"}),(0,q.jsx)("path",{d:"M30.326 2.79v-.193c0-.567.22-.82.714-.82.294 0 .53.057.795.145.033.01.067.005.093-.014a.101.101 0 00.043-.083V.648a.102.102 0 00-.073-.098 3.916 3.916 0 00-1.173-.166c-1.305 0-1.994.726-1.994 2.098v.296h-.678a.103.103 0 00-.104.102v1.206c0 .056.047.102.104.102h.678v4.788c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102V4.188h1.319l2.019 4.787c-.23.502-.455.603-.762.603-.25 0-.511-.074-.779-.219a.107.107 0 00-.082-.007.104.104 0 00-.061.055l-.479 1.038a.1.1 0 00.045.132 3 3 0 001.507.381c1.043 0 1.62-.48 2.127-1.771l2.45-6.258a.1.1 0 00-.011-.095.103.103 0 00-.085-.044h-1.47a.104.104 0 00-.098.068L34.483 7.11l-1.649-4.254a.103.103 0 00-.096-.066h-2.412"}),(0,q.jsx)("path",{d:"M27.188 2.784h-1.412a.103.103 0 00-.103.102v6.09c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102v-6.09a.103.103 0 00-.103-.102"}),(0,q.jsx)("path",{d:"M26.49.011c-.56 0-1.014.448-1.014 1 0 .554.454 1.002 1.013 1.002.56 0 1.013-.448 1.013-1.001 0-.553-.454-1-1.013-1"}),(0,q.jsx)("path",{d:"M38.858 4.742a.984.984 0 01-.994-.983c0-.538.44-.987 1-.987a.984.984 0 11-.006 1.97zm.005-1.872c-.509 0-.894.4-.894.89 0 .489.382.884.889.884.509 0 .894-.4.894-.89a.876.876 0 00-.889-.884zm.22.985l.281.389h-.237l-.253-.357h-.217v.357h-.198V3.213h.465c.242 0 .401.122.401.329 0 .169-.098.272-.242.313zm-.167-.465h-.26v.326h.26c.129 0 .206-.063.206-.163 0-.107-.077-.163-.206-.163z"})]}),(0,q.jsx)("path",{fill:"#FFF",d:"M79.9 13.12c1.8 0 2.37-1.03 2.37-1.89 0-2.49-4-1.55-4-3.26 0-.72.67-1.23 1.56-1.23.75 0 1.43.26 1.91.84l.38-.42c-.52-.59-1.26-.94-2.26-.94-1.21 0-2.19.69-2.19 1.78 0 2.33 4 1.31 4 3.27 0 .57-.39 1.33-1.76 1.33-.95 0-1.65-.47-2.08-.97l-.37.43c.51.62 1.34 1.06 2.44 1.06zm6.61-.12v-2.77h1.93c1.27 0 2.01-.9 2.01-1.95 0-1.05-.73-1.95-2.01-1.95h-2.5V13h.57zm1.87-3.29h-1.87V6.85h1.87c.88 0 1.47.59 1.47 1.43s-.59 1.43-1.47 1.43zm8.56 3.41c1.95 0 3.24-1.5 3.24-3.45 0-1.95-1.29-3.45-3.24-3.45-1.96 0-3.24 1.5-3.24 3.45 0 1.95 1.28 3.45 3.24 3.45zm0-.52c-1.62 0-2.64-1.25-2.64-2.93 0-1.7 1.02-2.93 2.64-2.93 1.6 0 2.64 1.23 2.64 2.93 0 1.68-1.04 2.93-2.64 2.93zm8.94.4V6.85h2.18v-.52h-4.94v.52h2.18V13h.58zm9.46 0v-.52h-3.23V6.33h-.57V13h3.8zm4.11 0V6.33h-.57V13h.57zm7.09.13c1.05 0 1.94-.45 2.53-1.11V9.69h-3.09v.51h2.52v1.6c-.37.37-1.07.81-1.96.81-1.57 0-2.78-1.22-2.78-2.94 0-1.74 1.21-2.93 2.78-2.93.85 0 1.61.37 2.08.93l.43-.31c-.61-.7-1.41-1.14-2.51-1.14-1.87 0-3.38 1.39-3.38 3.45 0 2.06 1.51 3.46 3.38 3.46zM138.2 13V6.33h-.58v2.98h-4.23V6.33h-.57V13h.57V9.83h4.23V13h.58zm6.23 0V6.85h2.18v-.52h-4.94v.52h2.18V13h.58z"})]})});var se=s(21082);const te=e=>{switch(e){case l.NQG.ALBUM:return d.Ru.get("card.tag.album");case l.NQG.TRACK:return d.Ru.get("card.tag.track");case l.NQG.ARTIST:return d.Ru.get("card.tag.artist");case l.NQG.EPISODE:return d.Ru.get("card.tag.episode");case l.NQG.SHOW:return d.Ru.get("card.tag.show");case l.NQG.PLAYLIST:case l.NQG.PLAYLIST_V2:return d.Ru.get("card.tag.playlist");default:return""}},re=(e,a)=>"spotlight"===e?(0,q.jsx)(ae,{className:Q}):"exclusive"===e?(0,q.jsx)("p",{dir:"auto",className:r()(Q,D),children:d.Ru.get("ad-formats.exclusive")}):(0,q.jsx)(n.E,{as:"p",dir:"auto",variant:"bodySmallBold",semanticColor:"textBase",className:Q,children:te(a)}),ce=({name:e,uri:a,playBtnUri:s,description:t,smallImage:l,isSponsored:u,backgroundImage:m,sponsoredLogo:g,uriType:x,logoBlurb:v,isPremium:j,artists:p,badgeType:k})=>{const b=(0,i.wA)(),f=p.length>0,N=!j&&u,y=(0,c.decode)(t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{"data-testid":"hpto-native",className:r()(u?A:R,{[F]:u}),children:[u&&(0,q.jsx)("div",{className:I,children:(0,q.jsxs)("div",{children:[(0,q.jsx)(n.E,{as:"p",variant:"marginalBold",className:P,semanticColor:"textBase",children:d.Ru.get("ad-formats.presentedBy")}),(0,q.jsx)("img",{draggable:!1,className:T,src:g,alt:""}),(0,q.jsx)(n.E,{as:"p",semanticColor:"textBase",variant:"bodySmall",className:L,children:v})]})}),(0,q.jsx)("div",{className:u?z:E,children:(0,q.jsx)(se.N,{"data-testid":"ne-image-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-image-link"))},className:H,to:a,children:(0,q.jsx)("img",{className:B,alt:"",src:l})})}),(0,q.jsxs)("div",{className:_,children:[re(k,x),(0,q.jsx)(n.E,{as:"a",variant:"titleLarge","data-testid":"ne-name-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-name-link"))},href:a,dir:"auto",semanticColor:"textBase",className:u?G:U,children:e}),f&&(0,q.jsx)("div",{children:p.map(((e,s)=>(0,q.jsxs)("span",{children:[s?d.Ru.getSeparator():"",(0,q.jsx)(n.E,{as:"a",semanticColor:"textBase",variant:"bodyMedium","data-testid":`ne-attrib-link-${s}-test`,onClick:()=>{b((0,h.i2)("event_clicked","ne-attrib-link"))},draggable:!1,href:e.uri,children:e.name})]},`${a}-${s}`)))}),(0,q.jsx)(n.E,{variant:"bodyMedium",dir:"auto",className:K,semanticColor:"textBase",children:y}),(0,q.jsx)(ee,{playBtnUri:s,uri:a,uriType:x})]})]}),(0,q.jsx)("div",{draggable:!1,className:r()(u?J:Y,{[X]:!u}),style:{backgroundImage:`url(${m})`}}),!N&&(0,q.jsx)(o.S,{isPremium:j})]})}},15552:(e,a,s)=>{s.d(a,{h:()=>h});var t=s(30758),r=s(31417),c=s(10994),i=s(59521),n=s(42162),l=s(44672),d=s(78774),o=s(86070);const h=t.memo((function({uri:e}){const{spec:a}=(0,d.o)(e);return(0,o.jsx)(l.pZ,{value:"generic",children:(0,o.jsx)(c.W,{children:(0,o.jsx)(n.h,{divider:"before",children:(0,o.jsx)(i.m,{spec:a,uri:e,displayText:r.Ru.get("context-menu.copy-generic-link")})})})})}))}}]); +//# sourceMappingURL=4003.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4168.css b/dot-config/spicetify/Extracted/Raw/xpui/4168.css new file mode 100755 index 00000000..71bc7815 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4168.css @@ -0,0 +1,72 @@ +.HUjfVPQnC1P8Q8dJlxVl{--size:40px;border:0;border-radius:500px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:8px;-webkit-transition:-webkit-transform 33ms cubic-bezier(.3,0,0,1);transition:-webkit-transform 33ms cubic-bezier(.3,0,0,1);transition:transform 33ms cubic-bezier(.3,0,0,1);transition:transform 33ms cubic-bezier(.3,0,0,1),-webkit-transform 33ms cubic-bezier(.3,0,0,1);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:var(--size);min-width:var(--size);padding:0;position:relative;width:var(--size);-ms-flex-negative:0;flex-shrink:0}.HUjfVPQnC1P8Q8dJlxVl.cRHuuh0O2EuJZbQ5oaEF{background-color:var(--background-base);color:#000}.HUjfVPQnC1P8Q8dJlxVl.nzYFime89RF7YubA1s6p{background-color:#fff;color:#121212}.HUjfVPQnC1P8Q8dJlxVl.bUuwcf2KoLk9Jivd0z2w{background-color:transparent;color:#fff}.HUjfVPQnC1P8Q8dJlxVl[disabled]{opacity:.4;pointer-events:none}.HUjfVPQnC1P8Q8dJlxVl:focus,.HUjfVPQnC1P8Q8dJlxVl:hover{background-color:var(--background-highlight);-webkit-transform:scale(1.06);transform:scale(1.06)}.HUjfVPQnC1P8Q8dJlxVl:active{background-color:var(--background-press);-webkit-transform:scale(1);transform:scale(1)}.W37h8rinLYd4K1pNIqYG{background-color:#fff;border-radius:100%;bottom:0;color:#000;height:41%;padding:5%;position:absolute;right:0;-webkit-transform:translate(20%,20%);transform:translate(20%,20%);width:41%}.NyRhcd1ie8y97gBKhKti{-webkit-margin-end:4px;margin-inline-end:4px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */@-webkit-keyframes glue-keyframes-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes glue-keyframes-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes glue-keyframes-fade-in{0%{opacity:0}to{opacity:1}}@keyframes glue-keyframes-fade-in{0%{opacity:0}to{opacity:1}}.artist-artistDiscography-topBar{display:-webkit-box;display:-ms-flexbox;display:flex;height:40px;position:sticky;top:64px;z-index:3;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;max-width:100%}.artist-artistDiscography-topBar.artist-artistDiscography-topBarScrolled{background-color:var(--background-base);border-bottom:none;-webkit-box-shadow:0 6px 10px rgba(0,0,0,.6);box-shadow:0 6px 10px rgba(0,0,0,.6)}.artist-artistDiscography-artistName{-webkit-box-flex:1;color:#fff;-ms-flex:1;flex:1}.artist-artistDiscography-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:cubic-bezier(.3,0,.4,1);transition-timing-function:cubic-bezier(.3,0,.4,1);-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;border:0;color:hsla(0,0%,100%,.7);padding:8px;pointer-events:auto;-webkit-margin-start:12px;cursor:pointer;margin-inline-start:12px}.artist-artistDiscography-button.artist-artistDiscography-active,.artist-artistDiscography-button:focus,.artist-artistDiscography-button:hover{background-color:hsla(0,0%,100%,.1);border-radius:50%;color:#fff}.artist-artistDiscography-tracklist{margin-bottom:32px}.artist-artistDiscography-cardGrid{margin-top:64px;margin-inline:12px}.artist-artistDiscography-headerContainer{background:var(--background-base);display:-webkit-box;display:-ms-flexbox;display:flex;padding:32px}.artist-artistDiscography-headerContainer.artist-artistDiscography-firstAlbum{margin-top:0;padding-top:128px}.artist-artistDiscography-topBar{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.xpkB16hRIXt_Wfk2bJhI{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;gap:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kg7_tYjFur1DEfwH_0W5,.xpkB16hRIXt_Wfk2bJhI{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.artist-artistDiscography-headerImage{height:136px;width:136px;-ms-flex-negative:0;flex-shrink:0}.artist-artistDiscography-headerMetadata{-webkit-margin-start:24px;display:-webkit-box;display:-ms-flexbox;display:flex;margin-inline-start:24px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.artist-artistDiscography-headerButtons{display:grid;grid-auto-flow:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;grid-gap:16px;margin-top:auto}.artist-artistDiscography-headerTitle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.eqw9lvuoZHrkWMTdyTpY{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.lb08f71wES9AQnKx6e0R{-ms-overflow-style:none;overflow-y:scroll;scrollbar-width:none}.lb08f71wES9AQnKx6e0R::-webkit-scrollbar{display:none}.x-sortBox-sortDropdown{display:-webkit-box;display:-ms-flexbox;display:flex;min-width:0;grid-gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;border:0;border-radius:4px;color:hsla(0,0%,100%,.7);height:32px;padding-inline:8px 8px}.x-sortBox-sortDropdown:focus,.x-sortBox-sortDropdown:hover{color:#fff;cursor:pointer}.x-sortBox-sortDropdown .cvTLPmjt6T7M85EKcB8w{min-width:0;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap}.x-sortBox-sortDropdown .cvTLPmjt6T7M85EKcB8w:first-letter{text-transform:uppercase}.x-sortBox-sortDropdown .SbDHY3fVADNJ4l9qOLQ2{-ms-flex-negative:0;flex-shrink:0}.od_kF1rLZbir8kM_F607{padding-bottom:56.25%;position:relative;width:100%}.qyKJPLjz8o4jnbk92JOn{background-color:rgba(0,0,0,.7);border:0;border-radius:50%;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:32px;z-index:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.qyKJPLjz8o4jnbk92JOn:hover{background-color:#121212;color:#fff;cursor:pointer}.zsVdTdACMZA_MWB3HlEW{left:48px}.nsakAYOtgZOAcEO4ObrM{right:48px}.uJjmxe0T11dUVeW6Biz8{background-color:#000;height:100%;left:0;position:absolute;top:0;width:100%}.F1K3uW1jqwG0wxFHO5gl,.uJjmxe0T11dUVeW6Biz8{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.F1K3uW1jqwG0wxFHO5gl{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.Ii9XdJaXIuKbmR1zC4Rt{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.DVWIV41y6daOMjQKR8Zj{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:24px} .oORVTPvg6eTQflVKKgw8{margin-right:4px}.muHL0_3HjlqTZDoapgc9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:hsla(0,0%,100%,.7);margin:16px 0 0}.muHL0_3HjlqTZDoapgc9:focus,.muHL0_3HjlqTZDoapgc9:hover{color:#fff}/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.XtGI24gayCCOR69pcBao{background-color:var(--background-base);isolation:isolate}.AK5MS4kVmpVJSnAPzApZ{margin:8px 0 40px}.ih3vZ4qqibfclKQ2r3U8{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.vsqOYUmRYepQ7AgGzPDk{margin-bottom:40px}.Uv9uqBNRy4qsyhPSa7lY{min-height:0!important}.YyjwPfOAdb6z73PerGUF{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.pAvBQUDkfvkyO47Kw71y{grid-column:span var(--column-count)}.PPoC4pYtYLuuzjV0RaQF{width:calc(50% - 12px)}.V168frZQBWaJ1OdnyyKO{grid-column:span min(var(--column-count),6)}.MZkAAYmEs5kAOXrbrBQQ{grid-column:span 4;min-width:372px}.IR0gsJCJYP1TqjMi6wUt,.hGJN08YEbxIJ2HaEcHee{grid-column:span 2}.GNdKACg7GTgIv75LT6Gv{grid-column:span 3}.FwIG_h9mHxGOTDxFRnWT{margin-top:-64px}.anPfvyDzeqR3CKW4gHUP{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ZpAXOWy3RgYX8ywKZZOI{margin-top:40px}.jW4eWdr_LUeOXwPpKhWG{background-color:#282828;background-position:50% 50%;background-size:cover;border:0;border-radius:8px;position:relative;text-align:initial;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:transform .25s linear;transition:transform .25s linear;width:100%}.jW4eWdr_LUeOXwPpKhWG:hover{-webkit-transform:scale(1.01);transform:scale(1.01)}.jW4eWdr_LUeOXwPpKhWG .BPDHTIIFueJMvtDPZttw{max-width:672px}.jW4eWdr_LUeOXwPpKhWG.DRXonbAbVN5Vg9anDL1X .BPDHTIIFueJMvtDPZttw{bottom:0;position:absolute}.jW4eWdr_LUeOXwPpKhWG .xbKOOJ_NjLijBvdpAudQ{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-top:8px;overflow:hidden}.M0yriEHOsE9ET707IXzC{grid-column:span 4}.DRXonbAbVN5Vg9anDL1X{background-repeat:no-repeat;height:516px}.xbKOOJ_NjLijBvdpAudQ{margin-top:8px}.PwMuGFUCeHPjbHDy8M1T{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.y_GaLKy76zj71zPYkLrs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.TV2j1oIRIkKH_6D1xP82{margin-top:-12px;width:509px}.T_AmQPlZ6wvE819I7A0D{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:32px}.zQy0G59IX5G4Cc9AtWRT{margin-bottom:40px} .zQy0G59IX5G4Cc9AtWRT{margin-right:40px}.BPDHTIIFueJMvtDPZttw{padding:40px}.BPDHTIIFueJMvtDPZttw p{margin-bottom:16px}.OyLgnahIHw63684ABRBF{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:32px;-webkit-box-align:center;-ms-flex-align:center;align-items:center} .KguYS3oppxDrMNpTUJcB{margin-right:8px}.O9QEyBUMktZGNPifQqvY{margin-bottom:24px}.JnpOnFaQfrRIA2fYe88A{background-color:#121212;border-radius:8px;height:100%;max-height:70vh;min-width:500px;overflow:hidden;position:relative;width:768px}.cacyLqtJhjhr95qRC_R7{height:100%}.pSxFsY9Fgcj5f8Gf05mh{background-color:rgba(0,0,0,.7);border:0;border-radius:50%;color:hsla(0,0%,100%,.7);display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;position:absolute;top:16px;width:32px;z-index:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} .pSxFsY9Fgcj5f8Gf05mh{right:16px}.pSxFsY9Fgcj5f8Gf05mh:hover{background-color:#121212;color:#fff;cursor:pointer}.pSxFsY9Fgcj5f8Gf05mh svg{fill:currentcolor}.tsFfFt7SCIoA14JawrRf{opacity:0;-webkit-transform:translateY(25%) scale(.6);transform:translateY(25%) scale(.6);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out,-webkit-transform .3s ease-out}._VADS4mdajCt5Yuf6KjW{opacity:1;-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.TrS5BnDIiLtqz1i1QBVV{opacity:0;-webkit-transform:translateY(25%) scale(.6);transform:translateY(25%) scale(.6)}.tLjX9htIKD_OCmEX01UN{background:#0074e0;border-radius:50%;color:#fff;height:80px;position:absolute;top:40px;width:80px}.tLjX9htIKD_OCmEX01UN div:first-child{position:absolute;text-align:center;top:25%;width:100%}.tLjX9htIKD_OCmEX01UN div:nth-child(2){position:absolute;text-align:center;top:55%;width:100%} .tLjX9htIKD_OCmEX01UN{right:40px}.T_AmQPlZ6wvE819I7A0D .tLjX9htIKD_OCmEX01UN{left:0;margin-bottom:40px;position:relative;right:0;top:0}.NPv26QCDgdnwsPOlYJmQ{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;height:40px;justify-content:space-between;margin-bottom:16px}.NPv26QCDgdnwsPOlYJmQ div:nth-child(2){color:#b3b3b3}.zNnlcxsmnV1RiWXSd4IA{padding:8px 12px}.a3sk2brhAAMoZderfRfg[role=menuitem]{padding-inline:12px}.E1ikFpkPVaoLplbQdrTP:after{background-color:currentcolor;border-radius:50%;bottom:0;content:"";display:block;height:4px;left:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:4px!important}.E1ikFpkPVaoLplbQdrTP.nozebc1PGSbzmePU25qY{outline-offset:12px}.E1ikFpkPVaoLplbQdrTP.nozebc1PGSbzmePU25qY:after{bottom:-8px}.qB6S3KrJlMCx4WS4zOtl{display:-webkit-box;display:-ms-flexbox;display:flex;margin-block:8px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.EmeHQXR87mUskYK6xEde{background-color:var(--background-base);isolation:isolate}.qELskYs6YdzzafmETrAg{margin:8px 0 40px}.fnphAtjtCDYY99lYBfLK{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.hLi0oogSdDKAIC_rnfP1{margin-bottom:40px}.xN866HUyMGAaemLBKQQx{min-height:0!important}.cWcQITygrzZTduXuXope{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.BpBrwbAwIMryupCOXJzw{grid-column:span var(--column-count)}.FOgY6uo_Bj_VTV5hwaix{width:calc(50% - 12px)}.PHHrto0Qhh4dJcnnPhwu{grid-column:span min(var(--column-count),6)}.dIlzffEKwokwWI5sqYJN{grid-column:span 4;min-width:372px}.SMBqsyNXIMb0yeYVwPxv,.bcAylCIHjoXKDI08jTx0{grid-column:span 2}.yT49w5mDxTaLK9lL59Gd{grid-column:span 3}.D6IunHuzuULf_Sr88GOA{margin-top:-64px}.b_dSllo9kearPhsw_MSp{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ZkkYlSbVnEhF1urK3rKO{margin-top:40px}.RClL7GUhUo_xqzNcsXSG{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;border-radius:6px;-ms-flex:1;flex:1;margin:0 -8px 8px;padding:8px}.RClL7GUhUo_xqzNcsXSG:focus-within,.RClL7GUhUo_xqzNcsXSG:hover{background-color:var(--background-tinted-highlight);text-decoration:none}.RClL7GUhUo_xqzNcsXSG:active{background-color:var(--background-tinted-press)}.EQaztpbGtXeN7V1cjAP4{-webkit-box-flex:0;border-radius:2px;-ms-flex:0 0 48px;flex:0 0 48px;-webkit-margin-end:16px;margin-inline-end:16px}.tYSzgx8hG37WjBDn364n{-webkit-box-flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;word-break:break-all}.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx:focus,.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx:hover{text-decoration:none!important}.tYSzgx8hG37WjBDn364n .DehN40s8150pzqyBfGN_{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.7);overflow:hidden}.ZiRNxR2_6cTTMHIqpwzl{-webkit-box-flex:0;-ms-flex:0 0 16px;flex:0 0 16px;-ms-flex-item-align:start;align-self:flex-start;color:hsla(0,0%,100%,.5);visibility:hidden}.RClL7GUhUo_xqzNcsXSG:focus .ZiRNxR2_6cTTMHIqpwzl,.RClL7GUhUo_xqzNcsXSG:hover .ZiRNxR2_6cTTMHIqpwzl{visibility:visible}.vQqlnrnZi2f4zrYRQvKW{gap:16px}.OMowV_mBy8tlBELzbuTi,.vQqlnrnZi2f4zrYRQvKW{display:-webkit-box;display:-ms-flexbox;display:flex}.OMowV_mBy8tlBELzbuTi{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.XxJxjdIexR1RXajhHYyv{background-color:var(--background-base);isolation:isolate}.C3sCQUxUnOT70BvlHzaT{margin:8px 0 40px}.t_q3We1lzpMw16K2hqWW{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.gnMTgsbCWnViOBmNAd5I{margin-bottom:40px}.hswKk1_ZqWYCARtlR60p{min-height:0!important}.uOmn1JAYcYnJgvpZ66cA{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.Q3XGDFeRW9Em3o9WPa6o{grid-column:span var(--column-count)}.QjAPPoqR26BHPwjskHYA{width:calc(50% - 12px)}.becor9wH6rcFrWOz4fci{grid-column:span min(var(--column-count),6)}.N7IQH5M1P3g4xti1NKkg{grid-column:span 4;min-width:372px}.Jg2Gc2_7lvmOVbBmnArV,.V5Z6rD5pcV2E04xmwv_X{grid-column:span 2}.PiaRMcFcDcfr8TrjLior{grid-column:span 3}.n3sVilMoIFrsZwT6XO6w{margin-top:-64px}.GC3MlDrKu2PcuU6ymC1g{-webkit-margin-after:16px!important;margin-block-end:16px!important}.d9MRyeQgA5thvNE7ncjP{margin-top:40px}.GLAXysTPuIgv3GRPVlhS{display:-webkit-box;display:-ms-flexbox;display:flex}@media(pointer:fine){.pZag8sthfxTLjP1tsOfV:hover{cursor:pointer}}.lkXpBMSmNP9w702sek8V{border-radius:4px;vertical-align:middle} .lkXpBMSmNP9w702sek8V{margin-right:16px}.XlmJIRaVv7a23oYq6lwU{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .iy5hzmfkdXQ0B2SFZAyj{margin-right:8px}.pJXRyroA6LuPSsKI8MrD{margin-top:4px}.lmvQXQeHS4JcYWGciCt3{background:#fff;border-radius:100px;color:#000;padding:2px} .lmvQXQeHS4JcYWGciCt3{padding-right:8px}.artist-artistVerifiedBadge-wrapper{display:inline-grid;grid-template-columns:auto 1fr;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.artist-artistVerifiedBadge-badge{grid-area:1/1/2/2}.artist-artistVerifiedBadge-fillColor{background-color:#fff;border-radius:50%;height:60%;justify-self:center;width:60%}.rZ0vXK4lJY10kxTgRQ7g{margin-top:0}.S9KkAiRE_O9ax0Jv_D1i svg{height:20px;width:20px}.mrtMgVMfNyaEhMIGFBuR{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.guUl5dHbF5HJRvwjBxzR,.mrtMgVMfNyaEhMIGFBuR{display:-webkit-box;display:-ms-flexbox;display:flex}.guUl5dHbF5HJRvwjBxzR{background-size:cover;border-radius:8px;height:250px;overflow:hidden;position:relative;width:343px}.jyNYgeneJ5inaKhciDjS{width:100%}.Pnz4fz1OZWV19CVEQJDx{content:"";cursor:pointer;overflow:hidden;text-indent:100%;white-space:nowrap}.HciFabcIqzhXoDbtwR92,.Pnz4fz1OZWV19CVEQJDx{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.HciFabcIqzhXoDbtwR92{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,7%,0)),to(#121212));background:linear-gradient(hsla(0,0%,7%,0),#121212)}.PNadLEAqpH87jY11pma4{bottom:16px;display:-webkit-box;display:-ms-flexbox;display:flex;left:16px;position:absolute;right:16px}.yWkJ7Ua3DnSTaHxG2qgv{border-radius:4px;vertical-align:middle} .yWkJ7Ua3DnSTaHxG2qgv{margin-right:16px}.By3HGkfBq3fa6bjrhrli{margin-left:4px;-ms-flex-item-align:center;align-self:center}.ukV8NB0JGnieUOa0eri5{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .HGhEGu5V84RXBk6XAPQ6{margin-right:8px}.kwzBRpFigKr1EP2d5qle{background:var(--text-base);border-radius:100px;color:var(--background-press);left:15px;padding:2px;position:absolute;top:15px} .kwzBRpFigKr1EP2d5qle{padding-right:8px}.sCtxvzp3T8umKY86Hfcg{-ms-flex-item-align:center;align-self:center;-webkit-margin-start:auto;margin-inline-start:auto}.JJvGfNiGtduy_XoXPFT1{background-size:cover;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:250px;overflow:hidden;position:relative;width:343px}.fYeCAFmjlgTatXRJ2v0b{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,7%,0)),to(#121212));background:linear-gradient(hsla(0,0%,7%,0),#121212);bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.G3ch3A6RIlL3f4ekNqaP{background-color:#5b6dff;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:2px;color:#fff;height:24px;justify-content:center;width:97px}.vJIXF1I7CfyfTyCa9JkP{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.ICkblQqDNPA4tRc06zv_{height:16px;margin-right:2px}.G3ch3A6RIlL3f4ekNqaP>.dUVOQw0MDhn9xoFKyWlx{font-size:13px}.ZEsebSb1CaZVzuPawZEj{bottom:16px;left:16px;position:absolute;right:16px}.ZEsebSb1CaZVzuPawZEj>.j2wjzbkgYnFp7ey8JIp0{color:#fff;line-height:1;margin-bottom:8px}.ZEsebSb1CaZVzuPawZEj>.JNLGmI_C2cdhHFxe0oxm{color:#fff;font-size:13px}.ZEsebSb1CaZVzuPawZEj>.O36HCbLOjWcWkAwkNXqJ{border-color:#fff;font-size:13px;margin-top:12px}.ZEsebSb1CaZVzuPawZEj>.O36HCbLOjWcWkAwkNXqJ:hover{text-decoration:none}.GS_6HA9xIobh5dt5VUSY{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .EIxjItP8eBZ1eAT7c4Aq{margin-right:8px}.H3mjE6AEBDPRuHNKUpRK{background:var(--text-base);border-radius:100px;color:var(--background-press);left:15px;padding:2px;position:absolute;top:15px} .H3mjE6AEBDPRuHNKUpRK{padding-right:8px}.artist-artistOnTour-item{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;display:grid;grid-template-columns:72px auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden;-webkit-box-flex:1;border-radius:4px;-ms-flex:1;flex:1;margin-left:-8px;padding:8px}.artist-artistOnTour-item:hover{background-color:var(--background-tinted-highlight);text-decoration:none}.artist-artistOnTour-item:active{background-color:var(--background-tinted-press)}.artist-artistOnTour-item.artist-artistOnTour-condensed{-webkit-column-gap:16px;-moz-column-gap:16px;column-gap:16px;grid-template-columns:56px auto;margin:0;padding:0}.artist-artistOnTour-item.artist-artistOnTour-condensed:focus-within,.artist-artistOnTour-item.artist-artistOnTour-condensed:hover{background-color:transparent}.artist-artistOnTour-date{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;background:hsla(0,0%,100%,.1);border-radius:4px;gap:2px;height:64px;justify-content:center;padding:8px;text-align:center;width:64px}@media(max-width <= 1279px){.artist-artistOnTour-date{height:56px;width:56px}}.artist-artistOnTour-date.artist-artistOnTour-condensed{height:56px;width:56px}.artist-artistOnTour-date.artist-artistOnTour-elevated{background:var(--background-base)}.artist-artistOnTour-date.artist-artistOnTour-elevated .artist-artistOnTour-dateMonth{font-size:11px;text-transform:capitalize}.artist-artistOnTour-date.artist-artistOnTour-elevated .artist-artistOnTour-dateDay{font-size:24px;line-height:24px;padding-top:0}.artist-artistOnTour-date .artist-artistOnTour-dateMonth{color:#fff}.artist-artistOnTour-date .artist-artistOnTour-dateDay{color:#fff;letter-spacing:-.04em}@media(width <= 992px){.artist-artistOnTour-date .artist-artistOnTour-dateDay{font-size:16px;line-height:16px}}@media(width <= 1279px){.artist-artistOnTour-date .artist-artistOnTour-dateDay{font-size:16px;line-height:16px}}.artist-artistOnTour-info{overflow:hidden}.artist-artistOnTour-title{margin-bottom:4px;overflow:hidden;text-overflow:ellipsis}.artist-artistOnTour-title,.artist-artistOnTour-title.artist-artistOnTour-condensed{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.artist-artistOnTour-time:after{content:"•";margin:0 4px}.artist-artistOnTour-timeAndVenue,.main-seeAll-link{color:#b3b3b3}.artist-artistOnTour-timeAndVenue{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;text-overflow:ellipsis}@media(width <= 1279px){.artist-artistOnTour-timeAndVenue{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;text-overflow:ellipsis}}.artist-artistOnTour-timeAndVenue.artist-artistOnTour-condensed{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:hsla(0,0%,100%,.7)}.artist-artistOnTour-timeAndVenueText{-webkit-line-clamp:2;text-overflow:ellipsis}.artist-artistOnTour-onTourShelfGrid{display:grid;gap:8px;grid-template-columns:1fr 1fr;margin-bottom:40px}@media(width <= 992px){.artist-artistOnTour-onTourShelfGrid{grid-template-columns:1fr}}@media(width >= 1280px){.artist-artistOnTour-onTourShelfGrid{grid-template-columns:1fr 1fr 1fr}}@media(width <= 992px){.artist-artistOnTour-onTourShelfGrid>li:nth-child(n+5){display:none}}.artist-artistOnTour-metadata{bottom:8px;color:#fff;position:absolute}.artist-artistOnTour-metadata .artist-artistOnTour-location{background:rgba(0,0,0,.5);border-radius:4px;font-size:1rem;letter-spacing:0;margin:0 4px;padding:0 4px}.artist-artistOnTour-metadata .artist-artistOnTour-location,.artist-artistOnTour-eventName{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.zpjpg954p7ZWJiTjKWEL{background-color:var(--background-base);isolation:isolate}.qJwKqu8mZFqC7skXmB92{margin:8px 0 40px}.T9NXys2ksNcatzwpffqf{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.Uh4CUNI4qIgtR8Pph5sy{margin-bottom:40px}.zASxqUcocvb5R1P74kpn{min-height:0!important}.dUX_MZJq6W_SX43m5epV{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.OsrS8iBNmRT6RKPxIKmg{grid-column:span var(--column-count)}.ieZlz0gExet7PSsiz4fN{width:calc(50% - 12px)}.MtZlqxNG4iK0gtG87lLq{grid-column:span min(var(--column-count),6)}.CQR25iZaZs5NB2S3B_BV{grid-column:span 4;min-width:372px}.E0wMkTXfG3At4XtrWVcf,.rt3nALM2adEVANHGeezX{grid-column:span 2}.LxvnhlXX0Y3azWltsign{grid-column:span 3}.FY4kdTomUvpP2quh7Hz3{margin-top:-64px}.unaQVpO_antcqfMwSmsh{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ieGrRKgBmhVEX5Jvzhsw{margin-top:40px}.ECjQBV2evKE5PXHKhXV_{display:grid;grid-auto-flow:column;grid-gap:16px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.W_VvjqdqWRSlMRjRPkPb{margin-top:4px}.pUNc2aOeOQANHrhYa1GU{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}@media(pointer:fine){.pUNc2aOeOQANHrhYa1GU:hover{cursor:pointer}}.pUNc2aOeOQANHrhYa1GU .T_JcGdJujSuj014SZfjl{background-color:#1db954;border:2px solid #121212;border-radius:50%;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;position:absolute;right:0;width:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.pUNc2aOeOQANHrhYa1GU .RDZ61ETnag1ilfZTkVxe{color:#fff}.V1660uk_uXXZAMEmV4D4{margin-top:40px}.RbnoPhjDDAtbxN8gAiif{margin-bottom:40px}.pH79IoVAcUC3Hn_VbS3B{max-inline-size:332px;padding:16px}.v24nSqF2h73Ep3EJNkNl{display:grid;gap:12px;grid-template-areas:"title" "body" "buttons"}.OPvfrmGjqSYso3Me5FCd{grid-area:title}.TCbF8QBxkRc0mqI5_lzg{-webkit-box-flex:1;-ms-flex:1;flex:1;grid-area:body}.ZYBmZ8ghf3oA7NH2mI7r{display:-webkit-box;display:-ms-flexbox;display:flex;grid-area:buttons;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.Jtt6TUrz6TioPQsKXIY7{-webkit-box-pack:end;-ms-flex-pack:end;gap:32px;justify-content:flex-end}.T79i3UW0ikgJp_edToFJ{color:#fff!important}.yzZ_VZHrZBb3REPcU7tD,.yzZ_VZHrZBb3REPcU7tD:before{background:var(--background-elevated-base,#006bcf);height:16px;position:absolute;width:16px}.yzZ_VZHrZBb3REPcU7tD{visibility:hidden}.yzZ_VZHrZBb3REPcU7tD:before{content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg);visibility:visible}#context-menu[data-placement^=top]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{bottom:-8px}#context-menu[data-placement^=bottom]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{top:-8px}#context-menu[data-placement^=left]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{right:-8px}#context-menu[data-placement^=right]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{left:-8px}.zKHdfiQG6XifMqJCe1Xs{max-width:100%}.F01P0D1xtG9RO_uiHxBK{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--background-tinted-base);border-radius:4px;gap:8px;overflow:hidden;padding:8px;text-overflow:ellipsis;white-space:nowrap}.F01P0D1xtG9RO_uiHxBK:hover{background-color:var(--background-elevated-press)}.oGvEk0CK5XgIUe0vIgWL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.aUGJu_1rkM7l_YNH3r86{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.BO7X8b8_SQhDyCjS0EOv{min-width:42px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.VjLekolG5eyfw_9Hhjxv{margin-top:64px}.FdhXU2LtXi5sDE2kLc9I{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:16px 0}.pvGZ831aNzHTQMZ8CA_u{padding:0}.EPBWBmUPyLEpl4VJflaL{border-radius:4px;margin:32px 0 16px;max-width:400px;min-height:92px;overflow:hidden;padding:8px 12px;position:relative;-webkit-padding-end:100px;background-color:#7358ff;background-image:-webkit-gradient(linear,left bottom,left top,from(transparent),to(rgba(0,0,0,.25)));background-image:linear-gradient(0deg,transparent,rgba(0,0,0,.25));color:#fff;padding-inline-end:100px}.JFiowuVIURESjJJznyZx{-webkit-margin-after:8px;line-height:1.5rem;margin-block-end:8px;padding-bottom:8px}.P6CL1uHz_zTqst4gaAXQ{cursor:pointer}.P6CL1uHz_zTqst4gaAXQ span:last-of-type{font-weight:700!important}.JEd1tp9FdtDLBOCRSVe0{-webkit-box-shadow:0 4px 60px rgba(0,0,0,.4);box-shadow:0 4px 60px rgba(0,0,0,.4);display:block;height:80px;inset-block-end:-8px;inset-inline-end:-8px;position:absolute;-webkit-transform:rotate(25deg);transform:rotate(25deg);width:80px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.D_V60ibMxH9Vy7kyvWvc{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;margin-inline:-8px;padding:8px}.D_V60ibMxH9Vy7kyvWvc:hover{background:hsla(0,0%,100%,.1);text-decoration:none}.D_V60ibMxH9Vy7kyvWvc ._vZ2Gwpio834v2qcnvwK{padding-bottom:8px}.D_V60ibMxH9Vy7kyvWvc .qZDmHcBGDXbHFdGp0afA{display:inline-block;-webkit-margin-end:8px;color:#7358ff;margin-inline-end:8px;vertical-align:-10%}.anRK1X9LKn5HxZQJB5Tl{display:-webkit-box;display:-ms-flexbox;display:flex;height:48px;text-align:center;width:48px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:16px}.shUifmqVle_F5ILRpCqe{border-radius:4px;height:48px;min-height:48px;min-width:48px;width:48px}._WibGTg4OzGdsTf18zK1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.LHhL2094jqvK0MNwlGAu{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;-webkit-padding-start:12px;padding-inline-start:12px}.LHhL2094jqvK0MNwlGAu,.yRQGIh3Y05BG51IHUW2b{-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex}.yRQGIh3Y05BG51IHUW2b{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:2;-ms-flex:2;flex:2}.G8sU0RZZT_ZhaEv7B26V,.fT86P9Div4C8GXI9hZ36{-webkit-box-flex:1;-ms-flex:1;flex:1} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */@media(min-width:768px){.container{width:750px}}@media(min-width:992px){.container{width:970px}}@media(min-width:1200px){.container{width:1170px}}@media(min-width:1500px){.container{width:1450px}}.row{margin-left:-16px;margin-right:-16px}.container:after,.row:after{clear:both}.hide{display:none!important}.show{display:block!important}.hidden{display:none!important}.y9Olwg6ho6E95Rud3iLs{margin-top:-64px}.pT8jWX5PbLB2Z91Ngl7n{background:var(--background-base);isolation:isolate}.ynfZz1ilmr8Zg8BgXG_d{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:20px;-webkit-margin-after:32px;margin-block-end:32px}.qRS9X9GvnMDoWj6sx0Yo{padding:0 32px}.xpUBYro3YQTRrHlOtDUG{font-size:48px;text-decoration:underline}.RqzE7votb8N93rc_jcM1{font-size:24px;padding-top:20px}.vy9zjnjiY17LMoE8NIXU{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;margin-inline:-8px;padding:8px}.vy9zjnjiY17LMoE8NIXU:hover{background:hsla(0,0%,100%,.1);text-decoration:none}.McNZLhuWvDVET5VU3isa{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:hsla(0,0%,100%,.1);border-radius:4px;height:56px;min-width:56px;padding:4px;text-align:center;width:56px}.McNZLhuWvDVET5VU3isa .Y7ipyLdgXswfEfkyakDd{color:#fff;display:block;line-height:1;padding-bottom:4px;padding-top:2px}.McNZLhuWvDVET5VU3isa .fPraNia968RT4uPMTi3A{color:#fff;display:block;letter-spacing:-.04em;line-height:1}.us2rJWb_948b7dlVgBOe{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-padding-start:12px;padding-inline-start:12px}.GqNQN9feHja7Au6wOdLG{-webkit-box-flex:1;color:#fff;-ms-flex:1;flex:1;font-size:16px!important;width:100%}.wjBvyzKbAJgD2BpyuHKP{font-size:14px!important}.LkCU9WXlxfddrPDZZZ4J{text-align:center} .LtyyKmwxLSSxcYCrRZJh{text-align:right}.LkCU9WXlxfddrPDZZZ4J,.LtyyKmwxLSSxcYCrRZJh{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:14px!important;width:100%}.kc6crrZKKENRmaIMtzIx{padding-bottom:24px}.azrW1gfJbgz897iDaITJ{padding-bottom:24px;padding-top:16px}.U7meWrHbAMHqpiK5oslu,.wYMCavuacjad59alV1BF{text-align:center}.A6sC7UQiAsM__tCDUDW0{width:35%}.sdc7g7JVaoD3cGz27yCP{max-width:400px;padding:20px 0 0}.pdkMNbSQl8Yi5tl0iOF9{background:var(--background-base);color:#fff;isolation:isolate;padding:24px;position:relative}.lbKmnVjXCdZ3kRBxjKQZ{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:540px;max-width:100%;width:480px}.VAJ54U4IyPKmKRWXweMn{margin:8px;position:absolute;top:8px} .VAJ54U4IyPKmKRWXweMn{right:0}.r3oh3bOf2I7DZQEND5Uz{margin:8px;position:absolute;top:8px} .r3oh3bOf2I7DZQEND5Uz{left:0}.XwomR4z9c60ph1tYBcdm{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid rgba(83,83,83,.3);margin-bottom:16px;padding-bottom:16px}.bQATTxDxEbS7xXRsr_Mt,.wFdZQwoko8rVRTLeFG5G{-webkit-box-flex:1;-ms-flex:auto;flex:auto;overflow-y:scroll}.jcDbJiJUoAVWZ7h1Rhhy{margin-bottom:8px}.UkSUgC7NQnYbptBJEAM9{display:-webkit-box;display:-ms-flexbox;display:flex}.UkSUgC7NQnYbptBJEAM9 button:first-child{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.UkSUgC7NQnYbptBJEAM9 button:first-child:focus,.UkSUgC7NQnYbptBJEAM9 button:first-child:hover{background:none}.UkSUgC7NQnYbptBJEAM9:focus,.UkSUgC7NQnYbptBJEAM9:hover{background:hsla(0,0%,100%,.05)}.xfncDja0wZotJaVS3aq9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;background:none;border:none;color:#fff;cursor:pointer;-ms-flex:auto;flex:auto;height:38px;line-height:38px;margin:0;padding:0 12px;text-align:start;width:100%}.xfncDja0wZotJaVS3aq9:focus,.xfncDja0wZotJaVS3aq9:hover{background:hsla(0,0%,100%,.05)}.gJedMi0s8_RQ4d2aWYzI{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.WZzy7tMC5xlIMwoZ32JU{background:var(--background-highlight);border-radius:8px;color:#fff;isolation:isolate;max-width:100%;padding:32px;position:relative;width:480px}.LkdC_QJiLoD0OTOWnkJV{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 12px}.WqruN54NvYqlA2XlTJ0Z{margin:8px;position:absolute;top:0} .WqruN54NvYqlA2XlTJ0Z{right:0}.GS4yLEr0XMj8kw2iMAd8{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px;margin-top:32px;text-align:center}.prICvcudVq_SL6dqkZBw{margin:56px;padding:20px;position:relative}.prICvcudVq_SL6dqkZBw,.prICvcudVq_SL6dqkZBw:before{border:1px solid hsla(0,0%,100%,.4);border-radius:50%}.prICvcudVq_SL6dqkZBw:before{content:" ";display:block;inset:-32px;position:absolute}.YLM_DWbpYGBpvqtDEhum{margin-bottom:24px}.h8jjXJERT64OZi2sHCbi{padding-top:8px}.LUZuAtOgmXbneOoxnP8P{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:#fff;position:relative;-webkit-margin-end:8px;margin-inline-end:8px}.LUZuAtOgmXbneOoxnP8P,.dIOLAcD26GH01pNjZHBL{display:-webkit-box;display:-ms-flexbox;display:flex}.dIOLAcD26GH01pNjZHBL{gap:8px}.r4ZTDlEunjDS3sz3L2zK{position:absolute;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-height:288px;width:304px;z-index:10;-webkit-margin-before:8px;background-color:#282828;color:#fff;inset-block-start:100%;inset-inline-start:0;margin-block-start:8px}.Tro85cCjPA7ZHyzR1zAE,.r4ZTDlEunjDS3sz3L2zK{border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex}.Tro85cCjPA7ZHyzR1zAE{-webkit-box-flex:0;-ms-flex:none;flex:none;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:hsla(0,0%,100%,.1);border:1px solid hsla(0,0%,100%,.3);height:32px;margin:12px;padding-inline:8px}.ha09EFavr4tw3Rcf14Wt{background-color:transparent;border:0;color:#fff;display:block;font-weight:300;padding-inline:8px;width:100%}.ha09EFavr4tw3Rcf14Wt::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.e7m85731K8PcdAPpY0_T{background-color:transparent;border:none;line-height:.5em;pointer-events:auto}.IFRpxU2fT2MFYfqhTXIg{padding:12px;-webkit-padding-before:0;padding-block-start:0}.ihYHUpb9FuqRKkywvHIQ{overflow-y:scroll}.q9rlL6VTsRm59YxuIceC{background:none;border:none;color:#fff;cursor:pointer;display:block;height:38px;line-height:38px;margin:0;padding:0 12px;text-align:start;width:100%}.q9rlL6VTsRm59YxuIceC:focus,.q9rlL6VTsRm59YxuIceC:hover{background:hsla(0,0%,100%,.05)}.tXNcvSNL8Kx6wKUOej2I{background:none;border:none;color:#fff;cursor:pointer;display:block;height:38px;line-height:38px;margin:0 0 12px;padding:0 12px;text-align:start;width:100%}.tXNcvSNL8Kx6wKUOej2I:focus,.tXNcvSNL8Kx6wKUOej2I:hover{background:hsla(0,0%,100%,.05)}.XZ1RzeF1kz6ch8idhAAD{word-wrap:break-word}.GQeQjsi5dPF4PFO7BzvL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.Hj5kpRfIocJic5jcxsW_{margin-bottom:24px}.aJduGcVsoCwJvV1jVqjl{background:var(--background-highlight);border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:8px;padding:12px 16px}.aJduGcVsoCwJvV1jVqjl div:nth-child(2){-webkit-box-flex:1;-ms-flex:auto;flex:auto}@-webkit-keyframes shimmer{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes shimmer{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.g8vV54lx3mRkeseb5Bf2{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:24px}.jbcMEstnj9EEGk0iasdD{border-radius:16px;display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:16px}.re4Rxq0ZHW6zcqniEgMv{background-color:var(--mainColor);color:var(--textColor,#000)}.re4Rxq0ZHW6zcqniEgMv .Bf8_3eE_YXxwPiD6KXPY{background-color:rgba(0,0,0,.1)}.re4Rxq0ZHW6zcqniEgMv .RPo65cLEoLdTEkTummvb{border:3px solid var(--mainColor)}.re4Rxq0ZHW6zcqniEgMv .xBNLwmb6ERaaRsCIo9dg{color:var(--textColor,#000);opacity:.1}.re4Rxq0ZHW6zcqniEgMv .rPWE_GaRZjZZUMr7G8JR{color:var(--textColor,#000)}.KM8BFaw7LbvBIcLnf2BX{background-color:var(--background-base)}.KM8BFaw7LbvBIcLnf2BX .Bf8_3eE_YXxwPiD6KXPY{background-color:var(--mainColor);color:#000}.KM8BFaw7LbvBIcLnf2BX .RPo65cLEoLdTEkTummvb{border:3px solid var(--background-base)}.KM8BFaw7LbvBIcLnf2BX .xBNLwmb6ERaaRsCIo9dg{color:var(--mainColor);opacity:.25}.KM8BFaw7LbvBIcLnf2BX .rPWE_GaRZjZZUMr7G8JR{color:#000}.h_or55__Gfm37Hj0BII9{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.g85DlcND8Z02L7beYR4w,.h_or55__Gfm37Hj0BII9{display:-webkit-box;display:-ms-flexbox;display:flex}.g85DlcND8Z02L7beYR4w{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.aCCWdrptC6K5jwPdCFzA{display:-webkit-box;display:-ms-flexbox;display:flex}.Bf8_3eE_YXxwPiD6KXPY{padding:4px 8px;position:relative} .Bf8_3eE_YXxwPiD6KXPY{-webkit-transform:skewX(-15deg);transform:skewX(-15deg)}.UmbVZN08wsxnijDwCiqw{display:block;font-style:italic;text-align:center} .UmbVZN08wsxnijDwCiqw{-webkit-transform:skewX(15deg);transform:skewX(15deg)}.kdHZ5dN96_2WQdSVE0Fn{opacity:.5}.JqfIX63RXBFalKDdgoxp{height:72px;position:relative}.RPo65cLEoLdTEkTummvb{margin-right:36px;position:relative;z-index:1}.gMIIMHORo2F6KINUrks9{bottom:3px;height:48px;position:absolute;right:0;width:48px;z-index:0}.ZnwwywxlQDxc9vmvPfVJ{height:48px;position:relative;width:48px}.nu4wp680TqinUAntKWgh{inset:0;margin:auto;position:absolute}.IwTsJ2mPD2SedRZsd8Ug{display:block}.RsojTMSCnZ_n6sJlvmFY{max-height:100%;max-width:80%}.tAdvjJEctimN9bSKFEEs{background:var(--background-base);border-radius:4px;max-width:100%;overflow:hidden;padding:0 0 24px;position:relative;width:430px}.Kh8seY4CCWJ_lF2HULcR{background-color:var(--mainColor);color:var(--textColor,#000)} .Kh8seY4CCWJ_lF2HULcR{padding-right:24px}.zoExFlFK7NJZxx9sZmYE{position:absolute;top:12px} .zoExFlFK7NJZxx9sZmYE{right:8px}.dsRW73mDQaMgshOkTP1R{position:absolute;top:12px} .dsRW73mDQaMgshOkTP1R{left:8px}._AGAd8ZZIa10TY8HriYh{padding-top:0}.plBJu8NZSrHwWub7JZiR{padding-top:40px}.iGaY0QRLiJX3cwefmyJY{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 16px 16px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px}.S4W5QhATentoPoZzHgU6{max-height:350px;overflow:auto;padding:16px 24px}.KL44GxqNPj8XNymvOAom{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.T4X1Pr5DXjcTNQzLa0_C{background-color:var(--background-elevated-base);border:1px dashed #fff;border-radius:5px;margin-bottom:8px} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4168.js b/dot-config/spicetify/Extracted/Raw/xpui/4168.js new file mode 100755 index 00000000..55036325 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4168.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4168],{72954:(e,t,a)=>{a.d(t,{w:()=>m});var s=a(30758),r=a(97500),i=a.n(r),n=a(62955),l=a(31417),o=a(881),c=a(9547);const d="pvGZ831aNzHTQMZ8CA_u";var u=a(86070);const m=(0,s.memo)((function({onClick:e=(()=>{}),size:t,className:a,uri:r,sharingInfo:m,interactionData:h,ariaLabel:g=l.Ru.get("mwp.list.item.share"),condensedAll:p,placement:x,semanticColor:j,disableTooltip:f}){const{onCopyLink:y}=(0,c.L)({sharingInfo:m,uri:r,interactionData:h}),v=(0,s.useCallback)((()=>{y(),e()}),[e,y]);return(0,u.jsx)(o.a,{ariaLabel:g,size:t,onClick:v,className:i()(d,a),icon:n.C,condensedAll:p,placement:x,condensed:!0,semanticColor:j,disableTooltip:f})}))},44234:(e,t,a)=>{a.d(t,{Z:()=>n});var s=a(30758),r=a(55760),i=a(86070);const n=(0,s.memo)((function({children:e}){return(0,i.jsx)("span",{className:r.A.detailsText,children:e})}))},86236:(e,t,a)=>{a.d(t,{W:()=>l});var s=a(30758),r=a(74159),i=a(31417),n=a(86070);const l=(0,s.memo)((function({isFollowing:e,onClick:t,disabled:a=!1,buttonText:s,size:l="small",className:o}){const c=e?i.Ru.get("following"):i.Ru.get("follow");return(0,n.jsx)(r.n,{onClick:t,disabled:a,size:l,className:o,children:s||c})}))},6556:(e,t,a)=>{a.d(t,{M:()=>u});var s=a(97500),r=a.n(s),i=a(37289),n=a(95530);const l="artist-artistVerifiedBadge-wrapper",o="artist-artistVerifiedBadge-badge",c="artist-artistVerifiedBadge-fillColor";var d=a(86070);const u=({text:e,iconSize:t="medium",className:a})=>(0,d.jsxs)("span",{className:r()(l,a),children:[(0,d.jsx)("div",{className:`${o} ${c}`}),(0,d.jsx)(i.O,{semanticColor:"textAnnouncement",className:o,size:t}),e?(0,d.jsx)(n.E,{variant:"bodySmall",children:e}):null]})},36685:(e,t,a)=>{a.d(t,{H4:()=>s});a(30758),a(97500),a(31417),a(99701),a(35352);a(86070);let s=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({})},61335:(e,t,a)=>{a.d(t,{y:()=>H});var s=a(30758),r=a(7315),i=a(95530),n=a(89315),l=a(31417),o=a(41616),c=a(97500),d=a.n(c),u=a(8725),m=a(81670),h=a(22984),g=a(42878);const p="od_kF1rLZbir8kM_F607",x="qyKJPLjz8o4jnbk92JOn",j="zsVdTdACMZA_MWB3HlEW",f="nsakAYOtgZOAcEO4ObrM",y="uJjmxe0T11dUVeW6Biz8",v="F1K3uW1jqwG0wxFHO5gl",b="Ii9XdJaXIuKbmR1zC4Rt";var C=a(86070);const N=s.memo((function(e){const{images:t,initialSelected:a=0}=e,[r,i]=(0,s.useState)(a),[n,o]=(0,s.useState)(0),c=(0,s.useRef)(null);return(0,s.useEffect)((()=>{const e=c.current;e&&o(e.clientWidth)}),[]),(0,g.s)((()=>{const e=c.current;e&&o(e.clientWidth)})),0===t.length?null:(0,C.jsxs)("div",{className:p,children:[t.length>1&&(0,C.jsxs)(C.Fragment,{children:[0!==r&&(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("gallery.prev"),onClick:()=>i(r-1),className:d()(x,j),children:(0,C.jsx)(u.g,{})}),r!==t.length-1&&(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("gallery.next"),onClick:()=>i(r+1),className:d()(x,f),children:(0,C.jsx)(m.V,{})})]}),(0,C.jsx)("ul",{className:y,ref:c,dir:"auto",children:t.map(((e,t)=>(0,C.jsx)("li",{"aria-hidden":r!==t,className:v,style:{transform:`translateX(-${r*n}px)`},children:(0,C.jsx)(h._,{loading:"lazy",src:e.url,width:e.width,height:e.height,className:b})},t)))})]})}));var R=a(44971),k=a(21082),A=a(90696),I=a(75375),S=a(78479),_=a(80759),w=a(83513),T=a(70257),E=a(19862),U=a(16157);const P="DVWIV41y6daOMjQKR8Zj",L="oORVTPvg6eTQflVKKgw8",D="muHL0_3HjlqTZDoapgc9";function B(e){switch(e){case U.EK.Facebook:return(0,C.jsx)(I.G,{className:L});case U.EK.Twitter:return(0,C.jsx)(S.f,{className:L});case U.EK.Instagram:return(0,C.jsx)(_.Y,{className:L});case U.EK.Wikipedia:return(0,C.jsx)(E.p,{className:L});case U.EK.Soundbetter:return(0,C.jsx)(w.S,{className:L});case U.EK.Whatsapp:return(0,C.jsx)(T.E,{className:L});case U.EK.Other:default:return null}}function M(e){if(e.name===U.EK.Soundbetter){const t=new URL(e.url);return t.searchParams.append("utm_source","open.spotify.com"),t.searchParams.append("utm_medium","referral"),t.searchParams.append("utm_campaign","hireme_link_spotify"),t.href}return e.url}function F(e){switch(e){case U.EK.Facebook:return"Facebook";case U.EK.Twitter:return"Twitter";case U.EK.Instagram:return"Instagram";case U.EK.Wikipedia:return"Wikipedia";case U.EK.Soundbetter:return"Hire Me on SoundBetter";case U.EK.Whatsapp:return"WhatsApp Channel";case U.EK.Other:default:return"Other"}}const V=({links:e})=>0===e.length?null:(0,C.jsx)("div",{className:P,children:e.map((e=>(0,C.jsxs)("a",{rel:"noopener noreferrer",target:"_blank",href:M(e),className:D,children:[B(e.name),(0,C.jsx)(i.E,{variant:"bodySmall",children:F(e.name)})]},e.url)))});var O=a(41661),q=a(50671),z=a(21549),G=a(17802);const H=s.memo((function(e){const{artistUri:t,name:a,bio:c="",bioSource:d=null,images:u=[],avatarImages:m=[],worldRank:h,monthlyListeners:g,topCities:p,followers:x,externalLinks:j=[],isOpen:f,closeModal:y}=e,{spec:v}=(0,z.r)(n._,{data:{identifier:"",uri:t}}),b=(0,s.useCallback)((()=>{v.closeButtonFactory().hitUiHide(),y()}),[y,v]),I=(0,q.t)(v);return(0,C.jsxs)(R.A,{contentLabel:a,className:G.A.modal,isOpen:f,onRequestClose:b,animation:{modal:{base:G.A.modalBase,afterOpen:G.A.modalAfterOpen,beforeClose:G.A.modalBeforeClose}},animated:!0,children:[(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("close"),onClick:b,className:G.A.close,children:(0,C.jsx)(r.M,{size:"small"})}),(0,C.jsxs)(A.a,{className:G.A.scrollbars,children:[(0,C.jsx)(N,{images:u}),(0,C.jsx)("div",{className:G.A.content,ref:I,children:(0,C.jsxs)("div",{className:G.A.columnContainer,children:[(0,C.jsxs)("div",{className:G.A.statsContainer,children:[h>0?(0,C.jsxs)("div",{className:G.A.rank,children:[(0,C.jsxs)(i.E,{as:"div",variant:"titleSmall",children:["#",h]}),(0,C.jsx)(i.E,{as:"div",variant:"marginal",children:l.Ru.get("artist-page.world_rank")})]}):null,"number"==typeof x?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(i.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:l.Ru.formatNumber(x)}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("followers")})]}):null,"number"==typeof g?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(i.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:l.Ru.formatNumber(g)}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("monthly_listeners")})]}):null,p&&p.length?p.map((({city:e,numberOfListeners:t,country:a},s)=>(0,C.jsxs)("div",{className:G.A.cityBlock,children:[(0,C.jsx)(i.E,{as:"div",variant:"bodySmallBold",semanticColor:"textBase",children:l.Ru.get("artist-page.where-people-listen-from",e||"",a||"")}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("artist-page.how-many-listeners",t||0)})]},s))):null,(0,C.jsx)(s.Suspense,{fallback:null,children:(0,C.jsx)(V,{links:j})})]}),(0,C.jsx)("div",{className:G.A.bioContainer,children:c?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i.E,{as:"div",variant:"bodyMedium",className:G.A.bio,dir:"auto",children:(0,C.jsx)(O.y,{source:c,LinkComponent:k.N,onLinkClick:b})}),d===U.B3.Autobiography&&(0,C.jsxs)("div",{className:G.A.postedBy,children:[(0,C.jsx)(o.e,{images:m,label:a,width:32,userIconSize:"small",className:G.A.postedByAvatar}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("acq.artist.about.attribution",{artist:a})})]})]}):null})]})})]})]})}))},20836:(e,t,a)=>{a.d(t,{I:()=>j});var s=a(30758),r=a(97500),i=a.n(r),n=a(95530),l=a(22726),o=a(21082),c=a(54926),d=a(73812),u=a(33329),m=a(50671),h=a(90497),g=a(86070);function p(e){return e.name?e.name:""}const x=({children:e,uri:t,condensed:a,spec:r,index:n})=>{const c=(0,u.s)(),d=(0,l.o_h)(t),p=null!==d&&(0,l.lyd)(d)?d.id:"",x=(0,s.useMemo)((()=>r.tourElementFactory({identifier:p,uri:t,position:n||0,reason:""})),[r,t,p,n]),j=(0,m.t)(x);return(0,g.jsx)(o.N,{to:t,className:i()(h.A.item,{[h.A.condensed]:a}),onClick:()=>{c.logInteraction(x.hitUiNavigate({destination:t}))},ref:j,children:e})},j=s.memo((function({concert:e,spec:t,index:a,condensed:s,elevatedDate:r,titleVariant:l="bodyMediumBold"}){const{venue:o,uri:u}=e,m=(0,c.l4)(e.date.isoString);return(0,g.jsxs)(x,{uri:u,condensed:s,spec:t,index:a,children:[(0,g.jsxs)("time",{className:i()(h.A.date,{[h.A.condensed]:s,[h.A.elevated]:r}),dateTime:(0,c.WB)(m),children:[(0,g.jsx)(n.E,{as:"h5",variant:"bodySmallBold",className:h.A.dateMonth,children:(0,c.tj)(m)}),(0,g.jsx)(n.E,{as:"h1",variant:"titleSmall",className:h.A.dateDay,children:(0,c.Py)(m)})]}),(0,g.jsxs)("div",{className:h.A.info,children:[(0,g.jsx)(n.E,{as:"h3",variant:l,semanticColor:"textBase",className:i()(h.A.title,{[h.A.condensed]:s}),children:o.location?.name}),(0,g.jsx)(n.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:h.A.eventName,children:(0,d.i3)(e)}),(0,g.jsxs)(n.E,{as:"span",semanticColor:"textSubdued",variant:"bodySmall",className:i()(h.A.timeAndVenue,{[h.A.condensed]:s}),children:[(0,g.jsx)("time",{className:h.A.time,children:(0,c.MW)(m)}),p(o)]})]})]})}))},47667:(e,t,a)=>{a.d(t,{b:()=>N});var s=a(30758),r=a(31417),i=a(38682),n=a(550),l=a(39795),o=a(95446),c=a(76633),d=a(6966),u=a(82610),m=a(96614),h=a(4266),g=a(41457),p=a(44672),x=a(20784),j=a(33329),f=a(13719),y=a(63096),v=a(86070);const b=new Set(o.gc),C=new Set([]),N=s.memo((function({nrTracks:e,collectionUri:t,initialItems:a,uri:N,sortable:R=!0,scrollToUri:k,usePlayContextItem:A,outerDomRef:I,spec:S,isCompactMode:_=!1,tagFilter:w}){const T=(0,x.f)(),E=(0,s.useRef)(null),{filter:U}=(0,s.useContext)(l.g),P=(0,s.useRef)((()=>{})),[L,D]=(0,s.useState)([]),{sortState:B,setSortState:M}=(0,s.useContext)(o.cL),F=(0,j.s)(),V=(0,c.w)(),O=(0,s.useCallback)(((e,t)=>{e===h.$.ADDED_AT?M({column:h.$.ADDED_AT,order:B.order===h.H.ASC?h.H.DESC:h.H.ASC}):M((0,i.So)(e,B)),S&&F.logInteraction(S.columnHeaderFactory({identifier:e,position:t||0}).hitSort())}),[F,M,B,S]);(0,s.useEffect)((()=>{E.current&&k&&E.current.scrollToItem({uri:k})}),[k]);const q=(0,s.useCallback)((e=>{const t=e.map((e=>e.uri));P.current(),T.remove({uris:t})}),[T]),z=(0,s.useCallback)(((e,t)=>{P.current=t,e.length>1?D(e):q(e)}),[q]),[,G]=(0,d.z)(),H=(0,s.useCallback)((async(e,t)=>{const a=await T.getTracks({offset:e,limit:t,uri:N,sort:(0,g.c)(B),filters:[U??null,w??null].filter(f.P)}),s=a?.totalLength??0;return{items:a?.items??[],totalLength:s}}),[U,w,T,B,N]),K=(0,s.useCallback)(((e,a)=>{const s=(0,y.g)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,v.jsx)(u.W,{index:a,contextUri:t,uri:e.uri,isPlayable:e.isPlayable,duration_ms:e.duration.milliseconds,name:e.name,artists:e.artists,albumOrShow:e.album,isExplicit:e.isExplicit,isMixedMedia:!1,isPaywalled:!1,isUserSubscribed:!1,isLocal:e.isLocal,addedBy:[],dateAdded:e.addedAt,hasDecoratedAddedBy:!1,release_date:"",isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:s?.url||"",onMove:()=>{},onInsert:()=>{},usePlayContextItem:A,allowedDropTypes:[],isDisliked:!1,playlistName:r.Ru.get("sidebar.liked_songs"),isOwnedBySelf:!0,isCompactMode:_,hasAssociatedVideo:e.hasAssociatedVideo},a+e.uri)}),[t,A,_]),Z=(0,s.useCallback)((e=>({uri:e.uri,uid:e.uri})),[]);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(p.pZ,{value:"liked-songs-tracklist",children:(0,v.jsx)(m.S4,{ariaLabel:r.Ru.get("sidebar.liked_songs"),hasHeaderRow:!0,columns:V,sortableColumns:T.getCapabilities().canSortTracksAndEpisodes&&R?b:C,sortState:B,onSort:O,renderRow:K,resolveItem:Z,onRemove:z,nrTracks:e,fetchTracks:H,limit:50,canFetchAllTracks:T.getCapabilities().canFetchAllItems,outerRef:E,outerDomRef:I,tracks:a,onNrValidItemsChange:G,isCompactMode:_,columnPersistenceKey:"liked-songs-tracklist"},t)}),(0,v.jsx)(n.F,{title:r.Ru.get("remove_from_your_liked_songs"),isOpen:L.length>0,tracks:L,onClose:e=>{e.stopPropagation(),D([])},onRemove:q})]})}))},56708:(e,t,a)=>{a.d(t,{q:()=>f});var s=a(78876),r=a(31417),i=a(92255),n=a(30758),l=a(75134),o=a(43743),c=a(38996),d=a(41661),u=a(33329),m=a(50671),h=a(86070);const g=({merchId:e,spec:t,uri:a,url:s,images:r,description:i,merchName:g="",testId:p,index:x,merchVariant:j,variant:f})=>{const y=(0,u.s)(),v=(0,n.useMemo)((()=>t.merchCardFactory({identifier:e,uri:a,position:x})),[e,a,t,x]),b=()=>{window.open(s,"_blank");const e=v.hitNavigateToExternalUri({destination:s});y.logInteraction(e)},C=(0,m.t)(v);return(0,h.jsx)("div",{ref:C,children:(0,h.jsx)(l.Z,{variant:f,delegateNavigation:!0,index:x,onClick:b,headerText:g,featureIdentifier:"playlist",requestId:j,uri:a,isPlayable:!1,renderCardImage:()=>(0,h.jsx)(o.M,{images:r}),renderSubHeaderContent:()=>(0,h.jsx)(c.c,{children:i?(0,h.jsx)(d.N,{source:i,onLinkClick:b}):g&&(0,h.jsxs)("span",{children:["Description: ",g]})}),testId:p})})};var p=a(44672),x=a(21549),j=a(83318);const f=({id:e,merchItems:t,merchVariant:a,uri:n})=>{const{spec:l}=(0,x.r)(s.k,{data:{identifier:e,uri:n,position:0,reason:a}});return(0,h.jsx)(p.pZ,{value:"shelf/offers","data-testid":"merch-shelf",children:(0,h.jsx)(i.$,{total:t.length,title:r.Ru.get("web-player.merch.title"),className:j.A.shelfSpace,seeAllLabel:r.Ru.get("web-player.merch.seeAllUri"),children:t.map(((e,t)=>e.url&&e.nameV2?(0,h.jsx)(p.pZ,{value:"card",index:t,children:(0,h.jsx)(g,{index:t,url:e.url,uri:e.uri,merchName:e.nameV2,description:e.description||"",images:e.image?.sources||[],merchVariant:a,merchId:e.uri,spec:l},e.url)},e.url):null))})})}},6444:(e,t,a)=>{a.d(t,{_:()=>d});var s=a(30758),r=a(21743),i=a(97500),n=a.n(i);const l="eqw9lvuoZHrkWMTdyTpY",o="lb08f71wES9AQnKx6e0R";var c=a(86070);const d=(0,s.memo)((function(e){const{triggerOnInitialLoad:t=!1,onReachBottom:a,showScrollbar:i=!0,horizontalScroll:d=!1,className:u}=e,{ref:m,inView:h}=(0,r.Wx)({initialInView:t});return(0,s.useLayoutEffect)((()=>{h&&a&&a()}),[h,a]),(0,c.jsxs)("div",{className:n()({[o]:!i,[l]:d},u),"data-testid":"infinite-scroll-list",children:[e.children,(0,c.jsx)("div",{ref:m})]})}))},45620:(e,t,a)=>{a.d(t,{X:()=>n,s:()=>i});var s=a(92654);const r=(0,a(94119).y)((()=>({color:null}))),i=e=>{r.setState({color:e})},n=()=>{const{color:e}=(0,s.Pj)(r);return e}},8213:(e,t,a)=>{a.d(t,{q:()=>l});var s=a(30758),r=a(63123),i=a(45620),n=a(72191);function l(e){(0,s.useLayoutEffect)((()=>{if(!e)return()=>{(0,i.s)(null)};const t=(0,r.r6)((0,n.c)(e,"higherContrast"));return(0,i.s)(t.background.base??null),()=>{(0,i.s)(null)}}),[e])}},64964:(e,t,a)=>{a.r(t),a.d(t,{ArtistOffers:()=>ra,default:()=>Fi});var s=a(30758),r=a(85387),i=a(69707),n=a(22726),l=a(6772),o=a(31417),c=a(90139),d=a(15292),u=a(92202),m=a(92255),h=a(57776),g=a(59147);const p=new h.l("queryArtistAppearsOn","query","9a4bb7a20d6720fe52d7b47bc001cfa91940ddf5e7113761460b4a288d18a4c1",null);var x=a(99553),j=a(86070);const f=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},h={gcTime:15*g.i},(0,g.I)(p,n,h));var n,h;const f="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===f||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-appears-on")});const y=f.profile.name,v=(0,x.Lf)(f.relatedContent.appearsOn.items);return(0,j.jsxs)("div",{className:"contentSpacing",children:[y?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.appearson.seo.title",y)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist.appears-on"),total:v.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:v.map(((e,t)=>(0,j.jsx)(c.a,{index:t,...(0,x.UT)(e)},e.uri)))})]})}));var y=a(37491),v=a(97500),b=a.n(v),C=a(95530),N=a(83352),R=a(45664),k=a(53187),A=a(75830),I=a(78516),S=a(21951),_=a(1246),w=a(25493),T=a(73658),E=a(93500),U=a(18449),P=a(21646),L=a(21082),D=a(36685),B=a(35895),M=a(60690),F=a(14909),V=a(87498),O=a(46875),q=a(57292),z=a(16157);const G="NyRhcd1ie8y97gBKhKti";function H(e){switch(e){case z._m.Single:return o.Ru.get("single");case z._m.Ep:return o.Ru.get("ep");case z._m.Compilation:return o.Ru.get("compilation");case z._m.Album:default:return o.Ru.get("album")}}function K({albumType:e,isRestricted:t}){return(0,j.jsxs)(q.q,{children:[t&&(0,j.jsx)(O.u,{className:G,size:"xsmall",semanticColor:"textBase"}),H(e)]})}var Z=a(61147),W=a(27012),J=a(15025),X=a(50674),Y=a(43855),Q=a(24533);const $="artist-artistDiscography-topBar",ee="artist-artistDiscography-topBarScrolled",te="artist-artistDiscography-artistName",ae="artist-artistDiscography-button",se="artist-artistDiscography-active",re="artist-artistDiscography-tracklist",ie="artist-artistDiscography-cardGrid",ne="artist-artistDiscography-headerContainer",le="artist-artistDiscography-firstAlbum",oe="artist-artistDiscography-headerImage",ce="artist-artistDiscography-headerMetadata",de="artist-artistDiscography-headerButtons",ue="artist-artistDiscography-headerTitle",me=s.memo((function({album:e,artistUri:t,usePlayContextPage:a,pageIndex:r,setTopBarContent:i}){const[n,l]=(0,Q.A)(e.uri),{titleRef:c,tracklistRef:d,displayTopBar:u}=(0,J.h)(),{isCompactMode:m}=(0,Z.a)(),h=(0,s.useCallback)((async()=>{try{await l(!n)}catch{}}),[n,l]),{isPlaying:g,togglePlay:p,usePlayContextItem:x}=a({pageURI:e.uri,pageIndex:r}),{draggable:f,onDragStart:y}=(0,W.P)({itemUris:e.uri?[e.uri]:[],dragLabelText:e.name}),v=(0,s.useMemo)((()=>({items:[],totalCount:0})),[]),O=(0,s.useMemo)((()=>{if(u)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(B.D,{size:"medium",onClick:()=>p(),disabled:!e.playability.playable,isPlaying:g,uri:e.uri}),(0,j.jsx)(_.X,{text:e.name,dragUri:e.uri,dragLabel:e.name})]})}),[e.name,e.playability.playable,e.uri,u,g,p]);(0,s.useEffect)((()=>{i(O)}),[i,O]);const q=e?.date,G=(0,V.t)();return(0,j.jsxs)(Y.P,{surface:X.u.ALBUM,uris:[e.uri],children:[(0,j.jsxs)("div",{className:b()(ne,{[le]:0===r}),children:[(0,j.jsx)(w.b,{className:oe,images:e.coverArt?.sources||[],name:e.name,placeholderType:"album",dragUri:e.uri}),(0,j.jsxs)("div",{className:ce,children:[(0,j.jsx)(C.E,{variant:"titleMedium",semanticColor:"textBase",className:ue,draggable:f&&!!e.uri,onDragStart:y,children:(0,j.jsx)(L.N,{to:e.uri,children:e.name})}),(0,j.jsx)("div",{ref:c}),(0,j.jsxs)(T.X,{children:[(0,j.jsx)(K,{albumType:e.type,isRestricted:e.playability.reason===z.$c.CatalogueRestricted}),(0,j.jsx)(P.J,{}),(0,j.jsx)(U.H,{releaseDate:q}),(0,j.jsx)(P.J,{}),(0,j.jsx)(E.G,{totalItems:e.tracks.totalCount,containsTracks:!0})]}),(0,j.jsxs)("div",{className:de,children:[(0,j.jsx)(B.D,{onClick:()=>p(),disabled:!e.playability.playable,isPlaying:g,size:"small",uri:e.uri,version:D.H4.secondary}),(0,j.jsx)(S.e,{children:(0,j.jsx)(N.M,{isAdded:!!n,onClick:h,disabled:!1,size:N.t.sm,condensed:!0})}),(0,j.jsx)(R.f,{uri:e.uri,isFollowing:!!n,onFollow:h,size:R.M.sm,condensed:!0}),(0,j.jsx)(A.b,{menu:(0,j.jsx)(I.h,{uri:e.uri,artistUri:t,sharingInfo:e.sharingInfo}),children:(0,j.jsx)(k.e,{size:k.M.sm,label:o.Ru.get("more.label.context",e.name)})})]})]})]}),(0,j.jsx)("div",{ref:d,className:re,children:(0,j.jsx)(M.a,{columns:G,children:(0,j.jsx)(F.F,{albumName:e.name,nrTracks:e.tracks.totalCount,albumUri:e.uri,discs:v,usePlayContextItem:x,isCompactMode:m})})})]})}));var he=a(51281);const ge=s.memo((function(e){const{usePlayContextPage:t,pageIndex:a}=e,{isPlaying:s,togglePlay:r}=t({pageURI:e.uri,pageIndex:a});return(0,j.jsx)(he.R,{index:a,showType:!0,...e,delegatePlayback:!0,isPlaying:s,onPlay:()=>r()})}));var pe=a(69856),xe=a(21768),je=a(67239),fe=a(2505),ye=a(72750);let ve=function(e){return e.GRID="grid",e.LIST="list",e}({});const be=s.memo((function({artistName:e,artistUri:t,albumType:a,dropDownOptions:r,onTypeChange:i,displayMode:n,onDisplayModeChange:l,topBarContent:o}){const[c,d]=(0,s.useState)(!1),u=(0,s.useCallback)((e=>{const t=e.target.scrollTop;t>0&&!c?d(!0):0===t&&c&&d(!1)}),[c]);return(0,ye.g)(u,{executeOnceOnStart:!0}),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(fe.g,{children:n!==ve.GRID?o:void 0}),(0,j.jsxs)("div",{className:b()($,{[ee]:c}),children:[(0,j.jsx)(C.E,{as:"div",variant:"titleSmall",className:te,children:(0,j.jsx)(L.N,{to:t,children:e})}),(0,j.jsx)(je.g,{options:r,onSelect:i,selected:a}),(0,j.jsx)("button",{type:"button",role:"switch","aria-checked":n===ve.LIST,"aria-label":ve.LIST,className:b()(ae,{[se]:n===ve.LIST}),onClick:()=>l(ve.LIST),children:(0,j.jsx)(pe.N,{size:"small"})}),(0,j.jsx)("button",{type:"button",role:"switch","aria-checked":n===ve.GRID,"aria-label":ve.GRID,className:b()(ae,{[se]:n===ve.GRID}),onClick:()=>l(ve.GRID),children:(0,j.jsx)(xe.D,{size:"small"})})]})]})})),Ce=new h.l("queryArtistDiscographyAlbums","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ne=new h.l("queryArtistDiscographySingles","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Re=new h.l("queryArtistDiscographyCompilations","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),ke=new h.l("queryArtistDiscographyAll","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ae=new h.l("queryArtistDiscographyOverview","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null);var Ie=a(81834);var Se=a(11153),_e=a(6444),we=a(62021),Te=a(28340);const Ee=(0,s.memo)((function({uri:e,name:t,dropDownOptions:a,nrAll:i,nrAlbums:l,nrSingles:o,nrCompilations:c,initialDropDownOption:d}){const[u,m]=(0,s.useState)(d),[,h]=(0,s.useState)(0),{pathname:g}=(0,r.zy)(),p=(0,r.Zp)(),[f=ve.LIST,v]=(0,we.x)("discography-page-view-mode",ve.LIST),[b,C]=(0,s.useState)(void 0),N=(0,s.useRef)({all:{items:[],currentOffset:0,totalCount:i},[z._m.Album]:{items:[],currentOffset:0,totalCount:l},[z._m.Single]:{items:[],currentOffset:0,totalCount:o},[z._m.Compilation]:{items:[],currentOffset:0,totalCount:c}}),{requestAlbums:R,requestSingles:k,requestCompilations:A,requestAll:I}=(e=>{const{request:t}=(0,s.useContext)(Ie.j);return{requestAlbums:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Ce,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.albums.items||[])}),[e,t]),requestSingles:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Ne,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.singles.items||[])}),[e,t]),requestCompilations:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Re,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.compilations.items||[])}),[e,t]),requestAll:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(ke,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.all.items||[])}),[e,t])}})(e),S=(0,s.useCallback)((async()=>{let e=R;u.key===z._m.Single&&(e=k),u.key===z._m.Compilation&&(e=A),"all"===u.key&&(e=I);const t=N.current[u.key].totalCount-N.current[u.key].currentOffset,a=await e(N.current[u.key].currentOffset,Math.min(50,t));a.length>0&&(N.current[u.key].items=N.current[u.key].items.concat(a),N.current[u.key].currentOffset+=a.length),h((e=>e+1))}),[u.key,R,I,A,k]),_=(0,s.useCallback)((e=>{const t=a.find((t=>t.key===e));t&&(p(g.replace(/discography.*/,`discography/${t.key.toLowerCase()}`),{replace:!0}),m(t))}),[a,p,g]),{usePlayContextPage:w}=(0,Te.P)({uri:e,pages:N.current[u.key].items.filter((e=>(0,n._Tv)(e.uri))).map((e=>{const t=(0,n.o_h)(e.uri).id;return{uri:e.uri,url:`hm://artistplaycontext/v1/page/spotify/album/${t}/km`}})),metadata:{"disable-autoplay":"true",context_description:t}},{featureIdentifier:"artist"});return(0,j.jsxs)(_e._,{onReachBottom:S,children:[(0,j.jsx)(be,{artistName:t,artistUri:e,topBarContent:b,dropDownOptions:a,albumType:u,onTypeChange:_,displayMode:f,onDisplayModeChange:e=>{v(e)}}),f===ve.LIST?N.current[u.key].items.map(((t,a)=>(0,j.jsx)(me,{album:t,artistUri:e,usePlayContextPage:w,pageIndex:a,setTopBarContent:C},t.uri))):(0,j.jsx)(Se.E,{className:ie,render:()=>N.current[u.key].items.map(((a,s)=>(0,j.jsx)(ge,{...(0,y.m)(a,e,t),usePlayContextPage:w,pageIndex:s,isRestricted:a.playability.reason===z.$c.CatalogueRestricted},a.uri)))})]})})),Ue=(0,s.memo)((function(){const{artistId:e="",albumType:t}=(0,r.g)(),a=(0,x.ay)(e),{loading:s,error:i,data:n}=(l={uri:a},c={gcTime:15*g.i},(0,g.I)(Ae,l,c));var l,c;if(null===n||!n?.artistUnion||"Artist"!==n?.artistUnion.__typename||i||s)return(0,j.jsx)(u.LoadingPage,{hasError:null!==i,errorMessage:o.Ru.get("error.request-artist-discography")});const m=n.artistUnion.profile.name,h=[];n.artistUnion.discography.all.totalCount>0&&h.push({key:"all",value:o.Ru.get("artist-page-discography.all")}),n.artistUnion.discography.albums.totalCount>0&&h.push({key:z._m.Album,value:o.Ru.get("artist.albums")}),n.artistUnion.discography.singles.totalCount>0&&h.push({key:z._m.Single,value:o.Ru.get("artist.singles")}),n.artistUnion.discography.compilations.totalCount>0&&h.push({key:z._m.Compilation,value:o.Ru.get("artist.compilations")});const p=h.find((e=>"all"===e.key&&"all"===t||(e.key===z._m.Album&&t===z._m.Album.toLowerCase()||(e.key===z._m.Single&&t===z._m.Single.toLowerCase()||e.key===z._m.Compilation&&t===z._m.Compilation.toLowerCase()))))||h[0];return(0,j.jsxs)(j.Fragment,{children:[m?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.discography.seo.title",m)}):null,(0,j.jsx)("section",{className:"contentSpacing",children:(0,j.jsx)(Ee,{uri:a,name:m||"",dropDownOptions:h,nrAll:n.artistUnion.discography.all.totalCount,nrAlbums:n.artistUnion.discography.albums.totalCount,nrSingles:n.artistUnion.discography.singles.totalCount,nrCompilations:n.artistUnion.discography.compilations.totalCount,initialDropDownOption:p})})]})}));var Pe=a(80809);const Le=new h.l("queryArtistDiscoveredOn","query","71c2392e4cecf6b48b9ad1311ae08838cbdabcfd189c6bf0c66c2430b8dcfdb1",null),De=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(Le,n,c));var n,c;if(null===i||"Artist"!==i.artistUnion.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-featuring")});const h=i.artistUnion.relatedContent.discoveredOnV2.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.discovered-on")}),(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.discovered-on"),total:h.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:h.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)}))})]})})),Be=new h.l("queryArtistFeaturing","query","20842d6d9d2d28ef945984b68cb927bb33edd00eab84a8da1667def21f1f2c54",null),Me=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},l={gcTime:15*g.i},(0,g.I)(Be,n,l));var n,l;if(null===i||"Artist"!==i?.artistUnion?.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-featuring")});const c=i.artistUnion,{name:h}=c.profile,p=c.relatedContent.featuringV2.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[h?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.featuring.seo.title",h)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.featuring",h),total:p.length,showAll:!0,children:p.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)}))})]})}));var Fe=a(85505),Ve=a(14343),Oe=a(22264),qe=a(10831),ze=a(25408),Ge=a(52731),He=a(33712),Ke=a(8213),Ze=a(41616),We=a(61335),Je=a(41661),Xe=a(33329),Ye=a(17802);const Qe=s.memo((function(e){const{artistUri:t,name:a,bio:r,bioSource:i,images:n=[],avatarImages:l=[],worldRank:c,monthlyListeners:d,topCities:u,followers:m,externalLinks:h=[],showModal:g=!1,className:p="",spec:x}=e,[f,y]=(0,s.useState)(g),v=(0,Xe.s)(),N=(0,s.useCallback)((()=>{const e=x.hitUiReveal();v.logInteraction(e),y(!0)}),[x,v]),R=(0,s.useCallback)((()=>{y(!1)}),[]),k=n.find((e=>(e.width||0)>=(e.height||0))),A=k&&{backgroundImage:`linear-gradient(${Fe.Par} 0%, ${Fe.MYb} 100%), url(${k.url})`};return(0,j.jsxs)("div",{className:p,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ye.A.heading,children:o.Ru.get("artist.about")}),(0,j.jsx)("div",{className:b()(Ye.A.artistGridContainer),children:(0,j.jsxs)("button",{type:"button","aria-label":a,className:b()(Ye.A.container,{[Ye.A.backgroundImage]:A}),onClick:N,style:A,children:[c>0?(0,j.jsxs)("div",{className:Ye.A.rank,children:[(0,j.jsxs)(C.E,{as:"div",variant:"titleSmall",children:["#",c]}),(0,j.jsx)(C.E,{as:"div",variant:"marginal",children:o.Ru.get("artist-page.world_rank")})]}):null,(0,j.jsxs)("div",{className:Ye.A.content,children:[!k&&(0,j.jsx)(Ze.e,{images:l,label:a,width:204,userIconSize:"xxlarge",className:Ye.A.avatar}),"number"==typeof d?(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:o.Ru.get("artist.monthly-listeners-count",d)}):null,r?(0,j.jsx)(C.E,{as:"div",variant:"bodyMedium",className:Ye.A.bio,semanticColor:"textBase",dir:"auto",children:(0,j.jsx)(Je.N,{source:r})}):null]})]})}),(0,j.jsx)(We.y,{avatarImages:l,artistUri:t,name:a,bio:r,bioSource:i,worldRank:c,images:n,topCities:u,followers:m,externalLinks:h,isOpen:f,closeModal:R,monthlyListeners:d})]})}));var $e=a(12662),et=a(88260),tt=a(60038),at=a(38157),st=a(7520),rt=a(86236),it=a(21263),nt=a(70196),lt=a(80989),ot=a(74180),ct=a(18870);const dt=()=>{const e=(0,lt.Jl)("play_button");return(0,j.jsxs)(it.Y,{ref:e,"aria-labelledby":"tooltipTitle tooltipSubtitle",children:[(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",paddingBottom:"tighter-2",id:"tooltipTitle",children:o.Ru.get("web-player.onboarding-new-user.step-play-button")}),(0,j.jsx)(C.E,{variant:"marginal",id:"tooltipSubtitle",children:o.Ru.get("web-player.onboarding-new-user.step-count",ct.c,ct.c)})]})},ut=({children:e})=>{const{shouldStepBeVisible:t}=(0,ot.er)();return(0,j.jsx)(nt.E,{isOnboarding:!0,isVisible:t(ct.B.PLAY_BUTTON),content:(0,j.jsx)(dt,{}),children:e})};var mt=a(65503),ht=a(56994),gt=a(89840),pt=a(99701),xt=a(8506);const jt=(0,s.forwardRef)((function({uri:e,size:t=N.t.md,spec:a},r){const i=(0,Xe.s)(),[n,l]=(0,xt.D)(e),c=n?o.Ru.get("artist.ban-label.unban"):o.Ru.get("artist.ban-label.ban"),d=(0,s.useCallback)((()=>{n?(i.logInteraction(a.unbanArtistButtonFactory().hitRemoveHideArtist({itemNoLongerHidden:e})),l(!1)):l(!0)}),[n,i,l,a,e]);return(0,j.jsx)(pt.Zp,{label:c,children:(0,j.jsx)(mt.H,{onClick:d,iconOnly:n?ht.V:gt.r,size:t,"aria-label":c,ref:r,"data-testid":"ban-button",condensed:!0})})}));var ft=a(86568),yt=a(89849),vt=a(29997),bt=a(29368),Ct=a(20829),Nt=a(83327),Rt=a(21549);const kt=s.memo((function({uri:e,spec:t,logger:a,backgroundColor:r,name:i,sharingInfo:n,isSaved:l}){const[c,d]=(0,Q.A)(e,l),{tryTriggerNextStep:u}=(0,ot.er)(),m=(0,vt.X)(),[h]=(0,xt.D)(e),g=s.useMemo((()=>t.actionBarFactory()),[t]),{togglePlay:p,isActive:x,isPlaying:f}=(0,Te.P)({uri:e},{featureIdentifier:"artist"}),y=s.useCallback((()=>{const t=(0,Ct.$I)({isPlaying:f,isActive:x,spec:g.playButtonFactory(),logger:a,uri:e});p({loggingParams:t})}),[p,x,f,e,g,a]),v=(0,s.useCallback)((()=>{u(ct.B.PLAY_BUTTON),y()}),[u,y]),b=(0,ft.d$)(),{spec:C,logger:N}=(0,Rt.r)($e.e,{data:{uri:e}});(0,s.useEffect)((()=>{b&&N.logImpression(C.impression())}),[b,N,C]);const R=(0,s.useCallback)((async()=>{const s=t.actionBarFactory().followButtonFactory().hitFollow({itemToBeFollowed:e}),r=t.actionBarFactory().followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});a.logInteraction(c?r:s),!c&&b&&N.logInteraction(C.hitFollow({itemToBeFollowed:e}));try{await d(!c)}catch{}}),[e,c,d,t,a,b,N,C]),k=(0,bt.j)();return(0,j.jsx)(et.E,{backgroundColor:r,children:(0,j.jsxs)(tt.S,{children:[!h&&(0,j.jsx)(ut,{children:(0,j.jsx)(B.D,{size:k,onClick:v,isPlaying:f,uri:e})}),m&&!h&&(0,j.jsx)(Nt.r,{spec:g,children:(0,j.jsx)(yt.Y,{entityName:i,contextUri:e,activationPlacement:"bottomEnd",size:k})}),(0,j.jsx)(S.e,{children:h?(0,j.jsx)(jt,{uri:e,name:i,spec:g}):(0,j.jsx)(rt.W,{isFollowing:c,onClick:R})}),(0,j.jsx)(A.b,{menu:(0,j.jsx)(st.t,{uri:e,sharingInfo:n}),children:(0,j.jsx)(at.e,{label:o.Ru.get("more.label.context",i),size:k})})]})})}));var At=a(86228),It=a(44672),St=a(50671),_t=a(35991);const wt="qB6S3KrJlMCx4WS4zOtl",Tt="EmeHQXR87mUskYK6xEde",Et="qELskYs6YdzzafmETrAg",Ut="fnphAtjtCDYY99lYBfLK",Pt="hLi0oogSdDKAIC_rnfP1",Lt="xN866HUyMGAaemLBKQQx",Dt="cWcQITygrzZTduXuXope",Bt="BpBrwbAwIMryupCOXJzw",Mt="FOgY6uo_Bj_VTV5hwaix",Ft="PHHrto0Qhh4dJcnnPhwu",Vt="dIlzffEKwokwWI5sqYJN",Ot="SMBqsyNXIMb0yeYVwPxv",qt="yT49w5mDxTaLK9lL59Gd",zt="D6IunHuzuULf_Sr88GOA",Gt="b_dSllo9kearPhsw_MSp",Ht="ZkkYlSbVnEhF1urK3rKO";function Kt(e){const t=e[0];return!(!t||!("releases"in t))}const Zt=({artistId:e,artistUri:t,artistName:a,discography:r,shelfIndex:i,spec:n})=>{const[l,c]=(0,s.useState)("popularReleasesAlbums"),d=(0,s.useMemo)((()=>n.discographyShelfFactory({position:i})),[n,i]),u=(0,Xe.s)(),h=(0,s.useMemo)((()=>[r.popularReleasesAlbums.totalCount>0?"popularReleasesAlbums":null,r.singles.totalCount>0?"singles":null,r.albums.totalCount>0?"albums":null,r.compilations.totalCount>0?"compilations":null].filter(Boolean)),[r]),g=(0,s.useCallback)((e=>{const t=d.chipsFactory().chipFactory({identifier:e,position:h.indexOf(e)}).hitFilter();u.logInteraction(t),c(e)}),[d,h,u]),p=(0,s.useCallback)((()=>(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:b()(wt),children:[r.popularReleasesAlbums.totalCount>0&&(0,j.jsx)(At.v,{selected:"popularReleasesAlbums"===l,onClick:()=>g("popularReleasesAlbums"),selectedColorSet:"invertedLight",children:o.Ru.get("artist-page.popular")}),r.albums.totalCount>0&&(0,j.jsx)(At.v,{selected:"albums"===l,onClick:()=>g("albums"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.albums")}),r.singles.totalCount>0&&(0,j.jsx)(At.v,{selected:"singles"===l,onClick:()=>g("singles"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.singles")}),r.compilations.totalCount>0&&(0,j.jsx)(At.v,{selected:"compilations"===l,onClick:()=>g("compilations"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.compilations")})]})})),[r,l,g]);let x=r[l];"popularReleasesAlbums"===l&&r.latest&&(x={...r[l],items:[r.latest,...r[l].items.filter((e=>e.uri!==r.latest?.uri))]});let f="all";"albums"===l?f=z._m.Album.toLowerCase():"singles"===l?f=z._m.Single.toLowerCase():"compilations"===l&&(f=z._m.Compilation.toLowerCase());const v=`${(0,_t.Dh)(e)}:discography:${f}`,C=(0,s.useCallback)((()=>{const e=d.shelfHeaderFactory().titleFactory().hitUiNavigate({destination:v??""});u.logInteraction(e)}),[u,v,d]),N=(0,s.useCallback)((()=>{const e=d.shelfHeaderFactory().seeAllButtonFactory().hitUiNavigate({destination:v??""});u.logInteraction(e)}),[u,v,d]),R=(0,St.t)(d),k=x.items;return(0,j.jsx)(It.pZ,{value:"shelf/discography",children:(0,j.jsx)(m.$,{total:x.totalCount,title:o.Ru.get("artist-page.discography"),seeAllUri:v,alwaysShowSeeAll:!0,className:Pt,renderSubHeader:p,onClickShelfTitle:C,onClickShelfSeeAll:N,elementRef:R,children:(Kt(k)?(0,_t.Ey)(k):k).map(((e,s)=>(0,j.jsx)(It.pZ,{value:"card",index:s,children:(0,j.jsx)(he.R,{latest:e.uri===r.latest?.uri,showType:!0,...(0,y.m)(e,t,a),index:s,isRestricted:e.playability.reason===z.$c.CatalogueRestricted})},e.uri)))})})};var Wt=a(78876),Jt=a(96250),Xt=a(22984);const Yt="RClL7GUhUo_xqzNcsXSG",Qt="EQaztpbGtXeN7V1cjAP4",$t="tYSzgx8hG37WjBDn364n",ea="_4XNZPDdnyq1HHKG5Qtx",ta="DehN40s8150pzqyBfGN_",aa="ZiRNxR2_6cTTMHIqpwzl",sa=({offer:e,index:t,spec:a,titleVariant:r})=>{const{nameV2:i,uri:n,description:l,image:o,url:c}=e,d=(0,Xe.s)(),u=(0,s.useMemo)((()=>a.merchCardFactory({identifier:n,uri:c||"",position:t})),[c,n,a,t]),m=(0,St.t)(u);if(!i||!c)return null;const h=e=>{e?.stopPropagation();const t=u.hitNavigateToExternalUri({destination:c});d.logInteraction(t)};return(0,j.jsxs)("div",{className:Yt,ref:m,onClick:()=>{h(),window.open(c,"_blank")},children:[o?.sources?.[0]?.url&&(0,j.jsx)(Xt._,{src:o.sources[0].url,className:Qt,alt:i,width:"48",height:"48",loading:"lazy"}),(0,j.jsxs)("div",{className:$t,children:[(0,j.jsx)(pt.Zp,{label:i,showDelay:pt.uF,children:(0,j.jsx)(C.E,{as:"a",href:c,target:"_blank",onClick:h,variant:r,semanticColor:"textBase",className:ea,"data-testid":"offer-name",children:i})}),(0,j.jsx)(pt.Zp,{label:l,showDelay:pt.uF,children:(0,j.jsx)(C.E,{as:"p",variant:"bodySmall",className:ta,children:l})})]}),(0,j.jsx)(Jt.H,{size:"small",className:aa,"aria-hidden":"true"})]})},ra=({items:e,className:t,merchVariant:a,artistId:s="",variant:r="bodyMediumBold"})=>{const{spec:i}=(0,Rt.r)(Wt.k,{data:{identifier:s,uri:(0,_t.ay)(s),position:0,reason:a}});return(0,j.jsx)("ul",{className:t,children:e.map(((e,t)=>(0,j.jsx)("li",{children:(0,j.jsx)(sa,{offer:e,index:t,spec:i,titleVariant:r})},e.uri+t)))})};var ia=a(13155);const na="vQqlnrnZi2f4zrYRQvKW",la="OMowV_mBy8tlBELzbuTi",oa=({prerelease:e,spec:t})=>{const a=e.coverArt[0],r=(0,ia.C)(e.albumType),i=(0,Xe.s)(),n=(0,s.useCallback)((()=>{i.logInteraction(t.albumImageFactory().hitUiNavigate({destination:e.uri}))}),[i,e.uri,t]),l=(0,s.useCallback)((()=>{i.logInteraction(t.albumNameFactory().hitUiNavigate({destination:e.uri}))}),[i,e.uri,t]);return(0,j.jsxs)("div",{className:na,children:[(0,j.jsx)(L.N,{to:e.uri,onClick:n,children:(0,j.jsx)(Xt._,{src:a.url,alt:e.title,width:"88",height:"88",loading:"eager",radius:4})}),(0,j.jsxs)("div",{className:la,children:[(0,j.jsx)(L.N,{to:e.uri,onClick:l,children:(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:e.title})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",children:r})]})]})},ca="GC3MlDrKu2PcuU6ymC1g",da="GLAXysTPuIgv3GRPVlhS",ua="pZag8sthfxTLjP1tsOfV",ma="lkXpBMSmNP9w702sek8V",ha="XlmJIRaVv7a23oYq6lwU",ga="iy5hzmfkdXQ0B2SFZAyj",pa="pJXRyroA6LuPSsKI8MrD",xa="lmvQXQeHS4JcYWGciCt3",ja=({prerelease:e,className:t,spec:a})=>(0,j.jsxs)("div",{className:t,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:ca,children:o.Ru.get("web-player.artist.upcoming-release")}),(0,j.jsx)(oa,{prerelease:e,spec:a})]});var fa=a(65462),ya=a(55760);const va=(0,s.forwardRef)((({children:e},t)=>(0,j.jsx)("div",{ref:t,className:ya.A.adaptiveHeaderContainer,children:e})));var ba=a(95694);const Ca=(0,s.memo)((function(e){const{ariaLabel:t,children:a,className:s,canEdit:r,onClick:i,editTitle:n,onContextMenu:l,onTouchStart:o,onTouchEnd:c,dragUri:d="",dragMimeType:u,dragLabel:m,trackingRef:h,maxLines:g=2}=e,{draggable:p,onDragStart:x}=(0,W.P)({itemUris:[d],itemMimeTypes:u?[u]:[],dragLabelText:m});return(0,j.jsx)("span",{dir:"auto",className:b()(s,ya.A.title),onContextMenu:l,onTouchStart:o,onTouchEnd:c,draggable:p&&!(!d||!m),onDragStart:x,"data-testid":"adaptiveEntityTitle",children:r?(0,j.jsx)("button",{"aria-label":t,className:b()(ya.A.titleButton),onClick:i,title:n,children:(0,j.jsx)("span",{className:ya.A.titleInner,children:(0,j.jsx)(ba.DU,{trackingRef:h,maxLines:g,children:a})})}):(0,j.jsx)(ba.DU,{trackingRef:h,maxLines:g,children:a})})}));var Na=a(25577),Ra=a(44234),ka=a(17843),Aa=a(88711),Ia=a(46110),Sa=a(62986),_a=a(6556),wa=a(84291),Ta=a(98712),Ea=a(51354),Ua=a(43329);const Pa="S9KkAiRE_O9ax0Jv_D1i",La="mrtMgVMfNyaEhMIGFBuR",Da=()=>{const e=(0,Ea.y)();return(0,j.jsx)(_a.M,{text:o.Ru.get("artist.verified"),className:b()({[Pa]:e===Ta.E.SMALL})})},Ba=s.memo((function({uri:e,artist:{name:t,sharingInfo:a,verified:r,monthlyListeners:i,headerImage:{sources:n,extractedColors:l},avatarImage:{sources:c,extractedColors:d}},spec:u}){const m=(0,Xe.s)(),h=(0,s.useMemo)((()=>u.topBarFactory()),[u]),g=(0,St.t)(h),p=(0,s.useMemo)((()=>u.topBarFactory().playButtonFactory()),[u]),x=(0,s.useRef)(null),f=(0,Ve.NC)(Ua.Zy),{togglePlay:y,isActive:v,isPlaying:C}=(0,Te.P)({uri:e},{featureIdentifier:"artist"}),N=s.useCallback((()=>{const t=(0,Ct.$I)({isPlaying:C,isActive:v,spec:p,logger:m,uri:e});y({loggingParams:t})}),[y,C,v,e,p,m]),R={backgroundColor:(0,wa.z)(l?.colorRaw.hex||d?.colorRaw.hex||null)},k=n.length>0;k&&(R.backgroundImages=n);const A=(0,j.jsx)(st.t,{uri:e,sharingInfo:a});return(0,j.jsxs)(Na.z,{...R,className:b()({[La]:f}),children:[(0,j.jsxs)(Ia.h,{ref:g,children:[(0,j.jsx)(B.D,{size:"medium",onClick:N,isPlaying:C,uri:e}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(_.X,{text:t,dragUri:e,dragLabel:t})})]}),f?(0,j.jsxs)(va,{ref:x,children:[k?null:(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(ka.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:w.u.CIRCLE})}),(0,j.jsxs)(Aa.Y,{children:[r&&(0,j.jsx)(Da,{}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(Ca,{trackingRef:x,dragUri:e,dragLabel:t,children:t})}),(0,j.jsx)(Ra.Z,{children:o.Ru.get("artist.monthly-listeners-count",i)})]})]}):(0,j.jsxs)(j.Fragment,{children:[k?null:(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(ka.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:w.u.CIRCLE})}),(0,j.jsxs)(Aa.Y,{children:[r&&(0,j.jsx)(Da,{}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(Sa.mm,{dragUri:e,dragLabel:t,children:t})}),(0,j.jsx)(Ra.Z,{children:o.Ru.get("artist.monthly-listeners-count",i)})]})]})]})}));var Ma=a(65463);const Fa=["AlbumResponseWrapper","ArtistResponseWrapper","PlaylistResponseWrapper","TrackResponseWrapper","EpisodeOrChapterResponseWrapper","PreReleaseResponseWrapper","ConcertResponseWrapper","MerchResponseWrapper"];const Va=["Album","Artist","Playlist","Track","Episode","PreRelease","Concert","Merch"];function Oa(e){return e.type===z.Ho.MusicVideo}function qa(e){return e.type===z.Ho.MusicVideo||(t=e.itemV2,Fa.includes(t.__typename)&&Va.includes(e.itemV2.data.__typename));var t}var za=a(85907),Ga=a(63096);function Ha(e){return Oa(e)&&e.subtitle?e.subtitle:function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":switch(t.type){case z._m.Album:return o.Ru.get("album");case z._m.Single:return o.Ru.get("single");case z._m.Compilation:return o.Ru.get("compilation");case z._m.Ep:return o.Ru.get("ep");default:return o.Ru.get("album")}case"Artist":return o.Ru.get("artist");case"Playlist":return o.Ru.get("playlist");case"Track":return o.Ru.get("song");case"Episode":return o.Ru.get("card.tag.episode");case"PreRelease":switch(t.preReleaseContent?.type){case"ALBUM":return o.Ru.get("web-player.artist.upcoming-release.album");case"EP":return o.Ru.get("web-player.artist.upcoming-release.ep");case"SINGLE":return o.Ru.get("web-player.artist.upcoming-release.single");default:return""}case"Merch":return o.Ru.get("web-player.merch.title");case"Concert":return"";default:return(0,za.d)(t),""}}(e)}function Ka(e){return Oa(e)&&e.title?e.title:function(e){const t=e?.itemV2.data;switch(t.__typename){case"Album":case"Playlist":case"Track":case"Episode":return t.name;case"Merch":return t.nameV2??"";case"Artist":return t.profile.name;case"PreRelease":return t.preReleaseContent?.name??"";case"Concert":return t.title;default:return(0,za.d)(t),""}}(e)}function Za(e){return Oa(e)&&e.thumbnailImage?.data&&"sources"in e.thumbnailImage.data?e.thumbnailImage.data:function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":return t.coverArt;case"Artist":return t.visuals.avatarImage;case"Playlist":return t.images.items[0]??null;case"Track":return t.albumOfTrack?.coverArt??null;case"Episode":{const e=(0,Ga.g)(t.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"PreRelease":{const e=(0,Ga.g)(t.preReleaseContent?.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"Concert":case"Merch":return t.image;default:return(0,za.d)(t),null}}(e)}var Wa=a(1138),Ja=a(94098);const Xa="guUl5dHbF5HJRvwjBxzR",Ya="jyNYgeneJ5inaKhciDjS",Qa="Pnz4fz1OZWV19CVEQJDx",$a="HciFabcIqzhXoDbtwR92",es="PNadLEAqpH87jY11pma4",ts="yWkJ7Ua3DnSTaHxG2qgv",as="By3HGkfBq3fa6bjrhrli",ss="ukV8NB0JGnieUOa0eri5",rs="HGhEGu5V84RXBk6XAPQ6",is="kwzBRpFigKr1EP2d5qle",ns="sCtxvzp3T8umKY86Hfcg",ls=({isTrackPlaying:e})=>e?(0,j.jsx)(Wa.B,{style:{color:"var(--text-base)"},size:"large",width:32}):(0,j.jsx)(Ja.x,{style:{color:"var(--text-base)"},size:"large",width:32}),os=({artistName:e,avatarImages:t,backgroundImageUrl:a,itemImageUrl:s,itemName:r,itemType:i,itemUri:n,comment:l,handleLinkClick:o,handleArtistPickImageClick:c,onDragStart:d,isPlayButtonEnabled:u,isTrackPlaying:m})=>(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("section",{className:Xa,"data-testid":"artist-pick-with-background-container",draggable:!0,onDragStart:d,children:[(0,j.jsx)(Xt._,{className:Ya,src:a,alt:"merch",loading:"eager"}),(0,j.jsx)("div",{className:$a}),(0,j.jsxs)("div",{children:[(0,j.jsxs)("section",{className:b()(is,ss),children:[(0,j.jsx)(Ze.e,{images:t,label:e,width:24,userIconSize:"small",className:rs}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:l??"",children:l})]}),(0,j.jsxs)("section",{className:es,children:[(0,j.jsx)("div",{children:(0,j.jsx)(Xt._,{src:s,className:ts,alt:"",width:"76",height:"76",loading:"eager"})}),(0,j.jsxs)("div",{className:as,children:[(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:n,onClick:o,"data-testid":"artist-pick-link",children:r})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",children:i})]}),u&&(0,j.jsx)("div",{className:ns,children:(0,j.jsx)(ls,{isTrackPlaying:m})})]})]}),(0,j.jsx)("div",{onClick:c,className:Qa})]})});var cs=a(74159),ds=a(17866);const us="JJvGfNiGtduy_XoXPFT1",ms="fYeCAFmjlgTatXRJ2v0b",hs="vJIXF1I7CfyfTyCa9JkP",gs="ZEsebSb1CaZVzuPawZEj",ps="j2wjzbkgYnFp7ey8JIp0",xs="JNLGmI_C2cdhHFxe0oxm",js="O36HCbLOjWcWkAwkNXqJ",fs="GS_6HA9xIobh5dt5VUSY",ys="EIxjItP8eBZ1eAT7c4Aq",vs="H3mjE6AEBDPRuHNKUpRK",bs=s.memo((function(e){const t=(0,Xe.s)(),{avatarImages:a=[],name:r,spec:i,item:n,comment:l}=e,o=n.itemV2.data,c=o.url??"",d=o.nameV2,u=o.price,m=(0,Ga.g)(o.image?.sources,{desiredWidth:640})?.url??"",h=!!l,g=(0,s.useCallback)((()=>{const e=i.artworkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(e),window.open(c,"_blank","noopener")}),[i,t,c]),p=(0,s.useCallback)((e=>{e.stopPropagation();const a=i.linkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(a),window.open(c,"_blank","noopener")}),[i,t,c]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:us,onClick:g,"data-testid":"artist-pick-merch-container",children:[(0,j.jsx)("img",{className:b()(hs),src:m,alt:"merch"}),(0,j.jsx)("div",{className:ms}),(0,j.jsxs)("div",{children:[h&&(0,j.jsxs)("div",{className:b()(vs,fs),children:[(0,j.jsx)(Ze.e,{images:a,label:r,width:24,userIconSize:"small",className:ys}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:l,"data-testid":"merch-artist-pick-comment",children:l})]}),(0,j.jsxs)("div",{className:gs,children:[(0,j.jsx)(C.E,{as:"h1",variant:"titleSmall",className:ps,children:d}),(0,j.jsx)(C.E,{as:"p",variant:"bodySmallBold",className:xs,children:u}),(0,j.jsx)(cs.n,{size:"small",className:js,onClick:p,href:c,component:ds.v,"data-testid":"artist-pick-merch-button-link",children:"Go to item"})]})]})]})})}));var Cs=a(16413),Ns=a(40339),Rs=a(53328),ks=a(8428),As=a(26510),Is=a(68993);const Ss=s.memo((function({avatarImages:e=[],artistName:t,item:a,className:i="",spec:l}){const{isActive:c,panelSend:d}=(0,Ns.AI)(ks.Z.NowPlayingView),u=a.comment,m=function(e){return Oa(e)&&e.uri?e.uri:e.itemV2.data.uri}(a),h=Ka(a),g=Ha(a),p=Za(a),x=p?.sources[0]?.url,f=u||o.Ru.get("acq.artist.about.attribution",{artist:t}),y=a.type===z.Ho.MusicVideo,v=(0,Xe.s)(),N=(0,r.Zp)(),{draggable:R,onDragStart:k}=(0,W.P)({itemUris:[m],dragLabelText:h}),{playPause:A,isPlaying:I}=(0,As.S)({trackUri:m,featureIdentifier:"song_videos",referrerIdentifier:"now_playing_panel"}),S=(0,s.useCallback)((()=>{c||d(Rs.$S.NPV_BUTTON_CLICK),A()}),[c,A,d]),_=(0,s.useCallback)((()=>{const e=(0,n.o_h)(m).toURLPath(!0),t=l.artworkFactory().hitUiNavigate({destination:e});v.logInteraction(t),a.type!==z.Ho.MusicVideo?N(e):S()}),[m,l,v,N,a,S]),w=(0,s.useCallback)((()=>{const e=(0,n.o_h)(m).toURLPath(!0),t=l.linkFactory().hitUiNavigate({destination:e});v.logInteraction(t),a.type!==z.Ho.MusicVideo||S()}),[m,l,v,a.type,S]);const T=function(){if(function(e){return"MerchResponseWrapper"===e.itemV2.__typename&&"Merch"===e.itemV2.data.__typename&&!!e.itemV2.data.url}(a))return(0,j.jsx)(bs,{name:t,item:a,comment:u,avatarImages:e,spec:l});if(function(e){return"ConcertResponseWrapper"===e.itemV2.__typename&&"Concert"===e.itemV2.data.__typename&&!!e.itemV2.data.venue}(a)){const e=a.itemV2.data,s=(0,Ma.N)({data:{identifier:t,uri:m,position:0,reason:"Artist pick: Concert"}});return(0,j.jsx)(Cs.I,{concert:{uri:e.uri,date:e.date,venue:e.venue,title:e.title},spec:s})}try{const s=a.backgroundImageV2?.data;if((0,Is.j)(s,"ImageV2"),s?.sources[0].url)return(0,j.jsx)(os,{avatarImages:e,artistName:t,itemName:h,itemType:g,itemUri:m,itemImageUrl:x??"",comment:f,backgroundImageUrl:s.sources[0].url,handleArtistPickImageClick:_,handleLinkClick:w,onDragStart:k,isPlayButtonEnabled:y,isTrackPlaying:I})}catch(e){}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{onClick:_,className:ua,onDragStart:k,draggable:R,"data-testid":"artist-pick-image-container",children:(0,j.jsx)(Xt._,{src:x,className:ma,alt:"",width:"88",height:"88",radius:4,loading:"eager"})}),(0,j.jsxs)("div",{onDragStart:k,draggable:R,children:[(0,j.jsxs)("div",{className:b()({[ha]:!0,[xa]:!!u}),children:[(0,j.jsx)(Ze.e,{images:e,label:t,width:24,userIconSize:"small",className:ga}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:f,children:f})]}),(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:m,onClick:w,"data-testid":"artist-pick-link",children:Ka(a)})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",className:pa,children:g})]})]})}();return(0,j.jsxs)("div",{className:i,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:ca,children:o.Ru.get("artist-page.artists-pick")}),(0,j.jsx)("div",{className:da,children:T})]})})),_s=s.memo((function(e){const{item:t}=e;return qa(t)?(0,j.jsx)(Ss,{...e,item:t}):null}));var ws=a(28889);const Ts="unaQVpO_antcqfMwSmsh",Es="ECjQBV2evKE5PXHKhXV_",Us="W_VvjqdqWRSlMRjRPkPb",Ps="pUNc2aOeOQANHrhYa1GU",Ls="T_JcGdJujSuj014SZfjl",Ds="RDZ61ETnag1ilfZTkVxe",Bs=e=>{const{uri:t,name:a,nrTracks:i,avatarImages:l=[],className:c="",spec:d}=e,u=(0,Xe.s)(),m=(0,r.Zp)(),h=(0,s.useCallback)((()=>{const e=d.artistFactory().hitUiNavigate({destination:(0,n.o_h)(t).toURLPath(!0)});u.logInteraction(e),m((0,n.o_h)(t).toURLPath(!0))}),[d,t,u,m]),g=(0,s.useCallback)((()=>{const e=d.linkFactory().hitUiNavigate({destination:(0,n.o_h)(t).toURLPath(!0)});u.logInteraction(e)}),[d,u,t]);return(0,j.jsxs)("div",{className:c,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ts,children:o.Ru.get("artist-page.saved-header")}),(0,j.jsxs)("div",{className:Es,children:[(0,j.jsxs)("div",{onClick:h,className:Ps,"data-testid":"saved-tracks-avatar",children:[(0,j.jsx)(Ze.e,{images:l,label:a,width:88,userIconSize:"xxlarge"}),(0,j.jsx)("div",{className:Ls,children:(0,j.jsx)(ws.F,{size:"xsmall",className:Ds})})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:t,onClick:g,"data-testid":"saved-tracks-link",children:o.Ru.get("artist-page.saved-tracks-amount",i)})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",className:Us,children:o.Ru.get("artist-page.saved-by-artist",a)})]})]})]})};var Ms=a(35523),Fs=a(73043),Vs=a(20836),Os=a(90497);const qs=s.memo((function({concerts:e,artistId:t,total:a}){const{spec:r,logger:i}=(0,Rt.r)(Ma.N,{data:{identifier:t,uri:`${(0,_t.Dh)(t)}`,position:0,reason:"Artist Page - On Tour"}}),n=`${(0,_t.Dh)(t)}:concerts`,l=(0,St.t)(r);return(0,j.jsx)(s.Suspense,{fallback:null,children:(0,j.jsxs)("div",{ref:l,children:[(0,j.jsx)(Fs.k,{title:o.Ru.get("concerts_on_tour"),seeAllLabel:o.Ru.get("concerts.view_all_upcoming_concerts_count",a),seeAllUri:n,onClickSeeAll:()=>{const e=r.seeAllButtonFactory({uri:n}).hitUiNavigate({destination:n});i.logInteraction(e)},showSeeAll:!0}),(0,j.jsx)("ul",{className:Os.A.onTourShelfGrid,children:e.slice(0,9).map(((e,t)=>(0,j.jsx)("li",{children:(0,j.jsx)(Vs.I,{concert:e,index:t,spec:r})},e.uri)))})]})})}));var zs=a(91182),Gs=a(56708),Hs=a(38501),Ks=a(33449),Zs=a(66339),Ws=a(98292),Js=a(56970),Xs=a(95651);function Ys(e){return null!=e}const Qs=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,_t.ay)(e),a=(0,Ve.NC)(Hs.DqB),i=(0,Ve.NC)(Hs.LX5),{spec:n,logger:c,UBIFragment:m}=(0,Rt.r)(Oe.a,{data:{identifier:e,uri:t}}),h=s.useMemo((()=>n.headerFactory()),[n]),g=s.useMemo((()=>n.featuredFactory().popularTracksFactory()),[n]),p=s.useMemo((()=>n.offersFactory()),[n]),{loading:f,error:y,data:v}=(0,Ms.A)(t),{data:N,isLoading:R}=(0,Zs.r)(t),k=(0,Ws.d)({offset:0,limit:1,uri:t});if((0,Ke.q)(N),null===v||null===v.artistUnion||"Artist"!==v.artistUnion?.__typename||y||f||R)return(0,j.jsx)(u.LoadingPage,{hasError:null!==y,errorMessage:o.Ru.get("error.request-artist-failure")});const A=v?.artistUnion?.profile.name,I=v.artistUnion,S=I.relatedContent.relatedArtists.items,_=I.sharingInfo,w=I.relatedContent.featuringV2.items,T=(0,_t.Ey)(I.relatedContent.appearsOn.items),E=I.discography.topTracks.items.map((e=>(0,x.fX)(e,t))),U=I.relatedContent.discoveredOnV2.items,{stats:{monthlyListeners:P,followers:L,worldRank:D,topCities:B},preRelease:M,profile:{name:F,verified:V,pinnedItem:O,biography:q,externalLinks:G,playlistsV2:H},visuals:{headerImage:K,avatarImage:Z,gallery:W},goods:{events:J,merch:X},saved:Y}=I,Q=($=M)&&$.releaseDate?.isoString&&$.preReleaseContent?.name&&$.preReleaseContent.coverArt?.sources?0===$.preReleaseContent.coverArt.sources.length?null:{albumType:$.preReleaseContent.type,title:$.preReleaseContent.name,uri:$.uri,releaseDate:new Date($.releaseDate.isoString),coverArt:$.preReleaseContent.coverArt.sources}:null;var $;const ee=k?.totalLength||Q||!!O,te=K?.extractedColors?.colorRaw.hex||Z?.extractedColors?.colorRaw.hex||Fe.l0o,ae="RelatedVideoPage"===I.relatedVideos.__typename?I.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename)):[];return(0,j.jsxs)("div",{className:zt,children:[(0,j.jsx)(d.Q,{children:(0,Js.j2)({artistName:A})}),(0,j.jsxs)(Ks.d,{dynamicColors:N,children:[(0,j.jsx)(Ba,{uri:t,artist:{sharingInfo:_,monthlyListeners:P||0,name:F,verified:V||!1,headerImage:K||{sources:[],extractedColors:null},avatarImage:Z||{sources:[],extractedColors:null}},spec:h}),(0,j.jsxs)("div",{className:Tt,children:[(0,j.jsx)(kt,{uri:t,spec:n,logger:c,backgroundColor:te,name:F,sharingInfo:_,isSaved:Y}),(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)("div",{children:(0,j.jsx)(Se.E,{colGap:l.lT,render:({columnCount:a})=>{const s={"--column-count":a};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:b()(Ut,{[Ft]:a<6||!ee}),style:{...s},children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Gt,children:o.Ru.get("artist.popular-tracks")}),E.length?(0,j.jsx)(m,{spec:g,children:(0,j.jsx)(Ge.z,{uri:t,nrTracks:E.length,initialTracks:E})}):null]}),(0,j.jsx)(zs.c,{artistOrShow:F,uri:t,entityType:zs.p.ARTIST}),ee&&(0,j.jsxs)("div",{className:b()(Dt,{[Bt]:a<6}),style:{...s},children:[Q&&M?(0,j.jsx)(ja,{prerelease:Q,className:Mt,spec:n.featuredFactory().upcomingReleaseFactory()}):null,k?.totalLength?(0,j.jsx)(Bs,{className:Mt,uri:`${(0,_t.Dh)(e)}:saved`,name:F,nrTracks:k.totalLength,avatarImages:Z?.sources,spec:n.featuredFactory().likedSongsFactory()}):null,O?(0,j.jsx)(_s,{avatarImages:Z?.sources,artistName:F,item:O,spec:n.featuredFactory().pickedFactory()}):null]})]})},className:Et})}),(0,j.jsxs)(m,{spec:n,children:[(0,j.jsx)(Zt,{discography:I.discography,artistId:e,artistUri:t,artistName:F,shelfIndex:0,spec:n}),(0,j.jsx)(It.pZ,{value:"shelf/featuring",children:(0,j.jsx)(He.p,{total:w.length,title:o.Ru.get("artist-page.featuring",F),seeAllUri:`${(0,_t.Dh)(e)}:featuring`,className:Pt,index:1,id:"featuring",children:w.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}),J.concerts.items&&J.concerts.items.length>0&&(0,j.jsx)(qs,{artistId:e,total:J.concerts.totalCount,concerts:J.concerts.items}),a===Hs.OlV.VARIANTB&&X.items.length>0&&(0,j.jsx)(m,{spec:p,children:(0,j.jsx)(Gs.q,{id:e,uri:(0,_t.ay)(e),merchItems:X.items,merchVariant:a})}),(0,j.jsx)(It.pZ,{value:"shelf/fans-also-like",children:(0,j.jsx)(He.p,{total:S.length,title:o.Ru.get("artist-page.fansalsolike"),seeAllUri:`${(0,_t.Dh)(e)}:related`,className:Pt,index:2,id:"fans-also-like",children:S.map(((e,t)=>(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(qe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})}),(0,j.jsx)(It.pZ,{value:"shelf/appears-on",children:(0,j.jsx)(He.p,{total:T.length,title:o.Ru.get("artist.appears-on"),seeAllUri:`${(0,_t.Dh)(e)}:appears-on`,className:Pt,index:3,id:"appears-on",children:T.map(((e,t)=>(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(he.R,{index:t,showType:!0,...(0,x.Mz)(e)})},e.uri)))})}),H.items.length?(0,j.jsx)(It.pZ,{value:"shelf/artist-playlists",children:(0,j.jsx)(He.p,{total:H.totalCount,title:o.Ru.get("artist-page.artist-playlists"),seeAllUri:`${(0,_t.Dh)(e)}:playlists`,className:Pt,index:4,id:"artist-playlists",children:H.items.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}):null,(0,j.jsx)(It.pZ,{value:"shelf/discovered-on",children:(0,j.jsx)(He.p,{total:U.length,title:o.Ru.get("artist-page.discovered-on",F),seeAllUri:`${(0,_t.Dh)(e)}:discovered-on`,className:Pt,index:5,id:"discovered-on",children:U.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}),i&&ae.length?(0,j.jsx)(It.pZ,{value:"shelf/related-videos",children:(0,j.jsx)(He.p,{total:"RelatedVideoPage"===I.relatedVideos.__typename?I.relatedVideos.totalCount:0,title:o.Ru.get("music_videos"),seeAllUri:`${(0,_t.Dh)(e)}:related-videos`,className:b()(Pt,Lt),index:6,id:"related-videos",children:ae.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:a}=e.trackOfVideo;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(ze.O,{title:a.name,trackUri:a.uri,artists:a.artists.items,album:a.albumOfTrack,contentRating:a.contentRating,referrerIdentifier:"other",index:t})},e.uri)}))})}):null]}),(0,j.jsx)(Se.E,{render:({columnCount:t})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Qe,{className:Vt,artistUri:I.uri,name:F,avatarImages:Z?.sources.map(Xs.m),bio:q?.text||"",bioSource:q?.type||z.B3.Biography,images:W.items.map((e=>{const t=e.sources.map(Xs.m);return(0,Ga.g)(t,{desiredLabel:"large",desiredSize:600})})).filter(Ys),worldRank:D||0,monthlyListeners:P,topCities:B.items||[],followers:L,externalLinks:G?.items,spec:n.aboutFactory()}),a===Hs.OlV.DEFAULT&&X.items.length?(0,j.jsxs)("div",{className:b()(Ot,{[qt]:t<4}),children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Gt,children:o.Ru.get("artist-page.merch")}),(0,j.jsx)(m,{spec:p,children:(0,j.jsx)(ra,{items:X.items,artistId:e,merchVariant:a})})]}):null]}),colGap:l.lT}),a===Hs.OlV.VARIANTA&&X.items.length>0&&(0,j.jsx)(m,{spec:p,children:(0,j.jsx)("div",{className:Ht,children:(0,j.jsx)(Gs.q,{id:e,uri:(0,_t.ay)(e),merchItems:X.items,merchVariant:a})})})]})]})]})]})})),$s=s.memo((function(){return(0,j.jsx)(s.Suspense,{fallback:null,children:(0,j.jsx)(Qs,{})})})),er=new h.l("queryArtistPlaylists","query","54f7e5a5a2af05b7dc98526df376a46c6b15c05440c8dfdc8f6cecb1a807eca7",null),tr=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i,staleTime:5*g.i},(0,g.I)(er,n,c));var n,c;const h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===h||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-playlists")});const p=h.profile.name,{items:f}=h.profile.playlistsV2,y=(0,x.bj)(f);return(0,j.jsxs)("div",{className:"contentSpacing",children:[p?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.artist-playlists.seo.title",p)}):null,(0,j.jsx)(m.$,{total:y.length,title:o.Ru.get("artist-page.artist-playlists"),showAll:!0,fullPage:!0,rowGap:l.lT,children:y.map(((e,t)=>(0,j.jsx)(Pe.B,{index:t,uri:e.uri,name:e.name,authorName:e.authorName||e.name,description:e.description,images:e.images},e.uri)))})]})})),ar=new h.l("queryArtistRelated","query","3d031d6cb22a2aa7c8d203d49b49df731f58b1e2799cc38d9876d58771aa66f3",null),sr=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(ar,n,c));var n,c;const h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===h||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-related-artists")});const p=h.profile.name,f=h.relatedContent.relatedArtists.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[p?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.fansalsolike.seo.title",p)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.fansalsolike"),total:f.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:f.map(((e,t)=>(0,j.jsx)(qe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]},e.uri)))})]})})),rr=new h.l("queryArtistRelatedVideos","query","eb5bde95cd8cb2aa369d6ec868c008f7e42e5e0cc810188ecc973c6c1b0e73cd",null),ir=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(rr,n,c));var n,c;if(null===i||"Artist"!==i.artistUnion.__typename||"RelatedVideoPage"!==i.artistUnion.relatedVideos.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-related-videos")});const h=i.artistUnion.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename));return(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)(d.Q,{children:o.Ru.get("music_videos")}),(0,j.jsx)(m.$,{title:o.Ru.get("music_videos"),total:i.artistUnion.relatedVideos.totalCount,showAll:!0,fullPage:!0,rowGap:l.lT,children:h.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:a}=e.trackOfVideo;return(0,j.jsx)(ze.O,{title:a.name,trackUri:a.uri,artists:a.artists.items,album:a.albumOfTrack,contentRating:a.contentRating,referrerIdentifier:"other",index:t},t)}))})]})}));var nr=a(62411),lr=a(4266);const or=new h.l("queryArtistMinimal","query","53d3f76582c49ad0a05dc685955f20dc2a5f2209b192e5446e5e4e623ce23a48",null);var cr=a(47667);const dr="VjLekolG5eyfw_9Hhjxv",ur=[lr.$.INDEX,lr.$.TITLE_AND_ARTIST,lr.$.ALBUM,lr.$.ADDED_AT,lr.$.DURATION],mr=({artistUri:e,collectionUri:t})=>{const a=(0,Ws.d)({offset:0,limit:1,uri:e}),{error:r,data:i}=(n={uri:e},(0,g.I)(or,n,l));var n,l;const{usePlayContextItem:c,togglePlay:d,isPlaying:m}=(0,Te.P)({uri:t},{featureIdentifier:"your_library"}),h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;return a&&h&&!r?(0,j.jsxs)("div",{className:b()("contentSpacing",dr),children:[(0,j.jsxs)(fe.g,{children:[(0,j.jsx)(B.D,{size:"medium",onClick:()=>d(),isPlaying:m,uri:t}),(0,j.jsx)(_.X,{text:o.Ru.get("artist-page.liked-songs-by-artist-title",h.profile.name)})]}),a.totalLength>0&&(0,j.jsx)(s.Suspense,{fallback:(0,j.jsx)(u.LoadingPage,{hasError:null!==r,errorMessage:o.Ru.get("error.request-collection-tracks-failure")}),children:(0,j.jsx)(M.a,{columns:ur,children:(0,j.jsx)(cr.b,{nrTracks:a.totalLength,collectionUri:t,uri:e,usePlayContextItem:c,initialItems:[]})})})]}):null},hr=()=>{const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),a=(0,nr.d4)((({session:e})=>e?.user?.id))||null,s=a?(0,n.g1K)(a,e).toURI():null;return a&&s?(0,j.jsx)(mr,{artistUri:t,collectionUri:s}):null};var gr=a(17610),pr=a(62538),xr=a(72954);const jr="EPBWBmUPyLEpl4VJflaL",fr="JFiowuVIURESjJJznyZx",yr="P6CL1uHz_zTqst4gaAXQ",vr="JEd1tp9FdtDLBOCRSVe0",br=e=>{const t=(0,Xe.s)(),a=(0,s.useMemo)((()=>e.spec.promoRowFactory()),[e.spec]),r=(0,St.t)(a);return(0,j.jsxs)("div",{className:jr,ref:r,children:[(0,j.jsx)(C.E,{as:"h2",variant:"bodyMediumBold",className:fr,children:o.Ru.get("concerts.find_more")}),(0,j.jsx)(L.N,{to:"/concerts",className:yr,onClick:()=>{const e=a.hitUiNavigate({destination:"spotify:app:concerts"});t.logInteraction(e)},children:(0,j.jsx)(At.v,{as:"span",selected:!0,children:o.Ru.get("concerts.find_nearby")})}),(0,j.jsx)("img",{className:vr,alt:"",src:"https://i.scdn.co/image/ab676d63000076a07ce4a60e6015185a1c0edf08"})]})};var Cr=a(21113),Nr=a(15558),Rr=a(73812);const kr="y9Olwg6ho6E95Rud3iLs",Ar="pT8jWX5PbLB2Z91Ngl7n",Ir="ynfZz1ilmr8Zg8BgXG_d",Sr="qRS9X9GvnMDoWj6sx0Yo",_r="RqzE7votb8N93rc_jcM1",wr="kc6crrZKKENRmaIMtzIx",Tr="azrW1gfJbgz897iDaITJ",Er="wYMCavuacjad59alV1BF",Ur="U7meWrHbAMHqpiK5oslu",Pr="sdc7g7JVaoD3cGz27yCP",Lr=(0,s.memo)((e=>{const{concerts:t,spec:a,locationName:r}=e,i=(0,Xe.s)(),n=(0,St.t)(a),l=(0,s.useMemo)((()=>a.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[a]),c=r?a.locationEventsFactory({identifier:r}):a.otherEventsFactory(),d=(0,St.t)(l);return 0===t.length?(0,j.jsxs)("div",{className:Ur,children:[(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",ref:n,className:wr,children:r?o.Ru.get("concerts.no_events_description"):o.Ru.get("concerts.no_upcoming_events")}),!r&&(0,j.jsx)(L.N,{to:"/concerts",onClick:()=>{i.logInteraction(l.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,j.jsx)(At.v,{selected:!0,selectedColorSet:"invertedLight",ref:d,children:o.Ru.get("concerts.browse_all_events")})})]}):(0,j.jsx)("div",{ref:n,className:Tr,children:t?.map(((e,t)=>(0,j.jsx)(Cr.A,{date:e.date.isoString,title:e.venue.location?.name??"",uri:e.uri,subTitle:(0,Rr.re)(e.artistsV2.items.map((e=>{return(t=e.data)&&Object.keys(t).includes("profile")?e.data.profile.name:null;var t})).filter(Nr.se)),onClick:()=>{const a=c.eventRowFactory({position:t,uri:e.uri}).hitUiNavigate({destination:e.uri});i.logInteraction(a)}},e.uri)))})}));var Dr=a(18278),Br=a(7834),Mr=a(86677),Fr=a(10887),Vr=a(52999),Or=a(26754);const qr=e=>String(Math.max(e,0)).padStart(2,"0");var zr=a(19870);const Gr="jbcMEstnj9EEGk0iasdD",Hr="re4Rxq0ZHW6zcqniEgMv",Kr="Bf8_3eE_YXxwPiD6KXPY",Zr="RPo65cLEoLdTEkTummvb",Wr="xBNLwmb6ERaaRsCIo9dg",Jr="rPWE_GaRZjZZUMr7G8JR",Xr="KM8BFaw7LbvBIcLnf2BX",Yr="h_or55__Gfm37Hj0BII9",Qr="g85DlcND8Z02L7beYR4w",$r="aCCWdrptC6K5jwPdCFzA",ei="UmbVZN08wsxnijDwCiqw",ti="kdHZ5dN96_2WQdSVE0Fn",ai="JqfIX63RXBFalKDdgoxp",si="gMIIMHORo2F6KINUrks9",ri="ZnwwywxlQDxc9vmvPfVJ",ii="nu4wp680TqinUAntKWgh",ni="IwTsJ2mPD2SedRZsd8Ug",li=e=>{const[t,a]=(0,s.useState)((r=new Date(e.endDate),i=new Date,Math.abs(r.getTime()-i.getTime())));var r,i;(0,zr.$)((e=>{a((t=>{const a=t-1e3;return a<=0?(e(),0):a}))}),1e3);const{hours:n,minutes:l,seconds:c}=(e=>{const t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4),s=Math.floor(e%6e4/1e3);return{hours:qr(t),minutes:qr(a),seconds:qr(s)}})(t);return(0,j.jsxs)("div",{className:b()(Gr,e.isInverted?Xr:Hr),style:{"--mainColor":e.colors.main,"--textColor":e.colors.text},children:[(0,j.jsxs)("div",{className:Yr,children:[(0,j.jsxs)("div",{className:Qr,children:[(0,j.jsx)("div",{className:$r,children:(0,j.jsx)("div",{className:Kr,children:(0,j.jsx)(C.E,{variant:"titleSmall",className:ei,children:o.Ru.get("concerts.fans_first.title")})})}),(0,j.jsx)(C.E,{className:ti,variant:"bodySmallBold",children:o.Ru.get("concerts.fans_first.offer_ends",n,l,c)})]}),(0,j.jsxs)("div",{className:ai,children:[(0,j.jsx)(Fr._,{crop:!0,circle:!0,src:e.artistImage,width:72,height:72,className:Zr}),(0,j.jsx)("div",{className:si,children:(0,j.jsxs)("div",{className:ri,children:[(0,j.jsx)("div",{className:Wr,children:(0,j.jsx)(Vr.K,{size:"xlarge"})}),(0,j.jsx)("div",{className:Jr,children:(0,j.jsx)(Or.T,{className:ii})})]})})]})]}),e.children]})},oi=e=>{const{useLibraryStateFn:t=Q.A}=e,a=(0,s.useMemo)((()=>e.spec?.followButtonFactory()),[e.spec]),r=(0,Xe.s)(),[i,n]=t(e.artistUri.toString(),e.isSaved);return(0,j.jsxs)(li,{endDate:e.endDate,artistUri:e.artistUri,artistImage:e.artistImage,colors:{main:e.colors.main,text:e.colors.text},children:[(0,j.jsx)(C.E,{className:ni,children:i?o.Ru.get("concerts.fans_first.post_follow"):o.Ru.get("concerts.fans_first.not_eligible")}),(0,j.jsx)("div",{children:(0,j.jsx)(Mr.$,{colorSet:"invertedDark",onClick:()=>{if(a){const t=i?a?.hitUnfollow({itemToBeUnfollowed:e.artistUri.toString()}):a?.hitFollow({itemToBeFollowed:e.artistUri.toString()});r.logInteraction(t)}n(!i)},children:i?o.Ru.get("following"):o.Ru.get("follow")})})]})};var ci=a(8725),di=a(7315),ui=a(50111),mi=a(44971),hi=a(19616),gi=a(53133),pi=a(33234);const xi="RsojTMSCnZ_n6sJlvmFY",ji="tAdvjJEctimN9bSKFEEs",fi="Kh8seY4CCWJ_lF2HULcR",yi="zoExFlFK7NJZxx9sZmYE",vi="dsRW73mDQaMgshOkTP1R",bi="_AGAd8ZZIa10TY8HriYh",Ci="plBJu8NZSrHwWub7JZiR",Ni="iGaY0QRLiJX3cwefmyJY",Ri="S4W5QhATentoPoZzHgU6",ki="KL44GxqNPj8XNymvOAom",Ai="T4X1Pr5DXjcTNQzLa0_C",Ii=e=>{const{enqueueSnackbar:t}=(0,gi.d)(),[a,r]=(0,s.useState)(""),[i,n]=(0,s.useState)(e.defaultStep??"event-list");return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("section",{className:ji,children:[(0,j.jsxs)("div",{style:{"--mainColor":"event-list"===i?e.colors.main:"","--textColor":"event-list"===i?e.colors.text:""},children:[(0,j.jsx)("div",{className:b()(fi,"event-list"===i?bi:Ci),children:(0,j.jsx)(li,{artistUri:e.artistUri,artistImage:e.artistImage,endDate:e.endDate,colors:e.colors,isInverted:"code-redemption"===i})}),(0,j.jsxs)("div",{style:"event-list"===i?{"--text-subdued":e.colors.text,"--text-base":e.colors.text}:{},children:["code-redemption"===i&&(0,j.jsx)("div",{className:vi,children:(0,j.jsx)(mt.H,{"aria-label":o.Ru.get("navbar.go-back"),iconOnly:ci.g,size:"small",onClick:()=>{n("event-list"),r("")}})}),(0,j.jsx)("div",{className:yi,children:(0,j.jsx)(mt.H,{"aria-label":o.Ru.get("close"),iconOnly:di.M,size:"small",onClick:e.onClose})})]})]}),"event-list"===i&&(0,j.jsx)("section",{className:Ri,children:e.routes.map((e=>(0,j.jsx)(Cr.A,{onClick:t=>{t.preventDefault(),n("code-redemption"),r(e.externalTicketerUrl)},uri:"",date:e.tourDate,title:e.address,subTitle:""},e.address)))}),"code-redemption"===i&&(0,j.jsxs)("section",{className:Ni,children:[(0,j.jsx)(C.E,{children:o.Ru.get("concerts.fans_first.explanation")}),(0,j.jsx)("div",{className:ki,children:(0,j.jsx)("div",{className:Ai,children:(0,j.jsx)(mt.H,{iconTrailing:ui._,onClick:()=>{(e.copyToClipboard??pi.l)(e.offerCode),t(o.Ru.get("concert.code_copied"))},children:e.offerCode})})}),(0,j.jsx)(Mr.$,{iconTrailing:Jt.H,target:"_blank",href:a,children:o.Ru.get("concerts.fans_first.get_access")})]})]})})},Si=e=>(0,j.jsx)(mi.A,{contentLabel:o.Ru.get("live_events.label"),isOpen:!0,className:xi,onRequestClose:e.onClose,children:(0,j.jsx)(hi.SnackbarProvider,{children:(0,j.jsx)(Ii,{...e})})}),_i=e=>{const[t,a]=(0,s.useState)(!1),r=(0,s.useMemo)((()=>e.spec?.getAccessButtonFactory()),[e.spec]),i=(0,Xe.s)();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(li,{endDate:e.endDate,artistUri:e.artistUri,artistImage:e.artistImage,colors:e.colors,children:[(0,j.jsx)(C.E,{className:ni,children:o.Ru.get("concerts.fans_first.thanks")}),(0,j.jsx)("div",{children:(0,j.jsx)(Mr.$,{colorSet:"invertedDark",onClick:()=>{r&&i.logInteraction(r?.hitUiReveal()),a(!0)},children:o.Ru.get("concerts.fans_first.get_access")})})]}),t&&(0,j.jsx)(Si,{artistUri:e.artistUri,artistImage:e.artistImage,offerCode:e.offerCode,colors:e.colors,endDate:e.endDate,routes:e.routes,onClose:()=>a(!1)})]})},wi=new h.l("fansFirstPresales","query","ee44f67d8cd56a78a0b34fa2fc53bb255cfb30b056640eb3c0d3a85b76ea8b58",null),Ti=e=>{const t=(0,s.useMemo)((()=>e.spec?.presaleOfferCardFactory()),[e.spec]),{data:a}=(r={artistUri:e.artistUri?.toString()??""},(0,g.I)(wi,r,i));var r,i;const[l]=a?.artists??[];if(!(0,Nr.m4)(l))return null;const o=(0,n.o_h)(l.uri);return null!==l.fansFirstGoods.presale&&o?null===l.fansFirstGoods.presale.campaign?(0,j.jsx)(oi,{artistUri:o,isSaved:l.saved,artistImage:l.fansFirstGoods.presale.format.headerImageUrl,colors:{main:l.fansFirstGoods.presale.format.theme?.backgroundColor,text:l.fansFirstGoods.presale.format.theme?.foregroundColor},endDate:l.fansFirstGoods.presale.endDate,spec:t}):(0,j.jsx)(_i,{artistUri:o,artistImage:l.fansFirstGoods.presale.format.headerImageUrl,colors:{main:l.fansFirstGoods.presale.format.theme?.backgroundColor,text:l.fansFirstGoods.presale.format.theme?.foregroundColor},endDate:l.fansFirstGoods.presale.endDate,offerCode:l.fansFirstGoods.presale.campaign.offerCode,routes:l.fansFirstGoods.presale.campaign.routes,spec:t}):null};var Ei=a(10266);const Ui=(0,s.memo)((e=>{const{data:t,locationName:a,onSetLocation:r}=e,i=(0,n.o_h)(t?.uri),l=i?(0,n.ZAw)(i.id):void 0,{spec:c}=(0,Rt.r)(gr.y,{data:{uri:i?.toURI()??"",identifier:i?.id??""}}),u=(0,Xe.s)(),m=(0,St.t)(c),h=(0,Ve.NC)(Ua.F1),g=(0,s.useMemo)((()=>c.headerFactory()),[c]),p=(0,s.useMemo)((()=>c.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[c]),x=(0,St.t)(p),f=e=>{e&&r(e)},y=t?.goods.events.concerts.items.filter((e=>e.nearUser)).filter(Nr.se)??[],v=t?.goods.events.concerts.items.filter((e=>!e.nearUser)).filter(Nr.se)??[];return(0,j.jsxs)("section",{ref:m,className:kr,children:[(0,j.jsx)(d.Q,{children:(0,Ei.gq)(t?.profile.name)}),(0,j.jsxs)(Na.z,{backgroundImages:t?.visuals.headerImage?.sources,children:[(0,j.jsxs)(Aa.Y,{children:[(0,j.jsx)(Ra.Z,{children:(0,j.jsx)(C.E,{as:"h1",children:o.Ru.get("live_events.all_events_tab")})}),(0,j.jsx)(Sa.mm,{children:t?.profile.name})]}),(0,j.jsx)(Ia.h,{children:(0,j.jsx)("div",{children:(0,j.jsx)(_.X,{text:o.Ru.get("artist.concerts.artist_tour_dates",t?.profile.name)})})})]}),(0,j.jsxs)("div",{className:Ar,children:[(0,j.jsx)(pr.K,{backgroundColor:t?.visuals.headerImage?.extractedColors?.colorDark.hex}),(0,j.jsxs)("section",{className:Sr,children:[(0,j.jsx)("div",{className:Pr,children:(0,j.jsx)(Ti,{artistUri:i,spec:c})}),(0,j.jsxs)("section",{className:Ir,children:[(0,j.jsx)(Dr.A,{handleLocationChange:f,locationStr:a,headerSpec:g,dialog:"preferred"}),l&&(0,j.jsx)(xr.w,{uri:l.toURI(),sharingInfo:null,interactionData:{intent:"share",type:"click"},onClick:()=>{return e=l.toURI(),void u.logInteraction(c.headerFactory().shareButtonFactory().hitShare({entityToBeShared:e,shareId:e}));var e}})]}),h&&(0,j.jsx)(Br.k,{onLocationChange:f}),!t?.goods.events.concerts&&(0,j.jsxs)("div",{className:Ur,children:[(0,j.jsx)(C.E,{as:"h2",className:_r,variant:"titleMedium",semanticColor:"textBase",children:o.Ru.get("concerts.no_upcoming_events")}),(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",ref:m,className:wr,children:o.Ru.get("artist.concerts.error.not_found")}),(0,j.jsx)(L.N,{to:"/concerts",onClick:()=>{u.logInteraction(p.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,j.jsx)(At.v,{selected:!0,selectedColorSet:"invertedLight",ref:x,children:o.Ru.get("concerts.browse_all_events")})})]}),!!t?.goods.events.concerts&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("section",{children:[(0,j.jsx)(C.E,{as:"h2",className:b()(_r,{[Er]:!y}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:o.Ru.get("concerts.near_location",a)}),(0,j.jsx)(Lr,{concerts:y,spec:c})]}),(0,j.jsxs)("section",{children:[(0,j.jsx)(C.E,{as:"h2",className:b()(_r,{[Er]:!v}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:o.Ru.get("concerts.header.other")}),(0,j.jsx)(Lr,{concerts:v,spec:c})]})]}),(0,j.jsx)("section",{children:(0,j.jsx)(br,{spec:c})})]})]})]})})),Pi=new h.l("artistConcerts","query","ce78fdb28c5036de6d81bbc45571b62e2201a0c08eb068ab17dd3428396026f5",null),Li=()=>{const{artistId:e=""}=(0,r.g)(),[t,a]=(0,s.useState)(),{data:i,loading:n,invalidate:l}=(c={artistId:`spotify:artist:${e}`},(0,g.I)(Pi,c,d));var c,d;if(n)return(0,j.jsx)(u.LoadingPage,{hasError:!1,errorMessage:""});const m=(h=i?.artistUnion,h&&Object.keys(h).includes("uri")?i?.artistUnion:void 0);var h;return m?(0,j.jsx)(Ui,{data:m,locationName:t?.location||m.goods.events.userLocation?.name||o.Ru.get("concerts.default_location"),onSetLocation:e=>{a(e),l()}}):(0,j.jsx)(u.LoadingPage,{hasError:!0,errorMessage:o.Ru.get("concert.error.concert_not_found_title")})};var Di=a(41715),Bi=a(2983);const Mi=(0,s.memo)((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{search:a}=(0,r.zy)(),s=new URLSearchParams(a).get("pageUri"),l=(0,n.o_h)(s)?s:null;return(0,j.jsx)(Y.P,{surface:X.u.ARTIST,uris:[t],children:(0,j.jsx)("section",{"data-testid":"artist-page","data-test-uri":t,children:(0,j.jsxs)(r.BV,{children:[(0,j.jsx)(r.qh,{path:"discography",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_ALBUMS,children:(0,j.jsx)(Ue,{})})}),(0,j.jsx)(r.qh,{path:"discography/:albumType",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_ALBUMS,children:(0,j.jsx)(Ue,{})})}),(0,j.jsx)(r.qh,{path:"featuring",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_FEATURING,children:(0,j.jsx)(Me,{})})}),(0,j.jsx)(r.qh,{path:"related",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_RELATED,children:(0,j.jsx)(sr,{})})}),(0,j.jsx)(r.qh,{path:"appears-on",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_APPEARS_ON,children:(0,j.jsx)(f,{})})}),(0,j.jsx)(r.qh,{path:"playlists",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_PLAYLISTS,children:(0,j.jsx)(tr,{})})}),(0,j.jsx)(r.qh,{path:"discovered-on",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_DISCOVERED_ON,children:(0,j.jsx)(De,{})})}),(0,j.jsx)(r.qh,{path:"saved",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_SAVED_TRACKS,children:(0,j.jsx)(hr,{})})}),(0,j.jsx)(r.qh,{path:"related-videos",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_RELATED_VIDEOS,children:(0,j.jsx)(ir,{})})}),(0,j.jsx)(r.qh,{path:"/",element:l?(0,j.jsx)(Bi.$,{to:{search:a,pathname:"/artist/:artistId/discography"}}):(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST,children:(0,j.jsx)($s,{})})}),(0,j.jsx)(r.qh,{path:"concerts",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_CONCERTS,children:(0,j.jsx)(Li,{})})})]})})})}));Mi.displayName="ArtistPage";const Fi=Mi},16413:(e,t,a)=>{a.d(t,{I:()=>s.I});var s=a(20836)},41457:(e,t,a)=>{a.d(t,{c:()=>l});var s=a(38682),r=a(13357),i=a(34939);const n={[i.nw.ADDED_AT]:r.Sw.ADDED_AT,[i.nw.ADDED_BY]:null,[i.nw.ALBUM]:r.Sw.ALBUM_NAME,[i.nw.ARTIST]:r.Sw.ARTIST_NAME,[i.nw.DURATION]:null,[i.nw.TITLE]:r.Sw.NAME,[i.nw.SHOW_NAME]:null,[i.nw.PUBLISH_DATE]:null},l=e=>{const t=(0,s.Xt)(e);if(!t)return;const a=n[t.field],r=t.order;return a&&r?{field:a,order:r}:void 0}},19870:(e,t,a)=>{a.d(t,{$:()=>r});var s=a(30758);const r=(e,t)=>{const a=(0,s.useRef)(e);(0,s.useEffect)((()=>{a.current=e}),[e]),(0,s.useEffect)((()=>{let e;function s(){e&&clearInterval(e)}if(null!==t)return e=setInterval((function(){a.current(s)}),t),s}),[t])}},17802:(e,t,a)=>{a.d(t,{A:()=>s});const s={artistOverviewContent:"XtGI24gayCCOR69pcBao",artistOverviewContainer:"AK5MS4kVmpVJSnAPzApZ",popularTracks:"ih3vZ4qqibfclKQ2r3U8",artistShelfSpacer:"vsqOYUmRYepQ7AgGzPDk",artistShelfRelatedVideos:"Uv9uqBNRy4qsyhPSa7lY",artistSides:"YyjwPfOAdb6z73PerGUF",artistSidesBlock:"pAvBQUDkfvkyO47Kw71y",sideBlock:"PPoC4pYtYLuuzjV0RaQF",popularTracksBlock:"V168frZQBWaJ1OdnyyKO",about:"MZkAAYmEs5kAOXrbrBQQ",events:"IR0gsJCJYP1TqjMi6wUt",merch:"hGJN08YEbxIJ2HaEcHee",merchSmall:"GNdKACg7GTgIv75LT6Gv",overview:"FwIG_h9mHxGOTDxFRnWT",heading:"anPfvyDzeqR3CKW4gHUP",merchShelfContent:"ZpAXOWy3RgYX8ywKZZOI",container:"jW4eWdr_LUeOXwPpKhWG",content:"BPDHTIIFueJMvtDPZttw",backgroundImage:"DRXonbAbVN5Vg9anDL1X",bio:"xbKOOJ_NjLijBvdpAudQ",artistGridContainer:"M0yriEHOsE9ET707IXzC",image:"PwMuGFUCeHPjbHDy8M1T",columnContainer:"y_GaLKy76zj71zPYkLrs",bioContainer:"TV2j1oIRIkKH_6D1xP82",statsContainer:"T_AmQPlZ6wvE819I7A0D",stats:"zQy0G59IX5G4Cc9AtWRT",postedBy:"OyLgnahIHw63684ABRBF",postedByAvatar:"KguYS3oppxDrMNpTUJcB",avatar:"O9QEyBUMktZGNPifQqvY",modal:"JnpOnFaQfrRIA2fYe88A",scrollbars:"cacyLqtJhjhr95qRC_R7",close:"pSxFsY9Fgcj5f8Gf05mh",modalBase:"tsFfFt7SCIoA14JawrRf",modalAfterOpen:"_VADS4mdajCt5Yuf6KjW",modalBeforeClose:"TrS5BnDIiLtqz1i1QBVV",rank:"tLjX9htIKD_OCmEX01UN",cityBlock:"NPv26QCDgdnwsPOlYJmQ"}},90497:(e,t,a)=>{a.d(t,{A:()=>s});const s={item:"artist-artistOnTour-item",condensed:"artist-artistOnTour-condensed",date:"artist-artistOnTour-date",elevated:"artist-artistOnTour-elevated",dateMonth:"artist-artistOnTour-dateMonth",dateDay:"artist-artistOnTour-dateDay",info:"artist-artistOnTour-info",title:"artist-artistOnTour-title",time:"artist-artistOnTour-time",timeAndVenue:"artist-artistOnTour-timeAndVenue",seeAll:"main-seeAll-link",timeAndVenueText:"artist-artistOnTour-timeAndVenueText",onTourShelfGrid:"artist-artistOnTour-onTourShelfGrid",metadata:"artist-artistOnTour-metadata",location:"artist-artistOnTour-location",eventName:"artist-artistOnTour-eventName"}},83318:(e,t,a)=>{a.d(t,{A:()=>s});const s={albumMerch:"V1660uk_uXXZAMEmV4D4",shelfSpace:"RbnoPhjDDAtbxN8gAiif"}}}]); +//# sourceMappingURL=4168.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4518.js b/dot-config/spicetify/Extracted/Raw/xpui/4518.js new file mode 100755 index 00000000..c3f141a3 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4518.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4518],{92699:(e,a,l)=>{l.d(a,{x:()=>m});var t=l(40638),s=l(86677),n=l(14237),o=l(99293),r=l(31417),c=l(99701),i=l(35352),u=l(87182),d=l(58685),b=l(41434),p=l(86070);const m=({iconSize:e="small",onClick:a,className:l,showDelayOnHover:m})=>{const k=(0,u.z)(),{hasContext:g,isPaused:h,canPause:y,canResume:v}=(0,d.o)((e=>({hasContext:e?.hasContext,isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),b.a),x=(0,t.YQ)((e=>{h&&v?(a?.("resume"),k.resume(),(0,i.aX)(e,"play/resume")):!h&&y&&(a?.("pause"),k.pause())}),100,{leading:!0,trailing:!1}),f=h?r.Ru.get("playback-control.play"):r.Ru.get("playback-control.pause"),w=!g||(h?!v:!y);return(0,p.jsx)(c.Zp,{label:f,showDelay:m,children:(0,p.jsx)(s.$,{iconOnly:h?n.A:o._,className:l,size:{small:"small",medium:"medium",large:"large"}[e]||"small",disabled:w,"aria-label":f,"data-testid":"control-button-playpause",onClick:x,colorSet:"invertedLight"})})}},85601:(e,a,l)=>{l.d(a,{s:()=>h});var t=l(97500),s=l.n(t),n=l(65503),o=l(50733),r=l(1574),c=l(31417),i=l(99701),u=l(36958),d=l(58685),b=l(25357);const p="vW9NFcNIj8useE43Vx9G";var m=l(86070);function k(e,a,l){return a&&l?(e+1)%3:a?(e+1)%2:l?1===e?2:(e+2)%4:b.p.REPEAT_NONE}const g={[b.p.REPEAT_NONE]:{get label(){return c.Ru.get("playback-control.disable-repeat")},intent:"repeat-off",ariaChecked:"false"},[b.p.REPEAT_CONTEXT]:{get label(){return c.Ru.get("playback-control.enable-repeat")},intent:"repeat-all",ariaChecked:"true"},[b.p.REPEAT_TRACK]:{get label(){return c.Ru.get("playback-control.enable-repeat-one")},intent:"repeat-single",ariaChecked:"mixed"}},h=({onClick:e,className:a,showDelayOnHover:l})=>{const{setRepeat:t,repeat:c}=(0,u.V)(),[h,y]=(0,d.o)((e=>[e?.restrictions.canToggleRepeatContext??!1,e?.restrictions.canToggleRepeatTrack??!1])),v=!h&&!y,x=g[k(c,h,y)].label,f=c!==b.p.REPEAT_NONE;return(0,m.jsx)(i.Zp,{label:x,showDelay:l,children:(0,m.jsx)(n.H,{className:s()({[p]:f},a),iconOnly:c===b.p.REPEAT_TRACK?o.I:r.B,size:"small",disabled:v,"aria-label":x,"data-testid":"control-button-repeat",onClick:()=>{const a=k(c,h,y);e?.(a),t(a)},role:"checkbox","aria-checked":g[c].ariaChecked,semanticColor:f?"textBrightAccent":void 0})})}},12253:(e,a,l)=>{l.d(a,{h:()=>u});var t=l(65503),s=l(82509),n=l(31417),o=l(99701),r=l(87182),c=l(58685),i=l(86070);const u=({onClick:e,className:a,showDelayOnHover:l})=>{const u=(0,r.z)(),d=(0,c.o)((e=>e?.restrictions.canSeek??!1));return(0,i.jsx)(o.Zp,{label:n.Ru.get("playback-control.skip-backward-15"),showDelay:l,children:(0,i.jsx)(t.H,{iconOnly:s.e,size:"small",onClick:()=>{e?.(-15e3),u.seekBackward(15e3)},disabled:!d,"aria-label":n.Ru.get("playback-control.skip-backward-15"),"data-testid":"control-button-seek-back-15",className:a})})}},61711:(e,a,l)=>{l.d(a,{v:()=>u});var t=l(65503),s=l(51129),n=l(31417),o=l(99701),r=l(87182),c=l(58685),i=l(86070);const u=({onClick:e,className:a,showDelayOnHover:l})=>{const u=(0,r.z)(),d=(0,c.o)((e=>e?.restrictions.canSeek??!1));return(0,i.jsx)(o.Zp,{label:n.Ru.get("playback-control.skip-forward-15"),showDelay:l,children:(0,i.jsx)(t.H,{iconOnly:s.A,size:"small",onClick:()=>{e?.(15e3),u.seekForward(15e3)},disabled:!d,"aria-label":n.Ru.get("playback-control.skip-forward-15"),"data-testid":"control-button-seek-forward-15",className:a})})}},89059:(e,a,l)=>{l.d(a,{u:()=>b});var t=l(97500),s=l.n(t),n=l(65503),o=l(2792),r=l(31417),c=l(99701),i=l(36958);const u="fZjbVIqD8Xc3auRZOxu5";var d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const{shuffle:t,setShuffle:b,canToggleShuffle:p}=(0,i.V)(),m=t?r.Ru.get("playback-control.disable-shuffle"):r.Ru.get("playback-control.enable-shuffle");return(0,d.jsx)(c.Zp,{label:m,showDelay:l,children:(0,d.jsx)(n.H,{className:s()({[u]:t},a),iconOnly:o.p,size:"small",onClick:()=>{const a=!t;e?.(a),b(a)},disabled:!p,role:"switch","aria-checked":t?"true":"false","aria-label":m,"data-testid":"control-button-shuffle",semanticColor:t?"textBrightAccent":void 0})})}},97127:(e,a,l)=>{l.d(a,{d:()=>b});var t=l(40638),s=l(65503),n=l(94547),o=l(31417),r=l(99701),c=l(35352),i=l(87182),u=l(58685),d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const b=(0,i.z)(),p=(0,u.o)((e=>(e?.restrictions.canSkipPrevious||e?.restrictions.canSeek)??!1)),m=(0,t.YQ)((a=>{e?.(),b.skipToPrevious(),(0,c.aX)(a,"skip-back")}),100,{leading:!0,trailing:!1});return(0,d.jsx)(r.Zp,{label:o.Ru.get("playback-control.skip-back"),showDelay:l,children:(0,d.jsx)(s.H,{iconOnly:n.A,size:"small",disabled:!p,"aria-label":o.Ru.get("playback-control.skip-back"),"data-testid":"control-button-skip-back",onClick:m,className:a})})}},62747:(e,a,l)=>{l.d(a,{$:()=>b});var t=l(40638),s=l(65503),n=l(12743),o=l(31417),r=l(99701),c=l(35352),i=l(87182),u=l(58685),d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const b=(0,i.z)(),p=(0,u.o)((e=>e?.restrictions.canSkipNext??null)),m=(0,t.YQ)((a=>{e?.(),b.skipToNext(),(0,c.aX)(a,"skip-forward")}),100,{leading:!0,trailing:!1});return(0,d.jsx)(r.Zp,{label:o.Ru.get("playback-control.skip-forward"),showDelay:l,children:(0,d.jsx)(s.H,{iconOnly:n.s,size:"small",disabled:!p,"aria-label":o.Ru.get("playback-control.skip-forward"),"data-testid":"control-button-skip-forward",onClick:m,className:a})})}},83019:(e,a,l)=>{l.d(a,{w:()=>ee});var t=l(14343),s=l(31417),n=l(26639),o=l(99701),r=l(2214),c=l(65655),i=l(47532),u=l(66621),d=l(51242),b=l(2684),p=l(18193),m=l(68836),k=l(97007),g=l(76442),h=l(88026),y=l(99760),v=l(99419),x=l(50518),f=l(58313),w=l(24393),R=l(14532),D=l(67473),S=l(92830),C=l(98843),j=l(40560),N=l(54157),O=l(11386),E=l(18727),z=l(37436),H=l(16598),V=l(15427),_=l(6210),T=l(63445),A=l(88108),P=l(32375);const B="INvB6IvAqjjvyfm0ezDi";var L=l(86070);const M={.5:r.D4,.6:c.k,.7:i.l,.8:u.W9,.9:d.l,1:b.P,1.1:p.g,1.2:m.Dx,1.3:k.A,1.4:g.l,1.5:h.in,1.6:y.h,1.7:v.e,1.8:x.B,1.9:f.T,2:w.c,2.1:R.F,2.2:D.W,2.3:S.Z,2.4:C.U,2.5:j.X,2.6:N.m,2.7:O.n,2.8:E.Y,2.9:z.X,3:H.f,3.1:V.y,3.2:_.T,3.3:T.Q,3.4:A.l,3.5:P.i},I=({speed:e,iconSize:a=20})=>{const l=M[e];return l?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l,{className:B,iconSize:a,style:{width:`${a}px`,height:`${a}px`}}),(0,L.jsx)("span",{className:"hidden-visually",children:`${e}x`})]}):(0,L.jsx)("span",{children:`${e}x`})};var W=l(30758),X=l(10994),Z=l(41874),Y=l(12864),F=l(7388);const U="Is0ZfXiIyRoHd9y1OWtv",$=function({selectedSpeed:e,setSelectedSpeed:a}){const l=F.wH,t=(0,W.useRef)(null),n=(0,W.useCallback)((e=>{null!==e&&(t.current=e)}),[]);return(0,W.useEffect)((()=>{t?.current&&t.current.scrollIntoView({block:"center"})}),[t]),(0,L.jsxs)(X.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,L.jsx)(Z.y,{children:s.Ru.get("playback-control.playback-speed")}),(0,L.jsx)("div",{className:U,children:l.map((l=>(0,L.jsx)(Y.D,{elementRef:l===e?n:void 0,onClick:()=>{a(l)},"data-testid":`playback-speed-option-${l}`,role:"menuitemradio","aria-label":s.Ru.get("playback-control.playback-speed-button-a11y",l),"aria-checked":l===e,children:`${l}x`},l)))})]})};var q=l(31904),Q=l(79237),G=l(62642),K=l(43329);const J="Ww5ppB6W74laf1c0H_pR",ee=({iconSize:e=20,onClick:a})=>{const{speed:l,setSpeed:r,canChangeSpeed:c}=(0,q.C)(),i=(0,Q.v)((({connectionStatus:e})=>e===G.zP.NOT_CONNECTED)),u=(0,t.NC)(K.hd),d={"--button-size":2*e+"px"};return c?(0,L.jsx)(n.t,{renderInline:!0,placement:"top-start",menu:(0,L.jsx)($,{selectedSpeed:l,setSelectedSpeed:e=>{a?.(e),r(e)}}),children:(a,t,n)=>(0,L.jsx)(o.Zp,{label:s.Ru.get("playback-control.change-playback-speed"),children:(0,L.jsx)("button",{style:d,ref:n,className:J,onClick:e=>{t(e)},"aria-label":s.Ru.get("playback-control.change-playback-speed"),"data-testid":"control-button-playback-speed",disabled:!i&&u===K._9.DEFAULT,children:(0,L.jsx)(I,{speed:l,iconSize:e})})})}):null}},86286:(e,a,l)=>{l.d(a,{M:()=>E,V:()=>O});var t=l(30758),s=l(97500),n=l.n(s),o=l(40638),r=l(31417),c=l(99701),i=l(27607),u=l(15262),d=l(61690),b=l(72616),p=l(15525),m=l(86070);const k=({volume:e=1,iconSize:a="small",...l})=>{const t={size:a,role:"presentation",...l};return 0===e?(0,m.jsx)(u.X,{"aria-label":r.Ru.get("playback-control.a11y.volume-off"),...t}):e<1/3?(0,m.jsx)(d.D,{"aria-label":r.Ru.get("playback-control.a11y.volume-low"),...t}):e<2/3?(0,m.jsx)(b.z,{"aria-label":r.Ru.get("playback-control.a11y.volume-medium"),...t}):(0,m.jsx)(p.C,{"aria-label":r.Ru.get("playback-control.a11y.volume-high"),...t})};var g=l(32792),h=l(3326),y=l(38694);var v=l(3292);const x="volume-bar",f="RyUTmsGCr7jM4YTwqq8p",w="HGaOzijxBrKrSQhwI6rT",R="volume-bar__slider-container",D="DLZvnBAg9muHrwjSyIus",S="ekolz0hXwCXtCyFNmvqb",C="volume-bar__icon-button",j="aDDQP2meKLCk46Bn7Zz1",N="XRpLYcl6xtWmk7bNdHkS";let O=function(e){return e[e.SHOW_SLIDER_ALWAYS=0]="SHOW_SLIDER_ALWAYS",e[e.SHOW_SLIDER_ON_HOVER=1]="SHOW_SLIDER_ON_HOVER",e}({});const E=({iconSize:e="small",onVolumeBarClick:a,onVolumeBarDrag:l,onToggleMuteClick:s,className:u,mode:d=O.SHOW_SLIDER_ALWAYS,sliderSize:b,sliderDirection:p="horizontal",volumeIconRef:E,isMiniPlayer:z,showDelayOnHover:H})=>{const{volume:V,setVolume:_,raiseVolume:T,lowerVolume:A}=function(){const e=(0,h.p)(),[a,l]=(0,t.useState)(-1);return(0,t.useEffect)((()=>{let a=!0;return(async()=>{const t=await e.getVolume();a&&l(t)})(),()=>{a=!1}}),[e]),(0,y.F)(g._.VOLUME,(e=>l(e.data.volume))),{volume:a,setVolume:(0,t.useCallback)((a=>{l(a),e.setVolume(a)}),[e]),raiseVolume:(0,t.useCallback)((()=>e.raiseVolume()),[e]),lowerVolume:(0,t.useCallback)((()=>e.lowerVolume()),[e])}}(),P=-1!==V,B=Math.min(1,Math.max(0,V)),[L,M]=(0,t.useState)({isDragging:!1,isHoveringButton:!1,toggleVolumeLevel:null,dragPosition:0,shouldDragValueBeUsed:!1}),{shouldDragValueBeUsed:I,dragPosition:W,isHoveringButton:X,toggleVolumeLevel:Z,isDragging:Y}=L;let F=I?W:B;P||(F=1);const U=(0,o.YQ)((e=>{const a=Math.min(1,Math.max(0,e));_(a)}),25,{maxWait:50,leading:!0}),$=()=>{M((e=>({...e,isHoveringButton:!0})))},q=()=>{M((e=>({...e,isHoveringButton:!1})))},Q=0===V?r.Ru.get("playback-control.unmute"):r.Ru.get("playback-control.mute"),G={"--button-size":2*(0,v.k)(e)+"px","--slider-width":b?`${b}px`:"100%"};return(0,m.jsxs)("div",{style:G,className:n()(x,u,{[j]:!P,[f]:"vertical"===p,[D]:d===O.SHOW_SLIDER_ON_HOVER,[w]:z}),"data-testid":"volume-bar",dir:"ltr",onWheel:e=>{if(!P)return;const a=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,l=Math.max(-120,Math.min(120,e?.nativeEvent?.wheelDelta||a))/1200,t=Math.max(0,Math.min(1,F+l));_(t)},ref:E,children:[(0,m.jsx)(c.Zp,{label:Q,showDelay:H,children:(0,m.jsx)("button",{className:n()(C,"control-button",{[N]:z}),onClick:()=>{0===F?(s?.("not_muted"),U(Z??.7)):(M((e=>({...e,toggleVolumeLevel:F}))),s?.("muted"),U(0))},disabled:!P,"aria-label":0===V?r.Ru.get("playback-control.unmute"):r.Ru.get("playback-control.mute"),onMouseEnter:$,onMouseLeave:q,"aria-describedby":"volume-icon","data-testid":"volume-bar-toggle-mute-button",children:(0,m.jsx)(k,{id:"volume-icon",iconSize:e,volume:F})})}),(0,m.jsx)("div",{className:n()(R,{[S]:"vertical"===p}),onMouseEnter:$,onMouseLeave:q,children:(0,m.jsx)(i.z2,{labelText:r.Ru.get("playback-control.a11y.volume-slider-button"),value:F,max:1,step:.1,onDragStart:e=>{M((a=>({...a,isDragging:!0,dragPosition:e,shouldDragValueBeUsed:!0})))},onDragMove:e=>{M((a=>({...a,dragPosition:e,shouldDragValueBeUsed:!0}))),Y&&(l?.(e),U(e))},onDragEnd:e=>{M((e=>({...e,shouldDragValueBeUsed:!1,dragPosition:0,isDragging:!1}))),a?.(e),U(e)},onStepBackward:A,onStepForward:T,forceActiveStyles:X,direction:p})})]})}},32277:(e,a,l)=>{l.d(a,{w:()=>r});var t=l(30758),s=l(41364),n=l(86070);const o=({renderDisabled:e=(()=>null),renderEnabled:a})=>(0,s.X)(!0)?a():e(),r=e=>(0,n.jsx)(t.Suspense,{fallback:null,children:(0,n.jsx)(o,{...e})})},56507:(e,a,l)=>{l.d(a,{a:()=>u});var t=l(2792),s=l(77),n=l(31058),o=l(36958),r=l(58685),c=l(37474),i=l(86070);const u=({size:e,withSnackbar:a,className:l,showDelayOnHover:u})=>{const d=(0,r.o)((e=>e?.context),((e,a)=>e?.uri===a?.uri)),{title:b}=(0,n.$)(!0),{canToggleShuffle:p}=(0,o.V)();return(0,c.O)(d)?(0,i.jsx)(s.Y,{size:e,contextUri:d.uri,entityName:b??"",isActive:!0,activationPlacement:"top",offsetDotDistance:!1,withPadding:!0,disabled:!p,withActivation:!1,withSnackbar:a,className:l,showDelayOnHover:u}):(0,i.jsx)(s.u,{size:e,shuffleModeConfig:{icon:t.p},shuffleIsOn:!1,disabled:!0,withPadding:!0,className:l,showDelayOnHover:u})}},38694:(e,a,l)=>{l.d(a,{F:()=>n});var t=l(30758),s=l(3326);function n(e,a){const l=(0,t.useRef)(a),n=(0,s.p)();l.current=a,(0,t.useEffect)((()=>n.getEvents().addListener(e,(e=>{l.current(e)}))),[e,n])}}}]); +//# sourceMappingURL=4518.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4553.js b/dot-config/spicetify/Extracted/Raw/xpui/4553.js new file mode 100755 index 00000000..d0c4f518 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4553.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4553],{93500:(e,t,a)=>{a.d(t,{G:()=>r});var i=a(31417),n=a(57292),s=a(86070);function r({totalItems:e,containsTracks:t,containsEpisodes:a,containsAudiobooks:r}){if(0===e)return null;const l=a&&!r&&!t,o=r&&!t&&!a;let c;return c=t&&!a&&!r?i.Ru.get("tracklist-header.songs-counter",e):l?i.Ru.get("tracklist-header.episodes-counter",e):o?i.Ru.get("tracklist-header.audiobooks-counter",e):i.Ru.get("tracklist-header.items-counter",e),(0,s.jsx)(n.q,{children:c})}},23798:(e,t,a)=>{a.d(t,{N:()=>I});var i=a(97500),n=a.n(i),s=a(50498),r=a(17763),l=a(89887),o=a(95530),c=a(86677),d=a(30758),u=a(77141);const m="pH79IoVAcUC3Hn_VbS3B",x="v24nSqF2h73Ep3EJNkNl",h="OPvfrmGjqSYso3Me5FCd",p="TCbF8QBxkRc0mqI5_lzg",j="ZYBmZ8ghf3oA7NH2mI7r",g="Jtt6TUrz6TioPQsKXIY7",b="yzZ_VZHrZBb3REPcU7tD";var y=a(86070);const v=({"aria-label":e,children:t})=>{const a=(0,d.useRef)(null),i=(0,r.Oj)();return(0,y.jsx)(u.s,{focusTrapOptions:{initialFocus:()=>a.current??!1,onPostDeactivate:()=>{i({type:"close"})}},children:(0,y.jsx)("div",{"aria-label":e,tabIndex:-1,ref:a,className:x,children:t})})},k=({title:e,body:t,cta:a,onClose:i})=>(0,y.jsxs)(v,{"aria-label":e,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:t}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",onClick:i,children:a})})]});var C=a(65503),N=a(31417);const E=({onClose:e})=>{const t=N.Ru.get("paywalls.modal-heading"),a=(0,y.jsxs)(y.Fragment,{children:[N.Ru.get("paywalls.modal-body-p1"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),N.Ru.get("paywalls.modal-body-p2"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),N.Ru.get("paywalls.modal-body-p3")]});return(0,y.jsxs)(v,{"aria-label":t,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:t}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(C.H,{size:"small",semanticColor:"textBase",onClick:e,children:N.Ru.get("close")})})]})};var R=a(79871),A=a(96250);const S=({upsellExplanation:e,gatedEntityRelations:t,onClose:a})=>{const i=e.title,s=t.entitiesWithValueProps.at(0),r=s?.summary?.forUserWithoutAccess,l=s?.valueProps.map((({displayText:e})=>e))??[],d=l?.length>1;return(0,y.jsxs)(v,{"aria-label":i,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:i}),(0,y.jsxs)(o.E,{as:"div",variant:"bodySmall",className:p,children:[r,l&&d&&(0,y.jsx)(R.j,{hasTextSeparator:!0,semanticColor:"textBase",children:l})]}),(0,y.jsxs)("div",{className:n()(j,g),children:[(0,y.jsx)(C.H,{size:"small",condensed:!0,onClick:a,children:N.Ru.get("action-trigger.button.not-now")}),(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:e.url,iconTrailing:A.H,children:e.cta})]})]})},w=({title:e,body:t,cta:a,url:i,onClose:n})=>(0,y.jsxs)(v,{"aria-label":e,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:t}),(0,y.jsxs)("div",{className:j,children:[(0,y.jsx)(C.H,{size:"small",semanticColor:"textBase",onClick:n,children:N.Ru.get("close")}),(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:i,children:a})]})]});var f=a(6038),T=a(62270);const U=({showUri:e})=>{const t=(0,r.Oj)(),a=function(e){const t=(0,T.T)(),[a,i]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const a=await t.getAccessInfo(e);i(a)}catch(e){console.error(e),i(void 0)}}()}),[t,e]),a}(e);if(null===a)return null;let i=(0,y.jsx)(E,{onClose:()=>t({type:"close"})});return a?.basic&&(i=(0,y.jsx)(k,{...a.basic,onClose:()=>t({type:"close"})})),a?.upsellLink&&(i=(0,y.jsx)(w,{...a.upsellLink,onClose:()=>t({type:"close"})})),a?.gatedEntityRelations&&a?.upsellLink&&(i=(0,y.jsx)(S,{upsellExplanation:a.upsellLink,gatedEntityRelations:a.gatedEntityRelations,onClose:()=>t({type:"close"})})),(0,y.jsxs)(s.A,{colorSet:"announcement",className:m,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},children:[i,(0,y.jsx)("div",{"data-popper-arrow":"",className:n()(b)})]})},I=({children:e,enabled:t,showUri:a,renderInline:i=!0})=>t&&a?(0,y.jsx)(f.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:i,content:(0,y.jsx)(U,{showUri:a}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},550:(e,t,a)=>{a.d(t,{F:()=>l});var i=a(30758),n=a(31417),s=a(26344),r=a(86070);const l=i.memo((function({onClose:e,onRemove:t,isOpen:a,tracks:i,title:l}){return(0,r.jsx)(s.T,{"aria-label":l,titleText:l,onConfirm:a=>{t(i),e(a)},onClose:e,confirmText:n.Ru.get("remove"),descriptionText:n.Ru.get("playlist.remove_multiple_description"),cancelText:n.Ru.get("playlist.delete-cancel"),isOpen:a})}))},67239:(e,t,a)=>{a.d(t,{g:()=>U});var i=a(30758),n=a(3074),s=a.n(n),r=a(53860),l=a(84703),o=a(95530),c=a(14343),d=a(22765),u=a(75830),m=a(57447),x=a(1555),h=a(10994),p=a(41874),j=a(12864),g=a(4266),b=a(31417),y=a(47160),v=a(29324),k=a(86070);const C=({onSelect:e})=>{const{viewMode:t,setViewMode:a}=(0,y.a)();return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.y,{children:b.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),v.i.map((({value:i,icon:n,text:s},r)=>(0,k.jsx)(j.D,{role:"menuitemradio","aria-checked":t===i,divider:r===v.i.length-1?"after":void 0,autoClose:!1,leadingIcon:n(),onClick:()=>{a(i),e?.(i)},children:s()},i)))]})},N=({heading:e,selected:t,onSelect:a,options:i,enableViewModeMenu:n=!1,onSelectViewMode:s,sortOrder:r,...l})=>{let o;r&&(r===g.H.ASC||r===g.H.SECONDARY_ASC?o=m.U:r!==g.H.DESC&&r!==g.H.SECONDARY_DESC||(o=x.R));return(0,k.jsxs)(h.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),...l,children:[e?(0,k.jsx)(p.y,{children:e}):null,i.map((({key:e,value:i},n)=>(0,k.jsx)(j.D,{role:"menuitemradio","aria-checked":e===t.key,CheckedIcon:o,onClick:()=>a(e,n),children:i},e))),n&&(0,k.jsx)(C,{onSelect:s})]})};var E=a(61147),R=a(21549),A=a(43329);const S="x-sortBox-sortDropdown",w="cvTLPmjt6T7M85EKcB8w",f="SbDHY3fVADNJ4l9qOLQ2",T=({isOpen:e,className:t})=>e?(0,k.jsx)(r.J,{size:"small","aria-hidden":"true",className:t}):(0,k.jsx)(l.y,{size:"small","aria-hidden":"true",className:t}),U=({heading:e,options:t,selected:a,onSelect:n,sortOrder:r,variant:l="bodySmall",semanticColor:m,disabled:x,onClick:h,ariaLabel:p,enableViewModeMenu:j=!1})=>{const g=(0,c.NC)(A.mA)&&j,{viewMode:b}=(0,E.a)();a||(a=t?.[0]);const y=v.i.find((({value:e})=>e===b))||v.i[0],C=(0,i.useMemo)((()=>`sortboxlist-${s().create().hex}`),[]),{spec:U,logger:I}=(0,R.r)(d.d,{});return(0,k.jsx)(u.b,{menu:(0,k.jsx)(N,{selected:a,options:t,onSelect:(e,t)=>{n(e,t);const a=U.sortBySectionFactory().sortOptionFactory({identifier:e}).hitSort();I.logInteraction(a)},sortOrder:r,heading:e,enableViewModeMenu:g,onSelectViewMode:e=>{const t=U.viewAsSectionFactory().viewOptionFactory({identifier:e}).hitUiElementToggle();I.logInteraction(t)},id:C}),children:(e,t,i)=>(0,k.jsxs)("button",{className:S,onClick:e=>{x||(h?.(e),t(e))},ref:i,type:"button","aria-label":p,role:"combobox","aria-controls":C,"aria-expanded":e,children:[(0,k.jsx)(o.E,{"data-sortbox-label":!0,semanticColor:m,variant:l,className:w,children:a?.value||(g?y.text():"")}),g?y.icon():(0,k.jsx)(T,{isOpen:e,className:f})]})})}},6966:(e,t,a)=>{a.d(t,{S:()=>l,z:()=>o});var i=a(30758),n=a(86070);const s=[0,()=>{}],r=(0,i.createContext)(s),l=({children:e})=>{const t=(0,i.useState)(0);return(0,n.jsx)(r.Provider,{value:t,children:e})},o=()=>{const e=(0,i.useContext)(r);if(!e)throw Error("useNrValidItemsContext must be used within a NrValidItemsProvider");return e}},32183:(e,t,a)=>{a.d(t,{g:()=>g});var i=a(30758),n=a(97500),s=a.n(n),r=a(95530),l=a(22726),o=a(65462),c=a(78516),d=a(29454),u=a(99701),m=a(21082),x=a(27012),h=a(33329),p=a(14178),j=a(86070);const g=({children:e,uri:t,name:a,nonInteractive:n=!1,creatorUri:g,spec:b})=>{let y=null;const{draggable:v,onDragStart:k}=(0,x.P)({itemUris:[t],dragLabelText:a}),C=(0,h.s)(),N=(0,i.useCallback)((()=>{b&&C.logInteraction(b.albumLinkFactory({uri:t}).hitUiNavigate({destination:t}))}),[C,b,t]);return n?(0,j.jsx)("span",{className:s()("standalone-ellipsis-one-line",p.A.text),children:e}):((0,l._Tv)(t)&&(y=(0,j.jsx)(c.h,{uri:t,artistUri:g})),(0,l.WB1)(t)&&(y=(0,j.jsx)(d.H,{uri:t})),(0,j.jsx)(o.h,{menu:y,children:(0,j.jsx)(r.E,{variant:"bodySmall",children:(0,j.jsx)(u.Zp,{label:a,showDelay:u.uF,children:(0,j.jsx)(m.N,{draggable:v,onDragStart:k,className:s()("standalone-ellipsis-one-line"),to:t,dir:"auto",onClick:N,children:e})})})}))}},92026:(e,t,a)=>{a.d(t,{E:()=>x});var i=a(30758),n=a(95530),s=a(31417),r=a(28506),l=a(99701),o=a(83044),c=a(33329),d=a(14178),u=a(86070);const m=({name:e,uri:t,nonInteractive:a,children:i,onClick:n,index:s})=>a?(0,u.jsx)("span",{className:d.A.text,children:i}):(0,u.jsx)(o.y,{name:e,uri:t,onClick:n,index:s,children:i},t),x=({artists:e,filter:t,nonInteractive:a=!1,spec:o})=>{const d=(0,c.s)(),x=(0,i.useCallback)(((e,t)=>{o&&d.logInteraction(o.artistLinkFactory({position:t??0,uri:e}).hitUiNavigate({destination:e}))}),[d,o]),h=e.map((({name:e})=>e)).join(s.Ru.getSeparator());return(0,u.jsx)(l.Zp,{label:h,showDelay:l.uF,children:(0,u.jsx)(n.E,{as:"div",variant:"bodySmall",children:e.map((({uri:e,name:n},l)=>(0,u.jsxs)(i.Fragment,{children:[l>0&&s.Ru.getSeparator(),(0,u.jsx)(m,{uri:e,name:n,nonInteractive:a,onClick:x,index:l,children:(0,u.jsx)(r.M,{searchWords:[t??""],textToHighlight:n})},e)]},e)))})})}},82610:(e,t,a)=>{a.d(t,{W:()=>Le});var i=a(30758),n=a(62411),s=a(85387),r=a(33618),l=a(17348),o=a(91614),c=a(28454),d=a(95530),u=a(14343),m=a(94246),x=a(22726),h=a(31417),p=a(98293),j=a(65462),g=a(47863),b=a(91676),y=a(76720),v=a(54622),k=a(28506),C=a(21082),N=a(23798),E=a(39795),R=a(92026),A=a(41616),S=a(84816),w=a(33329),f=a(14178),T=a(86070);const U=({uri:e,imageUrl:t,name:a,showAvatar:n,spec:s,isCompactMode:r=!1})=>{const l=(0,w.s)(),o=(0,i.useCallback)((()=>{s&&l.logInteraction(s.addedByLinkFactory({position:0,uri:e}).hitUiNavigate({destination:e}))}),[l,s,e]);return(0,T.jsx)(j.h,{menu:(0,T.jsx)(S.B,{uri:e}),children:(0,T.jsxs)(C.N,{className:f.A.addedBy,to:e,onClick:o,children:[n&&(0,T.jsx)(A.e,{images:[{url:t,width:null,height:null}],label:a,width:r?16:24,userIconSize:"small"}),(0,T.jsx)(d.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:a})]})})};var I=a(32183),P=a(14563),D=a(82952),F=a(79225);const B="zKHdfiQG6XifMqJCe1Xs",O="F01P0D1xtG9RO_uiHxBK",M="oGvEk0CK5XgIUe0vIgWL",_="aUGJu_1rkM7l_YNH3r86",L=({concertDate:e,concertURI:t,concertVenue:a,index:i,spec:n})=>{const s=(0,w.s)(),r=h.Ru.formatDate((0,F.ad)(e),{weekday:"short",month:"short",day:"numeric"});return(0,T.jsx)(d.E,{className:B,variant:"bodySmall",semanticColor:"textSubdued",children:(0,T.jsxs)(C.N,{to:t,onClick:()=>{const e=n.eventLinkFactory({position:i,uri:t,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:t});s.logInteraction(e)},className:O,children:[(0,T.jsx)("div",{className:M,children:(0,T.jsx)(D.T,{size:"small"})}),(0,T.jsx)("div",{className:_,children:[r,a].join(" • ")})]})})};var $=a(13083);const V=({dateAdded:e,prefix:t})=>{let a=e.getTime()>0&&h.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return a&&t&&(a=`${t} ${a}`),(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",className:"standalone-ellipsis-one-line",children:a})};var H=a(20455),z=a(89402);const Y=({eventDate:e,ticketingSiteURL:t})=>{const a=(0,z.W)(),i=h.Ru.formatDate((0,F.ad)(e),{year:"numeric",month:"short",day:"numeric"}),n=h.Ru.get("tracklist.livestream");return(0,F.ad)(e){a({targetUri:t,intent:"navigate",type:"click"})},children:[(0,T.jsx)(D.T,{className:f.A.eventTicketIcon,height:19}),`${n} • ${i}`]})})},W=({concertsCount:e="1",concertVenue:t,concertURI:a,index:i,spec:n})=>{const s=(0,w.s)(),r="1"===e?t:h.Ru.get("concerts_near_you.multiple_locations");return(0,T.jsx)(d.E,{className:f.A.eventVenue,variant:"bodySmall",semanticColor:"textSubdued",children:(0,T.jsx)(C.N,{to:a,onClick:()=>{const e=n.eventLinkFactory({position:i,uri:a,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:a});s.logInteraction(e)},children:r})})};var Z=a(63096);const q=({uri:e,imageUrl:t,displayName:a,username:i,piled:n,onClick:s})=>{const r=(0,T.jsx)(A.e,{images:[{url:t,width:null,height:null}],label:a,width:24,userIconSize:"small",piled:n,displayName:a,username:i,className:f.A.facepileAvatar});return e?(0,T.jsx)(j.h,{menu:(0,T.jsx)(S.B,{uri:e}),children:(0,T.jsx)(C.N,{className:f.A.facepile,to:e,onClick:s,children:r})}):(0,T.jsx)("span",{className:f.A.facepile,children:r})},X=({users:e,spec:t})=>{const a=(0,w.s)();return(0,T.jsx)(i.Fragment,{children:e.slice(0,5).map(((e,i)=>(0,T.jsx)(q,{uri:e.uri,imageUrl:(0,Z.g)(e.images)?.url||"",displayName:e.displayName,username:e.username,piled:i>0,onClick:()=>{if(!t||!e.uri)return;const n=t.addedByLinkFactory({position:i,uri:e.uri}).hitUiNavigate({destination:e.uri});a.logInteraction(n)}},e.uri||e.displayName)))})};var G=a(97500),K=a.n(G),J=a(93240),Q=a(64143),ee=a(60384);const te=({isDisliked:e,feedbackPath:t,feedbackUri:a,deleteFeedbackPath:n,spec:s,onClick:r,name:l,contextUri:o})=>{const c=(0,w.s)(),{enqueueSnackbar:d}=(0,J.dh)(),{setDislikeFeedback:u,removeDislikeFeedback:m}=(0,ee.I)({uri:a,setFeedbackPath:t,removeFeedbackPath:n,contextUri:o}),x=(0,i.useCallback)((async()=>{m(),r?.(),s&&o&&c.logInteraction(s.addRecommendationButtonFactory().hitAddToPlaylist({playlist:o,itemToBeAdded:a}))}),[m,r,s,o,c,a]),p=(0,i.useCallback)((async()=>{u(),r?.(),d(h.Ru.get("feedback.hide-song",l)),s&&o&&c.logInteraction(s.removeRecommendationButtonFactory().hitRemoveRecommendation({recommendedItemUri:a,contextUri:o}))}),[u,r,d,l,s,o,c,a]);return(0,T.jsx)(Q.O,{className:K()(f.A.rowFeedbackButton,f.A.rowFeedback),onClick:e?x:p,isDisliked:e,size:"small",label:e?h.Ru.get("playback-control.un-ban"):h.Ru.get("playback-control.ban")})};var ae=a(68118),ie=a(27305),ne=a(87619),se=a(591),re=a(95931),le=a(67799);const oe=({releaseDate:e})=>(0,T.jsx)(d.E,{variant:"bodySmall",children:(0,F.gD)((0,F.ad)(e))});var ce=a(93627),de=a(12499),ue=a(95797),me=a(76633),xe=a(62358),he=a(4266),pe=a(87732),je=a(33593),ge=a(44335),be=a(3436),ye=a(45807),ve=a(14409),ke=a(53133),Ce=a(55926),Ne=a(42621),Ee=a(38501),Re=a(99041),Ae=a(54003),Se=a(97253),we=a(18663),fe=a(44672),Te=a(53377),Ue=a(57270),Ie=a(85346),Pe=a(28340),De=a(21549),Fe=a(7307),Be=a(59029),Oe=a(85907),Me=a(15838);const _e=e=>e?.type===Fe.c.SHOW,Le=i.memo((function({uri:e,uid:t,name:a,duration_ms:A,artists:S,albumOrShow:w,isMOGEFRestricted:D,isExplicit:F,isPlayable:B,isLocal:O=!1,isPaywalled:M,isUserSubscribed:_,index:z,playIndex:q=null,isMixedMedia:G,addedBy:K,hasDecoratedAddedBy:J,dateAdded:Q,release_date:ee,type:Fe,imgUrl:Le,contextUri:$e,onMove:Ve,onInsert:He,usePlayContextItem:ze,allowedDropTypes:Ye,feedbackPath:We,feedbackUri:Ze,deleteFeedbackPath:qe,isDisliked:Xe,ticketingSiteURL:Ge="",eventDate:Ke,concertsCount:Je,concertDate:Qe,concertURI:et="",concertVenue:tt,isConcert:at,isBlend:it=!1,canRemove:nt,playlistName:st,authorName:rt,isOutOfMarket:lt,consumptionCapExplanation:ot,isOwnedBySelf:ct=!1,isCompactMode:dt=!1,hasAssociatedVideo:ut=!1,bpm:mt,musicKey:xt,gatedEntityRelations:ht,isBanned:pt}){const{spec:jt}=(0,De.r)(m.i,{data:{position:z,reason:"",uri:e}}),gt=(0,n.wA)(),bt=(0,s.Zp)(),{filter:yt}=(0,i.useContext)(E.g),vt=(0,u.NC)(Ee.MCN),kt=(0,Ie.T)(e),Ct=(0,u.NC)(Ee.enc),Nt=(0,Ue.b)($e,e,pt),Et=(0,Te.A)(e,$e,!!nt,Nt),{isPlayable:Rt,isAnyArtistBanned:At}=(0,Ne.g)(e,{isPlayable:B,isLocal:O,isOutOfMarket:lt,artistUris:S?.map((e=>e.uri)),hasContextualBan:Nt}),{unBanArtists:St}=(0,be.M)(S?.map((e=>e.uri))??[]),wt=(0,me.w)(),{enqueueSnackbar:ft}=(0,ke.d)(),Tt="episode"===Fe,Ut="audiobook"===Fe,It="track"!==Fe&&_e(w)&&w.mediaType===Be.Q.VIDEO,Pt=M&&!_,Dt=Ut&&Pt,{badges:Ft,hasBadges:Bt}=(0,Me.b)({downloadAvailability:kt,isExplicit:F,isMOGEFRestricted:D,isPaywalled:M,hasAssociatedVideo:ut}),Ot=(0,Ce.c)();let Mt=z+1;G&&(Mt=It?(0,T.jsx)(r.B,{"data-testid":"video-icon",size:"small","aria-hidden":"true"}):Tt?(0,T.jsx)(l.L,{"data-testid":"podcast-icon",size:"small","aria-hidden":"true"}):Ut?(0,T.jsx)(o.l,{"data-testid":"audiobook-icon",size:"small","aria-hidden":"true"}):(0,T.jsx)(c.v,{"data-testid":"track-icon",size:"small","aria-hidden":"true"}));let _t=(0,T.jsx)(v.P,{uri:e,uid:t,albumUri:w?.uri,artists:S,contextUri:$e,canBeRemovedFromPlaylist:nt,isBanned:Nt,canBan:Et});Tt?_t=(0,T.jsx)(b.b,{uri:e,uid:t,showUri:w?.uri,contextUri:$e,canBeRemovedFromPlaylist:nt}):O?_t=(0,T.jsx)(y.A,{uri:e,uid:t,contextUri:$e,canBeRemovedFromPlaylist:nt}):Ut&&(_t=(0,T.jsx)(g.p,{uri:e,uid:t,contextUri:$e,includeGoToAudiobook:!0,canBeRemovedFromPlaylist:nt}));let Lt=S?.map((e=>e.name)).join(h.Ru.getSeparator())||"";Tt&&_e(w)?Lt=w.publisher:Ut&&(Lt=rt||"");const $t=K?.[0],Vt=(0,Z.g)($t?.images,{desiredWidth:24,desiredLabel:"small"}),Ht=(0,Pe.P)({uri:e},{featureIdentifier:"playlist"}),zt=ze({uid:t,uri:e,index:q??z}),{isActive:Yt,isPlaying:Wt,triggerPlay:Zt,togglePlay:qt}=Ut?Ht:zt,Xt=()=>(0,T.jsx)(ue.p,{titleText:a,children:(0,T.jsx)(k.M,{searchWords:[yt],textToHighlight:a})}),Gt=(0,i.useCallback)(((e,t)=>{Ut&&ot?gt((0,p._3)(ot)):Zt({loggingParams:t})}),[ot,gt,Ut,Zt]),Kt=(0,i.useCallback)(((t,a)=>{Ut&&ot?gt((0,p._3)(ot)):Dt?bt((0,x.o_h)(e).toURLPath(!0)):qt({loggingParams:a})}),[ot,gt,Ut,bt,qt,Dt,e]),Jt=vt&&(0,ye.v)(ht,e);return(0,T.jsx)(fe.pZ,{value:"row",index:z,children:(0,T.jsx)(N.N,{renderInline:!1,enabled:!0,showUri:w?.uri,children:(t,i)=>(0,T.jsx)(j.h,{menu:_t,children:(0,T.jsx)(xe.w,{uri:e,contextUri:$e,index:z,onTriggerPlay:Gt,isCompactMode:dt,onTriggerPaywall:t=>{Dt?bt((0,x.o_h)(e).toURLPath(!0)):i(t)},onDoubleClick:()=>{Ut?bt((0,x.o_h)(e).toURLPath(!0)):ft(h.Ru.get("feedback.unable-to-play"))},isLocked:Pt,isActive:Yt,ariaRowIndex:z+1,isPlayable:Rt,isAnyArtistBanned:At,handleArtistBanUndoClick:St,ageRestricted:D,dragMetadata:{name:a,createdBy:Lt},onMove:Ve,onInsert:He,allowedDropTypes:Ye,spec:jt,canRemovePlaylistItems:nt,children:wt.map((({columnType:t,options:i},n)=>{const s=(0,pe.y)(n,t,wt);return(0,T.jsx)(s,{ariaColIndex:n,children:(()=>{switch(t){case he.$.INDEX:return(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(N.N,{showUri:w?.uri??"",renderInline:!1,enabled:Pt,children:(0,T.jsx)(se.$,{uri:e,playAriaLabel:h.Ru.get("tracklist.a11y.play",a,Lt),onClick:Kt,isPlaying:Wt,isActive:Yt,isLocked:Pt,spec:jt,children:(0,T.jsx)(le.a,{children:Mt})})})});case he.$.TITLE_AND_ARTIST:case he.$.TITLE_AND_AUTHOR:return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ae.e,{src:Le,isVideo:It,isEpisode:Tt}),(0,T.jsxs)(ie.l,{children:[Ot||Ut?(0,T.jsx)(C.N,{to:e,className:f.A.rowTitle,"data-testid":"internal-track-link",children:Xt()}):Xt(),Bt&&(0,T.jsxs)(P.P,{children:[Ft.download&&(0,T.jsx)(Se._,{}),Ft.explicit&&(0,T.jsx)(Re.U,{}),Jt?(0,T.jsx)(ve.x,{gatedEntityRelations:ht}):Ft.paid&&(0,T.jsx)(Ae.y,{}),Ft.nineteen&&(0,T.jsx)(we.q,{className:f.A.nineteen,size:16}),Ft.hasAssociatedVideo&&(0,T.jsx)(je.l,{})]}),(0,T.jsxs)(ce.p,{children:[!Tt&&!It&&S&&(0,T.jsx)(R.E,{nonInteractive:O,artists:S,filter:yt,spec:jt}),(Tt||Ut)&&!It&&Lt]})]})]});case he.$.TITLE:return(0,T.jsxs)(ne.q,{children:[Ot||Ut?(0,T.jsx)(C.N,{to:e,className:f.A.rowTitle,"data-testid":"internal-track-link",children:Xt()}):Xt(),Bt&&(0,T.jsxs)(P.P,{children:[Ft.download&&(0,T.jsx)(Se._,{}),Ft.explicit&&(0,T.jsx)(Re.U,{}),Ft.paid&&(0,T.jsx)(Ae.y,{}),Ft.nineteen&&(0,T.jsx)(we.q,{className:f.A.nineteen,size:16}),Ft.hasAssociatedVideo&&(0,T.jsx)(je.l,{separator:""})]})]});case he.$.ARTIST:case he.$.AUTHOR:return(0,T.jsxs)(de.Y,{children:[!Tt&&!It&&S&&(0,T.jsx)(R.E,{nonInteractive:O,artists:S,filter:yt,spec:jt}),(Tt||Ut)&&!It&&Lt]});case he.$.ALBUM_OR_PODCAST:case he.$.ALBUM:return w?(0,T.jsx)(I.g,{nonInteractive:O,uri:w.uri,name:w.name,creatorUri:S?.[0]?.uri,spec:jt,children:(0,T.jsx)(k.M,{searchWords:[yt],textToHighlight:w.name})}):null;case he.$.ADDED_BY:return(0,T.jsx)(T.Fragment,{children:it?(0,T.jsx)(X,{users:K,spec:jt}):(0,T.jsx)(U,{name:$t?.displayName||$t?.username||"",isCompactMode:dt,uri:$t?.uri||"",imageUrl:Vt?.url||"",showAvatar:J,spec:jt})});case he.$.RELEASE_DATE:return(0,T.jsx)(T.Fragment,{children:Tt&&(0,T.jsx)(oe,{releaseDate:ee})});case he.$.EVENT_DATE:return(0,T.jsx)(T.Fragment,{children:Ke&&Ge?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(Y,{eventDate:Ke,ticketingSiteURL:Ge})}):null});case he.$.CONCERT:return(0,T.jsx)(T.Fragment,{children:at&&Qe&&tt?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(L,{concertsCount:Je,concertDate:Qe,concertURI:et,concertVenue:tt,index:z,spec:jt})}):null});case he.$.EVENT_INFO:return(0,T.jsx)(T.Fragment,{children:tt&&et?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(W,{concertsCount:Je,concertVenue:tt,concertURI:et,index:z,spec:jt})}):null});case he.$.CONCERT_VENUE:return(0,T.jsx)(T.Fragment,{children:tt&&et?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(W,{concertURI:et,concertsCount:Je,concertVenue:tt,index:z,spec:jt})}):null});case he.$.ADDED_AT:return(0,T.jsx)(T.Fragment,{children:Q?(0,T.jsx)(V,{dateAdded:new Date(Q)}):null});case he.$.DURATION:return(0,T.jsxs)(T.Fragment,{children:[Ct?Et&&(0,T.jsx)($.A,{itemUri:e,contextUri:$e,isBanned:Nt,contextName:st}):We&&qe&&(0,T.jsx)(te,{isDisliked:Xe,feedbackPath:We,deleteFeedbackPath:qe,feedbackUri:Ze||e,name:st,contextUri:$e}),!It&&!lt&&(0,T.jsx)(ge.d,{uri:e,spec:jt,type:Fe,isOwnedBySelf:ct}),!i?.hideDuration&&(0,T.jsx)(H.P,{duration:A}),(0,T.jsx)(re.Y,{menu:_t,label:h.Ru.get("more.label.track",a,Lt),spec:jt})]});case he.$.BPM:return mt?(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",children:mt}):null;case he.$.KEY:return xt?(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",children:xt}):null;case he.$.ACTIONS:case he.$.ADD:case he.$.ALBUM_OR_SHOW:case he.$.PLAYS:case he.$.VIBE:return null;default:(0,Oe.d)(t)}return null})()},`column-${n}`)}))})})})})}),((e,t)=>e.uri===t.uri&&e.allowedDropTypes.length===t.allowedDropTypes.length&&e.isPlayable===t.isPlayable&&e.isMixedMedia===t.isMixedMedia&&e.consumptionCapExplanation===t.consumptionCapExplanation&&e.isCompactMode===t.isCompactMode))},14409:(e,t,a)=>{a.d(t,{x:()=>l});var i=a(99701),n=a(64281);const s="BO7X8b8_SQhDyCjS0EOv";var r=a(86070);const l=({gatedEntityRelations:e})=>{if(!e)return!1;const t=e?.entitiesWithValueProps?.at(0),a=t?.valueProps.at(0)?.displayText,l=t?.summary?.forUserWithoutAccess;if(!a||!t)return null;const o=(0,r.jsx)(n.E,{text:a,className:s});return l?(0,r.jsx)(i.Zp,{label:l||a,children:o}):o}},54003:(e,t,a)=>{a.d(t,{y:()=>r});var i=a(31417),n=a(64281),s=a(86070);const r=()=>(0,s.jsx)(n.E,{ariaLabel:i.Ru.get("paid"),text:i.Ru.get("paid")})},45807:(e,t,a)=>{a.d(t,{B:()=>i,v:()=>n});const i=(e,t)=>!!e&&e.uri===t.uri,n=(e,t)=>!!e&&e.entitiesWithValueProps.at(0)?.uri===t},89849:(e,t,a)=>{a.d(t,{Y:()=>i.Y});var i=a(77)},29997:(e,t,a)=>{a.d(t,{X:()=>i.X});var i=a(41364)},60384:(e,t,a)=>{a.d(t,{I:()=>c});var i=a(30758),n=a(1599),s=a(72671);var r=a(87182),l=a(29074),o=a(2679);const c=({uri:e,setFeedbackPath:t,removeFeedbackPath:a,contextUri:c})=>{const d=(0,r.z)(),u=(0,l.m)(),{isPlaying:m}=(0,o.te)(e),x=(0,i.useCallback)((()=>{c&&u.resync(c)}),[c,u]);return{setDislikeFeedback:(0,i.useCallback)((async()=>{t&&(await((e,t,a)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",a);return e.build().withMethod("POST").withHost(s.L1).withPath(i).withEndpointIdentifier("//feedback/").send()})(n.n.getInstance(),t,e),x(),m&&d.skipToNext())}),[t,e,x,m,d]),removeDislikeFeedback:(0,i.useCallback)((async()=>{a&&(await((e,t,a)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",a);return e.build().withMethod("DELETE").withHost(s.L1).withPath(i).withEndpointIdentifier("//feedback/").send()})(n.n.getInstance(),a,e),x())}),[a,x,e])}}}}]); +//# sourceMappingURL=4553.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4884.css b/dot-config/spicetify/Extracted/Raw/xpui/4884.css new file mode 100755 index 00000000..c24fcd83 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4884.css @@ -0,0 +1 @@ +.vkMQw77rXE4cp8xsAdzl{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.emw6kR941D2wReukhCAJ{border-radius:4px;height:48px;width:48px;-webkit-margin-after:var(--encore-spacing-tighter);margin-block-end:var(--encore-spacing-tighter)}.khENZvA4G9EjpLQiINss{-webkit-margin-after:28px;margin-block-end:28px}.Fu87PEr0tL6oDjmw_X2H{-webkit-margin-after:var(--encore-spacing-base);margin-block-end:var(--encore-spacing-base)}.P9gpV_sgryfUERYOdfor{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-tighter-2)}.FB2PxTNhkGbwFwYI2ufG{background-color:#333;border-radius:var(--encore-corner-radius-base);-webkit-box-shadow:rgba(0,0,0,.4);box-shadow:rgba(0,0,0,.4);color:#fff;min-height:545px;position:relative;width:480px}.FB2PxTNhkGbwFwYI2ufG,.eYxzC4s3Nw68RcbK7xzl,.gZYgXNWbFSAAjLzGhOI9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gZYgXNWbFSAAjLzGhOI9{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:var(--encore-spacing-looser) var(--encore-spacing-looser-2) var(--encore-spacing-looser-2)}.eYxzC4s3Nw68RcbK7xzl{padding:var(--encore-spacing-looser-2) var(--encore-spacing-looser-2) var(--encore-spacing-base)}.QrelMvam4WOTMVaO28Rl{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:100%}._EaBFRLKy0nZJXkiRwlx{background-color:transparent;border:none;cursor:pointer;padding:var(--encore-spacing-base);position:absolute;top:0}.N77hKGzNc_lKQ5OG1EBN{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-tighter-2);-webkit-margin-before:var(--encore-spacing-tighter);margin-block-start:var(--encore-spacing-tighter)}.JceC3xibcl3MHVULIK0b{border:1px solid hsla(0,0%,100%,.1);height:0;margin-block:0;width:100%}.Uk72m6OFBBdTZ3RJb0K_{margin-block:20px var(--encore-spacing-base)}.IFqCps3krPbH25azco3F li:not(:last-child){-webkit-margin-after:var(--encore-spacing-tighter);margin-block-end:var(--encore-spacing-tighter)} ._EaBFRLKy0nZJXkiRwlx{inset-inline-end:0} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/4884.js b/dot-config/spicetify/Extracted/Raw/xpui/4884.js new file mode 100755 index 00000000..17a00af4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/4884.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4884],{64884:(e,a,t)=>{t.d(a,{DsaModal:()=>ee});var s=t(30758),i=t(62411),n=t(95530),d=t(67499),l=t(7315),r=t(56769),o=t(31417),c=t(98293),m=t(33625),u=t(22984),g=t(75497),E=t(82935);const N="vkMQw77rXE4cp8xsAdzl",h="emw6kR941D2wReukhCAJ";var x=t(86070);const f=({advertiser:e,legalEntityName:a})=>{const{item:t}=(0,m.L)()||{item:null},s=t&&(0,g.N)(t)?t?.images:void 0,i=(0,E.h)(s);return(0,x.jsxs)("div",{className:N,children:[i&&(0,x.jsx)(u._,{className:h,src:i,loading:"lazy"}),(0,x.jsx)(n.E,{variant:"bodyMediumBold","aria-label":e,children:e}),a&&(0,x.jsx)(n.E,{variant:"bodySmall",semanticColor:"textSubdued","aria-label":a,children:a})]})};var v=t(14414),T=t(85420),R=t(59159);const y="khENZvA4G9EjpLQiINss",b="Fu87PEr0tL6oDjmw_X2H",j=({title:e,showTitle:a,children:t})=>(0,x.jsxs)("section",{className:y,children:[a&&(0,x.jsx)(n.E,{className:b,variant:"bodyMediumBold",as:"h3","aria-label":e,children:e}),t]});var p=t(98994);const A="P9gpV_sgryfUERYOdfor",_=({text:e,icon:a})=>(0,x.jsxs)(p.K,{className:A,condensed:!0,children:[a,(0,x.jsx)(n.E,{variant:"bodyMedium","aria-label":e,as:"h4",children:e})]});let w=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.AGE=1]="AGE",e[e.GEO=2]="GEO",e[e.GENDER=3]="GENDER",e[e.INTEREST=4]="INTEREST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const G={fromJSON:e=>({targetingTypes:globalThis.Array.isArray(e?.targetingTypes)?e.targetingTypes.map((e=>function(e){switch(e){case 0:case"UNKNOWN":return w.UNKNOWN;case 1:case"AGE":return w.AGE;case 2:case"GEO":return w.GEO;case 3:case"GENDER":return w.GENDER;case 4:case"INTEREST":return w.INTEREST;default:return w.UNRECOGNIZED}}(e))):[],legalEntityName:S(e.legalEntityName)?globalThis.String(e.legalEntityName):"",showTailoredAdsSection:S(e.showTailoredAdsSection)?Boolean(e.showTailoredAdsSection):void 0}),toJSON(e){const a={};return e.targetingTypes?.length&&(a.targetingTypes=e.targetingTypes.map((e=>function(e){switch(e){case w.UNKNOWN:return"UNKNOWN";case w.AGE:return"AGE";case w.GEO:return"GEO";case w.GENDER:return"GENDER";case w.INTEREST:return"INTEREST";case w.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e)))),""!==e.legalEntityName&&(a.legalEntityName=e.legalEntityName),void 0!==e.showTailoredAdsSection&&(a.showTailoredAdsSection=e.showTailoredAdsSection),a},create:e=>G.fromPartial(e??{}),fromPartial(e){const a={targetingTypes:[],legalEntityName:"",showTailoredAdsSection:void 0};return a.targetingTypes=e.targetingTypes?.map((e=>e))||[],a.legalEntityName=e.legalEntityName??"",a.showTailoredAdsSection=e.showTailoredAdsSection??void 0,a}};function S(e){return null!=e}const O="FB2PxTNhkGbwFwYI2ufG",I="gZYgXNWbFSAAjLzGhOI9",C="eYxzC4s3Nw68RcbK7xzl",k="QrelMvam4WOTMVaO28Rl",B="_EaBFRLKy0nZJXkiRwlx",D="N77hKGzNc_lKQ5OG1EBN",U="JceC3xibcl3MHVULIK0b",M="Uk72m6OFBBdTZ3RJb0K_",K="IFqCps3krPbH25azco3F";const F=({activeTargetingTypes:e})=>{const a=[w.GEO,w.INTEREST].some((a=>e.includes(a)));if(!a)return null;const t=a&&e.some((e=>e===w.AGE||e===w.GENDER));return(0,x.jsx)(j,{title:o.Ru.get("ad-formats.dsa.modal.otherInfo"),showTitle:t,children:(0,x.jsx)(R.b,{className:K,condensedAll:!0,children:e.map((e=>{const a=function(e){switch(e){case w.GEO:return{icon:(0,x.jsx)(v.t,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.location")};case w.INTEREST:return{icon:(0,x.jsx)(T.T,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.interests")};default:return null}}(e);return a?(0,x.jsx)(_,{icon:a.icon,text:a.text},e):null}))})})};var L=t(31591),W=t(87578),Z=t(23046),z=t(65238),J=t(29195),P=t(19862),Y=t(27301),q=t(19329);const Q=({activeTargetingTypes:e,item:a})=>{const t=(0,J.vh)(),{openURLWithSessionTransfer:s}=(0,q.L)();return[w.AGE,w.GENDER].some((a=>e.includes(a)))?(0,x.jsxs)(j,{title:o.Ru.get("ad-formats.dsa.modal.profileInfo"),showTitle:!0,children:[(0,x.jsx)(R.b,{className:K,condensedAll:!0,style:{marginBlockEnd:(0,Z.po)("base")},children:e.map((e=>{const a=function(e){switch(e){case w.AGE:return{icon:(0,x.jsx)(L.w,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.age")};case w.GENDER:return{icon:(0,x.jsx)(W.v,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.gender")};default:return null}}(e);return a?(0,x.jsx)(_,{icon:a.icon,text:a.text},e):null}))}),(0,x.jsx)(n.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.adRelevancyAction"),children:o.Ru.get("ad-formats.dsa.modal.adRelevancyAction")}),(0,x.jsxs)(z.Y,{component:"button","aria-label":"Edit your Spotify profile, link",className:D,semanticColor:"textBrightAccent",onClick:()=>{s(Y.vE),t.send((0,r.m)({ad_id:a.adId,lineitem_id:a.metadata?.lineitem_id,creative_id:a.metadata?.creative_id,slot:a.slot,event:"event_clicked",reason:"edit_profile",surface:"ad_dsa_view"}))},standalone:!0,children:[(0,x.jsx)(n.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.editProfile")}),(0,x.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]}):null},V=({item:e})=>{const a=(0,J.vh)(),{openURLWithSessionTransfer:t}=(0,q.L)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("hr",{className:U}),(0,x.jsx)(n.E,{className:M,variant:"titleSmall","aria-label":o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds"),as:"h2",children:o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds")}),(0,x.jsx)(n.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.tailoredAds"),children:o.Ru.get("ad-formats.dsa.modal.tailoredAds")}),(0,x.jsxs)(z.Y,{component:"button","aria-label":"Visit your privacy settings, link",className:D,semanticColor:"textBrightAccent",onClick:()=>{t(`${Y.k$}/#tailored-ads`),a.send((0,r.m)({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_clicked",lineitem_id:e.metadata?.lineitem_id,reason:"change_preferences",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))},standalone:!0,children:[(0,x.jsx)(n.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.privacySetting")}),(0,x.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]})};var X=t(17429);const H=e=>{const[a,t]=(0,s.useState)(null),[i,n]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{e?.metadata?.lineitem_id&&e.adId&&(async e=>{try{n(!0);const a=await X.ZY(e);t(G.fromJSON(a)),n(!1)}catch(e){n(!1)}})({lineitemId:e.metadata.lineitem_id,adId:e.adId})}),[e]),{data:a,loading:i}};var $=t(44971);const ee=({item:e})=>{const a=(0,J.vh)(),t=(0,i.wA)(),{isOpen:m}=(0,i.d4)((e=>e.ui.dsaDialog)),{data:u,loading:g}=H(e);return(0,s.useEffect)((()=>{a.send((0,r.m)({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_viewed",lineitem_id:e.metadata?.lineitem_id,reason:"ad_dsa_view",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))}),[]),(0,x.jsxs)($.A,{className:O,isOpen:m,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,contentLabel:o.Ru.get("ad-formats.dsa.aboutThisAd"),children:[(0,x.jsx)("div",{className:C,children:(0,x.jsx)(n.E,{"aria-label":o.Ru.get("ad-formats.dsa.aboutThisAd"),variant:"titleMedium",as:"h1",children:o.Ru.get("ad-formats.dsa.aboutThisAd")})}),(0,x.jsx)("hr",{className:U}),(0,x.jsx)("div",{className:I,children:g?(0,x.jsx)("div",{className:k,"data-testid":"loading-indicator",children:(0,x.jsx)(d.U,{size:"large"})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(f,{advertiser:e.metadata.advertiser,legalEntityName:u?.legalEntityName}),u?.targetingTypes.length?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.E,{className:M,variant:"titleSmall",as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation"),children:o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation")}),(0,x.jsx)(Q,{item:e,activeTargetingTypes:u?.targetingTypes}),(0,x.jsx)(F,{item:e,activeTargetingTypes:u?.targetingTypes})]}):(0,x.jsx)(n.E,{className:M,as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.targeting.unknown"),tabIndex:0,children:o.Ru.get("ad-formats.dsa.modal.targeting.unknown")}),u?.showTailoredAdsSection&&(0,x.jsx)(V,{item:e})]})}),(0,x.jsx)("button",{"aria-label":o.Ru.get("close_button_action"),className:B,onClick:()=>{t((0,c.ft)())},children:(0,x.jsx)(l.M,{size:"medium",semanticColor:"textBase"})})]})}}}]); +//# sourceMappingURL=4884.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/5125.js b/dot-config/spicetify/Extracted/Raw/xpui/5125.js new file mode 100755 index 00000000..2912ff8f --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/5125.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5125],{84172:(t,e,i)=>{i.d(e,{OO:()=>dt,wm:()=>X,yU:()=>ct});var n=i(66144),s=i(26823),o=i(11418);class r{constructor(t,e,i,n){this.state=t,this.pos=e,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,o.mv)(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(d(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function l(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function a(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,validFor:i}:null}}class h{constructor(t,e,i,n){this.completion=t,this.source=e,this.match=i,this.score=n}}function c(t){return t.selection.main.from}function d(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],o="$"!=n[n.length-1];return s||o?new RegExp(`${s?"^":""}(?:${n})${o?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const u=n.YH.define();const f=new WeakMap;function p(t){if(!Array.isArray(t))return t;let e=f.get(t);return e||f.set(t,e=a(t)),e}const m=n.Pe.define(),g=n.Pe.define();class v{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e=48&&h<=57||h>=97&&h<=122?2:h>=65&&h<=90?1:0:(b=(0,n.MK)(h))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!s||1==y&&g||0==w&&0!=y)&&(e[d]==h||i[d]==h&&(u=!0)?r[d++]=s:r.length&&(v=!1)),w=y,s+=(0,n.Fh)(h)}return d==a&&0==r[0]&&v?this.result((u?-200:0)-100,r,t):f==a&&0==p?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):l>-1?this.ret(-700-t.length,[l,l+this.pattern.length]):f==a?this.ret(-900-t.length,[p,m]):d==a?this.result((u?-200:0)-100-700+(v?0:-1100),r,t):2==e.length?null:this.result((s[0]?-700:0)-200-1100,s,t)}result(t,e,i){let s=[],o=0;for(let t of e){let e=t+(this.astral?(0,n.Fh)((0,n.vS)(i,t)):1);o&&s[o-1]==t?s[o-1]=e:(s[o++]=t,s[o++]=e)}return this.ret(t-i.length,s)}}class w{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length(0,n.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:x,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>y(t(i),e(i)),optionClass:(t,e)=>i=>y(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function y(t,e){return t?e?t+" "+e:t:e}function x(t,e,i,n,o,r){let l,a,h=t.textDirection==s.OP.RTL,c=h,d=!1,u="top",f=e.left-o.left,p=o.right-e.right,m=n.right-n.left,g=n.bottom-n.top;if(c&&f=g||t>e.top?l=i.bottom-e.top:(u="bottom",l=e.bottom-i.top)}return{style:`${u}: ${l/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${a/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(d?h?"left-narrow":"right-narrow":c?"left":"right")}}function k(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class S{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let n=t.state.field(e),{options:s,selected:o}=n.open,r=t.state.facet(b);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,n){let s=document.createElement("span");s.className="cm-completionLabel";let o=t.displayLabel||t.label,r=0;for(let t=0;tr&&s.appendChild(document.createTextNode(o.slice(r,e)));let l=s.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(o.slice(e,i))),l.className="cm-completionMatchedText",r=i}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.tooltipClass=r.tooltipClass,this.range=k(s.length,o,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:n}=t.state.field(e).open;for(let e,s=i.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(e=/-(\d+)$/.exec(s.id))&&+e[1]{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(b).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:g.of(null)})})),this.showOptions(s,n.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),n=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=n){let{options:s,selected:o,disabled:r}=i.open;n.open&&n.open.options==s||(this.range=k(s.length,o,t.state.facet(b).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),r!=(null===(e=n.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!r)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=k(e.options.length,e.selected,this.view.state.facet(b).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let o="string"==typeof n?document.createTextNode(n):n(i);if(!o)return;"then"in o?o.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>(0,s.c_)(this.view.state,t,"completion info"))):this.addInfoPane(o,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:n}=t;i.appendChild(e),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.height/t.offsetHeight;n.topi.bottom&&(t.scrollTop+=(n.bottom-i.bottom)/s)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect(),s=this.space;if(!s){let t=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(s.bottom,e.bottom)-10||n.bottomi.from||0==i.from))if(s=t,"string"!=typeof a&&a.header)n.appendChild(a.header(a));else{n.appendChild(document.createElement("completion-section")).textContent=t}}const h=n.appendChild(document.createElement("li"));h.id=e+"-"+o,h.setAttribute("role","option");let c=this.optionClass(r);c&&(h.className=c);for(let t of this.optionContent){let e=t(r,this.view.state,this.view,l);e&&h.appendChild(e)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew S(i,t,e)}function C(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class M{constructor(t,e,i,n,s,o){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=o}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new M(this.options,E(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,n,s,o){if(n&&!o&&t.some((t=>t.isPending)))return n.setDisabled();let r=function(t,e){let i=[],n=null,s=t=>{i.push(t);let{section:e}=t.completion;if(e){n||(n=[]);let t="string"==typeof e?e:e.name;n.some((e=>e.name==t))||n.push("string"==typeof e?{name:t}:e)}},o=e.facet(b);for(let n of t)if(n.hasResult()){let t=n.result.getMatch;if(!1===n.result.filter)for(let e of n.result.options)s(new h(e,n.source,t?t(e):[],1e9-i.length));else{let i,r=e.sliceDoc(n.from,n.to),l=o.filterStrict?new w(r):new v(r);for(let e of n.result.options)if(i=l.match(e.label)){let o=e.displayLabel?t?t(e,i.matched):[]:i.matched;s(new h(e,n.source,o,i.score+(e.boost||0)))}}}if(n){let t=Object.create(null),e=0,s=(t,e)=>{var i,n;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(n=e.rank)&&void 0!==n?n:1e9)||(t.namee.score-t.score||a(t.completion,e.completion)))){let e=t.completion;!l||l.label!=e.label||l.detail!=e.detail||null!=l.type&&null!=e.type&&l.type!=e.type||l.apply!=e.apply||l.boost!=e.boost?r.push(t):C(t.completion)>C(l)&&(r[r.length-1]=t),l=t.completion}return r}(t,e);if(!r.length)return n&&t.some((t=>t.isPending))?n.setDisabled():null;let l=e.facet(b).selectOnOpen?0:-1;if(n&&n.selected!=l&&-1!=n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:V,above:s.aboveCursor},n?n.timestamp:Date.now(),l,!1)}map(t){return new M(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new M(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class O{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new O(R,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(b),n=(i.override||e.languageDataAt("autocomplete",c(e)).map(p)).map((e=>(this.active.find((t=>t.source==e))||new B(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=this.open,o=t.effects.some((t=>t.is(I)));s&&t.docChanged&&(s=s.map(t.changes)),t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;it.isPending))&&(s=null),!s&&n.every((t=>!t.isPending))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new B(t.source,0):t)));for(let e of t.effects)e.is(N)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new O(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?D:T}}const D={"aria-autocomplete":"list"},T={};function E(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const R=[];function L(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(u);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class B{constructor(t,e,i=!1){this.source=t,this.state=e,this.explicit=i}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let i=L(t,e),n=this;(8&i||16&i&&this.touches(t))&&(n=new B(n.source,0)),4&i&&0==n.state&&(n=new B(this.source,1)),n=n.updateFor(t,i);for(let e of t.effects)if(e.is(m))n=new B(n.source,1,e.value);else if(e.is(g))n=new B(n.source,0);else if(e.is(I))for(let t of e.value)t.source==n.source&&(n=t);return n}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(c(t.state))}}class P extends B{constructor(t,e,i,n,s,o){super(t,3,e),this.limit=i,this.result=n,this.from=s,this.to=o}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let n=this.result;n.map&&!t.changes.empty&&(n=n.map(n,t.changes));let s=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),l=c(t.state);if(l>o||!n||2&e&&(c(t.startState)==this.from||lt.map((t=>t.map(e)))}),N=n.Pe.define(),F=n.sU.define({create:()=>O.start(),update:(t,e)=>t.update(e),provide:t=>[s.DK.from(t,(t=>t.tooltip)),s.Lz.contentAttributes.from(t,(t=>t.attrs))]});function H(t,e){const i=e.completion.apply||e.completion.label;let s=t.state.field(F).active.find((t=>t.source==e.source));return s instanceof P&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,s){let{main:o}=t.selection,r=i-o.from,l=s-o.from;return Object.assign(Object.assign({},t.changeByRange((a=>{if(a!=o&&i!=s&&t.sliceDoc(a.from+r,a.from+l)!=t.sliceDoc(i,s))return{range:a};let h=t.toText(e);return{changes:{from:a.from+r,to:s==o.from?a.to:a.from+l,insert:h},range:n.OF.cursor(a.from+r+h.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,s.from,s.to)),{annotations:u.of(e.completion)})):i(t,e.completion,s.from,s.to),!0)}const V=A(F,H);function z(t,e="option"){return i=>{let n=i.state.field(F,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(t?1:-1):t?0:l-1;return a<0?a="page"==e?0:l-1:a>=l&&(a="page"==e?l-1:0),i.dispatch({effects:N.of(a)}),!0}}const W=t=>!!t.state.field(F,!1)&&(t.dispatch({effects:m.of(!0)}),!0);class q{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const j=s.Z9.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(F).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(F),i=t.state.facet(b);if(!t.selectionSet&&!t.docChanged&&t.startState.field(F)==e)return;let n=t.transactions.some((t=>{let e=L(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e50&&Date.now()-i.time>1e3){for(let t of i.context.abortListeners)try{t()}catch(t){(0,s.c_)(this.view.state,t)}i.context.abortListeners=null,this.running.splice(e--,1)}else i.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(m)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(F);for(let t of e.active)t.isPending&&!this.running.some((e=>e.active.source==t.source))&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}startQuery(t){let{state:e}=this.view,i=c(e),n=new r(e,i,t.explicit,this.view),o=new q(t,n);this.running.push(o),Promise.resolve(t.source(n)).then((t=>{o.context.aborted||(o.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:g.of(null)}),(0,s.c_)(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(b),n=this.view.state.field(F);for(let s=0;st.source==o.active.source));if(r&&r.isPending)if(null==o.done){let t=new B(o.active.source,0);for(let e of o.updates)t=t.update(e,i);t.isPending||e.push(t)}else this.startQuery(r)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:I.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(F,!1);if(e&&e.tooltip&&this.view.state.facet(b).closeOnBlur){let i=e.open&&(0,s.Eg)(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:g.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:m.of(!1)})),20),this.composing=0}}}),_="object"==typeof navigator&&/Win/.test(navigator.platform),K=n.Nb.highest(s.Lz.domEventHandlers({keydown(t,e){let i=e.state.field(F,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!_||!t.altKey)||t.metaKey)return!1;let n=i.open.options[i.open.selected],s=i.active.find((t=>t.source==n.source)),o=n.completion.commitCharacters||s.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&H(e,n),!1}})),$=s.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"var(--spice-text)"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"var(--spice-text)"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const U={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Y=n.Pe.define({map(t,e){let i=e.mapPos(t,-1,n.iR.TrackAfter);return null==i?void 0:i}}),G=new class extends n.FB{};G.startSide=1,G.endSide=-1;const J=n.sU.define({create:()=>n.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(Y)&&(t=t.update({add:[G.range(i.value,i.value+1)]}));return t}});function X(){return[it,J]}const Z="()[]{}<>";function Q(t){for(let e=0;e{if((et?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(s.length>2||2==s.length&&1==(0,n.Fh)((0,n.vS)(s,0))||e!=o.from||i!=o.to)return!1;let r=function(t,e){let i=tt(t,t.selection.main.head),s=i.brackets||U.brackets;for(let o of s){let r=Q((0,n.vS)(o,0));if(e==o)return r==o?lt(t,o,s.indexOf(o+o+o)>-1,i):ot(t,o,r,i.before||U.before);if(e==r&&nt(t,t.selection.main.from))return rt(t,o,r)}return null}(t.state,s);return!!r&&(t.dispatch(r),!0)}));function nt(t,e){let i=!1;return t.field(J).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function st(t,e){let i=t.sliceString(e,e+2);return i.slice(0,(0,n.Fh)((0,n.vS)(i,0)))}function ot(t,e,i,s){let o=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Y.of(r.to+e.length),range:n.OF.range(r.anchor+e.length,r.head+e.length)};let l=st(t.doc,r.head);return!l||/\s/.test(l)||s.indexOf(l)>-1?{changes:{insert:e+i,from:r.head},effects:Y.of(r.head+e.length),range:n.OF.cursor(r.head+e.length)}:{range:o=r}}));return o?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function rt(t,e,i){let s=null,o=t.changeByRange((e=>e.empty&&st(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:n.OF.cursor(e.head+i.length)}:s={range:e}));return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function lt(t,e,i,s){let r=s.stringPrefixes||U.stringPrefixes,l=null,a=t.changeByRange((s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Y.of(s.to+e.length),range:n.OF.range(s.anchor+e.length,s.head+e.length)};let a,h=s.head,c=st(t.doc,h);if(c==e){if(at(t,h))return{changes:{insert:e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)};if(nt(t,h)){let s=i&&t.sliceDoc(h,h+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+s.length,insert:s},range:n.OF.cursor(h+s.length)}}}else{if(i&&t.sliceDoc(h-2*e.length,h)==e+e&&(a=ht(t,h-2*e.length,r))>-1&&at(t,a))return{changes:{insert:e+e+e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)};if(t.charCategorizer(h)(c)!=n.Je.Word&&ht(t,h,r)>-1&&!function(t,e,i,n){let s=(0,o.mv)(t).resolveInner(e,-1),r=n.reduce(((t,e)=>Math.max(t,e.length)),0);for(let o=0;o<5;o++){let o=t.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),l=o.indexOf(i);if(!l||l>-1&&n.indexOf(o.slice(0,l))>-1){let e=s.firstChild;for(;e&&e.from==s.from&&e.to-e.from>i.length+l;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let a=s.to==e&&s.parent;if(!a)break;s=a}return!1}(t,h,e,r))return{changes:{insert:e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)}}return{range:l=s}}));return l?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function at(t,e){let i=(0,o.mv)(t).resolveInner(e+1);return i.parent&&i.from==e}function ht(t,e,i){let s=t.charCategorizer(e);if(s(t.sliceDoc(e-1,e))!=n.Je.Word)return e;for(let o of i){let i=e-o.length;if(t.sliceDoc(i,e)==o&&s(t.sliceDoc(i-1,i))!=n.Je.Word)return i}return-1}function ct(t={}){return[K,F,b.of(t),j,ut,$]}const dt=[{key:"Ctrl-Space",run:W},{mac:"Alt-`",run:W},{key:"Escape",run:t=>{let e=t.state.field(F,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:g.of(null)}),!0)}},{key:"ArrowDown",run:z(!0)},{key:"ArrowUp",run:z(!1)},{key:"PageDown",run:z(!0,"page")},{key:"PageUp",run:z(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(F,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.facet(b).defaultKeymap?[dt]:[])))},49281:(t,e,i)=>{i.d(e,{Yc:()=>It,b6:()=>y,cL:()=>F,pw:()=>Pt});var n=i(66144),s=i(26823),o=i(11418),r=i(55817);function l(t,e){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=t(e,i);return!!s&&(n(i.update(s)),!0)}}const a=l(p,0),h=l(f,0),c=l(((t,e)=>f(t,e,function(t){let e=[];for(let i of t.selection.ranges){let n=t.doc.lineAt(i.from),s=i.to<=n.to?n:t.doc.lineAt(i.to);s.from>n.from&&s.from==i.to&&(s=i.to==n.to+1?n:t.doc.lineAt(i.to-1));let o=e.length-1;o>=0&&e[o].to>n.from?e[o].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}(e))),0);function d(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const u=50;function f(t,e,i=e.selection.ranges){let n=i.map((t=>d(e,t.from).block));if(!n.every((t=>t)))return null;let s=i.map(((t,i)=>function(t,{open:e,close:i},n,s){let o,r,l=t.sliceDoc(n-u,n),a=t.sliceDoc(s,s+u),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,d=l.length-h;if(l.slice(d-e.length,d)==e&&a.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=2*u?o=r=t.sliceDoc(n,s):(o=t.sliceDoc(n,n+u),r=t.sliceDoc(s-u,s));let f=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(r)[0].length,m=r.length-p-i.length;return o.slice(f,f+e.length)==e&&r.slice(m,m+i.length)==i?{open:{pos:n+f+e.length,margin:/\s/.test(o.charAt(f+e.length))?1:0},close:{pos:s-p-i.length,margin:/\s/.test(r.charAt(m-1))?1:0}}:null}(e,n[i],t.from,t.to)));if(2!=t&&!s.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>s[e]?[]:[{from:t.from,insert:n[e].open+" "},{from:t.to,insert:" "+n[e].close}])))};if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(t==o||o>a.from)){s=a.from;let t=/^\s*/.exec(a.text)[0].length,e=t==a.length,i=a.text.slice(t,t+l.length)==l?t:-1;tt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:s,empty:o,single:r}of n)!r&&o||t.push({from:e.from+s,insert:i+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,o=n+s.length;" "==e.text[o-e.from]&&o++,t.push({from:n,to:o})}return{changes:t}}return null}const m=n.YH.define(),g=n.YH.define(),v=n.sj.define(),w=n.sj.define({combine:t=>(0,n.QR)(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,n)=>t(i,n)||e(i,n)})}),b=n.sU.define({create:()=>N.empty,update(t,e){let i=e.state.facet(w),s=e.annotation(m);if(s){let n=M.fromTransaction(e,s.selection),o=s.side,r=0==o?t.undone:t.done;return r=n?O(r,r.length,i.minDepth,n):R(r,e.startState.selection),new N(0==o?s.rest:r,0==o?r:s.rest)}let o=e.annotation(g);if("full"!=o&&"before"!=o||(t=t.isolate()),!1===e.annotation(n.ZX.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=M.fromTransaction(e),l=e.annotation(n.ZX.time),a=e.annotation(n.ZX.userEvent);return r?t=t.addChanges(r,l,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,l,a,i.newGroupDelay)),"full"!=o&&"after"!=o||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new N(t.done.map(M.fromJSON),t.undone.map(M.fromJSON))});function y(t={}){return[b,w.of(t),s.Lz.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?k:"historyRedo"==t.inputType?S:null;return!!i&&(t.preventDefault(),i(e))}})]}function x(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(b,!1);if(!s)return!1;let o=s.pop(t,i,e);return!!o&&(n(o),!0)}}const k=x(0,!1),S=x(1,!1),A=x(0,!0),C=x(1,!0);class M{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new M(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new M(t.changes&&n.VR.fromJSON(t.changes),[],t.mapped&&n.Gu.fromJSON(t.mapped),t.startSelection&&n.OF.fromJSON(t.startSelection),t.selectionsAfter.map(n.OF.fromJSON))}static fromTransaction(t,e){let i=T;for(let e of t.startState.facet(v)){let n=e(t);n.length&&(i=i.concat(n))}return!i.length&&t.changes.empty?null:new M(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,T)}static selection(t){return new M(void 0,T,void 0,void 0,t)}}function O(t,e,i,n){let s=e+1>i+20?e-i-1:0,o=t.slice(s,e);return o.push(n),o}function D(t,e){return t.length?e.length?t.concat(e):t:e}const T=[],E=200;function R(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-E));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),O(t,t.length-1,1e9,i.setSelAfter(n)))}return[M.selection([e])]}function L(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function B(t,e){if(!t.length)return t;let i=t.length,n=T;for(;i;){let s=P(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[M.selection(n)]:T}function P(t,e,i){let s=D(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):T,i);if(!t.changes)return M.selection(s);let o=t.changes.map(e),r=e.mapDesc(t.changes,!0),l=t.mapped?t.mapped.composeDesc(r):r;return new M(o,n.Pe.mapEffects(t.effects,e),l,t.startSelection.map(r),s)}const I=/^(input\.type|delete)($|\.)/;class N{constructor(t,e,i=0,n=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new N(this.done,this.undone):this}addChanges(t,e,i,s,o){let r=this.done,l=r[r.length-1];return r=l&&l.changes&&!l.changes.empty&&t.changes&&(!i||I.test(i))&&(!l.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,o)=>{for(let t=0;t=e&&s<=r&&(n=!0)}})),n}(l.changes,t.changes))||"input.type.compose"==i)?O(r,r.length-1,s.minDepth,new M(t.changes.compose(l.changes),D(n.Pe.mapEffects(t.effects,l.changes),l.effects),l.mapped,l.startSelection,T)):O(r,r.length,s.minDepth,t),new N(r,T,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:T;return s.length>0&&e-this.prevTimet.empty!=r.ranges[e].empty)).length)?this:new N(R(this.done,t),this.undone,e,i);var o,r}addMapping(t){return new N(B(this.done,t),B(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1],o=s.selectionsAfter[0]||e.selection;if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:m.of({side:t,rest:L(n),selection:o}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?T:n.slice(0,n.length-1);return s.mapped&&(i=B(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:m.of({side:t,rest:i,selection:o}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}N.empty=new N(T,T);const F=[{key:"Mod-z",run:k,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:S,preventDefault:!0},{linux:"Ctrl-Shift-z",run:S,preventDefault:!0},{key:"Mod-u",run:A,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function H(t,e){return n.OF.create(t.ranges.map(e),t.mainIndex)}function V(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function z({state:t,dispatch:e},i){let n=H(t.selection,i);return!n.eq(t.selection,!0)&&(e(V(t,n)),!0)}function W(t,e){return n.OF.cursor(e?t.to:t.from)}function q(t,e){return z(t,(i=>i.empty?t.moveByChar(i,e):W(i,e)))}function j(t){return t.textDirectionAt(t.state.selection.main.head)==s.OP.LTR}const _=t=>q(t,!j(t)),K=t=>q(t,j(t));function $(t,e){return z(t,(i=>i.empty?t.moveByGroup(i,e):W(i,e)))}"undefined"!=typeof Intl&&Intl.Segmenter;function U(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Y(t,e,i){let s,l,a=(0,o.mv)(t).resolveInner(e.head),h=i?r.uY.closedBy:r.uY.openedBy;for(let n=e.head;;){let e=i?a.childAfter(n):a.childBefore(n);if(!e)break;U(t,e,h)?a=e:n=i?e.to:e.from}return l=a.type.prop(h)&&(s=i?(0,o.jU)(t,a.from,1):(0,o.jU)(t,a.to,-1))&&s.matched?i?s.end.to:s.end.from:i?a.to:a.from,n.OF.cursor(l,i?-1:1)}function G(t,e){return z(t,(i=>{if(!i.empty)return W(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const J=t=>G(t,!1),X=t=>G(t,!0);function Z(t){let e,i=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,e,n.height):W(i,e)));if(r.eq(o.selection))return!1;if(n.selfScroll){let e=t.coordsAtPos(o.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,h=l.bottom-n.marginBottom;e&&e.top>a&&e.bottomQ(t,!1),et=t=>Q(t,!0);function it(t,e,i){let s=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,i);if(o.head==e.head&&o.head!=(i?s.to:s.from)&&(o=t.moveToLineBoundary(e,i,!1)),!i&&o.head==s.from&&s.length){let i=/^\s*/.exec(t.state.sliceDoc(s.from,Math.min(s.from+100,s.to)))[0].length;i&&e.head!=s.from+i&&(o=n.OF.cursor(s.from+i))}return o}function nt(t,e,i){let s=!1,r=H(t.selection,(e=>{let r=(0,o.jU)(t,e.head,-1)||(0,o.jU)(t,e.head,1)||e.head>0&&(0,o.jU)(t,e.head-1,1)||e.head{let i=e(t);return n.OF.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(V(t.state,i)),!0)}function ot(t,e){return st(t,(i=>t.moveByChar(i,e)))}const rt=t=>ot(t,!j(t)),lt=t=>ot(t,j(t));function at(t,e){return st(t,(i=>t.moveByGroup(i,e)))}function ht(t,e){return st(t,(i=>t.moveVertically(i,e)))}const ct=t=>ht(t,!1),dt=t=>ht(t,!0);function ut(t,e){return st(t,(i=>t.moveVertically(i,e,Z(t).height)))}const ft=t=>ut(t,!1),pt=t=>ut(t,!0),mt=({state:t,dispatch:e})=>(e(V(t,{anchor:0})),!0),gt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.doc.length})),!0),vt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.selection.main.anchor,head:0})),!0),wt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function bt(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:o}=t,r=o.changeByRange((s=>{let{from:o,to:r}=s;if(o==r){let n=e(s);no&&(i="delete.forward",n=yt(t,n,!0)),o=Math.min(o,n),r=Math.max(r,n)}else o=yt(t,o,!1),r=yt(t,r,!0);return o==r?{range:s}:{changes:{from:o,to:r},range:n.OF.cursor(o,oe(t))))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const xt=(t,e,i)=>bt(t,(s=>{let r,l,a=s.from,{state:h}=t,c=h.doc.lineAt(a);if(i&&!e&&a>c.from&&axt(t,!1,!0),St=t=>xt(t,!0,!1),At=(t,e)=>bt(t,(i=>{let s=i.head,{state:o}=t,r=o.doc.lineAt(s),l=o.charCategorizer(s);for(let t=null;;){if(s==(e?r.to:r.from)){s==i.head&&r.number!=(e?o.doc.lines:1)&&(s+=e?1:-1);break}let a=(0,n.zK)(r.text,s-r.from,e)+r.from,h=r.text.slice(Math.min(s,a)-r.from,Math.max(s,a)-r.from),c=l(h);if(null!=t&&c!=t)break;" "==h&&s==i.head||(t=c),s=a}return s})),Ct=t=>At(t,!1);function Mt(t){let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.from),o=t.doc.lineAt(n.to);if(n.empty||n.to!=o.from||(o=t.doc.lineAt(n.to-1)),i>=s.number){let t=e[e.length-1];t.to=o.to,t.ranges.push(n)}else e.push({from:s.from,to:o.to,ranges:[n]});i=o.number+1}return e}function Ot(t,e,i){if(t.readOnly)return!1;let s=[],o=[];for(let e of Mt(t)){if(i?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(i?e.to+1:e.from-1),l=r.length+1;if(i){s.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let i of e.ranges)o.push(n.OF.range(Math.min(t.doc.length,i.anchor+l),Math.min(t.doc.length,i.head+l)))}else{s.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)o.push(n.OF.range(t.anchor-l,t.head-l))}}return!!s.length&&(e(t.update({changes:s,scrollIntoView:!0,selection:n.OF.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Dt(t,e,i){if(t.readOnly)return!1;let n=[];for(let e of Mt(t))i?n.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):n.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Tt=Et(!1);function Et(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let s=e.changeByRange((i=>{let{from:s,to:l}=i,a=e.doc.lineAt(s),h=!t&&s==l&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=(0,o.mv)(t).resolveInner(e),s=n.childBefore(e),l=n.childAfter(e);return s&&l&&s.to<=e&&l.from>=e&&(i=s.type.prop(r.uY.closedBy))&&i.indexOf(l.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(l.from).from&&!/\S/.test(t.sliceDoc(s.to,l.from))?{from:s.to,to:l.from}:null}(e,s);t&&(s=l=(l<=a.to?a:e.doc.lineAt(l)).to);let c=new o.KB(e,{simulateBreak:s,simulateDoubleBreak:!!h}),d=(0,o._v)(c,s);for(null==d&&(d=(0,n.y$)(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));la.from&&s{let o=[];for(let n=s.from;n<=s.to;){let r=t.doc.lineAt(n);r.number>i&&(s.empty||s.to>r.from)&&(e(r,o,s),i=r.number),n=r.to+1}let r=t.changes(o);return{changes:o,range:n.OF.range(r.mapPos(s.anchor,1),r.mapPos(s.head,1))}}))}const Lt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Rt(t,((e,i)=>{i.push({from:e.from,insert:t.facet(o.Xt)})})),{userEvent:"input.indent"})),!0),Bt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Rt(t,((e,i)=>{let s=/^\s*/.exec(e.text)[0];if(!s)return;let r=(0,n.y$)(s,t.tabSize),l=0,a=(0,o.EI)(t,Math.max(0,r-(0,o.tp)(t)));for(;lz(t,(e=>Y(t.state,e,!j(t)))),shift:t=>st(t,(e=>Y(t.state,e,!j(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>z(t,(e=>Y(t.state,e,j(t)))),shift:t=>st(t,(e=>Y(t.state,e,j(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Ot(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Dt(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Ot(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Dt(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,s=null;return i.ranges.length>1?s=n.OF.create([i.main]):i.main.empty||(s=n.OF.create([n.OF.cursor(i.main.head)])),!!s&&(e(V(t,s)),!0)}},{key:"Mod-Enter",run:Et(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=Mt(t).map((({from:e,to:i})=>n.OF.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:n.OF.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=H(t.selection,(e=>{let i=(0,o.mv)(t),s=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=s.node.from&&t.node.to<=s.node.to&&(s=t)}for(let t=s;t;t=t.next){let{node:i}=t;if((i.from=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return n.OF.range(i.to,i.from)}return e}));return!i.eq(t.selection)&&(e(V(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:Bt},{key:"Mod-]",run:Lt},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new o.KB(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=Rt(t,((e,s,r)=>{let l=(0,o._v)(n,e.from);if(null==l)return;/\S/.test(e.text)||(l=0);let a=/^\s*/.exec(e.text)[0],h=(0,o.EI)(t,l);(a!=h||r.from{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(Mt(e).map((({from:t,to:i})=>(t>0?t--:i{let i;if(t.lineWrapping){let n=t.lineBlockAt(e.head),s=t.coordsAtPos(e.head,e.assoc||1);s&&(i=n.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>nt(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),n=d(t.state,i.from);return n.line?a(t):!!n.block&&c(t)}},{key:"Alt-A",run:h},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:_,shift:rt,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>$(t,!j(t)),shift:t=>at(t,!j(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>z(t,(e=>it(t,e,!j(t)))),shift:t=>st(t,(e=>it(t,e,!j(t)))),preventDefault:!0},{key:"ArrowRight",run:K,shift:lt,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>$(t,j(t)),shift:t=>at(t,j(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>z(t,(e=>it(t,e,j(t)))),shift:t=>st(t,(e=>it(t,e,j(t)))),preventDefault:!0},{key:"ArrowUp",run:J,shift:ct,preventDefault:!0},{mac:"Cmd-ArrowUp",run:mt,shift:vt},{mac:"Ctrl-ArrowUp",run:tt,shift:ft},{key:"ArrowDown",run:X,shift:dt,preventDefault:!0},{mac:"Cmd-ArrowDown",run:gt,shift:wt},{mac:"Ctrl-ArrowDown",run:et,shift:pt},{key:"PageUp",run:tt,shift:ft},{key:"PageDown",run:et,shift:pt},{key:"Home",run:t=>z(t,(e=>it(t,e,!1))),shift:t=>st(t,(e=>it(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:mt,shift:vt},{key:"End",run:t=>z(t,(e=>it(t,e,!0))),shift:t=>st(t,(e=>it(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:gt,shift:wt},{key:"Enter",run:Tt,shift:Tt},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:kt,shift:kt},{key:"Delete",run:St},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ct},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>At(t,!0)},{mac:"Mod-Backspace",run:t=>bt(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>bt(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.headz(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>st(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>z(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>st(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:St},{key:"Ctrl-h",run:kt},{key:"Ctrl-k",run:t=>bt(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:n.EY.of(["",""])},range:n.OF.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,s=t.doc.lineAt(i),o=i==s.from?i-1:(0,n.zK)(s.text,i-s.from,!1)+s.from,r=i==s.to?i+1:(0,n.zK)(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(o,i))},range:n.OF.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:et}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),It={key:"Tab",run:Lt,shift:Bt}},89796:(t,e,i)=>{i.d(e,{Pq:()=>l,cp:()=>o});var n=i(89022),s=i(11418);const o=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const i=function(t,e){let i;return(i=t.message.match(/at position (\d+)/))?Math.min(+i[1],e.length):(i=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+i[1]).from+ +i[2]-1,e.length):0}(e,t.state.doc);return[{from:i,message:e.message,severity:"error",to:i}]}return[]};const r=s.bj.define({name:"json",parser:n.K.configure({props:[s.Oh.add({Object:(0,s.mz)({except:/^\s*\}/}),Array:(0,s.mz)({except:/^\s*\]/})}),s.b_.add({"Object Array":s.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function l(){return new s.Yy(r)}},11418:(t,e,i)=>{i.d(e,{EI:()=>T,KB:()=>R,Lv:()=>lt,Oh:()=>L,SG:()=>At,WD:()=>W,Xt:()=>O,Yy:()=>C,_v:()=>E,b_:()=>j,bj:()=>p,cr:()=>ht,jU:()=>Dt,mv:()=>m,mz:()=>V,tp:()=>D,y9:()=>ft,yd:()=>_});var n,s=i(55817),o=i(66144),r=i(26823),l=i(40895),a=i(75002);const h=new s.uY;function c(t){return o.sj.define({combine:t?e=>e.concat(t):void 0})}const d=new s.uY;class u{constructor(t,e,i=[],n=""){this.data=t,this.name=n,o.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(o.$t.prototype,"tree",{get(){return m(this)}}),this.parser=e,this.extension=[A.of(this),o.$t.languageData.of(((t,e,i)=>{let n=f(t,e,i),s=n.type.prop(h);if(!s)return[];let o=t.facet(s),r=n.type.prop(d);if(r){let s=n.resolve(e-n.from,i);for(let e of r)if(e.test(s,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(o)}}return o}))].concat(i)}isActiveAt(t,e,i=-1){return f(t,e,i).type.prop(h)==this.data}findRegions(t){let e=t.facet(A);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(h)==this.data)return void i.push({from:e,to:e+t.length});let o=t.prop(s.uY.mounted);if(o){if(o.tree.prop(h)==this.data){if(o.overlay)for(let t of o.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(o.overlay){let t=i.length;if(n(o.tree,o.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}),t.name)}configure(t,e){return new p(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function m(t){let e=t.field(u.state,!1);return e?e.tree:s.PH.empty}class g{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let v=null;class w{constructor(t,e,i=[],n,s,o,r,l){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=r,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new w(t,e,[],s.PH.empty,0,i,[],null)}startParse(){return this.parser.startParse(new g(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=s.PH.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(s.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=v;v=this;try{return t()}finally{v=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=b(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:o,viewport:r,skipped:l}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=s.rr.applyChanges(i,e),n=s.PH.empty,o=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){l=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=b(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends s.iX{createParse(e,i,n){let o=n[0].from,r=n[n.length-1].to;return{parsedPos:o,advance(){let e=v;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new s.PH(s.Z6.none,[],[],r-o)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return v}}function b(t,e,i){return s.rr.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class y{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new y(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=w.create(t.facet(A).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new y(i)}}u.state=o.sU.define({create:y.init,update(t,e){for(let t of e.effects)if(t.is(u.setState))return t.value;return e.startState.facet(A)!=e.state.facet(A)?y.init(e.state):t.apply(e)}});let x=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(x=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const k="undefined"!=typeof navigator&&(null===(n=navigator.scheduling)||void 0===n?void 0:n.isInputPending)?()=>navigator.scheduling.isInputPending():null,S=r.Z9.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=x(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,l=s.context.work((()=>k&&k()||Date.now()>o),n+(r?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:u.setState.of(new y(s.context))})),this.chunkBudget>0&&(!l||r)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,r.c_)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),A=o.sj.define({combine:t=>t.length?t[0]:null,enables:t=>[u.state,S,r.Lz.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class C{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const M=o.sj.define(),O=o.sj.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function D(t){let e=t.facet(O);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function T(t,e){let i="",n=t.tabSize,s=t.facet(O)[0];if("\t"==s){for(;e>=n;)i+="\t",e-=n;s=" "}for(let t=0;t=e?function(t,e,i){let n=e.resolveStack(i),s=n.node.enterUnfinishedNodesBefore(i);if(s!=n.node){let t=[];for(let e=s;e!=n.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)n={node:t[e],next:n}}return B(n,t,i)}(t,i,e):null}class R{constructor(t,e={}){this.state=t,this.options=e,this.unit=D(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return(0,o.y$)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const L=new s.uY;function B(t,e,i){for(let n=t;n;n=n.next){let t=P(n.node);if(t)return t(N.create(e,i,n))}return 0}function P(t){let e=t.type.prop(L);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(s.uY.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>H(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?I:null}function I(){return 0}class N extends R{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new N(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(F(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return B(this.context.next,this.base,this.pos)}}function F(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function H(t,e,i,n,s){let o=t.textAfter,r=o.match(/^\s*/)[0].length,l=n&&o.slice(r,r+n.length)==n||s==t.pos+r,a=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,o=t.state.doc.lineAt(i.from),r=null==s||s<=o.from?o.to:Math.min(o.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped){if(s.from>=r)return null;let t=/^ */.exec(o.text.slice(i.to-o.from))[0].length;return{from:i.from,to:i.to+t}}t=s.to}}(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*i)}function V({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}const z=200;function W(){return o.$t.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+z)return t;let o=i.sliceString(s.from,n);if(!e.some((t=>t.test(o))))return t;let{state:r}=t,l=-1,a=[];for(let{head:t}of r.selection.ranges){let e=r.doc.lineAt(t);if(e.from==l)continue;l=e.from;let i=E(r,e.from);if(null==i)continue;let n=/^\s*/.exec(e.text)[0],s=T(r,i);n!=s&&a.push({from:e.from,to:e.from+n.length,insert:s})}return a.length?[t,{changes:a,sequential:!0}]:t}))}const q=o.sj.define(),j=new s.uY;function _(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&r.from=e&&n.to>i&&(s=n)}}return s}(t,e,i)}function U(t,e){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);return i>=n?void 0:{from:i,to:n}}const Y=o.Pe.define({map:U}),G=o.Pe.define({map:U});const J=o.sU.define({create:()=>r.NZ.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(Y)&&!Z(t,i.value.from,i.value.to)){let{preparePlaceholder:n}=e.state.facet(tt),s=n?r.NZ.replace({widget:new st(n(e.state,i.value))}):nt;t=t.update({add:[s.range(i.value.from,i.value.to)]})}else i.is(G)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>r.Lz.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i{(!s||s.from>t)&&(s={from:t,to:e})})),s}function Z(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}const Q={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},tt=o.sj.define({combine:t=>(0,o.QR)(t,Q)});function et(t){let e=[J,at];return t&&e.push(tt.of(t)),e}function it(t,e){let{state:i}=t,n=i.facet(tt),s=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=X(t.state,i.from,i.to);n&&t.dispatch({effects:G.of(n)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,s,e);let o=document.createElement("span");return o.textContent=n.placeholderText,o.setAttribute("aria-label",i.phrase("folded code")),o.title=i.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=s,o}const nt=r.NZ.replace({widget:new class extends r.xO{toDOM(t){return it(t,null)}}});class st extends r.xO{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return it(t,this.value)}}const ot={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class rt extends r.wJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function lt(t={}){let e=Object.assign(Object.assign({},ot),t),i=new rt(e,!0),n=new rt(e,!1),s=r.Z9.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(A)!=t.state.facet(A)||t.startState.field(J,!1)!=t.state.field(J,!1)||m(t.startState)!=m(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new o.vB;for(let s of t.viewportLineBlocks){let o=X(t.state,s.from,s.to)?n:$(t.state,s.from,s.to)?i:null;o&&e.add(s.from,s.from,o)}return e.finish()}}),{domEventHandlers:l}=e;return[s,(0,r.cU)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||o.om.empty},initialSpacer:()=>new rt(e,!1),domEventHandlers:Object.assign(Object.assign({},l),{click:(t,e,i)=>{if(l.click&&l.click(t,e,i))return!0;let n=X(t.state,e.from,e.to);if(n)return t.dispatch({effects:G.of(n)}),!0;let s=$(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:Y.of(s)}),!0)}})}),et()]}const at=r.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ht{constructor(t,e){let i;function n(t){let e=a.G.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?n(e.all):void 0,o=e.scope;this.scope=o instanceof u?t=>t.prop(h)==o.data:o?t=>t==o:void 0,this.style=(0,l.az)(t.map((t=>({tag:t.tag,class:t.class||n(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=i?new a.G(i):null,this.themeType=e.themeType}static define(t,e){return new ht(t,e||{})}}const ct=o.sj.define(),dt=o.sj.define({combine:t=>t.length?[t[0]]:null});function ut(t){let e=t.facet(ct);return e.length?e:t.facet(dt)}function ft(t,e){let i,n=[mt];return t instanceof ht&&(t.module&&n.push(r.Lz.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(dt.of(t)):i?n.push(ct.computeN([r.Lz.darkTheme],(e=>e.facet(r.Lz.darkTheme)==("dark"==i)?[t]:[]))):n.push(ct.of(t)),n}class pt{constructor(t){this.markCache=Object.create(null),this.tree=m(t.state),this.decorations=this.buildDeco(t,ut(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=m(t.state),i=ut(t.state),n=i!=ut(t.startState),{viewport:s}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||n)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return r.NZ.none;let i=new o.vB;for(let{from:n,to:s}of t.visibleRanges)(0,l.DM)(this.tree,e,((t,e,n)=>{i.add(t,e,this.markCache[n]||(this.markCache[n]=r.NZ.mark({class:n})))}),n,s);return i.finish()}}const mt=o.Nb.high(r.Z9.fromClass(pt,{decorations:t=>t.decorations})),gt=(l._A.meta,l._A.link,l._A.heading,l._A.emphasis,l._A.strong,l._A.strikethrough,l._A.keyword,l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName,l._A.literal,l._A.inserted,l._A.string,l._A.deleted,l._A.regexp,l._A.escape,l._A.string,l._A.variableName,l._A.variableName,l._A.typeName,l._A.namespace,l._A.className,l._A.variableName,l._A.macroName,l._A.propertyName,l._A.comment,l._A.invalid,r.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}})),vt=1e4,wt="()[]{}",bt=o.sj.define({combine:t=>(0,o.QR)(t,{afterCursor:!0,brackets:wt,maxScanDistance:vt,renderMatch:kt})}),yt=r.NZ.mark({class:"cm-matchingBracket"}),xt=r.NZ.mark({class:"cm-nonmatchingBracket"});function kt(t){let e=[],i=t.matched?yt:xt;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const St=[o.sU.define({create:()=>r.NZ.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(bt);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=Dt(e.state,t.head,-1,n)||t.head>0&&Dt(e.state,t.head-1,1,n)||n.afterCursor&&(Dt(e.state,t.head,1,n)||t.headr.Lz.decorations.from(t)}),gt];function At(t={}){return[bt.of(t),St]}const Ct=new s.uY;function Mt(t,e,i){let n=t.prop(e<0?s.uY.openedBy:s.uY.closedBy);if(n)return n;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function Ot(t){let e=t.type.prop(Ct);return e?e(t.node):t}function Dt(t,e,i,n={}){let s=n.maxScanDistance||vt,o=n.brackets||wt,r=m(t),l=r.resolveInner(e,i);for(let n=l;n;n=n.parent){let s=Mt(n.type,i,o);if(s&&n.from0?e>=r.from&&er.from&&e<=r.to))return Tt(t,e,i,n,r,s,o)}}return function(t,e,i,n,s,o,r){let l=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=r.indexOf(l);if(a<0||a%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),d=0;for(let t=0;!c.next().done&&t<=o;){let o=c.value;i<0&&(t+=o.length);let l=e+t*i;for(let t=i>0?0:o.length-1,e=i>0?o.length:-1;t!=e;t+=i){let e=r.indexOf(o[t]);if(!(e<0||n.resolveInner(l+t,1).type!=s))if(e%2==0==i>0)d++;else{if(1==d)return{start:h,end:{from:l+t,to:l+t+1},matched:e>>1==a>>1};d--}}i>0&&(t+=o.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,r,l.type,s,o)}function Tt(t,e,i,n,s,o,r){let l=n.parent,a={from:s.from,to:s.to},h=0,c=null==l?void 0:l.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==h&&o.indexOf(c.type.name)>-1&&c.from-1||(Lt.push(t),console.warn(e))}function Nt(t,e){let i=[];for(let n of e.split(" ")){let e=[];for(let i of n.split(".")){let n=t[i]||l._A[i];n?"function"==typeof n?e.length?e=e.map(n):It(i,`Modifier ${i} used at start of tag`):e.length?It(i,`Tag ${i} used as modifier`):e=Array.isArray(n)?n:[n]:It(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+i.map((t=>t.id)),r=Bt[o];if(r)return r.id;let a=Bt[o]=s.Z6.define({id:Rt.length,name:n,props:[(0,l.pn)({[n]:i})]});return Rt.push(a),a.id}r.OP.RTL,r.OP.LTR},34900:(t,e,i)=>{i.d(e,{_k:()=>d,bu:()=>x});var n=i(26823),s=i(66144),o=i(99359);class r{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class l{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let s=t,o=i.facet(y).markerFilter;o&&(s=o(s,i));let r=n.NZ.set(s.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?n.NZ.widget({widget:new A(t),diagnostic:t}).range(t.from):n.NZ.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new l(r,e,a(r))}}function a(t,e=null,i=0){let n=null;return t.between(i,1e9,((t,i,{spec:s})=>{if(!e||s.diagnostic==e)return n=new r(t,i,s.diagnostic),!1})),n}function h(t,e){let i=e.pos,n=e.end||i,s=t.state.facet(y).hideOn(t,i,n);if(null!=s)return s;let o=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(d)))&&!t.changes.touchesRange(o.from,Math.max(o.to,n)))}function c(t,e){return t.field(p,!1)?e:e.concat(s.Pe.appendConfig.of(E))}const d=s.Pe.define(),u=s.Pe.define(),f=s.Pe.define(),p=s.sU.define({create:()=>new l(n.NZ.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),n=null,s=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);n=a(i,t.selected.diagnostic,s)||a(i,null,s)}!i.size&&s&&e.state.facet(y).autoPanel&&(s=null),t=new l(i,s,n)}for(let i of e.effects)if(i.is(d)){let n=e.state.facet(y).autoPanel?i.value.length?M.open:null:t.panel;t=l.init(i.value,n,e.state)}else i.is(u)?t=new l(t.diagnostics,i.value?M.open:null,t.selected):i.is(f)&&(t=new l(t.diagnostics,t.panel,i.value));return t},provide:t=>[n.S7.from(t,(t=>t.panel)),n.Lz.decorations.from(t,(t=>t.diagnostics))]});const m=n.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function g(t,e,i){let{diagnostics:n}=t.state.field(p),s=[],o=2e8,r=0;n.between(e-(i<0?1:0),e+(i>0?1:0),((t,n,{spec:l})=>{e>=t&&e<=n&&(t==n||(e>t||i>0)&&(e({dom:v(t,s)})}:null}function v(t,e){return(0,o.A)("ul",{class:"cm-tooltip-lint"},e.map((e=>S(t,e,!1))))}const w=t=>{let e=t.state.field(p,!1);return!(!e||!e.panel)&&(t.dispatch({effects:u.of(!1)}),!0)},b=n.Z9.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(y);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t{n.push(i),clearTimeout(s),n.length==t.length?e(n):setTimeout((()=>e(n)),200)}),i)}(e.map((t=>Promise.resolve(t(this.view)))),(e=>{this.view.state.doc==t.doc&&this.view.dispatch(function(t,e){return{effects:c(t,[d.of(e)])}}(this.view.state,e.reduce(((t,e)=>t.concat(e)))))}),(t=>{(0,n.c_)(this.view.state,t)}))}}update(t){let e=t.state.facet(y);(t.docChanged||e!=t.startState.facet(y)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});const y=s.sj.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},(0,s.QR)(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function x(t,e={}){return[y.of({source:t,config:e}),b,E]}function k(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;tt.toLowerCase()==n.toLowerCase()))){e.push(n);continue t}}e.push("")}return e}function S(t,e,i){var n;let s=i?k(e.actions):[];return(0,o.A)("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},(0,o.A)("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(n=e.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=!1,l=n=>{if(n.preventDefault(),r)return;r=!0;let s=a(t.state.field(p).diagnostics,e);s&&i.apply(t,s.from,s.to)},{name:h}=i,c=s[n]?h.indexOf(s[n]):-1,d=c<0?h:[h.slice(0,c),(0,o.A)("u",h.slice(c,c+1)),h.slice(c+1)];return(0,o.A)("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[n]})"`}.`},d)})),e.source&&(0,o.A)("div",{class:"cm-diagnosticSource"},e.source))}class A extends n.xO{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return(0,o.A)("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class C{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=S(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class M{constructor(t){this.view=t,this.items=[];this.list=(0,o.A)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)w(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=k(i.actions);for(let s=0;s{for(let e=0;ew(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(p).selected;if(!t)return-1;for(let e=0;e{let l,a=-1;for(let t=i;ti&&(this.items.splice(i,a-i),n=!0)),e&&l.diagnostic==e.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),s=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),i++}));i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.tope.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=a(this.view.state.field(p).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:f.of(e)})}static open(t){return new M(t)}}function O(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function D(t){return O(``,'width="6" height="3"')}const T=n.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"var(--spice-text)",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:D("#d11")},".cm-lintRange-warning":{backgroundImage:D("orange")},".cm-lintRange-info":{backgroundImage:D("#999")},".cm-lintRange-hint":{backgroundImage:D("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});n.wJ;const E=[p,n.Lz.decorations.compute([p],(t=>{let{selected:e,panel:i}=t.field(p);return e&&i&&e.from!=e.to?n.NZ.set([m.range(e.from,e.to)]):n.NZ.none})),(0,n.Ux)(g,{hideOn:h}),T]},88170:(t,e,i)=>{i.d(e,{$P:()=>y,Eo:()=>Y,L0:()=>x,Ri:()=>T,jO:()=>U});var n=i(26823),s=i(66144),o=i(99359);const r="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class l{constructor(t,e,i=0,n=t.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(r(t)):r,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,s.vS)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,s.MK)(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=(0,s.Fh)(t);let n=this.normalize(e);if(n.length)for(let t=0,s=i;;t++){let o=n.charCodeAt(t),r=this.match(o,s,this.bufferPos+this.bufferStart);if(t==n.length-1){if(r)return this.value=r,this;break}s==i&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=p(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,e)))return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new u(e,t.sliceString(e,i));return d.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:o}=n;return o>e&&(s=t.sliceString(e,o)+s,o=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=p(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=u.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function p(t,e){if(e>=t.length)return e;let i,n=t.lineAt(e);for(;e=56320&&i<57344;)e++;return e}function m(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),i=(0,o.A)("input",{class:"cm-textfield",name:"line",value:e});function r(){let e=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(i.value);if(!e)return;let{state:o}=t,r=o.doc.lineAt(o.selection.main.head),[,l,a,h,c]=e,d=h?+h.slice(1):0,u=a?+a:r.number;if(a&&c){let t=u/100;l&&(t=t*("-"==l?-1:1)+r.number/o.doc.lines),u=Math.round(o.doc.lines*t)}else a&&l&&(u=u*("-"==l?-1:1)+r.number);let f=o.doc.line(Math.max(1,Math.min(o.doc.lines,u))),p=s.OF.cursor(f.from+Math.max(0,Math.min(d,f.length)));t.dispatch({effects:[g.of(!1),n.Lz.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:(0,o.A)("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:g.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),r())},onsubmit:t=>{t.preventDefault(),r()}},(0,o.A)("label",t.state.phrase("Go to line"),": ",i)," ",(0,o.A)("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(c.prototype[Symbol.iterator]=f.prototype[Symbol.iterator]=function(){return this});const g=s.Pe.define(),v=s.sU.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(g)&&(t=i.value);return t},provide:t=>n.S7.from(t,(t=>t?m:null))}),w=n.Lz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}});const b=s.sj.define({combine:t=>(0,s.QR)(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new G(t),scrollToMatch:t=>n.Lz.scrollIntoView(t)})});function y(t){return t?[b.of(t),et]:et}class x{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,h),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new D(this):new A(this)}getCursor(t,e=0,i){let n=t.doc?t:s.$t.create({doc:t});return null==i&&(i=n.doc.length),this.regexp?C(this,n,e,i):S(this,n,e,i)}}class k{constructor(t){this.spec=t}}function S(t,e,i,n){return new l(e.doc,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(o=e.doc,r=e.charCategorizer(e.selection.main.head),(t,e,i,n)=>((n>t||n+i.length=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=S(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function C(t,e,i,n){return new c(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(o=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(o(M(i.input,i.index))!=s.Je.Word||o(O(i.input,i.index))!=s.Je.Word)&&(o(O(i.input,i.index+i[0].length))!=s.Je.Word||o(M(i.input,i.index+i[0].length))!=s.Je.Word)):void 0},i,n);var o}function M(t,e){return t.slice((0,s.zK)(t,e,!1),e)}function O(t,e){return t.slice(e,(0,s.zK)(t,e))}class D extends k{nextMatch(t,e,i){let n=C(this.spec,t,i,t.doc.length).next();return n.done&&(n=C(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),o=C(this.spec,t,s,i),r=null;for(;!o.next().done;)r=o.value;if(r&&(s==e||r.from>s+10))return r;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=C(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const T=s.Pe.define(),E=s.Pe.define(),R=s.sU.define({create:t=>new L(j(t).create(),null),update(t,e){for(let i of e.effects)i.is(T)?t=new L(i.value.create(),t.panel):i.is(E)&&(t=new L(t.query,i.value?q:null));return t},provide:t=>n.S7.from(t,(t=>t.panel))});class L{constructor(t,e){this.query=t,this.panel=e}}const B=n.NZ.mark({class:"cm-searchMatch"}),P=n.NZ.mark({class:"cm-searchMatch cm-searchMatch-selected"}),I=n.Z9.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(R))}update(t){let e=t.state.field(R);(e!=t.startState.field(R)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return n.NZ.none;let{view:i}=this,o=new s.vB;for(let e=0,n=i.visibleRanges,s=n.length;en[e+1].from-500;)l=n[++e].to;t.highlight(i.state,r,l,((t,e)=>{let n=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));o.add(t,e,n?P:B)}))}return o.finish()}},{decorations:t=>t.decorations});function N(t){return e=>{let i=e.state.field(R,!1);return i&&i.query.spec.valid?t(e,i):$(e)}}const F=N(((t,{query:e})=>{let{to:i}=t.state.selection.main,n=e.nextMatch(t.state,i,i);if(!n)return!1;let o=s.OF.single(n.from,n.to),r=t.state.facet(b);return t.dispatch({selection:o,effects:[Q(t,n),r.scrollToMatch(o.main,t)],userEvent:"select.search"}),K(t),!0})),H=N(((t,{query:e})=>{let{state:i}=t,{from:n}=i.selection.main,o=e.prevMatch(i,n,n);if(!o)return!1;let r=s.OF.single(o.from,o.to),l=t.state.facet(b);return t.dispatch({selection:r,effects:[Q(t,o),l.scrollToMatch(r.main,t)],userEvent:"select.search"}),K(t),!0})),V=N(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length)&&(t.dispatch({selection:s.OF.create(i.map((t=>s.OF.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),z=N(((t,{query:e})=>{let{state:i}=t,{from:o,to:r}=i.selection.main;if(i.readOnly)return!1;let l=e.nextMatch(i,o,o);if(!l)return!1;let a,h,c=l,d=[],u=[];if(c.from==o&&c.to==r&&(h=i.toText(e.getReplacement(c)),d.push({from:c.from,to:c.to,insert:h}),c=e.nextMatch(i,c.from,c.to),u.push(n.Lz.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),c){let e=0==d.length||d[0].from>=l.to?0:l.to-l.from-h.length;a=s.OF.single(c.from-e,c.to-e),u.push(Q(t,c)),u.push(i.facet(b).scrollToMatch(a.main,t))}return t.dispatch({changes:d,selection:a,effects:u,userEvent:"input.replace"}),!0})),W=N(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));if(!i.length)return!1;let s=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:n.Lz.announce.of(s),userEvent:"input.replace.all"}),!0}));function q(t){return t.state.facet(b).createPanel(t)}function j(t,e){var i,n,s,o,r;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=t.facet(b);return new x({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==e?void 0:e.caseSensitive)&&void 0!==n?n:h.caseSensitive,literal:null!==(s=null==e?void 0:e.literal)&&void 0!==s?s:h.literal,regexp:null!==(o=null==e?void 0:e.regexp)&&void 0!==o?o:h.regexp,wholeWord:null!==(r=null==e?void 0:e.wholeWord)&&void 0!==r?r:h.wholeWord})}function _(t){let e=(0,n.ld)(t,q);return e&&e.dom.querySelector("[main-field]")}function K(t){let e=_(t);e&&e==t.root.activeElement&&e.select()}const $=t=>{let e=t.state.field(R,!1);if(e&&e.panel){let i=_(t);if(i&&i!=t.root.activeElement){let n=j(t.state,e.query.spec);n.valid&&t.dispatch({effects:T.of(n)}),i.focus(),i.select()}}else t.dispatch({effects:[E.of(!0),e?T.of(j(t.state,e.query.spec)):s.Pe.appendConfig.of(et)]});return!0},U=t=>{let e=t.state.field(R,!1);if(!e||!e.panel)return!1;let i=(0,n.ld)(t,q);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:E.of(!1)}),!0},Y=[{key:"Mod-f",run:$,scope:"editor search-panel"},{key:"F3",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:U,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:o}=i.main,r=[],a=0;for(let e=new l(t.doc,t.sliceDoc(n,o));!e.next().done;){if(r.length>1e3)return!1;e.value.from==n&&(a=r.length),r.push(s.OF.range(e.value.from,e.value.to))}return e(t.update({selection:s.OF.create(r,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=(0,n.ld)(t,m);if(!e){let i=[g.of(!0)];null==t.state.field(v,!1)&&i.push(s.Pe.appendConfig.of([v,w])),t.dispatch({effects:i}),e=(0,n.ld)(t,m)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=s.OF.create(i.ranges.map((e=>t.wordAt(e.head)||s.OF.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let o=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=o)))return!1;let r=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),o=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new l(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(o){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new l(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,o);return!!r&&(e(t.update({selection:t.selection.addRange(s.OF.range(r.from,r.to),!1),effects:n.Lz.scrollIntoView(r.to)})),!0)},preventDefault:!0}];class G{constructor(t){this.view=t;let e=this.query=t.state.field(R).query.spec;function i(t,e,i){return(0,o.A)("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=(0,o.A)("input",{value:e.search,placeholder:J(t,"Find"),"aria-label":J(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=(0,o.A)("input",{value:e.replace,placeholder:J(t,"Replace"),"aria-label":J(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=(0,o.A)("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=(0,o.A)("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=(0,o.A)("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=(0,o.A)("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>F(t)),[J(t,"next")]),i("prev",(()=>H(t)),[J(t,"previous")]),i("select",(()=>V(t)),[J(t,"all")]),(0,o.A)("label",null,[this.caseField,J(t,"match case")]),(0,o.A)("label",null,[this.reField,J(t,"regexp")]),(0,o.A)("label",null,[this.wordField,J(t,"by word")]),...t.state.readOnly?[]:[(0,o.A)("br"),this.replaceField,i("replace",(()=>z(t)),[J(t,"replace")]),i("replaceAll",(()=>W(t)),[J(t,"replace all")])],(0,o.A)("button",{name:"close",onclick:()=>U(t),"aria-label":J(t,"close"),type:"button"},["×"])])}commit(){let t=new x({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:T.of(t)}))}keydown(t){(0,n.TS)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?H:F)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),z(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(T)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(b).top}}function J(t,e){return t.state.phrase(e)}const X=30,Z=/[\s\.,:;?!]/;function Q(t,{from:e,to:i}){let s=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,r=Math.max(s.from,e-X),l=Math.min(o,i+X),a=t.state.sliceDoc(r,l);if(r!=s.from)for(let t=0;ta.length-X;t--)if(!Z.test(a[t-1])&&Z.test(a[t])){a=a.slice(0,t);break}return n.Lz.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${s.number}.`)}const tt=n.Lz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),et=[R,s.Nb.low(I),tt]},66144:(t,e,i)=>{i.d(e,{$t:()=>Ot,EY:()=>n,FB:()=>Tt,Fh:()=>A,Gu:()=>O,Je:()=>St,MK:()=>S,Nb:()=>Z,OF:()=>N,Pe:()=>mt,QR:()=>Dt,VR:()=>D,YH:()=>ut,ZX:()=>gt,iR:()=>M,kn:()=>$t,om:()=>Bt,sU:()=>$,sj:()=>V,vB:()=>Pt,vS:()=>k,xx:()=>tt,y$:()=>Kt,zK:()=>v});class n{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=u(this,t,e);let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),o.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=u(this,t,e);let i=[];return this.decompose(t,e,i,0),o.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new a(this),s=new a(t);for(let t=e,o=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(o+=n.value.length,n.done||o>=i)return!0}}iter(t=1){return new a(this,t)}iterRange(t,e=this.length){return new h(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):o.from(s.split(t,[])):n.empty}}class s extends n{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let o=this.text[s],r=n+o.length;if((e?i:r)>=t)return new d(n,r,i,o);n=r+1,i++}}decompose(t,e,i,n){let o=t<=0&&e>=this.length?this:new s(l(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=r(o.text,t.text.slice(),0,o.length);if(e.length<=32)i.push(new s(e,t.length+o.length));else{let t=e.length>>1;i.push(new s(e.slice(0,t)),new s(e.slice(t)))}}else i.push(o)}replace(t,e,i){if(!(i instanceof s))return super.replace(t,e,i);[t,e]=u(this,t,e);let n=r(this.text,r(i.text,l(this.text,0,t)),e),a=this.length+i.length-(e-t);return n.length<=32?new s(n,a):o.from(s.split(n,[]),a)}sliceString(t,e=this.length,i="\n"){[t,e]=u(this,t,e);let n="";for(let s=0,o=0;s<=e&&ot&&o&&(n+=i),ts&&(n+=r.slice(Math.max(0,t-s),e-s)),s=l+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let o of t)i.push(o),n+=o.length+1,32==i.length&&(e.push(new s(i,n)),i=[],n=-1);return n>-1&&e.push(new s(i,n)),e}}class o extends n{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let o=this.children[s],r=n+o.length,l=i+o.lines-1;if((e?l:r)>=t)return o.lineInner(t,e,i,n);n=r+1,i=l+1}}decompose(t,e,i,n){for(let s=0,o=0;o<=e&&s=o){let s=n&((o<=t?1:0)|(l>=e?2:0));o>=t&&l<=e&&!s?i.push(r):r.decompose(t-o,e-o,i,s)}o=l+1}}replace(t,e,i){if([t,e]=u(this,t,e),i.lines=s&&e<=l){let a=r.replace(t-s,e-s,i),h=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let s=this.children.slice();return s[n]=a,new o(s,this.length-(e-t)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=u(this,t,e);let n="";for(let s=0,o=0;st&&s&&(n+=i),to&&(n+=r.sliceString(t-o,e-o,i)),o=l+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof o))return 0;let i=0,[n,s,r,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==l)return i;let o=this.children[n],a=t.children[s];if(o!=a)return i+o.scanIdentical(a,e);i+=o.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new s(i,e)}let n=Math.max(32,i>>5),r=n<<1,l=n>>1,a=[],h=0,c=-1,d=[];function u(t){let e;if(t.lines>r&&t instanceof o)for(let e of t.children)u(e);else t.lines>l&&(h>l||!h)?(f(),a.push(t)):t instanceof s&&h&&(e=d[d.length-1])instanceof s&&t.lines+e.lines<=32?(h+=t.lines,c+=t.length+1,d[d.length-1]=new s(e.text.concat(t.text),e.length+1+t.length)):(h+t.lines>n&&f(),h+=t.lines,c+=t.length+1,d.push(t))}function f(){0!=h&&(a.push(1==d.length?d[0]:o.from(d,c)),c=-1,h=d.length=0)}for(let e of t)u(e);return f(),1==a.length?a[0]:new o(a,e)}}function r(t,e,i=0,n=1e9){for(let s=0,o=0,r=!0;o=i&&(a>n&&(l=l.slice(0,n-s)),s0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],o=this.offsets[i],r=o>>1,l=n instanceof s?n.text.length:n.children.length;if(r==(e>0?l:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof s){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let o=n.children[r+(e<0?-1:0)];t>o.length?(t-=o.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(e>0?1:(o instanceof s?o.text.length:o.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class h{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new a(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this.iter()},a.prototype[Symbol.iterator]=h.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class d{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}function u(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let f="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;tt)return f[e-1]<=t;return!1}function m(t){return t>=127462&&t<=127487}const g=8205;function v(t,e,i=!0,n=!0){return(i?w:b)(t,e,n)}function w(t,e,i){if(e==t.length)return e;e&&y(t.charCodeAt(e))&&x(t.charCodeAt(e-1))&&e--;let n=k(t,e);for(e+=A(n);e=0&&m(k(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function b(t,e,i){for(;e>0;){let n=w(t,e-2,i);if(n=56320&&t<57344}function x(t){return t>=55296&&t<56320}function k(t,e){let i=t.charCodeAt(e);if(!x(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return y(n)?n-56320+(i-55296<<10)+65536:i}function S(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function A(t){return t<65536?1:2}const C=/\r\n?|\n/;var M=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(M||(M={}));class O{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=r}else{if(i!=M.Simple&&a>=t&&(i==M.TrackDel&&nt||i==M.TrackBefore&&nt))return null;if(a>t||a==t&&e<0&&!r)return t==n||e<0?s:s+l;s+=l}n=a}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new O(t)}static create(t){return new O(t)}}class D extends O{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return R(this,((e,i,n,s,o)=>t=t.replace(n,n+(i-e),o)),!1),t}mapDesc(t,e=!1){return L(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let s=0,o=0;s=0){e[s]=l,e[s+1]=r;let a=s>>1;for(;i.length0&&E(i,e,s.text),s.forward(t),r+=t}let a=t[o++];for(;r>1].toJSON()))}return t}static of(t,e,i){let s=[],o=[],r=0,l=null;function a(t=!1){if(!t&&!s.length)return;rl||t<0||l>e)throw new RangeError(`Invalid change range ${t} to ${l} (in doc of length ${e})`);let d=c?"string"==typeof c?n.of(c.split(i||C)):c:n.empty,u=d.length;if(t==l&&0==u)return;tr&&T(s,t-r,-1),T(s,l-t,u),E(o,s,d),r=l}}(t),a(!l),l}static empty(t){return new D(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let s=0;se&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)e.push(o[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function E(t,e,i){if(0==i.length)return;let s=e.length-2>>1;if(s>1])),!(i||l==t.sections.length||t.sections[l+1]<0);)a=t.sections[l++],h=t.sections[l++];e(o,c,r,d,u),o=c,r=d}}}function L(t,e,i,n=!1){let s=[],o=n?[]:null,r=new P(t),l=new P(e);for(let t=-1;;)if(-1==r.ins&&-1==l.ins){let t=Math.min(r.len,l.len);T(s,t,-1),r.forward(t),l.forward(t)}else if(l.ins>=0&&(r.ins<0||t==r.i||0==r.off&&(l.len=0&&t=0)){if(r.done&&l.done)return o?D.createSet(s,o):O.create(s);throw new Error("Mismatched change set lengths")}{let e=0,i=r.len;for(;i;)if(-1==l.ins){let t=Math.min(i,l.len);e+=t,i-=t,l.forward(t)}else{if(!(0==l.ins&&l.lene||r.ins>=0&&r.len>e)&&(t||n.length>i),o.forward2(e),r.forward(e)}}else T(n,0,r.ins,t),s&&E(s,n,r.text),r.next()}}class P{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?n.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?n.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class I{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new I(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return N.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return N.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return N.range(t.anchor,t.head)}static create(t,e,i){return new I(t,e,i)}}class N{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:N.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new N(t.ranges.map((t=>I.fromJSON(t))),t.main)}static single(t,e=t){return new N([N.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?8:0)|s)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?N.range(r,o):N.range(o,r))}}return new N(t,e)}}function F(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let H=0;class V{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.id=H++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new V(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:z),!!t.static,t.enables)}of(t){return new W([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function z(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class W{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=H++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,o=t[s]>>1,r=2==this.type,l=!1,a=!1,h=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?a=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&h.push(t[i.id]);return{create:t=>(t.values[o]=i(t),1),update(t,e){if(l&&e.docChanged||a&&(e.docChanged||e.selection)||j(t,h)){let e=i(t);if(r?!q(e,t.values[o],n):!n(e,t.values[o]))return t.values[o]=e,1}return 0},reconfigure:(t,e)=>{let l,a=e.config.address[s];if(null!=a){let s=st(e,a);if(this.dependencies.every((i=>i instanceof V?e.facet(i)===t.facet(i):!(i instanceof $)||e.field(i,!1)==t.field(i,!1)))||(r?q(l=i(t),s,n):n(l=i(t),s)))return t.values[o]=s,0}else l=i(t);return t.values[o]=l,1}}}}function q(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),o=n.filter((t=>!(1&t))),r=t[e.id]>>1;function l(t){let i=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(K).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,K.of({field:this,create:t})]}get extension(){return this}}const U=4,Y=3,G=2,J=1;function X(t){return e=>new Q(e,t)}const Z={highest:X(0),high:X(J),default:X(G),low:X(Y),lowest:X(U)};class Q{constructor(t,e){this.inner=t,this.prec=e}}class tt{of(t){return new et(this,t)}reconfigure(t){return tt.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class et{constructor(t,e){this.compartment=t,this.inner=e}}class it{constructor(t,e,i,n,s,o){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),o=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function o(t,r){let l=s.get(t);if(null!=l){if(l<=r)return;let e=n[l].indexOf(t);e>-1&&n[l].splice(e,1),t instanceof et&&i.delete(t.compartment)}if(s.set(t,r),Array.isArray(t))for(let e of t)o(e,r);else if(t instanceof et){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),o(n,r)}else if(t instanceof Q)o(t.inner,t.prec);else if(t instanceof $)n[r].push(t),t.provides&&o(t.provides,r);else if(t instanceof W)n[r].push(t),t.facet.extensions&&o(t.facet.extensions,G);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(e,r)}}return o(t,G),n.reduce(((t,e)=>t.concat(e)))}(t,e,o))i instanceof $?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let r=Object.create(null),l=[],a=[];for(let t of n)r[t.id]=a.length<<1,a.push((e=>t.slot(e)));let h=null==i?void 0:i.config.facets;for(let t in s){let e=s[t],n=e[0].facet,o=h&&h[t]||[];if(e.every((t=>0==t.type)))if(r[n.id]=l.length<<1|1,z(o,e))l.push(i.facet(n));else{let t=n.combine(e.map((t=>t.value)));l.push(i&&n.compare(t,i.facet(n))?i.facet(n):t)}else{for(let t of e)0==t.type?(r[t.id]=l.length<<1|1,l.push(t.value)):(r[t.id]=a.length<<1,a.push((e=>t.dynamicSlot(e))));r[n.id]=a.length<<1,a.push((t=>_(t,n,e)))}}let c=a.map((t=>t(r)));return new it(t,o,c,r,l,s)}}function nt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function st(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const ot=V.define(),rt=V.define({combine:t=>t.some((t=>t)),static:!0}),lt=V.define({combine:t=>t.length?t[0]:void 0,static:!0}),at=V.define(),ht=V.define(),ct=V.define(),dt=V.define({combine:t=>!!t.length&&t[0]});class ut{constructor(t,e){this.type=t,this.value=e}static define(){return new ft}}class ft{of(t){return new ut(this,t)}}class pt{constructor(t){this.map=t}of(t){return new mt(this,t)}}class mt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new mt(this.type,e)}is(t){return this.type==t}static define(t={}){return new pt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}mt.reconfigure=mt.define(),mt.appendConfig=mt.define();class gt{constructor(t,e,i,n,s,o){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&F(i,e.newLength),s.some((t=>t.type==gt.time))||(this.annotations=s.concat(gt.time.of(Date.now())))}static create(t,e,i,n,s,o){return new gt(t,e,i,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(gt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function vt(t,e){let i=[];for(let n=0,s=0;;){let o,r;if(n=t[n]))o=t[n++],r=t[n++];else{if(!(s=0;s--){let o=i[s](t);o&&Object.keys(o).length&&(n=wt(n,bt(e,o,t.changes.newLength),!0))}return n==t?t:gt.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(at)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:vt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=D.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=gt.create(e,n,t.selection&&t.selection.map(s),mt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(ht);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof gt?s:Array.isArray(s)&&1==s.length&&s[0]instanceof gt?s[0]:yt(e,kt(s),!1)}return t}(s):s)}gt.time=ut.define(),gt.userEvent=ut.define(),gt.addToHistory=ut.define(),gt.remote=ut.define();const xt=[];function kt(t){return null==t?xt:Array.isArray(t)?t:[t]}var St=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(St||(St={}));const At=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ct;try{Ct=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function Mt(t){return e=>{if(!/\S/.test(e))return St.Space;if(function(t){if(Ct)return Ct.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||At.test(i)))return!0}return!1}(e))return St.Word;for(let i=0;i-1)return St.Word;return St.Other}}class Ot{constructor(t,e,i,n,s,o){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(mt.reconfigure)?(i=null,n=e.value):e.is(mt.appendConfig)&&(i=null,n=kt(n).concat(e.value));if(i)e=t.startState.values.slice();else{i=it.resolve(n,s,this),e=new Ot(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let o=t.startState.facet(rt)?t.newSelection:t.newSelection.asSingle();new Ot(i,t.newDoc,o,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:N.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],o=kt(i.effects);for(let i=1;is.spec.fromJSON(o,t))))}return Ot.create({doc:t.doc,selection:N.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=it.resolve(t.extensions||[],new Map),i=t.doc instanceof n?t.doc:n.of((t.doc||"").split(e.staticFacet(Ot.lineSeparator)||C)),s=t.selection?t.selection instanceof N?t.selection:N.single(t.selection.anchor,t.selection.head):N.single(0);return F(s,i.length),e.staticFacet(rt)||(s=s.asSingle()),new Ot(e,i,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Ot.tabSize)}get lineBreak(){return this.facet(Ot.lineSeparator)||"\n"}get readOnly(){return this.facet(dt)}phrase(t,...e){for(let e of this.facet(Ot.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>e.length?t:e[n-1]}))),t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(ot))for(let o of s(this,e,i))Object.prototype.hasOwnProperty.call(o,t)&&n.push(o[t]);return n}charCategorizer(t){return Mt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),o=t-i,r=t-i;for(;o>0;){let t=v(e,o,!1);if(s(e.slice(t,o))!=St.Word)break;o=t}for(;rt.length?t[0]:4}),Ot.lineSeparator=lt,Ot.readOnly=dt,Ot.phrases=V.define({compare(t,e){let i=Object.keys(t),n=Object.keys(e);return i.length==n.length&&i.every((i=>t[i]==e[i]))}}),Ot.languageData=ot,Ot.changeFilter=at,Ot.transactionFilter=ht,Ot.transactionExtender=ct,tt.reconfigure=mt.define();class Tt{eq(t){return this==t}range(t,e=t){return Et.create(t,e,this)}}Tt.prototype.startSide=Tt.prototype.endSide=0,Tt.prototype.point=!1,Tt.prototype.mapMode=M.TrackDel;class Et{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new Et(t,e,i)}}function Rt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Lt{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let o=n,r=s.length;;){if(o==r)return o;let n=o+r>>1,l=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==o)return l>=0?o:r;l>=0?r=n:o=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sh||a==h&&c.startSide>0&&c.endSide<=0)continue;(h-a||c.endSide-c.startSide)<0||(o<0&&(o=a),c.point&&(r=Math.max(r,h-a)),i.push(c),n.push(a-o),s.push(h-o))}return{mapped:i.length?new Lt(n,s,i,r):null,pos:o}}}class Bt{constructor(t,e,i,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}static create(t,e,i,n){return new Bt(t,e,i,n)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,o=t.filter;if(0==e.length&&!o)return this;if(i&&(e=e.slice().sort(Rt)),this.isEmpty)return e.length?Bt.of(e):this;let r=new Nt(this,null,-1).goto(0),l=0,a=[],h=new Pt;for(;r.value||l=0){let t=e[l++];h.addInner(t.from,t.to,t.value)||a.push(t)}else 1==r.rangeIndex&&r.chunkIndexthis.chunkEnd(r.chunkIndex)||sr.to||s=s&&t<=s+o.length&&!1===o.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Ft.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Ft.from(t).goto(e)}static compare(t,e,i,n,s=-1){let o=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),r=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),l=It(o,r,i),a=new Vt(o,l,s),h=new Vt(r,l,s);i.iterGaps(((t,e,i)=>zt(a,t,h,e,i,n))),i.empty&&0==i.length&&zt(a,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=o.length)return!1;if(!s.length)return!0;let r=It(s,o),l=new Vt(s,r,0).goto(i),a=new Vt(o,r,0).goto(i);for(;;){if(l.to!=a.to||!Wt(l.active,a.active)||l.point&&(!a.point||!l.point.eq(a.point)))return!1;if(l.to>n)return!0;l.next(),a.next()}}static spans(t,e,i,n,s=-1){let o=new Vt(t,null,s).goto(e),r=e,l=o.openStart;for(;;){let t=Math.min(o.to,i);if(o.point){let i=o.activeForPoint(o.to),s=o.pointFromr&&(n.span(r,t,o.active,l),l=o.openEnd(t));if(o.to>i)return l+(o.point&&o.to>i?1:0);r=o.to,o.next()}}static of(t,e=!1){let i=new Pt;for(let n of t instanceof Et?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Rt);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}static join(t){if(!t.length)return Bt.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let n=t[i];n!=Bt.empty;n=n.nextLayer)e=new Bt(n.chunkPos,n.chunk,e,Math.max(n.maxPoint,e.maxPoint));return e}}Bt.empty=new Bt([],[],null,-1),Bt.empty.nextLayer=Bt.empty;class Pt{finishChunk(t){this.chunks.push(new Lt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Pt)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Bt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Bt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function It(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Nt(o,e,i,s));return 1==n.length?n[0]:new Ft(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ht(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ht(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ht(this.heap,0)}}}function Ht(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class Vt{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ft.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){qt(this.active,t),qt(this.activeTo,t),qt(this.activeRank,t),this.minActive=_t(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e0;)e++;jt(this.active,e,i),jt(this.activeTo,e,n),jt(this.activeRank,e,s),t&&jt(t,e,this.cursor.from),this.minActive=_t(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>t){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&qt(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[e]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function zt(t,e,i,n,s,o){t.goto(e),i.goto(n);let r=n+s,l=n,a=n-e;for(;;){let e=t.to+a-i.to||t.endSide-i.endSide,n=e<0?t.to+a:i.to,s=Math.min(n,r);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Wt(t.activeForPoint(t.to),i.activeForPoint(i.to))||o.comparePoint(l,s,t.point,i.point):s>l&&!Wt(t.active,i.active)&&o.compareRange(l,s,t.active,i.active),n>r)break;l=n,e<=0&&t.next(),e>=0&&i.next()}}function Wt(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function _t(t,e){let i=-1,n=1e9;for(let s=0;s=e)return n;if(n==t.length)break;s+=9==t.charCodeAt(n)?i-s%i:1,n=v(t,n)}return!0===n?-1:t.length}},260:(t,e,i)=>{i.d(e,{bM:()=>A,kS:()=>S});var n=i(26823),s=i(11418),o=i(40895);const r="#e5c07b",l="#e06c75",a="#56b6c2",h= getComputedStyle(document.body).getPropertyValue("--spice-text").trim(),c="#abb2bf",d="#7d8799",u="#61afef",f="#98c379",p="#d19a66",m="#c678dd",g="#21252b",v="#2c313a",w="#282c34",b="#353a42",y="#3E4451",x="#528bff",k=n.Lz.theme({"&":{color:c,backgroundColor:w},".cm-content":{caretColor:x},".cm-cursor, .cm-dropCursor":{borderLeftColor:x},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:y},".cm-panels":{backgroundColor:g,color:c},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:w,color:d,border:"none"},".cm-activeLineGutter":{backgroundColor:v},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:b},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:b,borderBottomColor:b},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:v,color:c}}},{dark:!0}),S=s.cr.define([{tag:o._A.keyword,color:m},{tag:[o._A.name,o._A.deleted,o._A.character,o._A.propertyName,o._A.macroName],color:l},{tag:[o._A.function(o._A.variableName),o._A.labelName],color:u},{tag:[o._A.color,o._A.constant(o._A.name),o._A.standard(o._A.name)],color:p},{tag:[o._A.definition(o._A.name),o._A.separator],color:c},{tag:[o._A.typeName,o._A.className,o._A.number,o._A.changed,o._A.annotation,o._A.modifier,o._A.self,o._A.namespace],color:r},{tag:[o._A.operator,o._A.operatorKeyword,o._A.url,o._A.escape,o._A.regexp,o._A.link,o._A.special(o._A.string)],color:a},{tag:[o._A.meta,o._A.comment],color:d},{tag:o._A.strong,fontWeight:"bold"},{tag:o._A.emphasis,fontStyle:"italic"},{tag:o._A.strikethrough,textDecoration:"line-through"},{tag:o._A.link,color:d,textDecoration:"underline"},{tag:o._A.heading,fontWeight:"bold",color:l},{tag:[o._A.atom,o._A.bool,o._A.special(o._A.variableName)],color:p},{tag:[o._A.processingInstruction,o._A.string,o._A.inserted],color:f},{tag:o._A.invalid,color:h}]),A=[k,(0,s.y9)(S)]},26823:(t,e,i)=>{i.d(e,{$K:()=>Os,DK:()=>$n,Eg:()=>Qn,Lz:()=>sn,NZ:()=>lt,OP:()=>bt,S7:()=>rs,TS:()=>mn,Ux:()=>Zn,VH:()=>Dn,Wu:()=>Rs,Z9:()=>se,cU:()=>us,c_:()=>te,dz:()=>In,ld:()=>is,w4:()=>un,wJ:()=>ls,xO:()=>ot});var n=i(66144),s=i(75002),o=i(396);function r(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function l(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function a(t,e){if(!e.anchorNode)return!1;try{return l(t,e.anchorNode)}catch(t){return!1}}function h(t){return 3==t.nodeType?k(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function c(t,e,i,n){return!!i&&(f(t,e,i,n,-1)||f(t,e,i,n,1))}function d(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function u(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function f(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:p(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=d(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?p(t):0}}}function p(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function m(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function g(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function v(t,e){let i=e.width/t.offsetWidth,n=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-t.offsetHeight)<1)&&(n=1),{scaleX:i,scaleY:n}}class w{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?p(e):0),i,Math.min(t.focusOffset,i?p(i):0))}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let b,y=null;function x(t){if(t.setActive)return t.setActive();if(y)return t.focus(y);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==y?{get preventScroll(){return y={preventScroll:!0},!0}}:void 0),!y){y=!1;for(let t=0;tMath.max(1,t.scrollHeight-t.clientHeight-4)}function M(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&n>0)return{node:i,offset:n};if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;i=i.childNodes[n-1],n=p(i)}else{if(!i.parentNode||u(i))return null;n=d(i),i=i.parentNode}}}function O(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&ne)return i.domBoundsAround(t,e,a);if(c>=t&&-1==n&&(n=l,s=a),a>e&&i.dom.parentNode==this.dom){o=l,r=h;break}h=c,a=c+i.breakAfter}return{from:s,to:r<0?i+this.length:r,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=T){this.markDirty();for(let n=t;nthis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function B(t,e,i,n,s,o,r,l,a){let{children:h}=t,c=h.length?h[e]:null,d=o.length?o[o.length-1]:null,u=d?d.breakAfter:r;if(!(e==n&&c&&!r&&!u&&o.length<2&&c.merge(i,s,o.length?d:null,0==i,l,a))){if(n0&&(!r&&o.length&&c.merge(i,c.length,o[0],!1,l,0)?c.breakAfter=o.shift().breakAfter:(i2);var $={mac:K||/Mac/.test(I.platform),windows:/Win/.test(I.platform),linux:/Linux|X11/.test(I.platform),ie:z,ie_version:H?N.documentMode||6:V?+V[1]:F?+F[1]:0,gecko:W,gecko_version:W?+(/Firefox\/(\d+)/.exec(I.userAgent)||[0,0])[1]:0,chrome:!!q,chrome_version:q?+q[1]:0,ios:K,android:/Android\b/.test(I.userAgent),webkit:j,safari:_,webkit_version:j?+(/\bAppleWebKit\/(\d+)/.exec(I.userAgent)||[0,0])[1]:0,tabSize:null!=N.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class U extends E{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof U)||this.length-(e-t)+i.length>256||8&i.flags))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new U(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new D(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,o=e,r=0;0==e&&i<0||e==n&&i>=0?$.chrome||$.gecko||(e?(s--,r=1):o=0)?0:l.length-1];$.safari&&!r&&0==a.width&&(a=Array.prototype.find.call(l,(t=>t.width))||a);return r?m(a,r<0):a||null}(this.dom,t,e)}}class Y extends E{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(A(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,n,s,o){return(!i||!(!(i instanceof Y&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=r,s++}let o=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new Y(this.mark,e,o)}domAtPos(t){return X(this,t)}coordsAt(t,e){return Q(this,t,e)}}class G extends E{static create(t,e,i){return new G(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=G.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,n,s,o){return!(i&&(!(i instanceof G&&this.widget.compare(i.widget))||t>0&&s<=0||e0)?D.before(this.dom):D.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:t>0;for(let e=o?n.length-1:0;s=n[e],!(t>0?0==e:e==n.length-1||s.top0?D.before(this.dom):D.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return n.EY.empty}get isHidden(){return!0}}function X(t,e){let i=t.dom,{children:n}=t,s=0;for(let t=0;st&&e0;t--){let e=n[t-1];if(e.dom.parentNode==i)return e.domAtPos(e.length)}for(let t=s;t0&&e instanceof Y&&s.length&&(n=s[s.length-1])instanceof Y&&n.mark.eq(e.mark)?Z(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Q(t,e,i){let n=null,s=-1,o=null,r=-1;!function t(e,l){for(let a=0,h=0;a=l&&(c.children.length?t(c,l-h):(!o||o.isHidden&&i>0)&&(d>l||h==d&&c.getSide()>0)?(o=c,r=l-h):(h-1?1:0)!=s.length-(i&&s.indexOf(i)>-1?1:0))return!1;for(let o of n)if(o!=i&&(-1==s.indexOf(o)||t[o]!==e[o]))return!1;return!0}function nt(t,e,i){let n=!1;if(e)for(let s in e)i&&s in i||(n=!0,"style"==s?t.style.cssText="":t.removeAttribute(s));if(i)for(let s in i)e&&e[s]==i[s]||(n=!0,"style"==s?t.style.cssText=i[s]:t.setAttribute(s,i[s]));return n}function st(t){let e=Object.create(null);for(let i=0;i0?3e8:-4e8:e>0?1e8:-1e8,new ct(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:o}=dt(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(o?n?2e8:1:-6e8)}return new ct(t,e,i,n,t.widget||null,!0)}static line(t){return new ht(t)}static set(t,e=!1){return n.om.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}lt.none=n.om.empty;class at extends lt{constructor(t){let{start:e,end:i}=dt(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof at&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&it(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}at.prototype.point=!1;class ht extends lt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof ht&&this.spec.class==t.spec.class&&it(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}ht.prototype.mapMode=n.iR.TrackBefore,ht.prototype.point=!0;class ct extends lt{constructor(t,e,i,s,o,r){super(e,i,o,t),this.block=s,this.isReplace=r,this.mapMode=s?e<=0?n.iR.TrackBefore:n.iR.TrackAfter:n.iR.TrackDel}get type(){return this.startSide!=this.endSide?rt.WidgetRange:this.startSide<=0?rt.WidgetBefore:rt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof ct&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function dt(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function ut(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}ct.prototype.point=!0;class ft extends E{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,o){if(i){if(!(i instanceof ft))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),P(this,t,e,i?i.children.slice():[],s,o),!0}split(t){let e=new ft;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){it(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Z(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=tt(e,this.attrs||{})),i&&(this.attrs=tt({class:i},this.attrs||{}))}domAtPos(t){return X(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(A(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(nt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let n=this.dom.lastChild;for(;n&&E.get(n)instanceof Y;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=E.get(n))||void 0===i?void 0:i.isEditable)||$.ios&&this.children.some((t=>t instanceof U))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof U)||/[^ -~]/.test(i.text))return null;let n=h(i.dom);if(1!=n.length)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=Q(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight=e){if(s instanceof ft)return s;if(o>e)break}n=o+s.breakAfter}return null}}class pt extends E{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,o){return!(i&&(!(i instanceof pt&&this.widget.compare(i.widget))||t>0&&s<=0||e0)}}class mt extends ot{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class gt{constructor(t,e,i,n){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof pt&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ft),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(vt(new J(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof pt||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(vt(new U(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof ct){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let r=e-t;if(i instanceof ct)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new pt(i.widget||wt.block,r,i));else{let o=G.create(i.widget||wt.inline,r,r?0:i.startSide),l=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),a=!o.isEditable&&(tn.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||l||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),l&&(h.append(vt(new J(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(vt(o,n),s),this.atCursorPos=a,this.pendingBuffer=a?tn.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);r&&(this.textOff+r<=this.text.length?this.textOff+=r:(this.skip+=r-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=s)}static build(t,e,i,s,o){let r=new gt(t,e,i,o);return r.openEnd=n.om.spans(s,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function vt(t,e){for(let i of e)t=new Y(i,[t],t.length);return t}class wt extends ot{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}wt.inline=new wt("span"),wt.block=new wt("div");var bt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(bt||(bt={}));const yt=bt.LTR,xt=bt.RTL;function kt(t){let e=[];for(let i=0;i=e){if(r.level==i)return o;(s<0||(0!=n?n<0?r.frome:t[s].level>r.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function Et(t,e){if(t.length!=e.length)return!1;for(let i=0;ia&&r.push(new Tt(a,p.from,u)),Bt(t,p.direction==yt!=!(u%2)?n+1:n,s,p.inner,p.from,p.to,r),a=p.to}f=p.to}else{if(f==i||(e?Rt[f]!=l:Rt[f]==l))break;f++}d?Lt(t,a,f,n+1,s,d,r):ae;){let i=!0,c=!1;if(!h||a>o[h-1].to){let t=Rt[a-1];t!=l&&(i=!1,c=16==t)}let d=i||1!=l?null:[],u=i?n:n+1,f=a;t:for(;;)if(h&&f==o[h-1].to){if(c)break t;let p=o[--h];if(!i)for(let t=p.from,i=h;;){if(t==e)break t;if(!i||o[i-1].to!=t){if(Rt[t-1]==l)break t;break}t=o[--i].from}if(d)d.push(p);else{p.to=0;t-=3)if(Mt[t+1]==-i){let e=Mt[t+2],i=2&e?s:4&e?1&e?o:s:0;i&&(Rt[r]=Rt[Mt[t]]=i),l=t;break}}else{if(189==Mt.length)break;Mt[l++]=r,Mt[l++]=e,Mt[l++]=a}else if(2==(n=Rt[r])||1==n){let t=n==s;a=t?0:1;for(let e=l-3;e>=0;e-=3){let i=Mt[e+2];if(2&i)break;if(t)Mt[e+2]|=2;else{if(4&i)break;Mt[e+2]|=4}}}}}(t,s,o,n,l),function(t,e,i,n){for(let s=0,o=n;s<=i.length;s++){let r=s?i[s-1].to:t,l=sa;)e==o&&(e=i[--n].from,o=n?i[n-1].to:t),Rt[--e]=c;a=r}else o=r,a++}}}(s,o,n,l),Lt(t,s,o,e,i,n,r)}function Pt(t,e,i){if(!t)return[new Tt(0,0,e==xt?1:0)];if(e==yt&&!i.length&&!Dt.test(t))return It(t.length);if(i.length)for(;t.length>Rt.length;)Rt[Rt.length]=256;let n=[],s=e==yt?0:1;return Bt(t,s,s,i,0,t.length,n),n}function It(t){return[new Tt(0,t,0)]}let Nt="";function Ft(t,e,i,s,o){var r;let l=s.head-t.from,a=Tt.find(e,l,null!==(r=s.bidiLevel)&&void 0!==r?r:-1,s.assoc),h=e[a],c=h.side(o,i);if(l==c){let t=a+=o?1:-1;if(t<0||t>=e.length)return null;h=e[a=t],l=h.side(!o,i),c=h.side(o,i)}let d=(0,n.zK)(t.text,l,h.forward(o,i));(dh.to)&&(d=c),Nt=t.text.slice(Math.min(l,d),Math.max(l,d));let u=a==(o?e.length-1:0)?null:e[a+(o?1:-1)];return u&&d==c&&u.level+(o?0:1)t.some((t=>t))}),Gt=n.sj.define({combine:t=>t.some((t=>t))}),Jt=n.sj.define();class Xt{constructor(t,e="nearest",i="nearest",n=5,s=5,o=!1){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(t){return t.empty?this:new Xt(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Xt(n.OF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Zt=n.Pe.define({map:(t,e)=>t.map(e)}),Qt=n.Pe.define();function te(t,e,i){let n=t.facet(qt);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const ee=n.sj.define({combine:t=>!t.length||t[0]});let ie=0;const ne=n.sj.define();class se{constructor(t,e,i,n,s){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(t,e){const{eventHandlers:i,eventObservers:n,provide:s,decorations:o}=e||{};return new se(ie++,t,i,n,(t=>{let e=[ne.of(t)];return o&&e.push(ae.of((e=>{let i=e.plugin(t);return i?o(i):lt.none}))),s&&e.push(s(t)),e}))}static fromClass(t,e){return se.define((e=>new t(e)),e)}}class oe{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(te(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){te(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){te(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const re=n.sj.define(),le=n.sj.define(),ae=n.sj.define(),he=n.sj.define(),ce=n.sj.define(),de=n.sj.define();function ue(t,e){let i=t.state.facet(de);if(!i.length)return i;let s=i.map((e=>e instanceof Function?e(t):e)),o=[];return n.om.spans(s,e.from,e.to,{point(){},span(t,i,n,s){let r=t-e.from,l=i-e.from,a=o;for(let t=n.length-1;t>=0;t--,s--){let i,o=n[t].spec.bidiIsolate;if(null==o&&(o=Ht(e.text,r,l)),s>0&&a.length&&(i=a[a.length-1]).to==r&&i.direction==o)i.to=l,a=i.inner;else{let t={from:r,to:l,direction:o,inner:[]};a.push(t),a=t.inner}}}}),o}const fe=n.sj.define();function pe(t){let e=0,i=0,n=0,s=0;for(let o of t.state.facet(fe)){let r=o(t);r&&(null!=r.left&&(e=Math.max(e,r.left)),null!=r.right&&(i=Math.max(i,r.right)),null!=r.top&&(n=Math.max(n,r.top)),null!=r.bottom&&(s=Math.max(s,r.bottom)))}return{left:e,right:i,top:n,bottom:s}}const me=n.sj.define();class ge{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new ge(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!l)return i;new ge(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,r=l.toB}}}class ve{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=n.VR.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let s=[];this.changes.iterChangedRanges(((t,e,i,n)=>s.push(new ge(t,e,i,n)))),this.changedRanges=s}static create(t,e,i){return new ve(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class we extends E{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=lt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new ft],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ge(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?s=this.domChanged.newSel.head:function(t,e){let i=!1;e&&t.iterChangedRanges(((t,n)=>{te.from&&(i=!0)}));return i}(t.changes,this.hasComposition)||t.selectionSet||(s=t.state.selection.main.head));let o=s>-1?function(t,e,i){let n=be(t,i);if(!n)return null;let{node:s,from:o,to:r}=n,l=s.nodeValue;if(/[\n\r]/.test(l))return null;if(t.state.doc.sliceString(n.from,n.to)!=l)return null;let a=e.invertedDesc,h=new ge(a.mapPos(o),a.mapPos(r),o,r),c=[];for(let e=s.parentNode;;e=e.parentNode){let i=E.get(e);if(i instanceof Y)c.push({node:e,deco:i.mark});else{if(i instanceof ft||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:h,text:s,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new at({inclusive:!0,attributes:st(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:n}=this.hasComposition;i=new ge(e,n,t.changes.mapPos(e,-1),t.changes.mapPos(n,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,($.ie||$.chrome)&&!o&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=function(t,e,i){let s=new ye;return n.om.compare(t,e,i,s),s.changes}(this.decorations,this.updateDeco(),t.changes);return i=ge.extendWithRanges(i,r),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,o),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=$.chrome||$.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[t]:null;if(!e)break;let o,r,l,a,{fromA:h,toA:c,fromB:d,toB:u}=e;if(i&&i.range.fromBd){let t=gt.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),e=gt.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);r=t.breakAtStart,l=t.openStart,a=e.openEnd;let n=this.compositionView(i);e.breakAtStart?n.breakAfter=1:e.content.length&&n.merge(n.length,n.length,e.content[0],!1,e.openStart,0)&&(n.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&n.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),o=t.content.concat(n).concat(e.content)}else({content:o,breakAtStart:r,openStart:l,openEnd:a}=gt.build(this.view.state.doc,d,u,this.decorations,this.dynamicDecorationMap));let{i:f,off:p}=s.findPos(c,1),{i:m,off:g}=s.findPos(h,-1);B(this,m,g,f,p,o,r,l,a)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Qt)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new U(t.text.nodeValue);e.flags|=8;for(let{deco:i}of t.marks)e=new Y(i,[e],e.length);let i=new ft;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=E.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),n=this.children[i.i];e(t.line,n);for(let s=t.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],e(s>=0?t.marks[s].node:t.text,n)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&a(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||e||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h=this.moveToLine(this.domAtPos(l.anchor)),d=l.empty?h:this.moveToLine(this.domAtPos(l.head));if($.gecko&&l.empty&&!this.hasComposition&&(1==(u=h).node.nodeType&&u.node.firstChild&&(0==u.offset||"false"==u.node.childNodes[u.offset-1].contentEditable)&&(u.offset==u.node.childNodes.length||"false"==u.node.childNodes[u.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>h.node.insertBefore(t,h.node.childNodes[h.offset]||null))),h=d=new D(t,0),o=!0}var u;let f=this.view.observer.selectionRange;!o&&f.focusNode&&(c(h.node,h.offset,f.anchorNode,f.anchorOffset)&&c(d.node,d.offset,f.focusNode,f.focusOffset)||this.suppressWidgetCursorChange(f,l))||(this.view.observer.ignore((()=>{$.android&&$.chrome&&this.dom.contains(f.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=r(this.view.root);if(t)if(l.empty){if($.gecko){let t=(e=h.node,n=h.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|(nl.head&&([h,d]=[d,h]),e.setEnd(d.node,d.offset),e.setStart(h.node,h.offset),t.removeAllRanges(),t.addRange(e)}else;var e,n;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(h,d)),this.impreciseAnchor=h.precise?null:new D(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new D(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&c(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=r(t.root),{anchorNode:n,anchorOffset:s}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let o=ft.find(this,e.head);if(!o)return;let l=o.posAtStart;if(e.head==l||e.head==l+o.length)return;let a=this.coordsAt(e.head,-1),h=this.coordsAt(e.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(e.head+e.assoc);i.collapse(c.node,c.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let d=t.observer.selectionRange;t.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=e.from&&i.collapse(n,s)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let n=t.offset;!e&&n=0;n--){let t=E.get(i.childNodes[n]);t instanceof ft&&(e=t.domAtPos(t.length))}return e?new D(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=E.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e=0;o--){let r=this.children[o],l=s-r.breakAfter,a=l-r.length;if(lt||r.covers(1))&&(!i||r instanceof ft&&!(i instanceof ft&&e>=0)))i=r,n=a;else if(i&&a==t&&l==t&&r instanceof pt&&Math.abs(e)<2){if(r.deco.startSide<0)break;o&&(i=null)}s=a}return i?i.coordsAt(t-n,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),s=this.children[e];if(!(s instanceof ft))return null;for(;s.children.length;){let{i:t,off:e}=s.childPos(i,1);for(;;t++){if(t==s.children.length)return null;if((s=s.children[t]).length)break}i=e}if(!(s instanceof U))return null;let o=(0,n.zK)(s.text,i);if(o==i)return null;let r=k(s.dom,i,o).getClientRects();for(let t=0;tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1,l=this.view.textDirection==bt.LTR;for(let t=0,a=0;an)break;if(t>=i){let i=c.dom.getBoundingClientRect();if(e.push(i.height),o){let e=c.dom.lastChild,n=e?h(e):[];if(n.length){let e=n[n.length-1],o=l?e.right-i.left:i.right-e.left;o>r&&(r=o,this.minWidth=s,this.minWidthFrom=t,this.minWidthTo=d)}}}t=d+c.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?bt.RTL:bt.LTR}measureTextSize(){for(let t of this.children)if(t instanceof ft){let e=t.measureTextSize();if(e)return e}let t,e,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let s=h(n.firstChild)[0];t=n.getBoundingClientRect().height,e=s?s.width/27:7,i=s?s.height:t,n.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new L(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],o=s?s.from-1:this.length;if(o>i){let n=(e.lineBlockAt(o).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(lt.replace({widget:new mt(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return lt.set(t)}updateDeco(){let t=1,e=this.view.state.facet(ae).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,s=this.view.state.facet(he).map(((t,e)=>{let n="function"==typeof t;return n&&(i=!0),n?t(this.view):t}));for(s.length&&(this.dynamicDecorationMap[t++]=i,e.push(n.om.join(s))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ti.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=pe(this.view),o={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:r,offsetHeight:l}=this.view.scrollDOM;!function(t,e,i,n,s,o,r,l){let a=t.ownerDocument,h=a.defaultView||window;for(let c=t,d=!1;c&&!d;)if(1==c.nodeType){let t,u=c==a.body,f=1,p=1;if(u)t=g(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:f,scaleY:p}=v(c,e)),t={left:e.left,right:e.left+c.clientWidth*f,top:e.top,bottom:e.top+c.clientHeight*p}}let m=0,w=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+w&&(w=e.bottom-t.bottom+w+r)):e.bottom>t.bottom&&(w=e.bottom-t.bottom+r,i<0&&e.top-w0&&e.right>t.right+m&&(m=e.right-t.right+m+o)):e.right>t.right&&(m=e.right-t.right+o,i<0&&e.leftt?e.left-t:Math.max(0,t-e.right)}function ke(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Se(t,e){return t.tope.top+1}function Ae(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Me(t,e,i){let n,s,o,r,l,a,c,d,u=!1;for(let f=t.firstChild;f;f=f.nextSibling){let t=h(f);for(let h=0;hg||r==g&&o>m){n=f,s=p,o=m,r=g;let l=g?i0?h0)}0==m?i>p.bottom&&(!c||c.bottomp.top)&&(a=f,d=p):c&&Se(c,p)?c=Ce(c,p.bottom):d&&Se(d,p)&&(d=Ae(d,p.top))}}if(c&&c.bottom>=i?(n=l,s=c):d&&d.top<=i&&(n=a,s=d),!n)return{node:t,offset:0};let f=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Oe(n,f,i):u&&"false"!=n.contentEditable?Me(n,f,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}}function Oe(t,e,i){let n=t.nodeValue.length,s=-1,o=1e9,r=0;for(let l=0;li?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if($.chrome||$.gecko){k(t,l).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:l+(n?1:0)};s=l+(n?1:0),o=c}}}return{node:t,offset:s>-1?s:r>0?t.nodeValue.length:0}}function De(t,e,i,n=-1){var s,o;let r,l=t.contentDOM.getBoundingClientRect(),a=l.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:d}=e,u=d-a;if(u<0)return 0;if(u>h)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,s=!1;r=t.elementAtHeight(u),r.type!=rt.Text;)for(;u=n>0?r.bottom+e:r.top-e,!(u>=0&&u<=h);){if(s)return i?null:0;s=!0,n=-n}d=a+u;let f=r.from;if(ft.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:Te(t,l,r,c,d);let m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,d);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(l.left+1,Math.min(l.right-1,c)),v=g.elementFromPoint(c,d),v&&!t.contentDOM.contains(v)&&(v=null));let w,b=-1;if(v&&0!=(null===(s=t.docView.nearest(v))||void 0===s?void 0:s.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,d);t&&({offsetNode:w,offset:b}=t)}else if(m.caretRangeFromPoint){let e=m.caretRangeFromPoint(c,d);e&&(({startContainer:w,startOffset:b}=e),(!t.contentDOM.contains(w)||$.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return k(t,n-1,n).getBoundingClientRect().left>i}(w,b,c)||$.chrome&&function(t,e,i){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}let n=1==t.nodeType?t.getBoundingClientRect():k(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return i-n.left>5}(w,b,c))&&(w=void 0))}w&&(b=Math.min(p(w),b))}if(!w||!t.docView.dom.contains(w)){let e=ft.find(t.docView,f);if(!e)return u>r.top+r.height/2?r.to:r.from;({node:w,offset:b}=Me(e.dom,c,d))}let y=t.docView.nearest(w);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let t=y.dom.getBoundingClientRect();return e.y1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((o-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let l=t.state.sliceDoc(i.from,i.to);return i.from+(0,n.kn)(l,r,t.state.tabSize)}function Ee(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==rt.Text))return t;return i}function Re(t,e,i,n){let s=t.state.doc.lineAt(e.head),o=t.bidiSpans(s),r=t.textDirectionAt(s.from);for(let l=e,a=null;;){let e=Ft(s,o,r,l,i),h=Nt;if(!e){if(s.number==(i?t.state.doc.lines:1))return l;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),o=t.bidiSpans(s),e=t.visualLineSide(s,!i)}if(a){if(!a(h))return l}else{if(!n)return e;a=n(h)}l=e}}function Le(t,e,i){for(;;){let n=0;for(let s of t)s.between(e-1,e+1,((t,s,o)=>{if(e>t&&ee(t))),i.from,e.head>i.from?-1:1);return s==i.from?i:n.OF.cursor(s,st)&&this.lineBreak(),n=s}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,o=-1,r=1;if(this.lineSeparator?(o=e.indexOf(this.lineSeparator,i),r=this.lineSeparator.length):(s=n.exec(e))&&(o=s.index,r=s[0].length),this.append(e.slice(i,o<0?e.length:o)),o<0)break;if(this.lineBreak(),r>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=r-1);i=o+r}}readNode(t){if(t.cmIgnore)return;let e=E.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(Ne(t,i.node,i.offset)?e:0))}}function Ne(t,e,i){for(;;){if(!e||i-1;let{impreciseHead:o,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=o||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:o}=t.observer.selectionRange;i&&(e.push(new Fe(i,n)),s==i&&o==n||e.push(new Fe(s,o)));return e}(t),i=new Ie(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,s=2==t.length?t[1].pos:i;return i>-1&&s>-1?n.OF.single(i+e,s+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=o&&o.node==e.focusNode&&o.offset==e.focusOffset||!l(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),s=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!l(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if(($.ios||$.chrome)&&t.state.selection.main.empty&&i!=s&&(a.from>0||a.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=o.from,h=null;(8===r||$.android&&e.text.length0&&l>0&&t.charCodeAt(r-1)==e.charCodeAt(l-1);)r--,l--;if("end"==n){i-=r+Math.max(0,o-Math.min(r,l))-o}if(r=r?o-i:0,l=o+(l-r),r=o}else if(l=l?o-i:0,r=o+(r-l),l=o}return{from:o,toA:r,toB:l}}(t.state.doc.sliceString(s,l,Pe),e.text,a-s,h);c&&($.chrome&&13==r&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==Pe+Pe&&c.toB--,i={from:s+c.from,to:s+c.toA,insert:n.EY.of(e.text.slice(c.from,c.toB).split(Pe))})}else s&&(!t.hasFocus&&t.state.facet(ee)||s.main.eq(o))&&(s=null);if(!i&&!s)return!1;if(!i&&e.typeOver&&!o.empty&&s&&s.main.empty?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:i&&i.from>=o.from&&i.to<=o.to&&(i.from!=o.from||i.to!=o.to)&&o.to-o.from-(i.to-i.from)<=4?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,o.to))}:($.mac||$.android)&&i&&i.from==i.to&&i.from==o.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(s&&2==i.insert.length&&(s=n.OF.single(s.main.anchor-1,s.main.head-1)),i={from:o.from,to:o.to,insert:n.EY.of([" "])}):$.chrome&&i&&i.from==i.to&&i.from==o.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(s&&(s=n.OF.single(s.main.anchor-1,s.main.head-1)),i={from:o.from,to:o.to,insert:n.EY.of([" "])}),i)return ze(t,i,s,r);if(s&&!s.main.eq(o)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:s,scrollIntoView:e,userEvent:i}),!0}return!1}function ze(t,e,i,s=-1){if($.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if($.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&" "==t.state.sliceDoc(e.from,o.from))&&1==e.insert.length&&2==e.insert.lines&&S(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&0==e.insert.length||8==s&&e.insert.lengtho.head)&&S(t.contentDOM,"Backspace",8)||e.from==o.from&&e.to==o.to+1&&0==e.insert.length&&S(t.contentDOM,"Delete",46)))return!0;let r,l=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>r||(r=function(t,e,i){let s,o=t.state,r=o.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=r.frome.to?o.sliceDoc(e.to,r.to):"";s=o.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+n))}else{let l=o.changes(e),a=i&&i.main.to<=l.newLength?i.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h,c=t.state.sliceDoc(e.from,e.to),d=i&&be(t,i.main.head);if(d){let t=e.insert.length-(e.to-e.from);h={from:d.from,to:d.to-t}}else h=t.state.doc.lineAt(r.head);let u=r.to-e.to,f=r.to-r.from;s=o.changeByRange((i=>{if(i.from==r.from&&i.to==r.to)return{changes:l,range:a||i.map(l)};let s=i.to-u,d=s-c.length;if(i.to-i.from!=f||t.state.sliceDoc(d,s)!=c||i.to>=h.from&&i.from<=h.to)return{range:i};let p=o.changes({from:d,to:s,insert:e.insert}),m=i.to-r.to;return{changes:p,range:a?n.OF.range(Math.max(0,a.anchor+m),Math.max(0,a.head+m)):i.map(p)}}))}else s={changes:l,selection:a&&o.selection.replaceRange(a)}}let l="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1));return o.update(s,{userEvent:l,scrollIntoView:!0})}(t,e,i));return t.state.facet(_t).some((i=>i(t,e.from,e.to,l,a)))||t.dispatch(a()),!0}class We{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,$.safari&&t.contentDOM.addEventListener("input",(()=>null)),$.gecko&&function(t){pi.has(t)||(pi.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=E.get(n))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=je(t),i=this.handlers,n=this.view.contentDOM;for(let t in e)if("scroll"!=t){let s=!e[t].handlers.length,o=i[t];o&&s!=!o.handlers.length&&(n.removeEventListener(t,this.handleEvent),o=null),o||n.addEventListener(t,this.handleEvent,{passive:s})}for(let t in i)"scroll"==t||e[t]||n.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&$e.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),$.android&&$.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!$.ios||t.synthetic||t.altKey||t.metaKey||!((e=_e.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Ke.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from0||!!($.safari&&!$.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function qe(t,e){return(i,n)=>{try{return e.call(t,n,i)}catch(t){te(i.state,t)}}}function je(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let n in t.domEventHandlers){let s=t.domEventHandlers[n];s&&i(n).handlers.push(qe(e.value,s))}if(t&&t.domEventObservers)for(let n in t.domEventObservers){let s=t.domEventObservers[n];s&&i(n).observers.push(qe(e.value,s))}}for(let t in Ge)i(t).handlers.push(Ge[t]);for(let t in Je)i(t).observers.push(Je[t]);return e}const _e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ke="dthko",$e=[16,17,18,20,91,92,224,225];function Ue(t){return.7*Math.max(0,t)+8}class Ye{constructor(t,e,i,s){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,n=t.ownerDocument;for(let s=t.parentNode;s&&!(s==n.body||e&&i);)if(1==s.nodeType)!i&&s.scrollHeight>s.clientHeight&&(i=s),!e&&s.scrollWidth>s.clientWidth&&(e=s),s=s.assignedSlot||s.parentNode;else{if(11!=s.nodeType)break;s=s.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(ce).map((e=>e(t)));let o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(n.$t.allowMultipleSelections)&&function(t,e){let i=t.state.facet(Vt);return i.length?i[0](e):$.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=r(t.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=ai(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,i=t,Math.max(Math.abs(e.clientX-i.clientX),Math.abs(e.clientY-i.clientY))<10))return;var e,i;this.select(this.lastEvent=t);let n=0,s=0,o=0,r=0,l=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let h=pe(this.view);t.clientX-h.left<=o+6?n=-Ue(o-t.clientX):t.clientX+h.right>=l-6&&(n=Ue(t.clientX-l)),t.clientY-h.top<=r+6?s=-Ue(r-t.clientY):t.clientY+h.bottom>=a-6&&(s=Ue(t.clientY-a)),this.setScrollSpeed(n,s)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;it.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const Ge=Object.create(null),Je=Object.create(null),Xe=$.ie&&$.ie_version<15||$.ios&&$.webkit_version<604;function Ze(t,e,i){for(let n of t.facet(e))i=n(i,t);return i}function Qe(t,e){e=Ze(t.state,$t,e);let i,{state:s}=t,o=1,r=s.toText(e),l=r.lines==s.selection.ranges.length;if(null!=ci&&s.selection.ranges.every((t=>t.empty))&&ci==r.toString()){let t=-1;i=s.changeByRange((i=>{let a=s.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let h=s.toText((l?r.line(o++).text:e)+s.lineBreak);return{changes:{from:a.from,insert:h},range:n.OF.cursor(i.from+h.length)}}))}else i=l?s.changeByRange((t=>{let e=r.line(o++);return{changes:{from:t.from,to:t.to,insert:e.text},range:n.OF.cursor(t.from+e.length)}})):s.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function ti(t,e,i,s){if(1==s)return n.OF.cursor(e,i);if(2==s)return function(t,e,i=1){let s=t.charCategorizer(e),o=t.doc.lineAt(e),r=e-o.from;if(0==o.length)return n.OF.cursor(e);0==r?i=1:r==o.length&&(i=-1);let l=r,a=r;i<0?l=(0,n.zK)(o.text,r,!1):a=(0,n.zK)(o.text,r);let h=s(o.text.slice(l,a));for(;l>0;){let t=(0,n.zK)(o.text,l,!1);if(s(o.text.slice(t,l))!=h)break;l=t}for(;a{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Ge.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Je.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Je.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Ge.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let n of t.state.facet(Wt))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=ni(t,e),s=ai(e),o=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),o=o.map(t.changes))},get(e,r,l){let a,h=ni(t,e),c=ti(t,h.pos,h.bias,s);if(i.pos!=h.pos&&!r){let e=ti(t,i.pos,i.bias,s),o=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=o1&&(a=function(t,e){for(let i=0;i=e)return n.OF.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(o,h.pos))?a:l?o.addRange(c):n.OF.create([c])}}}(t,e)),i){let n=!t.hasFocus;t.inputState.startMouseSelection(new Ye(t,e,i,n)),n&&t.observer.ignore((()=>{x(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let s=t.inputState.mouseSelection;if(s)return s.start(e),!1===s.dragging}return!1};let ei=(t,e,i)=>e>=i.top&&e<=i.bottom&&t>=i.left&&t<=i.right;function ii(t,e,i,n){let s=ft.find(t.docView,e);if(!s)return 1;let o=e-s.posAtStart;if(0==o)return 1;if(o==s.length)return-1;let r=s.coordsAt(o,-1);if(r&&ei(i,n,r))return-1;let l=s.coordsAt(o,1);return l&&ei(i,n,l)?1:r&&r.bottom>=n?-1:1}function ni(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:ii(t,i,e.clientX,e.clientY)}}const si=$.ie&&$.ie_version<=11;let oi=null,ri=0,li=0;function ai(t){if(!si)return t.detail;let e=oi,i=li;return oi=t,li=Date.now(),ri=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(ri+1)%3:1}function hi(t,e,i,n){if(!(i=Ze(t.state,$t,i)))return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,r=n&&o&&function(t,e){let i=t.state.facet(zt);return i.length?i[0](e):$.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:o.from,to:o.to}:null,l={from:s,insert:i},a=t.state.changes(r?[r,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:r?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Ge.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let s=t.docView.nearest(e.target);if(s&&s.isWidget){let t=s.posAtStart,e=t+s.length;(t>=i.to||e<=i.from)&&(i=n.OF.range(t,e))}}let{inputState:s}=t;return s.mouseSelection&&(s.mouseSelection.dragging=!0),s.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",Ze(t.state,Ut,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Ge.dragend=t=>(t.inputState.draggedContent=null,!1),Ge.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let n=Array(i.length),s=0,o=()=>{++s==i.length&&hi(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),o()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return hi(t,e,i,!0),!0}return!1},Ge.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=Xe?null:e.clipboardData;return i?(Qe(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),Qe(t,i.value)}),50)}(t),!1)};let ci=null;Ge.copy=Ge.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let o=t.doc.lineAt(n);o.number>s&&(e.push(o.text),i.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),s=o.number}n=!0}return{text:Ze(t,Ut,e.join(t.lineBreak)),ranges:i,linewise:n}}(t.state);if(!i&&!s)return!1;ci=s?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let o=Xe?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),!1)};const di=n.YH.define();function ui(t,e){let i=[];for(let n of t.facet(Kt)){let s=n(t,e);s&&i.push(s)}return i?t.update({effects:i,annotations:di.of(!0)}):null}function fi(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=ui(t.state,e);i?t.dispatch(i):t.update([])}}),10)}Je.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),fi(t)},Je.blur=t=>{t.observer.clearSelectionRange(),fi(t)},Je.compositionstart=Je.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Je.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,$.chrome&&$.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},Je.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Ge.beforeinput=(t,e)=>{var i,n;if("insertReplacementText"==e.inputType&&t.observer.editContext){let n=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),s=e.getTargetRanges();if(n&&s.length){let e=s[0],i=t.posAtDOM(e.startContainer,e.startOffset),o=t.posAtDOM(e.endContainer,e.endOffset);return ze(t,{from:i,to:o,insert:t.state.toText(n)},null),!0}}let s;if($.chrome&&$.android&&(s=_e.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(s.key,s.keyCode),"Backspace"==s.key||"Delete"==s.key)){let e=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return $.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),$.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Je.compositionend(t,e)),20),!1};const pi=new Set;const mi=["pre-wrap","normal","pre-line","break-spaces"];let gi=!1;function vi(){gi=!1}class wi{constructor(t){this.lineWrapping=t,this.doc=n.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return mi.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,l=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=r;if(this.lineWrapping=r,this.lineHeight=e,this.charWidth=i,this.textHeight=n,this.lineLength=s,l){this.heightSamples={};for(let t=0;t0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>ki&&(gi=!0),this.height=t)}replace(t,e,i){return Si.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this,o=i.doc;for(let r=n.length-1;r>=0;r--){let{fromA:l,toA:a,fromB:h,toB:c}=n[r],d=s.lineAt(l,xi.ByPosNoHeight,i.setDoc(e),0,0),u=d.to>=a?d:s.lineAt(a,xi.ByPosNoHeight,i,0,0);for(c+=u.to-a,a=u.to;r>0&&d.from<=n[r-1].toA;)l=n[r-1].fromA,h=n[r-1].fromB,r--,l2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n=s&&o(this.blockAt(0,i,n,s))}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Mi extends Ci{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,n){return new yi(n,this.length,i,this.height,this.breaks)}replace(t,e,i){let n=i[0];return 1==i.length&&(n instanceof Mi||n instanceof Oi&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof Oi?n=new Mi(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Si.of(i)}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Oi extends Si{constructor(t){super(t,0)}heightMetrics(t,e){let i,n=t.doc.lineAt(e).number,s=t.doc.lineAt(e+this.length).number,o=s-n+1,r=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*o);i=e/o,this.length>o+1&&(r=(this.height-e)/(this.length-o-1))}else i=this.height/o;return{firstLine:n,lastLine:s,perLine:i,perChar:r}}blockAt(t,e,i,n){let{firstLine:s,lastLine:o,perLine:r,perChar:l}=this.heightMetrics(e,n);if(e.lineWrapping){let s=n+(t0){let t=i[i.length-1];t instanceof Oi?i[i.length-1]=new Oi(t.length+n):i.push(null,new Oi(n-1))}if(t>0){let e=i[0];e instanceof Oi?i[0]=new Oi(t+e.length):i.unshift(new Oi(t-1),null)}return Si.of(i)}decomposeLeft(t,e){e.push(new Oi(t-1),null)}decomposeRight(t,e){e.push(null,new Oi(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],o=Math.max(e,n.from),r=-1;for(n.from>e&&i.push(new Oi(n.from-e-1).updateHeight(t,e));o<=s&&n.more;){let e=t.doc.lineAt(o).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==r?r=s:Math.abs(s-r)>=ki&&(r=-2);let l=new Mi(e,s);l.outdated=!1,i.push(l),o+=e+1}o<=s&&i.push(null,new Oi(s-o).updateHeight(t,o));let l=Si.of(i);return(r<0||Math.abs(l.height-this.height)>=ki||Math.abs(r-this.heightMetrics(t,e).perLine)>=ki)&&(gi=!0),Ai(this,l)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Di extends Si{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return tr))return a;let h=e==xi.ByPosNoHeight?xi.ByPosNoHeight:xi.ByPos;return l?a.join(this.right.lineAt(r,h,i,o,r)):this.left.lineAt(r,h,i,n,s).join(a)}forEachLine(t,e,i,n,s,o){let r=n+this.left.height,l=s+this.left.length+this.break;if(this.break)t=l&&this.right.forEachLine(t,e,i,r,l,o);else{let a=this.lineAt(l,xi.ByPos,i,n,s);t=t&&a.from<=e&&o(a),e>a.to&&this.right.forEachLine(a.to+1,e,i,r,l,o)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let o=s.length;for(let t of i)s.push(t);if(t>0&&Ti(s,o-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Si.of(this.break?[t,null,e]:[t,e]):(this.left=Ai(this.left,t),this.right=Ai(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:o}=this,r=e+s.length+this.break,l=null;return n&&n.from<=e+s.length&&n.more?l=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=r+o.length&&n.more?l=o=o.updateHeight(t,r,i,n):o.updateHeight(t,r,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ti(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Oi&&(n=t[e+1])instanceof Oi&&t.splice(e-1,3,new Oi(i.length+1+n.length))}class Ei{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Mi?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Mi(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s,o)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Mi(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Oi(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Mi)return t;let e=new Mi(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,t),n.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Mi||this.isCovered?(this.writtenToi.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();o=Math.max(o,n.left),r=Math.min(r,n.right),l=Math.max(l,n.top),a=Math.min(e==t.parentNode?s.innerHeight:a,n.bottom)}e="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:o-i.left,right:Math.max(o,r)-i.left,top:l-(i.top+e),bottom:Math.max(l,a)-(i.top+e)}}function Bi(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class Pi{constructor(t,e,i,n){this.from=t,this.to=e,this.size=i,this.displaySize=n}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new wi(e),this.stateDeco=t.facet(ae).filter((t=>"function"!=typeof t)),this.heightMap=Si.empty().applyChanges(this.stateDeco,n.EY.empty,this.heightOracle.setDoc(t.doc),[new ge(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=lt.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new Fi(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?zi:new Wi(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(qi(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ae).filter((t=>"function"!=typeof t));let s=t.changedRanges,o=ge.extendWithRanges(s,function(t,e,i){let s=new Ri;return n.om.compare(t,e,i,s,0),s.changes}(i,this.stateDeco,t?t.changes:n.VR.empty(this.state.doc.length))),r=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);vi(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=r||gi)&&(t.flags|=2),l?(this.scrollAnchorPos=t.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(h||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Gt)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),s=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?bt.RTL:bt.LTR;let r=this.heightOracle.mustRefreshForWrapping(o),l=e.getBoundingClientRect(),a=r||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:t,scaleY:i}=v(e,l);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,h|=8,r=a=!0)}let d=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==u||(this.paddingTop=d,this.paddingBottom=u,h|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=8);let f=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=C(t.scrollDOM);let p=(this.printing?Bi:Li)(e,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=l.width;if(this.contentDOMWidth==b&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=l.width,this.editorHeight=t.scrollDOM.clientHeight,h|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(e)&&(r=!0),r||s.lineWrapping&&Math.abs(b-this.contentDOMWidth)>s.charWidth){let{lineHeight:i,charWidth:n,textHeight:l}=t.docView.measureTextSize();r=i>0&&s.refresh(o,i,n,l,b/n,e),r&&(t.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),vi();for(let i of this.viewports){let o=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(r?Si.empty().applyChanges(this.stateDeco,n.EY.empty,this.heightOracle,[new ge(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,r,new bi(i.from,o))}gi&&(h|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(2&h&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(2&h||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:r}=this,l=new Fi(n.lineAt(o-1e3*i,xi.ByHeight,s,0,0).from,n.lineAt(r+1e3*(1-i),xi.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(tl.to){let i,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),r=n.lineAt(t,xi.ByPos,s,0,0);i="center"==e.y?(r.top+r.bottom)/2-o/2:"start"==e.y||"nearest"==e.y&&t=r+Math.max(10,Math.min(i,250)))&&n>o-2e3&&s>1,r=s<<1;if(this.defaultTextDirection!=bt.LTR&&!i)return[];let l=[],a=(s,r,h,c)=>{if(r-ss&&tt.from>=h.from&&t.to<=h.to&&Math.abs(t.from-s)t.frome))));if(!f){if(rt.from<=r&&t.to>=r))){let t=e.moveToLineBoundary(n.OF.cursor(r),!1,!0).head;t>s&&(r=t)}let t=this.gapSize(h,s,r,c);f=new Pi(s,r,t,i||t<2e6?t:2e6)}l.push(f)},h=e=>{if(e.lengtho&&(s.push({from:o,to:t}),r+=t-o),o=e}},20),o2e6)for(let i of t)i.from>=e.from&&i.frome.from&&a(e.from,l,e,o),ht.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];n.om.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||qi(this.heightMap.lineAt(t,xi.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||qi(this.heightMap.lineAt(this.scaler.fromDOM(t),xi.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return qi(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fi{constructor(t,e){this.from=t,this.to=e}}function Hi({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],o=s-i;if(n<=o)return i+n;n-=o}}function Vi(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}const zi={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class Wi{constructor(t,e,i){let n=0,s=0,o=0;this.viewports=i.map((({from:i,to:s})=>{let o=e.lineAt(i,xi.ByPos,t,0,0).top,r=e.lineAt(s,xi.ByPos,t,0,0).bottom;return n+=r-o,{from:i,to:s,top:o,bottom:r,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=o+(t.top-s)*this.scale,o=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=ee.from==t.viewports[i].from&&e.to==t.viewports[i].to)))}}function qi(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),n=e.toDOM(t.bottom);return new yi(t.from,t.length,i,n-i,Array.isArray(t._content)?t._content.map((t=>qi(t,e))):t._content)}const ji=n.sj.define({combine:t=>t.join(" ")}),_i=n.sj.define({combine:t=>t.indexOf(!0)>-1}),Ki=s.G.newName(),$i=s.G.newName(),Ui=s.G.newName(),Yi={"&light":"."+$i,"&dark":"."+Ui};function Gi(t,e,i){return new s.G(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const Ji=Gi("."+Ki,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"var(--spice-text)"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Yi),Xi={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Zi=$.ie&&$.ie_version<=11;class Qi{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new w,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);($.ie&&$.ie_version<=11||$.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||$.chrome&&$.chrome_version<126||(this.editContext=new nn(t),t.state.facet(ee)&&(t.contentDOM.editContext=this.editContext.editContext)),Zi&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(ee)?i.root.activeElement!=this.dom:!a(this.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(t)?e||(this.selectionChanged=!1):($.ie&&$.ie_version<=11||$.android&&$.chrome)&&!i.state.selection.main.empty&&n.focusNode&&c(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=r(t.root);if(!e)return!1;let i=$.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return en(t,i)}let i=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),i?en(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let n=a(this.dom,i);return n&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&S(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),n=this.selectionChanged&&a(this.dom,this.selectionRange);if(t<0&&!n)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new He(this.view,t,e,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,n=Ve(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=tn(e,t.previousSibling||t.target.previousSibling,-1),n=tn(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(ee)!=t.state.facet(ee)&&(t.view.contentDOM.editContext=t.state.facet(ee)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function tn(t,e,i){for(;e;){let n=E.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function en(t,e){let i=e.startContainer,n=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.docView.domAtPos(t.state.selection.main.anchor);return c(r.node,r.offset,s,o)&&([i,n,s,o]=[s,o,i,n]),{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:o}}class nn{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:i}=t.state.selection.main,s=this.toEditorPos(e.updateRangeStart),o=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:s,drifted:!1});let r={from:s,to:o,insert:n.EY.of(e.text.split("\n"))};r.from==this.from&&ithis.to&&(r.to=i),(r.from!=r.to||r.insert.length)&&(this.pendingContextChange=r,t.state.readOnly||ze(t,r,n.OF.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let e=this.toEditorPos(i.rangeStart),o=this.toEditorPos(i.rangeEnd);e{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,n=t.underlineThickness;if("None"!=e&&"None"!=n){let s=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==n?1:2}px`;i.push(lt.mark({attributes:{style:s}}).range(this.toEditorPos(t.rangeStart),this.toEditorPos(t.rangeEnd)))}}t.dispatch({effects:Qt.of(lt.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=r(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,n=this.pendingContextChange;return t.changes.iterChanges(((s,o,r,l,a)=>{if(i)return;let h=a.length-(o-s);if(n&&o>=n.to){if(n.from==s&&n.to==o&&n.insert.eq(a))return n=this.pendingContextChange=null,e+=h,void(this.to+=h);n=null,this.revertPending(t.state)}if(s+=e,(o+=e)<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+a.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),a.toString()),this.to+=h}e+=h})),n&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;this.composing&&(this.composing.drifted||t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),n=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==n||this.editContext.updateSelection(i,n)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to3e4)}toEditorPos(t){let e=this.composing;return e&&e.drifted?e.editorBase+(t-e.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class sn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach((t=>i(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Ni(t.state||n.$t.create(t)),t.scrollTo&&t.scrollTo.is(Zt)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ne).map((t=>new oe(t)));for(let t of this.plugins)t.update(this);this.observer=new Qi(this),this.inputState=new We(this),this.inputState.ensureHandlers(this.plugins),this.docView=new we(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof n.ZX?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,s=!1,o=this.state;for(let e of t){if(e.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=e.state}if(this.destroyed)return void(this.viewState.state=o);let r=this.hasFocus,l=0,a=null;t.some((t=>t.annotation(di)))?(this.inputState.notifiedFocused=r,l=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=ui(o,r),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(n.$t.phrases)!=this.state.facet(n.$t.phrases))return this.setState(o);e=ve.create(this,o,t),e.flags|=l;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(d&&(d=d.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;d=new Xt(t.empty?t:n.OF.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Zt)&&(d=t.value.clip(this.state))}this.viewState.update(e,d),this.bidiCache=ln.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(me)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(ji)!=e.state.facet(ji)&&(this.viewState.mustMeasureContent=!0),(i||s||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(jt))try{t(e)}catch(t){te(this.state,t,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Ve(this,c)&&h.force&&S(this.contentDOM,h.key,h.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Ni(t),this.plugins=t.facet(ne).map((t=>new oe(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new we(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(ne),i=t.state.facet(ne);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new oe(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(o<0)if(C(i))s=-1,o=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(n);s=t.from,o=t.top}this.updateState=1;let r=this.viewState.measure(this);if(!r&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&r||([this.measureRequests,l]=[l,this.measureRequests]);let a=l.map((t=>{try{return t.read(this)}catch(t){return te(this.state,t),rn}})),h=ve.create(this,this.state,[]),c=!1;h.flags|=r,e?e.flags|=r:e=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h),c&&this.docViewUpdate());for(let t=0;t1||t<-1){n+=t,i.scrollTop=n/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(jt))t(e)}get themeClasses(){return Ki+" "+(this.state.facet(_i)?Ui:$i)+" "+this.state.facet(ji)}updateAttrs(){let t=an(this,re,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ee)?"true":"false",class:"cm-content",style:`${$.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),an(this,le,e);let i=this.observer.ignore((()=>{let i=nt(this.contentDOM,this.contentAttrs,e),n=nt(this.dom,this.editorAttrs,t);return i||n}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(sn.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(me);let t=this.state.facet(sn.cspNonce);s.G.mount(this.root,this.styleModules.concat(Ji).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Be(this,t,Re(this,t,e,i))}moveByGroup(t,e){return Be(this,t,Re(this,t,e,(e=>function(t,e,i){let s=t.state.charCategorizer(e),o=s(i);return t=>{let e=s(t);return o==n.Je.Space&&(o=e),o==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),s=this.textDirectionAt(t.from),o=i[e?i.length-1:0];return n.OF.cursor(o.side(e,s)+t.from,o.forward(!e,s)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,s){let o=Ee(t,e.head),r=s&&o.type==rt.Text&&(t.lineWrapping||o.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),s=t.textDirectionAt(o.from),l=t.posAtCoords({x:i==(s==bt.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=l)return n.OF.cursor(l,i?-1:1)}return n.OF.cursor(i?o.to:o.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return Be(this,t,function(t,e,i,s){let o=e.head,r=i?1:-1;if(o==(i?t.state.doc.length:0))return n.OF.cursor(o,e.assoc);let l,a=e.goalColumn,h=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(o,e.assoc||-1),d=t.documentTop;if(c)null==a&&(a=c.left-h.left),l=r<0?c.top:c.bottom;else{let e=t.viewState.lineBlockAt(o);null==a&&(a=Math.min(h.right-h.left,t.defaultCharacterWidth*(o-e.from))),l=(r<0?e.top:e.bottom)+d}let u=h.left+a,f=null!=s?s:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let i=l+(f+e)*r,s=De(t,{x:u,y:i},!1,r);if(ih.bottom||(r<0?so)){let e=t.docView.coordsForChar(s),o=!e||i0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Yt)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>on)return It(t.length);let e,i=this.textDirectionAt(t.from);for(let n of this.bidiCache)if(n.from==t.from&&n.dir==i&&(n.fresh||Et(n.isolates,e=ue(this,t))))return n.order;e||(e=ue(this,t));let n=Pt(t.text,i,e);return this.bidiCache.push(new ln(t.from,t.to,i,e,!0,n)),n}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||$.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{x(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Zt.of(new Xt("number"==typeof t?n.OF.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return Zt.of(new Xt(n.OF.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return se.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return se.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=s.G.newName(),n=[ji.of(i),me.of(Gi(`.${i}`,t))];return e&&e.dark&&n.push(_i.of(!0)),n}static baseTheme(t){return n.Nb.lowest(me.of(Gi("."+Ki,t,Yi)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),n=i&&E.get(i)||E.get(t);return(null===(e=null==n?void 0:n.rootView)||void 0===e?void 0:e.view)||null}}sn.styleModule=me,sn.inputHandler=_t,sn.clipboardInputFilter=$t,sn.clipboardOutputFilter=Ut,sn.scrollHandler=Jt,sn.focusChangeEffect=Kt,sn.perLineTextDirection=Yt,sn.exceptionSink=qt,sn.updateListener=jt,sn.editable=ee,sn.mouseSelectionStyle=Wt,sn.dragMovesSelection=zt,sn.clickAddsSelectionRange=Vt,sn.decorations=ae,sn.outerDecorations=he,sn.atomicRanges=ce,sn.bidiIsolatedRanges=de,sn.scrollMargins=fe,sn.darkTheme=_i,sn.cspNonce=n.sj.define({combine:t=>t.length?t[0]:""}),sn.contentAttributes=le,sn.editorAttributes=re,sn.lineWrapping=sn.contentAttributes.of({class:"cm-lineWrapping"}),sn.announce=n.Pe.define();const on=4096,rn={};class ln{constructor(t,e,i,n,s,o){this.from=t,this.to=e,this.dir=i,this.isolates=n,this.fresh=s,this.order=o}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],n=t.length?t[t.length-1].dir:bt.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],o="function"==typeof e?e(t):e;o&&tt(o,i)}return i}const hn=$.mac?"mac":$.windows?"win":$.linux?"linux":"key";function cn(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const dn=n.Nb.default(sn.domEventHandlers({keydown:(t,e)=>bn(pn(e.state),t,e,"editor")})),un=n.sj.define({enables:dn}),fn=new WeakMap;function pn(t){let e=t.facet(un),i=fn.get(e);return i||fn.set(e,i=function(t,e=hn){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},o=(t,n,o,r,l)=>{var a,h;let c=i[t]||(i[t]=Object.create(null)),d=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,o,r,l=i[i.length-1];"Space"==l&&(l=" ");for(let t=0;t{let n=gn={view:e,prefix:i,scope:t};return setTimeout((()=>{gn==n&&(gn=null)}),vn),!0}]})}let u=d.join(" ");s(u,!1);let f=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===h?void 0:h.slice())||[]});o&&f.run.push(o),r&&(f.preventDefault=!0),l&&(f.stopPropagation=!0)};for(let n of t){let t=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:s}=n;for(let e in t)t[e].run.push((t=>s(t,wn)))}let s=n[e]||n.key;if(s)for(let e of t)o(e,s,n.run,n.preventDefault,n.stopPropagation),n.shift&&o(e,"Shift-"+s,n.shift,n.preventDefault,n.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}function mn(t,e,i){return bn(pn(t.state),e,t,i)}let gn=null;const vn=4e3;let wn=null;function bn(t,e,i,s){wn=e;let r=(0,o.xT)(e),l=(0,n.vS)(r,0),a=(0,n.Fh)(l)==r.length&&" "!=r,h="",c=!1,d=!1,u=!1;gn&&gn.view==i&&gn.scope==s&&(h=gn.prefix+" ",$e.indexOf(e.keyCode)<0&&(d=!0,gn=null));let f,p,m=new Set,g=t=>{if(t){for(let e of t.run)if(!m.has(e)&&(m.add(e),e(i)))return t.stopPropagation&&(u=!0),!0;t.preventDefault&&(t.stopPropagation&&(u=!0),d=!0)}return!1},v=t[s];return v&&(g(v[h+cn(r,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!($.windows&&e.ctrlKey&&e.altKey)&&(f=o.E3[e.keyCode])&&f!=r?(g(v[h+cn(f,e,!0)])||e.shiftKey&&(p=o.BN[e.keyCode])!=r&&p!=f&&g(v[h+cn(p,e,!1)]))&&(c=!0):a&&e.shiftKey&&g(v[h+cn(r,e,!0)])&&(c=!0),!c&&g(v._any)&&(c=!0)),d&&(c=!0),c&&u&&e.stopPropagation(),wn=null,c}class yn{constructor(t,e,i,n,s){this.className=t,this.left=e,this.top=i,this.width=n,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let n=t.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=xn(t);return[new yn(e,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let n=Math.max(i.from,t.viewport.from),s=Math.min(i.to,t.viewport.to),o=t.textDirection==bt.LTR,r=t.contentDOM,l=r.getBoundingClientRect(),a=xn(t),h=r.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),d=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),f=Ee(t,n),p=Ee(t,s),m=f.type==rt.Text?f:null,g=p.type==rt.Text?p:null;m&&(t.lineWrapping||f.widgetLineBreaks)&&(m=kn(t,n,1,m));g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=kn(t,s,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return w(b(i.from,i.to,m));{let e=m?b(i.from,null,m):y(f,!1),n=g?b(null,i.to,g):y(p,!0),s=[];return(m||f).to<(g||p).from-(m&&g?1:0)||f.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2h&&n.from=o)break;l>s&&a(Math.max(t,s),null==e&&t<=h,Math.min(l,o),null==i&&l>=c,r.dir)}if(s=n.to+1,s>=o)break}return 0==l.length&&a(h,null==e,c,null==i,t.textDirection),{top:s,bottom:r,horizontal:l}}function y(t,e){let i=l.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function xn(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==bt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function kn(t,e,i,n){let s=t.coordsAtPos(e,2*i);if(!s)return n;let o=t.dom.getBoundingClientRect(),r=(s.top+s.bottom)/2,l=t.posAtCoords({x:o.left+1,y:r}),a=t.posAtCoords({x:o.right-1,y:r});return null==l||null==a?n:{from:Math.max(n.from,Math.min(l,a)),to:Math.min(n.to,Math.max(l,a))}}class Sn{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(An)!=t.state.facet(An)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(An);for(;e{return i=t,n=this.drawn[e],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let e=this.dom.firstChild,i=0;for(let n of t)n.update&&e&&n.constructor&&this.drawn[i].constructor&&n.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(n.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const An=n.sj.define();function Cn(t){return[se.define((e=>new Sn(e,t))),An.of(t)]}const Mn=!$.ios,On=n.sj.define({combine:t=>(0,n.QR)(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Dn(t={}){return[On.of(t),En,Ln,Pn,Gt.of(!0)]}function Tn(t){return t.startState.facet(On)!=t.state.facet(On)}const En=Cn({above:!0,markers(t){let{state:e}=t,i=e.facet(On),s=[];for(let o of e.selection.ranges){let r=o==e.selection.main;if(o.empty?!r||Mn:i.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=o.empty?o:n.OF.cursor(o.head,o.head>o.anchor?-1:1);for(let n of yn.forRange(t,e,i))s.push(n)}}return s},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=Tn(t);return i&&Rn(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){Rn(e.state,t)},class:"cm-cursorLayer"});function Rn(t,e){e.style.animationDuration=t.facet(On).cursorBlinkRate+"ms"}const Ln=Cn({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:yn.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Tn(t),class:"cm-selectionLayer"}),Bn={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Mn&&(Bn[".cm-line"].caretColor=Bn[".cm-content"].caretColor="transparent !important");const Pn=n.Nb.highest(sn.theme(Bn));function In(){return Fn}const Nn=lt.line({class:"cm-activeLine"}),Fn=se.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){let s=t.lineBlockAt(n.head);s.from>e&&(i.push(Nn.range(s.from)),e=s.from)}return lt.set(i)}},{decorations:t=>t.decorations});const Hn="-10000px";class Vn{constructor(t,e,i,n){this.facet=e,this.createTooltipView=i,this.removeTooltipView=n,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let s=null;this.tooltipViews=this.tooltips.map((t=>s=i(t,s)))}update(t,e){var i;let n=t.state.facet(this.facet),s=n.filter((t=>t));if(n===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let o=[],r=e?[]:null;for(let i=0;ie[i]=t)),e.length=r.length),this.input=n,this.tooltips=s,this.tooltipViews=o,!0}}function zn(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Wn=n.sj.define({combine:t=>{var e,i,n;return{position:$.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||zn}}}),qn=new WeakMap,jn=se.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Wn);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Vn(t,$n,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(Wn);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),n=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=Hn,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if($.gecko)i=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Hn&&"0px"==t.style.left){let e=t.getBoundingClientRect();i=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(i||"absolute"==this.position)if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(t=i.width/this.parent.offsetWidth,e=i.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=pe(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(Wn).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:i,space:n,scaleX:s,scaleY:o}=t,r=[];for(let l=0;l=Math.min(i.bottom,n.bottom)||d.rightMath.min(i.right,n.right)+.1)){c.style.top=Hn;continue}let f=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=f?7:0,m=u.right-u.left,g=null!==(e=qn.get(h))&&void 0!==e?e:u.bottom-u.top,v=h.offset||Kn,w=this.view.textDirection==bt.LTR,b=u.width>n.right-n.left?w?n.left:n.right-u.width:w?Math.max(n.left,Math.min(d.left-(f?14:0)+v.x,n.right-m)):Math.min(Math.max(n.left,d.left-m+(f?14:0)-v.x),n.right-m),y=this.above[l];!a.strictSide&&(y?d.top-g-p-v.yn.bottom)&&y==n.bottom-d.bottom>d.top-n.top&&(y=this.above[l]=!y);let x=(y?d.top-n.top:n.bottom-d.bottom)-p;if(xb&&t.topk&&(k=y?t.top-g-2-p:t.bottom+p+2);if("absolute"==this.position?(c.style.top=(k-t.parent.top)/o+"px",c.style.left=(b-t.parent.left)/s+"px"):(c.style.top=k/o+"px",c.style.left=b/s+"px"),f){let t=d.left+(w?v.x:-v.x)-(b+14-7);f.style.left=t/s+"px"}!0!==h.overlap&&r.push({left:b,top:k,right:S,bottom:k+g}),c.classList.toggle("cm-tooltip-above",y),c.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Hn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),_n=sn.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"var(--spice-text)"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Kn={x:0,y:0},$n=n.sj.define({enables:[jn,_n]}),Un=n.sj.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class Yn{static create(t){return new Yn(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Vn(t,Un,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let n=i[t];if(void 0!==n)if(void 0===e)e=n;else if(e!==n)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Gn=$n.compute([Un],(t=>{let e=t.facet(Un);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:Yn.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Jn{constructor(t,e,i,n,s){this.view=t,this.source=e,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ti.bottom||e.xi.right+t.defaultCharacterWidth)return;let o=t.bidiSpans(t.state.doc.lineAt(n)).find((t=>t.from<=n&&t.to>=n)),r=o&&o.dir==bt.RTL?-1:1;s=e.x{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>te(t.state,e,"hover tooltip")))}else!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let t=this.view.plugin(jn),e=t?t.manager.tooltips.findIndex((t=>t.create==Yn.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!function(t,e){let i,{left:n,right:s,top:o,bottom:r}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();o=Math.min(t.top,o),r=Math.max(t.bottom,r)}return e.clientX>=n-Xn&&e.clientX<=s+Xn&&e.clientY>=o-Xn&&e.clientY<=r+Xn}(s.dom,t)||this.pending){let{pos:s}=n[0]||this.pending,o=null!==(i=null===(e=n[0])||void 0===e?void 0:e.end)&&void 0!==i?i:s;(s==o?this.view.posAtCoords(this.lastMove)==s:function(t,e,i,n,s,o){let r=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(r.left>n||r.rights||Math.min(r.bottom,l)=e&&a<=i}(this.view,s,o,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Xn=4;function Zn(t,e={}){let i=n.Pe.define(),s=n.sU.define({create:()=>[],update(t,s){if(t.length&&(e.hideOnChange&&(s.docChanged||s.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(s,t)))),s.docChanged)){let e=[];for(let i of t){let t=s.changes.mapPos(i.pos,-1,n.iR.TrackDel);if(null!=t){let n=Object.assign(Object.create(null),i);n.pos=t,null!=n.end&&(n.end=s.changes.mapPos(n.end)),e.push(n)}}t=e}for(let e of s.effects)e.is(i)&&(t=e.value),e.is(ts)&&(t=[]);return t},provide:t=>Un.from(t)});return{active:s,extension:[s,se.define((n=>new Jn(n,t,s,i,e.hoverTime||300))),Gn]}}function Qn(t,e){let i=t.plugin(jn);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}const ts=n.Pe.define();const es=n.sj.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function is(t,e){let i=t.plugin(ns),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const ns=se.fromClass(class{constructor(t){this.input=t.state.facet(rs),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(es);this.top=new ss(t,!0,e.topContainer),this.bottom=new ss(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(es);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ss(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ss(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(rs);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],o=[],r=[];for(let i of e){let e,l=this.specs.indexOf(i);l<0?(e=i(t.view),r.push(e)):(e=this.panels[l],e.update&&e.update(t)),n.push(e),(e.top?s:o).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(o);for(let t of r)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>sn.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class ss{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=os(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=os(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function os(t){let e=t.nextSibling;return t.remove(),e}const rs=n.sj.define({enables:ns});class ls extends n.FB{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ls.prototype.elementClass="",ls.prototype.toDOM=void 0,ls.prototype.mapMode=n.iR.TrackBefore,ls.prototype.startSide=ls.prototype.endSide=-1,ls.prototype.point=!0;const as=n.sj.define(),hs=n.sj.define(),cs={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>n.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ds=n.sj.define();function us(t){return[ps(),ds.of(Object.assign(Object.assign({},cs),t))]}const fs=n.sj.define({combine:t=>t.some((t=>t))});function ps(t){let e=[ms];return t&&!1===t.fixed&&e.push(fs.of(!0)),e}const ms=se.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(ds).map((e=>new bs(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(fs),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(fs)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=n.om.iter(this.view.state.facet(as),this.view.viewport.from),s=[],o=this.gutters.map((t=>new ws(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(s.length&&(s=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==rt.Text&&e){vs(i,s,n.from);for(let t of o)t.line(this.view,n,s);e=!1}else if(n.widget)for(let t of o)t.widget(this.view,n)}else if(t.type==rt.Text){vs(i,s,t.from);for(let e of o)e.line(this.view,t,s)}else if(t.widget)for(let e of o)e.widget(this.view,t);for(let t of o)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(ds),i=t.state.facet(ds),s=t.docChanged||t.heightChanged||t.viewportChanged||!n.om.eq(t.startState.facet(as),t.state.facet(as),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(s=!0);else{s=!0;let n=[];for(let s of i){let i=e.indexOf(s);i<0?n.push(new bs(this.view,s)):(this.gutters[i].update(t),n.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),n.indexOf(t)<0&&t.destroy();for(let t of n)this.dom.appendChild(t.dom);this.gutters=n}return s}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>sn.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==bt.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function gs(t){return Array.isArray(t)?t:[t]}function vs(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class ws{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=n.om.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:n}=this,s=(e.top-this.height)/t.scaleY,o=e.height/t.scaleY;if(this.i==n.elements.length){let e=new ys(t,o,s,i);n.elements.push(e),n.dom.appendChild(e.dom)}else n.elements[this.i].update(t,o,s,i);this.height=e.bottom,this.i++}line(t,e,i){let n=[];vs(this.cursor,n,e.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let o=this.gutter;(0!=n.length||o.config.renderEmptyElements)&&this.addElement(t,e,n)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),n=i?[i]:null;for(let i of t.state.facet(hs)){let s=i(t,e.widget,e);s&&(n||(n=[])).push(s)}n&&this.addElement(t,e,n)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class bs{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,o=n.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let t=o.getBoundingClientRect();s=(t.top+t.bottom)/2}else s=n.clientY;let r=t.lineBlockAtHeight(s-t.documentTop);e.domEventHandlers[i](t,r,n)&&n.preventDefault()}));this.markers=gs(e.markers(t)),e.initialSpacer&&(this.spacer=new ys(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=gs(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!n.om.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class ys{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;i(0,n.QR)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class As extends ls{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Cs(t,e){return t.state.facet(Ss).formatNumber(e,t.state)}const Ms=ds.compute([Ss],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(xs),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new As(Cs(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let n of t.state.facet(ks)){let s=n(t,e,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(Ss)!=t.state.facet(Ss),initialSpacer:t=>new As(Cs(t,Ds(t.state.doc.lines))),updateSpacer(t,e){let i=Cs(e.view,Ds(e.view.state.doc.lines));return i==t.number?t:new As(i)},domEventHandlers:t.facet(Ss).domEventHandlers})));function Os(t={}){return[Ss.of(t),ps(),Ms]}function Ds(t){let e=9;for(;e{let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.head).from;s>i&&(i=s,e.push(Ts.range(s)))}return n.om.of(e)}));function Rs(){return Es}}}]); +//# sourceMappingURL=5125.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/5505.js b/dot-config/spicetify/Extracted/Raw/xpui/5505.js new file mode 100755 index 00000000..e8c3762e --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/5505.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5505],{21071:(e,t,r)=>{r.d(t,{p:()=>u});var i=r(30758),a=r(62411),n=r(97285),l=r(98293),s=r(12864),o=r(39566),c=r(20784),d=r(86070);const u=i.memo((function({uri:e,divider:t,removeLabel:r}){const u=(0,a.wA)(),p=!(0,o.n)(),g=(0,c.f)(),y=(0,i.useCallback)((async()=>{u((0,l.aw)(e,!0))}),[u,e]);return(0,d.jsx)(s.D,{role:"menuitem",divider:t,disabled:p&&!g?.getCapabilities().canModifyOffline,onClick:y,leadingIcon:(0,d.jsx)(n.k,{semanticColor:"textBrightAccent",size:"small"}),children:r})}))},59076:(e,t,r)=>{r.d(t,{P:()=>x});var i=r(30758),a=r(31417),n=r(10994),l=r(59521),s=r(20772),o=r(21489),c=r(67865),d=r(21071),u=r(44672),p=r(20817),g=r(78774),y=r(7307),m=r(86070);const x=i.memo((function({uri:e,artistUri:t,canPin:r=p.oT.NO,isPinned:i=!1,canRemove:x=!1}){const{spec:h}=(0,g.o)(e);return(0,m.jsx)(u.pZ,{value:"album",children:(0,m.jsxs)(n.W,{children:[x&&(0,m.jsx)(d.p,{uri:e,removeLabel:a.Ru.get("contextmenu.remove-from-library")}),t&&(0,m.jsx)(s.z,{spec:h,divider:"after",uri:t,displayText:a.Ru.get("contextmenu.go-to-artist-radio")}),r!==p.oT.NO&&(0,m.jsx)(c.k,{uri:e,canPin:r,isPinned:i,type:y.c.PRE_RELEASE_ALBUM,spec:h}),(0,m.jsx)(l.m,{uri:e,spec:h,displayText:a.Ru.get("context-menu.copy-album-link")}),(0,m.jsx)(o.q,{spec:h,divider:"before",uri:e})]})})}))},83647:(e,t,r)=>{r.d(t,{z:()=>x});var i=r(30758),a=r(97500),n=r.n(a),l=r(39498),s=r(65503),o=r(7315),c=r(31417);const d="MRzne1iuLfbh7KEwhHOk";var u=r(86070);function p({onClick:e}){return(0,u.jsx)(s.H,{size:"small",onClick:e,iconOnly:o.M,"aria-label":c.Ru.get("close"),className:d})}const g="dixACKl18S755OnSdpna",y="IPdLO850RGC7isV9QxWB",m="S7PfnpeKtq9MCSrMhifz",x=(0,i.forwardRef)((({onClose:e=(()=>{}),children:t,shouldCloseOnEscapePress:r=!0,colorSet:a="encore-announcement-set",maxWidth:s=180,header:o},c)=>((0,i.useEffect)((()=>{const t=t=>{r&&"Escape"===t.key&&e()};return window.addEventListener("keydown",t,!0),()=>{window.removeEventListener("keydown",t,!0)}}),[r,e]),(0,u.jsxs)("div",{ref:c,className:n()(a,g,{[y]:!!o}),style:{maxWidth:`${s}px`},children:[!!o&&(0,u.jsxs)("div",{className:m,children:[o," ",(0,u.jsx)(p,{onClick:e})]}),t,o?null:(0,u.jsx)(p,{onClick:e}),(0,u.jsx)(l.i,{})]}))))},86134:(e,t,r)=>{r.d(t,{$:()=>u});var i=r(30758),a=r(71217),n=r(22949);function l(e,t,r=!0,i=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,n.fk)(e))return;const l=e.querySelector('[tabindex="0"]');t===a.O.UP&&(0,n.MS)(l,s(e,l,a.O.UP,r,i)),t===a.O.DOWN&&(0,n.MS)(l,s(e,l,a.O.DOWN,r,i))}function s(e,t,r,i,l){const s=t.closest('li[role="listitem"]');if(!s)return t;let o=s,c=t;const d=Array.from(e.querySelectorAll('li[role="listitem"]')),u=d.indexOf(s);if(u<0)return t;if(r===a.O.UP){if(document.activeElement===e){if(o=d[d.length-1],l){const e=o?.querySelectorAll(n.nu);c=e[e.length-1]}else c=o?.querySelector(n.nu);return c??t}if(l){const e=Array.from(s.querySelectorAll(n.nu)),r=e.indexOf(t)-1;if(r>=0)return e[r]}let r=u-1;const a=()=>!c&&(!i&&r>=0||i&&u!==r);do{o=d[r];if(i&&!o&&(r=d.length-1,o=d[r]),l){const e=o?.querySelectorAll(n.nu);c=e?e[e.length-1]:null}else c=o?.querySelector(n.nu);r-=1}while(a())}else if(r===a.O.DOWN){if(document.activeElement===e)return o=d[0],c=o?.querySelector(n.nu),c??t;if(l){const e=Array.from(s.querySelectorAll(n.nu)),r=e.indexOf(t)+1;if(r{const e=!i&&r<=d.length;return!c&&(e||i&&u!==r)};do{o=d[r];i&&!o&&(r=0,o=d[r]),c=o?.querySelector(n.nu),r+=1}while(a())}return c||t}var o=r(43356),c=r(35662),d=r(86070);const u=(0,i.forwardRef)((({onKeyDown:e,children:t,circular:r=!0,allowsMultipleInteractiveChildrenInItem:s=!1,...u},p)=>{const g=(0,c.N)(p);(0,o.R)(g);const y=(0,i.useCallback)((t=>{g.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&l(g.current,a.O.UP,r,s),"ArrowDown"===t.key&&l(g.current,a.O.DOWN,r,s),e?.(t))}),[r,s,g,e]),m=(0,i.useCallback)((e=>{if(!g.current)return;const t=e.target,r=g.current.querySelector('[tabindex="0"]');t.closest('li[role="listitem"]')&&t!==r&&(0,n.MS)(r,t,{preventScroll:!0})}),[g]);return(0,d.jsx)("ul",{role:"list",ref:g,onKeyDown:y,onFocus:m,tabIndex:0,...u,children:t})}))},12010:(e,t,r)=>{r.d(t,{e:()=>l});var i=r(70353);const a="k270skPbT7JOaSidSA2a";var n=r(86070);const l=({iconSize:e=64,...t})=>(0,n.jsx)("div",{className:a,children:(0,n.jsx)(i.E,{iconSize:e,...t,semanticColor:"textBrightAccent","aria-hidden":!0})})},12967:(e,t,r)=>{r.d(t,{X:()=>u,A:()=>H});var i=r(30758),a=r(74159),n=r(90160),l=r(31417),s=r(49980),o=r(94461);const c="KsnGjjEeMb2miriJrkjW";var d=r(86070);const u=()=>{const e=l.Ru.getLocaleForTranslation(),t=o.IB[e]??o.IB.en,r=(0,s.ZZ)(),u=(0,i.useCallback)((()=>{r({type:"OPEN"})}),[r]);return(0,d.jsx)("div",{className:c,children:(0,d.jsx)(a.n,{iconLeading:n.d,size:"small",onClick:u,"data-testid":"language-selection-button",children:t.displayName})})};var p=r(8143),g=r(62411),y=r(95530),m=r(6772),x=r(22726),h=r(37410),b=r(33558),f=r(7307),S=r(66387),P=r(77008);const v="ZpqHX3kvsJIsR1QIc4kf",C=({children:e,locale:t,onClick:r,type:i="button"})=>{const a=t===b.Xn,n=(0,P.vf)(window.location.pathname),s=(0,x.o_h)(window.location.pathname),o=(0,h.W)({type:"route",uri:n?f.c.HOME:s?.toURI()}),c={className:v,id:t,onClick:e=>(e=>{if("button"===i){e.preventDefault();const t=new URL(window.location.href);window.location.href.includes("locale")&&t.searchParams.delete("locale"),window.location.href=t.href}r(t)})(e),"data-testid":`language-option-${t}`};if("link"===i){const r=(0,S.ll)(window.location.pathname,!a),i=(0,S.hF)(r,(0,l.a7)(t).baseName),n=o?i:window.location.pathname,s=(e=>e.endsWith("/")?e.slice(0,-1):e)(`${window.location.origin}${n}`);return(0,d.jsx)("a",{href:s,...c,children:e})}return(0,d.jsx)("button",{...c,children:e})},w="eYLSfS4EKfwsdTsItWkY",I=({style:e,children:t})=>(0,d.jsx)("div",{className:w,style:e,children:t});var T=r(97500),R=r.n(T);const A="KPuW9eE4auKgVgMtPZoH",D="zCedVxWmwaJhPIGzJixP",j="qzuG9AHNXHQrOGF06r9A",L="ZgjCz5A7qOyprtvcLK8y",E="BSwvSvqHiQUVuim4Eidv",O="TpluDuF12UKv3IIq_VDu",k=({onClose:e,children:t})=>{const r=(0,i.useRef)(null),{isOpen:a}=(0,s.iL)();return(0,d.jsx)("div",{"data-testid":"language-selection-modal",className:R()(A,{[D]:a}),onClick:t=>{t.target===r.current&&e()},role:"presentation",ref:r,children:t})},N=({ariaDescribedBy:e,ariaLabelledBy:t,children:r})=>{const{isOpen:i}=(0,s.iL)();return(0,d.jsx)("div",{className:j,role:"dialog",hidden:!i,"aria-modal":!0,"aria-labelledby":t,"aria-describedby":e,children:r})};var F=r(7315);const B=({onClose:e})=>(0,d.jsx)("button",{"data-testid":"close-button",className:O,onClick:()=>{e()},children:(0,d.jsx)(F.M,{size:"small","aria-label":l.Ru.get("close")})});var M=r(86394),U=r(2092),V=r(77141),_=r(99644),z=r(95175);const H=({languageSelectionModalRef:e})=>{const t=(0,i.useRef)(null),[r,a]=(0,i.useState)("0"),n=(0,s.ZZ)(),c=(0,g.d4)(U.M),u=(0,i.useCallback)((()=>{n({type:"CLOSE"})}),[n]),{isOpen:x}=(0,s.iL)(),h=(0,i.useCallback)((()=>{a(`${t.current?.getBoundingClientRect().height}px`)}),[a]),b=e=>{var t;(0,z.n0)({name:"sp_locale",value:e,domain:(t="open.spotify.com",t.substring(t.indexOf("."))),days:365}),u()};if((0,M.m)(u),(0,_.w)({refOrElement:t,observeOnly:"height",onResize:h}),(0,i.useEffect)((()=>{h()}),[h]),!e.current)return null;const f="language-selection-title",S="language-selection-subtitle",v={"--header-height":r};return(0,p.createPortal)((0,d.jsx)(V.s,{active:x,children:(0,d.jsx)("div",{children:(0,d.jsx)(k,{onClose:u,children:(0,d.jsxs)(N,{ariaLabelledBy:f,ariaDescribedBy:S,children:[(0,d.jsxs)("div",{className:L,ref:t,children:[(0,d.jsxs)("div",{className:E,children:[(0,d.jsx)(y.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",id:f,paddingBottom:m.v4,children:l.Ru.get("i18n.language-selection.title")}),(0,d.jsx)(y.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",id:S,paddingBottom:m.CD,children:l.Ru.get("i18n.language-selection.subtitle")})]}),(0,d.jsx)(B,{onClose:u})]}),(0,d.jsx)(I,{style:{...v},children:o.Np.map((e=>{const t=(0,l.a7)(e).baseName,r=(0,P.p)({localeFeatureFlag:c,urlLocale:t,type:"locale"});return(0,d.jsxs)(C,{onClick:b,locale:e,type:r?"link":"button",children:[(0,d.jsx)(y.E,{semanticColor:"textBase",children:o.IB[e].displayName}),(0,d.jsx)(y.E,{children:o.IB[e].displayNameEn})]},e)}))})]})})})}),e.current)}},15505:(e,t,r)=>{r.d(t,{A:()=>Ol,YourLibraryX:()=>Ks,q:()=>kl});var i=r(30758),a=r(97500),n=r.n(a),l=r(96131),s=r(62411),o=r(40638),c=r(88308),d=r(14343),u=r(75444),p=r(77567),g=r(65462),y=r(10994),m=r(30855),x=r(18923),h=r(31417),b=r(12864),f=r(89402),S=r(30493),P=r(44672),v=r(33329),C=r(86070);const w=({position:e,divider:t,onCreateCallback:r=(()=>{}),spec:a})=>{const n=(0,f.W)(),{createPlaylist:l}=(0,S.A)(),s=(0,v.s)(),o=(0,i.useCallback)((()=>{n({intent:"create-playlist",type:"click"});const t=a.createButtonFactory().hitCreatePlaylist();t&&s.logInteraction(t),l(h.Ru.get("playlist.default_playlist_name"),e),r()}),[n,a,s,l,e,r]);return(0,C.jsx)(b.D,{role:"menuitem",divider:t,onClick:o,leadingIcon:(0,C.jsx)(x.u,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.create-playlist")})},I=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"create-playlist",children:(0,C.jsx)(w,{...e})})}));var T=r(20817),R=r(78774);const A=i.memo((function({folderUri:e,onCreateCallback:t}){const r=e?{after:{uri:e}}:{before:"start"},{spec:i}=(0,R.o)(e??T.gv);return(0,C.jsx)(P.pZ,{value:"folder",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(I,{position:r,onCreateCallback:t,spec:i}),(0,C.jsx)(m.j,{position:r,onCreateCallback:t,spec:i})]})})}));var D=r(76123),j=r(42583),L=r(50925),E=r(78464),O=r(90696),k=r(97503),N=r(87257),F=r(78505),B=r(50161),M=r(74515),U=r(40339),V=r(53328),_=r(8428),z=r(3168),H=r(62844),W=r(73816),X=r(96566);const K=1248,Y=800,G=(0,X.g)(_.Z),Z=(0,X.g)(H.fX),q=()=>(function(){const{size:e,setSize:t,minWidth:r,maxWidth:a,ylxCollapsedStateNavbarWidth:n,ylxDefaultStateNavbarWidth:s,ylxExpandedStateNavbarWidth:o}=(0,M.y)(),{ylxSidebarState:c,setYlxSidebarState:d,canCollapse:u}=(0,H.sy)(),p=(0,U.XB)(),g=(0,U._Y)(),{min:y,max:m,size:x,setSize:h}=(0,z.f)(),b=(0,W.H)(),f=(0,i.useRef)(null),S=(0,i.useRef)(null),P=(0,i.useRef)(null);(0,i.useLayoutEffect)((()=>{const i=b-e-3*F.KV-(p!==_.Z.Disabled?x+F.KV:0),v={leftSidebarWidth:e,leftSidebarMinWidth:r,leftSidebarMaxWidth:a,ylxSidebarState:c,ylxSidebarStateRestoreTarget:f.current,rightSidebarWidth:x,rightSidebarMinWidth:y,rightSidebarMaxWidth:m,rightSidebarPanel:p,rightSidebarPanelRestoreTarget:S.current,storedCollapsedYLXWidth:n,storedDefaultYLXWidth:s,storedExpandedYLXWidth:o,clientWidth:b,mainContentWidth:i,canCollapse:u},C=P.current;if((0,l.j)(v,C))return;const w=function(e,t){if(!e)return{};let{leftSidebarWidth:r=0,rightSidebarWidth:i=0}=t;const{mainContentWidth:a=0,leftSidebarMinWidth:n=0,leftSidebarMaxWidth:l=0,ylxSidebarState:s,ylxSidebarStateRestoreTarget:o,rightSidebarMinWidth:c=0,rightSidebarMaxWidth:d=0,rightSidebarPanel:u,rightSidebarPanelRestoreTarget:p,storedCollapsedYLXWidth:g=0,storedDefaultYLXWidth:y=0,storedExpandedYLXWidth:m=0,clientWidth:x=0,canCollapse:h=!0}=t,b={},f=u!==_.Z.Disabled,S=void 0!==e.leftSidebarWidth&&r>e.leftSidebarWidth,P=void 0!==e.rightSidebarWidth&&i>e.rightSidebarWidth,v=void 0===e.clientWidth?0:x-e.clientWidth,C=v<0,w=x>0,I=aK?T=Math.max(0,T-(a-K)):I&&(T=I);const R=s===H.fX.EXPANDED&&e.ylxSidebarState!==H.fX.EXPANDED,A=s===H.fX.DEFAULT&&e.ylxSidebarState!==H.fX.DEFAULT;let D=r-n;S&&(D=R?r-B.Z.EXPANDED_MIN:A?r-B.Z.DEFAULT_MIN:0);let j=P?0:i-c;const L=T<=D+j;if(aF.ev?(b.ylxSidebarState=H.fX.DEFAULT,T-=r-y,D=y-B.Z.DEFAULT_MIN):(b.ylxSidebarState=H.fX.COLLAPSED,T-=r-g,D=0),b.ylxSidebarStateRestoreTarget=t.ylxSidebarState);else if(u===_.Z.Disabled&&p!==_.Z.Disabled&&G(p)&&u!==e.rightSidebarPanelRestoreTarget&&a-i-F.KV>=F.ev)b.rightSidebarPanel=p,b.rightSidebarPanelRestoreTarget=null;else if(s===H.fX.DEFAULT&&o===H.fX.EXPANDED&&a-(m-r)>=F.ev)b.ylxSidebarState=H.fX.EXPANDED,b.ylxSidebarStateRestoreTarget=null;else if(s===H.fX.COLLAPSED&&o===H.fX.DEFAULT&&a-(y-r)>=F.ev)b.ylxSidebarState=H.fX.DEFAULT,b.ylxSidebarStateRestoreTarget=null;else if(w&&a>=Y){let e=l-r,t=d-i;const a=Math.min(v,e+t);for(let n=0;n0?(r++,e--):i0&&(i++,t--)}s!==e.ylxSidebarState&&Z(o)&&o===e.ylxSidebarStateRestoreTarget&&(b.ylxSidebarStateRestoreTarget=null);u!==e.rightSidebarPanel&&G(p)&&p===e.rightSidebarPanelRestoreTarget&&(b.rightSidebarPanelRestoreTarget=null);if(T>0&&T<=D+j)for(let e=0;ei&&r>n&&D>0?(r--,D--):i>c&&j>0&&(i--,j--);r&&r!==t.leftSidebarWidth&&(b.leftSidebarWidth=r);i&&i!==t.rightSidebarWidth&&(b.rightSidebarWidth=i);return b}(C,v);void 0!==w.leftSidebarWidth&&t(w.leftSidebarWidth),Z(w.ylxSidebarState)&&d(w.ylxSidebarState),void 0!==w.ylxSidebarStateRestoreTarget&&(f.current=w.ylxSidebarStateRestoreTarget),void 0!==w.rightSidebarWidth&&0!==C?.rightSidebarWidth&&h(w.rightSidebarWidth),void 0!==w.rightSidebarPanel&&g((0,V.MQ)(w.rightSidebarPanel)),void 0!==w.rightSidebarPanelRestoreTarget&&(S.current=w.rightSidebarPanelRestoreTarget),P.current=v}),[e,r,a,t,c,x,y,m,h,p,n,s,o,d,g,b,u])}(),null);var J=r(39795);let $=function(e){return e.YLX_SORT_AND_VIEW_PICKER="ylx-sort-and-view-picker",e.YLX_CUSTOM_ORDERING="ylx-custom-ordering",e.REFINERS_PICKER="refiners-picker",e}({}),Q=function(e){return e.URGENT="urgent",e.CONTEXTUAL="contextual",e.DEFAULT="default",e}({});class ee{itemsRecord={[Q.URGENT]:new Set,[Q.CONTEXTUAL]:new Set,[Q.DEFAULT]:new Set};visibleItem=null;static PRIORITIES=[Q.URGENT,Q.CONTEXTUAL,Q.DEFAULT];static NO_CHANGE={keyToShow:null,keyToHide:null};getNextItem(){let e=null;return ee.PRIORITIES.some((t=>{const r=this.itemsRecord[t];return e=Array.from(r).at(-1)??null,e})),e}updateVisibility(e,t,r){const i=this.visibleItem;"add"===r?this.itemsRecord[t].add(e):this.itemsRecord[t].delete(e);const a=this.getNextItem();return this.visibleItem=a,i===a?ee.NO_CHANGE:{keyToShow:a,keyToHide:i}}}var te=r(93827);let re=function(e){return e.VISIBILITY_GRANTED="visibilityGranted",e.VISIBILITY_DENIED="visibilityDenied",e}({});class ie extends te.V{}const ae=(0,i.createContext)({notifyShowInterest:()=>{throw new Error("notifyShowInterest must be used within a VisibilityOrchestratorProvider")},notifyHideInterest:()=>{throw new Error("notifyHideInterest must be used within a VisibilityOrchestratorProvider")},events:new ie}),ne=({children:e})=>{const t=(0,i.useMemo)((()=>new ee),[]),r=(0,i.useRef)(new ie),a=(0,i.useCallback)(((e,t)=>{t&&r.current.emitSync(re.VISIBILITY_DENIED,{key:t}),e&&r.current.emitSync(re.VISIBILITY_GRANTED,{key:e})}),[]),n=(0,i.useCallback)(((e,r=Q.DEFAULT)=>{const{keyToShow:i,keyToHide:n}=t.updateVisibility(e,r,"add");a(i,n)}),[t,a]),l=(0,i.useCallback)(((e,r=Q.DEFAULT)=>{const{keyToShow:i,keyToHide:n}=t.updateVisibility(e,r,"remove");a(i,n)}),[t,a]);return(0,C.jsx)(ae.Provider,{value:{events:r.current,notifyShowInterest:n,notifyHideInterest:l},children:e})};var le=r(84036);r(55549);te.V;r(27566);class se{events=new te.V;addRefiners(){throw new Error("Method not implemented.")}removeRefiners(){throw new Error("Method not implemented.")}getEvents(){return this.events}updateSelectedRefinersOrder(e){throw new Error("Method not implemented.")}}const oe=(0,i.createContext)(null);r(29195);var ce=r(77195),de=(r(53638),r(11808));r(37842);const ue=function({children:e}){const t=(0,i.useMemo)((()=>new se),[]);return(0,C.jsx)(oe.Provider,{value:t,children:e})},pe=()=>null,ge=()=>null,ye=()=>null,me=()=>null,xe=()=>null;const he={focusElement:()=>{},getFocusElement:()=>null,registerFocusElement:()=>()=>{}},be=(0,i.createContext)(he);class fe{focusElement=()=>{};getFocusElement=()=>null;registerFocusElement=()=>()=>{}}const Se=({children:e})=>{const t=(0,i.useMemo)((()=>new fe),[]);return(0,C.jsx)(be.Provider,{value:t,children:e})};var Pe=r(62021);const ve=()=>({cheetaraOnboardingIsActive:!1,setCheetaraOnboardingIsActive:()=>{},cheetaraOnboardingDismissed:!1,setCheetaraOnboardingDismissed:()=>{},handleCloseCheetaraOnboarding:()=>{},cheetaraTooltipVisible:!1,setCheetaraTooltipVisible:()=>{}});var Ce=r(38501);r(65292);const we=()=>!1;var Ie=r(12967),Te=r(95530),Re=r(18020),Ae=r(67668),De=r(86551),je=r(27301);const Le="rqGyIqd3Igk05BEB2ZC6",Ee="WycFx_Gl2tUXbUJpZiD8",Oe=()=>{const[e,t]=(0,i.useState)(!1),r=(0,Ae.V)(),a=(0,s.d4)(De.JJ);(0,i.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[]);const n=(0,s.d4)(De.mo);return r&&e?(0,C.jsx)(Re.t5,{language:h.Ru.getLocaleForSmartling(),market:a.toLowerCase(),children:(0,C.jsxs)("div",{className:Le,"data-testid":"left-sidebar-legal-links",children:[(0,C.jsx)(Re.JM,{}),(0,C.jsx)("a",{draggable:!1,href:je.Bl,target:"_blank",rel:"noopener",className:Ee,children:(0,C.jsx)(Te.E,{variant:"marginal",children:h.Ru.get("cookies")})}),n&&(0,C.jsx)("a",{draggable:!1,href:je.Vd,target:"_blank",rel:"noopener",className:Ee,children:(0,C.jsx)(Te.E,{variant:"marginal",children:"Форма для Ваших обращений"})})]})}):null},ke="YNnobzGm5w3XKBniKdW9",Ne=(0,i.memo)((function({isAnonymous:e}){return(0,C.jsx)("div",{className:ke,"data-testid":"left-sidebar-footer",children:e&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Oe,{}),(0,C.jsx)(Ie.X,{})]})})}));var Fe=r(96164),Be=r(65503),Me=r(94303),Ue=r(99701),Ve=r(89521),_e=r(91128),ze=r(21549);const He="lvJXjYO7YXxGKHcgx5pe",We="yYGZUqSKJttCw_Z2JvPL",Xe="wkyebhrfwyJPCfDhQgbp",Ke=()=>{const e=(0,Ve.sy)(),t=(0,v.s)(),r=(0,s.wA)(),{spec:a}=(0,ze.r)(Me.V,{}),n=h.Ru.get("web-player.your-library-x.dsa-message",h.Ru.get("web-player.your-library-x.dsa-message-link")),l=(0,i.useCallback)((()=>{r(_e.r8.actions.open()),t.logInteraction(a.learnMoreButtonFactory().hitUiReveal())}),[r,t,a]);return(0,C.jsx)("div",{className:He,children:e?(0,C.jsx)(Ue.Zp,{label:(0,C.jsx)(Te.E,{children:n}),placement:"right",showDelay:0,children:(0,C.jsx)("div",{className:We,children:(0,C.jsx)(Fe.p,{"aria-label":n})})}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{children:(0,C.jsx)(Fe.p,{size:"small"})}),(0,C.jsx)(Te.E,{as:"p",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.dsa-message",(0,C.jsx)(Be.H,{condensedAll:!0,size:"small",semanticColor:"textBase",onClick:l,className:Xe,children:(0,C.jsx)(Te.E,{variant:"bodyMedium",children:h.Ru.get("web-player.your-library-x.dsa-message-link")})}))})]})})},Ye="AhNLpx0iVnlj4SuL_Gaw",Ge="JyZRugeRBHbUtS5ABOQ8",Ze=({className:e})=>(0,C.jsx)("section",{className:n()(Ye,e),children:(0,C.jsxs)("div",{className:Ge,children:[(0,C.jsx)(Te.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.empty-state-folder-title")}),(0,C.jsx)(Te.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.empty-state-folder-subtitle")})]})});var qe=r(94965),Je=r(39770);const $e={getTitle:()=>h.Ru.get("action-trigger.create-playlist"),getDescription:()=>h.Ru.get("action-trigger.login-playlist")},Qe=({children:e,renderInline:t})=>(0,C.jsx)(qe.y,{id:Je.x9,options:{...$e,renderInline:t},children:e});var et=r(86677),tt=r(17866);const rt="CfruGiDGW_FH4l65GMpb",it="fIgbQ9qpINdyy__tkaHi",at="wv308QWnPnkI8n0GdqYO",nt=(0,i.memo)((function(e){const{message:t,title:r,linkTitle:i,linkTo:a,onClick:l,className:s}=e;return(0,C.jsxs)("section",{className:n()(rt,s),children:[(0,C.jsxs)("div",{className:it,children:[(0,C.jsx)(Te.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:r}),(0,C.jsx)(Te.E,{variant:"bodySmall",semanticColor:"textBase",children:t})]}),(0,C.jsx)("div",{className:at,children:i&&(a||l)&&(0,C.jsx)(et.$,{className:at,as:l?"button":void 0,colorSet:"invertedLight",href:a,onClick:l,component:tt.v,size:"small",children:i})})]})})),lt=({className:e})=>{const{createPlaylist:t}=(0,S.A)(),r=(0,i.useCallback)((()=>{t()}),[t]);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Qe,{renderInline:!1,children:(0,C.jsx)(nt,{onClick:r,linkTitle:h.Ru.get("web-player.your-library-x.empty-state-playlists-cta"),title:h.Ru.get("web-player.your-library-x.empty-state-playlists-title"),message:h.Ru.get("web-player.your-library-x.empty-state-playlists-subtitle"),className:e})}),(0,C.jsx)(nt,{linkTo:"/genre/podcasts-web",linkTitle:h.Ru.get("web-player.your-library-x.empty-state-podcasts-browse"),title:h.Ru.get("web-player.your-library-x.empty-state-podcasts-to-follow"),message:h.Ru.get("web-player.your-library-x.empty-state-podcasts-keep-you-updated"),className:e})]})},st="NOXrKH_1anB9lsOlyv5g",ot="FIARvjbv_YZKwz7yxNHw",ct="Fqrv8StT3DnEAfntIKCg",dt="JydI9ZzWnssPC899sOGP",ut=({query:e,className:t})=>(0,C.jsxs)("div",{className:n()(st,t),"data-testid":"no-search-results-view",children:[(0,C.jsx)(Te.E,{as:"h1",variant:"bodyMediumBold",className:ot,children:h.Ru.get("web-player.your-library-x.empty-results-title-short",(0,C.jsx)("span",{className:ct,children:(0,C.jsx)("span",{className:dt,children:e})}))}),(0,C.jsx)(Te.E,{as:"h2",variant:"bodySmall",children:h.Ru.get("web-player.your-library-x.empty-results-text-short")})]});var pt=r(64820);const gt="vhOeYrTmSoea5vemsMpv",yt="pCKhe1uJhYBUC4YVmz9B",mt=({onClick:e})=>(0,C.jsxs)("div",{className:gt,children:[(0,C.jsx)("div",{className:"icon",children:(0,C.jsx)(pt.b,{size:"xlarge",semanticColor:"textBase"})}),(0,C.jsxs)("div",{className:yt,children:[(0,C.jsx)(Te.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.error-title")}),(0,C.jsx)(Te.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.error-body")})]}),(0,C.jsx)("div",{children:(0,C.jsx)(et.$,{onClick:e,colorSet:"invertedLight",size:"small",children:h.Ru.get("web-player.your-library-x.error-button")})})]}),xt=(0,i.createContext)(null);const ht=({children:e})=>{const t=function(){const[e,t]=(0,Pe.x)("ylx-expanded-folders",[]),r=(0,i.useCallback)((t=>e.includes(t)),[e]),a=(0,i.useCallback)(((r,i)=>{const a=e.indexOf(r);if(i){if(-1!==a)return;t([...e,r])}else{if(-1===a)return;t(e.filter((e=>e!==r)))}}),[e,t]);return{expandedFolders:e,getIsFolderExpanded:r,setIsFolderExpanded:a}}();return(0,C.jsx)(xt.Provider,{value:t,children:e})},bt="fYWNdY4zhj4OX_T2Xtg6",ft="BRX6aJUAuAsvHKD_fpbo",St="ZZsPF3Sn4h7m0_5Clhk0",Pt="IZq_xBKdh88HLD4QY90X",vt="PUipCs3_0Qott0Sru3pB",Ct="XAOxFVWnd185_vZ5zPGu",wt="YsCa3XbOXEm79LH0B7do",It="eC25_w41L83mXDCqdm_A",Tt="VyDwqqtx0153zD8a3TED",Rt="rOgsguaurlHVlgCTY0P7",At="zS8ATyQNwnAiEoPrCcIo",Dt="Zwr4MoUVImDin82vBn4y",jt="lb8li6m8Zei4tr0zNKxX",Lt="aK6vld0FgHGxjz6IiHyS",Et="Xw1OibA6EkrU4F47EMw9",Ot="_EFIA9HjgZxxgTSZzQcg",kt="JUPaw8kZF94Coth4G88s",Nt="main-yourLibraryX-listItem",Ft="BfALkuQy0UjTI70U9QlQ",Bt="c1PJ2LHU0EnzyA0jDc1j",Mt=({isScrolled:e})=>(0,C.jsxs)("div",{className:n()(Dt,Lt,{[Et]:e}),children:[(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.title")}),(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.date-added")}),(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.played-at")})]});var Ut=r(17287);const Vt=()=>null,_t=()=>null;const zt=()=>({getFocusElement:null,registerFocusElement:null});var Ht=r(86228),Wt=r(20784);const Xt="a2XwshgvydvJO9If_GzQ",Kt="aVLBGREPTnbTFhkSdUMV",Yt="ViXEX4SVVU_NA7zcS9kd",Gt="pQvrkwXAqZnbSqJiiQuo",Zt="mA1QNQx6oUXgQ8kMID2S",qt={marginBlockEnd:0,willChange:"transform, opacity"},Jt=({filterId:e,isPrimaryFilter:t,isPlaceholder:r,resetFilterIds:a,toggleFilterId:l,allowedDropTargetMimeTypes:s=j.Vp,className:o,innerRef:c,index:d=0,spec:u,...p})=>{const g=(0,v.s)(),y=(0,Wt.f)(),m=p.selected,x=e?y.getFilterLabel(e):"",h=(0,i.useCallback)((()=>{!e||m&&t?(a(),m&&t&&e?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.clearButtonFactory().hitClearFilter())):(l(e),m?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitFilter()))}),[e,x,m,t,a,l,d,g,u]),b=(0,i.useCallback)((e=>{e.detail>1||r||h()}),[r,h]),{className:f,dropPosition:S,...P}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:s},onLongDragOver:h});return(0,C.jsx)(Ht.v,{...p,"aria-label":p["aria-label"],...P,...S===j.Nz.ON?{selectedColorSet:"base"}:void 0,className:n()(o,f,{[Kt]:S===j.Nz.ON,[Zt]:r}),onClick:b,selectedColorSet:S===j.Nz.ON?"invertedDark":"invertedLight",secondary:m&&!t,style:qt,ref:c,tabIndex:-1})};var $t=r(41961);const Qt={marginBlockEnd:0,willChange:"transform, opacity"},er=({filterId:e,isPrimaryFilter:t,isPlaceholder:r,resetFilterIds:a,toggleFilterId:l,allowedDropTargetMimeTypes:s=j.Vp,className:o,innerRef:c,index:d=0,spec:u,...p})=>{const g=(0,v.s)(),y=(0,Wt.f)(),m=p.selected,x=e?y.getFilterLabel(e):"",h=(0,i.useCallback)((()=>{!e||m&&t?(a(),m&&t&&e?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.clearButtonFactory().hitClearFilter())):(l(e),m?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitFilter()))}),[e,x,m,t,a,l,d,g,u]),b=(0,i.useCallback)((e=>{e.detail>1||r||h()}),[r,h]),{className:f,dropPosition:S,...P}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:s},onLongDragOver:h});return(0,C.jsx)($t.m,{...p,"aria-label":p["aria-label"],...P,...S===j.Nz.ON?{selectedColorSet:"base"}:void 0,className:n()(o,f,{[Kt]:S===j.Nz.ON,[Zt]:r}),onClick:b,style:Qt,ref:c,tabIndex:-1})},tr=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.ARTISTS,D.fl.PLAYLISTS_V2,D.fl.SHOWS,D.fl.AUDIOBOOKS,D.fl.EPISODES,D.fl.FOLDERS],rr=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES,D.fl.PLAYLISTS_V2,D.fl.FOLDERS],ir=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES,D.fl.PLAYLISTS_V2,D.fl.FOLDERS];r(66530);const ar=()=>[];function nr(e){return{type:"contentType",id:e.id,name:e.name}}function lr(e){return e.id.startsWith("spotify:concept:")?{type:"tag",id:(t={tagUri:e.id,tagName:e.name,entityCount:0}).tagUri,name:t.tagName,count:t.entityCount}:nr(e);var t}var sr=r(22949);const or=(0,i.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:r,resetFilterIds:a,className:n,spec:l,inFolderView:s}){const o=!(t||e),{availableRefiners:c,activeRefiners:d,allContentTypeRefiners:u}=(({availableFilters:e,activeFilters:t,inFolderView:r})=>{const i=e?.map(nr),a=t?.map(lr)??[],n=ar(),l=we();return{availableRefiners:t?.length||!l||r?i:n,activeRefiners:a,allContentTypeRefiners:i}})({availableFilters:e,activeFilters:t,inFolderView:s}),{registerFocusElement:p}=zt(),y=o?u:[...d??[],...c??[]],m=(0,i.useRef)(null),x=(0,i.useCallback)((()=>{(0,sr.MS)(m.current,m.current?.nextElementSibling instanceof HTMLElement?m.current?.nextElementSibling:null),a()}),[a]),b=we();return y&&0!==y?.length?(0,C.jsxs)(Ut.FN,{className:n,ariaLabel:h.Ru.get("web-player.your-library-x.filter_options"),children:[!!t?.length&&(0,C.jsx)(er,{resetFilterIds:x,toggleFilterId:r,allowedDropTargetMimeTypes:tr,"aria-label":h.Ru.get("web-player.your-library-x.clear_filters"),innerRef:m,spec:l}),y.map(((e,t)=>{const n=d?.includes(e),s=0===t,c=t>0&&d?.includes(y[0]),u=(0,C.jsx)(Jt,{innerRef:void 0,filterId:e.id,isPrimaryFilter:s,isPlaceholder:o,resetFilterIds:a,toggleFilterId:r,selected:n,spec:l,index:t,children:e.name},e.id);return!b||c?u:(0,C.jsx)(g.h,{menu:(0,C.jsx)(i.Suspense,{fallback:!0,children:(0,C.jsx)(_t,{refiner:e,resetFilterIds:a,isSelected:n})}),children:u},e.id)})),b&&!d?.length&&!s&&(0,C.jsx)(Vt,{})]}):null}));var cr=r(22726);const dr="",ur=(0,i.createContext)({openedFolderUri:dr,pushFolder:()=>{},popFolder:()=>{},resetFolder:()=>{},change:"PUSH"}),pr=({children:e})=>{const{setFilter:t}=(0,i.useContext)(J.g),[r,a]=(0,Pe.x)("opened-folder-uri",dr),n=(0,i.useRef)([r??dr]),l=(0,i.useRef)("PUSH"),s=(0,i.useCallback)((e=>{a(e),t(dr)}),[a,t]),o=(0,i.useCallback)((e=>{n.current.push(e),l.current="PUSH",s(n.current.at(-1))}),[s]),c=(0,i.useCallback)((()=>{n.current.pop();const e=n.current.at(-1);return l.current="POP",s(e),e}),[s]),d=(0,i.useCallback)((()=>{n.current=[dr],s(dr)}),[s]);return(0,C.jsx)(ur.Provider,{value:{openedFolderUri:(0,cr.fpb)(r)?r:dr,pushFolder:o,popFolder:c,resetFolder:d,change:l.current},children:e})};var gr=r(89702),yr=r(3602),mr=r(98293),xr=r(78516),hr=r(98211),br=r(28506),fr=r(48210),Sr=r(6772),Pr=r(20616),vr=r(18113),Cr=r(7307),wr=r(85907);const Ir=(e,t)=>t?(e=>{switch(e){case"album":default:return h.Ru.get("web-player.your-library-x.type-album");case"ep":return h.Ru.get("ep");case"single":return h.Ru.get("single");case"compilation":return h.Ru.get("compilation")}})(t):(e=>{switch(e){case Cr.c.ALBUM:return h.Ru.get("web-player.your-library-x.type-album");case Cr.c.ARTIST:return h.Ru.get("web-player.your-library-x.type-artist");case Cr.c.FOLDER:return h.Ru.get("web-player.your-library-x.type-folder");case Cr.c.AUDIOBOOK:return h.Ru.get("web-player.your-library-x.type-audiobook");case Cr.c.YOUR_EPISODES:case Cr.c.LOCAL_FILES:case Cr.c.LIKED_SONGS:case Cr.c.PLAYLIST:return h.Ru.get("web-player.your-library-x.type-playlist");case Cr.c.SHOW:return h.Ru.get("web-player.your-library-x.type-show");case Cr.c.PRE_RELEASE_ALBUM:return h.Ru.get("web-player.your-library-x.type-prerelease-album");case Cr.c.PRE_RELEASE_BOOK:return h.Ru.get("web-player.your-library-x.type-prerelease-audiobook");default:return(0,wr.d)(e)}})(e),Tr=e=>e.type===Cr.c.ALBUM&&"album"!==e.albumType,Rr=e=>{switch(e){case Cr.c.YOUR_EPISODES:case Cr.c.LIKED_SONGS:case Cr.c.LOCAL_FILES:return Cr.c.PLAYLIST;default:return e}},Ar=({shouldShowType:e,type:t,subtitle:r,specialType:i})=>(0,C.jsxs)(C.Fragment,{children:[e&&Ir(t,i),!!r&&e&&" • ",r]});var Dr=r(91015);const jr=({iconSize:e="small"})=>(0,C.jsx)("span",{className:vt,children:(0,C.jsx)(Dr.C,{size:e,semanticColor:"textBrightAccent",className:Pt})}),Lr=({children:e,title:t,subtitleSlot:r,isPlaying:i})=>(0,C.jsx)(Ue.Zp,{label:(0,C.jsxs)("div",{className:At,children:[(0,C.jsxs)("div",{children:[t,r]}),i&&(0,C.jsx)(jr,{})]}),placement:"right",showDelay:0,children:e});var Er=r(79871),Or=r(89473),kr=r(7015);const Nr=({leading:e,subtitle:t,uri:r})=>{const i=`listrow-subtitle-${r}`;return(0,C.jsx)("div",{className:kr.A.subtitle,children:(0,C.jsxs)(Er.j,{className:kr.A.link,id:i,dir:"auto",children:[(0,C.jsx)("span",{className:kr.A.subtitleLeadingWrapper,children:e}),(0,C.jsx)("span",{className:kr.A.subtitleText,children:t})]})})},Fr=({leading:e,subtitle:t,uri:r})=>{const i=`card-subtitle-${r}`;return(0,C.jsx)("div",{className:kr.A.subtitle,children:(0,C.jsxs)(Or.j,{lineClamp:1,className:kr.A.link,id:i,role:"gridcell",dir:"auto",children:[(0,C.jsx)("span",{className:kr.A.subtitleLeadingWrapper,children:e}),t]})})};var Br=r(85387),Mr=r(23041),Ur=r(46111),Vr=r(37410),_r=r(2679);const zr=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock","Hyper","Super","Enter","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo","Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut","BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp","AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate","HangulMode","HanjaMode","JunjaMode","Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4","ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck","Key11","Key12","AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute","SpeechCorrectionList","SpeechInputToggle","LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor","BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop","AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial","TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer","AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle"]);function Hr(e,t){const[r,a]=(0,i.useState)(""),n=(0,i.useRef)(r);n.current=r;const l=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const r=e.current;if(!r||!t)return a(""),()=>{};const i=e=>{const t="Backspace"===e.key,r=" "===e.key,i=e.metaKey||e.ctrlKey,s=e.target instanceof HTMLElement&&e.target?.matches("input, textarea, [contenteditable]"),o=e.isComposing||229===e.keyCode,c=(d=e.key,zr.has(d)&&!t);var d;const u=r&&!n.current,p=t&&!n.current;if(i||s||o||c||u||p)return;(t&&n.current||r)&&(e.preventDefault(),e.stopPropagation()),a((r=>t?r.slice(0,-1):r+e.key)),l.current&&clearTimeout(l.current),l.current=setTimeout((()=>a("")),1e3)};return r.addEventListener("keydown",i,!0),()=>{r.removeEventListener("keydown",i,!0),l.current&&clearTimeout(l.current)}}),[e,t]),r}const Wr=(0,i.createContext)({setTypeaheadResult:({uid:e,str:t})=>{if(e||t)throw new Error("setTypeaheadResult must be used within a TypeaheadProvider")},typeaheadResult:{uid:null,str:""}}),Xr=({children:e,containerRef:t,findMatchingTypeaheadUid:r,isEnabled:a=!0})=>{const[n,l]=(0,i.useState)({uid:null,str:""}),s=(0,i.useMemo)((()=>({typeaheadResult:n,setTypeaheadResult:l})),[n,l]),o=Hr(t,a),c=(0,i.useRef)(o);c.current=o;const d=(0,i.useRef)(r);return d.current=r,(0,i.useEffect)((()=>{o&&a?d.current(o).then((e=>{o===c.current&&l({uid:e,str:o})})):l({uid:null,str:""})}),[a,o,l]),(0,C.jsx)(Wr.Provider,{value:s,children:e})};var Kr=r(66387);const Yr={state:{referrer:"your_library",preventMoveFocus:!0}};function Gr(e,t,r,a,n){const{filter:l}=(0,i.useContext)(J.g),{isActive:s}=(0,_r.l_)(e),o=function(e){const{typeaheadResult:{uid:t,str:r}}=(0,i.useContext)(Wr);return t===e?r:null}(e),c=!!o,d=(0,Vr.W)({uri:e,type:"link"})?(0,Kr.hF)(t):t,u=(0,i.useRef)(null),p=(0,Br.Zp)(),g=(0,i.useCallback)((e=>{e.preventDefault(),n?n():d&&p(d,Yr)}),[n,p,d]);(0,i.useLayoutEffect)((()=>{c&&u.current?.closest('[role="row"], [role="listitem"]')?.querySelector("button")?.focus({preventScroll:!0})}),[c]);const y=a?`${a} • ${r}`:r;return{isActive:s,onClick:g,contents:l||o?(0,C.jsx)("span",{ref:u,children:(0,C.jsx)(br.M,{autoEscape:!0,searchWords:[l.trim(),...o?.split(" ")??""],textToHighlight:y})}):y}}const Zr=({uri:e,playbackUri:t=e,title:r,titlePrefix:i,menu:a,to:l=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:s})=>{const{isActive:o,contents:c}=Gr(t,l,r,i,s),d=`listrow-title-${e}`;return(0,C.jsx)(g.h,{menu:a,children:(0,C.jsx)(Mr.d,{id:d,lineClamp:1,className:n()(kr.A.link,kr.A.titleLink),semanticColor:o?"textBrightAccent":"textBase",dir:"auto",children:c})})},qr=({uri:e,playbackUri:t=e,title:r,titlePrefix:i,menu:a,to:l=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:s})=>{const{isActive:o,onClick:c,contents:d}=Gr(t,l,r,i,s);return(0,C.jsx)(g.h,{menu:a,children:(0,C.jsx)(Ur.Z,{lineClamp:1,className:n()(kr.A.link,kr.A.titleLink),semanticColor:o?"textBrightAccent":"textBase",href:l,onClick:c,role:"gridcell",dir:"auto",children:d})})},Jr=[D.fl.ALBUMS,D.fl.ARTISTS,D.fl.PLAYLISTS_V2,D.fl.SHOWS,D.fl.FOLDERS,D.fl.PSEUDO_PLAYLISTS],$r=[D.fl.PLAYLISTS_V2,D.fl.FOLDERS];var Qr=r(26344);const ei=({isConfirmationForPlaylist:e,onConfirm:t,onClose:r})=>{const i=e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.title-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.title-folder");return(0,C.jsx)(Qr.T,{"aria-label":i,titleText:i,descriptionText:e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.message-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.message-folder"),onConfirm:t,onClose:r,confirmText:h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-text"),confirmLabel:e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-folder"),cancelText:h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.cancel-button-text"),allowHTML:!0})};var ti=r(48905);function ri({onApplyDrop:e,spec:t,isDropTargetPinned:r}){const a=(0,Wt.f)(),{contains:n}=(0,ti.p)("ylpin"),[l,s]=(0,i.useState)(null),o=(0,i.useCallback)((async(t,i)=>{if(r)return void e(t,i);const{[D.fl.PLAYLISTS_V2]:a=[],[D.fl.FOLDERS]:l=[]}=t,o=[...a,...l];if(!!o.length&&(await n(...o)).some(Boolean)){if(o.length>1)throw new Error("Reordering multiple pinned items at once is not supported");s({dropData:t,dropPosition:i})}else e(t,i)}),[r,n,e]),c=(0,v.s)();return{applyDropWithUnpinConfirmation:o,unpinConfirmationDialog:l?(0,C.jsx)(ei,{isConfirmationForPlaylist:!l.dropData[D.fl.FOLDERS]?.length,onClose:()=>s(null),onConfirm:async()=>{const{[D.fl.PLAYLISTS_V2]:r=[],[D.fl.FOLDERS]:i=[]}=l.dropData;await a.unpin([...r,...i][0]),t?.dragUnpinItem&&c.logInteraction(t.dragUnpinItem({itemToUnpin:[...r,...i][0]})),e(l.dropData,l.dropPosition),s(null)}}):null}}function ii(){const{dropOriginUri:e,sectionId:t}=(0,i.useContext)(k.O_);return{dropOriginIsYLX:e===T.gv,entityIsInFolder:t>0}}var ai=r(15178);function ni(){const e=(0,ai.g)(),{dropOriginIsYLX:t}=ii();return(0,i.useCallback)((async(r,i)=>{const a=await e.contains(r);if(1!==new Set(a).size)throw new Error("Dropping a mix of newly added and moved playlists is not supported");if(a[0]){if(r.length>1)throw new Error("Moving multiple playlists at once is not supported");t?await e.move({uri:r[0]},i):await e.move({uri:r[0]},i,!0)}else await e.add(r,i)}),[t,e])}var li=r(78565);function si({dropTargetUri:e,spec:t,isDropTargetPinned:r}){const a=(0,ai.g)(),n=(0,Wt.f)(),l=(0,v.s)(),s=ni(),o=(0,i.useCallback)((async(i,o)=>{const{[D.fl.PLAYLISTS_V2]:c=[],[D.fl.FOLDERS]:[d]=[]}=i,u=o===j.Nz.BEFORE?{before:{uri:e}}:{after:{uri:e}};if(r){const e=i[Object.keys(i)[0]][0];if((0,cr.tbX)(e)||(0,cr.fpb)(e)){const t=oi((await a.getContents()).items,e);-1===t?await a.add([e],{before:"start"}):t>0&&((0,cr.tbX)(e)?await a.move({uri:e},{before:"start"}):await a.moveFolder({uri:e},{before:"start"}))}else if(!(0,cr.Z0m)(e)){const[t]=await n.contains(e);t||await n.add({uris:[e]})}await n.pin(e,u),l.logInteraction(t.dragPinItem({itemToPin:e}))}else d?await a.moveFolder({uri:d},u):c.length&&await s(c,u);l.logInteraction(t.dragSort())}),[e,r,n,l,t,a,s]),{unpinConfirmationDialog:c,applyDropWithUnpinConfirmation:d}=ri(r?{onApplyDrop:o,spec:t,isDropTargetPinned:r}:{onApplyDrop:o});return{handleDropBeforeOrAfterRootlistItem:(0,i.useCallback)((async(e,t)=>{const{[D.fl.PLAYLISTS_V2]:r=[],[D.fl.FOLDERS]:i=[]}=e;if(r.length&&i.length)throw new Error("Dropping a mix of playlists and folders is not supported");if(i.length>1)throw new Error("Dropping multiple folders is not supported");d(e,t)}),[d]),unpinConfirmationDialog:c}}function oi(e,t,r=0){for(const i of e)if((0,li.Af)(i)||(0,li.sA)(i)){if((0,cr.B2u)(i.uri,t))return r;if((0,li.sA)(i)){const e=oi(i.items,t,r+1);if(-1!==e)return e}}return-1}var ci=r(27012);const di={state:{referrer:"your_library",preventMoveFocus:!0}};function ui({uri:e,to:t=(0,cr.o_h)(e)?.toURLPath(!0)||"",type:r,handleNavigate:a,dragLabel:n,isPinned:l,canReorder:s,allowedDropTargetDropOnMimeTypes:o=[],onDropTargetDropOn:c,onLongDragOver:d,openDeleteDialog:u,togglePlay:p,triggerPlay:g,isItemInGrid:y,playInsteadOfNavigating:m=!1,isPlaying:x,spec:h,folderDepth:b}){const f=(0,Vr.W)({uri:e,type:"link"})?(0,Kr.hF)(t):t,S=(0,Br.Zp)(),P=(0,Br.zy)(),C=(0,i.useCallback)((()=>{S(f,di)}),[S,f]),w=(0,v.s)(),I=(0,i.useRef)(0),R=(0,i.useRef)(null),A=(0,i.useCallback)((({target:e})=>e instanceof HTMLElement&&!R.current?.contains(e)),[]),E=(0,i.useCallback)((t=>{if(!A(t)){if(t.preventDefault(),t.currentTarget.scrollIntoView({block:"nearest"}),m){if(I.current>Date.now())return;return I.current=Date.now()+300,void(x||(p?.(),w.logInteraction(h.yourLibraryItemFactory().hitPlay({itemToBePlayed:e}))))}a?a():f&&S(f,{...di,replace:f===P.pathname}),w.logInteraction(h.yourLibraryItemFactory().hitUiNavigate({destination:e}))}}),[A,m,a,f,w,h,e,p,x,S,P.pathname]),O=(0,i.useCallback)((t=>{m||A(t)||g&&(w.logInteraction(h.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:e})),g?.())}),[m,A,g,w,h,e]),k=(0,i.useCallback)((()=>{w.logInteraction(h.yourLibraryItemFactory().secondaryHitUiReveal())}),[w,h]),{draggable:N,onDragStart:F}=(0,ci.P)({itemUris:[e],itemMimeTypes:[(0,D.j3)(r)],dragLabelText:n,sectionId:b??0,dropOriginUri:T.gv});let B=[];l?B=Jr:s&&(B=$r);const M={[j.Nz.ON]:o,[j.Nz.BEFORE]:B,[j.Nz.AFTER]:B},{handleDropBeforeOrAfterRootlistItem:U,unpinConfirmationDialog:V}=si({dropTargetUri:e,spec:h,isDropTargetPinned:l}),_=(0,i.useCallback)(((e,t)=>{t===j.Nz.ON?c?.(e,t):t!==j.Nz.BEFORE&&t!==j.Nz.AFTER||U(e,t)}),[c,U]),{dropPosition:z,className:H,...W}=(0,L.A)({uri:e,allowedMimeTypesByDropPosition:M,onDrop:_,onLongDragOver:d??C,reorderDirection:y?"horizontal":"vertical"}),X=(0,i.useCallback)((t=>{t.repeat||A(t)||("Backspace"!==t.key&&"Delete"!==t.key||!u||u(),"Enter"===t.key&&t.shiftKey&&p&&(t.preventDefault(),p()),"Enter"===t.key&&w.logInteraction(h.yourLibraryItemFactory().keyStrokeUiNavigate({destination:e})))}),[A,w,u,h,p,e]),K=(0,cr.o_h)(P.pathname,{parseUnknown:!0})?.toURI();return{onClick:E,onDoubleClick:O,draggable:N&&!!n,onDragStart:F,onKeyDown:X,unpinConfirmationDialog:V,dropPosition:z,dropTargetClassName:H,logRightClick:k,isViewActive:!!K&&(0,cr.B2u)(e,K),itemRef:R,...W}}var pi=r(31879);const gi=i.createContext(!1),yi=({children:e,isCompact:t})=>(0,C.jsx)(gi.Provider,{value:t,children:e}),mi=()=>(0,i.useContext)(gi),xi="wJTUKAyYI219kJtclJLa",hi="q0_cpEyu_8EC7he96qT_",bi="L8ET6xwMh_wMEqCpmunH",fi="D_1eJKOJ3wTCKO93GX06",Si="_7kcfiJ2UNEh3CDR9Wau",Pi="N8wAJha8ApfxgOfqv4UM",vi="iJMxV9zMXSfrjJPyB3Fw",Ci=({uri:e,to:t=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:r,dragLabel:a,name:l,namePrefix:s,subtitle:o,cover:c,type:d,specialType:u,downloadButton:p,canReorder:y,allowedDropTargetDropOnMimeTypes:m,onDropTargetDropOn:x,onLongDragOver:h,menu:b,leading:f,openDeleteDialog:S,togglePlay:P,triggerPlay:v,isPinned:w,shouldShowType:I,playbackUri:T,isPlaying:R,isActive:A,playInsteadOfNavigating:D,spec:L,index:E,animateClassName:O="",animateState:k,preReleaseIcon:N,lockedIcon:F})=>{const{onClick:B,onDoubleClick:M,draggable:U,onDragStart:V,onKeyDown:_,dropPosition:z,dropTargetClassName:H,unpinConfirmationDialog:W,logRightClick:X,isViewActive:K,itemRef:Y,...G}=ui({uri:e,to:t,handleNavigate:r,dragLabel:a,isPinned:w,canReorder:y,allowedDropTargetDropOnMimeTypes:m,onDropTargetDropOn:x,openDeleteDialog:S,onLongDragOver:h,togglePlay:P,triggerPlay:v,isItemInGrid:!0,isPlaying:R,isActive:A,spec:L,playInsteadOfNavigating:D}),Z=(0,C.jsx)(qr,{uri:e,title:l,titlePrefix:s,menu:b,handleNavigate:r,playbackUri:T}),q=(0,C.jsx)(Fr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:w}),F,N,p]}),subtitle:(0,C.jsx)(Ar,{shouldShowType:I,type:d,subtitle:o,specialType:u}),uri:e}),J=(0,i.useRef)(null),$=mi();let Q=(0,C.jsx)(g.h,{menu:b,onShow:X,children:(0,C.jsx)(vr.E,{uri:e,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(fr.Z,{id:e,title:Z,subtitle:q,media:c,size:"sm",leading:f,className:n()(xi,{[O]:k}),variant:K?"tinted":void 0,onClick:B,onDoubleClick:M,padding:Sr.CJ,...G})})});return $&&(Q=(0,C.jsx)(Lr,{title:Z,subtitleSlot:q,uri:e,isPlaying:R,parentRef:J,children:(0,C.jsx)("div",{children:(0,C.jsx)(g.h,{menu:b,onShow:X,children:(0,C.jsx)(vr.E,{uri:e,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(fr.Z,{id:e,title:void 0,media:c,size:"sm",className:n()(xi,hi,{[O]:k}),variant:K?"tinted":void 0,onClick:B,onDoubleClick:M,padding:Sr.vw,ref:J,...G})})})})})),(0,C.jsxs)(C.Fragment,{children:[W,(0,C.jsx)(Pr.W,{draggable:U,onDragStart:V,onKeyDown:_,className:n()(H,{[Xt]:z===j.Nz.ON,[Yt]:z===j.Nz.BEFORE,[Gt]:z===j.Nz.AFTER}),"aria-selected":A,innerRef:Y,"aria-posinset":E,children:Q})]})};var wi=r(43743),Ii=r(34733);const Ti=({name:e,uri:t,togglePlay:r,spec:a,isActive:l,isPlaying:s,size:o})=>{const c=(0,v.s)(),d=(0,i.useCallback)((()=>{l?s?c.logInteraction(a.yourLibraryItemFactory().doubleHitPause({itemToBePaused:t})):c.logInteraction(a.yourLibraryItemFactory().doubleHitResume({itemToBeResumed:t})):c.logInteraction(a.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:t})),r()}),[l,s,c,a,r,t]);return(0,C.jsx)("div",{className:n()(Si,{[vi]:s,[Pi]:"small"===o}),role:"gridcell",children:(0,C.jsx)(Ii.R,{isPlaying:s,onClick:d,ariaPlayLabel:h.Ru.get("playlist.a11y.play",e),ariaPauseLabel:h.Ru.get("playlist.a11y.pause",e),size:o})})};var Ri=r(20829);const Ai=({name:e,uri:t,togglePlay:r,spec:a,isActive:n,isPlaying:l,size:s})=>{const o=(0,v.s)(),c=(0,i.useCallback)((()=>{const e=(0,Ri.$I)({spec:a,logger:o,uri:t,isActive:n,isPlaying:l});r({loggingParams:e})}),[n,l,o,a,r,t]);return(0,C.jsx)(Ii.R,{isPlaying:l,onClick:c,ariaPlayLabel:h.Ru.get("playlist.a11y.play",e),ariaPauseLabel:h.Ru.get("playlist.a11y.pause",e),size:s,version:Ii.H.transparent})};var Di=r(32255),ji=r(69624),Li=r(97844),Ei=r(99644),Oi=r(32999);const ki=(0,i.memo)((function({title:e,type:t,images:r,isCircular:i,color:a,animateState:l,animateClassName:s="",isPlaying:o,togglePlay:c,spec:d,uri:u}){const p=(0,Oi._)(),{isCollapsed:g}=(0,Ve.$)(),y=c&&!g;return(0,C.jsxs)("div",{className:n()({[kr.A.imageContainer]:y}),children:[(0,C.jsx)(Di.b,{fadeIn:!0,images:p(r,48),shape:i?Di.u.CIRCLE:Di.u.ROUNDED_CORNERS,size:ji.Qe.SIZE_48,iconSize:"medium",type:t,title:e,className:n()(kr.A.entityImage,{[s]:l}),color:a,loadingMode:"eager"}),y&&(0,C.jsx)("div",{className:Ft,children:(0,C.jsx)(Ai,{spec:d.yourLibraryItemFactory().playButtonFactory(),name:e,uri:u,togglePlay:c,isPlaying:o,isActive:!0,size:"medium"})})]})})),Ni=(0,i.memo)((function({title:e,type:t,uri:r,images:a,isCircular:n,togglePlay:l,color:s,spec:o,isActive:c,isPlaying:d}){const u=mi(),p=(0,Oi._)(),[g,y]=(0,i.useState)("medium"),m=(0,i.useRef)(null);return(0,Ei.w)({onResize:({width:e})=>{y(e<90?"small":"medium")},refOrElement:m}),(0,C.jsx)("div",{className:fi,ref:m,children:(0,C.jsx)(wi.M,{images:p(a,250),FallbackComponent:e=>(0,C.jsx)(Li.s,{semanticColor:"textSubdued",type:t,size:"xxlarge",className:bi,...e}),isCircular:n,color:s,loadingMode:"eager",children:l&&!u&&(0,C.jsx)(Ti,{name:e,uri:r,togglePlay:l,spec:o,isActive:c,isPlaying:d,size:g})})})}));var Fi=r(36664);const Bi="_ymJNIfklFmogab9uWY1",Mi=({folderDepth:e=0})=>(0,C.jsx)("li",{className:Bi,style:{"--ylx-folder-depth":e}}),Ui=e=>{const{RowVariantComponent:t,uri:r,to:a=(0,cr.o_h)(r)?.toURLPath(!0)||"",handleNavigate:l,folderDepth:s,className:o,dragLabel:c,isPinned:d,canReorder:u,allowedDropTargetDropOnMimeTypes:p,onDropTargetDropOn:g,onLongDragOver:y,style:m,openDeleteDialog:x,togglePlay:h,triggerPlay:b,isPlaying:f,isActive:S,type:P,menu:v,name:w,namePrefix:I,subtitle:T,downloadButton:R,expandFolderButton:A,cover:D,alt:L,addedAt:E,lastPlayedAt:O,shouldShowType:k,playbackUri:N,playInsteadOfNavigating:F,spec:B,nrValidItems:M,index:U,lockedIcon:V,onKeyDown:_,preReleaseIcon:z,specialType:H,...W}=e,{onClick:X,onDoubleClick:K,onDragStart:Y,onKeyDown:G,dropPosition:Z,dropTargetClassName:q,draggable:J,unpinConfirmationDialog:$,logRightClick:Q,isViewActive:ee,itemRef:te,...re}=ui({uri:r,to:a,type:P,handleNavigate:l,dragLabel:c,isPinned:d,canReorder:u,allowedDropTargetDropOnMimeTypes:p,onDropTargetDropOn:g,onLongDragOver:y,openDeleteDialog:x,togglePlay:h,triggerPlay:b,isPlaying:f,isActive:S,playInsteadOfNavigating:F,spec:B,folderDepth:s}),ie=(0,i.useCallback)((e=>{G(e),_?.(e)}),[G,_]);return(0,C.jsxs)(C.Fragment,{children:[$,Z===j.Nz.BEFORE&&(0,C.jsx)(Mi,{folderDepth:s}),(0,C.jsx)(Fi.c,{style:{"--ylx-folder-depth":s,...m},draggable:J,onDragStart:Y,onDoubleClick:K,className:n()(o,q,Nt,{[Xt]:Z===j.Nz.ON}),...W,...re,onKeyDown:ie,innerRef:te,"aria-setsize":M,"aria-posinset":U+1,children:(0,C.jsx)(t,{...e,to:a,isActive:S,isViewActive:ee,onClick:X,logRightClick:Q,playInsteadOfNavigating:F,parentRef:te})}),Z===j.Nz.AFTER&&(0,C.jsx)(Mi,{folderDepth:s})]})};var Vi=r(46875);const _i=({locked:e})=>e?(0,C.jsx)(Vi.u,{semanticColor:"textSubdued",title:h.Ru.get("mwp.header.content.unavailable"),className:kr.A.icon,size:"xsmall"}):null;var zi=r(28340);function Hi(e){const{uri:t,artists:r,isPremiumOnly:a}=e,{filter:n}=(0,i.useContext)(J.g),{isPlaying:l,isActive:o}=(0,_r.l_)(t),c=(0,s.wA)(),d=(0,i.useCallback)((()=>{c((0,mr.aw)(t))}),[c,t]),{togglePlay:u,triggerPlay:p}=(0,zi.P)({uri:t},{featureIdentifier:"album",referrerIdentifier:"your_library"});return{isPlaying:l,isActive:o,openDeleteDialog:d,togglePlay:a?void 0:u,triggerPlay:a?void 0:p,menu:(0,C.jsx)(xr.h,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,C.jsx)(br.M,{searchWords:[n.trim()],textToHighlight:r.at(0)?.name??""}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"})}}const Wi=({libraryItem:e,shouldShowType:t=!1,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,pinned:c,type:d,albumType:u,addedAt:p,lastPlayedAt:g,color:y,isPremiumOnly:m}=e,{isPlaying:x,isActive:h,openDeleteDialog:b,togglePlay:f,triggerPlay:S,menu:P,subtitleText:v,downloadButton:w}=Hi(e),I=(0,C.jsx)(ki,{title:o,type:d,images:s,color:y,uri:l,isPlaying:x,spec:i,togglePlay:f}),T=(0,C.jsx)(_i,{locked:m});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:I,name:o,subtitle:v,downloadButton:w,alt:o,type:d,specialType:u,dragLabel:o,menu:P,togglePlay:f,triggerPlay:S,openDeleteDialog:b,addedAt:p,lastPlayedAt:g,isPinned:c,isPlaying:x,isActive:h,shouldShowType:t,spec:i,nrValidItems:a,index:n,lockedIcon:T})},Xi=({libraryItem:e,shouldShowType:t=!1,spec:r,index:i})=>{const{uri:a,images:n,name:l,pinned:s,type:o,albumType:c,color:d,isPremiumOnly:u}=e,{togglePlay:p,triggerPlay:g,menu:y,subtitleText:m,downloadButton:x,openDeleteDialog:h,isPlaying:b,isActive:f}=Hi(e),S=(0,C.jsx)(Ni,{title:l,type:o,images:n,uri:a,togglePlay:p,color:d,spec:r,isActive:f,isPlaying:b}),P=(0,C.jsx)(_i,{locked:u});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:m,menu:y,dragLabel:l,cover:S,downloadButton:x,type:o,specialType:c,togglePlay:p,triggerPlay:g,isPinned:s,shouldShowType:t,openDeleteDialog:h,isPlaying:b,isActive:f,spec:r,index:i,lockedIcon:P})};var Ki=r(7520);function Yi(e){const{uri:t}=e,r=(0,s.wA)(),{togglePlay:a,triggerPlay:n}=(0,zi.P)({uri:t},{featureIdentifier:"artist",referrerIdentifier:"your_library"}),{isPlaying:l,isActive:o}=(0,_r.l_)(t);return{togglePlay:a,triggerPlay:n,isPlaying:l,isActive:o,openDeleteDialog:(0,i.useCallback)((()=>{r((0,mr.aw)(t))}),[r,t]),menu:(0,C.jsx)(Ki.t,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0})}}const Gi=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,addedAt:d,lastPlayedAt:u,pinned:p,color:g}=e,{togglePlay:y,triggerPlay:m,isPlaying:x,isActive:h,openDeleteDialog:b,menu:f}=Yi(e),S=(0,C.jsx)(ki,{title:o,type:c,images:s,isCircular:!0,color:g,uri:l,isPlaying:x,spec:i,togglePlay:y});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:S,name:o,type:c,alt:o,dragLabel:o,menu:f,togglePlay:y,triggerPlay:m,openDeleteDialog:b,addedAt:d,lastPlayedAt:u,isPlaying:x,isActive:h,isPinned:p,shouldShowType:t,spec:i,nrValidItems:a,index:n})},Zi=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{togglePlay:d,triggerPlay:u,menu:p,openDeleteDialog:g,isPlaying:y,isActive:m}=Yi(e),x=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:d,isCircular:!0,color:c,spec:r,isActive:m,isPlaying:y});return(0,C.jsx)(Ci,{uri:a,name:l,menu:p,dragLabel:l,cover:x,type:s,togglePlay:d,triggerPlay:u,isPinned:o,shouldShowType:t,openDeleteDialog:g,isPlaying:y,isActive:m,spec:r,index:i})};var qi=r(47863);function Ji(e){const{uri:t,authorName:r}=e,{filter:a}=(0,i.useContext)(J.g),n=(0,s.wA)(),{isPlaying:l,isActive:o}=(0,_r.l_)(t);return{isPlaying:l,isActive:o,openDeleteDialog:(0,i.useCallback)((()=>{n((0,mr.aw)(t))}),[n,t]),menu:(0,C.jsx)(qi.p,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,C.jsx)(br.M,{searchWords:[a.trim()],textToHighlight:r}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"})}}const $i=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,pinned:d,addedAt:u,lastPlayedAt:p,color:g}=e,{isPlaying:y,isActive:m,openDeleteDialog:x,menu:h,subtitleText:b,downloadButton:f}=Ji(e),S=(0,C.jsx)(ki,{title:o,type:c,images:s,color:g,uri:l,isPlaying:y,spec:i,togglePlay:void 0}),P=(0,C.jsx)(_i,{locked:e.isLocked});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:S,name:o,subtitle:b,alt:o,dragLabel:o,menu:h,openDeleteDialog:x,addedAt:u,lastPlayedAt:p,isPlaying:y,isActive:m,isPinned:d,shouldShowType:t,type:c,spec:i,nrValidItems:a,lockedIcon:P,index:n,downloadButton:f})},Qi=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{menu:d,subtitleText:u,openDeleteDialog:p,isPlaying:g,isActive:y,downloadButton:m}=Ji(e),x=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,color:c,spec:r,isActive:y,isPlaying:g});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:u,menu:d,dragLabel:l,cover:x,isPinned:o,shouldShowType:t,type:s,openDeleteDialog:p,isPlaying:g,isActive:y,spec:r,index:i,downloadButton:m})};var ea=r(84703),ta=r(52898);const ra=({uri:e,divider:t,onDeleteCallback:r})=>{const a=(0,f.W)(),n=(0,s.wA)(),l=(0,i.useCallback)((()=>{a({intent:"playlisting",type:"click"}),n((0,mr.OB)(e,r))}),[n,r,a,e]);return(0,C.jsx)(b.D,{role:"menuitem",divider:t,onClick:l,leadingIcon:(0,C.jsx)(ta.P,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.delete")})},ia=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"delete-folder",children:(0,C.jsx)(ra,{...e})})}));var aa=r(67865),na=r(99293),la=r(14237);const sa=({uri:e,spec:t})=>{const{togglePlay:r,isPlaying:a,isActive:n}=(0,zi.P)({uri:e},{featureIdentifier:"folder"}),l=(0,v.s)(),s=(0,i.useCallback)((()=>{r(),t&&l&&(a?l.logInteraction(t.playButtonFactory({uri:e}).hitPause({itemToBePaused:e})):n?l.logInteraction(t.playButtonFactory({uri:e}).hitResume({itemToBeResumed:e})):l.logInteraction(t.playButtonFactory({uri:e}).hitPlay({itemToBePlayed:e})))}),[n,a,l,t,r,e]);return(0,C.jsx)(b.D,{role:"menuitem",onClick:s,leadingIcon:a?(0,C.jsx)(na._,{semanticColor:"textSubdued",size:"small"}):(0,C.jsx)(la.A,{semanticColor:"textSubdued",size:"small"}),children:a?h.Ru.get("pause"):h.Ru.get("play")})},oa=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"create-folder",children:(0,C.jsx)(sa,{...e})})}));var ca=r(10599);const da=({uri:e,name:t,divider:r,spec:a,handleRename:n})=>{const l=(0,v.s)(),o=(0,s.wA)(),c=(0,i.useCallback)((()=>{a&&l.logInteraction(a.editButtonFactory({uri:e}).hitUiReveal()),o((0,mr.O2)(t,n))}),[o,l,t,n,a,e]);return(0,C.jsx)(b.D,{role:"menuitem",divider:r,onClick:c,leadingIcon:(0,C.jsx)(ca.G,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.rename")})},ua=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"rename",children:(0,C.jsx)(da,{...e})})}));var pa=r(23189),ga=r(46845);const ya=i.memo((function({reference:e,name:t="",onRename:r,onCreateCallback:i=(()=>{}),onDeleteCallback:a,canPin:n=T.oT.NO,isPinned:l=!1,isPlayable:s=!0}){const{spec:o}=(0,R.o)(e.uri),c=(0,ga.Ek)()&&s;return(0,C.jsx)(P.pZ,{value:"folder",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(ua,{spec:o,uri:e.uri,name:t,handleRename:r}),(0,C.jsx)(ia,{uri:e.uri,divider:"after",onDeleteCallback:a}),(n!==T.oT.NO||l)&&(0,C.jsx)(aa.k,{uri:e.uri,canPin:n,isPinned:l,type:Cr.c.FOLDER,spec:o}),(0,C.jsx)(I,{position:{after:e},onCreateCallback:i,spec:o}),(0,C.jsx)(m.j,{position:{after:e},onCreateCallback:i,spec:o}),(0,C.jsx)(pa.y,{uriToBeAdded:e.uri,isInLibrary:!0,spec:o}),c&&(0,C.jsx)(oa,{uri:e.uri,spec:o})]})})}));function ma(e,t){const{createPlaylistFromAlbum:r,createPlaylistFromTracks:a}=(0,S.A)(),n=(0,v.s)(),l=(0,ai.g)(),s=ni(),o=(0,i.useCallback)((r=>{if(!t)return;const{[D.fl.PLAYLISTS_V2]:i=[],[D.fl.FOLDERS]:a=[]}=r,o={after:{uri:t}};i.length&&(s(i,o),n.logInteraction(e.dragSort())),a.length&&(l.moveFolder({uri:a[0]},o),n.logInteraction(e.dragSort()))}),[s,n,l,e,t]),{unpinConfirmationDialog:c,applyDropWithUnpinConfirmation:d}=ri({onApplyDrop:o});return{unpinConfirmationDialog:c,handleDropOnFolder:(0,i.useCallback)((async i=>{if(!t)return;const{[D.fl.TRACKS]:l=[],[D.fl.LOCAL_TRACKS]:s=[],[D.fl.ALBUMS]:o=[],[D.fl.EPISODES]:c=[],[D.fl.PLAYLISTS_V2]:u=[],[D.fl.FOLDERS]:p=[]}=i,g={after:{uri:t}};u.length||p.length?d(i,j.Nz.ON):o.length?(r(o[0],g),n.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist())):(l.length||s.length||c.length)&&(a([...l,...s,...c],g),n.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist()))}),[t,d,r,n,e,a])}}var xa=r(94),ha=r(26184),ba=r(99248),fa=r(20150),Sa=r(66834),Pa=r(78119),va=r(94572);const Ca=({uri:e})=>{const[t,r]=(0,i.useState)(!1),a=(0,xa.x)(),n=(0,i.useCallback)((()=>{r(!0),setTimeout((()=>{r(!1)}),500)}),[]);return(0,ba.l)(ha.UV.OPERATION_COMPLETE,(t=>{"add"===t.data.operation&&e===a.getDefaultCurationContextUri(t.data.uris[0])&&n()})),(0,Sa.e)(fa.Lj.OPERATION_COMPLETE,(t=>{"add"===t.data.operation&&e===t.data.uri&&n()})),(0,Pa.b)(va.tD.OPERATION_COMPLETE,(t=>{"remove"!==t.data.operation&&"end"!==t.data.position?.after&&t.data.position.after?.uri===e&&(0,cr.fpb)(e)&&n()})),{animateState:t,animateClassName:kr.A.pulse}};var wa=r(46069),Ia=r(13719);function Ta(e,t){const{uri:r,name:a,numberOfFolders:n,numberOfPlaylists:l,pinned:o}=e,{isPlaying:c,isActive:d}=(0,_r.l_)(r),{pushFolder:u}=(0,i.useContext)(ur),p=(0,s.wA)(),{togglePlay:g,triggerPlay:y}=(0,zi.P)({uri:r},{featureIdentifier:"folder",referrerIdentifier:"your_library"}),m=(0,s.d4)((e=>e.platform.isDesktop)),{handleDropOnFolder:x,unpinConfirmationDialog:b}=ma(t,r),{renameFolder:f}=(0,wa.Z)(),S=x,P=[l>0||!n?h.Ru.get("web-player.your-library-x.rows.folder.number-of-playlists",l):null,n>0?h.Ru.get("web-player.your-library-x.rows.folder.number-of-folders",n):null].filter(Ia.P).join(h.Ru.getSeparator()),v=(0,i.useCallback)(((t="")=>{f(e,t)}),[e,f]),w=(0,i.useCallback)((()=>{u(e.uri)}),[e.uri,u]);return{openDeleteDialog:(0,i.useCallback)((()=>{p((0,mr.OB)(r))}),[p,r]),togglePlay:m?g:void 0,triggerPlay:m?y:void 0,menu:(0,C.jsx)(ya,{reference:{uri:r},name:a,canPin:e.canPin,isPinned:o,onRename:v,isPlayable:!e.isEmpty}),subtitleText:P,onDropTargetDropOn:S,handleNavigate:w,dropOnFolderUnpinConfirmationDialog:b,isPlaying:c,isActive:d}}const Ra=({libraryItem:e,RowVariantComponent:t,spec:r,nrValidItems:a,index:l})=>{const{uri:s,folderDepth:o,name:c,type:d,isFlattened:u,pinned:p,canReorder:g}=e,{openDeleteDialog:y,togglePlay:m,triggerPlay:x,menu:b,subtitleText:f,onDropTargetDropOn:S,handleNavigate:P,dropOnFolderUnpinConfirmationDialog:w,isPlaying:I,isActive:T}=Ta(e,r),[R,A]=function(e){const{getIsFolderExpanded:t,setIsFolderExpanded:r}=(0,i.useContext)(xt);return[(0,i.useMemo)((()=>t(e)),[t,e]),(0,i.useCallback)((t=>{r(e,t)}),[r,e])]}(s),D=(0,v.s)(),j=(0,i.useCallback)((()=>{A(!0),D.logInteraction(r.yourLibraryItemFactory().dragUiReveal())}),[D,A,r]),L=(0,i.useCallback)((e=>{e.stopPropagation()}),[]),E=(0,i.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),A(!R),R?D.logInteraction(r.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiHide()):D.logInteraction(r.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiReveal())}),[A,R,D,r]),O=(0,i.useCallback)((e=>{"ArrowLeft"===e.key?A(!1):"ArrowRight"===e.key&&A(!0)}),[A]),k=!u&&(0,C.jsx)(Be.H,{"data-skip-in-keyboard-nav":!0,"aria-label":R?h.Ru.get("web-player.your-library-x.collapse-folder"):h.Ru.get("web-player.your-library-x.expand-folder"),iconOnly:ea.y,size:"small",condensedAll:!0,onClick:E,onDoubleClick:L,tabIndex:-1,className:n()(vt,Ct,{[kt]:!R})}),{animateState:N,animateClassName:F}=Ca({uri:s}),B=(0,C.jsx)(ki,{title:c,type:d,animateState:N,animateClassName:F,uri:s,isPlaying:I,spec:r,togglePlay:m});return(0,C.jsxs)(C.Fragment,{children:[w,(0,C.jsx)(Ui,{onKeyDown:O,RowVariantComponent:t,uri:s,to:`/folder/${(0,cr.o_h)(s)?.id??""}`,handleNavigate:P,folderDepth:o,cover:B,name:c,subtitle:f,alt:c,dragLabel:c,menu:b,canReorder:g,allowedDropTargetDropOnMimeTypes:ir,onDropTargetDropOn:S,onLongDragOver:j,togglePlay:m,triggerPlay:x,openDeleteDialog:y,addedAt:e.addedAt,lastPlayedAt:e.lastPlayedAt,isPinned:p,shouldShowType:!1,type:d,isPlaying:I,isActive:T,expandFolderButton:k,spec:r,nrValidItems:a,index:l})]})},Aa=({libraryItem:e,spec:t,index:r})=>{const{uri:i,name:a,type:n,pinned:l,canReorder:s}=e,{togglePlay:o,triggerPlay:c,menu:d,subtitleText:u,onDropTargetDropOn:p,handleNavigate:g,openDeleteDialog:y,isPlaying:m,isActive:x}=Ta(e,t),{animateState:h,animateClassName:b}=Ca({uri:i}),f=(0,C.jsx)(Ni,{title:a,type:n,uri:i,togglePlay:o,spec:t,isActive:x,isPlaying:m});return(0,C.jsx)(Ci,{uri:i,to:`/folder/${(0,cr.o_h)(i)?.id??""}`,handleNavigate:g,cover:f,name:a,subtitle:u,menu:d,dragLabel:a,canReorder:s,allowedDropTargetDropOnMimeTypes:ir,onLongDragOver:g,onDropTargetDropOn:p,togglePlay:o,triggerPlay:c,isPinned:l,shouldShowType:!1,type:n,openDeleteDialog:y,isPlaying:m,isActive:x,spec:t,index:r,animateState:h,animateClassName:b})};var Da=r(199);const ja=i.memo((function({uri:e,canPin:t,isPinned:r,downloadUri:i}){const{spec:a}=(0,R.o)(e);return(0,C.jsx)(P.pZ,{value:"generic",children:(0,C.jsxs)(y.W,{children:[i?(0,C.jsx)(Da.d,{spec:a,uri:i}):null,t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:e,canPin:t,isPinned:r,type:Cr.c.PLAYLIST,spec:a})]})})}));var La=r(36061);const Ea=[D.fl.TRACKS,D.fl.LOCAL_TRACKS];function Oa(e){const{numberOfSongs:t}=e,r="spotify:collection:tracks",{user:a}=(0,s.d4)(La.Ht),n=(0,cr.fHB)(a?.id).toURI(),l=n,o=n,{togglePlay:c,triggerPlay:d}=(0,zi.P)({uri:l},{featureIdentifier:"your_library",referrerIdentifier:"your_library"}),u=(0,Wt.f)(),{isPlaying:p,isActive:g}=(0,_r.l_)(l),y=(0,i.useCallback)((e=>{const{[D.fl.TRACKS]:t=[],[D.fl.LOCAL_TRACKS]:r=[]}=e,i=[...t,...r];i?.length&&u?.add({uris:i})}),[u]);return{isPlaying:p,isActive:g,togglePlay:c,triggerPlay:d,menu:(0,C.jsx)(ja,{uri:r,canPin:e.canPin,isPinned:e.pinned,downloadUri:o}),downloadButton:(0,C.jsx)(hr.M,{uri:o,size:"xsmall",className:kr.A.icon,as:"span"}),subtitleText:(0,C.jsx)(C.Fragment,{children:h.Ru.get("web-player.your-library-x.rows.liked-songs.subtitle",t)}),onDropTargetDropOn:y,playbackUri:l,uri:r,...Ca({uri:r})}}const ka=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{images:l,name:s,type:o,pinned:c,addedAt:d,lastPlayedAt:u,color:p}=e,{isPlaying:g,isActive:y,togglePlay:m,triggerPlay:x,menu:h,subtitleText:b,onDropTargetDropOn:f,playbackUri:S,uri:P,downloadButton:v,animateState:w,animateClassName:I}=Oa(e),T=(0,C.jsx)(ki,{title:s,type:o,images:l,color:p,animateState:w,animateClassName:I,uri:P,isPlaying:g,spec:i,togglePlay:m});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:P,cover:T,name:s,subtitle:b,alt:s,dragLabel:s,menu:h,allowedDropTargetDropOnMimeTypes:Ea,onDropTargetDropOn:f,togglePlay:m,triggerPlay:x,addedAt:d,lastPlayedAt:u,isPlaying:g,isActive:y,isPinned:c,shouldShowType:t,type:o,playbackUri:S,downloadButton:v,spec:i,nrValidItems:a,index:n})},Na=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{images:a,name:n,type:l,pinned:s,color:o}=e,{togglePlay:c,triggerPlay:d,menu:u,subtitleText:p,onDropTargetDropOn:g,playbackUri:y,uri:m,downloadButton:x,isPlaying:h,isActive:b,animateState:f,animateClassName:S}=Oa(e),P=(0,C.jsx)(Ni,{title:n,type:l,images:a,uri:y,togglePlay:c,color:o,spec:r,isActive:b,isPlaying:h});return(0,C.jsx)(Ci,{uri:m,name:n,subtitle:p,menu:u,dragLabel:n,allowedDropTargetDropOnMimeTypes:Ea,onDropTargetDropOn:g,cover:P,togglePlay:c,triggerPlay:d,isPinned:s,shouldShowType:t,type:l,playbackUri:y,downloadButton:x,isPlaying:h,isActive:b,spec:r,index:i,animateState:f,animateClassName:S})};var Fa=r(92424),Ba=r(12010),Ma=r(60393),Ua=r(39838);function Va(e){const{numberOfFiles:t}=e,r=Ua.bV,i=(0,Ma.Iu)().uri,{isPlaying:a,isActive:n}=(0,_r.l_)(r);return{playbackUri:r,uri:i,isPlaying:a,isActive:n,menu:(0,C.jsx)(ja,{uri:i,canPin:e.canPin,isPinned:e.pinned}),downloadButton:(0,C.jsx)(Fa.F,{size:"xsmall",className:kr.A.icon,semanticColor:"textBrightAccent"}),subtitleText:h.Ru.get("web-player.your-library-x.rows.local-files.subtitle",t)}}const _a=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{name:l,addedAt:s,lastPlayedAt:o,type:c,pinned:d}=e,{playbackUri:u,uri:p,isPlaying:g,menu:y,subtitleText:m,downloadButton:x,isActive:h}=Va(e),b=(0,C.jsx)("div",{className:wt,children:(0,C.jsx)(Ba.e,{iconSize:24,title:l})});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:p,name:l,subtitle:m,alt:l,dragLabel:l,menu:y,addedAt:s,lastPlayedAt:o,isPinned:d,isPlaying:g,isActive:h,shouldShowType:t,playbackUri:u,downloadButton:x,cover:b,type:c,spec:i,nrValidItems:a,index:n})},za=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{name:a,images:n,type:l,pinned:s}=e,{playbackUri:o,uri:c,menu:d,downloadButton:u,subtitleText:p,isPlaying:g,isActive:y}=Va(e),m=(0,C.jsx)("div",{className:fi,children:(0,C.jsx)(wi.M,{images:n,FallbackComponent:e=>(0,C.jsx)(Ba.e,{size:"xxlarge",className:bi,...e})})});return(0,C.jsx)(Ci,{uri:c,name:a,subtitle:p,menu:d,cover:m,type:l,playbackUri:o,downloadButton:u,isPinned:s,shouldShowType:t,isPlaying:g,isActive:y,spec:r,index:i})};var Ha=r(89845);const Wa=({index:e,type:t})=>{const r=mi();return(0,C.jsx)(Ha.T,{columnIndex:0,children:(0,C.jsx)(fr.Z,{className:n()(xi,{[hi]:r}),media:(0,C.jsx)(wi.M,{images:[],FallbackComponent:()=>(0,C.jsx)(Li.s,{type:t,size:"xxlarge",className:bi,semanticColor:"textSubdued"}),isCircular:t===Cr.c.ARTIST}),variant:"naked",id:e,title:"",padding:r?Sr.vw:Sr.CJ})})};var Xa=r(2963),Ka=r(56349),Ya=r(10285),Ga=r(59521),Za=r(26869),qa=r(65305),Ja=r(1229),$a=r(99165),Qa=r(96641),en=r(34139),tn=r(88761),rn=r(62209),an=r(69476),nn=r(58033),ln=r(42162),sn=r(47694),on=r(11893),cn=r(16743);const dn=i.memo((function({reference:e,isPublished:t,canPin:r=T.oT.NO,isPinned:i=!1,useDialogForUnfollow:a=!1,isInLibrary:n}){const{uri:l}=e,s=(0,on.J)(l),o=!!s?.permissions?.isPrivate,c=(0,cn.v)(l)??s?.isPublished??t,{spec:d}=(0,R.o)(l),u=s?.hasSpotifyAudiobooks;return s&&(0,C.jsx)(P.pZ,{value:"playlist",children:(0,C.jsxs)(y.W,{children:[!u&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Ya.K,{spec:d,uris:[l]}),(0,C.jsx)(sn._,{uri:l,spec:d})]}),!o&&(0,C.jsx)(rn._,{spec:d,divider:s.isOwnedBySelf?"after":"both",uri:l,isPublished:c}),s.isOwnedBySelf&&(0,C.jsx)(qa.T,{spec:d,uri:l,name:s.name,description:s.description,image:s.images[0]}),!s.isOwnedBySelf&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(an.P,{spec:d,uri:l}),(0,C.jsx)(Ka.ET,{uri:l,useDialog:a,initialState:n})]}),s.isOwnedBySelf&&(0,C.jsx)(Za.u,{spec:d,uri:l}),!u&&(0,C.jsx)(Da.d,{spec:d,uri:l}),(0,C.jsx)(I,{position:{after:e},divider:"before",spec:d}),(0,C.jsx)(m.j,{position:{after:e},spec:d}),s.permissions?.canAdministratePermissions&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(tn.U,{spec:d,divider:"before",uri:l,isPrivate:o}),!u&&(0,C.jsx)($a.n,{uri:l,spec:d})]}),s.permissions?.canCancelMembership&&(0,C.jsx)(Qa._,{spec:d,divider:"before",uri:l}),(0,C.jsx)(Ja.w,{spec:d,uri:l}),(0,C.jsx)(pa.y,{uriToBeAdded:l,isInLibrary:!0,spec:d}),!u&&(0,C.jsx)(nn.o,{spec:d,uris:[l],isPlaylist:!0}),(r!==T.oT.NO||i)&&(0,C.jsx)(aa.k,{uri:l,canPin:r,isPinned:i,type:Cr.c.PLAYLIST,spec:d}),(s.isOwnedBySelf||!o)&&(0,C.jsxs)(ln.h,{divider:"before",children:[(0,C.jsx)(Ga.m,{spec:d,uri:l,displayText:h.Ru.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:o}),(0,C.jsx)(en.x,{spec:d,uri:l,type:Cr.c.PLAYLIST})]})]})})})),un=i.memo((function({reference:e,canPin:t=T.oT.NO,isPinned:r=!1}){const{uri:i}=e,{spec:a}=(0,R.o)(i);return(0,C.jsx)(P.pZ,{value:"playlist",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(I,{position:{after:e},divider:"before",spec:a}),(0,C.jsx)(m.j,{position:{after:e},spec:a}),t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:i,canPin:t,isPinned:r,type:Cr.c.PLAYLIST,spec:a})]})})}));var pn=r(29074);function gn(e,t){const{uri:r,isLoading:a,owner:n,pinned:l,canView:o}=e,c=(0,pn.m)(),{filter:d}=(0,i.useContext)(J.g),u=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES],p=[D.fl.AUDIOBOOKS];(0,i.useEffect)((()=>{a&&c.resync(r)}),[c,r,a]);const{togglePlay:g,triggerPlay:m}=(0,zi.P)({uri:r},{featureIdentifier:"playlist",referrerIdentifier:"your_library"}),{isPlaying:x,isActive:b}=(0,_r.l_)(r),f=(0,s.wA)(),S=(0,v.s)();let P,w=[];const I=(0,i.useCallback)((async e=>{const{[D.fl.TRACKS]:i=[],[D.fl.LOCAL_TRACKS]:a=[],[D.fl.ALBUMS]:n=[],[D.fl.EPISODES]:l=[],[D.fl.AUDIOBOOKS]:s=[]}=e,o=[...i,...a,...n,...l,...s];f((0,Xa.io)(r,o)),S.logInteraction(t.yourLibraryItemFactory().dragAddToPlaylist({itemToBeAdded:o.at(0)??"",playlist:r}))}),[f,S,t,r]);e.canAddTo&&(w=e.isEmpty?[...p,...u]:e.isBooklist?p:u,P=I);const T=(0,i.useCallback)((()=>{f((0,mr.O)(r))}),[f,r]),R=(0,yr.c0)(r),A=a&&!e.name;let j;j=R?(0,C.jsx)(un,{reference:e,canPin:e.canPin,isPinned:l}):A?(0,C.jsx)(y.W,{children:(0,C.jsx)(Ka.ET,{uri:r,initialState:!0})}):(0,C.jsx)(dn,{reference:e,canPin:e.canPin,isPinned:l,useDialogForUnfollow:!0,isInLibrary:!0});const L=(0,C.jsx)(hr.M,{uri:r,size:"xsmall",className:kr.A.icon,as:"span"}),E=(0,yr.c0)(r)?h.Ru.get("ylx.clicktoplay"):o?(n.uri,(0,C.jsx)(br.M,{searchWords:[d.trim()],textToHighlight:n.name})):h.Ru.get("web-player.your-library-x.playlist-unavailable"),O=!!(0,yr.c0)(r)||!e.isBooklist&&!e.isEmpty;return{openDeleteDialog:T,togglePlay:O?g:void 0,triggerPlay:O?m:void 0,isPlaying:x,isActive:b,menu:j,downloadButton:L,subtitleText:E,allowedDropTargetDropOnMimeTypes:w,onDropTargetDropOn:P,...Ca({uri:r})}}const yn=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,folderDepth:o,name:c,type:d,pinned:u,addedAt:p,lastPlayedAt:g,color:y,canReorder:m,namePrefix:x}=e,{openDeleteDialog:h,togglePlay:b,triggerPlay:f,isPlaying:S,isActive:P,menu:v,downloadButton:w,subtitleText:I,allowedDropTargetDropOnMimeTypes:T,onDropTargetDropOn:R,animateState:A,animateClassName:D}=gn(e,i),j=(0,C.jsx)(ki,{title:c,type:d,images:s,color:y,animateState:A,animateClassName:D,uri:l,isPlaying:S,togglePlay:b,spec:i});return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,folderDepth:o,cover:j,name:c,namePrefix:x,subtitle:I,alt:c,dragLabel:c,menu:v,canReorder:m,allowedDropTargetDropOnMimeTypes:T,onDropTargetDropOn:R,togglePlay:b,triggerPlay:f,openDeleteDialog:h,addedAt:p,lastPlayedAt:g,isPlaying:S,isActive:P,isPinned:u,shouldShowType:t,type:d,downloadButton:w,spec:i,playInsteadOfNavigating:(0,yr.c0)(l),nrValidItems:a,index:n})})},mn=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c,canReorder:d,namePrefix:u}=e,{togglePlay:p,triggerPlay:g,menu:y,downloadButton:m,subtitleText:x,onDropTargetDropOn:h,allowedDropTargetDropOnMimeTypes:b,openDeleteDialog:f,isPlaying:S,isActive:P,animateState:v,animateClassName:w}=gn(e,r),I=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:p,color:c,spec:r,isActive:P,isPlaying:S});return(0,C.jsx)(Ci,{uri:a,name:l,namePrefix:u,subtitle:x,menu:y,dragLabel:l,canReorder:d,allowedDropTargetDropOnMimeTypes:b,onDropTargetDropOn:h,cover:I,togglePlay:p,triggerPlay:g,isPinned:o,shouldShowType:t,type:s,downloadButton:m,openDeleteDialog:f,isPlaying:S,isActive:P,spec:r,playInsteadOfNavigating:(0,yr.c0)(a),index:i,animateState:v,animateClassName:w})};var xn=r(58160),hn=r(59076),bn=r(21489),fn=r(21071);const Sn=i.memo((function({uri:e,canPin:t=T.oT.NO,isPinned:r=!1,canRemove:i=!1}){const{spec:a}=(0,R.o)(e);return(0,C.jsx)(P.pZ,{value:"audiobook",children:(0,C.jsxs)(y.W,{children:[i&&(0,C.jsx)(fn.p,{uri:e,removeLabel:h.Ru.get("contextmenu.remove-from-library")}),t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:e,canPin:t,isPinned:r,type:Cr.c.PRE_RELEASE_BOOK,spec:a}),(0,C.jsx)(Ga.m,{uri:e,spec:a,displayText:h.Ru.get("context-menu.copy-book-link")}),(0,C.jsx)(bn.q,{spec:a,divider:"before",uri:e})]})})}));function Pn(e){const{uri:t,canPin:r,pinned:a,type:n}=e,{filter:l}=(0,i.useContext)(J.g),o=(0,s.wA)(),c=(0,i.useCallback)((()=>{o((0,mr.aw)(t,!0))}),[o,t]);let d,u="";if(n===Cr.c.PRE_RELEASE_ALBUM){const i=e.artists?.at(0);u=i?.name??"",d=(0,C.jsx)(hn.P,{uri:t,artistUri:i?.uri,canPin:r,isPinned:a,canRemove:!0})}else u=e.authorName,d=(0,C.jsx)(Sn,{uri:t,canPin:r,isPinned:a,canRemove:!0});return{openDeleteDialog:c,menu:d,subtitleText:(0,C.jsx)(br.M,{searchWords:[l.trim()],textToHighlight:u})}}const vn=({libraryItem:e,shouldShowType:t=!1,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,pinned:c,type:d,addedAt:u,lastPlayedAt:p,color:g}=e,{openDeleteDialog:y,menu:m,subtitleText:x}=Pn(e),h=(0,C.jsx)(ki,{title:o,type:d,images:s,color:g,uri:l,isPlaying:!1,spec:i,togglePlay:void 0});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:h,name:o,subtitle:x,alt:o,type:d,dragLabel:o,menu:m,openDeleteDialog:y,addedAt:u,lastPlayedAt:p,isPinned:c,isPlaying:!1,isActive:!1,shouldShowType:t,spec:i,nrValidItems:a,index:n,preReleaseIcon:(0,C.jsx)(xn.t,{size:"xsmall",className:kr.A.icon})})},Cn=({libraryItem:e,shouldShowType:t=!1,spec:r,index:i})=>{const{uri:a,images:n,name:l,pinned:s,type:o,color:c}=e,{menu:d,subtitleText:u,openDeleteDialog:p}=Pn(e),g=(0,C.jsx)(Ni,{title:l,type:o,images:n,uri:a,color:c,spec:r,isActive:!1,isPlaying:!1});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:u,menu:d,dragLabel:l,cover:g,type:o,isPinned:s,shouldShowType:t,openDeleteDialog:p,isPlaying:!1,isActive:!1,spec:r,index:i,preReleaseIcon:(0,C.jsx)(xn.t,{size:"xsmall",className:kr.A.icon})})};var wn=r(29454);function In(e){const{uri:t,publisher:r}=e,{filter:a}=(0,i.useContext)(J.g),n=(0,s.wA)(),{togglePlay:l,triggerPlay:o}=(0,zi.P)({uri:t},{featureIdentifier:"show",referrerIdentifier:"your_library"}),{isPlaying:c,isActive:d}=(0,_r.l_)(t);return{isPlaying:c,isActive:d,openDeleteDialog:(0,i.useCallback)((()=>{n((0,mr.aw)(t))}),[n,t]),togglePlay:l,triggerPlay:o,menu:(0,C.jsx)(wn.H,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"}),subtitleText:(0,C.jsx)(br.M,{autoEscape:!0,searchWords:[a.trim()],textToHighlight:r})}}const Tn=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,addedAt:d,lastPlayedAt:u,pinned:p,color:g}=e,{isPlaying:y,isActive:m,openDeleteDialog:x,togglePlay:h,triggerPlay:b,menu:f,downloadButton:S,subtitleText:P}=In(e),v=(0,C.jsx)(ki,{title:o,type:c,images:s,color:g,uri:l,isPlaying:y,spec:i,togglePlay:h});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:v,name:o,subtitle:P,alt:o,dragLabel:o,menu:f,togglePlay:h,triggerPlay:b,openDeleteDialog:x,addedAt:d,lastPlayedAt:u,isPlaying:y,isActive:m,isPinned:p,shouldShowType:t,type:c,downloadButton:S,spec:i,nrValidItems:a,index:n})},Rn=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{togglePlay:d,triggerPlay:u,menu:p,downloadButton:g,subtitleText:y,openDeleteDialog:m,isPlaying:x,isActive:h}=In(e),b=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:d,color:c,spec:r,isActive:h,isPlaying:x});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:y,menu:p,dragLabel:l,cover:b,togglePlay:d,triggerPlay:u,isPinned:o,shouldShowType:t,type:s,downloadButton:g,openDeleteDialog:m,isPlaying:x,isActive:h,spec:r,index:i})},An=[D.fl.EPISODES];function Dn(e){const{numberOfDownloadedEpisodes:t,uri:r}=e,a=(0,d.NC)(Ce.ucV,{loadingValue:!1}),{user:n}=(0,s.d4)(La.Ht),l=(0,cr.fHB)(n?.id,"your-episodes").toURI(),o=a?r:l,c=T.Xn,{togglePlay:u,triggerPlay:p}=(0,zi.P)({uri:o},{featureIdentifier:"episode",referrerIdentifier:"your_library"}),{isPlaying:g,isActive:y}=(0,_r.l_)(o),m=(0,Wt.f)(),x=(0,i.useCallback)((e=>{const{[D.fl.EPISODES]:t=[]}=e;t?.length&&m?.add({uris:t})}),[m]);return{isPlaying:g,isActive:y,togglePlay:u,triggerPlay:p,menu:(0,C.jsx)(ja,{uri:c,canPin:e.canPin,isPinned:e.pinned}),downloadButton:t?(0,C.jsx)(Fa.F,{size:"xsmall",className:kr.A.icon,semanticColor:"textBrightAccent"}):null,subtitleText:h.Ru.get("web-player.your-library-x.subtitle-your-episodes"),onDropTargetDropOn:x,playbackUri:o,uri:c,...Ca({uri:c})}}const jn=({libraryItem:e,RowVariantComponent:t,spec:r,nrValidItems:i,index:a})=>{const{images:n,name:l,type:s,pinned:o,lastPlayedAt:c,addedAt:d,color:u}=e,{isPlaying:p,isActive:g,togglePlay:y,triggerPlay:m,menu:x,downloadButton:h,subtitleText:b,onDropTargetDropOn:f,playbackUri:S,uri:P,animateState:v,animateClassName:w}=Dn(e),I=(0,C.jsx)(ki,{title:l,type:s,images:n,color:u,animateState:v,animateClassName:w,uri:P,isPlaying:p,spec:r,togglePlay:y});return(0,C.jsx)(Ui,{RowVariantComponent:t,uri:P,cover:I,name:l,subtitle:b,alt:l,dragLabel:l,menu:x,allowedDropTargetDropOnMimeTypes:An,onDropTargetDropOn:f,togglePlay:y,triggerPlay:m,addedAt:d,lastPlayedAt:c,isPlaying:p,isActive:g,isPinned:o,shouldShowType:!1,type:s,downloadButton:h,playbackUri:S,spec:r,nrValidItems:i,index:a})},Ln=({libraryItem:e,spec:t,index:r})=>{const{images:i,name:a,type:n,pinned:l,color:s}=e,{togglePlay:o,triggerPlay:c,menu:d,downloadButton:u,subtitleText:p,onDropTargetDropOn:g,playbackUri:y,uri:m,isPlaying:x,isActive:h,animateState:b,animateClassName:f}=Dn(e),S=(0,C.jsx)(Ni,{title:a,type:n,images:i,uri:m,togglePlay:o,color:s,spec:t,isActive:h,isPlaying:x});return(0,C.jsx)(Ci,{uri:m,name:a,subtitle:p,menu:d,dragLabel:a,allowedDropTargetDropOnMimeTypes:An,onDropTargetDropOn:g,cover:S,togglePlay:o,triggerPlay:c,playbackUri:y,downloadButton:u,isPinned:l,shouldShowType:!1,type:n,isPlaying:x,isActive:h,spec:t,index:r,animateState:b,animateClassName:f})};function En(){const[e,t]=(0,Pe.x)("ylx-grid-scale",1);return{gridScale:e,setGridScale:t}}var On=r(20489),kn=r(42795),Nn=r(11153);const Fn=({span:e,onInView:t,marginBottom:r,marginTop:a})=>{const n=(0,i.useRef)(null);return(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&t()}))}));return n.current&&e.observe(n.current),()=>{e.disconnect()}}),[t]),e<=0?null:(0,C.jsx)("div",{style:{gridColumn:"1/-1",gridRow:`span ${e}`,marginBottom:r,marginTop:a},ref:n,"data-type":"sentinel"},"topSentinel")},Bn=({renderItems:e,nrItems:t,estimatedItemMaxHeight:r,scrollNodeRef:a,nrRowsOverscan:n=5,initalNrRows:l=5,onGridResize:s})=>{const[o,c]=(0,i.useState)({firstRowToRender:0,nrRows:l+n}),d=(0,i.useRef)(0),u=(0,i.useRef)(null),p=(0,i.useRef)(r),g=(0,i.useCallback)((()=>{const e=u.current?.querySelector(':scope > *:not([data-type="sentinel"])');p.current=e?e.getBoundingClientRect().height:p.current}),[]),y=(0,i.useCallback)((()=>{const e=a.current;if(!e)return;g();const t=Math.floor((e.scrollTop-d.current)/p.current),r=Math.max(t-n,0),i=Math.ceil(e.offsetHeight/p.current)+2*n;r===o.firstRowToRender&&i===o.nrRows||c({firstRowToRender:r,nrRows:i})}),[n,o,a,g]),m=(0,i.useCallback)((({columnCount:r})=>{if(r<=0)return[null];s&&s(r,p.current);const i=Math.ceil(t/r),a=o.firstRowToRender*r,l=o.firstRowToRender+o.nrRows-1,c=Math.min(t-1,(l+1)*r-1),d=p.current*(n-2);return[(0,C.jsx)(Fn,{span:o.firstRowToRender,onInView:y,marginBottom:`-${d}px`},`topSentinel-${o.firstRowToRender}`),e(a,c,r),(0,C.jsx)(Fn,{span:i-l,onInView:y,marginTop:`-${d}px`},"bottomSentinel-"+(i-l))]}),[t,n,s,y,e,o]);return(0,i.useEffect)((()=>{const e=u.current,t=a.current;e&&t&&(d.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[a]),(0,C.jsx)(Nn.E,{useUniformRowHeight:!0,ref:u,render:m,onLayoutChange:g})},Mn=(0,X.g)(Cr.c),Un=(0,i.memo)((function({item:e,primaryFilter:t,spec:r,index:i}){const a={shouldShowType:!(0,yr.c0)(e.uri)&&(Rr(e.type)!==t||Tr(e)),spec:r,index:i},n=(0,d.NC)(Ce.lDH);switch(e.type){case Cr.c.FOLDER:return(0,C.jsx)(Aa,{libraryItem:e,...a});case Cr.c.ALBUM:return(0,C.jsx)(Xi,{libraryItem:e,...a});case Cr.c.ARTIST:return(0,C.jsx)(Zi,{libraryItem:e,...a});case Cr.c.AUDIOBOOK:return(0,C.jsx)(Qi,{libraryItem:e,...a});case Cr.c.SHOW:return(0,C.jsx)(Rn,{libraryItem:e,...a});case Cr.c.PLAYLIST:return(0,C.jsx)(mn,{libraryItem:e,...a});case Cr.c.LIKED_SONGS:return(0,C.jsx)(Na,{libraryItem:e,...a});case Cr.c.YOUR_EPISODES:return(0,C.jsx)(Ln,{libraryItem:e,...a});case Cr.c.LOCAL_FILES:return(0,C.jsx)(za,{libraryItem:e,...a});case Cr.c.PRE_RELEASE_ALBUM:return n?(0,C.jsx)(Cn,{libraryItem:e,...a}):null;case Cr.c.PRE_RELEASE_BOOK:return(0,C.jsx)(Cn,{libraryItem:e,...a});default:(0,wr.d)(e)}})),Vn=({getItems:e,scrollNodeRef:t,primaryFilter:r,nrValidItems:a,spec:n})=>{const{gridScale:l}=En(),s=(0,kn.s1)(kn.yV.YLX,l),o=(0,i.useRef)({}),c=function(){const{gridScale:e}=En();return e<.8}(),d=(0,i.useCallback)((e=>(0,C.jsx)(Wa,{index:e,type:Mn(r)?r:void 0},e)),[r]),u=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>{const a=t+i;return e?(0,C.jsx)(Un,{item:e,spec:n,primaryFilter:r,index:a},`${e.uri}-${a}`):d(`${a}`)}))),[e,r,d,n]),p=(0,i.useCallback)(((e,t)=>{o.current={numColumns:e,rowHeight:t}}),[]);return(0,C.jsx)(On.x,{config:s,children:(0,C.jsx)(yi,{isCompact:c,children:(0,C.jsx)(gr.R,{firstInteractiveIsWrapper:!0,"aria-label":h.Ru.get("web-player.your-library-x.your-library"),"aria-rowcount":Math.round(a/(o.current.numColumns??1)),"aria-colcount":o.current.numColumns,children:(0,C.jsx)(Bn,{renderItems:u,nrItems:a,estimatedItemMaxHeight:250,scrollNodeRef:t,onGridResize:p})})})})};var _n=r(26863),zn=r(67065);const Hn="main-yourLibraryX-header",Wn="main-yourLibraryX-collapseButtonWrapper",Xn="main-yourLibraryX-headerContent",Kn="iYP0xuQiJCgi7gx1jUPJ",Yn="main-yourLibraryX-collapseButton",Gn="main-yourLibraryX-button",Zn="af749NDLYTDK_8LinKWD",qn="nGWhztVvLY1BInXjcWYa",Jn="oZT8iKL42zhLAm_zE5F5",$n="MdDY8fQ_j94mQZy7ZVXf",Qn="uNReR011bI8ML42Pgveg",el=e=>{switch(e){case Ve.fX.EXPANDED:return"expanded";case Ve.fX.COLLAPSED:return"collapsed";case Ve.fX.DEFAULT:return"default";default:throw(0,wr.k)(e)}},tl=({folderUri:e,dropTargetClassName:t,spec:r})=>{const{isCollapsed:a,ylxSidebarState:l,setYlxSidebarState:s,lastUncollapsedYlxSidebarState:o}=(0,Ve.$)(),c=(0,v.s)(),d=(0,i.useCallback)((()=>{const e=l===Ve.fX.COLLAPSED?o:Ve.fX.COLLAPSED;s(e),c.logInteraction(r.hitToggleState({stateBeforeToggle:el(l),stateAfterToggle:el(e)}))}),[l,o,s,c,r]),u=a?_n.M:zn.A;return(0,C.jsx)(Ue.Zp,{label:a?h.Ru.get("web-player.your-library-x.expand-your-library"):h.Ru.get("web-player.your-library-x.collapse-your-library"),placement:a?"right":void 0,children:(0,C.jsx)(Be.H,{"aria-label":a?h.Ru.get("web-player.your-library-x.expand-your-library"):h.Ru.get("web-player.your-library-x.collapse-your-library"),onClick:d,className:n()(Wn,Gn,t),condensed:!0,iconLeading:e||a?void 0:u,iconOnly:e||a?u:void 0,children:!e&&!a&&h.Ru.get("web-player.your-library-x.your-library")})})};var rl=r(12931),il=r(26639),al=r(66519);const nl=function({folderUri:e,spec:t}){const{createPlaylist:r}=(0,S.A)(),{createFolder:i}=(0,wa.Z)(),a=(0,v.s)(),n=(0,Ae.V)(),l=e?{after:{uri:e}}:{before:"start"};return(0,C.jsxs)(y.W,{children:[(0,C.jsx)(b.D,{onClick:()=>{r(void 0,l),a.logInteraction(t.createPlaylistOptionFactory().hitCreatePlaylist())},role:"menuitem",leadingIcon:(0,C.jsx)(x.u,{size:"small"}),children:h.Ru.get("web-player.your-library-x.create.create-a-new-playlist")}),!n&&(0,C.jsx)(b.D,{onClick:()=>{i(h.Ru.get("web-player.your-library-x.default_folder_name"),l),a.logInteraction(t.createFolderOptionFactory().hitCreateFolder())},role:"menuitem",leadingIcon:(0,C.jsx)(al.h,{size:"small"}),children:h.Ru.get("web-player.your-library-x.create.create-a-playlist-folder")})]})},ll=({className:e="",folderUri:t,tooltipPlacement:r,spec:a})=>{const l=h.Ru.get("web-player.your-library-x.create.button-label"),s=(0,v.s)(),{createPlaylistFromAlbum:o,createPlaylistFromTracks:c,createPlaylistFromPlaylist:d}=(0,S.A)(),{className:u,dropPosition:p,...g}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:[D.fl.TRACKS,D.fl.EPISODES,D.fl.ALBUMS,D.fl.PLAYLISTS_V2,D.fl.AUDIOBOOKS]},onDrop:(0,i.useCallback)((e=>{const{[D.fl.TRACKS]:r=[],[D.fl.LOCAL_TRACKS]:i=[],[D.fl.EPISODES]:a=[],[D.fl.AUDIOBOOKS]:n=[],[D.fl.ALBUMS]:l=[],[D.fl.PLAYLISTS_V2]:s=[]}=e,u=t?{after:{uri:t}}:{before:"start"},p=[...r,...i,...a];n.length>0?c(n,u):p.length?c(p,u):l.length>0?o(l[0],u):s.length>0&&d(s[0],u)}),[o,d,c,t])});return(0,C.jsx)(il.t,{renderInline:!0,menu:(0,C.jsx)(nl,{folderUri:t,spec:a.createMenuFactory()}),preventScrollingWhileOpen:!1,children:(t,i,o)=>(0,C.jsx)(Ue.Zp,{label:l,placement:r,children:(0,C.jsx)(Be.H,{ref:o,iconOnly:rl.u,className:n()(e,u,{[Kt]:p===j.Nz.ON}),"aria-label":l,onClick:e=>{i(e),s.logInteraction(a.hitUiReveal())},size:"small",...g})})})};var sl=r(75120),ol=r(31383);const cl=({dropTargetClassName:e,spec:t})=>{const{ylxSidebarState:r,setYlxSidebarState:i}=(0,Ve.$)(),a=r===Ve.fX.DEFAULT,l=(0,v.s)();return(0,C.jsx)(Ue.Zp,{label:a?h.Ru.get("web-player.your-library-x.show-more"):h.Ru.get("web-player.your-library-x.show-less"),children:(0,C.jsx)(Be.H,{className:n()(Gn,qn,e),iconOnly:a?sl.h:ol.G,"aria-label":a?h.Ru.get("web-player.your-library-x.enlarge-your-library"):h.Ru.get("web-player.your-library-x.reduce-your-library"),onClick:()=>{i(a?Ve.fX.EXPANDED:Ve.fX.DEFAULT),l.logInteraction(t.hitToggleState({stateBeforeToggle:a?"default":"expanded",stateAfterToggle:a?"expanded":"default"}))},size:"small"})})};var dl=r(8725);const ul=({handleNavigateBack:e,parentFolderUri:t,spec:r})=>{const{handleDropBeforeOrAfterRootlistItem:i}=si({dropTargetUri:t,spec:r}),{dropPosition:a,className:l,...s}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:tr},onDrop:async e=>{i(e,j.Nz.BEFORE)},onLongDragOver:e});return(0,C.jsx)(Ue.Zp,{label:h.Ru.get("web-player.your-library-x.navigate-back-folder"),children:(0,C.jsx)(Be.H,{className:n()(Gn,Zn,l,{[Kt]:a===j.Nz.ON}),"aria-label":h.Ru.get("web-player.your-library-x.navigate-back-folder"),onClick:e,iconOnly:dl.g,size:"small",...s})})};var pl=r(84888),gl=r(75830);const yl=({folderMenu:e,folderName:t,dropTargetClassName:r})=>(0,C.jsx)(gl.b,{menu:e,children:(0,C.jsx)("span",{children:(0,C.jsx)(Ue.Zp,{label:h.Ru.get("more.label.context",t),children:(0,C.jsx)(Be.H,{className:n()(Gn,qn,r),iconOnly:pl.x,"aria-haspopup":"menu","aria-label":h.Ru.get("more.label.context",t),size:"small"})})})}),ml=(0,i.forwardRef)((function({folderUri:e,folderName:t,folderMenu:r,onRename:a,spec:l,className:o},c){const{isActive:d}=(0,_r.l_)(e??"not-a-folder"),u=(0,s.wA)(),p=(0,v.s)(),y=(0,i.useCallback)((()=>{u((0,mr.O2)(t,a)),p.logInteraction(l.hitRenameFolder({uri:e}))}),[u,t,e,p,a,l]);return(0,C.jsx)(Ue.Zp,{label:t,showDelay:Ue.uF,children:(0,C.jsx)("div",{className:n()($n,o),children:(0,C.jsx)(g.h,{menu:r,children:(0,C.jsx)(Be.H,{"aria-label":t,onClick:y,size:"small",condensed:!0,className:n()(Gn),ref:c,children:(0,C.jsx)(Te.E,{variant:"bodyMediumBold",semanticColor:d?"textBrightAccent":void 0,className:Qn,children:t})})})})})}));var xl=r(6825),hl=r(87672),bl=r(7604);const fl="fJrnaZd0QWm65978IgD2",Sl="yCpl0fAaEYj7E8F_Oabw",Pl=()=>{const{syncing:e,percentage:t,currentItem:r,totalItems:a}=function(){const[e,t]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),r=hl.I.UPDATE_TOTAL_PROGRESS,a=(0,i.useCallback)((e=>t(e.data.progress)),[]);return(0,bl.b)(r,a),e}();return e?(0,C.jsxs)("div",{className:fl,children:[(0,C.jsxs)("div",{className:Sl,children:[(0,C.jsx)(Te.E,{variant:"bodySmallBold",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.download-progress-title")}),(0,C.jsx)(Te.E,{variant:"bodySmallBold",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.download-progress-count-out-of-total",r,a)})]}),(0,C.jsx)(xl.z,{value:t})]}):null};const vl=({parentDropTargetClassName:e,isLibraryCompletelyEmpty:t,folderUri:r,folderName:a,spec:l,openedFolderIsPlayable:s})=>{const{isCollapsed:o,ylxSidebarState:d,canExpand:u}=(0,Ve.$)(),{renameFolder:p}=(0,wa.Z)(),{popFolder:g}=(0,i.useContext)(ur),y=(0,i.useCallback)(((e="")=>{r&&p({uri:r},e)}),[r,p]),m=(0,i.useCallback)((()=>{g()}),[g]),x=r?(0,C.jsx)(ya,{reference:{uri:r},name:a,onRename:y,onDeleteCallback:m,isPlayable:s}):null,{dropOriginIsYLX:h}=ii(),b=!o&&r&&void 0!==a,f=(0,i.useRef)(null),S=(0,i.useRef)(null),P=(0,i.useRef)(null);!function(e,t,r,...a){const n=(0,c.U0)((()=>{if(e.current)if(t.current instanceof HTMLElement){e.current.style.display="block";const{scrollWidth:r,offsetWidth:i}=t.current,a=r>i;e.current.style.display=a?"none":"block"}else e.current.style.display="block"}),[a]);(0,i.useLayoutEffect)(n,[n]),(0,Ei.w)({refOrElement:r,observeOnly:"width",onResize:n})}(P,(0,i.useMemo)((()=>({get current(){return S.current?.firstElementChild instanceof HTMLElement?S.current?.firstElementChild:null}})),[]),f,a,b);const v=!o||t&&o;return(0,C.jsxs)("header",{className:n()(Hn,{[Jn]:o}),ref:f,children:[!o&&(0,C.jsx)(Pl,{}),(0,C.jsxs)("div",{className:n()(Xn,{[Kn]:o}),children:[(0,C.jsxs)("div",{className:n()(Yn,{[Kn]:o}),children:[(0,C.jsx)(tl,{folderUri:r,dropTargetClassName:e,spec:l.toggleCollapsedModeButtonFactory({identifier:""})}),r&&(0,C.jsx)(ul,{handleNavigateBack:m,parentFolderUri:r,spec:l.folderBackButtonFactory()}),b&&(0,C.jsx)(ml,{folderUri:r,folderName:a,folderMenu:x,onRename:y,spec:l.folderTitleFactory(),className:h?e:void 0,ref:S},r)]}),v&&(0,C.jsx)("span",{ref:P,children:(0,C.jsx)(ll,{className:n()(Gn,qn),folderUri:r,tooltipPlacement:o?"right":void 0,spec:l.createMenuButtonFactory()})}),r&&!o&&(0,C.jsx)(yl,{folderName:a,folderMenu:x,dropTargetClassName:e}),(d===Ve.fX.DEFAULT&&u||d===Ve.fX.EXPANDED)&&(0,C.jsx)(cl,{dropTargetClassName:e,spec:l.toggleExpandedModeButtonFactory({identifier:""})})]})]})};var Cl=r(86134),wl=r(97848),Il=r(6593);const Tl=({date:e})=>(0,C.jsx)(Te.E,{variant:"bodySmall",semanticColor:"textSubdued",className:jt,children:e&&h.Ru.formatRelativeDate(new Date(e),{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}),Rl=e=>{const t=e.handleNavigate,r=(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),i=e.expandFolderButton??(e.isPlaying&&(0,C.jsx)(jr,{})),a=(0,C.jsx)(Nr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:e.isPinned}),e.preReleaseIcon,e.downloadButton,e.lockedIcon]}),subtitle:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Ar,{shouldShowType:e.shouldShowType,type:e.type,subtitle:e.subtitle,specialType:e.specialType})}),uri:e.uri}),n=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:n,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:bt,media:e.cover,title:r,subtitle:a,trailing:i,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:Sr.v4,onClick:e.onClick,hoverAnimationDuration:"0ms"})})})},Al=e=>{const t=e.handleNavigate,r=(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),i=(0,C.jsx)(Nr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:e.isPinned}),e.preReleaseIcon,e.downloadButton,e.lockedIcon]}),subtitle:(0,C.jsx)(Ar,{shouldShowType:e.shouldShowType,type:e.type,subtitle:e.subtitle,specialType:e.specialType}),uri:e.uri}),a=e.logRightClick;return(0,C.jsx)(Lr,{...e,title:r,subtitleSlot:i,parentRef:e.parentRef,children:(0,C.jsxs)("div",{children:[(0,C.jsx)(g.h,{menu:e.menu,onShow:a,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:n()(bt,St),media:e.cover,id:e.uri,padding:Sr.v4,onClick:e.onClick,variant:void 0,title:void 0,hoverAnimationDuration:"0ms"})})}),(0,C.jsxs)("span",{className:Bt,children:[r," ",i]})]})})},Dl=e=>{const t=(0,i.useRef)(null),r=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:r,children:(0,C.jsxs)("div",{className:Dt,ref:t,children:[(0,C.jsx)(Rl,{...e,parentRef:t}),(0,C.jsx)(Tl,{date:e.addedAt}),(0,C.jsx)(Tl,{date:e.lastPlayedAt})]})})},jl=e=>{const t=e.handleNavigate,r=(0,C.jsxs)("div",{className:Ot,children:[(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),e.shouldShowType&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Il.v,{children:"•"}),(0,C.jsx)(Il.v,{lineClamp:1,children:Ir(e.type,e.specialType)})]}),(!e.shouldShowType&&e.type===Cr.c.ALBUM||(0,yr.c0)(e.uri))&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Il.v,{children:"•"}),(0,C.jsx)(Nr,{leading:null,uri:e.uri,subtitle:e.subtitle})]})]}),i=(0,C.jsx)(pi.g,{pinned:e.isPinned}),a=e.expandFolderButton??(e.isPlaying?(0,C.jsx)(jr,{iconSize:"xsmall"}):(0,C.jsxs)(C.Fragment,{children:[e.downloadButton&&(0,C.jsx)("div",{className:vt,children:e.downloadButton}),e.preReleaseIcon&&(0,C.jsx)("div",{className:vt,children:e.preReleaseIcon}),e.lockedIcon&&(0,C.jsx)("div",{className:vt,children:e.lockedIcon})]})),l=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:l,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:n()(bt,ft),title:r,leading:e.isPinned?i:void 0,trailing:a,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:`${Sr.vw} ${Sr.v4}`,onClick:e.onClick,size:"sm",hoverAnimationDuration:"0ms"})})})},Ll=e=>{const t=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:t,children:(0,C.jsxs)("div",{className:Dt,children:[(0,C.jsx)(jl,{...e}),(0,C.jsx)(Tl,{date:e.addedAt}),(0,C.jsx)(Tl,{date:e.lastPlayedAt})]})})},El=({height:e,isCompact:t,primaryFilter:r})=>(0,C.jsx)(Fi.c,{className:n()({[It]:!t,[Rt]:t,[Tt]:r===Cr.c.ARTIST}),style:{height:e}});let Ol=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COMPACT=1]="COMPACT",e}({});const kl=()=>{const[e,t]=(0,Pe.x)("library-row-mode",Ol.DEFAULT),r=(0,Ve.vW)();return{libraryRowMode:e,setLibraryRowMode:t,rowHeight:e===Ol.DEFAULT||r===Ve.fX.COLLAPSED?64:32}};var Nl=r(58306);const Fl=(0,i.memo)((function({item:e,primaryFilter:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n,ylxIsCompact:l}){const s={shouldShowType:!(0,yr.c0)(e.uri)&&(Rr(e.type)!==t||Tr(e)&&!l),RowVariantComponent:r,spec:i,nrValidItems:a,index:n},o=(0,d.NC)(Ce.lDH);switch(e.type){case Cr.c.FOLDER:return(0,C.jsx)(Ra,{libraryItem:e,...s});case Cr.c.ALBUM:return(0,C.jsx)(Wi,{libraryItem:e,...s});case Cr.c.ARTIST:return(0,C.jsx)(Gi,{libraryItem:e,...s});case Cr.c.AUDIOBOOK:return(0,C.jsx)($i,{libraryItem:e,...s});case Cr.c.SHOW:return(0,C.jsx)(Tn,{libraryItem:e,...s});case Cr.c.PLAYLIST:return(0,C.jsx)(yn,{libraryItem:e,...s});case Cr.c.LIKED_SONGS:return(0,C.jsx)(ka,{libraryItem:e,...s});case Cr.c.YOUR_EPISODES:return(0,C.jsx)(jn,{libraryItem:e,...s});case Cr.c.LOCAL_FILES:return(0,C.jsx)(_a,{libraryItem:e,...s});case Cr.c.PRE_RELEASE_ALBUM:return o?(0,C.jsx)(vn,{libraryItem:e,...s}):null;case Cr.c.PRE_RELEASE_BOOK:return(0,C.jsx)(vn,{libraryItem:e,...s});default:(0,wr.d)(e)}})),Bl=({getItems:e,scrollNodeRef:t,primaryFilter:r,nrValidItems:a,spec:n})=>{const l=(0,Ve.vW)(),{rowHeight:s,libraryRowMode:o}=kl(),c=o===Ol.COMPACT,d=((e,t)=>{switch(e){case Ve.fX.COLLAPSED:return Al;case Ve.fX.DEFAULT:return t?jl:Rl;case Ve.fX.EXPANDED:return t?Ll:Dl;default:(0,wr.d)(e)}})(l,c),u=(0,i.useCallback)(((e,t)=>(0,C.jsx)(El,{height:e,isCompact:c,primaryFilter:r},t)),[c,r]),p=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>{const l=t+i;return e?(0,C.jsx)(Fl,{item:e,spec:n,RowVariantComponent:d,primaryFilter:r,nrValidItems:a,index:l,ylxIsCompact:c},`${e.uri}-${l}`):u(`${s}px`,`${l}`)}))),[e,n,d,r,a,c,u,s]);return(0,C.jsx)(Cl.$,{circular:!1,allowsMultipleInteractiveChildrenInItem:!0,"aria-label":h.Ru.get("web-player.your-library-x.your-library"),children:(0,C.jsx)(Nl.L,{renderRows:p,nrRows:a,rowHeight:s,scrollNodeRef:t,renderPlaceholder:u})})};var Ml=r(21743),Ul=r(21768),Vl=r(35814),_l=r(69856),zl=r(83647),Hl=r(70196);const Wl=(e,t)=>{const{notifyShowInterest:r,notifyHideInterest:a,events:n}=(0,i.useContext)(ae);return{events:n,notifyShowInterest:(0,i.useCallback)((()=>{r(e,t)}),[e,r,t]),notifyHideInterest:(0,i.useCallback)((()=>{a(e,t)}),[e,a,t])}};var Xl=r(66238);function Kl({children:e,content:t,itemKey:r,priority:a,offset:n,placement:l,isInterestedInBeingShown:s,onVisibilityDenied:o,onVisibilityGranted:c}){const{isVisible:d}=function(e,t,r){const a=t.isInterestedInBeingShown,n=()=>{},l=(0,Xl.A)(t.onVisibilityGranted??n),s=(0,Xl.A)(t.onVisibilityDenied??n),[o,c]=(0,i.useState)(!1),{notifyShowInterest:d,notifyHideInterest:u,events:p}=Wl(e,r);return(0,i.useEffect)((()=>{const t=p.addListener(re.VISIBILITY_GRANTED,(t=>{t.data.key===e&&(l(),c(!0))})),r=p.addListener(re.VISIBILITY_DENIED,(t=>{t.data.key===e&&(s(),c(!1))}));return()=>{t(),r()}}),[p,e,l,s]),(0,i.useEffect)((()=>{a?d():u()}),[u,d,a]),(0,i.useEffect)((()=>u),[u]),{isVisible:o}}(r,{isInterestedInBeingShown:s,onVisibilityDenied:o,onVisibilityGranted:c},a);return(0,C.jsx)(Hl.E,{content:t,isVisible:d,offset:n,placement:l,children:e})}var Yl=r(41874),Gl=r(27607),Zl=r(84523),ql=r(71217);const Jl=(e,t,r)=>{const i=t.closest('li[role="presentation"]'),a=e.parentElement?.querySelectorAll('ul[role="menu"]');if(r===ql.O.UP){const r=a?.[a.length-1],n=e.previousElementSibling,l=i?.previousElementSibling?.previousElementSibling;if(t instanceof HTMLUListElement||!l){if(n&&n instanceof HTMLUListElement)return n;if(r&&r instanceof HTMLUListElement)return r}}else{const t=i?.nextElementSibling;if(!t){const t=e.nextElementSibling;return t&&t instanceof HTMLUListElement?t:a?.[0]}}},$l="UsP6uSRooAI9fdTmoQ7C",Ql="ktFXPl3NAYBjLv6hsC6Y",es="hjCFCSfuAdwhiVs2Rfs7",ts=[{itemsViewState:Zl.X.LIST,compactModeState:Ol.COMPACT},{itemsViewState:Zl.X.LIST,compactModeState:Ol.DEFAULT},{itemsViewState:Zl.X.GRID,compactModeState:Ol.DEFAULT}],rs=(e,t,r)=>Math.round((e+t)*r)/r,is=e=>e.itemsViewState===Zl.X.GRID?h.Ru.get("web-player.your-library-x.sort-and-view-picker.grid"):e.compactModeState===Ol.COMPACT?h.Ru.get("web-player.your-library-x.sort-and-view-picker.compact"):h.Ru.get("web-player.your-library-x.sort-and-view-picker.list"),as=({selectedSort:e,selectedView:t,onSortSelect:r,onViewSelect:a,sortOptions:n,spec:l,id:s})=>{const o=(0,v.s)(),c=(0,i.useCallback)((e=>e.itemsViewState===Zl.X.GRID?(0,C.jsx)(Ul.D,{size:"small"}):e.compactModeState===Ol.COMPACT?(0,C.jsx)(Vl.d,{size:"small"}):(0,C.jsx)(_l.N,{size:"small"})),[]),{gridScale:d,setGridScale:u}=En(),p=e=>{const t=rs(e,.5,100);u(t),o.logInteraction(l.gridDensitySliderFactory().dragSetSliderPosition({position:t}))},g=(0,i.useCallback)((e=>{u(e),o.logInteraction(l.gridDensitySliderFactory().hitSetSliderPosition({position:e}))}),[o,u,l]),m=e=>e?.parentElement?.querySelector("ul"),x=(0,i.useRef)(null);return(0,C.jsxs)("div",{id:s,className:$l,ref:x,children:[(0,C.jsxs)(y.W,{"aria-label":h.Ru.get("web-player.your-library-x.sort_by"),onFocusVerticalItem:Jl,getInitialFocusElement:m,children:[(0,C.jsx)(Yl.y,{children:h.Ru.get("web-player.your-library-x.sort_by")}),n.map((({key:t,value:i},a)=>(0,C.jsx)(b.D,{role:"menuitemradio","aria-checked":t===e.key,onClick:()=>r(t,a),divider:a===n.length-1?"after":void 0,autoClose:!1,children:i},t)))]}),(0,C.jsxs)(y.W,{"aria-label":h.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as"),onFocusVerticalItem:Jl,getInitialFocusElement:m,children:[(0,C.jsx)(Yl.y,{children:h.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),ts.map((e=>{const r=is(e),i=e.itemsViewState===t.itemsViewState&&e.compactModeState===t.compactModeState;return(0,C.jsx)(b.D,{role:"menuitemradio","aria-checked":i,onClick:()=>a(e),leadingIcon:c(e),autoClose:!1,children:r},r)})),Zl.X.GRID===t.itemsViewState&&(0,C.jsx)("li",{role:"presentation",children:(0,C.jsx)("div",{role:"menuitem",className:es,children:(0,C.jsx)(Gl.z2,{labelText:h.Ru.get("web-player.your-library-x.sort-and-view-picker.grid-density-label"),value:rs(d,-.5,100),max:1,step:.1,onDragStart:p,onDragMove:p,onDragEnd:p,onStepBackward:()=>g(rs(d,-.1,10)),onStepForward:()=>g(rs(d,.1,10)),forceActiveStyles:!0,"data-roving-interactive":"1"})})})]})]})},ns=({sortOrders:e,activeSortOrderId:t,setActiveSortOrderId:r,showReorderingOnboarding:a,headerSpec:n,scrollNodeRef:l})=>{const s=(0,i.useMemo)((()=>n.sortbyViewasMenuButtonFactory()),[n]),o=(0,v.s)(),c=(0,Wt.f)(),d=e.find((e=>e.id===t))??e?.at(0),u={key:d?.id??"",value:d?.name??""},p=(0,i.useCallback)(((e,t)=>{r(e);const i=c.getSortOrderLabel(e);o.logInteraction(s.sortOptionFactory({identifier:i,position:t}).hitSort())}),[c,o,r,s]),{itemsView:g,setItemsView:y}=(0,Zl.t)(),{libraryRowMode:m,setLibraryRowMode:x}=kl(),{inView:b,ref:f}=(0,Ml.Wx)({initialInView:!0,root:l.current,threshold:.75}),{show:S,onHide:P}=((e,t=!0)=>{const[r,a]=(0,Pe.x)("onboarding-dismissed:ylx-playlist-ordering",!1),[n,l]=(0,Pe.x)("onboarding-dismissed-amount:ylx-playlist-ordering",0),[s,o]=(0,i.useState)(!1),{dropOriginIsYLX:c}=ii(),{draggingIsInProgress:d}=(0,i.useContext)(k.O_);(0,i.useEffect)((()=>{d&&c&&o(!0)}),[d,c]);const u=(0,i.useCallback)((()=>{a(!0),o(!1),l(n+1)}),[n,l,a]);return{show:e&&n<3&&(!r||s)&&(t||s),onHide:u}})(a,b),w=(0,i.useMemo)((()=>g===Zl.X.GRID?{itemsViewState:Zl.X.GRID,compactModeState:Ol.DEFAULT}:m===Ol.COMPACT?{itemsViewState:Zl.X.LIST,compactModeState:Ol.COMPACT}:{itemsViewState:Zl.X.LIST,compactModeState:Ol.DEFAULT}),[g,m]),I=(0,i.useCallback)((e=>{let t=s.viewAsOptionFactory({identifier:"grid",position:3}).hitUiElementToggle();e.itemsViewState===Zl.X.GRID?y(Zl.X.GRID):e.compactModeState===Ol.COMPACT?(t=s.viewAsOptionFactory({identifier:"compact",position:1}).hitUiElementToggle(),y(Zl.X.LIST),x(Ol.COMPACT)):(t=s.viewAsOptionFactory({identifier:"list",position:2}).hitUiElementToggle(),y(Zl.X.LIST),x(Ol.DEFAULT)),o.logInteraction(t)}),[o,y,x,s]),T=(0,i.useCallback)((()=>{o.logInteraction(s.hitUiReveal())}),[o,s]);return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Kl,{isInterestedInBeingShown:S,itemKey:$.YLX_CUSTOM_ORDERING,priority:Q.CONTEXTUAL,placement:"right",content:(0,C.jsx)(zl.z,{onClose:P,children:(0,C.jsx)(Te.E,{as:"p",dangerouslySetInnerHTML:{__html:h.Ru.get("web-player.your-library-x.custom-ordering-onboarding-text")}})}),children:(0,C.jsx)(gl.b,{menu:(0,C.jsx)(as,{selectedSort:u,selectedView:{itemsViewState:w.itemsViewState??Zl.X.LIST,compactModeState:w.compactModeState??Ol.DEFAULT},sortOptions:e.map((({id:e,name:t})=>({key:e,value:t}))),onSortSelect:p,onViewSelect:I,spec:s,id:"sort-and-view-picker"}),placement:"bottom-end",children:(0,C.jsx)(Be.H,{"aria-label":h.Ru.get("web-player.your-library-x.sort-and-view-picker.button-aria-label",u.value,is(w)),onClick:T,size:"small",iconTrailing:(R=w,R.itemsViewState===Zl.X.GRID?Ul.D:R.compactModeState===Ol.COMPACT?Vl.d:_l.N),ref:f,role:"combobox","aria-controls":"sort-and-view-picker",children:(0,C.jsx)(Te.E,{variant:"bodySmall",className:Ql,"data-sortbox-label":!0,children:u.value})})})})});var R};var ls=r(87621),ss=r(66910),os=r(25182);const cs=({clearOnEscapeInElementRef:e,primaryFilter:t,spec:r})=>{const a=(0,Wt.f)(),n=(0,v.s)(),l=function(e){switch(e){case Cr.c.PRE_RELEASE_ALBUM:case Cr.c.ALBUM:return h.Ru.get("web-player.your-library-x.text-filter.albums-placeholder");case Cr.c.ARTIST:return h.Ru.get("web-player.your-library-x.text-filter.artists-placeholder");case Cr.c.PLAYLIST:return h.Ru.get("web-player.your-library-x.text-filter.playlists-placeholder");case Cr.c.SHOW:return h.Ru.get("web-player.your-library-x.text-filter.shows-placeholder");case Cr.c.PRE_RELEASE_BOOK:case Cr.c.AUDIOBOOK:return h.Ru.get("web-player.your-library-x.text-filter.audiobooks-placeholder");case"downloaded":return h.Ru.get("web-player.your-library-x.text-filter.downloaded-placeholder");case void 0:return h.Ru.get("web-player.your-library-x.text-filter.generic-placeholder");default:return void(0,wr.k)(e)}}(t),s=(0,i.useCallback)((()=>(n.logInteraction(r.searchButtonFactory().hitUiReveal()),!0)),[n,r]),o=(0,i.useCallback)((()=>(n.logInteraction(r.textFilterFactory().keyStrokeClearFilter()),!0)),[n,r]);return(0,C.jsx)(ls.S,{placeholder:l,clearOnEscapeInElementRef:e,debounceFilterChangeTimeout:a?.getCapabilities().canTextFilterContentsInRealtime?0:void 0,expandDirection:"right",onActivate:s,onClear:o,useExpandCallback:e=>{(0,os.f)(ss.g.FOCUS_YLX_TEXT_FILTER,e)}})};var ds=r(39566);var us=r(22389);var ps=r(8398);function gs(){const[e,t]=(0,i.useState)(null);if((0,ba.l)(ha.UV.UPDATE_PIN_ERROR,(e=>{t(e.data)})),void 0===e?.reason)return null;switch(e.reason){case ha.uL.TOO_MANY_PINS:return(0,C.jsx)(ps.x,{animated:!0,headingMessage:h.Ru.get("web-player.your-library-x.pin-error.title"),message:h.Ru.get("web-player.your-library-x.pin-error.message",e.maximumPinnedItems),buttonLabel:h.Ru.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});case ha.uL.NO_PIN_IN_FOLDER:return(0,C.jsx)(ps.x,{animated:!0,headingMessage:h.Ru.get("web-player.your-library-x.pin-error.no-pin-in-folder.title"),message:h.Ru.get("web-player.your-library-x.pin-error.no-pin-in-folder.message"),buttonLabel:h.Ru.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});default:return(0,wr.k)(e),null}}var ys=r(44456),ms=r(37178);var xs=r(71151),hs=r(56837),bs=r(58493),fs=r(54866);const Ss=(e,t,r,a,n)=>{const l=(0,fs.x)(),s=(0,i.useRef)(r),o=(0,i.useRef)(),c=(0,i.useRef)();o.current=a,c.current=n,(0,i.useEffect)((()=>{const r={ident:e,isPrefix:t,onMessage:e=>s.current(e),onSubscribe:async e=>await(o.current?.(e)),onCancel:async e=>await(c.current?.(e))},i=l.subscribe(r);return()=>{i.cancel()}}),[e,t,l])};var Ps=r(34223);const vs={[ha.Ir.ALBUMS]:Cr.c.ALBUM,[ha.Ir.ARTISTS]:Cr.c.ARTIST,[ha.Ir.BOOKS]:Cr.c.AUDIOBOOK,[ha.Ir.EPISODES]:Cr.c.EPISODE,[ha.Ir.SHOWS]:Cr.c.SHOW,[ha.Ir.TRACKS]:Cr.c.TRACK};function Cs(e,t,r){const a=(0,i.useCallback)((({data:{list:t}})=>{ws(e,vs[t])&&r()}),[e,r]);(0,ba.l)(ha.UV.UPDATE,a),(0,ba.l)(ha.UV.UPDATE_PIN,r);const n=(0,i.useCallback)((()=>{ws(e,Cr.c.PLAYLIST)&&r()}),[e,r]);(0,Pa.L)(n),function(e){Ss("hm://collection/ylpin/",!0,e)}(r),function(e){const t=(0,bs.A)(),r=t.getEvents();(0,i.useEffect)((()=>r.addListener(hs.T.UPDATE,e)),[t,r,e])}(r),function(e){const t=(0,xs.l)().getEvents();(0,i.useEffect)((()=>{const r=({data:{set:t}})=>{"prerelease"===t&&e()};return t.addListener(ce.ar.ADDED,r),t.addListener(ce.ar.REMOVED,r),()=>{t.removeListener(ce.ar.ADDED,r),t.removeListener(ce.ar.REMOVED,r)}}),[e,t])}(r),function(e,t){const r=(0,Ps.F)();(0,i.useEffect)((()=>{!r||e!==le.oR.RECENTLY_PLAYED_OR_ADDED.toString()&&"Recents"!==e||t()}),[t,r,e])}(t,r)}function ws(e,t){switch(e){case Cr.c.ALBUM:case Cr.c.ARTIST:case Cr.c.AUDIOBOOK:case Cr.c.SHOW:return e===t;case Cr.c.PLAYLIST:switch(t){case Cr.c.TRACK:case Cr.c.PLAYLIST:case Cr.c.EPISODE:return!0;default:return!1}default:return!0}}var Is=r(6102),Ts=r(53866),Rs=r(13295),As=r(35163);const Ds="Vf3ww2_My5QuwUnbpzhu";var js=r(60348);const Ls=()=>{const{typeaheadResult:{str:e}}=(0,i.useContext)(Wr);return e?(0,C.jsx)(js.qb,{className:Ds,children:e}):null};var Es=r(50671);const Os="main-yourLibraryX-libraryContainer",ks="main-yourLibraryX-libraryFilter",Ns="iwhVJuPipY1lrQIjaA1k",Fs="main-yourLibraryX-libraryItemContainer",Bs="main-yourLibraryX-libraryRootlist",Ms="sikBfynL1Y6I25nVpbAg",Us="KwShd3RdVrsX6dGLJNxT",Vs="qOtD4rsRpIMhQLCjJ4K3",_s="oEDH8yMQOKQNoX7LWjwt",zs="RHRitk6QC3rvuG24RAdj",Hs="main-yourLibraryX-filterArea",Ws={items:[],totalLength:0},Xs=()=>{const{filter:e}=(0,i.useContext)(J.g),[t,r]=(0,i.useState)(null),{refinersPickedByUserRef:a,selectedRefinerIds:s,resetRefinerIds:y,resetAndToggleRootRefiner:m,toggleRefinerId:x}=function(e){const{openedFolderUri:t=dr,change:r,resetFolder:a}=(0,i.useContext)(ur),n=(0,i.useRef)(t),[l,s]=(0,Pe.x)("ylx-active-filter-ids",{[t]:[]}),o=(0,i.useRef)(!0),d=(0,c.U0)(((r,i=!0)=>{const a=new Set(e);a.has(r)?a.delete(r):a.add(r),o.current=i,s({...l,[t]:Array.from(a)})}),[e,s,t]),u=(0,i.useCallback)((()=>s({...l,[t]:[]})),[t,l,s]),p=(0,i.useCallback)((e=>{t&&a(),s({...l,[dr]:e?[e]:[]})}),[t,a,l,s]);return(0,i.useLayoutEffect)((()=>{t!==n.current&&t!==dr&&"PUSH"===r&&s({...l,[t]:l[n.current]}),n.current=t}),[r,t,l,s]),{refinersPickedByUserRef:o,selectedRefinerIds:l[t],resetRefinerIds:u,resetAndToggleRootRefiner:p,toggleRefinerId:d}}(t?.selectedFilters?.map((e=>e.id))??[]),h=s?.[0],{selectedSortOrderId:b,setSelectedSortOrderId:f}=function(e){const t=(0,Wt.f)().getContentsPrimaryFilterId(Cr.c.PLAYLIST),{openedFolderUri:r=""}=(0,i.useContext)(ur),[a,n]=(0,Pe.x)("ylx-active-sort-order-by-filter-id",{}),l=`${r&&t?t:e}`;return{selectedSortOrderId:a[l],setSelectedSortOrderId:(0,i.useCallback)((e=>{n({...a,[l]:e})}),[l,a,n])}}(h),S=(0,i.useRef)(null),P=(0,i.useRef)(null),w=(0,i.useRef)(null),{expandedFolders:I}=function(){const e=(0,i.useContext)(xt);if(!e)throw new Error("useExpandedFolders must be used within a ExpandedFoldersProvider");return e}(),{openedFolderUri:R,resetFolder:E}=(0,i.useContext)(ur),F=(0,Is.p)(),B=(0,de.P)(),M=(0,Wt.f)(),U=(0,ai.g)(),V=we(),_=ni(),[z,H]=(0,i.useState)(!1),{isCollapsed:W,isExpanded:X,setYlxSidebarState:K}=(0,Ve.$)();(e=>{const t=(0,Wt.f)(),{isCollapsed:r,setYlxSidebarState:a,lastUncollapsedYlxSidebarState:n}=(0,Ve.$)(),l=(0,ms.W)(),s=(0,i.useCallback)((()=>{const e=r?n:Ve.fX.COLLAPSED;a(e)}),[r,n,a]),o=(0,i.useCallback)((()=>{e(null),r&&a(n)}),[r,n,e,a]),c=(0,i.useCallback)((i=>()=>{e(t.getContentsPrimaryFilterId(i)),r&&a(n)}),[r,n,t,e,a]),d=c(Cr.c.PLAYLIST),u=c(Cr.c.SHOW),p=c(Cr.c.ARTIST),g=c(Cr.c.ALBUM),y=c(Cr.c.AUDIOBOOK);(0,ys.N)(l?ss.g.TOGGLE_NPV_SIDEBAR:ss.g.TOGGLE_YLX_SIDEBAR,s),(0,ys.N)(ss.g.GO_TO_LIBRARY,o),(0,ys.N)(ss.g.GO_TO_PLAYLISTS,d),(0,ys.N)(ss.g.GO_TO_PODCASTS,u),(0,ys.N)(ss.g.GO_TO_ARTISTS,p),(0,ys.N)(ss.g.GO_TO_ALBUMS,g),(0,ys.N)(ss.g.GO_TO_AUDIOBOOKS,y)})(m);const{isGridView:Y}=(0,Zl.t)(),{libraryRowMode:G}=kl(),Z=G===Ol.COMPACT,{spec:$,UBIFragment:Q}=(0,ze.r)(u.j,{data:{identifier:"yourlibraryx"}});let ee;ee=W?"collapsed":Y?X?"expanded_grid":"default_grid":Z?X?"expanded_compact":"default_compact":X?"expanded_list":"default_list";const te=(0,i.useMemo)((()=>$.sidebarFactory({uri:R??dr,identifier:ee})),[$,R,ee]),re=(0,Es.t)(te),ie=(0,i.useMemo)((()=>te.headerFactory()),[te]),ae=(0,i.useMemo)((()=>ie.filtersFactory()),[ie]),ne=(0,i.useMemo)((()=>ie.searchBarFactory()),[ie]),le=(0,i.useMemo)((()=>te.listFactory()),[te]),se=(0,v.s)();!function(e=[],t=[],r){const a=(0,ds.n)(),n=(0,Wt.f)().getContentsPrimaryFilterId("downloaded"),l=(0,i.useRef)(e);l.current=e;const s=(0,i.useRef)(t);s.current=t;const o=(0,i.useRef)(r);o.current=r;const d=(0,i.useRef)(!1);(0,i.useEffect)((()=>{if(!n)return;const e=s.current.includes(n),t=l.current.includes(n),r=s.current.length>1,i=!a&&!r&&!e&&t,c=a&&e&&d.current;(i||c)&&(i&&(d.current=!0),o.current(n,!1))}),[n,a]);const u=(0,i.useRef)(t);(0,c.Ij)((()=>{n&&(t.includes(n)&&!u.current.includes(n)&&d.current||(d.current=!1),u.current=t)}),[n,t])}(t?.availableFilters?.map((e=>e.id)),t?.selectedFilters?.map((e=>e.id)),x);const{handleDropOnFolder:oe,unpinConfirmationDialog:ce}=ma(le,R),{dropOriginIsYLX:ue,entityIsInFolder:ge}=ii(),{setDraggingIsInProgress:he}=(0,i.useContext)(k.O_);(0,N.g)(S);const be=R?rr:tr,fe=ge&&!t?.reorderAllowed?[D.fl.PLAYLISTS_V2,D.fl.FOLDERS]:[],{dropPosition:Se,className:Ie,...Te}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:ue?fe:be},onDrop:(0,i.useCallback)((async e=>{if(R)oe(e);else{const{[D.fl.TRACKS]:t=[],[D.fl.LOCAL_TRACKS]:r=[],[D.fl.ALBUMS]:i,[D.fl.ARTISTS]:a,[D.fl.EPISODES]:n,[D.fl.SHOWS]:l,[D.fl.PLAYLISTS_V2]:s=[],[D.fl.FOLDERS]:o,[D.fl.AUDIOBOOKS]:c}=e,d=[...t,...r];d.length&&(M?.add({uris:d}),se.logInteraction(le.dragCreatePlaylist())),i?.length&&(M?.add({uris:i}),se.logInteraction(le.dragLike({itemToBeLiked:i.at(0)??""}))),a?.length&&(M?.add({uris:a}),se.logInteraction(le.dragLike({itemToBeLiked:a.at(0)??""}))),n?.length&&(M?.add({uris:n}),se.logInteraction(le.dragLike({itemToBeLiked:n.at(0)??""}))),l?.length&&(M?.add({uris:l}),se.logInteraction(le.dragLike({itemToBeLiked:l.at(0)??""}))),c?.length&&(M?.add({uris:c}),se.logInteraction(le.dragLike({itemToBeLiked:c.at(0)??""}))),s.length&&(_(s,{before:"start"}),ue?se.logInteraction(le.dragSort()):se.logInteraction(le.dragLike({itemToBeLiked:s.at(0)??""}))),o?.length&&(U.moveFolder({uri:o[0]},{before:"start"}),se.logInteraction(le.dragSort()))}}),[R,oe,M,se,le,_,ue,U]),onLongDragOver:(0,i.useCallback)((()=>{W&&K(Ve.fX.DEFAULT)}),[W,K])}),Re=(0,d.NC)(Ce.lDH),Ae=(0,i.useMemo)((()=>({filters:s,sortOrder:b,textFilter:e,includeLocalFiles:B,includeYourEpisodes:!0,includeLikedSongs:!0,includePreReleases:Re,expandedFolders:W||Y?[]:I,filtersPickedByUser:a.current,folderUri:R})),[s,b,e,B,Re,W,Y,I,a,R]),De=(0,i.useCallback)((async(e,t)=>{try{const i=await M.getContents({offset:e,limit:t,...Ae}),{offset:a,limit:n,items:s,...o}=i;return H(!1),{fetchedId:Ae.folderUri,onCacheSuccess:()=>{r((e=>(0,l.j)(o,e)?e:o))},...i}}catch(e){return e instanceof T.c_?(y(),Ws):e instanceof T.IU?(f(void 0),Ws):e instanceof T.db?(E(),Ws):((0,As.UD)(e),H(!0),Ws)}}),[Ae,M,y,E,f]),je=!1===t?.hasUnfilteredItems,Le=t?.hasTextFilter&&0===t.totalLength&&""!==e,{setFilter:Ee}=(0,i.useContext)(J.g);(0,i.useEffect)((()=>{Le&&W&&Ee("")}),[Le,W,Ee]);const Oe=0===t?.totalLength&&t.selectedFilters.length>0&&!t.passedFolderUri&&!t.hasTextFilter;(0,c.Ij)((()=>{const e=t?.selectedFilters.at(-1);Oe&&e&&x(e.id,!1)}),[Oe,t?.selectedFilters]);const ke=M?.getCapabilities().canFetchAllItems,{fetchedId:Ne,getItems:Fe,nrValidItems:Be,invalidateCache:Me}=(0,Rs.E)({nrItems:50,fetch:De,limit:50,cacheAllOnInvalidation:ke,cacheAllLimit:5e4}),Ue=(0,o.YQ)(Me,200,{leading:!0,trailing:!0,maxWait:1e3});Cs(t?.primaryFilter,b,Ue);const _e=!R&&!Ne||R===Ne;((e,t="")=>{const r=(0,i.useRef)({});(0,i.useLayoutEffect)((()=>{if(!e.current)return()=>{};const i=e.current,a=r.current[t];i.scrollTop=a??0;const n=()=>{r.current[t]=i.scrollTop};return i?.addEventListener("scroll",n),()=>{i?.removeEventListener("scroll",n)}}),[e,t])})(S,Ne);const He=(0,i.useCallback)((()=>{Me(),H(!1)}),[Me]),We=(0,Ts.y)(S),Xe=!!t?.openedFolderName,Ye=(0,d.NC)(Ce._p8,{loadingValue:!1})&&ke,Ge=function(e,t,r){const{isGridView:a}=(0,Zl.t)(),{rowHeight:n}=kl();return(0,i.useCallback)((async i=>{let l=n,s=1;if(a){const t=e.current?.querySelector('li[role="row"]');l=t?.getBoundingClientRect().height??0,t?.parentElement&&(s=getComputedStyle(t.parentElement).getPropertyValue("grid-template-columns").split(" ").length)}if(!l)return null;const o=r(0,5e4,{cachedOnly:!0}),c=o.find((e=>e?.name&&(0,us.u)(i,e.name))),d=c?o.indexOf(c):-1;return-1!==d&&t.current&&function(e,t,r,i){if(!e)return;const{scrollTop:a,offsetHeight:n}=e,l=t&&e?t.getBoundingClientRect().top+a-e.getBoundingClientRect().top:0;if(l+ra+n){const t=r-n/2+l+i/2;e.scrollTop=t}}(t.current,e.current,Math.floor(d/s)*l,l),c?.uri??null}),[e,t,n,r,a])}(w,S,Fe),qe=z?(0,C.jsx)(mt,{onClick:He}):null;let Je;(0,i.useEffect)((()=>{z&&W&&K(Ve.fX.DEFAULT)}),[z,W,K]),je&&!W&&(Je=Xe?(0,C.jsx)(Ze,{className:Ie}):(0,C.jsx)(lt,{className:Ie}));const $e=Le?(0,C.jsx)(ut,{query:e,className:Ie}):null,Qe=!W&&!Je&&(0,C.jsxs)("div",{className:n()(ks,Ie,Ns),children:[(0,C.jsx)(cs,{clearOnEscapeInElementRef:P,primaryFilter:t?.primaryFilter,spec:ne},R),(0,C.jsx)(ns,{sortOrders:t?.availableSortOrders??[],activeSortOrderId:t?.selectedSortOrder?.id,setActiveSortOrderId:f,showReorderingOnboarding:t?.primaryFilter===Cr.c.PLAYLIST&&!t?.reorderAllowed,headerSpec:ie,scrollNodeRef:S})]}),et=z&&!t,tt=X&&!Y&&!qe&&!Je,rt=(t?.selectedFilters??[]).length>0,it=V&&!rt&&!R&&!je,{cheetaraOnboardingIsActive:at,setCheetaraOnboardingIsActive:nt,cheetaraOnboardingDismissed:st,setCheetaraOnboardingDismissed:ot,handleCloseCheetaraOnboarding:ct}=ve(),dt=!W&&V&&!z&&!st&&!t?.passedFolderUri&&!!t?.availableFilters?.length&&!t?.selectedFilters?.length;return(0,C.jsx)(Xr,{containerRef:P,findMatchingTypeaheadUid:Ge,isEnabled:Ye,children:(0,C.jsxs)(Q,{spec:$,children:[(0,C.jsx)(q,{}),at&&(0,C.jsx)(me,{onClose:ct}),(0,C.jsx)(g.h,{menu:(0,C.jsx)(A,{folderUri:R}),children:(0,C.jsxs)("div",{className:n()(Os,{[Xt]:Se===j.Nz.ON,[Ms]:W,[_s]:at}),style:{"--placeholder-image":`url(${(0,p.b)("images/ylx-row-placeholder.png")})`,"--placeholder-artist-image":`url(${(0,p.b)("images/ylx-artist-row-placeholder.png")})`,"--placeholder-compact-image":`url(${(0,p.b)("images/ylx-compact-row-placeholder.png")})`},ref:e=>{P.current=e,re(e)},...Te,tabIndex:-1,onDragStart:()=>he(!0),onDragEnd:()=>he(!1),children:[ce,(0,C.jsxs)("div",{className:n()({[zs]:We}),children:[(0,C.jsx)(vl,{parentDropTargetClassName:Ie,isLibraryCompletelyEmpty:je,folderUri:t?.passedFolderUri,folderName:t?.openedFolderName,spec:ie.titleRowFactory(),openedFolderIsPlayable:t?.openedFolderIsPlayable}),!F&&(0,C.jsx)(Q,{spec:ie,children:(0,C.jsx)(Ke,{})}),!W&&!et&&(0,C.jsxs)("div",{className:Hs,children:[it&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(xe,{})}),(0,C.jsx)(or,{selectedFilters:t?.selectedFilters,availableFilters:t?.availableFilters,toggleFilterId:x,resetFilterIds:y,className:n()({[Vs]:!_e}),scrollNodeRef:S,spec:ae,inFolderView:!!t?.passedFolderUri},Ne),X&&Qe]}),dt&&X&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(ye,{ylxIsExpanded:X,setCheetaraOnboardingIsActive:nt,onHide:()=>ot(!0)})}),tt&&(0,C.jsx)(Mt,{isScrolled:We})]}),(0,C.jsx)(O.a,{className:Fs,onInstanceCreated:e=>{S.current=e.elements().viewport},children:(0,C.jsxs)("div",{className:n()(Bs,{[Vs]:!z&&!_e,[Ms]:W,[Us]:tt}),children:[dt&&!X&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(ye,{ylxIsExpanded:X,setCheetaraOnboardingIsActive:nt,onHide:()=>ot(!0)})}),!X&&Qe,!W&&t?.tagPlaylist&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(pe,{playlist:t.tagPlaylist})}),qe||Je||$e,(0,C.jsx)("div",{ref:w,children:Y?(0,C.jsx)(Vn,{getItems:Fe,scrollNodeRef:S,primaryFilter:t?.primaryFilter,nrValidItems:Be,spec:le}):(0,C.jsx)(Bl,{getItems:Fe,scrollNodeRef:S,primaryFilter:t?.primaryFilter,nrValidItems:Be,spec:le})})]})}),gs(),(0,C.jsx)(Ls,{})]})})]})})},Ks=()=>{const{isAnonymous:e}=(0,s.d4)((e=>e.session)),t=(0,s.d4)((e=>e.ui.editRefinersModal)),r=we();return(0,C.jsx)(E.s,{onError:e=>{(0,As.Jy)(e,"YourLibraryX")},children:(0,C.jsx)(J.s,{uri:T.gv,children:(0,C.jsx)(ht,{children:(0,C.jsxs)(pr,{children:[(0,C.jsx)(ue,{children:(0,C.jsx)(Se,{children:(0,C.jsxs)(ne,{children:[(0,C.jsx)(Xs,{}),r&&t.isOpen&&(0,C.jsx)(ge,{})]})})}),(0,C.jsx)(Ne,{isAnonymous:e})]})})})})}},11808:(e,t,r)=>{r.d(t,{P:()=>a});var i=r(39587);function a(){return(0,i.y)()[0]}},39587:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(30758),a=r(58493);function n(){const e=(0,a.A)(),[t,r]=(0,i.useState)(e.getIsEnabled());(0,i.useEffect)((()=>{const t=e.subscribeIsEnabled(r);return()=>t()}),[e]);return[t,(0,i.useCallback)((t=>e.setIsEnabled(t)),[e])]}},54866:(e,t,r)=>{r.d(t,{x:()=>n});var i=r(53249),a=r(30157);function n(){return(0,a.N)(i.b)}}}]); +//# sourceMappingURL=5505.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/5663.js b/dot-config/spicetify/Extracted/Raw/xpui/5663.js new file mode 100755 index 00000000..78225aa4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/5663.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1408,5663],{58757:(e,t,n)=>{n.d(t,{p:()=>g});var r=n(30758),i=n(97500),l=n.n(i),o=n(95530),s=n(86677),a=n(17866),d=n(19830);const u="(min-width: 0px)",c="(min-width: 0px) and (max-width: 767px)",m="(min-width: 768px)",S="(min-width: 768px) and (max-width: 1023px)",A="(min-width: 1024px)",f="(min-width: 1024px) and (max-width: 1279px)",w="(min-width: 1280px)",E="(min-width: 1280px) and (max-width: 1919px)",h="(min-width: 1920px)",C="FvfvGU3jvHRskUU9v9_8",x="Q9AlbZn2EGzy3MTWXa8X",D="mxmxS0y8LiwSs5nueKPT",T="GXxVAveNFStY3pBI_NO4",p="eHcXC2s97InYP7rMNT0H";var O=n(86070);const g=(0,r.memo)((function(e){const{children:t,message:n,title:r,linkTitle:i,linkTo:g,onClick:v,renderInline:_=!1}=e,{isXSOnly:y,isSMOnly:N}={isXS:(0,d.U)(u),isXSOnly:(0,d.U)(c),isSM:(0,d.U)(m),isSMOnly:(0,d.U)(S),isMD:(0,d.U)(A),isMDOnly:(0,d.U)(f),isLG:(0,d.U)(w),isLGOnly:(0,d.U)(E),isXL:(0,d.U)(h)},L=y||N;return(0,O.jsxs)("section",{className:l()(C,{[x]:_}),children:[t,(0,O.jsx)(o.E,{as:"h1",variant:L?"titleSmall":"titleMedium",className:T,children:r}),(0,O.jsx)(o.E,{variant:L?"bodySmall":"bodyMedium",className:p,children:n}),i&&(g||v)&&(0,O.jsx)(s.$,{colorSet:"invertedLight",className:D,href:g,onClick:v,component:a.v,children:i})]})}))},2814:(e,t,n)=>{n.d(t,{H:()=>o,g:()=>s});var r=n(30758),i=n(86070);const l=(0,r.createContext)(null);function o({children:e,playlist:t,metadataOptions:n,contentsOptions:o}){return(0,i.jsx)(l.Provider,{value:(0,r.useMemo)((()=>({playlist:t,metadataOptions:n,contentsOptions:o})),[o,n,t]),children:e})}function s(){const e=(0,r.useContext)(l);if(null===e)throw new Error("Trying to use 'ListPlatformDataContext' without 'ListPlatformDataProvider'!");return e}},41522:(e,t,n)=>{n.d(t,{d:()=>o,j:()=>s});var r=n(30758),i=n(86070);const l=(0,r.createContext)({setFilterPredicate:()=>{throw new Error("setFilterPredicate must be used within a ListPlatformFilterPredicatesProvider")},filterPredicate:null}),o=(0,r.memo)((function({children:e}){const[t,n]=(0,r.useState)(null),o=(0,r.useMemo)((()=>({filterPredicate:t,setFilterPredicate:n})),[t]);return(0,i.jsx)(l.Provider,{value:o,children:e})}));function s(){return(0,r.useContext)(l)}},91797:(e,t,n)=>{n.d(t,{K:()=>c,l:()=>u});var r=n(30758),i=n(2814),l=n(13295),o=n(29074),s=n(89273),a=n(86070);const d=(0,r.createContext)(null);function u({children:e}){const{playlist:t,contentsOptions:n}=(0,i.g)(),u=(0,o.m)(),c=(0,r.useCallback)((async(e,r)=>await u.getContents(t.metadata.uri,{...n,offset:e,limit:r})),[u,n,t.metadata.uri]),m=(0,l.E)({nrItems:t.contents.totalLength,fetch:c,limit:50,initialItems:t.contents.items});return(0,s.H)(t.metadata.uri,m.invalidateCache),(0,a.jsx)(d.Provider,{value:m,children:e})}function c(){const e=(0,r.useContext)(d);if(null===e)throw new Error("Trying to use 'ListPlatformItemsContext' without 'ListPlatformItemsProvider'!");return e}},79098:(e,t,n)=>{n.d(t,{Z:()=>s,k:()=>a});var r=n(30758),i=n(26413),l=n(86070);const o=(0,r.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ListPlatformSortProvider")},sortState:null}),s=r.memo((function({uri:e,children:t}){return(0,l.jsx)(i.E,{uri:e,defaultState:null,sortContext:o,children:t})}));function a(){return(0,r.useContext)(o)}},61295:(e,t,n)=>{n.d(t,{W:()=>w});var r=n(30758),i=n(31417),l=n(81067),o=n(92202),s=n(39795),a=n(2814),d=n(41522),u=n(91797),c=n(79098);var m=n(57764),S=n(29074),A=n(86070);const f=({children:e,uri:t})=>{const n=(0,S.m)().getCapabilities(),{filter:u}=(0,r.useContext)(s.g),{sortState:f}=(0,c.k)(),{filterPredicate:w}=(0,d.j)(),{metadataOptions:E,contentsOptions:h}=((e,t,n)=>(0,r.useMemo)((()=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:!0},contentsOptions:{offset:0,limit:25,filter:e,sort:t??void 0,filterPredicates:n?[n]:[]}})),[e,t,n]))(u,f,w),{data:C,isLoading:x,isError:D}=(0,m.W)(t,E,h);return!C||x?(0,A.jsx)(o.LoadingPage,{hasError:D,errorMessage:i.Ru.get("error.not_found.title.playlist"),loadOffline:n.canModifyOffline}):C.metadata.permissions&&!C.metadata.permissions.canView?(0,A.jsx)(l.Z,{uri:t}):(0,A.jsx)(a.H,{playlist:C,metadataOptions:E,contentsOptions:h,children:e})},w=({children:e,uri:t})=>(0,A.jsx)(s.s,{uri:t,children:(0,A.jsx)(d.d,{children:(0,A.jsx)(c.Z,{uri:t,children:(0,A.jsx)(f,{uri:t,children:(0,A.jsx)(u.l,{children:e})})})})})},47972:(e,t,n)=>{n.d(t,{d:()=>f});var r=n(30758),i=n(68448),l=n(87621),o=n(31417),s=n(67239),a=n(79098),d=n(59964),u=n(29074),c=n(86070);const m=r.memo((function({sortOptions:e,defaultSortField:t,enableViewModeMenu:n}){const i=(0,u.m)(),{canSort:l}=i.getCapabilities(),{sortState:m,setSortState:S}=(0,a.k)(),A=(0,r.useCallback)((e=>{const t=d.nw[e];S((0,d.Wc)(t,m))}),[S,m]),f=e.map((e=>d.kA[e]));"custom-order"===t&&f.unshift({key:"custom-order",value:o.Ru.get("sort.custom-order")});const w=d.kA[m?.field??t];return l?(0,c.jsx)(s.g,{options:f,onSelect:A,selected:w,sortOrder:(0,d.Qi)(m?.order??null),heading:o.Ru.get("drop_down.sort_by"),enableViewModeMenu:n}):null}));var S=n(21549);const A="cRlDGz_DCN_UOCt4Khg1",f=r.memo((function({filterPlaceholder:e,sortOptions:t,defaultSortField:n,enableViewModeMenu:o=!1}){const s=(0,u.m)(),{canSort:a,canFilter:d}=s.getCapabilities(),{spec:f,logger:w}=(0,S.r)(i.E,{}),E=(0,r.useCallback)((()=>{w.logInteraction(f.filterFieldFactory().keyStrokeFilter())}),[w,f]),h=(0,r.useCallback)((()=>{w.logInteraction(f.filterFieldFactory().hitClearFilter())}),[w,f]);return(0,c.jsxs)("div",{className:A,children:[d?(0,c.jsx)(r.Suspense,{fallback:null,children:(0,c.jsx)(l.S,{placeholder:e,onFilter:E,onClear:h})}):null,a?(0,c.jsx)(m,{sortOptions:t,defaultSortField:n,enableViewModeMenu:o}):null]})}))},72187:(e,t,n)=>{n.d(t,{g:()=>r.g});var r=n(2814)},59964:(e,t,n)=>{n.d(t,{Ap:()=>w,Qi:()=>m,Wc:()=>d,g6:()=>f,hK:()=>E,kA:()=>u,nw:()=>c});var r=n(31417),i=n(4266),l=n(34939);const o=[l.nw.ADDED_AT,l.nw.PUBLISH_DATE],s=e=>o.includes(e)?l.xB.DESC:l.xB.ASC,a={[l.xB.ASC]:l.xB.DESC,[l.xB.DESC]:l.xB.ASC},d=(e,t)=>null===e?null:t?.field!==e?{field:e,order:s(e)}:{field:e,order:a[t.order]},u={[l.nw.TITLE]:{key:"title",get value(){return r.Ru.get("sort.title")}},[l.nw.ARTIST]:{key:"artist",get value(){return r.Ru.get("sort.artist")}},[l.nw.ALBUM]:{key:"album",get value(){return r.Ru.get("sort.album")}},[l.nw.ADDED_BY]:{key:"added-by",get value(){return r.Ru.get("sort.added-by")}},[l.nw.ADDED_AT]:{key:"added-at",get value(){return r.Ru.get("collection.sort.recently-added")}},[l.nw.DURATION]:{key:"duration",get value(){return r.Ru.get("sort.duration")}},[l.nw.SHOW_NAME]:{key:"show-name",get value(){return r.Ru.get("collection.sort.creator")}},[l.nw.PUBLISH_DATE]:{key:"publish-date",get value(){return r.Ru.get("tracklist.header.release-date")}},"custom-order":{key:"custom-order",get value(){return r.Ru.get("sort.custom-order")}}},c={title:l.nw.TITLE,artist:l.nw.ARTIST,album:l.nw.ALBUM,"added-by":l.nw.ADDED_BY,"added-at":l.nw.ADDED_AT,duration:l.nw.DURATION,"show-name":l.nw.SHOW_NAME,"publish-date":l.nw.PUBLISH_DATE,"custom-order":null};function m(e){return null===e?i.H.NONE:e===l.xB.ASC?i.H.ASC:i.H.DESC}const S={[i.$.TITLE_AND_ARTIST]:[l.nw.TITLE,l.nw.ARTIST],[i.$.TITLE]:[l.nw.TITLE],[i.$.ADDED_BY]:[l.nw.ADDED_BY],[i.$.ADDED_AT]:[l.nw.ADDED_AT],[i.$.DURATION]:[l.nw.DURATION],[i.$.ARTIST]:[l.nw.ARTIST],[i.$.ALBUM]:[l.nw.ALBUM],[i.$.ALBUM_OR_PODCAST]:[l.nw.ALBUM,l.nw.SHOW_NAME],[i.$.ALBUM_OR_SHOW]:[l.nw.ALBUM,l.nw.SHOW_NAME],[i.$.ACTIONS]:[],[i.$.RELEASE_DATE]:[l.nw.PUBLISH_DATE],[i.$.INDEX]:[],[i.$.PLAYS]:[],[i.$.ADD]:[],[i.$.EVENT_DATE]:[],[i.$.EVENT_INFO]:[],[i.$.CONCERT]:[],[i.$.CONCERT_VENUE]:[],[i.$.TITLE_AND_AUTHOR]:[l.nw.TITLE],[i.$.AUTHOR]:[],[i.$.BPM]:[],[i.$.KEY]:[],[i.$.VIBE]:[]},A={[i.H.NONE]:null,[i.H.DESC]:l.xB.DESC,[i.H.ASC]:l.xB.ASC,[i.H.SECONDARY_DESC]:l.xB.DESC,[i.H.SECONDARY_ASC]:l.xB.ASC},f=e=>e.filter((e=>S[e].length>0)),w=(e,t)=>{const n=e.find((e=>t?.field&&S[e].includes(t.field)));if(!n||!t?.field)return{column:null,order:i.H.ASC};return S[n].indexOf(t.field)>0?{column:n,order:t.order===l.xB.ASC?i.H.SECONDARY_ASC:i.H.SECONDARY_DESC}:{column:n,order:t.order===l.xB.ASC?i.H.ASC:i.H.DESC}},E=(e,t,n)=>{const r=S[e].length>1?5:3;let l=null,o=null;if(e===t.column){let s=(t.order+1)%r;s!==i.H.NONE||n||(s+=1);const a=[i.H.SECONDARY_ASC,i.H.SECONDARY_DESC].includes(s)?1:0;l=S[e][a],o=A[s]}else l=S[e][0],o=A[i.H.ASC];return null===o?null:{field:l,order:o}}},84291:(e,t,n)=>{n.d(t,{f:()=>s,z:()=>o});var r=n(30758),i=n(85505),l=n(47095);function o(e,t=i.l0o){const n=(0,l.as)();return(0,r.useEffect)((()=>(e&&n((0,l.Mo)(e)),()=>{n((0,l.Hf)())})),[e,n]),e||t}const s=({color:e,fallbackColor:t})=>(o(e,t),null)}}]); +//# sourceMappingURL=5663.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/5727.css b/dot-config/spicetify/Extracted/Raw/xpui/5727.css new file mode 100755 index 00000000..d42a617a --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/5727.css @@ -0,0 +1 @@ +:root{--color:#fff}.AkshwPjlDiQc0wgxuNaq{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;left:0;overflow:hidden;position:absolute;right:0;top:0}.g_Jf36PKqEYC3jfWrOVP{cursor:crosshair;-ms-flex-negative:0;-webkit-animation:BidZU2f4ds8S7Zpcuvab 4s ease-in-out infinite;animation:BidZU2f4ds8S7Zpcuvab 4s ease-in-out infinite;background:var(--color);border:none;border-radius:80%;-webkit-box-shadow:inset -10px -10px 0 rgba(0,0,0,.07);box-shadow:inset -10px -10px 0 rgba(0,0,0,.07);display:inline-block;flex-shrink:0;height:160px;margin:0 .5em;outline:none;position:relative;text-align:center;top:115%;-webkit-transform-origin:bottom center;transform-origin:bottom center;-webkit-transition:top 0s ease-in-out,left 0s ease-in-out;transition:top 0s ease-in-out,left 0s ease-in-out;width:140px;z-index:100}.ubnsl0tOPoI_PmWk0HoF{top:-75%}.pDpuumKZj_mttxBIwev4{visibility:hidden}.g_Jf36PKqEYC3jfWrOVP:before{bottom:-20px;color:var(--color);content:"▲";display:block;font-size:20px;position:absolute;width:100%}.g_Jf36PKqEYC3jfWrOVP:after{background:hsla(0,0%,100%,.2);content:"";height:250px;left:69px;position:absolute;top:172px;width:3px}@-webkit-keyframes BidZU2f4ds8S7Zpcuvab{0%,to{-webkit-transform:translateY(0) rotate(-4deg);transform:translateY(0) rotate(-4deg)}50%{-webkit-transform:translateY(-2em) rotate(4deg);transform:translateY(-2em) rotate(4deg)}}@keyframes BidZU2f4ds8S7Zpcuvab{0%,to{-webkit-transform:translateY(0) rotate(-4deg);transform:translateY(0) rotate(-4deg)}50%{-webkit-transform:translateY(-2em) rotate(4deg);transform:translateY(-2em) rotate(4deg)}} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/5727.js b/dot-config/spicetify/Extracted/Raw/xpui/5727.js new file mode 100755 index 00000000..0d3bd1d6 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/5727.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5727],{15727:(e,a,n)=>{n.r(a),n.d(a,{default:()=>b});var t=n(30758),o=n(97500),r=n.n(o),l=n(95530),s=n(14343),u=n(31417),c=n(53133),i=n(38501);const d="AkshwPjlDiQc0wgxuNaq",f="g_Jf36PKqEYC3jfWrOVP",p="ubnsl0tOPoI_PmWk0HoF",m="pDpuumKZj_mttxBIwev4";var h=n(86070);const b=({colorLight:e,colorDark:a,name:n,years:o})=>{const b=(0,s.NC)(i.yOO,{loadingValue:!1}),{enqueueSnackbar:y}=(0,c.d)();(0,t.useEffect)((()=>{if(!b)return;const e=0===o?u.Ru.get("web-player.album.release",{name:n}):u.Ru.get("web-player.album.anniversary",o,{name:n,years:`${o}`});y(e)}),[b,n,o,y]);const[k,w]=(0,t.useReducer)(g,{balloons:Array.from({length:25}).map((()=>({animationDuration:Math.floor(50*Math.random())/10+2+"s",transitionDuration:Math.floor(50*Math.random())/10+12+"s",transform:`scale(${Math.floor(.4*Math.random())+.8})`,left:Math.floor(25*Math.random())-25,popped:!1})))}),[x,M]=(0,t.useState)(!1);return(0,t.useEffect)((()=>{const e=setTimeout((()=>{M(!0)}),1e3);return()=>{clearTimeout(e)}}),[M]),b?(0,h.jsx)("div",{className:d,children:k.balloons.map(((n,t)=>{const s=a&&t%2==0?a:e,u=s===a?"textBase":"textSubdued",{popped:c,...i}=n;return(0,h.jsx)("div",{children:(0,h.jsx)("button",{onClick:()=>w(t),className:r()(f,{[p]:x,[m]:c}),style:{"--color":s,...i},children:o>0&&t%3==0&&(0,h.jsx)(l.E,{variant:"headlineLarge",semanticColor:u,children:o})},t)},t)}))}):null};function g(e,a){return{balloons:e.balloons.map(((e,n)=>({...e,popped:a===n||e.popped})))}}}}]); +//# sourceMappingURL=5727.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/581.js b/dot-config/spicetify/Extracted/Raw/xpui/581.js new file mode 100755 index 00000000..bccbf8da --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/581.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[581],{89645:(e,s,i)=>{i.d(s,{j:()=>o});var r=i(75134),a=i(43743),t=i(38996),n=i(86070);const o=({name:e,uri:s,images:i,isHero:o,testId:l,description:d,index:c,requestId:u,color:m,variant:x})=>(0,n.jsx)(r.Z,{variant:x,index:c,featureIdentifier:"artist_concerts",headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,n.jsx)(a.M,{isHero:o,images:i,color:m}),renderSubHeaderContent:()=>(0,n.jsx)(t.c,{isHero:o,children:(0,n.jsx)("span",{children:d||""})}),testId:l,requestId:u})},68769:(e,s,i)=>{i.d(s,{I:()=>S});var r=i(30758),a=i(95530),t=i(77612),n=i(51813),o=i(48210),l=i(46111),d=i(82974),c=i(26391),u=i(43182),m=i(31417),x=i(21549),g=i(63096);const I="qFPnB4YPwJKBtmDadHJw",p="L1GB_UgpHH55rJC7bJSu",h="lwTOVx_hzbLLqRQNjpWq",j="fBzAZ8QqBJZ7jOCE9rR0",y="Cy4PWlzIF5qb7_LdHssZ";var C=i(86070);const b=({contentV2:e})=>(0,C.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:y,children:[(0,C.jsx)(t.D,{size:"small"}),e]}),f=({contentV2:e})=>(0,C.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:y,children:[(0,C.jsx)(n.M,{size:"small"}),e]}),H=({contentV2:e})=>(0,C.jsx)(a.E,{as:"p",className:y,children:e}),v=e=>{switch(e.typeV2){case"SPOTIFY_EXCLUSIVE":return(0,C.jsx)(b,{...e});case"TOP_FANS_EXCLUSIVE":case"TOP_FANS_DISCOUNT":case"LIMITED_EDITION":return(0,C.jsx)(f,{...e});default:return(0,C.jsx)(H,{...e})}},P=({price:e,salePrice:s})=>s?(0,C.jsxs)("div",{children:[(0,C.jsxs)(a.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:[s," "]}),(0,C.jsx)(a.E,{variant:"bodySmall",style:{textDecoration:"line-through"},children:e})]}):(0,C.jsx)(a.E,{variant:"bodySmall",children:e}),S=({name:e,uri:s,href:i,images:a,index:t,price:n,testId:y,salePrice:b,label:f,artists:H})=>{const S=(0,r.useMemo)((()=>H.items.map((e=>"profile"in e.data?e.data.profile.name:"")).join(m.Ru.getSeparator())),[H.items]),{spec:T,logger:E}=(0,x.r)(u.y,{data:{position:t,uri:s,reason:f?.typeV2||""}}),k=(0,g.g)(a,{desiredSize:300}),N=(0,r.useCallback)((()=>{E.logInteraction(T.cardLinkFactory({position:0}).hitNavigateToExternalUri({destination:i})),window.open(i,"_blank")}),[i,E,T]);return(0,C.jsx)(o.Z,{id:s,"data-testid":y,title:(0,C.jsx)(l.Z,{className:j,children:e}),pretitle:f&&(0,C.jsx)(v,{typeV2:f.typeV2,contentV2:f.contentV2}),media:(0,C.jsx)("div",{className:I,children:k?(0,C.jsx)(d.M,{size:"sm",src:k?.url,alt:e??""}):(0,C.jsx)("div",{className:p,children:(0,C.jsx)("div",{className:h,children:(0,C.jsx)(c.E,{size:"xxlarge","aria-hidden":!0,"data-testid":"card-image-fallback"})})})}),onClick:N,size:"md",subtitle:(0,C.jsx)(P,{price:n,salePrice:b}),body:S},s)}},66872:(e,s,i)=>{i.d(s,{Q:()=>ee});var r=i(14343),a=i(90139),t=i(10831),n=i(89519),o=i(22726),l=i(89645),d=i(86573),c=i(31417),u=i(75134),m=i(43743),x=i(38996),g=i(89994),I=i(81288),p=i(86070);const h=({name:e,uri:s,images:i,isHero:r,onClick:a,testId:t,description:n,index:o,requestId:l,color:d,variant:h,logCardImpressions:j=!1})=>r?(0,p.jsx)(g.A,{featureIdentifier:"genre",index:o,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{children:n||c.Ru.get("card.tag.genre")})}),testId:t,requestId:l,logCardImpressions:j}):(0,p.jsx)(u.Z,{variant:h,index:o,featureIdentifier:"genre",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{children:n||""})}),testId:t,requestId:l,logCardImpressions:j});var j=i(68769),y=i(80809),C=i(40855),b=i(30343),f=i(84779);const H=({name:e="",uri:s="",images:i=[],isHero:r,onClick:a,testId:t,index:n,variant:o})=>r?(0,p.jsx)(g.A,{featureIdentifier:"unknown",index:n,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{})}),testId:t}):(0,p.jsx)(u.Z,{variant:o,index:n,featureIdentifier:"unknown",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{})}),testId:t});var v=i(77773),P=i(59724),S=i(59029);const T=({entity:e,index:s,testId:i,isHero:r=!1,variant:n})=>{const c=((0,o.o_h)(e.uri)||{}).type;if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:merch:")){const r=e.description?e.description.split("•")[0]:"";return(0,p.jsx)(j.I,{testId:i,index:s,name:e.name,uri:e.uri,href:e.href,images:e.images,price:r,artists:e.artists||{items:[]},label:null,salePrice:null})}if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:artist:")&&e.uri.endsWith(":concerts"))return(0,p.jsx)(l.j,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});switch(c){case o.NQG.ALBUM:case o.NQG.COLLECTION_ALBUM:{const t=e;return(0,p.jsx)(a.a,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:t.name,uri:t.uri,images:t.images,artists:t.artists})}case o.NQG.ARTIST:{const a=e;return(0,p.jsx)(t.a,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images})}case o.NQG.EPISODE:{const a=e;return(0,p.jsx)(d.U,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,showImages:a.show?.images||[],durationMilliseconds:a.duration_ms,releaseDate:a.release_date,resume_point:a.resume_point,description:a.description,isExplicit:a.explicit,is19PlusOnly:!!a.tags?.includes("MOGEF-19+")})}case o.NQG.PLAYLIST:case o.NQG.PLAYLIST_V2:{const a=e,t=a.owner?.display_name||e.owner?.displayName||"";return(0,p.jsx)(y.B,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images,description:a.description,authorName:t})}case o.NQG.PROFILE:return(0,p.jsx)(C.a,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images});case o.NQG.SHOW:{const a=e;return(0,p.jsx)(b.o,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,publisher:a.publisher,mediaType:{audio:S.Q.AUDIO,video:S.Q.VIDEO,mixed:S.Q.MIXED}[a.media_type]??S.Q.AUDIO})}case o.NQG.APPLICATION:return(0,p.jsx)(h,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});case o.NQG.TRACK:{const a=e;return(0,p.jsx)(f.w,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.album?.images||[],artists:a.artists,album:a.album,isExplicit:a.explicit,is19PlusOnly:a.tags?.includes("MOGEF-19+")})}case o.NQG.COLLECTION:return e.uri.endsWith("your-episodes")?(0,p.jsx)(P.e,{variant:n,index:s}):(0,p.jsx)(v.o,{variant:n,index:s});default:return console.warn("Rendering a generic Card for unknown type:",c),(0,p.jsx)(H,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images})}};var E=i(97500),k=i.n(E),N=i(95530),q=i(49169),L=i(62787),O=i(65462),w=i(30758),A=i(10994),R=i(59521),_=i(21489),M=i(42162),U=i(44672),D=i(78774);const Q=w.memo((function({uri:e,sharingInfo:s}){const{spec:i}=(0,D.o)(e);return(0,p.jsx)(U.pZ,{value:"album",children:(0,p.jsxs)(A.W,{children:[(0,p.jsx)(M.h,{divider:"before",children:(0,p.jsx)(R.m,{uri:e,spec:i,sharingInfo:s,displayText:c.Ru.get("context-menu.copy-album-link")})}),(0,p.jsx)(_.q,{spec:i,divider:"before",uri:e})]})})}));var V=i(79570),z=i(79225),B=i(43560);const G=({artists:e,logger:s,spec:i})=>(0,p.jsx)("span",{children:e.map(((e,r)=>[r>0&&c.Ru.getSeparator(),(0,p.jsx)(L.m,{artist:e,index:r,logger:s,spec:i},e.uri)]))}),F=({artists:e,release:s,releaseTimezone:i})=>(0,p.jsx)(N.E,{variant:"bodySmall",semanticColor:"textSubdued",className:k()({[B.A.dividerAfter]:e.length>0}),children:(0,p.jsx)("span",{children:c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate((0,z.ad)(s.isoString),(0,z.s7)({month:"long",day:"numeric",year:"numeric",timeZone:i},s.precision))})})}),Z=({name:e,uri:s,images:i,artists:r=[],sharingInfo:a,isHero:t=!1,onClick:n,testId:o,index:l,requestId:d,color:h,release:j,releaseTimezone:y,variant:C,logCardImpressions:b=!1})=>{let f;const{playUri:H,playOptions:v}=(0,V.J)(s),P=()=>r.map((e=>e.name)).join(c.Ru.getSeparator());return f=t?(0,p.jsx)(g.A,{isPlayable:!1,index:l,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,P()),ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,P()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:!0,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(q.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(I.t,{children:c.Ru.get("card.tag.album")}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),getSignifierContent:()=>(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:y}),testId:o,requestId:d,logCardImpressions:b}):(0,p.jsx)(u.Z,{variant:C,isPlayable:!1,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,P()),index:l,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,P()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:t,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(q.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(x.c,{children:[(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:y}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),testId:o,requestId:d,logCardImpressions:b}),(0,p.jsx)(O.h,{menu:(0,p.jsx)(Q,{uri:s,artistUri:r?.[0]?.uri,sharingInfo:a}),children:f})};var W=i(55926),J=i(38501),X=i(61714),K=i(16157),Y=i(7307),$=i(72051);const ee=({entity:e,index:s,testId:i,onClick:o,isHero:l=!1})=>{const c=(0,W.c)(),u=(0,r.NC)(J.LX5),m=(0,r.NC)(J.QTs);switch(e.type){case Y.c.ALBUM:return(0,p.jsx)(a.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,year:e.year,sharingInfo:null,requestId:e.requestId,color:e.color,isPlayable:e.isPlayable,isRestricted:e.playabilityReason===K.$c.CatalogueRestricted,logCardImpressions:m,albumType:e.albumType},e.uri);case Y.c.ARTIST:return(0,p.jsx)(t.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.AUDIOBOOK:return(0,p.jsx)(n.M,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,authorName:e.authorName,requestId:e.requestId,color:e.color,signifierText:e.signifierText,isPreRelease:e.isPreRelease,publishDate:e.publishDate,logCardImpressions:m},e.uri);case Y.c.EPISODE:return(0,p.jsx)(d.U,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,showImages:e.show?.images||[],durationMilliseconds:e.duration.milliseconds,releaseDate:e.release.isoString,resume_point:null,description:e.description,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,color:e.color,episodeShow:e.show,logCardImpressions:m,hasAssociatedVideo:e.mediaType?.includes($.C.Video)},e.uri);case Y.c.GENRE:return(0,p.jsx)(h,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.PLAYLIST:return(0,p.jsx)(y.B,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,description:"",authorName:e.owner.displayName,authorUri:e.owner.uri,requestId:e.requestId,color:e.color,isPlayable:!(0,X.p)(e.formatListData?.attributes),logCardImpressions:m,leaveTitleVisible:!0},e.uri);case Y.c.USER:return(0,p.jsx)(C.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.SHOW:return(0,p.jsx)(b.o,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.TRACK:return(0,p.jsx)(f.w,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.album?.images||[],artists:e.artists,album:c?null:e.album,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,isLyricsMatch:e.isLyricsMatch,color:e.color,hasAssociatedVideo:e.hasAssociatedVideo&&u,logCardImpressions:m},e.uri);case Y.c.PRE_RELEASE_ALBUM:return(0,p.jsx)(Z,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null,requestId:e.requestId,color:e.color,release:e.release,releaseTimezone:e.releaseTimezone,logCardImpressions:m},e.uri);default:return console.warn('Rendering SearchEntityCard using the old method as the entity doesn\'t contain the new "type" EntityType enum.'),(0,p.jsx)(T,{testId:i,onClick:o,isHero:l,index:s,entity:e})}}},581:(e,s,i)=>{i.d(s,{X:()=>c});var r=i(7315),a=i(31417),t=i(66872);const n="pjP_jaM7PJzP3XsS4i3K",o="ap8U6ZVS8BqMxUdinBis",l="sHDdcNIw9AQLbLrpdcqO";var d=i(86070);const c=({entity:e,index:s,requestId:i,clearSearchHistory:c})=>(0,d.jsxs)("div",{className:n,children:[(0,d.jsx)(t.Q,{entity:{...e,requestId:i},index:s}),(0,d.jsx)("div",{className:o,children:(0,d.jsx)("button",{className:l,onClick:()=>c(e.uri),"aria-label":a.Ru.get("remove"),children:(0,d.jsx)(r.M,{size:"small"})})})]},e.uri)}}]); +//# sourceMappingURL=581.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/6704.js b/dot-config/spicetify/Extracted/Raw/xpui/6704.js new file mode 100755 index 00000000..73dfe493 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/6704.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[6704],{14036:(e,n,s)=>{s.d(n,{l:()=>u});var t=s(97500),l=s.n(t);const a="x-toggle-wrapper",i="x-toggle-indicator",o="JCFCfOY_6UEZZSOO2xrl",c="x-toggle-indicatorWrapper",r="x-toggle-input";var d=s(86070);const u=({value:e,disabled:n,onSelected:s,id:t,className:u,condensed:m=!1,inputRef:h})=>(0,d.jsxs)("label",{className:l()(a,u),children:[(0,d.jsx)("input",{id:t,className:r,type:"checkbox",disabled:n,checked:e,onChange:e=>{const n=e.target.checked;s(n)},ref:h}),(0,d.jsx)("span",{className:l()(c,{[o]:m}),children:(0,d.jsx)("span",{className:l()(i,{[o]:m})})})]})},6023:(e,n,s)=>{s.d(n,{p:()=>v});var t=s(30758),l=s(97500),a=s.n(l),i=s(95530),o=s(6772),c=s(65503),r=s(86677),d=s(31417),u=s(44971);const m="jAjrv_00X1qyxaEHmJCb",h="YVnLJCNcdaEeIGBQYqJS",C="pxocyhWhrvAeBiSlfjbd",p="aOt09fJWpST6CG8xfHuo";var x=s(86070);const v=t.memo((function({onClose:e,onConfirm:n,isOpen:s,itemCount:l}){const v=(0,t.useCallback)((s=>{n(),e(s)}),[n,e]),g=d.Ru.get("queue.confirm-title",l);return(0,x.jsx)(u.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:e,contentLabel:g,isOpen:s,children:(0,x.jsxs)("div",{className:m,children:[(0,x.jsx)(i.E,{as:"h2",variant:"bodyMediumBold",className:h,children:g}),(0,x.jsx)(i.E,{as:"p",variant:"bodySmall",className:C,paddingBottom:o.lT,children:d.Ru.get("queue.confirm-message")}),(0,x.jsxs)("div",{className:a()("encore-light-theme",p),children:[(0,x.jsx)(c.H,{onClick:e,children:d.Ru.get("queue.cancel-button")}),(0,x.jsx)(r.$,{onClick:v,children:d.Ru.get("queue.confirm-button")})]})]})})}))},38547:(e,n,s)=>{s.d(n,{K:()=>d});var t=s(87030),l=s(95530),a=s(86677),i=s(31417),o=s(21082),c=s(45387),r=s(86070);const d=()=>(0,r.jsxs)("div",{className:c.A.emptyContainer,children:[(0,r.jsx)(t.j,{size:"xxlarge","aria-hidden":"true"}),(0,r.jsxs)("div",{className:c.A.titleContainer,children:[(0,r.jsx)(l.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:i.Ru.get("queue.empty-title")}),(0,r.jsx)("p",{children:i.Ru.get("queue.empty-description")})]}),(0,r.jsx)(o.N,{to:"/search",children:(0,r.jsx)(a.$,{colorSet:"invertedLight",children:i.Ru.get("queue.fine-something")})})]})},64343:(e,n,s)=>{s.d(n,{O:()=>r});var t=s(30758),l=s(32078),a=s(48713),i=s(608),o=s(21549),c=s(86070);const r=()=>{const{spec:e,logger:n,UBIFragment:s}=(0,o.r)(l.J,{}),{uri:r}=(0,i.f)(),d=(0,t.useCallback)(((s,t)=>{const l=e.inviteButtonFactory().hitShare({entityToBeShared:s,shareId:t});n.logInteraction(l)}),[n,e]),u=(0,t.useCallback)((()=>{const s=e.endButtonFactory().hitUiReveal();n.logInteraction(s)}),[n,e]),m=(0,t.useCallback)((()=>{const s=e.leaveButtonFactory().hitUiReveal();n.logInteraction(s)}),[n,e]),h=(0,t.useCallback)((()=>{const s=e.facepileButtonFactory().hitUiNavigate({destination:a.S.PARTICIPANTS_PAGE});n.logInteraction(s)}),[n,e]),C=(0,t.useCallback)((n=>(0,c.jsx)(s,{spec:e,...n})),[s,e]);return{logInviteClick:d,logEndClick:u,logLeaveClick:m,logFacePileClick:h,logStartJam:(0,t.useCallback)((()=>{const s=e.createJamButtonFactory().hitUiNavigate({destination:r??""});n.logInteraction(s)}),[n,e,r]),UBIFragmentWithSpec:C}}},30302:(e,n,s)=>{s.d(n,{Z:()=>$});var t=s(78464),l=s(30758),a=s(62411),i=s(95530),o=s(14343),c=s(31417),r=s(14036),d=s(97500),u=s.n(d),m=s(33242),h=s(16753),C=s(65503),p=s(7315),x=s(86677),v=s(50111);const g="_GA0LJ6qjoKBsWLq34XF",b="s_iKX8Su0w1W5b9yObSm",j="aQ5ntWUtU9bcqS9fS9aC",k="SxLR9RMcR2XyJCZuxYqv",y="vtk1i3JMLWObMppMQ0gH",S="x8qh9EgeC3AdLO0C54Og",N="Dm9gGjGoA7yNxClwSV24",f="MPtthrsnd9PdsCTssJqk";var E=s(86070);const w=({onClose:e,onCopyLink:n,inviteUrlQR:s})=>(0,E.jsxs)(h.a,{className:g,padding:"0",children:[(0,E.jsxs)("div",{className:b,children:[(0,E.jsxs)("div",{className:k,children:[(0,E.jsx)(i.E,{variant:"bodySmallBold",children:c.Ru.get("web-player.social-connect.invitation.qr-code.title")}),(0,E.jsx)(i.E,{variant:"bodySmall",semanticColor:"textSubdued",children:c.Ru.get("web-player.social-connect.invitation.qr-code.description")})]}),(0,E.jsx)(C.H,{semanticColor:"textSubdued",iconOnly:p.M,size:"small",onClick:e,condensedAll:!0,"aria-label":c.Ru.get("web-player.social-connect.invitation-modal.button-tertiary")})]}),(0,E.jsx)("div",{className:y}),(0,E.jsxs)("div",{className:u()(b,j,S),children:[(0,E.jsx)(x.$,{iconLeading:v._,colorSet:"invertedLight",size:"small",onClick:n,className:N,children:c.Ru.get("web-player.social-connect.invitation-modal.button-primary")}),(0,E.jsx)("div",{className:f,children:(0,E.jsx)(m.Ay,{value:s,size:100})})]})]});var I=s(74159),R=s(98293),A=s(47756);const O=({onClick:e})=>{const n=(0,a.wA)(),s=(0,l.useCallback)((()=>{e(),n((0,R.A9)(A.EL.END_SESSION))}),[n,e]);return(0,E.jsx)(I.n,{size:"small",onClick:s,children:c.Ru.get("web-player.social-connect.end-session.end-session-button")})},B=({onClick:e})=>(0,E.jsx)(I.n,{size:"small",onClick:async n=>{e(n)},children:c.Ru.get("web-player.social-connect.invite-button")}),L=({onClick:e})=>{const n=(0,a.wA)(),s=(0,l.useCallback)((()=>{e(),n((0,R.A9)(A.EL.LEAVE_SESSION))}),[n,e]);return(0,E.jsx)(I.n,{size:"small",onClick:s,children:c.Ru.get("web-player.social-connect.leave-session.leave-session-button")})};var q=s(85387),U=s(77828),P=s(68599),F=s(64333),T=s(48713),J=s(38501);const W="E6U6SyOECK4IENpzZw2R",Q="rirXgOjB8QWiJWDk5hSD",_=({currentSession:e,username:n,onClick:s})=>{const{sessionMembers:t}=e,a=(0,q.Zp)(),r=(0,o.NC)(J.eWj),{setQueueView:d}=(0,U.m)(),u=t.length+2>3?t.length-3:0,m=(0,F.t)(e,n,{userFirst:!0}),h=(0,l.useCallback)((()=>{s&&s(),r?d(U.p.PARTICIPANT_LIST):a(T.S.PARTICIPANTS_PAGE)}),[r,a,s,d]);return(0,E.jsxs)(I.n,{size:"small",className:W,onClick:h,"aria-label":c.Ru.get("web-player.social-connect.participant-list.title"),children:[(0,E.jsx)(P.g,{users:m,maxSlots:3,withoutOverflowBadge:!0}),u>0&&(0,E.jsx)(i.E,{variant:"bodySmallBold",semanticColor:"textBase",className:Q,children:`+${u}`})]})};var M=s(63779),V=s(64343),z=s(69693);const G="CyBimvsotsoxqwtiZeAn",H="_GKa4bilkTYbQLgcLogI",Z="uXHR7rkHhuz9kVPNWwYW",D="KFGFA5pPG0hgIB97pZfI",Y=({id:e,label:n,value:s,onChange:t})=>(0,E.jsxs)("label",{htmlFor:e,className:D,children:[(0,E.jsx)(i.E,{variant:"bodySmall",semanticColor:"textSubdued",children:n}),(0,E.jsx)(r.l,{id:e,value:s,onSelected:t,condensed:!0})]}),K=({className:e,emptyStateComponent:n})=>{const{currentSession:s,setQueueOnlyMode:t,setParticipantVolumeControl:r}=(0,z.D)(),d=(0,a.d4)((({session:e})=>e.user?.id)),u=s?.joinSessionShortLink,m=s?.joinSessionShortLinkQR,{logFacePileClick:h,logInviteClick:C,logEndClick:p,logLeaveClick:x,UBIFragmentWithSpec:v}=(0,V.O)(),g=(0,M.Z)(),b=(0,o.NC)(J.eWj),[j,k]=(0,l.useState)(!0),y=(0,l.useCallback)((()=>{h()}),[h]),S=(0,l.useCallback)((async()=>{u&&await g(u),C(u?.spotifyUri??"",u?.shareId??"")}),[g,u,C]),N=(0,l.useCallback)((async()=>{b?k((e=>!e)):S()}),[S,b]),f=(0,l.useCallback)((()=>{p()}),[p]),I=(0,l.useCallback)((()=>{x()}),[x]);if(!s?.active)return n?(0,E.jsx)(E.Fragment,{children:n}):null;const R=s.sessionMembers.find((e=>e.id===s.sessionOwnerId));return(0,E.jsx)(v,{children:(0,E.jsxs)("div",{className:e,children:[(0,E.jsx)("div",{className:G,children:(0,E.jsx)(i.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:c.Ru.get("web-player.social-connect.session-info.title",{host:R?.displayName??""})})}),(0,E.jsxs)("div",{className:H,children:[(0,E.jsxs)("div",{className:Z,children:[(0,E.jsx)(_,{currentSession:s,username:d,onClick:y}),(0,E.jsx)(B,{onClick:N}),s.isSessionOwner?(0,E.jsx)(O,{onClick:f}):(0,E.jsx)(L,{onClick:I})]}),j&&(0,E.jsx)(w,{onClose:()=>k(!1),onCopyLink:S,inviteUrlQR:m?.shareableUrl??""}),s.isSessionOwner&&(0,E.jsxs)("div",{children:[(0,E.jsx)(Y,{id:"queueOnlyMode",label:c.Ru.get("web-player.social-connect.controls.queue-only-mode"),value:!s.queueOnlyMode,onChange:e=>t(!e)}),"UNAVAILABLE"!==s.participantVolumeControl&&(0,E.jsx)(Y,{id:"participantVolumeControl",label:c.Ru.get("web-player.social-connect.controls.participant-volume-control"),value:"ENABLED"===s.participantVolumeControl,onChange:e=>r(e)})]})]})]})})};var X=s(35163);const $=e=>(0,E.jsx)(t.s,{onError:e=>{(0,X.Jy)(e,"JamQueueHeader")},suspenseFallback:e.emptyStateComponent,children:(0,E.jsx)(K,{...e})})},25619:(e,n,s)=>{s.d(n,{$:()=>t});let t=function(e){return e[e.NowPlaying=0]="NowPlaying",e[e.NextInQueue=1]="NextInQueue",e[e.NextUp=2]="NextUp",e}({})},48075:(e,n,s)=>{s.d(n,{H:()=>i,K:()=>a});var t=s(8473),l=s(608);function a(e){return"autoplay"===e?.provider}function i(){const{uri:e,description:n}=(0,l.f)(),{current:s,nextUp:i,queued:o}=(0,t.w)(),c=i.filter((e=>a(e)?e:"autoplay"!==e.provider)),r=!!o?.length,d=!!c?.length;return{uri:e,description:n,current:s,nextUp:c,queued:o,isEmpty:!1===(s||r||d),hasQueuedTracks:r,hasNextTracks:d}}},77828:(e,n,s)=>{s.d(n,{m:()=>t.m,p:()=>t.p});var t=s(94329)},8473:(e,n,s)=>{s.d(n,{w:()=>o});var t=s(30758),l=s(87464),a=s(87182),i=s(90326);function o(){const e=(0,a.z)(),[n,s]=(0,t.useState)(e.getQueue());return(0,i.p)(l.gd.QUEUE_UPDATE,(e=>s(e.data))),n}},45387:(e,n,s)=>{s.d(n,{A:()=>t});const t={emptyContainer:"BP2Fv3OX_ZYbjdA4lovg",titleContainer:"Olk6uKV_CIIVtWRrdRJc"}}}]); +//# sourceMappingURL=6704.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/7037.css b/dot-config/spicetify/Extracted/Raw/xpui/7037.css new file mode 100755 index 00000000..376f86d0 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/7037.css @@ -0,0 +1 @@ +.OnnbOInFe49hYMQmhwUC{width:100%}.UP1rH6cQZiAZCdkPnDOg,.XZaBo7y3JfnBbjVV9TZo{position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 3)}.UP1rH6cQZiAZCdkPnDOg{max-width:calc(100% - var(--encore-spacing-looser-2))}.SEeVinRsd8ZYEQY4h1bX{height:inherit;width:100%}.SEeVinRsd8ZYEQY4h1bX img{width:100%}.dSMBEH0cx3KxzZGHN3rL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;height:100%;justify-content:center;max-height:720px}@media(height <= 768px){.dSMBEH0cx3KxzZGHN3rL{max-height:300px}}@media(height >= 769px)and (height <= 992px){.dSMBEH0cx3KxzZGHN3rL{max-height:500px}}.AVuE0OAzSCu5B0G4rwpo{aspect-ratio:9/16}.dSMBEH0cx3KxzZGHN3rL video{height:100%}.pvAyLo3KN8QP7KxQtiub{margin:calc(var(--encore-spacing-base)*-1);position:relative}.r4EqB8Z5_aywMW_8I84P{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.7)),color-stop(13.54%,transparent),color-stop(78.65%,transparent),to(#121212));background:linear-gradient(180deg,rgba(0,0,0,.7),transparent 13.54%,transparent 78.65%,#121212);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;inset-block-start:0;inset-inline-start:0;position:absolute;-webkit-transition:opacity .3s ease-in;transition:opacity .3s ease-in;width:100%}.LS_ou3FibFdGi1PGoG_w{inset-block-end:0;-webkit-margin-before:0;margin-block-start:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2)}.iDW7b6oChePRpgfDFY3U{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.JiMklw0itqYJ1aE76Vi8,.iDW7b6oChePRpgfDFY3U{display:-webkit-box;display:-ms-flexbox;display:flex}.JiMklw0itqYJ1aE76Vi8{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;grid-area:adInfo}.NYcvpWpgvQYZploOD6rI{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:grid;grid-template-areas:"adInfo adActions";grid-template-columns:minmax(calc(100% - 112px),calc(100% - 96px)) 1fr;grid-gap:var(--encore-spacing-base)}.OpXrpghZvv_w9ygosJFP{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-base);grid-area:adActions;justify-self:end}.tD84X2SD0IicMx3osK8a{inset-block-end:0;-webkit-margin-before:0;margin-block-start:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2)}.mJucukPuB6OTWgaD4MZk{display:block}.mJucukPuB6OTWgaD4MZk:active,.mJucukPuB6OTWgaD4MZk:focus,.mJucukPuB6OTWgaD4MZk:hover,.mJucukPuB6OTWgaD4MZk[data-context-menu-open=true]{text-decoration:none}.i3o8ABclZov7rz8zzKYP{border-radius:var(--encore-corner-radius-larger-2);padding:var(--encore-spacing-base);-webkit-transition:background-color .4s ease-in-out;transition:background-color .4s ease-in-out}.i3o8ABclZov7rz8zzKYP:before{background-color:hsla(0,0%,100%,.1);border-radius:inherit;content:"";height:100%;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;width:100%}.i3o8ABclZov7rz8zzKYP:hover:before{opacity:1}.i3o8ABclZov7rz8zzKYP:active{opacity:.7;-webkit-transform:scale(.98);transform:scale(.98);-webkit-transition:opacity ease,-webkit-transform .25s ease;transition:opacity ease,-webkit-transform .25s ease;transition:transform .25s ease,opacity ease;transition:transform .25s ease,opacity ease,-webkit-transform .25s ease}._9mvd0bTv9vUHyKGzvBNV{text-wrap:wrap;-webkit-padding-before:var(--encore-spacing-tighter-2);padding-block-start:var(--encore-spacing-tighter-2)}.hQjIgVttFxVwEZ52g6Rg{background:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.5))),-webkit-gradient(linear,left top,left bottom,from(#9334f5),to(#e94e35));background:linear-gradient(0deg,rgba(0,0,0,.5),rgba(0,0,0,.5)),linear-gradient(180deg,#9334f5,#e94e35);margin-bottom:var(--encore-spacing-looser);overflow-wrap:anywhere;overflow-y:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column wrap;flex-flow:column wrap;place-content:space-around center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:var(--encore-corner-radius-larger-2);display:-webkit-box;display:-ms-flexbox;display:flex;opacity:1;padding-left:var(--encore-spacing-looser);padding-right:var(--encore-spacing-looser);text-align:center;-webkit-transition:opacity .1s ease-in 50ms;transition:opacity .1s ease-in 50ms}.zr0dLusU4AgiRoEVZVx_{padding-bottom:0}.FQKI6EvRALxogOFyociA{background-color:rgba(0,0,0,.5);-webkit-box-shadow:none;box-shadow:none;margin-bottom:var(--encore-spacing-tighter-4)}.o1cH6TNkpq2sTkq1EAZU{max-height:0;overflow:hidden}.urYkLZy00wWdQH24F1Ja{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"nothiddenandpad";animation-name:"nothiddenandpad"}.GneD3mdmK5FDZVz6bzhB #MTSvglGhr7gd3paX4exJ{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"surveyfadeout";animation-name:"surveyfadeout"}@-webkit-keyframes nothiddenandpad{to{height:-webkit-fit-content;height:fit-content;max-height:-webkit-fit-content;max-height:fit-content;opacity:1;overflow:unset;padding-top:var(--encore-spacing-base)}}@keyframes nothiddenandpad{to{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content;opacity:1;overflow:unset;padding-top:var(--encore-spacing-base)}}.HgfSrPwFpIvBDXNMx0NO{text-wrap:wrap;-webkit-padding-before:var(--encore-spacing-tighter-2);padding-block-start:var(--encore-spacing-tighter-2)}.FjDNaretUQGhB3YYHUaZ{left:0;position:absolute;top:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;display:none;height:100%;justify-content:center;opacity:0;text-align:center;-webkit-transition:opacity .3s ease-in 50ms;transition:opacity .3s ease-in 50ms;width:100%}.MDmTCQhrCnUXjUhyWx_A{opacity:1}.MDmTCQhrCnUXjUhyWx_A,.QcjxDZqAGwQOqerAjHdc{display:-webkit-box;display:-ms-flexbox;display:flex}.QcjxDZqAGwQOqerAjHdc{background:-webkit-gradient(linear,left bottom,left top,from(rgba(0,0,0,.5)),to(rgba(0,0,0,.5))),-webkit-gradient(linear,left top,left bottom,from(#9334f5),to(#e94e35));background:linear-gradient(0deg,rgba(0,0,0,.5),rgba(0,0,0,.5)),linear-gradient(180deg,#9334f5,#e94e35);margin-bottom:var(--encore-spacing-looser);overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-pack:center;-ms-flex-pack:center;aspect-ratio:1/1;justify-content:center}.GZDC018jhUZA8opoHkpM{overflow-y:auto}.xNk9rFVlHRml2zumyfQI{max-height:0;overflow:hidden}.rA7_f0w9lodVUT7ad3RC{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"expand";animation-name:"expand"}.FfcoZWtdfcG0Ihbesrub,.rA7_f0w9lodVUT7ad3RC{-webkit-animation-duration:.3s;animation-duration:.3s}.FfcoZWtdfcG0Ihbesrub{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"expandcontent";animation-name:"expandcontent"}.q1uiO23dnmvrVxxEOq9l{-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"surveyfadeout";animation-name:"surveyfadeout"}.KRI6OoYy611XXayRUTyE,.q1uiO23dnmvrVxxEOq9l{-webkit-animation-duration:.3s;animation-duration:.3s}.KRI6OoYy611XXayRUTyE{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"padbottom";animation-name:"padbottom"}@-webkit-keyframes padbottom{to{padding-bottom:var(--encore-spacing-base)}}@keyframes padbottom{to{padding-bottom:var(--encore-spacing-base)}}@-webkit-keyframes expand{to{aspect-ratio:unset;max-height:-webkit-fit-content;max-height:fit-content}}@keyframes expand{to{aspect-ratio:unset;max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}}@-webkit-keyframes expandcontent{to{max-height:-webkit-fit-content;max-height:fit-content}}@keyframes expandcontent{to{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}}@-webkit-keyframes surveyfadeout{to{opacity:0}}@keyframes surveyfadeout{to{opacity:0}}.iFWtvDR8p3PNwLx46nWu{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.iFWtvDR8p3PNwLx46nWu,.wj4kWjE4PuHVGqEf0ohK{display:-webkit-box;display:-ms-flexbox;display:flex}.wj4kWjE4PuHVGqEf0ohK{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.M7UVXKPsARIM71fmtSUG{inset-block-end:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2);-webkit-margin-before:0;margin-block-start:0}.HKhLNVB5OsH5osqax9lk{background:-webkit-gradient(linear,left top,left bottom,from(rgba(0,0,0,.7)),color-stop(13.54%,transparent),color-stop(78.65%,transparent),to(#121212));background:linear-gradient(180deg,rgba(0,0,0,.7),transparent 13.54%,transparent 78.65%,#121212);display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;inset-block-start:0;inset-inline-start:0;position:absolute;-webkit-transition:opacity .3s ease-in;transition:opacity .3s ease-in;width:100%;z-index:calc(var(--video-player-z-index) + 1)}.i_7T75rV7Rj7AyykwrCf{position:relative}.na5oNvZD9KtuYIUiIUZg{aspect-ratio:9/16;margin:0 auto;max-height:720px}@media(height <= 768px){.na5oNvZD9KtuYIUiIUZg{max-height:300px}}@media(height >= 769px)and (height <= 992px){.na5oNvZD9KtuYIUiIUZg{max-height:500px}}._7QFCuyjgT6BwUe1JJVL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--encore-spacing-base)}._7QFCuyjgT6BwUe1JJVL.g1fyNwi0G98CTbv9v4We .i_7T75rV7Rj7AyykwrCf{margin:calc(var(--encore-spacing-base)*-1)}@-webkit-keyframes SlideInBottom{0%{-webkit-transform:translateY(100px);transform:translateY(100px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes SlideInBottom{0%{-webkit-transform:translateY(100px);transform:translateY(100px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes FadeIn{0%{opacity:0}to{opacity:1}}@keyframes FadeIn{0%{opacity:0}to{opacity:1}}.nONhpa6k5EMxHTR1RXhM{--video-player-z-index:0;height:100%;margin:calc(var(--encore-spacing-base)*-1);overflow:hidden;position:relative}.nONhpa6k5EMxHTR1RXhM.SDP4__0ksgTwERvZfjE8{padding-bottom:var(--encore-spacing-looser)}.cp7_8T7Q27pZ5zYXUFOW{gap:var(--encore-spacing-looser);height:100%;padding:var(--encore-spacing-base)}.IVGg8Hz4Py4BaPEyJz0T,.cp7_8T7Q27pZ5zYXUFOW{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.IVGg8Hz4Py4BaPEyJz0T{gap:var(--encore-spacing-base);padding-top:var(--encore-spacing-base);position:relative}.IVGg8Hz4Py4BaPEyJz0T.SDP4__0ksgTwERvZfjE8{height:100%}.tUurYuAJ2ZftcyLRFJ9z{-webkit-animation:SlideInBottom .6s ease-in-out,FadeIn .6s linear;animation:SlideInBottom .6s ease-in-out,FadeIn .6s linear} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/7037.js b/dot-config/spicetify/Extracted/Raw/xpui/7037.js new file mode 100755 index 00000000..eb88ff6b --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/7037.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7037],{97281:(e,t,s)=>{s.d(t,{U:()=>d});var i=s(31417),n=s(38157),a=s(75830),r=s(86070);const d=({menu:e,onClick:t,"aria-label":s})=>(0,r.jsx)(a.b,{menu:e,children:(0,r.jsx)(n.e,{size:n.M.xs,label:i.Ru.get("more"),ariaLabel:s,onClick:t})})},29095:(e,t,s)=>{s.d(t,{n:()=>r});var i=s(65503),n=s(99701),a=s(86070);const r=({icon:e,activeIcon:t,label:s,isActive:r,...d})=>(0,a.jsx)(n.Zp,{label:s,children:(0,a.jsx)(i.H,{"aria-label":`${s}, ${r?"selected":"unselected"}, button`,"aria-pressed":r,semanticColor:r?"textBrightAccent":"textSubdued",iconOnly:r?t:e,"aria-haspopup":"menu",size:"small",...d})})},57037:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ot});var i=s(30758),n=s(97500),a=s.n(n),r=s(14343),d=s(41760),o=s(95530),c=s(31417),l=s(82909);const u={standardHeader:"OnnbOInFe49hYMQmhwUC",fixedHeader:"XZaBo7y3JfnBbjVV9TZo",verticalVideoHeader:"UP1rH6cQZiAZCdkPnDOg"};var v=s(86070);const m=({item:e,variant:t="bodyMediumBold",semanticColor:s="textBase",experience:i="standard"})=>{const n=u[`${i}Header`],a=e.isPodcastAd?c.Ru.get("ad-formats.npv.header.podcast-context"):c.Ru.get("ad-formats.npv.header.music-context");return(0,v.jsx)("div",{className:n,children:(0,v.jsx)(l.r,{children:(0,v.jsx)(o.E,{variant:t,semanticColor:s,children:a})},a)})};var x=s(62411),p=s(22984);const y="SEeVinRsd8ZYEQY4h1bX",g=({url:e})=>(0,v.jsx)("div",{className:y,children:(0,v.jsx)(p._,{testid:"cover-art-image",loading:"lazy",src:e})});var f=s(34296);const h=({item:e})=>{const{capturePlaybackError:t}=(0,i.useContext)(f.O),s=e.metadata?.["ad.canvas.url"];return(0,i.useEffect)((()=>{s||t()}),[s,t]),s?(0,v.jsx)(g,{url:s}):null};var j=s(88308),_=s(64369),b=s(97040),k=s(99859),I=s(2679);const A="dSMBEH0cx3KxzZGHN3rL";const E=({canvasUri:e,canvasUrl:t,children:s,fileId:n,playerContainerClass:r})=>{const{capturePlaybackError:d}=(0,i.useContext)(f.O),o=(0,i.useRef)(null),c=(0,i.useMemo)((()=>({disallowProtectedTracks:!0,enableWithoutEME:!0,videoPlayerContainer:`.${r}`,audioPlayerContainer:`.${r}`})),[r]),l=(0,b.H)(c,void 0,void 0,void 0,void 0),{isPlaying:u}=(0,I.GK)();return(0,j.Ij)((()=>{const s=function(e,t,s){return(0,_.a2)({fileId:t,url:s,uri:e,mediaType:"video",format:{}.DEBUG_OVERTURE_WITHOUT_EME?"GENERIC_MEDIA":"MANIFEST_ID",options:{},logData:{playbackId:(0,k.E)()}})}(e,n,t);if(s)return l.playTracks([s],{paused:!u,muted:!0,loop:!0}),l.on(_.LW.TRACK_LOADED,(()=>{const e=document.getElementsByClassName(r),t=e[0]?.querySelector("video");t&&o.current&&(o.current.appendChild(t),t.autoplay=!0)})),l.on(_.LW.ERROR,(e=>{d()})),()=>{l.stop(),l.removeAllListeners()}}),[n,e]),(0,v.jsx)("div",{"data-testid":"canvas-ad-player",className:a()(r,A),ref:o,children:s})};const T=({item:e})=>{const{capturePlaybackError:t}=(0,i.useContext)(f.O),s=e.metadata?.["ad.canvas.url"],n=e.metadata?.["ad.canvas.file_id"],a=(r=s,r?.split("/").pop());var r;const d=n||a;return(0,i.useEffect)((()=>{d||t()}),[d,t]),d?(0,v.jsx)(E,{playerContainerClass:"canvasAdPlayerNpv",canvasUri:e.uri,fileId:d,canvasUrl:s}):null};var N=s(39148),C=s(63676),M=s(89775),V=s(21082);const R="pvAyLo3KN8QP7KxQtiub",w="r4EqB8Z5_aywMW_8I84P",q=e=>{const{item:t,canvasAdType:s}=e;return"video"===s?(0,v.jsx)(T,{item:t}):(0,v.jsx)(h,{item:t})},Q=e=>{const t=(0,x.wA)(),{url:s}=(0,N.b)(e.item);return(0,v.jsxs)("div",{className:R,"data-testid":"canvas-ad-container",children:[(0,v.jsx)("div",{className:w}),s?(0,v.jsx)(V.N,{to:s,onClick:()=>{t((0,M.q5)(C.c.VIDEO_PLAYER,C.V.AD_NPV))},children:(0,v.jsx)(q,{...e})}):(0,v.jsx)(q,{...e})]})};var S=s(97281),O=s(70200),P=s(51642);const U="iDW7b6oChePRpgfDFY3U",F=({item:e})=>(0,v.jsxs)("div",{className:U,children:[(0,v.jsx)(P.T,{item:e}),(0,v.jsx)(O.t,{item:e})]});var D=s(16345),Z=s(8679);const B="JiMklw0itqYJ1aE76Vi8",L=({item:e})=>(0,v.jsxs)("div",{className:B,children:[(0,v.jsx)(Z.f,{item:e,surface:"AD_NPV"}),(0,v.jsx)(D.L,{item:e,surface:"AD_NPV"})]});var z=s(44119),W=s(89848),H=s(5093),$=s(29195);function Y(){const e=(0,$.vh)();return{linkUbiEvent:function({adId:t,ubiEventId:s,product:i,format:n,requestId:a}){e.send((0,H.A)({ad_id:t,ad_request_id:a,ad_format:n,content_type:i,ubi_event_id:s}))}}}var G=s(10994),K=s(12864),J=s(96164),X=s(98293),ee=s(78813),te=s(44672),se=s(33329);const ie=({item:e,spec:t,contextTrack:s})=>{const i=(0,x.wA)(),n=(0,se.s)(),{linkUbiEvent:a}=Y(),r=`${z.Q.getAdFormat(s)}_${z.Q.getAdProduct(s)}`;return(0,v.jsx)(K.D,{role:"menuitem",testid:"about-this-ad-context-menu-item",leadingIcon:(0,v.jsx)(J.p,{size:"small"}),"aria-label":c.Ru.get("ad-formats.dsa.aboutThisAd"),onClick:()=>{i((0,ee.Oc)()),i((0,X.b0)(e));const d=t.contextMenuFactory({identifier:e.metadata?.lineitem_id,reason:r}).triggerDsaFactory().hitUiNavigate({destination:"/context_menu"}),{interactionId:o}=n.logInteraction(d);a({adId:e.adId,requestId:e.requestId,ubiEventId:o,format:z.Q.getAdFormat(s),product:z.Q.getAdProduct(s)})},divider:"before",children:c.Ru.get("ad-formats.dsa.aboutThisAd")})},ne=(0,i.memo)((function(e){return(0,v.jsx)(te.pZ,{value:"about-this-ad",children:(0,v.jsx)(ie,{...e})})})),ae=(0,i.memo)((function({item:e,spec:t,contextTrack:s}){const n=(0,se.s)(),{linkUbiEvent:a}=Y(),r=`${z.Q.getAdFormat(s)}_${z.Q.getAdProduct(s)}`;return(0,i.useEffect)((()=>{(()=>{const i=n.logImpression(t.contextMenuFactory({identifier:e.metadata?.lineitem_id,reason:r}).impression());a({adId:e.adId,requestId:e.requestId,format:z.Q.getAdFormat(s),product:z.Q.getAdProduct(s),ubiEventId:i})})()}),[]),(0,v.jsx)(te.pZ,{value:"ad",children:(0,v.jsxs)(G.W,{children:[(0,v.jsx)(te.pZ,{value:"ad-title",children:(0,v.jsx)(K.D,{role:"menuitem",testid:"ad-title-context-menu-item",divider:"after",disabled:!0,children:e.metadata.advertiser})}),(0,v.jsx)(ne,{item:e,spec:t,contextTrack:s})]})})}));var re=s(38501);const de="NYcvpWpgvQYZploOD6rI",oe="OpXrpghZvv_w9ygosJFP",ce=({item:e,spec:t})=>{const s=(0,r.NC)(re.SeK,{loadingValue:!1}),i=(0,W.mr)(),n=(0,se.s)(),{linkUbiEvent:a}=Y(),d=`${z.Q.getAdFormat(e)}_${z.Q.getAdProduct(e)}`;return(0,v.jsxs)("div",{className:de,children:[(0,v.jsx)(L,{item:e}),(0,v.jsxs)("div",{className:oe,children:[(0,v.jsx)(F,{item:e}),s&&i?.isDsaEligible&&(0,v.jsx)("div",{"data-testid":"PanelHeader_AdContextMenuButton",children:(0,v.jsx)(S.U,{menu:(0,v.jsx)(ae,{item:i,contextTrack:e,spec:t}),onClick:()=>{if(i){const s=t.infoContainerFactory().contextMenuButtonFactory({identifier:i.metadata?.lineitem_id,reason:d}).hitUiNavigate({destination:"/context_menu"}),{interactionId:r}=n.logInteraction(s);a({adId:i.adId,requestId:i.requestId,format:z.Q.getAdFormat(e),product:z.Q.getAdProduct(e),ubiEventId:r})}}})})]})]})};var le=s(58765);const ue=({item:e,context:t,index:s})=>t?(0,v.jsx)(le.h,{context:t,item:e,index:s}):null,ve="tD84X2SD0IicMx3osK8a",me=({item:e,spec:t,canvasAdType:s})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Q,{item:e,canvasAdType:s}),(0,v.jsx)("div",{className:ve,children:(0,v.jsx)(ce,{item:e,spec:t})})]}),xe=({item:e,spec:t,context:s,index:i})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ue,{item:e,context:s,index:i}),(0,v.jsx)(ce,{item:e,spec:t})]}),pe=e=>{const{item:t}=e,{state:s}=(0,i.useContext)(f.O),n=(0,r.NC)(re.U5l,{loadingValue:!1}),a=t?.metadata?.["ad.canvas.type"];return n&&("image"===a||"video"===a)&&s!==f.j.Errored?(0,v.jsx)(me,{...e,canvasAdType:a}):(0,v.jsx)(xe,{...e})};var ye=s(97848),ge=s(23046),fe=s(23041),he=s(81670),je=s(32411);const _e="mJucukPuB6OTWgaD4MZk",be="i3o8ABclZov7rz8zzKYP",ke=(0,i.lazy)((()=>s.e(8925).then(s.bind(s,78925)))),Ie=({item:e,backgroundColor:t,className:s})=>{const n=(0,x.wA)(),{url:r,buttonMessage:d,tagline:o}=(0,N.b)(e),l=d||c.Ru.get("ad-formats.learnMore");if(!r)return null;const u=a()(_e,s),m=(0,je.H)(r);return(0,v.jsx)(V.N,{to:m,"data-testid":"ad-companion-card",className:u,onClick:()=>{n((0,M.q5)(C.c.COMPANION_CARD,C.V.AD_NPV))},children:(0,v.jsx)(ye.v,{style:{backgroundColor:t},className:be,onClickHint:c.Ru.get("ad-formats.learnMore"),variant:"tinted",horizontalGap:(0,ge.po)("looser"),id:e.uri,title:(0,v.jsx)(fe.d,{variant:"mestoBold","data-testid":"ad-companion-card-tagline",children:o||l}),trailing:(0,v.jsx)(i.Suspense,{fallback:(0,v.jsx)(he.V,{}),children:o?(0,v.jsx)(ke,{text:l,clickUrl:m,onClick:()=>{n((0,M.q5)(C.c.CTA_BUTTON,C.V.AD_NPV))}}):(0,v.jsx)(he.V,{semanticColor:"textBase"})})})})};var Ae=s(26754),Ee=s(64820);const Te="_9mvd0bTv9vUHyKGzvBNV",Ne="hQjIgVttFxVwEZ52g6Rg",Ce=({isPodcastAd:e,noticeType:t,primaryText:s})=>{(0,i.useEffect)((()=>{const e=document.getElementById("connected-box");if(e){const t=e.offsetWidth;e.style.height=`${t}px`}}),[]);const n=e?c.Ru.get("ad-formats.survey-podcast-content"):c.Ru.get("ad-formats.survey-music-content");return(0,v.jsx)("div",{className:Ne,id:"connected-box",children:(0,v.jsxs)(v.Fragment,{children:["success"===t?(0,v.jsx)(Ae.T,{size:"xxlarge",spacing:"small",semanticColor:"textBase","data-testid":"survey-notice-check"}):(0,v.jsx)(Ee.b,{size:"xxlarge",spacing:"small",semanticColor:"textBase","data-testid":"survey-notice-exclamation"}),(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",className:Te,semanticColor:"textBase",children:s}),(0,v.jsx)(o.E,{children:n})]})})},Me=({isPodcastAd:e,logger:t})=>((0,i.useEffect)((()=>{t.logSurveyAdEventWithoutAd({event:"event_survey_on_connect",eventReason:"secondary_device"})}),[]),(0,v.jsx)(Ce,{isPodcastAd:e,noticeType:"alert",primaryText:c.Ru.get("ad-formats.survey-connected-note")})),Ve=({isPodcastAd:e,validationResult:t,logger:s})=>((0,i.useEffect)((()=>{s.logAdEvent({event:"errored",reason:"survey_malformed"}),s.logAdError({errorType:"survey_malformed",errorMessage:t.errorMessage})}),[]),(0,v.jsx)(Ce,{isPodcastAd:e,noticeType:"alert",primaryText:c.Ru.get("error-dialog.generic.header")}));var Re=s(16753),we=s(26316),qe=s(92876),Qe=s(31121),Se=s(81939);const Oe=()=>{const{logger:e}=(0,W.yU)();return e},Pe="zr0dLusU4AgiRoEVZVx_",Ue="FQKI6EvRALxogOFyociA",Fe=({data:e,selected:t,handleOptionClick:s,className:i,ad:n})=>{const r=Oe(),d=(i,a)=>{const d={id:i.id,"aria-label":`Select ${i.primaryText}`};return e.surveyQuestionType===we.xV.MULTI_SELECT?(0,v.jsx)(qe.c,{...d,checked:t.has(i.id),onChange:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:t.has(i.id)?"event_option_deselected":"event_option_selected",position:a,ad:n})}}):(0,v.jsx)(Qe.M,{...d,checked:t.has(i.id),onChange:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:"event_option_selected",position:a,ad:n})}})};return(0,v.jsx)(Se.g,{labelFor:e.id,withFieldset:!0,className:a()(Pe,i),children:(0,v.jsx)("div",{children:e.surveyQuestionOptions.map(((i,a)=>(0,v.jsx)(ye.v,{"data-testid":"survey-option-ad",className:Ue,id:i.id,variant:"elevated",title:i.primaryText,leading:d(i,a),isSelected:t.has(i.id),onClick:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:t.has(i.id)?"event_option_deselected":"event_option_selected",position:a,ad:n})}},i.id)))})})};var De=s(86677);const Ze="o1cH6TNkpq2sTkq1EAZU",Be="urYkLZy00wWdQH24F1Ja",Le="GneD3mdmK5FDZVz6bzhB",ze="MTSvglGhr7gd3paX4exJ",We=({selected:e,submitted:t,handleClick:s})=>(0,v.jsx)("div",{className:a()(Ze,Be,{[Le]:t}),children:(0,v.jsx)(De.$,{disabled:0===e.size,size:"medium",fullWidth:!0,colorSet:"invertedLight",label:"Submit","data-testid":"survey-submit-button",onClick:s,id:ze,children:c.Ru.get("ad-formats.survey-submit-button")})}),He="HgfSrPwFpIvBDXNMx0NO",$e="FjDNaretUQGhB3YYHUaZ",Ye="MDmTCQhrCnUXjUhyWx_A",Ge=({showThankYou:e,ad:t,questionId:s})=>{const n=Oe();return(0,i.useEffect)((()=>{e&&n.logSurveyAdEventWithAd({questionId:s,event:"event_thank_you_displayed",ad:t})}),[s,e]),(0,v.jsxs)("div",{className:a()($e,{[Ye]:e}),"data-testid":"survey-ad-thank-you",children:[(0,v.jsx)(Ae.T,{size:"xxlarge",spacing:"small"}),(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",className:He,"data-testid":"survey-ad-thank-you",children:c.Ru.get("ad-formats.survey-thankyou")})]})};function Ke(){const[e,t]=(0,i.useState)(new Map),[s,n]=(0,i.useState)(!1);return{selected:e,handleOptionClick:({optionId:s,isExclusive:i,questionType:n,position:a})=>{let r=new Map(e);n===we.xV.MULTI_SELECT?r=function({optionId:e,selected:t,isExclusive:s,position:i}){let n;t.has(e)?(n=new Map(t),n.delete(e)):n=function({optionId:e,selected:t,isExclusive:s,position:i}){const n=new Map(t);s&&n.clear();return t.forEach((({isExclusive:e},t)=>{e&&n.delete(t)})),n.set(e,{isExclusive:s,position:i}),n}({optionId:e,isExclusive:s,selected:t,position:i});return n}({optionId:s,isExclusive:i,selected:e,position:a}):n===we.xV.SINGLE_SELECT&&(r=function({optionId:e,selected:t,position:s}){let i=new Map(t);t.has(e)||(i=function({optionId:e,selected:t,position:s}){const i=new Map(t);return i.clear(),i.set(e,{isExclusive:!0,position:s}),i}({optionId:e,selected:t,position:s}));return i}({optionId:s,selected:e,position:a})),t(r)},setSurveyIsSubmitted:n,submitted:s}}class Je{constructor(e){this.isValid=e.isValid,this.errorMessage=e.errorMessage}}var Xe=s(81475),et=s(98742);const tt=({ad:e,eventSender:t,logger:s,questionId:i,selected:n})=>{const a=[];n.forEach(((e,t)=>{const s=(({id:e,selectedOption:t})=>et.$y.create({selectedSurveyQuestionOptionId:e,optionPositionIndex:t.position.toString()}))({id:t,selectedOption:e});a.push(s)}));const r=et.Tl.create({surveyQuestionId:i,selectedSurveyOptions:a}),d=et.BN.create({surveyQuestionAnswers:[r]}),o=et.A7.create({survey:d});s.logAdEvent({event:"survey_submitted",payload:o}),s.logAdEvent({event:"ended"}),t.send((0,Xe.i)({ad_id:e.adId,event:"event_survey_submitted",format:(0,we.gh)(e.format).toLowerCase(),in_focus:!0,lineitem_id:e.metadata?.lineitem_id,product_name:"brand_survey",question_id:i,request_id:e.requestId,response:JSON.stringify(o),slot:e.slot}))};const st=function(e,t=2e3){const s=(0,W.dY)();(0,i.useEffect)((()=>{if(!e)return;const i=setTimeout((()=>s.skipToNext()),t);return()=>clearTimeout(i)}),[t,e,s])},it="QcjxDZqAGwQOqerAjHdc",nt="GZDC018jhUZA8opoHkpM",at="xNk9rFVlHRml2zumyfQI",rt="rA7_f0w9lodVUT7ad3RC",dt="FfcoZWtdfcG0Ihbesrub",ot="q1uiO23dnmvrVxxEOq9l",ct="KRI6OoYy611XXayRUTyE",lt=({question:e,ad:t})=>{const s=Oe(),n=(0,$.vh)(),r=(0,W.dY)();(0,i.useEffect)((()=>{s.logSurveyAdEventWithAd({questionId:e.id,event:"event_companion_viewed",ad:t})}),[e.id]);const{selected:d,handleOptionClick:c,submitted:l,setSurveyIsSubmitted:u}=Ke();(0,i.useEffect)((()=>{e.surveyQuestionType in we.xV||(s.logAdEvent({event:"errored",reason:"survey_malformed"}),r.skipToNext())})),st(l,2e3);return(0,v.jsxs)(Re.a,{className:a()(it,rt),padding:"looser",children:[(0,v.jsxs)("div",{className:a()(nt,{[ot]:l}),children:[(0,v.jsxs)("div",{className:ct,children:[(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",children:e.primaryText}),(0,v.jsx)(o.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:e.secondaryText})]}),(0,v.jsx)(Fe,{className:a()(at,dt),ad:t,selected:d,handleOptionClick:c,data:e})]}),(0,v.jsx)(We,{handleClick:()=>{u(!0),tt({eventSender:n,ad:t,selected:d,logger:s,questionId:e.id})},submitted:l,selected:d}),(0,v.jsx)(Ge,{showThankYou:l,ad:t,questionId:e.id})]})},ut=({survey:e,ad:t})=>e?(0,v.jsx)(lt,{question:e?.surveyQuestions[0],ad:t}):null,vt=e=>{return t=e,t.survey?.surveyQuestions?.length?(e=>!e.survey?.surveyTransparencyContent||0===Object.keys(e.survey.surveyTransparencyContent).length)(e)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content : missing"}):new Je({isValid:!0}):new Je({isValid:!1,errorMessage:"survey.survey_questions : missing"});var t},mt=e=>{const t=e?.[0];if(s=t,!s?.id||s.id.length<1)return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].id : missing"});var s;if((e=>(0,we.BM)(e?.surveyQuestionType)<=0)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].survey_question_type : invalid type"});if((e=>!e?.primaryText||e?.primaryText?.length<1)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].primary_text : missing"});if((e=>!e?.surveyQuestionOptions?.length)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].survey_question_options : missing"});const i=t?.surveyQuestionOptions.find((e=>(e=>!e.id||e?.id?.length<1)(e)));if(i)return new Je({isValid:!1,errorMessage:`survey.survey_questions[0].survey_question_options[${t?.surveyQuestionOptions.indexOf(i)}].id : missing`});const n=t?.surveyQuestionOptions.find((e=>(e=>!e.primaryText||e.primaryText.length<1)(e)));return new Je(n?{isValid:!1,errorMessage:`survey.survey_questions[0].survey_question_options[${t?.surveyQuestionOptions.indexOf(n)}].primary_text : missing`}:{isValid:!0})},xt=e=>{if(!e)return new Je({isValid:!1,errorMessage:"no ad"});const t=(e=>e?.companions.find((e=>e.survey)))(e);if(!t)return new Je({isValid:!1,errorMessage:"companions.survey : missing"});const s=vt(t);if(s&&!s.isValid)return s;const i=t?.survey?.surveyQuestions,n=mt(i);if(n&&!n.isValid)return n;const a=t?.survey?.surveyTransparencyContent,r=(d=a)&&(e=>!e?.transparencyLabel||e?.transparencyLabel.length<1)(d)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content.transparency_label : missing"}):d&&(e=>!e?.transparencyUrl||e?.transparencyUrl.length<1)(d)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content.transparency_url : missing"}):new Je({isValid:!0});var d;return r||new Je({isValid:!0})},pt=(0,i.memo)((function({displayText:e,url:t,ad:s,questionId:n}){const a=Oe();return(0,i.useEffect)((()=>{a.logSurveyAdEventWithAd({questionId:n,event:"event_context_menu",ad:s})}),[n]),(0,v.jsx)(G.W,{children:(0,v.jsx)(K.D,{role:"menuitem",leadingIcon:(0,v.jsx)(J.p,{size:"small"}),"aria-label":`${e}, link`,to:t,children:e})})}));var yt=s(31233);const gt="iFWtvDR8p3PNwLx46nWu",ft="wj4kWjE4PuHVGqEf0ohK",ht=({item:e})=>{const t=(0,W.mr)(),s=xt(t),n=Oe(),a=(0,i.useMemo)((()=>t?.companions.find((e=>e.survey))?.survey),[t]),r=a?.surveyTransparencyContent,{currentDevice:d}=(0,yt.l)(),{isLocal:o}=d;return(0,v.jsxs)("div",{"data-testid":"survey-ad",className:ft,children:[o?t&&s.isValid?(0,v.jsx)(ut,{survey:a,ad:t}):(0,v.jsx)(Ve,{isPodcastAd:e?.isPodcastAd,validationResult:s,logger:n}):(0,v.jsx)(Me,{isPodcastAd:e?.isPodcastAd,logger:n}),(0,v.jsxs)("div",{className:gt,children:[(0,v.jsx)(L,{item:e}),r&&t&&(0,v.jsx)(S.U,{"aria-label":"More options, button",menu:(0,v.jsx)(pt,{questionId:a?.surveyQuestions[0]?.id,ad:t,displayText:r.transparencyLabel,url:r.transparencyUrl})})]})]})},jt=e=>{const t=(0,x.d4)((e=>e.ads?.vto));return"audio"===e?.mediaType||!t?.isMinimized};var _t=s(12200);const bt="M7UVXKPsARIM71fmtSUG",kt="HKhLNVB5OsH5osqax9lk",It="i_7T75rV7Rj7AyykwrCf",At="na5oNvZD9KtuYIUiIUZg",Et="_7QFCuyjgT6BwUe1JJVL",Tt="g1fyNwi0G98CTbv9v4We",Nt=({item:e,context:t,index:s,spec:i})=>{const n=jt(e),r="portrait"===e.videoOrientation,d=r&&!n?bt:"",o=a()(Et,{[Tt]:r}),c=a()({[At]:r});return(0,v.jsxs)("div",{className:o,children:[n?(0,v.jsx)(ue,{item:e,context:t,index:s}):(0,v.jsxs)("div",{className:It,children:[r&&(0,v.jsx)("div",{className:kt}),(0,v.jsx)("div",{className:c,children:(0,v.jsx)(_t.F,{})})]}),(0,v.jsx)("div",{className:d,children:(0,v.jsx)(ce,{item:e,spec:i})})]})};var Ct=s(85505),Mt=s(37948);var Vt=s(21549);const Rt="nONhpa6k5EMxHTR1RXhM",wt="SDP4__0ksgTwERvZfjE8",qt="cp7_8T7Q27pZ5zYXUFOW",Qt="IVGg8Hz4Py4BaPEyJz0T",St="tUurYuAJ2ZftcyLRFJ9z",Ot=({item:e,context:t,index:s})=>{const{logoImage:n}=(0,N.b)(e),o=jt(e),{state:c}=(0,i.useContext)(f.O),l=(0,r.NC)(re.U5l),{spec:u,UBIFragment:x}=(0,Vt.r)(d.m,{}),p=((e=null,t=0,s=Ct.CpN)=>{const[n,a]=(0,i.useState)(s),r=(0,Mt.z)(e,s,"colorDark");return(0,i.useEffect)((()=>{setTimeout((()=>{a(r)}),t)}),[t,r]),n})(z.Q.isVideoAd(e)?n:e?.images[0]?.url||n,600),y=(0,i.useMemo)((()=>z.Q.isVerticalVideoAd(e)&&!o),[e,o]),g=(0,i.useMemo)((()=>y?"verticalVideo":l&&z.Q.isCanvasAd(e)&&c!==f.j.Errored?"fixed":"standard"),[c,l,e,y]),h=(e=>{const t=(0,W.mr)(),s=t?.requestId,n=Oe(),a=(0,r.NC)(re.o4S,{loadingValue:!1});return(0,i.useEffect)((()=>{s&&z.Q.isSurveyAd(e)&&!a&&n.logAdError({errorType:"survey_ad_feature_disabled",errorMessage:"survey feature flag is disabled"})}),[]),z.Q.isSurveyAd(e)&&a?"survey":z.Q.isVideoAd(e)?"video":"audio"})(e),j="survey"===h;return(0,v.jsx)("div",{className:a()(Rt,{[wt]:j}),children:(0,v.jsx)(x,{spec:u,children:(0,v.jsxs)("div",{className:qt,children:[(0,v.jsxs)("div",{className:a()(Qt,{[wt]:j}),children:[(0,v.jsx)(m,{item:e,experience:g}),(()=>{switch(h){case"video":return(0,v.jsx)(Nt,{item:e,spec:u,index:s,context:t});case"survey":return(0,v.jsx)(ht,{item:e});default:return(0,v.jsx)(pe,{item:e,context:t,index:s,spec:u})}})()]}),j?null:(0,v.jsx)(Ie,{item:e,className:St,backgroundColor:p})]})})})}},70200:(e,t,s)=>{s.d(t,{t:()=>f});var i=s(62411),n=s(53248),a=s(89586),r=s(31417),d=s(29095),o=s(76612),c=s(2274),l=s(84859),u=s(75830),v=s(30758),m=s(10994),x=s(12864),p=s(44672),y=s(86070);const g=(0,v.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["not_relevant",r.Ru.get("ad-formats.ad-feedback.dislike.not-relevant")],["too_often",r.Ru.get("ad-formats.ad-feedback.dislike.too-often")],["unpleasant",r.Ru.get("ad-formats.ad-feedback.dislike.unpleasant-content")],["offensive",r.Ru.get("ad-formats.ad-feedback.dislike.offensive-content")],["do_not_like",r.Ru.get("ad-formats.ad-feedback.dislike.do-not-like")]]);return(0,y.jsx)(p.pZ,{value:"dislike-ad",children:(0,y.jsx)(m.W,{children:Array.from(t).map((([t,s])=>(0,y.jsx)(p.pZ,{value:s,children:(0,y.jsx)(x.D,{role:"menuitem","aria-label":s,onClick:()=>e(t,s),children:s})},t)))})})})),f=({item:e,isDisabled:t})=>{const s=(0,i.wA)(),{logAdFeedback:v}=(0,o.L)(e),m=(0,i.d4)((t=>(0,l.N)(t,e.id)));return(0,y.jsx)(u.b,{menu:(0,y.jsx)(g,{onFeedbackReasonSelect:(t,i)=>{e.id&&(s((0,c.NI)({adId:e.id,reason:i})),v(`dislike_${t}`))}}),children:(0,y.jsx)(d.n,{item:e,icon:n.P,activeIcon:a.X,label:r.Ru.get("ad-formats.ad-feedback.dislike"),isActive:m,"data-testid":"button-dislike-ad",onClick:()=>{if(e.id){if(m)return s((0,c.vA)({adId:e.id})),void v("cancel_dislike");s((0,c.NI)({adId:e.id})),v("dislike_menu")}},disabled:t})})}},51642:(e,t,s)=>{s.d(t,{T:()=>f});var i=s(62411),n=s(60487),a=s(35361),r=s(31417),d=s(29095),o=s(76612),c=s(2274),l=s(84859),u=s(75830),v=s(30758),m=s(10994),x=s(12864),p=s(44672),y=s(86070);const g=(0,v.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["relevant",r.Ru.get("ad-formats.ad-feedback.like.relevant")],["interested_in_brand",r.Ru.get("ad-formats.ad-feedback.like.interested-in-brand")],["interested_in_product",r.Ru.get("ad-formats.ad-feedback.like.interested-in-product")],["enjoyable",r.Ru.get("ad-formats.ad-feedback.like.enjoyable-content")],["discovered_new",r.Ru.get("ad-formats.ad-feedback.like.discovered-new")]]);return(0,y.jsx)(p.pZ,{value:"like-ad",children:(0,y.jsx)(m.W,{children:Array.from(t).map((([t,s])=>(0,y.jsx)(p.pZ,{value:s,children:(0,y.jsx)(x.D,{role:"menuitem","aria-label":s,onClick:()=>e(t,s),children:s})},t)))})})})),f=({item:e,isDisabled:t})=>{const s=(0,i.wA)(),{logAdFeedback:v}=(0,o.L)(e),m=(0,i.d4)((t=>(0,l.T)(t,e.id)));return(0,y.jsx)(u.b,{menu:(0,y.jsx)(g,{onFeedbackReasonSelect:(t,i)=>{e.id&&(s((0,c.F$)({adId:e.id,reason:i})),v(`like_${t}`))}}),children:(0,y.jsx)(d.n,{item:e,icon:n.G,activeIcon:a.q,label:r.Ru.get("ad-formats.ad-feedback.like"),isActive:m,"data-testid":"button-like-ad",onClick:()=>{if(e.id){if(m)return s((0,c.D$)({adId:e.id})),void v("cancel_like");s((0,c.F$)({adId:e.id})),v("like_menu")}},disabled:t})})}},76612:(e,t,s)=>{s.d(t,{L:()=>r});var i=s(86660),n=s(89848),a=s(29195);const r=e=>{const t=(0,n.dY)(),s=(0,a.vh)(),r=t.getInStreamAd();return{logAdFeedback:function(t){s.send((0,i.F)({ad_id:e.id,advertiser:e.advertiser,creative_id:r?.adId===e.id?r?.metadata?.creative_id:void 0,format:e.mediaType,line_item_id:r?.adId===e.id?r?.metadata?.lineitem_id:void 0,event:t}))}}}},84859:(e,t,s)=>{s.d(t,{N:()=>r,T:()=>a});var i=s(42551);const n=e=>e.ads.adFeedback,a=(0,i.Mz)([e=>n(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.liked)),r=(0,i.Mz)([e=>n(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.disliked))}}]); +//# sourceMappingURL=7037.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/7607.js b/dot-config/spicetify/Extracted/Raw/xpui/7607.js new file mode 100755 index 00000000..2ca43dcb --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/7607.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7607],{27607:(e,t,a)=>{a.d(t,{z2:()=>U});var i=a(30758),r=a(97500),n=a.n(r),s=a(96111),l=a(40638),o=a(27102);function c(e,t,a){const i=e.current;if(null===i)return 0;const r=i.getBoundingClientRect();return"vertical"===a?1-Math.max(0,Math.min((t.clientY-r.top)/r.height,1)):Math.max(0,Math.min((t.clientX-r.left)/r.width,1))}var u=a(68815),h=a(14343),d=a(77567);const f=20,g=[{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:320},{name:"dark",frames:80,isStartOfFlashlightEnter:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:40},{name:"flashlight-on",isInfinite:!0},{name:"dark",frames:f,isStartOfExit:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"normal",isInfinite:!0,isEndOfExit:!0}],m=200;function b(e,t){const a=document.createElement("canvas"),i=a.getContext("2d");if(null===i)return null;const r=Math.sqrt(e**2+t**2),n=m;return a.width=r/1.5+2*n,a.height=r+2*n,i.translate(n,n),{canvas:a,context:i,width:a.width-2*n,height:a.height-2*n,padding:n}}function v(e,t,a,i,r=0){const n=i/2*Math.PI/180,s=a/Math.cos(n),l=Math.sin(n)*s*2;e.beginPath(),e.moveTo((t-l)/2,r),e.lineTo(t/2,r+a),e.lineTo((t-l)/2+l,r),e.closePath()}function p(e,t){const a=function(e,t){const a=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-nether-bottom-left.png"),e}),[]),r=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-nether-bottom-right.png"),e}),[]);return function(i){if(r){const a=e-r.naturalWidth,n=t-r.naturalHeight;i.drawImage(r,0,0,r.naturalWidth,r.naturalHeight,a,n,r.naturalWidth,r.naturalHeight)}if(a){const e=0,r=t-a.naturalHeight;i.drawImage(a,0,0,a.naturalWidth,a.naturalHeight,e,r,a.naturalWidth,a.naturalHeight)}}}(e,t),[r,n]=(0,i.useState)(y(e,t)),[s,l]=(0,i.useState)(w(e,t));return(0,i.useEffect)((()=>{n(y(e,t)),l(w(e,t))}),[e,t]),(i,n,l,o)=>{if(!r||!s)return;const c=l/100,u=n.left+n.width*c,h=n.top+n.height/2;let d=0;d=c>.5?(c-.5)/.5*-60:60-c/.5*60;const f=r.width,m=r.height,b=-r.width/2,v=-r.height,p=f,y=m;i.save(),i.fillStyle="rgba(0, 0, 0, 0.85)",i.fillRect(0,0,e,t);const w=i.createLinearGradient(e/2,0,e/2,t);w.addColorStop(0,"rgba(57, 139, 216, 0.3)"),w.addColorStop(1,"rgba(0, 29, 62, 0.15)"),i.fillStyle=w,i.fillRect(0,0,e,t),"flashlight-on"===g[o].name?(i.save(),i.translate(u,h),i.rotate(d*Math.PI/180),i.globalCompositeOperation="destination-out",i.drawImage(r,0,0,f,m,b,v+100,p,y),i.restore(),a(i),i.save(),i.translate(u,h),i.rotate(d*Math.PI/180),i.globalCompositeOperation="source-over",i.drawImage(s,0,0,f,m,b,v+100,p,y),i.restore()):a(i),i.restore()}}function y(e,t){const a=b(e,t);if(!a)return null;const{canvas:i,context:r,width:n,height:s,padding:l}=a,o=r.createLinearGradient(n/2,0,n/2,s);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)");const c=r.createLinearGradient(n/2,0,n/2,s);return c.addColorStop(.7,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.save(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,30,120),r.filter="blur(10px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,30,80),r.filter="blur(40px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=o,r.fillRect(-l,-l,n+2*l,s+2*l),i}function w(e,t){const a=b(e,t);if(!a)return null;const{canvas:i,context:r,width:n,height:s,padding:l}=a;r.save(),r.fillStyle="rgba(80, 170, 255, 0.6)",v(r,n,s,30,120),r.filter="blur(10px)",r.fill(),r.restore();const o=r.createLinearGradient(n/2,0,n/2,s);o.addColorStop(.7,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=o,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",r.fillStyle="rgba(80, 170, 255, 0.8)",v(r,n,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(80, 170, 255, 0.4)",v(r,n,s,30,150),r.filter="blur(40px)",r.fill(),r.restore(),r.save(),r.translate(n/2,s-140),r.scale(1,10),r.fillStyle="rgba(198, 238, 251, 0.2)",r.filter="blur(24px)",r.beginPath(),r.arc(0,0,22,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.2)",r.filter="blur(18px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.save(),r.translate(n/2,s-70),r.scale(1,5),r.fillStyle="rgba(198, 238, 251, 0.1)",r.filter="blur(14px)",r.beginPath(),r.arc(0,0,18,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.1)",r.filter="blur(8px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.fillStyle="rgba(100, 190, 255, 1)",r.filter="blur(22px)",r.beginPath(),r.arc(n/2,s+100,20,0,2*Math.PI),r.fill(),r.fillStyle="rgba(198, 238, 251, 1)",r.filter="blur(4px)",r.beginPath(),r.arc(n/2,s+100,14,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 1)",r.filter="blur(1px)",r.beginPath(),r.arc(n/2,s+100,12,0,2*Math.PI),r.fill();const c=r.createLinearGradient(n/2,0,n/2,s);return c.addColorStop(0,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",i}const S=100,x=[{size:6,alpha:.5},{size:6,alpha:.4},{size:12,alpha:.3},{size:12,alpha:.3},{size:12,alpha:.3},{size:14,alpha:.2},{size:20,alpha:.2},{size:30,alpha:.2},{size:40,alpha:.1}],M=64,E=8,I=2;function C(e,t){const a=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-spores.png"),e}),[]),[r,n]=(0,i.useState)(P(e,t));return(0,i.useEffect)((()=>{r?function(e,t,a){e.forEach((e=>{e.x=Math.random()*t,e.y=Math.random()*a}))}(r,e,t):n(P(e,t))}),[e,t,r]),function(i){null!==a&&r.forEach((r=>{r.x-=r.directionX*r.velocityX,r.y-=r.directionY*r.velocityY,r.y>t+10?(r.x=Math.random()*e,r.y=-10):r.x<-10&&(r.x=e+10,r.y=Math.random()*t);const n=r.spriteSheetX,s=r.spriteSheetY,l=M,o=M,c=r.x-r.size/2,u=r.y-r.size/2,h=r.size,d=r.size;i.save(),i.globalAlpha*=r.alpha,i.drawImage(a,n,s,l,o,c,u,h,d),i.restore()}))}}function P(e,t){const a=[];for(let i=0;i.5?1:-1,directionY:Math.random()>.5?1:-1,velocityX:s/300,velocityY:s/400})}return a}class k{_subscribers=[];_active=!1;unsubscribeToActivity(e){const t=this._subscribers.findIndex((t=>t.fn===e));-1!==t&&(clearTimeout(this._subscribers[t].inactiveTimeout),this._subscribers.splice(t,1))}subscribeToActivity(e,t){this._subscribers.push({fn:t,msInactive:e,isActive:!1})}enableActivityMonitor(){window.addEventListener("mousemove",this._onActivity),window.addEventListener("mouseup",this._onActivity),window.addEventListener("keydown",this._onActivity),window.addEventListener("scroll",this._onActivity,!0)}disableActivityMonitor(){window.removeEventListener("mousemove",this._onActivity),window.removeEventListener("mouseup",this._onActivity),window.removeEventListener("keydown",this._onActivity),window.removeEventListener("scroll",this._onActivity,!0),this._subscribers.forEach((e=>clearTimeout(e.inactiveTimeout))),this._subscribers=[]}_onActivity=()=>{this._subscribers.forEach((e=>{this._active||(this._active=!0,e.fn(this._active)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{this._active=!1,e.fn(this._active)}),e.msInactive)}))}}class T{frame=0;lastPhaseFrame=0;phase=0;animationFrameRequestId=null;flickerTimerId=null;isPlaying=!0;start(){this.lastPhaseFrame=this.frame,this.phase=0;const e=()=>setTimeout((()=>{this.flickerTimerId=e(),this.isPlaying&&g[this.phase].isInfinite&&this.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter)))}),15e3*Math.random()+5e3);this.flickerTimerId=e()}stop(){const e=g.findIndex((e=>e.isStartOfExit));this.phase{const{getPercentage:t,isDragging:a=!1,isPlayingStrangerThings:r=!1,progressBar:n}=e,s=(0,i.useMemo)((()=>new k),[]),l=(0,i.useMemo)((()=>new T),[]),o=(0,i.useRef)(null),[c,u]=(0,i.useState)(null),[h,d]=(0,i.useState)(window.innerHeight),[f,m]=(0,i.useState)(window.innerWidth),[b,v]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1),S=C(f,h),x=p(f,h),M=(0,i.useCallback)((e=>{!a&&r&&(e?l.stop():(l.start(),w(!0)))}),[a,r,l]),E=(0,i.useCallback)((()=>{r&&(l.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter))),w(!0))}),[r,l]),I=(0,i.useCallback)((()=>{l.stop()}),[l]),P=(0,i.useCallback)((()=>{if(!y)return void v(!0);v(!1);const e=window.innerHeight,t=window.innerWidth;m(t),d(e)}),[y]),R=(0,i.useCallback)((()=>{if(!o.current)return;const{frame:e,lastPhaseFrame:a,phase:i}=l;if(l.frame=e+1,g[i].isEndOfExit)w(!1);else{if(g[i].isInfinite||e-a===g[i].frames&&l.setPhase(i+1),o.current.width=f,o.current.height=h,"normal"!==g[i].name){const e=o.current.getContext("2d");if(!e||!c)return;const a=t();x(e,c,a,i),S(e)}l.animationFrameRequestId=requestAnimationFrame(R)}}),[h,f,x,S,t,c,l]);return(0,i.useEffect)((()=>{window.addEventListener("resize",P);const e=s;return e.enableActivityMonitor(),e.subscribeToActivity(5e3,M),()=>{window.removeEventListener("resize",P),e.disableActivityMonitor(),e.unsubscribeToActivity(M)}}),[s,M,P]),(0,i.useEffect)((()=>{r||l.stop()}),[r,l]),(0,i.useEffect)((()=>{a?E():a||I()}),[a,E,I]),(0,i.useEffect)((()=>{y?(b&&P(),l.animationFrameRequestId=requestAnimationFrame(R)):l.animationFrameRequestId&&cancelAnimationFrame(l.animationFrameRequestId)}),[y,R,P,b,l]),(0,i.useEffect)((()=>{n.current&&u(n.current.getBoundingClientRect())}),[f,h,n]),y?(0,A.jsx)("canvas",{className:_,ref:o,width:f,height:h}):null};var O=a(38501);const z=e=>(0,h.NC)(O.c3z,{loadingValue:!1})&&e.isPlayingStrangerThings?(0,A.jsx)(R,{...e}):null;var F=a(44074),D=a(82935);const L="playback-progressbar",q="playback-progressbar-isInteractive",N="progress-bar",j="x-progressBar-progressBarBg",W="x-progressBar-sliderArea",B="oShi2lRbnhFkEr2LlUqC",H="ZqlJ1uWjMeen9ye7Y7GC",Y="x-progressBar-fillColor",X="VI_bMRxDl9fS6qksct7W",G="sW0M_K97doEB3B4Ts58i",V="progress-bar--isDragging",Q="progress-bar__slider",K="GfN5haHC77OxfQqkHlIi",Z="OVsKgmQSwhS2WVE1B9Kc",U=({value:e,max:t,step:a,labelText:r,isInteractive:h=!0,forceActiveStyles:d=!1,onDragStart:f,onDragMove:g,onDragEnd:m,onStepForward:b,onStepBackward:v,saberConfig:p=null,isPlayingStrangerThings:y=!1,isAttackOnTitanEasterEggActive:w,direction:S="horizontal",enableAnimation:x,updateFrequency:M,offFrequencyUpdate:E,className:I,showValueAsTimeOverHandle:C=!1,...P})=>{const k=(0,i.useRef)(null),{isDragging:T,onMouseDown:_}=(({progressBarRef:e,onDragStart:t,onDragMove:a,onDragEnd:r,direction:n="horizontal"})=>{const[s,u]=(0,i.useState)(!1),h=(0,i.useRef)(!1),d=(0,o.ZY)(),f=(0,i.useRef)(t),g=(0,i.useRef)(a),m=(0,i.useRef)(r);f.current=t,g.current=a,m.current=r;const b=(0,l.YQ)((t=>{g.current(c(e,t,n)),h.current=!0}),20,{leading:!0,maxWait:20});return{isDragging:s,onMouseDown:(0,i.useCallback)((t=>{const a=t=>{u(!1),b.cancel(),m.current(c(e,t,n),{wasDraggedBeforeReleased:h.current}),d?.removeEventListener("pointermove",b),h.current=!1};0===t.button&&(f.current(c(e,t,n)),u(!0),d?.addEventListener("pointermove",b),d?.addEventListener("pointerup",a,{once:!0}),h.current=!1)}),[b,e,n,d])}})({progressBarRef:k,onDragStart:f,onDragMove:g,onDragEnd:m,direction:S}),R=(0,i.useRef)(null),[O,U]=(0,i.useState)(0),[$,J]=(0,i.useState)(0),ee=(0,i.useCallback)((e=>{if(R.current){const a=e.clientX-R.current.getBoundingClientRect().left;a>=0&&(U(a),J(a/R.current.clientWidth*t))}}),[t]),te=h?100*Math.max(0,Math.min(1,e/t)):0,ae=d||T,ie=h&&null!==p,re=h&&!(0,F.n)(),ne=(({onStepForward:e,onStepBackward:t,value:a})=>(0,l.YQ)((i=>{parseFloat(i.target.value)>a?e?.():t?.()}),100,{trailing:!1,leading:!0,maxWait:200}))({onStepForward:b,onStepBackward:v,value:e}),se=(0,i.useCallback)((()=>te),[te]),le=(0,o.ZY)(),oe=(0,i.useRef)(le?.visibilityState),ce=le?.visibilityState,ue=T||E||"hidden"===ce||"hidden"===oe.current||0===e;oe.current=ce;const he=x?B:"";return(0,A.jsxs)("div",{className:n()(L,I,{[q]:h,[H]:ue}),"data-testid":P["data-testid"],children:[(0,A.jsx)(s.o,{disabled:!h,type:"range",min:0,max:t,value:e,step:a,onChange:ne,"aria-valuetext":P["aria-valuetext"],children:r}),(0,A.jsxs)("div",{className:n()(N,{[X]:null!==p,[V]:ae}),style:{...ie?p:null,"--progress-bar-transform":`${te}%`,"--progress-bar-duration":`${Number(M)}ms`,...w?{"--fg-color":u.q,"--is-active-fg-color":u.q}:null},ref:R,onPointerDown:_,onMouseMove:C?ee:void 0,"data-testid":"progress-bar",children:[ie?(0,A.jsx)("div",{className:G,"data-testid":"progress-bar-saber-overlay"}):null,(0,A.jsxs)("div",{ref:k,className:j,"data-testid":"progress-bar-background",children:[(0,A.jsx)("div",{className:W,children:(0,A.jsx)("div",{className:n()(Y,he)})}),(0,A.jsx)("div",{className:n()(Q,he),children:C&&T&&(0,A.jsx)("div",{className:K,children:(0,D.f)(e)})}),C&&!T&&(0,A.jsx)("div",{className:Z,style:{insetInlineStart:O},children:(0,D.f)($)})]}),re&&(0,A.jsx)("div",{style:{width:"100%"},children:(0,A.jsx)(z,{getPercentage:se,progressBar:k,isPlayingStrangerThings:y,isDragging:T})})]})]})}},68815:(e,t,a)=>{a.d(t,{q:()=>n,O:()=>s});var i=a(2679);const r="spotify:playlist:37i9dQZF1DWXkVfVmXHa7l",n="#D4000E";function s(){const{isActive:e}=(0,i.l_)(r);return e}}}]); +//# sourceMappingURL=7607.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/838.js b/dot-config/spicetify/Extracted/Raw/xpui/838.js new file mode 100755 index 00000000..c7b08496 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/838.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[838],{3838:(t,r,n)=>{n.d(r,{extractColors:()=>g});var s=n(2672);const o="https://local-image.spotify.com";let i=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});var e=n(5592),a=n.n(e);var h=n(7145);const u=new function(){return a()('(()=>{"use strict";let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function r(t,r,n=1e-6){return Math.abs(t-r)[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})?$/i.exec(t),n=r?.groups?.r,s=r?.groups?.g,o=r?.groups?.b,i=r?.groups?.a;if(void 0===n||void 0===s||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r:n,g:s,b:o,a:i}}function i(t){const{a:r}=o(t);if(!r)return 1;return function(t,r,n){const s=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:r,maximumFractionDigits:n});return Number(s)}(parseInt(r,16)/255,0,2)}function e(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function a({rgb:{r:t,g:r,b:n}}){return.2126*e(t/255)+.7152*e(r/255)+.0722*e(n/255)}function h(t,r){const n=a(t),s=a(r);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}class u{constructor(t,r,n,s=1){this.rgb=t,this.hsl=r,this.hsv=n,this.a=s}static BLACK=u.fromRGB({r:0,g:0,b:0});static WHITE=u.fromRGB({r:255,g:255,b:255});static fromRGB(t,n){if(t.r<0||t.g<0||t.b<0||t.r>255||t.g>255||t.b>255||n&&n<0||n&&n>1)throw Error(`Invalid RGB color: ${JSON.stringify(t)}, alpha: ${n}`);const s=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=Math.min(o,i,e),u=a-h;let c;const l=(a+h)/2,g=a;c=r(u,0)?0:r(g,o)?60*(0+(i-e)/u):r(g,i)?60*(2+(e-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const f=0===l||1===l?0:(g-l)/Math.min(l,1-l);return{h:Math.round(c),s:f,l}}(t),o=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=a-Math.min(o,i,e);let u;const c=a;u=r(h,0)?0:r(c,o)?60*(0+(i-e)/h):r(c,i)?60*(2+(e-o)/h):60*(4+(o-i)/h),u%=360,u<0&&(u+=360);const l=0===c?0:h/c;return{h:Math.round(u),s:l,v:c}}(t);return new u(t,s,o,n)}static fromHex(t,r){const n=function(t){const{r,g:n,b:s}=o(t);return{r:parseInt(r,16),g:parseInt(n,16),b:parseInt(s,16)}}(t),s=i(t);return u.fromRGB(n,r??s)}static fromHSV(t,r){const n=function({h:t,s:r,v:n}){const s=n*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromHSL(t,r){const n=function({h:t,s:r,l:n}){const s=(1-Math.abs(2*n-1))*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s/2;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromInt(t,r){const n=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}}(t);return u.fromRGB(n,r)}static fromCSS(t,r){const n=function(t,r){const n=t.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{rgb:{r:parseInt(t,10),g:parseInt(s,10),b:parseInt(o,10)},rgbAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(n){const{rgb:t,rgbAlpha:r}=n;return u.fromRGB(t,r)}const s=function(t){const r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r)return r[1];return null}(t);if(s)return u.fromHex(s,r);const o=function(t,r){const n=t.match(/^hsla?\\((\\d+),\\s*(\\d+)%,\\s*(\\d+)%(?:,\\s*(\\d*(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{hsl:{h:parseInt(t,10),s:parseInt(s,10)/100,l:parseInt(o,10)/100},hslAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(o){const{hsl:t,hslAlpha:r}=o;return u.fromHSL(t,r)}throw new Error(`Invalid or unsupported CSS color: ${t}`)}toCSS(r){switch(r){case t.HEX:return`#${n((o=this).rgb.r)}${n(o.rgb.g)}${n(o.rgb.b)}`;case t.HEXA:return function(t){return`#${n(t.rgb.r)}${n(t.rgb.g)}${n(t.rgb.b)}${n(Math.floor(255*t.a))}`}(this);case t.RGB:return function(t){return`rgb(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b})`}(this);case t.RGBA:return function(t){return`rgba(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b}, ${t.a})`}(this);case t.HSL:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsl(${r}, ${s(n)}, ${s(o)})`}(this);case t.HSLA:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsla(${r}, ${s(n)}, ${s(o)}, ${t.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var o}toRGBA255(){return{r:this.rgb.r,g:this.rgb.g,b:this.rgb.b,a:255*this.a}}contrastAdjust(t,r=4.5){let n=u.BLACK;if("light"===t&&(n=u.WHITE),n!==u.BLACK&&n!==u.WHITE)throw new Error("Only supports contrast calculation between black and white.");let s=h(this,n);if(s>=r)return this;let o=this.hsv.v,i=n===u.WHITE?-.02:.02,e=Number.MAX_VALUE,a=null;for(let t=0;t<100&&e>.07&&o>=0&&o<=1;t++){o=Math.min(o+i,1),a=u.fromHSV({h:this.hsv.h,s:this.hsl.s,v:o}),s=h(a,u.WHITE);const t=Math.round(10*Math.abs(s-r))/10;t>e&&(i*=-.5),e=t}return null===a?this:a}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(t){const{rgb:r,hsl:n,hsv:s,a:o}=JSON.parse(t);return new u(r,n,s,o)}}class c{constructor(t,r){this.color=t,this.population=r}static fromColor(t,r){return new c(t,r)}static fromRGB(t,r){return new c(u.fromRGB(t),r)}}class l{constructor(t,r=[]){this._comparator=t,this._data=r}swap(t,r){[this._data[t],this._data[r]]=[this._data[r],this._data[t]]}compare(t,r){return this._comparator(this._data[t],this._data[r])}bubbleUp(t){for(;t>0;){const r=t-1>>>1;if(this.compare(t,r)>=0)break;this.swap(t,r),t=r}}bubbleDown(t){const r=this._data.length;for(;;){const n=1+(t<<1),s=n+1;let o=t;if(n0;)yield this.pop()}}const g=31;function f(t){const r=(t>>>10&31)<<3,n=(t>>>5&31)<<3,s=(t>>>0&31)<<3;return u.fromRGB({r,g:n,b:s})}function p(t,r){return Math.round((t>>>3)/r)<<3}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return t*g*g+r*g+n-(s*g*g+o*g+i)}function m({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return r*g*g+t*g+n-(o*g*g+s*g+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return n*g*g+r*g+t-(i*g*g+o*g+s)}class w{constructor(t,r){this.min=t,this.max=r}size(){return this.max-this.min+1}clampTo(t){this.min=this.max=t}extendTo(t){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}class _{_population=0;_spanR=new w(0,0);_spanG=new w(0,0);_spanB=new w(0,0);constructor(t){this._swatches=t,this.fitBox()}getVolume(){return this._spanR.size()*this._spanG.size()*this._spanB.size()}getColorCount(){return this._swatches.length}getAverageColor(){let t=0,r=0,n=0,s=0;for(const{color:o,population:i}of this._swatches)s+=i,t+=i*o.rgb.r,r+=i*o.rgb.g,n+=i*o.rgb.b;const o=p(t,s),i=p(r,s),e=p(n,s);return c.fromRGB({r:o,g:i,b:e},s)}canSplit(){return this.getColorCount()>1}split(){if(!this.canSplit())throw new Error("Can not split a box with only 1 color");const t=this.findSplitPoint(),r=new _(this._swatches.slice(t+1,this._swatches.length));return this._swatches.splice(t+1),this.fitBox(),r}fitBox(){this._population=0;for(let t=0;tt(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t=r)return Math.min(this._swatches.length-1,t);return 0}getLongestDimensionComparator(){const t=this._spanR.size(),r=this._spanG.size(),n=this._spanB.size();return t>=r&&t>=n?b:r>=t&&r>=n?m:d}}class M{queue=new l(((t,r)=>r.getVolume()-t.getVolume()));_swatches=[];constructor(t){this._options=t}static fromPixels(t,r){return new M(r).quantize(t)}quantize(t){const r=new Array(32768).fill(0);let n=0,s=0,o=0;for(let s=t.next();!s.done;s=t.next()){n++;r[((i=s.value)>>>0&255)>>3<<10|(i>>>8&255)>>3<<5|(i>>>16&255)>>3]++}var i;for(let t=0;tthis._options.maxColors&&(this._swatches=this.quantizePixels(this._options.maxColors)),{swatches:this._swatches,totalPixels:n,totalColors:s,totalSaturationFromHSV:o}}quantizePixels(t){this.queue.push(new _(this._swatches)),this.splitBoxes(t);const r=Array.from(this.queue.popAll()).map((t=>t.getAverageColor())),n=this._options.filter;return void 0!==n?r.filter((t=>n(t.color))):r}splitBoxes(t){for(;this.queue.size()null!==t&&r(t)>r(n)?t:n),null)}const x=30,S=80,R=2,A=.0016,B=.3,$=.1,G=45,I=.4,C=.6,E=.1,H=.02;function L(t,r,n){return(t-r)/(n-r)}function T(t){return(t%=360)<0?360+t:t}function y(t,r){const n=function(t){let r=Number.MAX_VALUE;for(const n of t)r=Math.min(r,n);r=-1*Math.abs(r);let n=0,s=360;for(const o of t){const t=T(o+r);t<180&&t>n&&(n=t),t>=180&&t=n.hue1&&r<=n.hue2?L(T(r),n.hue1,n.hue2):(s=360-n.hue2,L(T(r+s),0,T(n.hue1+s)))}function F(t,r){const n=t.map((t=>t.color.hsv.h)),s=function(t){let r=0,n=0;for(const s of t)r+=Math.cos(s/180*Math.PI),n+=Math.sin(s/180*Math.PI);const s=r/t.length,o=n/t.length,i=180*Math.atan2(o,s)/Math.PI%360;return i>=0?i:360-Math.abs(i)}(n),o=y(n,s);return o>I||o{return t.population/r>H||(n=t.color.hsv.h,o=s,i=G,Math.min(Math.abs(o-n),360-Math.abs(o-n))t.population/r>=A)).filter((t=>!(o>=$+E)||function({hsv:t}){return(t.v>.85||t.v<.15)&&t.s<.2||t.v<.15||t.s<.2||t.s<.2&&t.v<.4?0:(t.v+t.s)/2}(t.color)>=B));if(0===i.length)return null;const e=F(i,r),a=function(t){return t.map((t=>t.color.hsv.h)).every((t=>t>=x&&t<=S))}(e);return v(e,(t=>P(t,a,r)))}const D={min:.3,target:.5,max:.7},N={min:0,target:.26,max:.45},q={min:.55,target:.74,max:1},k={min:.35,target:1,max:1},V={min:0,target:.3,max:.4},X={saturation:.24,luminance:.52,population:.24},O={vibrantLight:{lightness:q,saturation:k,weights:X},vibrant:{lightness:D,saturation:k,weights:X},vibrantDark:{lightness:N,saturation:k,weights:X},mutedLight:{lightness:q,saturation:V,weights:X},muted:{lightness:D,saturation:V,weights:X},mutedDark:{lightness:N,saturation:V,weights:X}},U=c.fromRGB({r:83,g:83,b:83},1),J=c.fromRGB({r:83,g:83,b:83},1),j=c.fromRGB({r:127,g:127,b:127},1);function W(t,r){const{color:{hsl:n}}=t;return n.s>=r.saturation.min&&n.s<=r.saturation.max&&n.l>=r.lightness.min&&n.l<=r.lightness.max}function K(t,r,n){const{color:{hsl:s}}=t;let o=0,i=0,e=0;return r.weights.saturation>0&&(o=r.weights.saturation*(1-Math.abs(s.s-r.saturation.target))),r.weights.luminance>0&&(i=r.weights.luminance*(1-Math.abs(s.l-r.lightness.target))),r.weights.population>0&&(e=r.weights.population*(t.population/n)),o+i+e}let Y=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});const Q=self;const Z=t=>!function({hsl:t}){return t.l<=.05}(t)&&!function({hsl:t}){return t.l>=.95}(t)&&!function({hsl:t}){return t.h>=10&&t.h<=37&&t.s<=.82}(t)&&function({hsv:t}){return t.v>.2}(t);Q.addEventListener("message",(t=>{const[r,n]=t.data,s=function(t){if(t.source===Y.IMAGE_BITMAP){const r=t.data,n=new OffscreenCanvas(r.width,r.height).getContext("2d");return n.drawImage(r,0,0,r.width,r.height),n.getImageData(0,0,r.width,r.height).data.buffer}return t.data}(n),o=function*(t,r){const n=new Uint32Array(t),s=Math.ceil(n.length/r);for(let t=0;tt.population)),a={};for(const[r,n]of Object.entries(o)){const s=v(t.filter((t=>!i.has(t.color.toString()))).filter((t=>W(t,n))),(t=>K(t,n,e?.population||1)));null!==s&&(a[r]=s,i.add(s.color.toString()))}const h=z(Object.values(a),r,n,s),u=h?c.fromColor(h.color.contrastAdjust("dark"),1):null,l=h?c.fromColor(h.color.contrastAdjust("light"),1):null;return{dominantSwatch:e,visRefSwatch:h||U,visRefDarkSwatch:u||J,visRefLightSwatch:l||j,visRefIsFallback:null===h,targetSwatches:a}}(i.swatches,i.totalPixels,i.totalColors,i.totalSaturationFromHSV);Q.postMessage([r,{colorRawJson:e.color.stringify(),colorLightJson:h.color.stringify(),colorDarkJson:a.color.stringify()}])}))})();\n',"Worker",void 0,void 0)};let c=0;async function l(t){const r=c++,n=new Promise(((t,n)=>{u.addEventListener("message",(n=>{const[o,i]=n.data;o===r&&t({colorRaw:s.Q.parse(i.colorRawJson),colorDark:s.Q.parse(i.colorDarkJson),colorLight:s.Q.parse(i.colorLightJson)})})),u.addEventListener("error",n)}));return u.postMessage([r,t],[t.data]),await n}async function g(t){let r;try{r=await async function(t){const r=new Image;return r.crossOrigin="anonymous",function(t){const r=0===t.indexOf("spotify:image:"),n=0===t.indexOf("spotify:mosaic:"),s=0===t.indexOf("spotify:localfileimage:");return r||n||s}(t)?r.src=`${o}?uri=${encodeURIComponent(t)}`:r.src=t,await r.decode(),r}(t)}catch(t){return Promise.resolve(h.A)}const n=r.naturalWidth,s=r.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const t=await window.createImageBitmap(r);return await async function(t){return await l({source:i.IMAGE_BITMAP,data:t})}(t)}const e=document.createElement("canvas"),a=e.getContext("2d");return e.width=n,e.height=s,a.drawImage(r,0,0,n,s),await async function(t){return await l({source:i.ARRAY_BUFFER,data:t.data.buffer})}(a.getImageData(0,0,n,s))}}}]); +//# sourceMappingURL=838.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/8676.js b/dot-config/spicetify/Extracted/Raw/xpui/8676.js new file mode 100755 index 00000000..e5153eb7 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/8676.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8676],{98676:(e,r,a)=>{a.d(r,{x:()=>L});const t="playback-bar",s="playback-bar__progress-time-elapsed",o="gglUjikTBtMzCZFgSmpS",n="dN6OLjjcmnuleiECu55A",l="DSdahCi0SDG37V9ZmsGO",i="playback-progressbar-container";var c=a(30758),u=a(97500),g=a.n(u),d=a(95530),p=a(14343),b=a(31417),h=a(27607),x=a(68815),f=a(78505),v=a(62021),m=a(82935);const w="main-playbackBarRemainingTime-container";var y=a(86070);const k=({position:e,duration:r,isPreview:a,semanticColor:t="textSubdued",isFullscreenMode:s=!1,className:o})=>{const[n,l]=(0,v.x)(f.fC,!1),i=(0,c.useCallback)((()=>{a||l(!n)}),[n,l,a]);return(0,y.jsx)(d.E,{as:"div","data-testid":"playback-duration","data-test-position":e,variant:s?"bodyMedium":"marginal",className:g()(w,o),onClick:i,semanticColor:t,children:n?`-${(0,m.f)(r-e)}`:(0,m.f)(r)})};var S=a(77567),C=a(58685),_=a(5805);const M="Bn7RYdPUyzN4qo1bC1Ic",N="OEe8k2xe6o6x9x0FAc4b",j=[{name:"Anakin",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"7px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_anakin.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Luke",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(135, 220, 90)","--blur-glow-color":"#1ed760","--blur-radius":"16px","--spread-radius":"4px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_luke.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Vader",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"10px","--core-color":"white","--edge-glow-color":"rgb(229, 17, 21)","--blur-glow-color":"#cd1a2b","--blur-radius":"20px","--spread-radius":"14px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_vader.png")})`,"--saber-hilt-overlap":"6px"}},{name:"Rey",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"8px","--core-color":"white","--edge-glow-color":"rgb(249, 164, 11)","--blur-glow-color":"rgb(253, 175, 33)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_rey.png")})`,"--saber-hilt-overlap":"3px"}},{name:"Leia",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_leia.png")})`,"--saber-hilt-overlap":"2px"}},{name:"Mace",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(90, 22, 167)","--blur-glow-color":"rgb(172, 57, 193)","--blur-radius":"20px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_mace.png")})`,"--saber-hilt-overlap":"1px"}},{name:"Ahsoka",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"6px","--core-color":"white","--edge-glow-color":"rgb(255,255,255)","--blur-glow-color":"rgb(255,255,255)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_ahsoka1.png")})`,"--saber-hilt-overlap":"-9px","--saber-hilt-width":"100px","--saber-hilt-height":"36px"}}],F=["spotify:playlist:37i9dQZF1DXaUaRhCgtpCo","spotify:playlist:69BOXIItwwyxTgdz6flzvU","spotify:playlist:37i9dQZF1DWUgUvAPAFxdh"],O=["official_star_wars","kirbysayshi","hansencc"],E=/Star Wars/i,z="THX1138",D=z.length;function P({onChange:e}){const r=function(){const[e,r]=(0,c.useState)([]),[a,t]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{const s=s=>{for(e.push(s.key);e.length>D;)e.shift();e.join("")===z&&t(!a),r([...e])};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}}),[e,a]),(0,C.o)((e=>{const r=e?.context.uri??"",a=e?.context?.metadata?.context_owner??"",t=e?.item??void 0;return!!F.includes(r)||!!O.includes(a)||!!(0,_.v)(t)&&(E.test(t.name)||E.test(t.album.name))}))||a}(),{next:a,config:t}=function(e){const[r,a]=(0,c.useState)(0);return{next:()=>{a((r+1)%j.length)},config:e?j[r]:null}}(r),s=(0,c.useRef)(e);return s.current=e,(0,c.useEffect)((()=>{s.current(t?.vars??null)}),[t]),t?(0,y.jsx)("div",{className:M,children:(0,y.jsx)("button",{"data-testid":"saber-hilt-button","aria-label":b.Ru.get("playback-control.a11y.lightsaber-hilt-button",t?.name),className:N,style:t.vars,onClick:a})}):null}var A=a(9473),B=a(90813);const I=["spotify:playlist:37i9dQZF1DXc3KPAjGyPdm"];var R=a(38501),T=a(87182),U=a(86931),$=a(43398);const q=1e3,L=({isPreview:e,isFullscreenMode:r=!1,timerPlacement:a="inline",onChange:u,onDragStart:f,onDragEnd:v})=>{const w=(0,p.NC)(R.O14),[S,_]=(0,c.useState)(null),M=(0,T.z)(),N=(0,C.o)((e=>e),((e,r)=>e?.duration===r?.duration&&e?.hasContext===r?.hasContext&&e?.restrictions?.canSeek===r?.restrictions?.canSeek)),{seekBackward:j,seekForward:F,seekOffsetMs:O}=(0,$.p)(),E=N?.duration??0,z=N?.hasContext??!1,D=N?.restrictions?.canSeek??!1,[L,X,Z]=(0,U.S)(q),[Q,V]=(0,c.useState)(null),W=null!==Q?Q:L,G=null!==Q?Q:L+(w&&!Z?q:0),H=e=>{V(e*E),f?.()},K=(W>0||E>0)&&"true"!==N?.item?.metadata?.is_narration,Y=(0,m.f)(K?W:NaN),J=(0,m.f)(K?E:NaN),ee=function(){const e=(0,B.S)()!==A.z.CLOSED,r=(0,C.o)((e=>{const r=e?.context.uri??"";return I.includes(r)}));return!e&&r}(),re=(0,x.O)(),ae="above"===a?n:o;return(0,y.jsxs)("div",{className:g()(t,ae),children:["indicatorOnly"!==a&&(0,y.jsx)(d.E,{"data-testid":"playback-position",as:"div",variant:r?"bodyMedium":"marginal",className:s,semanticColor:r?"textBase":"textSubdued",children:Y}),(0,y.jsxs)("div",{className:i,children:[z?(0,y.jsx)(P,{onChange:e=>{_(e)}}):null,(0,y.jsx)(h.z2,{labelText:b.Ru.get("playback-control.a11y.seek-slider-button"),value:G,updateFrequency:q,offFrequencyUpdate:Z,max:E,step:O,"aria-valuetext":b.Ru.get("download.progress-global",Y,J),isInteractive:z&&K,onDragStart:H,onDragMove:H,onDragEnd:(e,{wasDraggedBeforeReleased:r})=>{if(V(null),v?.(),!D)return;const a=e*E;X(a),M.seekTo(a);const t=r?"drag":"hit";u?.(a,t)},onStepBackward:()=>{if(!D)return;const e=j();X(Math.max(0,Math.min(E,L-e)))},onStepForward:()=>{if(!D)return;const e=F();X(Math.max(0,Math.min(E,L+e)))},saberConfig:S,isPlayingStrangerThings:ee,isAttackOnTitanEasterEggActive:re,"data-testid":"playback-progressbar",enableAnimation:w,showValueAsTimeOverHandle:"indicatorOnly"===a})]}),"indicatorOnly"!==a&&(0,y.jsx)(k,{position:W,duration:K?E:NaN,isPreview:e,semanticColor:r?"textBase":"textSubdued",isFullscreenMode:r,className:l})]})}},9473:(e,r,a)=>{a.d(r,{z:()=>t.z});var t=a(1961)},90813:(e,r,a)=>{a.d(r,{S:()=>t.S});var t=a(19732)}}]); +//# sourceMappingURL=8676.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/8858.js b/dot-config/spicetify/Extracted/Raw/xpui/8858.js new file mode 100755 index 00000000..ac4e1adc --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/8858.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8858],{64652:(e,t,a)=>{a.d(t,{A:()=>m});var i=a(30758),n=a(99623),s=a(14343),r=a(17429),l=a(68750),o=a(555),c=a(29195),d=a(38501),u=a(1599);const m=function(e){const[t,a]=(0,i.useState)(),[m,h]=(0,i.useState)(!1),g=(0,c.vh)(),p=(0,s.NC)(d.SAn,{loadingValue:!1});return{data:t,error:m,getLeavebehinds:(0,i.useCallback)((async()=>{try{const t=await r.b6(u.n.getInstance(),(0,l.Fh)(e.surface),e.uri,e.playlistName,p);a(t.body)}catch(t){const a=t;g.send((0,n.G)({error_type:"fetchAdsFailure",error_message:a.name,http_error_code:a.status,surface:(0,l.Fh)(e.surface),request_type:"leavebehindAds",ad_content_origin:(0,o.Zl)(e.surface)})),h(!0)}}),[g,e.playlistName,e.surface,e.uri,p])}}},75040:(e,t,a)=>{a.d(t,{k:()=>d});var i=a(30758),n=a(31417),s=a(57239),r=a(89402),l=a(36025),o=a(7971),c=a(86070);const d=({id:e,children:t,targetURI:a,fadeOut:d=!1})=>{const u=(0,i.useCallback)((()=>{window.open((0,l.rw)(a).href)}),[a]),m={getTitle:()=>n.Ru.get("action-trigger.available-in-app-only"),getDescription:()=>n.Ru.get("action-trigger.listen-mixed-media-episode"),primaryButtonText:()=>n.Ru.get("action-trigger.button.get-app"),secondaryButtonText:()=>n.Ru.get("action-trigger.button.not-now"),isCTA:!0,intentPrimaryButton:"download-app",onLogInteraction:(0,r.W)(),shouldHideOnScroll:!0,fadeOut:d};return(0,c.jsx)(s.U,{className:o.A.container,id:e,onPrimaryButtonClick:u,options:m,children:t})}},87018:(e,t,a)=>{a.d(t,{X:()=>l});var i=a(97500),n=a.n(i),s=a(55760),r=a(86070);const l=({children:e})=>(0,r.jsx)("div",{className:n()(s.A.imageContainer,s.A.imageContainerNew),children:e})},2070:(e,t,a)=>{a.d(t,{B:()=>r});var i=a(95530),n=a(55760),s=a(86070);const r=({children:e})=>(0,s.jsx)(i.E,{variant:"bodySmall",className:n.A.pretitle,children:e})},1227:(e,t,a)=>{a.d(t,{g:()=>l});var i=a(95530),n=a(98712),s=a(51354),r=a(86070);const l=({children:e,className:t})=>{const a=(0,s.y)()===n.E.SMALL?"bodyMediumBold":"titleSmall";return(0,r.jsx)(i.E,{variant:a,"data-testid":"entityAuthor",className:t,children:e})}},13922:(e,t,a)=>{a.d(t,{N:()=>y});var i=a(30758),n=a(95530),s=a(31417),r=a(48896),l=a(86070);const o=i.memo((function({text:e,onTimeStampClick:t,children:a,className:s,enableTimestamps:o=!1}){const c=(0,i.useMemo)((()=>(0,l.jsx)(r.q,{html:e,onTimeStampClick:t,enableTimestamps:o})),[e,o,t]);return(0,l.jsxs)(n.E,{as:"div",variant:"bodyMedium",className:s,children:[c,a]})})),c="show-show-moreButton",d=(0,i.memo)((function({text:e,onTimeStampClick:t,onToggle:a,className:i,enableTimestamps:r}){return(0,l.jsx)(o,{className:i,text:e,onTimeStampClick:t,enableTimestamps:r,children:(0,l.jsx)("button",{"aria-expanded":!1,className:c,onClick:a,children:(0,l.jsxs)(n.E,{variant:"bodyMediumBold",children:["… ",s.Ru.get("show_more")]})})})})),u=(e,t,a)=>{const i=s.Ru.get("show_more").length,n=e.length+i+6;return a<=1&&n{const f=Math.round(g.length/a);if(h+=f>0?f:1,m)return null;const x=i-(h-f);if(!(p+1===e.length&&(u(g,a,x)||f<=x))&&h>=i){m=!0;const e=((e,t,a)=>{const i=s.Ru.get("show_more").length;if(u(e,t,a))return e;const n=t*a-i-6;return e.slice(0,n)})(g,a,x);return(0,l.jsx)(d,{text:e,onTimeStampClick:t,onToggle:n,className:r,enableTimestamps:c},p)}return(0,l.jsx)(o,{className:r,text:g,onTimeStampClick:t,enableTimestamps:c},p)})).filter((e=>null!==e)).map(((e,t,a)=>t+1===a.length?e:[e," "])).flat();return(0,l.jsx)(l.Fragment,{children:g})}));var h=a(42878);const g="TQXhY8PT8v1vogxO85c_",p="RKzJftL6TOVUXkXOPykT",f="mCKPqUiNNAO6GM3nRBXe",x=(e,t)=>({...e,...t}),b=(e="")=>e.split(/[ \u00a0]{2}/).filter(Boolean),v=(e="")=>e.replace("

","").split(/(?:<\/p>)/).filter(Boolean),y=(0,i.memo)((function({content:e,htmlContent:t,maxLines:a=2,className:c,onTimeStampClick:d=(()=>{}),onExpanded:u,enableTimestamps:y=!1,enableAutomaticLinkification:j=!1,isOpen:C=null}){const[N,_]=(0,i.useReducer)(x,(e=>({isOpen:e,contentWidth:0}))(C)),{isOpen:k,contentWidth:T}=N,S=(0,i.useRef)(null),E=(0,i.useRef)(!0),w=(0,i.useCallback)((()=>{_({isOpen:!k}),u&&u(!k)}),[k,u]);(0,i.useEffect)((()=>{_({isOpen:C})}),[e,C]),(0,i.useEffect)((()=>{null!==N.isOpen&&(E.current?E.current=!1:S.current?.querySelector("button[aria-expanded]")?.focus())}),[N.isOpen]);const A=T?T/7.8:Number.MAX_VALUE,R=(0,i.useCallback)((e=>{e&&(S.current=e,_({contentWidth:e.clientWidth}))}),[]),P=(0,i.useMemo)((()=>t?v(t).map((e=>(0,l.jsx)(r.q,{html:e,onTimeStampClick:d,enableTimestamps:y,enableAutomaticLinkification:j},e))):((e,t,a)=>b(e).map(((e,i)=>(0,l.jsx)(o,{className:p,text:e,onTimeStampClick:t,enableTimestamps:a},i))))(e,d,y)),[e,y,j,t,d]),L=(0,i.useMemo)((()=>t?v(t):b(e)),[e,t]);return(0,h.s)((()=>{S.current&&_({contentWidth:S.current.clientWidth})})),(0,l.jsx)("div",{className:c,children:(0,l.jsxs)("div",{ref:R,className:g,children:[k&&(0,l.jsxs)(l.Fragment,{children:[P,(0,l.jsx)("button",{"aria-expanded":!0,className:f,onClick:w,children:(0,l.jsx)(n.E,{variant:"bodyMediumBold",children:s.Ru.get("show_less")})})]}),!k&&(0,l.jsx)(m,{className:p,paragraphs:L,clickHandler:d,enableTimestamps:y,maxCharactersPerLine:A,maxLines:a,toggleExpandedState:w})]})})}))},48896:(e,t,a)=>{a.d(t,{q:()=>c});var i=a(30758),n=a(97500),s=a.n(n),r=a(38702),l=a(87794),o=a(86070);const c=i.memo(i.forwardRef((function({html:e,onTimeStampClick:t,enableTimestamps:a=!1,enableAutomaticLinkification:n=!1,semanticColor:c="textSubdued",className:d,asTextContent:u=!1},m){const h=(0,i.useMemo)((()=>(0,r.v)(e,t,a,c,n,u)),[a,n,e,t,c,u]);return(0,o.jsx)("div",{ref:m,className:s()(l.A.HTMLDescription,d),children:h})})))},38702:(e,t,a)=>{a.d(t,{v:()=>f});var i=a(30758),n=a(6936),s=a.n(n),r=a(95530);const l=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var o=a(21082),c=a(86070);const d=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,u=/^https?:\/\//;function m(e){return"string"==typeof e?(0,c.jsx)(c.Fragment,{children:e.split(d).map(((e,t)=>t%2?(0,c.jsx)(o.N,{to:`${u.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}var h=a(74786),g=a(87794);const p=(e=(()=>{}),t,a,n)=>{let s=0;const l={_:(e,t,r)=>{const l=void 0===t?e:r;return(0,c.jsx)(i.Fragment,{children:a&&!n?m(l):l},"fragment"+s++)}};if(n)return l;return{...l,p:e=>(0,c.jsx)(r.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:g.A.Paragraph,children:a?m(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,c.jsx)(h.D,{onClick:e,children:t.children}):t.href?(0,c.jsx)(o.N,{to:t.href,children:t.children}):(0,c.jsx)(c.Fragment,{children:t.children}),ul:e=>(0,c.jsx)("ul",{className:g.A.List,children:e.children}),ol:e=>(0,c.jsx)("ol",{className:g.A.List,children:e.children}),li:e=>(0,c.jsx)(r.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:g.A.ListItem,children:a?m(e.children):e.children}),br:()=>(0,c.jsx)("br",{}),h1:e=>(0,c.jsx)(r.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h2:e=>(0,c.jsx)(r.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h3:e=>(0,c.jsx)(r.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h4:e=>(0,c.jsx)(r.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h5:e=>(0,c.jsx)(r.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h6:e=>(0,c.jsx)(r.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),time:t=>(0,c.jsx)(h.D,{onClick:e,children:t.children})}},f=(e,t=(()=>{}),a=!1,i="textSubdued",n=!1,r=!1)=>{const o=a?e.split(l).map((e=>e.match(l)?`()`:e)).join(""):e;let c;try{c=s()(o,{transform:p(t,i,n,r),dangerouslySetChildren:[]})}catch{c=e}return c}},14409:(e,t,a)=>{a.d(t,{x:()=>l});var i=a(99701),n=a(64281);const s="BO7X8b8_SQhDyCjS0EOv";var r=a(86070);const l=({gatedEntityRelations:e})=>{if(!e)return!1;const t=e?.entitiesWithValueProps?.at(0),a=t?.valueProps.at(0)?.displayText,l=t?.summary?.forUserWithoutAccess;if(!a||!t)return null;const o=(0,r.jsx)(n.E,{text:a,className:s});return l?(0,r.jsx)(i.Zp,{label:l||a,children:o}):o}},99730:(e,t,a)=>{a.d(t,{P:()=>m});var i=a(14343),n=a(14409),s=a(45807),r=a(38501),l=a(99041),o=a(54003),c=a(18663),d=a(15838),u=a(86070);const m=({episode:e})=>{const t=(0,i.NC)(r.MCN,{loadingValue:!1}),{badges:a}=(0,d.b)((e=>"contentRating"in e)(e)?{contentRating:e?.contentRating?.label,isPaywalled:e.podcastSubscription?.isPaywalled}:{isExplicit:e?.isExplicit,isMOGEFRestricted:e?.is19PlusOnly,isPaywalled:e.podcastSubscription?.isPaywalled}),m=e.gatedEntityRelations&&e.gatedEntityRelations.entitiesWithValueProps.at(0),h=t&&(0,s.B)(m,e);return(0,u.jsxs)(u.Fragment,{children:[a.explicit&&(0,u.jsx)(l.U,{}),h?(0,u.jsx)(n.x,{gatedEntityRelations:e.gatedEntityRelations}):a.paid&&(0,u.jsx)(o.y,{}),a.nineteen&&(0,u.jsx)(c.q,{size:16})]})}},62814:(e,t,a)=>{a.d(t,{q:()=>v});var i=a(85387),n=a(97848),s=a(23041),r=a(79871),l=a(81670),o=a(86677),c=a(96250),d=a(14343),u=a(51747),m=a(22726),h=a(38501),g=a(32255),p=a(21549),f=a(7307);const x="_WHBoDpH7mFsuuTElglC";var b=a(86070);const v=({className:e,showCoverArt:t,gatedEntityCoverArt:a,gatedEntityRelations:v,upsellExplanation:y,hasAccess:j,showValueProps:C=!0})=>{const N=(0,d.NC)(h.MCN,{loadingValue:!1}),{spec:_,logger:k}=(0,p.r)(u.L,{}),T=(0,i.Zp)(),S=v?.entitiesWithValueProps.at(0);if(!N||!S?.summary||!y)return null;const{uri:E,valueProps:w,summary:A,fallbackNavigation:R}=S,P=0===w.length;let L,M,O,B=!1;if(j){if(!A.forUserWithAccess||P)return null;L=A.forUserWithAccess,O=(0,m.o_h)(E)?.toURLPath(!0)}else{if(!R&&P)return null;if(R)L=R.description,O=(0,m.o_h)(R.uri)?.toURLPath(!0);else{L=A.forUserWithoutAccess;M=C&&w.length>1?w.map((({displayText:e})=>e)):null,B=!0}}return(0,b.jsx)(n.v,{id:E,variant:"tinted","data-testid":"gated-podcast-banner",className:e,leading:Boolean(t)?(0,b.jsx)(g.b,{images:a||[],shape:g.u.ROUNDED_CORNERS,type:f.c.SHOW,title:L,className:x}):void 0,title:(0,b.jsx)(s.d,{lineClamp:2,children:L}),subtitle:M&&(0,b.jsx)(r.j,{hasTextSeparator:!0,lineClamp:2,children:M}),...O?{onClick:()=>{T(O),k.logInteraction(_.fallbackNavigationRowFactory().hitUiNavigate({destination:O}))},trailing:(0,b.jsx)(l.V,{size:"small",semanticColor:"textSubdued"})}:{trailing:B?(0,b.jsx)(o.$,{size:"small",iconLeading:c.H,href:y.url,target:"_blank",onClick:()=>{k.logInteraction(_.upsellButtonFactory().hitNavigateToExternalUri({destination:y.url}))},children:y.cta}):null}})}},45807:(e,t,a)=>{a.d(t,{B:()=>i,v:()=>n});const i=(e,t)=>!!e&&e.uri===t.uri,n=(e,t)=>!!e&&e.entitiesWithValueProps.at(0)?.uri===t},12755:(e,t,a)=>{a.d(t,{u:()=>r});var i=a(30758),n=a(95365),s=a(86070);const r=({pageId:e,uri:t,children:a})=>{const r=(0,n.u)(),l=(0,n.H)();return(0,i.useEffect)((()=>{r?.reportPageView({pageId:e,navigationalRoot:l??void 0,entityUri:t})}),[e,l,r,t]),(0,s.jsx)(s.Fragment,{children:a})}},44825:(e,t,a)=>{a.d(t,{C:()=>p});var i=a(30758),n=a(14343),s=a(89402),r=a(38501);const l=e=>e<=64?"small":e>640?"xlarge":e>300?"large":"standard";function o(e,t){return e.filter((e=>e.label?e.label===t:e.width?l(e.width)===t:!!e.height&&l(e.height)===t))[0]}var c=a(43798);var d=a(41031);function u(e){const t=o(e,"standard"),a=o(e,"large"),i=o(e,"small"),n=o(e,"xlarge");return{image_url:t?.url,image_height:t?.height?.toString(),image_width:t?.width?.toString(),image_url_large:a?.url,image_height_large:a?.height?.toString(),image_width_large:a?.width?.toString(),image_url_small:i?.url,image_height_small:i?.height?.toString(),image_width_small:i?.width?.toString(),image_url_xlarge:n?.url,image_height_xlarge:n?.height?.toString(),image_width_xlarge:n?.width?.toString()}}var m=a(87182),h=a(2679),g=a(7307);function p(e,t){const a=(0,s.W)(),l=(0,m.z)(),{isPlaying:o,isActive:p}=(0,h.te)(e?.uri||""),{isActive:f}=(0,h.l_)(t?.uri||""),x=(0,n.NC)(r.pZ0);return(0,i.useCallback)((i=>{if(!t||!e)return;const n=function(e,t,a=!1){const i=(e.coverArt?.sources||[]).sort(((e,t)=>(t.width||0)-(e.width||0))),n=(0,c.QH)(e,t),s=(0,c.gf)(t)||n,r=e.mediaTypes&&e.mediaTypes.includes(d.Cx.Video)?"video":"audio";return{uri:e.uri,title:e.name,subtitle:t.name,type:"episode",album_uri:t.uri,album_title:t.name,artist_uri:t.uri,artist_name:t.name,...u(i),media_type:a?r:"audio",isTrailer:n,anonymousPlaybackAllowed:s}}(e,t,x);f&&!o&&p&&!i?l.resume():f&&o&&!i?(a({type:"click",intent:"pause",targetUri:e.uri}),l.pause()):(a({type:"click",intent:"play",targetUri:e.uri}),l.play({uri:t.uri,pages:[{items:[{type:g.c.EPISODE,uri:e.uri,uid:null,metadata:n,provider:null}]}]},{referrerIdentifier:l.getReferrer(),featureIdentifier:"episode"},i))}),[t,e,x,f,o,p,l,a])}},58337:(e,t,a)=>{a.d(t,{H:()=>l});var i=a(30758),n=a(85505),s=a(47095),r=a(37948);function l(e=null,t=n.l0o){const{backgroundColor:a}=(0,s.oI)(),l=(0,s.as)(),o=(0,r.z)(e);return(0,i.useEffect)((()=>(l((0,s.Mo)(o)),()=>{l((0,s.Hf)())})),[o,l]),a||t}},87794:(e,t,a)=>{a.d(t,{A:()=>i});const i={Heading:"playlist-playlist-heading",HTMLDescription:"playlist-playlist-playlistDescription",List:"playlist-playlist-list",ListItem:"playlist-playlist-listItem",Paragraph:"playlist-playlist-paragraph"}}}]); +//# sourceMappingURL=8858.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/8925.js b/dot-config/spicetify/Extracted/Raw/xpui/8925.js new file mode 100755 index 00000000..71f715d4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/8925.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8925],{78925:(e,t,l)=>{l.r(t),l.d(t,{CtaButton:()=>i,default:()=>u});var a=l(30758),n=l(63123),o=l(85505),s=l(86677),c=l(21082),r=l(86070);const i=({"aria-label":e,text:t,onClick:l,clickUrl:i,backgroundColor:u,className:d})=>{const b=(0,a.useMemo)((()=>{if(!u)return;const e=(0,n.mA)(u);return{...e,text:{...e.text,base:o.LLE}}}),[u]);return(0,r.jsx)(c.N,{"aria-label":e||t,className:d,"data-testid":"ad-cta-button",to:i,onClick:e=>{e.stopPropagation(),l()},children:(0,r.jsx)(s.$,{UNSAFE_colorSet:b,colorSet:"invertedLight",size:"small",children:t})})},u=i}}]); +//# sourceMappingURL=8925.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/94.js b/dot-config/spicetify/Extracted/Raw/xpui/94.js new file mode 100755 index 00000000..0005d637 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/94.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[94],{60094:(e,n,t)=>{t.r(n),t.d(n,{default:()=>i});var r=t(62411),a=t(22726),l=t(32411),o=t(89775),s=t(86070);const d=({href:e,adEventReason:n,...t})=>{const a=(0,r.wA)();return(0,s.jsx)("a",{...t,href:e,onClick:()=>{a((0,o.q5)(n))},target:"_blank",rel:"noopener noreferrer",children:t.children})},f=({href:e,adEventReason:n,...t})=>e?(0,s.jsx)(d,{...t,href:e,adEventReason:n}):(0,s.jsx)("div",{...t}),i=({item:e,adEventReason:n,...t})=>(0,s.jsx)(f,{...t,adEventReason:n,"data-testid":"context-link","data-context-item-type":e.type,style:{border:"none"},href:(n=>{if(n)return(0,a.o_h)(n)?e.url?(0,l.H)(e.url):void 0:n})(e.url)})}}]); +//# sourceMappingURL=94.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/9512.js b/dot-config/spicetify/Extracted/Raw/xpui/9512.js new file mode 100755 index 00000000..d3361eac --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/9512.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9512],{6904:(e,t,n)=>{n.d(t,{A:()=>u});var s=n(30758),a=n(97500),i=n.n(a),r=n(22726),o=n(75411),l=n(86070);const c="div";class d extends s.Component{constructor(e){super(e),this.state={isDropTargetActive:!1},this.enterEventCount=0,this.leaveEventCount=0}componentDidMount(){document.body.addEventListener("dragend",this.handleDragEnd)}shouldComponentUpdate(e,t){return t.isDropTargetActive!==this.state.isDropTargetActive||e.children!==this.props.children||e.onDragEnter!==this.props.onDragEnter||e.onDragLeave!==this.props.onDragLeave||e.onDrop!==this.props.onDrop||e.types.length!==this.props.types.length||e.types.some(((e,t)=>e!==this.props.types[t]))}componentWillUnmount(){document.body.removeEventListener("dragend",this.handleDragEnd)}handleDragOver=e=>{this.getMatchingMimeTypes(e).length>0&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")};handleDragEnter=e=>{this.enterEventCount&&!e.relatedTarget||(this.enterEventCount++,1===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.props.onDragEnter?.(e),this.setState({isDropTargetActive:!0})))};handleDragLeave=e=>{this.leaveEventCount++,this.leaveEventCount===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.enterEventCount=0,this.leaveEventCount=0,this.props.onDragLeave?.(e),this.setState({isDropTargetActive:!1}))};handleDragEnd=()=>{this.enterEventCount=0,this.leaveEventCount=0};handleDrop=e=>{if(0===this.getMatchingMimeTypes(e).length)return;const{onDragLeave:t,onDrop:n}=this.props,s=this.getMatchingDropData(e);this.enterEventCount=0,this.leaveEventCount=0;const a=e.defaultPrevented;e.preventDefault(),t?.(e),a||n(e,s),this.setState({isDropTargetActive:!1})};getMatchingMimeTypes(e){const t=this.props.types;return Array.from(e.dataTransfer.types).filter((e=>t.includes(e)))}getMatchingDropData(e){const t=this.getMatchingMimeTypes(e),n={};t.forEach((t=>{const s=e.dataTransfer.getData(t),a=0===t.indexOf("text/x-spotify"),i=a?s.split("\n"):[s];n[t]=i.map((e=>{if(a){const t=(0,r.o_h)(e);if(t)return t.toURI()}return e})).filter((e=>!!e))}));const s=e.dataTransfer.getData("text/plain");return n.all=s?s.split("\n").map((e=>{const t=(0,r.o_h)(e);return t?t.toURI():e})):[],n}render(){const{types:e=[],as:t=c,testId:n,className:s=""}=this.props,a=t,r=e.filter(Boolean).map((e=>`GlueDropTarget--${e.replace("text/x-spotify-","")}`));return(0,l.jsx)(a,{className:i()("GlueDropTarget",r,{"GlueDropTarget--active":this.state.isDropTargetActive},s),onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onContextMenu:this.props.onContextMenu,"data-testid":n,children:this.props.children})}}const u=e=>{const{supportsDragAndDrop:t}=(0,o._)();if(!t){const t=e.as??c;return(0,l.jsx)(t,{children:e.children})}return(0,l.jsx)(d,{...e})}},30536:(e,t,n)=>{n.d(t,{s:()=>i});var s=n(95530),a=n(86070);const i=({variant:e})=>(0,a.jsx)(s.E,{variant:e,semanticColor:"textBase",children:"Spotify"})},91127:(e,t,n)=>{n.d(t,{R:()=>d});var s=n(30758),a=n(62411),i=n(22726),r=n(2963),o=n(6904),l=n(27012),c=n(86070);const d=({uri:e,owner:t,children:n})=>{const d=(0,a.wA)(),u=(0,a.d4)((e=>e.session.user?.id)),m=(0,i.tbX)(e),p=(0,s.useCallback)(((t,n)=>{const s=[...n[l.O[i.NQG.ALBUM]]||[],...n[l.O[i.NQG.TRACK]]||[],...n[l.O[i.NQG.LOCAL_TRACK]]||[],...n[l.O[i.NQG.EPISODE]]||[]];s.length>0&&d((0,r.io)(e,s))}),[d,e]);return m&&t===u?(0,c.jsx)(o.A,{types:[l.O[i.NQG.ALBUM],l.O[i.NQG.TRACK],l.O[i.NQG.EPISODE],l.O[i.NQG.LOCAL]],onDrop:p,testId:"cover-drop-target",children:n}):(0,c.jsx)(c.Fragment,{children:n})}},4041:(e,t,n)=>{n.d(t,{a:()=>h});var s=n(30758),a=n(97500),i=n.n(a),r=n(31417),o=n(64143),l=n(29543),c=n(53133),d=n(60384),u=n(61451),m=n(5805),p=n(86070);const h=({context:e,item:t,className:n,onClick:a=(()=>{})})=>{const{dislikeEndpoint:h,shouldShowFeedbackControls:g}=(0,l.d)(e),{enqueueSnackbar:v}=(0,c.d)(),x=e.metadata?.[u.W.CONTEXT_DESCRIPTION]??"",{setDislikeFeedback:f}=(0,d.I)({uri:t.uri,setFeedbackPath:h,contextUri:e.uri}),y=(0,s.useCallback)((async()=>{f(),v(r.Ru.get("feedback.hide-song",x)),a?.()}),[f,v,x,a]);return(0,m.v)(t)&&g?(0,p.jsx)(o.O,{className:i()(n,{"control-button":!n,"control-button-feedback":!n}),isDisliked:!1,onClick:y}):null}},68599:(e,t,n)=>{n.d(t,{g:()=>h});var s=n(30758),a=n(97500),i=n.n(a),r=n(95530),o=n(31417),l=n(41616);const c="w0kwPDoelauN3C9dVoVe",d="xzLZD9uD3b4u9wecXAJY",u="DaFhhSm73r7rNpomErhI";var m=n(86070);const p=({children:e})=>(0,m.jsx)(m.Fragment,{children:e}),h=(0,s.forwardRef)((function({users:e,maxSlots:t=3,size:n,withoutOverflowBadge:s=!1,dropShadow:a=!1,AvatarWrapper:h=p},g){const v=Math.max(2,t),x=e.length>v?e.length-v+1:0,f=e.slice(0,v),{userIconSize:y,width:b,smallFontSize:D,largeFontSize:C}=(e=>{switch(e){case"xxlarge":return{userIconSize:"xlarge",width:64,smallFontSize:24,largeFontSize:32};case"xlarge":return{userIconSize:"large",width:48,smallFontSize:18,largeFontSize:24};case"large":return{userIconSize:"medium",width:32,smallFontSize:12,largeFontSize:16};case"medium":default:return{userIconSize:"small",width:24,smallFontSize:9,largeFontSize:12};case"small":return{userIconSize:"xsmall",width:18,smallFontSize:8,largeFontSize:10}}})(n),E=x>9?D:C,S=(0,m.jsx)("span",{className:i()(d,"encore-inverted-light-set"),style:{width:b,height:b},role:"presentation",children:(0,m.jsx)(r.E,{variant:"bodySmallBold",style:{fontSize:E},semanticColor:"textBase",children:`+${x}`})});return(0,m.jsx)("div",{className:i()(c),ref:g,children:f.map(((e,t)=>!s&&x>0&&t===v-1?(0,m.jsx)(h,{index:t,children:(0,m.jsx)(l.e,{images:[],userIconSize:y,label:o.Ru.get("web-player.social-connect.facepile.and-others",x),width:b,piled:!0,customPlaceholder:S})},"others"):(0,m.jsx)(h,{index:t,user:e,children:(0,m.jsx)(l.e,{images:e.images,userIconSize:y,label:e.displayName,displayName:e.displayName,username:e.username,width:b,piled:t>0,imageClassName:a?u:void 0})},e.displayName)))})}))},57969:(e,t,n)=>{n.d(t,{g:()=>c});var s=n(30758),a=n(92443),i=n(76730),r=n(25016),o=n(82662),l=n(53481);function c(){const e=(0,r.V)(),t=(0,l.u)(),[n,c]=(0,s.useState)(null),d=(0,s.useCallback)((async()=>{const n=e.getDefaultDevice();if(null===n)return void c(null);if(n.transportType!==a.Yg.BLUETOOTH)return void c({audioDevice:n});const s=await t.lookup(n.name);c({audioDevice:n,externalAccessory:s})}),[e,t]);return(0,o.k)(i.B.DEVICE_CONNECTED,d),(0,s.useEffect)((()=>{d()}),[d]),n}},31233:(e,t,n)=>{n.d(t,{l:()=>c});var s=n(14343),a=n(82921),i=n(79237),r=n(62642),o=n(43329);const l={id:"",connectStateId:"",name:"",type:r.bq.COMPUTER,isGroup:!1,isLocal:!0,isActive:!0,isConnecting:!1,isDisabled:!1,volume:0,losslessSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1},supportsLogout:!1,supportedMediaTypes:null},c=()=>{const e=(0,s.NC)(o.vF),t=(0,a.Z)(),{activeDevice:n,devices:r}=(0,i.v)((n=>({activeDevice:e?t.getActiveDevice():n.activeDevice,devices:e?t.getDevices():n.devices})));return{currentDevice:n??l,devices:r}}},29839:(e,t,n)=>{n.d(t,{r:()=>h});var s=n(30758),a=n(62411),i=n(10495),r=n(30631),o=n(28874),l=n(40339),c=n(53328),d=n(8428),u=n(62844),m=n(47756),p=n(92333);function h(){const e=(0,a.d4)(o.u),t=(0,a.wA)(),{setYlxSidebarState:n}=(0,u.sy)(),{mainLandmarkRef:h,lyricsCinemaRef:g}=(0,i.JT)(),{isActive:v,panelSend:x}=(0,l.AI)(d.Z.NowPlayingView);return{mode:e,setMode:(0,s.useCallback)((e=>{e===m.YU.cinema&&v?(g.current?.classList.add(p.A.lyricsCinemaVisible),h.current?.classList.add(p.A.nonDisplayedArea),n(u.fX.COLLAPSED),x(c.$S.NPV_BUTTON_CLICK)):(g.current?.classList.remove(p.A.lyricsCinemaVisible),h.current?.classList.remove(p.A.nonDisplayedArea),v||x(c.$S.NPV_BUTTON_CLICK)),t((0,r.gh)(e))}),[t,x,v,g,h,n])}}},20675:(e,t,n)=>{n.d(t,{P:()=>u,X:()=>d});var s=n(31417),a=n(75497),i=n(13947),r=n(45627),o=n(5805),l=n(4861),c=n(85907);function d(e){return(0,o.v)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.artists.map((({name:e})=>e)).join(s.Ru.getSeparator())):(0,r.p)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.show.name):(0,i.d)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.book.name):(0,a.N)(e)?s.Ru.get("ad-formats.advertisement"):(0,l.v)(e)?void 0:(0,c.d)(e)}function u(e){let t=d(e);return t||(t=s.Ru.get("queue.now-playing")),t}},29543:(e,t,n)=>{n.d(t,{d:()=>s});const s=e=>{const t=e?.metadata?.["dislike-endpoint"]??null;return{dislikeEndpoint:t,shouldShowFeedbackControls:"1"===e?.metadata?.["dislike-feedback-available"]&&null!==t}}},20883:(e,t,n)=>{n.d(t,{e:()=>g});var s=n(30758),a=n(21082),i=n(85425),r=n(20675),o=n(75497),l=n(13947),c=n(45627),d=n(5805),u=n(4861),m=n(85907),p=n(86070);const h=(0,s.lazy)((()=>n.e(94).then(n.bind(n,60094)))),g=({context:e,index:t,item:n,isVisible:g,children:v,className:x,referrer:f,onClick:y,adEventReason:b})=>{const D=(0,r.P)(n),C=n.type,E=g?void 0:-1;if((0,d.v)(n)||(0,c.p)(n)||(0,l.d)(n)){const s=(0,i.O)(e,n,t);return s?(0,p.jsx)(a.N,{className:x,referrer:f,"data-testid":"context-link","data-context-item-type":C,style:{border:"none"},to:s.to,search:s.search,"aria-label":D,tabIndex:E,onClick:y,children:v}):(0,p.jsx)(p.Fragment,{children:v})}return(0,o.N)(n)?(0,p.jsx)(s.Suspense,{fallback:(0,p.jsx)(p.Fragment,{children:v}),children:(0,p.jsx)(h,{item:n,"aria-label":D,tabIndex:E,adEventReason:b,children:v})}):(0,u.v)(n)?(0,p.jsx)(p.Fragment,{children:v}):(0,m.d)(n)}},49885:(e,t,n)=>{n.d(t,{j:()=>m});var s=n(30758),a=n(16273),i=n(50486),r=n(92443),o=n(43013),l=n(23805),c=n(89133),d=n(11388);const u={headphoneDevice:null,audioDevice:null,predictedState:null,isOnboarded:!1,currentState:{externalizationEnabled:!1,specificEnabled:!1},contentRestrictions:{specificRestricted:!1,externalizationRestricted:!1,processingCapabilitiesRestricted:!1},toggleTuneHeadphones:null,toggleTuneStudio:null,setFilterState:()=>Promise.resolve()},m=()=>{const e=(0,l.N)(),t=(0,a.jE)(),n=(0,o.l)(),m=(0,s.useMemo)((()=>["puffin-current-device"]),[]),{data:p,isLoading:h,isError:g}=(0,i.I)({queryKey:m,queryFn:async()=>await e.getFilterState(),gcTime:5e3,staleTime:5e3});var v;return v=()=>{t.invalidateQueries({queryKey:m})},(0,d.G)(c.n.UPDATE,v),{deviceFilterState:!n&&p||u,isMaybeHeadphoneDevice:(0,r.lS)(p?.audioDevice),isLoading:h,isError:g}}},15645:(e,t,n)=>{n.d(t,{o:()=>r});var s=n(30758),a=n(49885),i=n(62021);const r=()=>{const{deviceFilterState:e}=(0,a.j)(),t=(0,s.useMemo)((()=>e.audioDevice?.id),[e.audioDevice?.id]),[n,r]=(0,i.x)("onboarding-dismissed:puffin",{}),o=(0,s.useCallback)((()=>{t&&r({...n,[t]:(n[t]??0)+1})}),[t,n,r]);return{isDeviceDismissed:(0,s.useMemo)((()=>!!t&&n[t]>=3),[t,n]),incrementDismissCountForDevice:o}}},16514:(e,t,n)=>{n.d(t,{o:()=>w});var s=n(30758),a=n(97500),i=n.n(a),r=n(65503),o=n(52898),l=n(41562),c=n(14503),d=n(22726),u=n(31417),m=n(99701),p=n(38165),h=n(98712),g=n(51354),v=n(608),x=n(11893),f=n(33329),y=n(21549);const b="VcqCvLW71lZT4kqnCgt0";var D=n(86070);const C=({contextUri:e="",uri:t,id:n=t,className:a,canAdd:d})=>{const{description:x}=(0,v.f)(),C=(0,f.s)(),{spec:E}=(0,y.r)(c.A,{data:{uri:e}}),S=(0,s.useCallback)((()=>{C.logInteraction(E.undoButtonFactory({uri:t}).hitUiHide())}),[C,E,t]),w=(0,s.useCallback)((()=>{C.logInteraction(E.removeRecommendationButtonFactory({uri:t}).hitRemoveRecommendation({recommendedItemUri:t,contextUri:e}))}),[e,C,E,t]),A=(0,s.useCallback)((()=>{C.logInteraction(E.addRecommendationButtonFactory({uri:t}).hitAddToPlaylist({playlist:e,itemToBeAdded:t}))}),[e,C,E,t]),{removeRecommendation:N,addRecommendation:k,canRemoveRecommendation:R,canAddRecommendation:T}=(0,p.t)({uri:t,uid:n,contextUri:e,onUndo:S,onRemoveRecommendation:w,onAddRecommendation:A}),F=(0,s.useCallback)((()=>x?u.Ru.get("web-player.smart-shuffle.add-to-playlist-button",x):u.Ru.get("web-player.smart-shuffle.add-to-playlist-button-fallback")),[x]),I=(0,g.y)();return(0,D.jsxs)("div",{className:i()(b,a),children:[R&&(0,D.jsx)(m.Zp,{label:u.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),children:(0,D.jsx)(r.H,{onClick:N,iconOnly:o.P,size:I===h.E.MEDIUM?"medium":"small","aria-label":u.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),condensedAll:!0})}),d&&T&&(0,D.jsx)(m.Zp,{label:F(),children:(0,D.jsx)(r.H,{onClick:k,iconOnly:l.P,size:I===h.E.MEDIUM?"medium":"small","aria-label":F(),condensedAll:!0})})]})},E=e=>{const t=(0,x.J)(e.contextUri);return(0,D.jsx)(C,{...e,canAdd:t?.canAdd??!1})},S=e=>(0,D.jsx)(C,{...e,canAdd:!0}),w=e=>e.contextUri&&(0,d.tbX)(e.contextUri)?(0,D.jsx)(E,{...e,contextUri:e.contextUri}):e.contextUri&&(0,d.Z0m)(e.contextUri)?(0,D.jsx)(S,{...e,contextUri:e.contextUri}):(0,D.jsx)(C,{...e,canAdd:!1})},64333:(e,t,n)=>{n.d(t,{c:()=>i,t:()=>r});var s=n(22726);const a=e=>({url:e}),i=e=>{const t=[];return e.largeImageUrl?t.push(a(e.largeImageUrl)):e.imageUrl&&t.push(a(e.imageUrl)),{displayName:e.displayName,images:t,username:e.username,uri:(0,s.Qjr)(e.username).toURI()}},r=(e,t,n)=>{const s=[],a=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId));a&&s.push(a);const r=e.isSessionOwner?void 0:e?.sessionMembers.find((({username:e})=>e===t));r&&(n?.userFirst?s.unshift(r):s.push(r));const o=e.sessionMembers.filter((({username:n,id:s})=>s!==e.sessionOwnerId&&n!==t));return[...s,...o].map(i)}},45836:(e,t,n)=>{n.d(t,{K:()=>f});var s=n(30758),a=n(62411),i=n(65238),r=n(95530),o=n(31417),l=n(75610),c=n(68599),d=n(64333),u=n(83123),m=n(22726),p=n(21549);var h=n(69693);const g="UWuPbrFbZar0lIcBFH31",v="wFkvSGFYuw6rhfwWWYWC";var x=n(86070);const f=()=>{const{currentSession:e}=(0,h.D)(),t=(0,a.d4)((({session:e})=>e.user?.id)),{logJamNameClick:n}=(()=>{const{spec:e,logger:t}=(0,p.r)(u.V,{});return{logJamNameClick:(0,s.useCallback)((()=>{const n=e.jamNameFactory().hitUiNavigate({destination:(0,m.K72)().toURI()});t.logInteraction(n)}),[t,e])}})(),{openQueue:f}=(0,l.R)(),y=(0,s.useCallback)((()=>{n(),f()}),[n,f]);if(!e?.active)return null;const b=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId)),D=(0,d.t)(e,t,{userFirst:!0});return(0,x.jsxs)("div",{className:g,children:[(0,x.jsx)(c.g,{users:D,dropShadow:!0,size:"small"}),(0,x.jsx)(i.Y,{className:v,onClick:y,semanticColor:"textBase",tabIndex:0,standalone:!0,children:(0,x.jsx)(r.E,{variant:"bodySmallBold",children:o.Ru.get("web-player.social-connect.session-info.title",{host:b?.displayName??""})})})]})}},20916:(e,t,n)=>{n.d(t,{v:()=>i});var s=n(23805),a=n(65292);const i=()=>{const e=(0,s.N)(),t="1"===(0,a.$)("is-puffin");return e.isAvailable()&&t}},11388:(e,t,n)=>{n.d(t,{G:()=>i});var s=n(30758),a=n(23805);function i(e,t){const n=(0,s.useRef)(t),i=(0,a.N)();n.current=t,(0,s.useEffect)((()=>{const t=i.getFiltersEvents();return t?.addListener(e,(e=>{n.current(e)}))}),[e,i])}},90754:(e,t,n)=>{n.d(t,{c:()=>o});var s=n(30758),a=n(66530),i=n(10565),r=n(66238);function o(e,t){const n=(0,i.d)(),o=(0,r.A)(t),l=(0,a.a)();(0,s.useEffect)((()=>n.getBroadcastingEvents().addListener(e,(e=>{l()&&o(e)}))),[n,o,e,l])}},92333:(e,t,n)=>{n.d(t,{A:()=>s});const s={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",lyricsCinemaVisible:"sgQuNaOh5Eu6vnzh3eoh",nonDisplayedArea:"KJNUWtMTBWtQrmsas64b",Container:"F3qS5Fne4ECzEWyFeJ5S",Controls:"dS_1_x4lBrx_vX9AMg6Q",Content:"mC8gFZzy9ZRO5c61MeuO"}}}]); +//# sourceMappingURL=9512.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/9549.js b/dot-config/spicetify/Extracted/Raw/xpui/9549.js new file mode 100755 index 00000000..7af69566 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/9549.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9549],{21394:(e,t,a)=>{a.d(t,{M:()=>u});var r=a(79209),i=a(25493),n=a(27012),s=a(68266),l=a(63547);const o="profile-editImage-imageContainer",d="profile-editImage-editImageButtonContainer";var c=a(86070);const u=function({onClick:e,name:t,images:a,canEdit:u,placeholderType:m,shape:h=i.u.SQUARE,dragUri:p=""}){const[g,x]=(0,s.P)(a),A=(0,l.b)(g,x)===l.g.loaded,{draggable:C,onDragStart:E}=(0,n.P)({itemUris:[p],dragLabelText:t});return(0,c.jsxs)("div",{className:o,"data-testid":`${m}-image`,draggable:C&&!!p,onDragStart:E,children:[(0,c.jsx)(i.b,{loading:"eager",name:t,images:a,placeholderType:m,shape:h}),u&&(0,c.jsx)("div",{className:d,children:(0,c.jsx)(r.a,{overlay:A,onClick:e,rounded:h===i.u.CIRCLE})})]})}},79209:(e,t,a)=>{a.d(t,{a:()=>g});var r=a(97500),i=a.n(r),n=a(10599),s=a(95530),l=a(31417);const o="main-editImage-buttonContainer",d="main-editImageButton-image",c="main-editImageButton-overlay",u="main-editImageButton-rounded",m="main-editImageButton-icon",h="main-editImageButton-copy";var p=a(86070);const g=function({overlay:e=!1,rounded:t=!1,onClick:a}){return(0,p.jsx)("div",{className:o,children:(0,p.jsx)("button",{"data-testid":"edit-image-button",className:i()(d,{[u]:t,[c]:e}),"aria-haspopup":"true",onClick:a,type:"button",children:(0,p.jsxs)("div",{className:i()(m,"icon"),children:[(0,p.jsx)(n.G,{size:"xlarge","aria-hidden":"true"}),(0,p.jsx)(s.E,{variant:"bodyMedium",className:h,children:l.Ru.get("choose_photo")})]})})})}},87018:(e,t,a)=>{a.d(t,{X:()=>l});var r=a(97500),i=a.n(r),n=a(55760),s=a(86070);const l=({children:e})=>(0,s.jsx)("div",{className:i()(n.A.imageContainer,n.A.imageContainerNew),children:e})},81113:(e,t,a)=>{a.d(t,{r:()=>n});const r={container:"GI8QLntnaSCh2ONX_y2c"};var i=a(86070);function n({children:e}){return(0,i.jsx)("div",{className:r.container,children:e})}},95510:(e,t,a)=>{a.d(t,{r:()=>x});var r=a(57292),i=a(50866),n=a(97500),s=a.n(n),l=a(31417),o=a(97701);const d=36e5,c=864e5;var u=a(67174);const m="poz9gZKE7xqFwgk231J4";function h(e,t){return e-e%t}var p=a(86070);const g=({durationMs:e,className:t})=>{const a=e>c;let r;var i;r=a?c:h(i=e,i>36e6?d:i>18e6?18e5:i>36e5?9e5:i>18e5?3e5:6e4);const{hours:n,minutes:g}=(0,o.S)(r);if(0===n&&0===g)return null;let x=(0,u.j)({h:n,m:g,s:0});return x=a?l.Ru.get("time.over",x):l.Ru.get("time.estimated",x),(0,p.jsx)("span",{className:s()(m,t),children:x})};function x({durationMs:e,isEstimate:t}){return 0===e?null:(0,p.jsx)(r.q,{children:t?(0,p.jsx)(g,{durationMs:e}):(0,p.jsx)(i.d,{durationMs:e})})}},75061:(e,t,a)=>{a.d(t,{W:()=>d});var r=a(97500),i=a.n(r),n=a(95530),s=a(31417),l=a(48046),o=a(86070);function d(){return(0,o.jsx)(n.E,{"data-separator":!0,variant:"bodySmall",semanticColor:"textSubdued",className:i()(l.A.separator,l.A.textSeparator),children:s.Ru.getSeparator()})}},2070:(e,t,a)=>{a.d(t,{B:()=>s});var r=a(95530),i=a(55760),n=a(86070);const s=({children:e})=>(0,n.jsx)(r.E,{variant:"bodySmall",className:i.A.pretitle,children:e})},81067:(e,t,a)=>{a.d(t,{Z:()=>h});var r=a(30758),i=a(85387),n=a(64820),s=a(95530),l=a(86677),o=a(31417),d=a(24533);const c="hOOwEKqNuXrNvOCB1SgZ",u="csEdkIN9z2LjJIuZraqz";var m=a(86070);const h=({uri:e})=>{const[t,a]=(0,d.A)(e),h=(0,i.Zp)(),p=(0,r.useCallback)((()=>{a(!1),h("/",{replace:!0})}),[h,a]);return(0,m.jsxs)("div",{className:c,children:[(0,m.jsx)(n.b,{size:"xxlarge"}),(0,m.jsxs)("div",{className:u,children:[(0,m.jsx)(s.E,{as:"p",variant:"titleSmall",children:o.Ru.get("forbidden-page.title")}),(0,m.jsx)(s.E,{as:"p",variant:"bodySmall",children:o.Ru.get("forbidden-page.description")})]}),t&&(0,m.jsx)(l.$,{colorSet:"invertedLight",onClick:p,children:o.Ru.get("remove_from_your_library")})]})}},48896:(e,t,a)=>{a.d(t,{q:()=>d});var r=a(30758),i=a(97500),n=a.n(i),s=a(38702),l=a(87794),o=a(86070);const d=r.memo(r.forwardRef((function({html:e,onTimeStampClick:t,enableTimestamps:a=!1,enableAutomaticLinkification:i=!1,semanticColor:d="textSubdued",className:c,asTextContent:u=!1},m){const h=(0,r.useMemo)((()=>(0,s.v)(e,t,a,d,i,u)),[a,i,e,t,d,u]);return(0,o.jsx)("div",{ref:m,className:n()(l.A.HTMLDescription,c),children:h})})))},38702:(e,t,a)=>{a.d(t,{v:()=>x});var r=a(30758),i=a(6936),n=a.n(i),s=a(95530);const l=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var o=a(21082),d=a(86070);const c=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,u=/^https?:\/\//;function m(e){return"string"==typeof e?(0,d.jsx)(d.Fragment,{children:e.split(c).map(((e,t)=>t%2?(0,d.jsx)(o.N,{to:`${u.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}var h=a(74786),p=a(87794);const g=(e=(()=>{}),t,a,i)=>{let n=0;const l={_:(e,t,s)=>{const l=void 0===t?e:s;return(0,d.jsx)(r.Fragment,{children:a&&!i?m(l):l},"fragment"+n++)}};if(i)return l;return{...l,p:e=>(0,d.jsx)(s.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:p.A.Paragraph,children:a?m(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,d.jsx)(h.D,{onClick:e,children:t.children}):t.href?(0,d.jsx)(o.N,{to:t.href,children:t.children}):(0,d.jsx)(d.Fragment,{children:t.children}),ul:e=>(0,d.jsx)("ul",{className:p.A.List,children:e.children}),ol:e=>(0,d.jsx)("ol",{className:p.A.List,children:e.children}),li:e=>(0,d.jsx)(s.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:p.A.ListItem,children:a?m(e.children):e.children}),br:()=>(0,d.jsx)("br",{}),h1:e=>(0,d.jsx)(s.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h2:e=>(0,d.jsx)(s.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h3:e=>(0,d.jsx)(s.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h4:e=>(0,d.jsx)(s.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h5:e=>(0,d.jsx)(s.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h6:e=>(0,d.jsx)(s.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),time:t=>(0,d.jsx)(h.D,{onClick:e,children:t.children})}},x=(e,t=(()=>{}),a=!1,r="textSubdued",i=!1,s=!1)=>{const o=a?e.split(l).map((e=>e.match(l)?`()`:e)).join(""):e;let d;try{d=n()(o,{transform:g(t,r,i,s),dangerouslySetChildren:[]})}catch{d=e}return d}},30416:(e,t,a)=>{a.d(t,{d:()=>g});var r=a(30758),i=a(31417),n=a(38682),s=a(67239),l=a(95446),o=a(4266);const d={"custom-order":l.RB,"title-and-artist-title":{column:o.$.TITLE_AND_ARTIST,order:o.H.ASC},"title-and-artist-artist":{column:o.$.TITLE_AND_ARTIST,order:o.H.SECONDARY_ASC},title:{column:o.$.TITLE,order:o.H.ASC},artist:{column:o.$.ARTIST,order:o.H.ASC},"added-by":{column:o.$.ADDED_BY,order:o.H.ASC},"added-at":{column:o.$.ADDED_AT,order:o.H.ASC},duration:{column:o.$.DURATION,order:o.H.ASC},album:{column:o.$.ALBUM,order:o.H.ASC},"album-or-podcast":{column:o.$.ALBUM_OR_PODCAST,order:o.H.ASC},"album-or-show":{column:o.$.ALBUM_OR_SHOW,order:o.H.ASC}},c={"title-and-artist-title":o.$.TITLE_AND_ARTIST,"title-and-artist-artist":o.$.TITLE_AND_ARTIST,title:o.$.TITLE,artist:o.$.ARTIST,"added-by":o.$.ADDED_BY,"added-at":o.$.ADDED_AT,duration:o.$.DURATION,album:o.$.ALBUM,"album-or-podcast":o.$.ALBUM_OR_PODCAST,"album-or-show":o.$.ALBUM_OR_SHOW},u={[o.H.NONE]:o.H.NONE,[o.H.ASC]:o.H.DESC,[o.H.DESC]:o.H.ASC,[o.H.SECONDARY_ASC]:o.H.SECONDARY_DESC,[o.H.SECONDARY_DESC]:o.H.SECONDARY_ASC},m={[o.$.INDEX]:{key:"custom-order",get value(){return i.Ru.get("sort.custom-order")}},[o.$.TITLE_AND_ARTIST]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.TITLE]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.ARTIST]:{key:"artist",get value(){return i.Ru.get("sort.artist")}},[o.$.ADDED_BY]:{key:"added-by",get value(){return i.Ru.get("sort.added-by")}},[o.$.ADDED_AT]:{key:"added-at",get value(){return i.Ru.get("sort.date-added")}},[o.$.DURATION]:{key:"duration",get value(){return i.Ru.get("sort.duration")}},[o.$.EVENT_DATE]:null,[o.$.EVENT_INFO]:null,[o.$.ALBUM]:{key:"album",get value(){return i.Ru.get("sort.album")}},[o.$.ALBUM_OR_PODCAST]:{key:"album-or-podcast",get value(){return i.Ru.get("sort.album-or-podcast")}},[o.$.ALBUM_OR_SHOW]:{key:"album-or-show",get value(){return i.Ru.get("sort.album-or-show")}},[o.$.PLAYS]:null,[o.$.RELEASE_DATE]:null,[o.$.ADD]:null,[o.$.ACTIONS]:null,[o.$.CONCERT_VENUE]:null,[o.$.CONCERT]:null,[o.$.TITLE_AND_AUTHOR]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.AUTHOR]:null,[o.$.BPM]:null,[o.$.KEY]:null,[o.$.VIBE]:null};var h=a(86070);function p(e){return!!e}const g=({columns:e,disabled:t,onSort:a})=>{const g=[...e],x=g.indexOf(o.$.TITLE_AND_ARTIST),A=g.indexOf(o.$.TITLE_AND_AUTHOR);-1!==x&&g.splice(x,1,o.$.TITLE,o.$.ARTIST),-1!==A&&g.splice(A,1);const{sortState:C,setSortState:E}=(0,r.useContext)(l.cL),T=function(e){return null===e.column?m[o.$.INDEX]:(0,n.kj)(e.column,e)?m[o.$.ARTIST]:m[e.column]}(C),b=(0,r.useCallback)((e=>{a?.(),E(((e,t,a)=>e?t!==c[e]?d[e]:{column:c[e],order:u[a]}:l.RB)(e,C.column,C.order))}),[a,E,C.column,C.order]),y=(0,r.useCallback)((()=>null!==C.column),[C.column]),v=g.map((e=>m[e])).filter(p);return(0,h.jsx)(s.g,{options:v,onSelect:b,selected:T,isSelectionChanged:y,sortOrder:C.order,heading:i.Ru.get("drop_down.sort_by"),disabled:t,enableViewModeMenu:!0})}},12835:(e,t,a)=>{a.d(t,{x:()=>U});var r=a(30758),i=a(95530),n=a(31417),s=a(65462),l=a(40675),o=a(21394),d=a(25577),c=a(87018),u=a(88711),m=a(46110),h=a(1246),p=a(2070),g=a(62986),x=a(99701),A=a(38702),C=a(48896),E=a(35895),T=a(63352),b=a(27438),y=a(73658),v=a(7858),S=a(93500),f=a(81113),j=a(95510),R=a(57292),N=a(21646),k=a(75061),_=a(79225);const I="JGhILoA1vonXX7tmvFj3";var D=a(86070);function L({creators:e,onCreatorClick:t,onPiledCreatorsClick:a,isTunaApplied:r,totalSaves:i,totalItems:s,durationMilliseconds:l,isEstimatedDuration:o,daylistNextUpdate:d,newEntries:c,hasTracks:u,hasEpisodes:m,hasAudiobooks:h}){return(0,D.jsxs)(y.X,{children:[(0,D.jsx)(v.j,{creators:e,onCreatorClick:t,onPiledCreatorsClick:a,isTunaApplied:r}),(0,D.jsx)(N.J,{}),i>0?(0,D.jsx)(R.q,{children:n.Ru.get("saves",i)}):null,(0,D.jsx)(N.J,{}),(0,D.jsxs)(f.r,{children:[(0,D.jsx)(S.G,{totalItems:s,containsAudiobooks:h,containsEpisodes:m,containsTracks:u}),(0,D.jsx)(k.W,{}),(0,D.jsx)(j.r,{durationMs:l,isEstimate:o})]}),(0,D.jsx)(N.J,{}),d&&(0,D.jsx)(R.q,{children:n.Ru.get("web-player.playlist.daylist.next-update",n.Ru.formatDate((0,_.ad)(d),{timeStyle:"short"}))}),c>0&&(0,D.jsx)(R.q,{className:I,children:n.Ru.get("chart.new-entries",c)})]})}var w=a(47362);const O=()=>!1;var M=a(26122),$=a(32999),B=a(33329),H=a(11860);const U=function({metadata:e,isPlaying:t,isPublished:a,togglePlay:y,backgroundColor:v,spec:S,specLikedSongs:f,totalItems:j,className:R}){const{uri:N,name:k,description:_="",images:I,totalLikes:U,duration:P,owner:X,isOwnedBySelf:F=!1,formatListData:G,madeFor:W=null,collaborators:z,hasSpotifyTracks:J,hasEpisodes:Y,hasSpotifyAudiobooks:K}=e,Z=G?.attributes||{},q=Z.header_image_url_desktop||Z.image_url||null,V=null!==q?[{url:q,width:null,height:null}]:[],Q="daylist"===G?.type?Z.expires:void 0,ee=(0,B.s)(),te=(0,r.useMemo)((()=>(0,w.c)(W,X,z?.items)),[W,X,z?.items]),ae=(0,r.useContext)(T.$$),re=(0,r.useContext)(b.VV),ie=(0,r.useCallback)((()=>{if(S){const e=S.ownerFactory().hitUiReveal();ee.logInteraction(e)}re({type:"open",uri:N})}),[re,N,S,ee]),ne=(0,r.useCallback)((e=>{if(S){const e=S?.descriptionTextFactory().hitUiReveal();ee.logInteraction(e)}ae({type:"open",playlistDetails:{name:k,description:_,image:I[0],uri:N},focusedElement:e})}),[S,ae,k,_,I,N,ee]),se=(0,r.useCallback)((()=>{if(S){const e=S.coverArtFactory().hitUiReveal();ee.logInteraction(e)}ae({type:"openWithImagePicker",playlistDetails:{name:k,description:_,image:I[0],uri:N}})}),[ae,k,_,I,N,ee,S]),le=(0,r.useCallback)(((e,t)=>{if(S){const e=S.ownerFactory().hitUiNavigate({destination:t.creator.uri});ee.logInteraction(e)}if(f){const e=f.ownerFactory().hitUiNavigate({destination:t.creator.uri});ee.logInteraction(e)}}),[ee,S,f]),oe=e.permissions?e.permissions?.isPrivate?n.Ru.get("private_playlist"):n.Ru.get("public_playlist"):n.Ru.get("playlist"),de=(0,D.jsx)(l.W,{uri:N,isPublished:a}),ce=(0,$._)(),ue=(0,r.useRef)(null),me=(0,M.K)({ref:ue});return(0,D.jsxs)(d.z,{backgroundColor:v,backgroundImages:V,className:R,children:[(0,D.jsxs)(m.h,{children:[(0,D.jsx)(E.D,{size:"medium",onClick:y,isPlaying:t,uri:N}),(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(h.X,{text:k,dragUri:N,dragLabel:k})})]}),q?null:(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(c.X,{children:(0,D.jsx)(o.M,{canEdit:F,name:k,images:ce(I,300)??[],onClick:se,placeholderType:"playlist",dragUri:N})})}),(0,D.jsxs)(u.Y,{children:[(0,D.jsx)(p.B,{children:oe}),(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(g.mm,{canEdit:F,onClick:()=>{if(S){const e=S.titleFactory().hitUiReveal();ee.logInteraction(e)}ne(T.NV.TITLE)},dragUri:N,dragLabel:k,ariaLabel:n.Ru.get("playlist.edit-details.button",k),scaleAtMinWidth:g.tw,children:k})}),_&&(0,D.jsx)(x.Zp,{label:(0,A.v)(_),disabled:!me,children:(0,D.jsx)(i.E,{variant:"bodySmall",className:H.A.whiteOpacity,onClick:e=>{F&&(e=>{"href"in e.target||ne(T.NV.DESCRIPTION)})(e)},children:(0,D.jsx)(C.q,{ref:ue,html:_,onTimeStampClick:()=>{},className:H.A.playlistDescription})})}),(0,D.jsx)(L,{creators:te,onPiledCreatorsClick:ie,onCreatorClick:le,totalItems:j,totalSaves:U??0,durationMilliseconds:P?.milliseconds??0,isEstimatedDuration:!!P?.isEstimate,daylistNextUpdate:Q,newEntries:parseInt(Z.new_entries_count||"0",10),hasTracks:J??!1,hasEpisodes:Y??!1,hasAudiobooks:K??!1,isTunaApplied:O(e)})]})]})}},47362:(e,t,a)=>{function r(e){return e.user||null}function i(e){return!!e}function n(e,t=!1){return{id:e.username,uri:e.uri,name:e.username,displayName:e.displayName||void 0,images:e.images,isMadeFor:t}}function s(e,t,a=[]){return e?[n(e,!0)]:a.length>1?a.map(r).filter(i).map((e=>n(e))):[n(t)]}function l(e){return e.every((e=>"audiobook"===e?.type||null===e))}a.d(t,{R:()=>l,c:()=>s})},63547:(e,t,a)=>{a.d(t,{b:()=>n,g:()=>i});var r=a(30758);let i=function(e){return e[e.loading=0]="loading",e[e.loaded=1]="loaded",e[e.error=2]="error",e}({});function n(e,t){const a=e?i.loading:i.error,[n,s]=(0,r.useState)(a);return(0,r.useEffect)((()=>{const a=()=>{s(i.loaded)},r=()=>{s(i.error)};if(!e)return s(i.error),()=>{};s(i.loading);const n=document.createElement("img");return n.addEventListener("load",a),n.addEventListener("error",r),n.setAttribute("src",e),t&&n.setAttribute("srcSet",t),()=>{n.removeEventListener("load",a),n.removeEventListener("error",r)}}),[e,t]),n}},44898:(e,t,a)=>{function r(e,t){return{uri:e,playlistQueryOptions:t}}a.d(t,{A:()=>r})},87794:(e,t,a)=>{a.d(t,{A:()=>r});const r={Heading:"playlist-playlist-heading",HTMLDescription:"playlist-playlist-playlistDescription",List:"playlist-playlist-list",ListItem:"playlist-playlist-listItem",Paragraph:"playlist-playlist-paragraph"}},11860:(e,t,a)=>{a.d(t,{A:()=>r});const r={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",MINIMUM_HEADER_HEIGHT:"250px",MAXIMUM_HEADER_HEIGHT:"400px",IMAGE_SIZE:"192px",IMAGE_SIZE_BIG:"232px",BACKGROUND_HEIGHT_PERCENTAGE:"40vh",playlist:"playlist-playlist-playlist",searchBoxContainer:"playlist-playlist-searchBoxContainer",leadingSlot:"playlist-playlist-leadingSlot",recommendedTrackList:"playlist-playlist-recommendedTrackList",playlistContent:"playlist-playlist-playlistContent",playlistDescription:"playlist-playlist-playlistDescription",top:"playlist-playlist-top",header:"playlist-playlist-header",subtitle:"playlist-playlist-subtitle",refreshButton:"playlist-playlist-refreshButton",playlistImageContainer:"playlist-playlist-playlistImageContainer",playlistInlineCurationSection:"playlist-playlist-playlistInlineCurationSection",playlistInlineCurationTitle:"playlist-playlist-playlistInlineCurationTitle",playlistInlineCurationWrapper:"playlist-playlist-playlistInlineCurationWrapper",playlistInlineCurationCloseButton:"playlist-playlist-playlistInlineCurationCloseButton",playlistInlineCurationBackButton:"playlist-playlist-playlistInlineCurationBackButton",artistResultListTitle:"playlist-playlist-artistResultListTitle",seeMore:"playlist-playlist-seeMore",emptyStateContainer:"playlist-playlist-emptyStateContainer",searchResultListContainer:"playlist-playlist-searchResultListContainer",emptySearchTermContainer:"playlist-playlist-emptySearchTermContainer",whiteOpacity:"playlist-playlist-whiteOpacity",noBooklistSupportContainer:"playlist-playlist-noBooklistSupportContainer",concertsFooter:"playlist-playlist-concertsFooter",promoRow:"playlist-playlist-promoRow",promoTitle:"playlist-playlist-promoTitle",ctaLink:"playlist-playlist-ctaLink",promoImage:"playlist-playlist-promoImage",disclaimerContainer:"playlist-playlist-disclaimerContainer",icon:"playlist-playlist-icon"}}}]); +//# sourceMappingURL=9549.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/9705.css b/dot-config/spicetify/Extracted/Raw/xpui/9705.css new file mode 100755 index 00000000..50333471 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/9705.css @@ -0,0 +1 @@ +.lXCFF95KGbS0SOaHpdAB{max-height:100%;max-width:80%;overflow-y:auto;width:430px}._HgcBgHc6CvW_sHlxpho{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.O6O5YM0duU8pDRn1TejH,._HgcBgHc6CvW_sHlxpho{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.O6O5YM0duU8pDRn1TejH{background:var(--background-elevated-base);border-radius:5px;padding:16px 16px 40px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.exAG_I7ORuHnlbPk7lg3{margin-bottom:8px;text-align:center}.gqTp9eYnllzbDIEjvXxF{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;background-color:var(--background-elevated-highlight);border-radius:5px;justify-content:center;margin-bottom:12px;min-width:220px;padding:12px 16px}.w88sM3XYAreRHd9N01v_{position:fixed;z-index:9999} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/9705.js b/dot-config/spicetify/Extracted/Raw/xpui/9705.js new file mode 100755 index 00000000..6a95a400 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/9705.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9705],{89705:(e,t,o)=>{o.r(t),o.d(t,{default:()=>R});var l=o(87150),s=o(30758),c=o(7315),n=o(95530),a=o(65503),r=o(50111),i=o(86677),d=o(96250),u=o(31417),p=o(44971),g=o(54926),x=o(19616),b=o(53133),C=o(33329),h=o(50671),v=o(33234);const m="lXCFF95KGbS0SOaHpdAB",j="_HgcBgHc6CvW_sHlxpho",_="O6O5YM0duU8pDRn1TejH",y="exAG_I7ORuHnlbPk7lg3",f="gqTp9eYnllzbDIEjvXxF";var k=o(86070);const F=e=>{const{enqueueSnackbar:t}=(0,b.d)(),o=(0,s.useMemo)((()=>e.url?e.spec?.restrictedAccessCodeModalFactory({uri:e.url}):void 0),[e.url,e.spec]),l=(0,s.useMemo)((()=>o?.copyButtonFactory()),[o]),p=(0,s.useMemo)((()=>o?.ctaButtonFactory()),[o]),x=(0,h.t)(o),m=(0,C.s)(),F=e.dates.start?(0,g.dp)((0,g.l4)(e.dates.start)):(0,g.dp)(new Date),R=e.dates.end?(0,g.dp)((0,g.l4)(e.dates.end)):void 0;return(0,k.jsxs)("section",{className:_,ref:x,children:[(0,k.jsx)("div",{className:j,children:(0,k.jsx)(H,{"aria-label":u.Ru.get("close"),iconOnly:c.M,size:"small",onClick:e.onClose})}),(0,k.jsx)(n.E,{variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("concert.presale.title")}),(0,k.jsxs)("div",{className:y,children:[(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.presale.code_description")}),F&&(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.presale.date_times",F,R)}),(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.venue_dates")})]}),e.code&&(0,k.jsx)(a.H,{"data-testid":"code",className:f,iconTrailing:r._,onClick:()=>{l&&m.logInteraction(l.hitCopyToClipboard()),(e.copyToClipboard??v.l)(e.code),t(u.Ru.get("concert.code_copied"))},children:e.code}),(0,k.jsx)(i.$,{onClick:()=>{p&&e.url&&m.logInteraction(p.hitNavigateToExternalUri({destination:e.url}))},href:e.url,iconTrailing:d.H,target:"_blank",children:u.Ru.get("concerts.event.view")})]})},R=e=>(0,k.jsx)(p.A,{contentLabel:u.Ru.get("concert.presale.title"),isOpen:!0,className:m,onRequestClose:e.onClose,children:(0,k.jsx)(x.SnackbarProvider,{children:(0,k.jsx)(F,{...e})})});var H=(0,l.Ay)(a.H).withConfig({displayName:"PresaleModal___StyledButtonTertiary",componentId:"sc-atp5p6-0"})({color:"#FFFFFF",backgroundColor:"#000000",cursor:"pointer"})}}]); +//# sourceMappingURL=9705.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Raw/xpui/9928.js b/dot-config/spicetify/Extracted/Raw/xpui/9928.js new file mode 100755 index 00000000..b3ea2900 --- /dev/null +++ b/dot-config/spicetify/Extracted/Raw/xpui/9928.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1408,9928],{70076:(e,i,t)=>{t.d(i,{x:()=>C});var n=t(30758),r=t(62411),s=t(95530),a=t(31417),c=t(97500),o=t.n(c),l=t(21743);const d="lyrics-lyricsContent-lyric",u="lyrics-lyricsContent-active",y="lyrics-lyricsContent-highlight",v="lyrics-lyricsContent-unsynced",p="lyrics-lyricsContent-isInteractive",m="lyrics-lyricsContent-text",f="Zg6tXwNaAAopLykLK7Cw",h="lyrics-lyricsContent-provider";var L=t(86070);const g=n.memo((function({onObserve:e,text:i,lineNumber:t,activeLineIndex:r,isTimeSynced:s,translationText:a,onClick:c,onActiveLineChange:h,windowIsVisible:g}){const{ref:b,inView:S}=(0,l.Wx)({threshold:0}),k=(0,n.useRef)(!1);(0,n.useEffect)((()=>{k.current||S&&g&&(e(i),k.current=!0)}),[S,e,i,g]);const w=(0,n.useRef)(),x=(0,n.useRef)(!0);(0,n.useEffect)((()=>{h(w,x.current),x.current=!1}),[r,h]);const I=(0,n.useCallback)((e=>{b(e),w.current=e||void 0}),[b]);return(0,L.jsxs)("div",{dir:"auto",className:o()(d,{[p]:!!c,[u]:r===t,[y]:r>t,[v]:!s}),"data-testid":"fullscreen-lyric",ref:I,onClick:c,children:[(0,L.jsx)("div",{className:m,children:i}),a&&(0,L.jsx)("div",{className:f,children:a})]})}));var b=t(86931);const S={start:0,end:1,text:""};var k=t(79657),w=t(29195),x=t(58685);var I=t(28874),T=t(31402);const C=n.memo((function({trackUri:e,data:i,format:t,onLineClick:c,onActiveLineChange:o,isSnippet:l}){const{provider:d,providerLyricsId:u,providerDisplayName:y,syncType:v,isTimeSynced:p}=i,m=(0,r.d4)(I.s),{lyricWithEmptyLines:f,activeLineIndex:C,hasSkipped:E,shouldAnimateScroll:N}=((e,i,t)=>{const r=(0,n.useRef)(0),{lyrics:s=[],isTimeSynced:a,alternatives:c}=i,o=(0,n.useRef)(0),[l]=(0,b.f)(500,(i=>i?.item?.uri===e)),d=t?c?.find((({language:e})=>e.substring(0,2)===t.substring(0,2)))?.lines:null,u=(0,n.useMemo)((()=>[...new Array(2).fill(S),...s].map(((e,i)=>({...e,lineNumber:i,translationText:d?.[i-2]})))),[s,d]),y=a?u.findIndex((({start:e,end:i})=>l>=e&&l2e3;return r.current=l,{lyricWithEmptyLines:u,activeLineIndex:y,prevActiveLineIndex:v,lineIndexDiff:y-v,shouldAnimateScroll:p,hasSkipped:m}})(e,i,m),A=function(e){const{trackUri:i,format:t,provider:r,providerLyricsId:s,syncType:a,isSnippet:c}=e,[o,l]=(0,n.useState)(!1),[d,u]=(0,n.useState)(0),[y,v]=(0,n.useState)(!1),p=(0,x.o)((e=>e?.playbackId??void 0)),m=(0,n.useMemo)((()=>(0,k.W)({lyrics_format:t,track_uri:i,provider:r,provider_lyrics_id:s,sync_type:a,playback_id:p,is_snippet:c})),[t,i,r,s,a,p,c]);(0,n.useEffect)((()=>{l(!1),u(0),v(!1);const e=setTimeout((()=>{v(!0)}),1500);return()=>{clearTimeout(e)}}),[m]);const f=(0,w.vh)();return(0,n.useEffect)((()=>{o||d>=140&&y&&(f.send(m),l(!0))}),[d,o,m,f,y]),(0,n.useCallback)((e=>{e.length>1&&u((i=>i+e.length))}),[u])}({trackUri:e,format:t,provider:d,providerLyricsId:u,syncType:v,isSnippet:l}),R=(0,T.g)();return(0,L.jsxs)(L.Fragment,{children:[f.map((({text:e,lineNumber:i,translationText:t})=>(0,L.jsx)(g,{text:e,translationText:t,lineNumber:i,activeLineIndex:C,isTimeSynced:p,onObserve:A,onClick:c&&(e=>c(e,f[i].start)),onActiveLineChange:(e,t)=>o({lineRef:e,firstUpdate:t,isFirstLine:p&&0===i,isActiveLine:p&&C===i,activeLineIndex:C,hasSkipped:E,shouldAnimateScroll:N}),windowIsVisible:"visible"===R},i))),!l&&y&&(0,L.jsx)("div",{className:h,children:(0,L.jsx)(s.E,{as:"p",variant:"bodySmall",dir:"auto",children:a.Ru.get("web-player.lyrics.providedBy",y)})})]})}))},62197:(e,i,t)=>{t.d(i,{H:()=>r,k:()=>n});const n=18e5,r=6e5},62752:(e,i,t)=>{t.d(i,{I:()=>h});var n=t(50486),r=t(14343),s=t(62197),a=t(1377),c=t(18133),o=t(2254),l=t(21398),d=t(411),u=t(36475);function y(e,i,t){const{startTimeMs:n,words:r}=e,s=t[i+1];return{start:n||0,end:s&&s.startTimeMs?s.startTimeMs:1/0,text:r}}function v(e){return d.Q.fromInt(e).toCSS(u.a.RGB)}var p=t(82935),m=t(43329);const f={hasLyrics:!1},h=(e,i)=>{const t=(0,p.h)(i||void 0,{desiredLabel:"large",desiredSize:600})??i?.[0]?.url??"",d=(0,c.X)(),u=(0,r.NC)(m.Tc,{loadingValue:m.LZ.CONTROL}),h={[m.LZ.CONTROL]:void 0,[m.LZ.SYSTEM_LANGUAGE]:navigator.language,[m.LZ.ALL_LANGUAGES]:"all"}[u],L=["lyrics",{uri:e,image:t,vocalRemoval:d}],{hasLyrics:g,isLoading:b}=(0,a.f)(e),{data:S,isLoading:k,isError:w}=(0,n.I)({queryKey:L,queryFn:async()=>{if(!e||!t)return f;const i=await async function(e,i,t=!1,n){try{const a=await(0,o.S)(e,i,t,n);return{hasLyrics:!0,isTimeSynced:(s=a.lyrics.syncType,"LINE_SYNCED"===s||"SYLLABLE_SYNCED"===s),syncType:a.lyrics.syncType,lyrics:a.lyrics.lines.map(y),colors:(r=a.colors,{text:v(r.text),activeText:v(r.highlightText),background:v(r.background)}),provider:a.lyrics.provider,providerDisplayName:a.lyrics.providerDisplayName,providerLyricsId:a.lyrics.providerLyricsId,hasVocalRemoval:a.hasVocalRemoval??!1,showUpsell:a.lyrics.showUpsell??!1,alternatives:a.lyrics.alternatives}}catch(e){if(e instanceof l.O&&404===e.status)return{hasLyrics:!1};throw e}var r,s}(e,t,d,h);return i},gcTime:s.k,staleTime:s.H,enabled:g}),x=b||k;let I=null;return x||(I=g?S??null:f),{data:I,loading:x,error:w}}},1377:(e,i,t)=>{t.d(i,{f:()=>d});var n=t(50486),r=t(24909),s=t(14343),a=t(22726),c=t(62197),o=t(2254),l=t(38501);const d=e=>{const i=!!e&&(0,a.U_m)(e),t=(0,s.NC)(l.s6w)&&i,{data:d,isLoading:u}=(0,n.I)({queryKey:["useLyricsAvailability",e],queryFn:async()=>!!e&&await(0,o.z)(e),gcTime:c.k,staleTime:c.H,enabled:t,placeholderData:r.rX});return{isLoading:u,hasLyrics:!!t&&(d??!1)}}},18893:(e,i,t)=>{t.d(i,{J:()=>s});var n=t(62752),r=t(58685);const s=()=>{const e=(0,r.o)((e=>e?.item),((e,i)=>e?.uri===i?.uri));return(0,n.I)(e?.uri,e?.images)}},18133:(e,i,t)=>{t.d(i,{X:()=>a});var n=t(14343),r=t(38501),s=t(77153);const a=()=>{const e=(0,s.S)(),{isSupported:i}=e.getCapabilities();return(0,n.NC)(r.OBX,{loadingValue:!1})&&i}},28874:(e,i,t)=>{t.d(i,{s:()=>r,u:()=>n});const n=e=>e.ui.lyrics.mode,r=e=>e.ui.lyrics.translationLanguage},2254:(e,i,t)=>{t.d(i,{S:()=>a,z:()=>c});var n=t(22726),r=t(1599),s=t(72671);const a=async(e,i,t,a)=>{const c=(0,n.o_h)(e).id,o=r.n.getInstance(),l={format:"json",vocalRemoval:t};a&&(l.clientLanguage=a);return(await o.build().withHost(s.Hj).withPath(`/track/${encodeURIComponent(c)}/image/${encodeURIComponent(i)}`).withQueryParameters(l).withEndpointIdentifier("/track/{trackId}").send()).body},c=async e=>{const i=(0,n.Y8v)((0,n.o_h)(e)?.id);if(!i)return!1;const t=r.n.getInstance(),a=await t.build().withHost(s.XE).withPath(`/track/${encodeURIComponent(i)}`).withEndpointIdentifier("/track/{trackId}").send();return a.body?.has_lyrics||!1}},31402:(e,i,t)=>{t.d(i,{g:()=>r});var n=t(30758);function r(){const[e,i]=(0,n.useState)(document.visibilityState);return(0,n.useEffect)((()=>{const e=()=>i(document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}),[]),e}},84291:(e,i,t)=>{t.d(i,{f:()=>c,z:()=>a});var n=t(30758),r=t(85505),s=t(47095);function a(e,i=r.l0o){const t=(0,s.as)();return(0,n.useEffect)((()=>(e&&t((0,s.Mo)(e)),()=>{t((0,s.Hf)())})),[e,t]),e||i}const c=({color:e,fallbackColor:i})=>(a(e,i),null)},5179:(e,i,t)=>{t.d(i,{H:()=>a});var n=t(23300),r=t(58685),s=t(82935);function a(){const e=(0,r.o)((e=>e?.item),((e,i)=>e?.uri===i?.uri)),i=(0,s.h)(e?.images||void 0,{desiredLabel:"large",desiredSize:600})??e?.images?.[0]?.url??"",{data:t}=(0,n.g)([i]);return t??null}}}]); +//# sourceMappingURL=9928.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/1186.js b/dot-config/spicetify/Extracted/Themed/xpui/1186.js new file mode 100755 index 00000000..d452398f --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/1186.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1186],{18278:(e,t,n)=>{n.d(t,{A:()=>ve});var a=n(30758),o=n(62411),c=n(74159),r=n(14414),i=n(7315),s=n(86677),l=n(14343),d=n(31417),u=n(65503),m=n(81670),h=n(8725),g=n(95530),f=n(92483),x=n(85823),j=n(48945),v=n(44971);const b=["Escape","ArrowDown","ArrowUp","Tab"],y=e=>b.includes(e);var R=n(57776),C=n(59147);const p=new R.l("searchConcertLocations","query","43ededefcba8b3f519fd0c2d6c025dfeec9f742cf47d04a3c3711d95b27deda3",null);var _=n(37178),w=n(62021);const N="pdkMNbSQl8Yi5tl0iOF9",D="lbKmnVjXCdZ3kRBxjKQZ",k="VAJ54U4IyPKmKRWXweMn",L="r3oh3bOf2I7DZQEND5Uz",S="XwomR4z9c60ph1tYBcdm",I="bQATTxDxEbS7xXRsr_Mt",M="wFdZQwoko8rVRTLeFG5G",E="jcDbJiJUoAVWZ7h1Rhhy",Z="UkSUgC7NQnYbptBJEAM9",B="xfncDja0wZotJaVS3aq9",V="gJedMi0s8_RQ4d2aWYzI";var A=n(86070);const O=({onCancel:e,onChange:t,onBack:n,title:o,children:c})=>{const[r,s]=(0,w.x)("recent-locations",[]),[l,b]=(0,a.useState)(""),R=(0,_.W)(),O=(0,a.useRef)(null),T=(0,a.useRef)(null),q=(0,a.useRef)(-1),{data:z}=(F={query:l},(0,C.I)(p,F,U));var F,U;const H=(e=>"items"in(e?.concertLocations??{}))(z)?z.concertLocations.items:[];return(0,A.jsx)("div",{onKeyDown:e=>{const t=e.key;if(!y(t))return;e.preventDefault();const n=((e,t,n)=>{switch(n){case"ArrowDown":case"Tab":return Math.min(e+1,t);case"ArrowUp":return Math.max(e-1,-1);default:return e}})(q?.current??-1,H.length,t),a=O.current?.childNodes[n]?.firstChild;n>=0&&a instanceof HTMLButtonElement&&a.focus(),-1===n&&T.current?.focus(),q.current=n},"data-interaction-context":"location-selector",children:(0,A.jsx)(v.A,{isOpen:!0,onRequestClose:e,children:(0,A.jsxs)("section",{className:N,children:[n&&(0,A.jsx)("div",{className:L,children:(0,A.jsx)(u.H,{iconOnly:R?m.V:h.g,size:"small",onClick:n,"aria-label":d.Ru.get("navbar.go-back")})}),(0,A.jsx)("div",{className:k,children:(0,A.jsx)(u.H,{iconOnly:i.M,size:"small",onClick:e,"aria-label":d.Ru.get("close")})}),(0,A.jsxs)("div",{className:D,children:[(0,A.jsxs)("div",{className:S,children:[(0,A.jsx)(g.E,{as:"h3",variant:"bodyMediumBold",children:o??d.Ru.get("concert.location.search.header")}),(0,A.jsx)(f.E,{iconLeading:(0,A.jsx)(x.C,{}),children:(0,A.jsx)(j.Z,{placeholder:d.Ru.get("concert.location.search.placeholder"),onChange:e=>b(e.currentTarget.value),value:l,ref:T,autoFocus:!0})})]}),!l&&(0,A.jsx)(A.Fragment,{children:c}),l&&z?.concertLocations&&0===H.length&&(0,A.jsx)(g.E,{as:"p",variant:"bodyMedium",children:d.Ru.get("concert.error.no_locations_found_subtitle")}),l&&(0,A.jsx)("ol",{className:I,ref:O,children:H.map(((e,n)=>(0,A.jsx)("li",{children:(0,A.jsx)("button",{tabIndex:n+1,className:B,onClick:()=>{const n={geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geoHash,fullName:e.fullName};r.find((e=>e.geonameId===n.geonameId))||s([...r,n]),t(n)},children:e.fullName})},e.geonameId)))}),!!r?.length&&!l&&(0,A.jsxs)("div",{className:M,children:[(0,A.jsx)("div",{className:E,children:(0,A.jsx)(g.E,{as:"h3",variant:"bodyMediumBold",children:d.Ru.get("concert.location.search.recent")})}),(0,A.jsx)("ol",{children:r.map(((e,n)=>(0,A.jsxs)("li",{className:Z,children:[(0,A.jsx)("button",{tabIndex:n+1,className:B,onClick:()=>t({geonameId:Number(e.geonameId),name:e.name,country:e.country,geohash:e.geohash}),children:(0,A.jsx)("div",{className:V,children:e.fullName??[e.name,e.country].join(d.Ru.getSeparator())})}),(0,A.jsx)(u.H,{"aria-label":d.Ru.get("remove"),iconOnly:i.M,size:"small",onClick:t=>{t.stopPropagation(),s(r.filter((t=>t.geonameId!==e.geonameId)))}})]},e.geonameId)))})]})]})]})})})};var T=n(88751);const q=new R.l("saveLocation","mutation","5502351e9f201ae29014ca55d3b24b755ba261a1a9eb35fb498cb4c7df419353",null);var z=n(29195);const F="WZzy7tMC5xlIMwoZ32JU",U="LkdC_QJiLoD0OTOWnkJV",H="WqruN54NvYqlA2XlTJ0Z",W="GS4yLEr0XMj8kw2iMAd8",J="prICvcudVq_SL6dqkZBw",$="YLM_DWbpYGBpvqtDEhum",G="h8jjXJERT64OZi2sHCbi",K=(e,t)=>e(q,{geonameId:t}),Q=({onCancel:e,onSave:t,location:n,storeConcertLocation:o=K})=>{const[c,l]=(0,a.useState)(!1),[m,h]=(0,a.useState)(!1),{getGraphQLLoader:g}=(0,z.mv)(),f=g();return(0,A.jsx)("div",{onKeyDown:t=>{const n=t.key;y(n)&&"Escape"===n&&e()},"data-interaction-context":"location-selector",children:(0,A.jsx)(v.A,{isOpen:!0,onRequestClose:e,children:(0,A.jsxs)("section",{className:F,children:[(0,A.jsx)("div",{className:H,children:(0,A.jsx)(u.H,{iconOnly:i.M,size:"medium",onClick:e,"aria-label":d.Ru.get("close")})}),(0,A.jsxs)("div",{className:U,children:[(0,A.jsx)("div",{className:W,children:(0,A.jsx)(T.Z,{variant:"celloCanon",children:d.Ru.get("concerts.location.change.confirm",n.name)})}),(0,A.jsx)("div",{className:J,children:(0,A.jsx)(r.t,{size:"xlarge"})}),(0,A.jsx)("div",{className:$,children:(0,A.jsx)(T.Z,{semanticColor:"textSubdued",children:d.Ru.get("concerts.location.change.info")})}),(0,A.jsx)(s.$,{onClick:async()=>{l(!0),h(!1);try{const a=await o(f,String(n.geonameId));if(e=a?.data?.storeUserLocation,void 0===e||!("success"in e)||!0!==e.success)throw Error();t()}catch{h(!0),l(!1)}var e},disabled:c,children:d.Ru.get("concerts.location.change.button")}),m&&(0,A.jsx)("div",{className:G,children:(0,A.jsx)(T.Z,{semanticColor:"textWarning",children:d.Ru.get("concerts.location.change.error")})})]})]})})})};var P=n(16273),X=n(67499);const Y=()=>(0,A.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,A.jsx)("path",{d:"M6.94875 9.48555V14.9935C6.94875 15.5494 7.42943 16 8.02239 16C8.42905 16 8.80081 15.7846 8.98268 15.4436L15.6347 2.9711L15.9539 2.07322C16.1803 1.43663 15.5343 0.830999 14.8552 1.0432L13.8975 1.34249L0.593494 7.57874C0.229762 7.74924 0 8.09776 0 8.47901C0 9.03491 0.480685 9.48555 1.07364 9.48555H6.94875Z",fill:"currentColor"})}),ee=new R.l("concertLocationsByLatLon","query","8a059d072a17a1199feb21fe846271f1680eda87010c832852ced0c55c6c7c96",null);var te=n(81834),ne=n(27963),ae=n(50671);const oe="LUZuAtOgmXbneOoxnP8P",ce="dIOLAcD26GH01pNjZHBL",re="tXNcvSNL8Kx6wKUOej2I",ie="XZ1RzeF1kz6ch8idhAAD",se="GQeQjsi5dPF4PFO7BzvL",le=e=>{const[t,n]=(0,a.useState)(!1),[o,c]=(0,a.useState)(!1),r=(()=>{const e=ee,{name:t,sha256Hash:n}=e,o=(0,P.jE)(),{request:c}=(0,a.useContext)(te.j);return a=>o.ensureQueryData({queryFn:()=>(0,ne.c)(c,e,a),queryKey:[t,a,n]})})(),i=(0,ae.t)(e.spec);return(0,A.jsxs)(A.Fragment,{children:[t&&(0,A.jsx)("div",{children:d.Ru.get("concert.location.search.current_location.error")}),(0,A.jsx)("button",{ref:i,className:re,onClick:async()=>{c(!0),e.getCurrentPosition((async t=>{const a=await r({lat:t.coords.latitude,lon:t.coords.longitude});if(o=a?.data?.concertLocations,void 0===o||!("items"in o))return c(!1),n(!0);var o;const[i]=a.data.concertLocations.items;return e.onChange({geonameId:Number(i.geonameId),name:i.name})}))},children:(0,A.jsx)(g.E,{semanticColor:"textSubdued",className:se,children:o?(0,A.jsx)(X.U,{}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(Y,{})," ",d.Ru.get("concert.location.search.current_location")]})})})]})},de=new R.l("userLocation","query","079939378ca79b67c6d047be9152ea940d21f10bbfa2f5d4cf4d8320d87774c2",null),ue=(e,t)=>(0,C.I)(de,e,t),me="Hj5kpRfIocJic5jcxsW_",he="aJduGcVsoCwJvV1jVqjl",ge=({onClick:e})=>{const{data:t}=ue({});return t?(0,A.jsxs)("div",{className:me,children:[(0,A.jsxs)("div",{className:he,children:[(0,A.jsx)(r.t,{size:"small"}),(0,A.jsxs)("div",{children:[(0,A.jsx)(T.Z,{as:"div",semanticColor:"textPositive",variant:"ballad",children:t.me?.profile?.location?.name}),(0,A.jsx)(T.Z,{as:"div",semanticColor:"textSubdued",children:d.Ru.get("concerts.location.preferred")})]}),(0,A.jsx)(c.n,{onClick:e,size:"small",children:d.Ru.get("concerts.location.change")})]}),(0,A.jsx)(T.Z,{semanticColor:"textSubdued",variant:"finale",children:d.Ru.get("concerts.location.preferred.info")})]}):null};var fe=n(38501),xe=n(36061),je=n(33329);const ve=e=>{const{isAnonymous:t}=(0,o.d4)(xe.Ht),{data:n,invalidate:u}=ue({}),m=n?.me?.profile?.location,[h,g]=(0,a.useState)(),{handleLocationChange:f,locationStr:x,headerSpec:j}=e,[v,b]=(0,a.useState)(e.isDialogDefaultOpen??!1),[y,R]=(0,a.useState)(e.dialog??"browse"),[C,p]=(0,a.useState)();(0,a.useEffect)((()=>{h||g(m?.name)}),[m?.name,g,h]);const _=(0,a.useMemo)((()=>j?.changeLocationButtonFactory()),[j]),w=(0,a.useMemo)((()=>j?.changeLocationUiFactory({identifier:x})),[j,x]),N=(0,a.useMemo)((()=>w&&"currentLocationButtonFactory"in w?w?.currentLocationButtonFactory():void 0),[w]),D=(0,je.s)(),k=(0,l.NC)(fe.tE2),L=()=>{_&&!v&&D.logInteraction(_.hitUiReveal()),b(!v)},S=()=>{b(!1),R(e.dialog??"browse"),p(void 0)},I=e=>{f(e),S()},M=void 0!==h&&e.locationStr!==d.Ru.get("concerts.default_location")&&h!==e.locationStr;h!==m?.name&&e.locationStr===m?.name&&g(m.name);const E=M?(0,A.jsxs)("div",{className:ce,children:[m&&(0,A.jsx)(c.n,{size:"small",iconOnly:i.M,"aria-label":d.Ru.get("close"),onClick:()=>f({geonameId:Number(m.geonameId),name:m.name})}),(0,A.jsx)(s.$,{size:"small",iconTrailing:i.M,onClick:()=>b(!0),className:ie,children:x})]}):(0,A.jsx)(c.n,{iconLeading:r.t,onClick:L,size:"small",className:ie,children:x}),Z=e.action?(0,a.cloneElement)(e.action,{onClick:L}):E;return(0,A.jsxs)("div",{className:oe,children:[Z,v&&"browse"===y&&(0,A.jsx)(O,{title:d.Ru.get("concert.location.search.header"),onChange:I,onCancel:S,spec:w,children:!t&&(0,A.jsx)(ge,{onClick:()=>R("preferred")})}),v&&"preferred"===y&&(0,A.jsx)(O,{title:d.Ru.get("concerts.location.preferred"),onChange:e=>{R("confirm"),p(e)},onCancel:S,onBack:e.dialog?void 0:()=>R("browse"),spec:w,children:k&&"geolocation"in navigator&&(0,A.jsx)(le,{spec:N,getCurrentPosition:navigator.geolocation.getCurrentPosition.bind(navigator.geolocation),onChange:e=>{N?.hitUiReveal(),R("confirm"),p(e)}})}),v&&"confirm"===y&&C&&(0,A.jsx)(Q,{location:C,onCancel:S,onSave:async()=>{g(void 0),await u(),I(C)}})]})}},7834:(e,t,n)=>{n.d(t,{k:()=>f});var a=n(95530),o=n(86677),c=n(61759),r=n(31417),i=n(18278),s=n(57776),l=n(59147);const d=new s.l("inferredUserLocation","query","5db4c507ea735d2a1f37bd1166eca2c1a0e3387bb875ebca5d6031b6eccceeba",null);var u=n(50671),m=n(21549);const h="g8vV54lx3mRkeseb5Bf2";var g=n(86070);const f=e=>{const{data:t}=(n={},(0,l.I)(d,n,s));var n,s;const{spec:f}=(0,m.r)(c.F,{}),x=(0,u.t)(f);return t&&t.me?.profile?.location?.isInferred?(0,g.jsxs)("div",{className:h,ref:x,children:[(0,g.jsx)(a.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:r.Ru.get("concert.feed.set_location")}),(0,g.jsx)(a.E,{paddingBottom:"tighter-2",children:r.Ru.get("concert.feed.set_location_description")}),(0,g.jsx)(i.A,{locationStr:"london",dialog:"preferred",headerSpec:f,handleLocationChange:e.onLocationChange,action:(0,g.jsx)(o.$,{children:r.Ru.get("concert.feed.set_location_button")})})]}):null}},21113:(e,t,n)=>{n.d(t,{A:()=>j});var a=n(30758),o=n(95530),c=n(10887),r=n(21082),i=n(54926);const s="D_V60ibMxH9Vy7kyvWvc",l="anRK1X9LKn5HxZQJB5Tl",d="shUifmqVle_F5ILRpCqe",u="_WibGTg4OzGdsTf18zK1",m="LHhL2094jqvK0MNwlGAu",h="yRQGIh3Y05BG51IHUW2b",g="fT86P9Div4C8GXI9hZ36",f="G8sU0RZZT_ZhaEv7B26V";var x=n(86070);const j=(0,a.memo)((({date:e,image:t,title:n,subTitle:a,dateRange:j,uri:v,onClick:b})=>{const y=e?(0,i.l4)(e):void 0;return(0,x.jsxs)(r.N,{to:v,className:s,"data-testid":"concert-row",onClick:b,children:[(0,x.jsx)("time",{dateTime:e,className:l,children:y&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o.E,{as:"div",variant:"bodySmall",children:(0,i.tj)(y)}),(0,x.jsx)(o.E,{variant:"bodyMediumBold",children:(0,i.Py)(y)})]})}),t&&(0,x.jsx)(c._,{src:t,alt:"",role:"presentation",className:d}),(0,x.jsxs)("div",{className:m,children:[(0,x.jsxs)("div",{className:h,children:[(0,x.jsx)(o.E,{variant:"bodyMedium",className:u,children:n}),(0,x.jsx)(o.E,{variant:"bodySmall","data-testid":"event-venue",semanticColor:"textSubdued",children:a})]}),(0,x.jsx)(o.E,{as:"span",variant:"bodyMedium",semanticColor:"textSubdued",className:g,children:j}),(0,x.jsx)("div",{className:f,children:y&&(0,x.jsx)(o.E,{variant:"bodyMedium",semanticColor:"textSubdued",children:(0,i.WB)(y)})})]})]})}))},15558:(e,t,n)=>{n.d(t,{$V:()=>a,Bw:()=>l,Lw:()=>s,V5:()=>u,dR:()=>r,eO:()=>i,m4:()=>m,se:()=>c,w1:()=>d,ys:()=>o});const a=e=>"data"in e&&Object.keys(e.data).length>0,o=e=>"concerts"in(e??{}),c=e=>null!=e,r=e=>"__typename"in e&&"AllEvents"===e.__typename,i=e=>"__typename"in e,s=e=>"__typename"in e,l=e=>!!e&&"sections"in e,d=e=>"__typename"in e,u=e=>Object.keys(e).includes("data"),m=e=>void 0!==e&&Object.keys(e).includes("uri")},54926:(e,t,n)=>{n.d(t,{Fn:()=>m,MW:()=>h,Py:()=>d,VJ:()=>u,Vi:()=>j,WB:()=>g,WZ:()=>f,Y:()=>i,dp:()=>s,l4:()=>r,m7:()=>x,tX:()=>b,tj:()=>l});var a=n(12058),o=n(31417),c=n(15558);const r=e=>new Date(e.substring(0,16)),i=e=>o.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric"}),s=e=>o.Ru.formatDate(e,{weekday:"short",month:"short",day:"numeric",hour:"numeric",minute:"numeric"}),l=e=>o.Ru.formatDate(e,{month:"short"}),d=e=>o.Ru.formatDate(e,{day:"numeric"}),u=e=>o.Ru.formatDate(e,{weekday:"short"}),m=e=>o.Ru.formatDate(e,{month:"short",day:"numeric"}),h=e=>o.Ru.formatDate(e,{weekday:"short",hour:"numeric",minute:"numeric"}),g=e=>o.Ru.formatDate(e,{hour:"numeric",minute:"numeric"}),f=(e,t)=>{if(e.toDateString()===t.toDateString())return i(e);if(e.getMonth()===t.getMonth()){return`${o.Ru.formatDate(e,{day:"numeric",month:"short"})}–${o.Ru.formatDate(t,{day:"numeric"})}`}return`${o.Ru.formatDate(e,{day:"numeric",month:"short"})}–${o.Ru.formatDate(t,{day:"numeric",month:"short"})}`},x=e=>{if(!e)return!1;const t=new Date(e);return new Date>t},j=e=>{const[t]=e,n=e[e.length-1];return(0,c.$V)(t)&&(0,c.$V)(n)?{startDate:r(t.data.startDateIsoString),endDate:r(n.data.startDateIsoString)}:{startDate:new Date,endDate:new Date}},v={month:"short",day:"numeric"},b=e=>{if((0,a.r)(e.from,e.to))return o.Ru.formatDate(e.from,v);return`${o.Ru.formatDate(e.from,v).replace(/ /g," ")} - ${o.Ru.formatDate(e.to,v).replace(/ /g," ")}`}},73812:(e,t,n)=>{n.d(t,{Ac:()=>c,a9:()=>r,i3:()=>l,im:()=>s,re:()=>i,tI:()=>o});var a=n(31417);const o=(e,t,n)=>!!e&&(t||!n.length),c=e=>1===e.length?a.Ru.get("concert.header.upcoming_concert_title_1",...e):2===e.length?a.Ru.get("concert.header.upcoming_concert_title_2",...e):3===e.length?a.Ru.get("concert.header.upcoming_concert_title_3",...e):4===e.length?a.Ru.get("concert.header.upcoming_concert_title_4",...e):e.length>4?a.Ru.get("concert.header.upcoming_concert_title_more",...e):"",r=e=>{const t=(e=>e.artists.map((e=>e.name)))(e);return o(e.title,e.festival,t)?e.title:c(t)},i=e=>1===e.length?a.Ru.get("concert.header.entity_title_1",...e):2===e.length?a.Ru.get("concert.header.entity_title_2",...e):3===e.length?a.Ru.get("concert.header.entity_title_3",...e):4===e.length?a.Ru.get("concert.header.entity_title_4",...e):e.length>4?a.Ru.get("concert.header.entity_title_more",...e):"",s=({name:e,city:t,region:n,country:o})=>[e,t,n,o].filter((e=>!!e&&"unknown"!==e.toLowerCase())).join(a.Ru.getSeparator()),l=e=>{if(!e.artists||0===e.artists.items.length)return e.title;if(e.festival)return e.title;const t=e.artists.items.map((e=>e.profile.name));return i(t)}},10266:(e,t,n)=>{n.d(t,{K9:()=>c,gq:()=>r,zV:()=>i});const a=(e,t)=>t.formatDate(e,{year:"numeric",month:"numeric",day:"numeric"}),o=(e,t)=>t.formatDate(e,{hour:"numeric",minute:"numeric"}),c=(e,t,n,c,r)=>{if(!e||!r)return"";if(e&&t&&n&&c){const i=a(c,r),s=o(c,r);return r.get("concert.entity_metadata.title_with_date_and_time",e,t,n,i,s)}return r.get("concert.entity_metadata.title",e,t,n)},r=e=>{if(!e)return"";return`${e} Tickets - ${(new Date).getFullYear()} Concert Tour Dates | Spotify`},i=e=>`Concert Tickets & Tour Dates for you${e?` in ${e}`:""} | Spotify`}}]); +//# sourceMappingURL=1186.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/1677.js b/dot-config/spicetify/Extracted/Themed/xpui/1677.js new file mode 100755 index 00000000..cd8089bc --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/1677.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1677],{72954:(e,a,s)=>{s.d(a,{w:()=>m});var n=s(30758),t=s(97500),i=s.n(t),o=s(62955),l=s(31417),r=s(881),c=s(9547);const d="pvGZ831aNzHTQMZ8CA_u";var u=s(86070);const m=(0,n.memo)((function({onClick:e=(()=>{}),size:a,className:s,uri:t,sharingInfo:m,interactionData:h,ariaLabel:x=l.Ru.get("mwp.list.item.share"),condensedAll:p,placement:g,semanticColor:j,disableTooltip:b}){const{onCopyLink:v}=(0,c.L)({sharingInfo:m,uri:t,interactionData:h}),y=(0,n.useCallback)((()=>{v(),e()}),[e,v]);return(0,u.jsx)(r.a,{ariaLabel:x,size:a,onClick:y,className:i()(d,s),icon:o.C,condensedAll:p,placement:g,condensed:!0,semanticColor:j,disableTooltip:b})}))},33934:(e,a,s)=>{s.d(a,{k:()=>ce});var n=s(30758),t=s(97500),i=s.n(t),o=s(85387),l=s(95530),r=s(6772),c=s(23041),d=s(79871),u=s(6593),m=s(97848),h=s(22726),x=s(31417),p=s(96164),g=s(86677),j=s(17866);const b="rFwxt8s8DYY8p1O7tYZW",v="sA2HogGQNi8R_zpCWei5",y="H92pPTuqDR5DcoTtjcb3";var C=s(86070);const k=({cardHeaderText:e,buttonText:a,buttonTarget:s,className:t})=>{const o=(0,n.useCallback)((e=>{e.stopPropagation()}),[]),r=(0,h.o_h)(s).toURLPath(!0);return(0,C.jsxs)("div",{className:i()(b,t),onClick:o,children:[(0,C.jsxs)("div",{className:v,children:[(0,C.jsx)(p.p,{className:y,size:"small",semanticColor:"textBase"}),(0,C.jsx)(l.E,{as:"span",variant:"bodyMediumBold",semanticColor:"textBase",children:e})]}),(0,C.jsx)(g.$,{size:"small",colorSet:"invertedLight",component:j.v,href:r,children:a})]})};var f=s(91305),N=s(2668),E=s(53187),T=s(58110),w=s(72954),R=s(75830),P=s(91676),I=s(68204),S=s(31650),D=s(98712),B=s(19546),M=s(85346),L=s(35035),z=s(21549);const U="T9iBYqbERZHdwDl0U2tC",A="DS4BYgmEO7Wy5RutUt60",H="N2Fkohxhgu1_QAWUDc4O",F="hGbRiYkIjjy4sJvor0A2",G="OgaF7O4ER8AvZfFd6JdJ",O="bdGDIiYj50H66Hx5uevz",_="kiT5NMttSzIDbtqBKc1J",Z="TG1hsDPHeO5QUf4EQasO",Y="_NdByrVnM0OS7aK_GfRn",V="afJf_mGi7ghd5WYQwPLb",W="UpgTvLnGW6GFjAUfaPXH",Q="kxVuYXZ4sVWn6XuJgFhX",q="UvdRnanMNuY384mjTf2l",J="fmu47VumZ84IoKgMK1yU",X="dUScIGoP9fWn5IVsztB7",$={intent:"share",type:"click",itemIdSuffix:"contextmenu/episode/share"},K=n.memo((function({episodeUri:e,showUri:a,sharingInfo:s,size:t,canDownload:o,requestId:l,onMarkAsPlayed:r,onMoreButtonClick:c,name:d,fullyPlayed:u,index:m}){const h=(0,M.T)(e),{spec:p,logger:g}=(0,z.r)(f.d,{data:{uri:e,reason:l||"",position:m}}),j=t===D.E.LARGE?"medium":"small",b=(0,n.useMemo)((()=>(0,C.jsx)(N.e,{uri:e,size:j,className:i()({[G]:(0,B.X)(h)}),onClick:(a,s)=>{s===L.NV.ADD?g.logInteraction(p.downloadButtonFactory().hitDownload({itemToDownload:e})):L.NV.REMOVE&&g.logInteraction(p.downloadButtonFactory().hitRemoveDownload({itemToRemoveFromDownloads:e}))},canDownload:o,condensed:!0})),[e,h,p,g,j,o]),v=(0,n.useMemo)((()=>(0,C.jsx)(w.w,{uri:e,sharingInfo:s,interactionData:$,size:j,onClick:()=>{g.logInteraction(p.copyLinkFactory().hitShare({entityToBeShared:e,shareId:s?.shareId||""}))}})),[e,s,p,g,j]),y=(0,n.useMemo)((()=>(0,C.jsx)(T.b,{uri:e,size:j,className:G,onClick:a=>{a?g.logInteraction(p.saveToLibraryButtonFactory().hitLike({itemToBeLiked:e})):g.logInteraction(p.saveToLibraryButtonFactory().hitRemoveLike({itemNoLongerLiked:e}))},condensed:!0})),[e,p,g,j]),k=(0,S.v)(e),U=(0,n.useMemo)((()=>(0,C.jsx)(I.g,{size:j,uri:e,className:G})),[e,j]),A=(0,n.useMemo)((()=>(0,C.jsx)(R.b,{menu:(0,C.jsx)(P.b,{uri:e,showUri:a,isPlayed:u,onMarkAsPlayed:r}),children:(0,C.jsx)(E.e,{size:j,label:x.Ru.get("more.label.context",d),onClick:c})})),[e,u,d,r,c,a,j]);return(0,C.jsxs)(C.Fragment,{children:[k?U:y,b,v,A]})}));var ee=s(21082),ae=s(60281),se=s(34733),ne=s(33593),te=s(32255),ie=s(69624),oe=s(7307),le=s(72051),re=s(55769);const ce=n.memo(n.forwardRef((function({uri:e,name:a,showName:s,showUri:t,size:p,description:g,durationMs:j,images:b,badges:v,fullyPlayed:y,releaseDate:f,resumePositionMs:N,isCurrentlyPlaying:E,isPlaying:T,onContextMenu:w,onTouchStart:R,onTouchEnd:P,handlePlaybackClick:I,draggable:S,handleDragStart:B,handleClick:M,position:L,index:z,isPlayable:G,isPaywalled:$,isUserSubscribed:ce,episodeSharingInfo:de,playButtonWrapper:ue=null,highlightText:me=(e=>e),onMarkAsPlayed:he,contentInformation:xe,requestId:pe,mediaTypes:ge,onMoreButtonClick:je,status:be,variant:ve="default"},ye){const Ce=(0,o.Zp)(),ke=E&&T,fe=p===D.E.LARGE,Ne=(0,h.o_h)(e).toURLPath(!0),Ee=(0,h.o_h)(t)?.toURLPath(!0),Te=(0,ae.hD)(e,f?.isoString,N,y),we=$&&!ce,Re=ge?.includes(le.C.Video)??!1,Pe=we||G,Ie=x.Ru.get("tracklist.a11y.play",a,s),Se=x.Ru.get("tracklist.a11y.pause",a,s),De=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Ce(Ne),M&&M(e)}),[Ce,Ne,M]),Be=(0,n.useCallback)((e=>{e.stopPropagation(),e.preventDefault(),Ee&&Ce(Ee)}),[Ee,Ce]),Me=(0,n.useCallback)((e=>{e.stopPropagation(),we||I(e)}),[I,we]),Le=(0,C.jsx)(se.R,{size:"small",version:"next-best-episode"===ve?se.H.primary:se.H.secondary,onClick:Me,isPlaying:ke,disabled:!Pe,locked:we,ariaPlayLabel:Ie,ariaPauseLabel:Se}),ze=ue?ue(Le):Le,Ue=(0,C.jsx)(C.Fragment,{children:be&&(0,C.jsx)(l.E,{variant:"bodySmall",semanticColor:"textSubdued",paddingBottom:r.vw,children:be})}),Ae=(0,C.jsxs)(c.d,{className:H,href:Ne,onClick:De,lineClamp:2,children:[Te&&(0,C.jsx)(ae.Tc,{}),me(a)]}),He=(0,C.jsxs)(d.j,{lineClamp:2,paddingBottom:fe?r.v4:void 0,children:[Re&&(0,C.jsx)(ne.T,{className:V}),s&&Ee&&(0,C.jsx)(ee.N,{to:Ee,onClick:Be,children:(0,C.jsx)(l.E,{variant:"bodySmall",semanticColor:"textSubdued",children:me(s)})})]}),Fe=(0,C.jsxs)("div",{className:q,children:[(0,C.jsx)(u.v,{lineClamp:2,paddingBottom:fe?r.vw:void 0,children:me(g??"")}),(0,C.jsxs)("div",{className:O,children:[(0,C.jsx)("div",{className:W,children:v}),(0,C.jsx)(re.j,{isPlaying:ke,fullyPlayed:y,durationMs:j,releaseDate:f,resumePositionMs:N,position:E?L:void 0})]})]}),Ge=(0,C.jsxs)("div",{className:Q,children:[(0,C.jsx)("div",{onClick:e=>{e.stopPropagation()},className:F,children:(0,C.jsx)(K,{episodeUri:e,showUri:t??"",sharingInfo:de,size:p,canDownload:!$||$&&ce,requestId:pe,index:z,name:a,fullyPlayed:y,onMarkAsPlayed:he,onMoreButtonClick:je})}),(0,C.jsx)("div",{children:ze})]}),Oe="default"===ve&&(0,C.jsx)("div",{className:_,children:(0,C.jsx)(te.b,{className:i()(Z,{[Y]:fe}),type:oe.c.EPISODE,size:(e=>{switch(e){case D.E.LARGE:return ie.Qe.SIZE_112;case D.E.MEDIUM:return ie.Qe.SIZE_64;default:return ie.Qe.SIZE_48}})(p),title:a,shape:te.u.ROUNDED_CORNERS,images:b})});return(0,C.jsxs)("div",{className:i()(U,{[A]:E,[X]:"next-best-episode"===ve}),"data-testid":`episode-${z}`,draggable:S&&!!B,onDragStart:B,onClick:De,onContextMenu:w,onTouchStart:R,onTouchEnd:P,children:[xe&&(0,C.jsx)(k,{className:J,cardHeaderText:xe.cardHeaderText,buttonText:xe.buttonText,buttonTarget:xe.buttonTarget}),(0,C.jsx)(m.v,{size:"xxl",ref:ye,media:Oe,title:Ae,id:`episode-${z}`,subtitle:s&&Ee?He:Fe,pretitle:Ue,body:s&&Ee?Fe:void 0,variant:"naked",footer:Ge,hoverBackgroundColor:"backgroundHighlight",layout:fe?"wide":"regular",horizontalGap:fe?r.lT:r.CJ,verticalGap:r.v4,paddingBlockStart:r.CD,paddingBlockEnd:r.CD})]})})))},23798:(e,a,s)=>{s.d(a,{N:()=>D});var n=s(97500),t=s.n(n),i=s(50498),o=s(17763),l=s(89887),r=s(95530),c=s(86677),d=s(30758),u=s(77141);const m="pH79IoVAcUC3Hn_VbS3B",h="v24nSqF2h73Ep3EJNkNl",x="OPvfrmGjqSYso3Me5FCd",p="TCbF8QBxkRc0mqI5_lzg",g="ZYBmZ8ghf3oA7NH2mI7r",j="Jtt6TUrz6TioPQsKXIY7",b="yzZ_VZHrZBb3REPcU7tD";var v=s(86070);const y=({"aria-label":e,children:a})=>{const s=(0,d.useRef)(null),n=(0,o.Oj)();return(0,v.jsx)(u.s,{focusTrapOptions:{initialFocus:()=>s.current??!1,onPostDeactivate:()=>{n({type:"close"})}},children:(0,v.jsx)("div",{"aria-label":e,tabIndex:-1,ref:s,className:h,children:a})})},C=({title:e,body:a,cta:s,onClose:n})=>(0,v.jsxs)(y,{"aria-label":e,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:e}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,v.jsx)("div",{className:g,children:(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",onClick:n,children:s})})]});var k=s(65503),f=s(31417);const N=({onClose:e})=>{const a=f.Ru.get("paywalls.modal-heading"),s=(0,v.jsxs)(v.Fragment,{children:[f.Ru.get("paywalls.modal-body-p1"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),f.Ru.get("paywalls.modal-body-p2"),(0,v.jsx)("br",{}),(0,v.jsx)("br",{}),f.Ru.get("paywalls.modal-body-p3")]});return(0,v.jsxs)(y,{"aria-label":a,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:a}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:s}),(0,v.jsx)("div",{className:g,children:(0,v.jsx)(k.H,{size:"small",semanticColor:"textBase",onClick:e,children:f.Ru.get("close")})})]})};var E=s(79871),T=s(96250);const w=({upsellExplanation:e,gatedEntityRelations:a,onClose:s})=>{const n=e.title,i=a.entitiesWithValueProps.at(0),o=i?.summary?.forUserWithoutAccess,l=i?.valueProps.map((({displayText:e})=>e))??[],d=l?.length>1;return(0,v.jsxs)(y,{"aria-label":n,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:n}),(0,v.jsxs)(r.E,{as:"div",variant:"bodySmall",className:p,children:[o,l&&d&&(0,v.jsx)(E.j,{hasTextSeparator:!0,semanticColor:"textBase",children:l})]}),(0,v.jsxs)("div",{className:t()(g,j),children:[(0,v.jsx)(k.H,{size:"small",condensed:!0,onClick:s,children:f.Ru.get("action-trigger.button.not-now")}),(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:e.url,iconTrailing:T.H,children:e.cta})]})]})},R=({title:e,body:a,cta:s,url:n,onClose:t})=>(0,v.jsxs)(y,{"aria-label":e,children:[(0,v.jsx)(r.E,{as:"div",variant:"bodyMediumBold",className:x,children:e}),(0,v.jsx)(r.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,v.jsxs)("div",{className:g,children:[(0,v.jsx)(k.H,{size:"small",semanticColor:"textBase",onClick:t,children:f.Ru.get("close")}),(0,v.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:n,children:s})]})]});var P=s(6038),I=s(62270);const S=({showUri:e})=>{const a=(0,o.Oj)(),s=function(e){const a=(0,I.T)(),[s,n]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const s=await a.getAccessInfo(e);n(s)}catch(e){console.error(e),n(void 0)}}()}),[a,e]),s}(e);if(null===s)return null;let n=(0,v.jsx)(N,{onClose:()=>a({type:"close"})});return s?.basic&&(n=(0,v.jsx)(C,{...s.basic,onClose:()=>a({type:"close"})})),s?.upsellLink&&(n=(0,v.jsx)(R,{...s.upsellLink,onClose:()=>a({type:"close"})})),s?.gatedEntityRelations&&s?.upsellLink&&(n=(0,v.jsx)(w,{upsellExplanation:s.upsellLink,gatedEntityRelations:s.gatedEntityRelations,onClose:()=>a({type:"close"})})),(0,v.jsxs)(i.A,{colorSet:"announcement",className:m,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},children:[n,(0,v.jsx)("div",{"data-popper-arrow":"",className:t()(b)})]})},D=({children:e,enabled:a,showUri:s,renderInline:n=!0})=>a&&s?(0,v.jsx)(P.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:n,content:(0,v.jsx)(S,{showUri:s}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},54003:(e,a,s)=>{s.d(a,{y:()=>o});var n=s(31417),t=s(64281),i=s(86070);const o=()=>(0,i.jsx)(t.E,{ariaLabel:n.Ru.get("paid"),text:n.Ru.get("paid")})},19546:(e,a,s)=>{s.d(a,{X:()=>t});var n=s(35035);function t(e){return[n.kw.YES,n.kw.DOWNLOADING,n.kw.WAITING].includes(e)}}}]); +//# sourceMappingURL=1677.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/1706.js b/dot-config/spicetify/Extracted/Themed/xpui/1706.js new file mode 100755 index 00000000..b2e7c106 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/1706.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1706],{41706:(e,s,a)=>{a.d(s,{A:()=>Ce});var l=a(97500),t=a.n(l),r=a(62411),i=a(85505),n=a(14343),c=a(36132),o=a(22726),u=a(15292),d=a(22212),g=a(30758),m=a(95530),h=a(31417),v=a(70076),b=a(30147),y=a(87182);const x="lyrics-lyrics-contentContainer",S="lyrics-lyrics-contentWrapper",p="GML6YUVCeJvRhGznLnqm";var j=a(86070);const L=({trackUri:e,data:s,format:a,spec:l,logger:t,isSnippet:r})=>{const i=(0,y.z)(),n=(0,b.v7)(),{isTimeSynced:c}=s,o=(0,g.useCallback)(((e,s)=>{if(l&&t){const e=l.lyricsLineFactory().hitSeekToTime({msToSeekTo:s});t.logInteraction(e)}e.currentTarget.scrollIntoView({behavior:"smooth",block:"center",inline:"center"}),i.seekTo(s);const a=i.getState();a&&!a.isPaused||i.resume()}),[t,i,l]),u=(0,g.useCallback)((({lineRef:e,firstUpdate:s,isFirstLine:a,isActiveLine:l,activeLineIndex:t,hasSkipped:r,shouldAnimateScroll:i})=>{if(e.current&&n.current&&(l||a&&t<0)){const a=e.current.getBoundingClientRect().top,l=n.current.getBoundingClientRect().height,t=l/4,c=a>=t&&a<=l-t;if(!c&&!(s||r))return;const o="visible"===document.visibilityState&&i&&c?"smooth":"auto";e.current?.scrollIntoView({behavior:o,block:"center",inline:"center"})}}),[n]);return(0,j.jsx)("div",{className:x,children:(0,j.jsxs)("div",{className:S,children:[!r&&!c&&(0,j.jsx)(m.E,{as:"p",variant:"bodySmall",className:p,dir:"auto",children:h.Ru.get("web-player.lyrics.unsynced")}),(0,j.jsx)(v.x,{trackUri:e,data:s,format:a,onLineClick:c?o:void 0,onActiveLineChange:u,isSnippet:r},e)]})})};var f=a(26926),N=a(85907);const w="e7eFLioNSG5PAi1qVFT4",R="vkO5F4KbLk8mbjZoy1Lf",C=(0,g.memo)((function({version:e}){const{getMessage:s}=(()=>{const e=[h.Ru.get("web-player.lyrics.noLyrics0"),h.Ru.get("web-player.lyrics.noLyrics1"),h.Ru.get("web-player.lyrics.noLyrics2"),h.Ru.get("web-player.lyrics.noLyrics3")];return{getMessage:s=>{let a;switch(s){case"ad":a=h.Ru.get("web-player.lyrics.ad");break;case"error":a=h.Ru.get("web-player.lyrics.error");break;case"unavailable":a=e[Math.floor(Math.random()*e.length)];break;default:(0,N.k)(s),a=""}return a}}})();return(0,j.jsx)("div",{className:w,children:(0,j.jsx)("span",{className:R,children:s(e)})})}));var k=a(85387),A=a(60749),E=a(86677),G=a(54454),I=a(19329),F=a(50671);const T="hS_lrRHiW4BSWL8WcE8Q",_="O7ooKKJG0MArEwDgD6IV",O="XZ1MeB_1byeFy7W6Eg6u",Y="lq_cmE3Xcg5QJhvbBnPR",B="zPI8TW58LMxEQDIq_GdA",U="lyrics",D=({spec:e,logger:s})=>{const{openURLWithSessionTransfer:a}=(0,I.L)(),l=(0,G.k)(),{url:t,isExternal:r}=l,i=(0,k.Zp)(),n=(0,g.useCallback)((()=>{const l=new URL(t),n=new URLSearchParams(l.search);n.append("ref",U),l.search=n.toString();const c=l.href;if(!1===r){const e=(0,A.PI)({ref:U});i({pathname:"/premium",search:e.toString()})}else a(c);s.logInteraction(e.lyricsUpsellFactory().lyricsUpsellButtonFactory().hitNavigateToExternalUri({destination:c}))}),[t,r,s,e,i,a]),c=(0,F.t)(e.lyricsUpsellFactory());return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{className:T}),(0,j.jsx)("div",{className:_,children:(0,j.jsxs)("div",{className:B,ref:c,children:[(0,j.jsx)(m.E,{semanticColor:"textBase",variant:"titleLarge",className:Y,children:h.Ru.get("web-player.lyrics.upsell.title")}),(0,j.jsx)(E.$,{className:O,size:"small",onClick:n,colorSet:"invertedLight",children:h.Ru.get("web-player.lyrics.upsell.button")})]})})]})};var z=a(15262),W=a(15525),V=a(61690),H=a(22699),J=a(53860),M=a(84703),q=a(75830),P=a(10994),Z=a(41874),K=a(12864),Q=a(90862),X=a(77153);const $="na1tzIwfHqXPiMw_7NOd",ee="lVJJcrObmZtZsWaq8H3A",se=[{volume:Q.Y9.SING_ALONG_OFF,icon:(0,j.jsx)(z.X,{size:"small"}),get label(){return h.Ru.get("singalong.off")}},{volume:Q.Y9.HIGH,icon:(0,j.jsx)(W.C,{size:"small"}),get label(){return h.Ru.get("singalong.more-vocal")}},{volume:Q.Y9.LOW,icon:(0,j.jsx)(V.D,{size:"small"}),get label(){return h.Ru.get("singalong.less-vocal")}}],ae=g.memo((function({currentTrackUri:e}){const{isSupported:s,volume:a,setVocalVolume:l}=(e=>{const s=(0,X.S)(),[a,l]=(0,g.useState)(Q.Y9.SING_ALONG_OFF),{isSupported:t}=s.getCapabilities();return(0,g.useEffect)((()=>{s.setStatus(Q.nW.DISABLED).then((()=>{l(Q.Y9.SING_ALONG_OFF)}))}),[e,s]),(0,g.useEffect)((()=>()=>{s.setStatus(Q.nW.DISABLED)}),[s]),{isSupported:t,volume:a,setVocalVolume:(0,g.useCallback)((async e=>{e===Q.Y9.SING_ALONG_OFF?await s.setStatus(Q.nW.DISABLED):await s.setStatus(Q.nW.ENABLED),await s.setVocalVolume(e),l(e)}),[s])}})(e),r=(0,g.useCallback)((e=>{s&&l(e.volume)}),[s,l]);if(!s)return null;const i=se.find((e=>e.volume===a)),n=i?.volume===Q.Y9.SING_ALONG_OFF;return(0,j.jsx)(q.b,{menu:(0,j.jsxs)(P.W,{children:[(0,j.jsx)(Z.y,{children:h.Ru.get("singalong.title")}),se.map((e=>(0,j.jsx)(K.D,{role:"menuitemradio","aria-checked":a===e.volume,"aria-label":e.label,onClick:()=>r(e),leadingIcon:e.icon,children:e.label},e.volume)))]}),children:(e,s,a)=>(0,j.jsxs)("button",{onClick:s,ref:a,type:"button",className:t()($,{[ee]:n}),children:[n?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(H.q,{size:"small"}),(0,j.jsx)(m.E,{variant:"bodySmall",children:h.Ru.get("singalong.button")})]}):(0,j.jsxs)(j.Fragment,{children:[i.icon,(0,j.jsx)(m.E,{variant:"bodySmall",children:i.label})]}),e?(0,j.jsx)(J.J,{size:"small"}):(0,j.jsx)(M.y,{size:"small"})]})})}));var le=a(62752),te=a(18893),re=a(18133),ie=a(84291),ne=a(38501),ce=a(411),oe=a(36475),ue=a(79237),de=a(5179),ge=a(58685),me=a(21549);const he="lyrics-lyrics-container",ve="VznvlkEh9fhk1AKhhZwe",be="iSeDDdAUlWo8OJbCKDLw",ye="rSXzEXBdsRTaK6qSBHYg",xe="UdJMosuRv5_ySWnmSPZH",Se="zEwFftu1Dw68QKaKj_EE",pe="lyrics-lyrics-background",je=(0,j.jsx)("div",{className:Se,children:(0,j.jsx)(d.m,{})}),Le=(0,j.jsx)(C,{version:"error"}),fe=(0,j.jsx)(C,{version:"ad"}),Ne=(0,j.jsx)(C,{version:"unavailable"}),we={active:i.ONy,inactive:i.Ql9,passed:i.Ql9,background:i.wdA,messaging:i.ONy},Re=(e,s)=>{switch(s){case ne.bYw.CONTROL:default:return e;case ne.bYw.EMPTY_LYRICS:return{...e,lyrics:[]};case ne.bYw.TRUNCATED_LYRICS:return{...e,lyrics:e.lyrics.slice(0,5)}}},Ce=({format:e})=>{const s=(0,re.X)(),a=(0,ue.v)((e=>e.activeDevice?.isLocal)),l=(0,ge.o)((e=>e?.item),((e,s)=>e?.uri===s?.uri)),i=l?.uri||"",{spec:d,logger:g}=(0,me.r)(c.V,{data:{uri:i}}),{data:m,loading:h,error:v}=(0,te.J)(),b=(0,n.NC)(ne.bOR),y=(0,n.NC)(ne.JSO,{loadingValue:ne.bYw.CONTROL}),x=(0,de.H)(),S=x?.higherContrast;let p=!1,N=we;m?.hasLyrics&&(b&&(p=m.showUpsell),y!==ne.bYw.TRUNCATED_LYRICS&&y!==ne.bYw.EMPTY_LYRICS||(p=!0),N={active:S?.textBase.toCSS(oe.a.RGBA)??m.colors.activeText,inactive:S?.textSubdued.toCSS(oe.a.RGBA)??m.colors.text,passed:S?.textBase.toCSS(oe.a.RGBA)??ce.Q.fromCSS(m.colors.activeText,.7).toCSS(oe.a.RGBA),background:S?.backgroundBase.toCSS(oe.a.RGBA)??m.colors.background,messaging:S?.textSubdued.toCSS(oe.a.RGBA)??m.colors.text}),(0,ie.z)(N.background,we.background);const w=(0,ge.o)((e=>e?.nextItems?.[0]),((e,s)=>e?.uri===s?.uri));(0,le.I)(w?.uri,w?.images);let R=je,C=!1;if(i)if((0,o.AIy)(i))R=fe;else if(v)R=Le;else if(h)R=je;else if(m)if(m.hasLyrics){const l=a??!1;C=s&&m.hasVocalRemoval&&l,R=(0,j.jsx)(L,{trackUri:i,data:Re(m,y),format:e,spec:d,logger:g,isSnippet:p})}else R=Ne;const k=(0,r.d4)((e=>e.ads.leaderboard.isEnabled)),A={"--lyrics-color-active":N.active,"--lyrics-color-inactive":N.inactive,"--lyrics-color-passed":N.passed,"--lyrics-color-background":N.background,"--lyrics-color-messaging":N.messaging,"--show-gradient-over-lyrics":p?"block":void 0};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(u.Q,{usePlayingItem:!0,children:"Spotify"}),(0,j.jsxs)("div",{className:t()(he,{[ve]:k}),style:A,children:[(0,j.jsx)("div",{className:pe}),R,(0,j.jsxs)("div",{className:be,children:[(0,j.jsx)("div",{className:ye,children:"cinema"!==e&&(0,j.jsx)(f.R,{})}),(0,j.jsx)("div",{className:xe,children:C?(0,j.jsx)(ae,{currentTrackUri:i}):null})]}),p&&(0,j.jsx)(D,{spec:d,logger:g})]})]})}},26926:(e,s,a)=>{a.d(s,{R:()=>G});var l=a(30758),t=a(97500),r=a.n(t),i=a(62411),n=a(37442),c=a(45867),o=a(95530),u=a(84703),d=a(14343),g=a(31417),m=a(75830),h=a(10994),v=a(12864),b=a(18893),y=a(30631),x=a(28874),S=a(43329);const p="ZEIqEgvTSLMYDUyg4fwD",j="JCMG2XpPpmwVFJCmRsv8",L="G5xyHz2quLjuzQhFHUb4",f="qYiwqn2o_ph2NxiAfCpG",N="aENlvMWeYBOLGGB34Tpl",w="GdrYdqKUxEn8rN8JLnFW",R="AH1Gz87FuBEFAIF3XbA4";var C=a(86070);const k=e=>{try{if(e){const s=new Intl.DisplayNames([e],{type:"language"}).of(e);return s?s.charAt(0).toUpperCase()+s.slice(1):e}return""}catch(s){return e||""}},A=()=>{const e=(0,i.wA)(),{data:s}=(0,b.J)(),a=(0,i.d4)(x.s),t=(0,l.useCallback)((()=>{e(a?(0,y.gL)(""):(0,y.gL)(navigator.language))}),[e,a]);return s?.hasLyrics&&(s.alternatives||[]).length>0?(0,C.jsx)("button",{className:p,onClick:t,children:(0,C.jsx)("div",{className:r()(f,{[L]:a}),children:(0,C.jsx)(n.H,{fill:"white",size:"small"})})}):null},E=()=>{const e=(0,i.wA)(),{data:s}=(0,b.J)(),a=(0,i.d4)(x.s),[t,d]=(0,l.useState)(!1),S=s?.hasLyrics&&(s.alternatives||[]).length>0,A=a&&s?.hasLyrics&&(s.alternatives||[]).find((e=>e.language.substring(0,2)===a.substring(0,2)));if(!S)return null;const E=(0,C.jsx)(h.W,{children:[{language:""},...s.alternatives||[]].map((({language:s})=>{let l=g.Ru.get("web-player.lyrics.translation.none");return s&&(l=k(s)),(0,C.jsx)(v.D,{trailingIcon:s===a?(0,C.jsx)(c.i,{size:"small",semanticColor:"textBrightAccent"}):null,role:"menuitem",onClick:()=>{e((0,y.gL)(s))},children:l},s)}))});return(0,C.jsx)("div",{className:p,children:(0,C.jsx)(m.b,{renderInline:!0,menu:E,onShow:()=>d(!0),onHide:()=>d(!1),children:(0,C.jsxs)("div",{className:r()(j,{[L]:A}),children:[(0,C.jsx)("div",{className:f,children:A?(0,C.jsx)(n.H,{fill:"black",size:"small"}):(0,C.jsx)(n.H,{size:"small"})}),(0,C.jsxs)("div",{className:R,children:[(0,C.jsx)(o.E,{variant:"bodySmallBold",children:a?A?g.Ru.get("web-player.lyrics.translating.to",k(a)):g.Ru.get("web-player.lyrics.translation.not_available",k(a)):g.Ru.get("web-player.lyrics.translate")}),(0,C.jsx)(u.y,{className:r()(N,{[w]:t}),size:"small"})]})]})})})},G=()=>{switch((0,d.NC)(S.Tc,{loadingValue:S.LZ.CONTROL})){case S.LZ.CONTROL:default:return null;case S.LZ.SYSTEM_LANGUAGE:return(0,C.jsx)(A,{});case S.LZ.ALL_LANGUAGES:return(0,C.jsx)(E,{})}}}}]); +//# sourceMappingURL=1706.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/2979.js b/dot-config/spicetify/Extracted/Themed/xpui/2979.js new file mode 100755 index 00000000..fc18b389 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/2979.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[2979],{89702:(e,t,r)=>{r.d(t,{R:()=>T});var n=r(30758),l=r(71217),o=r(22949);function u(e,t,r=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,o.fk)(e))return;const n=e.querySelector('[tabindex="0"]');t===l.O.UP&&(0,o.MS)(n,s(e,n,l.O.UP,r)),t===l.O.DOWN&&(0,o.MS)(n,s(e,n,l.O.DOWN,r)),t===l.O.RIGHT&&(0,o.MS)(n,c(n,l.O.RIGHT,r)),t===l.O.LEFT&&(0,o.MS)(n,c(n,l.O.LEFT,r)),t===l.O.HOME&&(0,o.MS)(n,a(l.O.HOME,r)??n),t===l.O.END&&(0,o.MS)(n,a(l.O.END,r)??n)}function s(e,t,r,n=!1){const u=t.closest('li[role="row"]');if(!u)return t;let s=u;const a=Array.from(e.querySelectorAll('li[role="row"]')),i=Array.from(u.querySelectorAll(o.nu)),f=a.indexOf(u);if(f<0)return t;const d=(n&&t!==i[0]||!n&&t!==u)&&!(t instanceof HTMLLIElement);if(r===l.O.UP){if(document.activeElement===e){s=a[a.length-1];return(n?s.querySelector(o.nu):s)??t}if(d)return c(t,l.O.LEFT,n);let r=f-1;if(-1===r)return t;s=a[r],r-=1}else if(r===l.O.DOWN){if(document.activeElement===e){s=a[0];return(n?s.querySelector(o.nu):s)??t}if(d)return c(t,l.O.RIGHT,n);let r=f+1;if(r===a.length)return t;s=a[r],r+=1}return(n?s.querySelector(o.nu):s)??t}function c(e,t,r=!1){const n=e.closest('li[role="row"]');if(!n)return e;let u=e;const s=Array.from(n.querySelectorAll(o.nu)),c=s.indexOf(e);let a=0;if(t===l.O.RIGHT&&c-1!==s.length)a=c+1;else{if(t===l.O.LEFT&&-1===c)return n;if(t===l.O.LEFT&&0!==c)a=c-1;else if(t===l.O.LEFT&&0===c){return(r?n.querySelector(o.nu):n)??n}}return u=s.at(a),u??e}function a(e,t=!1){const{currentFocus:r,listEl:n}=function(){const e=document.activeElement,t=e?.closest("ul");return((0,l.I)(e)||e instanceof HTMLLIElement)&&t?{currentFocus:e,listEl:t}:{currentFocus:null,listEl:null}}();if(null===r||null===n)return null;const u=r.closest('li[role="row"]');if(!u)return r;const s=Array.from(n.querySelectorAll('li[role="row"]')),c=Array.from(u.querySelectorAll(o.nu));if(s.indexOf(u)<0)return r;const a=t&&r===c[0]||!t&&r===u;if(e===l.O.HOME){if(a){return(t?s[0].querySelector(o.nu):s[0])??r}return(t?c[1]:c[0])??r}if(e===l.O.END){if(a){return(t?s[s.length-1].querySelector(o.nu):s[s.length-1])??r}return c[c.length-1]??r}return r}var i=r(43356),f=r(35662),d=r(86070);const T=(0,n.forwardRef)((({onKeyDown:e,children:t,firstInteractiveIsWrapper:r=!1,...s},c)=>{const a=(0,f.N)(c);(0,i.R)(a);const T=(0,n.useCallback)((t=>{a.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key&&"Home"!==t.key&&"End"!==t.key||t.preventDefault(),"ArrowUp"!==t.key&&"ArrowDown"!==t.key||document.documentElement.classList.remove("no-focus-outline"),"ArrowUp"===t.key&&u(a.current,l.O.UP,r),"ArrowDown"===t.key&&u(a.current,l.O.DOWN,r),"ArrowRight"===t.key&&u(a.current,l.O.RIGHT,r),"ArrowLeft"===t.key&&u(a.current,l.O.LEFT,r),"Home"===t.key&&u(a.current,l.O.HOME,r),"End"===t.key&&u(a.current,l.O.END,r),e?.(t))}),[r,a,e]),S=(0,n.useCallback)((e=>{if(!a.current)return;const t=e.target,r=a.current.querySelector('[tabindex="0"]');t.closest('li[role="row"]')&&t!==r&&(0,o.MS)(r,t,{preventScroll:!0})}),[a]);return(0,d.jsx)("ul",{role:"treegrid",ref:a,onKeyDown:T,onFocus:S,tabIndex:0,...s,children:t})}))},20616:(e,t,r)=>{r.d(t,{W:()=>u});var n=r(30758),l=r(73891),o=r(86070);const u=({children:e,innerRef:t,reRunOnDOMUpdate:r=!1,...u})=>{const s=(0,n.useRef)(null),c=t??s;return(0,l.g)(c,r),(0,o.jsx)("li",{ref:c,"aria-expanded":"true","aria-level":1,role:"row",...u,children:e})}},42583:(e,t,r)=>{r.d(t,{Nz:()=>s,Vp:()=>o,Vv:()=>c,wD:()=>a,xz:()=>u});var n=r(76123),l=r(96566);const o=[n.fl.TRACKS,n.fl.LOCAL_TRACKS,n.fl.ALBUMS,n.fl.ARTISTS,n.fl.PLAYLISTS,n.fl.PLAYLISTS_V2,n.fl.FOLDERS,n.fl.EPISODES,n.fl.CHAPTERS,n.fl.SHOWS,n.fl.AUDIOBOOKS,n.fl.PSEUDO_PLAYLISTS],u={[n.fl.TRACKS]:"tracks",[n.fl.ALBUMS]:"albums",[n.fl.ARTISTS]:"artists",[n.fl.PLAYLISTS]:"playlists",[n.fl.FOLDERS]:"folders",[n.fl.SHOWS]:"shows",[n.fl.EPISODES]:"episodes",[n.fl.CHAPTERS]:"chapters",[n.fl.LOCAL_TRACKS]:"local-tracks",[n.fl.AUDIOBOOKS]:"audiobooks",[n.fl.PSEUDO_PLAYLISTS]:"pseudo-playlists"};let s=function(e){return e.ON="on",e.BEFORE="before",e.AFTER="after",e}({});const c=(0,l.g)(s);function a(e){return o.includes(e)}},50925:(e,t,r)=>{r.d(t,{A:()=>O});var n=r(30758),l=r(88308),o=r(76123),u=r(42583);function s(e,t,r,n){if(e.defaultPrevented)return null;const l=t.includes(u.Nz.BEFORE),o=t.includes(u.Nz.AFTER);let s=u.Nz.ON;if(e.currentTarget instanceof HTMLElement&&(l||o)){const{top:o,height:c,left:a,width:i,right:f}=e.currentTarget.getBoundingClientRect(),d=t.includes(u.Nz.ON);if("horizontal"===r)if(d&&l){(n?e.clientX>Math.round(f)-i/4:e.clientXMath.round(f)-i/2:e.clientX!!(0,u.wD)(e)&&t.includes(e))).filter(u.wD)}var i=r(13719);function f(e,t,r){const n=a(e,t);if(!n.length)return function(e,t){return e.split(/[\s,;]+/g).map((e=>(0,c.o_h)(e?.trim()))).filter(i.P).reduce(((e,r)=>{const n=o.Ay[r.type];return(0,u.wD)(n)&&t.includes(n)?(e[n]||=[],e[n].push(r.toURI()),e):e}),{})}(e.dataTransfer?.getData("text/plain"),t);const l=Object.fromEntries(n.map((t=>[t,e.dataTransfer?.getData(t)?.split("\n").filter(Boolean)??[]])));if(r){const{[o.fl.PLAYLISTS]:e,...t}=l,r=Array.from(new Set([...l[o.fl.PLAYLISTS_V2]??[],...(l[o.fl.PLAYLISTS]??[]).map(d)]));return{...t,...r.length?{[o.fl.PLAYLISTS_V2]:r}:null}}return l}function d(e){const t=(0,c.o_h)(e);return t?.type===c.NQG.PLAYLIST?(0,c.Pse)(t.id).toURI():e}var T=r(97503),S=r(37178);const p={droppableMimeTypes:"albums artists episodes chapters folders playlists shows tracks local-tracks audiobooks pseudo-playlists",useDropTarget:"main-useDropTarget-base","useDropTarget--albums":"main-useDropTarget-album","useDropTarget--artists":"main-useDropTarget-artist","useDropTarget--episodes":"main-useDropTarget-episode","useDropTarget--chapters":"OxrHhBsQAggwnv6RmqRy","useDropTarget--folders":"main-useDropTarget-folder","useDropTarget--playlists":"main-useDropTarget-playlist","useDropTarget--shows":"main-useDropTarget-show","useDropTarget--tracks":"main-useDropTarget-track","useDropTarget--local-tracks":"main-useDropTarget-local","useDropTarget--audiobooks":"main-useDropTarget-audiobook","useDropTarget--pseudo-playlists":"main-useDropTarget-pseudoPlaylist"};function O({uri:e,id:t=e,allowedMimeTypesByDropPosition:r,onDrop:c,onLongDragOver:i,longDragOverTimeout:d=1e3,reorderDirection:O="vertical"}){const E=(0,l.lB)((()=>r),[r]),m=(0,S.W)(),y=(0,T.wK)(),D=!!t&&1===y.length&&y[0]===t,L=Object.values(E).every((e=>e.includes(o.fl.PLAYLISTS_V2)&&!e.includes(o.fl.PLAYLISTS))),[A,v]=(0,n.useState)(null),h=(0,n.useCallback)((e=>D?[]:Object.entries(E).filter((([t,r])=>a(e,r).length>0)).map((([e])=>e)).filter(u.Vv)),[D,E]),w=(0,n.useRef)(!0),R=(0,n.useRef)(null),k=(0,n.useRef)(c);k.current=c;const I=(0,n.useRef)(i);I.current=i;const b=(0,n.useCallback)((()=>{w.current=!0,v(null),R.current&&(window.clearTimeout(R.current),R.current=null)}),[]);(0,n.useEffect)((()=>b),[b]);const N=(0,n.useCallback)((e=>{const t=h(e);t.length&&(v(s(e,t,O,m)),e.dataTransfer&&!e.defaultPrevented&&(e.dataTransfer.dropEffect=t.includes(u.Nz.ON)?"copy":"move"),e.preventDefault())}),[h,m,O]),P=(0,n.useCallback)((e=>{if(h(e).length&&!e.defaultPrevented){if(w.current){w.current=!1;const t=e.currentTarget,r=()=>{document.contains(t)||(b(),document.removeEventListener("dragenter",r))};document.addEventListener("dragenter",r),document.addEventListener("dragend",(()=>{document.removeEventListener("dragenter",r),b()}),{once:!0}),I.current&&(R.current=window.setTimeout((()=>{I.current?.()}),d))}e.preventDefault()}}),[h,d,b]),F=(0,n.useCallback)((e=>{h(e).length&&(function(e){return null===e.relatedTarget&&g?!document.elementsFromPoint(e.clientX,e.clientY).includes(e.currentTarget):!e.currentTarget.contains(e.relatedTarget instanceof Node?e.relatedTarget:null)}(e)&&b(),e.preventDefault())}),[h,b]),M=(0,n.useCallback)((e=>{const t=s(e,h(e),O,m);if(!e.defaultPrevented&&t){const r=f(e,E[t]??[],L),n=function(e){return{sectionId:parseInt(e.dataTransfer.getData("text/x-spotify-section"),10)||0,contextUri:e.dataTransfer.getData("text/x-spotify-context"),itemIds:e.dataTransfer.getData(o.fl.UIDS)?.split("\n").filter(Boolean)??[]}}(e);Object.keys(r).length&&k.current&&(k.current(r,t,n),e.preventDefault())}b()}),[h,O,m,b,E,L]),H=(0,n.useMemo)((()=>`${p.useDropTarget} ${Array.from(new Set(Object.values(E).flat()))?.map((e=>p[`useDropTarget--${u.xz[e]}`]??"")).join(" ")}`),[E]);return(0,n.useMemo)((()=>({dropPosition:A,className:H,onDragEnter:P,onDragLeave:F,onDragOver:N,onDrop:M})),[H,A,P,F,N,M])}const g=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)},43356:(e,t,r)=>{r.d(t,{R:()=>l});var n=r(30758);const l=e=>{const[t,r]=(0,n.useState)(null);(0,n.useEffect)((()=>{const t=e.current;if(!t)return()=>{};const n=({target:e})=>{e instanceof HTMLElement&&r(e)};return t.addEventListener("focusout",n),()=>{t.removeEventListener("focusout",n)}}),[e]),(0,n.useEffect)((()=>{const n=e.current;if(!t||!n)return;const l=n.contains(t),o=n.contains(document.activeElement);!l&&!o&&n.focus({preventScroll:!0}),r(null)}),[e,t])}},35662:(e,t,r)=>{r.d(t,{N:()=>l});var n=r(30758);function l(e){const t=(0,n.useRef)(null);return(0,n.useEffect)((()=>{e&&("function"==typeof e?e(t.current):e.current=t.current)})),t}}}]); +//# sourceMappingURL=2979.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/3282.css b/dot-config/spicetify/Extracted/Themed/xpui/3282.css new file mode 100755 index 00000000..9320bad5 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/3282.css @@ -0,0 +1 @@ +.dRD7dgAMZVRuTdelaf6B{inline-size:420px!important;left:50%;padding:32px;position:fixed!important;top:50%;-webkit-transform:translate(-50%,-50%);transform:translate(-50%,-50%);-webkit-padding-before:32px!important;padding-block-start:32px!important}.dRD7dgAMZVRuTdelaf6B h1{font-size:1.5rem}.sFr9SHK1H3ZYdz2_jWqY{color:inherit;text-decoration:underline}.sFr9SHK1H3ZYdz2_jWqY:hover{text-decoration:none}.AckhtqapSIpyTPpQGw7y{text-transform:uppercase} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/3282.js b/dot-config/spicetify/Extracted/Themed/xpui/3282.js new file mode 100755 index 00000000..8457fc37 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/3282.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3282],{80901:(e,t,i)=>{i.r(t),i.d(t,{SNACKBAR_ID:()=>y,default:()=>S});var a=i(30758),r=i(60348),n=i(63123),o=i(83967),s=i(31417),c=i(26344),u=i(60749),l=i(37339),d=i(95530),f=i(86677);const g="dRD7dgAMZVRuTdelaf6B",m="sFr9SHK1H3ZYdz2_jWqY",h="AckhtqapSIpyTPpQGw7y";var v=i(86070);const p="dialog-robot";const b=()=>{const[e,t]=(0,a.useState)(!0);return e?(0,v.jsx)(l.j,{"data-testid":p,id:p,"aria-label":"Dialog robot",dialogTitle:s.Ru.get("user-fraud-verification.dialog-alert.title"),colorSet:"invertedLight",className:g,body:(0,v.jsx)(d.E,{as:"p",children:(i=s.Ru.get("user-fraud-verification.dialog-alert.describe"),r=e=>(0,v.jsx)(u.N_,{to:"/playlist/37i9dQZF1DWUcRrhkfhG22",className:m,children:e},e),i.split(/(\{0\}.*)\{1\}/).map((e=>e.startsWith("{0}")?r(e.split("{0}")[1]):e)))}),footer:(0,v.jsx)(f.$,{className:h,onClick:()=>t(!1),children:s.Ru.get("user-fraud-verification.dialog-alert.ok")})}):null;var i,r};var R=i(55623),_=i(6582),T=i(29195),I=i(1599),k=i(12641),x=i(21398);var N=i(66737);const y="snackbar-user-fraud-verification",S=({verificationId:e})=>{const t=(0,a.useRef)(Date.now()),[i,u]=(0,a.useState)(!1),[l,d]=(0,a.useState)(!1),[f,g]=(0,a.useState)(!1),m=(0,T.vh)(),h=(()=>{const e=(0,T.vh)(),{mutate:t}=(0,R.n)({mutationFn:e=>{const t=I.n.getInstance();return(0,k.s)(t,e)},onError:(t,i)=>{e.send((0,_.D)({id:i,method:"IN_APP_VERIFICATION_V0",error_message:t instanceof x.O?t.message:null,http_method:"put",http_path:`/verification/${i}`}))}});return t})(),{isTrustedRef:p,isTrustedFn:S}=(0,N.d)(),j=async(i,a)=>{const r=Date.now()-t.current,{type:n}=a;await S(a),m.send((0,o.Y)({id:e,method:"IN_APP_VERIFICATION_V0",action:i,interaction_details:{reaction_time:`${r}`,event_triggered:JSON.stringify({type:n,isTrusted:p.current})}})),e&&h(e)};return l?null:f?(0,v.jsx)(b,{}):i?(0,v.jsx)(r.qb,{"data-testid":y,className:(0,n.Ju)("announcement"),showSnackbar:!0,children:s.Ru.get("user-fraud-verification.snackbar.message")}):(0,v.jsx)(c.T,{"aria-label":s.Ru.get("user-fraud-verification.confirm-dialog.title"),titleText:s.Ru.get("user-fraud-verification.confirm-dialog.title"),descriptionText:s.Ru.get("user-fraud-verification.confirm-dialog.description"),onConfirm:e=>{j("human",e),u(!0)},onClose:e=>{j("robot",e),g(!0)},onOutside:e=>{j("robot",e),d(!0)},confirmText:s.Ru.get("user-fraud-verification.confirm-dialog.confirm"),confirmLabel:s.Ru.get("user-fraud-verification.confirm-dialog.label"),cancelText:s.Ru.get("user-fraud-verification.confirm-dialog.cancel")})}}}]); +//# sourceMappingURL=3282.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/3848.js b/dot-config/spicetify/Extracted/Themed/xpui/3848.js new file mode 100755 index 00000000..1725b1b7 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/3848.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[3848],{60965:(e,t,l)=>{l.d(t,{R:()=>n});var s=l(30758),a=l(70381);const n=()=>{const[e,t]=(0,s.useState)(!1),l=(0,a.K)(a.X.CollaborativePlaylists);return(0,s.useEffect)((()=>{l&&t(!0)}),[l,t]),{toggleActivationVisible:e,setToggleActivationVisible:t}}},77:(e,t,l)=>{l.d(t,{u:()=>ee,Y:()=>te});var s=l(30758),a=l(97500),n=l.n(a),i=l(62411),o=l(65503),r=l(91227),u=l(31417),c=l(75830),f=l(99701),d=l(95530),h=l(2792),b=l(26209),m=l(10994),S=l(12864),g=l(91128),y=l(88091),v=l(23289);const p="zNnlcxsmnV1RiWXSd4IA",F="a3sk2brhAAMoZderfRfg";var R=l(86070);const j=({icon:e,name:t,isActive:l,onClick:s,isDsaRestricted:a})=>{const n=l?"textBrightAccent":void 0;return(0,R.jsx)(S.D,{role:"menuitemradio",leadingIcon:(0,R.jsx)(e,{iconSize:16,semanticColor:n}),onClick:s,"aria-checked":l,disabled:a,children:(0,R.jsx)(d.E,{variant:"bodySmall",semanticColor:n,children:t})})},A=({shuffleMode:e,onClick:t,spec:l,logger:a,isDsaRestricted:n})=>{const r=(0,i.wA)(),c=(0,s.useCallback)((()=>{r(g.cI.actions.open())}),[r]),f=(0,s.useCallback)((()=>{t(v.j.ON,(e=>{l&&(e?a.logInteraction(l?.toggleShuffleButtonFactory().hitShuffleDisable()):a.logInteraction(l?.toggleShuffleButtonFactory().hitShuffleEnable()))}))}),[a,t,l]),S=(0,s.useCallback)((()=>{const e=e=>{l&&(e?a.logInteraction(l?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"smart_shuffle",selectedMode:"linear"})):a.logInteraction(l?.toggleSmartShuffleButtonFactory().hitSelectShuffleMode({previousMode:"linear",selectedMode:"smart_shuffle"})))};n||t(v.j.SMART_SHUFFLE,e)}),[n,a,t,l]),A=n?u.Ru.get("web-player.smart-shuffle.dsa-message"):u.Ru.get("web-player.smart-shuffle.menu-text");return(0,R.jsxs)(m.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,R.jsx)(j,{icon:h.p,name:u.Ru.get("web-player.smart-shuffle.shuffle"),isActive:e===v.j.ON,onClick:f}),(0,R.jsx)(j,{icon:b.k,name:u.Ru.get("web-player.smart-shuffle.smart-shuffle"),isActive:e===v.j.SMART_SHUFFLE,onClick:S,isDsaRestricted:n}),(0,R.jsx)(d.E,{className:p,variant:"bodySmall",semanticColor:"textSubdued",as:"p",children:A}),!n&&(0,R.jsx)(y.u,{children:(0,R.jsx)(o.H,{role:"menuitem",className:F,semanticColor:"textSubdued",onClick:c,size:"small",children:u.Ru.get("web-player.smart-shuffle.menu-button")})})]})},E={[v.j.OFF]:{icon:h.p,label:e=>e?u.Ru.get("web-player.smart-shuffle.button-disable-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-disable-shuffle-generic")},[v.j.ON]:{icon:h.p,semanticColor:"textBrightAccent",label:e=>e?u.Ru.get("web-player.smart-shuffle.button-enable-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-enable-shuffle-generic")},[v.j.SMART_SHUFFLE]:{icon:b.k,semanticColor:"textBrightAccent",label:e=>e?u.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-specific",e):u.Ru.get("web-player.smart-shuffle.button-enable-smart-shuffle-generic")}};var M=l(50498),w=l(85434),x=l(42257),C=l(72750);const D={bottomEnd:x.dw.topStart,top:x.dw.bottom},k=({placement:e,onHide:t,label:l})=>((0,C.g)(t),(0,R.jsx)("div",{children:(0,R.jsx)(M.A,{arrow:D[e],colorSet:"announcement",onClose:t,children:l})})),O=e=>{const{placement:t,visible:l,children:s}=e;return(0,R.jsx)(w.W,{placement:t,withPortal:!0,overlay:l&&(0,R.jsx)(k,{...e}),children:s})};var L=l(50486),T=l(39566),B=l(24549),H=l(30157);function I(){return(0,H.N)(B.X)}var N=l(6102),U=l(16273),_=l(11336),P=l(58685),q=l(32257),z=l(2679),V=l(40638);const K=e=>["use-shuffle",e,"shuffle-mode"];const X=e=>{const t=(e=>{const t=I(),l=!(0,T.n)();let s=(0,L.I)({queryKey:["use-shuffle",e,"can-smart-shuffle"],queryFn:()=>t.getAvailableShuffleModes(e),staleTime:36e5,gcTime:72e5}).data;return l&&(s=[v.j.OFF,v.j.ON]),s})(e),[l,a]=function(e){const t=I(),l=(0,U.jE)(),a=(0,s.useRef)(null),{isActive:n}=(0,z.l_)(e),i=(0,P.o)(q.l),[o]=(0,V.d7)(i,1e3),r=(0,L.I)({queryKey:K(e),queryFn:async()=>await t.getShuffle(e),staleTime:0,gcTime:72e5}).data;(0,s.useEffect)((()=>{l.invalidateQueries({queryKey:K(e)})}),[e,o,l]);const u=(0,s.useCallback)((s=>{const n=K(e);if(a.current&&clearTimeout(a.current),s!==v.j.SMART_SHUFFLE)return t.setShuffle(e,s);l.setQueryData(n,v.j.SMART_SHUFFLE),a.current=setTimeout((()=>t.setShuffle(e,s)),1e3)}),[e,l,t]);return(0,s.useEffect)((()=>{const s=t.getEvents(),a=K(e),i=s.addListener(_.S.UPDATE,(({data:t})=>{t.contextURI===e&&l.setQueryData(a,t.shuffleMode)})),o=s.addListener(_.S.UPDATE_COMPLETE,(({data:t})=>{t.contextURI!==e||n||l.invalidateQueries({queryKey:a})})),r=s.addListener(_.S.UPDATE_ERROR,(()=>{l.invalidateQueries({queryKey:a})}));return()=>{i(),o(),r()}}),[e,n,o,l,t]),[r??v.j.OFF,u]}(e),n=(0,N.p)(),i=(0,s.useMemo)((()=>{if(!t)return;const e=void 0!==l?t.indexOf(l):-1;let s=t[(e+1)%t.length];return n||s!==v.j.SMART_SHUFFLE||(s=t[(e+2)%t.length]),s}),[l,t,n]),o=(0,s.useCallback)((()=>{if(void 0!==i)return a(i),i}),[i,a]);return{shuffleMode:l,nextShuffleMode:i,availableShuffleModes:t,setShuffleMode:a,cycleShuffleMode:o,isDsaRestricted:!n}};var Q=l(18576),Z=l(53133),W=l(62021),G=l(33329),Y=l(21549);const J="E1ikFpkPVaoLplbQdrTP",$="nozebc1PGSbzmePU25qY",ee=({label:e,shuffleModeConfig:t,size:l="large",onClick:a,disabled:i=!1,activationVisible:r=!1,shuffleIsOn:u,focusOnRender:c=!1,offsetDotDistance:d=!0,withPadding:h=!1,className:b,showDelayOnHover:m})=>{const S=(0,s.useRef)(null);return(0,s.useEffect)((()=>{c&&S.current?.focus()}),[c]),(0,R.jsx)(f.Zp,{label:e,showDelay:m,children:(0,R.jsx)(o.H,{onClick:i?void 0:a,iconOnly:t.icon,semanticColor:t.semanticColor,size:l,"aria-describedby":r?"smartShuffleActivationDescription":void 0,"aria-label":e,"aria-disabled":i,condensedAll:!h,className:n()({[J]:u,[$]:d},b),ref:S})})},te=({entityName:e,contextUri:t,activationPlacement:l,size:a,isActive:n=!1,offsetDotDistance:o=!0,withPadding:f=!1,disabled:d=!1,shuffleContext:h,withActivation:b=!0,withSnackbar:m=!0,className:S,showDelayOnHover:g})=>{const{shuffleMode:y,nextShuffleMode:p,availableShuffleModes:F,setShuffleMode:j,cycleShuffleMode:M,isDsaRestricted:w}=X(t),{spec:x}=(0,Y.r)(r.a,{data:{uri:t}}),C=(0,s.useMemo)((()=>x.menuShuffleButtonFactory()),[x]),D=(0,G.s)(),{enqueueSnackbar:k}=(0,Z.d)(),[L,T]=(0,s.useState)(!1),{isOpen:B}=(0,i.d4)((e=>e.ui.introducingSmartShuffleModal)),H=E[y],I=void 0!==p?E[p]:void 0,U=F?.includes(v.j.SMART_SHUFFLE),[_,P,q,z]=(0,Q.Z)(F,h,b,y),V=(0,s.useCallback)((e=>{e===v.j.SMART_SHUFFLE?k(n?u.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle"):u.Ru.get("web-player.smart-shuffle.enabled-smart-shuffle-not-active-playlist")):y===v.j.SMART_SHUFFLE&&k(u.Ru.get("web-player.smart-shuffle.disabled-smart-shuffle"))}),[y,k,n]),K=()=>{z(!1),P(!1)},J=(0,s.useCallback)((e=>e===v.j.SMART_SHUFFLE?"smart_shuffle":e===v.j.ON?"shuffle":"linear"),[]),[$,te]=(0,W.x)("smart-shuffle-menu",0),le=(0,N.p)(),se=$>=3||!U,ae={label:I?.label?.(e,!!U&&le)??u.Ru.get("web-player.smart-shuffle.smart-shuffle"),shuffleModeConfig:H,size:a,activationVisible:_,shuffleIsOn:y!==v.j.OFF,offsetDotDistance:o,withPadding:f,disabled:d,className:S};return se?(0,R.jsx)(O,{visible:q,onHide:K,placement:l,label:u.Ru.get("web-player.smart-shuffle.activation-text"),children:(0,R.jsx)(ee,{...ae,onClick:()=>{const e=y,t=M();K(),m&&V(t),U?D.logInteraction(x.regularShuffleButtonFactory().hitSelectShuffleMode({previousMode:J(e),selectedMode:J(t)})):D.logInteraction(t===v.j.ON?x.regularShuffleButtonFactory().hitShuffleEnable():x.regularShuffleButtonFactory().hitShuffleDisable())},focusOnRender:L,showDelayOnHover:g})}):(0,R.jsx)(O,{visible:_,onHide:K,placement:l,label:u.Ru.get("web-player.smart-shuffle.activation-message"),children:(0,R.jsx)(c.b,{menu:(0,R.jsx)(A,{shuffleMode:y,onClick:(e,t)=>{const l=e===y?v.j.OFF:e;j(l),V(l),t(l===v.j.OFF)},spec:C,logger:D,isDsaRestricted:w}),onHide:()=>{$+1===3&&(T(!0),D.logImpression(x.tristateOnboardingTooltipFactory().impression())),te($+1)},onShow:()=>{K(),D.logInteraction(x.menuShuffleButtonFactory().hitUiReveal())},onClickOutside:e=>{B||e()},children:(e,t)=>(0,R.jsx)(ee,{...ae,onClick:e=>{t(e)},showDelayOnHover:g})})})}},70381:(e,t,l)=>{l.d(t,{X:()=>n.X,K:()=>a});var s=l(85387);function a(e){const{search:t}=(0,s.zy)();return new URLSearchParams(t).get("feature-activation")===e}var n=l(41547)},41547:(e,t,l)=>{l.d(t,{X:()=>s});let s=function(e){return e.SmartShuffle="smart-shuffle",e.GroupSessions="group-sessions",e.Blend="blend",e.CollaborativePlaylists="collaborative-playlists",e.Dj="dj",e.VeryHighQualityAudio="very-high-quality-audio",e.LiveEvents="live-events",e}({})},18576:(e,t,l)=>{l.d(t,{b:()=>r,Z:()=>u});var s=l(30758),a=l(70381),n=l(60965),i=l(46922),o=l(23289);const r={playlistActionBar:"playlist-action-bar"},u=(e,t,l,u)=>{const{seen:c,setSeen:f}=(0,i.i)(),[d,h]=(0,s.useState)(!c),[b,m]=(0,s.useState)(!1),{toggleActivationVisible:S}=(0,n.R)(),g=(0,a.K)(a.X.SmartShuffle),y=d&&!!e?.includes(o.j.SMART_SHUFFLE)&&!S&&l;return(0,s.useLayoutEffect)((()=>{y&&f(!0),g&&t===r.playlistActionBar&&u===o.j.OFF&&m(!0)}),[y,f,g,t,m,u]),[y,h,b,m]}},41364:(e,t,l)=>{l.d(t,{X:()=>i});var s=l(14343),a=l(43329);let n=function(e){return e[e.DISABLED=0]="DISABLED",e[e.ENABLED=1]="ENABLED",e}({});const i=(e=!1)=>((e=!1)=>(0,s.NC)(a.uy,e?void 0:{loadingValue:!1})?n.ENABLED:n.DISABLED)(e)===n.ENABLED},46922:(e,t,l)=>{l.d(t,{i:()=>a});var s=l(62021);const a=()=>{const[e,t]=(0,s.x)("smart-shuffle-seen",!1);return{seen:e,setSeen:t}}}}]); +//# sourceMappingURL=3848.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4003.js b/dot-config/spicetify/Extracted/Themed/xpui/4003.js new file mode 100755 index 00000000..78dd791e --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4003.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4003],{39325:(e,a,s)=>{s.d(a,{S:()=>o});var t=s(62411),r=s(86677),c=s(41575),i=s(31417),n=s(89775);const l="nHCJskDZVlmDhNNS9Ixv";var d=s(86070);const o=({isPremium:e})=>{const a=(0,t.wA)();return(0,d.jsx)("div",{className:l,children:e?(0,d.jsx)(r.$,{size:"small",colorSet:"overMedia",onClick:()=>a((0,n.On)()),children:i.Ru.get("ad-formats.hideAnnouncements")}):(0,d.jsx)(c.v,{colorSet:"overMedia",children:i.Ru.get("ad-formats.sponsored")})})}},57137:(e,a,s)=>{s.d(a,{z:()=>j});var t=s(30758),r=s(97500),c=s.n(r),i=s(62411),n=s(66201),l=s(53247),d=s(50279),o=s(51776),h=s(78464);const u="utUDWsORU96S7boXm2Aq",m="G7JYBeU1c2QawLyFs5VK",g="vYl1kgf1_R18FCmHgdw2",x="vZkc6VwrFz0EjVBuHGmx";var v=s(86070);const j=(0,n.H)((({children:e,fetchingState:a,hideHpto:s},r)=>{const n=(0,i.d4)(d.Dr),j=(0,i.wA)(),p=(0,t.useRef)(null);(0,t.useEffect)((()=>(p.current&&j((0,l.$t)(p.current)),()=>{j((0,l.IH)(!0))})),[j]),(0,t.useEffect)((()=>{a===o.C.FETCHED&&j((0,l.bW)())}),[a,j]);const k=(0,t.useCallback)((e=>{j((0,l.yF)(String(e)))}),[j]);return(0,v.jsx)(h.s,{onError:k,children:(0,v.jsx)("div",{"data-testid":"hpto-parent-container",className:c()(u,"contentSpacing",{[m]:a===o.C.FAILED||!n||s}),children:(0,v.jsx)("div",{"data-testid":"test-hpto-ref",ref:e=>{p.current=e,"function"==typeof r?r(e):r&&(r.current=e)},className:c()(g,{[x]:a===o.C.FETCHING||s}),children:e})})})}))},56751:(e,a,s)=>{s.d(a,{Z:()=>u});var t=s(30758),r=s(62411),c=s(39325),i=s(53247),n=s(50279),l=s(21082);const d="iVAZDcTm1XGjxwKlQisz",o="_I_1HMbDnNlNAaViEnbp";var h=s(86070);const u=({isPremium:e,backgroundColor:a,backgroundImage:s,backgroundUrl:u,bannerMode:m,html:g})=>{const x=(0,r.wA)(),[v,j]=(0,t.useState)(!1),p=(0,r.d4)(n.$F)?.media,k=g||p;return(0,t.useEffect)((()=>{"html"===m&&j(!0)}),[m]),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(l.N,{draggable:!1,to:u||"",className:d,onClick:()=>{u&&x((0,i.i2)("event_clicked"))},style:{backgroundColor:a,backgroundImage:v?`url(${s})`:"none",backgroundSize:"cover"},children:(0,h.jsx)("iframe",{"data-testid":"html-hpto-iframe",className:o,srcDoc:k,scrolling:"no",marginWidth:0,marginHeight:0,style:{display:v?"":"none"},"aria-hidden":!0})}),(0,h.jsx)(c.S,{isPremium:e})]})}},67313:(e,a,s)=>{s.d(a,{L:()=>h});var t=s(30758),r=s(62411),c=s(39325),i=s(53247),n=s(21082);const l="xXj7eFQ8SoDKYXy6L3E1",d="F68SsPm8lZFktQ1lWsQz";var o=s(86070);const h=({isPremium:e,backgroundColor:a,backgroundImage:s,clickThroughUrl:h})=>{(0,t.useEffect)((()=>{if(!s)throw Error("[Image HPTO] Missing background image")}),[s]);const u=(0,r.wA)();return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n.N,{"data-testid":"hpto-image",draggable:!1,onClick:()=>{u((0,i.i2)("event_clicked"))},className:l,style:{backgroundColor:a},to:h,children:(0,o.jsx)("img",{draggable:!1,className:d,alt:"",src:s})}),(0,o.jsx)(c.S,{isPremium:e})]})}},39085:(e,a,s)=>{s.d(a,{E:()=>ce});var t=s(97500),r=s.n(t),c=s(20886),i=s(62411),n=s(95530),l=s(22726),d=s(31417),o=s(39325),h=s(53247),u=s(30758),m=s(86677),g=s(74159),x=s(38157),v=s(75830),j=s(78516),p=s(7520),k=s(91676),b=s(15552),f=s(76720),N=s(40675),y=s(29454),C=s(54622),w=s(89402),S=s(51354),V=s(24533),M=s(28340);const R="x8e0kqJPS0bM4dVK7ESH",A="gZ2Nla3mdRREDCwybK6X",E="SChMe0Tert7lmc5jqH01",z="AwF4EfqLOIJ2xO7CjHoX",F="UlkNeRDFoia4UDWtrOr4",I="k_RKSQxa2u5_6KmcOoSw",_="_mWmycP_WIvMNQdKoAFb",B="O3UuqEx6ibrxyOJIdpdg",H="akCwgJVf4B4ep6KYwrk5",T="bIA4qeTh_LSwQJuVxDzl",L="ajr9pah2nj_5cXrAofU_",P="gvn0k6QI7Yl_A0u46hKn",Q="obTnuSx7ZKIIY1_fwJhe",D="IiLMLyxs074DwmEH4x5b",U="RJjM91y1EBycwhT_wH59",G="mxn5B5ceO2ksvMlI1bYz",K="l8wtkGVi89_AsA3nXDSR",O="Th1XPPdXMnxNCDrYsnwb",W="SJMBltbXfqUiByDAkUN_",Y="Nayn_JfAUsSO0EFapLuY",J="YqlFpeC9yMVhGmd84Gdo",X="HksuyUyj1n3aTnB4nHLd",$="DT8FJnRKoRVWo77CPQbQ";var q=s(86070);const Z=(e,a)=>{switch(e){case l.NQG.ALBUM:case l.NQG.TRACK:case l.NQG.EPISODE:case l.NQG.PLAYLIST:return a?d.Ru.get("ad-formats.remove"):d.Ru.get("ad-formats.save");default:return a?d.Ru.get("unfollow"):d.Ru.get("follow")}},ee=({playBtnUri:e,uri:a,uriType:s})=>{const t=(0,i.wA)(),[c,n]=(0,V.A)(a),o=(0,w.W)(),R="SMALL"===(0,S.y)()?"small":"medium",{togglePlay:A,isPlaying:E}=(0,M.P)({uri:e},{featureIdentifier:"hpto"}),z=(0,u.useCallback)((()=>{A(),t((0,h.i2)("event_clicked","ne-play-button"))}),[t,A]),F=(0,u.useCallback)((async()=>{try{await n(!c)}catch{(0,h.yF)(`invalid button uri type ${a}`)}o({targetUri:a,intent:c?"unsave":"save",type:"click"})}),[c,n,a,o]),I=(0,u.useCallback)((()=>{t((0,h.i2)("event_clicked","ne-more-button"))}),[t]);let _=null;return _=(0,l._Tv)(a)?(0,q.jsx)(j.h,{uri:a}):(0,l.ecE)(a)?(0,q.jsx)(p.t,{uri:a}):(0,l.tbX)(a)?(0,q.jsx)(N.W,{uri:a}):(0,l.WB1)(a)?(0,q.jsx)(y.H,{uri:a}):(0,l.U_m)(a)?(0,q.jsx)(C.P,{uri:a}):(0,l.gHQ)(a)?(0,q.jsx)(k.b,{uri:a}):(0,l.PkR)(a)?(0,q.jsx)(f.A,{uri:a}):(0,q.jsx)(b.h,{uri:a}),(0,q.jsxs)("div",{className:O,"data-testid":"hpto-native-buttons",children:[(0,q.jsx)(m.$,{onClick:z,size:R,children:E?d.Ru.get("pause"):d.Ru.get("play")}),(0,q.jsx)(g.n,{className:r()({[$]:c}),onClick:F,size:R,children:Z(s,c)}),(0,q.jsx)(v.b,{menu:_,children:(0,q.jsx)(x.e,{onClick:I,size:R,className:W})})]})},ae=({className:e})=>(0,q.jsx)("svg",{className:e,xmlns:"http://www.w3.org/2000/svg",width:"150",height:"20",viewBox:"0 0 147 20",children:(0,q.jsxs)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:[(0,q.jsx)("path",{fill:"#FFF",d:"M70 5H71V16H70z"}),(0,q.jsxs)("g",{children:[(0,q.jsx)("path",{fill:"#84BD00",d:"M10.001.045C4.489.045.02 4.49.02 9.975c0 5.486 4.469 9.932 9.981 9.932 5.513 0 9.981-4.446 9.981-9.931 0-5.485-4.468-9.931-9.981-9.931"}),(0,q.jsx)("path",{fill:"#000",d:"M15.544 10.6C12.463 8.717 7.956 8.186 4.33 9.28a.775.775 0 00-.519.967.78.78 0 00.972.515c3.173-.958 7.263-.483 9.945 1.158a.78.78 0 001.07-.255.772.772 0 00-.255-1.065"}),(0,q.jsx)("path",{fill:"#000",d:"M16.858 7.251c-3.704-2.187-9.565-2.393-13.09-1.328A.928.928 0 104.31 7.7c3.07-.927 8.378-.752 11.595 1.149a.936.936 0 001.28-.325.926.926 0 00-.327-1.273"}),(0,q.jsx)("path",{fill:"#000",d:"M14.372 13.518c-2.63-1.6-5.892-1.972-9.694-1.107a.618.618 0 10.277 1.206c3.474-.79 6.424-.467 8.768.958a.624.624 0 00.855-.206.617.617 0 00-.206-.851"})]}),(0,q.jsxs)("g",{fill:"#FFF",transform:"translate(25 5)",children:[(0,q.jsx)("path",{d:"M3.806 4.194C2.23 3.822 1.95 3.56 1.95 3.013c0-.518.493-.867 1.226-.867.711 0 1.416.265 2.156.81a.104.104 0 00.146-.023l.77-1.073a.102.102 0 00-.02-.139C5.347 1.023 4.357.684 3.199.684 1.496.684.307 1.694.307 3.14c0 1.55 1.026 2.099 2.799 2.522 1.508.344 1.763.632 1.763 1.147 0 .57-.515.924-1.343.924-.92 0-1.672-.306-2.511-1.025a.109.109 0 00-.076-.025.103.103 0 00-.071.036L.005 7.734a.1.1 0 00.01.142 5.18 5.18 0 003.476 1.318c1.834 0 3.02-.991 3.02-2.525 0-1.297-.784-2.014-2.705-2.475"}),(0,q.jsx)("path",{d:"M10.661 2.656c-.795 0-1.447.31-1.985.944v-.714a.103.103 0 00-.103-.102H7.16a.103.103 0 00-.103.102v7.935c0 .057.046.102.103.102h1.412a.103.103 0 00.103-.102V8.316c.538.597 1.19.889 1.985.889 1.478 0 2.973-1.125 2.973-3.274 0-2.15-1.495-3.275-2.973-3.275zm1.332 3.275c0 1.094-.682 1.858-1.659 1.858-.965 0-1.693-.798-1.693-1.858s.728-1.858 1.693-1.858c.961 0 1.659.78 1.659 1.858z"}),(0,q.jsx)("path",{d:"M17.468 2.656c-1.903 0-3.393 1.449-3.393 3.298 0 1.83 1.48 3.263 3.37 3.263 1.91 0 3.405-1.444 3.405-3.286 0-1.836-1.485-3.275-3.382-3.275zm0 5.145c-1.012 0-1.775-.804-1.775-1.87 0-1.07.737-1.847 1.752-1.847 1.019 0 1.787.804 1.787 1.87 0 1.07-.742 1.847-1.764 1.847z"}),(0,q.jsx)("path",{d:"M24.913 2.784H23.36v-1.57a.103.103 0 00-.104-.103h-1.411a.103.103 0 00-.104.102v1.57h-.679a.103.103 0 00-.102.103v1.2c0 .056.046.102.102.102h.68v3.104c0 1.254.63 1.89 1.876 1.89.507 0 .927-.103 1.323-.325a.102.102 0 00.052-.089V7.626a.102.102 0 00-.049-.087.104.104 0 00-.1-.004 1.797 1.797 0 01-.83.197c-.452 0-.654-.203-.654-.659V4.188h1.553a.103.103 0 00.103-.102v-1.2a.103.103 0 00-.103-.102"}),(0,q.jsx)("path",{d:"M30.326 2.79v-.193c0-.567.22-.82.714-.82.294 0 .53.057.795.145.033.01.067.005.093-.014a.101.101 0 00.043-.083V.648a.102.102 0 00-.073-.098 3.916 3.916 0 00-1.173-.166c-1.305 0-1.994.726-1.994 2.098v.296h-.678a.103.103 0 00-.104.102v1.206c0 .056.047.102.104.102h.678v4.788c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102V4.188h1.319l2.019 4.787c-.23.502-.455.603-.762.603-.25 0-.511-.074-.779-.219a.107.107 0 00-.082-.007.104.104 0 00-.061.055l-.479 1.038a.1.1 0 00.045.132 3 3 0 001.507.381c1.043 0 1.62-.48 2.127-1.771l2.45-6.258a.1.1 0 00-.011-.095.103.103 0 00-.085-.044h-1.47a.104.104 0 00-.098.068L34.483 7.11l-1.649-4.254a.103.103 0 00-.096-.066h-2.412"}),(0,q.jsx)("path",{d:"M27.188 2.784h-1.412a.103.103 0 00-.103.102v6.09c0 .056.046.102.103.102h1.412a.103.103 0 00.103-.102v-6.09a.103.103 0 00-.103-.102"}),(0,q.jsx)("path",{d:"M26.49.011c-.56 0-1.014.448-1.014 1 0 .554.454 1.002 1.013 1.002.56 0 1.013-.448 1.013-1.001 0-.553-.454-1-1.013-1"}),(0,q.jsx)("path",{d:"M38.858 4.742a.984.984 0 01-.994-.983c0-.538.44-.987 1-.987a.984.984 0 11-.006 1.97zm.005-1.872c-.509 0-.894.4-.894.89 0 .489.382.884.889.884.509 0 .894-.4.894-.89a.876.876 0 00-.889-.884zm.22.985l.281.389h-.237l-.253-.357h-.217v.357h-.198V3.213h.465c.242 0 .401.122.401.329 0 .169-.098.272-.242.313zm-.167-.465h-.26v.326h.26c.129 0 .206-.063.206-.163 0-.107-.077-.163-.206-.163z"})]}),(0,q.jsx)("path",{fill:"#FFF",d:"M79.9 13.12c1.8 0 2.37-1.03 2.37-1.89 0-2.49-4-1.55-4-3.26 0-.72.67-1.23 1.56-1.23.75 0 1.43.26 1.91.84l.38-.42c-.52-.59-1.26-.94-2.26-.94-1.21 0-2.19.69-2.19 1.78 0 2.33 4 1.31 4 3.27 0 .57-.39 1.33-1.76 1.33-.95 0-1.65-.47-2.08-.97l-.37.43c.51.62 1.34 1.06 2.44 1.06zm6.61-.12v-2.77h1.93c1.27 0 2.01-.9 2.01-1.95 0-1.05-.73-1.95-2.01-1.95h-2.5V13h.57zm1.87-3.29h-1.87V6.85h1.87c.88 0 1.47.59 1.47 1.43s-.59 1.43-1.47 1.43zm8.56 3.41c1.95 0 3.24-1.5 3.24-3.45 0-1.95-1.29-3.45-3.24-3.45-1.96 0-3.24 1.5-3.24 3.45 0 1.95 1.28 3.45 3.24 3.45zm0-.52c-1.62 0-2.64-1.25-2.64-2.93 0-1.7 1.02-2.93 2.64-2.93 1.6 0 2.64 1.23 2.64 2.93 0 1.68-1.04 2.93-2.64 2.93zm8.94.4V6.85h2.18v-.52h-4.94v.52h2.18V13h.58zm9.46 0v-.52h-3.23V6.33h-.57V13h3.8zm4.11 0V6.33h-.57V13h.57zm7.09.13c1.05 0 1.94-.45 2.53-1.11V9.69h-3.09v.51h2.52v1.6c-.37.37-1.07.81-1.96.81-1.57 0-2.78-1.22-2.78-2.94 0-1.74 1.21-2.93 2.78-2.93.85 0 1.61.37 2.08.93l.43-.31c-.61-.7-1.41-1.14-2.51-1.14-1.87 0-3.38 1.39-3.38 3.45 0 2.06 1.51 3.46 3.38 3.46zM138.2 13V6.33h-.58v2.98h-4.23V6.33h-.57V13h.57V9.83h4.23V13h.58zm6.23 0V6.85h2.18v-.52h-4.94v.52h2.18V13h.58z"})]})});var se=s(21082);const te=e=>{switch(e){case l.NQG.ALBUM:return d.Ru.get("card.tag.album");case l.NQG.TRACK:return d.Ru.get("card.tag.track");case l.NQG.ARTIST:return d.Ru.get("card.tag.artist");case l.NQG.EPISODE:return d.Ru.get("card.tag.episode");case l.NQG.SHOW:return d.Ru.get("card.tag.show");case l.NQG.PLAYLIST:case l.NQG.PLAYLIST_V2:return d.Ru.get("card.tag.playlist");default:return""}},re=(e,a)=>"spotlight"===e?(0,q.jsx)(ae,{className:Q}):"exclusive"===e?(0,q.jsx)("p",{dir:"auto",className:r()(Q,D),children:d.Ru.get("ad-formats.exclusive")}):(0,q.jsx)(n.E,{as:"p",dir:"auto",variant:"bodySmallBold",semanticColor:"textBase",className:Q,children:te(a)}),ce=({name:e,uri:a,playBtnUri:s,description:t,smallImage:l,isSponsored:u,backgroundImage:m,sponsoredLogo:g,uriType:x,logoBlurb:v,isPremium:j,artists:p,badgeType:k})=>{const b=(0,i.wA)(),f=p.length>0,N=!j&&u,y=(0,c.decode)(t);return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsxs)("div",{"data-testid":"hpto-native",className:r()(u?A:R,{[F]:u}),children:[u&&(0,q.jsx)("div",{className:I,children:(0,q.jsxs)("div",{children:[(0,q.jsx)(n.E,{as:"p",variant:"marginalBold",className:P,semanticColor:"textBase",children:d.Ru.get("ad-formats.presentedBy")}),(0,q.jsx)("img",{draggable:!1,className:T,src:g,alt:""}),(0,q.jsx)(n.E,{as:"p",semanticColor:"textBase",variant:"bodySmall",className:L,children:v})]})}),(0,q.jsx)("div",{className:u?z:E,children:(0,q.jsx)(se.N,{"data-testid":"ne-image-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-image-link"))},className:H,to:a,children:(0,q.jsx)("img",{className:B,alt:"",src:l})})}),(0,q.jsxs)("div",{className:_,children:[re(k,x),(0,q.jsx)(n.E,{as:"a",variant:"titleLarge","data-testid":"ne-name-link-test",onClick:()=>{b((0,h.i2)("event_clicked","ne-name-link"))},href:a,dir:"auto",semanticColor:"textBase",className:u?G:U,children:e}),f&&(0,q.jsx)("div",{children:p.map(((e,s)=>(0,q.jsxs)("span",{children:[s?d.Ru.getSeparator():"",(0,q.jsx)(n.E,{as:"a",semanticColor:"textBase",variant:"bodyMedium","data-testid":`ne-attrib-link-${s}-test`,onClick:()=>{b((0,h.i2)("event_clicked","ne-attrib-link"))},draggable:!1,href:e.uri,children:e.name})]},`${a}-${s}`)))}),(0,q.jsx)(n.E,{variant:"bodyMedium",dir:"auto",className:K,semanticColor:"textBase",children:y}),(0,q.jsx)(ee,{playBtnUri:s,uri:a,uriType:x})]})]}),(0,q.jsx)("div",{draggable:!1,className:r()(u?J:Y,{[X]:!u}),style:{backgroundImage:`url(${m})`}}),!N&&(0,q.jsx)(o.S,{isPremium:j})]})}},15552:(e,a,s)=>{s.d(a,{h:()=>h});var t=s(30758),r=s(31417),c=s(10994),i=s(59521),n=s(42162),l=s(44672),d=s(78774),o=s(86070);const h=t.memo((function({uri:e}){const{spec:a}=(0,d.o)(e);return(0,o.jsx)(l.pZ,{value:"generic",children:(0,o.jsx)(c.W,{children:(0,o.jsx)(n.h,{divider:"before",children:(0,o.jsx)(i.m,{spec:a,uri:e,displayText:r.Ru.get("context-menu.copy-generic-link")})})})})}))}}]); +//# sourceMappingURL=4003.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4168.css b/dot-config/spicetify/Extracted/Themed/xpui/4168.css new file mode 100755 index 00000000..e28d9205 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4168.css @@ -0,0 +1,72 @@ +.HUjfVPQnC1P8Q8dJlxVl{--size:40px;border:0;border-radius:500px;display:-webkit-box;display:-ms-flexbox;display:flex;font-size:8px;-webkit-transition:-webkit-transform 33ms cubic-bezier(.3,0,0,1);transition:-webkit-transform 33ms cubic-bezier(.3,0,0,1);transition:transform 33ms cubic-bezier(.3,0,0,1);transition:transform 33ms cubic-bezier(.3,0,0,1),-webkit-transform 33ms cubic-bezier(.3,0,0,1);-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:var(--size);min-width:var(--size);padding:0;position:relative;width:var(--size);-ms-flex-negative:0;flex-shrink:0}.HUjfVPQnC1P8Q8dJlxVl.cRHuuh0O2EuJZbQ5oaEF{background-color:var(--background-base);color:var(--spice-sidebar)}.HUjfVPQnC1P8Q8dJlxVl.nzYFime89RF7YubA1s6p{background-color:var(--spice-text);color:var(--spice-main)}.HUjfVPQnC1P8Q8dJlxVl.bUuwcf2KoLk9Jivd0z2w{background-color:transparent;color:var(--spice-text)}.HUjfVPQnC1P8Q8dJlxVl[disabled]{opacity:.4;pointer-events:none}.HUjfVPQnC1P8Q8dJlxVl:focus,.HUjfVPQnC1P8Q8dJlxVl:hover{background-color:var(--background-highlight);-webkit-transform:scale(1.06);transform:scale(1.06)}.HUjfVPQnC1P8Q8dJlxVl:active{background-color:var(--background-press);-webkit-transform:scale(1);transform:scale(1)}.W37h8rinLYd4K1pNIqYG{background-color:var(--spice-text);border-radius:100%;bottom:0;color:var(--spice-sidebar);height:41%;padding:5%;position:absolute;right:0;-webkit-transform:translate(20%,20%);transform:translate(20%,20%);width:41%}.NyRhcd1ie8y97gBKhKti{-webkit-margin-end:4px;margin-inline-end:4px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */@-webkit-keyframes glue-keyframes-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes glue-keyframes-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@-webkit-keyframes glue-keyframes-fade-in{0%{opacity:0}to{opacity:1}}@keyframes glue-keyframes-fade-in{0%{opacity:0}to{opacity:1}}.artist-artistDiscography-topBar{display:-webkit-box;display:-ms-flexbox;display:flex;height:40px;position:sticky;top:64px;z-index:3;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end;max-width:100%}.artist-artistDiscography-topBar.artist-artistDiscography-topBarScrolled{background-color:var(--background-base);border-bottom:none;-webkit-box-shadow:0 6px 10px rgba(var(--spice-rgb-shadow),.6);box-shadow:0 6px 10px rgba(var(--spice-rgb-shadow),.6)}.artist-artistDiscography-artistName{-webkit-box-flex:1;color:var(--spice-text);-ms-flex:1;flex:1}.artist-artistDiscography-button{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-transition-duration:.3s;transition-duration:.3s;-webkit-transition-property:opacity;transition-property:opacity;-webkit-transition-timing-function:cubic-bezier(.3,0,.4,1);transition-timing-function:cubic-bezier(.3,0,.4,1);-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;border:0;color:rgba(var(--spice-rgb-selected-row),.7);padding:8px;pointer-events:auto;-webkit-margin-start:12px;cursor:pointer;margin-inline-start:12px}.artist-artistDiscography-button.artist-artistDiscography-active,.artist-artistDiscography-button:focus,.artist-artistDiscography-button:hover{background-color:rgba(var(--spice-rgb-selected-row),.1);border-radius:50%;color:var(--spice-text)}.artist-artistDiscography-tracklist{margin-bottom:32px}.artist-artistDiscography-cardGrid{margin-top:64px;margin-inline:12px}.artist-artistDiscography-headerContainer{background:var(--background-base);display:-webkit-box;display:-ms-flexbox;display:flex;padding:32px}.artist-artistDiscography-headerContainer.artist-artistDiscography-firstAlbum{margin-top:0;padding-top:128px}.artist-artistDiscography-topBar{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.xpkB16hRIXt_Wfk2bJhI{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;gap:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.kg7_tYjFur1DEfwH_0W5,.xpkB16hRIXt_Wfk2bJhI{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.artist-artistDiscography-headerImage{height:136px;width:136px;-ms-flex-negative:0;flex-shrink:0}.artist-artistDiscography-headerMetadata{-webkit-margin-start:24px;display:-webkit-box;display:-ms-flexbox;display:flex;margin-inline-start:24px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.artist-artistDiscography-headerButtons{display:grid;grid-auto-flow:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;grid-gap:16px;margin-top:auto}.artist-artistDiscography-headerTitle{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis}.eqw9lvuoZHrkWMTdyTpY{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.lb08f71wES9AQnKx6e0R{-ms-overflow-style:none;overflow-y:scroll;scrollbar-width:none}.lb08f71wES9AQnKx6e0R::-webkit-scrollbar{display:none}.x-sortBox-sortDropdown{display:-webkit-box;display:-ms-flexbox;display:flex;min-width:0;grid-gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:transparent;border:0;border-radius:4px;color:rgba(var(--spice-rgb-selected-row),.7);height:32px;padding-inline:8px 8px}.x-sortBox-sortDropdown:focus,.x-sortBox-sortDropdown:hover{color:var(--spice-text);cursor:pointer}.x-sortBox-sortDropdown .cvTLPmjt6T7M85EKcB8w{min-width:0;overflow:hidden;text-align:start;text-overflow:ellipsis;white-space:nowrap}.x-sortBox-sortDropdown .cvTLPmjt6T7M85EKcB8w:first-letter{text-transform:uppercase}.x-sortBox-sortDropdown .SbDHY3fVADNJ4l9qOLQ2{-ms-flex-negative:0;flex-shrink:0}.od_kF1rLZbir8kM_F607{padding-bottom:56.25%;position:relative;width:100%}.qyKJPLjz8o4jnbk92JOn{background-color:rgba(var(--spice-rgb-shadow),.7);border:0;border-radius:50%;color:rgba(var(--spice-rgb-selected-row),.7);display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;position:absolute;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);width:32px;z-index:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.qyKJPLjz8o4jnbk92JOn:hover{background-color:var(--spice-main);color:var(--spice-text);cursor:pointer}.zsVdTdACMZA_MWB3HlEW{left:48px}.nsakAYOtgZOAcEO4ObrM{right:48px}.uJjmxe0T11dUVeW6Biz8{background-color:var(--spice-sidebar);height:100%;left:0;position:absolute;top:0;width:100%}.F1K3uW1jqwG0wxFHO5gl,.uJjmxe0T11dUVeW6Biz8{display:-webkit-box;display:-ms-flexbox;display:flex;overflow:hidden}.F1K3uW1jqwG0wxFHO5gl{-webkit-box-flex:0;-ms-flex:0 0 100%;flex:0 0 100%;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transition:-webkit-transform .5s ease;transition:-webkit-transform .5s ease;transition:transform .5s ease;transition:transform .5s ease,-webkit-transform .5s ease}.Ii9XdJaXIuKbmR1zC4Rt{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.DVWIV41y6daOMjQKR8Zj{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-top:24px} .oORVTPvg6eTQflVKKgw8{margin-right:4px}.muHL0_3HjlqTZDoapgc9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:rgba(var(--spice-rgb-selected-row),.7);margin:16px 0 0}.muHL0_3HjlqTZDoapgc9:focus,.muHL0_3HjlqTZDoapgc9:hover{color:var(--spice-text)}/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.XtGI24gayCCOR69pcBao{background-color:var(--background-base);isolation:isolate}.AK5MS4kVmpVJSnAPzApZ{margin:8px 0 40px}.ih3vZ4qqibfclKQ2r3U8{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.vsqOYUmRYepQ7AgGzPDk{margin-bottom:40px}.Uv9uqBNRy4qsyhPSa7lY{min-height:0!important}.YyjwPfOAdb6z73PerGUF{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.pAvBQUDkfvkyO47Kw71y{grid-column:span var(--column-count)}.PPoC4pYtYLuuzjV0RaQF{width:calc(50% - 12px)}.V168frZQBWaJ1OdnyyKO{grid-column:span min(var(--column-count),6)}.MZkAAYmEs5kAOXrbrBQQ{grid-column:span 4;min-width:372px}.IR0gsJCJYP1TqjMi6wUt,.hGJN08YEbxIJ2HaEcHee{grid-column:span 2}.GNdKACg7GTgIv75LT6Gv{grid-column:span 3}.FwIG_h9mHxGOTDxFRnWT{margin-top:-64px}.anPfvyDzeqR3CKW4gHUP{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ZpAXOWy3RgYX8ywKZZOI{margin-top:40px}.jW4eWdr_LUeOXwPpKhWG{background-color:var(--spice-card);background-position:50% 50%;background-size:cover;border:0;border-radius:8px;position:relative;text-align:initial;-webkit-transform:scale(1);transform:scale(1);-webkit-transition:transform .25s linear;transition:transform .25s linear;width:100%}.jW4eWdr_LUeOXwPpKhWG:hover{-webkit-transform:scale(1.01);transform:scale(1.01)}.jW4eWdr_LUeOXwPpKhWG .BPDHTIIFueJMvtDPZttw{max-width:672px}.jW4eWdr_LUeOXwPpKhWG.DRXonbAbVN5Vg9anDL1X .BPDHTIIFueJMvtDPZttw{bottom:0;position:absolute}.jW4eWdr_LUeOXwPpKhWG .xbKOOJ_NjLijBvdpAudQ{display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;margin-top:8px;overflow:hidden}.M0yriEHOsE9ET707IXzC{grid-column:span 4}.DRXonbAbVN5Vg9anDL1X{background-repeat:no-repeat;height:516px}.xbKOOJ_NjLijBvdpAudQ{margin-top:8px}.PwMuGFUCeHPjbHDy8M1T{height:100%;-o-object-fit:contain;object-fit:contain;width:100%}.y_GaLKy76zj71zPYkLrs{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}.TV2j1oIRIkKH_6D1xP82{margin-top:-12px;width:509px}.T_AmQPlZ6wvE819I7A0D{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;margin-bottom:32px}.zQy0G59IX5G4Cc9AtWRT{margin-bottom:40px} .zQy0G59IX5G4Cc9AtWRT{margin-right:40px}.BPDHTIIFueJMvtDPZttw{padding:40px}.BPDHTIIFueJMvtDPZttw p{margin-bottom:16px}.OyLgnahIHw63684ABRBF{display:-webkit-box;display:-ms-flexbox;display:flex;margin-top:32px;-webkit-box-align:center;-ms-flex-align:center;align-items:center} .KguYS3oppxDrMNpTUJcB{margin-right:8px}.O9QEyBUMktZGNPifQqvY{margin-bottom:24px}.JnpOnFaQfrRIA2fYe88A{background-color:var(--spice-main);border-radius:8px;height:100%;max-height:70vh;min-width:500px;overflow:hidden;position:relative;width:768px}.cacyLqtJhjhr95qRC_R7{height:100%}.pSxFsY9Fgcj5f8Gf05mh{background-color:rgba(var(--spice-rgb-shadow),.7);border:0;border-radius:50%;color:rgba(var(--spice-rgb-selected-row),.7);display:-webkit-box;display:-ms-flexbox;display:flex;height:32px;position:absolute;top:16px;width:32px;z-index:1;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} .pSxFsY9Fgcj5f8Gf05mh{right:16px}.pSxFsY9Fgcj5f8Gf05mh:hover{background-color:var(--spice-main);color:var(--spice-text);cursor:pointer}.pSxFsY9Fgcj5f8Gf05mh svg{fill:currentcolor}.tsFfFt7SCIoA14JawrRf{opacity:0;-webkit-transform:translateY(25%) scale(.6);transform:translateY(25%) scale(.6);-webkit-transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,-webkit-transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out;transition:opacity .3s linear,transform .3s ease-out,-webkit-transform .3s ease-out}._VADS4mdajCt5Yuf6KjW{opacity:1;-webkit-transform:translateY(0) scale(1);transform:translateY(0) scale(1)}.TrS5BnDIiLtqz1i1QBVV{opacity:0;-webkit-transform:translateY(25%) scale(.6);transform:translateY(25%) scale(.6)}.tLjX9htIKD_OCmEX01UN{background:#0074e0;border-radius:50%;color:var(--spice-text);height:80px;position:absolute;top:40px;width:80px}.tLjX9htIKD_OCmEX01UN div:first-child{position:absolute;text-align:center;top:25%;width:100%}.tLjX9htIKD_OCmEX01UN div:nth-child(2){position:absolute;text-align:center;top:55%;width:100%} .tLjX9htIKD_OCmEX01UN{right:40px}.T_AmQPlZ6wvE819I7A0D .tLjX9htIKD_OCmEX01UN{left:0;margin-bottom:40px;position:relative;right:0;top:0}.NPv26QCDgdnwsPOlYJmQ{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-ms-flex-pack:justify;height:40px;justify-content:space-between;margin-bottom:16px}.NPv26QCDgdnwsPOlYJmQ div:nth-child(2){color:var(--spice-subtext)}.zNnlcxsmnV1RiWXSd4IA{padding:8px 12px}.a3sk2brhAAMoZderfRfg[role=menuitem]{padding-inline:12px}.E1ikFpkPVaoLplbQdrTP:after{background-color:currentcolor;border-radius:50%;bottom:0;content:"";display:block;height:4px;left:50%;position:absolute;-webkit-transform:translateX(-50%);transform:translateX(-50%);width:4px!important}.E1ikFpkPVaoLplbQdrTP.nozebc1PGSbzmePU25qY{outline-offset:12px}.E1ikFpkPVaoLplbQdrTP.nozebc1PGSbzmePU25qY:after{bottom:-8px}.qB6S3KrJlMCx4WS4zOtl{display:-webkit-box;display:-ms-flexbox;display:flex;margin-block:8px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.EmeHQXR87mUskYK6xEde{background-color:var(--background-base);isolation:isolate}.qELskYs6YdzzafmETrAg{margin:8px 0 40px}.fnphAtjtCDYY99lYBfLK{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.hLi0oogSdDKAIC_rnfP1{margin-bottom:40px}.xN866HUyMGAaemLBKQQx{min-height:0!important}.cWcQITygrzZTduXuXope{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.BpBrwbAwIMryupCOXJzw{grid-column:span var(--column-count)}.FOgY6uo_Bj_VTV5hwaix{width:calc(50% - 12px)}.PHHrto0Qhh4dJcnnPhwu{grid-column:span min(var(--column-count),6)}.dIlzffEKwokwWI5sqYJN{grid-column:span 4;min-width:372px}.SMBqsyNXIMb0yeYVwPxv,.bcAylCIHjoXKDI08jTx0{grid-column:span 2}.yT49w5mDxTaLK9lL59Gd{grid-column:span 3}.D6IunHuzuULf_Sr88GOA{margin-top:-64px}.b_dSllo9kearPhsw_MSp{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ZkkYlSbVnEhF1urK3rKO{margin-top:40px}.RClL7GUhUo_xqzNcsXSG{cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;border-radius:6px;-ms-flex:1;flex:1;margin:0 -8px 8px;padding:8px}.RClL7GUhUo_xqzNcsXSG:focus-within,.RClL7GUhUo_xqzNcsXSG:hover{background-color:var(--background-tinted-highlight);text-decoration:none}.RClL7GUhUo_xqzNcsXSG:active{background-color:var(--background-tinted-press)}.EQaztpbGtXeN7V1cjAP4{-webkit-box-flex:0;border-radius:2px;-ms-flex:0 0 48px;flex:0 0 48px;-webkit-margin-end:16px;margin-inline-end:16px}.tYSzgx8hG37WjBDn364n{-webkit-box-flex:1;display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex:1 1 auto;flex:1 1 auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;word-break:break-all}.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx:focus,.tYSzgx8hG37WjBDn364n ._4XNZPDdnyq1HHKG5Qtx:hover{text-decoration:none!important}.tYSzgx8hG37WjBDn364n .DehN40s8150pzqyBfGN_{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:rgba(var(--spice-rgb-selected-row),.7);overflow:hidden}.ZiRNxR2_6cTTMHIqpwzl{-webkit-box-flex:0;-ms-flex:0 0 16px;flex:0 0 16px;-ms-flex-item-align:start;align-self:flex-start;color:rgba(var(--spice-rgb-selected-row),.5);visibility:hidden}.RClL7GUhUo_xqzNcsXSG:focus .ZiRNxR2_6cTTMHIqpwzl,.RClL7GUhUo_xqzNcsXSG:hover .ZiRNxR2_6cTTMHIqpwzl{visibility:visible}.vQqlnrnZi2f4zrYRQvKW{gap:16px}.OMowV_mBy8tlBELzbuTi,.vQqlnrnZi2f4zrYRQvKW{display:-webkit-box;display:-ms-flexbox;display:flex}.OMowV_mBy8tlBELzbuTi{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.XxJxjdIexR1RXajhHYyv{background-color:var(--background-base);isolation:isolate}.C3sCQUxUnOT70BvlHzaT{margin:8px 0 40px}.t_q3We1lzpMw16K2hqWW{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.gnMTgsbCWnViOBmNAd5I{margin-bottom:40px}.hswKk1_ZqWYCARtlR60p{min-height:0!important}.uOmn1JAYcYnJgvpZ66cA{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.Q3XGDFeRW9Em3o9WPa6o{grid-column:span var(--column-count)}.QjAPPoqR26BHPwjskHYA{width:calc(50% - 12px)}.becor9wH6rcFrWOz4fci{grid-column:span min(var(--column-count),6)}.N7IQH5M1P3g4xti1NKkg{grid-column:span 4;min-width:372px}.Jg2Gc2_7lvmOVbBmnArV,.V5Z6rD5pcV2E04xmwv_X{grid-column:span 2}.PiaRMcFcDcfr8TrjLior{grid-column:span 3}.n3sVilMoIFrsZwT6XO6w{margin-top:-64px}.GC3MlDrKu2PcuU6ymC1g{-webkit-margin-after:16px!important;margin-block-end:16px!important}.d9MRyeQgA5thvNE7ncjP{margin-top:40px}.GLAXysTPuIgv3GRPVlhS{display:-webkit-box;display:-ms-flexbox;display:flex}@media(pointer:fine){.pZag8sthfxTLjP1tsOfV:hover{cursor:pointer}}.lkXpBMSmNP9w702sek8V{border-radius:4px;vertical-align:middle} .lkXpBMSmNP9w702sek8V{margin-right:16px}.XlmJIRaVv7a23oYq6lwU{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .iy5hzmfkdXQ0B2SFZAyj{margin-right:8px}.pJXRyroA6LuPSsKI8MrD{margin-top:4px}.lmvQXQeHS4JcYWGciCt3{background:var(--spice-text);border-radius:100px;color:var(--spice-sidebar);padding:2px} .lmvQXQeHS4JcYWGciCt3{padding-right:8px}.artist-artistVerifiedBadge-wrapper{display:inline-grid;grid-template-columns:auto 1fr;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.artist-artistVerifiedBadge-badge{grid-area:1/1/2/2}.artist-artistVerifiedBadge-fillColor{background-color:var(--spice-text);border-radius:50%;height:60%;justify-self:center;width:60%}.rZ0vXK4lJY10kxTgRQ7g{margin-top:0}.S9KkAiRE_O9ax0Jv_D1i svg{height:20px;width:20px}.mrtMgVMfNyaEhMIGFBuR{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.guUl5dHbF5HJRvwjBxzR,.mrtMgVMfNyaEhMIGFBuR{display:-webkit-box;display:-ms-flexbox;display:flex}.guUl5dHbF5HJRvwjBxzR{background-size:cover;border-radius:8px;height:250px;overflow:hidden;position:relative;width:343px}.jyNYgeneJ5inaKhciDjS{width:100%}.Pnz4fz1OZWV19CVEQJDx{content:"";cursor:pointer;overflow:hidden;text-indent:100%;white-space:nowrap}.HciFabcIqzhXoDbtwR92,.Pnz4fz1OZWV19CVEQJDx{bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.HciFabcIqzhXoDbtwR92{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,7%,0)),to(var(--spice-main)));background:linear-gradient(hsla(0,0%,7%,0),var(--spice-main))}.PNadLEAqpH87jY11pma4{bottom:16px;display:-webkit-box;display:-ms-flexbox;display:flex;left:16px;position:absolute;right:16px}.yWkJ7Ua3DnSTaHxG2qgv{border-radius:4px;vertical-align:middle} .yWkJ7Ua3DnSTaHxG2qgv{margin-right:16px}.By3HGkfBq3fa6bjrhrli{margin-left:4px;-ms-flex-item-align:center;align-self:center}.ukV8NB0JGnieUOa0eri5{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .HGhEGu5V84RXBk6XAPQ6{margin-right:8px}.kwzBRpFigKr1EP2d5qle{background:var(--text-base);border-radius:100px;color:var(--background-press);left:15px;padding:2px;position:absolute;top:15px} .kwzBRpFigKr1EP2d5qle{padding-right:8px}.sCtxvzp3T8umKY86Hfcg{-ms-flex-item-align:center;align-self:center;-webkit-margin-start:auto;margin-inline-start:auto}.JJvGfNiGtduy_XoXPFT1{background-size:cover;cursor:pointer;display:-webkit-box;display:-ms-flexbox;display:flex;height:250px;overflow:hidden;position:relative;width:343px}.fYeCAFmjlgTatXRJ2v0b{background:-webkit-gradient(linear,left top,left bottom,from(hsla(0,0%,7%,0)),to(var(--spice-main)));background:linear-gradient(hsla(0,0%,7%,0),var(--spice-main));bottom:0;left:0;position:absolute;right:0;top:0;z-index:0}.G3ch3A6RIlL3f4ekNqaP{background-color:#5b6dff;display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:12px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;border-radius:2px;color:var(--spice-text);height:24px;justify-content:center;width:97px}.vJIXF1I7CfyfTyCa9JkP{bottom:0;height:100%;left:0;-o-object-fit:cover;object-fit:cover;position:absolute;right:0;top:0;width:100%}.ICkblQqDNPA4tRc06zv_{height:16px;margin-right:2px}.G3ch3A6RIlL3f4ekNqaP>.dUVOQw0MDhn9xoFKyWlx{font-size:13px}.ZEsebSb1CaZVzuPawZEj{bottom:16px;left:16px;position:absolute;right:16px}.ZEsebSb1CaZVzuPawZEj>.j2wjzbkgYnFp7ey8JIp0{color:var(--spice-text);line-height:1;margin-bottom:8px}.ZEsebSb1CaZVzuPawZEj>.JNLGmI_C2cdhHFxe0oxm{color:var(--spice-text);font-size:13px}.ZEsebSb1CaZVzuPawZEj>.O36HCbLOjWcWkAwkNXqJ{border-color:var(--spice-text);font-size:13px;margin-top:12px}.ZEsebSb1CaZVzuPawZEj>.O36HCbLOjWcWkAwkNXqJ:hover{text-decoration:none}.GS_6HA9xIobh5dt5VUSY{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px} .EIxjItP8eBZ1eAT7c4Aq{margin-right:8px}.H3mjE6AEBDPRuHNKUpRK{background:var(--text-base);border-radius:100px;color:var(--background-press);left:15px;padding:2px;position:absolute;top:15px} .H3mjE6AEBDPRuHNKUpRK{padding-right:8px}.artist-artistOnTour-item{-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;display:grid;grid-template-columns:72px auto;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow:hidden;-webkit-box-flex:1;border-radius:4px;-ms-flex:1;flex:1;margin-left:-8px;padding:8px}.artist-artistOnTour-item:hover{background-color:var(--background-tinted-highlight);text-decoration:none}.artist-artistOnTour-item:active{background-color:var(--background-tinted-press)}.artist-artistOnTour-item.artist-artistOnTour-condensed{-webkit-column-gap:16px;-moz-column-gap:16px;column-gap:16px;grid-template-columns:56px auto;margin:0;padding:0}.artist-artistOnTour-item.artist-artistOnTour-condensed:focus-within,.artist-artistOnTour-item.artist-artistOnTour-condensed:hover{background-color:transparent}.artist-artistOnTour-date{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;background:rgba(var(--spice-rgb-selected-row),.1);border-radius:4px;gap:2px;height:64px;justify-content:center;padding:8px;text-align:center;width:64px}@media(max-width <= 1279px){.artist-artistOnTour-date{height:56px;width:56px}}.artist-artistOnTour-date.artist-artistOnTour-condensed{height:56px;width:56px}.artist-artistOnTour-date.artist-artistOnTour-elevated{background:var(--background-base)}.artist-artistOnTour-date.artist-artistOnTour-elevated .artist-artistOnTour-dateMonth{font-size:11px;text-transform:capitalize}.artist-artistOnTour-date.artist-artistOnTour-elevated .artist-artistOnTour-dateDay{font-size:24px;line-height:24px;padding-top:0}.artist-artistOnTour-date .artist-artistOnTour-dateMonth{color:var(--spice-text)}.artist-artistOnTour-date .artist-artistOnTour-dateDay{color:var(--spice-text);letter-spacing:-.04em}@media(width <= 992px){.artist-artistOnTour-date .artist-artistOnTour-dateDay{font-size:16px;line-height:16px}}@media(width <= 1279px){.artist-artistOnTour-date .artist-artistOnTour-dateDay{font-size:16px;line-height:16px}}.artist-artistOnTour-info{overflow:hidden}.artist-artistOnTour-title{margin-bottom:4px;overflow:hidden;text-overflow:ellipsis}.artist-artistOnTour-title,.artist-artistOnTour-title.artist-artistOnTour-condensed{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical}.artist-artistOnTour-time:after{content:"•";margin:0 4px}.artist-artistOnTour-timeAndVenue,.main-seeAll-link{color:var(--spice-subtext)}.artist-artistOnTour-timeAndVenue{display:-webkit-box;overflow:hidden;-webkit-line-clamp:1;-webkit-box-orient:vertical;text-overflow:ellipsis}@media(width <= 1279px){.artist-artistOnTour-timeAndVenue{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;text-overflow:ellipsis}}.artist-artistOnTour-timeAndVenue.artist-artistOnTour-condensed{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;color:rgba(var(--spice-rgb-selected-row),.7)}.artist-artistOnTour-timeAndVenueText{-webkit-line-clamp:2;text-overflow:ellipsis}.artist-artistOnTour-onTourShelfGrid{display:grid;gap:8px;grid-template-columns:1fr 1fr;margin-bottom:40px}@media(width <= 992px){.artist-artistOnTour-onTourShelfGrid{grid-template-columns:1fr}}@media(width >= 1280px){.artist-artistOnTour-onTourShelfGrid{grid-template-columns:1fr 1fr 1fr}}@media(width <= 992px){.artist-artistOnTour-onTourShelfGrid>li:nth-child(n+5){display:none}}.artist-artistOnTour-metadata{bottom:8px;color:var(--spice-text);position:absolute}.artist-artistOnTour-metadata .artist-artistOnTour-location{background:rgba(var(--spice-rgb-shadow),.5);border-radius:4px;font-size:1rem;letter-spacing:0;margin:0 4px;padding:0 4px}.artist-artistOnTour-metadata .artist-artistOnTour-location,.artist-artistOnTour-eventName{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.zpjpg954p7ZWJiTjKWEL{background-color:var(--background-base);isolation:isolate}.qJwKqu8mZFqC7skXmB92{margin:8px 0 40px}.T9NXys2ksNcatzwpffqf{grid-column:span min(var(--column-count) - 3,6);grid-row:span 3}.Uh4CUNI4qIgtR8Pph5sy{margin-bottom:40px}.zASxqUcocvb5R1P74kpn{min-height:0!important}.dUX_MZJq6W_SX43m5epV{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:24px;grid-column:span 3}.OsrS8iBNmRT6RKPxIKmg{grid-column:span var(--column-count)}.ieZlz0gExet7PSsiz4fN{width:calc(50% - 12px)}.MtZlqxNG4iK0gtG87lLq{grid-column:span min(var(--column-count),6)}.CQR25iZaZs5NB2S3B_BV{grid-column:span 4;min-width:372px}.E0wMkTXfG3At4XtrWVcf,.rt3nALM2adEVANHGeezX{grid-column:span 2}.LxvnhlXX0Y3azWltsign{grid-column:span 3}.FY4kdTomUvpP2quh7Hz3{margin-top:-64px}.unaQVpO_antcqfMwSmsh{-webkit-margin-after:16px!important;margin-block-end:16px!important}.ieGrRKgBmhVEX5Jvzhsw{margin-top:40px}.ECjQBV2evKE5PXHKhXV_{display:grid;grid-auto-flow:column;grid-gap:16px;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.W_VvjqdqWRSlMRjRPkPb{margin-top:4px}.pUNc2aOeOQANHrhYa1GU{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative}@media(pointer:fine){.pUNc2aOeOQANHrhYa1GU:hover{cursor:pointer}}.pUNc2aOeOQANHrhYa1GU .T_JcGdJujSuj014SZfjl{background-color:var(--spice-button);border:2px solid var(--spice-main);border-radius:50%;bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;height:24px;position:absolute;right:0;width:24px;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.pUNc2aOeOQANHrhYa1GU .RDZ61ETnag1ilfZTkVxe{color:var(--spice-text)}.V1660uk_uXXZAMEmV4D4{margin-top:40px}.RbnoPhjDDAtbxN8gAiif{margin-bottom:40px}.pH79IoVAcUC3Hn_VbS3B{max-inline-size:332px;padding:16px}.v24nSqF2h73Ep3EJNkNl{display:grid;gap:12px;grid-template-areas:"title" "body" "buttons"}.OPvfrmGjqSYso3Me5FCd{grid-area:title}.TCbF8QBxkRc0mqI5_lzg{-webkit-box-flex:1;-ms-flex:1;flex:1;grid-area:body}.ZYBmZ8ghf3oA7NH2mI7r{display:-webkit-box;display:-ms-flexbox;display:flex;grid-area:buttons;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.Jtt6TUrz6TioPQsKXIY7{-webkit-box-pack:end;-ms-flex-pack:end;gap:32px;justify-content:flex-end}.T79i3UW0ikgJp_edToFJ{color:var(--spice-text)!important}.yzZ_VZHrZBb3REPcU7tD,.yzZ_VZHrZBb3REPcU7tD:before{background:var(--background-elevated-base,#006bcf);height:16px;position:absolute;width:16px}.yzZ_VZHrZBb3REPcU7tD{visibility:hidden}.yzZ_VZHrZBb3REPcU7tD:before{content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg);visibility:visible}#context-menu[data-placement^=top]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{bottom:-8px}#context-menu[data-placement^=bottom]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{top:-8px}#context-menu[data-placement^=left]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{right:-8px}#context-menu[data-placement^=right]>.pH79IoVAcUC3Hn_VbS3B .yzZ_VZHrZBb3REPcU7tD{left:-8px}.zKHdfiQG6XifMqJCe1Xs{max-width:100%}.F01P0D1xtG9RO_uiHxBK{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:var(--background-tinted-base);border-radius:4px;gap:8px;overflow:hidden;padding:8px;text-overflow:ellipsis;white-space:nowrap}.F01P0D1xtG9RO_uiHxBK:hover{background-color:var(--background-elevated-press)}.oGvEk0CK5XgIUe0vIgWL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.aUGJu_1rkM7l_YNH3r86{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.BO7X8b8_SQhDyCjS0EOv{min-width:42px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.VjLekolG5eyfw_9Hhjxv{margin-top:64px}.FdhXU2LtXi5sDE2kLc9I{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin:16px 0}.pvGZ831aNzHTQMZ8CA_u{padding:0}.EPBWBmUPyLEpl4VJflaL{border-radius:4px;margin:32px 0 16px;max-width:400px;min-height:92px;overflow:hidden;padding:8px 12px;position:relative;-webkit-padding-end:100px;background-color:#7358ff;background-image:-webkit-gradient(linear,left bottom,left top,from(transparent),to(rgba(var(--spice-rgb-shadow),.25)));background-image:linear-gradient(0deg,transparent,rgba(var(--spice-rgb-shadow),.25));color:var(--spice-text);padding-inline-end:100px}.JFiowuVIURESjJJznyZx{-webkit-margin-after:8px;line-height:1.5rem;margin-block-end:8px;padding-bottom:8px}.P6CL1uHz_zTqst4gaAXQ{cursor:pointer}.P6CL1uHz_zTqst4gaAXQ span:last-of-type{font-weight:700!important}.JEd1tp9FdtDLBOCRSVe0{-webkit-box-shadow:0 4px 60px rgba(var(--spice-rgb-shadow),.4);box-shadow:0 4px 60px rgba(var(--spice-rgb-shadow),.4);display:block;height:80px;inset-block-end:-8px;inset-inline-end:-8px;position:absolute;-webkit-transform:rotate(25deg);transform:rotate(25deg);width:80px} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */.D_V60ibMxH9Vy7kyvWvc{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;margin-inline:-8px;padding:8px}.D_V60ibMxH9Vy7kyvWvc:hover{background:rgba(var(--spice-rgb-selected-row),.1);text-decoration:none}.D_V60ibMxH9Vy7kyvWvc ._vZ2Gwpio834v2qcnvwK{padding-bottom:8px}.D_V60ibMxH9Vy7kyvWvc .qZDmHcBGDXbHFdGp0afA{display:inline-block;-webkit-margin-end:8px;color:#7358ff;margin-inline-end:8px;vertical-align:-10%}.anRK1X9LKn5HxZQJB5Tl{display:-webkit-box;display:-ms-flexbox;display:flex;height:48px;text-align:center;width:48px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:16px}.shUifmqVle_F5ILRpCqe{border-radius:4px;height:48px;min-height:48px;min-width:48px;width:48px}._WibGTg4OzGdsTf18zK1{display:-webkit-box;-webkit-line-clamp:1;-webkit-box-orient:vertical;overflow:hidden}.LHhL2094jqvK0MNwlGAu{-webkit-box-orient:horizontal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:100%;-webkit-padding-start:12px;padding-inline-start:12px}.LHhL2094jqvK0MNwlGAu,.yRQGIh3Y05BG51IHUW2b{-webkit-box-direction:normal;display:-webkit-box;display:-ms-flexbox;display:flex}.yRQGIh3Y05BG51IHUW2b{-webkit-box-orient:vertical;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:2;-ms-flex:2;flex:2}.G8sU0RZZT_ZhaEv7B26V,.fT86P9Div4C8GXI9hZ36{-webkit-box-flex:1;-ms-flex:1;flex:1} +/*! + * Bootstrap v3.3.7 (http://getbootstrap.com) + * Copyright 2011-2016 Twitter, + Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + *//*! + * Generated using the Bootstrap Customizer (http://getbootstrap.com/customize/?id=35378cd201a131f69c68a64bc4438544) + * Config saved to config.json and https://gist.github.com/35378cd201a131f69c68a64bc4438544 + */@media(min-width:768px){.container{width:750px}}@media(min-width:992px){.container{width:970px}}@media(min-width:1200px){.container{width:1170px}}@media(min-width:1500px){.container{width:1450px}}.row{margin-left:-16px;margin-right:-16px}.container:after,.row:after{clear:both}.hide{display:none!important}.show{display:block!important}.hidden{display:none!important}.y9Olwg6ho6E95Rud3iLs{margin-top:-64px}.pT8jWX5PbLB2Z91Ngl7n{background:var(--background-base);isolation:isolate}.ynfZz1ilmr8Zg8BgXG_d{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding-top:20px;-webkit-margin-after:32px;margin-block-end:32px}.qRS9X9GvnMDoWj6sx0Yo{padding:0 32px}.xpUBYro3YQTRrHlOtDUG{font-size:48px;text-decoration:underline}.RqzE7votb8N93rc_jcM1{font-size:24px;padding-top:20px}.vy9zjnjiY17LMoE8NIXU{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:4px;margin-inline:-8px;padding:8px}.vy9zjnjiY17LMoE8NIXU:hover{background:rgba(var(--spice-rgb-selected-row),.1);text-decoration:none}.McNZLhuWvDVET5VU3isa{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background:rgba(var(--spice-rgb-selected-row),.1);border-radius:4px;height:56px;min-width:56px;padding:4px;text-align:center;width:56px}.McNZLhuWvDVET5VU3isa .Y7ipyLdgXswfEfkyakDd{color:var(--spice-text);display:block;line-height:1;padding-bottom:4px;padding-top:2px}.McNZLhuWvDVET5VU3isa .fPraNia968RT4uPMTi3A{color:var(--spice-text);display:block;letter-spacing:-.04em;line-height:1}.us2rJWb_948b7dlVgBOe{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row;-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;-webkit-padding-start:12px;padding-inline-start:12px}.GqNQN9feHja7Au6wOdLG{-webkit-box-flex:1;color:var(--spice-text);-ms-flex:1;flex:1;font-size:16px!important;width:100%}.wjBvyzKbAJgD2BpyuHKP{font-size:14px!important}.LkCU9WXlxfddrPDZZZ4J{text-align:center} .LtyyKmwxLSSxcYCrRZJh{text-align:right}.LkCU9WXlxfddrPDZZZ4J,.LtyyKmwxLSSxcYCrRZJh{-webkit-box-flex:1;-ms-flex:1;flex:1;font-size:14px!important;width:100%}.kc6crrZKKENRmaIMtzIx{padding-bottom:24px}.azrW1gfJbgz897iDaITJ{padding-bottom:24px;padding-top:16px}.U7meWrHbAMHqpiK5oslu,.wYMCavuacjad59alV1BF{text-align:center}.A6sC7UQiAsM__tCDUDW0{width:35%}.sdc7g7JVaoD3cGz27yCP{max-width:400px;padding:20px 0 0}.pdkMNbSQl8Yi5tl0iOF9{background:var(--background-base);color:var(--spice-text);isolation:isolate;padding:24px;position:relative}.lbKmnVjXCdZ3kRBxjKQZ{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:540px;max-width:100%;width:480px}.VAJ54U4IyPKmKRWXweMn{margin:8px;position:absolute;top:8px} .VAJ54U4IyPKmKRWXweMn{right:0}.r3oh3bOf2I7DZQEND5Uz{margin:8px;position:absolute;top:8px} .r3oh3bOf2I7DZQEND5Uz{left:0}.XwomR4z9c60ph1tYBcdm{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-bottom:1px solid rgba(83,83,83,.3);margin-bottom:16px;padding-bottom:16px}.bQATTxDxEbS7xXRsr_Mt,.wFdZQwoko8rVRTLeFG5G{-webkit-box-flex:1;-ms-flex:auto;flex:auto;overflow-y:scroll}.jcDbJiJUoAVWZ7h1Rhhy{margin-bottom:8px}.UkSUgC7NQnYbptBJEAM9{display:-webkit-box;display:-ms-flexbox;display:flex}.UkSUgC7NQnYbptBJEAM9 button:first-child{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.UkSUgC7NQnYbptBJEAM9 button:first-child:focus,.UkSUgC7NQnYbptBJEAM9 button:first-child:hover{background:none}.UkSUgC7NQnYbptBJEAM9:focus,.UkSUgC7NQnYbptBJEAM9:hover{background:rgba(var(--spice-rgb-selected-row),.05)}.xfncDja0wZotJaVS3aq9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-flex:1;background:none;border:none;color:var(--spice-text);cursor:pointer;-ms-flex:auto;flex:auto;height:38px;line-height:38px;margin:0;padding:0 12px;text-align:start;width:100%}.xfncDja0wZotJaVS3aq9:focus,.xfncDja0wZotJaVS3aq9:hover{background:rgba(var(--spice-rgb-selected-row),.05)}.gJedMi0s8_RQ4d2aWYzI{-webkit-box-flex:1;-ms-flex:auto;flex:auto}.WZzy7tMC5xlIMwoZ32JU{background:var(--background-highlight);border-radius:8px;color:var(--spice-text);isolation:isolate;max-width:100%;padding:32px;position:relative;width:480px}.LkdC_QJiLoD0OTOWnkJV{display:-webkit-box;display:-ms-flexbox;display:flex;position:relative;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:0 12px}.WqruN54NvYqlA2XlTJ0Z{margin:8px;position:absolute;top:0} .WqruN54NvYqlA2XlTJ0Z{right:0}.GS4yLEr0XMj8kw2iMAd8{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:16px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:8px;margin-top:32px;text-align:center}.prICvcudVq_SL6dqkZBw{margin:56px;padding:20px;position:relative}.prICvcudVq_SL6dqkZBw,.prICvcudVq_SL6dqkZBw:before{border:1px solid rgba(var(--spice-rgb-selected-row),.4);border-radius:50%}.prICvcudVq_SL6dqkZBw:before{content:" ";display:block;inset:-32px;position:absolute}.YLM_DWbpYGBpvqtDEhum{margin-bottom:24px}.h8jjXJERT64OZi2sHCbi{padding-top:8px}.LUZuAtOgmXbneOoxnP8P{-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:var(--spice-text);position:relative;-webkit-margin-end:8px;margin-inline-end:8px}.LUZuAtOgmXbneOoxnP8P,.dIOLAcD26GH01pNjZHBL{display:-webkit-box;display:-ms-flexbox;display:flex}.dIOLAcD26GH01pNjZHBL{gap:8px}.r4ZTDlEunjDS3sz3L2zK{position:absolute;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;max-height:288px;width:304px;z-index:10;-webkit-margin-before:8px;background-color:var(--spice-card);color:var(--spice-text);inset-block-start:100%;inset-inline-start:0;margin-block-start:8px}.Tro85cCjPA7ZHyzR1zAE,.r4ZTDlEunjDS3sz3L2zK{border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex}.Tro85cCjPA7ZHyzR1zAE{-webkit-box-flex:0;-ms-flex:none;flex:none;-webkit-box-pack:stretch;-ms-flex-pack:stretch;justify-content:stretch;-webkit-box-align:center;-ms-flex-align:center;align-items:center;background-color:rgba(var(--spice-rgb-selected-row),.1);border:1px solid rgba(var(--spice-rgb-selected-row),.3);height:32px;margin:12px;padding-inline:8px}.ha09EFavr4tw3Rcf14Wt{background-color:transparent;border:0;color:var(--spice-text);display:block;font-weight:300;padding-inline:8px;width:100%}.ha09EFavr4tw3Rcf14Wt::-webkit-search-cancel-button{-webkit-appearance:none;appearance:none}.e7m85731K8PcdAPpY0_T{background-color:transparent;border:none;line-height:.5em;pointer-events:auto}.IFRpxU2fT2MFYfqhTXIg{padding:12px;-webkit-padding-before:0;padding-block-start:0}.ihYHUpb9FuqRKkywvHIQ{overflow-y:scroll}.q9rlL6VTsRm59YxuIceC{background:none;border:none;color:var(--spice-text);cursor:pointer;display:block;height:38px;line-height:38px;margin:0;padding:0 12px;text-align:start;width:100%}.q9rlL6VTsRm59YxuIceC:focus,.q9rlL6VTsRm59YxuIceC:hover{background:rgba(var(--spice-rgb-selected-row),.05)}.tXNcvSNL8Kx6wKUOej2I{background:none;border:none;color:var(--spice-text);cursor:pointer;display:block;height:38px;line-height:38px;margin:0 0 12px;padding:0 12px;text-align:start;width:100%}.tXNcvSNL8Kx6wKUOej2I:focus,.tXNcvSNL8Kx6wKUOej2I:hover{background:rgba(var(--spice-rgb-selected-row),.05)}.XZ1RzeF1kz6ch8idhAAD{word-wrap:break-word}.GQeQjsi5dPF4PFO7BzvL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:8px}.Hj5kpRfIocJic5jcxsW_{margin-bottom:24px}.aJduGcVsoCwJvV1jVqjl{background:var(--background-highlight);border-radius:4px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:12px;margin-bottom:8px;padding:12px 16px}.aJduGcVsoCwJvV1jVqjl div:nth-child(2){-webkit-box-flex:1;-ms-flex:auto;flex:auto}@-webkit-keyframes shimmer{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}@keyframes shimmer{0%{-webkit-transform:translateX(-100%);transform:translateX(-100%)}to{-webkit-transform:translateX(100%);transform:translateX(100%)}}.g8vV54lx3mRkeseb5Bf2{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:24px}.jbcMEstnj9EEGk0iasdD{border-radius:16px;display:-webkit-box;display:-ms-flexbox;display:flex;gap:8px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:16px}.re4Rxq0ZHW6zcqniEgMv{background-color:var(--mainColor);color:var(--textColor,var(--spice-sidebar))}.re4Rxq0ZHW6zcqniEgMv .Bf8_3eE_YXxwPiD6KXPY{background-color:rgba(var(--spice-rgb-shadow),.1)}.re4Rxq0ZHW6zcqniEgMv .RPo65cLEoLdTEkTummvb{border:3px solid var(--mainColor)}.re4Rxq0ZHW6zcqniEgMv .xBNLwmb6ERaaRsCIo9dg{color:var(--textColor,var(--spice-sidebar));opacity:.1}.re4Rxq0ZHW6zcqniEgMv .rPWE_GaRZjZZUMr7G8JR{color:var(--textColor,var(--spice-sidebar))}.KM8BFaw7LbvBIcLnf2BX{background-color:var(--background-base)}.KM8BFaw7LbvBIcLnf2BX .Bf8_3eE_YXxwPiD6KXPY{background-color:var(--mainColor);color:var(--spice-sidebar)}.KM8BFaw7LbvBIcLnf2BX .RPo65cLEoLdTEkTummvb{border:3px solid var(--background-base)}.KM8BFaw7LbvBIcLnf2BX .xBNLwmb6ERaaRsCIo9dg{color:var(--mainColor);opacity:.25}.KM8BFaw7LbvBIcLnf2BX .rPWE_GaRZjZZUMr7G8JR{color:var(--spice-sidebar)}.h_or55__Gfm37Hj0BII9{-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.g85DlcND8Z02L7beYR4w,.h_or55__Gfm37Hj0BII9{display:-webkit-box;display:-ms-flexbox;display:flex}.g85DlcND8Z02L7beYR4w{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px}.aCCWdrptC6K5jwPdCFzA{display:-webkit-box;display:-ms-flexbox;display:flex}.Bf8_3eE_YXxwPiD6KXPY{padding:4px 8px;position:relative} .Bf8_3eE_YXxwPiD6KXPY{-webkit-transform:skewX(-15deg);transform:skewX(-15deg)}.UmbVZN08wsxnijDwCiqw{display:block;font-style:italic;text-align:center} .UmbVZN08wsxnijDwCiqw{-webkit-transform:skewX(15deg);transform:skewX(15deg)}.kdHZ5dN96_2WQdSVE0Fn{opacity:.5}.JqfIX63RXBFalKDdgoxp{height:72px;position:relative}.RPo65cLEoLdTEkTummvb{margin-right:36px;position:relative;z-index:1}.gMIIMHORo2F6KINUrks9{bottom:3px;height:48px;position:absolute;right:0;width:48px;z-index:0}.ZnwwywxlQDxc9vmvPfVJ{height:48px;position:relative;width:48px}.nu4wp680TqinUAntKWgh{inset:0;margin:auto;position:absolute}.IwTsJ2mPD2SedRZsd8Ug{display:block}.RsojTMSCnZ_n6sJlvmFY{max-height:100%;max-width:80%}.tAdvjJEctimN9bSKFEEs{background:var(--background-base);border-radius:4px;max-width:100%;overflow:hidden;padding:0 0 24px;position:relative;width:430px}.Kh8seY4CCWJ_lF2HULcR{background-color:var(--mainColor);color:var(--textColor,var(--spice-sidebar))} .Kh8seY4CCWJ_lF2HULcR{padding-right:24px}.zoExFlFK7NJZxx9sZmYE{position:absolute;top:12px} .zoExFlFK7NJZxx9sZmYE{right:8px}.dsRW73mDQaMgshOkTP1R{position:absolute;top:12px} .dsRW73mDQaMgshOkTP1R{left:8px}._AGAd8ZZIa10TY8HriYh{padding-top:0}.plBJu8NZSrHwWub7JZiR{padding-top:40px}.iGaY0QRLiJX3cwefmyJY{display:-webkit-box;display:-ms-flexbox;display:flex;padding:0 16px 16px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:24px}.S4W5QhATentoPoZzHgU6{max-height:350px;overflow:auto;padding:16px 24px}.KL44GxqNPj8XNymvOAom{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.T4X1Pr5DXjcTNQzLa0_C{background-color:var(--background-elevated-base);border:1px dashed var(--spice-text);border-radius:5px;margin-bottom:8px} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4168.js b/dot-config/spicetify/Extracted/Themed/xpui/4168.js new file mode 100755 index 00000000..55036325 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4168.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4168],{72954:(e,t,a)=>{a.d(t,{w:()=>m});var s=a(30758),r=a(97500),i=a.n(r),n=a(62955),l=a(31417),o=a(881),c=a(9547);const d="pvGZ831aNzHTQMZ8CA_u";var u=a(86070);const m=(0,s.memo)((function({onClick:e=(()=>{}),size:t,className:a,uri:r,sharingInfo:m,interactionData:h,ariaLabel:g=l.Ru.get("mwp.list.item.share"),condensedAll:p,placement:x,semanticColor:j,disableTooltip:f}){const{onCopyLink:y}=(0,c.L)({sharingInfo:m,uri:r,interactionData:h}),v=(0,s.useCallback)((()=>{y(),e()}),[e,y]);return(0,u.jsx)(o.a,{ariaLabel:g,size:t,onClick:v,className:i()(d,a),icon:n.C,condensedAll:p,placement:x,condensed:!0,semanticColor:j,disableTooltip:f})}))},44234:(e,t,a)=>{a.d(t,{Z:()=>n});var s=a(30758),r=a(55760),i=a(86070);const n=(0,s.memo)((function({children:e}){return(0,i.jsx)("span",{className:r.A.detailsText,children:e})}))},86236:(e,t,a)=>{a.d(t,{W:()=>l});var s=a(30758),r=a(74159),i=a(31417),n=a(86070);const l=(0,s.memo)((function({isFollowing:e,onClick:t,disabled:a=!1,buttonText:s,size:l="small",className:o}){const c=e?i.Ru.get("following"):i.Ru.get("follow");return(0,n.jsx)(r.n,{onClick:t,disabled:a,size:l,className:o,children:s||c})}))},6556:(e,t,a)=>{a.d(t,{M:()=>u});var s=a(97500),r=a.n(s),i=a(37289),n=a(95530);const l="artist-artistVerifiedBadge-wrapper",o="artist-artistVerifiedBadge-badge",c="artist-artistVerifiedBadge-fillColor";var d=a(86070);const u=({text:e,iconSize:t="medium",className:a})=>(0,d.jsxs)("span",{className:r()(l,a),children:[(0,d.jsx)("div",{className:`${o} ${c}`}),(0,d.jsx)(i.O,{semanticColor:"textAnnouncement",className:o,size:t}),e?(0,d.jsx)(n.E,{variant:"bodySmall",children:e}):null]})},36685:(e,t,a)=>{a.d(t,{H4:()=>s});a(30758),a(97500),a(31417),a(99701),a(35352);a(86070);let s=function(e){return e.primary="primary",e.secondary="secondary",e.transparent="transparent",e}({})},61335:(e,t,a)=>{a.d(t,{y:()=>H});var s=a(30758),r=a(7315),i=a(95530),n=a(89315),l=a(31417),o=a(41616),c=a(97500),d=a.n(c),u=a(8725),m=a(81670),h=a(22984),g=a(42878);const p="od_kF1rLZbir8kM_F607",x="qyKJPLjz8o4jnbk92JOn",j="zsVdTdACMZA_MWB3HlEW",f="nsakAYOtgZOAcEO4ObrM",y="uJjmxe0T11dUVeW6Biz8",v="F1K3uW1jqwG0wxFHO5gl",b="Ii9XdJaXIuKbmR1zC4Rt";var C=a(86070);const N=s.memo((function(e){const{images:t,initialSelected:a=0}=e,[r,i]=(0,s.useState)(a),[n,o]=(0,s.useState)(0),c=(0,s.useRef)(null);return(0,s.useEffect)((()=>{const e=c.current;e&&o(e.clientWidth)}),[]),(0,g.s)((()=>{const e=c.current;e&&o(e.clientWidth)})),0===t.length?null:(0,C.jsxs)("div",{className:p,children:[t.length>1&&(0,C.jsxs)(C.Fragment,{children:[0!==r&&(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("gallery.prev"),onClick:()=>i(r-1),className:d()(x,j),children:(0,C.jsx)(u.g,{})}),r!==t.length-1&&(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("gallery.next"),onClick:()=>i(r+1),className:d()(x,f),children:(0,C.jsx)(m.V,{})})]}),(0,C.jsx)("ul",{className:y,ref:c,dir:"auto",children:t.map(((e,t)=>(0,C.jsx)("li",{"aria-hidden":r!==t,className:v,style:{transform:`translateX(-${r*n}px)`},children:(0,C.jsx)(h._,{loading:"lazy",src:e.url,width:e.width,height:e.height,className:b})},t)))})]})}));var R=a(44971),k=a(21082),A=a(90696),I=a(75375),S=a(78479),_=a(80759),w=a(83513),T=a(70257),E=a(19862),U=a(16157);const P="DVWIV41y6daOMjQKR8Zj",L="oORVTPvg6eTQflVKKgw8",D="muHL0_3HjlqTZDoapgc9";function B(e){switch(e){case U.EK.Facebook:return(0,C.jsx)(I.G,{className:L});case U.EK.Twitter:return(0,C.jsx)(S.f,{className:L});case U.EK.Instagram:return(0,C.jsx)(_.Y,{className:L});case U.EK.Wikipedia:return(0,C.jsx)(E.p,{className:L});case U.EK.Soundbetter:return(0,C.jsx)(w.S,{className:L});case U.EK.Whatsapp:return(0,C.jsx)(T.E,{className:L});case U.EK.Other:default:return null}}function M(e){if(e.name===U.EK.Soundbetter){const t=new URL(e.url);return t.searchParams.append("utm_source","open.spotify.com"),t.searchParams.append("utm_medium","referral"),t.searchParams.append("utm_campaign","hireme_link_spotify"),t.href}return e.url}function F(e){switch(e){case U.EK.Facebook:return"Facebook";case U.EK.Twitter:return"Twitter";case U.EK.Instagram:return"Instagram";case U.EK.Wikipedia:return"Wikipedia";case U.EK.Soundbetter:return"Hire Me on SoundBetter";case U.EK.Whatsapp:return"WhatsApp Channel";case U.EK.Other:default:return"Other"}}const V=({links:e})=>0===e.length?null:(0,C.jsx)("div",{className:P,children:e.map((e=>(0,C.jsxs)("a",{rel:"noopener noreferrer",target:"_blank",href:M(e),className:D,children:[B(e.name),(0,C.jsx)(i.E,{variant:"bodySmall",children:F(e.name)})]},e.url)))});var O=a(41661),q=a(50671),z=a(21549),G=a(17802);const H=s.memo((function(e){const{artistUri:t,name:a,bio:c="",bioSource:d=null,images:u=[],avatarImages:m=[],worldRank:h,monthlyListeners:g,topCities:p,followers:x,externalLinks:j=[],isOpen:f,closeModal:y}=e,{spec:v}=(0,z.r)(n._,{data:{identifier:"",uri:t}}),b=(0,s.useCallback)((()=>{v.closeButtonFactory().hitUiHide(),y()}),[y,v]),I=(0,q.t)(v);return(0,C.jsxs)(R.A,{contentLabel:a,className:G.A.modal,isOpen:f,onRequestClose:b,animation:{modal:{base:G.A.modalBase,afterOpen:G.A.modalAfterOpen,beforeClose:G.A.modalBeforeClose}},animated:!0,children:[(0,C.jsx)("button",{type:"button","aria-label":l.Ru.get("close"),onClick:b,className:G.A.close,children:(0,C.jsx)(r.M,{size:"small"})}),(0,C.jsxs)(A.a,{className:G.A.scrollbars,children:[(0,C.jsx)(N,{images:u}),(0,C.jsx)("div",{className:G.A.content,ref:I,children:(0,C.jsxs)("div",{className:G.A.columnContainer,children:[(0,C.jsxs)("div",{className:G.A.statsContainer,children:[h>0?(0,C.jsxs)("div",{className:G.A.rank,children:[(0,C.jsxs)(i.E,{as:"div",variant:"titleSmall",children:["#",h]}),(0,C.jsx)(i.E,{as:"div",variant:"marginal",children:l.Ru.get("artist-page.world_rank")})]}):null,"number"==typeof x?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(i.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:l.Ru.formatNumber(x)}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("followers")})]}):null,"number"==typeof g?(0,C.jsxs)("div",{className:G.A.stats,children:[(0,C.jsx)(i.E,{as:"div",variant:"titleMedium",semanticColor:"textBase",children:l.Ru.formatNumber(g)}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("monthly_listeners")})]}):null,p&&p.length?p.map((({city:e,numberOfListeners:t,country:a},s)=>(0,C.jsxs)("div",{className:G.A.cityBlock,children:[(0,C.jsx)(i.E,{as:"div",variant:"bodySmallBold",semanticColor:"textBase",children:l.Ru.get("artist-page.where-people-listen-from",e||"",a||"")}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("artist-page.how-many-listeners",t||0)})]},s))):null,(0,C.jsx)(s.Suspense,{fallback:null,children:(0,C.jsx)(V,{links:j})})]}),(0,C.jsx)("div",{className:G.A.bioContainer,children:c?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(i.E,{as:"div",variant:"bodyMedium",className:G.A.bio,dir:"auto",children:(0,C.jsx)(O.y,{source:c,LinkComponent:k.N,onLinkClick:b})}),d===U.B3.Autobiography&&(0,C.jsxs)("div",{className:G.A.postedBy,children:[(0,C.jsx)(o.e,{images:m,label:a,width:32,userIconSize:"small",className:G.A.postedByAvatar}),(0,C.jsx)(i.E,{as:"div",variant:"bodySmall",children:l.Ru.get("acq.artist.about.attribution",{artist:a})})]})]}):null})]})})]})]})}))},20836:(e,t,a)=>{a.d(t,{I:()=>j});var s=a(30758),r=a(97500),i=a.n(r),n=a(95530),l=a(22726),o=a(21082),c=a(54926),d=a(73812),u=a(33329),m=a(50671),h=a(90497),g=a(86070);function p(e){return e.name?e.name:""}const x=({children:e,uri:t,condensed:a,spec:r,index:n})=>{const c=(0,u.s)(),d=(0,l.o_h)(t),p=null!==d&&(0,l.lyd)(d)?d.id:"",x=(0,s.useMemo)((()=>r.tourElementFactory({identifier:p,uri:t,position:n||0,reason:""})),[r,t,p,n]),j=(0,m.t)(x);return(0,g.jsx)(o.N,{to:t,className:i()(h.A.item,{[h.A.condensed]:a}),onClick:()=>{c.logInteraction(x.hitUiNavigate({destination:t}))},ref:j,children:e})},j=s.memo((function({concert:e,spec:t,index:a,condensed:s,elevatedDate:r,titleVariant:l="bodyMediumBold"}){const{venue:o,uri:u}=e,m=(0,c.l4)(e.date.isoString);return(0,g.jsxs)(x,{uri:u,condensed:s,spec:t,index:a,children:[(0,g.jsxs)("time",{className:i()(h.A.date,{[h.A.condensed]:s,[h.A.elevated]:r}),dateTime:(0,c.WB)(m),children:[(0,g.jsx)(n.E,{as:"h5",variant:"bodySmallBold",className:h.A.dateMonth,children:(0,c.tj)(m)}),(0,g.jsx)(n.E,{as:"h1",variant:"titleSmall",className:h.A.dateDay,children:(0,c.Py)(m)})]}),(0,g.jsxs)("div",{className:h.A.info,children:[(0,g.jsx)(n.E,{as:"h3",variant:l,semanticColor:"textBase",className:i()(h.A.title,{[h.A.condensed]:s}),children:o.location?.name}),(0,g.jsx)(n.E,{as:"p",variant:"bodySmall",semanticColor:"textSubdued",className:h.A.eventName,children:(0,d.i3)(e)}),(0,g.jsxs)(n.E,{as:"span",semanticColor:"textSubdued",variant:"bodySmall",className:i()(h.A.timeAndVenue,{[h.A.condensed]:s}),children:[(0,g.jsx)("time",{className:h.A.time,children:(0,c.MW)(m)}),p(o)]})]})]})}))},47667:(e,t,a)=>{a.d(t,{b:()=>N});var s=a(30758),r=a(31417),i=a(38682),n=a(550),l=a(39795),o=a(95446),c=a(76633),d=a(6966),u=a(82610),m=a(96614),h=a(4266),g=a(41457),p=a(44672),x=a(20784),j=a(33329),f=a(13719),y=a(63096),v=a(86070);const b=new Set(o.gc),C=new Set([]),N=s.memo((function({nrTracks:e,collectionUri:t,initialItems:a,uri:N,sortable:R=!0,scrollToUri:k,usePlayContextItem:A,outerDomRef:I,spec:S,isCompactMode:_=!1,tagFilter:w}){const T=(0,x.f)(),E=(0,s.useRef)(null),{filter:U}=(0,s.useContext)(l.g),P=(0,s.useRef)((()=>{})),[L,D]=(0,s.useState)([]),{sortState:B,setSortState:M}=(0,s.useContext)(o.cL),F=(0,j.s)(),V=(0,c.w)(),O=(0,s.useCallback)(((e,t)=>{e===h.$.ADDED_AT?M({column:h.$.ADDED_AT,order:B.order===h.H.ASC?h.H.DESC:h.H.ASC}):M((0,i.So)(e,B)),S&&F.logInteraction(S.columnHeaderFactory({identifier:e,position:t||0}).hitSort())}),[F,M,B,S]);(0,s.useEffect)((()=>{E.current&&k&&E.current.scrollToItem({uri:k})}),[k]);const q=(0,s.useCallback)((e=>{const t=e.map((e=>e.uri));P.current(),T.remove({uris:t})}),[T]),z=(0,s.useCallback)(((e,t)=>{P.current=t,e.length>1?D(e):q(e)}),[q]),[,G]=(0,d.z)(),H=(0,s.useCallback)((async(e,t)=>{const a=await T.getTracks({offset:e,limit:t,uri:N,sort:(0,g.c)(B),filters:[U??null,w??null].filter(f.P)}),s=a?.totalLength??0;return{items:a?.items??[],totalLength:s}}),[U,w,T,B,N]),K=(0,s.useCallback)(((e,a)=>{const s=(0,y.g)(e.album?.images,{desiredSize:40,desiredLabel:"small"});return(0,v.jsx)(u.W,{index:a,contextUri:t,uri:e.uri,isPlayable:e.isPlayable,duration_ms:e.duration.milliseconds,name:e.name,artists:e.artists,albumOrShow:e.album,isExplicit:e.isExplicit,isMixedMedia:!1,isPaywalled:!1,isUserSubscribed:!1,isLocal:e.isLocal,addedBy:[],dateAdded:e.addedAt,hasDecoratedAddedBy:!1,release_date:"",isMOGEFRestricted:e.is19PlusOnly,type:e.type,imgUrl:s?.url||"",onMove:()=>{},onInsert:()=>{},usePlayContextItem:A,allowedDropTypes:[],isDisliked:!1,playlistName:r.Ru.get("sidebar.liked_songs"),isOwnedBySelf:!0,isCompactMode:_,hasAssociatedVideo:e.hasAssociatedVideo},a+e.uri)}),[t,A,_]),Z=(0,s.useCallback)((e=>({uri:e.uri,uid:e.uri})),[]);return(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(p.pZ,{value:"liked-songs-tracklist",children:(0,v.jsx)(m.S4,{ariaLabel:r.Ru.get("sidebar.liked_songs"),hasHeaderRow:!0,columns:V,sortableColumns:T.getCapabilities().canSortTracksAndEpisodes&&R?b:C,sortState:B,onSort:O,renderRow:K,resolveItem:Z,onRemove:z,nrTracks:e,fetchTracks:H,limit:50,canFetchAllTracks:T.getCapabilities().canFetchAllItems,outerRef:E,outerDomRef:I,tracks:a,onNrValidItemsChange:G,isCompactMode:_,columnPersistenceKey:"liked-songs-tracklist"},t)}),(0,v.jsx)(n.F,{title:r.Ru.get("remove_from_your_liked_songs"),isOpen:L.length>0,tracks:L,onClose:e=>{e.stopPropagation(),D([])},onRemove:q})]})}))},56708:(e,t,a)=>{a.d(t,{q:()=>f});var s=a(78876),r=a(31417),i=a(92255),n=a(30758),l=a(75134),o=a(43743),c=a(38996),d=a(41661),u=a(33329),m=a(50671),h=a(86070);const g=({merchId:e,spec:t,uri:a,url:s,images:r,description:i,merchName:g="",testId:p,index:x,merchVariant:j,variant:f})=>{const y=(0,u.s)(),v=(0,n.useMemo)((()=>t.merchCardFactory({identifier:e,uri:a,position:x})),[e,a,t,x]),b=()=>{window.open(s,"_blank");const e=v.hitNavigateToExternalUri({destination:s});y.logInteraction(e)},C=(0,m.t)(v);return(0,h.jsx)("div",{ref:C,children:(0,h.jsx)(l.Z,{variant:f,delegateNavigation:!0,index:x,onClick:b,headerText:g,featureIdentifier:"playlist",requestId:j,uri:a,isPlayable:!1,renderCardImage:()=>(0,h.jsx)(o.M,{images:r}),renderSubHeaderContent:()=>(0,h.jsx)(c.c,{children:i?(0,h.jsx)(d.N,{source:i,onLinkClick:b}):g&&(0,h.jsxs)("span",{children:["Description: ",g]})}),testId:p})})};var p=a(44672),x=a(21549),j=a(83318);const f=({id:e,merchItems:t,merchVariant:a,uri:n})=>{const{spec:l}=(0,x.r)(s.k,{data:{identifier:e,uri:n,position:0,reason:a}});return(0,h.jsx)(p.pZ,{value:"shelf/offers","data-testid":"merch-shelf",children:(0,h.jsx)(i.$,{total:t.length,title:r.Ru.get("web-player.merch.title"),className:j.A.shelfSpace,seeAllLabel:r.Ru.get("web-player.merch.seeAllUri"),children:t.map(((e,t)=>e.url&&e.nameV2?(0,h.jsx)(p.pZ,{value:"card",index:t,children:(0,h.jsx)(g,{index:t,url:e.url,uri:e.uri,merchName:e.nameV2,description:e.description||"",images:e.image?.sources||[],merchVariant:a,merchId:e.uri,spec:l},e.url)},e.url):null))})})}},6444:(e,t,a)=>{a.d(t,{_:()=>d});var s=a(30758),r=a(21743),i=a(97500),n=a.n(i);const l="eqw9lvuoZHrkWMTdyTpY",o="lb08f71wES9AQnKx6e0R";var c=a(86070);const d=(0,s.memo)((function(e){const{triggerOnInitialLoad:t=!1,onReachBottom:a,showScrollbar:i=!0,horizontalScroll:d=!1,className:u}=e,{ref:m,inView:h}=(0,r.Wx)({initialInView:t});return(0,s.useLayoutEffect)((()=>{h&&a&&a()}),[h,a]),(0,c.jsxs)("div",{className:n()({[o]:!i,[l]:d},u),"data-testid":"infinite-scroll-list",children:[e.children,(0,c.jsx)("div",{ref:m})]})}))},45620:(e,t,a)=>{a.d(t,{X:()=>n,s:()=>i});var s=a(92654);const r=(0,a(94119).y)((()=>({color:null}))),i=e=>{r.setState({color:e})},n=()=>{const{color:e}=(0,s.Pj)(r);return e}},8213:(e,t,a)=>{a.d(t,{q:()=>l});var s=a(30758),r=a(63123),i=a(45620),n=a(72191);function l(e){(0,s.useLayoutEffect)((()=>{if(!e)return()=>{(0,i.s)(null)};const t=(0,r.r6)((0,n.c)(e,"higherContrast"));return(0,i.s)(t.background.base??null),()=>{(0,i.s)(null)}}),[e])}},64964:(e,t,a)=>{a.r(t),a.d(t,{ArtistOffers:()=>ra,default:()=>Fi});var s=a(30758),r=a(85387),i=a(69707),n=a(22726),l=a(6772),o=a(31417),c=a(90139),d=a(15292),u=a(92202),m=a(92255),h=a(57776),g=a(59147);const p=new h.l("queryArtistAppearsOn","query","9a4bb7a20d6720fe52d7b47bc001cfa91940ddf5e7113761460b4a288d18a4c1",null);var x=a(99553),j=a(86070);const f=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},h={gcTime:15*g.i},(0,g.I)(p,n,h));var n,h;const f="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===f||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-appears-on")});const y=f.profile.name,v=(0,x.Lf)(f.relatedContent.appearsOn.items);return(0,j.jsxs)("div",{className:"contentSpacing",children:[y?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.appearson.seo.title",y)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist.appears-on"),total:v.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:v.map(((e,t)=>(0,j.jsx)(c.a,{index:t,...(0,x.UT)(e)},e.uri)))})]})}));var y=a(37491),v=a(97500),b=a.n(v),C=a(95530),N=a(83352),R=a(45664),k=a(53187),A=a(75830),I=a(78516),S=a(21951),_=a(1246),w=a(25493),T=a(73658),E=a(93500),U=a(18449),P=a(21646),L=a(21082),D=a(36685),B=a(35895),M=a(60690),F=a(14909),V=a(87498),O=a(46875),q=a(57292),z=a(16157);const G="NyRhcd1ie8y97gBKhKti";function H(e){switch(e){case z._m.Single:return o.Ru.get("single");case z._m.Ep:return o.Ru.get("ep");case z._m.Compilation:return o.Ru.get("compilation");case z._m.Album:default:return o.Ru.get("album")}}function K({albumType:e,isRestricted:t}){return(0,j.jsxs)(q.q,{children:[t&&(0,j.jsx)(O.u,{className:G,size:"xsmall",semanticColor:"textBase"}),H(e)]})}var Z=a(61147),W=a(27012),J=a(15025),X=a(50674),Y=a(43855),Q=a(24533);const $="artist-artistDiscography-topBar",ee="artist-artistDiscography-topBarScrolled",te="artist-artistDiscography-artistName",ae="artist-artistDiscography-button",se="artist-artistDiscography-active",re="artist-artistDiscography-tracklist",ie="artist-artistDiscography-cardGrid",ne="artist-artistDiscography-headerContainer",le="artist-artistDiscography-firstAlbum",oe="artist-artistDiscography-headerImage",ce="artist-artistDiscography-headerMetadata",de="artist-artistDiscography-headerButtons",ue="artist-artistDiscography-headerTitle",me=s.memo((function({album:e,artistUri:t,usePlayContextPage:a,pageIndex:r,setTopBarContent:i}){const[n,l]=(0,Q.A)(e.uri),{titleRef:c,tracklistRef:d,displayTopBar:u}=(0,J.h)(),{isCompactMode:m}=(0,Z.a)(),h=(0,s.useCallback)((async()=>{try{await l(!n)}catch{}}),[n,l]),{isPlaying:g,togglePlay:p,usePlayContextItem:x}=a({pageURI:e.uri,pageIndex:r}),{draggable:f,onDragStart:y}=(0,W.P)({itemUris:e.uri?[e.uri]:[],dragLabelText:e.name}),v=(0,s.useMemo)((()=>({items:[],totalCount:0})),[]),O=(0,s.useMemo)((()=>{if(u)return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(B.D,{size:"medium",onClick:()=>p(),disabled:!e.playability.playable,isPlaying:g,uri:e.uri}),(0,j.jsx)(_.X,{text:e.name,dragUri:e.uri,dragLabel:e.name})]})}),[e.name,e.playability.playable,e.uri,u,g,p]);(0,s.useEffect)((()=>{i(O)}),[i,O]);const q=e?.date,G=(0,V.t)();return(0,j.jsxs)(Y.P,{surface:X.u.ALBUM,uris:[e.uri],children:[(0,j.jsxs)("div",{className:b()(ne,{[le]:0===r}),children:[(0,j.jsx)(w.b,{className:oe,images:e.coverArt?.sources||[],name:e.name,placeholderType:"album",dragUri:e.uri}),(0,j.jsxs)("div",{className:ce,children:[(0,j.jsx)(C.E,{variant:"titleMedium",semanticColor:"textBase",className:ue,draggable:f&&!!e.uri,onDragStart:y,children:(0,j.jsx)(L.N,{to:e.uri,children:e.name})}),(0,j.jsx)("div",{ref:c}),(0,j.jsxs)(T.X,{children:[(0,j.jsx)(K,{albumType:e.type,isRestricted:e.playability.reason===z.$c.CatalogueRestricted}),(0,j.jsx)(P.J,{}),(0,j.jsx)(U.H,{releaseDate:q}),(0,j.jsx)(P.J,{}),(0,j.jsx)(E.G,{totalItems:e.tracks.totalCount,containsTracks:!0})]}),(0,j.jsxs)("div",{className:de,children:[(0,j.jsx)(B.D,{onClick:()=>p(),disabled:!e.playability.playable,isPlaying:g,size:"small",uri:e.uri,version:D.H4.secondary}),(0,j.jsx)(S.e,{children:(0,j.jsx)(N.M,{isAdded:!!n,onClick:h,disabled:!1,size:N.t.sm,condensed:!0})}),(0,j.jsx)(R.f,{uri:e.uri,isFollowing:!!n,onFollow:h,size:R.M.sm,condensed:!0}),(0,j.jsx)(A.b,{menu:(0,j.jsx)(I.h,{uri:e.uri,artistUri:t,sharingInfo:e.sharingInfo}),children:(0,j.jsx)(k.e,{size:k.M.sm,label:o.Ru.get("more.label.context",e.name)})})]})]})]}),(0,j.jsx)("div",{ref:d,className:re,children:(0,j.jsx)(M.a,{columns:G,children:(0,j.jsx)(F.F,{albumName:e.name,nrTracks:e.tracks.totalCount,albumUri:e.uri,discs:v,usePlayContextItem:x,isCompactMode:m})})})]})}));var he=a(51281);const ge=s.memo((function(e){const{usePlayContextPage:t,pageIndex:a}=e,{isPlaying:s,togglePlay:r}=t({pageURI:e.uri,pageIndex:a});return(0,j.jsx)(he.R,{index:a,showType:!0,...e,delegatePlayback:!0,isPlaying:s,onPlay:()=>r()})}));var pe=a(69856),xe=a(21768),je=a(67239),fe=a(2505),ye=a(72750);let ve=function(e){return e.GRID="grid",e.LIST="list",e}({});const be=s.memo((function({artistName:e,artistUri:t,albumType:a,dropDownOptions:r,onTypeChange:i,displayMode:n,onDisplayModeChange:l,topBarContent:o}){const[c,d]=(0,s.useState)(!1),u=(0,s.useCallback)((e=>{const t=e.target.scrollTop;t>0&&!c?d(!0):0===t&&c&&d(!1)}),[c]);return(0,ye.g)(u,{executeOnceOnStart:!0}),(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(fe.g,{children:n!==ve.GRID?o:void 0}),(0,j.jsxs)("div",{className:b()($,{[ee]:c}),children:[(0,j.jsx)(C.E,{as:"div",variant:"titleSmall",className:te,children:(0,j.jsx)(L.N,{to:t,children:e})}),(0,j.jsx)(je.g,{options:r,onSelect:i,selected:a}),(0,j.jsx)("button",{type:"button",role:"switch","aria-checked":n===ve.LIST,"aria-label":ve.LIST,className:b()(ae,{[se]:n===ve.LIST}),onClick:()=>l(ve.LIST),children:(0,j.jsx)(pe.N,{size:"small"})}),(0,j.jsx)("button",{type:"button",role:"switch","aria-checked":n===ve.GRID,"aria-label":ve.GRID,className:b()(ae,{[se]:n===ve.GRID}),onClick:()=>l(ve.GRID),children:(0,j.jsx)(xe.D,{size:"small"})})]})]})})),Ce=new h.l("queryArtistDiscographyAlbums","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ne=new h.l("queryArtistDiscographySingles","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Re=new h.l("queryArtistDiscographyCompilations","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),ke=new h.l("queryArtistDiscographyAll","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null),Ae=new h.l("queryArtistDiscographyOverview","query","9380995a9d4663cbcb5113fef3c6aabf70ae6d407ba61793fd01e2a1dd6929b0",null);var Ie=a(81834);var Se=a(11153),_e=a(6444),we=a(62021),Te=a(28340);const Ee=(0,s.memo)((function({uri:e,name:t,dropDownOptions:a,nrAll:i,nrAlbums:l,nrSingles:o,nrCompilations:c,initialDropDownOption:d}){const[u,m]=(0,s.useState)(d),[,h]=(0,s.useState)(0),{pathname:g}=(0,r.zy)(),p=(0,r.Zp)(),[f=ve.LIST,v]=(0,we.x)("discography-page-view-mode",ve.LIST),[b,C]=(0,s.useState)(void 0),N=(0,s.useRef)({all:{items:[],currentOffset:0,totalCount:i},[z._m.Album]:{items:[],currentOffset:0,totalCount:l},[z._m.Single]:{items:[],currentOffset:0,totalCount:o},[z._m.Compilation]:{items:[],currentOffset:0,totalCount:c}}),{requestAlbums:R,requestSingles:k,requestCompilations:A,requestAll:I}=(e=>{const{request:t}=(0,s.useContext)(Ie.j);return{requestAlbums:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Ce,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.albums.items||[])}),[e,t]),requestSingles:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Ne,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.singles.items||[])}),[e,t]),requestCompilations:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(Re,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.compilations.items||[])}),[e,t]),requestAll:(0,s.useCallback)((async(a,s)=>{if(!s)return[];const r=await t(ke,{uri:e,offset:a,limit:s});return"Artist"!==r?.data?.artistUnion?.__typename?[]:(0,x.pe)(r.data.artistUnion.discography.all.items||[])}),[e,t])}})(e),S=(0,s.useCallback)((async()=>{let e=R;u.key===z._m.Single&&(e=k),u.key===z._m.Compilation&&(e=A),"all"===u.key&&(e=I);const t=N.current[u.key].totalCount-N.current[u.key].currentOffset,a=await e(N.current[u.key].currentOffset,Math.min(50,t));a.length>0&&(N.current[u.key].items=N.current[u.key].items.concat(a),N.current[u.key].currentOffset+=a.length),h((e=>e+1))}),[u.key,R,I,A,k]),_=(0,s.useCallback)((e=>{const t=a.find((t=>t.key===e));t&&(p(g.replace(/discography.*/,`discography/${t.key.toLowerCase()}`),{replace:!0}),m(t))}),[a,p,g]),{usePlayContextPage:w}=(0,Te.P)({uri:e,pages:N.current[u.key].items.filter((e=>(0,n._Tv)(e.uri))).map((e=>{const t=(0,n.o_h)(e.uri).id;return{uri:e.uri,url:`hm://artistplaycontext/v1/page/spotify/album/${t}/km`}})),metadata:{"disable-autoplay":"true",context_description:t}},{featureIdentifier:"artist"});return(0,j.jsxs)(_e._,{onReachBottom:S,children:[(0,j.jsx)(be,{artistName:t,artistUri:e,topBarContent:b,dropDownOptions:a,albumType:u,onTypeChange:_,displayMode:f,onDisplayModeChange:e=>{v(e)}}),f===ve.LIST?N.current[u.key].items.map(((t,a)=>(0,j.jsx)(me,{album:t,artistUri:e,usePlayContextPage:w,pageIndex:a,setTopBarContent:C},t.uri))):(0,j.jsx)(Se.E,{className:ie,render:()=>N.current[u.key].items.map(((a,s)=>(0,j.jsx)(ge,{...(0,y.m)(a,e,t),usePlayContextPage:w,pageIndex:s,isRestricted:a.playability.reason===z.$c.CatalogueRestricted},a.uri)))})]})})),Ue=(0,s.memo)((function(){const{artistId:e="",albumType:t}=(0,r.g)(),a=(0,x.ay)(e),{loading:s,error:i,data:n}=(l={uri:a},c={gcTime:15*g.i},(0,g.I)(Ae,l,c));var l,c;if(null===n||!n?.artistUnion||"Artist"!==n?.artistUnion.__typename||i||s)return(0,j.jsx)(u.LoadingPage,{hasError:null!==i,errorMessage:o.Ru.get("error.request-artist-discography")});const m=n.artistUnion.profile.name,h=[];n.artistUnion.discography.all.totalCount>0&&h.push({key:"all",value:o.Ru.get("artist-page-discography.all")}),n.artistUnion.discography.albums.totalCount>0&&h.push({key:z._m.Album,value:o.Ru.get("artist.albums")}),n.artistUnion.discography.singles.totalCount>0&&h.push({key:z._m.Single,value:o.Ru.get("artist.singles")}),n.artistUnion.discography.compilations.totalCount>0&&h.push({key:z._m.Compilation,value:o.Ru.get("artist.compilations")});const p=h.find((e=>"all"===e.key&&"all"===t||(e.key===z._m.Album&&t===z._m.Album.toLowerCase()||(e.key===z._m.Single&&t===z._m.Single.toLowerCase()||e.key===z._m.Compilation&&t===z._m.Compilation.toLowerCase()))))||h[0];return(0,j.jsxs)(j.Fragment,{children:[m?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.discography.seo.title",m)}):null,(0,j.jsx)("section",{className:"contentSpacing",children:(0,j.jsx)(Ee,{uri:a,name:m||"",dropDownOptions:h,nrAll:n.artistUnion.discography.all.totalCount,nrAlbums:n.artistUnion.discography.albums.totalCount,nrSingles:n.artistUnion.discography.singles.totalCount,nrCompilations:n.artistUnion.discography.compilations.totalCount,initialDropDownOption:p})})]})}));var Pe=a(80809);const Le=new h.l("queryArtistDiscoveredOn","query","71c2392e4cecf6b48b9ad1311ae08838cbdabcfd189c6bf0c66c2430b8dcfdb1",null),De=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(Le,n,c));var n,c;if(null===i||"Artist"!==i.artistUnion.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-featuring")});const h=i.artistUnion.relatedContent.discoveredOnV2.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.discovered-on")}),(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.discovered-on"),total:h.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:h.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)}))})]})})),Be=new h.l("queryArtistFeaturing","query","20842d6d9d2d28ef945984b68cb927bb33edd00eab84a8da1667def21f1f2c54",null),Me=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},l={gcTime:15*g.i},(0,g.I)(Be,n,l));var n,l;if(null===i||"Artist"!==i?.artistUnion?.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-featuring")});const c=i.artistUnion,{name:h}=c.profile,p=c.relatedContent.featuringV2.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[h?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.featuring.seo.title",h)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.featuring",h),total:p.length,showAll:!0,children:p.map(((e,t)=>{if("Playlist"!==e.data.__typename)return null;const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)}))})]})}));var Fe=a(85505),Ve=a(14343),Oe=a(22264),qe=a(10831),ze=a(25408),Ge=a(52731),He=a(33712),Ke=a(8213),Ze=a(41616),We=a(61335),Je=a(41661),Xe=a(33329),Ye=a(17802);const Qe=s.memo((function(e){const{artistUri:t,name:a,bio:r,bioSource:i,images:n=[],avatarImages:l=[],worldRank:c,monthlyListeners:d,topCities:u,followers:m,externalLinks:h=[],showModal:g=!1,className:p="",spec:x}=e,[f,y]=(0,s.useState)(g),v=(0,Xe.s)(),N=(0,s.useCallback)((()=>{const e=x.hitUiReveal();v.logInteraction(e),y(!0)}),[x,v]),R=(0,s.useCallback)((()=>{y(!1)}),[]),k=n.find((e=>(e.width||0)>=(e.height||0))),A=k&&{backgroundImage:`linear-gradient(${Fe.Par} 0%, ${Fe.MYb} 100%), url(${k.url})`};return(0,j.jsxs)("div",{className:p,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ye.A.heading,children:o.Ru.get("artist.about")}),(0,j.jsx)("div",{className:b()(Ye.A.artistGridContainer),children:(0,j.jsxs)("button",{type:"button","aria-label":a,className:b()(Ye.A.container,{[Ye.A.backgroundImage]:A}),onClick:N,style:A,children:[c>0?(0,j.jsxs)("div",{className:Ye.A.rank,children:[(0,j.jsxs)(C.E,{as:"div",variant:"titleSmall",children:["#",c]}),(0,j.jsx)(C.E,{as:"div",variant:"marginal",children:o.Ru.get("artist-page.world_rank")})]}):null,(0,j.jsxs)("div",{className:Ye.A.content,children:[!k&&(0,j.jsx)(Ze.e,{images:l,label:a,width:204,userIconSize:"xxlarge",className:Ye.A.avatar}),"number"==typeof d?(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:o.Ru.get("artist.monthly-listeners-count",d)}):null,r?(0,j.jsx)(C.E,{as:"div",variant:"bodyMedium",className:Ye.A.bio,semanticColor:"textBase",dir:"auto",children:(0,j.jsx)(Je.N,{source:r})}):null]})]})}),(0,j.jsx)(We.y,{avatarImages:l,artistUri:t,name:a,bio:r,bioSource:i,worldRank:c,images:n,topCities:u,followers:m,externalLinks:h,isOpen:f,closeModal:R,monthlyListeners:d})]})}));var $e=a(12662),et=a(88260),tt=a(60038),at=a(38157),st=a(7520),rt=a(86236),it=a(21263),nt=a(70196),lt=a(80989),ot=a(74180),ct=a(18870);const dt=()=>{const e=(0,lt.Jl)("play_button");return(0,j.jsxs)(it.Y,{ref:e,"aria-labelledby":"tooltipTitle tooltipSubtitle",children:[(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",paddingBottom:"tighter-2",id:"tooltipTitle",children:o.Ru.get("web-player.onboarding-new-user.step-play-button")}),(0,j.jsx)(C.E,{variant:"marginal",id:"tooltipSubtitle",children:o.Ru.get("web-player.onboarding-new-user.step-count",ct.c,ct.c)})]})},ut=({children:e})=>{const{shouldStepBeVisible:t}=(0,ot.er)();return(0,j.jsx)(nt.E,{isOnboarding:!0,isVisible:t(ct.B.PLAY_BUTTON),content:(0,j.jsx)(dt,{}),children:e})};var mt=a(65503),ht=a(56994),gt=a(89840),pt=a(99701),xt=a(8506);const jt=(0,s.forwardRef)((function({uri:e,size:t=N.t.md,spec:a},r){const i=(0,Xe.s)(),[n,l]=(0,xt.D)(e),c=n?o.Ru.get("artist.ban-label.unban"):o.Ru.get("artist.ban-label.ban"),d=(0,s.useCallback)((()=>{n?(i.logInteraction(a.unbanArtistButtonFactory().hitRemoveHideArtist({itemNoLongerHidden:e})),l(!1)):l(!0)}),[n,i,l,a,e]);return(0,j.jsx)(pt.Zp,{label:c,children:(0,j.jsx)(mt.H,{onClick:d,iconOnly:n?ht.V:gt.r,size:t,"aria-label":c,ref:r,"data-testid":"ban-button",condensed:!0})})}));var ft=a(86568),yt=a(89849),vt=a(29997),bt=a(29368),Ct=a(20829),Nt=a(83327),Rt=a(21549);const kt=s.memo((function({uri:e,spec:t,logger:a,backgroundColor:r,name:i,sharingInfo:n,isSaved:l}){const[c,d]=(0,Q.A)(e,l),{tryTriggerNextStep:u}=(0,ot.er)(),m=(0,vt.X)(),[h]=(0,xt.D)(e),g=s.useMemo((()=>t.actionBarFactory()),[t]),{togglePlay:p,isActive:x,isPlaying:f}=(0,Te.P)({uri:e},{featureIdentifier:"artist"}),y=s.useCallback((()=>{const t=(0,Ct.$I)({isPlaying:f,isActive:x,spec:g.playButtonFactory(),logger:a,uri:e});p({loggingParams:t})}),[p,x,f,e,g,a]),v=(0,s.useCallback)((()=>{u(ct.B.PLAY_BUTTON),y()}),[u,y]),b=(0,ft.d$)(),{spec:C,logger:N}=(0,Rt.r)($e.e,{data:{uri:e}});(0,s.useEffect)((()=>{b&&N.logImpression(C.impression())}),[b,N,C]);const R=(0,s.useCallback)((async()=>{const s=t.actionBarFactory().followButtonFactory().hitFollow({itemToBeFollowed:e}),r=t.actionBarFactory().followButtonFactory().hitUnfollow({itemToBeUnfollowed:e});a.logInteraction(c?r:s),!c&&b&&N.logInteraction(C.hitFollow({itemToBeFollowed:e}));try{await d(!c)}catch{}}),[e,c,d,t,a,b,N,C]),k=(0,bt.j)();return(0,j.jsx)(et.E,{backgroundColor:r,children:(0,j.jsxs)(tt.S,{children:[!h&&(0,j.jsx)(ut,{children:(0,j.jsx)(B.D,{size:k,onClick:v,isPlaying:f,uri:e})}),m&&!h&&(0,j.jsx)(Nt.r,{spec:g,children:(0,j.jsx)(yt.Y,{entityName:i,contextUri:e,activationPlacement:"bottomEnd",size:k})}),(0,j.jsx)(S.e,{children:h?(0,j.jsx)(jt,{uri:e,name:i,spec:g}):(0,j.jsx)(rt.W,{isFollowing:c,onClick:R})}),(0,j.jsx)(A.b,{menu:(0,j.jsx)(st.t,{uri:e,sharingInfo:n}),children:(0,j.jsx)(at.e,{label:o.Ru.get("more.label.context",i),size:k})})]})})}));var At=a(86228),It=a(44672),St=a(50671),_t=a(35991);const wt="qB6S3KrJlMCx4WS4zOtl",Tt="EmeHQXR87mUskYK6xEde",Et="qELskYs6YdzzafmETrAg",Ut="fnphAtjtCDYY99lYBfLK",Pt="hLi0oogSdDKAIC_rnfP1",Lt="xN866HUyMGAaemLBKQQx",Dt="cWcQITygrzZTduXuXope",Bt="BpBrwbAwIMryupCOXJzw",Mt="FOgY6uo_Bj_VTV5hwaix",Ft="PHHrto0Qhh4dJcnnPhwu",Vt="dIlzffEKwokwWI5sqYJN",Ot="SMBqsyNXIMb0yeYVwPxv",qt="yT49w5mDxTaLK9lL59Gd",zt="D6IunHuzuULf_Sr88GOA",Gt="b_dSllo9kearPhsw_MSp",Ht="ZkkYlSbVnEhF1urK3rKO";function Kt(e){const t=e[0];return!(!t||!("releases"in t))}const Zt=({artistId:e,artistUri:t,artistName:a,discography:r,shelfIndex:i,spec:n})=>{const[l,c]=(0,s.useState)("popularReleasesAlbums"),d=(0,s.useMemo)((()=>n.discographyShelfFactory({position:i})),[n,i]),u=(0,Xe.s)(),h=(0,s.useMemo)((()=>[r.popularReleasesAlbums.totalCount>0?"popularReleasesAlbums":null,r.singles.totalCount>0?"singles":null,r.albums.totalCount>0?"albums":null,r.compilations.totalCount>0?"compilations":null].filter(Boolean)),[r]),g=(0,s.useCallback)((e=>{const t=d.chipsFactory().chipFactory({identifier:e,position:h.indexOf(e)}).hitFilter();u.logInteraction(t),c(e)}),[d,h,u]),p=(0,s.useCallback)((()=>(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:b()(wt),children:[r.popularReleasesAlbums.totalCount>0&&(0,j.jsx)(At.v,{selected:"popularReleasesAlbums"===l,onClick:()=>g("popularReleasesAlbums"),selectedColorSet:"invertedLight",children:o.Ru.get("artist-page.popular")}),r.albums.totalCount>0&&(0,j.jsx)(At.v,{selected:"albums"===l,onClick:()=>g("albums"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.albums")}),r.singles.totalCount>0&&(0,j.jsx)(At.v,{selected:"singles"===l,onClick:()=>g("singles"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.singles")}),r.compilations.totalCount>0&&(0,j.jsx)(At.v,{selected:"compilations"===l,onClick:()=>g("compilations"),selectedColorSet:"invertedLight",children:o.Ru.get("artist.compilations")})]})})),[r,l,g]);let x=r[l];"popularReleasesAlbums"===l&&r.latest&&(x={...r[l],items:[r.latest,...r[l].items.filter((e=>e.uri!==r.latest?.uri))]});let f="all";"albums"===l?f=z._m.Album.toLowerCase():"singles"===l?f=z._m.Single.toLowerCase():"compilations"===l&&(f=z._m.Compilation.toLowerCase());const v=`${(0,_t.Dh)(e)}:discography:${f}`,C=(0,s.useCallback)((()=>{const e=d.shelfHeaderFactory().titleFactory().hitUiNavigate({destination:v??""});u.logInteraction(e)}),[u,v,d]),N=(0,s.useCallback)((()=>{const e=d.shelfHeaderFactory().seeAllButtonFactory().hitUiNavigate({destination:v??""});u.logInteraction(e)}),[u,v,d]),R=(0,St.t)(d),k=x.items;return(0,j.jsx)(It.pZ,{value:"shelf/discography",children:(0,j.jsx)(m.$,{total:x.totalCount,title:o.Ru.get("artist-page.discography"),seeAllUri:v,alwaysShowSeeAll:!0,className:Pt,renderSubHeader:p,onClickShelfTitle:C,onClickShelfSeeAll:N,elementRef:R,children:(Kt(k)?(0,_t.Ey)(k):k).map(((e,s)=>(0,j.jsx)(It.pZ,{value:"card",index:s,children:(0,j.jsx)(he.R,{latest:e.uri===r.latest?.uri,showType:!0,...(0,y.m)(e,t,a),index:s,isRestricted:e.playability.reason===z.$c.CatalogueRestricted})},e.uri)))})})};var Wt=a(78876),Jt=a(96250),Xt=a(22984);const Yt="RClL7GUhUo_xqzNcsXSG",Qt="EQaztpbGtXeN7V1cjAP4",$t="tYSzgx8hG37WjBDn364n",ea="_4XNZPDdnyq1HHKG5Qtx",ta="DehN40s8150pzqyBfGN_",aa="ZiRNxR2_6cTTMHIqpwzl",sa=({offer:e,index:t,spec:a,titleVariant:r})=>{const{nameV2:i,uri:n,description:l,image:o,url:c}=e,d=(0,Xe.s)(),u=(0,s.useMemo)((()=>a.merchCardFactory({identifier:n,uri:c||"",position:t})),[c,n,a,t]),m=(0,St.t)(u);if(!i||!c)return null;const h=e=>{e?.stopPropagation();const t=u.hitNavigateToExternalUri({destination:c});d.logInteraction(t)};return(0,j.jsxs)("div",{className:Yt,ref:m,onClick:()=>{h(),window.open(c,"_blank")},children:[o?.sources?.[0]?.url&&(0,j.jsx)(Xt._,{src:o.sources[0].url,className:Qt,alt:i,width:"48",height:"48",loading:"lazy"}),(0,j.jsxs)("div",{className:$t,children:[(0,j.jsx)(pt.Zp,{label:i,showDelay:pt.uF,children:(0,j.jsx)(C.E,{as:"a",href:c,target:"_blank",onClick:h,variant:r,semanticColor:"textBase",className:ea,"data-testid":"offer-name",children:i})}),(0,j.jsx)(pt.Zp,{label:l,showDelay:pt.uF,children:(0,j.jsx)(C.E,{as:"p",variant:"bodySmall",className:ta,children:l})})]}),(0,j.jsx)(Jt.H,{size:"small",className:aa,"aria-hidden":"true"})]})},ra=({items:e,className:t,merchVariant:a,artistId:s="",variant:r="bodyMediumBold"})=>{const{spec:i}=(0,Rt.r)(Wt.k,{data:{identifier:s,uri:(0,_t.ay)(s),position:0,reason:a}});return(0,j.jsx)("ul",{className:t,children:e.map(((e,t)=>(0,j.jsx)("li",{children:(0,j.jsx)(sa,{offer:e,index:t,spec:i,titleVariant:r})},e.uri+t)))})};var ia=a(13155);const na="vQqlnrnZi2f4zrYRQvKW",la="OMowV_mBy8tlBELzbuTi",oa=({prerelease:e,spec:t})=>{const a=e.coverArt[0],r=(0,ia.C)(e.albumType),i=(0,Xe.s)(),n=(0,s.useCallback)((()=>{i.logInteraction(t.albumImageFactory().hitUiNavigate({destination:e.uri}))}),[i,e.uri,t]),l=(0,s.useCallback)((()=>{i.logInteraction(t.albumNameFactory().hitUiNavigate({destination:e.uri}))}),[i,e.uri,t]);return(0,j.jsxs)("div",{className:na,children:[(0,j.jsx)(L.N,{to:e.uri,onClick:n,children:(0,j.jsx)(Xt._,{src:a.url,alt:e.title,width:"88",height:"88",loading:"eager",radius:4})}),(0,j.jsxs)("div",{className:la,children:[(0,j.jsx)(L.N,{to:e.uri,onClick:l,children:(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",semanticColor:"textBase",children:e.title})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",children:r})]})]})},ca="GC3MlDrKu2PcuU6ymC1g",da="GLAXysTPuIgv3GRPVlhS",ua="pZag8sthfxTLjP1tsOfV",ma="lkXpBMSmNP9w702sek8V",ha="XlmJIRaVv7a23oYq6lwU",ga="iy5hzmfkdXQ0B2SFZAyj",pa="pJXRyroA6LuPSsKI8MrD",xa="lmvQXQeHS4JcYWGciCt3",ja=({prerelease:e,className:t,spec:a})=>(0,j.jsxs)("div",{className:t,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:ca,children:o.Ru.get("web-player.artist.upcoming-release")}),(0,j.jsx)(oa,{prerelease:e,spec:a})]});var fa=a(65462),ya=a(55760);const va=(0,s.forwardRef)((({children:e},t)=>(0,j.jsx)("div",{ref:t,className:ya.A.adaptiveHeaderContainer,children:e})));var ba=a(95694);const Ca=(0,s.memo)((function(e){const{ariaLabel:t,children:a,className:s,canEdit:r,onClick:i,editTitle:n,onContextMenu:l,onTouchStart:o,onTouchEnd:c,dragUri:d="",dragMimeType:u,dragLabel:m,trackingRef:h,maxLines:g=2}=e,{draggable:p,onDragStart:x}=(0,W.P)({itemUris:[d],itemMimeTypes:u?[u]:[],dragLabelText:m});return(0,j.jsx)("span",{dir:"auto",className:b()(s,ya.A.title),onContextMenu:l,onTouchStart:o,onTouchEnd:c,draggable:p&&!(!d||!m),onDragStart:x,"data-testid":"adaptiveEntityTitle",children:r?(0,j.jsx)("button",{"aria-label":t,className:b()(ya.A.titleButton),onClick:i,title:n,children:(0,j.jsx)("span",{className:ya.A.titleInner,children:(0,j.jsx)(ba.DU,{trackingRef:h,maxLines:g,children:a})})}):(0,j.jsx)(ba.DU,{trackingRef:h,maxLines:g,children:a})})}));var Na=a(25577),Ra=a(44234),ka=a(17843),Aa=a(88711),Ia=a(46110),Sa=a(62986),_a=a(6556),wa=a(84291),Ta=a(98712),Ea=a(51354),Ua=a(43329);const Pa="S9KkAiRE_O9ax0Jv_D1i",La="mrtMgVMfNyaEhMIGFBuR",Da=()=>{const e=(0,Ea.y)();return(0,j.jsx)(_a.M,{text:o.Ru.get("artist.verified"),className:b()({[Pa]:e===Ta.E.SMALL})})},Ba=s.memo((function({uri:e,artist:{name:t,sharingInfo:a,verified:r,monthlyListeners:i,headerImage:{sources:n,extractedColors:l},avatarImage:{sources:c,extractedColors:d}},spec:u}){const m=(0,Xe.s)(),h=(0,s.useMemo)((()=>u.topBarFactory()),[u]),g=(0,St.t)(h),p=(0,s.useMemo)((()=>u.topBarFactory().playButtonFactory()),[u]),x=(0,s.useRef)(null),f=(0,Ve.NC)(Ua.Zy),{togglePlay:y,isActive:v,isPlaying:C}=(0,Te.P)({uri:e},{featureIdentifier:"artist"}),N=s.useCallback((()=>{const t=(0,Ct.$I)({isPlaying:C,isActive:v,spec:p,logger:m,uri:e});y({loggingParams:t})}),[y,C,v,e,p,m]),R={backgroundColor:(0,wa.z)(l?.colorRaw.hex||d?.colorRaw.hex||null)},k=n.length>0;k&&(R.backgroundImages=n);const A=(0,j.jsx)(st.t,{uri:e,sharingInfo:a});return(0,j.jsxs)(Na.z,{...R,className:b()({[La]:f}),children:[(0,j.jsxs)(Ia.h,{ref:g,children:[(0,j.jsx)(B.D,{size:"medium",onClick:N,isPlaying:C,uri:e}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(_.X,{text:t,dragUri:e,dragLabel:t})})]}),f?(0,j.jsxs)(va,{ref:x,children:[k?null:(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(ka.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:w.u.CIRCLE})}),(0,j.jsxs)(Aa.Y,{children:[r&&(0,j.jsx)(Da,{}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(Ca,{trackingRef:x,dragUri:e,dragLabel:t,children:t})}),(0,j.jsx)(Ra.Z,{children:o.Ru.get("artist.monthly-listeners-count",i)})]})]}):(0,j.jsxs)(j.Fragment,{children:[k?null:(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(ka.K,{dragUri:e,images:(c||[]).map((e=>({url:e.url,width:e.width||void 0,height:e.height||void 0}))),name:t,placeholderType:"artist",shape:w.u.CIRCLE})}),(0,j.jsxs)(Aa.Y,{children:[r&&(0,j.jsx)(Da,{}),(0,j.jsx)(fa.h,{menu:A,children:(0,j.jsx)(Sa.mm,{dragUri:e,dragLabel:t,children:t})}),(0,j.jsx)(Ra.Z,{children:o.Ru.get("artist.monthly-listeners-count",i)})]})]})]})}));var Ma=a(65463);const Fa=["AlbumResponseWrapper","ArtistResponseWrapper","PlaylistResponseWrapper","TrackResponseWrapper","EpisodeOrChapterResponseWrapper","PreReleaseResponseWrapper","ConcertResponseWrapper","MerchResponseWrapper"];const Va=["Album","Artist","Playlist","Track","Episode","PreRelease","Concert","Merch"];function Oa(e){return e.type===z.Ho.MusicVideo}function qa(e){return e.type===z.Ho.MusicVideo||(t=e.itemV2,Fa.includes(t.__typename)&&Va.includes(e.itemV2.data.__typename));var t}var za=a(85907),Ga=a(63096);function Ha(e){return Oa(e)&&e.subtitle?e.subtitle:function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":switch(t.type){case z._m.Album:return o.Ru.get("album");case z._m.Single:return o.Ru.get("single");case z._m.Compilation:return o.Ru.get("compilation");case z._m.Ep:return o.Ru.get("ep");default:return o.Ru.get("album")}case"Artist":return o.Ru.get("artist");case"Playlist":return o.Ru.get("playlist");case"Track":return o.Ru.get("song");case"Episode":return o.Ru.get("card.tag.episode");case"PreRelease":switch(t.preReleaseContent?.type){case"ALBUM":return o.Ru.get("web-player.artist.upcoming-release.album");case"EP":return o.Ru.get("web-player.artist.upcoming-release.ep");case"SINGLE":return o.Ru.get("web-player.artist.upcoming-release.single");default:return""}case"Merch":return o.Ru.get("web-player.merch.title");case"Concert":return"";default:return(0,za.d)(t),""}}(e)}function Ka(e){return Oa(e)&&e.title?e.title:function(e){const t=e?.itemV2.data;switch(t.__typename){case"Album":case"Playlist":case"Track":case"Episode":return t.name;case"Merch":return t.nameV2??"";case"Artist":return t.profile.name;case"PreRelease":return t.preReleaseContent?.name??"";case"Concert":return t.title;default:return(0,za.d)(t),""}}(e)}function Za(e){return Oa(e)&&e.thumbnailImage?.data&&"sources"in e.thumbnailImage.data?e.thumbnailImage.data:function(e){const t=e.itemV2.data;switch(t.__typename){case"Album":return t.coverArt;case"Artist":return t.visuals.avatarImage;case"Playlist":return t.images.items[0]??null;case"Track":return t.albumOfTrack?.coverArt??null;case"Episode":{const e=(0,Ga.g)(t.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"PreRelease":{const e=(0,Ga.g)(t.preReleaseContent?.coverArt?.sources,{desiredHeight:300});return e?{sources:[e]}:null}case"Concert":case"Merch":return t.image;default:return(0,za.d)(t),null}}(e)}var Wa=a(1138),Ja=a(94098);const Xa="guUl5dHbF5HJRvwjBxzR",Ya="jyNYgeneJ5inaKhciDjS",Qa="Pnz4fz1OZWV19CVEQJDx",$a="HciFabcIqzhXoDbtwR92",es="PNadLEAqpH87jY11pma4",ts="yWkJ7Ua3DnSTaHxG2qgv",as="By3HGkfBq3fa6bjrhrli",ss="ukV8NB0JGnieUOa0eri5",rs="HGhEGu5V84RXBk6XAPQ6",is="kwzBRpFigKr1EP2d5qle",ns="sCtxvzp3T8umKY86Hfcg",ls=({isTrackPlaying:e})=>e?(0,j.jsx)(Wa.B,{style:{color:"var(--text-base)"},size:"large",width:32}):(0,j.jsx)(Ja.x,{style:{color:"var(--text-base)"},size:"large",width:32}),os=({artistName:e,avatarImages:t,backgroundImageUrl:a,itemImageUrl:s,itemName:r,itemType:i,itemUri:n,comment:l,handleLinkClick:o,handleArtistPickImageClick:c,onDragStart:d,isPlayButtonEnabled:u,isTrackPlaying:m})=>(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("section",{className:Xa,"data-testid":"artist-pick-with-background-container",draggable:!0,onDragStart:d,children:[(0,j.jsx)(Xt._,{className:Ya,src:a,alt:"merch",loading:"eager"}),(0,j.jsx)("div",{className:$a}),(0,j.jsxs)("div",{children:[(0,j.jsxs)("section",{className:b()(is,ss),children:[(0,j.jsx)(Ze.e,{images:t,label:e,width:24,userIconSize:"small",className:rs}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:l??"",children:l})]}),(0,j.jsxs)("section",{className:es,children:[(0,j.jsx)("div",{children:(0,j.jsx)(Xt._,{src:s,className:ts,alt:"",width:"76",height:"76",loading:"eager"})}),(0,j.jsxs)("div",{className:as,children:[(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:n,onClick:o,"data-testid":"artist-pick-link",children:r})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",children:i})]}),u&&(0,j.jsx)("div",{className:ns,children:(0,j.jsx)(ls,{isTrackPlaying:m})})]})]}),(0,j.jsx)("div",{onClick:c,className:Qa})]})});var cs=a(74159),ds=a(17866);const us="JJvGfNiGtduy_XoXPFT1",ms="fYeCAFmjlgTatXRJ2v0b",hs="vJIXF1I7CfyfTyCa9JkP",gs="ZEsebSb1CaZVzuPawZEj",ps="j2wjzbkgYnFp7ey8JIp0",xs="JNLGmI_C2cdhHFxe0oxm",js="O36HCbLOjWcWkAwkNXqJ",fs="GS_6HA9xIobh5dt5VUSY",ys="EIxjItP8eBZ1eAT7c4Aq",vs="H3mjE6AEBDPRuHNKUpRK",bs=s.memo((function(e){const t=(0,Xe.s)(),{avatarImages:a=[],name:r,spec:i,item:n,comment:l}=e,o=n.itemV2.data,c=o.url??"",d=o.nameV2,u=o.price,m=(0,Ga.g)(o.image?.sources,{desiredWidth:640})?.url??"",h=!!l,g=(0,s.useCallback)((()=>{const e=i.artworkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(e),window.open(c,"_blank","noopener")}),[i,t,c]),p=(0,s.useCallback)((e=>{e.stopPropagation();const a=i.linkFactory().hitNavigateToExternalUri({destination:c});t.logInteraction(a),window.open(c,"_blank","noopener")}),[i,t,c]);return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("div",{className:us,onClick:g,"data-testid":"artist-pick-merch-container",children:[(0,j.jsx)("img",{className:b()(hs),src:m,alt:"merch"}),(0,j.jsx)("div",{className:ms}),(0,j.jsxs)("div",{children:[h&&(0,j.jsxs)("div",{className:b()(vs,fs),children:[(0,j.jsx)(Ze.e,{images:a,label:r,width:24,userIconSize:"small",className:ys}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:l,"data-testid":"merch-artist-pick-comment",children:l})]}),(0,j.jsxs)("div",{className:gs,children:[(0,j.jsx)(C.E,{as:"h1",variant:"titleSmall",className:ps,children:d}),(0,j.jsx)(C.E,{as:"p",variant:"bodySmallBold",className:xs,children:u}),(0,j.jsx)(cs.n,{size:"small",className:js,onClick:p,href:c,component:ds.v,"data-testid":"artist-pick-merch-button-link",children:"Go to item"})]})]})]})})}));var Cs=a(16413),Ns=a(40339),Rs=a(53328),ks=a(8428),As=a(26510),Is=a(68993);const Ss=s.memo((function({avatarImages:e=[],artistName:t,item:a,className:i="",spec:l}){const{isActive:c,panelSend:d}=(0,Ns.AI)(ks.Z.NowPlayingView),u=a.comment,m=function(e){return Oa(e)&&e.uri?e.uri:e.itemV2.data.uri}(a),h=Ka(a),g=Ha(a),p=Za(a),x=p?.sources[0]?.url,f=u||o.Ru.get("acq.artist.about.attribution",{artist:t}),y=a.type===z.Ho.MusicVideo,v=(0,Xe.s)(),N=(0,r.Zp)(),{draggable:R,onDragStart:k}=(0,W.P)({itemUris:[m],dragLabelText:h}),{playPause:A,isPlaying:I}=(0,As.S)({trackUri:m,featureIdentifier:"song_videos",referrerIdentifier:"now_playing_panel"}),S=(0,s.useCallback)((()=>{c||d(Rs.$S.NPV_BUTTON_CLICK),A()}),[c,A,d]),_=(0,s.useCallback)((()=>{const e=(0,n.o_h)(m).toURLPath(!0),t=l.artworkFactory().hitUiNavigate({destination:e});v.logInteraction(t),a.type!==z.Ho.MusicVideo?N(e):S()}),[m,l,v,N,a,S]),w=(0,s.useCallback)((()=>{const e=(0,n.o_h)(m).toURLPath(!0),t=l.linkFactory().hitUiNavigate({destination:e});v.logInteraction(t),a.type!==z.Ho.MusicVideo||S()}),[m,l,v,a.type,S]);const T=function(){if(function(e){return"MerchResponseWrapper"===e.itemV2.__typename&&"Merch"===e.itemV2.data.__typename&&!!e.itemV2.data.url}(a))return(0,j.jsx)(bs,{name:t,item:a,comment:u,avatarImages:e,spec:l});if(function(e){return"ConcertResponseWrapper"===e.itemV2.__typename&&"Concert"===e.itemV2.data.__typename&&!!e.itemV2.data.venue}(a)){const e=a.itemV2.data,s=(0,Ma.N)({data:{identifier:t,uri:m,position:0,reason:"Artist pick: Concert"}});return(0,j.jsx)(Cs.I,{concert:{uri:e.uri,date:e.date,venue:e.venue,title:e.title},spec:s})}try{const s=a.backgroundImageV2?.data;if((0,Is.j)(s,"ImageV2"),s?.sources[0].url)return(0,j.jsx)(os,{avatarImages:e,artistName:t,itemName:h,itemType:g,itemUri:m,itemImageUrl:x??"",comment:f,backgroundImageUrl:s.sources[0].url,handleArtistPickImageClick:_,handleLinkClick:w,onDragStart:k,isPlayButtonEnabled:y,isTrackPlaying:I})}catch(e){}return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("div",{onClick:_,className:ua,onDragStart:k,draggable:R,"data-testid":"artist-pick-image-container",children:(0,j.jsx)(Xt._,{src:x,className:ma,alt:"",width:"88",height:"88",radius:4,loading:"eager"})}),(0,j.jsxs)("div",{onDragStart:k,draggable:R,children:[(0,j.jsxs)("div",{className:b()({[ha]:!0,[xa]:!!u}),children:[(0,j.jsx)(Ze.e,{images:e,label:t,width:24,userIconSize:"small",className:ga}),(0,j.jsx)(C.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",title:f,children:f})]}),(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:m,onClick:w,"data-testid":"artist-pick-link",children:Ka(a)})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",className:pa,children:g})]})]})}();return(0,j.jsxs)("div",{className:i,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:ca,children:o.Ru.get("artist-page.artists-pick")}),(0,j.jsx)("div",{className:da,children:T})]})})),_s=s.memo((function(e){const{item:t}=e;return qa(t)?(0,j.jsx)(Ss,{...e,item:t}):null}));var ws=a(28889);const Ts="unaQVpO_antcqfMwSmsh",Es="ECjQBV2evKE5PXHKhXV_",Us="W_VvjqdqWRSlMRjRPkPb",Ps="pUNc2aOeOQANHrhYa1GU",Ls="T_JcGdJujSuj014SZfjl",Ds="RDZ61ETnag1ilfZTkVxe",Bs=e=>{const{uri:t,name:a,nrTracks:i,avatarImages:l=[],className:c="",spec:d}=e,u=(0,Xe.s)(),m=(0,r.Zp)(),h=(0,s.useCallback)((()=>{const e=d.artistFactory().hitUiNavigate({destination:(0,n.o_h)(t).toURLPath(!0)});u.logInteraction(e),m((0,n.o_h)(t).toURLPath(!0))}),[d,t,u,m]),g=(0,s.useCallback)((()=>{const e=d.linkFactory().hitUiNavigate({destination:(0,n.o_h)(t).toURLPath(!0)});u.logInteraction(e)}),[d,u,t]);return(0,j.jsxs)("div",{className:c,children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Ts,children:o.Ru.get("artist-page.saved-header")}),(0,j.jsxs)("div",{className:Es,children:[(0,j.jsxs)("div",{onClick:h,className:Ps,"data-testid":"saved-tracks-avatar",children:[(0,j.jsx)(Ze.e,{images:l,label:a,width:88,userIconSize:"xxlarge"}),(0,j.jsx)("div",{className:Ls,children:(0,j.jsx)(ws.F,{size:"xsmall",className:Ds})})]}),(0,j.jsxs)("div",{children:[(0,j.jsx)(C.E,{as:"div",variant:"bodyMediumBold",children:(0,j.jsx)(L.N,{to:t,onClick:g,"data-testid":"saved-tracks-link",children:o.Ru.get("artist-page.saved-tracks-amount",i)})}),(0,j.jsx)(C.E,{as:"div",variant:"bodySmall",className:Us,children:o.Ru.get("artist-page.saved-by-artist",a)})]})]})]})};var Ms=a(35523),Fs=a(73043),Vs=a(20836),Os=a(90497);const qs=s.memo((function({concerts:e,artistId:t,total:a}){const{spec:r,logger:i}=(0,Rt.r)(Ma.N,{data:{identifier:t,uri:`${(0,_t.Dh)(t)}`,position:0,reason:"Artist Page - On Tour"}}),n=`${(0,_t.Dh)(t)}:concerts`,l=(0,St.t)(r);return(0,j.jsx)(s.Suspense,{fallback:null,children:(0,j.jsxs)("div",{ref:l,children:[(0,j.jsx)(Fs.k,{title:o.Ru.get("concerts_on_tour"),seeAllLabel:o.Ru.get("concerts.view_all_upcoming_concerts_count",a),seeAllUri:n,onClickSeeAll:()=>{const e=r.seeAllButtonFactory({uri:n}).hitUiNavigate({destination:n});i.logInteraction(e)},showSeeAll:!0}),(0,j.jsx)("ul",{className:Os.A.onTourShelfGrid,children:e.slice(0,9).map(((e,t)=>(0,j.jsx)("li",{children:(0,j.jsx)(Vs.I,{concert:e,index:t,spec:r})},e.uri)))})]})})}));var zs=a(91182),Gs=a(56708),Hs=a(38501),Ks=a(33449),Zs=a(66339),Ws=a(98292),Js=a(56970),Xs=a(95651);function Ys(e){return null!=e}const Qs=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,_t.ay)(e),a=(0,Ve.NC)(Hs.DqB),i=(0,Ve.NC)(Hs.LX5),{spec:n,logger:c,UBIFragment:m}=(0,Rt.r)(Oe.a,{data:{identifier:e,uri:t}}),h=s.useMemo((()=>n.headerFactory()),[n]),g=s.useMemo((()=>n.featuredFactory().popularTracksFactory()),[n]),p=s.useMemo((()=>n.offersFactory()),[n]),{loading:f,error:y,data:v}=(0,Ms.A)(t),{data:N,isLoading:R}=(0,Zs.r)(t),k=(0,Ws.d)({offset:0,limit:1,uri:t});if((0,Ke.q)(N),null===v||null===v.artistUnion||"Artist"!==v.artistUnion?.__typename||y||f||R)return(0,j.jsx)(u.LoadingPage,{hasError:null!==y,errorMessage:o.Ru.get("error.request-artist-failure")});const A=v?.artistUnion?.profile.name,I=v.artistUnion,S=I.relatedContent.relatedArtists.items,_=I.sharingInfo,w=I.relatedContent.featuringV2.items,T=(0,_t.Ey)(I.relatedContent.appearsOn.items),E=I.discography.topTracks.items.map((e=>(0,x.fX)(e,t))),U=I.relatedContent.discoveredOnV2.items,{stats:{monthlyListeners:P,followers:L,worldRank:D,topCities:B},preRelease:M,profile:{name:F,verified:V,pinnedItem:O,biography:q,externalLinks:G,playlistsV2:H},visuals:{headerImage:K,avatarImage:Z,gallery:W},goods:{events:J,merch:X},saved:Y}=I,Q=($=M)&&$.releaseDate?.isoString&&$.preReleaseContent?.name&&$.preReleaseContent.coverArt?.sources?0===$.preReleaseContent.coverArt.sources.length?null:{albumType:$.preReleaseContent.type,title:$.preReleaseContent.name,uri:$.uri,releaseDate:new Date($.releaseDate.isoString),coverArt:$.preReleaseContent.coverArt.sources}:null;var $;const ee=k?.totalLength||Q||!!O,te=K?.extractedColors?.colorRaw.hex||Z?.extractedColors?.colorRaw.hex||Fe.l0o,ae="RelatedVideoPage"===I.relatedVideos.__typename?I.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename)):[];return(0,j.jsxs)("div",{className:zt,children:[(0,j.jsx)(d.Q,{children:(0,Js.j2)({artistName:A})}),(0,j.jsxs)(Ks.d,{dynamicColors:N,children:[(0,j.jsx)(Ba,{uri:t,artist:{sharingInfo:_,monthlyListeners:P||0,name:F,verified:V||!1,headerImage:K||{sources:[],extractedColors:null},avatarImage:Z||{sources:[],extractedColors:null}},spec:h}),(0,j.jsxs)("div",{className:Tt,children:[(0,j.jsx)(kt,{uri:t,spec:n,logger:c,backgroundColor:te,name:F,sharingInfo:_,isSaved:Y}),(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)("div",{children:(0,j.jsx)(Se.E,{colGap:l.lT,render:({columnCount:a})=>{const s={"--column-count":a};return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("div",{className:b()(Ut,{[Ft]:a<6||!ee}),style:{...s},children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Gt,children:o.Ru.get("artist.popular-tracks")}),E.length?(0,j.jsx)(m,{spec:g,children:(0,j.jsx)(Ge.z,{uri:t,nrTracks:E.length,initialTracks:E})}):null]}),(0,j.jsx)(zs.c,{artistOrShow:F,uri:t,entityType:zs.p.ARTIST}),ee&&(0,j.jsxs)("div",{className:b()(Dt,{[Bt]:a<6}),style:{...s},children:[Q&&M?(0,j.jsx)(ja,{prerelease:Q,className:Mt,spec:n.featuredFactory().upcomingReleaseFactory()}):null,k?.totalLength?(0,j.jsx)(Bs,{className:Mt,uri:`${(0,_t.Dh)(e)}:saved`,name:F,nrTracks:k.totalLength,avatarImages:Z?.sources,spec:n.featuredFactory().likedSongsFactory()}):null,O?(0,j.jsx)(_s,{avatarImages:Z?.sources,artistName:F,item:O,spec:n.featuredFactory().pickedFactory()}):null]})]})},className:Et})}),(0,j.jsxs)(m,{spec:n,children:[(0,j.jsx)(Zt,{discography:I.discography,artistId:e,artistUri:t,artistName:F,shelfIndex:0,spec:n}),(0,j.jsx)(It.pZ,{value:"shelf/featuring",children:(0,j.jsx)(He.p,{total:w.length,title:o.Ru.get("artist-page.featuring",F),seeAllUri:`${(0,_t.Dh)(e)}:featuring`,className:Pt,index:1,id:"featuring",children:w.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}),J.concerts.items&&J.concerts.items.length>0&&(0,j.jsx)(qs,{artistId:e,total:J.concerts.totalCount,concerts:J.concerts.items}),a===Hs.OlV.VARIANTB&&X.items.length>0&&(0,j.jsx)(m,{spec:p,children:(0,j.jsx)(Gs.q,{id:e,uri:(0,_t.ay)(e),merchItems:X.items,merchVariant:a})}),(0,j.jsx)(It.pZ,{value:"shelf/fans-also-like",children:(0,j.jsx)(He.p,{total:S.length,title:o.Ru.get("artist-page.fansalsolike"),seeAllUri:`${(0,_t.Dh)(e)}:related`,className:Pt,index:2,id:"fans-also-like",children:S.map(((e,t)=>(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(qe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]})},e.uri)))})}),(0,j.jsx)(It.pZ,{value:"shelf/appears-on",children:(0,j.jsx)(He.p,{total:T.length,title:o.Ru.get("artist.appears-on"),seeAllUri:`${(0,_t.Dh)(e)}:appears-on`,className:Pt,index:3,id:"appears-on",children:T.map(((e,t)=>(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(he.R,{index:t,showType:!0,...(0,x.Mz)(e)})},e.uri)))})}),H.items.length?(0,j.jsx)(It.pZ,{value:"shelf/artist-playlists",children:(0,j.jsx)(He.p,{total:H.totalCount,title:o.Ru.get("artist-page.artist-playlists"),seeAllUri:`${(0,_t.Dh)(e)}:playlists`,className:Pt,index:4,id:"artist-playlists",children:H.items.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}):null,(0,j.jsx)(It.pZ,{value:"shelf/discovered-on",children:(0,j.jsx)(He.p,{total:U.length,title:o.Ru.get("artist-page.discovered-on",F),seeAllUri:`${(0,_t.Dh)(e)}:discovered-on`,className:Pt,index:5,id:"discovered-on",children:U.map(((e,t)=>{if("Playlist"===e.data.__typename){const a=e.data,s="User"===a.ownerV2.data.__typename&&a.ownerV2.data.name||a.name;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(Pe.B,{index:t,uri:a.uri,name:a.name,authorName:s,description:a.description||"",images:a.images?.items?.[0]?.sources||[]},a.uri)},a.uri)}return null}))})}),i&&ae.length?(0,j.jsx)(It.pZ,{value:"shelf/related-videos",children:(0,j.jsx)(He.p,{total:"RelatedVideoPage"===I.relatedVideos.__typename?I.relatedVideos.totalCount:0,title:o.Ru.get("music_videos"),seeAllUri:`${(0,_t.Dh)(e)}:related-videos`,className:b()(Pt,Lt),index:6,id:"related-videos",children:ae.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:a}=e.trackOfVideo;return(0,j.jsx)(It.pZ,{value:"card",index:t,children:(0,j.jsx)(ze.O,{title:a.name,trackUri:a.uri,artists:a.artists.items,album:a.albumOfTrack,contentRating:a.contentRating,referrerIdentifier:"other",index:t})},e.uri)}))})}):null]}),(0,j.jsx)(Se.E,{render:({columnCount:t})=>(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(Qe,{className:Vt,artistUri:I.uri,name:F,avatarImages:Z?.sources.map(Xs.m),bio:q?.text||"",bioSource:q?.type||z.B3.Biography,images:W.items.map((e=>{const t=e.sources.map(Xs.m);return(0,Ga.g)(t,{desiredLabel:"large",desiredSize:600})})).filter(Ys),worldRank:D||0,monthlyListeners:P,topCities:B.items||[],followers:L,externalLinks:G?.items,spec:n.aboutFactory()}),a===Hs.OlV.DEFAULT&&X.items.length?(0,j.jsxs)("div",{className:b()(Ot,{[qt]:t<4}),children:[(0,j.jsx)(C.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",className:Gt,children:o.Ru.get("artist-page.merch")}),(0,j.jsx)(m,{spec:p,children:(0,j.jsx)(ra,{items:X.items,artistId:e,merchVariant:a})})]}):null]}),colGap:l.lT}),a===Hs.OlV.VARIANTA&&X.items.length>0&&(0,j.jsx)(m,{spec:p,children:(0,j.jsx)("div",{className:Ht,children:(0,j.jsx)(Gs.q,{id:e,uri:(0,_t.ay)(e),merchItems:X.items,merchVariant:a})})})]})]})]})]})})),$s=s.memo((function(){return(0,j.jsx)(s.Suspense,{fallback:null,children:(0,j.jsx)(Qs,{})})})),er=new h.l("queryArtistPlaylists","query","54f7e5a5a2af05b7dc98526df376a46c6b15c05440c8dfdc8f6cecb1a807eca7",null),tr=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i,staleTime:5*g.i},(0,g.I)(er,n,c));var n,c;const h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===h||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-playlists")});const p=h.profile.name,{items:f}=h.profile.playlistsV2,y=(0,x.bj)(f);return(0,j.jsxs)("div",{className:"contentSpacing",children:[p?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.artist-playlists.seo.title",p)}):null,(0,j.jsx)(m.$,{total:y.length,title:o.Ru.get("artist-page.artist-playlists"),showAll:!0,fullPage:!0,rowGap:l.lT,children:y.map(((e,t)=>(0,j.jsx)(Pe.B,{index:t,uri:e.uri,name:e.name,authorName:e.authorName||e.name,description:e.description,images:e.images},e.uri)))})]})})),ar=new h.l("queryArtistRelated","query","3d031d6cb22a2aa7c8d203d49b49df731f58b1e2799cc38d9876d58771aa66f3",null),sr=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(ar,n,c));var n,c;const h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;if(null===h||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-related-artists")});const p=h.profile.name,f=h.relatedContent.relatedArtists.items;return(0,j.jsxs)("div",{className:"contentSpacing",children:[p?(0,j.jsx)(d.Q,{children:o.Ru.get("artist-page.fansalsolike.seo.title",p)}):null,(0,j.jsx)(m.$,{title:o.Ru.get("artist-page.fansalsolike"),total:f.length,showAll:!0,fullPage:!0,rowGap:l.lT,children:f.map(((e,t)=>(0,j.jsx)(qe.a,{index:t,uri:e.uri,name:e.profile.name,images:e.visuals.avatarImage?.sources||[]},e.uri)))})]})})),rr=new h.l("queryArtistRelatedVideos","query","eb5bde95cd8cb2aa369d6ec868c008f7e42e5e0cc810188ecc973c6c1b0e73cd",null),ir=s.memo((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{loading:a,error:s,data:i}=(n={uri:t},c={gcTime:15*g.i},(0,g.I)(rr,n,c));var n,c;if(null===i||"Artist"!==i.artistUnion.__typename||"RelatedVideoPage"!==i.artistUnion.relatedVideos.__typename||s||a)return(0,j.jsx)(u.LoadingPage,{hasError:null!==s,errorMessage:o.Ru.get("error.request-artist-related-videos")});const h=i.artistUnion.relatedVideos.items.filter((e=>"Track"===e.trackOfVideo.data.__typename));return(0,j.jsxs)("div",{className:"contentSpacing",children:[(0,j.jsx)(d.Q,{children:o.Ru.get("music_videos")}),(0,j.jsx)(m.$,{title:o.Ru.get("music_videos"),total:i.artistUnion.relatedVideos.totalCount,showAll:!0,fullPage:!0,rowGap:l.lT,children:h.map(((e,t)=>{if("Track"!==e.trackOfVideo.data.__typename)return null;const{data:a}=e.trackOfVideo;return(0,j.jsx)(ze.O,{title:a.name,trackUri:a.uri,artists:a.artists.items,album:a.albumOfTrack,contentRating:a.contentRating,referrerIdentifier:"other",index:t},t)}))})]})}));var nr=a(62411),lr=a(4266);const or=new h.l("queryArtistMinimal","query","53d3f76582c49ad0a05dc685955f20dc2a5f2209b192e5446e5e4e623ce23a48",null);var cr=a(47667);const dr="VjLekolG5eyfw_9Hhjxv",ur=[lr.$.INDEX,lr.$.TITLE_AND_ARTIST,lr.$.ALBUM,lr.$.ADDED_AT,lr.$.DURATION],mr=({artistUri:e,collectionUri:t})=>{const a=(0,Ws.d)({offset:0,limit:1,uri:e}),{error:r,data:i}=(n={uri:e},(0,g.I)(or,n,l));var n,l;const{usePlayContextItem:c,togglePlay:d,isPlaying:m}=(0,Te.P)({uri:t},{featureIdentifier:"your_library"}),h="Artist"===i?.artistUnion.__typename?i.artistUnion:null;return a&&h&&!r?(0,j.jsxs)("div",{className:b()("contentSpacing",dr),children:[(0,j.jsxs)(fe.g,{children:[(0,j.jsx)(B.D,{size:"medium",onClick:()=>d(),isPlaying:m,uri:t}),(0,j.jsx)(_.X,{text:o.Ru.get("artist-page.liked-songs-by-artist-title",h.profile.name)})]}),a.totalLength>0&&(0,j.jsx)(s.Suspense,{fallback:(0,j.jsx)(u.LoadingPage,{hasError:null!==r,errorMessage:o.Ru.get("error.request-collection-tracks-failure")}),children:(0,j.jsx)(M.a,{columns:ur,children:(0,j.jsx)(cr.b,{nrTracks:a.totalLength,collectionUri:t,uri:e,usePlayContextItem:c,initialItems:[]})})})]}):null},hr=()=>{const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),a=(0,nr.d4)((({session:e})=>e?.user?.id))||null,s=a?(0,n.g1K)(a,e).toURI():null;return a&&s?(0,j.jsx)(mr,{artistUri:t,collectionUri:s}):null};var gr=a(17610),pr=a(62538),xr=a(72954);const jr="EPBWBmUPyLEpl4VJflaL",fr="JFiowuVIURESjJJznyZx",yr="P6CL1uHz_zTqst4gaAXQ",vr="JEd1tp9FdtDLBOCRSVe0",br=e=>{const t=(0,Xe.s)(),a=(0,s.useMemo)((()=>e.spec.promoRowFactory()),[e.spec]),r=(0,St.t)(a);return(0,j.jsxs)("div",{className:jr,ref:r,children:[(0,j.jsx)(C.E,{as:"h2",variant:"bodyMediumBold",className:fr,children:o.Ru.get("concerts.find_more")}),(0,j.jsx)(L.N,{to:"/concerts",className:yr,onClick:()=>{const e=a.hitUiNavigate({destination:"spotify:app:concerts"});t.logInteraction(e)},children:(0,j.jsx)(At.v,{as:"span",selected:!0,children:o.Ru.get("concerts.find_nearby")})}),(0,j.jsx)("img",{className:vr,alt:"",src:"https://i.scdn.co/image/ab676d63000076a07ce4a60e6015185a1c0edf08"})]})};var Cr=a(21113),Nr=a(15558),Rr=a(73812);const kr="y9Olwg6ho6E95Rud3iLs",Ar="pT8jWX5PbLB2Z91Ngl7n",Ir="ynfZz1ilmr8Zg8BgXG_d",Sr="qRS9X9GvnMDoWj6sx0Yo",_r="RqzE7votb8N93rc_jcM1",wr="kc6crrZKKENRmaIMtzIx",Tr="azrW1gfJbgz897iDaITJ",Er="wYMCavuacjad59alV1BF",Ur="U7meWrHbAMHqpiK5oslu",Pr="sdc7g7JVaoD3cGz27yCP",Lr=(0,s.memo)((e=>{const{concerts:t,spec:a,locationName:r}=e,i=(0,Xe.s)(),n=(0,St.t)(a),l=(0,s.useMemo)((()=>a.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[a]),c=r?a.locationEventsFactory({identifier:r}):a.otherEventsFactory(),d=(0,St.t)(l);return 0===t.length?(0,j.jsxs)("div",{className:Ur,children:[(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",ref:n,className:wr,children:r?o.Ru.get("concerts.no_events_description"):o.Ru.get("concerts.no_upcoming_events")}),!r&&(0,j.jsx)(L.N,{to:"/concerts",onClick:()=>{i.logInteraction(l.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,j.jsx)(At.v,{selected:!0,selectedColorSet:"invertedLight",ref:d,children:o.Ru.get("concerts.browse_all_events")})})]}):(0,j.jsx)("div",{ref:n,className:Tr,children:t?.map(((e,t)=>(0,j.jsx)(Cr.A,{date:e.date.isoString,title:e.venue.location?.name??"",uri:e.uri,subTitle:(0,Rr.re)(e.artistsV2.items.map((e=>{return(t=e.data)&&Object.keys(t).includes("profile")?e.data.profile.name:null;var t})).filter(Nr.se)),onClick:()=>{const a=c.eventRowFactory({position:t,uri:e.uri}).hitUiNavigate({destination:e.uri});i.logInteraction(a)}},e.uri)))})}));var Dr=a(18278),Br=a(7834),Mr=a(86677),Fr=a(10887),Vr=a(52999),Or=a(26754);const qr=e=>String(Math.max(e,0)).padStart(2,"0");var zr=a(19870);const Gr="jbcMEstnj9EEGk0iasdD",Hr="re4Rxq0ZHW6zcqniEgMv",Kr="Bf8_3eE_YXxwPiD6KXPY",Zr="RPo65cLEoLdTEkTummvb",Wr="xBNLwmb6ERaaRsCIo9dg",Jr="rPWE_GaRZjZZUMr7G8JR",Xr="KM8BFaw7LbvBIcLnf2BX",Yr="h_or55__Gfm37Hj0BII9",Qr="g85DlcND8Z02L7beYR4w",$r="aCCWdrptC6K5jwPdCFzA",ei="UmbVZN08wsxnijDwCiqw",ti="kdHZ5dN96_2WQdSVE0Fn",ai="JqfIX63RXBFalKDdgoxp",si="gMIIMHORo2F6KINUrks9",ri="ZnwwywxlQDxc9vmvPfVJ",ii="nu4wp680TqinUAntKWgh",ni="IwTsJ2mPD2SedRZsd8Ug",li=e=>{const[t,a]=(0,s.useState)((r=new Date(e.endDate),i=new Date,Math.abs(r.getTime()-i.getTime())));var r,i;(0,zr.$)((e=>{a((t=>{const a=t-1e3;return a<=0?(e(),0):a}))}),1e3);const{hours:n,minutes:l,seconds:c}=(e=>{const t=Math.floor(e/36e5),a=Math.floor(e%36e5/6e4),s=Math.floor(e%6e4/1e3);return{hours:qr(t),minutes:qr(a),seconds:qr(s)}})(t);return(0,j.jsxs)("div",{className:b()(Gr,e.isInverted?Xr:Hr),style:{"--mainColor":e.colors.main,"--textColor":e.colors.text},children:[(0,j.jsxs)("div",{className:Yr,children:[(0,j.jsxs)("div",{className:Qr,children:[(0,j.jsx)("div",{className:$r,children:(0,j.jsx)("div",{className:Kr,children:(0,j.jsx)(C.E,{variant:"titleSmall",className:ei,children:o.Ru.get("concerts.fans_first.title")})})}),(0,j.jsx)(C.E,{className:ti,variant:"bodySmallBold",children:o.Ru.get("concerts.fans_first.offer_ends",n,l,c)})]}),(0,j.jsxs)("div",{className:ai,children:[(0,j.jsx)(Fr._,{crop:!0,circle:!0,src:e.artistImage,width:72,height:72,className:Zr}),(0,j.jsx)("div",{className:si,children:(0,j.jsxs)("div",{className:ri,children:[(0,j.jsx)("div",{className:Wr,children:(0,j.jsx)(Vr.K,{size:"xlarge"})}),(0,j.jsx)("div",{className:Jr,children:(0,j.jsx)(Or.T,{className:ii})})]})})]})]}),e.children]})},oi=e=>{const{useLibraryStateFn:t=Q.A}=e,a=(0,s.useMemo)((()=>e.spec?.followButtonFactory()),[e.spec]),r=(0,Xe.s)(),[i,n]=t(e.artistUri.toString(),e.isSaved);return(0,j.jsxs)(li,{endDate:e.endDate,artistUri:e.artistUri,artistImage:e.artistImage,colors:{main:e.colors.main,text:e.colors.text},children:[(0,j.jsx)(C.E,{className:ni,children:i?o.Ru.get("concerts.fans_first.post_follow"):o.Ru.get("concerts.fans_first.not_eligible")}),(0,j.jsx)("div",{children:(0,j.jsx)(Mr.$,{colorSet:"invertedDark",onClick:()=>{if(a){const t=i?a?.hitUnfollow({itemToBeUnfollowed:e.artistUri.toString()}):a?.hitFollow({itemToBeFollowed:e.artistUri.toString()});r.logInteraction(t)}n(!i)},children:i?o.Ru.get("following"):o.Ru.get("follow")})})]})};var ci=a(8725),di=a(7315),ui=a(50111),mi=a(44971),hi=a(19616),gi=a(53133),pi=a(33234);const xi="RsojTMSCnZ_n6sJlvmFY",ji="tAdvjJEctimN9bSKFEEs",fi="Kh8seY4CCWJ_lF2HULcR",yi="zoExFlFK7NJZxx9sZmYE",vi="dsRW73mDQaMgshOkTP1R",bi="_AGAd8ZZIa10TY8HriYh",Ci="plBJu8NZSrHwWub7JZiR",Ni="iGaY0QRLiJX3cwefmyJY",Ri="S4W5QhATentoPoZzHgU6",ki="KL44GxqNPj8XNymvOAom",Ai="T4X1Pr5DXjcTNQzLa0_C",Ii=e=>{const{enqueueSnackbar:t}=(0,gi.d)(),[a,r]=(0,s.useState)(""),[i,n]=(0,s.useState)(e.defaultStep??"event-list");return(0,j.jsx)(j.Fragment,{children:(0,j.jsxs)("section",{className:ji,children:[(0,j.jsxs)("div",{style:{"--mainColor":"event-list"===i?e.colors.main:"","--textColor":"event-list"===i?e.colors.text:""},children:[(0,j.jsx)("div",{className:b()(fi,"event-list"===i?bi:Ci),children:(0,j.jsx)(li,{artistUri:e.artistUri,artistImage:e.artistImage,endDate:e.endDate,colors:e.colors,isInverted:"code-redemption"===i})}),(0,j.jsxs)("div",{style:"event-list"===i?{"--text-subdued":e.colors.text,"--text-base":e.colors.text}:{},children:["code-redemption"===i&&(0,j.jsx)("div",{className:vi,children:(0,j.jsx)(mt.H,{"aria-label":o.Ru.get("navbar.go-back"),iconOnly:ci.g,size:"small",onClick:()=>{n("event-list"),r("")}})}),(0,j.jsx)("div",{className:yi,children:(0,j.jsx)(mt.H,{"aria-label":o.Ru.get("close"),iconOnly:di.M,size:"small",onClick:e.onClose})})]})]}),"event-list"===i&&(0,j.jsx)("section",{className:Ri,children:e.routes.map((e=>(0,j.jsx)(Cr.A,{onClick:t=>{t.preventDefault(),n("code-redemption"),r(e.externalTicketerUrl)},uri:"",date:e.tourDate,title:e.address,subTitle:""},e.address)))}),"code-redemption"===i&&(0,j.jsxs)("section",{className:Ni,children:[(0,j.jsx)(C.E,{children:o.Ru.get("concerts.fans_first.explanation")}),(0,j.jsx)("div",{className:ki,children:(0,j.jsx)("div",{className:Ai,children:(0,j.jsx)(mt.H,{iconTrailing:ui._,onClick:()=>{(e.copyToClipboard??pi.l)(e.offerCode),t(o.Ru.get("concert.code_copied"))},children:e.offerCode})})}),(0,j.jsx)(Mr.$,{iconTrailing:Jt.H,target:"_blank",href:a,children:o.Ru.get("concerts.fans_first.get_access")})]})]})})},Si=e=>(0,j.jsx)(mi.A,{contentLabel:o.Ru.get("live_events.label"),isOpen:!0,className:xi,onRequestClose:e.onClose,children:(0,j.jsx)(hi.SnackbarProvider,{children:(0,j.jsx)(Ii,{...e})})}),_i=e=>{const[t,a]=(0,s.useState)(!1),r=(0,s.useMemo)((()=>e.spec?.getAccessButtonFactory()),[e.spec]),i=(0,Xe.s)();return(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(li,{endDate:e.endDate,artistUri:e.artistUri,artistImage:e.artistImage,colors:e.colors,children:[(0,j.jsx)(C.E,{className:ni,children:o.Ru.get("concerts.fans_first.thanks")}),(0,j.jsx)("div",{children:(0,j.jsx)(Mr.$,{colorSet:"invertedDark",onClick:()=>{r&&i.logInteraction(r?.hitUiReveal()),a(!0)},children:o.Ru.get("concerts.fans_first.get_access")})})]}),t&&(0,j.jsx)(Si,{artistUri:e.artistUri,artistImage:e.artistImage,offerCode:e.offerCode,colors:e.colors,endDate:e.endDate,routes:e.routes,onClose:()=>a(!1)})]})},wi=new h.l("fansFirstPresales","query","ee44f67d8cd56a78a0b34fa2fc53bb255cfb30b056640eb3c0d3a85b76ea8b58",null),Ti=e=>{const t=(0,s.useMemo)((()=>e.spec?.presaleOfferCardFactory()),[e.spec]),{data:a}=(r={artistUri:e.artistUri?.toString()??""},(0,g.I)(wi,r,i));var r,i;const[l]=a?.artists??[];if(!(0,Nr.m4)(l))return null;const o=(0,n.o_h)(l.uri);return null!==l.fansFirstGoods.presale&&o?null===l.fansFirstGoods.presale.campaign?(0,j.jsx)(oi,{artistUri:o,isSaved:l.saved,artistImage:l.fansFirstGoods.presale.format.headerImageUrl,colors:{main:l.fansFirstGoods.presale.format.theme?.backgroundColor,text:l.fansFirstGoods.presale.format.theme?.foregroundColor},endDate:l.fansFirstGoods.presale.endDate,spec:t}):(0,j.jsx)(_i,{artistUri:o,artistImage:l.fansFirstGoods.presale.format.headerImageUrl,colors:{main:l.fansFirstGoods.presale.format.theme?.backgroundColor,text:l.fansFirstGoods.presale.format.theme?.foregroundColor},endDate:l.fansFirstGoods.presale.endDate,offerCode:l.fansFirstGoods.presale.campaign.offerCode,routes:l.fansFirstGoods.presale.campaign.routes,spec:t}):null};var Ei=a(10266);const Ui=(0,s.memo)((e=>{const{data:t,locationName:a,onSetLocation:r}=e,i=(0,n.o_h)(t?.uri),l=i?(0,n.ZAw)(i.id):void 0,{spec:c}=(0,Rt.r)(gr.y,{data:{uri:i?.toURI()??"",identifier:i?.id??""}}),u=(0,Xe.s)(),m=(0,St.t)(c),h=(0,Ve.NC)(Ua.F1),g=(0,s.useMemo)((()=>c.headerFactory()),[c]),p=(0,s.useMemo)((()=>c.browseAllEventsButtonFactory({uri:"spotify:app:concerts"})),[c]),x=(0,St.t)(p),f=e=>{e&&r(e)},y=t?.goods.events.concerts.items.filter((e=>e.nearUser)).filter(Nr.se)??[],v=t?.goods.events.concerts.items.filter((e=>!e.nearUser)).filter(Nr.se)??[];return(0,j.jsxs)("section",{ref:m,className:kr,children:[(0,j.jsx)(d.Q,{children:(0,Ei.gq)(t?.profile.name)}),(0,j.jsxs)(Na.z,{backgroundImages:t?.visuals.headerImage?.sources,children:[(0,j.jsxs)(Aa.Y,{children:[(0,j.jsx)(Ra.Z,{children:(0,j.jsx)(C.E,{as:"h1",children:o.Ru.get("live_events.all_events_tab")})}),(0,j.jsx)(Sa.mm,{children:t?.profile.name})]}),(0,j.jsx)(Ia.h,{children:(0,j.jsx)("div",{children:(0,j.jsx)(_.X,{text:o.Ru.get("artist.concerts.artist_tour_dates",t?.profile.name)})})})]}),(0,j.jsxs)("div",{className:Ar,children:[(0,j.jsx)(pr.K,{backgroundColor:t?.visuals.headerImage?.extractedColors?.colorDark.hex}),(0,j.jsxs)("section",{className:Sr,children:[(0,j.jsx)("div",{className:Pr,children:(0,j.jsx)(Ti,{artistUri:i,spec:c})}),(0,j.jsxs)("section",{className:Ir,children:[(0,j.jsx)(Dr.A,{handleLocationChange:f,locationStr:a,headerSpec:g,dialog:"preferred"}),l&&(0,j.jsx)(xr.w,{uri:l.toURI(),sharingInfo:null,interactionData:{intent:"share",type:"click"},onClick:()=>{return e=l.toURI(),void u.logInteraction(c.headerFactory().shareButtonFactory().hitShare({entityToBeShared:e,shareId:e}));var e}})]}),h&&(0,j.jsx)(Br.k,{onLocationChange:f}),!t?.goods.events.concerts&&(0,j.jsxs)("div",{className:Ur,children:[(0,j.jsx)(C.E,{as:"h2",className:_r,variant:"titleMedium",semanticColor:"textBase",children:o.Ru.get("concerts.no_upcoming_events")}),(0,j.jsx)(C.E,{as:"p",variant:"bodyMedium",ref:m,className:wr,children:o.Ru.get("artist.concerts.error.not_found")}),(0,j.jsx)(L.N,{to:"/concerts",onClick:()=>{u.logInteraction(p.hitUiNavigate({destination:"spotify:app:concerts"}))},children:(0,j.jsx)(At.v,{selected:!0,selectedColorSet:"invertedLight",ref:x,children:o.Ru.get("concerts.browse_all_events")})})]}),!!t?.goods.events.concerts&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("section",{children:[(0,j.jsx)(C.E,{as:"h2",className:b()(_r,{[Er]:!y}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:o.Ru.get("concerts.near_location",a)}),(0,j.jsx)(Lr,{concerts:y,spec:c})]}),(0,j.jsxs)("section",{children:[(0,j.jsx)(C.E,{as:"h2",className:b()(_r,{[Er]:!v}),variant:"titleMedium",semanticColor:"textBase",paddingBottom:"tighter-2",children:o.Ru.get("concerts.header.other")}),(0,j.jsx)(Lr,{concerts:v,spec:c})]})]}),(0,j.jsx)("section",{children:(0,j.jsx)(br,{spec:c})})]})]})]})})),Pi=new h.l("artistConcerts","query","ce78fdb28c5036de6d81bbc45571b62e2201a0c08eb068ab17dd3428396026f5",null),Li=()=>{const{artistId:e=""}=(0,r.g)(),[t,a]=(0,s.useState)(),{data:i,loading:n,invalidate:l}=(c={artistId:`spotify:artist:${e}`},(0,g.I)(Pi,c,d));var c,d;if(n)return(0,j.jsx)(u.LoadingPage,{hasError:!1,errorMessage:""});const m=(h=i?.artistUnion,h&&Object.keys(h).includes("uri")?i?.artistUnion:void 0);var h;return m?(0,j.jsx)(Ui,{data:m,locationName:t?.location||m.goods.events.userLocation?.name||o.Ru.get("concerts.default_location"),onSetLocation:e=>{a(e),l()}}):(0,j.jsx)(u.LoadingPage,{hasError:!0,errorMessage:o.Ru.get("concert.error.concert_not_found_title")})};var Di=a(41715),Bi=a(2983);const Mi=(0,s.memo)((function(){const{artistId:e=""}=(0,r.g)(),t=(0,x.ay)(e),{search:a}=(0,r.zy)(),s=new URLSearchParams(a).get("pageUri"),l=(0,n.o_h)(s)?s:null;return(0,j.jsx)(Y.P,{surface:X.u.ARTIST,uris:[t],children:(0,j.jsx)("section",{"data-testid":"artist-page","data-test-uri":t,children:(0,j.jsxs)(r.BV,{children:[(0,j.jsx)(r.qh,{path:"discography",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_ALBUMS,children:(0,j.jsx)(Ue,{})})}),(0,j.jsx)(r.qh,{path:"discography/:albumType",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_ALBUMS,children:(0,j.jsx)(Ue,{})})}),(0,j.jsx)(r.qh,{path:"featuring",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_FEATURING,children:(0,j.jsx)(Me,{})})}),(0,j.jsx)(r.qh,{path:"related",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_RELATED,children:(0,j.jsx)(sr,{})})}),(0,j.jsx)(r.qh,{path:"appears-on",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_APPEARS_ON,children:(0,j.jsx)(f,{})})}),(0,j.jsx)(r.qh,{path:"playlists",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_PLAYLISTS,children:(0,j.jsx)(tr,{})})}),(0,j.jsx)(r.qh,{path:"discovered-on",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_DISCOVERED_ON,children:(0,j.jsx)(De,{})})}),(0,j.jsx)(r.qh,{path:"saved",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_SAVED_TRACKS,children:(0,j.jsx)(hr,{})})}),(0,j.jsx)(r.qh,{path:"related-videos",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_RELATED_VIDEOS,children:(0,j.jsx)(ir,{})})}),(0,j.jsx)(r.qh,{path:"/",element:l?(0,j.jsx)(Bi.$,{to:{search:a,pathname:"/artist/:artistId/discography"}}):(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST,children:(0,j.jsx)($s,{})})}),(0,j.jsx)(r.qh,{path:"concerts",element:(0,j.jsx)(Di.e,{pageId:i.$h.ARTIST_CONCERTS,children:(0,j.jsx)(Li,{})})})]})})})}));Mi.displayName="ArtistPage";const Fi=Mi},16413:(e,t,a)=>{a.d(t,{I:()=>s.I});var s=a(20836)},41457:(e,t,a)=>{a.d(t,{c:()=>l});var s=a(38682),r=a(13357),i=a(34939);const n={[i.nw.ADDED_AT]:r.Sw.ADDED_AT,[i.nw.ADDED_BY]:null,[i.nw.ALBUM]:r.Sw.ALBUM_NAME,[i.nw.ARTIST]:r.Sw.ARTIST_NAME,[i.nw.DURATION]:null,[i.nw.TITLE]:r.Sw.NAME,[i.nw.SHOW_NAME]:null,[i.nw.PUBLISH_DATE]:null},l=e=>{const t=(0,s.Xt)(e);if(!t)return;const a=n[t.field],r=t.order;return a&&r?{field:a,order:r}:void 0}},19870:(e,t,a)=>{a.d(t,{$:()=>r});var s=a(30758);const r=(e,t)=>{const a=(0,s.useRef)(e);(0,s.useEffect)((()=>{a.current=e}),[e]),(0,s.useEffect)((()=>{let e;function s(){e&&clearInterval(e)}if(null!==t)return e=setInterval((function(){a.current(s)}),t),s}),[t])}},17802:(e,t,a)=>{a.d(t,{A:()=>s});const s={artistOverviewContent:"XtGI24gayCCOR69pcBao",artistOverviewContainer:"AK5MS4kVmpVJSnAPzApZ",popularTracks:"ih3vZ4qqibfclKQ2r3U8",artistShelfSpacer:"vsqOYUmRYepQ7AgGzPDk",artistShelfRelatedVideos:"Uv9uqBNRy4qsyhPSa7lY",artistSides:"YyjwPfOAdb6z73PerGUF",artistSidesBlock:"pAvBQUDkfvkyO47Kw71y",sideBlock:"PPoC4pYtYLuuzjV0RaQF",popularTracksBlock:"V168frZQBWaJ1OdnyyKO",about:"MZkAAYmEs5kAOXrbrBQQ",events:"IR0gsJCJYP1TqjMi6wUt",merch:"hGJN08YEbxIJ2HaEcHee",merchSmall:"GNdKACg7GTgIv75LT6Gv",overview:"FwIG_h9mHxGOTDxFRnWT",heading:"anPfvyDzeqR3CKW4gHUP",merchShelfContent:"ZpAXOWy3RgYX8ywKZZOI",container:"jW4eWdr_LUeOXwPpKhWG",content:"BPDHTIIFueJMvtDPZttw",backgroundImage:"DRXonbAbVN5Vg9anDL1X",bio:"xbKOOJ_NjLijBvdpAudQ",artistGridContainer:"M0yriEHOsE9ET707IXzC",image:"PwMuGFUCeHPjbHDy8M1T",columnContainer:"y_GaLKy76zj71zPYkLrs",bioContainer:"TV2j1oIRIkKH_6D1xP82",statsContainer:"T_AmQPlZ6wvE819I7A0D",stats:"zQy0G59IX5G4Cc9AtWRT",postedBy:"OyLgnahIHw63684ABRBF",postedByAvatar:"KguYS3oppxDrMNpTUJcB",avatar:"O9QEyBUMktZGNPifQqvY",modal:"JnpOnFaQfrRIA2fYe88A",scrollbars:"cacyLqtJhjhr95qRC_R7",close:"pSxFsY9Fgcj5f8Gf05mh",modalBase:"tsFfFt7SCIoA14JawrRf",modalAfterOpen:"_VADS4mdajCt5Yuf6KjW",modalBeforeClose:"TrS5BnDIiLtqz1i1QBVV",rank:"tLjX9htIKD_OCmEX01UN",cityBlock:"NPv26QCDgdnwsPOlYJmQ"}},90497:(e,t,a)=>{a.d(t,{A:()=>s});const s={item:"artist-artistOnTour-item",condensed:"artist-artistOnTour-condensed",date:"artist-artistOnTour-date",elevated:"artist-artistOnTour-elevated",dateMonth:"artist-artistOnTour-dateMonth",dateDay:"artist-artistOnTour-dateDay",info:"artist-artistOnTour-info",title:"artist-artistOnTour-title",time:"artist-artistOnTour-time",timeAndVenue:"artist-artistOnTour-timeAndVenue",seeAll:"main-seeAll-link",timeAndVenueText:"artist-artistOnTour-timeAndVenueText",onTourShelfGrid:"artist-artistOnTour-onTourShelfGrid",metadata:"artist-artistOnTour-metadata",location:"artist-artistOnTour-location",eventName:"artist-artistOnTour-eventName"}},83318:(e,t,a)=>{a.d(t,{A:()=>s});const s={albumMerch:"V1660uk_uXXZAMEmV4D4",shelfSpace:"RbnoPhjDDAtbxN8gAiif"}}}]); +//# sourceMappingURL=4168.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4518.js b/dot-config/spicetify/Extracted/Themed/xpui/4518.js new file mode 100755 index 00000000..c3f141a3 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4518.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4518],{92699:(e,a,l)=>{l.d(a,{x:()=>m});var t=l(40638),s=l(86677),n=l(14237),o=l(99293),r=l(31417),c=l(99701),i=l(35352),u=l(87182),d=l(58685),b=l(41434),p=l(86070);const m=({iconSize:e="small",onClick:a,className:l,showDelayOnHover:m})=>{const k=(0,u.z)(),{hasContext:g,isPaused:h,canPause:y,canResume:v}=(0,d.o)((e=>({hasContext:e?.hasContext,isPaused:e?.isPaused,canPause:e?.restrictions.canPause,canResume:e?.restrictions.canResume})),b.a),x=(0,t.YQ)((e=>{h&&v?(a?.("resume"),k.resume(),(0,i.aX)(e,"play/resume")):!h&&y&&(a?.("pause"),k.pause())}),100,{leading:!0,trailing:!1}),f=h?r.Ru.get("playback-control.play"):r.Ru.get("playback-control.pause"),w=!g||(h?!v:!y);return(0,p.jsx)(c.Zp,{label:f,showDelay:m,children:(0,p.jsx)(s.$,{iconOnly:h?n.A:o._,className:l,size:{small:"small",medium:"medium",large:"large"}[e]||"small",disabled:w,"aria-label":f,"data-testid":"control-button-playpause",onClick:x,colorSet:"invertedLight"})})}},85601:(e,a,l)=>{l.d(a,{s:()=>h});var t=l(97500),s=l.n(t),n=l(65503),o=l(50733),r=l(1574),c=l(31417),i=l(99701),u=l(36958),d=l(58685),b=l(25357);const p="vW9NFcNIj8useE43Vx9G";var m=l(86070);function k(e,a,l){return a&&l?(e+1)%3:a?(e+1)%2:l?1===e?2:(e+2)%4:b.p.REPEAT_NONE}const g={[b.p.REPEAT_NONE]:{get label(){return c.Ru.get("playback-control.disable-repeat")},intent:"repeat-off",ariaChecked:"false"},[b.p.REPEAT_CONTEXT]:{get label(){return c.Ru.get("playback-control.enable-repeat")},intent:"repeat-all",ariaChecked:"true"},[b.p.REPEAT_TRACK]:{get label(){return c.Ru.get("playback-control.enable-repeat-one")},intent:"repeat-single",ariaChecked:"mixed"}},h=({onClick:e,className:a,showDelayOnHover:l})=>{const{setRepeat:t,repeat:c}=(0,u.V)(),[h,y]=(0,d.o)((e=>[e?.restrictions.canToggleRepeatContext??!1,e?.restrictions.canToggleRepeatTrack??!1])),v=!h&&!y,x=g[k(c,h,y)].label,f=c!==b.p.REPEAT_NONE;return(0,m.jsx)(i.Zp,{label:x,showDelay:l,children:(0,m.jsx)(n.H,{className:s()({[p]:f},a),iconOnly:c===b.p.REPEAT_TRACK?o.I:r.B,size:"small",disabled:v,"aria-label":x,"data-testid":"control-button-repeat",onClick:()=>{const a=k(c,h,y);e?.(a),t(a)},role:"checkbox","aria-checked":g[c].ariaChecked,semanticColor:f?"textBrightAccent":void 0})})}},12253:(e,a,l)=>{l.d(a,{h:()=>u});var t=l(65503),s=l(82509),n=l(31417),o=l(99701),r=l(87182),c=l(58685),i=l(86070);const u=({onClick:e,className:a,showDelayOnHover:l})=>{const u=(0,r.z)(),d=(0,c.o)((e=>e?.restrictions.canSeek??!1));return(0,i.jsx)(o.Zp,{label:n.Ru.get("playback-control.skip-backward-15"),showDelay:l,children:(0,i.jsx)(t.H,{iconOnly:s.e,size:"small",onClick:()=>{e?.(-15e3),u.seekBackward(15e3)},disabled:!d,"aria-label":n.Ru.get("playback-control.skip-backward-15"),"data-testid":"control-button-seek-back-15",className:a})})}},61711:(e,a,l)=>{l.d(a,{v:()=>u});var t=l(65503),s=l(51129),n=l(31417),o=l(99701),r=l(87182),c=l(58685),i=l(86070);const u=({onClick:e,className:a,showDelayOnHover:l})=>{const u=(0,r.z)(),d=(0,c.o)((e=>e?.restrictions.canSeek??!1));return(0,i.jsx)(o.Zp,{label:n.Ru.get("playback-control.skip-forward-15"),showDelay:l,children:(0,i.jsx)(t.H,{iconOnly:s.A,size:"small",onClick:()=>{e?.(15e3),u.seekForward(15e3)},disabled:!d,"aria-label":n.Ru.get("playback-control.skip-forward-15"),"data-testid":"control-button-seek-forward-15",className:a})})}},89059:(e,a,l)=>{l.d(a,{u:()=>b});var t=l(97500),s=l.n(t),n=l(65503),o=l(2792),r=l(31417),c=l(99701),i=l(36958);const u="fZjbVIqD8Xc3auRZOxu5";var d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const{shuffle:t,setShuffle:b,canToggleShuffle:p}=(0,i.V)(),m=t?r.Ru.get("playback-control.disable-shuffle"):r.Ru.get("playback-control.enable-shuffle");return(0,d.jsx)(c.Zp,{label:m,showDelay:l,children:(0,d.jsx)(n.H,{className:s()({[u]:t},a),iconOnly:o.p,size:"small",onClick:()=>{const a=!t;e?.(a),b(a)},disabled:!p,role:"switch","aria-checked":t?"true":"false","aria-label":m,"data-testid":"control-button-shuffle",semanticColor:t?"textBrightAccent":void 0})})}},97127:(e,a,l)=>{l.d(a,{d:()=>b});var t=l(40638),s=l(65503),n=l(94547),o=l(31417),r=l(99701),c=l(35352),i=l(87182),u=l(58685),d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const b=(0,i.z)(),p=(0,u.o)((e=>(e?.restrictions.canSkipPrevious||e?.restrictions.canSeek)??!1)),m=(0,t.YQ)((a=>{e?.(),b.skipToPrevious(),(0,c.aX)(a,"skip-back")}),100,{leading:!0,trailing:!1});return(0,d.jsx)(r.Zp,{label:o.Ru.get("playback-control.skip-back"),showDelay:l,children:(0,d.jsx)(s.H,{iconOnly:n.A,size:"small",disabled:!p,"aria-label":o.Ru.get("playback-control.skip-back"),"data-testid":"control-button-skip-back",onClick:m,className:a})})}},62747:(e,a,l)=>{l.d(a,{$:()=>b});var t=l(40638),s=l(65503),n=l(12743),o=l(31417),r=l(99701),c=l(35352),i=l(87182),u=l(58685),d=l(86070);const b=({onClick:e,className:a,showDelayOnHover:l})=>{const b=(0,i.z)(),p=(0,u.o)((e=>e?.restrictions.canSkipNext??null)),m=(0,t.YQ)((a=>{e?.(),b.skipToNext(),(0,c.aX)(a,"skip-forward")}),100,{leading:!0,trailing:!1});return(0,d.jsx)(r.Zp,{label:o.Ru.get("playback-control.skip-forward"),showDelay:l,children:(0,d.jsx)(s.H,{iconOnly:n.s,size:"small",disabled:!p,"aria-label":o.Ru.get("playback-control.skip-forward"),"data-testid":"control-button-skip-forward",onClick:m,className:a})})}},83019:(e,a,l)=>{l.d(a,{w:()=>ee});var t=l(14343),s=l(31417),n=l(26639),o=l(99701),r=l(2214),c=l(65655),i=l(47532),u=l(66621),d=l(51242),b=l(2684),p=l(18193),m=l(68836),k=l(97007),g=l(76442),h=l(88026),y=l(99760),v=l(99419),x=l(50518),f=l(58313),w=l(24393),R=l(14532),D=l(67473),S=l(92830),C=l(98843),j=l(40560),N=l(54157),O=l(11386),E=l(18727),z=l(37436),H=l(16598),V=l(15427),_=l(6210),T=l(63445),A=l(88108),P=l(32375);const B="INvB6IvAqjjvyfm0ezDi";var L=l(86070);const M={.5:r.D4,.6:c.k,.7:i.l,.8:u.W9,.9:d.l,1:b.P,1.1:p.g,1.2:m.Dx,1.3:k.A,1.4:g.l,1.5:h.in,1.6:y.h,1.7:v.e,1.8:x.B,1.9:f.T,2:w.c,2.1:R.F,2.2:D.W,2.3:S.Z,2.4:C.U,2.5:j.X,2.6:N.m,2.7:O.n,2.8:E.Y,2.9:z.X,3:H.f,3.1:V.y,3.2:_.T,3.3:T.Q,3.4:A.l,3.5:P.i},I=({speed:e,iconSize:a=20})=>{const l=M[e];return l?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(l,{className:B,iconSize:a,style:{width:`${a}px`,height:`${a}px`}}),(0,L.jsx)("span",{className:"hidden-visually",children:`${e}x`})]}):(0,L.jsx)("span",{children:`${e}x`})};var W=l(30758),X=l(10994),Z=l(41874),Y=l(12864),F=l(7388);const U="Is0ZfXiIyRoHd9y1OWtv",$=function({selectedSpeed:e,setSelectedSpeed:a}){const l=F.wH,t=(0,W.useRef)(null),n=(0,W.useCallback)((e=>{null!==e&&(t.current=e)}),[]);return(0,W.useEffect)((()=>{t?.current&&t.current.scrollIntoView({block:"center"})}),[t]),(0,L.jsxs)(X.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),children:[(0,L.jsx)(Z.y,{children:s.Ru.get("playback-control.playback-speed")}),(0,L.jsx)("div",{className:U,children:l.map((l=>(0,L.jsx)(Y.D,{elementRef:l===e?n:void 0,onClick:()=>{a(l)},"data-testid":`playback-speed-option-${l}`,role:"menuitemradio","aria-label":s.Ru.get("playback-control.playback-speed-button-a11y",l),"aria-checked":l===e,children:`${l}x`},l)))})]})};var q=l(31904),Q=l(79237),G=l(62642),K=l(43329);const J="Ww5ppB6W74laf1c0H_pR",ee=({iconSize:e=20,onClick:a})=>{const{speed:l,setSpeed:r,canChangeSpeed:c}=(0,q.C)(),i=(0,Q.v)((({connectionStatus:e})=>e===G.zP.NOT_CONNECTED)),u=(0,t.NC)(K.hd),d={"--button-size":2*e+"px"};return c?(0,L.jsx)(n.t,{renderInline:!0,placement:"top-start",menu:(0,L.jsx)($,{selectedSpeed:l,setSelectedSpeed:e=>{a?.(e),r(e)}}),children:(a,t,n)=>(0,L.jsx)(o.Zp,{label:s.Ru.get("playback-control.change-playback-speed"),children:(0,L.jsx)("button",{style:d,ref:n,className:J,onClick:e=>{t(e)},"aria-label":s.Ru.get("playback-control.change-playback-speed"),"data-testid":"control-button-playback-speed",disabled:!i&&u===K._9.DEFAULT,children:(0,L.jsx)(I,{speed:l,iconSize:e})})})}):null}},86286:(e,a,l)=>{l.d(a,{M:()=>E,V:()=>O});var t=l(30758),s=l(97500),n=l.n(s),o=l(40638),r=l(31417),c=l(99701),i=l(27607),u=l(15262),d=l(61690),b=l(72616),p=l(15525),m=l(86070);const k=({volume:e=1,iconSize:a="small",...l})=>{const t={size:a,role:"presentation",...l};return 0===e?(0,m.jsx)(u.X,{"aria-label":r.Ru.get("playback-control.a11y.volume-off"),...t}):e<1/3?(0,m.jsx)(d.D,{"aria-label":r.Ru.get("playback-control.a11y.volume-low"),...t}):e<2/3?(0,m.jsx)(b.z,{"aria-label":r.Ru.get("playback-control.a11y.volume-medium"),...t}):(0,m.jsx)(p.C,{"aria-label":r.Ru.get("playback-control.a11y.volume-high"),...t})};var g=l(32792),h=l(3326),y=l(38694);var v=l(3292);const x="volume-bar",f="RyUTmsGCr7jM4YTwqq8p",w="HGaOzijxBrKrSQhwI6rT",R="volume-bar__slider-container",D="DLZvnBAg9muHrwjSyIus",S="ekolz0hXwCXtCyFNmvqb",C="volume-bar__icon-button",j="aDDQP2meKLCk46Bn7Zz1",N="XRpLYcl6xtWmk7bNdHkS";let O=function(e){return e[e.SHOW_SLIDER_ALWAYS=0]="SHOW_SLIDER_ALWAYS",e[e.SHOW_SLIDER_ON_HOVER=1]="SHOW_SLIDER_ON_HOVER",e}({});const E=({iconSize:e="small",onVolumeBarClick:a,onVolumeBarDrag:l,onToggleMuteClick:s,className:u,mode:d=O.SHOW_SLIDER_ALWAYS,sliderSize:b,sliderDirection:p="horizontal",volumeIconRef:E,isMiniPlayer:z,showDelayOnHover:H})=>{const{volume:V,setVolume:_,raiseVolume:T,lowerVolume:A}=function(){const e=(0,h.p)(),[a,l]=(0,t.useState)(-1);return(0,t.useEffect)((()=>{let a=!0;return(async()=>{const t=await e.getVolume();a&&l(t)})(),()=>{a=!1}}),[e]),(0,y.F)(g._.VOLUME,(e=>l(e.data.volume))),{volume:a,setVolume:(0,t.useCallback)((a=>{l(a),e.setVolume(a)}),[e]),raiseVolume:(0,t.useCallback)((()=>e.raiseVolume()),[e]),lowerVolume:(0,t.useCallback)((()=>e.lowerVolume()),[e])}}(),P=-1!==V,B=Math.min(1,Math.max(0,V)),[L,M]=(0,t.useState)({isDragging:!1,isHoveringButton:!1,toggleVolumeLevel:null,dragPosition:0,shouldDragValueBeUsed:!1}),{shouldDragValueBeUsed:I,dragPosition:W,isHoveringButton:X,toggleVolumeLevel:Z,isDragging:Y}=L;let F=I?W:B;P||(F=1);const U=(0,o.YQ)((e=>{const a=Math.min(1,Math.max(0,e));_(a)}),25,{maxWait:50,leading:!0}),$=()=>{M((e=>({...e,isHoveringButton:!0})))},q=()=>{M((e=>({...e,isHoveringButton:!1})))},Q=0===V?r.Ru.get("playback-control.unmute"):r.Ru.get("playback-control.mute"),G={"--button-size":2*(0,v.k)(e)+"px","--slider-width":b?`${b}px`:"100%"};return(0,m.jsxs)("div",{style:G,className:n()(x,u,{[j]:!P,[f]:"vertical"===p,[D]:d===O.SHOW_SLIDER_ON_HOVER,[w]:z}),"data-testid":"volume-bar",dir:"ltr",onWheel:e=>{if(!P)return;const a=Math.abs(e.deltaY)>Math.abs(e.deltaX)?e.deltaY:e.deltaX,l=Math.max(-120,Math.min(120,e?.nativeEvent?.wheelDelta||a))/1200,t=Math.max(0,Math.min(1,F+l));_(t)},ref:E,children:[(0,m.jsx)(c.Zp,{label:Q,showDelay:H,children:(0,m.jsx)("button",{className:n()(C,"control-button",{[N]:z}),onClick:()=>{0===F?(s?.("not_muted"),U(Z??.7)):(M((e=>({...e,toggleVolumeLevel:F}))),s?.("muted"),U(0))},disabled:!P,"aria-label":0===V?r.Ru.get("playback-control.unmute"):r.Ru.get("playback-control.mute"),onMouseEnter:$,onMouseLeave:q,"aria-describedby":"volume-icon","data-testid":"volume-bar-toggle-mute-button",children:(0,m.jsx)(k,{id:"volume-icon",iconSize:e,volume:F})})}),(0,m.jsx)("div",{className:n()(R,{[S]:"vertical"===p}),onMouseEnter:$,onMouseLeave:q,children:(0,m.jsx)(i.z2,{labelText:r.Ru.get("playback-control.a11y.volume-slider-button"),value:F,max:1,step:.1,onDragStart:e=>{M((a=>({...a,isDragging:!0,dragPosition:e,shouldDragValueBeUsed:!0})))},onDragMove:e=>{M((a=>({...a,dragPosition:e,shouldDragValueBeUsed:!0}))),Y&&(l?.(e),U(e))},onDragEnd:e=>{M((e=>({...e,shouldDragValueBeUsed:!1,dragPosition:0,isDragging:!1}))),a?.(e),U(e)},onStepBackward:A,onStepForward:T,forceActiveStyles:X,direction:p})})]})}},32277:(e,a,l)=>{l.d(a,{w:()=>r});var t=l(30758),s=l(41364),n=l(86070);const o=({renderDisabled:e=(()=>null),renderEnabled:a})=>(0,s.X)(!0)?a():e(),r=e=>(0,n.jsx)(t.Suspense,{fallback:null,children:(0,n.jsx)(o,{...e})})},56507:(e,a,l)=>{l.d(a,{a:()=>u});var t=l(2792),s=l(77),n=l(31058),o=l(36958),r=l(58685),c=l(37474),i=l(86070);const u=({size:e,withSnackbar:a,className:l,showDelayOnHover:u})=>{const d=(0,r.o)((e=>e?.context),((e,a)=>e?.uri===a?.uri)),{title:b}=(0,n.$)(!0),{canToggleShuffle:p}=(0,o.V)();return(0,c.O)(d)?(0,i.jsx)(s.Y,{size:e,contextUri:d.uri,entityName:b??"",isActive:!0,activationPlacement:"top",offsetDotDistance:!1,withPadding:!0,disabled:!p,withActivation:!1,withSnackbar:a,className:l,showDelayOnHover:u}):(0,i.jsx)(s.u,{size:e,shuffleModeConfig:{icon:t.p},shuffleIsOn:!1,disabled:!0,withPadding:!0,className:l,showDelayOnHover:u})}},38694:(e,a,l)=>{l.d(a,{F:()=>n});var t=l(30758),s=l(3326);function n(e,a){const l=(0,t.useRef)(a),n=(0,s.p)();l.current=a,(0,t.useEffect)((()=>n.getEvents().addListener(e,(e=>{l.current(e)}))),[e,n])}}}]); +//# sourceMappingURL=4518.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4553.js b/dot-config/spicetify/Extracted/Themed/xpui/4553.js new file mode 100755 index 00000000..d0c4f518 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4553.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4553],{93500:(e,t,a)=>{a.d(t,{G:()=>r});var i=a(31417),n=a(57292),s=a(86070);function r({totalItems:e,containsTracks:t,containsEpisodes:a,containsAudiobooks:r}){if(0===e)return null;const l=a&&!r&&!t,o=r&&!t&&!a;let c;return c=t&&!a&&!r?i.Ru.get("tracklist-header.songs-counter",e):l?i.Ru.get("tracklist-header.episodes-counter",e):o?i.Ru.get("tracklist-header.audiobooks-counter",e):i.Ru.get("tracklist-header.items-counter",e),(0,s.jsx)(n.q,{children:c})}},23798:(e,t,a)=>{a.d(t,{N:()=>I});var i=a(97500),n=a.n(i),s=a(50498),r=a(17763),l=a(89887),o=a(95530),c=a(86677),d=a(30758),u=a(77141);const m="pH79IoVAcUC3Hn_VbS3B",x="v24nSqF2h73Ep3EJNkNl",h="OPvfrmGjqSYso3Me5FCd",p="TCbF8QBxkRc0mqI5_lzg",j="ZYBmZ8ghf3oA7NH2mI7r",g="Jtt6TUrz6TioPQsKXIY7",b="yzZ_VZHrZBb3REPcU7tD";var y=a(86070);const v=({"aria-label":e,children:t})=>{const a=(0,d.useRef)(null),i=(0,r.Oj)();return(0,y.jsx)(u.s,{focusTrapOptions:{initialFocus:()=>a.current??!1,onPostDeactivate:()=>{i({type:"close"})}},children:(0,y.jsx)("div",{"aria-label":e,tabIndex:-1,ref:a,className:x,children:t})})},k=({title:e,body:t,cta:a,onClose:i})=>(0,y.jsxs)(v,{"aria-label":e,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:t}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",onClick:i,children:a})})]});var C=a(65503),N=a(31417);const E=({onClose:e})=>{const t=N.Ru.get("paywalls.modal-heading"),a=(0,y.jsxs)(y.Fragment,{children:[N.Ru.get("paywalls.modal-body-p1"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),N.Ru.get("paywalls.modal-body-p2"),(0,y.jsx)("br",{}),(0,y.jsx)("br",{}),N.Ru.get("paywalls.modal-body-p3")]});return(0,y.jsxs)(v,{"aria-label":t,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:t}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:a}),(0,y.jsx)("div",{className:j,children:(0,y.jsx)(C.H,{size:"small",semanticColor:"textBase",onClick:e,children:N.Ru.get("close")})})]})};var R=a(79871),A=a(96250);const S=({upsellExplanation:e,gatedEntityRelations:t,onClose:a})=>{const i=e.title,s=t.entitiesWithValueProps.at(0),r=s?.summary?.forUserWithoutAccess,l=s?.valueProps.map((({displayText:e})=>e))??[],d=l?.length>1;return(0,y.jsxs)(v,{"aria-label":i,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:i}),(0,y.jsxs)(o.E,{as:"div",variant:"bodySmall",className:p,children:[r,l&&d&&(0,y.jsx)(R.j,{hasTextSeparator:!0,semanticColor:"textBase",children:l})]}),(0,y.jsxs)("div",{className:n()(j,g),children:[(0,y.jsx)(C.H,{size:"small",condensed:!0,onClick:a,children:N.Ru.get("action-trigger.button.not-now")}),(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:e.url,iconTrailing:A.H,children:e.cta})]})]})},w=({title:e,body:t,cta:a,url:i,onClose:n})=>(0,y.jsxs)(v,{"aria-label":e,children:[(0,y.jsx)(o.E,{as:"div",variant:"bodyMediumBold",className:h,children:e}),(0,y.jsx)(o.E,{as:"div",variant:"bodySmall",className:p,children:t}),(0,y.jsxs)("div",{className:j,children:[(0,y.jsx)(C.H,{size:"small",semanticColor:"textBase",onClick:n,children:N.Ru.get("close")}),(0,y.jsx)(c.$,{size:"small",colorSet:"invertedLight",href:i,children:a})]})]});var f=a(6038),T=a(62270);const U=({showUri:e})=>{const t=(0,r.Oj)(),a=function(e){const t=(0,T.T)(),[a,i]=(0,d.useState)(null);return(0,d.useEffect)((()=>{!async function(){try{const a=await t.getAccessInfo(e);i(a)}catch(e){console.error(e),i(void 0)}}()}),[t,e]),a}(e);if(null===a)return null;let i=(0,y.jsx)(E,{onClose:()=>t({type:"close"})});return a?.basic&&(i=(0,y.jsx)(k,{...a.basic,onClose:()=>t({type:"close"})})),a?.upsellLink&&(i=(0,y.jsx)(w,{...a.upsellLink,onClose:()=>t({type:"close"})})),a?.gatedEntityRelations&&a?.upsellLink&&(i=(0,y.jsx)(S,{upsellExplanation:a.upsellLink,gatedEntityRelations:a.gatedEntityRelations,onClose:()=>t({type:"close"})})),(0,y.jsxs)(s.A,{colorSet:"announcement",className:m,onClick:e=>{e.stopPropagation()},onContextMenu:e=>{e.stopPropagation()},children:[i,(0,y.jsx)("div",{"data-popper-arrow":"",className:n()(b)})]})},I=({children:e,enabled:t,showUri:a,renderInline:i=!0})=>t&&a?(0,y.jsx)(f.y,{trigger:"click",action:"toggle",offset:[-2,20],renderInline:i,content:(0,y.jsx)(U,{showUri:a}),children:e}):(0,l.d)(e)?e(!1,(()=>{}),{current:null}):e},550:(e,t,a)=>{a.d(t,{F:()=>l});var i=a(30758),n=a(31417),s=a(26344),r=a(86070);const l=i.memo((function({onClose:e,onRemove:t,isOpen:a,tracks:i,title:l}){return(0,r.jsx)(s.T,{"aria-label":l,titleText:l,onConfirm:a=>{t(i),e(a)},onClose:e,confirmText:n.Ru.get("remove"),descriptionText:n.Ru.get("playlist.remove_multiple_description"),cancelText:n.Ru.get("playlist.delete-cancel"),isOpen:a})}))},67239:(e,t,a)=>{a.d(t,{g:()=>U});var i=a(30758),n=a(3074),s=a.n(n),r=a(53860),l=a(84703),o=a(95530),c=a(14343),d=a(22765),u=a(75830),m=a(57447),x=a(1555),h=a(10994),p=a(41874),j=a(12864),g=a(4266),b=a(31417),y=a(47160),v=a(29324),k=a(86070);const C=({onSelect:e})=>{const{viewMode:t,setViewMode:a}=(0,y.a)();return(0,k.jsxs)(k.Fragment,{children:[(0,k.jsx)(p.y,{children:b.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),v.i.map((({value:i,icon:n,text:s},r)=>(0,k.jsx)(j.D,{role:"menuitemradio","aria-checked":t===i,divider:r===v.i.length-1?"after":void 0,autoClose:!1,leadingIcon:n(),onClick:()=>{a(i),e?.(i)},children:s()},i)))]})},N=({heading:e,selected:t,onSelect:a,options:i,enableViewModeMenu:n=!1,onSelectViewMode:s,sortOrder:r,...l})=>{let o;r&&(r===g.H.ASC||r===g.H.SECONDARY_ASC?o=m.U:r!==g.H.DESC&&r!==g.H.SECONDARY_DESC||(o=x.R));return(0,k.jsxs)(h.W,{getInitialFocusElement:e=>e?.querySelector('[aria-checked="true"]'),...l,children:[e?(0,k.jsx)(p.y,{children:e}):null,i.map((({key:e,value:i},n)=>(0,k.jsx)(j.D,{role:"menuitemradio","aria-checked":e===t.key,CheckedIcon:o,onClick:()=>a(e,n),children:i},e))),n&&(0,k.jsx)(C,{onSelect:s})]})};var E=a(61147),R=a(21549),A=a(43329);const S="x-sortBox-sortDropdown",w="cvTLPmjt6T7M85EKcB8w",f="SbDHY3fVADNJ4l9qOLQ2",T=({isOpen:e,className:t})=>e?(0,k.jsx)(r.J,{size:"small","aria-hidden":"true",className:t}):(0,k.jsx)(l.y,{size:"small","aria-hidden":"true",className:t}),U=({heading:e,options:t,selected:a,onSelect:n,sortOrder:r,variant:l="bodySmall",semanticColor:m,disabled:x,onClick:h,ariaLabel:p,enableViewModeMenu:j=!1})=>{const g=(0,c.NC)(A.mA)&&j,{viewMode:b}=(0,E.a)();a||(a=t?.[0]);const y=v.i.find((({value:e})=>e===b))||v.i[0],C=(0,i.useMemo)((()=>`sortboxlist-${s().create().hex}`),[]),{spec:U,logger:I}=(0,R.r)(d.d,{});return(0,k.jsx)(u.b,{menu:(0,k.jsx)(N,{selected:a,options:t,onSelect:(e,t)=>{n(e,t);const a=U.sortBySectionFactory().sortOptionFactory({identifier:e}).hitSort();I.logInteraction(a)},sortOrder:r,heading:e,enableViewModeMenu:g,onSelectViewMode:e=>{const t=U.viewAsSectionFactory().viewOptionFactory({identifier:e}).hitUiElementToggle();I.logInteraction(t)},id:C}),children:(e,t,i)=>(0,k.jsxs)("button",{className:S,onClick:e=>{x||(h?.(e),t(e))},ref:i,type:"button","aria-label":p,role:"combobox","aria-controls":C,"aria-expanded":e,children:[(0,k.jsx)(o.E,{"data-sortbox-label":!0,semanticColor:m,variant:l,className:w,children:a?.value||(g?y.text():"")}),g?y.icon():(0,k.jsx)(T,{isOpen:e,className:f})]})})}},6966:(e,t,a)=>{a.d(t,{S:()=>l,z:()=>o});var i=a(30758),n=a(86070);const s=[0,()=>{}],r=(0,i.createContext)(s),l=({children:e})=>{const t=(0,i.useState)(0);return(0,n.jsx)(r.Provider,{value:t,children:e})},o=()=>{const e=(0,i.useContext)(r);if(!e)throw Error("useNrValidItemsContext must be used within a NrValidItemsProvider");return e}},32183:(e,t,a)=>{a.d(t,{g:()=>g});var i=a(30758),n=a(97500),s=a.n(n),r=a(95530),l=a(22726),o=a(65462),c=a(78516),d=a(29454),u=a(99701),m=a(21082),x=a(27012),h=a(33329),p=a(14178),j=a(86070);const g=({children:e,uri:t,name:a,nonInteractive:n=!1,creatorUri:g,spec:b})=>{let y=null;const{draggable:v,onDragStart:k}=(0,x.P)({itemUris:[t],dragLabelText:a}),C=(0,h.s)(),N=(0,i.useCallback)((()=>{b&&C.logInteraction(b.albumLinkFactory({uri:t}).hitUiNavigate({destination:t}))}),[C,b,t]);return n?(0,j.jsx)("span",{className:s()("standalone-ellipsis-one-line",p.A.text),children:e}):((0,l._Tv)(t)&&(y=(0,j.jsx)(c.h,{uri:t,artistUri:g})),(0,l.WB1)(t)&&(y=(0,j.jsx)(d.H,{uri:t})),(0,j.jsx)(o.h,{menu:y,children:(0,j.jsx)(r.E,{variant:"bodySmall",children:(0,j.jsx)(u.Zp,{label:a,showDelay:u.uF,children:(0,j.jsx)(m.N,{draggable:v,onDragStart:k,className:s()("standalone-ellipsis-one-line"),to:t,dir:"auto",onClick:N,children:e})})})}))}},92026:(e,t,a)=>{a.d(t,{E:()=>x});var i=a(30758),n=a(95530),s=a(31417),r=a(28506),l=a(99701),o=a(83044),c=a(33329),d=a(14178),u=a(86070);const m=({name:e,uri:t,nonInteractive:a,children:i,onClick:n,index:s})=>a?(0,u.jsx)("span",{className:d.A.text,children:i}):(0,u.jsx)(o.y,{name:e,uri:t,onClick:n,index:s,children:i},t),x=({artists:e,filter:t,nonInteractive:a=!1,spec:o})=>{const d=(0,c.s)(),x=(0,i.useCallback)(((e,t)=>{o&&d.logInteraction(o.artistLinkFactory({position:t??0,uri:e}).hitUiNavigate({destination:e}))}),[d,o]),h=e.map((({name:e})=>e)).join(s.Ru.getSeparator());return(0,u.jsx)(l.Zp,{label:h,showDelay:l.uF,children:(0,u.jsx)(n.E,{as:"div",variant:"bodySmall",children:e.map((({uri:e,name:n},l)=>(0,u.jsxs)(i.Fragment,{children:[l>0&&s.Ru.getSeparator(),(0,u.jsx)(m,{uri:e,name:n,nonInteractive:a,onClick:x,index:l,children:(0,u.jsx)(r.M,{searchWords:[t??""],textToHighlight:n})},e)]},e)))})})}},82610:(e,t,a)=>{a.d(t,{W:()=>Le});var i=a(30758),n=a(62411),s=a(85387),r=a(33618),l=a(17348),o=a(91614),c=a(28454),d=a(95530),u=a(14343),m=a(94246),x=a(22726),h=a(31417),p=a(98293),j=a(65462),g=a(47863),b=a(91676),y=a(76720),v=a(54622),k=a(28506),C=a(21082),N=a(23798),E=a(39795),R=a(92026),A=a(41616),S=a(84816),w=a(33329),f=a(14178),T=a(86070);const U=({uri:e,imageUrl:t,name:a,showAvatar:n,spec:s,isCompactMode:r=!1})=>{const l=(0,w.s)(),o=(0,i.useCallback)((()=>{s&&l.logInteraction(s.addedByLinkFactory({position:0,uri:e}).hitUiNavigate({destination:e}))}),[l,s,e]);return(0,T.jsx)(j.h,{menu:(0,T.jsx)(S.B,{uri:e}),children:(0,T.jsxs)(C.N,{className:f.A.addedBy,to:e,onClick:o,children:[n&&(0,T.jsx)(A.e,{images:[{url:t,width:null,height:null}],label:a,width:r?16:24,userIconSize:"small"}),(0,T.jsx)(d.E,{variant:"bodySmall",className:"standalone-ellipsis-one-line",children:a})]})})};var I=a(32183),P=a(14563),D=a(82952),F=a(79225);const B="zKHdfiQG6XifMqJCe1Xs",O="F01P0D1xtG9RO_uiHxBK",M="oGvEk0CK5XgIUe0vIgWL",_="aUGJu_1rkM7l_YNH3r86",L=({concertDate:e,concertURI:t,concertVenue:a,index:i,spec:n})=>{const s=(0,w.s)(),r=h.Ru.formatDate((0,F.ad)(e),{weekday:"short",month:"short",day:"numeric"});return(0,T.jsx)(d.E,{className:B,variant:"bodySmall",semanticColor:"textSubdued",children:(0,T.jsxs)(C.N,{to:t,onClick:()=>{const e=n.eventLinkFactory({position:i,uri:t,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:t});s.logInteraction(e)},className:O,children:[(0,T.jsx)("div",{className:M,children:(0,T.jsx)(D.T,{size:"small"})}),(0,T.jsx)("div",{className:_,children:[r,a].join(" • ")})]})})};var $=a(13083);const V=({dateAdded:e,prefix:t})=>{let a=e.getTime()>0&&h.Ru.formatRelativeDate(e,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"});return a&&t&&(a=`${t} ${a}`),(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",className:"standalone-ellipsis-one-line",children:a})};var H=a(20455),z=a(89402);const Y=({eventDate:e,ticketingSiteURL:t})=>{const a=(0,z.W)(),i=h.Ru.formatDate((0,F.ad)(e),{year:"numeric",month:"short",day:"numeric"}),n=h.Ru.get("tracklist.livestream");return(0,F.ad)(e){a({targetUri:t,intent:"navigate",type:"click"})},children:[(0,T.jsx)(D.T,{className:f.A.eventTicketIcon,height:19}),`${n} • ${i}`]})})},W=({concertsCount:e="1",concertVenue:t,concertURI:a,index:i,spec:n})=>{const s=(0,w.s)(),r="1"===e?t:h.Ru.get("concerts_near_you.multiple_locations");return(0,T.jsx)(d.E,{className:f.A.eventVenue,variant:"bodySmall",semanticColor:"textSubdued",children:(0,T.jsx)(C.N,{to:a,onClick:()=>{const e=n.eventLinkFactory({position:i,uri:a,reason:"Concerts Near You Employee test"}).hitUiNavigate({destination:a});s.logInteraction(e)},children:r})})};var Z=a(63096);const q=({uri:e,imageUrl:t,displayName:a,username:i,piled:n,onClick:s})=>{const r=(0,T.jsx)(A.e,{images:[{url:t,width:null,height:null}],label:a,width:24,userIconSize:"small",piled:n,displayName:a,username:i,className:f.A.facepileAvatar});return e?(0,T.jsx)(j.h,{menu:(0,T.jsx)(S.B,{uri:e}),children:(0,T.jsx)(C.N,{className:f.A.facepile,to:e,onClick:s,children:r})}):(0,T.jsx)("span",{className:f.A.facepile,children:r})},X=({users:e,spec:t})=>{const a=(0,w.s)();return(0,T.jsx)(i.Fragment,{children:e.slice(0,5).map(((e,i)=>(0,T.jsx)(q,{uri:e.uri,imageUrl:(0,Z.g)(e.images)?.url||"",displayName:e.displayName,username:e.username,piled:i>0,onClick:()=>{if(!t||!e.uri)return;const n=t.addedByLinkFactory({position:i,uri:e.uri}).hitUiNavigate({destination:e.uri});a.logInteraction(n)}},e.uri||e.displayName)))})};var G=a(97500),K=a.n(G),J=a(93240),Q=a(64143),ee=a(60384);const te=({isDisliked:e,feedbackPath:t,feedbackUri:a,deleteFeedbackPath:n,spec:s,onClick:r,name:l,contextUri:o})=>{const c=(0,w.s)(),{enqueueSnackbar:d}=(0,J.dh)(),{setDislikeFeedback:u,removeDislikeFeedback:m}=(0,ee.I)({uri:a,setFeedbackPath:t,removeFeedbackPath:n,contextUri:o}),x=(0,i.useCallback)((async()=>{m(),r?.(),s&&o&&c.logInteraction(s.addRecommendationButtonFactory().hitAddToPlaylist({playlist:o,itemToBeAdded:a}))}),[m,r,s,o,c,a]),p=(0,i.useCallback)((async()=>{u(),r?.(),d(h.Ru.get("feedback.hide-song",l)),s&&o&&c.logInteraction(s.removeRecommendationButtonFactory().hitRemoveRecommendation({recommendedItemUri:a,contextUri:o}))}),[u,r,d,l,s,o,c,a]);return(0,T.jsx)(Q.O,{className:K()(f.A.rowFeedbackButton,f.A.rowFeedback),onClick:e?x:p,isDisliked:e,size:"small",label:e?h.Ru.get("playback-control.un-ban"):h.Ru.get("playback-control.ban")})};var ae=a(68118),ie=a(27305),ne=a(87619),se=a(591),re=a(95931),le=a(67799);const oe=({releaseDate:e})=>(0,T.jsx)(d.E,{variant:"bodySmall",children:(0,F.gD)((0,F.ad)(e))});var ce=a(93627),de=a(12499),ue=a(95797),me=a(76633),xe=a(62358),he=a(4266),pe=a(87732),je=a(33593),ge=a(44335),be=a(3436),ye=a(45807),ve=a(14409),ke=a(53133),Ce=a(55926),Ne=a(42621),Ee=a(38501),Re=a(99041),Ae=a(54003),Se=a(97253),we=a(18663),fe=a(44672),Te=a(53377),Ue=a(57270),Ie=a(85346),Pe=a(28340),De=a(21549),Fe=a(7307),Be=a(59029),Oe=a(85907),Me=a(15838);const _e=e=>e?.type===Fe.c.SHOW,Le=i.memo((function({uri:e,uid:t,name:a,duration_ms:A,artists:S,albumOrShow:w,isMOGEFRestricted:D,isExplicit:F,isPlayable:B,isLocal:O=!1,isPaywalled:M,isUserSubscribed:_,index:z,playIndex:q=null,isMixedMedia:G,addedBy:K,hasDecoratedAddedBy:J,dateAdded:Q,release_date:ee,type:Fe,imgUrl:Le,contextUri:$e,onMove:Ve,onInsert:He,usePlayContextItem:ze,allowedDropTypes:Ye,feedbackPath:We,feedbackUri:Ze,deleteFeedbackPath:qe,isDisliked:Xe,ticketingSiteURL:Ge="",eventDate:Ke,concertsCount:Je,concertDate:Qe,concertURI:et="",concertVenue:tt,isConcert:at,isBlend:it=!1,canRemove:nt,playlistName:st,authorName:rt,isOutOfMarket:lt,consumptionCapExplanation:ot,isOwnedBySelf:ct=!1,isCompactMode:dt=!1,hasAssociatedVideo:ut=!1,bpm:mt,musicKey:xt,gatedEntityRelations:ht,isBanned:pt}){const{spec:jt}=(0,De.r)(m.i,{data:{position:z,reason:"",uri:e}}),gt=(0,n.wA)(),bt=(0,s.Zp)(),{filter:yt}=(0,i.useContext)(E.g),vt=(0,u.NC)(Ee.MCN),kt=(0,Ie.T)(e),Ct=(0,u.NC)(Ee.enc),Nt=(0,Ue.b)($e,e,pt),Et=(0,Te.A)(e,$e,!!nt,Nt),{isPlayable:Rt,isAnyArtistBanned:At}=(0,Ne.g)(e,{isPlayable:B,isLocal:O,isOutOfMarket:lt,artistUris:S?.map((e=>e.uri)),hasContextualBan:Nt}),{unBanArtists:St}=(0,be.M)(S?.map((e=>e.uri))??[]),wt=(0,me.w)(),{enqueueSnackbar:ft}=(0,ke.d)(),Tt="episode"===Fe,Ut="audiobook"===Fe,It="track"!==Fe&&_e(w)&&w.mediaType===Be.Q.VIDEO,Pt=M&&!_,Dt=Ut&&Pt,{badges:Ft,hasBadges:Bt}=(0,Me.b)({downloadAvailability:kt,isExplicit:F,isMOGEFRestricted:D,isPaywalled:M,hasAssociatedVideo:ut}),Ot=(0,Ce.c)();let Mt=z+1;G&&(Mt=It?(0,T.jsx)(r.B,{"data-testid":"video-icon",size:"small","aria-hidden":"true"}):Tt?(0,T.jsx)(l.L,{"data-testid":"podcast-icon",size:"small","aria-hidden":"true"}):Ut?(0,T.jsx)(o.l,{"data-testid":"audiobook-icon",size:"small","aria-hidden":"true"}):(0,T.jsx)(c.v,{"data-testid":"track-icon",size:"small","aria-hidden":"true"}));let _t=(0,T.jsx)(v.P,{uri:e,uid:t,albumUri:w?.uri,artists:S,contextUri:$e,canBeRemovedFromPlaylist:nt,isBanned:Nt,canBan:Et});Tt?_t=(0,T.jsx)(b.b,{uri:e,uid:t,showUri:w?.uri,contextUri:$e,canBeRemovedFromPlaylist:nt}):O?_t=(0,T.jsx)(y.A,{uri:e,uid:t,contextUri:$e,canBeRemovedFromPlaylist:nt}):Ut&&(_t=(0,T.jsx)(g.p,{uri:e,uid:t,contextUri:$e,includeGoToAudiobook:!0,canBeRemovedFromPlaylist:nt}));let Lt=S?.map((e=>e.name)).join(h.Ru.getSeparator())||"";Tt&&_e(w)?Lt=w.publisher:Ut&&(Lt=rt||"");const $t=K?.[0],Vt=(0,Z.g)($t?.images,{desiredWidth:24,desiredLabel:"small"}),Ht=(0,Pe.P)({uri:e},{featureIdentifier:"playlist"}),zt=ze({uid:t,uri:e,index:q??z}),{isActive:Yt,isPlaying:Wt,triggerPlay:Zt,togglePlay:qt}=Ut?Ht:zt,Xt=()=>(0,T.jsx)(ue.p,{titleText:a,children:(0,T.jsx)(k.M,{searchWords:[yt],textToHighlight:a})}),Gt=(0,i.useCallback)(((e,t)=>{Ut&&ot?gt((0,p._3)(ot)):Zt({loggingParams:t})}),[ot,gt,Ut,Zt]),Kt=(0,i.useCallback)(((t,a)=>{Ut&&ot?gt((0,p._3)(ot)):Dt?bt((0,x.o_h)(e).toURLPath(!0)):qt({loggingParams:a})}),[ot,gt,Ut,bt,qt,Dt,e]),Jt=vt&&(0,ye.v)(ht,e);return(0,T.jsx)(fe.pZ,{value:"row",index:z,children:(0,T.jsx)(N.N,{renderInline:!1,enabled:!0,showUri:w?.uri,children:(t,i)=>(0,T.jsx)(j.h,{menu:_t,children:(0,T.jsx)(xe.w,{uri:e,contextUri:$e,index:z,onTriggerPlay:Gt,isCompactMode:dt,onTriggerPaywall:t=>{Dt?bt((0,x.o_h)(e).toURLPath(!0)):i(t)},onDoubleClick:()=>{Ut?bt((0,x.o_h)(e).toURLPath(!0)):ft(h.Ru.get("feedback.unable-to-play"))},isLocked:Pt,isActive:Yt,ariaRowIndex:z+1,isPlayable:Rt,isAnyArtistBanned:At,handleArtistBanUndoClick:St,ageRestricted:D,dragMetadata:{name:a,createdBy:Lt},onMove:Ve,onInsert:He,allowedDropTypes:Ye,spec:jt,canRemovePlaylistItems:nt,children:wt.map((({columnType:t,options:i},n)=>{const s=(0,pe.y)(n,t,wt);return(0,T.jsx)(s,{ariaColIndex:n,children:(()=>{switch(t){case he.$.INDEX:return(0,T.jsx)(T.Fragment,{children:(0,T.jsx)(N.N,{showUri:w?.uri??"",renderInline:!1,enabled:Pt,children:(0,T.jsx)(se.$,{uri:e,playAriaLabel:h.Ru.get("tracklist.a11y.play",a,Lt),onClick:Kt,isPlaying:Wt,isActive:Yt,isLocked:Pt,spec:jt,children:(0,T.jsx)(le.a,{children:Mt})})})});case he.$.TITLE_AND_ARTIST:case he.$.TITLE_AND_AUTHOR:return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(ae.e,{src:Le,isVideo:It,isEpisode:Tt}),(0,T.jsxs)(ie.l,{children:[Ot||Ut?(0,T.jsx)(C.N,{to:e,className:f.A.rowTitle,"data-testid":"internal-track-link",children:Xt()}):Xt(),Bt&&(0,T.jsxs)(P.P,{children:[Ft.download&&(0,T.jsx)(Se._,{}),Ft.explicit&&(0,T.jsx)(Re.U,{}),Jt?(0,T.jsx)(ve.x,{gatedEntityRelations:ht}):Ft.paid&&(0,T.jsx)(Ae.y,{}),Ft.nineteen&&(0,T.jsx)(we.q,{className:f.A.nineteen,size:16}),Ft.hasAssociatedVideo&&(0,T.jsx)(je.l,{})]}),(0,T.jsxs)(ce.p,{children:[!Tt&&!It&&S&&(0,T.jsx)(R.E,{nonInteractive:O,artists:S,filter:yt,spec:jt}),(Tt||Ut)&&!It&&Lt]})]})]});case he.$.TITLE:return(0,T.jsxs)(ne.q,{children:[Ot||Ut?(0,T.jsx)(C.N,{to:e,className:f.A.rowTitle,"data-testid":"internal-track-link",children:Xt()}):Xt(),Bt&&(0,T.jsxs)(P.P,{children:[Ft.download&&(0,T.jsx)(Se._,{}),Ft.explicit&&(0,T.jsx)(Re.U,{}),Ft.paid&&(0,T.jsx)(Ae.y,{}),Ft.nineteen&&(0,T.jsx)(we.q,{className:f.A.nineteen,size:16}),Ft.hasAssociatedVideo&&(0,T.jsx)(je.l,{separator:""})]})]});case he.$.ARTIST:case he.$.AUTHOR:return(0,T.jsxs)(de.Y,{children:[!Tt&&!It&&S&&(0,T.jsx)(R.E,{nonInteractive:O,artists:S,filter:yt,spec:jt}),(Tt||Ut)&&!It&&Lt]});case he.$.ALBUM_OR_PODCAST:case he.$.ALBUM:return w?(0,T.jsx)(I.g,{nonInteractive:O,uri:w.uri,name:w.name,creatorUri:S?.[0]?.uri,spec:jt,children:(0,T.jsx)(k.M,{searchWords:[yt],textToHighlight:w.name})}):null;case he.$.ADDED_BY:return(0,T.jsx)(T.Fragment,{children:it?(0,T.jsx)(X,{users:K,spec:jt}):(0,T.jsx)(U,{name:$t?.displayName||$t?.username||"",isCompactMode:dt,uri:$t?.uri||"",imageUrl:Vt?.url||"",showAvatar:J,spec:jt})});case he.$.RELEASE_DATE:return(0,T.jsx)(T.Fragment,{children:Tt&&(0,T.jsx)(oe,{releaseDate:ee})});case he.$.EVENT_DATE:return(0,T.jsx)(T.Fragment,{children:Ke&&Ge?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(Y,{eventDate:Ke,ticketingSiteURL:Ge})}):null});case he.$.CONCERT:return(0,T.jsx)(T.Fragment,{children:at&&Qe&&tt?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(L,{concertsCount:Je,concertDate:Qe,concertURI:et,concertVenue:tt,index:z,spec:jt})}):null});case he.$.EVENT_INFO:return(0,T.jsx)(T.Fragment,{children:tt&&et?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(W,{concertsCount:Je,concertVenue:tt,concertURI:et,index:z,spec:jt})}):null});case he.$.CONCERT_VENUE:return(0,T.jsx)(T.Fragment,{children:tt&&et?(0,T.jsx)(fe.pZ,{value:"ticket-link",children:(0,T.jsx)(W,{concertURI:et,concertsCount:Je,concertVenue:tt,index:z,spec:jt})}):null});case he.$.ADDED_AT:return(0,T.jsx)(T.Fragment,{children:Q?(0,T.jsx)(V,{dateAdded:new Date(Q)}):null});case he.$.DURATION:return(0,T.jsxs)(T.Fragment,{children:[Ct?Et&&(0,T.jsx)($.A,{itemUri:e,contextUri:$e,isBanned:Nt,contextName:st}):We&&qe&&(0,T.jsx)(te,{isDisliked:Xe,feedbackPath:We,deleteFeedbackPath:qe,feedbackUri:Ze||e,name:st,contextUri:$e}),!It&&!lt&&(0,T.jsx)(ge.d,{uri:e,spec:jt,type:Fe,isOwnedBySelf:ct}),!i?.hideDuration&&(0,T.jsx)(H.P,{duration:A}),(0,T.jsx)(re.Y,{menu:_t,label:h.Ru.get("more.label.track",a,Lt),spec:jt})]});case he.$.BPM:return mt?(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",children:mt}):null;case he.$.KEY:return xt?(0,T.jsx)(d.E,{variant:"bodySmall",semanticColor:"textSubdued",children:xt}):null;case he.$.ACTIONS:case he.$.ADD:case he.$.ALBUM_OR_SHOW:case he.$.PLAYS:case he.$.VIBE:return null;default:(0,Oe.d)(t)}return null})()},`column-${n}`)}))})})})})}),((e,t)=>e.uri===t.uri&&e.allowedDropTypes.length===t.allowedDropTypes.length&&e.isPlayable===t.isPlayable&&e.isMixedMedia===t.isMixedMedia&&e.consumptionCapExplanation===t.consumptionCapExplanation&&e.isCompactMode===t.isCompactMode))},14409:(e,t,a)=>{a.d(t,{x:()=>l});var i=a(99701),n=a(64281);const s="BO7X8b8_SQhDyCjS0EOv";var r=a(86070);const l=({gatedEntityRelations:e})=>{if(!e)return!1;const t=e?.entitiesWithValueProps?.at(0),a=t?.valueProps.at(0)?.displayText,l=t?.summary?.forUserWithoutAccess;if(!a||!t)return null;const o=(0,r.jsx)(n.E,{text:a,className:s});return l?(0,r.jsx)(i.Zp,{label:l||a,children:o}):o}},54003:(e,t,a)=>{a.d(t,{y:()=>r});var i=a(31417),n=a(64281),s=a(86070);const r=()=>(0,s.jsx)(n.E,{ariaLabel:i.Ru.get("paid"),text:i.Ru.get("paid")})},45807:(e,t,a)=>{a.d(t,{B:()=>i,v:()=>n});const i=(e,t)=>!!e&&e.uri===t.uri,n=(e,t)=>!!e&&e.entitiesWithValueProps.at(0)?.uri===t},89849:(e,t,a)=>{a.d(t,{Y:()=>i.Y});var i=a(77)},29997:(e,t,a)=>{a.d(t,{X:()=>i.X});var i=a(41364)},60384:(e,t,a)=>{a.d(t,{I:()=>c});var i=a(30758),n=a(1599),s=a(72671);var r=a(87182),l=a(29074),o=a(2679);const c=({uri:e,setFeedbackPath:t,removeFeedbackPath:a,contextUri:c})=>{const d=(0,r.z)(),u=(0,l.m)(),{isPlaying:m}=(0,o.te)(e),x=(0,i.useCallback)((()=>{c&&u.resync(c)}),[c,u]);return{setDislikeFeedback:(0,i.useCallback)((async()=>{t&&(await((e,t,a)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",a);return e.build().withMethod("POST").withHost(s.L1).withPath(i).withEndpointIdentifier("//feedback/").send()})(n.n.getInstance(),t,e),x(),m&&d.skipToNext())}),[t,e,x,m,d]),removeDislikeFeedback:(0,i.useCallback)((async()=>{a&&(await((e,t,a)=>{const i=t.replace("","LOCAL_NOT_APPROPRIATE_FOR_CONTEXT").replace("",a);return e.build().withMethod("DELETE").withHost(s.L1).withPath(i).withEndpointIdentifier("//feedback/").send()})(n.n.getInstance(),a,e),x())}),[a,x,e])}}}}]); +//# sourceMappingURL=4553.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4884.css b/dot-config/spicetify/Extracted/Themed/xpui/4884.css new file mode 100755 index 00000000..5215696e --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4884.css @@ -0,0 +1 @@ +.vkMQw77rXE4cp8xsAdzl{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.emw6kR941D2wReukhCAJ{border-radius:4px;height:48px;width:48px;-webkit-margin-after:var(--encore-spacing-tighter);margin-block-end:var(--encore-spacing-tighter)}.khENZvA4G9EjpLQiINss{-webkit-margin-after:28px;margin-block-end:28px}.Fu87PEr0tL6oDjmw_X2H{-webkit-margin-after:var(--encore-spacing-base);margin-block-end:var(--encore-spacing-base)}.P9gpV_sgryfUERYOdfor{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-tighter-2)}.FB2PxTNhkGbwFwYI2ufG{background-color:var(--spice-tab-active);border-radius:var(--encore-corner-radius-base);-webkit-box-shadow:rgba(var(--spice-rgb-shadow),.4);box-shadow:rgba(var(--spice-rgb-shadow),.4);color:var(--spice-text);min-height:545px;position:relative;width:480px}.FB2PxTNhkGbwFwYI2ufG,.eYxzC4s3Nw68RcbK7xzl,.gZYgXNWbFSAAjLzGhOI9{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.gZYgXNWbFSAAjLzGhOI9{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;padding:var(--encore-spacing-looser) var(--encore-spacing-looser-2) var(--encore-spacing-looser-2)}.eYxzC4s3Nw68RcbK7xzl{padding:var(--encore-spacing-looser-2) var(--encore-spacing-looser-2) var(--encore-spacing-base)}.QrelMvam4WOTMVaO28Rl{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1;width:100%}._EaBFRLKy0nZJXkiRwlx{background-color:transparent;border:none;cursor:pointer;padding:var(--encore-spacing-base);position:absolute;top:0}.N77hKGzNc_lKQ5OG1EBN{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-tighter-2);-webkit-margin-before:var(--encore-spacing-tighter);margin-block-start:var(--encore-spacing-tighter)}.JceC3xibcl3MHVULIK0b{border:1px solid rgba(var(--spice-rgb-selected-row),.1);height:0;margin-block:0;width:100%}.Uk72m6OFBBdTZ3RJb0K_{margin-block:20px var(--encore-spacing-base)}.IFqCps3krPbH25azco3F li:not(:last-child){-webkit-margin-after:var(--encore-spacing-tighter);margin-block-end:var(--encore-spacing-tighter)} ._EaBFRLKy0nZJXkiRwlx{inset-inline-end:0} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/4884.js b/dot-config/spicetify/Extracted/Themed/xpui/4884.js new file mode 100755 index 00000000..17a00af4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/4884.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[4884],{64884:(e,a,t)=>{t.d(a,{DsaModal:()=>ee});var s=t(30758),i=t(62411),n=t(95530),d=t(67499),l=t(7315),r=t(56769),o=t(31417),c=t(98293),m=t(33625),u=t(22984),g=t(75497),E=t(82935);const N="vkMQw77rXE4cp8xsAdzl",h="emw6kR941D2wReukhCAJ";var x=t(86070);const f=({advertiser:e,legalEntityName:a})=>{const{item:t}=(0,m.L)()||{item:null},s=t&&(0,g.N)(t)?t?.images:void 0,i=(0,E.h)(s);return(0,x.jsxs)("div",{className:N,children:[i&&(0,x.jsx)(u._,{className:h,src:i,loading:"lazy"}),(0,x.jsx)(n.E,{variant:"bodyMediumBold","aria-label":e,children:e}),a&&(0,x.jsx)(n.E,{variant:"bodySmall",semanticColor:"textSubdued","aria-label":a,children:a})]})};var v=t(14414),T=t(85420),R=t(59159);const y="khENZvA4G9EjpLQiINss",b="Fu87PEr0tL6oDjmw_X2H",j=({title:e,showTitle:a,children:t})=>(0,x.jsxs)("section",{className:y,children:[a&&(0,x.jsx)(n.E,{className:b,variant:"bodyMediumBold",as:"h3","aria-label":e,children:e}),t]});var p=t(98994);const A="P9gpV_sgryfUERYOdfor",_=({text:e,icon:a})=>(0,x.jsxs)(p.K,{className:A,condensed:!0,children:[a,(0,x.jsx)(n.E,{variant:"bodyMedium","aria-label":e,as:"h4",children:e})]});let w=function(e){return e[e.UNKNOWN=0]="UNKNOWN",e[e.AGE=1]="AGE",e[e.GEO=2]="GEO",e[e.GENDER=3]="GENDER",e[e.INTEREST=4]="INTEREST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED",e}({});const G={fromJSON:e=>({targetingTypes:globalThis.Array.isArray(e?.targetingTypes)?e.targetingTypes.map((e=>function(e){switch(e){case 0:case"UNKNOWN":return w.UNKNOWN;case 1:case"AGE":return w.AGE;case 2:case"GEO":return w.GEO;case 3:case"GENDER":return w.GENDER;case 4:case"INTEREST":return w.INTEREST;default:return w.UNRECOGNIZED}}(e))):[],legalEntityName:S(e.legalEntityName)?globalThis.String(e.legalEntityName):"",showTailoredAdsSection:S(e.showTailoredAdsSection)?Boolean(e.showTailoredAdsSection):void 0}),toJSON(e){const a={};return e.targetingTypes?.length&&(a.targetingTypes=e.targetingTypes.map((e=>function(e){switch(e){case w.UNKNOWN:return"UNKNOWN";case w.AGE:return"AGE";case w.GEO:return"GEO";case w.GENDER:return"GENDER";case w.INTEREST:return"INTEREST";case w.UNRECOGNIZED:default:return"UNRECOGNIZED"}}(e)))),""!==e.legalEntityName&&(a.legalEntityName=e.legalEntityName),void 0!==e.showTailoredAdsSection&&(a.showTailoredAdsSection=e.showTailoredAdsSection),a},create:e=>G.fromPartial(e??{}),fromPartial(e){const a={targetingTypes:[],legalEntityName:"",showTailoredAdsSection:void 0};return a.targetingTypes=e.targetingTypes?.map((e=>e))||[],a.legalEntityName=e.legalEntityName??"",a.showTailoredAdsSection=e.showTailoredAdsSection??void 0,a}};function S(e){return null!=e}const O="FB2PxTNhkGbwFwYI2ufG",I="gZYgXNWbFSAAjLzGhOI9",C="eYxzC4s3Nw68RcbK7xzl",k="QrelMvam4WOTMVaO28Rl",B="_EaBFRLKy0nZJXkiRwlx",D="N77hKGzNc_lKQ5OG1EBN",U="JceC3xibcl3MHVULIK0b",M="Uk72m6OFBBdTZ3RJb0K_",K="IFqCps3krPbH25azco3F";const F=({activeTargetingTypes:e})=>{const a=[w.GEO,w.INTEREST].some((a=>e.includes(a)));if(!a)return null;const t=a&&e.some((e=>e===w.AGE||e===w.GENDER));return(0,x.jsx)(j,{title:o.Ru.get("ad-formats.dsa.modal.otherInfo"),showTitle:t,children:(0,x.jsx)(R.b,{className:K,condensedAll:!0,children:e.map((e=>{const a=function(e){switch(e){case w.GEO:return{icon:(0,x.jsx)(v.t,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.location")};case w.INTEREST:return{icon:(0,x.jsx)(T.T,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.interests")};default:return null}}(e);return a?(0,x.jsx)(_,{icon:a.icon,text:a.text},e):null}))})})};var L=t(31591),W=t(87578),Z=t(23046),z=t(65238),J=t(29195),P=t(19862),Y=t(27301),q=t(19329);const Q=({activeTargetingTypes:e,item:a})=>{const t=(0,J.vh)(),{openURLWithSessionTransfer:s}=(0,q.L)();return[w.AGE,w.GENDER].some((a=>e.includes(a)))?(0,x.jsxs)(j,{title:o.Ru.get("ad-formats.dsa.modal.profileInfo"),showTitle:!0,children:[(0,x.jsx)(R.b,{className:K,condensedAll:!0,style:{marginBlockEnd:(0,Z.po)("base")},children:e.map((e=>{const a=function(e){switch(e){case w.AGE:return{icon:(0,x.jsx)(L.w,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.age")};case w.GENDER:return{icon:(0,x.jsx)(W.v,{}),text:o.Ru.get("ad-formats.dsa.modal.targeting.gender")};default:return null}}(e);return a?(0,x.jsx)(_,{icon:a.icon,text:a.text},e):null}))}),(0,x.jsx)(n.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.adRelevancyAction"),children:o.Ru.get("ad-formats.dsa.modal.adRelevancyAction")}),(0,x.jsxs)(z.Y,{component:"button","aria-label":"Edit your Spotify profile, link",className:D,semanticColor:"textBrightAccent",onClick:()=>{s(Y.vE),t.send((0,r.m)({ad_id:a.adId,lineitem_id:a.metadata?.lineitem_id,creative_id:a.metadata?.creative_id,slot:a.slot,event:"event_clicked",reason:"edit_profile",surface:"ad_dsa_view"}))},standalone:!0,children:[(0,x.jsx)(n.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.editProfile")}),(0,x.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]}):null},V=({item:e})=>{const a=(0,J.vh)(),{openURLWithSessionTransfer:t}=(0,q.L)();return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)("hr",{className:U}),(0,x.jsx)(n.E,{className:M,variant:"titleSmall","aria-label":o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds"),as:"h2",children:o.Ru.get("ad-formats.dsa.modal.aboutTailoredAds")}),(0,x.jsx)(n.E,{variant:"bodyMedium",semanticColor:"textSubdued","aria-label":o.Ru.get("ad-formats.dsa.modal.tailoredAds"),children:o.Ru.get("ad-formats.dsa.modal.tailoredAds")}),(0,x.jsxs)(z.Y,{component:"button","aria-label":"Visit your privacy settings, link",className:D,semanticColor:"textBrightAccent",onClick:()=>{t(`${Y.k$}/#tailored-ads`),a.send((0,r.m)({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_clicked",lineitem_id:e.metadata?.lineitem_id,reason:"change_preferences",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))},standalone:!0,children:[(0,x.jsx)(n.E,{variant:"bodyMediumBold",as:"h2",children:o.Ru.get("ad-formats.dsa.modal.privacySetting")}),(0,x.jsx)(P.p,{semanticColor:"textBrightAccent"})]})]})};var X=t(17429);const H=e=>{const[a,t]=(0,s.useState)(null),[i,n]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{e?.metadata?.lineitem_id&&e.adId&&(async e=>{try{n(!0);const a=await X.ZY(e);t(G.fromJSON(a)),n(!1)}catch(e){n(!1)}})({lineitemId:e.metadata.lineitem_id,adId:e.adId})}),[e]),{data:a,loading:i}};var $=t(44971);const ee=({item:e})=>{const a=(0,J.vh)(),t=(0,i.wA)(),{isOpen:m}=(0,i.d4)((e=>e.ui.dsaDialog)),{data:u,loading:g}=H(e);return(0,s.useEffect)((()=>{a.send((0,r.m)({ad_id:e.adId,creative_id:e.metadata?.creative_id,event:"event_viewed",lineitem_id:e.metadata?.lineitem_id,reason:"ad_dsa_view",request_id:e.requestId,slot:e.slot,surface:"ad_dsa_view"}))}),[]),(0,x.jsxs)($.A,{className:O,isOpen:m,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,contentLabel:o.Ru.get("ad-formats.dsa.aboutThisAd"),children:[(0,x.jsx)("div",{className:C,children:(0,x.jsx)(n.E,{"aria-label":o.Ru.get("ad-formats.dsa.aboutThisAd"),variant:"titleMedium",as:"h1",children:o.Ru.get("ad-formats.dsa.aboutThisAd")})}),(0,x.jsx)("hr",{className:U}),(0,x.jsx)("div",{className:I,children:g?(0,x.jsx)("div",{className:k,"data-testid":"loading-indicator",children:(0,x.jsx)(d.U,{size:"large"})}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(f,{advertiser:e.metadata.advertiser,legalEntityName:u?.legalEntityName}),u?.targetingTypes.length?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(n.E,{className:M,variant:"titleSmall",as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation"),children:o.Ru.get("ad-formats.dsa.modal.adBasedInfoExplanation")}),(0,x.jsx)(Q,{item:e,activeTargetingTypes:u?.targetingTypes}),(0,x.jsx)(F,{item:e,activeTargetingTypes:u?.targetingTypes})]}):(0,x.jsx)(n.E,{className:M,as:"h2","aria-label":o.Ru.get("ad-formats.dsa.modal.targeting.unknown"),tabIndex:0,children:o.Ru.get("ad-formats.dsa.modal.targeting.unknown")}),u?.showTailoredAdsSection&&(0,x.jsx)(V,{item:e})]})}),(0,x.jsx)("button",{"aria-label":o.Ru.get("close_button_action"),className:B,onClick:()=>{t((0,c.ft)())},children:(0,x.jsx)(l.M,{size:"medium",semanticColor:"textBase"})})]})}}}]); +//# sourceMappingURL=4884.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/5125.js b/dot-config/spicetify/Extracted/Themed/xpui/5125.js new file mode 100755 index 00000000..2912ff8f --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/5125.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5125],{84172:(t,e,i)=>{i.d(e,{OO:()=>dt,wm:()=>X,yU:()=>ct});var n=i(66144),s=i(26823),o=i(11418);class r{constructor(t,e,i,n){this.state=t,this.pos=e,this.explicit=i,this.view=n,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(t){let e=(0,o.mv)(this.state).resolveInner(this.pos,-1);for(;e&&t.indexOf(e.name)<0;)e=e.parent;return e?{from:e.from,to:this.pos,text:this.state.sliceDoc(e.from,this.pos),type:e.type}:null}matchBefore(t){let e=this.state.doc.lineAt(this.pos),i=Math.max(e.from,this.pos-250),n=e.text.slice(i-e.from,this.pos-e.from),s=n.search(d(t,!1));return s<0?null:{from:i+s,to:this.pos,text:n.slice(s)}}get aborted(){return null==this.abortListeners}addEventListener(t,e,i){"abort"==t&&this.abortListeners&&(this.abortListeners.push(e),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function l(t){let e=Object.keys(t).join(""),i=/\w/.test(e);return i&&(e=e.replace(/\w/g,"")),`[${i?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function a(t){let e=t.map((t=>"string"==typeof t?{label:t}:t)),[i,n]=e.every((t=>/^\w+$/.test(t.label)))?[/\w*$/,/\w+$/]:function(t){let e=Object.create(null),i=Object.create(null);for(let{label:n}of t){e[n[0]]=!0;for(let t=1;t{let s=t.matchBefore(n);return s||t.explicit?{from:s?s.from:t.pos,options:e,validFor:i}:null}}class h{constructor(t,e,i,n){this.completion=t,this.source=e,this.match=i,this.score=n}}function c(t){return t.selection.main.from}function d(t,e){var i;let{source:n}=t,s=e&&"^"!=n[0],o="$"!=n[n.length-1];return s||o?new RegExp(`${s?"^":""}(?:${n})${o?"$":""}`,null!==(i=t.flags)&&void 0!==i?i:t.ignoreCase?"i":""):t}const u=n.YH.define();const f=new WeakMap;function p(t){if(!Array.isArray(t))return t;let e=f.get(t);return e||f.set(t,e=a(t)),e}const m=n.Pe.define(),g=n.Pe.define();class v{constructor(t){this.pattern=t,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let e=0;e=48&&h<=57||h>=97&&h<=122?2:h>=65&&h<=90?1:0:(b=(0,n.MK)(h))!=b.toLowerCase()?1:b!=b.toUpperCase()?2:0;(!s||1==y&&g||0==w&&0!=y)&&(e[d]==h||i[d]==h&&(u=!0)?r[d++]=s:r.length&&(v=!1)),w=y,s+=(0,n.Fh)(h)}return d==a&&0==r[0]&&v?this.result((u?-200:0)-100,r,t):f==a&&0==p?this.ret(-200-t.length+(m==t.length?0:-100),[0,m]):l>-1?this.ret(-700-t.length,[l,l+this.pattern.length]):f==a?this.ret(-900-t.length,[p,m]):d==a?this.result((u?-200:0)-100-700+(v?0:-1100),r,t):2==e.length?null:this.result((s[0]?-700:0)-200-1100,s,t)}result(t,e,i){let s=[],o=0;for(let t of e){let e=t+(this.astral?(0,n.Fh)((0,n.vS)(i,t)):1);o&&s[o-1]==t?s[o-1]=e:(s[o++]=t,s[o++]=e)}return this.ret(t-i.length,s)}}class w{constructor(t){this.pattern=t,this.matched=[],this.score=0,this.folded=t.toLowerCase()}match(t){if(t.length(0,n.QR)(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:x,filterStrict:!1,compareCompletions:(t,e)=>t.label.localeCompare(e.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(t,e)=>t&&e,closeOnBlur:(t,e)=>t&&e,icons:(t,e)=>t&&e,tooltipClass:(t,e)=>i=>y(t(i),e(i)),optionClass:(t,e)=>i=>y(t(i),e(i)),addToOptions:(t,e)=>t.concat(e),filterStrict:(t,e)=>t||e})});function y(t,e){return t?e?t+" "+e:t:e}function x(t,e,i,n,o,r){let l,a,h=t.textDirection==s.OP.RTL,c=h,d=!1,u="top",f=e.left-o.left,p=o.right-e.right,m=n.right-n.left,g=n.bottom-n.top;if(c&&f=g||t>e.top?l=i.bottom-e.top:(u="bottom",l=e.bottom-i.top)}return{style:`${u}: ${l/((e.bottom-e.top)/r.offsetHeight)}px; max-width: ${a/((e.right-e.left)/r.offsetWidth)}px`,class:"cm-completionInfo-"+(d?h?"left-narrow":"right-narrow":c?"left":"right")}}function k(t,e,i){if(t<=i)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let t=Math.floor(e/i);return{from:t*i,to:(t+1)*i}}let n=Math.floor((t-e)/i);return{from:t-(n+1)*i,to:t-n*i}}class S{constructor(t,e,i){this.view=t,this.stateField=e,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:t=>this.placeInfo(t),key:this},this.space=null,this.currentClass="";let n=t.state.field(e),{options:s,selected:o}=n.open,r=t.state.facet(b);this.optionContent=function(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(t){let e=document.createElement("div");return e.classList.add("cm-completionIcon"),t.type&&e.classList.add(...t.type.split(/\s+/g).map((t=>"cm-completionIcon-"+t))),e.setAttribute("aria-hidden","true"),e},position:20}),e.push({render(t,e,i,n){let s=document.createElement("span");s.className="cm-completionLabel";let o=t.displayLabel||t.label,r=0;for(let t=0;tr&&s.appendChild(document.createTextNode(o.slice(r,e)));let l=s.appendChild(document.createElement("span"));l.appendChild(document.createTextNode(o.slice(e,i))),l.className="cm-completionMatchedText",r=i}return rt.position-e.position)).map((t=>t.render))}(r),this.optionClass=r.optionClass,this.tooltipClass=r.tooltipClass,this.range=k(s.length,o,r.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(t.state),this.dom.addEventListener("mousedown",(i=>{let{options:n}=t.state.field(e).open;for(let e,s=i.target;s&&s!=this.dom;s=s.parentNode)if("LI"==s.nodeName&&(e=/-(\d+)$/.exec(s.id))&&+e[1]{let i=t.state.field(this.stateField,!1);i&&i.tooltip&&t.state.facet(b).closeOnBlur&&e.relatedTarget!=t.contentDOM&&t.dispatch({effects:g.of(null)})})),this.showOptions(s,n.id)}mount(){this.updateSel()}showOptions(t,e){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(t,e,this.range)),this.list.addEventListener("scroll",(()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)}))}update(t){var e;let i=t.state.field(this.stateField),n=t.startState.field(this.stateField);if(this.updateTooltipClass(t.state),i!=n){let{options:s,selected:o,disabled:r}=i.open;n.open&&n.open.options==s||(this.range=k(s.length,o,t.state.facet(b).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),r!=(null===(e=n.open)||void 0===e?void 0:e.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!r)}}updateTooltipClass(t){let e=this.tooltipClass(t);if(e!=this.currentClass){for(let t of this.currentClass.split(" "))t&&this.dom.classList.remove(t);for(let t of e.split(" "))t&&this.dom.classList.add(t);this.currentClass=e}}positioned(t){this.space=t,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let t=this.view.state.field(this.stateField),e=t.open;if((e.selected>-1&&e.selected=this.range.to)&&(this.range=k(e.options.length,e.selected,this.view.state.facet(b).maxRenderedOptions),this.showOptions(e.options,t.id)),this.updateSelectedOption(e.selected)){this.destroyInfo();let{completion:i}=e.options[e.selected],{info:n}=i;if(!n)return;let o="string"==typeof n?document.createTextNode(n):n(i);if(!o)return;"then"in o?o.then((e=>{e&&this.view.state.field(this.stateField,!1)==t&&this.addInfoPane(e,i)})).catch((t=>(0,s.c_)(this.view.state,t,"completion info"))):this.addInfoPane(o,i)}}addInfoPane(t,e){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",null!=t.nodeType)i.appendChild(t),this.infoDestroy=null;else{let{dom:e,destroy:n}=t;i.appendChild(e),this.infoDestroy=n||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(t){let e=null;for(let i=this.list.firstChild,n=this.range.from;i;i=i.nextSibling,n++)"LI"==i.nodeName&&i.id?n==t?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),e=i):i.hasAttribute("aria-selected")&&i.removeAttribute("aria-selected"):n--;return e&&function(t,e){let i=t.getBoundingClientRect(),n=e.getBoundingClientRect(),s=i.height/t.offsetHeight;n.topi.bottom&&(t.scrollTop+=(n.bottom-i.bottom)/s)}(this.list,e),e}measureInfo(){let t=this.dom.querySelector("[aria-selected]");if(!t||!this.info)return null;let e=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),n=t.getBoundingClientRect(),s=this.space;if(!s){let t=this.dom.ownerDocument.defaultView||window;s={left:0,top:0,right:t.innerWidth,bottom:t.innerHeight}}return n.top>Math.min(s.bottom,e.bottom)-10||n.bottomi.from||0==i.from))if(s=t,"string"!=typeof a&&a.header)n.appendChild(a.header(a));else{n.appendChild(document.createElement("completion-section")).textContent=t}}const h=n.appendChild(document.createElement("li"));h.id=e+"-"+o,h.setAttribute("role","option");let c=this.optionClass(r);c&&(h.className=c);for(let t of this.optionContent){let e=t(r,this.view.state,this.view,l);e&&h.appendChild(e)}}return i.from&&n.classList.add("cm-completionListIncompleteTop"),i.tonew S(i,t,e)}function C(t){return 100*(t.boost||0)+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}class M{constructor(t,e,i,n,s,o){this.options=t,this.attrs=e,this.tooltip=i,this.timestamp=n,this.selected=s,this.disabled=o}setSelected(t,e){return t==this.selected||t>=this.options.length?this:new M(this.options,E(e,t),this.tooltip,this.timestamp,t,this.disabled)}static build(t,e,i,n,s,o){if(n&&!o&&t.some((t=>t.isPending)))return n.setDisabled();let r=function(t,e){let i=[],n=null,s=t=>{i.push(t);let{section:e}=t.completion;if(e){n||(n=[]);let t="string"==typeof e?e:e.name;n.some((e=>e.name==t))||n.push("string"==typeof e?{name:t}:e)}},o=e.facet(b);for(let n of t)if(n.hasResult()){let t=n.result.getMatch;if(!1===n.result.filter)for(let e of n.result.options)s(new h(e,n.source,t?t(e):[],1e9-i.length));else{let i,r=e.sliceDoc(n.from,n.to),l=o.filterStrict?new w(r):new v(r);for(let e of n.result.options)if(i=l.match(e.label)){let o=e.displayLabel?t?t(e,i.matched):[]:i.matched;s(new h(e,n.source,o,i.score+(e.boost||0)))}}}if(n){let t=Object.create(null),e=0,s=(t,e)=>{var i,n;return(null!==(i=t.rank)&&void 0!==i?i:1e9)-(null!==(n=e.rank)&&void 0!==n?n:1e9)||(t.namee.score-t.score||a(t.completion,e.completion)))){let e=t.completion;!l||l.label!=e.label||l.detail!=e.detail||null!=l.type&&null!=e.type&&l.type!=e.type||l.apply!=e.apply||l.boost!=e.boost?r.push(t):C(t.completion)>C(l)&&(r[r.length-1]=t),l=t.completion}return r}(t,e);if(!r.length)return n&&t.some((t=>t.isPending))?n.setDisabled():null;let l=e.facet(b).selectOnOpen?0:-1;if(n&&n.selected!=l&&-1!=n.selected){let t=n.options[n.selected].completion;for(let e=0;ee.hasResult()?Math.min(t,e.from):t),1e8),create:V,above:s.aboveCursor},n?n.timestamp:Date.now(),l,!1)}map(t){return new M(this.options,this.attrs,Object.assign(Object.assign({},this.tooltip),{pos:t.mapPos(this.tooltip.pos)}),this.timestamp,this.selected,this.disabled)}setDisabled(){return new M(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class O{constructor(t,e,i){this.active=t,this.id=e,this.open=i}static start(){return new O(R,"cm-ac-"+Math.floor(2e6*Math.random()).toString(36),null)}update(t){let{state:e}=t,i=e.facet(b),n=(i.override||e.languageDataAt("autocomplete",c(e)).map(p)).map((e=>(this.active.find((t=>t.source==e))||new B(e,this.active.some((t=>0!=t.state))?1:0)).update(t,i)));n.length==this.active.length&&n.every(((t,e)=>t==this.active[e]))&&(n=this.active);let s=this.open,o=t.effects.some((t=>t.is(I)));s&&t.docChanged&&(s=s.map(t.changes)),t.selection||n.some((e=>e.hasResult()&&t.changes.touchesRange(e.from,e.to)))||!function(t,e){if(t==e)return!0;for(let i=0,n=0;;){for(;it.isPending))&&(s=null),!s&&n.every((t=>!t.isPending))&&n.some((t=>t.hasResult()))&&(n=n.map((t=>t.hasResult()?new B(t.source,0):t)));for(let e of t.effects)e.is(N)&&(s=s&&s.setSelected(e.value,this.id));return n==this.active&&s==this.open?this:new O(n,this.id,s)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?D:T}}const D={"aria-autocomplete":"list"},T={};function E(t,e){let i={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(i["aria-activedescendant"]=t+"-"+e),i}const R=[];function L(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(u);if(i&&e.activateOnCompletion(i))return 12}let i=t.isUserEvent("input.type");return i&&e.activateOnTyping?5:i?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class B{constructor(t,e,i=!1){this.source=t,this.state=e,this.explicit=i}hasResult(){return!1}get isPending(){return 1==this.state}update(t,e){let i=L(t,e),n=this;(8&i||16&i&&this.touches(t))&&(n=new B(n.source,0)),4&i&&0==n.state&&(n=new B(this.source,1)),n=n.updateFor(t,i);for(let e of t.effects)if(e.is(m))n=new B(n.source,1,e.value);else if(e.is(g))n=new B(n.source,0);else if(e.is(I))for(let t of e.value)t.source==n.source&&(n=t);return n}updateFor(t,e){return this.map(t.changes)}map(t){return this}touches(t){return t.changes.touchesRange(c(t.state))}}class P extends B{constructor(t,e,i,n,s,o){super(t,3,e),this.limit=i,this.result=n,this.from=s,this.to=o}hasResult(){return!0}updateFor(t,e){var i;if(!(3&e))return this.map(t.changes);let n=this.result;n.map&&!t.changes.empty&&(n=n.map(n,t.changes));let s=t.changes.mapPos(this.from),o=t.changes.mapPos(this.to,1),l=c(t.state);if(l>o||!n||2&e&&(c(t.startState)==this.from||lt.map((t=>t.map(e)))}),N=n.Pe.define(),F=n.sU.define({create:()=>O.start(),update:(t,e)=>t.update(e),provide:t=>[s.DK.from(t,(t=>t.tooltip)),s.Lz.contentAttributes.from(t,(t=>t.attrs))]});function H(t,e){const i=e.completion.apply||e.completion.label;let s=t.state.field(F).active.find((t=>t.source==e.source));return s instanceof P&&("string"==typeof i?t.dispatch(Object.assign(Object.assign({},function(t,e,i,s){let{main:o}=t.selection,r=i-o.from,l=s-o.from;return Object.assign(Object.assign({},t.changeByRange((a=>{if(a!=o&&i!=s&&t.sliceDoc(a.from+r,a.from+l)!=t.sliceDoc(i,s))return{range:a};let h=t.toText(e);return{changes:{from:a.from+r,to:s==o.from?a.to:a.from+l,insert:h},range:n.OF.cursor(a.from+r+h.length)}}))),{scrollIntoView:!0,userEvent:"input.complete"})}(t.state,i,s.from,s.to)),{annotations:u.of(e.completion)})):i(t,e.completion,s.from,s.to),!0)}const V=A(F,H);function z(t,e="option"){return i=>{let n=i.state.field(F,!1);if(!n||!n.open||n.open.disabled||Date.now()-n.open.timestamp-1?n.open.selected+r*(t?1:-1):t?0:l-1;return a<0?a="page"==e?0:l-1:a>=l&&(a="page"==e?l-1:0),i.dispatch({effects:N.of(a)}),!0}}const W=t=>!!t.state.field(F,!1)&&(t.dispatch({effects:m.of(!0)}),!0);class q{constructor(t,e){this.active=t,this.context=e,this.time=Date.now(),this.updates=[],this.done=void 0}}const j=s.Z9.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(F).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(F),i=t.state.facet(b);if(!t.selectionSet&&!t.docChanged&&t.startState.field(F)==e)return;let n=t.transactions.some((t=>{let e=L(t,i);return 8&e||(t.selection||t.docChanged)&&!(3&e)}));for(let e=0;e50&&Date.now()-i.time>1e3){for(let t of i.context.abortListeners)try{t()}catch(t){(0,s.c_)(this.view.state,t)}i.context.abortListeners=null,this.running.splice(e--,1)}else i.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some((t=>t.effects.some((t=>t.is(m)))))&&(this.pendingStart=!0);let o=this.pendingStart?50:i.activateOnTypingDelay;if(this.debounceUpdate=e.active.some((t=>t.isPending&&!this.running.some((e=>e.active.source==t.source))))?setTimeout((()=>this.startUpdate()),o):-1,0!=this.composing)for(let e of t.transactions)e.isUserEvent("input.type")?this.composing=2:2==this.composing&&e.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(F);for(let t of e.active)t.isPending&&!this.running.some((e=>e.active.source==t.source))&&this.startQuery(t);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}startQuery(t){let{state:e}=this.view,i=c(e),n=new r(e,i,t.explicit,this.view),o=new q(t,n);this.running.push(o),Promise.resolve(t.source(n)).then((t=>{o.context.aborted||(o.done=t||null,this.scheduleAccept())}),(t=>{this.view.dispatch({effects:g.of(null)}),(0,s.c_)(this.view.state,t)}))}scheduleAccept(){this.running.every((t=>void 0!==t.done))?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout((()=>this.accept()),this.view.state.facet(b).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],i=this.view.state.facet(b),n=this.view.state.field(F);for(let s=0;st.source==o.active.source));if(r&&r.isPending)if(null==o.done){let t=new B(o.active.source,0);for(let e of o.updates)t=t.update(e,i);t.isPending||e.push(t)}else this.startQuery(r)}(e.length||n.open&&n.open.disabled)&&this.view.dispatch({effects:I.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(F,!1);if(e&&e.tooltip&&this.view.state.facet(b).closeOnBlur){let i=e.open&&(0,s.Eg)(this.view,e.open.tooltip);i&&i.dom.contains(t.relatedTarget)||setTimeout((()=>this.view.dispatch({effects:g.of(null)})),10)}},compositionstart(){this.composing=1},compositionend(){3==this.composing&&setTimeout((()=>this.view.dispatch({effects:m.of(!1)})),20),this.composing=0}}}),_="object"==typeof navigator&&/Win/.test(navigator.platform),K=n.Nb.highest(s.Lz.domEventHandlers({keydown(t,e){let i=e.state.field(F,!1);if(!i||!i.open||i.open.disabled||i.open.selected<0||t.key.length>1||t.ctrlKey&&(!_||!t.altKey)||t.metaKey)return!1;let n=i.open.options[i.open.selected],s=i.active.find((t=>t.source==n.source)),o=n.completion.commitCharacters||s.result.commitCharacters;return o&&o.indexOf(t.key)>-1&&H(e,n),!1}})),$=s.Lz.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"var(--spice-text)"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"var(--spice-text)"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});const U={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Y=n.Pe.define({map(t,e){let i=e.mapPos(t,-1,n.iR.TrackAfter);return null==i?void 0:i}}),G=new class extends n.FB{};G.startSide=1,G.endSide=-1;const J=n.sU.define({create:()=>n.om.empty,update(t,e){if(t=t.map(e.changes),e.selection){let i=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:t=>t>=i.from&&t<=i.to})}for(let i of e.effects)i.is(Y)&&(t=t.update({add:[G.range(i.value,i.value+1)]}));return t}});function X(){return[it,J]}const Z="()[]{}<>";function Q(t){for(let e=0;e{if((et?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let o=t.state.selection.main;if(s.length>2||2==s.length&&1==(0,n.Fh)((0,n.vS)(s,0))||e!=o.from||i!=o.to)return!1;let r=function(t,e){let i=tt(t,t.selection.main.head),s=i.brackets||U.brackets;for(let o of s){let r=Q((0,n.vS)(o,0));if(e==o)return r==o?lt(t,o,s.indexOf(o+o+o)>-1,i):ot(t,o,r,i.before||U.before);if(e==r&&nt(t,t.selection.main.from))return rt(t,o,r)}return null}(t.state,s);return!!r&&(t.dispatch(r),!0)}));function nt(t,e){let i=!1;return t.field(J).between(0,t.doc.length,(t=>{t==e&&(i=!0)})),i}function st(t,e){let i=t.sliceString(e,e+2);return i.slice(0,(0,n.Fh)((0,n.vS)(i,0)))}function ot(t,e,i,s){let o=null,r=t.changeByRange((r=>{if(!r.empty)return{changes:[{insert:e,from:r.from},{insert:i,from:r.to}],effects:Y.of(r.to+e.length),range:n.OF.range(r.anchor+e.length,r.head+e.length)};let l=st(t.doc,r.head);return!l||/\s/.test(l)||s.indexOf(l)>-1?{changes:{insert:e+i,from:r.head},effects:Y.of(r.head+e.length),range:n.OF.cursor(r.head+e.length)}:{range:o=r}}));return o?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function rt(t,e,i){let s=null,o=t.changeByRange((e=>e.empty&&st(t.doc,e.head)==i?{changes:{from:e.head,to:e.head+i.length,insert:i},range:n.OF.cursor(e.head+i.length)}:s={range:e}));return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function lt(t,e,i,s){let r=s.stringPrefixes||U.stringPrefixes,l=null,a=t.changeByRange((s=>{if(!s.empty)return{changes:[{insert:e,from:s.from},{insert:e,from:s.to}],effects:Y.of(s.to+e.length),range:n.OF.range(s.anchor+e.length,s.head+e.length)};let a,h=s.head,c=st(t.doc,h);if(c==e){if(at(t,h))return{changes:{insert:e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)};if(nt(t,h)){let s=i&&t.sliceDoc(h,h+3*e.length)==e+e+e?e+e+e:e;return{changes:{from:h,to:h+s.length,insert:s},range:n.OF.cursor(h+s.length)}}}else{if(i&&t.sliceDoc(h-2*e.length,h)==e+e&&(a=ht(t,h-2*e.length,r))>-1&&at(t,a))return{changes:{insert:e+e+e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)};if(t.charCategorizer(h)(c)!=n.Je.Word&&ht(t,h,r)>-1&&!function(t,e,i,n){let s=(0,o.mv)(t).resolveInner(e,-1),r=n.reduce(((t,e)=>Math.max(t,e.length)),0);for(let o=0;o<5;o++){let o=t.sliceDoc(s.from,Math.min(s.to,s.from+i.length+r)),l=o.indexOf(i);if(!l||l>-1&&n.indexOf(o.slice(0,l))>-1){let e=s.firstChild;for(;e&&e.from==s.from&&e.to-e.from>i.length+l;){if(t.sliceDoc(e.to-i.length,e.to)==i)return!1;e=e.firstChild}return!0}let a=s.to==e&&s.parent;if(!a)break;s=a}return!1}(t,h,e,r))return{changes:{insert:e+e,from:h},effects:Y.of(h+e.length),range:n.OF.cursor(h+e.length)}}return{range:l=s}}));return l?null:t.update(a,{scrollIntoView:!0,userEvent:"input.type"})}function at(t,e){let i=(0,o.mv)(t).resolveInner(e+1);return i.parent&&i.from==e}function ht(t,e,i){let s=t.charCategorizer(e);if(s(t.sliceDoc(e-1,e))!=n.Je.Word)return e;for(let o of i){let i=e-o.length;if(t.sliceDoc(i,e)==o&&s(t.sliceDoc(i-1,i))!=n.Je.Word)return i}return-1}function ct(t={}){return[K,F,b.of(t),j,ut,$]}const dt=[{key:"Ctrl-Space",run:W},{mac:"Alt-`",run:W},{key:"Escape",run:t=>{let e=t.state.field(F,!1);return!(!e||!e.active.some((t=>0!=t.state)))&&(t.dispatch({effects:g.of(null)}),!0)}},{key:"ArrowDown",run:z(!0)},{key:"ArrowUp",run:z(!1)},{key:"PageDown",run:z(!0,"page")},{key:"PageUp",run:z(!1,"page")},{key:"Enter",run:t=>{let e=t.state.field(F,!1);return!(t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestampt.facet(b).defaultKeymap?[dt]:[])))},49281:(t,e,i)=>{i.d(e,{Yc:()=>It,b6:()=>y,cL:()=>F,pw:()=>Pt});var n=i(66144),s=i(26823),o=i(11418),r=i(55817);function l(t,e){return({state:i,dispatch:n})=>{if(i.readOnly)return!1;let s=t(e,i);return!!s&&(n(i.update(s)),!0)}}const a=l(p,0),h=l(f,0),c=l(((t,e)=>f(t,e,function(t){let e=[];for(let i of t.selection.ranges){let n=t.doc.lineAt(i.from),s=i.to<=n.to?n:t.doc.lineAt(i.to);s.from>n.from&&s.from==i.to&&(s=i.to==n.to+1?n:t.doc.lineAt(i.to-1));let o=e.length-1;o>=0&&e[o].to>n.from?e[o].to=s.to:e.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:s.to})}return e}(e))),0);function d(t,e){let i=t.languageDataAt("commentTokens",e);return i.length?i[0]:{}}const u=50;function f(t,e,i=e.selection.ranges){let n=i.map((t=>d(e,t.from).block));if(!n.every((t=>t)))return null;let s=i.map(((t,i)=>function(t,{open:e,close:i},n,s){let o,r,l=t.sliceDoc(n-u,n),a=t.sliceDoc(s,s+u),h=/\s*$/.exec(l)[0].length,c=/^\s*/.exec(a)[0].length,d=l.length-h;if(l.slice(d-e.length,d)==e&&a.slice(c,c+i.length)==i)return{open:{pos:n-h,margin:h&&1},close:{pos:s+c,margin:c&&1}};s-n<=2*u?o=r=t.sliceDoc(n,s):(o=t.sliceDoc(n,n+u),r=t.sliceDoc(s-u,s));let f=/^\s*/.exec(o)[0].length,p=/\s*$/.exec(r)[0].length,m=r.length-p-i.length;return o.slice(f,f+e.length)==e&&r.slice(m,m+i.length)==i?{open:{pos:n+f+e.length,margin:/\s/.test(o.charAt(f+e.length))?1:0},close:{pos:s-p-i.length,margin:/\s/.test(r.charAt(m-1))?1:0}}:null}(e,n[i],t.from,t.to)));if(2!=t&&!s.every((t=>t)))return{changes:e.changes(i.map(((t,e)=>s[e]?[]:[{from:t.from,insert:n[e].open+" "},{from:t.to,insert:" "+n[e].close}])))};if(1!=t&&s.some((t=>t))){let t=[];for(let e,i=0;is&&(t==o||o>a.from)){s=a.from;let t=/^\s*/.exec(a.text)[0].length,e=t==a.length,i=a.text.slice(t,t+l.length)==l?t:-1;tt.comment<0&&(!t.empty||t.single)))){let t=[];for(let{line:e,token:i,indent:s,empty:o,single:r}of n)!r&&o||t.push({from:e.from+s,insert:i+" "});let i=e.changes(t);return{changes:i,selection:e.selection.map(i,1)}}if(1!=t&&n.some((t=>t.comment>=0))){let t=[];for(let{line:e,comment:i,token:s}of n)if(i>=0){let n=e.from+i,o=n+s.length;" "==e.text[o-e.from]&&o++,t.push({from:n,to:o})}return{changes:t}}return null}const m=n.YH.define(),g=n.YH.define(),v=n.sj.define(),w=n.sj.define({combine:t=>(0,n.QR)(t,{minDepth:100,newGroupDelay:500,joinToEvent:(t,e)=>e},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,e)=>(i,n)=>t(i,n)||e(i,n)})}),b=n.sU.define({create:()=>N.empty,update(t,e){let i=e.state.facet(w),s=e.annotation(m);if(s){let n=M.fromTransaction(e,s.selection),o=s.side,r=0==o?t.undone:t.done;return r=n?O(r,r.length,i.minDepth,n):R(r,e.startState.selection),new N(0==o?s.rest:r,0==o?r:s.rest)}let o=e.annotation(g);if("full"!=o&&"before"!=o||(t=t.isolate()),!1===e.annotation(n.ZX.addToHistory))return e.changes.empty?t:t.addMapping(e.changes.desc);let r=M.fromTransaction(e),l=e.annotation(n.ZX.time),a=e.annotation(n.ZX.userEvent);return r?t=t.addChanges(r,l,a,i,e):e.selection&&(t=t.addSelection(e.startState.selection,l,a,i.newGroupDelay)),"full"!=o&&"after"!=o||(t=t.isolate()),t},toJSON:t=>({done:t.done.map((t=>t.toJSON())),undone:t.undone.map((t=>t.toJSON()))}),fromJSON:t=>new N(t.done.map(M.fromJSON),t.undone.map(M.fromJSON))});function y(t={}){return[b,w.of(t),s.Lz.domEventHandlers({beforeinput(t,e){let i="historyUndo"==t.inputType?k:"historyRedo"==t.inputType?S:null;return!!i&&(t.preventDefault(),i(e))}})]}function x(t,e){return function({state:i,dispatch:n}){if(!e&&i.readOnly)return!1;let s=i.field(b,!1);if(!s)return!1;let o=s.pop(t,i,e);return!!o&&(n(o),!0)}}const k=x(0,!1),S=x(1,!1),A=x(0,!0),C=x(1,!0);class M{constructor(t,e,i,n,s){this.changes=t,this.effects=e,this.mapped=i,this.startSelection=n,this.selectionsAfter=s}setSelAfter(t){return new M(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,e,i;return{changes:null===(t=this.changes)||void 0===t?void 0:t.toJSON(),mapped:null===(e=this.mapped)||void 0===e?void 0:e.toJSON(),startSelection:null===(i=this.startSelection)||void 0===i?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map((t=>t.toJSON()))}}static fromJSON(t){return new M(t.changes&&n.VR.fromJSON(t.changes),[],t.mapped&&n.Gu.fromJSON(t.mapped),t.startSelection&&n.OF.fromJSON(t.startSelection),t.selectionsAfter.map(n.OF.fromJSON))}static fromTransaction(t,e){let i=T;for(let e of t.startState.facet(v)){let n=e(t);n.length&&(i=i.concat(n))}return!i.length&&t.changes.empty?null:new M(t.changes.invert(t.startState.doc),i,void 0,e||t.startState.selection,T)}static selection(t){return new M(void 0,T,void 0,void 0,t)}}function O(t,e,i,n){let s=e+1>i+20?e-i-1:0,o=t.slice(s,e);return o.push(n),o}function D(t,e){return t.length?e.length?t.concat(e):t:e}const T=[],E=200;function R(t,e){if(t.length){let i=t[t.length-1],n=i.selectionsAfter.slice(Math.max(0,i.selectionsAfter.length-E));return n.length&&n[n.length-1].eq(e)?t:(n.push(e),O(t,t.length-1,1e9,i.setSelAfter(n)))}return[M.selection([e])]}function L(t){let e=t[t.length-1],i=t.slice();return i[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),i}function B(t,e){if(!t.length)return t;let i=t.length,n=T;for(;i;){let s=P(t[i-1],e,n);if(s.changes&&!s.changes.empty||s.effects.length){let e=t.slice(0,i);return e[i-1]=s,e}e=s.mapped,i--,n=s.selectionsAfter}return n.length?[M.selection(n)]:T}function P(t,e,i){let s=D(t.selectionsAfter.length?t.selectionsAfter.map((t=>t.map(e))):T,i);if(!t.changes)return M.selection(s);let o=t.changes.map(e),r=e.mapDesc(t.changes,!0),l=t.mapped?t.mapped.composeDesc(r):r;return new M(o,n.Pe.mapEffects(t.effects,e),l,t.startSelection.map(r),s)}const I=/^(input\.type|delete)($|\.)/;class N{constructor(t,e,i=0,n=void 0){this.done=t,this.undone=e,this.prevTime=i,this.prevUserEvent=n}isolate(){return this.prevTime?new N(this.done,this.undone):this}addChanges(t,e,i,s,o){let r=this.done,l=r[r.length-1];return r=l&&l.changes&&!l.changes.empty&&t.changes&&(!i||I.test(i))&&(!l.selectionsAfter.length&&e-this.prevTimei.push(t,e))),e.iterChangedRanges(((t,e,s,o)=>{for(let t=0;t=e&&s<=r&&(n=!0)}})),n}(l.changes,t.changes))||"input.type.compose"==i)?O(r,r.length-1,s.minDepth,new M(t.changes.compose(l.changes),D(n.Pe.mapEffects(t.effects,l.changes),l.effects),l.mapped,l.startSelection,T)):O(r,r.length,s.minDepth,t),new N(r,T,e,i)}addSelection(t,e,i,n){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:T;return s.length>0&&e-this.prevTimet.empty!=r.ranges[e].empty)).length)?this:new N(R(this.done,t),this.undone,e,i);var o,r}addMapping(t){return new N(B(this.done,t),B(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,e,i){let n=0==t?this.done:this.undone;if(0==n.length)return null;let s=n[n.length-1],o=s.selectionsAfter[0]||e.selection;if(i&&s.selectionsAfter.length)return e.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:m.of({side:t,rest:L(n),selection:o}),userEvent:0==t?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let i=1==n.length?T:n.slice(0,n.length-1);return s.mapped&&(i=B(i,s.mapped)),e.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:m.of({side:t,rest:i,selection:o}),filter:!1,userEvent:0==t?"undo":"redo",scrollIntoView:!0})}return null}}N.empty=new N(T,T);const F=[{key:"Mod-z",run:k,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:S,preventDefault:!0},{linux:"Ctrl-Shift-z",run:S,preventDefault:!0},{key:"Mod-u",run:A,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:C,preventDefault:!0}];function H(t,e){return n.OF.create(t.ranges.map(e),t.mainIndex)}function V(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function z({state:t,dispatch:e},i){let n=H(t.selection,i);return!n.eq(t.selection,!0)&&(e(V(t,n)),!0)}function W(t,e){return n.OF.cursor(e?t.to:t.from)}function q(t,e){return z(t,(i=>i.empty?t.moveByChar(i,e):W(i,e)))}function j(t){return t.textDirectionAt(t.state.selection.main.head)==s.OP.LTR}const _=t=>q(t,!j(t)),K=t=>q(t,j(t));function $(t,e){return z(t,(i=>i.empty?t.moveByGroup(i,e):W(i,e)))}"undefined"!=typeof Intl&&Intl.Segmenter;function U(t,e,i){if(e.type.prop(i))return!0;let n=e.to-e.from;return n&&(n>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function Y(t,e,i){let s,l,a=(0,o.mv)(t).resolveInner(e.head),h=i?r.uY.closedBy:r.uY.openedBy;for(let n=e.head;;){let e=i?a.childAfter(n):a.childBefore(n);if(!e)break;U(t,e,h)?a=e:n=i?e.to:e.from}return l=a.type.prop(h)&&(s=i?(0,o.jU)(t,a.from,1):(0,o.jU)(t,a.to,-1))&&s.matched?i?s.end.to:s.end.from:i?a.to:a.from,n.OF.cursor(l,i?-1:1)}function G(t,e){return z(t,(i=>{if(!i.empty)return W(i,e);let n=t.moveVertically(i,e);return n.head!=i.head?n:t.moveToLineBoundary(i,e)}))}const J=t=>G(t,!1),X=t=>G(t,!0);function Z(t){let e,i=t.scrollDOM.clientHeighti.empty?t.moveVertically(i,e,n.height):W(i,e)));if(r.eq(o.selection))return!1;if(n.selfScroll){let e=t.coordsAtPos(o.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),a=l.top+n.marginTop,h=l.bottom-n.marginBottom;e&&e.top>a&&e.bottomQ(t,!1),et=t=>Q(t,!0);function it(t,e,i){let s=t.lineBlockAt(e.head),o=t.moveToLineBoundary(e,i);if(o.head==e.head&&o.head!=(i?s.to:s.from)&&(o=t.moveToLineBoundary(e,i,!1)),!i&&o.head==s.from&&s.length){let i=/^\s*/.exec(t.state.sliceDoc(s.from,Math.min(s.from+100,s.to)))[0].length;i&&e.head!=s.from+i&&(o=n.OF.cursor(s.from+i))}return o}function nt(t,e,i){let s=!1,r=H(t.selection,(e=>{let r=(0,o.jU)(t,e.head,-1)||(0,o.jU)(t,e.head,1)||e.head>0&&(0,o.jU)(t,e.head-1,1)||e.head{let i=e(t);return n.OF.range(t.anchor,i.head,i.goalColumn,i.bidiLevel||void 0)}));return!i.eq(t.state.selection)&&(t.dispatch(V(t.state,i)),!0)}function ot(t,e){return st(t,(i=>t.moveByChar(i,e)))}const rt=t=>ot(t,!j(t)),lt=t=>ot(t,j(t));function at(t,e){return st(t,(i=>t.moveByGroup(i,e)))}function ht(t,e){return st(t,(i=>t.moveVertically(i,e)))}const ct=t=>ht(t,!1),dt=t=>ht(t,!0);function ut(t,e){return st(t,(i=>t.moveVertically(i,e,Z(t).height)))}const ft=t=>ut(t,!1),pt=t=>ut(t,!0),mt=({state:t,dispatch:e})=>(e(V(t,{anchor:0})),!0),gt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.doc.length})),!0),vt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.selection.main.anchor,head:0})),!0),wt=({state:t,dispatch:e})=>(e(V(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0);function bt(t,e){if(t.state.readOnly)return!1;let i="delete.selection",{state:o}=t,r=o.changeByRange((s=>{let{from:o,to:r}=s;if(o==r){let n=e(s);no&&(i="delete.forward",n=yt(t,n,!0)),o=Math.min(o,n),r=Math.max(r,n)}else o=yt(t,o,!1),r=yt(t,r,!0);return o==r?{range:s}:{changes:{from:o,to:r},range:n.OF.cursor(o,oe(t))))n.between(e,e,((t,n)=>{te&&(e=i?n:t)}));return e}const xt=(t,e,i)=>bt(t,(s=>{let r,l,a=s.from,{state:h}=t,c=h.doc.lineAt(a);if(i&&!e&&a>c.from&&axt(t,!1,!0),St=t=>xt(t,!0,!1),At=(t,e)=>bt(t,(i=>{let s=i.head,{state:o}=t,r=o.doc.lineAt(s),l=o.charCategorizer(s);for(let t=null;;){if(s==(e?r.to:r.from)){s==i.head&&r.number!=(e?o.doc.lines:1)&&(s+=e?1:-1);break}let a=(0,n.zK)(r.text,s-r.from,e)+r.from,h=r.text.slice(Math.min(s,a)-r.from,Math.max(s,a)-r.from),c=l(h);if(null!=t&&c!=t)break;" "==h&&s==i.head||(t=c),s=a}return s})),Ct=t=>At(t,!1);function Mt(t){let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.from),o=t.doc.lineAt(n.to);if(n.empty||n.to!=o.from||(o=t.doc.lineAt(n.to-1)),i>=s.number){let t=e[e.length-1];t.to=o.to,t.ranges.push(n)}else e.push({from:s.from,to:o.to,ranges:[n]});i=o.number+1}return e}function Ot(t,e,i){if(t.readOnly)return!1;let s=[],o=[];for(let e of Mt(t)){if(i?e.to==t.doc.length:0==e.from)continue;let r=t.doc.lineAt(i?e.to+1:e.from-1),l=r.length+1;if(i){s.push({from:e.to,to:r.to},{from:e.from,insert:r.text+t.lineBreak});for(let i of e.ranges)o.push(n.OF.range(Math.min(t.doc.length,i.anchor+l),Math.min(t.doc.length,i.head+l)))}else{s.push({from:r.from,to:e.from},{from:e.to,insert:t.lineBreak+r.text});for(let t of e.ranges)o.push(n.OF.range(t.anchor-l,t.head-l))}}return!!s.length&&(e(t.update({changes:s,scrollIntoView:!0,selection:n.OF.create(o,t.selection.mainIndex),userEvent:"move.line"})),!0)}function Dt(t,e,i){if(t.readOnly)return!1;let n=[];for(let e of Mt(t))i?n.push({from:e.from,insert:t.doc.slice(e.from,e.to)+t.lineBreak}):n.push({from:e.to,insert:t.lineBreak+t.doc.slice(e.from,e.to)});return e(t.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const Tt=Et(!1);function Et(t){return({state:e,dispatch:i})=>{if(e.readOnly)return!1;let s=e.changeByRange((i=>{let{from:s,to:l}=i,a=e.doc.lineAt(s),h=!t&&s==l&&function(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let i,n=(0,o.mv)(t).resolveInner(e),s=n.childBefore(e),l=n.childAfter(e);return s&&l&&s.to<=e&&l.from>=e&&(i=s.type.prop(r.uY.closedBy))&&i.indexOf(l.name)>-1&&t.doc.lineAt(s.to).from==t.doc.lineAt(l.from).from&&!/\S/.test(t.sliceDoc(s.to,l.from))?{from:s.to,to:l.from}:null}(e,s);t&&(s=l=(l<=a.to?a:e.doc.lineAt(l)).to);let c=new o.KB(e,{simulateBreak:s,simulateDoubleBreak:!!h}),d=(0,o._v)(c,s);for(null==d&&(d=(0,n.y$)(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));la.from&&s{let o=[];for(let n=s.from;n<=s.to;){let r=t.doc.lineAt(n);r.number>i&&(s.empty||s.to>r.from)&&(e(r,o,s),i=r.number),n=r.to+1}let r=t.changes(o);return{changes:o,range:n.OF.range(r.mapPos(s.anchor,1),r.mapPos(s.head,1))}}))}const Lt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Rt(t,((e,i)=>{i.push({from:e.from,insert:t.facet(o.Xt)})})),{userEvent:"input.indent"})),!0),Bt=({state:t,dispatch:e})=>!t.readOnly&&(e(t.update(Rt(t,((e,i)=>{let s=/^\s*/.exec(e.text)[0];if(!s)return;let r=(0,n.y$)(s,t.tabSize),l=0,a=(0,o.EI)(t,Math.max(0,r-(0,o.tp)(t)));for(;lz(t,(e=>Y(t.state,e,!j(t)))),shift:t=>st(t,(e=>Y(t.state,e,!j(t))))},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:t=>z(t,(e=>Y(t.state,e,j(t)))),shift:t=>st(t,(e=>Y(t.state,e,j(t))))},{key:"Alt-ArrowUp",run:({state:t,dispatch:e})=>Ot(t,e,!1)},{key:"Shift-Alt-ArrowUp",run:({state:t,dispatch:e})=>Dt(t,e,!1)},{key:"Alt-ArrowDown",run:({state:t,dispatch:e})=>Ot(t,e,!0)},{key:"Shift-Alt-ArrowDown",run:({state:t,dispatch:e})=>Dt(t,e,!0)},{key:"Escape",run:({state:t,dispatch:e})=>{let i=t.selection,s=null;return i.ranges.length>1?s=n.OF.create([i.main]):i.main.empty||(s=n.OF.create([n.OF.cursor(i.main.head)])),!!s&&(e(V(t,s)),!0)}},{key:"Mod-Enter",run:Et(!0)},{key:"Alt-l",mac:"Ctrl-l",run:({state:t,dispatch:e})=>{let i=Mt(t).map((({from:e,to:i})=>n.OF.range(e,Math.min(i+1,t.doc.length))));return e(t.update({selection:n.OF.create(i),userEvent:"select"})),!0}},{key:"Mod-i",run:({state:t,dispatch:e})=>{let i=H(t.selection,(e=>{let i=(0,o.mv)(t),s=i.resolveStack(e.from,1);if(e.empty){let t=i.resolveStack(e.from,-1);t.node.from>=s.node.from&&t.node.to<=s.node.to&&(s=t)}for(let t=s;t;t=t.next){let{node:i}=t;if((i.from=e.to||i.to>e.to&&i.from<=e.from)&&t.next)return n.OF.range(i.to,i.from)}return e}));return!i.eq(t.selection)&&(e(V(t,i)),!0)},preventDefault:!0},{key:"Mod-[",run:Bt},{key:"Mod-]",run:Lt},{key:"Mod-Alt-\\",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Object.create(null),n=new o.KB(t,{overrideIndentation:t=>{let e=i[t];return null==e?-1:e}}),s=Rt(t,((e,s,r)=>{let l=(0,o._v)(n,e.from);if(null==l)return;/\S/.test(e.text)||(l=0);let a=/^\s*/.exec(e.text)[0],h=(0,o.EI)(t,l);(a!=h||r.from{if(t.state.readOnly)return!1;let{state:e}=t,i=e.changes(Mt(e).map((({from:t,to:i})=>(t>0?t--:i{let i;if(t.lineWrapping){let n=t.lineBlockAt(e.head),s=t.coordsAtPos(e.head,e.assoc||1);s&&(i=n.bottom+t.documentTop-s.bottom+t.defaultLineHeight/2)}return t.moveVertically(e,!0,i)})).map(i);return t.dispatch({changes:i,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0}},{key:"Shift-Mod-\\",run:({state:t,dispatch:e})=>nt(t,e,!1)},{key:"Mod-/",run:t=>{let{state:e}=t,i=e.doc.lineAt(e.selection.main.from),n=d(t.state,i.from);return n.line?a(t):!!n.block&&c(t)}},{key:"Alt-A",run:h},{key:"Ctrl-m",mac:"Shift-Alt-m",run:t=>(t.setTabFocusMode(),!0)}].concat([{key:"ArrowLeft",run:_,shift:rt,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:t=>$(t,!j(t)),shift:t=>at(t,!j(t)),preventDefault:!0},{mac:"Cmd-ArrowLeft",run:t=>z(t,(e=>it(t,e,!j(t)))),shift:t=>st(t,(e=>it(t,e,!j(t)))),preventDefault:!0},{key:"ArrowRight",run:K,shift:lt,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:t=>$(t,j(t)),shift:t=>at(t,j(t)),preventDefault:!0},{mac:"Cmd-ArrowRight",run:t=>z(t,(e=>it(t,e,j(t)))),shift:t=>st(t,(e=>it(t,e,j(t)))),preventDefault:!0},{key:"ArrowUp",run:J,shift:ct,preventDefault:!0},{mac:"Cmd-ArrowUp",run:mt,shift:vt},{mac:"Ctrl-ArrowUp",run:tt,shift:ft},{key:"ArrowDown",run:X,shift:dt,preventDefault:!0},{mac:"Cmd-ArrowDown",run:gt,shift:wt},{mac:"Ctrl-ArrowDown",run:et,shift:pt},{key:"PageUp",run:tt,shift:ft},{key:"PageDown",run:et,shift:pt},{key:"Home",run:t=>z(t,(e=>it(t,e,!1))),shift:t=>st(t,(e=>it(t,e,!1))),preventDefault:!0},{key:"Mod-Home",run:mt,shift:vt},{key:"End",run:t=>z(t,(e=>it(t,e,!0))),shift:t=>st(t,(e=>it(t,e,!0))),preventDefault:!0},{key:"Mod-End",run:gt,shift:wt},{key:"Enter",run:Tt,shift:Tt},{key:"Mod-a",run:({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0)},{key:"Backspace",run:kt,shift:kt},{key:"Delete",run:St},{key:"Mod-Backspace",mac:"Alt-Backspace",run:Ct},{key:"Mod-Delete",mac:"Alt-Delete",run:t=>At(t,!0)},{mac:"Mod-Backspace",run:t=>bt(t,(e=>{let i=t.moveToLineBoundary(e,!1).head;return e.head>i?i:Math.max(0,e.head-1)}))},{mac:"Mod-Delete",run:t=>bt(t,(e=>{let i=t.moveToLineBoundary(e,!0).head;return e.headz(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).from,1))),shift:t=>st(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).from)))},{key:"Ctrl-e",run:t=>z(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).to,-1))),shift:t=>st(t,(e=>n.OF.cursor(t.lineBlockAt(e.head).to)))},{key:"Ctrl-d",run:St},{key:"Ctrl-h",run:kt},{key:"Ctrl-k",run:t=>bt(t,(e=>{let i=t.lineBlockAt(e.head).to;return e.head{if(t.readOnly)return!1;let i=t.changeByRange((t=>({changes:{from:t.from,to:t.to,insert:n.EY.of(["",""])},range:n.OF.cursor(t.from)})));return e(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}},{key:"Ctrl-t",run:({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=t.changeByRange((e=>{if(!e.empty||0==e.from||e.from==t.doc.length)return{range:e};let i=e.from,s=t.doc.lineAt(i),o=i==s.from?i-1:(0,n.zK)(s.text,i-s.from,!1)+s.from,r=i==s.to?i+1:(0,n.zK)(s.text,i-s.from,!0)+s.from;return{changes:{from:o,to:r,insert:t.doc.slice(i,r).append(t.doc.slice(o,i))},range:n.OF.cursor(r)}}));return!i.changes.empty&&(e(t.update(i,{scrollIntoView:!0,userEvent:"move.character"})),!0)}},{key:"Ctrl-v",run:et}].map((t=>({mac:t.key,run:t.run,shift:t.shift}))))),It={key:"Tab",run:Lt,shift:Bt}},89796:(t,e,i)=>{i.d(e,{Pq:()=>l,cp:()=>o});var n=i(89022),s=i(11418);const o=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const i=function(t,e){let i;return(i=t.message.match(/at position (\d+)/))?Math.min(+i[1],e.length):(i=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+i[1]).from+ +i[2]-1,e.length):0}(e,t.state.doc);return[{from:i,message:e.message,severity:"error",to:i}]}return[]};const r=s.bj.define({name:"json",parser:n.K.configure({props:[s.Oh.add({Object:(0,s.mz)({except:/^\s*\}/}),Array:(0,s.mz)({except:/^\s*\]/})}),s.b_.add({"Object Array":s.yd})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function l(){return new s.Yy(r)}},11418:(t,e,i)=>{i.d(e,{EI:()=>T,KB:()=>R,Lv:()=>lt,Oh:()=>L,SG:()=>At,WD:()=>W,Xt:()=>O,Yy:()=>C,_v:()=>E,b_:()=>j,bj:()=>p,cr:()=>ht,jU:()=>Dt,mv:()=>m,mz:()=>V,tp:()=>D,y9:()=>ft,yd:()=>_});var n,s=i(55817),o=i(66144),r=i(26823),l=i(40895),a=i(75002);const h=new s.uY;function c(t){return o.sj.define({combine:t?e=>e.concat(t):void 0})}const d=new s.uY;class u{constructor(t,e,i=[],n=""){this.data=t,this.name=n,o.$t.prototype.hasOwnProperty("tree")||Object.defineProperty(o.$t.prototype,"tree",{get(){return m(this)}}),this.parser=e,this.extension=[A.of(this),o.$t.languageData.of(((t,e,i)=>{let n=f(t,e,i),s=n.type.prop(h);if(!s)return[];let o=t.facet(s),r=n.type.prop(d);if(r){let s=n.resolve(e-n.from,i);for(let e of r)if(e.test(s,t)){let i=t.facet(e.facet);return"replace"==e.type?i:i.concat(o)}}return o}))].concat(i)}isActiveAt(t,e,i=-1){return f(t,e,i).type.prop(h)==this.data}findRegions(t){let e=t.facet(A);if((null==e?void 0:e.data)==this.data)return[{from:0,to:t.doc.length}];if(!e||!e.allowsNesting)return[];let i=[],n=(t,e)=>{if(t.prop(h)==this.data)return void i.push({from:e,to:e+t.length});let o=t.prop(s.uY.mounted);if(o){if(o.tree.prop(h)==this.data){if(o.overlay)for(let t of o.overlay)i.push({from:t.from+e,to:t.to+e});else i.push({from:e,to:e+t.length});return}if(o.overlay){let t=i.length;if(n(o.tree,o.overlay[0].from+e),i.length>t)return}}for(let i=0;it.isTop?e:void 0))]}),t.name)}configure(t,e){return new p(this.data,this.parser.configure(t),e||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function m(t){let e=t.field(u.state,!1);return e?e.tree:s.PH.empty}class g{constructor(t){this.doc=t,this.cursorPos=0,this.string="",this.cursor=t.iter()}get length(){return this.doc.length}syncTo(t){return this.string=this.cursor.next(t-this.cursorPos).value,this.cursorPos=t+this.string.length,this.cursorPos-this.string.length}chunk(t){return this.syncTo(t),this.string}get lineChunks(){return!0}read(t,e){let i=this.cursorPos-this.string.length;return t=this.cursorPos?this.doc.sliceString(t,e):this.string.slice(t-i,e-i)}}let v=null;class w{constructor(t,e,i=[],n,s,o,r,l){this.parser=t,this.state=e,this.fragments=i,this.tree=n,this.treeLen=s,this.viewport=o,this.skipped=r,this.scheduleOn=l,this.parse=null,this.tempSkipped=[]}static create(t,e,i){return new w(t,e,[],s.PH.empty,0,i,[],null)}startParse(){return this.parser.startParse(new g(this.state.doc),this.fragments)}work(t,e){return null!=e&&e>=this.state.doc.length&&(e=void 0),this.tree!=s.PH.empty&&this.isDone(null!=e?e:this.state.doc.length)?(this.takeTree(),!0):this.withContext((()=>{var i;if("number"==typeof t){let e=Date.now()+t;t=()=>Date.now()>e}for(this.parse||(this.parse=this.startParse()),null!=e&&(null==this.parse.stoppedAt||this.parse.stoppedAt>e)&&e=this.treeLen&&((null==this.parse.stoppedAt||this.parse.stoppedAt>t)&&this.parse.stopAt(t),this.withContext((()=>{for(;!(e=this.parse.advance()););})),this.treeLen=t,this.tree=e,this.fragments=this.withoutTempSkipped(s.rr.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(t){let e=v;v=this;try{return t()}finally{v=e}}withoutTempSkipped(t){for(let e;e=this.tempSkipped.pop();)t=b(t,e.from,e.to);return t}changes(t,e){let{fragments:i,tree:n,treeLen:o,viewport:r,skipped:l}=this;if(this.takeTree(),!t.empty){let e=[];if(t.iterChangedRanges(((t,i,n,s)=>e.push({fromA:t,toA:i,fromB:n,toB:s}))),i=s.rr.applyChanges(i,e),n=s.PH.empty,o=0,r={from:t.mapPos(r.from,-1),to:t.mapPos(r.to,1)},this.skipped.length){l=[];for(let e of this.skipped){let i=t.mapPos(e.from,1),n=t.mapPos(e.to,-1);it.from&&(this.fragments=b(this.fragments,i,n),this.skipped.splice(e--,1))}return!(this.skipped.length>=e)&&(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(t,e){this.skipped.push({from:t,to:e})}static getSkippingParser(t){return new class extends s.iX{createParse(e,i,n){let o=n[0].from,r=n[n.length-1].to;return{parsedPos:o,advance(){let e=v;if(e){for(let t of n)e.tempSkipped.push(t);t&&(e.scheduleOn=e.scheduleOn?Promise.all([e.scheduleOn,t]):t)}return this.parsedPos=r,new s.PH(s.Z6.none,[],[],r-o)},stoppedAt:null,stopAt(){}}}}}isDone(t){t=Math.min(t,this.state.doc.length);let e=this.fragments;return this.treeLen>=t&&e.length&&0==e[0].from&&e[0].to>=t}static get(){return v}}function b(t,e,i){return s.rr.applyChanges(t,[{fromA:e,toA:i,fromB:e,toB:i}])}class y{constructor(t){this.context=t,this.tree=t.tree}apply(t){if(!t.docChanged&&this.tree==this.context.tree)return this;let e=this.context.changes(t.changes,t.state),i=this.context.treeLen==t.startState.doc.length?void 0:Math.max(t.changes.mapPos(this.context.treeLen),e.viewport.to);return e.work(20,i)||e.takeTree(),new y(e)}static init(t){let e=Math.min(3e3,t.doc.length),i=w.create(t.facet(A).parser,t,{from:0,to:e});return i.work(20,e)||i.takeTree(),new y(i)}}u.state=o.sU.define({create:y.init,update(t,e){for(let t of e.effects)if(t.is(u.setState))return t.value;return e.startState.facet(A)!=e.state.facet(A)?y.init(e.state):t.apply(e)}});let x=t=>{let e=setTimeout((()=>t()),500);return()=>clearTimeout(e)};"undefined"!=typeof requestIdleCallback&&(x=t=>{let e=-1,i=setTimeout((()=>{e=requestIdleCallback(t,{timeout:400})}),100);return()=>e<0?clearTimeout(i):cancelIdleCallback(e)});const k="undefined"!=typeof navigator&&(null===(n=navigator.scheduling)||void 0===n?void 0:n.isInputPending)?()=>navigator.scheduling.isInputPending():null,S=r.Z9.fromClass(class{constructor(t){this.view=t,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(t){let e=this.view.state.field(u.state).context;(e.updateViewport(t.view.viewport)||this.view.viewport.to>e.treeLen)&&this.scheduleWork(),(t.docChanged||t.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(e)}scheduleWork(){if(this.working)return;let{state:t}=this.view,e=t.field(u.state);e.tree==e.context.tree&&e.context.isDone(t.doc.length)||(this.working=x(this.work))}work(t){this.working=null;let e=Date.now();if(this.chunkEndn+1e3,l=s.context.work((()=>k&&k()||Date.now()>o),n+(r?0:1e5));this.chunkBudget-=Date.now()-e,(l||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:u.setState.of(new y(s.context))})),this.chunkBudget>0&&(!l||r)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(t){t.scheduleOn&&(this.workScheduled++,t.scheduleOn.then((()=>this.scheduleWork())).catch((t=>(0,r.c_)(this.view.state,t))).then((()=>this.workScheduled--)),t.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),A=o.sj.define({combine:t=>t.length?t[0]:null,enables:t=>[u.state,S,r.Lz.contentAttributes.compute([t],(e=>{let i=e.facet(t);return i&&i.name?{"data-language":i.name}:{}}))]});class C{constructor(t,e=[]){this.language=t,this.support=e,this.extension=[t,e]}}const M=o.sj.define(),O=o.sj.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some((t=>t!=e[0])))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function D(t){let e=t.facet(O);return 9==e.charCodeAt(0)?t.tabSize*e.length:e.length}function T(t,e){let i="",n=t.tabSize,s=t.facet(O)[0];if("\t"==s){for(;e>=n;)i+="\t",e-=n;s=" "}for(let t=0;t=e?function(t,e,i){let n=e.resolveStack(i),s=n.node.enterUnfinishedNodesBefore(i);if(s!=n.node){let t=[];for(let e=s;e!=n.node;e=e.parent)t.push(e);for(let e=t.length-1;e>=0;e--)n={node:t[e],next:n}}return B(n,t,i)}(t,i,e):null}class R{constructor(t,e={}){this.state=t,this.options=e,this.unit=D(t)}lineAt(t,e=1){let i=this.state.doc.lineAt(t),{simulateBreak:n,simulateDoubleBreak:s}=this.options;return null!=n&&n>=i.from&&n<=i.to?s&&n==t?{text:"",from:t}:(e<0?n-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(t,e=t.length){return(0,o.y$)(t,this.state.tabSize,e)}lineIndent(t,e=1){let{text:i,from:n}=this.lineAt(t,e),s=this.options.overrideIndentation;if(s){let t=s(n);if(t>-1)return t}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const L=new s.uY;function B(t,e,i){for(let n=t;n;n=n.next){let t=P(n.node);if(t)return t(N.create(e,i,n))}return 0}function P(t){let e=t.type.prop(L);if(e)return e;let i,n=t.firstChild;if(n&&(i=n.type.prop(s.uY.closedBy))){let e=t.lastChild,n=e&&i.indexOf(e.name)>-1;return t=>H(t,!0,1,void 0,n&&!function(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}(t)?e.from:void 0)}return null==t.parent?I:null}function I(){return 0}class N extends R{constructor(t,e,i){super(t.state,t.options),this.base=t,this.pos=e,this.context=i}get node(){return this.context.node}static create(t,e,i){return new N(t,e,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(t){let e=this.state.doc.lineAt(t.from);for(;;){let i=t.resolve(e.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(F(i,t))break;e=this.state.doc.lineAt(i.from)}return this.lineIndent(e.from)}continue(){return B(this.context.next,this.base,this.pos)}}function F(t,e){for(let i=e;i;i=i.parent)if(t==i)return!0;return!1}function H(t,e,i,n,s){let o=t.textAfter,r=o.match(/^\s*/)[0].length,l=n&&o.slice(r,r+n.length)==n||s==t.pos+r,a=e?function(t){let e=t.node,i=e.childAfter(e.from),n=e.lastChild;if(!i)return null;let s=t.options.simulateBreak,o=t.state.doc.lineAt(i.from),r=null==s||s<=o.from?o.to:Math.min(o.to,s);for(let t=i.to;;){let s=e.childAfter(t);if(!s||s==n)return null;if(!s.type.isSkipped){if(s.from>=r)return null;let t=/^ */.exec(o.text.slice(i.to-o.from))[0].length;return{from:i.from,to:i.to+t}}t=s.to}}(t):null;return a?l?t.column(a.from):t.column(a.to):t.baseIndent+(l?0:t.unit*i)}function V({except:t,units:e=1}={}){return i=>{let n=t&&t.test(i.textAfter);return i.baseIndent+(n?0:e*i.unit)}}const z=200;function W(){return o.$t.transactionFilter.of((t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let i=t.newDoc,{head:n}=t.newSelection.main,s=i.lineAt(n);if(n>s.from+z)return t;let o=i.sliceString(s.from,n);if(!e.some((t=>t.test(o))))return t;let{state:r}=t,l=-1,a=[];for(let{head:t}of r.selection.ranges){let e=r.doc.lineAt(t);if(e.from==l)continue;l=e.from;let i=E(r,e.from);if(null==i)continue;let n=/^\s*/.exec(e.text)[0],s=T(r,i);n!=s&&a.push({from:e.from,to:e.from+n.length,insert:s})}return a.length?[t,{changes:a,sequential:!0}]:t}))}const q=o.sj.define(),j=new s.uY;function _(t){let e=t.firstChild,i=t.lastChild;return e&&e.toi)continue;if(s&&r.from=e&&n.to>i&&(s=n)}}return s}(t,e,i)}function U(t,e){let i=e.mapPos(t.from,1),n=e.mapPos(t.to,-1);return i>=n?void 0:{from:i,to:n}}const Y=o.Pe.define({map:U}),G=o.Pe.define({map:U});const J=o.sU.define({create:()=>r.NZ.none,update(t,e){t=t.map(e.changes);for(let i of e.effects)if(i.is(Y)&&!Z(t,i.value.from,i.value.to)){let{preparePlaceholder:n}=e.state.facet(tt),s=n?r.NZ.replace({widget:new st(n(e.state,i.value))}):nt;t=t.update({add:[s.range(i.value.from,i.value.to)]})}else i.is(G)&&(t=t.update({filter:(t,e)=>i.value.from!=t||i.value.to!=e,filterFrom:i.value.from,filterTo:i.value.to}));if(e.selection){let i=!1,{head:n}=e.selection.main;t.between(n,n,((t,e)=>{tn&&(i=!0)})),i&&(t=t.update({filterFrom:n,filterTo:n,filter:(t,e)=>e<=n||t>=n}))}return t},provide:t=>r.Lz.decorations.from(t),toJSON(t,e){let i=[];return t.between(0,e.doc.length,((t,e)=>{i.push(t,e)})),i},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let i=0;i{(!s||s.from>t)&&(s={from:t,to:e})})),s}function Z(t,e,i){let n=!1;return t.between(e,e,((t,s)=>{t==e&&s==i&&(n=!0)})),n}const Q={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},tt=o.sj.define({combine:t=>(0,o.QR)(t,Q)});function et(t){let e=[J,at];return t&&e.push(tt.of(t)),e}function it(t,e){let{state:i}=t,n=i.facet(tt),s=e=>{let i=t.lineBlockAt(t.posAtDOM(e.target)),n=X(t.state,i.from,i.to);n&&t.dispatch({effects:G.of(n)}),e.preventDefault()};if(n.placeholderDOM)return n.placeholderDOM(t,s,e);let o=document.createElement("span");return o.textContent=n.placeholderText,o.setAttribute("aria-label",i.phrase("folded code")),o.title=i.phrase("unfold"),o.className="cm-foldPlaceholder",o.onclick=s,o}const nt=r.NZ.replace({widget:new class extends r.xO{toDOM(t){return it(t,null)}}});class st extends r.xO{constructor(t){super(),this.value=t}eq(t){return this.value==t.value}toDOM(t){return it(t,this.value)}}const ot={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class rt extends r.wJ{constructor(t,e){super(),this.config=t,this.open=e}eq(t){return this.config==t.config&&this.open==t.open}toDOM(t){if(this.config.markerDOM)return this.config.markerDOM(this.open);let e=document.createElement("span");return e.textContent=this.open?this.config.openText:this.config.closedText,e.title=t.state.phrase(this.open?"Fold line":"Unfold line"),e}}function lt(t={}){let e=Object.assign(Object.assign({},ot),t),i=new rt(e,!0),n=new rt(e,!1),s=r.Z9.fromClass(class{constructor(t){this.from=t.viewport.from,this.markers=this.buildMarkers(t)}update(t){(t.docChanged||t.viewportChanged||t.startState.facet(A)!=t.state.facet(A)||t.startState.field(J,!1)!=t.state.field(J,!1)||m(t.startState)!=m(t.state)||e.foldingChanged(t))&&(this.markers=this.buildMarkers(t.view))}buildMarkers(t){let e=new o.vB;for(let s of t.viewportLineBlocks){let o=X(t.state,s.from,s.to)?n:$(t.state,s.from,s.to)?i:null;o&&e.add(s.from,s.from,o)}return e.finish()}}),{domEventHandlers:l}=e;return[s,(0,r.cU)({class:"cm-foldGutter",markers(t){var e;return(null===(e=t.plugin(s))||void 0===e?void 0:e.markers)||o.om.empty},initialSpacer:()=>new rt(e,!1),domEventHandlers:Object.assign(Object.assign({},l),{click:(t,e,i)=>{if(l.click&&l.click(t,e,i))return!0;let n=X(t.state,e.from,e.to);if(n)return t.dispatch({effects:G.of(n)}),!0;let s=$(t.state,e.from,e.to);return!!s&&(t.dispatch({effects:Y.of(s)}),!0)}})}),et()]}const at=r.Lz.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ht{constructor(t,e){let i;function n(t){let e=a.G.newName();return(i||(i=Object.create(null)))["."+e]=t,e}this.specs=t;const s="string"==typeof e.all?e.all:e.all?n(e.all):void 0,o=e.scope;this.scope=o instanceof u?t=>t.prop(h)==o.data:o?t=>t==o:void 0,this.style=(0,l.az)(t.map((t=>({tag:t.tag,class:t.class||n(Object.assign({},t,{tag:null}))}))),{all:s}).style,this.module=i?new a.G(i):null,this.themeType=e.themeType}static define(t,e){return new ht(t,e||{})}}const ct=o.sj.define(),dt=o.sj.define({combine:t=>t.length?[t[0]]:null});function ut(t){let e=t.facet(ct);return e.length?e:t.facet(dt)}function ft(t,e){let i,n=[mt];return t instanceof ht&&(t.module&&n.push(r.Lz.styleModule.of(t.module)),i=t.themeType),(null==e?void 0:e.fallback)?n.push(dt.of(t)):i?n.push(ct.computeN([r.Lz.darkTheme],(e=>e.facet(r.Lz.darkTheme)==("dark"==i)?[t]:[]))):n.push(ct.of(t)),n}class pt{constructor(t){this.markCache=Object.create(null),this.tree=m(t.state),this.decorations=this.buildDeco(t,ut(t.state)),this.decoratedTo=t.viewport.to}update(t){let e=m(t.state),i=ut(t.state),n=i!=ut(t.startState),{viewport:s}=t.view,o=t.changes.mapPos(this.decoratedTo,1);e.length=s.to?(this.decorations=this.decorations.map(t.changes),this.decoratedTo=o):(e!=this.tree||t.viewportChanged||n)&&(this.tree=e,this.decorations=this.buildDeco(t.view,i),this.decoratedTo=s.to)}buildDeco(t,e){if(!e||!this.tree.length)return r.NZ.none;let i=new o.vB;for(let{from:n,to:s}of t.visibleRanges)(0,l.DM)(this.tree,e,((t,e,n)=>{i.add(t,e,this.markCache[n]||(this.markCache[n]=r.NZ.mark({class:n})))}),n,s);return i.finish()}}const mt=o.Nb.high(r.Z9.fromClass(pt,{decorations:t=>t.decorations})),gt=(l._A.meta,l._A.link,l._A.heading,l._A.emphasis,l._A.strong,l._A.strikethrough,l._A.keyword,l._A.atom,l._A.bool,l._A.url,l._A.contentSeparator,l._A.labelName,l._A.literal,l._A.inserted,l._A.string,l._A.deleted,l._A.regexp,l._A.escape,l._A.string,l._A.variableName,l._A.variableName,l._A.typeName,l._A.namespace,l._A.className,l._A.variableName,l._A.macroName,l._A.propertyName,l._A.comment,l._A.invalid,r.Lz.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}})),vt=1e4,wt="()[]{}",bt=o.sj.define({combine:t=>(0,o.QR)(t,{afterCursor:!0,brackets:wt,maxScanDistance:vt,renderMatch:kt})}),yt=r.NZ.mark({class:"cm-matchingBracket"}),xt=r.NZ.mark({class:"cm-nonmatchingBracket"});function kt(t){let e=[],i=t.matched?yt:xt;return e.push(i.range(t.start.from,t.start.to)),t.end&&e.push(i.range(t.end.from,t.end.to)),e}const St=[o.sU.define({create:()=>r.NZ.none,update(t,e){if(!e.docChanged&&!e.selection)return t;let i=[],n=e.state.facet(bt);for(let t of e.state.selection.ranges){if(!t.empty)continue;let s=Dt(e.state,t.head,-1,n)||t.head>0&&Dt(e.state,t.head-1,1,n)||n.afterCursor&&(Dt(e.state,t.head,1,n)||t.headr.Lz.decorations.from(t)}),gt];function At(t={}){return[bt.of(t),St]}const Ct=new s.uY;function Mt(t,e,i){let n=t.prop(e<0?s.uY.openedBy:s.uY.closedBy);if(n)return n;if(1==t.name.length){let n=i.indexOf(t.name);if(n>-1&&n%2==(e<0?1:0))return[i[n+e]]}return null}function Ot(t){let e=t.type.prop(Ct);return e?e(t.node):t}function Dt(t,e,i,n={}){let s=n.maxScanDistance||vt,o=n.brackets||wt,r=m(t),l=r.resolveInner(e,i);for(let n=l;n;n=n.parent){let s=Mt(n.type,i,o);if(s&&n.from0?e>=r.from&&er.from&&e<=r.to))return Tt(t,e,i,n,r,s,o)}}return function(t,e,i,n,s,o,r){let l=i<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),a=r.indexOf(l);if(a<0||a%2==0!=i>0)return null;let h={from:i<0?e-1:e,to:i>0?e+1:e},c=t.doc.iterRange(e,i>0?t.doc.length:0),d=0;for(let t=0;!c.next().done&&t<=o;){let o=c.value;i<0&&(t+=o.length);let l=e+t*i;for(let t=i>0?0:o.length-1,e=i>0?o.length:-1;t!=e;t+=i){let e=r.indexOf(o[t]);if(!(e<0||n.resolveInner(l+t,1).type!=s))if(e%2==0==i>0)d++;else{if(1==d)return{start:h,end:{from:l+t,to:l+t+1},matched:e>>1==a>>1};d--}}i>0&&(t+=o.length)}return c.done?{start:h,matched:!1}:null}(t,e,i,r,l.type,s,o)}function Tt(t,e,i,n,s,o,r){let l=n.parent,a={from:s.from,to:s.to},h=0,c=null==l?void 0:l.cursor();if(c&&(i<0?c.childBefore(n.from):c.childAfter(n.to)))do{if(i<0?c.to<=n.from:c.from>=n.to){if(0==h&&o.indexOf(c.type.name)>-1&&c.from-1||(Lt.push(t),console.warn(e))}function Nt(t,e){let i=[];for(let n of e.split(" ")){let e=[];for(let i of n.split(".")){let n=t[i]||l._A[i];n?"function"==typeof n?e.length?e=e.map(n):It(i,`Modifier ${i} used at start of tag`):e.length?It(i,`Tag ${i} used as modifier`):e=Array.isArray(n)?n:[n]:It(i,`Unknown highlighting tag ${i}`)}for(let t of e)i.push(t)}if(!i.length)return 0;let n=e.replace(/ /g,"_"),o=n+" "+i.map((t=>t.id)),r=Bt[o];if(r)return r.id;let a=Bt[o]=s.Z6.define({id:Rt.length,name:n,props:[(0,l.pn)({[n]:i})]});return Rt.push(a),a.id}r.OP.RTL,r.OP.LTR},34900:(t,e,i)=>{i.d(e,{_k:()=>d,bu:()=>x});var n=i(26823),s=i(66144),o=i(99359);class r{constructor(t,e,i){this.from=t,this.to=e,this.diagnostic=i}}class l{constructor(t,e,i){this.diagnostics=t,this.panel=e,this.selected=i}static init(t,e,i){let s=t,o=i.facet(y).markerFilter;o&&(s=o(s,i));let r=n.NZ.set(s.map((t=>t.from==t.to||t.from==t.to-1&&i.doc.lineAt(t.from).to==t.from?n.NZ.widget({widget:new A(t),diagnostic:t}).range(t.from):n.NZ.mark({attributes:{class:"cm-lintRange cm-lintRange-"+t.severity+(t.markClass?" "+t.markClass:"")},diagnostic:t}).range(t.from,t.to))),!0);return new l(r,e,a(r))}}function a(t,e=null,i=0){let n=null;return t.between(i,1e9,((t,i,{spec:s})=>{if(!e||s.diagnostic==e)return n=new r(t,i,s.diagnostic),!1})),n}function h(t,e){let i=e.pos,n=e.end||i,s=t.state.facet(y).hideOn(t,i,n);if(null!=s)return s;let o=t.startState.doc.lineAt(e.pos);return!(!t.effects.some((t=>t.is(d)))&&!t.changes.touchesRange(o.from,Math.max(o.to,n)))}function c(t,e){return t.field(p,!1)?e:e.concat(s.Pe.appendConfig.of(E))}const d=s.Pe.define(),u=s.Pe.define(),f=s.Pe.define(),p=s.sU.define({create:()=>new l(n.NZ.none,null,null),update(t,e){if(e.docChanged&&t.diagnostics.size){let i=t.diagnostics.map(e.changes),n=null,s=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);n=a(i,t.selected.diagnostic,s)||a(i,null,s)}!i.size&&s&&e.state.facet(y).autoPanel&&(s=null),t=new l(i,s,n)}for(let i of e.effects)if(i.is(d)){let n=e.state.facet(y).autoPanel?i.value.length?M.open:null:t.panel;t=l.init(i.value,n,e.state)}else i.is(u)?t=new l(t.diagnostics,i.value?M.open:null,t.selected):i.is(f)&&(t=new l(t.diagnostics,t.panel,i.value));return t},provide:t=>[n.S7.from(t,(t=>t.panel)),n.Lz.decorations.from(t,(t=>t.diagnostics))]});const m=n.NZ.mark({class:"cm-lintRange cm-lintRange-active"});function g(t,e,i){let{diagnostics:n}=t.state.field(p),s=[],o=2e8,r=0;n.between(e-(i<0?1:0),e+(i>0?1:0),((t,n,{spec:l})=>{e>=t&&e<=n&&(t==n||(e>t||i>0)&&(e({dom:v(t,s)})}:null}function v(t,e){return(0,o.A)("ul",{class:"cm-tooltip-lint"},e.map((e=>S(t,e,!1))))}const w=t=>{let e=t.state.field(p,!1);return!(!e||!e.panel)&&(t.dispatch({effects:u.of(!1)}),!0)},b=n.Z9.fromClass(class{constructor(t){this.view=t,this.timeout=-1,this.set=!0;let{delay:e}=t.state.facet(y);this.lintTime=Date.now()+e,this.run=this.run.bind(this),this.timeout=setTimeout(this.run,e)}run(){clearTimeout(this.timeout);let t=Date.now();if(t{n.push(i),clearTimeout(s),n.length==t.length?e(n):setTimeout((()=>e(n)),200)}),i)}(e.map((t=>Promise.resolve(t(this.view)))),(e=>{this.view.state.doc==t.doc&&this.view.dispatch(function(t,e){return{effects:c(t,[d.of(e)])}}(this.view.state,e.reduce(((t,e)=>t.concat(e)))))}),(t=>{(0,n.c_)(this.view.state,t)}))}}update(t){let e=t.state.facet(y);(t.docChanged||e!=t.startState.facet(y)||e.needsRefresh&&e.needsRefresh(t))&&(this.lintTime=Date.now()+e.delay,this.set||(this.set=!0,this.timeout=setTimeout(this.run,e.delay)))}force(){this.set&&(this.lintTime=Date.now(),this.run())}destroy(){clearTimeout(this.timeout)}});const y=s.sj.define({combine:t=>Object.assign({sources:t.map((t=>t.source)).filter((t=>null!=t))},(0,s.QR)(t.map((t=>t.config)),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{needsRefresh:(t,e)=>t?e?i=>t(i)||e(i):t:e}))});function x(t,e={}){return[y.of({source:t,config:e}),b,E]}function k(t){let e=[];if(t)t:for(let{name:i}of t){for(let t=0;tt.toLowerCase()==n.toLowerCase()))){e.push(n);continue t}}e.push("")}return e}function S(t,e,i){var n;let s=i?k(e.actions):[];return(0,o.A)("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},(0,o.A)("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),null===(n=e.actions)||void 0===n?void 0:n.map(((i,n)=>{let r=!1,l=n=>{if(n.preventDefault(),r)return;r=!0;let s=a(t.state.field(p).diagnostics,e);s&&i.apply(t,s.from,s.to)},{name:h}=i,c=s[n]?h.indexOf(s[n]):-1,d=c<0?h:[h.slice(0,c),(0,o.A)("u",h.slice(c,c+1)),h.slice(c+1)];return(0,o.A)("button",{type:"button",class:"cm-diagnosticAction",onclick:l,onmousedown:l,"aria-label":` Action: ${h}${c<0?"":` (access key "${s[n]})"`}.`},d)})),e.source&&(0,o.A)("div",{class:"cm-diagnosticSource"},e.source))}class A extends n.xO{constructor(t){super(),this.diagnostic=t}eq(t){return t.diagnostic==this.diagnostic}toDOM(){return(0,o.A)("span",{class:"cm-lintPoint cm-lintPoint-"+this.diagnostic.severity})}}class C{constructor(t,e){this.diagnostic=e,this.id="item_"+Math.floor(4294967295*Math.random()).toString(16),this.dom=S(t,e,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class M{constructor(t){this.view=t,this.items=[];this.list=(0,o.A)("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:e=>{if(27==e.keyCode)w(this.view),this.view.focus();else if(38==e.keyCode||33==e.keyCode)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(40==e.keyCode||34==e.keyCode)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(36==e.keyCode)this.moveSelection(0);else if(35==e.keyCode)this.moveSelection(this.items.length-1);else if(13==e.keyCode)this.view.focus();else{if(!(e.keyCode>=65&&e.keyCode<=90&&this.selectedIndex>=0))return;{let{diagnostic:i}=this.items[this.selectedIndex],n=k(i.actions);for(let s=0;s{for(let e=0;ew(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(p).selected;if(!t)return-1;for(let e=0;e{let l,a=-1;for(let t=i;ti&&(this.items.splice(i,a-i),n=!0)),e&&l.diagnostic==e.diagnostic?l.dom.hasAttribute("aria-selected")||(l.dom.setAttribute("aria-selected","true"),s=l):l.dom.hasAttribute("aria-selected")&&l.dom.removeAttribute("aria-selected"),i++}));i({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:t,panel:e})=>{let i=e.height/this.list.offsetHeight;t.tope.bottom&&(this.list.scrollTop+=(t.bottom-e.bottom)/i)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),n&&this.sync()}sync(){let t=this.list.firstChild;function e(){let e=t;t=e.nextSibling,e.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;t!=i.dom;)e();t=i.dom.nextSibling}else this.list.insertBefore(i.dom,t);for(;t;)e()}moveSelection(t){if(this.selectedIndex<0)return;let e=a(this.view.state.field(p).diagnostics,this.items[t].diagnostic);e&&this.view.dispatch({selection:{anchor:e.from,head:e.to},scrollIntoView:!0,effects:f.of(e)})}static open(t){return new M(t)}}function O(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,${encodeURIComponent(t)}')`}function D(t){return O(``,'width="6" height="3"')}const T=n.Lz.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"var(--spice-text)",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:D("#d11")},".cm-lintRange-warning":{backgroundImage:D("orange")},".cm-lintRange-info":{backgroundImage:D("#999")},".cm-lintRange-hint":{backgroundImage:D("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});n.wJ;const E=[p,n.Lz.decorations.compute([p],(t=>{let{selected:e,panel:i}=t.field(p);return e&&i&&e.from!=e.to?n.NZ.set([m.range(e.from,e.to)]):n.NZ.none})),(0,n.Ux)(g,{hideOn:h}),T]},88170:(t,e,i)=>{i.d(e,{$P:()=>y,Eo:()=>Y,L0:()=>x,Ri:()=>T,jO:()=>U});var n=i(26823),s=i(66144),o=i(99359);const r="function"==typeof String.prototype.normalize?t=>t.normalize("NFKD"):t=>t;class l{constructor(t,e,i=0,n=t.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(i,n),this.bufferStart=i,this.normalize=s?t=>s(r(t)):r,this.query=this.normalize(e)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return(0,s.vS)(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let e=(0,s.MK)(t),i=this.bufferStart+this.bufferPos;this.bufferPos+=(0,s.Fh)(t);let n=this.normalize(e);if(n.length)for(let t=0,s=i;;t++){let o=n.charCodeAt(t),r=this.match(o,s,this.bufferPos+this.bufferStart);if(t==n.length-1){if(r)return this.value=r,this;break}s==i&&tthis.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let e=this.matchPos<=this.to&&this.re.exec(this.curLine);if(e){let i=this.curLineStart+e.index,n=i+e[0].length;if(this.matchPos=p(this.text,n+(i==n?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(ithis.value.to)&&(!this.test||this.test(i,n,e)))return this.value={from:i,to:n,match:e},this;t=this.matchPos-this.curLineStart}else{if(!(this.curLineStart+this.curLine.length=i||n.to<=e){let n=new u(e,t.sliceString(e,i));return d.set(t,n),n}if(n.from==e&&n.to==i)return n;let{text:s,from:o}=n;return o>e&&(s=t.sliceString(e,o)+s,o=e),n.to=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,e=this.re.exec(this.flat.text);if(e&&!e[0]&&e.index==t&&(this.re.lastIndex=t+1,e=this.re.exec(this.flat.text)),e){let t=this.flat.from+e.index,i=t+e[0].length;if((this.flat.to>=this.to||e.index+e[0].length<=this.flat.text.length-10)&&(!this.test||this.test(t,i,e)))return this.value={from:t,to:i,match:e},this.matchPos=p(this.text,i+(t==i?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=u.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+2*this.flat.text.length))}}}function p(t,e){if(e>=t.length)return e;let i,n=t.lineAt(e);for(;e=56320&&i<57344;)e++;return e}function m(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),i=(0,o.A)("input",{class:"cm-textfield",name:"line",value:e});function r(){let e=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(i.value);if(!e)return;let{state:o}=t,r=o.doc.lineAt(o.selection.main.head),[,l,a,h,c]=e,d=h?+h.slice(1):0,u=a?+a:r.number;if(a&&c){let t=u/100;l&&(t=t*("-"==l?-1:1)+r.number/o.doc.lines),u=Math.round(o.doc.lines*t)}else a&&l&&(u=u*("-"==l?-1:1)+r.number);let f=o.doc.line(Math.max(1,Math.min(o.doc.lines,u))),p=s.OF.cursor(f.from+Math.max(0,Math.min(d,f.length)));t.dispatch({effects:[g.of(!1),n.Lz.scrollIntoView(p.from,{y:"center"})],selection:p}),t.focus()}return{dom:(0,o.A)("form",{class:"cm-gotoLine",onkeydown:e=>{27==e.keyCode?(e.preventDefault(),t.dispatch({effects:g.of(!1)}),t.focus()):13==e.keyCode&&(e.preventDefault(),r())},onsubmit:t=>{t.preventDefault(),r()}},(0,o.A)("label",t.state.phrase("Go to line"),": ",i)," ",(0,o.A)("button",{class:"cm-button",type:"submit"},t.state.phrase("go")))}}"undefined"!=typeof Symbol&&(c.prototype[Symbol.iterator]=f.prototype[Symbol.iterator]=function(){return this});const g=s.Pe.define(),v=s.sU.define({create:()=>!0,update(t,e){for(let i of e.effects)i.is(g)&&(t=i.value);return t},provide:t=>n.S7.from(t,(t=>t?m:null))}),w=n.Lz.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px","& label":{fontSize:"80%"}}});const b=s.sj.define({combine:t=>(0,s.QR)(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new G(t),scrollToMatch:t=>n.Lz.scrollIntoView(t)})});function y(t){return t?[b.of(t),et]:et}class x{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||function(t){try{return new RegExp(t,h),!0}catch(t){return!1}}(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,((t,e)=>"n"==e?"\n":"r"==e?"\r":"t"==e?"\t":"\\"))}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new D(this):new A(this)}getCursor(t,e=0,i){let n=t.doc?t:s.$t.create({doc:t});return null==i&&(i=n.doc.length),this.regexp?C(this,n,e,i):S(this,n,e,i)}}class k{constructor(t){this.spec=t}}function S(t,e,i,n){return new l(e.doc,t.unquoted,i,n,t.caseSensitive?void 0:t=>t.toLowerCase(),t.wholeWord?(o=e.doc,r=e.charCategorizer(e.selection.main.head),(t,e,i,n)=>((n>t||n+i.length=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=S(this.spec,t,Math.max(0,e-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}function C(t,e,i,n){return new c(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?(o=e.charCategorizer(e.selection.main.head),(t,e,i)=>!i[0].length||(o(M(i.input,i.index))!=s.Je.Word||o(O(i.input,i.index))!=s.Je.Word)&&(o(O(i.input,i.index+i[0].length))!=s.Je.Word||o(M(i.input,i.index+i[0].length))!=s.Je.Word)):void 0},i,n);var o}function M(t,e){return t.slice((0,s.zK)(t,e,!1),e)}function O(t,e){return t.slice(e,(0,s.zK)(t,e))}class D extends k{nextMatch(t,e,i){let n=C(this.spec,t,i,t.doc.length).next();return n.done&&(n=C(this.spec,t,0,e).next()),n.done?null:n.value}prevMatchInRange(t,e,i){for(let n=1;;n++){let s=Math.max(e,i-1e4*n),o=C(this.spec,t,s,i),r=null;for(;!o.next().done;)r=o.value;if(r&&(s==e||r.from>s+10))return r;if(s==e)return null}}prevMatch(t,e,i){return this.prevMatchInRange(t,0,e)||this.prevMatchInRange(t,i,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&\d+])/g,((e,i)=>"$"==i?"$":"&"==i?t.match[0]:"0"!=i&&+i=e)return null;n.push(i.value)}return n}highlight(t,e,i,n){let s=C(this.spec,t,Math.max(0,e-250),Math.min(i+250,t.doc.length));for(;!s.next().done;)n(s.value.from,s.value.to)}}const T=s.Pe.define(),E=s.Pe.define(),R=s.sU.define({create:t=>new L(j(t).create(),null),update(t,e){for(let i of e.effects)i.is(T)?t=new L(i.value.create(),t.panel):i.is(E)&&(t=new L(t.query,i.value?q:null));return t},provide:t=>n.S7.from(t,(t=>t.panel))});class L{constructor(t,e){this.query=t,this.panel=e}}const B=n.NZ.mark({class:"cm-searchMatch"}),P=n.NZ.mark({class:"cm-searchMatch cm-searchMatch-selected"}),I=n.Z9.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(R))}update(t){let e=t.state.field(R);(e!=t.startState.field(R)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return n.NZ.none;let{view:i}=this,o=new s.vB;for(let e=0,n=i.visibleRanges,s=n.length;en[e+1].from-500;)l=n[++e].to;t.highlight(i.state,r,l,((t,e)=>{let n=i.state.selection.ranges.some((i=>i.from==t&&i.to==e));o.add(t,e,n?P:B)}))}return o.finish()}},{decorations:t=>t.decorations});function N(t){return e=>{let i=e.state.field(R,!1);return i&&i.query.spec.valid?t(e,i):$(e)}}const F=N(((t,{query:e})=>{let{to:i}=t.state.selection.main,n=e.nextMatch(t.state,i,i);if(!n)return!1;let o=s.OF.single(n.from,n.to),r=t.state.facet(b);return t.dispatch({selection:o,effects:[Q(t,n),r.scrollToMatch(o.main,t)],userEvent:"select.search"}),K(t),!0})),H=N(((t,{query:e})=>{let{state:i}=t,{from:n}=i.selection.main,o=e.prevMatch(i,n,n);if(!o)return!1;let r=s.OF.single(o.from,o.to),l=t.state.facet(b);return t.dispatch({selection:r,effects:[Q(t,o),l.scrollToMatch(r.main,t)],userEvent:"select.search"}),K(t),!0})),V=N(((t,{query:e})=>{let i=e.matchAll(t.state,1e3);return!(!i||!i.length)&&(t.dispatch({selection:s.OF.create(i.map((t=>s.OF.range(t.from,t.to)))),userEvent:"select.search.matches"}),!0)})),z=N(((t,{query:e})=>{let{state:i}=t,{from:o,to:r}=i.selection.main;if(i.readOnly)return!1;let l=e.nextMatch(i,o,o);if(!l)return!1;let a,h,c=l,d=[],u=[];if(c.from==o&&c.to==r&&(h=i.toText(e.getReplacement(c)),d.push({from:c.from,to:c.to,insert:h}),c=e.nextMatch(i,c.from,c.to),u.push(n.Lz.announce.of(i.phrase("replaced match on line $",i.doc.lineAt(o).number)+"."))),c){let e=0==d.length||d[0].from>=l.to?0:l.to-l.from-h.length;a=s.OF.single(c.from-e,c.to-e),u.push(Q(t,c)),u.push(i.facet(b).scrollToMatch(a.main,t))}return t.dispatch({changes:d,selection:a,effects:u,userEvent:"input.replace"}),!0})),W=N(((t,{query:e})=>{if(t.state.readOnly)return!1;let i=e.matchAll(t.state,1e9).map((t=>{let{from:i,to:n}=t;return{from:i,to:n,insert:e.getReplacement(t)}}));if(!i.length)return!1;let s=t.state.phrase("replaced $ matches",i.length)+".";return t.dispatch({changes:i,effects:n.Lz.announce.of(s),userEvent:"input.replace.all"}),!0}));function q(t){return t.state.facet(b).createPanel(t)}function j(t,e){var i,n,s,o,r;let l=t.selection.main,a=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!a)return e;let h=t.facet(b);return new x({search:(null!==(i=null==e?void 0:e.literal)&&void 0!==i?i:h.literal)?a:a.replace(/\n/g,"\\n"),caseSensitive:null!==(n=null==e?void 0:e.caseSensitive)&&void 0!==n?n:h.caseSensitive,literal:null!==(s=null==e?void 0:e.literal)&&void 0!==s?s:h.literal,regexp:null!==(o=null==e?void 0:e.regexp)&&void 0!==o?o:h.regexp,wholeWord:null!==(r=null==e?void 0:e.wholeWord)&&void 0!==r?r:h.wholeWord})}function _(t){let e=(0,n.ld)(t,q);return e&&e.dom.querySelector("[main-field]")}function K(t){let e=_(t);e&&e==t.root.activeElement&&e.select()}const $=t=>{let e=t.state.field(R,!1);if(e&&e.panel){let i=_(t);if(i&&i!=t.root.activeElement){let n=j(t.state,e.query.spec);n.valid&&t.dispatch({effects:T.of(n)}),i.focus(),i.select()}}else t.dispatch({effects:[E.of(!0),e?T.of(j(t.state,e.query.spec)):s.Pe.appendConfig.of(et)]});return!0},U=t=>{let e=t.state.field(R,!1);if(!e||!e.panel)return!1;let i=(0,n.ld)(t,q);return i&&i.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:E.of(!1)}),!0},Y=[{key:"Mod-f",run:$,scope:"editor search-panel"},{key:"F3",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:F,shift:H,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:U,scope:"editor search-panel"},{key:"Mod-Shift-l",run:({state:t,dispatch:e})=>{let i=t.selection;if(i.ranges.length>1||i.main.empty)return!1;let{from:n,to:o}=i.main,r=[],a=0;for(let e=new l(t.doc,t.sliceDoc(n,o));!e.next().done;){if(r.length>1e3)return!1;e.value.from==n&&(a=r.length),r.push(s.OF.range(e.value.from,e.value.to))}return e(t.update({selection:s.OF.create(r,a),userEvent:"select.search.matches"})),!0}},{key:"Mod-Alt-g",run:t=>{let e=(0,n.ld)(t,m);if(!e){let i=[g.of(!0)];null==t.state.field(v,!1)&&i.push(s.Pe.appendConfig.of([v,w])),t.dispatch({effects:i}),e=(0,n.ld)(t,m)}return e&&e.dom.querySelector("input").select(),!0}},{key:"Mod-d",run:({state:t,dispatch:e})=>{let{ranges:i}=t.selection;if(i.some((t=>t.from===t.to)))return(({state:t,dispatch:e})=>{let{selection:i}=t,n=s.OF.create(i.ranges.map((e=>t.wordAt(e.head)||s.OF.cursor(e.head))),i.mainIndex);return!n.eq(i)&&(e(t.update({selection:n})),!0)})({state:t,dispatch:e});let o=t.sliceDoc(i[0].from,i[0].to);if(t.selection.ranges.some((e=>t.sliceDoc(e.from,e.to)!=o)))return!1;let r=function(t,e){let{main:i,ranges:n}=t.selection,s=t.wordAt(i.head),o=s&&s.from==i.from&&s.to==i.to;for(let i=!1,s=new l(t.doc,e,n[n.length-1].to);;){if(s.next(),!s.done){if(i&&n.some((t=>t.from==s.value.from)))continue;if(o){let e=t.wordAt(s.value.from);if(!e||e.from!=s.value.from||e.to!=s.value.to)continue}return s.value}if(i)return null;s=new l(t.doc,e,0,Math.max(0,n[n.length-1].from-1)),i=!0}}(t,o);return!!r&&(e(t.update({selection:t.selection.addRange(s.OF.range(r.from,r.to),!1),effects:n.Lz.scrollIntoView(r.to)})),!0)},preventDefault:!0}];class G{constructor(t){this.view=t;let e=this.query=t.state.field(R).query.spec;function i(t,e,i){return(0,o.A)("button",{class:"cm-button",name:t,onclick:e,type:"button"},i)}this.commit=this.commit.bind(this),this.searchField=(0,o.A)("input",{value:e.search,placeholder:J(t,"Find"),"aria-label":J(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=(0,o.A)("input",{value:e.replace,placeholder:J(t,"Replace"),"aria-label":J(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=(0,o.A)("input",{type:"checkbox",name:"case",form:"",checked:e.caseSensitive,onchange:this.commit}),this.reField=(0,o.A)("input",{type:"checkbox",name:"re",form:"",checked:e.regexp,onchange:this.commit}),this.wordField=(0,o.A)("input",{type:"checkbox",name:"word",form:"",checked:e.wholeWord,onchange:this.commit}),this.dom=(0,o.A)("div",{onkeydown:t=>this.keydown(t),class:"cm-search"},[this.searchField,i("next",(()=>F(t)),[J(t,"next")]),i("prev",(()=>H(t)),[J(t,"previous")]),i("select",(()=>V(t)),[J(t,"all")]),(0,o.A)("label",null,[this.caseField,J(t,"match case")]),(0,o.A)("label",null,[this.reField,J(t,"regexp")]),(0,o.A)("label",null,[this.wordField,J(t,"by word")]),...t.state.readOnly?[]:[(0,o.A)("br"),this.replaceField,i("replace",(()=>z(t)),[J(t,"replace")]),i("replaceAll",(()=>W(t)),[J(t,"replace all")])],(0,o.A)("button",{name:"close",onclick:()=>U(t),"aria-label":J(t,"close"),type:"button"},["×"])])}commit(){let t=new x({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:T.of(t)}))}keydown(t){(0,n.TS)(this.view,t,"search-panel")?t.preventDefault():13==t.keyCode&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?H:F)(this.view)):13==t.keyCode&&t.target==this.replaceField&&(t.preventDefault(),z(this.view))}update(t){for(let e of t.transactions)for(let t of e.effects)t.is(T)&&!t.value.eq(this.query)&&this.setQuery(t.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(b).top}}function J(t,e){return t.state.phrase(e)}const X=30,Z=/[\s\.,:;?!]/;function Q(t,{from:e,to:i}){let s=t.state.doc.lineAt(e),o=t.state.doc.lineAt(i).to,r=Math.max(s.from,e-X),l=Math.min(o,i+X),a=t.state.sliceDoc(r,l);if(r!=s.from)for(let t=0;ta.length-X;t--)if(!Z.test(a[t-1])&&Z.test(a[t])){a=a.slice(0,t);break}return n.Lz.announce.of(`${t.state.phrase("current match")}. ${a} ${t.state.phrase("on line")} ${s.number}.`)}const tt=n.Lz.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),et=[R,s.Nb.low(I),tt]},66144:(t,e,i)=>{i.d(e,{$t:()=>Ot,EY:()=>n,FB:()=>Tt,Fh:()=>A,Gu:()=>O,Je:()=>St,MK:()=>S,Nb:()=>Z,OF:()=>N,Pe:()=>mt,QR:()=>Dt,VR:()=>D,YH:()=>ut,ZX:()=>gt,iR:()=>M,kn:()=>$t,om:()=>Bt,sU:()=>$,sj:()=>V,vB:()=>Pt,vS:()=>k,xx:()=>tt,y$:()=>Kt,zK:()=>v});class n{lineAt(t){if(t<0||t>this.length)throw new RangeError(`Invalid position ${t} in document of length ${this.length}`);return this.lineInner(t,!1,1,0)}line(t){if(t<1||t>this.lines)throw new RangeError(`Invalid line number ${t} in ${this.lines}-line document`);return this.lineInner(t,!0,1,0)}replace(t,e,i){[t,e]=u(this,t,e);let n=[];return this.decompose(0,t,n,2),i.length&&i.decompose(0,i.length,n,3),this.decompose(e,this.length,n,1),o.from(n,this.length-(e-t)+i.length)}append(t){return this.replace(this.length,this.length,t)}slice(t,e=this.length){[t,e]=u(this,t,e);let i=[];return this.decompose(t,e,i,0),o.from(i,e-t)}eq(t){if(t==this)return!0;if(t.length!=this.length||t.lines!=this.lines)return!1;let e=this.scanIdentical(t,1),i=this.length-this.scanIdentical(t,-1),n=new a(this),s=new a(t);for(let t=e,o=e;;){if(n.next(t),s.next(t),t=0,n.lineBreak!=s.lineBreak||n.done!=s.done||n.value!=s.value)return!1;if(o+=n.value.length,n.done||o>=i)return!0}}iter(t=1){return new a(this,t)}iterRange(t,e=this.length){return new h(this,t,e)}iterLines(t,e){let i;if(null==t)i=this.iter();else{null==e&&(e=this.lines+1);let n=this.line(t).from;i=this.iterRange(n,Math.max(n,e==this.lines+1?this.length:e<=1?0:this.line(e-1).to))}return new c(i)}toString(){return this.sliceString(0)}toJSON(){let t=[];return this.flatten(t),t}constructor(){}static of(t){if(0==t.length)throw new RangeError("A document must have at least one line");return 1!=t.length||t[0]?t.length<=32?new s(t):o.from(s.split(t,[])):n.empty}}class s extends n{constructor(t,e=function(t){let e=-1;for(let i of t)e+=i.length+1;return e}(t)){super(),this.text=t,this.length=e}get lines(){return this.text.length}get children(){return null}lineInner(t,e,i,n){for(let s=0;;s++){let o=this.text[s],r=n+o.length;if((e?i:r)>=t)return new d(n,r,i,o);n=r+1,i++}}decompose(t,e,i,n){let o=t<=0&&e>=this.length?this:new s(l(this.text,t,e),Math.min(e,this.length)-Math.max(0,t));if(1&n){let t=i.pop(),e=r(o.text,t.text.slice(),0,o.length);if(e.length<=32)i.push(new s(e,t.length+o.length));else{let t=e.length>>1;i.push(new s(e.slice(0,t)),new s(e.slice(t)))}}else i.push(o)}replace(t,e,i){if(!(i instanceof s))return super.replace(t,e,i);[t,e]=u(this,t,e);let n=r(this.text,r(i.text,l(this.text,0,t)),e),a=this.length+i.length-(e-t);return n.length<=32?new s(n,a):o.from(s.split(n,[]),a)}sliceString(t,e=this.length,i="\n"){[t,e]=u(this,t,e);let n="";for(let s=0,o=0;s<=e&&ot&&o&&(n+=i),ts&&(n+=r.slice(Math.max(0,t-s),e-s)),s=l+1}return n}flatten(t){for(let e of this.text)t.push(e)}scanIdentical(){return 0}static split(t,e){let i=[],n=-1;for(let o of t)i.push(o),n+=o.length+1,32==i.length&&(e.push(new s(i,n)),i=[],n=-1);return n>-1&&e.push(new s(i,n)),e}}class o extends n{constructor(t,e){super(),this.children=t,this.length=e,this.lines=0;for(let e of t)this.lines+=e.lines}lineInner(t,e,i,n){for(let s=0;;s++){let o=this.children[s],r=n+o.length,l=i+o.lines-1;if((e?l:r)>=t)return o.lineInner(t,e,i,n);n=r+1,i=l+1}}decompose(t,e,i,n){for(let s=0,o=0;o<=e&&s=o){let s=n&((o<=t?1:0)|(l>=e?2:0));o>=t&&l<=e&&!s?i.push(r):r.decompose(t-o,e-o,i,s)}o=l+1}}replace(t,e,i){if([t,e]=u(this,t,e),i.lines=s&&e<=l){let a=r.replace(t-s,e-s,i),h=this.lines-r.lines+a.lines;if(a.lines>4&&a.lines>h>>6){let s=this.children.slice();return s[n]=a,new o(s,this.length-(e-t)+i.length)}return super.replace(s,l,a)}s=l+1}return super.replace(t,e,i)}sliceString(t,e=this.length,i="\n"){[t,e]=u(this,t,e);let n="";for(let s=0,o=0;st&&s&&(n+=i),to&&(n+=r.sliceString(t-o,e-o,i)),o=l+1}return n}flatten(t){for(let e of this.children)e.flatten(t)}scanIdentical(t,e){if(!(t instanceof o))return 0;let i=0,[n,s,r,l]=e>0?[0,0,this.children.length,t.children.length]:[this.children.length-1,t.children.length-1,-1,-1];for(;;n+=e,s+=e){if(n==r||s==l)return i;let o=this.children[n],a=t.children[s];if(o!=a)return i+o.scanIdentical(a,e);i+=o.length+1}}static from(t,e=t.reduce(((t,e)=>t+e.length+1),-1)){let i=0;for(let e of t)i+=e.lines;if(i<32){let i=[];for(let e of t)e.flatten(i);return new s(i,e)}let n=Math.max(32,i>>5),r=n<<1,l=n>>1,a=[],h=0,c=-1,d=[];function u(t){let e;if(t.lines>r&&t instanceof o)for(let e of t.children)u(e);else t.lines>l&&(h>l||!h)?(f(),a.push(t)):t instanceof s&&h&&(e=d[d.length-1])instanceof s&&t.lines+e.lines<=32?(h+=t.lines,c+=t.length+1,d[d.length-1]=new s(e.text.concat(t.text),e.length+1+t.length)):(h+t.lines>n&&f(),h+=t.lines,c+=t.length+1,d.push(t))}function f(){0!=h&&(a.push(1==d.length?d[0]:o.from(d,c)),c=-1,h=d.length=0)}for(let e of t)u(e);return f(),1==a.length?a[0]:new o(a,e)}}function r(t,e,i=0,n=1e9){for(let s=0,o=0,r=!0;o=i&&(a>n&&(l=l.slice(0,n-s)),s0?1:(t instanceof s?t.text.length:t.children.length)<<1]}nextInner(t,e){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,n=this.nodes[i],o=this.offsets[i],r=o>>1,l=n instanceof s?n.text.length:n.children.length;if(r==(e>0?l:0)){if(0==i)return this.done=!0,this.value="",this;e>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((1&o)==(e>0?0:1)){if(this.offsets[i]+=e,0==t)return this.lineBreak=!0,this.value="\n",this;t--}else if(n instanceof s){let s=n.text[r+(e<0?-1:0)];if(this.offsets[i]+=e,s.length>Math.max(0,t))return this.value=0==t?s:e>0?s.slice(t):s.slice(0,s.length-t),this;t-=s.length}else{let o=n.children[r+(e<0?-1:0)];t>o.length?(t-=o.length,this.offsets[i]+=e):(e<0&&this.offsets[i]--,this.nodes.push(o),this.offsets.push(e>0?1:(o instanceof s?o.text.length:o.children.length)<<1))}}}next(t=0){return t<0&&(this.nextInner(-t,-this.dir),t=this.value.length),this.nextInner(t,this.dir)}}class h{constructor(t,e,i){this.value="",this.done=!1,this.cursor=new a(t,e>i?-1:1),this.pos=e>i?t.length:0,this.from=Math.min(e,i),this.to=Math.max(e,i)}nextInner(t,e){if(e<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;t+=Math.max(0,e<0?this.pos-this.to:this.from-this.pos);let i=e<0?this.pos-this.from:this.to-this.pos;t>i&&(t=i),i-=t;let{value:n}=this.cursor.next(t);return this.pos+=(n.length+t)*e,this.value=n.length<=i?n:e<0?n.slice(n.length-i):n.slice(0,i),this.done=!this.value,this}next(t=0){return t<0?t=Math.max(t,this.from-this.pos):t>0&&(t=Math.min(t,this.to-this.pos)),this.nextInner(t,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&""!=this.value}}class c{constructor(t){this.inner=t,this.afterBreak=!0,this.value="",this.done=!1}next(t=0){let{done:e,lineBreak:i,value:n}=this.inner.next(t);return e&&this.afterBreak?(this.value="",this.afterBreak=!1):e?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=n,this.afterBreak=!1),this}get lineBreak(){return!1}}"undefined"!=typeof Symbol&&(n.prototype[Symbol.iterator]=function(){return this.iter()},a.prototype[Symbol.iterator]=h.prototype[Symbol.iterator]=c.prototype[Symbol.iterator]=function(){return this});class d{constructor(t,e,i,n){this.from=t,this.to=e,this.number=i,this.text=n}get length(){return this.to-this.from}}function u(t,e,i){return[e=Math.max(0,Math.min(t.length,e)),Math.max(e,Math.min(t.length,i))]}let f="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map((t=>t?parseInt(t,36):1));for(let t=1;tt)return f[e-1]<=t;return!1}function m(t){return t>=127462&&t<=127487}const g=8205;function v(t,e,i=!0,n=!0){return(i?w:b)(t,e,n)}function w(t,e,i){if(e==t.length)return e;e&&y(t.charCodeAt(e))&&x(t.charCodeAt(e-1))&&e--;let n=k(t,e);for(e+=A(n);e=0&&m(k(t,n));)i++,n-=2;if(i%2==0)break;e+=2}}}return e}function b(t,e,i){for(;e>0;){let n=w(t,e-2,i);if(n=56320&&t<57344}function x(t){return t>=55296&&t<56320}function k(t,e){let i=t.charCodeAt(e);if(!x(i)||e+1==t.length)return i;let n=t.charCodeAt(e+1);return y(n)?n-56320+(i-55296<<10)+65536:i}function S(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t)))}function A(t){return t<65536?1:2}const C=/\r\n?|\n/;var M=function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t}(M||(M={}));class O{constructor(t){this.sections=t}get length(){let t=0;for(let e=0;et)return s+(t-n);s+=r}else{if(i!=M.Simple&&a>=t&&(i==M.TrackDel&&nt||i==M.TrackBefore&&nt))return null;if(a>t||a==t&&e<0&&!r)return t==n||e<0?s:s+l;s+=l}n=a}if(t>n)throw new RangeError(`Position ${t} is out of range for changeset of length ${n}`);return s}touchesRange(t,e=t){for(let i=0,n=0;i=0&&n<=e&&s>=t)return!(ne)||"cover";n=s}return!1}toString(){let t="";for(let e=0;e=0?":"+n:"")}return t}toJSON(){return this.sections}static fromJSON(t){if(!Array.isArray(t)||t.length%2||t.some((t=>"number"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeDesc");return new O(t)}static create(t){return new O(t)}}class D extends O{constructor(t,e){super(t),this.inserted=e}apply(t){if(this.length!=t.length)throw new RangeError("Applying change set to a document with the wrong length");return R(this,((e,i,n,s,o)=>t=t.replace(n,n+(i-e),o)),!1),t}mapDesc(t,e=!1){return L(this,t,e,!0)}invert(t){let e=this.sections.slice(),i=[];for(let s=0,o=0;s=0){e[s]=l,e[s+1]=r;let a=s>>1;for(;i.length0&&E(i,e,s.text),s.forward(t),r+=t}let a=t[o++];for(;r>1].toJSON()))}return t}static of(t,e,i){let s=[],o=[],r=0,l=null;function a(t=!1){if(!t&&!s.length)return;rl||t<0||l>e)throw new RangeError(`Invalid change range ${t} to ${l} (in doc of length ${e})`);let d=c?"string"==typeof c?n.of(c.split(i||C)):c:n.empty,u=d.length;if(t==l&&0==u)return;tr&&T(s,t-r,-1),T(s,l-t,u),E(o,s,d),r=l}}(t),a(!l),l}static empty(t){return new D(t?[t,-1]:[],[])}static fromJSON(t){if(!Array.isArray(t))throw new RangeError("Invalid JSON representation of ChangeSet");let e=[],i=[];for(let s=0;se&&"string"!=typeof t)))throw new RangeError("Invalid JSON representation of ChangeSet");if(1==o.length)e.push(o[0],0);else{for(;i.length=0&&i<=0&&i==t[s+1]?t[s]+=e:0==e&&0==t[s]?t[s+1]+=i:n?(t[s]+=e,t[s+1]+=i):t.push(e,i)}function E(t,e,i){if(0==i.length)return;let s=e.length-2>>1;if(s>1])),!(i||l==t.sections.length||t.sections[l+1]<0);)a=t.sections[l++],h=t.sections[l++];e(o,c,r,d,u),o=c,r=d}}}function L(t,e,i,n=!1){let s=[],o=n?[]:null,r=new P(t),l=new P(e);for(let t=-1;;)if(-1==r.ins&&-1==l.ins){let t=Math.min(r.len,l.len);T(s,t,-1),r.forward(t),l.forward(t)}else if(l.ins>=0&&(r.ins<0||t==r.i||0==r.off&&(l.len=0&&t=0)){if(r.done&&l.done)return o?D.createSet(s,o):O.create(s);throw new Error("Mismatched change set lengths")}{let e=0,i=r.len;for(;i;)if(-1==l.ins){let t=Math.min(i,l.len);e+=t,i-=t,l.forward(t)}else{if(!(0==l.ins&&l.lene||r.ins>=0&&r.len>e)&&(t||n.length>i),o.forward2(e),r.forward(e)}}else T(n,0,r.ins,t),s&&E(s,n,r.text),r.next()}}class P{constructor(t){this.set=t,this.i=0,this.next()}next(){let{sections:t}=this.set;this.i>1;return e>=t.length?n.empty:t[e]}textBit(t){let{inserted:e}=this.set,i=this.i-2>>1;return i>=e.length&&!t?n.empty:e[i].slice(this.off,null==t?void 0:this.off+t)}forward(t){t==this.len?this.next():(this.len-=t,this.off+=t)}forward2(t){-1==this.ins?this.forward(t):t==this.ins?this.next():(this.ins-=t,this.off+=t)}}class I{constructor(t,e,i){this.from=t,this.to=e,this.flags=i}get anchor(){return 32&this.flags?this.to:this.from}get head(){return 32&this.flags?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return 8&this.flags?-1:16&this.flags?1:0}get bidiLevel(){let t=7&this.flags;return 7==t?null:t}get goalColumn(){let t=this.flags>>6;return 16777215==t?void 0:t}map(t,e=-1){let i,n;return this.empty?i=n=t.mapPos(this.from,e):(i=t.mapPos(this.from,1),n=t.mapPos(this.to,-1)),i==this.from&&n==this.to?this:new I(i,n,this.flags)}extend(t,e=t){if(t<=this.anchor&&e>=this.anchor)return N.range(t,e);let i=Math.abs(t-this.anchor)>Math.abs(e-this.anchor)?t:e;return N.range(this.anchor,i)}eq(t,e=!1){return!(this.anchor!=t.anchor||this.head!=t.head||e&&this.empty&&this.assoc!=t.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(t){if(!t||"number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid JSON representation for SelectionRange");return N.range(t.anchor,t.head)}static create(t,e,i){return new I(t,e,i)}}class N{constructor(t,e){this.ranges=t,this.mainIndex=e}map(t,e=-1){return t.empty?this:N.create(this.ranges.map((i=>i.map(t,e))),this.mainIndex)}eq(t,e=!1){if(this.ranges.length!=t.ranges.length||this.mainIndex!=t.mainIndex)return!1;for(let i=0;it.toJSON())),main:this.mainIndex}}static fromJSON(t){if(!t||!Array.isArray(t.ranges)||"number"!=typeof t.main||t.main>=t.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new N(t.ranges.map((t=>I.fromJSON(t))),t.main)}static single(t,e=t){return new N([N.range(t,e)],0)}static create(t,e=0){if(0==t.length)throw new RangeError("A selection needs at least one range");for(let i=0,n=0;nt?8:0)|s)}static normalized(t,e=0){let i=t[e];t.sort(((t,e)=>t.from-e.from)),e=t.indexOf(i);for(let i=1;in.head?N.range(r,o):N.range(o,r))}}return new N(t,e)}}function F(t,e){for(let i of t.ranges)if(i.to>e)throw new RangeError("Selection points outside of document")}let H=0;class V{constructor(t,e,i,n,s){this.combine=t,this.compareInput=e,this.compare=i,this.isStatic=n,this.id=H++,this.default=t([]),this.extensions="function"==typeof s?s(this):s}get reader(){return this}static define(t={}){return new V(t.combine||(t=>t),t.compareInput||((t,e)=>t===e),t.compare||(t.combine?(t,e)=>t===e:z),!!t.static,t.enables)}of(t){return new W([],this,0,t)}compute(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,1,e)}computeN(t,e){if(this.isStatic)throw new Error("Can't compute a static facet");return new W(t,this,2,e)}from(t,e){return e||(e=t=>t),this.compute([t],(i=>e(i.field(t))))}}function z(t,e){return t==e||t.length==e.length&&t.every(((t,i)=>t===e[i]))}class W{constructor(t,e,i,n){this.dependencies=t,this.facet=e,this.type=i,this.value=n,this.id=H++}dynamicSlot(t){var e;let i=this.value,n=this.facet.compareInput,s=this.id,o=t[s]>>1,r=2==this.type,l=!1,a=!1,h=[];for(let i of this.dependencies)"doc"==i?l=!0:"selection"==i?a=!0:0==(1&(null!==(e=t[i.id])&&void 0!==e?e:1))&&h.push(t[i.id]);return{create:t=>(t.values[o]=i(t),1),update(t,e){if(l&&e.docChanged||a&&(e.docChanged||e.selection)||j(t,h)){let e=i(t);if(r?!q(e,t.values[o],n):!n(e,t.values[o]))return t.values[o]=e,1}return 0},reconfigure:(t,e)=>{let l,a=e.config.address[s];if(null!=a){let s=st(e,a);if(this.dependencies.every((i=>i instanceof V?e.facet(i)===t.facet(i):!(i instanceof $)||e.field(i,!1)==t.field(i,!1)))||(r?q(l=i(t),s,n):n(l=i(t),s)))return t.values[o]=s,0}else l=i(t);return t.values[o]=l,1}}}}function q(t,e,i){if(t.length!=e.length)return!1;for(let n=0;nt[e.id])),s=i.map((t=>t.type)),o=n.filter((t=>!(1&t))),r=t[e.id]>>1;function l(t){let i=[];for(let e=0;et===e),t);return t.provide&&(e.provides=t.provide(e)),e}create(t){let e=t.facet(K).find((t=>t.field==this));return((null==e?void 0:e.create)||this.createF)(t)}slot(t){let e=t[this.id]>>1;return{create:t=>(t.values[e]=this.create(t),1),update:(t,i)=>{let n=t.values[e],s=this.updateF(n,i);return this.compareF(n,s)?0:(t.values[e]=s,1)},reconfigure:(t,i)=>null!=i.config.address[this.id]?(t.values[e]=i.field(this),0):(t.values[e]=this.create(t),1)}}init(t){return[this,K.of({field:this,create:t})]}get extension(){return this}}const U=4,Y=3,G=2,J=1;function X(t){return e=>new Q(e,t)}const Z={highest:X(0),high:X(J),default:X(G),low:X(Y),lowest:X(U)};class Q{constructor(t,e){this.inner=t,this.prec=e}}class tt{of(t){return new et(this,t)}reconfigure(t){return tt.reconfigure.of({compartment:this,extension:t})}get(t){return t.config.compartments.get(this)}}class et{constructor(t,e){this.compartment=t,this.inner=e}}class it{constructor(t,e,i,n,s,o){for(this.base=t,this.compartments=e,this.dynamicSlots=i,this.address=n,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length>1]}static resolve(t,e,i){let n=[],s=Object.create(null),o=new Map;for(let i of function(t,e,i){let n=[[],[],[],[],[]],s=new Map;function o(t,r){let l=s.get(t);if(null!=l){if(l<=r)return;let e=n[l].indexOf(t);e>-1&&n[l].splice(e,1),t instanceof et&&i.delete(t.compartment)}if(s.set(t,r),Array.isArray(t))for(let e of t)o(e,r);else if(t instanceof et){if(i.has(t.compartment))throw new RangeError("Duplicate use of compartment in extensions");let n=e.get(t.compartment)||t.inner;i.set(t.compartment,n),o(n,r)}else if(t instanceof Q)o(t.inner,t.prec);else if(t instanceof $)n[r].push(t),t.provides&&o(t.provides,r);else if(t instanceof W)n[r].push(t),t.facet.extensions&&o(t.facet.extensions,G);else{let e=t.extension;if(!e)throw new Error(`Unrecognized extension value in extension set (${t}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);o(e,r)}}return o(t,G),n.reduce(((t,e)=>t.concat(e)))}(t,e,o))i instanceof $?n.push(i):(s[i.facet.id]||(s[i.facet.id]=[])).push(i);let r=Object.create(null),l=[],a=[];for(let t of n)r[t.id]=a.length<<1,a.push((e=>t.slot(e)));let h=null==i?void 0:i.config.facets;for(let t in s){let e=s[t],n=e[0].facet,o=h&&h[t]||[];if(e.every((t=>0==t.type)))if(r[n.id]=l.length<<1|1,z(o,e))l.push(i.facet(n));else{let t=n.combine(e.map((t=>t.value)));l.push(i&&n.compare(t,i.facet(n))?i.facet(n):t)}else{for(let t of e)0==t.type?(r[t.id]=l.length<<1|1,l.push(t.value)):(r[t.id]=a.length<<1,a.push((e=>t.dynamicSlot(e))));r[n.id]=a.length<<1,a.push((t=>_(t,n,e)))}}let c=a.map((t=>t(r)));return new it(t,o,c,r,l,s)}}function nt(t,e){if(1&e)return 2;let i=e>>1,n=t.status[i];if(4==n)throw new Error("Cyclic dependency between fields and/or facets");if(2&n)return n;t.status[i]=4;let s=t.computeSlot(t,t.config.dynamicSlots[i]);return t.status[i]=2|s}function st(t,e){return 1&e?t.config.staticValues[e>>1]:t.values[e>>1]}const ot=V.define(),rt=V.define({combine:t=>t.some((t=>t)),static:!0}),lt=V.define({combine:t=>t.length?t[0]:void 0,static:!0}),at=V.define(),ht=V.define(),ct=V.define(),dt=V.define({combine:t=>!!t.length&&t[0]});class ut{constructor(t,e){this.type=t,this.value=e}static define(){return new ft}}class ft{of(t){return new ut(this,t)}}class pt{constructor(t){this.map=t}of(t){return new mt(this,t)}}class mt{constructor(t,e){this.type=t,this.value=e}map(t){let e=this.type.map(this.value,t);return void 0===e?void 0:e==this.value?this:new mt(this.type,e)}is(t){return this.type==t}static define(t={}){return new pt(t.map||(t=>t))}static mapEffects(t,e){if(!t.length)return t;let i=[];for(let n of t){let t=n.map(e);t&&i.push(t)}return i}}mt.reconfigure=mt.define(),mt.appendConfig=mt.define();class gt{constructor(t,e,i,n,s,o){this.startState=t,this.changes=e,this.selection=i,this.effects=n,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&F(i,e.newLength),s.some((t=>t.type==gt.time))||(this.annotations=s.concat(gt.time.of(Date.now())))}static create(t,e,i,n,s,o){return new gt(t,e,i,n,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(t){for(let e of this.annotations)if(e.type==t)return e.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(t){let e=this.annotation(gt.userEvent);return!(!e||!(e==t||e.length>t.length&&e.slice(0,t.length)==t&&"."==e[t.length]))}}function vt(t,e){let i=[];for(let n=0,s=0;;){let o,r;if(n=t[n]))o=t[n++],r=t[n++];else{if(!(s=0;s--){let o=i[s](t);o&&Object.keys(o).length&&(n=wt(n,bt(e,o,t.changes.newLength),!0))}return n==t?t:gt.create(e,t.changes,t.selection,n.effects,n.annotations,n.scrollIntoView)}(i?function(t){let e=t.startState,i=!0;for(let n of e.facet(at)){let e=n(t);if(!1===e){i=!1;break}Array.isArray(e)&&(i=!0===i?e:vt(i,e))}if(!0!==i){let n,s;if(!1===i)s=t.changes.invertedDesc,n=D.empty(e.doc.length);else{let e=t.changes.filter(i);n=e.changes,s=e.filtered.mapDesc(e.changes).invertedDesc}t=gt.create(e,n,t.selection&&t.selection.map(s),mt.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let n=e.facet(ht);for(let i=n.length-1;i>=0;i--){let s=n[i](t);t=s instanceof gt?s:Array.isArray(s)&&1==s.length&&s[0]instanceof gt?s[0]:yt(e,kt(s),!1)}return t}(s):s)}gt.time=ut.define(),gt.userEvent=ut.define(),gt.addToHistory=ut.define(),gt.remote=ut.define();const xt=[];function kt(t){return null==t?xt:Array.isArray(t)?t:[t]}var St=function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t}(St||(St={}));const At=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let Ct;try{Ct=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch(t){}function Mt(t){return e=>{if(!/\S/.test(e))return St.Space;if(function(t){if(Ct)return Ct.test(t);for(let e=0;e"€"&&(i.toUpperCase()!=i.toLowerCase()||At.test(i)))return!0}return!1}(e))return St.Word;for(let i=0;i-1)return St.Word;return St.Other}}class Ot{constructor(t,e,i,n,s,o){this.config=t,this.doc=e,this.selection=i,this.values=n,this.status=t.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let t=0;ts.set(e,t))),i=null),s.set(e.value.compartment,e.value.extension)):e.is(mt.reconfigure)?(i=null,n=e.value):e.is(mt.appendConfig)&&(i=null,n=kt(n).concat(e.value));if(i)e=t.startState.values.slice();else{i=it.resolve(n,s,this),e=new Ot(i,this.doc,this.selection,i.dynamicSlots.map((()=>null)),((t,e)=>e.reconfigure(t,this)),null).values}let o=t.startState.facet(rt)?t.newSelection:t.newSelection.asSingle();new Ot(i,t.newDoc,o,e,((e,i)=>i.update(e,t)),t)}replaceSelection(t){return"string"==typeof t&&(t=this.toText(t)),this.changeByRange((e=>({changes:{from:e.from,to:e.to,insert:t},range:N.cursor(e.from+t.length)})))}changeByRange(t){let e=this.selection,i=t(e.ranges[0]),n=this.changes(i.changes),s=[i.range],o=kt(i.effects);for(let i=1;is.spec.fromJSON(o,t))))}return Ot.create({doc:t.doc,selection:N.fromJSON(t.selection),extensions:e.extensions?n.concat([e.extensions]):n})}static create(t={}){let e=it.resolve(t.extensions||[],new Map),i=t.doc instanceof n?t.doc:n.of((t.doc||"").split(e.staticFacet(Ot.lineSeparator)||C)),s=t.selection?t.selection instanceof N?t.selection:N.single(t.selection.anchor,t.selection.head):N.single(0);return F(s,i.length),e.staticFacet(rt)||(s=s.asSingle()),new Ot(e,i,s,e.dynamicSlots.map((()=>null)),((t,e)=>e.create(t)),null)}get tabSize(){return this.facet(Ot.tabSize)}get lineBreak(){return this.facet(Ot.lineSeparator)||"\n"}get readOnly(){return this.facet(dt)}phrase(t,...e){for(let e of this.facet(Ot.phrases))if(Object.prototype.hasOwnProperty.call(e,t)){t=e[t];break}return e.length&&(t=t.replace(/\$(\$|\d*)/g,((t,i)=>{if("$"==i)return"$";let n=+(i||1);return!n||n>e.length?t:e[n-1]}))),t}languageDataAt(t,e,i=-1){let n=[];for(let s of this.facet(ot))for(let o of s(this,e,i))Object.prototype.hasOwnProperty.call(o,t)&&n.push(o[t]);return n}charCategorizer(t){return Mt(this.languageDataAt("wordChars",t).join(""))}wordAt(t){let{text:e,from:i,length:n}=this.doc.lineAt(t),s=this.charCategorizer(t),o=t-i,r=t-i;for(;o>0;){let t=v(e,o,!1);if(s(e.slice(t,o))!=St.Word)break;o=t}for(;rt.length?t[0]:4}),Ot.lineSeparator=lt,Ot.readOnly=dt,Ot.phrases=V.define({compare(t,e){let i=Object.keys(t),n=Object.keys(e);return i.length==n.length&&i.every((i=>t[i]==e[i]))}}),Ot.languageData=ot,Ot.changeFilter=at,Ot.transactionFilter=ht,Ot.transactionExtender=ct,tt.reconfigure=mt.define();class Tt{eq(t){return this==t}range(t,e=t){return Et.create(t,e,this)}}Tt.prototype.startSide=Tt.prototype.endSide=0,Tt.prototype.point=!1,Tt.prototype.mapMode=M.TrackDel;class Et{constructor(t,e,i){this.from=t,this.to=e,this.value=i}static create(t,e,i){return new Et(t,e,i)}}function Rt(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class Lt{constructor(t,e,i,n){this.from=t,this.to=e,this.value=i,this.maxPoint=n}get length(){return this.to[this.to.length-1]}findIndex(t,e,i,n=0){let s=i?this.to:this.from;for(let o=n,r=s.length;;){if(o==r)return o;let n=o+r>>1,l=s[n]-t||(i?this.value[n].endSide:this.value[n].startSide)-e;if(n==o)return l>=0?o:r;l>=0?r=n:o=n+1}}between(t,e,i,n){for(let s=this.findIndex(e,-1e9,!0),o=this.findIndex(i,1e9,!1,s);sh||a==h&&c.startSide>0&&c.endSide<=0)continue;(h-a||c.endSide-c.startSide)<0||(o<0&&(o=a),c.point&&(r=Math.max(r,h-a)),i.push(c),n.push(a-o),s.push(h-o))}return{mapped:i.length?new Lt(n,s,i,r):null,pos:o}}}class Bt{constructor(t,e,i,n){this.chunkPos=t,this.chunk=e,this.nextLayer=i,this.maxPoint=n}static create(t,e,i,n){return new Bt(t,e,i,n)}get length(){let t=this.chunk.length-1;return t<0?0:Math.max(this.chunkEnd(t),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let t=this.nextLayer.size;for(let e of this.chunk)t+=e.value.length;return t}chunkEnd(t){return this.chunkPos[t]+this.chunk[t].length}update(t){let{add:e=[],sort:i=!1,filterFrom:n=0,filterTo:s=this.length}=t,o=t.filter;if(0==e.length&&!o)return this;if(i&&(e=e.slice().sort(Rt)),this.isEmpty)return e.length?Bt.of(e):this;let r=new Nt(this,null,-1).goto(0),l=0,a=[],h=new Pt;for(;r.value||l=0){let t=e[l++];h.addInner(t.from,t.to,t.value)||a.push(t)}else 1==r.rangeIndex&&r.chunkIndexthis.chunkEnd(r.chunkIndex)||sr.to||s=s&&t<=s+o.length&&!1===o.between(s,t-s,e-s,i))return}this.nextLayer.between(t,e,i)}}iter(t=0){return Ft.from([this]).goto(t)}get isEmpty(){return this.nextLayer==this}static iter(t,e=0){return Ft.from(t).goto(e)}static compare(t,e,i,n,s=-1){let o=t.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),r=e.filter((t=>t.maxPoint>0||!t.isEmpty&&t.maxPoint>=s)),l=It(o,r,i),a=new Vt(o,l,s),h=new Vt(r,l,s);i.iterGaps(((t,e,i)=>zt(a,t,h,e,i,n))),i.empty&&0==i.length&&zt(a,0,h,0,0,n)}static eq(t,e,i=0,n){null==n&&(n=999999999);let s=t.filter((t=>!t.isEmpty&&e.indexOf(t)<0)),o=e.filter((e=>!e.isEmpty&&t.indexOf(e)<0));if(s.length!=o.length)return!1;if(!s.length)return!0;let r=It(s,o),l=new Vt(s,r,0).goto(i),a=new Vt(o,r,0).goto(i);for(;;){if(l.to!=a.to||!Wt(l.active,a.active)||l.point&&(!a.point||!l.point.eq(a.point)))return!1;if(l.to>n)return!0;l.next(),a.next()}}static spans(t,e,i,n,s=-1){let o=new Vt(t,null,s).goto(e),r=e,l=o.openStart;for(;;){let t=Math.min(o.to,i);if(o.point){let i=o.activeForPoint(o.to),s=o.pointFromr&&(n.span(r,t,o.active,l),l=o.openEnd(t));if(o.to>i)return l+(o.point&&o.to>i?1:0);r=o.to,o.next()}}static of(t,e=!1){let i=new Pt;for(let n of t instanceof Et?[t]:e?function(t){if(t.length>1)for(let e=t[0],i=1;i0)return t.slice().sort(Rt);e=n}return t}(t):t)i.add(n.from,n.to,n.value);return i.finish()}static join(t){if(!t.length)return Bt.empty;let e=t[t.length-1];for(let i=t.length-2;i>=0;i--)for(let n=t[i];n!=Bt.empty;n=n.nextLayer)e=new Bt(n.chunkPos,n.chunk,e,Math.max(n.maxPoint,e.maxPoint));return e}}Bt.empty=new Bt([],[],null,-1),Bt.empty.nextLayer=Bt.empty;class Pt{finishChunk(t){this.chunks.push(new Lt(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,t&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(t,e,i){this.addInner(t,e,i)||(this.nextLayer||(this.nextLayer=new Pt)).add(t,e,i)}addInner(t,e,i){let n=t-this.lastTo||i.startSide-this.last.endSide;if(n<=0&&(t-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return!(n<0)&&(250==this.from.length&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=t),this.from.push(t-this.chunkStart),this.to.push(e-this.chunkStart),this.last=i,this.lastFrom=t,this.lastTo=e,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,e-t)),!0)}addChunk(t,e){if((t-this.lastTo||e.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,e.maxPoint),this.chunks.push(e),this.chunkPos.push(t);let i=e.value.length-1;return this.last=e.value[i],this.lastFrom=e.from[i]+t,this.lastTo=e.to[i]+t,!0}finish(){return this.finishInner(Bt.empty)}finishInner(t){if(this.from.length&&this.finishChunk(!1),0==this.chunks.length)return t;let e=Bt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(t):t,this.setMaxPoint);return this.from=null,e}}function It(t,e,i){let n=new Map;for(let e of t)for(let t=0;t=this.minPoint)break}}}setRangeIndex(t){if(t==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex=i&&n.push(new Nt(o,e,i,s));return 1==n.length?n[0]:new Ft(n)}get startSide(){return this.value?this.value.startSide:0}goto(t,e=-1e9){for(let i of this.heap)i.goto(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ht(this.heap,t);return this.next(),this}forward(t,e){for(let i of this.heap)i.forward(t,e);for(let t=this.heap.length>>1;t>=0;t--)Ht(this.heap,t);(this.to-t||this.value.endSide-e)<0&&this.next()}next(){if(0==this.heap.length)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let t=this.heap[0];this.from=t.from,this.to=t.to,this.value=t.value,this.rank=t.rank,t.value&&t.next(),Ht(this.heap,0)}}}function Ht(t,e){for(let i=t[e];;){let n=1+(e<<1);if(n>=t.length)break;let s=t[n];if(n+1=0&&(s=t[n+1],n++),i.compare(s)<0)break;t[n]=i,t[e]=s,e=n}}class Vt{constructor(t,e,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=Ft.from(t,e,i)}goto(t,e=-1e9){return this.cursor.goto(t,e),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=t,this.endSide=e,this.openStart=-1,this.next(),this}forward(t,e){for(;this.minActive>-1&&(this.activeTo[this.minActive]-t||this.active[this.minActive].endSide-e)<0;)this.removeActive(this.minActive);this.cursor.forward(t,e)}removeActive(t){qt(this.active,t),qt(this.activeTo,t),qt(this.activeRank,t),this.minActive=_t(this.active,this.activeTo)}addActive(t){let e=0,{value:i,to:n,rank:s}=this.cursor;for(;e0;)e++;jt(this.active,e,i),jt(this.activeTo,e,n),jt(this.activeRank,e,s),t&&jt(t,e,this.cursor.from),this.minActive=_t(this.active,this.activeTo)}next(){let t=this.to,e=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let n=this.minActive;if(n>-1&&(this.activeTo[n]-this.cursor.from||this.active[n].endSide-this.cursor.startSide)<0){if(this.activeTo[n]>t){this.to=this.activeTo[n],this.endSide=this.active[n].endSide;break}this.removeActive(n),i&&qt(i,n)}else{if(!this.cursor.value){this.to=this.endSide=1e9;break}if(this.cursor.from>t){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}{let t=this.cursor.value;if(t.point){if(!(e&&this.cursor.to==this.to&&this.cursor.from=0&&i[e]=0&&!(this.activeRank[i]t||this.activeTo[i]==t&&this.active[i].endSide>=this.point.endSide)&&e.push(this.active[i]);return e.reverse()}openEnd(t){let e=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>t;i--)e++;return e}}function zt(t,e,i,n,s,o){t.goto(e),i.goto(n);let r=n+s,l=n,a=n-e;for(;;){let e=t.to+a-i.to||t.endSide-i.endSide,n=e<0?t.to+a:i.to,s=Math.min(n,r);if(t.point||i.point?t.point&&i.point&&(t.point==i.point||t.point.eq(i.point))&&Wt(t.activeForPoint(t.to),i.activeForPoint(i.to))||o.comparePoint(l,s,t.point,i.point):s>l&&!Wt(t.active,i.active)&&o.compareRange(l,s,t.active,i.active),n>r)break;l=n,e<=0&&t.next(),e>=0&&i.next()}}function Wt(t,e){if(t.length!=e.length)return!1;for(let i=0;i=e;i--)t[i+1]=t[i];t[e]=i}function _t(t,e){let i=-1,n=1e9;for(let s=0;s=e)return n;if(n==t.length)break;s+=9==t.charCodeAt(n)?i-s%i:1,n=v(t,n)}return!0===n?-1:t.length}},260:(t,e,i)=>{i.d(e,{bM:()=>A,kS:()=>S});var n=i(26823),s=i(11418),o=i(40895);const r="#e5c07b",l="#e06c75",a="#56b6c2",h= getComputedStyle(document.body).getPropertyValue("--spice-text").trim(),c="#abb2bf",d="#7d8799",u="#61afef",f="#98c379",p="#d19a66",m="#c678dd",g="#21252b",v="#2c313a",w="#282c34",b="#353a42",y="#3E4451",x="#528bff",k=n.Lz.theme({"&":{color:c,backgroundColor:w},".cm-content":{caretColor:x},".cm-cursor, .cm-dropCursor":{borderLeftColor:x},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:y},".cm-panels":{backgroundColor:g,color:c},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:w,color:d,border:"none"},".cm-activeLineGutter":{backgroundColor:v},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:b},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:b,borderBottomColor:b},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:v,color:c}}},{dark:!0}),S=s.cr.define([{tag:o._A.keyword,color:m},{tag:[o._A.name,o._A.deleted,o._A.character,o._A.propertyName,o._A.macroName],color:l},{tag:[o._A.function(o._A.variableName),o._A.labelName],color:u},{tag:[o._A.color,o._A.constant(o._A.name),o._A.standard(o._A.name)],color:p},{tag:[o._A.definition(o._A.name),o._A.separator],color:c},{tag:[o._A.typeName,o._A.className,o._A.number,o._A.changed,o._A.annotation,o._A.modifier,o._A.self,o._A.namespace],color:r},{tag:[o._A.operator,o._A.operatorKeyword,o._A.url,o._A.escape,o._A.regexp,o._A.link,o._A.special(o._A.string)],color:a},{tag:[o._A.meta,o._A.comment],color:d},{tag:o._A.strong,fontWeight:"bold"},{tag:o._A.emphasis,fontStyle:"italic"},{tag:o._A.strikethrough,textDecoration:"line-through"},{tag:o._A.link,color:d,textDecoration:"underline"},{tag:o._A.heading,fontWeight:"bold",color:l},{tag:[o._A.atom,o._A.bool,o._A.special(o._A.variableName)],color:p},{tag:[o._A.processingInstruction,o._A.string,o._A.inserted],color:f},{tag:o._A.invalid,color:h}]),A=[k,(0,s.y9)(S)]},26823:(t,e,i)=>{i.d(e,{$K:()=>Os,DK:()=>$n,Eg:()=>Qn,Lz:()=>sn,NZ:()=>lt,OP:()=>bt,S7:()=>rs,TS:()=>mn,Ux:()=>Zn,VH:()=>Dn,Wu:()=>Rs,Z9:()=>se,cU:()=>us,c_:()=>te,dz:()=>In,ld:()=>is,w4:()=>un,wJ:()=>ls,xO:()=>ot});var n=i(66144),s=i(75002),o=i(396);function r(t){let e;return e=11==t.nodeType?t.getSelection?t:t.ownerDocument:t,e.getSelection()}function l(t,e){return!!e&&(t==e||t.contains(1!=e.nodeType?e.parentNode:e))}function a(t,e){if(!e.anchorNode)return!1;try{return l(t,e.anchorNode)}catch(t){return!1}}function h(t){return 3==t.nodeType?k(t,0,t.nodeValue.length).getClientRects():1==t.nodeType?t.getClientRects():[]}function c(t,e,i,n){return!!i&&(f(t,e,i,n,-1)||f(t,e,i,n,1))}function d(t){for(var e=0;;e++)if(!(t=t.previousSibling))return e}function u(t){return 1==t.nodeType&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function f(t,e,i,n,s){for(;;){if(t==i&&e==n)return!0;if(e==(s<0?0:p(t))){if("DIV"==t.nodeName)return!1;let i=t.parentNode;if(!i||1!=i.nodeType)return!1;e=d(t)+(s<0?0:1),t=i}else{if(1!=t.nodeType)return!1;if(1==(t=t.childNodes[e+(s<0?-1:0)]).nodeType&&"false"==t.contentEditable)return!1;e=s<0?p(t):0}}}function p(t){return 3==t.nodeType?t.nodeValue.length:t.childNodes.length}function m(t,e){let i=e?t.left:t.right;return{left:i,right:i,top:t.top,bottom:t.bottom}}function g(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function v(t,e){let i=e.width/t.offsetWidth,n=e.height/t.offsetHeight;return(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.width-t.offsetWidth)<1)&&(i=1),(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.height-t.offsetHeight)<1)&&(n=1),{scaleX:i,scaleY:n}}class w{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(t){return this.anchorNode==t.anchorNode&&this.anchorOffset==t.anchorOffset&&this.focusNode==t.focusNode&&this.focusOffset==t.focusOffset}setRange(t){let{anchorNode:e,focusNode:i}=t;this.set(e,Math.min(t.anchorOffset,e?p(e):0),i,Math.min(t.focusOffset,i?p(i):0))}set(t,e,i,n){this.anchorNode=t,this.anchorOffset=e,this.focusNode=i,this.focusOffset=n}}let b,y=null;function x(t){if(t.setActive)return t.setActive();if(y)return t.focus(y);let e=[];for(let i=t;i&&(e.push(i,i.scrollTop,i.scrollLeft),i!=i.ownerDocument);i=i.parentNode);if(t.focus(null==y?{get preventScroll(){return y={preventScroll:!0},!0}}:void 0),!y){y=!1;for(let t=0;tMath.max(1,t.scrollHeight-t.clientHeight-4)}function M(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&n>0)return{node:i,offset:n};if(1==i.nodeType&&n>0){if("false"==i.contentEditable)return null;i=i.childNodes[n-1],n=p(i)}else{if(!i.parentNode||u(i))return null;n=d(i),i=i.parentNode}}}function O(t,e){for(let i=t,n=e;;){if(3==i.nodeType&&ne)return i.domBoundsAround(t,e,a);if(c>=t&&-1==n&&(n=l,s=a),a>e&&i.dom.parentNode==this.dom){o=l,r=h;break}h=c,a=c+i.breakAfter}return{from:s,to:r<0?i+this.length:r,startDOM:(n?this.children[n-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o=0?this.children[o].dom:null}}markDirty(t=!1){this.flags|=2,this.markParentsDirty(t)}markParentsDirty(t){for(let e=this.parent;e;e=e.parent){if(t&&(e.flags|=2),1&e.flags)return;e.flags|=1,t=!1}}setParent(t){this.parent!=t&&(this.parent=t,7&this.flags&&this.markParentsDirty(!0))}setDOM(t){this.dom!=t&&(this.dom&&(this.dom.cmView=null),this.dom=t,t.cmView=this)}get rootView(){for(let t=this;;){let e=t.parent;if(!e)return t;t=e}}replaceChildren(t,e,i=T){this.markDirty();for(let n=t;nthis.pos||t==this.pos&&(e>0||0==this.i||this.children[this.i-1].breakAfter))return this.off=t-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function B(t,e,i,n,s,o,r,l,a){let{children:h}=t,c=h.length?h[e]:null,d=o.length?o[o.length-1]:null,u=d?d.breakAfter:r;if(!(e==n&&c&&!r&&!u&&o.length<2&&c.merge(i,s,o.length?d:null,0==i,l,a))){if(n0&&(!r&&o.length&&c.merge(i,c.length,o[0],!1,l,0)?c.breakAfter=o.shift().breakAfter:(i2);var $={mac:K||/Mac/.test(I.platform),windows:/Win/.test(I.platform),linux:/Linux|X11/.test(I.platform),ie:z,ie_version:H?N.documentMode||6:V?+V[1]:F?+F[1]:0,gecko:W,gecko_version:W?+(/Firefox\/(\d+)/.exec(I.userAgent)||[0,0])[1]:0,chrome:!!q,chrome_version:q?+q[1]:0,ios:K,android:/Android\b/.test(I.userAgent),webkit:j,safari:_,webkit_version:j?+(/\bAppleWebKit\/(\d+)/.exec(I.userAgent)||[0,0])[1]:0,tabSize:null!=N.documentElement.style.tabSize?"tab-size":"-moz-tab-size"};class U extends E{constructor(t){super(),this.text=t}get length(){return this.text.length}createDOM(t){this.setDOM(t||document.createTextNode(this.text))}sync(t,e){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(e&&e.node==this.dom&&(e.written=!0),this.dom.nodeValue=this.text)}reuseDOM(t){3==t.nodeType&&this.createDOM(t)}merge(t,e,i){return!(8&this.flags||i&&(!(i instanceof U)||this.length-(e-t)+i.length>256||8&i.flags))&&(this.text=this.text.slice(0,t)+(i?i.text:"")+this.text.slice(e),this.markDirty(),!0)}split(t){let e=new U(this.text.slice(t));return this.text=this.text.slice(0,t),this.markDirty(),e.flags|=8&this.flags,e}localPosFromDOM(t,e){return t==this.dom?e:e?this.text.length:0}domAtPos(t){return new D(this.dom,t)}domBoundsAround(t,e,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(t,e){return function(t,e,i){let n=t.nodeValue.length;e>n&&(e=n);let s=e,o=e,r=0;0==e&&i<0||e==n&&i>=0?$.chrome||$.gecko||(e?(s--,r=1):o=0)?0:l.length-1];$.safari&&!r&&0==a.width&&(a=Array.prototype.find.call(l,(t=>t.width))||a);return r?m(a,r<0):a||null}(this.dom,t,e)}}class Y extends E{constructor(t,e=[],i=0){super(),this.mark=t,this.children=e,this.length=i;for(let t of e)t.setParent(this)}setAttrs(t){if(A(t),this.mark.class&&(t.className=this.mark.class),this.mark.attrs)for(let e in this.mark.attrs)t.setAttribute(e,this.mark.attrs[e]);return t}canReuseDOM(t){return super.canReuseDOM(t)&&!(8&(this.flags|t.flags))}reuseDOM(t){t.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(t),this.flags|=6)}sync(t,e){this.dom?4&this.flags&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(t,e)}merge(t,e,i,n,s,o){return(!i||!(!(i instanceof Y&&i.mark.eq(this.mark))||t&&s<=0||et&&e.push(i=t&&(n=s),i=r,s++}let o=this.length-t;return this.length=t,n>-1&&(this.children.length=n,this.markDirty()),new Y(this.mark,e,o)}domAtPos(t){return X(this,t)}coordsAt(t,e){return Q(this,t,e)}}class G extends E{static create(t,e,i){return new G(t,e,i)}constructor(t,e,i){super(),this.widget=t,this.length=e,this.side=i,this.prevWidget=null}split(t){let e=G.create(this.widget,this.length-t,this.side);return this.length-=t,e}sync(t){this.dom&&this.widget.updateDOM(this.dom,t)||(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(t)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(t,e,i,n,s,o){return!(i&&(!(i instanceof G&&this.widget.compare(i.widget))||t>0&&s<=0||e0)?D.before(this.dom):D.after(this.dom,t==this.length)}domBoundsAround(){return null}coordsAt(t,e){let i=this.widget.coordsAt(this.dom,t,e);if(i)return i;let n=this.dom.getClientRects(),s=null;if(!n.length)return null;let o=this.side?this.side<0:t>0;for(let e=o?n.length-1:0;s=n[e],!(t>0?0==e:e==n.length-1||s.top0?D.before(this.dom):D.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(t){return this.dom.getBoundingClientRect()}get overrideDOMText(){return n.EY.empty}get isHidden(){return!0}}function X(t,e){let i=t.dom,{children:n}=t,s=0;for(let t=0;st&&e0;t--){let e=n[t-1];if(e.dom.parentNode==i)return e.domAtPos(e.length)}for(let t=s;t0&&e instanceof Y&&s.length&&(n=s[s.length-1])instanceof Y&&n.mark.eq(e.mark)?Z(n,e.children[0],i-1):(s.push(e),e.setParent(t)),t.length+=e.length}function Q(t,e,i){let n=null,s=-1,o=null,r=-1;!function t(e,l){for(let a=0,h=0;a=l&&(c.children.length?t(c,l-h):(!o||o.isHidden&&i>0)&&(d>l||h==d&&c.getSide()>0)?(o=c,r=l-h):(h-1?1:0)!=s.length-(i&&s.indexOf(i)>-1?1:0))return!1;for(let o of n)if(o!=i&&(-1==s.indexOf(o)||t[o]!==e[o]))return!1;return!0}function nt(t,e,i){let n=!1;if(e)for(let s in e)i&&s in i||(n=!0,"style"==s?t.style.cssText="":t.removeAttribute(s));if(i)for(let s in i)e&&e[s]==i[s]||(n=!0,"style"==s?t.style.cssText=i[s]:t.setAttribute(s,i[s]));return n}function st(t){let e=Object.create(null);for(let i=0;i0?3e8:-4e8:e>0?1e8:-1e8,new ct(t,e,e,i,t.widget||null,!1)}static replace(t){let e,i,n=!!t.block;if(t.isBlockGap)e=-5e8,i=4e8;else{let{start:s,end:o}=dt(t,n);e=(s?n?-3e8:-1:5e8)-1,i=1+(o?n?2e8:1:-6e8)}return new ct(t,e,i,n,t.widget||null,!0)}static line(t){return new ht(t)}static set(t,e=!1){return n.om.of(t,e)}hasHeight(){return!!this.widget&&this.widget.estimatedHeight>-1}}lt.none=n.om.empty;class at extends lt{constructor(t){let{start:e,end:i}=dt(t);super(e?-1:5e8,i?1:-6e8,null,t),this.tagName=t.tagName||"span",this.class=t.class||"",this.attrs=t.attributes||null}eq(t){var e,i;return this==t||t instanceof at&&this.tagName==t.tagName&&(this.class||(null===(e=this.attrs)||void 0===e?void 0:e.class))==(t.class||(null===(i=t.attrs)||void 0===i?void 0:i.class))&&it(this.attrs,t.attrs,"class")}range(t,e=t){if(t>=e)throw new RangeError("Mark decorations may not be empty");return super.range(t,e)}}at.prototype.point=!1;class ht extends lt{constructor(t){super(-2e8,-2e8,null,t)}eq(t){return t instanceof ht&&this.spec.class==t.spec.class&&it(this.spec.attributes,t.spec.attributes)}range(t,e=t){if(e!=t)throw new RangeError("Line decoration ranges must be zero-length");return super.range(t,e)}}ht.prototype.mapMode=n.iR.TrackBefore,ht.prototype.point=!0;class ct extends lt{constructor(t,e,i,s,o,r){super(e,i,o,t),this.block=s,this.isReplace=r,this.mapMode=s?e<=0?n.iR.TrackBefore:n.iR.TrackAfter:n.iR.TrackDel}get type(){return this.startSide!=this.endSide?rt.WidgetRange:this.startSide<=0?rt.WidgetBefore:rt.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(t){return t instanceof ct&&(e=this.widget,i=t.widget,e==i||!!(e&&i&&e.compare(i)))&&this.block==t.block&&this.startSide==t.startSide&&this.endSide==t.endSide;var e,i}range(t,e=t){if(this.isReplace&&(t>e||t==e&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&e!=t)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(t,e)}}function dt(t,e=!1){let{inclusiveStart:i,inclusiveEnd:n}=t;return null==i&&(i=t.inclusive),null==n&&(n=t.inclusive),{start:null!=i?i:e,end:null!=n?n:e}}function ut(t,e,i,n=0){let s=i.length-1;s>=0&&i[s]+n>=t?i[s]=Math.max(i[s],e):i.push(t,e)}ct.prototype.point=!0;class ft extends E{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(t,e,i,n,s,o){if(i){if(!(i instanceof ft))return!1;this.dom||i.transferDOM(this)}return n&&this.setDeco(i?i.attrs:null),P(this,t,e,i?i.children.slice():[],s,o),!0}split(t){let e=new ft;if(e.breakAfter=this.breakAfter,0==this.length)return e;let{i,off:n}=this.childPos(t);n&&(e.append(this.children[i].split(n),0),this.children[i].merge(n,this.children[i].length,null,!1,0,0),i++);for(let t=i;t0&&0==this.children[i-1].length;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=t,e}transferDOM(t){this.dom&&(this.markDirty(),t.setDOM(this.dom),t.prevAttrs=void 0===this.prevAttrs?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(t){it(this.attrs,t)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=t)}append(t,e){Z(this,t,e)}addLineDeco(t){let e=t.spec.attributes,i=t.spec.class;e&&(this.attrs=tt(e,this.attrs||{})),i&&(this.attrs=tt({class:i},this.attrs||{}))}domAtPos(t){return X(this,t)}reuseDOM(t){"DIV"==t.nodeName&&(this.setDOM(t),this.flags|=6)}sync(t,e){var i;this.dom?4&this.flags&&(A(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),void 0!==this.prevAttrs&&(nt(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(t,e);let n=this.dom.lastChild;for(;n&&E.get(n)instanceof Y;)n=n.lastChild;if(!(n&&this.length&&("BR"==n.nodeName||0!=(null===(i=E.get(n))||void 0===i?void 0:i.isEditable)||$.ios&&this.children.some((t=>t instanceof U))))){let t=document.createElement("BR");t.cmIgnore=!0,this.dom.appendChild(t)}}measureTextSize(){if(0==this.children.length||this.length>20)return null;let t,e=0;for(let i of this.children){if(!(i instanceof U)||/[^ -~]/.test(i.text))return null;let n=h(i.dom);if(1!=n.length)return null;e+=n[0].width,t=n[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:t}:null}coordsAt(t,e){let i=Q(this,t,e);if(!this.children.length&&i&&this.parent){let{heightOracle:t}=this.parent.view.viewState,e=i.bottom-i.top;if(Math.abs(e-t.lineHeight)<2&&t.textHeight=e){if(s instanceof ft)return s;if(o>e)break}n=o+s.breakAfter}return null}}class pt extends E{constructor(t,e,i){super(),this.widget=t,this.length=e,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(t,e,i,n,s,o){return!(i&&(!(i instanceof pt&&this.widget.compare(i.widget))||t>0&&s<=0||e0)}}class mt extends ot{constructor(t){super(),this.height=t}toDOM(){let t=document.createElement("div");return t.className="cm-gap",this.updateDOM(t),t}eq(t){return t.height==this.height}updateDOM(t){return t.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class gt{constructor(t,e,i,n){this.doc=t,this.pos=e,this.end=i,this.disallowBlockEffectsFor=n,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=t.iter(),this.skip=e}posCovered(){if(0==this.content.length)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let t=this.content[this.content.length-1];return!(t.breakAfter||t instanceof pt&&t.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new ft),this.atCursorPos=!0),this.curLine}flushBuffer(t=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(vt(new J(-1),t),t.length),this.pendingBuffer=0)}addBlockWidget(t){this.flushBuffer(),this.curLine=null,this.content.push(t)}finish(t){this.pendingBuffer&&t<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,this.posCovered()||t&&this.content.length&&this.content[this.content.length-1]instanceof pt||this.getLine()}buildText(t,e,i){for(;t>0;){if(this.textOff==this.text.length){let{value:e,lineBreak:i,done:n}=this.cursor.next(this.skip);if(this.skip=0,n)throw new Error("Ran out of text content when drawing inline views");if(i){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,t--;continue}this.text=e,this.textOff=0}let n=Math.min(this.text.length-this.textOff,t,512);this.flushBuffer(e.slice(e.length-i)),this.getLine().append(vt(new U(this.text.slice(this.textOff,this.textOff+n)),e),i),this.atCursorPos=!0,this.textOff+=n,t-=n,i=0}}span(t,e,i,n){this.buildText(e-t,i,n),this.pos=e,this.openStart<0&&(this.openStart=n)}point(t,e,i,n,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof ct){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(e>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let r=e-t;if(i instanceof ct)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new pt(i.widget||wt.block,r,i));else{let o=G.create(i.widget||wt.inline,r,r?0:i.startSide),l=this.atCursorPos&&!o.isEditable&&s<=n.length&&(t0),a=!o.isEditable&&(tn.length||i.startSide<=0),h=this.getLine();2!=this.pendingBuffer||l||o.isEditable||(this.pendingBuffer=0),this.flushBuffer(n),l&&(h.append(vt(new J(1),n),s),s=n.length+Math.max(0,s-n.length)),h.append(vt(o,n),s),this.atCursorPos=a,this.pendingBuffer=a?tn.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=n.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);r&&(this.textOff+r<=this.text.length?this.textOff+=r:(this.skip+=r-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=e),this.openStart<0&&(this.openStart=s)}static build(t,e,i,s,o){let r=new gt(t,e,i,o);return r.openEnd=n.om.spans(s,e,i,r),r.openStart<0&&(r.openStart=r.openEnd),r.finish(r.openEnd),r}}function vt(t,e){for(let i of e)t=new Y(i,[t],t.length);return t}class wt extends ot{constructor(t){super(),this.tag=t}eq(t){return t.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(t){return t.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}wt.inline=new wt("span"),wt.block=new wt("div");var bt=function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t}(bt||(bt={}));const yt=bt.LTR,xt=bt.RTL;function kt(t){let e=[];for(let i=0;i=e){if(r.level==i)return o;(s<0||(0!=n?n<0?r.frome:t[s].level>r.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function Et(t,e){if(t.length!=e.length)return!1;for(let i=0;ia&&r.push(new Tt(a,p.from,u)),Bt(t,p.direction==yt!=!(u%2)?n+1:n,s,p.inner,p.from,p.to,r),a=p.to}f=p.to}else{if(f==i||(e?Rt[f]!=l:Rt[f]==l))break;f++}d?Lt(t,a,f,n+1,s,d,r):ae;){let i=!0,c=!1;if(!h||a>o[h-1].to){let t=Rt[a-1];t!=l&&(i=!1,c=16==t)}let d=i||1!=l?null:[],u=i?n:n+1,f=a;t:for(;;)if(h&&f==o[h-1].to){if(c)break t;let p=o[--h];if(!i)for(let t=p.from,i=h;;){if(t==e)break t;if(!i||o[i-1].to!=t){if(Rt[t-1]==l)break t;break}t=o[--i].from}if(d)d.push(p);else{p.to=0;t-=3)if(Mt[t+1]==-i){let e=Mt[t+2],i=2&e?s:4&e?1&e?o:s:0;i&&(Rt[r]=Rt[Mt[t]]=i),l=t;break}}else{if(189==Mt.length)break;Mt[l++]=r,Mt[l++]=e,Mt[l++]=a}else if(2==(n=Rt[r])||1==n){let t=n==s;a=t?0:1;for(let e=l-3;e>=0;e-=3){let i=Mt[e+2];if(2&i)break;if(t)Mt[e+2]|=2;else{if(4&i)break;Mt[e+2]|=4}}}}}(t,s,o,n,l),function(t,e,i,n){for(let s=0,o=n;s<=i.length;s++){let r=s?i[s-1].to:t,l=sa;)e==o&&(e=i[--n].from,o=n?i[n-1].to:t),Rt[--e]=c;a=r}else o=r,a++}}}(s,o,n,l),Lt(t,s,o,e,i,n,r)}function Pt(t,e,i){if(!t)return[new Tt(0,0,e==xt?1:0)];if(e==yt&&!i.length&&!Dt.test(t))return It(t.length);if(i.length)for(;t.length>Rt.length;)Rt[Rt.length]=256;let n=[],s=e==yt?0:1;return Bt(t,s,s,i,0,t.length,n),n}function It(t){return[new Tt(0,t,0)]}let Nt="";function Ft(t,e,i,s,o){var r;let l=s.head-t.from,a=Tt.find(e,l,null!==(r=s.bidiLevel)&&void 0!==r?r:-1,s.assoc),h=e[a],c=h.side(o,i);if(l==c){let t=a+=o?1:-1;if(t<0||t>=e.length)return null;h=e[a=t],l=h.side(!o,i),c=h.side(o,i)}let d=(0,n.zK)(t.text,l,h.forward(o,i));(dh.to)&&(d=c),Nt=t.text.slice(Math.min(l,d),Math.max(l,d));let u=a==(o?e.length-1:0)?null:e[a+(o?1:-1)];return u&&d==c&&u.level+(o?0:1)t.some((t=>t))}),Gt=n.sj.define({combine:t=>t.some((t=>t))}),Jt=n.sj.define();class Xt{constructor(t,e="nearest",i="nearest",n=5,s=5,o=!1){this.range=t,this.y=e,this.x=i,this.yMargin=n,this.xMargin=s,this.isSnapshot=o}map(t){return t.empty?this:new Xt(this.range.map(t),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(t){return this.range.to<=t.doc.length?this:new Xt(n.OF.cursor(t.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Zt=n.Pe.define({map:(t,e)=>t.map(e)}),Qt=n.Pe.define();function te(t,e,i){let n=t.facet(qt);n.length?n[0](e):window.onerror?window.onerror(String(e),i,void 0,void 0,e):i?console.error(i+":",e):console.error(e)}const ee=n.sj.define({combine:t=>!t.length||t[0]});let ie=0;const ne=n.sj.define();class se{constructor(t,e,i,n,s){this.id=t,this.create=e,this.domEventHandlers=i,this.domEventObservers=n,this.extension=s(this)}static define(t,e){const{eventHandlers:i,eventObservers:n,provide:s,decorations:o}=e||{};return new se(ie++,t,i,n,(t=>{let e=[ne.of(t)];return o&&e.push(ae.of((e=>{let i=e.plugin(t);return i?o(i):lt.none}))),s&&e.push(s(t)),e}))}static fromClass(t,e){return se.define((e=>new t(e)),e)}}class oe{constructor(t){this.spec=t,this.mustUpdate=null,this.value=null}update(t){if(this.value){if(this.mustUpdate){let t=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(t)}catch(e){if(te(t.state,e,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch(t){}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.create(t)}catch(e){te(t.state,e,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(t){var e;if(null===(e=this.value)||void 0===e?void 0:e.destroy)try{this.value.destroy()}catch(e){te(t.state,e,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const re=n.sj.define(),le=n.sj.define(),ae=n.sj.define(),he=n.sj.define(),ce=n.sj.define(),de=n.sj.define();function ue(t,e){let i=t.state.facet(de);if(!i.length)return i;let s=i.map((e=>e instanceof Function?e(t):e)),o=[];return n.om.spans(s,e.from,e.to,{point(){},span(t,i,n,s){let r=t-e.from,l=i-e.from,a=o;for(let t=n.length-1;t>=0;t--,s--){let i,o=n[t].spec.bidiIsolate;if(null==o&&(o=Ht(e.text,r,l)),s>0&&a.length&&(i=a[a.length-1]).to==r&&i.direction==o)i.to=l,a=i.inner;else{let t={from:r,to:l,direction:o,inner:[]};a.push(t),a=t.inner}}}}),o}const fe=n.sj.define();function pe(t){let e=0,i=0,n=0,s=0;for(let o of t.state.facet(fe)){let r=o(t);r&&(null!=r.left&&(e=Math.max(e,r.left)),null!=r.right&&(i=Math.max(i,r.right)),null!=r.top&&(n=Math.max(n,r.top)),null!=r.bottom&&(s=Math.max(s,r.bottom)))}return{left:e,right:i,top:n,bottom:s}}const me=n.sj.define();class ge{constructor(t,e,i,n){this.fromA=t,this.toA=e,this.fromB=i,this.toB=n}join(t){return new ge(Math.min(this.fromA,t.fromA),Math.max(this.toA,t.toA),Math.min(this.fromB,t.fromB),Math.max(this.toB,t.toB))}addToSet(t){let e=t.length,i=this;for(;e>0;e--){let n=t[e-1];if(!(n.fromA>i.toA)){if(n.toAh)break;s+=2}if(!l)return i;new ge(l.fromA,l.toA,l.fromB,l.toB).addToSet(i),o=l.toA,r=l.toB}}}class ve{constructor(t,e,i){this.view=t,this.state=e,this.transactions=i,this.flags=0,this.startState=t.state,this.changes=n.VR.empty(this.startState.doc.length);for(let t of i)this.changes=this.changes.compose(t.changes);let s=[];this.changes.iterChangedRanges(((t,e,i,n)=>s.push(new ge(t,e,i,n)))),this.changedRanges=s}static create(t,e,i){return new ve(t,e,i)}get viewportChanged(){return(4&this.flags)>0}get heightChanged(){return(2&this.flags)>0}get geometryChanged(){return this.docChanged||(10&this.flags)>0}get focusChanged(){return(1&this.flags)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some((t=>t.selection))}get empty(){return 0==this.flags&&0==this.transactions.length}}class we extends E{get length(){return this.view.state.doc.length}constructor(t){super(),this.view=t,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=lt.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(t.contentDOM),this.children=[new ft],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new ge(0,0,0,t.state.doc.length)],0,null)}update(t){var e;let i=t.changedRanges;this.minWidth>0&&i.length&&(i.every((({fromA:t,toA:e})=>ethis.minWidthTo))?(this.minWidthFrom=t.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=t.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(t);let s=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&((null===(e=this.domChanged)||void 0===e?void 0:e.newSel)?s=this.domChanged.newSel.head:function(t,e){let i=!1;e&&t.iterChangedRanges(((t,n)=>{te.from&&(i=!0)}));return i}(t.changes,this.hasComposition)||t.selectionSet||(s=t.state.selection.main.head));let o=s>-1?function(t,e,i){let n=be(t,i);if(!n)return null;let{node:s,from:o,to:r}=n,l=s.nodeValue;if(/[\n\r]/.test(l))return null;if(t.state.doc.sliceString(n.from,n.to)!=l)return null;let a=e.invertedDesc,h=new ge(a.mapPos(o),a.mapPos(r),o,r),c=[];for(let e=s.parentNode;;e=e.parentNode){let i=E.get(e);if(i instanceof Y)c.push({node:e,deco:i.mark});else{if(i instanceof ft||"DIV"==e.nodeName&&e.parentNode==t.contentDOM)return{range:h,text:s,marks:c,line:e};if(e==t.contentDOM)return null;c.push({node:e,deco:new at({inclusive:!0,attributes:st(e),tagName:e.tagName.toLowerCase()})})}}}(this.view,t.changes,s):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:e,to:n}=this.hasComposition;i=new ge(e,n,t.changes.mapPos(e,-1),t.changes.mapPos(n,1)).addToSet(i.slice())}this.hasComposition=o?{from:o.range.fromB,to:o.range.toB}:null,($.ie||$.chrome)&&!o&&t&&t.state.doc.lines!=t.startState.doc.lines&&(this.forceSelection=!0);let r=function(t,e,i){let s=new ye;return n.om.compare(t,e,i,s),s.changes}(this.decorations,this.updateDeco(),t.changes);return i=ge.extendWithRanges(i,r),!!(7&this.flags||0!=i.length)&&(this.updateInner(i,t.startState.doc.length,o),t.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(t,e,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(t,e,i);let{observer:n}=this.view;n.ignore((()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let t=$.chrome||$.ios?{node:n.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,t),this.flags&=-8,t&&(t.written||n.selectionRange.focusNode!=t.node)&&(this.forceSelection=!0),this.dom.style.height=""})),this.markedForComposition.forEach((t=>t.flags&=-9));let s=[];if(this.view.viewport.from||this.view.viewport.to=0?n[t]:null;if(!e)break;let o,r,l,a,{fromA:h,toA:c,fromB:d,toB:u}=e;if(i&&i.range.fromBd){let t=gt.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),e=gt.build(this.view.state.doc,i.range.toB,u,this.decorations,this.dynamicDecorationMap);r=t.breakAtStart,l=t.openStart,a=e.openEnd;let n=this.compositionView(i);e.breakAtStart?n.breakAfter=1:e.content.length&&n.merge(n.length,n.length,e.content[0],!1,e.openStart,0)&&(n.breakAfter=e.content[0].breakAfter,e.content.shift()),t.content.length&&n.merge(0,0,t.content[t.content.length-1],!0,0,t.openEnd)&&t.content.pop(),o=t.content.concat(n).concat(e.content)}else({content:o,breakAtStart:r,openStart:l,openEnd:a}=gt.build(this.view.state.doc,d,u,this.decorations,this.dynamicDecorationMap));let{i:f,off:p}=s.findPos(c,1),{i:m,off:g}=s.findPos(h,-1);B(this,m,g,f,p,o,r,l,a)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(t){this.editContextFormatting=this.editContextFormatting.map(t.changes);for(let e of t.transactions)for(let t of e.effects)t.is(Qt)&&(this.editContextFormatting=t.value)}compositionView(t){let e=new U(t.text.nodeValue);e.flags|=8;for(let{deco:i}of t.marks)e=new Y(i,[e],e.length);let i=new ft;return i.append(e,0),i}fixCompositionDOM(t){let e=(t,e)=>{e.flags|=8|(e.children.some((t=>7&t.flags))?1:0),this.markedForComposition.add(e);let i=E.get(t);i&&i!=e&&(i.dom=null),e.setDOM(t)},i=this.childPos(t.range.fromB,1),n=this.children[i.i];e(t.line,n);for(let s=t.marks.length-1;s>=-1;s--)i=n.childPos(i.off,1),n=n.children[i.i],e(s>=0?t.marks[s].node:t.text,n)}updateSelection(t=!1,e=!1){!t&&this.view.observer.selectionRange.focusNode||this.view.observer.readSelectionRange();let i=this.view.root.activeElement,n=i==this.dom,s=!n&&a(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(n||e||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,h=this.moveToLine(this.domAtPos(l.anchor)),d=l.empty?h:this.moveToLine(this.domAtPos(l.head));if($.gecko&&l.empty&&!this.hasComposition&&(1==(u=h).node.nodeType&&u.node.firstChild&&(0==u.offset||"false"==u.node.childNodes[u.offset-1].contentEditable)&&(u.offset==u.node.childNodes.length||"false"==u.node.childNodes[u.offset].contentEditable))){let t=document.createTextNode("");this.view.observer.ignore((()=>h.node.insertBefore(t,h.node.childNodes[h.offset]||null))),h=d=new D(t,0),o=!0}var u;let f=this.view.observer.selectionRange;!o&&f.focusNode&&(c(h.node,h.offset,f.anchorNode,f.anchorOffset)&&c(d.node,d.offset,f.focusNode,f.focusOffset)||this.suppressWidgetCursorChange(f,l))||(this.view.observer.ignore((()=>{$.android&&$.chrome&&this.dom.contains(f.focusNode)&&function(t,e){for(let i=t;i&&i!=e;i=i.assignedSlot||i.parentNode)if(1==i.nodeType&&"false"==i.contentEditable)return!0;return!1}(f.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let t=r(this.view.root);if(t)if(l.empty){if($.gecko){let t=(e=h.node,n=h.offset,1!=e.nodeType?0:(n&&"false"==e.childNodes[n-1].contentEditable?1:0)|(nl.head&&([h,d]=[d,h]),e.setEnd(d.node,d.offset),e.setStart(h.node,h.offset),t.removeAllRanges(),t.addRange(e)}else;var e,n;s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())})),this.view.observer.setSelectionRange(h,d)),this.impreciseAnchor=h.precise?null:new D(f.anchorNode,f.anchorOffset),this.impreciseHead=d.precise?null:new D(f.focusNode,f.focusOffset)}suppressWidgetCursorChange(t,e){return this.hasComposition&&e.empty&&c(t.focusNode,t.focusOffset,t.anchorNode,t.anchorOffset)&&this.posFromDOM(t.focusNode,t.focusOffset)==e.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:t}=this,e=t.state.selection.main,i=r(t.root),{anchorNode:n,anchorOffset:s}=t.observer.selectionRange;if(!(i&&e.empty&&e.assoc&&i.modify))return;let o=ft.find(this,e.head);if(!o)return;let l=o.posAtStart;if(e.head==l||e.head==l+o.length)return;let a=this.coordsAt(e.head,-1),h=this.coordsAt(e.head,1);if(!a||!h||a.bottom>h.top)return;let c=this.domAtPos(e.head+e.assoc);i.collapse(c.node,c.offset),i.modify("move",e.assoc<0?"forward":"backward","lineboundary"),t.observer.readSelectionRange();let d=t.observer.selectionRange;t.docView.posFromDOM(d.anchorNode,d.anchorOffset)!=e.from&&i.collapse(n,s)}moveToLine(t){let e,i=this.dom;if(t.node!=i)return t;for(let n=t.offset;!e&&n=0;n--){let t=E.get(i.childNodes[n]);t instanceof ft&&(e=t.domAtPos(t.length))}return e?new D(e.node,e.offset,!0):t}nearest(t){for(let e=t;e;){let t=E.get(e);if(t&&t.rootView==this)return t;e=e.parentNode}return null}posFromDOM(t,e){let i=this.nearest(t);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(t,e)+i.posAtStart}domAtPos(t){let{i:e,off:i}=this.childCursor().findPos(t,-1);for(;e=0;o--){let r=this.children[o],l=s-r.breakAfter,a=l-r.length;if(lt||r.covers(1))&&(!i||r instanceof ft&&!(i instanceof ft&&e>=0)))i=r,n=a;else if(i&&a==t&&l==t&&r instanceof pt&&Math.abs(e)<2){if(r.deco.startSide<0)break;o&&(i=null)}s=a}return i?i.coordsAt(t-n,e):null}coordsForChar(t){let{i:e,off:i}=this.childPos(t,1),s=this.children[e];if(!(s instanceof ft))return null;for(;s.children.length;){let{i:t,off:e}=s.childPos(i,1);for(;;t++){if(t==s.children.length)return null;if((s=s.children[t]).length)break}i=e}if(!(s instanceof U))return null;let o=(0,n.zK)(s.text,i);if(o==i)return null;let r=k(s.dom,i,o).getClientRects();for(let t=0;tMath.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,r=-1,l=this.view.textDirection==bt.LTR;for(let t=0,a=0;an)break;if(t>=i){let i=c.dom.getBoundingClientRect();if(e.push(i.height),o){let e=c.dom.lastChild,n=e?h(e):[];if(n.length){let e=n[n.length-1],o=l?e.right-i.left:i.right-e.left;o>r&&(r=o,this.minWidth=s,this.minWidthFrom=t,this.minWidthTo=d)}}}t=d+c.breakAfter}return e}textDirectionAt(t){let{i:e}=this.childPos(t,1);return"rtl"==getComputedStyle(this.children[e].dom).direction?bt.RTL:bt.LTR}measureTextSize(){for(let t of this.children)if(t instanceof ft){let e=t.measureTextSize();if(e)return e}let t,e,i,n=document.createElement("div");return n.className="cm-line",n.style.width="99999px",n.style.position="absolute",n.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore((()=>{this.dom.appendChild(n);let s=h(n.firstChild)[0];t=n.getBoundingClientRect().height,e=s?s.width/27:7,i=s?s.height:t,n.remove()})),{lineHeight:t,charWidth:e,textHeight:i}}childCursor(t=this.length){let e=this.children.length;return e&&(t-=this.children[--e].length),new L(this.children,t,e)}computeBlockGapDeco(){let t=[],e=this.view.viewState;for(let i=0,n=0;;n++){let s=n==e.viewports.length?null:e.viewports[n],o=s?s.from-1:this.length;if(o>i){let n=(e.lineBlockAt(o).bottom-e.lineBlockAt(i).top)/this.view.scaleY;t.push(lt.replace({widget:new mt(n),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return lt.set(t)}updateDeco(){let t=1,e=this.view.state.facet(ae).map((e=>(this.dynamicDecorationMap[t++]="function"==typeof e)?e(this.view):e)),i=!1,s=this.view.state.facet(he).map(((t,e)=>{let n="function"==typeof t;return n&&(i=!0),n?t(this.view):t}));for(s.length&&(this.dynamicDecorationMap[t++]=i,e.push(n.om.join(s))),this.decorations=[this.editContextFormatting,...e,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];ti.anchor?-1:1);if(!n)return;!i.empty&&(e=this.coordsAt(i.anchor,i.anchor>i.head?-1:1))&&(n={left:Math.min(n.left,e.left),top:Math.min(n.top,e.top),right:Math.max(n.right,e.right),bottom:Math.max(n.bottom,e.bottom)});let s=pe(this.view),o={left:n.left-s.left,top:n.top-s.top,right:n.right+s.right,bottom:n.bottom+s.bottom},{offsetWidth:r,offsetHeight:l}=this.view.scrollDOM;!function(t,e,i,n,s,o,r,l){let a=t.ownerDocument,h=a.defaultView||window;for(let c=t,d=!1;c&&!d;)if(1==c.nodeType){let t,u=c==a.body,f=1,p=1;if(u)t=g(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(c).position)&&(d=!0),c.scrollHeight<=c.clientHeight&&c.scrollWidth<=c.clientWidth){c=c.assignedSlot||c.parentNode;continue}let e=c.getBoundingClientRect();({scaleX:f,scaleY:p}=v(c,e)),t={left:e.left,right:e.left+c.clientWidth*f,top:e.top,bottom:e.top+c.clientHeight*p}}let m=0,w=0;if("nearest"==s)e.top0&&e.bottom>t.bottom+w&&(w=e.bottom-t.bottom+w+r)):e.bottom>t.bottom&&(w=e.bottom-t.bottom+r,i<0&&e.top-w0&&e.right>t.right+m&&(m=e.right-t.right+m+o)):e.right>t.right&&(m=e.right-t.right+o,i<0&&e.leftt?e.left-t:Math.max(0,t-e.right)}function ke(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Se(t,e){return t.tope.top+1}function Ae(t,e){return et.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function Me(t,e,i){let n,s,o,r,l,a,c,d,u=!1;for(let f=t.firstChild;f;f=f.nextSibling){let t=h(f);for(let h=0;hg||r==g&&o>m){n=f,s=p,o=m,r=g;let l=g?i0?h0)}0==m?i>p.bottom&&(!c||c.bottomp.top)&&(a=f,d=p):c&&Se(c,p)?c=Ce(c,p.bottom):d&&Se(d,p)&&(d=Ae(d,p.top))}}if(c&&c.bottom>=i?(n=l,s=c):d&&d.top<=i&&(n=a,s=d),!n)return{node:t,offset:0};let f=Math.max(s.left,Math.min(s.right,e));return 3==n.nodeType?Oe(n,f,i):u&&"false"!=n.contentEditable?Me(n,f,i):{node:t,offset:Array.prototype.indexOf.call(t.childNodes,n)+(e>=(s.left+s.right)/2?1:0)}}function Oe(t,e,i){let n=t.nodeValue.length,s=-1,o=1e9,r=0;for(let l=0;li?h.top-i:i-h.bottom)-1;if(h.left-1<=e&&h.right+1>=e&&c=(h.left+h.right)/2,n=i;if($.chrome||$.gecko){k(t,l).getBoundingClientRect().left==h.right&&(n=!i)}if(c<=0)return{node:t,offset:l+(n?1:0)};s=l+(n?1:0),o=c}}}return{node:t,offset:s>-1?s:r>0?t.nodeValue.length:0}}function De(t,e,i,n=-1){var s,o;let r,l=t.contentDOM.getBoundingClientRect(),a=l.top+t.viewState.paddingTop,{docHeight:h}=t.viewState,{x:c,y:d}=e,u=d-a;if(u<0)return 0;if(u>h)return t.state.doc.length;for(let e=t.viewState.heightOracle.textHeight/2,s=!1;r=t.elementAtHeight(u),r.type!=rt.Text;)for(;u=n>0?r.bottom+e:r.top-e,!(u>=0&&u<=h);){if(s)return i?null:0;s=!0,n=-n}d=a+u;let f=r.from;if(ft.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:i?null:Te(t,l,r,c,d);let m=t.dom.ownerDocument,g=t.root.elementFromPoint?t.root:m,v=g.elementFromPoint(c,d);v&&!t.contentDOM.contains(v)&&(v=null),v||(c=Math.max(l.left+1,Math.min(l.right-1,c)),v=g.elementFromPoint(c,d),v&&!t.contentDOM.contains(v)&&(v=null));let w,b=-1;if(v&&0!=(null===(s=t.docView.nearest(v))||void 0===s?void 0:s.isEditable)){if(m.caretPositionFromPoint){let t=m.caretPositionFromPoint(c,d);t&&({offsetNode:w,offset:b}=t)}else if(m.caretRangeFromPoint){let e=m.caretRangeFromPoint(c,d);e&&(({startContainer:w,startOffset:b}=e),(!t.contentDOM.contains(w)||$.safari&&function(t,e,i){let n;if(3!=t.nodeType||e!=(n=t.nodeValue.length))return!1;for(let e=t.nextSibling;e;e=e.nextSibling)if(1!=e.nodeType||"BR"!=e.nodeName)return!1;return k(t,n-1,n).getBoundingClientRect().left>i}(w,b,c)||$.chrome&&function(t,e,i){if(0!=e)return!1;for(let e=t;;){let t=e.parentNode;if(!t||1!=t.nodeType||t.firstChild!=e)return!1;if(t.classList.contains("cm-line"))break;e=t}let n=1==t.nodeType?t.getBoundingClientRect():k(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return i-n.left>5}(w,b,c))&&(w=void 0))}w&&(b=Math.min(p(w),b))}if(!w||!t.docView.dom.contains(w)){let e=ft.find(t.docView,f);if(!e)return u>r.top+r.height/2?r.to:r.from;({node:w,offset:b}=Me(e.dom,c,d))}let y=t.docView.nearest(w);if(!y)return null;if(y.isWidget&&1==(null===(o=y.dom)||void 0===o?void 0:o.nodeType)){let t=y.dom.getBoundingClientRect();return e.y1.5*t.defaultLineHeight){let e=t.viewState.heightOracle.textHeight;r+=Math.floor((o-i.top-.5*(t.defaultLineHeight-e))/e)*t.viewState.heightOracle.lineLength}let l=t.state.sliceDoc(i.from,i.to);return i.from+(0,n.kn)(l,r,t.state.tabSize)}function Ee(t,e){let i=t.lineBlockAt(e);if(Array.isArray(i.type))for(let t of i.type)if(t.to>e||t.to==e&&(t.to==i.to||t.type==rt.Text))return t;return i}function Re(t,e,i,n){let s=t.state.doc.lineAt(e.head),o=t.bidiSpans(s),r=t.textDirectionAt(s.from);for(let l=e,a=null;;){let e=Ft(s,o,r,l,i),h=Nt;if(!e){if(s.number==(i?t.state.doc.lines:1))return l;h="\n",s=t.state.doc.line(s.number+(i?1:-1)),o=t.bidiSpans(s),e=t.visualLineSide(s,!i)}if(a){if(!a(h))return l}else{if(!n)return e;a=n(h)}l=e}}function Le(t,e,i){for(;;){let n=0;for(let s of t)s.between(e-1,e+1,((t,s,o)=>{if(e>t&&ee(t))),i.from,e.head>i.from?-1:1);return s==i.from?i:n.OF.cursor(s,st)&&this.lineBreak(),n=s}return this.findPointBefore(i,e),this}readTextNode(t){let e=t.nodeValue;for(let i of this.points)i.node==t&&(i.pos=this.text.length+Math.min(i.offset,e.length));for(let i=0,n=this.lineSeparator?null:/\r\n?|\n/g;;){let s,o=-1,r=1;if(this.lineSeparator?(o=e.indexOf(this.lineSeparator,i),r=this.lineSeparator.length):(s=n.exec(e))&&(o=s.index,r=s[0].length),this.append(e.slice(i,o<0?e.length:o)),o<0)break;if(this.lineBreak(),r>1)for(let e of this.points)e.node==t&&e.pos>this.text.length&&(e.pos-=r-1);i=o+r}}readNode(t){if(t.cmIgnore)return;let e=E.get(t),i=e&&e.overrideDOMText;if(null!=i){this.findPointInside(t,i.length);for(let t=i.iter();!t.next().done;)t.lineBreak?this.lineBreak():this.append(t.value)}else 3==t.nodeType?this.readTextNode(t):"BR"==t.nodeName?t.nextSibling&&this.lineBreak():1==t.nodeType&&this.readRange(t.firstChild,null)}findPointBefore(t,e){for(let i of this.points)i.node==t&&t.childNodes[i.offset]==e&&(i.pos=this.text.length)}findPointInside(t,e){for(let i of this.points)(3==t.nodeType?i.node==t:t.contains(i.node))&&(i.pos=this.text.length+(Ne(t,i.node,i.offset)?e:0))}}function Ne(t,e,i){for(;;){if(!e||i-1;let{impreciseHead:o,impreciseAnchor:r}=t.docView;if(t.state.readOnly&&e>-1)this.newSel=null;else if(e>-1&&(this.bounds=t.docView.domBoundsAround(e,i,0))){let e=o||r?[]:function(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:o}=t.observer.selectionRange;i&&(e.push(new Fe(i,n)),s==i&&o==n||e.push(new Fe(s,o)));return e}(t),i=new Ie(e,t.state);i.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=i.text,this.newSel=function(t,e){if(0==t.length)return null;let i=t[0].pos,s=2==t.length?t[1].pos:i;return i>-1&&s>-1?n.OF.single(i+e,s+e):null}(e,this.bounds.from)}else{let e=t.observer.selectionRange,i=o&&o.node==e.focusNode&&o.offset==e.focusOffset||!l(t.contentDOM,e.focusNode)?t.state.selection.main.head:t.docView.posFromDOM(e.focusNode,e.focusOffset),s=r&&r.node==e.anchorNode&&r.offset==e.anchorOffset||!l(t.contentDOM,e.anchorNode)?t.state.selection.main.anchor:t.docView.posFromDOM(e.anchorNode,e.anchorOffset),a=t.viewport;if(($.ios||$.chrome)&&t.state.selection.main.empty&&i!=s&&(a.from>0||a.toDate.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:s,to:l}=e.bounds,a=o.from,h=null;(8===r||$.android&&e.text.length0&&l>0&&t.charCodeAt(r-1)==e.charCodeAt(l-1);)r--,l--;if("end"==n){i-=r+Math.max(0,o-Math.min(r,l))-o}if(r=r?o-i:0,l=o+(l-r),r=o}else if(l=l?o-i:0,r=o+(r-l),l=o}return{from:o,toA:r,toB:l}}(t.state.doc.sliceString(s,l,Pe),e.text,a-s,h);c&&($.chrome&&13==r&&c.toB==c.from+2&&e.text.slice(c.from,c.toB)==Pe+Pe&&c.toB--,i={from:s+c.from,to:s+c.toA,insert:n.EY.of(e.text.slice(c.from,c.toB).split(Pe))})}else s&&(!t.hasFocus&&t.state.facet(ee)||s.main.eq(o))&&(s=null);if(!i&&!s)return!1;if(!i&&e.typeOver&&!o.empty&&s&&s.main.empty?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,o.to)}:i&&i.from>=o.from&&i.to<=o.to&&(i.from!=o.from||i.to!=o.to)&&o.to-o.from-(i.to-i.from)<=4?i={from:o.from,to:o.to,insert:t.state.doc.slice(o.from,i.from).append(i.insert).append(t.state.doc.slice(i.to,o.to))}:($.mac||$.android)&&i&&i.from==i.to&&i.from==o.head-1&&/^\. ?$/.test(i.insert.toString())&&"off"==t.contentDOM.getAttribute("autocorrect")?(s&&2==i.insert.length&&(s=n.OF.single(s.main.anchor-1,s.main.head-1)),i={from:o.from,to:o.to,insert:n.EY.of([" "])}):$.chrome&&i&&i.from==i.to&&i.from==o.head&&"\n "==i.insert.toString()&&t.lineWrapping&&(s&&(s=n.OF.single(s.main.anchor-1,s.main.head-1)),i={from:o.from,to:o.to,insert:n.EY.of([" "])}),i)return ze(t,i,s,r);if(s&&!s.main.eq(o)){let e=!1,i="select";return t.inputState.lastSelectionTime>Date.now()-50&&("select"==t.inputState.lastSelectionOrigin&&(e=!0),i=t.inputState.lastSelectionOrigin),t.dispatch({selection:s,scrollIntoView:e,userEvent:i}),!0}return!1}function ze(t,e,i,s=-1){if($.ios&&t.inputState.flushIOSKey(e))return!0;let o=t.state.selection.main;if($.android&&(e.to==o.to&&(e.from==o.from||e.from==o.from-1&&" "==t.state.sliceDoc(e.from,o.from))&&1==e.insert.length&&2==e.insert.lines&&S(t.contentDOM,"Enter",13)||(e.from==o.from-1&&e.to==o.to&&0==e.insert.length||8==s&&e.insert.lengtho.head)&&S(t.contentDOM,"Backspace",8)||e.from==o.from&&e.to==o.to+1&&0==e.insert.length&&S(t.contentDOM,"Delete",46)))return!0;let r,l=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let a=()=>r||(r=function(t,e,i){let s,o=t.state,r=o.selection.main;if(e.from>=r.from&&e.to<=r.to&&e.to-e.from>=(r.to-r.from)/3&&(!i||i.main.empty&&i.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let i=r.frome.to?o.sliceDoc(e.to,r.to):"";s=o.replaceSelection(t.state.toText(i+e.insert.sliceString(0,void 0,t.state.lineBreak)+n))}else{let l=o.changes(e),a=i&&i.main.to<=l.newLength?i.main:void 0;if(o.selection.ranges.length>1&&t.inputState.composing>=0&&e.to<=r.to&&e.to>=r.to-10){let h,c=t.state.sliceDoc(e.from,e.to),d=i&&be(t,i.main.head);if(d){let t=e.insert.length-(e.to-e.from);h={from:d.from,to:d.to-t}}else h=t.state.doc.lineAt(r.head);let u=r.to-e.to,f=r.to-r.from;s=o.changeByRange((i=>{if(i.from==r.from&&i.to==r.to)return{changes:l,range:a||i.map(l)};let s=i.to-u,d=s-c.length;if(i.to-i.from!=f||t.state.sliceDoc(d,s)!=c||i.to>=h.from&&i.from<=h.to)return{range:i};let p=o.changes({from:d,to:s,insert:e.insert}),m=i.to-r.to;return{changes:p,range:a?n.OF.range(Math.max(0,a.anchor+m),Math.max(0,a.head+m)):i.map(p)}}))}else s={changes:l,selection:a&&o.selection.replaceRange(a)}}let l="input.type";(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1));return o.update(s,{userEvent:l,scrollIntoView:!0})}(t,e,i));return t.state.facet(_t).some((i=>i(t,e.from,e.to,l,a)))||t.dispatch(a()),!0}class We{setSelectionOrigin(t){this.lastSelectionOrigin=t,this.lastSelectionTime=Date.now()}constructor(t){this.view=t,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=t.hasFocus,$.safari&&t.contentDOM.addEventListener("input",(()=>null)),$.gecko&&function(t){pi.has(t)||(pi.add(t),t.addEventListener("copy",(()=>{})),t.addEventListener("cut",(()=>{})))}(t.contentDOM.ownerDocument)}handleEvent(t){(function(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let i,n=e.target;n!=t.contentDOM;n=n.parentNode)if(!n||11==n.nodeType||(i=E.get(n))&&i.ignoreEvent(e))return!1;return!0})(this.view,t)&&!this.ignoreDuringComposition(t)&&("keydown"==t.type&&this.keydown(t)||this.runHandlers(t.type,t))}runHandlers(t,e){let i=this.handlers[t];if(i){for(let t of i.observers)t(this.view,e);for(let t of i.handlers){if(e.defaultPrevented)break;if(t(this.view,e)){e.preventDefault();break}}}}ensureHandlers(t){let e=je(t),i=this.handlers,n=this.view.contentDOM;for(let t in e)if("scroll"!=t){let s=!e[t].handlers.length,o=i[t];o&&s!=!o.handlers.length&&(n.removeEventListener(t,this.handleEvent),o=null),o||n.addEventListener(t,this.handleEvent,{passive:s})}for(let t in i)"scroll"==t||e[t]||n.removeEventListener(t,this.handleEvent);this.handlers=e}keydown(t){if(this.lastKeyCode=t.keyCode,this.lastKeyTime=Date.now(),9==t.keyCode&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&27!=t.keyCode&&$e.indexOf(t.keyCode)<0&&(this.tabFocusMode=-1),$.android&&$.chrome&&!t.synthetic&&(13==t.keyCode||8==t.keyCode))return this.view.observer.delayAndroidKey(t.key,t.keyCode),!0;let e;return!$.ios||t.synthetic||t.altKey||t.metaKey||!((e=_e.find((e=>e.keyCode==t.keyCode)))&&!t.ctrlKey||Ke.indexOf(t.key)>-1&&t.ctrlKey&&!t.shiftKey)?(229!=t.keyCode&&this.view.observer.forceFlush(),!1):(this.pendingIOSKey=e||t,setTimeout((()=>this.flushIOSKey()),250),!0)}flushIOSKey(t){let e=this.pendingIOSKey;return!!e&&(!("Enter"==e.key&&t&&t.from0||!!($.safari&&!$.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100)&&(this.compositionPendingKey=!1,!0))}startMouseSelection(t){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=t}update(t){this.view.observer.update(t),this.mouseSelection&&this.mouseSelection.update(t),this.draggedContent&&t.docChanged&&(this.draggedContent=this.draggedContent.map(t.changes)),t.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function qe(t,e){return(i,n)=>{try{return e.call(t,n,i)}catch(t){te(i.state,t)}}}function je(t){let e=Object.create(null);function i(t){return e[t]||(e[t]={observers:[],handlers:[]})}for(let e of t){let t=e.spec;if(t&&t.domEventHandlers)for(let n in t.domEventHandlers){let s=t.domEventHandlers[n];s&&i(n).handlers.push(qe(e.value,s))}if(t&&t.domEventObservers)for(let n in t.domEventObservers){let s=t.domEventObservers[n];s&&i(n).observers.push(qe(e.value,s))}}for(let t in Ge)i(t).handlers.push(Ge[t]);for(let t in Je)i(t).observers.push(Je[t]);return e}const _e=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],Ke="dthko",$e=[16,17,18,20,91,92,224,225];function Ue(t){return.7*Math.max(0,t)+8}class Ye{constructor(t,e,i,s){this.view=t,this.startEvent=e,this.style=i,this.mustSelect=s,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=e,this.scrollParents=function(t){let e,i,n=t.ownerDocument;for(let s=t.parentNode;s&&!(s==n.body||e&&i);)if(1==s.nodeType)!i&&s.scrollHeight>s.clientHeight&&(i=s),!e&&s.scrollWidth>s.clientWidth&&(e=s),s=s.assignedSlot||s.parentNode;else{if(11!=s.nodeType)break;s=s.host}return{x:e,y:i}}(t.contentDOM),this.atoms=t.state.facet(ce).map((e=>e(t)));let o=t.contentDOM.ownerDocument;o.addEventListener("mousemove",this.move=this.move.bind(this)),o.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=e.shiftKey,this.multiple=t.state.facet(n.$t.allowMultipleSelections)&&function(t,e){let i=t.state.facet(Vt);return i.length?i[0](e):$.mac?e.metaKey:e.ctrlKey}(t,e),this.dragging=!(!function(t,e){let{main:i}=t.state.selection;if(i.empty)return!1;let n=r(t.root);if(!n||0==n.rangeCount)return!0;let s=n.getRangeAt(0).getClientRects();for(let t=0;t=e.clientX&&i.top<=e.clientY&&i.bottom>=e.clientY)return!0}return!1}(t,e)||1!=ai(e))&&null}start(t){!1===this.dragging&&this.select(t)}move(t){if(0==t.buttons)return this.destroy();if(this.dragging||null==this.dragging&&(e=this.startEvent,i=t,Math.max(Math.abs(e.clientX-i.clientX),Math.abs(e.clientY-i.clientY))<10))return;var e,i;this.select(this.lastEvent=t);let n=0,s=0,o=0,r=0,l=this.view.win.innerWidth,a=this.view.win.innerHeight;this.scrollParents.x&&({left:o,right:l}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:r,bottom:a}=this.scrollParents.y.getBoundingClientRect());let h=pe(this.view);t.clientX-h.left<=o+6?n=-Ue(o-t.clientX):t.clientX+h.right>=l-6&&(n=Ue(t.clientX-l)),t.clientY-h.top<=r+6?s=-Ue(r-t.clientY):t.clientY+h.bottom>=a-6&&(s=Ue(t.clientY-a)),this.setScrollSpeed(n,s)}up(t){null==this.dragging&&this.select(this.lastEvent),this.dragging||t.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let t=this.view.contentDOM.ownerDocument;t.removeEventListener("mousemove",this.move),t.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(t,e){this.scrollSpeed={x:t,y:e},t||e?this.scrolling<0&&(this.scrolling=setInterval((()=>this.scroll()),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:t,y:e}=this.scrollSpeed;t&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=t,t=0),e&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=e,e=0),(t||e)&&this.view.win.scrollBy(t,e),!1===this.dragging&&this.select(this.lastEvent)}skipAtoms(t){let e=null;for(let i=0;it.isUserEvent("input.type")))?this.destroy():this.style.update(t)&&setTimeout((()=>this.select(this.lastEvent)),20)}}const Ge=Object.create(null),Je=Object.create(null),Xe=$.ie&&$.ie_version<15||$.ios&&$.webkit_version<604;function Ze(t,e,i){for(let n of t.facet(e))i=n(i,t);return i}function Qe(t,e){e=Ze(t.state,$t,e);let i,{state:s}=t,o=1,r=s.toText(e),l=r.lines==s.selection.ranges.length;if(null!=ci&&s.selection.ranges.every((t=>t.empty))&&ci==r.toString()){let t=-1;i=s.changeByRange((i=>{let a=s.doc.lineAt(i.from);if(a.from==t)return{range:i};t=a.from;let h=s.toText((l?r.line(o++).text:e)+s.lineBreak);return{changes:{from:a.from,insert:h},range:n.OF.cursor(i.from+h.length)}}))}else i=l?s.changeByRange((t=>{let e=r.line(o++);return{changes:{from:t.from,to:t.to,insert:e.text},range:n.OF.cursor(t.from+e.length)}})):s.replaceSelection(r);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}function ti(t,e,i,s){if(1==s)return n.OF.cursor(e,i);if(2==s)return function(t,e,i=1){let s=t.charCategorizer(e),o=t.doc.lineAt(e),r=e-o.from;if(0==o.length)return n.OF.cursor(e);0==r?i=1:r==o.length&&(i=-1);let l=r,a=r;i<0?l=(0,n.zK)(o.text,r,!1):a=(0,n.zK)(o.text,r);let h=s(o.text.slice(l,a));for(;l>0;){let t=(0,n.zK)(o.text,l,!1);if(s(o.text.slice(t,l))!=h)break;l=t}for(;a{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft},Ge.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),27==e.keyCode&&0!=t.inputState.tabFocusMode&&(t.inputState.tabFocusMode=Date.now()+2e3),!1),Je.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")},Je.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")},Ge.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let i=null;for(let n of t.state.facet(Wt))if(i=n(t,e),i)break;if(i||0!=e.button||(i=function(t,e){let i=ni(t,e),s=ai(e),o=t.state.selection;return{update(t){t.docChanged&&(i.pos=t.changes.mapPos(i.pos),o=o.map(t.changes))},get(e,r,l){let a,h=ni(t,e),c=ti(t,h.pos,h.bias,s);if(i.pos!=h.pos&&!r){let e=ti(t,i.pos,i.bias,s),o=Math.min(e.from,c.from),r=Math.max(e.to,c.to);c=o1&&(a=function(t,e){for(let i=0;i=e)return n.OF.create(t.ranges.slice(0,i).concat(t.ranges.slice(i+1)),t.mainIndex==i?0:t.mainIndex-(t.mainIndex>i?1:0))}return null}(o,h.pos))?a:l?o.addRange(c):n.OF.create([c])}}}(t,e)),i){let n=!t.hasFocus;t.inputState.startMouseSelection(new Ye(t,e,i,n)),n&&t.observer.ignore((()=>{x(t.contentDOM);let e=t.root.activeElement;e&&!e.contains(t.contentDOM)&&e.blur()}));let s=t.inputState.mouseSelection;if(s)return s.start(e),!1===s.dragging}return!1};let ei=(t,e,i)=>e>=i.top&&e<=i.bottom&&t>=i.left&&t<=i.right;function ii(t,e,i,n){let s=ft.find(t.docView,e);if(!s)return 1;let o=e-s.posAtStart;if(0==o)return 1;if(o==s.length)return-1;let r=s.coordsAt(o,-1);if(r&&ei(i,n,r))return-1;let l=s.coordsAt(o,1);return l&&ei(i,n,l)?1:r&&r.bottom>=n?-1:1}function ni(t,e){let i=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:i,bias:ii(t,i,e.clientX,e.clientY)}}const si=$.ie&&$.ie_version<=11;let oi=null,ri=0,li=0;function ai(t){if(!si)return t.detail;let e=oi,i=li;return oi=t,li=Date.now(),ri=!e||i>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(ri+1)%3:1}function hi(t,e,i,n){if(!(i=Ze(t.state,$t,i)))return;let s=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:o}=t.inputState,r=n&&o&&function(t,e){let i=t.state.facet(zt);return i.length?i[0](e):$.mac?!e.altKey:!e.ctrlKey}(t,e)?{from:o.from,to:o.to}:null,l={from:s,insert:i},a=t.state.changes(r?[r,l]:l);t.focus(),t.dispatch({changes:a,selection:{anchor:a.mapPos(s,-1),head:a.mapPos(s,1)},userEvent:r?"move.drop":"input.drop"}),t.inputState.draggedContent=null}Ge.dragstart=(t,e)=>{let{selection:{main:i}}=t.state;if(e.target.draggable){let s=t.docView.nearest(e.target);if(s&&s.isWidget){let t=s.posAtStart,e=t+s.length;(t>=i.to||e<=i.from)&&(i=n.OF.range(t,e))}}let{inputState:s}=t;return s.mouseSelection&&(s.mouseSelection.dragging=!0),s.draggedContent=i,e.dataTransfer&&(e.dataTransfer.setData("Text",Ze(t.state,Ut,t.state.sliceDoc(i.from,i.to))),e.dataTransfer.effectAllowed="copyMove"),!1},Ge.dragend=t=>(t.inputState.draggedContent=null,!1),Ge.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let i=e.dataTransfer.files;if(i&&i.length){let n=Array(i.length),s=0,o=()=>{++s==i.length&&hi(t,e,n.filter((t=>null!=t)).join(t.state.lineBreak),!1)};for(let t=0;t{/[\x00-\x08\x0e-\x1f]{2}/.test(e.result)||(n[t]=e.result),o()},e.readAsText(i[t])}return!0}{let i=e.dataTransfer.getData("Text");if(i)return hi(t,e,i,!0),!0}return!1},Ge.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let i=Xe?null:e.clipboardData;return i?(Qe(t,i.getData("text/plain")||i.getData("text/uri-list")),!0):(function(t){let e=t.dom.parentNode;if(!e)return;let i=e.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.focus(),setTimeout((()=>{t.focus(),i.remove(),Qe(t,i.value)}),50)}(t),!1)};let ci=null;Ge.copy=Ge.cut=(t,e)=>{let{text:i,ranges:n,linewise:s}=function(t){let e=[],i=[],n=!1;for(let n of t.selection.ranges)n.empty||(e.push(t.sliceDoc(n.from,n.to)),i.push(n));if(!e.length){let s=-1;for(let{from:n}of t.selection.ranges){let o=t.doc.lineAt(n);o.number>s&&(e.push(o.text),i.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),s=o.number}n=!0}return{text:Ze(t,Ut,e.join(t.lineBreak)),ranges:i,linewise:n}}(t.state);if(!i&&!s)return!1;ci=s?i:null,"cut"!=e.type||t.state.readOnly||t.dispatch({changes:n,scrollIntoView:!0,userEvent:"delete.cut"});let o=Xe?null:e.clipboardData;return o?(o.clearData(),o.setData("text/plain",i),!0):(function(t,e){let i=t.dom.parentNode;if(!i)return;let n=i.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.value=e,n.focus(),n.selectionEnd=e.length,n.selectionStart=0,setTimeout((()=>{n.remove(),t.focus()}),50)}(t,i),!1)};const di=n.YH.define();function ui(t,e){let i=[];for(let n of t.facet(Kt)){let s=n(t,e);s&&i.push(s)}return i?t.update({effects:i,annotations:di.of(!0)}):null}function fi(t){setTimeout((()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let i=ui(t.state,e);i?t.dispatch(i):t.update([])}}),10)}Je.focus=t=>{t.inputState.lastFocusTime=Date.now(),t.scrollDOM.scrollTop||!t.inputState.lastScrollTop&&!t.inputState.lastScrollLeft||(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),fi(t)},Je.blur=t=>{t.observer.clearSelectionRange(),fi(t)},Je.compositionstart=Je.compositionupdate=t=>{t.observer.editContext||(null==t.inputState.compositionFirstChange&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))},Je.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,$.chrome&&$.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then((()=>t.observer.flush())):setTimeout((()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])}),50))},Je.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()},Ge.beforeinput=(t,e)=>{var i,n;if("insertReplacementText"==e.inputType&&t.observer.editContext){let n=null===(i=e.dataTransfer)||void 0===i?void 0:i.getData("text/plain"),s=e.getTargetRanges();if(n&&s.length){let e=s[0],i=t.posAtDOM(e.startContainer,e.startOffset),o=t.posAtDOM(e.endContainer,e.endOffset);return ze(t,{from:i,to:o,insert:t.state.toText(n)},null),!0}}let s;if($.chrome&&$.android&&(s=_e.find((t=>t.inputType==e.inputType)))&&(t.observer.delayAndroidKey(s.key,s.keyCode),"Backspace"==s.key||"Delete"==s.key)){let e=(null===(n=window.visualViewport)||void 0===n?void 0:n.height)||0;setTimeout((()=>{var i;((null===(i=window.visualViewport)||void 0===i?void 0:i.height)||0)>e+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())}),100)}return $.ios&&"deleteContentForward"==e.inputType&&t.observer.flushSoon(),$.safari&&"insertText"==e.inputType&&t.inputState.composing>=0&&setTimeout((()=>Je.compositionend(t,e)),20),!1};const pi=new Set;const mi=["pre-wrap","normal","pre-line","break-spaces"];let gi=!1;function vi(){gi=!1}class wi{constructor(t){this.lineWrapping=t,this.doc=n.EY.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(t,e){let i=this.doc.lineAt(e).number-this.doc.lineAt(t).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((e-t-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(t){if(!this.lineWrapping)return this.lineHeight;return(1+Math.max(0,Math.ceil((t-this.lineLength)/(this.lineLength-5))))*this.lineHeight}setDoc(t){return this.doc=t,this}mustRefreshForWrapping(t){return mi.indexOf(t)>-1!=this.lineWrapping}mustRefreshForHeights(t){let e=!1;for(let i=0;i-1,l=Math.round(e)!=Math.round(this.lineHeight)||this.lineWrapping!=r;if(this.lineWrapping=r,this.lineHeight=e,this.charWidth=i,this.textHeight=n,this.lineLength=s,l){this.heightSamples={};for(let t=0;t0}set outdated(t){this.flags=(t?2:0)|-3&this.flags}setHeight(t){this.height!=t&&(Math.abs(this.height-t)>ki&&(gi=!0),this.height=t)}replace(t,e,i){return Si.of(i)}decomposeLeft(t,e){e.push(this)}decomposeRight(t,e){e.push(this)}applyChanges(t,e,i,n){let s=this,o=i.doc;for(let r=n.length-1;r>=0;r--){let{fromA:l,toA:a,fromB:h,toB:c}=n[r],d=s.lineAt(l,xi.ByPosNoHeight,i.setDoc(e),0,0),u=d.to>=a?d:s.lineAt(a,xi.ByPosNoHeight,i,0,0);for(c+=u.to-a,a=u.to;r>0&&d.from<=n[r-1].toA;)l=n[r-1].fromA,h=n[r-1].fromB,r--,l2*s){let s=t[e-1];s.break?t.splice(--e,1,s.left,null,s.right):t.splice(--e,1,s.left,s.right),i+=1+s.break,n-=s.size}else{if(!(s>2*n))break;{let e=t[i];e.break?t.splice(i,1,e.left,null,e.right):t.splice(i,1,e.left,e.right),i+=2+e.break,s-=e.size}}else if(n=s&&o(this.blockAt(0,i,n,s))}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more&&this.setHeight(n.heights[n.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class Mi extends Ci{constructor(t,e){super(t,e,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(t,e,i,n){return new yi(n,this.length,i,this.height,this.breaks)}replace(t,e,i){let n=i[0];return 1==i.length&&(n instanceof Mi||n instanceof Oi&&4&n.flags)&&Math.abs(this.length-n.length)<10?(n instanceof Oi?n=new Mi(n.length,this.height):n.height=this.height,this.outdated||(n.outdated=!1),n):Si.of(i)}updateHeight(t,e=0,i=!1,n){return n&&n.from<=e&&n.more?this.setHeight(n.heights[n.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,t.heightForLine(this.length-this.collapsed))+this.breaks*t.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class Oi extends Si{constructor(t){super(t,0)}heightMetrics(t,e){let i,n=t.doc.lineAt(e).number,s=t.doc.lineAt(e+this.length).number,o=s-n+1,r=0;if(t.lineWrapping){let e=Math.min(this.height,t.lineHeight*o);i=e/o,this.length>o+1&&(r=(this.height-e)/(this.length-o-1))}else i=this.height/o;return{firstLine:n,lastLine:s,perLine:i,perChar:r}}blockAt(t,e,i,n){let{firstLine:s,lastLine:o,perLine:r,perChar:l}=this.heightMetrics(e,n);if(e.lineWrapping){let s=n+(t0){let t=i[i.length-1];t instanceof Oi?i[i.length-1]=new Oi(t.length+n):i.push(null,new Oi(n-1))}if(t>0){let e=i[0];e instanceof Oi?i[0]=new Oi(t+e.length):i.unshift(new Oi(t-1),null)}return Si.of(i)}decomposeLeft(t,e){e.push(new Oi(t-1),null)}decomposeRight(t,e){e.push(null,new Oi(this.length-t-1))}updateHeight(t,e=0,i=!1,n){let s=e+this.length;if(n&&n.from<=e+this.length&&n.more){let i=[],o=Math.max(e,n.from),r=-1;for(n.from>e&&i.push(new Oi(n.from-e-1).updateHeight(t,e));o<=s&&n.more;){let e=t.doc.lineAt(o).length;i.length&&i.push(null);let s=n.heights[n.index++];-1==r?r=s:Math.abs(s-r)>=ki&&(r=-2);let l=new Mi(e,s);l.outdated=!1,i.push(l),o+=e+1}o<=s&&i.push(null,new Oi(s-o).updateHeight(t,o));let l=Si.of(i);return(r<0||Math.abs(l.height-this.height)>=ki||Math.abs(r-this.heightMetrics(t,e).perLine)>=ki)&&(gi=!0),Ai(this,l)}return(i||this.outdated)&&(this.setHeight(t.heightForGap(e,e+this.length)),this.outdated=!1),this}toString(){return`gap(${this.length})`}}class Di extends Si{constructor(t,e,i){super(t.length+e+i.length,t.height+i.height,e|(t.outdated||i.outdated?2:0)),this.left=t,this.right=i,this.size=t.size+i.size}get break(){return 1&this.flags}blockAt(t,e,i,n){let s=i+this.left.height;return tr))return a;let h=e==xi.ByPosNoHeight?xi.ByPosNoHeight:xi.ByPos;return l?a.join(this.right.lineAt(r,h,i,o,r)):this.left.lineAt(r,h,i,n,s).join(a)}forEachLine(t,e,i,n,s,o){let r=n+this.left.height,l=s+this.left.length+this.break;if(this.break)t=l&&this.right.forEachLine(t,e,i,r,l,o);else{let a=this.lineAt(l,xi.ByPos,i,n,s);t=t&&a.from<=e&&o(a),e>a.to&&this.right.forEachLine(a.to+1,e,i,r,l,o)}}replace(t,e,i){let n=this.left.length+this.break;if(ethis.left.length)return this.balanced(this.left,this.right.replace(t-n,e-n,i));let s=[];t>0&&this.decomposeLeft(t,s);let o=s.length;for(let t of i)s.push(t);if(t>0&&Ti(s,o-1),e=i&&e.push(null)),t>i&&this.right.decomposeLeft(t-i,e)}decomposeRight(t,e){let i=this.left.length,n=i+this.break;if(t>=n)return this.right.decomposeRight(t-n,e);t2*e.size||e.size>2*t.size?Si.of(this.break?[t,null,e]:[t,e]):(this.left=Ai(this.left,t),this.right=Ai(this.right,e),this.setHeight(t.height+e.height),this.outdated=t.outdated||e.outdated,this.size=t.size+e.size,this.length=t.length+this.break+e.length,this)}updateHeight(t,e=0,i=!1,n){let{left:s,right:o}=this,r=e+s.length+this.break,l=null;return n&&n.from<=e+s.length&&n.more?l=s=s.updateHeight(t,e,i,n):s.updateHeight(t,e,i),n&&n.from<=r+o.length&&n.more?l=o=o.updateHeight(t,r,i,n):o.updateHeight(t,r,i),l?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function Ti(t,e){let i,n;null==t[e]&&(i=t[e-1])instanceof Oi&&(n=t[e+1])instanceof Oi&&t.splice(e-1,3,new Oi(i.length+1+n.length))}class Ei{constructor(t,e){this.pos=t,this.oracle=e,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=t}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(t,e){if(this.lineStart>-1){let t=Math.min(e,this.lineEnd),i=this.nodes[this.nodes.length-1];i instanceof Mi?i.length+=t-this.pos:(t>this.pos||!this.isCovered)&&this.nodes.push(new Mi(t-this.pos,-1)),this.writtenTo=t,e>t&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=e}point(t,e,i){if(t=5)&&this.addLineDeco(n,s,o)}else e>t&&this.span(t,e);this.lineEnd>-1&&this.lineEnd-1)return;let{from:t,to:e}=this.oracle.doc.lineAt(this.pos);this.lineStart=t,this.lineEnd=e,this.writtenTot&&this.nodes.push(new Mi(this.pos-t,-1)),this.writtenTo=this.pos}blankContent(t,e){let i=new Oi(e-t);return this.oracle.doc.lineAt(t).to==e&&(i.flags|=4),i}ensureLine(){this.enterLine();let t=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(t instanceof Mi)return t;let e=new Mi(0,-1);return this.nodes.push(e),e}addBlock(t){this.enterLine();let e=t.deco;e&&e.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(t),this.writtenTo=this.pos=this.pos+t.length,e&&e.endSide>0&&(this.covering=t)}addLineDeco(t,e,i){let n=this.ensureLine();n.length+=i,n.collapsed+=i,n.widgetHeight=Math.max(n.widgetHeight,t),n.breaks+=e,this.writtenTo=this.pos=this.pos+i}finish(t){let e=0==this.nodes.length?null:this.nodes[this.nodes.length-1];!(this.lineStart>-1)||e instanceof Mi||this.isCovered?(this.writtenToi.clientHeight||i.scrollWidth>i.clientWidth)&&"visible"!=n.overflow){let n=i.getBoundingClientRect();o=Math.max(o,n.left),r=Math.min(r,n.right),l=Math.max(l,n.top),a=Math.min(e==t.parentNode?s.innerHeight:a,n.bottom)}e="absolute"==n.position||"fixed"==n.position?i.offsetParent:i.parentNode}else{if(11!=e.nodeType)break;e=e.host}return{left:o-i.left,right:Math.max(o,r)-i.left,top:l-(i.top+e),bottom:Math.max(l,a)-(i.top+e)}}function Bi(t,e){let i=t.getBoundingClientRect();return{left:0,right:i.right-i.left,top:e,bottom:i.bottom-(i.top+e)}}class Pi{constructor(t,e,i,n){this.from=t,this.to=e,this.size=i,this.displaySize=n}static same(t,e){if(t.length!=e.length)return!1;for(let i=0;i"function"!=typeof t&&"cm-lineWrapping"==t.class));this.heightOracle=new wi(e),this.stateDeco=t.facet(ae).filter((t=>"function"!=typeof t)),this.heightMap=Si.empty().applyChanges(this.stateDeco,n.EY.empty,this.heightOracle.setDoc(t.doc),[new ge(0,0,0,t.doc.length)]);for(let t=0;t<2&&(this.viewport=this.getViewport(0,null),this.updateForViewport());t++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=lt.set(this.lineGaps.map((t=>t.draw(this,!1)))),this.computeVisibleRanges()}updateForViewport(){let t=[this.viewport],{main:e}=this.state.selection;for(let i=0;i<=1;i++){let n=i?e.head:e.anchor;if(!t.some((({from:t,to:e})=>n>=t&&n<=e))){let{from:e,to:i}=this.lineBlockAt(n);t.push(new Fi(e,i))}}return this.viewports=t.sort(((t,e)=>t.from-e.from)),this.updateScaler()}updateScaler(){let t=this.scaler;return this.scaler=this.heightMap.height<=7e6?zi:new Wi(this.heightOracle,this.heightMap,this.viewports),t.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,(t=>{this.viewportLines.push(qi(t,this.scaler))}))}update(t,e=null){this.state=t.state;let i=this.stateDeco;this.stateDeco=this.state.facet(ae).filter((t=>"function"!=typeof t));let s=t.changedRanges,o=ge.extendWithRanges(s,function(t,e,i){let s=new Ri;return n.om.compare(t,e,i,s,0),s.changes}(i,this.stateDeco,t?t.changes:n.VR.empty(this.state.doc.length))),r=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);vi(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,t.startState.doc,this.heightOracle.setDoc(this.state.doc),o),(this.heightMap.height!=r||gi)&&(t.flags|=2),l?(this.scrollAnchorPos=t.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=this.heightMap.height);let a=o.length?this.mapViewport(this.viewport,t.changes):this.viewport;(e&&(e.range.heada.to)||!this.viewportIsAppropriate(a))&&(a=this.getViewport(0,e));let h=a.from!=this.viewport.from||a.to!=this.viewport.to;this.viewport=a,t.flags|=this.updateForViewport(),(h||!t.changes.empty||2&t.flags)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,t.changes))),t.flags|=this.computeVisibleRanges(),e&&(this.scrollTarget=e),!this.mustEnforceCursorAssoc&&t.selectionSet&&t.view.lineWrapping&&t.state.selection.main.empty&&t.state.selection.main.assoc&&!t.state.facet(Gt)&&(this.mustEnforceCursorAssoc=!0)}measure(t){let e=t.contentDOM,i=window.getComputedStyle(e),s=this.heightOracle,o=i.whiteSpace;this.defaultTextDirection="rtl"==i.direction?bt.RTL:bt.LTR;let r=this.heightOracle.mustRefreshForWrapping(o),l=e.getBoundingClientRect(),a=r||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,c=0;if(l.width&&l.height){let{scaleX:t,scaleY:i}=v(e,l);(t>.005&&Math.abs(this.scaleX-t)>.005||i>.005&&Math.abs(this.scaleY-i)>.005)&&(this.scaleX=t,this.scaleY=i,h|=8,r=a=!0)}let d=(parseInt(i.paddingTop)||0)*this.scaleY,u=(parseInt(i.paddingBottom)||0)*this.scaleY;this.paddingTop==d&&this.paddingBottom==u||(this.paddingTop=d,this.paddingBottom=u,h|=10),this.editorWidth!=t.scrollDOM.clientWidth&&(s.lineWrapping&&(a=!0),this.editorWidth=t.scrollDOM.clientWidth,h|=8);let f=t.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=f&&(this.scrollAnchorHeight=-1,this.scrollTop=f),this.scrolledToBottom=C(t.scrollDOM);let p=(this.printing?Bi:Li)(e,this.paddingTop),m=p.top-this.pixelViewport.top,g=p.bottom-this.pixelViewport.bottom;this.pixelViewport=p;let w=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(w!=this.inView&&(this.inView=w,w&&(a=!0)),!this.inView&&!this.scrollTarget)return 0;let b=l.width;if(this.contentDOMWidth==b&&this.editorHeight==t.scrollDOM.clientHeight||(this.contentDOMWidth=l.width,this.editorHeight=t.scrollDOM.clientHeight,h|=8),a){let e=t.docView.measureVisibleLineHeights(this.viewport);if(s.mustRefreshForHeights(e)&&(r=!0),r||s.lineWrapping&&Math.abs(b-this.contentDOMWidth)>s.charWidth){let{lineHeight:i,charWidth:n,textHeight:l}=t.docView.measureTextSize();r=i>0&&s.refresh(o,i,n,l,b/n,e),r&&(t.docView.minWidth=0,h|=8)}m>0&&g>0?c=Math.max(m,g):m<0&&g<0&&(c=Math.min(m,g)),vi();for(let i of this.viewports){let o=i.from==this.viewport.from?e:t.docView.measureVisibleLineHeights(i);this.heightMap=(r?Si.empty().applyChanges(this.stateDeco,n.EY.empty,this.heightOracle,[new ge(0,0,0,t.state.doc.length)]):this.heightMap).updateHeight(s,0,r,new bi(i.from,o))}gi&&(h|=2)}let y=!this.viewportIsAppropriate(this.viewport,c)||this.scrollTarget&&(this.scrollTarget.range.headthis.viewport.to);return y&&(2&h&&(h|=this.updateScaler()),this.viewport=this.getViewport(c,this.scrollTarget),h|=this.updateForViewport()),(2&h||y)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(r?[]:this.lineGaps,t)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,t.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(t,e){let i=.5-Math.max(-.5,Math.min(.5,t/1e3/2)),n=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:r}=this,l=new Fi(n.lineAt(o-1e3*i,xi.ByHeight,s,0,0).from,n.lineAt(r+1e3*(1-i),xi.ByHeight,s,0,0).to);if(e){let{head:t}=e.range;if(tl.to){let i,o=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),r=n.lineAt(t,xi.ByPos,s,0,0);i="center"==e.y?(r.top+r.bottom)/2-o/2:"start"==e.y||"nearest"==e.y&&t=r+Math.max(10,Math.min(i,250)))&&n>o-2e3&&s>1,r=s<<1;if(this.defaultTextDirection!=bt.LTR&&!i)return[];let l=[],a=(s,r,h,c)=>{if(r-ss&&tt.from>=h.from&&t.to<=h.to&&Math.abs(t.from-s)t.frome))));if(!f){if(rt.from<=r&&t.to>=r))){let t=e.moveToLineBoundary(n.OF.cursor(r),!1,!0).head;t>s&&(r=t)}let t=this.gapSize(h,s,r,c);f=new Pi(s,r,t,i||t<2e6?t:2e6)}l.push(f)},h=e=>{if(e.lengtho&&(s.push({from:o,to:t}),r+=t-o),o=e}},20),o2e6)for(let i of t)i.from>=e.from&&i.frome.from&&a(e.from,l,e,o),ht.draw(this,this.heightOracle.lineWrapping)))))}computeVisibleRanges(){let t=this.stateDeco;this.lineGaps.length&&(t=t.concat(this.lineGapDeco));let e=[];n.om.spans(t,this.viewport.from,this.viewport.to,{span(t,i){e.push({from:t,to:i})},point(){}},20);let i=e.length!=this.visibleRanges.length||this.visibleRanges.some(((t,i)=>t.from!=e[i].from||t.to!=e[i].to));return this.visibleRanges=e,i?4:0}lineBlockAt(t){return t>=this.viewport.from&&t<=this.viewport.to&&this.viewportLines.find((e=>e.from<=t&&e.to>=t))||qi(this.heightMap.lineAt(t,xi.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(t){return t>=this.viewportLines[0].top&&t<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find((e=>e.top<=t&&e.bottom>=t))||qi(this.heightMap.lineAt(this.scaler.fromDOM(t),xi.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(t){let e=this.lineBlockAtHeight(t+8);return e.from>=this.viewport.from||this.viewportLines[0].top-t>200?e:this.viewportLines[0]}elementAtHeight(t){return qi(this.heightMap.blockAt(this.scaler.fromDOM(t),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class Fi{constructor(t,e){this.from=t,this.to=e}}function Hi({total:t,ranges:e},i){if(i<=0)return e[0].from;if(i>=1)return e[e.length-1].to;let n=Math.floor(t*i);for(let t=0;;t++){let{from:i,to:s}=e[t],o=s-i;if(n<=o)return i+n;n-=o}}function Vi(t,e){let i=0;for(let{from:n,to:s}of t.ranges){if(e<=s){i+=e-n;break}i+=s-n}return i/t.total}const zi={toDOM:t=>t,fromDOM:t=>t,scale:1,eq(t){return t==this}};class Wi{constructor(t,e,i){let n=0,s=0,o=0;this.viewports=i.map((({from:i,to:s})=>{let o=e.lineAt(i,xi.ByPos,t,0,0).top,r=e.lineAt(s,xi.ByPos,t,0,0).bottom;return n+=r-o,{from:i,to:s,top:o,bottom:r,domTop:0,domBottom:0}})),this.scale=(7e6-n)/(e.height-n);for(let t of this.viewports)t.domTop=o+(t.top-s)*this.scale,o=t.domBottom=t.domTop+(t.bottom-t.top),s=t.bottom}toDOM(t){for(let e=0,i=0,n=0;;e++){let s=ee.from==t.viewports[i].from&&e.to==t.viewports[i].to)))}}function qi(t,e){if(1==e.scale)return t;let i=e.toDOM(t.top),n=e.toDOM(t.bottom);return new yi(t.from,t.length,i,n-i,Array.isArray(t._content)?t._content.map((t=>qi(t,e))):t._content)}const ji=n.sj.define({combine:t=>t.join(" ")}),_i=n.sj.define({combine:t=>t.indexOf(!0)>-1}),Ki=s.G.newName(),$i=s.G.newName(),Ui=s.G.newName(),Yi={"&light":"."+$i,"&dark":"."+Ui};function Gi(t,e,i){return new s.G(e,{finish:e=>/&/.test(e)?e.replace(/&\w*/,(e=>{if("&"==e)return t;if(!i||!i[e])throw new RangeError(`Unsupported selector: ${e}`);return i[e]})):t+" "+e})}const Ji=Gi("."+Ki,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",insetInlineStart:0,zIndex:200},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",borderRight:"1px solid #ddd"},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"var(--spice-text)"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:'url(\'data:image/svg+xml,\')',backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},Yi),Xi={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Zi=$.ie&&$.ie_version<=11;class Qi{constructor(t){this.view=t,this.active=!1,this.editContext=null,this.selectionRange=new w,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=t.contentDOM,this.observer=new MutationObserver((e=>{for(let t of e)this.queue.push(t);($.ie&&$.ie_version<=11||$.ios&&t.composing)&&e.some((t=>"childList"==t.type&&t.removedNodes.length||"characterData"==t.type&&t.oldValue.length>t.target.nodeValue.length))?this.flushSoon():this.flush()})),!window.EditContext||!1===t.constructor.EDIT_CONTEXT||$.chrome&&$.chrome_version<126||(this.editContext=new nn(t),t.state.facet(ee)&&(t.contentDOM.editContext=this.editContext.editContext)),Zi&&(this.onCharData=t=>{this.queue.push({target:t.target,type:"characterData",oldValue:t.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),"function"==typeof ResizeObserver&&(this.resizeScroll=new ResizeObserver((()=>{var t;(null===(t=this.view.docView)||void 0===t?void 0:t.lastUpdate){this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),t.length>0&&t[t.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))}),{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver((t=>{t.length>0&&t[t.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))}),{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(t){this.view.inputState.runHandlers("scroll",t),this.intersecting&&this.view.measure()}onScroll(t){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(t)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout((()=>{this.resizeTimeout=-1,this.view.requestMeasure()}),50))}onPrint(t){("change"!=t.type&&t.type||t.matches)&&(this.view.viewState.printing=!0,this.view.measure(),setTimeout((()=>{this.view.viewState.printing=!1,this.view.requestMeasure()}),500))}updateGaps(t){if(this.gapIntersection&&(t.length!=this.gaps.length||this.gaps.some(((e,i)=>e!=t[i])))){this.gapIntersection.disconnect();for(let e of t)this.gapIntersection.observe(e);this.gaps=t}}onSelectionChange(t){let e=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,n=this.selectionRange;if(i.state.facet(ee)?i.root.activeElement!=this.dom:!a(this.dom,n))return;let s=n.anchorNode&&i.docView.nearest(n.anchorNode);s&&s.ignoreEvent(t)?e||(this.selectionChanged=!1):($.ie&&$.ie_version<=11||$.android&&$.chrome)&&!i.state.selection.main.empty&&n.focusNode&&c(n.focusNode,n.focusOffset,n.anchorNode,n.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:t}=this,e=r(t.root);if(!e)return!1;let i=$.safari&&11==t.root.nodeType&&t.root.activeElement==this.dom&&function(t,e){if(e.getComposedRanges){let i=e.getComposedRanges(t.root)[0];if(i)return en(t,i)}let i=null;function n(t){t.preventDefault(),t.stopImmediatePropagation(),i=t.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",n,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",n,!0),i?en(t,i):null}(this.view,e)||e;if(!i||this.selectionRange.eq(i))return!1;let n=a(this.dom,i);return n&&!this.selectionChanged&&t.inputState.lastFocusTime>Date.now()-200&&t.inputState.lastTouchTime{let t=this.delayedAndroidKey;if(t){this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=t.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&t.force&&S(this.dom,t.key,t.keyCode)}};this.flushingAndroidKey=this.view.win.requestAnimationFrame(t)}this.delayedAndroidKey&&"Enter"!=t||(this.delayedAndroidKey={key:t,keyCode:e,force:this.lastChange{this.delayedFlush=-1,this.flush()})))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let t of this.observer.takeRecords())this.queue.push(t);return this.queue}processRecords(){let t=this.pendingRecords();t.length&&(this.queue=[]);let e=-1,i=-1,n=!1;for(let s of t){let t=this.readMutation(s);t&&(t.typeOver&&(n=!0),-1==e?({from:e,to:i}=t):(e=Math.min(t.from,e),i=Math.max(t.to,i)))}return{from:e,to:i,typeOver:n}}readChange(){let{from:t,to:e,typeOver:i}=this.processRecords(),n=this.selectionChanged&&a(this.dom,this.selectionRange);if(t<0&&!n)return null;t>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new He(this.view,t,e,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(t=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;t&&this.readSelectionRange();let e=this.readChange();if(!e)return this.view.requestMeasure(),!1;let i=this.view.state,n=Ve(this.view,e);return this.view.state==i&&(e.domChanged||e.newSel&&!e.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),n}readMutation(t){let e=this.view.docView.nearest(t.target);if(!e||e.ignoreMutation(t))return null;if(e.markDirty("attributes"==t.type),"attributes"==t.type&&(e.flags|=4),"childList"==t.type){let i=tn(e,t.previousSibling||t.target.previousSibling,-1),n=tn(e,t.nextSibling||t.target.nextSibling,1);return{from:i?e.posAfter(i):e.posAtStart,to:n?e.posBefore(n):e.posAtEnd,typeOver:!1}}return"characterData"==t.type?{from:e.posAtStart,to:e.posAtEnd,typeOver:t.target.nodeValue==t.oldValue}:null}setWindow(t){t!=this.win&&(this.removeWindowListeners(this.win),this.win=t,this.addWindowListeners(this.win))}addWindowListeners(t){t.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):t.addEventListener("beforeprint",this.onPrint),t.addEventListener("scroll",this.onScroll),t.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(t){t.removeEventListener("scroll",this.onScroll),t.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):t.removeEventListener("beforeprint",this.onPrint),t.document.removeEventListener("selectionchange",this.onSelectionChange)}update(t){this.editContext&&(this.editContext.update(t),t.startState.facet(ee)!=t.state.facet(ee)&&(t.view.contentDOM.editContext=t.state.facet(ee)?this.editContext.editContext:null))}destroy(){var t,e,i;this.stop(),null===(t=this.intersection)||void 0===t||t.disconnect(),null===(e=this.gapIntersection)||void 0===e||e.disconnect(),null===(i=this.resizeScroll)||void 0===i||i.disconnect();for(let t of this.scrollTargets)t.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function tn(t,e,i){for(;e;){let n=E.get(e);if(n&&n.parent==t)return n;let s=e.parentNode;e=s!=t.dom?s:i>0?e.nextSibling:e.previousSibling}return null}function en(t,e){let i=e.startContainer,n=e.startOffset,s=e.endContainer,o=e.endOffset,r=t.docView.domAtPos(t.state.selection.main.anchor);return c(r.node,r.offset,s,o)&&([i,n,s,o]=[s,o,i,n]),{anchorNode:i,anchorOffset:n,focusNode:s,focusOffset:o}}class nn{constructor(t){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(t.state);let e=this.editContext=new window.EditContext({text:t.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,t.state.selection.main.anchor))),selectionEnd:this.toContextPos(t.state.selection.main.head)});this.handlers.textupdate=e=>{let{anchor:i}=t.state.selection.main,s=this.toEditorPos(e.updateRangeStart),o=this.toEditorPos(e.updateRangeEnd);t.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:e.updateRangeStart,editorBase:s,drifted:!1});let r={from:s,to:o,insert:n.EY.of(e.text.split("\n"))};r.from==this.from&&ithis.to&&(r.to=i),(r.from!=r.to||r.insert.length)&&(this.pendingContextChange=r,t.state.readOnly||ze(t,r,n.OF.single(this.toEditorPos(e.selectionStart),this.toEditorPos(e.selectionEnd))),this.pendingContextChange&&(this.revertPending(t.state),this.setSelection(t.state)))},this.handlers.characterboundsupdate=i=>{let n=[],s=null;for(let e=this.toEditorPos(i.rangeStart),o=this.toEditorPos(i.rangeEnd);e{let i=[];for(let t of e.getTextFormats()){let e=t.underlineStyle,n=t.underlineThickness;if("None"!=e&&"None"!=n){let s=`text-decoration: underline ${"Dashed"==e?"dashed ":"Squiggle"==e?"wavy ":""}${"Thin"==n?1:2}px`;i.push(lt.mark({attributes:{style:s}}).range(this.toEditorPos(t.rangeStart),this.toEditorPos(t.rangeEnd)))}}t.dispatch({effects:Qt.of(lt.set(i))})},this.handlers.compositionstart=()=>{t.inputState.composing<0&&(t.inputState.composing=0,t.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(t.inputState.composing=-1,t.inputState.compositionFirstChange=null,this.composing){let{drifted:e}=this.composing;this.composing=null,e&&this.reset(t.state)}};for(let t in this.handlers)e.addEventListener(t,this.handlers[t]);this.measureReq={read:t=>{this.editContext.updateControlBounds(t.contentDOM.getBoundingClientRect());let e=r(t.root);e&&e.rangeCount&&this.editContext.updateSelectionBounds(e.getRangeAt(0).getBoundingClientRect())}}}applyEdits(t){let e=0,i=!1,n=this.pendingContextChange;return t.changes.iterChanges(((s,o,r,l,a)=>{if(i)return;let h=a.length-(o-s);if(n&&o>=n.to){if(n.from==s&&n.to==o&&n.insert.eq(a))return n=this.pendingContextChange=null,e+=h,void(this.to+=h);n=null,this.revertPending(t.state)}if(s+=e,(o+=e)<=this.from)this.from+=h,this.to+=h;else if(sthis.to||this.to-this.from+a.length>3e4)return void(i=!0);this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),a.toString()),this.to+=h}e+=h})),n&&!i&&this.revertPending(t.state),!i}update(t){let e=this.pendingContextChange;this.composing&&(this.composing.drifted||t.transactions.some((t=>!t.isUserEvent("input.type")&&t.changes.touchesRange(this.from,this.to))))?(this.composing.drifted=!0,this.composing.editorBase=t.changes.mapPos(this.composing.editorBase)):this.applyEdits(t)&&this.rangeIsValid(t.state)?(t.docChanged||t.selectionSet||e)&&this.setSelection(t.state):(this.pendingContextChange=null,this.reset(t.state)),(t.geometryChanged||t.docChanged||t.selectionSet)&&t.view.requestMeasure(this.measureReq)}resetRange(t){let{head:e}=t.selection.main;this.from=Math.max(0,e-1e4),this.to=Math.min(t.doc.length,e+1e4)}reset(t){this.resetRange(t),this.editContext.updateText(0,this.editContext.text.length,t.doc.sliceString(this.from,this.to)),this.setSelection(t)}revertPending(t){let e=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(e.from),this.toContextPos(e.from+e.insert.length),t.doc.sliceString(e.from,e.to))}setSelection(t){let{main:e}=t.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,e.anchor))),n=this.toContextPos(e.head);this.editContext.selectionStart==i&&this.editContext.selectionEnd==n||this.editContext.updateSelection(i,n)}rangeIsValid(t){let{head:e}=t.selection.main;return!(this.from>0&&e-this.from<500||this.to3e4)}toEditorPos(t){let e=this.composing;return e&&e.drifted?e.editorBase+(t-e.contextBase):t+this.from}toContextPos(t){let e=this.composing;return e&&e.drifted?e.contextBase+(t-e.editorBase):t-this.from}destroy(){for(let t in this.handlers)this.editContext.removeEventListener(t,this.handlers[t])}}class sn{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return this.inputState.composing>0}get compositionStarted(){return this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(t={}){var e;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),t.parent&&t.parent.appendChild(this.dom);let{dispatch:i}=t;this.dispatchTransactions=t.dispatchTransactions||i&&(t=>t.forEach((t=>i(t,this))))||(t=>this.update(t)),this.dispatch=this.dispatch.bind(this),this._root=t.root||function(t){for(;t;){if(t&&(9==t.nodeType||11==t.nodeType&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}(t.parent)||document,this.viewState=new Ni(t.state||n.$t.create(t)),t.scrollTo&&t.scrollTo.is(Zt)&&(this.viewState.scrollTarget=t.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(ne).map((t=>new oe(t)));for(let t of this.plugins)t.update(this);this.observer=new Qi(this),this.inputState=new We(this),this.inputState.ensureHandlers(this.plugins),this.docView=new we(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),(null===(e=document.fonts)||void 0===e?void 0:e.ready)&&document.fonts.ready.then((()=>this.requestMeasure()))}dispatch(...t){let e=1==t.length&&t[0]instanceof n.ZX?t:1==t.length&&Array.isArray(t[0])?t[0]:[this.state.update(...t)];this.dispatchTransactions(e,this)}update(t){if(0!=this.updateState)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let e,i=!1,s=!1,o=this.state;for(let e of t){if(e.startState!=o)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");o=e.state}if(this.destroyed)return void(this.viewState.state=o);let r=this.hasFocus,l=0,a=null;t.some((t=>t.annotation(di)))?(this.inputState.notifiedFocused=r,l=1):r!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=r,a=ui(o,r),a||(l=1));let h=this.observer.delayedAndroidKey,c=null;if(h?(this.observer.clearDelayedAndroidKey(),c=this.observer.readChange(),(c&&!this.state.doc.eq(o.doc)||!this.state.selection.eq(o.selection))&&(c=null)):this.observer.clear(),o.facet(n.$t.phrases)!=this.state.facet(n.$t.phrases))return this.setState(o);e=ve.create(this,o,t),e.flags|=l;let d=this.viewState.scrollTarget;try{this.updateState=2;for(let e of t){if(d&&(d=d.map(e.changes)),e.scrollIntoView){let{main:t}=e.state.selection;d=new Xt(t.empty?t:n.OF.cursor(t.head,t.head>t.anchor?-1:1))}for(let t of e.effects)t.is(Zt)&&(d=t.value.clip(this.state))}this.viewState.update(e,d),this.bidiCache=ln.update(this.bidiCache,e.changes),e.empty||(this.updatePlugins(e),this.inputState.update(e)),i=this.docView.update(e),this.state.facet(me)!=this.styleModules&&this.mountStyles(),s=this.updateAttrs(),this.showAnnouncements(t),this.docView.updateSelection(i,t.some((t=>t.isUserEvent("select.pointer"))))}finally{this.updateState=0}if(e.startState.facet(ji)!=e.state.facet(ji)&&(this.viewState.mustMeasureContent=!0),(i||s||d||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),i&&this.docViewUpdate(),!e.empty)for(let t of this.state.facet(jt))try{t(e)}catch(t){te(this.state,t,"update listener")}(a||c)&&Promise.resolve().then((()=>{a&&this.state==a.startState&&this.dispatch(a),c&&!Ve(this,c)&&h.force&&S(this.contentDOM,h.key,h.keyCode)}))}setState(t){if(0!=this.updateState)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed)return void(this.viewState.state=t);this.updateState=2;let e=this.hasFocus;try{for(let t of this.plugins)t.destroy(this);this.viewState=new Ni(t),this.plugins=t.facet(ne).map((t=>new oe(t))),this.pluginMap.clear();for(let t of this.plugins)t.update(this);this.docView.destroy(),this.docView=new we(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}e&&this.focus(),this.requestMeasure()}updatePlugins(t){let e=t.startState.facet(ne),i=t.state.facet(ne);if(e!=i){let n=[];for(let s of i){let i=e.indexOf(s);if(i<0)n.push(new oe(s));else{let e=this.plugins[i];e.mustUpdate=t,n.push(e)}}for(let e of this.plugins)e.mustUpdate!=t&&e.destroy(this);this.plugins=n,this.pluginMap.clear()}else for(let e of this.plugins)e.mustUpdate=t;for(let t=0;t-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey)return this.measureScheduled=-1,void this.requestMeasure();this.measureScheduled=0,t&&this.observer.forceFlush();let e=null,i=this.scrollDOM,n=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(n-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let t=0;;t++){if(o<0)if(C(i))s=-1,o=this.viewState.heightMap.height;else{let t=this.viewState.scrollAnchorAt(n);s=t.from,o=t.top}this.updateState=1;let r=this.viewState.measure(this);if(!r&&!this.measureRequests.length&&null==this.viewState.scrollTarget)break;if(t>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let l=[];4&r||([this.measureRequests,l]=[l,this.measureRequests]);let a=l.map((t=>{try{return t.read(this)}catch(t){return te(this.state,t),rn}})),h=ve.create(this,this.state,[]),c=!1;h.flags|=r,e?e.flags|=r:e=h,this.updateState=2,h.empty||(this.updatePlugins(h),this.inputState.update(h),this.updateAttrs(),c=this.docView.update(h),c&&this.docViewUpdate());for(let t=0;t1||t<-1){n+=t,i.scrollTop=n/this.scaleY,o=-1;continue}}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(e&&!e.empty)for(let t of this.state.facet(jt))t(e)}get themeClasses(){return Ki+" "+(this.state.facet(_i)?Ui:$i)+" "+this.state.facet(ji)}updateAttrs(){let t=an(this,re,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),e={spellcheck:"false",autocorrect:"off",autocapitalize:"off",translate:"no",contenteditable:this.state.facet(ee)?"true":"false",class:"cm-content",style:`${$.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(e["aria-readonly"]="true"),an(this,le,e);let i=this.observer.ignore((()=>{let i=nt(this.contentDOM,this.contentAttrs,e),n=nt(this.dom,this.editorAttrs,t);return i||n}));return this.editorAttrs=t,this.contentAttrs=e,i}showAnnouncements(t){let e=!0;for(let i of t)for(let t of i.effects)if(t.is(sn.announce)){e&&(this.announceDOM.textContent=""),e=!1,this.announceDOM.appendChild(document.createElement("div")).textContent=t.value}}mountStyles(){this.styleModules=this.state.facet(me);let t=this.state.facet(sn.cspNonce);s.G.mount(this.root,this.styleModules.concat(Ji).reverse(),t?{nonce:t}:void 0)}readMeasured(){if(2==this.updateState)throw new Error("Reading the editor layout isn't allowed during an update");0==this.updateState&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(t){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame((()=>this.measure()))),t){if(this.measureRequests.indexOf(t)>-1)return;if(null!=t.key)for(let e=0;ee.spec==t))||null),e&&e.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(t){return this.readMeasured(),this.viewState.elementAtHeight(t)}lineBlockAtHeight(t){return this.readMeasured(),this.viewState.lineBlockAtHeight(t)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(t){return this.viewState.lineBlockAt(t)}get contentHeight(){return this.viewState.contentHeight}moveByChar(t,e,i){return Be(this,t,Re(this,t,e,i))}moveByGroup(t,e){return Be(this,t,Re(this,t,e,(e=>function(t,e,i){let s=t.state.charCategorizer(e),o=s(i);return t=>{let e=s(t);return o==n.Je.Space&&(o=e),o==e}}(this,t.head,e))))}visualLineSide(t,e){let i=this.bidiSpans(t),s=this.textDirectionAt(t.from),o=i[e?i.length-1:0];return n.OF.cursor(o.side(e,s)+t.from,o.forward(!e,s)?1:-1)}moveToLineBoundary(t,e,i=!0){return function(t,e,i,s){let o=Ee(t,e.head),r=s&&o.type==rt.Text&&(t.lineWrapping||o.widgetLineBreaks)?t.coordsAtPos(e.assoc<0&&e.head>o.from?e.head-1:e.head):null;if(r){let e=t.dom.getBoundingClientRect(),s=t.textDirectionAt(o.from),l=t.posAtCoords({x:i==(s==bt.LTR)?e.right-1:e.left+1,y:(r.top+r.bottom)/2});if(null!=l)return n.OF.cursor(l,i?-1:1)}return n.OF.cursor(i?o.to:o.from,i?-1:1)}(this,t,e,i)}moveVertically(t,e,i){return Be(this,t,function(t,e,i,s){let o=e.head,r=i?1:-1;if(o==(i?t.state.doc.length:0))return n.OF.cursor(o,e.assoc);let l,a=e.goalColumn,h=t.contentDOM.getBoundingClientRect(),c=t.coordsAtPos(o,e.assoc||-1),d=t.documentTop;if(c)null==a&&(a=c.left-h.left),l=r<0?c.top:c.bottom;else{let e=t.viewState.lineBlockAt(o);null==a&&(a=Math.min(h.right-h.left,t.defaultCharacterWidth*(o-e.from))),l=(r<0?e.top:e.bottom)+d}let u=h.left+a,f=null!=s?s:t.viewState.heightOracle.textHeight>>1;for(let e=0;;e+=10){let i=l+(f+e)*r,s=De(t,{x:u,y:i},!1,r);if(ih.bottom||(r<0?so)){let e=t.docView.coordsForChar(s),o=!e||i0)}coordsForChar(t){return this.readMeasured(),this.docView.coordsForChar(t)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(t){return!this.state.facet(Yt)||tthis.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(t))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(t){if(t.length>on)return It(t.length);let e,i=this.textDirectionAt(t.from);for(let n of this.bidiCache)if(n.from==t.from&&n.dir==i&&(n.fresh||Et(n.isolates,e=ue(this,t))))return n.order;e||(e=ue(this,t));let n=Pt(t.text,i,e);return this.bidiCache.push(new ln(t.from,t.to,i,e,!0,n)),n}get hasFocus(){var t;return(this.dom.ownerDocument.hasFocus()||$.safari&&(null===(t=this.inputState)||void 0===t?void 0:t.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore((()=>{x(this.contentDOM),this.docView.updateSelection()}))}setRoot(t){this._root!=t&&(this._root=t,this.observer.setWindow((9==t.nodeType?t:t.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let t of this.plugins)t.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(t,e={}){return Zt.of(new Xt("number"==typeof t?n.OF.cursor(t):t,e.y,e.x,e.yMargin,e.xMargin))}scrollSnapshot(){let{scrollTop:t,scrollLeft:e}=this.scrollDOM,i=this.viewState.scrollAnchorAt(t);return Zt.of(new Xt(n.OF.cursor(i.from),"start","start",i.top-t,e,!0))}setTabFocusMode(t){null==t?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:"boolean"==typeof t?this.inputState.tabFocusMode=t?0:-1:0!=this.inputState.tabFocusMode&&(this.inputState.tabFocusMode=Date.now()+t)}static domEventHandlers(t){return se.define((()=>({})),{eventHandlers:t})}static domEventObservers(t){return se.define((()=>({})),{eventObservers:t})}static theme(t,e){let i=s.G.newName(),n=[ji.of(i),me.of(Gi(`.${i}`,t))];return e&&e.dark&&n.push(_i.of(!0)),n}static baseTheme(t){return n.Nb.lowest(me.of(Gi("."+Ki,t,Yi)))}static findFromDOM(t){var e;let i=t.querySelector(".cm-content"),n=i&&E.get(i)||E.get(t);return(null===(e=null==n?void 0:n.rootView)||void 0===e?void 0:e.view)||null}}sn.styleModule=me,sn.inputHandler=_t,sn.clipboardInputFilter=$t,sn.clipboardOutputFilter=Ut,sn.scrollHandler=Jt,sn.focusChangeEffect=Kt,sn.perLineTextDirection=Yt,sn.exceptionSink=qt,sn.updateListener=jt,sn.editable=ee,sn.mouseSelectionStyle=Wt,sn.dragMovesSelection=zt,sn.clickAddsSelectionRange=Vt,sn.decorations=ae,sn.outerDecorations=he,sn.atomicRanges=ce,sn.bidiIsolatedRanges=de,sn.scrollMargins=fe,sn.darkTheme=_i,sn.cspNonce=n.sj.define({combine:t=>t.length?t[0]:""}),sn.contentAttributes=le,sn.editorAttributes=re,sn.lineWrapping=sn.contentAttributes.of({class:"cm-lineWrapping"}),sn.announce=n.Pe.define();const on=4096,rn={};class ln{constructor(t,e,i,n,s,o){this.from=t,this.to=e,this.dir=i,this.isolates=n,this.fresh=s,this.order=o}static update(t,e){if(e.empty&&!t.some((t=>t.fresh)))return t;let i=[],n=t.length?t[t.length-1].dir:bt.LTR;for(let s=Math.max(0,t.length-10);s=0;s--){let e=n[s],o="function"==typeof e?e(t):e;o&&tt(o,i)}return i}const hn=$.mac?"mac":$.windows?"win":$.linux?"linux":"key";function cn(t,e,i){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),!1!==i&&e.shiftKey&&(t="Shift-"+t),t}const dn=n.Nb.default(sn.domEventHandlers({keydown:(t,e)=>bn(pn(e.state),t,e,"editor")})),un=n.sj.define({enables:dn}),fn=new WeakMap;function pn(t){let e=t.facet(un),i=fn.get(e);return i||fn.set(e,i=function(t,e=hn){let i=Object.create(null),n=Object.create(null),s=(t,e)=>{let i=n[t];if(null==i)n[t]=e;else if(i!=e)throw new Error("Key binding "+t+" is used both as a regular binding and as a multi-stroke prefix")},o=(t,n,o,r,l)=>{var a,h;let c=i[t]||(i[t]=Object.create(null)),d=n.split(/ (?!$)/).map((t=>function(t,e){const i=t.split(/-(?!$)/);let n,s,o,r,l=i[i.length-1];"Space"==l&&(l=" ");for(let t=0;t{let n=gn={view:e,prefix:i,scope:t};return setTimeout((()=>{gn==n&&(gn=null)}),vn),!0}]})}let u=d.join(" ");s(u,!1);let f=c[u]||(c[u]={preventDefault:!1,stopPropagation:!1,run:(null===(h=null===(a=c._any)||void 0===a?void 0:a.run)||void 0===h?void 0:h.slice())||[]});o&&f.run.push(o),r&&(f.preventDefault=!0),l&&(f.stopPropagation=!0)};for(let n of t){let t=n.scope?n.scope.split(" "):["editor"];if(n.any)for(let e of t){let t=i[e]||(i[e]=Object.create(null));t._any||(t._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:s}=n;for(let e in t)t[e].run.push((t=>s(t,wn)))}let s=n[e]||n.key;if(s)for(let e of t)o(e,s,n.run,n.preventDefault,n.stopPropagation),n.shift&&o(e,"Shift-"+s,n.shift,n.preventDefault,n.stopPropagation)}return i}(e.reduce(((t,e)=>t.concat(e)),[]))),i}function mn(t,e,i){return bn(pn(t.state),e,t,i)}let gn=null;const vn=4e3;let wn=null;function bn(t,e,i,s){wn=e;let r=(0,o.xT)(e),l=(0,n.vS)(r,0),a=(0,n.Fh)(l)==r.length&&" "!=r,h="",c=!1,d=!1,u=!1;gn&&gn.view==i&&gn.scope==s&&(h=gn.prefix+" ",$e.indexOf(e.keyCode)<0&&(d=!0,gn=null));let f,p,m=new Set,g=t=>{if(t){for(let e of t.run)if(!m.has(e)&&(m.add(e),e(i)))return t.stopPropagation&&(u=!0),!0;t.preventDefault&&(t.stopPropagation&&(u=!0),d=!0)}return!1},v=t[s];return v&&(g(v[h+cn(r,e,!a)])?c=!0:a&&(e.altKey||e.metaKey||e.ctrlKey)&&!($.windows&&e.ctrlKey&&e.altKey)&&(f=o.E3[e.keyCode])&&f!=r?(g(v[h+cn(f,e,!0)])||e.shiftKey&&(p=o.BN[e.keyCode])!=r&&p!=f&&g(v[h+cn(p,e,!1)]))&&(c=!0):a&&e.shiftKey&&g(v[h+cn(r,e,!0)])&&(c=!0),!c&&g(v._any)&&(c=!0)),d&&(c=!0),c&&u&&e.stopPropagation(),wn=null,c}class yn{constructor(t,e,i,n,s){this.className=t,this.left=e,this.top=i,this.width=n,this.height=s}draw(){let t=document.createElement("div");return t.className=this.className,this.adjust(t),t}update(t,e){return e.className==this.className&&(this.adjust(t),!0)}adjust(t){t.style.left=this.left+"px",t.style.top=this.top+"px",null!=this.width&&(t.style.width=this.width+"px"),t.style.height=this.height+"px"}eq(t){return this.left==t.left&&this.top==t.top&&this.width==t.width&&this.height==t.height&&this.className==t.className}static forRange(t,e,i){if(i.empty){let n=t.coordsAtPos(i.head,i.assoc||1);if(!n)return[];let s=xn(t);return[new yn(e,n.left-s.left,n.top-s.top,null,n.bottom-n.top)]}return function(t,e,i){if(i.to<=t.viewport.from||i.from>=t.viewport.to)return[];let n=Math.max(i.from,t.viewport.from),s=Math.min(i.to,t.viewport.to),o=t.textDirection==bt.LTR,r=t.contentDOM,l=r.getBoundingClientRect(),a=xn(t),h=r.querySelector(".cm-line"),c=h&&window.getComputedStyle(h),d=l.left+(c?parseInt(c.paddingLeft)+Math.min(0,parseInt(c.textIndent)):0),u=l.right-(c?parseInt(c.paddingRight):0),f=Ee(t,n),p=Ee(t,s),m=f.type==rt.Text?f:null,g=p.type==rt.Text?p:null;m&&(t.lineWrapping||f.widgetLineBreaks)&&(m=kn(t,n,1,m));g&&(t.lineWrapping||p.widgetLineBreaks)&&(g=kn(t,s,-1,g));if(m&&g&&m.from==g.from&&m.to==g.to)return w(b(i.from,i.to,m));{let e=m?b(i.from,null,m):y(f,!1),n=g?b(null,i.to,g):y(p,!0),s=[];return(m||f).to<(g||p).from-(m&&g?1:0)||f.widgetLineBreaks>1&&e.bottom+t.defaultLineHeight/2h&&n.from=o)break;l>s&&a(Math.max(t,s),null==e&&t<=h,Math.min(l,o),null==i&&l>=c,r.dir)}if(s=n.to+1,s>=o)break}return 0==l.length&&a(h,null==e,c,null==i,t.textDirection),{top:s,bottom:r,horizontal:l}}function y(t,e){let i=l.top+(e?t.top:t.bottom);return{top:i,bottom:i,horizontal:[]}}}(t,e,i)}}function xn(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==bt.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function kn(t,e,i,n){let s=t.coordsAtPos(e,2*i);if(!s)return n;let o=t.dom.getBoundingClientRect(),r=(s.top+s.bottom)/2,l=t.posAtCoords({x:o.left+1,y:r}),a=t.posAtCoords({x:o.right-1,y:r});return null==l||null==a?n:{from:Math.max(n.from,Math.min(l,a)),to:Math.min(n.to,Math.max(l,a))}}class Sn{constructor(t,e){this.view=t,this.layer=e,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=t.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),e.above&&this.dom.classList.add("cm-layer-above"),e.class&&this.dom.classList.add(e.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(t.state),t.requestMeasure(this.measureReq),e.mount&&e.mount(this.dom,t)}update(t){t.startState.facet(An)!=t.state.facet(An)&&this.setOrder(t.state),(this.layer.update(t,this.dom)||t.geometryChanged)&&(this.scale(),t.view.requestMeasure(this.measureReq))}docViewUpdate(t){!1!==this.layer.updateOnDocViewUpdate&&t.requestMeasure(this.measureReq)}setOrder(t){let e=0,i=t.facet(An);for(;e{return i=t,n=this.drawn[e],!(i.constructor==n.constructor&&i.eq(n));var i,n}))){let e=this.dom.firstChild,i=0;for(let n of t)n.update&&e&&n.constructor&&this.drawn[i].constructor&&n.update(e,this.drawn[i])?(e=e.nextSibling,i++):this.dom.insertBefore(n.draw(),e);for(;e;){let t=e.nextSibling;e.remove(),e=t}this.drawn=t}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const An=n.sj.define();function Cn(t){return[se.define((e=>new Sn(e,t))),An.of(t)]}const Mn=!$.ios,On=n.sj.define({combine:t=>(0,n.QR)(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(t,e)=>Math.min(t,e),drawRangeCursor:(t,e)=>t||e})});function Dn(t={}){return[On.of(t),En,Ln,Pn,Gt.of(!0)]}function Tn(t){return t.startState.facet(On)!=t.state.facet(On)}const En=Cn({above:!0,markers(t){let{state:e}=t,i=e.facet(On),s=[];for(let o of e.selection.ranges){let r=o==e.selection.main;if(o.empty?!r||Mn:i.drawRangeCursor){let e=r?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",i=o.empty?o:n.OF.cursor(o.head,o.head>o.anchor?-1:1);for(let n of yn.forRange(t,e,i))s.push(n)}}return s},update(t,e){t.transactions.some((t=>t.selection))&&(e.style.animationName="cm-blink"==e.style.animationName?"cm-blink2":"cm-blink");let i=Tn(t);return i&&Rn(t.state,e),t.docChanged||t.selectionSet||i},mount(t,e){Rn(e.state,t)},class:"cm-cursorLayer"});function Rn(t,e){e.style.animationDuration=t.facet(On).cursorBlinkRate+"ms"}const Ln=Cn({above:!1,markers:t=>t.state.selection.ranges.map((e=>e.empty?[]:yn.forRange(t,"cm-selectionBackground",e))).reduce(((t,e)=>t.concat(e))),update:(t,e)=>t.docChanged||t.selectionSet||t.viewportChanged||Tn(t),class:"cm-selectionLayer"}),Bn={".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"}},".cm-content":{"& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}};Mn&&(Bn[".cm-line"].caretColor=Bn[".cm-content"].caretColor="transparent !important");const Pn=n.Nb.highest(sn.theme(Bn));function In(){return Fn}const Nn=lt.line({class:"cm-activeLine"}),Fn=se.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,i=[];for(let n of t.state.selection.ranges){let s=t.lineBlockAt(n.head);s.from>e&&(i.push(Nn.range(s.from)),e=s.from)}return lt.set(i)}},{decorations:t=>t.decorations});const Hn="-10000px";class Vn{constructor(t,e,i,n){this.facet=e,this.createTooltipView=i,this.removeTooltipView=n,this.input=t.state.facet(e),this.tooltips=this.input.filter((t=>t));let s=null;this.tooltipViews=this.tooltips.map((t=>s=i(t,s)))}update(t,e){var i;let n=t.state.facet(this.facet),s=n.filter((t=>t));if(n===this.input){for(let e of this.tooltipViews)e.update&&e.update(t);return!1}let o=[],r=e?[]:null;for(let i=0;ie[i]=t)),e.length=r.length),this.input=n,this.tooltips=s,this.tooltipViews=o,!0}}function zn(t){let{win:e}=t;return{top:0,left:0,bottom:e.innerHeight,right:e.innerWidth}}const Wn=n.sj.define({combine:t=>{var e,i,n;return{position:$.ios?"absolute":(null===(e=t.find((t=>t.position)))||void 0===e?void 0:e.position)||"fixed",parent:(null===(i=t.find((t=>t.parent)))||void 0===i?void 0:i.parent)||null,tooltipSpace:(null===(n=t.find((t=>t.tooltipSpace)))||void 0===n?void 0:n.tooltipSpace)||zn}}}),qn=new WeakMap,jn=se.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Wn);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver="function"==typeof ResizeObserver?new ResizeObserver((()=>this.measureSoon())):null,this.manager=new Vn(t,$n,((t,e)=>this.createTooltip(t,e)),(t=>{this.resizeObserver&&this.resizeObserver.unobserve(t.dom),t.dom.remove()})),this.above=this.manager.tooltips.map((t=>!!t.above)),this.intersectionObserver="function"==typeof IntersectionObserver?new IntersectionObserver((t=>{Date.now()>this.lastTransaction-50&&t.length>0&&t[t.length-1].intersectionRatio<1&&this.measureSoon()}),{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout((()=>{this.measureTimeout=-1,this.maybeMeasure()}),50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let i=e||t.geometryChanged,n=t.state.facet(Wn);if(n.position!=this.position&&!this.madeAbsolute){this.position=n.position;for(let t of this.manager.tooltipViews)t.dom.style.position=this.position;i=!0}if(n.parent!=this.parent){this.parent&&this.container.remove(),this.parent=n.parent,this.createContainer();for(let t of this.manager.tooltipViews)this.container.appendChild(t.dom);i=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);i&&this.maybeMeasure()}createTooltip(t,e){let i=t.create(this.view),n=e?e.dom:null;if(i.dom.classList.add("cm-tooltip"),t.arrow&&!i.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let t=document.createElement("div");t.className="cm-tooltip-arrow",i.dom.appendChild(t)}return i.dom.style.position=this.position,i.dom.style.top=Hn,i.dom.style.left="0px",this.container.insertBefore(i.dom,n),i.mount&&i.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(i.dom),i}destroy(){var t,e,i;this.view.win.removeEventListener("resize",this.measureSoon);for(let e of this.manager.tooltipViews)e.dom.remove(),null===(t=e.destroy)||void 0===t||t.call(e);this.parent&&this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(i=this.intersectionObserver)||void 0===i||i.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,i=!1;if("fixed"==this.position&&this.manager.tooltipViews.length){let{dom:t}=this.manager.tooltipViews[0];if($.gecko)i=t.offsetParent!=this.container.ownerDocument.body;else if(t.style.top==Hn&&"0px"==t.style.left){let e=t.getBoundingClientRect();i=Math.abs(e.top+1e4)>1||Math.abs(e.left)>1}}if(i||"absolute"==this.position)if(this.parent){let i=this.parent.getBoundingClientRect();i.width&&i.height&&(t=i.width/this.parent.offsetWidth,e=i.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let n=this.view.scrollDOM.getBoundingClientRect(),s=pe(this.view);return{visible:{left:n.left+s.left,top:n.top+s.top,right:n.right-s.right,bottom:n.bottom-s.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map(((t,e)=>{let i=this.manager.tooltipViews[e];return i.getCoords?i.getCoords(t.pos):this.view.coordsAtPos(t.pos)})),size:this.manager.tooltipViews.map((({dom:t})=>t.getBoundingClientRect())),space:this.view.state.facet(Wn).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:i}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let t of this.manager.tooltipViews)t.dom.style.position="absolute"}let{visible:i,space:n,scaleX:s,scaleY:o}=t,r=[];for(let l=0;l=Math.min(i.bottom,n.bottom)||d.rightMath.min(i.right,n.right)+.1)){c.style.top=Hn;continue}let f=a.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,p=f?7:0,m=u.right-u.left,g=null!==(e=qn.get(h))&&void 0!==e?e:u.bottom-u.top,v=h.offset||Kn,w=this.view.textDirection==bt.LTR,b=u.width>n.right-n.left?w?n.left:n.right-u.width:w?Math.max(n.left,Math.min(d.left-(f?14:0)+v.x,n.right-m)):Math.min(Math.max(n.left,d.left-m+(f?14:0)-v.x),n.right-m),y=this.above[l];!a.strictSide&&(y?d.top-g-p-v.yn.bottom)&&y==n.bottom-d.bottom>d.top-n.top&&(y=this.above[l]=!y);let x=(y?d.top-n.top:n.bottom-d.bottom)-p;if(xb&&t.topk&&(k=y?t.top-g-2-p:t.bottom+p+2);if("absolute"==this.position?(c.style.top=(k-t.parent.top)/o+"px",c.style.left=(b-t.parent.left)/s+"px"):(c.style.top=k/o+"px",c.style.left=b/s+"px"),f){let t=d.left+(w?v.x:-v.x)-(b+14-7);f.style.left=t/s+"px"}!0!==h.overlap&&r.push({left:b,top:k,right:S,bottom:k+g}),c.classList.toggle("cm-tooltip-above",y),c.classList.toggle("cm-tooltip-below",!y),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Hn}},{eventObservers:{scroll(){this.maybeMeasure()}}}),_n=sn.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"var(--spice-text)"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),Kn={x:0,y:0},$n=n.sj.define({enables:[jn,_n]}),Un=n.sj.define({combine:t=>t.reduce(((t,e)=>t.concat(e)),[])});class Yn{static create(t){return new Yn(t)}constructor(t){this.view=t,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new Vn(t,Un,((t,e)=>this.createHostedView(t,e)),(t=>t.dom.remove()))}createHostedView(t,e){let i=t.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,e?e.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(t){for(let e of this.manager.tooltipViews)e.mount&&e.mount(t);this.mounted=!0}positioned(t){for(let e of this.manager.tooltipViews)e.positioned&&e.positioned(t)}update(t){this.manager.update(t)}destroy(){var t;for(let e of this.manager.tooltipViews)null===(t=e.destroy)||void 0===t||t.call(e)}passProp(t){let e;for(let i of this.manager.tooltipViews){let n=i[t];if(void 0!==n)if(void 0===e)e=n;else if(e!==n)return}return e}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const Gn=$n.compute([Un],(t=>{let e=t.facet(Un);return 0===e.length?null:{pos:Math.min(...e.map((t=>t.pos))),end:Math.max(...e.map((t=>{var e;return null!==(e=t.end)&&void 0!==e?e:t.pos}))),create:Yn.create,above:e[0].above,arrow:e.some((t=>t.arrow))}}));class Jn{constructor(t,e,i,n,s){this.view=t,this.source=e,this.field=i,this.setHover=n,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:t.dom,time:0},this.checkHover=this.checkHover.bind(this),t.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),t.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout((()=>this.startHover()),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let t=Date.now()-this.lastMove.time;ti.bottom||e.xi.right+t.defaultCharacterWidth)return;let o=t.bidiSpans(t.state.doc.lineAt(n)).find((t=>t.from<=n&&t.to>=n)),r=o&&o.dir==bt.RTL?-1:1;s=e.x{this.pending==e&&(this.pending=null,!i||Array.isArray(i)&&!i.length||t.dispatch({effects:this.setHover.of(Array.isArray(i)?i:[i])}))}),(e=>te(t.state,e,"hover tooltip")))}else!o||Array.isArray(o)&&!o.length||t.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let t=this.view.plugin(jn),e=t?t.manager.tooltips.findIndex((t=>t.create==Yn.create)):-1;return e>-1?t.manager.tooltipViews[e]:null}mousemove(t){var e,i;this.lastMove={x:t.clientX,y:t.clientY,target:t.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:n,tooltip:s}=this;if(n.length&&s&&!function(t,e){let i,{left:n,right:s,top:o,bottom:r}=t.getBoundingClientRect();if(i=t.querySelector(".cm-tooltip-arrow")){let t=i.getBoundingClientRect();o=Math.min(t.top,o),r=Math.max(t.bottom,r)}return e.clientX>=n-Xn&&e.clientX<=s+Xn&&e.clientY>=o-Xn&&e.clientY<=r+Xn}(s.dom,t)||this.pending){let{pos:s}=n[0]||this.pending,o=null!==(i=null===(e=n[0])||void 0===e?void 0:e.end)&&void 0!==i?i:s;(s==o?this.view.posAtCoords(this.lastMove)==s:function(t,e,i,n,s,o){let r=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(r.left>n||r.rights||Math.min(r.bottom,l)=e&&a<=i}(this.view,s,o,t.clientX,t.clientY))||(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(t){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:e}=this;if(e.length){let{tooltip:e}=this;e&&e.dom.contains(t.relatedTarget)?this.watchTooltipLeave(e.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(t){let e=i=>{t.removeEventListener("mouseleave",e),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};t.addEventListener("mouseleave",e)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Xn=4;function Zn(t,e={}){let i=n.Pe.define(),s=n.sU.define({create:()=>[],update(t,s){if(t.length&&(e.hideOnChange&&(s.docChanged||s.selection)?t=[]:e.hideOn&&(t=t.filter((t=>!e.hideOn(s,t)))),s.docChanged)){let e=[];for(let i of t){let t=s.changes.mapPos(i.pos,-1,n.iR.TrackDel);if(null!=t){let n=Object.assign(Object.create(null),i);n.pos=t,null!=n.end&&(n.end=s.changes.mapPos(n.end)),e.push(n)}}t=e}for(let e of s.effects)e.is(i)&&(t=e.value),e.is(ts)&&(t=[]);return t},provide:t=>Un.from(t)});return{active:s,extension:[s,se.define((n=>new Jn(n,t,s,i,e.hoverTime||300))),Gn]}}function Qn(t,e){let i=t.plugin(jn);if(!i)return null;let n=i.manager.tooltips.indexOf(e);return n<0?null:i.manager.tooltipViews[n]}const ts=n.Pe.define();const es=n.sj.define({combine(t){let e,i;for(let n of t)e=e||n.topContainer,i=i||n.bottomContainer;return{topContainer:e,bottomContainer:i}}});function is(t,e){let i=t.plugin(ns),n=i?i.specs.indexOf(e):-1;return n>-1?i.panels[n]:null}const ns=se.fromClass(class{constructor(t){this.input=t.state.facet(rs),this.specs=this.input.filter((t=>t)),this.panels=this.specs.map((e=>e(t)));let e=t.state.facet(es);this.top=new ss(t,!0,e.topContainer),this.bottom=new ss(t,!1,e.bottomContainer),this.top.sync(this.panels.filter((t=>t.top))),this.bottom.sync(this.panels.filter((t=>!t.top)));for(let t of this.panels)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}update(t){let e=t.state.facet(es);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new ss(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new ss(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let i=t.state.facet(rs);if(i!=this.input){let e=i.filter((t=>t)),n=[],s=[],o=[],r=[];for(let i of e){let e,l=this.specs.indexOf(i);l<0?(e=i(t.view),r.push(e)):(e=this.panels[l],e.update&&e.update(t)),n.push(e),(e.top?s:o).push(e)}this.specs=e,this.panels=n,this.top.sync(s),this.bottom.sync(o);for(let t of r)t.dom.classList.add("cm-panel"),t.mount&&t.mount()}else for(let e of this.panels)e.update&&e.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>sn.scrollMargins.of((e=>{let i=e.plugin(t);return i&&{top:i.top.scrollMargin(),bottom:i.bottom.scrollMargin()}}))});class ss{constructor(t,e,i){this.view=t,this.top=e,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(t){for(let e of this.panels)e.destroy&&t.indexOf(e)<0&&e.destroy();this.panels=t,this.syncDOM()}syncDOM(){if(0==this.panels.length)return void(this.dom&&(this.dom.remove(),this.dom=void 0));if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let t=this.container||this.view.dom;t.insertBefore(this.dom,this.top?t.firstChild:null)}let t=this.dom.firstChild;for(let e of this.panels)if(e.dom.parentNode==this.dom){for(;t!=e.dom;)t=os(t);t=t.nextSibling}else this.dom.insertBefore(e.dom,t);for(;t;)t=os(t)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(this.container&&this.classes!=this.view.themeClasses){for(let t of this.classes.split(" "))t&&this.container.classList.remove(t);for(let t of(this.classes=this.view.themeClasses).split(" "))t&&this.container.classList.add(t)}}}function os(t){let e=t.nextSibling;return t.remove(),e}const rs=n.sj.define({enables:ns});class ls extends n.FB{compare(t){return this==t||this.constructor==t.constructor&&this.eq(t)}eq(t){return!1}destroy(t){}}ls.prototype.elementClass="",ls.prototype.toDOM=void 0,ls.prototype.mapMode=n.iR.TrackBefore,ls.prototype.startSide=ls.prototype.endSide=-1,ls.prototype.point=!0;const as=n.sj.define(),hs=n.sj.define(),cs={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>n.om.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{}},ds=n.sj.define();function us(t){return[ps(),ds.of(Object.assign(Object.assign({},cs),t))]}const fs=n.sj.define({combine:t=>t.some((t=>t))});function ps(t){let e=[ms];return t&&!1===t.fixed&&e.push(fs.of(!0)),e}const ms=se.fromClass(class{constructor(t){this.view=t,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(ds).map((e=>new bs(t,e)));for(let t of this.gutters)this.dom.appendChild(t.dom);this.fixed=!t.state.facet(fs),this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}update(t){if(this.updateGutters(t)){let e=this.prevViewport,i=t.view.viewport,n=Math.min(e.to,i.to)-Math.max(e.from,i.from);this.syncGutters(n<.8*(i.to-i.from))}t.geometryChanged&&(this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px"),this.view.state.facet(fs)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":""),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&this.dom.remove();let i=n.om.iter(this.view.state.facet(as),this.view.viewport.from),s=[],o=this.gutters.map((t=>new ws(t,this.view.viewport,-this.view.documentPadding.top)));for(let t of this.view.viewportLineBlocks)if(s.length&&(s=[]),Array.isArray(t.type)){let e=!0;for(let n of t.type)if(n.type==rt.Text&&e){vs(i,s,n.from);for(let t of o)t.line(this.view,n,s);e=!1}else if(n.widget)for(let t of o)t.widget(this.view,n)}else if(t.type==rt.Text){vs(i,s,t.from);for(let e of o)e.line(this.view,t,s)}else if(t.widget)for(let e of o)e.widget(this.view,t);for(let t of o)t.finish();t&&this.view.scrollDOM.insertBefore(this.dom,e)}updateGutters(t){let e=t.startState.facet(ds),i=t.state.facet(ds),s=t.docChanged||t.heightChanged||t.viewportChanged||!n.om.eq(t.startState.facet(as),t.state.facet(as),t.view.viewport.from,t.view.viewport.to);if(e==i)for(let e of this.gutters)e.update(t)&&(s=!0);else{s=!0;let n=[];for(let s of i){let i=e.indexOf(s);i<0?n.push(new bs(this.view,s)):(this.gutters[i].update(t),n.push(this.gutters[i]))}for(let t of this.gutters)t.dom.remove(),n.indexOf(t)<0&&t.destroy();for(let t of n)this.dom.appendChild(t.dom);this.gutters=n}return s}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove()}},{provide:t=>sn.scrollMargins.of((e=>{let i=e.plugin(t);return i&&0!=i.gutters.length&&i.fixed?e.textDirection==bt.LTR?{left:i.dom.offsetWidth*e.scaleX}:{right:i.dom.offsetWidth*e.scaleX}:null}))});function gs(t){return Array.isArray(t)?t:[t]}function vs(t,e,i){for(;t.value&&t.from<=i;)t.from==i&&e.push(t.value),t.next()}class ws{constructor(t,e,i){this.gutter=t,this.height=i,this.i=0,this.cursor=n.om.iter(t.markers,e.from)}addElement(t,e,i){let{gutter:n}=this,s=(e.top-this.height)/t.scaleY,o=e.height/t.scaleY;if(this.i==n.elements.length){let e=new ys(t,o,s,i);n.elements.push(e),n.dom.appendChild(e.dom)}else n.elements[this.i].update(t,o,s,i);this.height=e.bottom,this.i++}line(t,e,i){let n=[];vs(this.cursor,n,e.from),i.length&&(n=n.concat(i));let s=this.gutter.config.lineMarker(t,e,n);s&&n.unshift(s);let o=this.gutter;(0!=n.length||o.config.renderEmptyElements)&&this.addElement(t,e,n)}widget(t,e){let i=this.gutter.config.widgetMarker(t,e.widget,e),n=i?[i]:null;for(let i of t.state.facet(hs)){let s=i(t,e.widget,e);s&&(n||(n=[])).push(s)}n&&this.addElement(t,e,n)}finish(){let t=this.gutter;for(;t.elements.length>this.i;){let e=t.elements.pop();t.dom.removeChild(e.dom),e.destroy()}}}class bs{constructor(t,e){this.view=t,this.config=e,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in e.domEventHandlers)this.dom.addEventListener(i,(n=>{let s,o=n.target;if(o!=this.dom&&this.dom.contains(o)){for(;o.parentNode!=this.dom;)o=o.parentNode;let t=o.getBoundingClientRect();s=(t.top+t.bottom)/2}else s=n.clientY;let r=t.lineBlockAtHeight(s-t.documentTop);e.domEventHandlers[i](t,r,n)&&n.preventDefault()}));this.markers=gs(e.markers(t)),e.initialSpacer&&(this.spacer=new ys(t,0,0,[e.initialSpacer(t)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(t){let e=this.markers;if(this.markers=gs(this.config.markers(t.view)),this.spacer&&this.config.updateSpacer){let e=this.config.updateSpacer(this.spacer.markers[0],t);e!=this.spacer.markers[0]&&this.spacer.update(t.view,0,0,[e])}let i=t.view.viewport;return!n.om.eq(this.markers,e,i.from,i.to)||!!this.config.lineMarkerChange&&this.config.lineMarkerChange(t)}destroy(){for(let t of this.elements)t.destroy()}}class ys{constructor(t,e,i,n){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(t,e,i,n)}update(t,e,i,n){this.height!=e&&(this.height=e,this.dom.style.height=e+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),function(t,e){if(t.length!=e.length)return!1;for(let i=0;i(0,n.QR)(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(t,e){let i=Object.assign({},t);for(let t in e){let n=i[t],s=e[t];i[t]=n?(t,e,i)=>n(t,e,i)||s(t,e,i):s}return i}})});class As extends ls{constructor(t){super(),this.number=t}eq(t){return this.number==t.number}toDOM(){return document.createTextNode(this.number)}}function Cs(t,e){return t.state.facet(Ss).formatNumber(e,t.state)}const Ms=ds.compute([Ss],(t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers:t=>t.state.facet(xs),lineMarker:(t,e,i)=>i.some((t=>t.toDOM))?null:new As(Cs(t,t.state.doc.lineAt(e.from).number)),widgetMarker:(t,e,i)=>{for(let n of t.state.facet(ks)){let s=n(t,e,i);if(s)return s}return null},lineMarkerChange:t=>t.startState.facet(Ss)!=t.state.facet(Ss),initialSpacer:t=>new As(Cs(t,Ds(t.state.doc.lines))),updateSpacer(t,e){let i=Cs(e.view,Ds(e.view.state.doc.lines));return i==t.number?t:new As(i)},domEventHandlers:t.facet(Ss).domEventHandlers})));function Os(t={}){return[Ss.of(t),ps(),Ms]}function Ds(t){let e=9;for(;e{let e=[],i=-1;for(let n of t.selection.ranges){let s=t.doc.lineAt(n.head).from;s>i&&(i=s,e.push(Ts.range(s)))}return n.om.of(e)}));function Rs(){return Es}}}]); +//# sourceMappingURL=5125.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/5505.js b/dot-config/spicetify/Extracted/Themed/xpui/5505.js new file mode 100755 index 00000000..e8c3762e --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/5505.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5505],{21071:(e,t,r)=>{r.d(t,{p:()=>u});var i=r(30758),a=r(62411),n=r(97285),l=r(98293),s=r(12864),o=r(39566),c=r(20784),d=r(86070);const u=i.memo((function({uri:e,divider:t,removeLabel:r}){const u=(0,a.wA)(),p=!(0,o.n)(),g=(0,c.f)(),y=(0,i.useCallback)((async()=>{u((0,l.aw)(e,!0))}),[u,e]);return(0,d.jsx)(s.D,{role:"menuitem",divider:t,disabled:p&&!g?.getCapabilities().canModifyOffline,onClick:y,leadingIcon:(0,d.jsx)(n.k,{semanticColor:"textBrightAccent",size:"small"}),children:r})}))},59076:(e,t,r)=>{r.d(t,{P:()=>x});var i=r(30758),a=r(31417),n=r(10994),l=r(59521),s=r(20772),o=r(21489),c=r(67865),d=r(21071),u=r(44672),p=r(20817),g=r(78774),y=r(7307),m=r(86070);const x=i.memo((function({uri:e,artistUri:t,canPin:r=p.oT.NO,isPinned:i=!1,canRemove:x=!1}){const{spec:h}=(0,g.o)(e);return(0,m.jsx)(u.pZ,{value:"album",children:(0,m.jsxs)(n.W,{children:[x&&(0,m.jsx)(d.p,{uri:e,removeLabel:a.Ru.get("contextmenu.remove-from-library")}),t&&(0,m.jsx)(s.z,{spec:h,divider:"after",uri:t,displayText:a.Ru.get("contextmenu.go-to-artist-radio")}),r!==p.oT.NO&&(0,m.jsx)(c.k,{uri:e,canPin:r,isPinned:i,type:y.c.PRE_RELEASE_ALBUM,spec:h}),(0,m.jsx)(l.m,{uri:e,spec:h,displayText:a.Ru.get("context-menu.copy-album-link")}),(0,m.jsx)(o.q,{spec:h,divider:"before",uri:e})]})})}))},83647:(e,t,r)=>{r.d(t,{z:()=>x});var i=r(30758),a=r(97500),n=r.n(a),l=r(39498),s=r(65503),o=r(7315),c=r(31417);const d="MRzne1iuLfbh7KEwhHOk";var u=r(86070);function p({onClick:e}){return(0,u.jsx)(s.H,{size:"small",onClick:e,iconOnly:o.M,"aria-label":c.Ru.get("close"),className:d})}const g="dixACKl18S755OnSdpna",y="IPdLO850RGC7isV9QxWB",m="S7PfnpeKtq9MCSrMhifz",x=(0,i.forwardRef)((({onClose:e=(()=>{}),children:t,shouldCloseOnEscapePress:r=!0,colorSet:a="encore-announcement-set",maxWidth:s=180,header:o},c)=>((0,i.useEffect)((()=>{const t=t=>{r&&"Escape"===t.key&&e()};return window.addEventListener("keydown",t,!0),()=>{window.removeEventListener("keydown",t,!0)}}),[r,e]),(0,u.jsxs)("div",{ref:c,className:n()(a,g,{[y]:!!o}),style:{maxWidth:`${s}px`},children:[!!o&&(0,u.jsxs)("div",{className:m,children:[o," ",(0,u.jsx)(p,{onClick:e})]}),t,o?null:(0,u.jsx)(p,{onClick:e}),(0,u.jsx)(l.i,{})]}))))},86134:(e,t,r)=>{r.d(t,{$:()=>u});var i=r(30758),a=r(71217),n=r(22949);function l(e,t,r=!0,i=!1){if(!e)return void console.error("No list element found. Canceling moving focus");if(!(0,n.fk)(e))return;const l=e.querySelector('[tabindex="0"]');t===a.O.UP&&(0,n.MS)(l,s(e,l,a.O.UP,r,i)),t===a.O.DOWN&&(0,n.MS)(l,s(e,l,a.O.DOWN,r,i))}function s(e,t,r,i,l){const s=t.closest('li[role="listitem"]');if(!s)return t;let o=s,c=t;const d=Array.from(e.querySelectorAll('li[role="listitem"]')),u=d.indexOf(s);if(u<0)return t;if(r===a.O.UP){if(document.activeElement===e){if(o=d[d.length-1],l){const e=o?.querySelectorAll(n.nu);c=e[e.length-1]}else c=o?.querySelector(n.nu);return c??t}if(l){const e=Array.from(s.querySelectorAll(n.nu)),r=e.indexOf(t)-1;if(r>=0)return e[r]}let r=u-1;const a=()=>!c&&(!i&&r>=0||i&&u!==r);do{o=d[r];if(i&&!o&&(r=d.length-1,o=d[r]),l){const e=o?.querySelectorAll(n.nu);c=e?e[e.length-1]:null}else c=o?.querySelector(n.nu);r-=1}while(a())}else if(r===a.O.DOWN){if(document.activeElement===e)return o=d[0],c=o?.querySelector(n.nu),c??t;if(l){const e=Array.from(s.querySelectorAll(n.nu)),r=e.indexOf(t)+1;if(r{const e=!i&&r<=d.length;return!c&&(e||i&&u!==r)};do{o=d[r];i&&!o&&(r=0,o=d[r]),c=o?.querySelector(n.nu),r+=1}while(a())}return c||t}var o=r(43356),c=r(35662),d=r(86070);const u=(0,i.forwardRef)((({onKeyDown:e,children:t,circular:r=!0,allowsMultipleInteractiveChildrenInItem:s=!1,...u},p)=>{const g=(0,c.N)(p);(0,o.R)(g);const y=(0,i.useCallback)((t=>{g.current?.contains(t.target)&&("ArrowUp"!==t.key&&"ArrowDown"!==t.key||(t.preventDefault(),document.documentElement.classList.remove("no-focus-outline")),"ArrowUp"===t.key&&l(g.current,a.O.UP,r,s),"ArrowDown"===t.key&&l(g.current,a.O.DOWN,r,s),e?.(t))}),[r,s,g,e]),m=(0,i.useCallback)((e=>{if(!g.current)return;const t=e.target,r=g.current.querySelector('[tabindex="0"]');t.closest('li[role="listitem"]')&&t!==r&&(0,n.MS)(r,t,{preventScroll:!0})}),[g]);return(0,d.jsx)("ul",{role:"list",ref:g,onKeyDown:y,onFocus:m,tabIndex:0,...u,children:t})}))},12010:(e,t,r)=>{r.d(t,{e:()=>l});var i=r(70353);const a="k270skPbT7JOaSidSA2a";var n=r(86070);const l=({iconSize:e=64,...t})=>(0,n.jsx)("div",{className:a,children:(0,n.jsx)(i.E,{iconSize:e,...t,semanticColor:"textBrightAccent","aria-hidden":!0})})},12967:(e,t,r)=>{r.d(t,{X:()=>u,A:()=>H});var i=r(30758),a=r(74159),n=r(90160),l=r(31417),s=r(49980),o=r(94461);const c="KsnGjjEeMb2miriJrkjW";var d=r(86070);const u=()=>{const e=l.Ru.getLocaleForTranslation(),t=o.IB[e]??o.IB.en,r=(0,s.ZZ)(),u=(0,i.useCallback)((()=>{r({type:"OPEN"})}),[r]);return(0,d.jsx)("div",{className:c,children:(0,d.jsx)(a.n,{iconLeading:n.d,size:"small",onClick:u,"data-testid":"language-selection-button",children:t.displayName})})};var p=r(8143),g=r(62411),y=r(95530),m=r(6772),x=r(22726),h=r(37410),b=r(33558),f=r(7307),S=r(66387),P=r(77008);const v="ZpqHX3kvsJIsR1QIc4kf",C=({children:e,locale:t,onClick:r,type:i="button"})=>{const a=t===b.Xn,n=(0,P.vf)(window.location.pathname),s=(0,x.o_h)(window.location.pathname),o=(0,h.W)({type:"route",uri:n?f.c.HOME:s?.toURI()}),c={className:v,id:t,onClick:e=>(e=>{if("button"===i){e.preventDefault();const t=new URL(window.location.href);window.location.href.includes("locale")&&t.searchParams.delete("locale"),window.location.href=t.href}r(t)})(e),"data-testid":`language-option-${t}`};if("link"===i){const r=(0,S.ll)(window.location.pathname,!a),i=(0,S.hF)(r,(0,l.a7)(t).baseName),n=o?i:window.location.pathname,s=(e=>e.endsWith("/")?e.slice(0,-1):e)(`${window.location.origin}${n}`);return(0,d.jsx)("a",{href:s,...c,children:e})}return(0,d.jsx)("button",{...c,children:e})},w="eYLSfS4EKfwsdTsItWkY",I=({style:e,children:t})=>(0,d.jsx)("div",{className:w,style:e,children:t});var T=r(97500),R=r.n(T);const A="KPuW9eE4auKgVgMtPZoH",D="zCedVxWmwaJhPIGzJixP",j="qzuG9AHNXHQrOGF06r9A",L="ZgjCz5A7qOyprtvcLK8y",E="BSwvSvqHiQUVuim4Eidv",O="TpluDuF12UKv3IIq_VDu",k=({onClose:e,children:t})=>{const r=(0,i.useRef)(null),{isOpen:a}=(0,s.iL)();return(0,d.jsx)("div",{"data-testid":"language-selection-modal",className:R()(A,{[D]:a}),onClick:t=>{t.target===r.current&&e()},role:"presentation",ref:r,children:t})},N=({ariaDescribedBy:e,ariaLabelledBy:t,children:r})=>{const{isOpen:i}=(0,s.iL)();return(0,d.jsx)("div",{className:j,role:"dialog",hidden:!i,"aria-modal":!0,"aria-labelledby":t,"aria-describedby":e,children:r})};var F=r(7315);const B=({onClose:e})=>(0,d.jsx)("button",{"data-testid":"close-button",className:O,onClick:()=>{e()},children:(0,d.jsx)(F.M,{size:"small","aria-label":l.Ru.get("close")})});var M=r(86394),U=r(2092),V=r(77141),_=r(99644),z=r(95175);const H=({languageSelectionModalRef:e})=>{const t=(0,i.useRef)(null),[r,a]=(0,i.useState)("0"),n=(0,s.ZZ)(),c=(0,g.d4)(U.M),u=(0,i.useCallback)((()=>{n({type:"CLOSE"})}),[n]),{isOpen:x}=(0,s.iL)(),h=(0,i.useCallback)((()=>{a(`${t.current?.getBoundingClientRect().height}px`)}),[a]),b=e=>{var t;(0,z.n0)({name:"sp_locale",value:e,domain:(t="open.spotify.com",t.substring(t.indexOf("."))),days:365}),u()};if((0,M.m)(u),(0,_.w)({refOrElement:t,observeOnly:"height",onResize:h}),(0,i.useEffect)((()=>{h()}),[h]),!e.current)return null;const f="language-selection-title",S="language-selection-subtitle",v={"--header-height":r};return(0,p.createPortal)((0,d.jsx)(V.s,{active:x,children:(0,d.jsx)("div",{children:(0,d.jsx)(k,{onClose:u,children:(0,d.jsxs)(N,{ariaLabelledBy:f,ariaDescribedBy:S,children:[(0,d.jsxs)("div",{className:L,ref:t,children:[(0,d.jsxs)("div",{className:E,children:[(0,d.jsx)(y.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",id:f,paddingBottom:m.v4,children:l.Ru.get("i18n.language-selection.title")}),(0,d.jsx)(y.E,{as:"p",variant:"bodyMedium",semanticColor:"textBase",id:S,paddingBottom:m.CD,children:l.Ru.get("i18n.language-selection.subtitle")})]}),(0,d.jsx)(B,{onClose:u})]}),(0,d.jsx)(I,{style:{...v},children:o.Np.map((e=>{const t=(0,l.a7)(e).baseName,r=(0,P.p)({localeFeatureFlag:c,urlLocale:t,type:"locale"});return(0,d.jsxs)(C,{onClick:b,locale:e,type:r?"link":"button",children:[(0,d.jsx)(y.E,{semanticColor:"textBase",children:o.IB[e].displayName}),(0,d.jsx)(y.E,{children:o.IB[e].displayNameEn})]},e)}))})]})})})}),e.current)}},15505:(e,t,r)=>{r.d(t,{A:()=>Ol,YourLibraryX:()=>Ks,q:()=>kl});var i=r(30758),a=r(97500),n=r.n(a),l=r(96131),s=r(62411),o=r(40638),c=r(88308),d=r(14343),u=r(75444),p=r(77567),g=r(65462),y=r(10994),m=r(30855),x=r(18923),h=r(31417),b=r(12864),f=r(89402),S=r(30493),P=r(44672),v=r(33329),C=r(86070);const w=({position:e,divider:t,onCreateCallback:r=(()=>{}),spec:a})=>{const n=(0,f.W)(),{createPlaylist:l}=(0,S.A)(),s=(0,v.s)(),o=(0,i.useCallback)((()=>{n({intent:"create-playlist",type:"click"});const t=a.createButtonFactory().hitCreatePlaylist();t&&s.logInteraction(t),l(h.Ru.get("playlist.default_playlist_name"),e),r()}),[n,a,s,l,e,r]);return(0,C.jsx)(b.D,{role:"menuitem",divider:t,onClick:o,leadingIcon:(0,C.jsx)(x.u,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.create-playlist")})},I=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"create-playlist",children:(0,C.jsx)(w,{...e})})}));var T=r(20817),R=r(78774);const A=i.memo((function({folderUri:e,onCreateCallback:t}){const r=e?{after:{uri:e}}:{before:"start"},{spec:i}=(0,R.o)(e??T.gv);return(0,C.jsx)(P.pZ,{value:"folder",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(I,{position:r,onCreateCallback:t,spec:i}),(0,C.jsx)(m.j,{position:r,onCreateCallback:t,spec:i})]})})}));var D=r(76123),j=r(42583),L=r(50925),E=r(78464),O=r(90696),k=r(97503),N=r(87257),F=r(78505),B=r(50161),M=r(74515),U=r(40339),V=r(53328),_=r(8428),z=r(3168),H=r(62844),W=r(73816),X=r(96566);const K=1248,Y=800,G=(0,X.g)(_.Z),Z=(0,X.g)(H.fX),q=()=>(function(){const{size:e,setSize:t,minWidth:r,maxWidth:a,ylxCollapsedStateNavbarWidth:n,ylxDefaultStateNavbarWidth:s,ylxExpandedStateNavbarWidth:o}=(0,M.y)(),{ylxSidebarState:c,setYlxSidebarState:d,canCollapse:u}=(0,H.sy)(),p=(0,U.XB)(),g=(0,U._Y)(),{min:y,max:m,size:x,setSize:h}=(0,z.f)(),b=(0,W.H)(),f=(0,i.useRef)(null),S=(0,i.useRef)(null),P=(0,i.useRef)(null);(0,i.useLayoutEffect)((()=>{const i=b-e-3*F.KV-(p!==_.Z.Disabled?x+F.KV:0),v={leftSidebarWidth:e,leftSidebarMinWidth:r,leftSidebarMaxWidth:a,ylxSidebarState:c,ylxSidebarStateRestoreTarget:f.current,rightSidebarWidth:x,rightSidebarMinWidth:y,rightSidebarMaxWidth:m,rightSidebarPanel:p,rightSidebarPanelRestoreTarget:S.current,storedCollapsedYLXWidth:n,storedDefaultYLXWidth:s,storedExpandedYLXWidth:o,clientWidth:b,mainContentWidth:i,canCollapse:u},C=P.current;if((0,l.j)(v,C))return;const w=function(e,t){if(!e)return{};let{leftSidebarWidth:r=0,rightSidebarWidth:i=0}=t;const{mainContentWidth:a=0,leftSidebarMinWidth:n=0,leftSidebarMaxWidth:l=0,ylxSidebarState:s,ylxSidebarStateRestoreTarget:o,rightSidebarMinWidth:c=0,rightSidebarMaxWidth:d=0,rightSidebarPanel:u,rightSidebarPanelRestoreTarget:p,storedCollapsedYLXWidth:g=0,storedDefaultYLXWidth:y=0,storedExpandedYLXWidth:m=0,clientWidth:x=0,canCollapse:h=!0}=t,b={},f=u!==_.Z.Disabled,S=void 0!==e.leftSidebarWidth&&r>e.leftSidebarWidth,P=void 0!==e.rightSidebarWidth&&i>e.rightSidebarWidth,v=void 0===e.clientWidth?0:x-e.clientWidth,C=v<0,w=x>0,I=aK?T=Math.max(0,T-(a-K)):I&&(T=I);const R=s===H.fX.EXPANDED&&e.ylxSidebarState!==H.fX.EXPANDED,A=s===H.fX.DEFAULT&&e.ylxSidebarState!==H.fX.DEFAULT;let D=r-n;S&&(D=R?r-B.Z.EXPANDED_MIN:A?r-B.Z.DEFAULT_MIN:0);let j=P?0:i-c;const L=T<=D+j;if(aF.ev?(b.ylxSidebarState=H.fX.DEFAULT,T-=r-y,D=y-B.Z.DEFAULT_MIN):(b.ylxSidebarState=H.fX.COLLAPSED,T-=r-g,D=0),b.ylxSidebarStateRestoreTarget=t.ylxSidebarState);else if(u===_.Z.Disabled&&p!==_.Z.Disabled&&G(p)&&u!==e.rightSidebarPanelRestoreTarget&&a-i-F.KV>=F.ev)b.rightSidebarPanel=p,b.rightSidebarPanelRestoreTarget=null;else if(s===H.fX.DEFAULT&&o===H.fX.EXPANDED&&a-(m-r)>=F.ev)b.ylxSidebarState=H.fX.EXPANDED,b.ylxSidebarStateRestoreTarget=null;else if(s===H.fX.COLLAPSED&&o===H.fX.DEFAULT&&a-(y-r)>=F.ev)b.ylxSidebarState=H.fX.DEFAULT,b.ylxSidebarStateRestoreTarget=null;else if(w&&a>=Y){let e=l-r,t=d-i;const a=Math.min(v,e+t);for(let n=0;n0?(r++,e--):i0&&(i++,t--)}s!==e.ylxSidebarState&&Z(o)&&o===e.ylxSidebarStateRestoreTarget&&(b.ylxSidebarStateRestoreTarget=null);u!==e.rightSidebarPanel&&G(p)&&p===e.rightSidebarPanelRestoreTarget&&(b.rightSidebarPanelRestoreTarget=null);if(T>0&&T<=D+j)for(let e=0;ei&&r>n&&D>0?(r--,D--):i>c&&j>0&&(i--,j--);r&&r!==t.leftSidebarWidth&&(b.leftSidebarWidth=r);i&&i!==t.rightSidebarWidth&&(b.rightSidebarWidth=i);return b}(C,v);void 0!==w.leftSidebarWidth&&t(w.leftSidebarWidth),Z(w.ylxSidebarState)&&d(w.ylxSidebarState),void 0!==w.ylxSidebarStateRestoreTarget&&(f.current=w.ylxSidebarStateRestoreTarget),void 0!==w.rightSidebarWidth&&0!==C?.rightSidebarWidth&&h(w.rightSidebarWidth),void 0!==w.rightSidebarPanel&&g((0,V.MQ)(w.rightSidebarPanel)),void 0!==w.rightSidebarPanelRestoreTarget&&(S.current=w.rightSidebarPanelRestoreTarget),P.current=v}),[e,r,a,t,c,x,y,m,h,p,n,s,o,d,g,b,u])}(),null);var J=r(39795);let $=function(e){return e.YLX_SORT_AND_VIEW_PICKER="ylx-sort-and-view-picker",e.YLX_CUSTOM_ORDERING="ylx-custom-ordering",e.REFINERS_PICKER="refiners-picker",e}({}),Q=function(e){return e.URGENT="urgent",e.CONTEXTUAL="contextual",e.DEFAULT="default",e}({});class ee{itemsRecord={[Q.URGENT]:new Set,[Q.CONTEXTUAL]:new Set,[Q.DEFAULT]:new Set};visibleItem=null;static PRIORITIES=[Q.URGENT,Q.CONTEXTUAL,Q.DEFAULT];static NO_CHANGE={keyToShow:null,keyToHide:null};getNextItem(){let e=null;return ee.PRIORITIES.some((t=>{const r=this.itemsRecord[t];return e=Array.from(r).at(-1)??null,e})),e}updateVisibility(e,t,r){const i=this.visibleItem;"add"===r?this.itemsRecord[t].add(e):this.itemsRecord[t].delete(e);const a=this.getNextItem();return this.visibleItem=a,i===a?ee.NO_CHANGE:{keyToShow:a,keyToHide:i}}}var te=r(93827);let re=function(e){return e.VISIBILITY_GRANTED="visibilityGranted",e.VISIBILITY_DENIED="visibilityDenied",e}({});class ie extends te.V{}const ae=(0,i.createContext)({notifyShowInterest:()=>{throw new Error("notifyShowInterest must be used within a VisibilityOrchestratorProvider")},notifyHideInterest:()=>{throw new Error("notifyHideInterest must be used within a VisibilityOrchestratorProvider")},events:new ie}),ne=({children:e})=>{const t=(0,i.useMemo)((()=>new ee),[]),r=(0,i.useRef)(new ie),a=(0,i.useCallback)(((e,t)=>{t&&r.current.emitSync(re.VISIBILITY_DENIED,{key:t}),e&&r.current.emitSync(re.VISIBILITY_GRANTED,{key:e})}),[]),n=(0,i.useCallback)(((e,r=Q.DEFAULT)=>{const{keyToShow:i,keyToHide:n}=t.updateVisibility(e,r,"add");a(i,n)}),[t,a]),l=(0,i.useCallback)(((e,r=Q.DEFAULT)=>{const{keyToShow:i,keyToHide:n}=t.updateVisibility(e,r,"remove");a(i,n)}),[t,a]);return(0,C.jsx)(ae.Provider,{value:{events:r.current,notifyShowInterest:n,notifyHideInterest:l},children:e})};var le=r(84036);r(55549);te.V;r(27566);class se{events=new te.V;addRefiners(){throw new Error("Method not implemented.")}removeRefiners(){throw new Error("Method not implemented.")}getEvents(){return this.events}updateSelectedRefinersOrder(e){throw new Error("Method not implemented.")}}const oe=(0,i.createContext)(null);r(29195);var ce=r(77195),de=(r(53638),r(11808));r(37842);const ue=function({children:e}){const t=(0,i.useMemo)((()=>new se),[]);return(0,C.jsx)(oe.Provider,{value:t,children:e})},pe=()=>null,ge=()=>null,ye=()=>null,me=()=>null,xe=()=>null;const he={focusElement:()=>{},getFocusElement:()=>null,registerFocusElement:()=>()=>{}},be=(0,i.createContext)(he);class fe{focusElement=()=>{};getFocusElement=()=>null;registerFocusElement=()=>()=>{}}const Se=({children:e})=>{const t=(0,i.useMemo)((()=>new fe),[]);return(0,C.jsx)(be.Provider,{value:t,children:e})};var Pe=r(62021);const ve=()=>({cheetaraOnboardingIsActive:!1,setCheetaraOnboardingIsActive:()=>{},cheetaraOnboardingDismissed:!1,setCheetaraOnboardingDismissed:()=>{},handleCloseCheetaraOnboarding:()=>{},cheetaraTooltipVisible:!1,setCheetaraTooltipVisible:()=>{}});var Ce=r(38501);r(65292);const we=()=>!1;var Ie=r(12967),Te=r(95530),Re=r(18020),Ae=r(67668),De=r(86551),je=r(27301);const Le="rqGyIqd3Igk05BEB2ZC6",Ee="WycFx_Gl2tUXbUJpZiD8",Oe=()=>{const[e,t]=(0,i.useState)(!1),r=(0,Ae.V)(),a=(0,s.d4)(De.JJ);(0,i.useEffect)((()=>{const e=setTimeout((()=>{t(!0)}),1100);return()=>{t(!1),clearTimeout(e)}}),[]);const n=(0,s.d4)(De.mo);return r&&e?(0,C.jsx)(Re.t5,{language:h.Ru.getLocaleForSmartling(),market:a.toLowerCase(),children:(0,C.jsxs)("div",{className:Le,"data-testid":"left-sidebar-legal-links",children:[(0,C.jsx)(Re.JM,{}),(0,C.jsx)("a",{draggable:!1,href:je.Bl,target:"_blank",rel:"noopener",className:Ee,children:(0,C.jsx)(Te.E,{variant:"marginal",children:h.Ru.get("cookies")})}),n&&(0,C.jsx)("a",{draggable:!1,href:je.Vd,target:"_blank",rel:"noopener",className:Ee,children:(0,C.jsx)(Te.E,{variant:"marginal",children:"Форма для Ваших обращений"})})]})}):null},ke="YNnobzGm5w3XKBniKdW9",Ne=(0,i.memo)((function({isAnonymous:e}){return(0,C.jsx)("div",{className:ke,"data-testid":"left-sidebar-footer",children:e&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Oe,{}),(0,C.jsx)(Ie.X,{})]})})}));var Fe=r(96164),Be=r(65503),Me=r(94303),Ue=r(99701),Ve=r(89521),_e=r(91128),ze=r(21549);const He="lvJXjYO7YXxGKHcgx5pe",We="yYGZUqSKJttCw_Z2JvPL",Xe="wkyebhrfwyJPCfDhQgbp",Ke=()=>{const e=(0,Ve.sy)(),t=(0,v.s)(),r=(0,s.wA)(),{spec:a}=(0,ze.r)(Me.V,{}),n=h.Ru.get("web-player.your-library-x.dsa-message",h.Ru.get("web-player.your-library-x.dsa-message-link")),l=(0,i.useCallback)((()=>{r(_e.r8.actions.open()),t.logInteraction(a.learnMoreButtonFactory().hitUiReveal())}),[r,t,a]);return(0,C.jsx)("div",{className:He,children:e?(0,C.jsx)(Ue.Zp,{label:(0,C.jsx)(Te.E,{children:n}),placement:"right",showDelay:0,children:(0,C.jsx)("div",{className:We,children:(0,C.jsx)(Fe.p,{"aria-label":n})})}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)("div",{children:(0,C.jsx)(Fe.p,{size:"small"})}),(0,C.jsx)(Te.E,{as:"p",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.dsa-message",(0,C.jsx)(Be.H,{condensedAll:!0,size:"small",semanticColor:"textBase",onClick:l,className:Xe,children:(0,C.jsx)(Te.E,{variant:"bodyMedium",children:h.Ru.get("web-player.your-library-x.dsa-message-link")})}))})]})})},Ye="AhNLpx0iVnlj4SuL_Gaw",Ge="JyZRugeRBHbUtS5ABOQ8",Ze=({className:e})=>(0,C.jsx)("section",{className:n()(Ye,e),children:(0,C.jsxs)("div",{className:Ge,children:[(0,C.jsx)(Te.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.empty-state-folder-title")}),(0,C.jsx)(Te.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.empty-state-folder-subtitle")})]})});var qe=r(94965),Je=r(39770);const $e={getTitle:()=>h.Ru.get("action-trigger.create-playlist"),getDescription:()=>h.Ru.get("action-trigger.login-playlist")},Qe=({children:e,renderInline:t})=>(0,C.jsx)(qe.y,{id:Je.x9,options:{...$e,renderInline:t},children:e});var et=r(86677),tt=r(17866);const rt="CfruGiDGW_FH4l65GMpb",it="fIgbQ9qpINdyy__tkaHi",at="wv308QWnPnkI8n0GdqYO",nt=(0,i.memo)((function(e){const{message:t,title:r,linkTitle:i,linkTo:a,onClick:l,className:s}=e;return(0,C.jsxs)("section",{className:n()(rt,s),children:[(0,C.jsxs)("div",{className:it,children:[(0,C.jsx)(Te.E,{variant:"bodyMediumBold",semanticColor:"textBase",children:r}),(0,C.jsx)(Te.E,{variant:"bodySmall",semanticColor:"textBase",children:t})]}),(0,C.jsx)("div",{className:at,children:i&&(a||l)&&(0,C.jsx)(et.$,{className:at,as:l?"button":void 0,colorSet:"invertedLight",href:a,onClick:l,component:tt.v,size:"small",children:i})})]})})),lt=({className:e})=>{const{createPlaylist:t}=(0,S.A)(),r=(0,i.useCallback)((()=>{t()}),[t]);return(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Qe,{renderInline:!1,children:(0,C.jsx)(nt,{onClick:r,linkTitle:h.Ru.get("web-player.your-library-x.empty-state-playlists-cta"),title:h.Ru.get("web-player.your-library-x.empty-state-playlists-title"),message:h.Ru.get("web-player.your-library-x.empty-state-playlists-subtitle"),className:e})}),(0,C.jsx)(nt,{linkTo:"/genre/podcasts-web",linkTitle:h.Ru.get("web-player.your-library-x.empty-state-podcasts-browse"),title:h.Ru.get("web-player.your-library-x.empty-state-podcasts-to-follow"),message:h.Ru.get("web-player.your-library-x.empty-state-podcasts-keep-you-updated"),className:e})]})},st="NOXrKH_1anB9lsOlyv5g",ot="FIARvjbv_YZKwz7yxNHw",ct="Fqrv8StT3DnEAfntIKCg",dt="JydI9ZzWnssPC899sOGP",ut=({query:e,className:t})=>(0,C.jsxs)("div",{className:n()(st,t),"data-testid":"no-search-results-view",children:[(0,C.jsx)(Te.E,{as:"h1",variant:"bodyMediumBold",className:ot,children:h.Ru.get("web-player.your-library-x.empty-results-title-short",(0,C.jsx)("span",{className:ct,children:(0,C.jsx)("span",{className:dt,children:e})}))}),(0,C.jsx)(Te.E,{as:"h2",variant:"bodySmall",children:h.Ru.get("web-player.your-library-x.empty-results-text-short")})]});var pt=r(64820);const gt="vhOeYrTmSoea5vemsMpv",yt="pCKhe1uJhYBUC4YVmz9B",mt=({onClick:e})=>(0,C.jsxs)("div",{className:gt,children:[(0,C.jsx)("div",{className:"icon",children:(0,C.jsx)(pt.b,{size:"xlarge",semanticColor:"textBase"})}),(0,C.jsxs)("div",{className:yt,children:[(0,C.jsx)(Te.E,{as:"h2",variant:"titleSmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.error-title")}),(0,C.jsx)(Te.E,{as:"p",variant:"bodySmall",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.error-body")})]}),(0,C.jsx)("div",{children:(0,C.jsx)(et.$,{onClick:e,colorSet:"invertedLight",size:"small",children:h.Ru.get("web-player.your-library-x.error-button")})})]}),xt=(0,i.createContext)(null);const ht=({children:e})=>{const t=function(){const[e,t]=(0,Pe.x)("ylx-expanded-folders",[]),r=(0,i.useCallback)((t=>e.includes(t)),[e]),a=(0,i.useCallback)(((r,i)=>{const a=e.indexOf(r);if(i){if(-1!==a)return;t([...e,r])}else{if(-1===a)return;t(e.filter((e=>e!==r)))}}),[e,t]);return{expandedFolders:e,getIsFolderExpanded:r,setIsFolderExpanded:a}}();return(0,C.jsx)(xt.Provider,{value:t,children:e})},bt="fYWNdY4zhj4OX_T2Xtg6",ft="BRX6aJUAuAsvHKD_fpbo",St="ZZsPF3Sn4h7m0_5Clhk0",Pt="IZq_xBKdh88HLD4QY90X",vt="PUipCs3_0Qott0Sru3pB",Ct="XAOxFVWnd185_vZ5zPGu",wt="YsCa3XbOXEm79LH0B7do",It="eC25_w41L83mXDCqdm_A",Tt="VyDwqqtx0153zD8a3TED",Rt="rOgsguaurlHVlgCTY0P7",At="zS8ATyQNwnAiEoPrCcIo",Dt="Zwr4MoUVImDin82vBn4y",jt="lb8li6m8Zei4tr0zNKxX",Lt="aK6vld0FgHGxjz6IiHyS",Et="Xw1OibA6EkrU4F47EMw9",Ot="_EFIA9HjgZxxgTSZzQcg",kt="JUPaw8kZF94Coth4G88s",Nt="main-yourLibraryX-listItem",Ft="BfALkuQy0UjTI70U9QlQ",Bt="c1PJ2LHU0EnzyA0jDc1j",Mt=({isScrolled:e})=>(0,C.jsxs)("div",{className:n()(Dt,Lt,{[Et]:e}),children:[(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.title")}),(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.date-added")}),(0,C.jsx)(Te.E,{variant:"marginalBold",semanticColor:"textSubdued",children:h.Ru.get("web-player.your-library-x.expanded-list-header.played-at")})]});var Ut=r(17287);const Vt=()=>null,_t=()=>null;const zt=()=>({getFocusElement:null,registerFocusElement:null});var Ht=r(86228),Wt=r(20784);const Xt="a2XwshgvydvJO9If_GzQ",Kt="aVLBGREPTnbTFhkSdUMV",Yt="ViXEX4SVVU_NA7zcS9kd",Gt="pQvrkwXAqZnbSqJiiQuo",Zt="mA1QNQx6oUXgQ8kMID2S",qt={marginBlockEnd:0,willChange:"transform, opacity"},Jt=({filterId:e,isPrimaryFilter:t,isPlaceholder:r,resetFilterIds:a,toggleFilterId:l,allowedDropTargetMimeTypes:s=j.Vp,className:o,innerRef:c,index:d=0,spec:u,...p})=>{const g=(0,v.s)(),y=(0,Wt.f)(),m=p.selected,x=e?y.getFilterLabel(e):"",h=(0,i.useCallback)((()=>{!e||m&&t?(a(),m&&t&&e?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.clearButtonFactory().hitClearFilter())):(l(e),m?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitFilter()))}),[e,x,m,t,a,l,d,g,u]),b=(0,i.useCallback)((e=>{e.detail>1||r||h()}),[r,h]),{className:f,dropPosition:S,...P}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:s},onLongDragOver:h});return(0,C.jsx)(Ht.v,{...p,"aria-label":p["aria-label"],...P,...S===j.Nz.ON?{selectedColorSet:"base"}:void 0,className:n()(o,f,{[Kt]:S===j.Nz.ON,[Zt]:r}),onClick:b,selectedColorSet:S===j.Nz.ON?"invertedDark":"invertedLight",secondary:m&&!t,style:qt,ref:c,tabIndex:-1})};var $t=r(41961);const Qt={marginBlockEnd:0,willChange:"transform, opacity"},er=({filterId:e,isPrimaryFilter:t,isPlaceholder:r,resetFilterIds:a,toggleFilterId:l,allowedDropTargetMimeTypes:s=j.Vp,className:o,innerRef:c,index:d=0,spec:u,...p})=>{const g=(0,v.s)(),y=(0,Wt.f)(),m=p.selected,x=e?y.getFilterLabel(e):"",h=(0,i.useCallback)((()=>{!e||m&&t?(a(),m&&t&&e?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.clearButtonFactory().hitClearFilter())):(l(e),m?g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitClearFilter()):g.logInteraction(u.filterChipFactory({identifier:x,position:d}).hitFilter()))}),[e,x,m,t,a,l,d,g,u]),b=(0,i.useCallback)((e=>{e.detail>1||r||h()}),[r,h]),{className:f,dropPosition:S,...P}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:s},onLongDragOver:h});return(0,C.jsx)($t.m,{...p,"aria-label":p["aria-label"],...P,...S===j.Nz.ON?{selectedColorSet:"base"}:void 0,className:n()(o,f,{[Kt]:S===j.Nz.ON,[Zt]:r}),onClick:b,style:Qt,ref:c,tabIndex:-1})},tr=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.ARTISTS,D.fl.PLAYLISTS_V2,D.fl.SHOWS,D.fl.AUDIOBOOKS,D.fl.EPISODES,D.fl.FOLDERS],rr=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES,D.fl.PLAYLISTS_V2,D.fl.FOLDERS],ir=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES,D.fl.PLAYLISTS_V2,D.fl.FOLDERS];r(66530);const ar=()=>[];function nr(e){return{type:"contentType",id:e.id,name:e.name}}function lr(e){return e.id.startsWith("spotify:concept:")?{type:"tag",id:(t={tagUri:e.id,tagName:e.name,entityCount:0}).tagUri,name:t.tagName,count:t.entityCount}:nr(e);var t}var sr=r(22949);const or=(0,i.memo)((function({availableFilters:e,selectedFilters:t,toggleFilterId:r,resetFilterIds:a,className:n,spec:l,inFolderView:s}){const o=!(t||e),{availableRefiners:c,activeRefiners:d,allContentTypeRefiners:u}=(({availableFilters:e,activeFilters:t,inFolderView:r})=>{const i=e?.map(nr),a=t?.map(lr)??[],n=ar(),l=we();return{availableRefiners:t?.length||!l||r?i:n,activeRefiners:a,allContentTypeRefiners:i}})({availableFilters:e,activeFilters:t,inFolderView:s}),{registerFocusElement:p}=zt(),y=o?u:[...d??[],...c??[]],m=(0,i.useRef)(null),x=(0,i.useCallback)((()=>{(0,sr.MS)(m.current,m.current?.nextElementSibling instanceof HTMLElement?m.current?.nextElementSibling:null),a()}),[a]),b=we();return y&&0!==y?.length?(0,C.jsxs)(Ut.FN,{className:n,ariaLabel:h.Ru.get("web-player.your-library-x.filter_options"),children:[!!t?.length&&(0,C.jsx)(er,{resetFilterIds:x,toggleFilterId:r,allowedDropTargetMimeTypes:tr,"aria-label":h.Ru.get("web-player.your-library-x.clear_filters"),innerRef:m,spec:l}),y.map(((e,t)=>{const n=d?.includes(e),s=0===t,c=t>0&&d?.includes(y[0]),u=(0,C.jsx)(Jt,{innerRef:void 0,filterId:e.id,isPrimaryFilter:s,isPlaceholder:o,resetFilterIds:a,toggleFilterId:r,selected:n,spec:l,index:t,children:e.name},e.id);return!b||c?u:(0,C.jsx)(g.h,{menu:(0,C.jsx)(i.Suspense,{fallback:!0,children:(0,C.jsx)(_t,{refiner:e,resetFilterIds:a,isSelected:n})}),children:u},e.id)})),b&&!d?.length&&!s&&(0,C.jsx)(Vt,{})]}):null}));var cr=r(22726);const dr="",ur=(0,i.createContext)({openedFolderUri:dr,pushFolder:()=>{},popFolder:()=>{},resetFolder:()=>{},change:"PUSH"}),pr=({children:e})=>{const{setFilter:t}=(0,i.useContext)(J.g),[r,a]=(0,Pe.x)("opened-folder-uri",dr),n=(0,i.useRef)([r??dr]),l=(0,i.useRef)("PUSH"),s=(0,i.useCallback)((e=>{a(e),t(dr)}),[a,t]),o=(0,i.useCallback)((e=>{n.current.push(e),l.current="PUSH",s(n.current.at(-1))}),[s]),c=(0,i.useCallback)((()=>{n.current.pop();const e=n.current.at(-1);return l.current="POP",s(e),e}),[s]),d=(0,i.useCallback)((()=>{n.current=[dr],s(dr)}),[s]);return(0,C.jsx)(ur.Provider,{value:{openedFolderUri:(0,cr.fpb)(r)?r:dr,pushFolder:o,popFolder:c,resetFolder:d,change:l.current},children:e})};var gr=r(89702),yr=r(3602),mr=r(98293),xr=r(78516),hr=r(98211),br=r(28506),fr=r(48210),Sr=r(6772),Pr=r(20616),vr=r(18113),Cr=r(7307),wr=r(85907);const Ir=(e,t)=>t?(e=>{switch(e){case"album":default:return h.Ru.get("web-player.your-library-x.type-album");case"ep":return h.Ru.get("ep");case"single":return h.Ru.get("single");case"compilation":return h.Ru.get("compilation")}})(t):(e=>{switch(e){case Cr.c.ALBUM:return h.Ru.get("web-player.your-library-x.type-album");case Cr.c.ARTIST:return h.Ru.get("web-player.your-library-x.type-artist");case Cr.c.FOLDER:return h.Ru.get("web-player.your-library-x.type-folder");case Cr.c.AUDIOBOOK:return h.Ru.get("web-player.your-library-x.type-audiobook");case Cr.c.YOUR_EPISODES:case Cr.c.LOCAL_FILES:case Cr.c.LIKED_SONGS:case Cr.c.PLAYLIST:return h.Ru.get("web-player.your-library-x.type-playlist");case Cr.c.SHOW:return h.Ru.get("web-player.your-library-x.type-show");case Cr.c.PRE_RELEASE_ALBUM:return h.Ru.get("web-player.your-library-x.type-prerelease-album");case Cr.c.PRE_RELEASE_BOOK:return h.Ru.get("web-player.your-library-x.type-prerelease-audiobook");default:return(0,wr.d)(e)}})(e),Tr=e=>e.type===Cr.c.ALBUM&&"album"!==e.albumType,Rr=e=>{switch(e){case Cr.c.YOUR_EPISODES:case Cr.c.LIKED_SONGS:case Cr.c.LOCAL_FILES:return Cr.c.PLAYLIST;default:return e}},Ar=({shouldShowType:e,type:t,subtitle:r,specialType:i})=>(0,C.jsxs)(C.Fragment,{children:[e&&Ir(t,i),!!r&&e&&" • ",r]});var Dr=r(91015);const jr=({iconSize:e="small"})=>(0,C.jsx)("span",{className:vt,children:(0,C.jsx)(Dr.C,{size:e,semanticColor:"textBrightAccent",className:Pt})}),Lr=({children:e,title:t,subtitleSlot:r,isPlaying:i})=>(0,C.jsx)(Ue.Zp,{label:(0,C.jsxs)("div",{className:At,children:[(0,C.jsxs)("div",{children:[t,r]}),i&&(0,C.jsx)(jr,{})]}),placement:"right",showDelay:0,children:e});var Er=r(79871),Or=r(89473),kr=r(7015);const Nr=({leading:e,subtitle:t,uri:r})=>{const i=`listrow-subtitle-${r}`;return(0,C.jsx)("div",{className:kr.A.subtitle,children:(0,C.jsxs)(Er.j,{className:kr.A.link,id:i,dir:"auto",children:[(0,C.jsx)("span",{className:kr.A.subtitleLeadingWrapper,children:e}),(0,C.jsx)("span",{className:kr.A.subtitleText,children:t})]})})},Fr=({leading:e,subtitle:t,uri:r})=>{const i=`card-subtitle-${r}`;return(0,C.jsx)("div",{className:kr.A.subtitle,children:(0,C.jsxs)(Or.j,{lineClamp:1,className:kr.A.link,id:i,role:"gridcell",dir:"auto",children:[(0,C.jsx)("span",{className:kr.A.subtitleLeadingWrapper,children:e}),t]})})};var Br=r(85387),Mr=r(23041),Ur=r(46111),Vr=r(37410),_r=r(2679);const zr=new Set(["Unidentified","Alt","AltGraph","CapsLock","Control","Fn","FnLock","Meta","NumLock","ScrollLock","Shift","Symbol","SymbolLock","Hyper","Super","Enter","Tab","ArrowDown","ArrowLeft","ArrowRight","ArrowUp","End","Home","PageDown","PageUp","Backspace","Clear","Copy","CrSel","Cut","Delete","EraseEof","ExSel","Insert","Paste","Redo","Undo","Accept","Again","Attn","Cancel","ContextMenu","Escape","Execute","Find","Help","Pause","Play","Props","Select","ZoomIn","ZoomOut","BrightnessDown","BrightnessUp","Eject","LogOff","Power","PowerOff","PrintScreen","Hibernate","Standby","WakeUp","AllCandidates","Alphanumeric","CodeInput","Compose","Convert","Dead","FinalMode","GroupFirst","GroupLast","GroupNext","GroupPrevious","ModeChange","NextCandidate","NonConvert","PreviousCandidate","Process","SingleCandidate","HangulMode","HanjaMode","JunjaMode","Eisu","Hankaku","Hiragana","HiraganaKatakana","KanaMode","KanjiMode","Katakana","Romaji","Zenkaku","ZenkakuHankaku","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12","Soft1","Soft2","Soft3","Soft4","ChannelDown","ChannelUp","Close","MailForward","MailReply","MailSend","MediaClose","MediaFastForward","MediaPause","MediaPlay","MediaPlayPause","MediaRecord","MediaRewind","MediaStop","MediaTrackNext","MediaTrackPrevious","New","Open","Print","Save","SpellCheck","Key11","Key12","AudioBalanceLeft","AudioBalanceRight","AudioBassBoostDown","AudioBassBoostToggle","AudioBassBoostUp","AudioFaderFront","AudioFaderRear","AudioSurroundModeNext","AudioTrebleDown","AudioTrebleUp","AudioVolumeDown","AudioVolumeUp","AudioVolumeMute","MicrophoneToggle","MicrophoneVolumeDown","MicrophoneVolumeUp","MicrophoneVolumeMute","SpeechCorrectionList","SpeechInputToggle","LaunchApplication1","LaunchApplication2","LaunchCalendar","LaunchContacts","LaunchMail","LaunchMediaPlayer","LaunchMusicPlayer","LaunchPhone","LaunchScreenSaver","LaunchSpreadsheet","LaunchWebBrowser","LaunchWebCam","LaunchWordProcessor","BrowserBack","BrowserFavorites","BrowserForward","BrowserHome","BrowserRefresh","BrowserSearch","BrowserStop","AppSwitch","Call","Camera","CameraFocus","EndCall","GoBack","GoHome","HeadsetHook","LastNumberRedial","Notification","MannerMode","VoiceDial","TV","TV3DMode","TVAntennaCable","TVAudioDescription","TVAudioDescriptionMixDown","TVAudioDescriptionMixUp","TVContentsMenu","TVDataService","TVInput","TVInputComponent1","TVInputComponent2","TVInputComposite1","TVInputComposite2","TVInputHDMI1","TVInputHDMI2","TVInputHDMI3","TVInputHDMI4","TVInputVGA1","TVMediaContext","TVNetwork","TVNumberEntry","TVPower","TVRadioService","TVSatellite","TVSatelliteBS","TVSatelliteCS","TVSatelliteToggle","TVTerrestrialAnalog","TVTerrestrialDigital","TVTimer","AVRInput","AVRPower","ColorF0Red","ColorF1Green","ColorF2Yellow","ColorF3Blue","ColorF4Grey","ColorF5Brown","ClosedCaptionToggle","Dimmer","DisplaySwap","DVR","Exit","FavoriteClear0","FavoriteClear1","FavoriteClear2","FavoriteClear3","FavoriteRecall0","FavoriteRecall1","FavoriteRecall2","FavoriteRecall3","FavoriteStore0","FavoriteStore1","FavoriteStore2","FavoriteStore3","Guide","GuideNextDay","GuidePreviousDay","Info","InstantReplay","Link","ListProgram","LiveContent","Lock","MediaApps","MediaAudioTrack","MediaLast","MediaSkipBackward","MediaSkipForward","MediaStepBackward","MediaStepForward","MediaTopMenu","NavigateIn","NavigateNext","NavigateOut","NavigatePrevious","NextFavoriteChannel","NextUserProfile","OnDemand","Pairing","PinPDown","PinPMove","PinPToggle","PinPUp","PlaySpeedDown","PlaySpeedReset","PlaySpeedUp","RandomToggle","RcLowBattery","RecordSpeedNext","RfBypass","ScanChannelsToggle","ScreenModeNext","Settings","SplitScreenToggle","STBInput","STBPower","Subtitle","Teletext","VideoModeNext","Wink","ZoomToggle"]);function Hr(e,t){const[r,a]=(0,i.useState)(""),n=(0,i.useRef)(r);n.current=r;const l=(0,i.useRef)(null);return(0,i.useEffect)((()=>{const r=e.current;if(!r||!t)return a(""),()=>{};const i=e=>{const t="Backspace"===e.key,r=" "===e.key,i=e.metaKey||e.ctrlKey,s=e.target instanceof HTMLElement&&e.target?.matches("input, textarea, [contenteditable]"),o=e.isComposing||229===e.keyCode,c=(d=e.key,zr.has(d)&&!t);var d;const u=r&&!n.current,p=t&&!n.current;if(i||s||o||c||u||p)return;(t&&n.current||r)&&(e.preventDefault(),e.stopPropagation()),a((r=>t?r.slice(0,-1):r+e.key)),l.current&&clearTimeout(l.current),l.current=setTimeout((()=>a("")),1e3)};return r.addEventListener("keydown",i,!0),()=>{r.removeEventListener("keydown",i,!0),l.current&&clearTimeout(l.current)}}),[e,t]),r}const Wr=(0,i.createContext)({setTypeaheadResult:({uid:e,str:t})=>{if(e||t)throw new Error("setTypeaheadResult must be used within a TypeaheadProvider")},typeaheadResult:{uid:null,str:""}}),Xr=({children:e,containerRef:t,findMatchingTypeaheadUid:r,isEnabled:a=!0})=>{const[n,l]=(0,i.useState)({uid:null,str:""}),s=(0,i.useMemo)((()=>({typeaheadResult:n,setTypeaheadResult:l})),[n,l]),o=Hr(t,a),c=(0,i.useRef)(o);c.current=o;const d=(0,i.useRef)(r);return d.current=r,(0,i.useEffect)((()=>{o&&a?d.current(o).then((e=>{o===c.current&&l({uid:e,str:o})})):l({uid:null,str:""})}),[a,o,l]),(0,C.jsx)(Wr.Provider,{value:s,children:e})};var Kr=r(66387);const Yr={state:{referrer:"your_library",preventMoveFocus:!0}};function Gr(e,t,r,a,n){const{filter:l}=(0,i.useContext)(J.g),{isActive:s}=(0,_r.l_)(e),o=function(e){const{typeaheadResult:{uid:t,str:r}}=(0,i.useContext)(Wr);return t===e?r:null}(e),c=!!o,d=(0,Vr.W)({uri:e,type:"link"})?(0,Kr.hF)(t):t,u=(0,i.useRef)(null),p=(0,Br.Zp)(),g=(0,i.useCallback)((e=>{e.preventDefault(),n?n():d&&p(d,Yr)}),[n,p,d]);(0,i.useLayoutEffect)((()=>{c&&u.current?.closest('[role="row"], [role="listitem"]')?.querySelector("button")?.focus({preventScroll:!0})}),[c]);const y=a?`${a} • ${r}`:r;return{isActive:s,onClick:g,contents:l||o?(0,C.jsx)("span",{ref:u,children:(0,C.jsx)(br.M,{autoEscape:!0,searchWords:[l.trim(),...o?.split(" ")??""],textToHighlight:y})}):y}}const Zr=({uri:e,playbackUri:t=e,title:r,titlePrefix:i,menu:a,to:l=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:s})=>{const{isActive:o,contents:c}=Gr(t,l,r,i,s),d=`listrow-title-${e}`;return(0,C.jsx)(g.h,{menu:a,children:(0,C.jsx)(Mr.d,{id:d,lineClamp:1,className:n()(kr.A.link,kr.A.titleLink),semanticColor:o?"textBrightAccent":"textBase",dir:"auto",children:c})})},qr=({uri:e,playbackUri:t=e,title:r,titlePrefix:i,menu:a,to:l=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:s})=>{const{isActive:o,onClick:c,contents:d}=Gr(t,l,r,i,s);return(0,C.jsx)(g.h,{menu:a,children:(0,C.jsx)(Ur.Z,{lineClamp:1,className:n()(kr.A.link,kr.A.titleLink),semanticColor:o?"textBrightAccent":"textBase",href:l,onClick:c,role:"gridcell",dir:"auto",children:d})})},Jr=[D.fl.ALBUMS,D.fl.ARTISTS,D.fl.PLAYLISTS_V2,D.fl.SHOWS,D.fl.FOLDERS,D.fl.PSEUDO_PLAYLISTS],$r=[D.fl.PLAYLISTS_V2,D.fl.FOLDERS];var Qr=r(26344);const ei=({isConfirmationForPlaylist:e,onConfirm:t,onClose:r})=>{const i=e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.title-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.title-folder");return(0,C.jsx)(Qr.T,{"aria-label":i,titleText:i,descriptionText:e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.message-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.message-folder"),onConfirm:t,onClose:r,confirmText:h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-text"),confirmLabel:e?h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-playlist"):h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.confirm-button-label-folder"),cancelText:h.Ru.get("web-player.your-library-x.unpin-confirmation-dialog.cancel-button-text"),allowHTML:!0})};var ti=r(48905);function ri({onApplyDrop:e,spec:t,isDropTargetPinned:r}){const a=(0,Wt.f)(),{contains:n}=(0,ti.p)("ylpin"),[l,s]=(0,i.useState)(null),o=(0,i.useCallback)((async(t,i)=>{if(r)return void e(t,i);const{[D.fl.PLAYLISTS_V2]:a=[],[D.fl.FOLDERS]:l=[]}=t,o=[...a,...l];if(!!o.length&&(await n(...o)).some(Boolean)){if(o.length>1)throw new Error("Reordering multiple pinned items at once is not supported");s({dropData:t,dropPosition:i})}else e(t,i)}),[r,n,e]),c=(0,v.s)();return{applyDropWithUnpinConfirmation:o,unpinConfirmationDialog:l?(0,C.jsx)(ei,{isConfirmationForPlaylist:!l.dropData[D.fl.FOLDERS]?.length,onClose:()=>s(null),onConfirm:async()=>{const{[D.fl.PLAYLISTS_V2]:r=[],[D.fl.FOLDERS]:i=[]}=l.dropData;await a.unpin([...r,...i][0]),t?.dragUnpinItem&&c.logInteraction(t.dragUnpinItem({itemToUnpin:[...r,...i][0]})),e(l.dropData,l.dropPosition),s(null)}}):null}}function ii(){const{dropOriginUri:e,sectionId:t}=(0,i.useContext)(k.O_);return{dropOriginIsYLX:e===T.gv,entityIsInFolder:t>0}}var ai=r(15178);function ni(){const e=(0,ai.g)(),{dropOriginIsYLX:t}=ii();return(0,i.useCallback)((async(r,i)=>{const a=await e.contains(r);if(1!==new Set(a).size)throw new Error("Dropping a mix of newly added and moved playlists is not supported");if(a[0]){if(r.length>1)throw new Error("Moving multiple playlists at once is not supported");t?await e.move({uri:r[0]},i):await e.move({uri:r[0]},i,!0)}else await e.add(r,i)}),[t,e])}var li=r(78565);function si({dropTargetUri:e,spec:t,isDropTargetPinned:r}){const a=(0,ai.g)(),n=(0,Wt.f)(),l=(0,v.s)(),s=ni(),o=(0,i.useCallback)((async(i,o)=>{const{[D.fl.PLAYLISTS_V2]:c=[],[D.fl.FOLDERS]:[d]=[]}=i,u=o===j.Nz.BEFORE?{before:{uri:e}}:{after:{uri:e}};if(r){const e=i[Object.keys(i)[0]][0];if((0,cr.tbX)(e)||(0,cr.fpb)(e)){const t=oi((await a.getContents()).items,e);-1===t?await a.add([e],{before:"start"}):t>0&&((0,cr.tbX)(e)?await a.move({uri:e},{before:"start"}):await a.moveFolder({uri:e},{before:"start"}))}else if(!(0,cr.Z0m)(e)){const[t]=await n.contains(e);t||await n.add({uris:[e]})}await n.pin(e,u),l.logInteraction(t.dragPinItem({itemToPin:e}))}else d?await a.moveFolder({uri:d},u):c.length&&await s(c,u);l.logInteraction(t.dragSort())}),[e,r,n,l,t,a,s]),{unpinConfirmationDialog:c,applyDropWithUnpinConfirmation:d}=ri(r?{onApplyDrop:o,spec:t,isDropTargetPinned:r}:{onApplyDrop:o});return{handleDropBeforeOrAfterRootlistItem:(0,i.useCallback)((async(e,t)=>{const{[D.fl.PLAYLISTS_V2]:r=[],[D.fl.FOLDERS]:i=[]}=e;if(r.length&&i.length)throw new Error("Dropping a mix of playlists and folders is not supported");if(i.length>1)throw new Error("Dropping multiple folders is not supported");d(e,t)}),[d]),unpinConfirmationDialog:c}}function oi(e,t,r=0){for(const i of e)if((0,li.Af)(i)||(0,li.sA)(i)){if((0,cr.B2u)(i.uri,t))return r;if((0,li.sA)(i)){const e=oi(i.items,t,r+1);if(-1!==e)return e}}return-1}var ci=r(27012);const di={state:{referrer:"your_library",preventMoveFocus:!0}};function ui({uri:e,to:t=(0,cr.o_h)(e)?.toURLPath(!0)||"",type:r,handleNavigate:a,dragLabel:n,isPinned:l,canReorder:s,allowedDropTargetDropOnMimeTypes:o=[],onDropTargetDropOn:c,onLongDragOver:d,openDeleteDialog:u,togglePlay:p,triggerPlay:g,isItemInGrid:y,playInsteadOfNavigating:m=!1,isPlaying:x,spec:h,folderDepth:b}){const f=(0,Vr.W)({uri:e,type:"link"})?(0,Kr.hF)(t):t,S=(0,Br.Zp)(),P=(0,Br.zy)(),C=(0,i.useCallback)((()=>{S(f,di)}),[S,f]),w=(0,v.s)(),I=(0,i.useRef)(0),R=(0,i.useRef)(null),A=(0,i.useCallback)((({target:e})=>e instanceof HTMLElement&&!R.current?.contains(e)),[]),E=(0,i.useCallback)((t=>{if(!A(t)){if(t.preventDefault(),t.currentTarget.scrollIntoView({block:"nearest"}),m){if(I.current>Date.now())return;return I.current=Date.now()+300,void(x||(p?.(),w.logInteraction(h.yourLibraryItemFactory().hitPlay({itemToBePlayed:e}))))}a?a():f&&S(f,{...di,replace:f===P.pathname}),w.logInteraction(h.yourLibraryItemFactory().hitUiNavigate({destination:e}))}}),[A,m,a,f,w,h,e,p,x,S,P.pathname]),O=(0,i.useCallback)((t=>{m||A(t)||g&&(w.logInteraction(h.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:e})),g?.())}),[m,A,g,w,h,e]),k=(0,i.useCallback)((()=>{w.logInteraction(h.yourLibraryItemFactory().secondaryHitUiReveal())}),[w,h]),{draggable:N,onDragStart:F}=(0,ci.P)({itemUris:[e],itemMimeTypes:[(0,D.j3)(r)],dragLabelText:n,sectionId:b??0,dropOriginUri:T.gv});let B=[];l?B=Jr:s&&(B=$r);const M={[j.Nz.ON]:o,[j.Nz.BEFORE]:B,[j.Nz.AFTER]:B},{handleDropBeforeOrAfterRootlistItem:U,unpinConfirmationDialog:V}=si({dropTargetUri:e,spec:h,isDropTargetPinned:l}),_=(0,i.useCallback)(((e,t)=>{t===j.Nz.ON?c?.(e,t):t!==j.Nz.BEFORE&&t!==j.Nz.AFTER||U(e,t)}),[c,U]),{dropPosition:z,className:H,...W}=(0,L.A)({uri:e,allowedMimeTypesByDropPosition:M,onDrop:_,onLongDragOver:d??C,reorderDirection:y?"horizontal":"vertical"}),X=(0,i.useCallback)((t=>{t.repeat||A(t)||("Backspace"!==t.key&&"Delete"!==t.key||!u||u(),"Enter"===t.key&&t.shiftKey&&p&&(t.preventDefault(),p()),"Enter"===t.key&&w.logInteraction(h.yourLibraryItemFactory().keyStrokeUiNavigate({destination:e})))}),[A,w,u,h,p,e]),K=(0,cr.o_h)(P.pathname,{parseUnknown:!0})?.toURI();return{onClick:E,onDoubleClick:O,draggable:N&&!!n,onDragStart:F,onKeyDown:X,unpinConfirmationDialog:V,dropPosition:z,dropTargetClassName:H,logRightClick:k,isViewActive:!!K&&(0,cr.B2u)(e,K),itemRef:R,...W}}var pi=r(31879);const gi=i.createContext(!1),yi=({children:e,isCompact:t})=>(0,C.jsx)(gi.Provider,{value:t,children:e}),mi=()=>(0,i.useContext)(gi),xi="wJTUKAyYI219kJtclJLa",hi="q0_cpEyu_8EC7he96qT_",bi="L8ET6xwMh_wMEqCpmunH",fi="D_1eJKOJ3wTCKO93GX06",Si="_7kcfiJ2UNEh3CDR9Wau",Pi="N8wAJha8ApfxgOfqv4UM",vi="iJMxV9zMXSfrjJPyB3Fw",Ci=({uri:e,to:t=(0,cr.o_h)(e)?.toURLPath(!0)||"",handleNavigate:r,dragLabel:a,name:l,namePrefix:s,subtitle:o,cover:c,type:d,specialType:u,downloadButton:p,canReorder:y,allowedDropTargetDropOnMimeTypes:m,onDropTargetDropOn:x,onLongDragOver:h,menu:b,leading:f,openDeleteDialog:S,togglePlay:P,triggerPlay:v,isPinned:w,shouldShowType:I,playbackUri:T,isPlaying:R,isActive:A,playInsteadOfNavigating:D,spec:L,index:E,animateClassName:O="",animateState:k,preReleaseIcon:N,lockedIcon:F})=>{const{onClick:B,onDoubleClick:M,draggable:U,onDragStart:V,onKeyDown:_,dropPosition:z,dropTargetClassName:H,unpinConfirmationDialog:W,logRightClick:X,isViewActive:K,itemRef:Y,...G}=ui({uri:e,to:t,handleNavigate:r,dragLabel:a,isPinned:w,canReorder:y,allowedDropTargetDropOnMimeTypes:m,onDropTargetDropOn:x,openDeleteDialog:S,onLongDragOver:h,togglePlay:P,triggerPlay:v,isItemInGrid:!0,isPlaying:R,isActive:A,spec:L,playInsteadOfNavigating:D}),Z=(0,C.jsx)(qr,{uri:e,title:l,titlePrefix:s,menu:b,handleNavigate:r,playbackUri:T}),q=(0,C.jsx)(Fr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:w}),F,N,p]}),subtitle:(0,C.jsx)(Ar,{shouldShowType:I,type:d,subtitle:o,specialType:u}),uri:e}),J=(0,i.useRef)(null),$=mi();let Q=(0,C.jsx)(g.h,{menu:b,onShow:X,children:(0,C.jsx)(vr.E,{uri:e,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(fr.Z,{id:e,title:Z,subtitle:q,media:c,size:"sm",leading:f,className:n()(xi,{[O]:k}),variant:K?"tinted":void 0,onClick:B,onDoubleClick:M,padding:Sr.CJ,...G})})});return $&&(Q=(0,C.jsx)(Lr,{title:Z,subtitleSlot:q,uri:e,isPlaying:R,parentRef:J,children:(0,C.jsx)("div",{children:(0,C.jsx)(g.h,{menu:b,onShow:X,children:(0,C.jsx)(vr.E,{uri:e,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(fr.Z,{id:e,title:void 0,media:c,size:"sm",className:n()(xi,hi,{[O]:k}),variant:K?"tinted":void 0,onClick:B,onDoubleClick:M,padding:Sr.vw,ref:J,...G})})})})})),(0,C.jsxs)(C.Fragment,{children:[W,(0,C.jsx)(Pr.W,{draggable:U,onDragStart:V,onKeyDown:_,className:n()(H,{[Xt]:z===j.Nz.ON,[Yt]:z===j.Nz.BEFORE,[Gt]:z===j.Nz.AFTER}),"aria-selected":A,innerRef:Y,"aria-posinset":E,children:Q})]})};var wi=r(43743),Ii=r(34733);const Ti=({name:e,uri:t,togglePlay:r,spec:a,isActive:l,isPlaying:s,size:o})=>{const c=(0,v.s)(),d=(0,i.useCallback)((()=>{l?s?c.logInteraction(a.yourLibraryItemFactory().doubleHitPause({itemToBePaused:t})):c.logInteraction(a.yourLibraryItemFactory().doubleHitResume({itemToBeResumed:t})):c.logInteraction(a.yourLibraryItemFactory().doubleHitPlay({itemToBePlayed:t})),r()}),[l,s,c,a,r,t]);return(0,C.jsx)("div",{className:n()(Si,{[vi]:s,[Pi]:"small"===o}),role:"gridcell",children:(0,C.jsx)(Ii.R,{isPlaying:s,onClick:d,ariaPlayLabel:h.Ru.get("playlist.a11y.play",e),ariaPauseLabel:h.Ru.get("playlist.a11y.pause",e),size:o})})};var Ri=r(20829);const Ai=({name:e,uri:t,togglePlay:r,spec:a,isActive:n,isPlaying:l,size:s})=>{const o=(0,v.s)(),c=(0,i.useCallback)((()=>{const e=(0,Ri.$I)({spec:a,logger:o,uri:t,isActive:n,isPlaying:l});r({loggingParams:e})}),[n,l,o,a,r,t]);return(0,C.jsx)(Ii.R,{isPlaying:l,onClick:c,ariaPlayLabel:h.Ru.get("playlist.a11y.play",e),ariaPauseLabel:h.Ru.get("playlist.a11y.pause",e),size:s,version:Ii.H.transparent})};var Di=r(32255),ji=r(69624),Li=r(97844),Ei=r(99644),Oi=r(32999);const ki=(0,i.memo)((function({title:e,type:t,images:r,isCircular:i,color:a,animateState:l,animateClassName:s="",isPlaying:o,togglePlay:c,spec:d,uri:u}){const p=(0,Oi._)(),{isCollapsed:g}=(0,Ve.$)(),y=c&&!g;return(0,C.jsxs)("div",{className:n()({[kr.A.imageContainer]:y}),children:[(0,C.jsx)(Di.b,{fadeIn:!0,images:p(r,48),shape:i?Di.u.CIRCLE:Di.u.ROUNDED_CORNERS,size:ji.Qe.SIZE_48,iconSize:"medium",type:t,title:e,className:n()(kr.A.entityImage,{[s]:l}),color:a,loadingMode:"eager"}),y&&(0,C.jsx)("div",{className:Ft,children:(0,C.jsx)(Ai,{spec:d.yourLibraryItemFactory().playButtonFactory(),name:e,uri:u,togglePlay:c,isPlaying:o,isActive:!0,size:"medium"})})]})})),Ni=(0,i.memo)((function({title:e,type:t,uri:r,images:a,isCircular:n,togglePlay:l,color:s,spec:o,isActive:c,isPlaying:d}){const u=mi(),p=(0,Oi._)(),[g,y]=(0,i.useState)("medium"),m=(0,i.useRef)(null);return(0,Ei.w)({onResize:({width:e})=>{y(e<90?"small":"medium")},refOrElement:m}),(0,C.jsx)("div",{className:fi,ref:m,children:(0,C.jsx)(wi.M,{images:p(a,250),FallbackComponent:e=>(0,C.jsx)(Li.s,{semanticColor:"textSubdued",type:t,size:"xxlarge",className:bi,...e}),isCircular:n,color:s,loadingMode:"eager",children:l&&!u&&(0,C.jsx)(Ti,{name:e,uri:r,togglePlay:l,spec:o,isActive:c,isPlaying:d,size:g})})})}));var Fi=r(36664);const Bi="_ymJNIfklFmogab9uWY1",Mi=({folderDepth:e=0})=>(0,C.jsx)("li",{className:Bi,style:{"--ylx-folder-depth":e}}),Ui=e=>{const{RowVariantComponent:t,uri:r,to:a=(0,cr.o_h)(r)?.toURLPath(!0)||"",handleNavigate:l,folderDepth:s,className:o,dragLabel:c,isPinned:d,canReorder:u,allowedDropTargetDropOnMimeTypes:p,onDropTargetDropOn:g,onLongDragOver:y,style:m,openDeleteDialog:x,togglePlay:h,triggerPlay:b,isPlaying:f,isActive:S,type:P,menu:v,name:w,namePrefix:I,subtitle:T,downloadButton:R,expandFolderButton:A,cover:D,alt:L,addedAt:E,lastPlayedAt:O,shouldShowType:k,playbackUri:N,playInsteadOfNavigating:F,spec:B,nrValidItems:M,index:U,lockedIcon:V,onKeyDown:_,preReleaseIcon:z,specialType:H,...W}=e,{onClick:X,onDoubleClick:K,onDragStart:Y,onKeyDown:G,dropPosition:Z,dropTargetClassName:q,draggable:J,unpinConfirmationDialog:$,logRightClick:Q,isViewActive:ee,itemRef:te,...re}=ui({uri:r,to:a,type:P,handleNavigate:l,dragLabel:c,isPinned:d,canReorder:u,allowedDropTargetDropOnMimeTypes:p,onDropTargetDropOn:g,onLongDragOver:y,openDeleteDialog:x,togglePlay:h,triggerPlay:b,isPlaying:f,isActive:S,playInsteadOfNavigating:F,spec:B,folderDepth:s}),ie=(0,i.useCallback)((e=>{G(e),_?.(e)}),[G,_]);return(0,C.jsxs)(C.Fragment,{children:[$,Z===j.Nz.BEFORE&&(0,C.jsx)(Mi,{folderDepth:s}),(0,C.jsx)(Fi.c,{style:{"--ylx-folder-depth":s,...m},draggable:J,onDragStart:Y,onDoubleClick:K,className:n()(o,q,Nt,{[Xt]:Z===j.Nz.ON}),...W,...re,onKeyDown:ie,innerRef:te,"aria-setsize":M,"aria-posinset":U+1,children:(0,C.jsx)(t,{...e,to:a,isActive:S,isViewActive:ee,onClick:X,logRightClick:Q,playInsteadOfNavigating:F,parentRef:te})}),Z===j.Nz.AFTER&&(0,C.jsx)(Mi,{folderDepth:s})]})};var Vi=r(46875);const _i=({locked:e})=>e?(0,C.jsx)(Vi.u,{semanticColor:"textSubdued",title:h.Ru.get("mwp.header.content.unavailable"),className:kr.A.icon,size:"xsmall"}):null;var zi=r(28340);function Hi(e){const{uri:t,artists:r,isPremiumOnly:a}=e,{filter:n}=(0,i.useContext)(J.g),{isPlaying:l,isActive:o}=(0,_r.l_)(t),c=(0,s.wA)(),d=(0,i.useCallback)((()=>{c((0,mr.aw)(t))}),[c,t]),{togglePlay:u,triggerPlay:p}=(0,zi.P)({uri:t},{featureIdentifier:"album",referrerIdentifier:"your_library"});return{isPlaying:l,isActive:o,openDeleteDialog:d,togglePlay:a?void 0:u,triggerPlay:a?void 0:p,menu:(0,C.jsx)(xr.h,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,C.jsx)(br.M,{searchWords:[n.trim()],textToHighlight:r.at(0)?.name??""}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"})}}const Wi=({libraryItem:e,shouldShowType:t=!1,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,pinned:c,type:d,albumType:u,addedAt:p,lastPlayedAt:g,color:y,isPremiumOnly:m}=e,{isPlaying:x,isActive:h,openDeleteDialog:b,togglePlay:f,triggerPlay:S,menu:P,subtitleText:v,downloadButton:w}=Hi(e),I=(0,C.jsx)(ki,{title:o,type:d,images:s,color:y,uri:l,isPlaying:x,spec:i,togglePlay:f}),T=(0,C.jsx)(_i,{locked:m});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:I,name:o,subtitle:v,downloadButton:w,alt:o,type:d,specialType:u,dragLabel:o,menu:P,togglePlay:f,triggerPlay:S,openDeleteDialog:b,addedAt:p,lastPlayedAt:g,isPinned:c,isPlaying:x,isActive:h,shouldShowType:t,spec:i,nrValidItems:a,index:n,lockedIcon:T})},Xi=({libraryItem:e,shouldShowType:t=!1,spec:r,index:i})=>{const{uri:a,images:n,name:l,pinned:s,type:o,albumType:c,color:d,isPremiumOnly:u}=e,{togglePlay:p,triggerPlay:g,menu:y,subtitleText:m,downloadButton:x,openDeleteDialog:h,isPlaying:b,isActive:f}=Hi(e),S=(0,C.jsx)(Ni,{title:l,type:o,images:n,uri:a,togglePlay:p,color:d,spec:r,isActive:f,isPlaying:b}),P=(0,C.jsx)(_i,{locked:u});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:m,menu:y,dragLabel:l,cover:S,downloadButton:x,type:o,specialType:c,togglePlay:p,triggerPlay:g,isPinned:s,shouldShowType:t,openDeleteDialog:h,isPlaying:b,isActive:f,spec:r,index:i,lockedIcon:P})};var Ki=r(7520);function Yi(e){const{uri:t}=e,r=(0,s.wA)(),{togglePlay:a,triggerPlay:n}=(0,zi.P)({uri:t},{featureIdentifier:"artist",referrerIdentifier:"your_library"}),{isPlaying:l,isActive:o}=(0,_r.l_)(t);return{togglePlay:a,triggerPlay:n,isPlaying:l,isActive:o,openDeleteDialog:(0,i.useCallback)((()=>{r((0,mr.aw)(t))}),[r,t]),menu:(0,C.jsx)(Ki.t,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0})}}const Gi=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,addedAt:d,lastPlayedAt:u,pinned:p,color:g}=e,{togglePlay:y,triggerPlay:m,isPlaying:x,isActive:h,openDeleteDialog:b,menu:f}=Yi(e),S=(0,C.jsx)(ki,{title:o,type:c,images:s,isCircular:!0,color:g,uri:l,isPlaying:x,spec:i,togglePlay:y});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:S,name:o,type:c,alt:o,dragLabel:o,menu:f,togglePlay:y,triggerPlay:m,openDeleteDialog:b,addedAt:d,lastPlayedAt:u,isPlaying:x,isActive:h,isPinned:p,shouldShowType:t,spec:i,nrValidItems:a,index:n})},Zi=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{togglePlay:d,triggerPlay:u,menu:p,openDeleteDialog:g,isPlaying:y,isActive:m}=Yi(e),x=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:d,isCircular:!0,color:c,spec:r,isActive:m,isPlaying:y});return(0,C.jsx)(Ci,{uri:a,name:l,menu:p,dragLabel:l,cover:x,type:s,togglePlay:d,triggerPlay:u,isPinned:o,shouldShowType:t,openDeleteDialog:g,isPlaying:y,isActive:m,spec:r,index:i})};var qi=r(47863);function Ji(e){const{uri:t,authorName:r}=e,{filter:a}=(0,i.useContext)(J.g),n=(0,s.wA)(),{isPlaying:l,isActive:o}=(0,_r.l_)(t);return{isPlaying:l,isActive:o,openDeleteDialog:(0,i.useCallback)((()=>{n((0,mr.aw)(t))}),[n,t]),menu:(0,C.jsx)(qi.p,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),subtitleText:(0,C.jsx)(br.M,{searchWords:[a.trim()],textToHighlight:r}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"})}}const $i=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,pinned:d,addedAt:u,lastPlayedAt:p,color:g}=e,{isPlaying:y,isActive:m,openDeleteDialog:x,menu:h,subtitleText:b,downloadButton:f}=Ji(e),S=(0,C.jsx)(ki,{title:o,type:c,images:s,color:g,uri:l,isPlaying:y,spec:i,togglePlay:void 0}),P=(0,C.jsx)(_i,{locked:e.isLocked});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:S,name:o,subtitle:b,alt:o,dragLabel:o,menu:h,openDeleteDialog:x,addedAt:u,lastPlayedAt:p,isPlaying:y,isActive:m,isPinned:d,shouldShowType:t,type:c,spec:i,nrValidItems:a,lockedIcon:P,index:n,downloadButton:f})},Qi=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{menu:d,subtitleText:u,openDeleteDialog:p,isPlaying:g,isActive:y,downloadButton:m}=Ji(e),x=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,color:c,spec:r,isActive:y,isPlaying:g});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:u,menu:d,dragLabel:l,cover:x,isPinned:o,shouldShowType:t,type:s,openDeleteDialog:p,isPlaying:g,isActive:y,spec:r,index:i,downloadButton:m})};var ea=r(84703),ta=r(52898);const ra=({uri:e,divider:t,onDeleteCallback:r})=>{const a=(0,f.W)(),n=(0,s.wA)(),l=(0,i.useCallback)((()=>{a({intent:"playlisting",type:"click"}),n((0,mr.OB)(e,r))}),[n,r,a,e]);return(0,C.jsx)(b.D,{role:"menuitem",divider:t,onClick:l,leadingIcon:(0,C.jsx)(ta.P,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.delete")})},ia=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"delete-folder",children:(0,C.jsx)(ra,{...e})})}));var aa=r(67865),na=r(99293),la=r(14237);const sa=({uri:e,spec:t})=>{const{togglePlay:r,isPlaying:a,isActive:n}=(0,zi.P)({uri:e},{featureIdentifier:"folder"}),l=(0,v.s)(),s=(0,i.useCallback)((()=>{r(),t&&l&&(a?l.logInteraction(t.playButtonFactory({uri:e}).hitPause({itemToBePaused:e})):n?l.logInteraction(t.playButtonFactory({uri:e}).hitResume({itemToBeResumed:e})):l.logInteraction(t.playButtonFactory({uri:e}).hitPlay({itemToBePlayed:e})))}),[n,a,l,t,r,e]);return(0,C.jsx)(b.D,{role:"menuitem",onClick:s,leadingIcon:a?(0,C.jsx)(na._,{semanticColor:"textSubdued",size:"small"}):(0,C.jsx)(la.A,{semanticColor:"textSubdued",size:"small"}),children:a?h.Ru.get("pause"):h.Ru.get("play")})},oa=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"create-folder",children:(0,C.jsx)(sa,{...e})})}));var ca=r(10599);const da=({uri:e,name:t,divider:r,spec:a,handleRename:n})=>{const l=(0,v.s)(),o=(0,s.wA)(),c=(0,i.useCallback)((()=>{a&&l.logInteraction(a.editButtonFactory({uri:e}).hitUiReveal()),o((0,mr.O2)(t,n))}),[o,l,t,n,a,e]);return(0,C.jsx)(b.D,{role:"menuitem",divider:r,onClick:c,leadingIcon:(0,C.jsx)(ca.G,{semanticColor:"textSubdued",size:"small"}),children:h.Ru.get("contextmenu.rename")})},ua=i.memo((function(e){return(0,C.jsx)(P.pZ,{value:"rename",children:(0,C.jsx)(da,{...e})})}));var pa=r(23189),ga=r(46845);const ya=i.memo((function({reference:e,name:t="",onRename:r,onCreateCallback:i=(()=>{}),onDeleteCallback:a,canPin:n=T.oT.NO,isPinned:l=!1,isPlayable:s=!0}){const{spec:o}=(0,R.o)(e.uri),c=(0,ga.Ek)()&&s;return(0,C.jsx)(P.pZ,{value:"folder",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(ua,{spec:o,uri:e.uri,name:t,handleRename:r}),(0,C.jsx)(ia,{uri:e.uri,divider:"after",onDeleteCallback:a}),(n!==T.oT.NO||l)&&(0,C.jsx)(aa.k,{uri:e.uri,canPin:n,isPinned:l,type:Cr.c.FOLDER,spec:o}),(0,C.jsx)(I,{position:{after:e},onCreateCallback:i,spec:o}),(0,C.jsx)(m.j,{position:{after:e},onCreateCallback:i,spec:o}),(0,C.jsx)(pa.y,{uriToBeAdded:e.uri,isInLibrary:!0,spec:o}),c&&(0,C.jsx)(oa,{uri:e.uri,spec:o})]})})}));function ma(e,t){const{createPlaylistFromAlbum:r,createPlaylistFromTracks:a}=(0,S.A)(),n=(0,v.s)(),l=(0,ai.g)(),s=ni(),o=(0,i.useCallback)((r=>{if(!t)return;const{[D.fl.PLAYLISTS_V2]:i=[],[D.fl.FOLDERS]:a=[]}=r,o={after:{uri:t}};i.length&&(s(i,o),n.logInteraction(e.dragSort())),a.length&&(l.moveFolder({uri:a[0]},o),n.logInteraction(e.dragSort()))}),[s,n,l,e,t]),{unpinConfirmationDialog:c,applyDropWithUnpinConfirmation:d}=ri({onApplyDrop:o});return{unpinConfirmationDialog:c,handleDropOnFolder:(0,i.useCallback)((async i=>{if(!t)return;const{[D.fl.TRACKS]:l=[],[D.fl.LOCAL_TRACKS]:s=[],[D.fl.ALBUMS]:o=[],[D.fl.EPISODES]:c=[],[D.fl.PLAYLISTS_V2]:u=[],[D.fl.FOLDERS]:p=[]}=i,g={after:{uri:t}};u.length||p.length?d(i,j.Nz.ON):o.length?(r(o[0],g),n.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist())):(l.length||s.length||c.length)&&(a([...l,...s,...c],g),n.logInteraction(e.yourLibraryItemFactory().dragCreatePlaylist()))}),[t,d,r,n,e,a])}}var xa=r(94),ha=r(26184),ba=r(99248),fa=r(20150),Sa=r(66834),Pa=r(78119),va=r(94572);const Ca=({uri:e})=>{const[t,r]=(0,i.useState)(!1),a=(0,xa.x)(),n=(0,i.useCallback)((()=>{r(!0),setTimeout((()=>{r(!1)}),500)}),[]);return(0,ba.l)(ha.UV.OPERATION_COMPLETE,(t=>{"add"===t.data.operation&&e===a.getDefaultCurationContextUri(t.data.uris[0])&&n()})),(0,Sa.e)(fa.Lj.OPERATION_COMPLETE,(t=>{"add"===t.data.operation&&e===t.data.uri&&n()})),(0,Pa.b)(va.tD.OPERATION_COMPLETE,(t=>{"remove"!==t.data.operation&&"end"!==t.data.position?.after&&t.data.position.after?.uri===e&&(0,cr.fpb)(e)&&n()})),{animateState:t,animateClassName:kr.A.pulse}};var wa=r(46069),Ia=r(13719);function Ta(e,t){const{uri:r,name:a,numberOfFolders:n,numberOfPlaylists:l,pinned:o}=e,{isPlaying:c,isActive:d}=(0,_r.l_)(r),{pushFolder:u}=(0,i.useContext)(ur),p=(0,s.wA)(),{togglePlay:g,triggerPlay:y}=(0,zi.P)({uri:r},{featureIdentifier:"folder",referrerIdentifier:"your_library"}),m=(0,s.d4)((e=>e.platform.isDesktop)),{handleDropOnFolder:x,unpinConfirmationDialog:b}=ma(t,r),{renameFolder:f}=(0,wa.Z)(),S=x,P=[l>0||!n?h.Ru.get("web-player.your-library-x.rows.folder.number-of-playlists",l):null,n>0?h.Ru.get("web-player.your-library-x.rows.folder.number-of-folders",n):null].filter(Ia.P).join(h.Ru.getSeparator()),v=(0,i.useCallback)(((t="")=>{f(e,t)}),[e,f]),w=(0,i.useCallback)((()=>{u(e.uri)}),[e.uri,u]);return{openDeleteDialog:(0,i.useCallback)((()=>{p((0,mr.OB)(r))}),[p,r]),togglePlay:m?g:void 0,triggerPlay:m?y:void 0,menu:(0,C.jsx)(ya,{reference:{uri:r},name:a,canPin:e.canPin,isPinned:o,onRename:v,isPlayable:!e.isEmpty}),subtitleText:P,onDropTargetDropOn:S,handleNavigate:w,dropOnFolderUnpinConfirmationDialog:b,isPlaying:c,isActive:d}}const Ra=({libraryItem:e,RowVariantComponent:t,spec:r,nrValidItems:a,index:l})=>{const{uri:s,folderDepth:o,name:c,type:d,isFlattened:u,pinned:p,canReorder:g}=e,{openDeleteDialog:y,togglePlay:m,triggerPlay:x,menu:b,subtitleText:f,onDropTargetDropOn:S,handleNavigate:P,dropOnFolderUnpinConfirmationDialog:w,isPlaying:I,isActive:T}=Ta(e,r),[R,A]=function(e){const{getIsFolderExpanded:t,setIsFolderExpanded:r}=(0,i.useContext)(xt);return[(0,i.useMemo)((()=>t(e)),[t,e]),(0,i.useCallback)((t=>{r(e,t)}),[r,e])]}(s),D=(0,v.s)(),j=(0,i.useCallback)((()=>{A(!0),D.logInteraction(r.yourLibraryItemFactory().dragUiReveal())}),[D,A,r]),L=(0,i.useCallback)((e=>{e.stopPropagation()}),[]),E=(0,i.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),A(!R),R?D.logInteraction(r.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiHide()):D.logInteraction(r.yourLibraryItemFactory().toggleFolderButtonFactory().hitUiReveal())}),[A,R,D,r]),O=(0,i.useCallback)((e=>{"ArrowLeft"===e.key?A(!1):"ArrowRight"===e.key&&A(!0)}),[A]),k=!u&&(0,C.jsx)(Be.H,{"data-skip-in-keyboard-nav":!0,"aria-label":R?h.Ru.get("web-player.your-library-x.collapse-folder"):h.Ru.get("web-player.your-library-x.expand-folder"),iconOnly:ea.y,size:"small",condensedAll:!0,onClick:E,onDoubleClick:L,tabIndex:-1,className:n()(vt,Ct,{[kt]:!R})}),{animateState:N,animateClassName:F}=Ca({uri:s}),B=(0,C.jsx)(ki,{title:c,type:d,animateState:N,animateClassName:F,uri:s,isPlaying:I,spec:r,togglePlay:m});return(0,C.jsxs)(C.Fragment,{children:[w,(0,C.jsx)(Ui,{onKeyDown:O,RowVariantComponent:t,uri:s,to:`/folder/${(0,cr.o_h)(s)?.id??""}`,handleNavigate:P,folderDepth:o,cover:B,name:c,subtitle:f,alt:c,dragLabel:c,menu:b,canReorder:g,allowedDropTargetDropOnMimeTypes:ir,onDropTargetDropOn:S,onLongDragOver:j,togglePlay:m,triggerPlay:x,openDeleteDialog:y,addedAt:e.addedAt,lastPlayedAt:e.lastPlayedAt,isPinned:p,shouldShowType:!1,type:d,isPlaying:I,isActive:T,expandFolderButton:k,spec:r,nrValidItems:a,index:l})]})},Aa=({libraryItem:e,spec:t,index:r})=>{const{uri:i,name:a,type:n,pinned:l,canReorder:s}=e,{togglePlay:o,triggerPlay:c,menu:d,subtitleText:u,onDropTargetDropOn:p,handleNavigate:g,openDeleteDialog:y,isPlaying:m,isActive:x}=Ta(e,t),{animateState:h,animateClassName:b}=Ca({uri:i}),f=(0,C.jsx)(Ni,{title:a,type:n,uri:i,togglePlay:o,spec:t,isActive:x,isPlaying:m});return(0,C.jsx)(Ci,{uri:i,to:`/folder/${(0,cr.o_h)(i)?.id??""}`,handleNavigate:g,cover:f,name:a,subtitle:u,menu:d,dragLabel:a,canReorder:s,allowedDropTargetDropOnMimeTypes:ir,onLongDragOver:g,onDropTargetDropOn:p,togglePlay:o,triggerPlay:c,isPinned:l,shouldShowType:!1,type:n,openDeleteDialog:y,isPlaying:m,isActive:x,spec:t,index:r,animateState:h,animateClassName:b})};var Da=r(199);const ja=i.memo((function({uri:e,canPin:t,isPinned:r,downloadUri:i}){const{spec:a}=(0,R.o)(e);return(0,C.jsx)(P.pZ,{value:"generic",children:(0,C.jsxs)(y.W,{children:[i?(0,C.jsx)(Da.d,{spec:a,uri:i}):null,t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:e,canPin:t,isPinned:r,type:Cr.c.PLAYLIST,spec:a})]})})}));var La=r(36061);const Ea=[D.fl.TRACKS,D.fl.LOCAL_TRACKS];function Oa(e){const{numberOfSongs:t}=e,r="spotify:collection:tracks",{user:a}=(0,s.d4)(La.Ht),n=(0,cr.fHB)(a?.id).toURI(),l=n,o=n,{togglePlay:c,triggerPlay:d}=(0,zi.P)({uri:l},{featureIdentifier:"your_library",referrerIdentifier:"your_library"}),u=(0,Wt.f)(),{isPlaying:p,isActive:g}=(0,_r.l_)(l),y=(0,i.useCallback)((e=>{const{[D.fl.TRACKS]:t=[],[D.fl.LOCAL_TRACKS]:r=[]}=e,i=[...t,...r];i?.length&&u?.add({uris:i})}),[u]);return{isPlaying:p,isActive:g,togglePlay:c,triggerPlay:d,menu:(0,C.jsx)(ja,{uri:r,canPin:e.canPin,isPinned:e.pinned,downloadUri:o}),downloadButton:(0,C.jsx)(hr.M,{uri:o,size:"xsmall",className:kr.A.icon,as:"span"}),subtitleText:(0,C.jsx)(C.Fragment,{children:h.Ru.get("web-player.your-library-x.rows.liked-songs.subtitle",t)}),onDropTargetDropOn:y,playbackUri:l,uri:r,...Ca({uri:r})}}const ka=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{images:l,name:s,type:o,pinned:c,addedAt:d,lastPlayedAt:u,color:p}=e,{isPlaying:g,isActive:y,togglePlay:m,triggerPlay:x,menu:h,subtitleText:b,onDropTargetDropOn:f,playbackUri:S,uri:P,downloadButton:v,animateState:w,animateClassName:I}=Oa(e),T=(0,C.jsx)(ki,{title:s,type:o,images:l,color:p,animateState:w,animateClassName:I,uri:P,isPlaying:g,spec:i,togglePlay:m});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:P,cover:T,name:s,subtitle:b,alt:s,dragLabel:s,menu:h,allowedDropTargetDropOnMimeTypes:Ea,onDropTargetDropOn:f,togglePlay:m,triggerPlay:x,addedAt:d,lastPlayedAt:u,isPlaying:g,isActive:y,isPinned:c,shouldShowType:t,type:o,playbackUri:S,downloadButton:v,spec:i,nrValidItems:a,index:n})},Na=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{images:a,name:n,type:l,pinned:s,color:o}=e,{togglePlay:c,triggerPlay:d,menu:u,subtitleText:p,onDropTargetDropOn:g,playbackUri:y,uri:m,downloadButton:x,isPlaying:h,isActive:b,animateState:f,animateClassName:S}=Oa(e),P=(0,C.jsx)(Ni,{title:n,type:l,images:a,uri:y,togglePlay:c,color:o,spec:r,isActive:b,isPlaying:h});return(0,C.jsx)(Ci,{uri:m,name:n,subtitle:p,menu:u,dragLabel:n,allowedDropTargetDropOnMimeTypes:Ea,onDropTargetDropOn:g,cover:P,togglePlay:c,triggerPlay:d,isPinned:s,shouldShowType:t,type:l,playbackUri:y,downloadButton:x,isPlaying:h,isActive:b,spec:r,index:i,animateState:f,animateClassName:S})};var Fa=r(92424),Ba=r(12010),Ma=r(60393),Ua=r(39838);function Va(e){const{numberOfFiles:t}=e,r=Ua.bV,i=(0,Ma.Iu)().uri,{isPlaying:a,isActive:n}=(0,_r.l_)(r);return{playbackUri:r,uri:i,isPlaying:a,isActive:n,menu:(0,C.jsx)(ja,{uri:i,canPin:e.canPin,isPinned:e.pinned}),downloadButton:(0,C.jsx)(Fa.F,{size:"xsmall",className:kr.A.icon,semanticColor:"textBrightAccent"}),subtitleText:h.Ru.get("web-player.your-library-x.rows.local-files.subtitle",t)}}const _a=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{name:l,addedAt:s,lastPlayedAt:o,type:c,pinned:d}=e,{playbackUri:u,uri:p,isPlaying:g,menu:y,subtitleText:m,downloadButton:x,isActive:h}=Va(e),b=(0,C.jsx)("div",{className:wt,children:(0,C.jsx)(Ba.e,{iconSize:24,title:l})});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:p,name:l,subtitle:m,alt:l,dragLabel:l,menu:y,addedAt:s,lastPlayedAt:o,isPinned:d,isPlaying:g,isActive:h,shouldShowType:t,playbackUri:u,downloadButton:x,cover:b,type:c,spec:i,nrValidItems:a,index:n})},za=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{name:a,images:n,type:l,pinned:s}=e,{playbackUri:o,uri:c,menu:d,downloadButton:u,subtitleText:p,isPlaying:g,isActive:y}=Va(e),m=(0,C.jsx)("div",{className:fi,children:(0,C.jsx)(wi.M,{images:n,FallbackComponent:e=>(0,C.jsx)(Ba.e,{size:"xxlarge",className:bi,...e})})});return(0,C.jsx)(Ci,{uri:c,name:a,subtitle:p,menu:d,cover:m,type:l,playbackUri:o,downloadButton:u,isPinned:s,shouldShowType:t,isPlaying:g,isActive:y,spec:r,index:i})};var Ha=r(89845);const Wa=({index:e,type:t})=>{const r=mi();return(0,C.jsx)(Ha.T,{columnIndex:0,children:(0,C.jsx)(fr.Z,{className:n()(xi,{[hi]:r}),media:(0,C.jsx)(wi.M,{images:[],FallbackComponent:()=>(0,C.jsx)(Li.s,{type:t,size:"xxlarge",className:bi,semanticColor:"textSubdued"}),isCircular:t===Cr.c.ARTIST}),variant:"naked",id:e,title:"",padding:r?Sr.vw:Sr.CJ})})};var Xa=r(2963),Ka=r(56349),Ya=r(10285),Ga=r(59521),Za=r(26869),qa=r(65305),Ja=r(1229),$a=r(99165),Qa=r(96641),en=r(34139),tn=r(88761),rn=r(62209),an=r(69476),nn=r(58033),ln=r(42162),sn=r(47694),on=r(11893),cn=r(16743);const dn=i.memo((function({reference:e,isPublished:t,canPin:r=T.oT.NO,isPinned:i=!1,useDialogForUnfollow:a=!1,isInLibrary:n}){const{uri:l}=e,s=(0,on.J)(l),o=!!s?.permissions?.isPrivate,c=(0,cn.v)(l)??s?.isPublished??t,{spec:d}=(0,R.o)(l),u=s?.hasSpotifyAudiobooks;return s&&(0,C.jsx)(P.pZ,{value:"playlist",children:(0,C.jsxs)(y.W,{children:[!u&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Ya.K,{spec:d,uris:[l]}),(0,C.jsx)(sn._,{uri:l,spec:d})]}),!o&&(0,C.jsx)(rn._,{spec:d,divider:s.isOwnedBySelf?"after":"both",uri:l,isPublished:c}),s.isOwnedBySelf&&(0,C.jsx)(qa.T,{spec:d,uri:l,name:s.name,description:s.description,image:s.images[0]}),!s.isOwnedBySelf&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(an.P,{spec:d,uri:l}),(0,C.jsx)(Ka.ET,{uri:l,useDialog:a,initialState:n})]}),s.isOwnedBySelf&&(0,C.jsx)(Za.u,{spec:d,uri:l}),!u&&(0,C.jsx)(Da.d,{spec:d,uri:l}),(0,C.jsx)(I,{position:{after:e},divider:"before",spec:d}),(0,C.jsx)(m.j,{position:{after:e},spec:d}),s.permissions?.canAdministratePermissions&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(tn.U,{spec:d,divider:"before",uri:l,isPrivate:o}),!u&&(0,C.jsx)($a.n,{uri:l,spec:d})]}),s.permissions?.canCancelMembership&&(0,C.jsx)(Qa._,{spec:d,divider:"before",uri:l}),(0,C.jsx)(Ja.w,{spec:d,uri:l}),(0,C.jsx)(pa.y,{uriToBeAdded:l,isInLibrary:!0,spec:d}),!u&&(0,C.jsx)(nn.o,{spec:d,uris:[l],isPlaylist:!0}),(r!==T.oT.NO||i)&&(0,C.jsx)(aa.k,{uri:l,canPin:r,isPinned:i,type:Cr.c.PLAYLIST,spec:d}),(s.isOwnedBySelf||!o)&&(0,C.jsxs)(ln.h,{divider:"before",children:[(0,C.jsx)(Ga.m,{spec:d,uri:l,displayText:h.Ru.get("contextmenu.share.copy-playlist-link"),isPrivatePlaylist:o}),(0,C.jsx)(en.x,{spec:d,uri:l,type:Cr.c.PLAYLIST})]})]})})})),un=i.memo((function({reference:e,canPin:t=T.oT.NO,isPinned:r=!1}){const{uri:i}=e,{spec:a}=(0,R.o)(i);return(0,C.jsx)(P.pZ,{value:"playlist",children:(0,C.jsxs)(y.W,{children:[(0,C.jsx)(I,{position:{after:e},divider:"before",spec:a}),(0,C.jsx)(m.j,{position:{after:e},spec:a}),t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:i,canPin:t,isPinned:r,type:Cr.c.PLAYLIST,spec:a})]})})}));var pn=r(29074);function gn(e,t){const{uri:r,isLoading:a,owner:n,pinned:l,canView:o}=e,c=(0,pn.m)(),{filter:d}=(0,i.useContext)(J.g),u=[D.fl.TRACKS,D.fl.LOCAL_TRACKS,D.fl.ALBUMS,D.fl.EPISODES],p=[D.fl.AUDIOBOOKS];(0,i.useEffect)((()=>{a&&c.resync(r)}),[c,r,a]);const{togglePlay:g,triggerPlay:m}=(0,zi.P)({uri:r},{featureIdentifier:"playlist",referrerIdentifier:"your_library"}),{isPlaying:x,isActive:b}=(0,_r.l_)(r),f=(0,s.wA)(),S=(0,v.s)();let P,w=[];const I=(0,i.useCallback)((async e=>{const{[D.fl.TRACKS]:i=[],[D.fl.LOCAL_TRACKS]:a=[],[D.fl.ALBUMS]:n=[],[D.fl.EPISODES]:l=[],[D.fl.AUDIOBOOKS]:s=[]}=e,o=[...i,...a,...n,...l,...s];f((0,Xa.io)(r,o)),S.logInteraction(t.yourLibraryItemFactory().dragAddToPlaylist({itemToBeAdded:o.at(0)??"",playlist:r}))}),[f,S,t,r]);e.canAddTo&&(w=e.isEmpty?[...p,...u]:e.isBooklist?p:u,P=I);const T=(0,i.useCallback)((()=>{f((0,mr.O)(r))}),[f,r]),R=(0,yr.c0)(r),A=a&&!e.name;let j;j=R?(0,C.jsx)(un,{reference:e,canPin:e.canPin,isPinned:l}):A?(0,C.jsx)(y.W,{children:(0,C.jsx)(Ka.ET,{uri:r,initialState:!0})}):(0,C.jsx)(dn,{reference:e,canPin:e.canPin,isPinned:l,useDialogForUnfollow:!0,isInLibrary:!0});const L=(0,C.jsx)(hr.M,{uri:r,size:"xsmall",className:kr.A.icon,as:"span"}),E=(0,yr.c0)(r)?h.Ru.get("ylx.clicktoplay"):o?(n.uri,(0,C.jsx)(br.M,{searchWords:[d.trim()],textToHighlight:n.name})):h.Ru.get("web-player.your-library-x.playlist-unavailable"),O=!!(0,yr.c0)(r)||!e.isBooklist&&!e.isEmpty;return{openDeleteDialog:T,togglePlay:O?g:void 0,triggerPlay:O?m:void 0,isPlaying:x,isActive:b,menu:j,downloadButton:L,subtitleText:E,allowedDropTargetDropOnMimeTypes:w,onDropTargetDropOn:P,...Ca({uri:r})}}const yn=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,folderDepth:o,name:c,type:d,pinned:u,addedAt:p,lastPlayedAt:g,color:y,canReorder:m,namePrefix:x}=e,{openDeleteDialog:h,togglePlay:b,triggerPlay:f,isPlaying:S,isActive:P,menu:v,downloadButton:w,subtitleText:I,allowedDropTargetDropOnMimeTypes:T,onDropTargetDropOn:R,animateState:A,animateClassName:D}=gn(e,i),j=(0,C.jsx)(ki,{title:c,type:d,images:s,color:y,animateState:A,animateClassName:D,uri:l,isPlaying:S,togglePlay:b,spec:i});return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,folderDepth:o,cover:j,name:c,namePrefix:x,subtitle:I,alt:c,dragLabel:c,menu:v,canReorder:m,allowedDropTargetDropOnMimeTypes:T,onDropTargetDropOn:R,togglePlay:b,triggerPlay:f,openDeleteDialog:h,addedAt:p,lastPlayedAt:g,isPlaying:S,isActive:P,isPinned:u,shouldShowType:t,type:d,downloadButton:w,spec:i,playInsteadOfNavigating:(0,yr.c0)(l),nrValidItems:a,index:n})})},mn=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c,canReorder:d,namePrefix:u}=e,{togglePlay:p,triggerPlay:g,menu:y,downloadButton:m,subtitleText:x,onDropTargetDropOn:h,allowedDropTargetDropOnMimeTypes:b,openDeleteDialog:f,isPlaying:S,isActive:P,animateState:v,animateClassName:w}=gn(e,r),I=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:p,color:c,spec:r,isActive:P,isPlaying:S});return(0,C.jsx)(Ci,{uri:a,name:l,namePrefix:u,subtitle:x,menu:y,dragLabel:l,canReorder:d,allowedDropTargetDropOnMimeTypes:b,onDropTargetDropOn:h,cover:I,togglePlay:p,triggerPlay:g,isPinned:o,shouldShowType:t,type:s,downloadButton:m,openDeleteDialog:f,isPlaying:S,isActive:P,spec:r,playInsteadOfNavigating:(0,yr.c0)(a),index:i,animateState:v,animateClassName:w})};var xn=r(58160),hn=r(59076),bn=r(21489),fn=r(21071);const Sn=i.memo((function({uri:e,canPin:t=T.oT.NO,isPinned:r=!1,canRemove:i=!1}){const{spec:a}=(0,R.o)(e);return(0,C.jsx)(P.pZ,{value:"audiobook",children:(0,C.jsxs)(y.W,{children:[i&&(0,C.jsx)(fn.p,{uri:e,removeLabel:h.Ru.get("contextmenu.remove-from-library")}),t!==T.oT.NO&&(0,C.jsx)(aa.k,{uri:e,canPin:t,isPinned:r,type:Cr.c.PRE_RELEASE_BOOK,spec:a}),(0,C.jsx)(Ga.m,{uri:e,spec:a,displayText:h.Ru.get("context-menu.copy-book-link")}),(0,C.jsx)(bn.q,{spec:a,divider:"before",uri:e})]})})}));function Pn(e){const{uri:t,canPin:r,pinned:a,type:n}=e,{filter:l}=(0,i.useContext)(J.g),o=(0,s.wA)(),c=(0,i.useCallback)((()=>{o((0,mr.aw)(t,!0))}),[o,t]);let d,u="";if(n===Cr.c.PRE_RELEASE_ALBUM){const i=e.artists?.at(0);u=i?.name??"",d=(0,C.jsx)(hn.P,{uri:t,artistUri:i?.uri,canPin:r,isPinned:a,canRemove:!0})}else u=e.authorName,d=(0,C.jsx)(Sn,{uri:t,canPin:r,isPinned:a,canRemove:!0});return{openDeleteDialog:c,menu:d,subtitleText:(0,C.jsx)(br.M,{searchWords:[l.trim()],textToHighlight:u})}}const vn=({libraryItem:e,shouldShowType:t=!1,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,pinned:c,type:d,addedAt:u,lastPlayedAt:p,color:g}=e,{openDeleteDialog:y,menu:m,subtitleText:x}=Pn(e),h=(0,C.jsx)(ki,{title:o,type:d,images:s,color:g,uri:l,isPlaying:!1,spec:i,togglePlay:void 0});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:h,name:o,subtitle:x,alt:o,type:d,dragLabel:o,menu:m,openDeleteDialog:y,addedAt:u,lastPlayedAt:p,isPinned:c,isPlaying:!1,isActive:!1,shouldShowType:t,spec:i,nrValidItems:a,index:n,preReleaseIcon:(0,C.jsx)(xn.t,{size:"xsmall",className:kr.A.icon})})},Cn=({libraryItem:e,shouldShowType:t=!1,spec:r,index:i})=>{const{uri:a,images:n,name:l,pinned:s,type:o,color:c}=e,{menu:d,subtitleText:u,openDeleteDialog:p}=Pn(e),g=(0,C.jsx)(Ni,{title:l,type:o,images:n,uri:a,color:c,spec:r,isActive:!1,isPlaying:!1});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:u,menu:d,dragLabel:l,cover:g,type:o,isPinned:s,shouldShowType:t,openDeleteDialog:p,isPlaying:!1,isActive:!1,spec:r,index:i,preReleaseIcon:(0,C.jsx)(xn.t,{size:"xsmall",className:kr.A.icon})})};var wn=r(29454);function In(e){const{uri:t,publisher:r}=e,{filter:a}=(0,i.useContext)(J.g),n=(0,s.wA)(),{togglePlay:l,triggerPlay:o}=(0,zi.P)({uri:t},{featureIdentifier:"show",referrerIdentifier:"your_library"}),{isPlaying:c,isActive:d}=(0,_r.l_)(t);return{isPlaying:c,isActive:d,openDeleteDialog:(0,i.useCallback)((()=>{n((0,mr.aw)(t))}),[n,t]),togglePlay:l,triggerPlay:o,menu:(0,C.jsx)(wn.H,{uri:t,canPin:e.canPin,isPinned:e.pinned,useDialogForUnfollow:!0,isInLibrary:!0}),downloadButton:(0,C.jsx)(hr.M,{uri:t,size:"xsmall",className:kr.A.icon,as:"span"}),subtitleText:(0,C.jsx)(br.M,{autoEscape:!0,searchWords:[a.trim()],textToHighlight:r})}}const Tn=({libraryItem:e,shouldShowType:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n})=>{const{uri:l,images:s,name:o,type:c,addedAt:d,lastPlayedAt:u,pinned:p,color:g}=e,{isPlaying:y,isActive:m,openDeleteDialog:x,togglePlay:h,triggerPlay:b,menu:f,downloadButton:S,subtitleText:P}=In(e),v=(0,C.jsx)(ki,{title:o,type:c,images:s,color:g,uri:l,isPlaying:y,spec:i,togglePlay:h});return(0,C.jsx)(Ui,{RowVariantComponent:r,uri:l,cover:v,name:o,subtitle:P,alt:o,dragLabel:o,menu:f,togglePlay:h,triggerPlay:b,openDeleteDialog:x,addedAt:d,lastPlayedAt:u,isPlaying:y,isActive:m,isPinned:p,shouldShowType:t,type:c,downloadButton:S,spec:i,nrValidItems:a,index:n})},Rn=({libraryItem:e,shouldShowType:t,spec:r,index:i})=>{const{uri:a,images:n,name:l,type:s,pinned:o,color:c}=e,{togglePlay:d,triggerPlay:u,menu:p,downloadButton:g,subtitleText:y,openDeleteDialog:m,isPlaying:x,isActive:h}=In(e),b=(0,C.jsx)(Ni,{title:l,type:s,images:n,uri:a,togglePlay:d,color:c,spec:r,isActive:h,isPlaying:x});return(0,C.jsx)(Ci,{uri:a,name:l,subtitle:y,menu:p,dragLabel:l,cover:b,togglePlay:d,triggerPlay:u,isPinned:o,shouldShowType:t,type:s,downloadButton:g,openDeleteDialog:m,isPlaying:x,isActive:h,spec:r,index:i})},An=[D.fl.EPISODES];function Dn(e){const{numberOfDownloadedEpisodes:t,uri:r}=e,a=(0,d.NC)(Ce.ucV,{loadingValue:!1}),{user:n}=(0,s.d4)(La.Ht),l=(0,cr.fHB)(n?.id,"your-episodes").toURI(),o=a?r:l,c=T.Xn,{togglePlay:u,triggerPlay:p}=(0,zi.P)({uri:o},{featureIdentifier:"episode",referrerIdentifier:"your_library"}),{isPlaying:g,isActive:y}=(0,_r.l_)(o),m=(0,Wt.f)(),x=(0,i.useCallback)((e=>{const{[D.fl.EPISODES]:t=[]}=e;t?.length&&m?.add({uris:t})}),[m]);return{isPlaying:g,isActive:y,togglePlay:u,triggerPlay:p,menu:(0,C.jsx)(ja,{uri:c,canPin:e.canPin,isPinned:e.pinned}),downloadButton:t?(0,C.jsx)(Fa.F,{size:"xsmall",className:kr.A.icon,semanticColor:"textBrightAccent"}):null,subtitleText:h.Ru.get("web-player.your-library-x.subtitle-your-episodes"),onDropTargetDropOn:x,playbackUri:o,uri:c,...Ca({uri:c})}}const jn=({libraryItem:e,RowVariantComponent:t,spec:r,nrValidItems:i,index:a})=>{const{images:n,name:l,type:s,pinned:o,lastPlayedAt:c,addedAt:d,color:u}=e,{isPlaying:p,isActive:g,togglePlay:y,triggerPlay:m,menu:x,downloadButton:h,subtitleText:b,onDropTargetDropOn:f,playbackUri:S,uri:P,animateState:v,animateClassName:w}=Dn(e),I=(0,C.jsx)(ki,{title:l,type:s,images:n,color:u,animateState:v,animateClassName:w,uri:P,isPlaying:p,spec:r,togglePlay:y});return(0,C.jsx)(Ui,{RowVariantComponent:t,uri:P,cover:I,name:l,subtitle:b,alt:l,dragLabel:l,menu:x,allowedDropTargetDropOnMimeTypes:An,onDropTargetDropOn:f,togglePlay:y,triggerPlay:m,addedAt:d,lastPlayedAt:c,isPlaying:p,isActive:g,isPinned:o,shouldShowType:!1,type:s,downloadButton:h,playbackUri:S,spec:r,nrValidItems:i,index:a})},Ln=({libraryItem:e,spec:t,index:r})=>{const{images:i,name:a,type:n,pinned:l,color:s}=e,{togglePlay:o,triggerPlay:c,menu:d,downloadButton:u,subtitleText:p,onDropTargetDropOn:g,playbackUri:y,uri:m,isPlaying:x,isActive:h,animateState:b,animateClassName:f}=Dn(e),S=(0,C.jsx)(Ni,{title:a,type:n,images:i,uri:m,togglePlay:o,color:s,spec:t,isActive:h,isPlaying:x});return(0,C.jsx)(Ci,{uri:m,name:a,subtitle:p,menu:d,dragLabel:a,allowedDropTargetDropOnMimeTypes:An,onDropTargetDropOn:g,cover:S,togglePlay:o,triggerPlay:c,playbackUri:y,downloadButton:u,isPinned:l,shouldShowType:!1,type:n,isPlaying:x,isActive:h,spec:t,index:r,animateState:b,animateClassName:f})};function En(){const[e,t]=(0,Pe.x)("ylx-grid-scale",1);return{gridScale:e,setGridScale:t}}var On=r(20489),kn=r(42795),Nn=r(11153);const Fn=({span:e,onInView:t,marginBottom:r,marginTop:a})=>{const n=(0,i.useRef)(null);return(0,i.useEffect)((()=>{if(!window.IntersectionObserver)return()=>{};const e=new window.IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting&&t()}))}));return n.current&&e.observe(n.current),()=>{e.disconnect()}}),[t]),e<=0?null:(0,C.jsx)("div",{style:{gridColumn:"1/-1",gridRow:`span ${e}`,marginBottom:r,marginTop:a},ref:n,"data-type":"sentinel"},"topSentinel")},Bn=({renderItems:e,nrItems:t,estimatedItemMaxHeight:r,scrollNodeRef:a,nrRowsOverscan:n=5,initalNrRows:l=5,onGridResize:s})=>{const[o,c]=(0,i.useState)({firstRowToRender:0,nrRows:l+n}),d=(0,i.useRef)(0),u=(0,i.useRef)(null),p=(0,i.useRef)(r),g=(0,i.useCallback)((()=>{const e=u.current?.querySelector(':scope > *:not([data-type="sentinel"])');p.current=e?e.getBoundingClientRect().height:p.current}),[]),y=(0,i.useCallback)((()=>{const e=a.current;if(!e)return;g();const t=Math.floor((e.scrollTop-d.current)/p.current),r=Math.max(t-n,0),i=Math.ceil(e.offsetHeight/p.current)+2*n;r===o.firstRowToRender&&i===o.nrRows||c({firstRowToRender:r,nrRows:i})}),[n,o,a,g]),m=(0,i.useCallback)((({columnCount:r})=>{if(r<=0)return[null];s&&s(r,p.current);const i=Math.ceil(t/r),a=o.firstRowToRender*r,l=o.firstRowToRender+o.nrRows-1,c=Math.min(t-1,(l+1)*r-1),d=p.current*(n-2);return[(0,C.jsx)(Fn,{span:o.firstRowToRender,onInView:y,marginBottom:`-${d}px`},`topSentinel-${o.firstRowToRender}`),e(a,c,r),(0,C.jsx)(Fn,{span:i-l,onInView:y,marginTop:`-${d}px`},"bottomSentinel-"+(i-l))]}),[t,n,s,y,e,o]);return(0,i.useEffect)((()=>{const e=u.current,t=a.current;e&&t&&(d.current=e.getBoundingClientRect().top-t.getBoundingClientRect().top+t.scrollTop)}),[a]),(0,C.jsx)(Nn.E,{useUniformRowHeight:!0,ref:u,render:m,onLayoutChange:g})},Mn=(0,X.g)(Cr.c),Un=(0,i.memo)((function({item:e,primaryFilter:t,spec:r,index:i}){const a={shouldShowType:!(0,yr.c0)(e.uri)&&(Rr(e.type)!==t||Tr(e)),spec:r,index:i},n=(0,d.NC)(Ce.lDH);switch(e.type){case Cr.c.FOLDER:return(0,C.jsx)(Aa,{libraryItem:e,...a});case Cr.c.ALBUM:return(0,C.jsx)(Xi,{libraryItem:e,...a});case Cr.c.ARTIST:return(0,C.jsx)(Zi,{libraryItem:e,...a});case Cr.c.AUDIOBOOK:return(0,C.jsx)(Qi,{libraryItem:e,...a});case Cr.c.SHOW:return(0,C.jsx)(Rn,{libraryItem:e,...a});case Cr.c.PLAYLIST:return(0,C.jsx)(mn,{libraryItem:e,...a});case Cr.c.LIKED_SONGS:return(0,C.jsx)(Na,{libraryItem:e,...a});case Cr.c.YOUR_EPISODES:return(0,C.jsx)(Ln,{libraryItem:e,...a});case Cr.c.LOCAL_FILES:return(0,C.jsx)(za,{libraryItem:e,...a});case Cr.c.PRE_RELEASE_ALBUM:return n?(0,C.jsx)(Cn,{libraryItem:e,...a}):null;case Cr.c.PRE_RELEASE_BOOK:return(0,C.jsx)(Cn,{libraryItem:e,...a});default:(0,wr.d)(e)}})),Vn=({getItems:e,scrollNodeRef:t,primaryFilter:r,nrValidItems:a,spec:n})=>{const{gridScale:l}=En(),s=(0,kn.s1)(kn.yV.YLX,l),o=(0,i.useRef)({}),c=function(){const{gridScale:e}=En();return e<.8}(),d=(0,i.useCallback)((e=>(0,C.jsx)(Wa,{index:e,type:Mn(r)?r:void 0},e)),[r]),u=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>{const a=t+i;return e?(0,C.jsx)(Un,{item:e,spec:n,primaryFilter:r,index:a},`${e.uri}-${a}`):d(`${a}`)}))),[e,r,d,n]),p=(0,i.useCallback)(((e,t)=>{o.current={numColumns:e,rowHeight:t}}),[]);return(0,C.jsx)(On.x,{config:s,children:(0,C.jsx)(yi,{isCompact:c,children:(0,C.jsx)(gr.R,{firstInteractiveIsWrapper:!0,"aria-label":h.Ru.get("web-player.your-library-x.your-library"),"aria-rowcount":Math.round(a/(o.current.numColumns??1)),"aria-colcount":o.current.numColumns,children:(0,C.jsx)(Bn,{renderItems:u,nrItems:a,estimatedItemMaxHeight:250,scrollNodeRef:t,onGridResize:p})})})})};var _n=r(26863),zn=r(67065);const Hn="main-yourLibraryX-header",Wn="main-yourLibraryX-collapseButtonWrapper",Xn="main-yourLibraryX-headerContent",Kn="iYP0xuQiJCgi7gx1jUPJ",Yn="main-yourLibraryX-collapseButton",Gn="main-yourLibraryX-button",Zn="af749NDLYTDK_8LinKWD",qn="nGWhztVvLY1BInXjcWYa",Jn="oZT8iKL42zhLAm_zE5F5",$n="MdDY8fQ_j94mQZy7ZVXf",Qn="uNReR011bI8ML42Pgveg",el=e=>{switch(e){case Ve.fX.EXPANDED:return"expanded";case Ve.fX.COLLAPSED:return"collapsed";case Ve.fX.DEFAULT:return"default";default:throw(0,wr.k)(e)}},tl=({folderUri:e,dropTargetClassName:t,spec:r})=>{const{isCollapsed:a,ylxSidebarState:l,setYlxSidebarState:s,lastUncollapsedYlxSidebarState:o}=(0,Ve.$)(),c=(0,v.s)(),d=(0,i.useCallback)((()=>{const e=l===Ve.fX.COLLAPSED?o:Ve.fX.COLLAPSED;s(e),c.logInteraction(r.hitToggleState({stateBeforeToggle:el(l),stateAfterToggle:el(e)}))}),[l,o,s,c,r]),u=a?_n.M:zn.A;return(0,C.jsx)(Ue.Zp,{label:a?h.Ru.get("web-player.your-library-x.expand-your-library"):h.Ru.get("web-player.your-library-x.collapse-your-library"),placement:a?"right":void 0,children:(0,C.jsx)(Be.H,{"aria-label":a?h.Ru.get("web-player.your-library-x.expand-your-library"):h.Ru.get("web-player.your-library-x.collapse-your-library"),onClick:d,className:n()(Wn,Gn,t),condensed:!0,iconLeading:e||a?void 0:u,iconOnly:e||a?u:void 0,children:!e&&!a&&h.Ru.get("web-player.your-library-x.your-library")})})};var rl=r(12931),il=r(26639),al=r(66519);const nl=function({folderUri:e,spec:t}){const{createPlaylist:r}=(0,S.A)(),{createFolder:i}=(0,wa.Z)(),a=(0,v.s)(),n=(0,Ae.V)(),l=e?{after:{uri:e}}:{before:"start"};return(0,C.jsxs)(y.W,{children:[(0,C.jsx)(b.D,{onClick:()=>{r(void 0,l),a.logInteraction(t.createPlaylistOptionFactory().hitCreatePlaylist())},role:"menuitem",leadingIcon:(0,C.jsx)(x.u,{size:"small"}),children:h.Ru.get("web-player.your-library-x.create.create-a-new-playlist")}),!n&&(0,C.jsx)(b.D,{onClick:()=>{i(h.Ru.get("web-player.your-library-x.default_folder_name"),l),a.logInteraction(t.createFolderOptionFactory().hitCreateFolder())},role:"menuitem",leadingIcon:(0,C.jsx)(al.h,{size:"small"}),children:h.Ru.get("web-player.your-library-x.create.create-a-playlist-folder")})]})},ll=({className:e="",folderUri:t,tooltipPlacement:r,spec:a})=>{const l=h.Ru.get("web-player.your-library-x.create.button-label"),s=(0,v.s)(),{createPlaylistFromAlbum:o,createPlaylistFromTracks:c,createPlaylistFromPlaylist:d}=(0,S.A)(),{className:u,dropPosition:p,...g}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:[D.fl.TRACKS,D.fl.EPISODES,D.fl.ALBUMS,D.fl.PLAYLISTS_V2,D.fl.AUDIOBOOKS]},onDrop:(0,i.useCallback)((e=>{const{[D.fl.TRACKS]:r=[],[D.fl.LOCAL_TRACKS]:i=[],[D.fl.EPISODES]:a=[],[D.fl.AUDIOBOOKS]:n=[],[D.fl.ALBUMS]:l=[],[D.fl.PLAYLISTS_V2]:s=[]}=e,u=t?{after:{uri:t}}:{before:"start"},p=[...r,...i,...a];n.length>0?c(n,u):p.length?c(p,u):l.length>0?o(l[0],u):s.length>0&&d(s[0],u)}),[o,d,c,t])});return(0,C.jsx)(il.t,{renderInline:!0,menu:(0,C.jsx)(nl,{folderUri:t,spec:a.createMenuFactory()}),preventScrollingWhileOpen:!1,children:(t,i,o)=>(0,C.jsx)(Ue.Zp,{label:l,placement:r,children:(0,C.jsx)(Be.H,{ref:o,iconOnly:rl.u,className:n()(e,u,{[Kt]:p===j.Nz.ON}),"aria-label":l,onClick:e=>{i(e),s.logInteraction(a.hitUiReveal())},size:"small",...g})})})};var sl=r(75120),ol=r(31383);const cl=({dropTargetClassName:e,spec:t})=>{const{ylxSidebarState:r,setYlxSidebarState:i}=(0,Ve.$)(),a=r===Ve.fX.DEFAULT,l=(0,v.s)();return(0,C.jsx)(Ue.Zp,{label:a?h.Ru.get("web-player.your-library-x.show-more"):h.Ru.get("web-player.your-library-x.show-less"),children:(0,C.jsx)(Be.H,{className:n()(Gn,qn,e),iconOnly:a?sl.h:ol.G,"aria-label":a?h.Ru.get("web-player.your-library-x.enlarge-your-library"):h.Ru.get("web-player.your-library-x.reduce-your-library"),onClick:()=>{i(a?Ve.fX.EXPANDED:Ve.fX.DEFAULT),l.logInteraction(t.hitToggleState({stateBeforeToggle:a?"default":"expanded",stateAfterToggle:a?"expanded":"default"}))},size:"small"})})};var dl=r(8725);const ul=({handleNavigateBack:e,parentFolderUri:t,spec:r})=>{const{handleDropBeforeOrAfterRootlistItem:i}=si({dropTargetUri:t,spec:r}),{dropPosition:a,className:l,...s}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:tr},onDrop:async e=>{i(e,j.Nz.BEFORE)},onLongDragOver:e});return(0,C.jsx)(Ue.Zp,{label:h.Ru.get("web-player.your-library-x.navigate-back-folder"),children:(0,C.jsx)(Be.H,{className:n()(Gn,Zn,l,{[Kt]:a===j.Nz.ON}),"aria-label":h.Ru.get("web-player.your-library-x.navigate-back-folder"),onClick:e,iconOnly:dl.g,size:"small",...s})})};var pl=r(84888),gl=r(75830);const yl=({folderMenu:e,folderName:t,dropTargetClassName:r})=>(0,C.jsx)(gl.b,{menu:e,children:(0,C.jsx)("span",{children:(0,C.jsx)(Ue.Zp,{label:h.Ru.get("more.label.context",t),children:(0,C.jsx)(Be.H,{className:n()(Gn,qn,r),iconOnly:pl.x,"aria-haspopup":"menu","aria-label":h.Ru.get("more.label.context",t),size:"small"})})})}),ml=(0,i.forwardRef)((function({folderUri:e,folderName:t,folderMenu:r,onRename:a,spec:l,className:o},c){const{isActive:d}=(0,_r.l_)(e??"not-a-folder"),u=(0,s.wA)(),p=(0,v.s)(),y=(0,i.useCallback)((()=>{u((0,mr.O2)(t,a)),p.logInteraction(l.hitRenameFolder({uri:e}))}),[u,t,e,p,a,l]);return(0,C.jsx)(Ue.Zp,{label:t,showDelay:Ue.uF,children:(0,C.jsx)("div",{className:n()($n,o),children:(0,C.jsx)(g.h,{menu:r,children:(0,C.jsx)(Be.H,{"aria-label":t,onClick:y,size:"small",condensed:!0,className:n()(Gn),ref:c,children:(0,C.jsx)(Te.E,{variant:"bodyMediumBold",semanticColor:d?"textBrightAccent":void 0,className:Qn,children:t})})})})})}));var xl=r(6825),hl=r(87672),bl=r(7604);const fl="fJrnaZd0QWm65978IgD2",Sl="yCpl0fAaEYj7E8F_Oabw",Pl=()=>{const{syncing:e,percentage:t,currentItem:r,totalItems:a}=function(){const[e,t]=(0,i.useState)({syncing:!1,percentage:0,totalItems:0,currentItem:0}),r=hl.I.UPDATE_TOTAL_PROGRESS,a=(0,i.useCallback)((e=>t(e.data.progress)),[]);return(0,bl.b)(r,a),e}();return e?(0,C.jsxs)("div",{className:fl,children:[(0,C.jsxs)("div",{className:Sl,children:[(0,C.jsx)(Te.E,{variant:"bodySmallBold",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.download-progress-title")}),(0,C.jsx)(Te.E,{variant:"bodySmallBold",semanticColor:"textBase",children:h.Ru.get("web-player.your-library-x.download-progress-count-out-of-total",r,a)})]}),(0,C.jsx)(xl.z,{value:t})]}):null};const vl=({parentDropTargetClassName:e,isLibraryCompletelyEmpty:t,folderUri:r,folderName:a,spec:l,openedFolderIsPlayable:s})=>{const{isCollapsed:o,ylxSidebarState:d,canExpand:u}=(0,Ve.$)(),{renameFolder:p}=(0,wa.Z)(),{popFolder:g}=(0,i.useContext)(ur),y=(0,i.useCallback)(((e="")=>{r&&p({uri:r},e)}),[r,p]),m=(0,i.useCallback)((()=>{g()}),[g]),x=r?(0,C.jsx)(ya,{reference:{uri:r},name:a,onRename:y,onDeleteCallback:m,isPlayable:s}):null,{dropOriginIsYLX:h}=ii(),b=!o&&r&&void 0!==a,f=(0,i.useRef)(null),S=(0,i.useRef)(null),P=(0,i.useRef)(null);!function(e,t,r,...a){const n=(0,c.U0)((()=>{if(e.current)if(t.current instanceof HTMLElement){e.current.style.display="block";const{scrollWidth:r,offsetWidth:i}=t.current,a=r>i;e.current.style.display=a?"none":"block"}else e.current.style.display="block"}),[a]);(0,i.useLayoutEffect)(n,[n]),(0,Ei.w)({refOrElement:r,observeOnly:"width",onResize:n})}(P,(0,i.useMemo)((()=>({get current(){return S.current?.firstElementChild instanceof HTMLElement?S.current?.firstElementChild:null}})),[]),f,a,b);const v=!o||t&&o;return(0,C.jsxs)("header",{className:n()(Hn,{[Jn]:o}),ref:f,children:[!o&&(0,C.jsx)(Pl,{}),(0,C.jsxs)("div",{className:n()(Xn,{[Kn]:o}),children:[(0,C.jsxs)("div",{className:n()(Yn,{[Kn]:o}),children:[(0,C.jsx)(tl,{folderUri:r,dropTargetClassName:e,spec:l.toggleCollapsedModeButtonFactory({identifier:""})}),r&&(0,C.jsx)(ul,{handleNavigateBack:m,parentFolderUri:r,spec:l.folderBackButtonFactory()}),b&&(0,C.jsx)(ml,{folderUri:r,folderName:a,folderMenu:x,onRename:y,spec:l.folderTitleFactory(),className:h?e:void 0,ref:S},r)]}),v&&(0,C.jsx)("span",{ref:P,children:(0,C.jsx)(ll,{className:n()(Gn,qn),folderUri:r,tooltipPlacement:o?"right":void 0,spec:l.createMenuButtonFactory()})}),r&&!o&&(0,C.jsx)(yl,{folderName:a,folderMenu:x,dropTargetClassName:e}),(d===Ve.fX.DEFAULT&&u||d===Ve.fX.EXPANDED)&&(0,C.jsx)(cl,{dropTargetClassName:e,spec:l.toggleExpandedModeButtonFactory({identifier:""})})]})]})};var Cl=r(86134),wl=r(97848),Il=r(6593);const Tl=({date:e})=>(0,C.jsx)(Te.E,{variant:"bodySmall",semanticColor:"textSubdued",className:jt,children:e&&h.Ru.formatRelativeDate(new Date(e),{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"})}),Rl=e=>{const t=e.handleNavigate,r=(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),i=e.expandFolderButton??(e.isPlaying&&(0,C.jsx)(jr,{})),a=(0,C.jsx)(Nr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:e.isPinned}),e.preReleaseIcon,e.downloadButton,e.lockedIcon]}),subtitle:(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Ar,{shouldShowType:e.shouldShowType,type:e.type,subtitle:e.subtitle,specialType:e.specialType})}),uri:e.uri}),n=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:n,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:bt,media:e.cover,title:r,subtitle:a,trailing:i,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:Sr.v4,onClick:e.onClick,hoverAnimationDuration:"0ms"})})})},Al=e=>{const t=e.handleNavigate,r=(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),i=(0,C.jsx)(Nr,{leading:(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(pi.g,{pinned:e.isPinned}),e.preReleaseIcon,e.downloadButton,e.lockedIcon]}),subtitle:(0,C.jsx)(Ar,{shouldShowType:e.shouldShowType,type:e.type,subtitle:e.subtitle,specialType:e.specialType}),uri:e.uri}),a=e.logRightClick;return(0,C.jsx)(Lr,{...e,title:r,subtitleSlot:i,parentRef:e.parentRef,children:(0,C.jsxs)("div",{children:[(0,C.jsx)(g.h,{menu:e.menu,onShow:a,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:n()(bt,St),media:e.cover,id:e.uri,padding:Sr.v4,onClick:e.onClick,variant:void 0,title:void 0,hoverAnimationDuration:"0ms"})})}),(0,C.jsxs)("span",{className:Bt,children:[r," ",i]})]})})},Dl=e=>{const t=(0,i.useRef)(null),r=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:r,children:(0,C.jsxs)("div",{className:Dt,ref:t,children:[(0,C.jsx)(Rl,{...e,parentRef:t}),(0,C.jsx)(Tl,{date:e.addedAt}),(0,C.jsx)(Tl,{date:e.lastPlayedAt})]})})},jl=e=>{const t=e.handleNavigate,r=(0,C.jsxs)("div",{className:Ot,children:[(0,C.jsx)(Zr,{uri:e.uri,title:e.name,titlePrefix:e.namePrefix,menu:e.menu,handleNavigate:t,playbackUri:e.playbackUri}),e.shouldShowType&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Il.v,{children:"•"}),(0,C.jsx)(Il.v,{lineClamp:1,children:Ir(e.type,e.specialType)})]}),(!e.shouldShowType&&e.type===Cr.c.ALBUM||(0,yr.c0)(e.uri))&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(Il.v,{children:"•"}),(0,C.jsx)(Nr,{leading:null,uri:e.uri,subtitle:e.subtitle})]})]}),i=(0,C.jsx)(pi.g,{pinned:e.isPinned}),a=e.expandFolderButton??(e.isPlaying?(0,C.jsx)(jr,{iconSize:"xsmall"}):(0,C.jsxs)(C.Fragment,{children:[e.downloadButton&&(0,C.jsx)("div",{className:vt,children:e.downloadButton}),e.preReleaseIcon&&(0,C.jsx)("div",{className:vt,children:e.preReleaseIcon}),e.lockedIcon&&(0,C.jsx)("div",{className:vt,children:e.lockedIcon})]})),l=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:l,children:(0,C.jsx)(vr.E,{uri:e.uri,trigger:vr.l.OnMouseDown,children:(0,C.jsx)(wl.v,{className:n()(bt,ft),title:r,leading:e.isPinned?i:void 0,trailing:a,id:e.uri,variant:e.isViewActive?"tinted":void 0,padding:`${Sr.vw} ${Sr.v4}`,onClick:e.onClick,size:"sm",hoverAnimationDuration:"0ms"})})})},Ll=e=>{const t=e.logRightClick;return(0,C.jsx)(g.h,{menu:e.menu,onShow:t,children:(0,C.jsxs)("div",{className:Dt,children:[(0,C.jsx)(jl,{...e}),(0,C.jsx)(Tl,{date:e.addedAt}),(0,C.jsx)(Tl,{date:e.lastPlayedAt})]})})},El=({height:e,isCompact:t,primaryFilter:r})=>(0,C.jsx)(Fi.c,{className:n()({[It]:!t,[Rt]:t,[Tt]:r===Cr.c.ARTIST}),style:{height:e}});let Ol=function(e){return e[e.DEFAULT=0]="DEFAULT",e[e.COMPACT=1]="COMPACT",e}({});const kl=()=>{const[e,t]=(0,Pe.x)("library-row-mode",Ol.DEFAULT),r=(0,Ve.vW)();return{libraryRowMode:e,setLibraryRowMode:t,rowHeight:e===Ol.DEFAULT||r===Ve.fX.COLLAPSED?64:32}};var Nl=r(58306);const Fl=(0,i.memo)((function({item:e,primaryFilter:t,RowVariantComponent:r,spec:i,nrValidItems:a,index:n,ylxIsCompact:l}){const s={shouldShowType:!(0,yr.c0)(e.uri)&&(Rr(e.type)!==t||Tr(e)&&!l),RowVariantComponent:r,spec:i,nrValidItems:a,index:n},o=(0,d.NC)(Ce.lDH);switch(e.type){case Cr.c.FOLDER:return(0,C.jsx)(Ra,{libraryItem:e,...s});case Cr.c.ALBUM:return(0,C.jsx)(Wi,{libraryItem:e,...s});case Cr.c.ARTIST:return(0,C.jsx)(Gi,{libraryItem:e,...s});case Cr.c.AUDIOBOOK:return(0,C.jsx)($i,{libraryItem:e,...s});case Cr.c.SHOW:return(0,C.jsx)(Tn,{libraryItem:e,...s});case Cr.c.PLAYLIST:return(0,C.jsx)(yn,{libraryItem:e,...s});case Cr.c.LIKED_SONGS:return(0,C.jsx)(ka,{libraryItem:e,...s});case Cr.c.YOUR_EPISODES:return(0,C.jsx)(jn,{libraryItem:e,...s});case Cr.c.LOCAL_FILES:return(0,C.jsx)(_a,{libraryItem:e,...s});case Cr.c.PRE_RELEASE_ALBUM:return o?(0,C.jsx)(vn,{libraryItem:e,...s}):null;case Cr.c.PRE_RELEASE_BOOK:return(0,C.jsx)(vn,{libraryItem:e,...s});default:(0,wr.d)(e)}})),Bl=({getItems:e,scrollNodeRef:t,primaryFilter:r,nrValidItems:a,spec:n})=>{const l=(0,Ve.vW)(),{rowHeight:s,libraryRowMode:o}=kl(),c=o===Ol.COMPACT,d=((e,t)=>{switch(e){case Ve.fX.COLLAPSED:return Al;case Ve.fX.DEFAULT:return t?jl:Rl;case Ve.fX.EXPANDED:return t?Ll:Dl;default:(0,wr.d)(e)}})(l,c),u=(0,i.useCallback)(((e,t)=>(0,C.jsx)(El,{height:e,isCompact:c,primaryFilter:r},t)),[c,r]),p=(0,i.useCallback)(((t,i)=>e(t,i).map(((e,i)=>{const l=t+i;return e?(0,C.jsx)(Fl,{item:e,spec:n,RowVariantComponent:d,primaryFilter:r,nrValidItems:a,index:l,ylxIsCompact:c},`${e.uri}-${l}`):u(`${s}px`,`${l}`)}))),[e,n,d,r,a,c,u,s]);return(0,C.jsx)(Cl.$,{circular:!1,allowsMultipleInteractiveChildrenInItem:!0,"aria-label":h.Ru.get("web-player.your-library-x.your-library"),children:(0,C.jsx)(Nl.L,{renderRows:p,nrRows:a,rowHeight:s,scrollNodeRef:t,renderPlaceholder:u})})};var Ml=r(21743),Ul=r(21768),Vl=r(35814),_l=r(69856),zl=r(83647),Hl=r(70196);const Wl=(e,t)=>{const{notifyShowInterest:r,notifyHideInterest:a,events:n}=(0,i.useContext)(ae);return{events:n,notifyShowInterest:(0,i.useCallback)((()=>{r(e,t)}),[e,r,t]),notifyHideInterest:(0,i.useCallback)((()=>{a(e,t)}),[e,a,t])}};var Xl=r(66238);function Kl({children:e,content:t,itemKey:r,priority:a,offset:n,placement:l,isInterestedInBeingShown:s,onVisibilityDenied:o,onVisibilityGranted:c}){const{isVisible:d}=function(e,t,r){const a=t.isInterestedInBeingShown,n=()=>{},l=(0,Xl.A)(t.onVisibilityGranted??n),s=(0,Xl.A)(t.onVisibilityDenied??n),[o,c]=(0,i.useState)(!1),{notifyShowInterest:d,notifyHideInterest:u,events:p}=Wl(e,r);return(0,i.useEffect)((()=>{const t=p.addListener(re.VISIBILITY_GRANTED,(t=>{t.data.key===e&&(l(),c(!0))})),r=p.addListener(re.VISIBILITY_DENIED,(t=>{t.data.key===e&&(s(),c(!1))}));return()=>{t(),r()}}),[p,e,l,s]),(0,i.useEffect)((()=>{a?d():u()}),[u,d,a]),(0,i.useEffect)((()=>u),[u]),{isVisible:o}}(r,{isInterestedInBeingShown:s,onVisibilityDenied:o,onVisibilityGranted:c},a);return(0,C.jsx)(Hl.E,{content:t,isVisible:d,offset:n,placement:l,children:e})}var Yl=r(41874),Gl=r(27607),Zl=r(84523),ql=r(71217);const Jl=(e,t,r)=>{const i=t.closest('li[role="presentation"]'),a=e.parentElement?.querySelectorAll('ul[role="menu"]');if(r===ql.O.UP){const r=a?.[a.length-1],n=e.previousElementSibling,l=i?.previousElementSibling?.previousElementSibling;if(t instanceof HTMLUListElement||!l){if(n&&n instanceof HTMLUListElement)return n;if(r&&r instanceof HTMLUListElement)return r}}else{const t=i?.nextElementSibling;if(!t){const t=e.nextElementSibling;return t&&t instanceof HTMLUListElement?t:a?.[0]}}},$l="UsP6uSRooAI9fdTmoQ7C",Ql="ktFXPl3NAYBjLv6hsC6Y",es="hjCFCSfuAdwhiVs2Rfs7",ts=[{itemsViewState:Zl.X.LIST,compactModeState:Ol.COMPACT},{itemsViewState:Zl.X.LIST,compactModeState:Ol.DEFAULT},{itemsViewState:Zl.X.GRID,compactModeState:Ol.DEFAULT}],rs=(e,t,r)=>Math.round((e+t)*r)/r,is=e=>e.itemsViewState===Zl.X.GRID?h.Ru.get("web-player.your-library-x.sort-and-view-picker.grid"):e.compactModeState===Ol.COMPACT?h.Ru.get("web-player.your-library-x.sort-and-view-picker.compact"):h.Ru.get("web-player.your-library-x.sort-and-view-picker.list"),as=({selectedSort:e,selectedView:t,onSortSelect:r,onViewSelect:a,sortOptions:n,spec:l,id:s})=>{const o=(0,v.s)(),c=(0,i.useCallback)((e=>e.itemsViewState===Zl.X.GRID?(0,C.jsx)(Ul.D,{size:"small"}):e.compactModeState===Ol.COMPACT?(0,C.jsx)(Vl.d,{size:"small"}):(0,C.jsx)(_l.N,{size:"small"})),[]),{gridScale:d,setGridScale:u}=En(),p=e=>{const t=rs(e,.5,100);u(t),o.logInteraction(l.gridDensitySliderFactory().dragSetSliderPosition({position:t}))},g=(0,i.useCallback)((e=>{u(e),o.logInteraction(l.gridDensitySliderFactory().hitSetSliderPosition({position:e}))}),[o,u,l]),m=e=>e?.parentElement?.querySelector("ul"),x=(0,i.useRef)(null);return(0,C.jsxs)("div",{id:s,className:$l,ref:x,children:[(0,C.jsxs)(y.W,{"aria-label":h.Ru.get("web-player.your-library-x.sort_by"),onFocusVerticalItem:Jl,getInitialFocusElement:m,children:[(0,C.jsx)(Yl.y,{children:h.Ru.get("web-player.your-library-x.sort_by")}),n.map((({key:t,value:i},a)=>(0,C.jsx)(b.D,{role:"menuitemradio","aria-checked":t===e.key,onClick:()=>r(t,a),divider:a===n.length-1?"after":void 0,autoClose:!1,children:i},t)))]}),(0,C.jsxs)(y.W,{"aria-label":h.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as"),onFocusVerticalItem:Jl,getInitialFocusElement:m,children:[(0,C.jsx)(Yl.y,{children:h.Ru.get("web-player.your-library-x.sort-and-view-picker.view-as")}),ts.map((e=>{const r=is(e),i=e.itemsViewState===t.itemsViewState&&e.compactModeState===t.compactModeState;return(0,C.jsx)(b.D,{role:"menuitemradio","aria-checked":i,onClick:()=>a(e),leadingIcon:c(e),autoClose:!1,children:r},r)})),Zl.X.GRID===t.itemsViewState&&(0,C.jsx)("li",{role:"presentation",children:(0,C.jsx)("div",{role:"menuitem",className:es,children:(0,C.jsx)(Gl.z2,{labelText:h.Ru.get("web-player.your-library-x.sort-and-view-picker.grid-density-label"),value:rs(d,-.5,100),max:1,step:.1,onDragStart:p,onDragMove:p,onDragEnd:p,onStepBackward:()=>g(rs(d,-.1,10)),onStepForward:()=>g(rs(d,.1,10)),forceActiveStyles:!0,"data-roving-interactive":"1"})})})]})]})},ns=({sortOrders:e,activeSortOrderId:t,setActiveSortOrderId:r,showReorderingOnboarding:a,headerSpec:n,scrollNodeRef:l})=>{const s=(0,i.useMemo)((()=>n.sortbyViewasMenuButtonFactory()),[n]),o=(0,v.s)(),c=(0,Wt.f)(),d=e.find((e=>e.id===t))??e?.at(0),u={key:d?.id??"",value:d?.name??""},p=(0,i.useCallback)(((e,t)=>{r(e);const i=c.getSortOrderLabel(e);o.logInteraction(s.sortOptionFactory({identifier:i,position:t}).hitSort())}),[c,o,r,s]),{itemsView:g,setItemsView:y}=(0,Zl.t)(),{libraryRowMode:m,setLibraryRowMode:x}=kl(),{inView:b,ref:f}=(0,Ml.Wx)({initialInView:!0,root:l.current,threshold:.75}),{show:S,onHide:P}=((e,t=!0)=>{const[r,a]=(0,Pe.x)("onboarding-dismissed:ylx-playlist-ordering",!1),[n,l]=(0,Pe.x)("onboarding-dismissed-amount:ylx-playlist-ordering",0),[s,o]=(0,i.useState)(!1),{dropOriginIsYLX:c}=ii(),{draggingIsInProgress:d}=(0,i.useContext)(k.O_);(0,i.useEffect)((()=>{d&&c&&o(!0)}),[d,c]);const u=(0,i.useCallback)((()=>{a(!0),o(!1),l(n+1)}),[n,l,a]);return{show:e&&n<3&&(!r||s)&&(t||s),onHide:u}})(a,b),w=(0,i.useMemo)((()=>g===Zl.X.GRID?{itemsViewState:Zl.X.GRID,compactModeState:Ol.DEFAULT}:m===Ol.COMPACT?{itemsViewState:Zl.X.LIST,compactModeState:Ol.COMPACT}:{itemsViewState:Zl.X.LIST,compactModeState:Ol.DEFAULT}),[g,m]),I=(0,i.useCallback)((e=>{let t=s.viewAsOptionFactory({identifier:"grid",position:3}).hitUiElementToggle();e.itemsViewState===Zl.X.GRID?y(Zl.X.GRID):e.compactModeState===Ol.COMPACT?(t=s.viewAsOptionFactory({identifier:"compact",position:1}).hitUiElementToggle(),y(Zl.X.LIST),x(Ol.COMPACT)):(t=s.viewAsOptionFactory({identifier:"list",position:2}).hitUiElementToggle(),y(Zl.X.LIST),x(Ol.DEFAULT)),o.logInteraction(t)}),[o,y,x,s]),T=(0,i.useCallback)((()=>{o.logInteraction(s.hitUiReveal())}),[o,s]);return(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(Kl,{isInterestedInBeingShown:S,itemKey:$.YLX_CUSTOM_ORDERING,priority:Q.CONTEXTUAL,placement:"right",content:(0,C.jsx)(zl.z,{onClose:P,children:(0,C.jsx)(Te.E,{as:"p",dangerouslySetInnerHTML:{__html:h.Ru.get("web-player.your-library-x.custom-ordering-onboarding-text")}})}),children:(0,C.jsx)(gl.b,{menu:(0,C.jsx)(as,{selectedSort:u,selectedView:{itemsViewState:w.itemsViewState??Zl.X.LIST,compactModeState:w.compactModeState??Ol.DEFAULT},sortOptions:e.map((({id:e,name:t})=>({key:e,value:t}))),onSortSelect:p,onViewSelect:I,spec:s,id:"sort-and-view-picker"}),placement:"bottom-end",children:(0,C.jsx)(Be.H,{"aria-label":h.Ru.get("web-player.your-library-x.sort-and-view-picker.button-aria-label",u.value,is(w)),onClick:T,size:"small",iconTrailing:(R=w,R.itemsViewState===Zl.X.GRID?Ul.D:R.compactModeState===Ol.COMPACT?Vl.d:_l.N),ref:f,role:"combobox","aria-controls":"sort-and-view-picker",children:(0,C.jsx)(Te.E,{variant:"bodySmall",className:Ql,"data-sortbox-label":!0,children:u.value})})})})});var R};var ls=r(87621),ss=r(66910),os=r(25182);const cs=({clearOnEscapeInElementRef:e,primaryFilter:t,spec:r})=>{const a=(0,Wt.f)(),n=(0,v.s)(),l=function(e){switch(e){case Cr.c.PRE_RELEASE_ALBUM:case Cr.c.ALBUM:return h.Ru.get("web-player.your-library-x.text-filter.albums-placeholder");case Cr.c.ARTIST:return h.Ru.get("web-player.your-library-x.text-filter.artists-placeholder");case Cr.c.PLAYLIST:return h.Ru.get("web-player.your-library-x.text-filter.playlists-placeholder");case Cr.c.SHOW:return h.Ru.get("web-player.your-library-x.text-filter.shows-placeholder");case Cr.c.PRE_RELEASE_BOOK:case Cr.c.AUDIOBOOK:return h.Ru.get("web-player.your-library-x.text-filter.audiobooks-placeholder");case"downloaded":return h.Ru.get("web-player.your-library-x.text-filter.downloaded-placeholder");case void 0:return h.Ru.get("web-player.your-library-x.text-filter.generic-placeholder");default:return void(0,wr.k)(e)}}(t),s=(0,i.useCallback)((()=>(n.logInteraction(r.searchButtonFactory().hitUiReveal()),!0)),[n,r]),o=(0,i.useCallback)((()=>(n.logInteraction(r.textFilterFactory().keyStrokeClearFilter()),!0)),[n,r]);return(0,C.jsx)(ls.S,{placeholder:l,clearOnEscapeInElementRef:e,debounceFilterChangeTimeout:a?.getCapabilities().canTextFilterContentsInRealtime?0:void 0,expandDirection:"right",onActivate:s,onClear:o,useExpandCallback:e=>{(0,os.f)(ss.g.FOCUS_YLX_TEXT_FILTER,e)}})};var ds=r(39566);var us=r(22389);var ps=r(8398);function gs(){const[e,t]=(0,i.useState)(null);if((0,ba.l)(ha.UV.UPDATE_PIN_ERROR,(e=>{t(e.data)})),void 0===e?.reason)return null;switch(e.reason){case ha.uL.TOO_MANY_PINS:return(0,C.jsx)(ps.x,{animated:!0,headingMessage:h.Ru.get("web-player.your-library-x.pin-error.title"),message:h.Ru.get("web-player.your-library-x.pin-error.message",e.maximumPinnedItems),buttonLabel:h.Ru.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});case ha.uL.NO_PIN_IN_FOLDER:return(0,C.jsx)(ps.x,{animated:!0,headingMessage:h.Ru.get("web-player.your-library-x.pin-error.no-pin-in-folder.title"),message:h.Ru.get("web-player.your-library-x.pin-error.no-pin-in-folder.message"),buttonLabel:h.Ru.get("web-player.your-library-x.pin-error.ok"),isOpen:!0,onDismissDialog:()=>t(null)});default:return(0,wr.k)(e),null}}var ys=r(44456),ms=r(37178);var xs=r(71151),hs=r(56837),bs=r(58493),fs=r(54866);const Ss=(e,t,r,a,n)=>{const l=(0,fs.x)(),s=(0,i.useRef)(r),o=(0,i.useRef)(),c=(0,i.useRef)();o.current=a,c.current=n,(0,i.useEffect)((()=>{const r={ident:e,isPrefix:t,onMessage:e=>s.current(e),onSubscribe:async e=>await(o.current?.(e)),onCancel:async e=>await(c.current?.(e))},i=l.subscribe(r);return()=>{i.cancel()}}),[e,t,l])};var Ps=r(34223);const vs={[ha.Ir.ALBUMS]:Cr.c.ALBUM,[ha.Ir.ARTISTS]:Cr.c.ARTIST,[ha.Ir.BOOKS]:Cr.c.AUDIOBOOK,[ha.Ir.EPISODES]:Cr.c.EPISODE,[ha.Ir.SHOWS]:Cr.c.SHOW,[ha.Ir.TRACKS]:Cr.c.TRACK};function Cs(e,t,r){const a=(0,i.useCallback)((({data:{list:t}})=>{ws(e,vs[t])&&r()}),[e,r]);(0,ba.l)(ha.UV.UPDATE,a),(0,ba.l)(ha.UV.UPDATE_PIN,r);const n=(0,i.useCallback)((()=>{ws(e,Cr.c.PLAYLIST)&&r()}),[e,r]);(0,Pa.L)(n),function(e){Ss("hm://collection/ylpin/",!0,e)}(r),function(e){const t=(0,bs.A)(),r=t.getEvents();(0,i.useEffect)((()=>r.addListener(hs.T.UPDATE,e)),[t,r,e])}(r),function(e){const t=(0,xs.l)().getEvents();(0,i.useEffect)((()=>{const r=({data:{set:t}})=>{"prerelease"===t&&e()};return t.addListener(ce.ar.ADDED,r),t.addListener(ce.ar.REMOVED,r),()=>{t.removeListener(ce.ar.ADDED,r),t.removeListener(ce.ar.REMOVED,r)}}),[e,t])}(r),function(e,t){const r=(0,Ps.F)();(0,i.useEffect)((()=>{!r||e!==le.oR.RECENTLY_PLAYED_OR_ADDED.toString()&&"Recents"!==e||t()}),[t,r,e])}(t,r)}function ws(e,t){switch(e){case Cr.c.ALBUM:case Cr.c.ARTIST:case Cr.c.AUDIOBOOK:case Cr.c.SHOW:return e===t;case Cr.c.PLAYLIST:switch(t){case Cr.c.TRACK:case Cr.c.PLAYLIST:case Cr.c.EPISODE:return!0;default:return!1}default:return!0}}var Is=r(6102),Ts=r(53866),Rs=r(13295),As=r(35163);const Ds="Vf3ww2_My5QuwUnbpzhu";var js=r(60348);const Ls=()=>{const{typeaheadResult:{str:e}}=(0,i.useContext)(Wr);return e?(0,C.jsx)(js.qb,{className:Ds,children:e}):null};var Es=r(50671);const Os="main-yourLibraryX-libraryContainer",ks="main-yourLibraryX-libraryFilter",Ns="iwhVJuPipY1lrQIjaA1k",Fs="main-yourLibraryX-libraryItemContainer",Bs="main-yourLibraryX-libraryRootlist",Ms="sikBfynL1Y6I25nVpbAg",Us="KwShd3RdVrsX6dGLJNxT",Vs="qOtD4rsRpIMhQLCjJ4K3",_s="oEDH8yMQOKQNoX7LWjwt",zs="RHRitk6QC3rvuG24RAdj",Hs="main-yourLibraryX-filterArea",Ws={items:[],totalLength:0},Xs=()=>{const{filter:e}=(0,i.useContext)(J.g),[t,r]=(0,i.useState)(null),{refinersPickedByUserRef:a,selectedRefinerIds:s,resetRefinerIds:y,resetAndToggleRootRefiner:m,toggleRefinerId:x}=function(e){const{openedFolderUri:t=dr,change:r,resetFolder:a}=(0,i.useContext)(ur),n=(0,i.useRef)(t),[l,s]=(0,Pe.x)("ylx-active-filter-ids",{[t]:[]}),o=(0,i.useRef)(!0),d=(0,c.U0)(((r,i=!0)=>{const a=new Set(e);a.has(r)?a.delete(r):a.add(r),o.current=i,s({...l,[t]:Array.from(a)})}),[e,s,t]),u=(0,i.useCallback)((()=>s({...l,[t]:[]})),[t,l,s]),p=(0,i.useCallback)((e=>{t&&a(),s({...l,[dr]:e?[e]:[]})}),[t,a,l,s]);return(0,i.useLayoutEffect)((()=>{t!==n.current&&t!==dr&&"PUSH"===r&&s({...l,[t]:l[n.current]}),n.current=t}),[r,t,l,s]),{refinersPickedByUserRef:o,selectedRefinerIds:l[t],resetRefinerIds:u,resetAndToggleRootRefiner:p,toggleRefinerId:d}}(t?.selectedFilters?.map((e=>e.id))??[]),h=s?.[0],{selectedSortOrderId:b,setSelectedSortOrderId:f}=function(e){const t=(0,Wt.f)().getContentsPrimaryFilterId(Cr.c.PLAYLIST),{openedFolderUri:r=""}=(0,i.useContext)(ur),[a,n]=(0,Pe.x)("ylx-active-sort-order-by-filter-id",{}),l=`${r&&t?t:e}`;return{selectedSortOrderId:a[l],setSelectedSortOrderId:(0,i.useCallback)((e=>{n({...a,[l]:e})}),[l,a,n])}}(h),S=(0,i.useRef)(null),P=(0,i.useRef)(null),w=(0,i.useRef)(null),{expandedFolders:I}=function(){const e=(0,i.useContext)(xt);if(!e)throw new Error("useExpandedFolders must be used within a ExpandedFoldersProvider");return e}(),{openedFolderUri:R,resetFolder:E}=(0,i.useContext)(ur),F=(0,Is.p)(),B=(0,de.P)(),M=(0,Wt.f)(),U=(0,ai.g)(),V=we(),_=ni(),[z,H]=(0,i.useState)(!1),{isCollapsed:W,isExpanded:X,setYlxSidebarState:K}=(0,Ve.$)();(e=>{const t=(0,Wt.f)(),{isCollapsed:r,setYlxSidebarState:a,lastUncollapsedYlxSidebarState:n}=(0,Ve.$)(),l=(0,ms.W)(),s=(0,i.useCallback)((()=>{const e=r?n:Ve.fX.COLLAPSED;a(e)}),[r,n,a]),o=(0,i.useCallback)((()=>{e(null),r&&a(n)}),[r,n,e,a]),c=(0,i.useCallback)((i=>()=>{e(t.getContentsPrimaryFilterId(i)),r&&a(n)}),[r,n,t,e,a]),d=c(Cr.c.PLAYLIST),u=c(Cr.c.SHOW),p=c(Cr.c.ARTIST),g=c(Cr.c.ALBUM),y=c(Cr.c.AUDIOBOOK);(0,ys.N)(l?ss.g.TOGGLE_NPV_SIDEBAR:ss.g.TOGGLE_YLX_SIDEBAR,s),(0,ys.N)(ss.g.GO_TO_LIBRARY,o),(0,ys.N)(ss.g.GO_TO_PLAYLISTS,d),(0,ys.N)(ss.g.GO_TO_PODCASTS,u),(0,ys.N)(ss.g.GO_TO_ARTISTS,p),(0,ys.N)(ss.g.GO_TO_ALBUMS,g),(0,ys.N)(ss.g.GO_TO_AUDIOBOOKS,y)})(m);const{isGridView:Y}=(0,Zl.t)(),{libraryRowMode:G}=kl(),Z=G===Ol.COMPACT,{spec:$,UBIFragment:Q}=(0,ze.r)(u.j,{data:{identifier:"yourlibraryx"}});let ee;ee=W?"collapsed":Y?X?"expanded_grid":"default_grid":Z?X?"expanded_compact":"default_compact":X?"expanded_list":"default_list";const te=(0,i.useMemo)((()=>$.sidebarFactory({uri:R??dr,identifier:ee})),[$,R,ee]),re=(0,Es.t)(te),ie=(0,i.useMemo)((()=>te.headerFactory()),[te]),ae=(0,i.useMemo)((()=>ie.filtersFactory()),[ie]),ne=(0,i.useMemo)((()=>ie.searchBarFactory()),[ie]),le=(0,i.useMemo)((()=>te.listFactory()),[te]),se=(0,v.s)();!function(e=[],t=[],r){const a=(0,ds.n)(),n=(0,Wt.f)().getContentsPrimaryFilterId("downloaded"),l=(0,i.useRef)(e);l.current=e;const s=(0,i.useRef)(t);s.current=t;const o=(0,i.useRef)(r);o.current=r;const d=(0,i.useRef)(!1);(0,i.useEffect)((()=>{if(!n)return;const e=s.current.includes(n),t=l.current.includes(n),r=s.current.length>1,i=!a&&!r&&!e&&t,c=a&&e&&d.current;(i||c)&&(i&&(d.current=!0),o.current(n,!1))}),[n,a]);const u=(0,i.useRef)(t);(0,c.Ij)((()=>{n&&(t.includes(n)&&!u.current.includes(n)&&d.current||(d.current=!1),u.current=t)}),[n,t])}(t?.availableFilters?.map((e=>e.id)),t?.selectedFilters?.map((e=>e.id)),x);const{handleDropOnFolder:oe,unpinConfirmationDialog:ce}=ma(le,R),{dropOriginIsYLX:ue,entityIsInFolder:ge}=ii(),{setDraggingIsInProgress:he}=(0,i.useContext)(k.O_);(0,N.g)(S);const be=R?rr:tr,fe=ge&&!t?.reorderAllowed?[D.fl.PLAYLISTS_V2,D.fl.FOLDERS]:[],{dropPosition:Se,className:Ie,...Te}=(0,L.A)({allowedMimeTypesByDropPosition:{[j.Nz.ON]:ue?fe:be},onDrop:(0,i.useCallback)((async e=>{if(R)oe(e);else{const{[D.fl.TRACKS]:t=[],[D.fl.LOCAL_TRACKS]:r=[],[D.fl.ALBUMS]:i,[D.fl.ARTISTS]:a,[D.fl.EPISODES]:n,[D.fl.SHOWS]:l,[D.fl.PLAYLISTS_V2]:s=[],[D.fl.FOLDERS]:o,[D.fl.AUDIOBOOKS]:c}=e,d=[...t,...r];d.length&&(M?.add({uris:d}),se.logInteraction(le.dragCreatePlaylist())),i?.length&&(M?.add({uris:i}),se.logInteraction(le.dragLike({itemToBeLiked:i.at(0)??""}))),a?.length&&(M?.add({uris:a}),se.logInteraction(le.dragLike({itemToBeLiked:a.at(0)??""}))),n?.length&&(M?.add({uris:n}),se.logInteraction(le.dragLike({itemToBeLiked:n.at(0)??""}))),l?.length&&(M?.add({uris:l}),se.logInteraction(le.dragLike({itemToBeLiked:l.at(0)??""}))),c?.length&&(M?.add({uris:c}),se.logInteraction(le.dragLike({itemToBeLiked:c.at(0)??""}))),s.length&&(_(s,{before:"start"}),ue?se.logInteraction(le.dragSort()):se.logInteraction(le.dragLike({itemToBeLiked:s.at(0)??""}))),o?.length&&(U.moveFolder({uri:o[0]},{before:"start"}),se.logInteraction(le.dragSort()))}}),[R,oe,M,se,le,_,ue,U]),onLongDragOver:(0,i.useCallback)((()=>{W&&K(Ve.fX.DEFAULT)}),[W,K])}),Re=(0,d.NC)(Ce.lDH),Ae=(0,i.useMemo)((()=>({filters:s,sortOrder:b,textFilter:e,includeLocalFiles:B,includeYourEpisodes:!0,includeLikedSongs:!0,includePreReleases:Re,expandedFolders:W||Y?[]:I,filtersPickedByUser:a.current,folderUri:R})),[s,b,e,B,Re,W,Y,I,a,R]),De=(0,i.useCallback)((async(e,t)=>{try{const i=await M.getContents({offset:e,limit:t,...Ae}),{offset:a,limit:n,items:s,...o}=i;return H(!1),{fetchedId:Ae.folderUri,onCacheSuccess:()=>{r((e=>(0,l.j)(o,e)?e:o))},...i}}catch(e){return e instanceof T.c_?(y(),Ws):e instanceof T.IU?(f(void 0),Ws):e instanceof T.db?(E(),Ws):((0,As.UD)(e),H(!0),Ws)}}),[Ae,M,y,E,f]),je=!1===t?.hasUnfilteredItems,Le=t?.hasTextFilter&&0===t.totalLength&&""!==e,{setFilter:Ee}=(0,i.useContext)(J.g);(0,i.useEffect)((()=>{Le&&W&&Ee("")}),[Le,W,Ee]);const Oe=0===t?.totalLength&&t.selectedFilters.length>0&&!t.passedFolderUri&&!t.hasTextFilter;(0,c.Ij)((()=>{const e=t?.selectedFilters.at(-1);Oe&&e&&x(e.id,!1)}),[Oe,t?.selectedFilters]);const ke=M?.getCapabilities().canFetchAllItems,{fetchedId:Ne,getItems:Fe,nrValidItems:Be,invalidateCache:Me}=(0,Rs.E)({nrItems:50,fetch:De,limit:50,cacheAllOnInvalidation:ke,cacheAllLimit:5e4}),Ue=(0,o.YQ)(Me,200,{leading:!0,trailing:!0,maxWait:1e3});Cs(t?.primaryFilter,b,Ue);const _e=!R&&!Ne||R===Ne;((e,t="")=>{const r=(0,i.useRef)({});(0,i.useLayoutEffect)((()=>{if(!e.current)return()=>{};const i=e.current,a=r.current[t];i.scrollTop=a??0;const n=()=>{r.current[t]=i.scrollTop};return i?.addEventListener("scroll",n),()=>{i?.removeEventListener("scroll",n)}}),[e,t])})(S,Ne);const He=(0,i.useCallback)((()=>{Me(),H(!1)}),[Me]),We=(0,Ts.y)(S),Xe=!!t?.openedFolderName,Ye=(0,d.NC)(Ce._p8,{loadingValue:!1})&&ke,Ge=function(e,t,r){const{isGridView:a}=(0,Zl.t)(),{rowHeight:n}=kl();return(0,i.useCallback)((async i=>{let l=n,s=1;if(a){const t=e.current?.querySelector('li[role="row"]');l=t?.getBoundingClientRect().height??0,t?.parentElement&&(s=getComputedStyle(t.parentElement).getPropertyValue("grid-template-columns").split(" ").length)}if(!l)return null;const o=r(0,5e4,{cachedOnly:!0}),c=o.find((e=>e?.name&&(0,us.u)(i,e.name))),d=c?o.indexOf(c):-1;return-1!==d&&t.current&&function(e,t,r,i){if(!e)return;const{scrollTop:a,offsetHeight:n}=e,l=t&&e?t.getBoundingClientRect().top+a-e.getBoundingClientRect().top:0;if(l+ra+n){const t=r-n/2+l+i/2;e.scrollTop=t}}(t.current,e.current,Math.floor(d/s)*l,l),c?.uri??null}),[e,t,n,r,a])}(w,S,Fe),qe=z?(0,C.jsx)(mt,{onClick:He}):null;let Je;(0,i.useEffect)((()=>{z&&W&&K(Ve.fX.DEFAULT)}),[z,W,K]),je&&!W&&(Je=Xe?(0,C.jsx)(Ze,{className:Ie}):(0,C.jsx)(lt,{className:Ie}));const $e=Le?(0,C.jsx)(ut,{query:e,className:Ie}):null,Qe=!W&&!Je&&(0,C.jsxs)("div",{className:n()(ks,Ie,Ns),children:[(0,C.jsx)(cs,{clearOnEscapeInElementRef:P,primaryFilter:t?.primaryFilter,spec:ne},R),(0,C.jsx)(ns,{sortOrders:t?.availableSortOrders??[],activeSortOrderId:t?.selectedSortOrder?.id,setActiveSortOrderId:f,showReorderingOnboarding:t?.primaryFilter===Cr.c.PLAYLIST&&!t?.reorderAllowed,headerSpec:ie,scrollNodeRef:S})]}),et=z&&!t,tt=X&&!Y&&!qe&&!Je,rt=(t?.selectedFilters??[]).length>0,it=V&&!rt&&!R&&!je,{cheetaraOnboardingIsActive:at,setCheetaraOnboardingIsActive:nt,cheetaraOnboardingDismissed:st,setCheetaraOnboardingDismissed:ot,handleCloseCheetaraOnboarding:ct}=ve(),dt=!W&&V&&!z&&!st&&!t?.passedFolderUri&&!!t?.availableFilters?.length&&!t?.selectedFilters?.length;return(0,C.jsx)(Xr,{containerRef:P,findMatchingTypeaheadUid:Ge,isEnabled:Ye,children:(0,C.jsxs)(Q,{spec:$,children:[(0,C.jsx)(q,{}),at&&(0,C.jsx)(me,{onClose:ct}),(0,C.jsx)(g.h,{menu:(0,C.jsx)(A,{folderUri:R}),children:(0,C.jsxs)("div",{className:n()(Os,{[Xt]:Se===j.Nz.ON,[Ms]:W,[_s]:at}),style:{"--placeholder-image":`url(${(0,p.b)("images/ylx-row-placeholder.png")})`,"--placeholder-artist-image":`url(${(0,p.b)("images/ylx-artist-row-placeholder.png")})`,"--placeholder-compact-image":`url(${(0,p.b)("images/ylx-compact-row-placeholder.png")})`},ref:e=>{P.current=e,re(e)},...Te,tabIndex:-1,onDragStart:()=>he(!0),onDragEnd:()=>he(!1),children:[ce,(0,C.jsxs)("div",{className:n()({[zs]:We}),children:[(0,C.jsx)(vl,{parentDropTargetClassName:Ie,isLibraryCompletelyEmpty:je,folderUri:t?.passedFolderUri,folderName:t?.openedFolderName,spec:ie.titleRowFactory(),openedFolderIsPlayable:t?.openedFolderIsPlayable}),!F&&(0,C.jsx)(Q,{spec:ie,children:(0,C.jsx)(Ke,{})}),!W&&!et&&(0,C.jsxs)("div",{className:Hs,children:[it&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(xe,{})}),(0,C.jsx)(or,{selectedFilters:t?.selectedFilters,availableFilters:t?.availableFilters,toggleFilterId:x,resetFilterIds:y,className:n()({[Vs]:!_e}),scrollNodeRef:S,spec:ae,inFolderView:!!t?.passedFolderUri},Ne),X&&Qe]}),dt&&X&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(ye,{ylxIsExpanded:X,setCheetaraOnboardingIsActive:nt,onHide:()=>ot(!0)})}),tt&&(0,C.jsx)(Mt,{isScrolled:We})]}),(0,C.jsx)(O.a,{className:Fs,onInstanceCreated:e=>{S.current=e.elements().viewport},children:(0,C.jsxs)("div",{className:n()(Bs,{[Vs]:!z&&!_e,[Ms]:W,[Us]:tt}),children:[dt&&!X&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(ye,{ylxIsExpanded:X,setCheetaraOnboardingIsActive:nt,onHide:()=>ot(!0)})}),!X&&Qe,!W&&t?.tagPlaylist&&(0,C.jsx)(i.Suspense,{fallback:null,children:(0,C.jsx)(pe,{playlist:t.tagPlaylist})}),qe||Je||$e,(0,C.jsx)("div",{ref:w,children:Y?(0,C.jsx)(Vn,{getItems:Fe,scrollNodeRef:S,primaryFilter:t?.primaryFilter,nrValidItems:Be,spec:le}):(0,C.jsx)(Bl,{getItems:Fe,scrollNodeRef:S,primaryFilter:t?.primaryFilter,nrValidItems:Be,spec:le})})]})}),gs(),(0,C.jsx)(Ls,{})]})})]})})},Ks=()=>{const{isAnonymous:e}=(0,s.d4)((e=>e.session)),t=(0,s.d4)((e=>e.ui.editRefinersModal)),r=we();return(0,C.jsx)(E.s,{onError:e=>{(0,As.Jy)(e,"YourLibraryX")},children:(0,C.jsx)(J.s,{uri:T.gv,children:(0,C.jsx)(ht,{children:(0,C.jsxs)(pr,{children:[(0,C.jsx)(ue,{children:(0,C.jsx)(Se,{children:(0,C.jsxs)(ne,{children:[(0,C.jsx)(Xs,{}),r&&t.isOpen&&(0,C.jsx)(ge,{})]})})}),(0,C.jsx)(Ne,{isAnonymous:e})]})})})})}},11808:(e,t,r)=>{r.d(t,{P:()=>a});var i=r(39587);function a(){return(0,i.y)()[0]}},39587:(e,t,r)=>{r.d(t,{y:()=>n});var i=r(30758),a=r(58493);function n(){const e=(0,a.A)(),[t,r]=(0,i.useState)(e.getIsEnabled());(0,i.useEffect)((()=>{const t=e.subscribeIsEnabled(r);return()=>t()}),[e]);return[t,(0,i.useCallback)((t=>e.setIsEnabled(t)),[e])]}},54866:(e,t,r)=>{r.d(t,{x:()=>n});var i=r(53249),a=r(30157);function n(){return(0,a.N)(i.b)}}}]); +//# sourceMappingURL=5505.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/5663.js b/dot-config/spicetify/Extracted/Themed/xpui/5663.js new file mode 100755 index 00000000..78225aa4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/5663.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1408,5663],{58757:(e,t,n)=>{n.d(t,{p:()=>g});var r=n(30758),i=n(97500),l=n.n(i),o=n(95530),s=n(86677),a=n(17866),d=n(19830);const u="(min-width: 0px)",c="(min-width: 0px) and (max-width: 767px)",m="(min-width: 768px)",S="(min-width: 768px) and (max-width: 1023px)",A="(min-width: 1024px)",f="(min-width: 1024px) and (max-width: 1279px)",w="(min-width: 1280px)",E="(min-width: 1280px) and (max-width: 1919px)",h="(min-width: 1920px)",C="FvfvGU3jvHRskUU9v9_8",x="Q9AlbZn2EGzy3MTWXa8X",D="mxmxS0y8LiwSs5nueKPT",T="GXxVAveNFStY3pBI_NO4",p="eHcXC2s97InYP7rMNT0H";var O=n(86070);const g=(0,r.memo)((function(e){const{children:t,message:n,title:r,linkTitle:i,linkTo:g,onClick:v,renderInline:_=!1}=e,{isXSOnly:y,isSMOnly:N}={isXS:(0,d.U)(u),isXSOnly:(0,d.U)(c),isSM:(0,d.U)(m),isSMOnly:(0,d.U)(S),isMD:(0,d.U)(A),isMDOnly:(0,d.U)(f),isLG:(0,d.U)(w),isLGOnly:(0,d.U)(E),isXL:(0,d.U)(h)},L=y||N;return(0,O.jsxs)("section",{className:l()(C,{[x]:_}),children:[t,(0,O.jsx)(o.E,{as:"h1",variant:L?"titleSmall":"titleMedium",className:T,children:r}),(0,O.jsx)(o.E,{variant:L?"bodySmall":"bodyMedium",className:p,children:n}),i&&(g||v)&&(0,O.jsx)(s.$,{colorSet:"invertedLight",className:D,href:g,onClick:v,component:a.v,children:i})]})}))},2814:(e,t,n)=>{n.d(t,{H:()=>o,g:()=>s});var r=n(30758),i=n(86070);const l=(0,r.createContext)(null);function o({children:e,playlist:t,metadataOptions:n,contentsOptions:o}){return(0,i.jsx)(l.Provider,{value:(0,r.useMemo)((()=>({playlist:t,metadataOptions:n,contentsOptions:o})),[o,n,t]),children:e})}function s(){const e=(0,r.useContext)(l);if(null===e)throw new Error("Trying to use 'ListPlatformDataContext' without 'ListPlatformDataProvider'!");return e}},41522:(e,t,n)=>{n.d(t,{d:()=>o,j:()=>s});var r=n(30758),i=n(86070);const l=(0,r.createContext)({setFilterPredicate:()=>{throw new Error("setFilterPredicate must be used within a ListPlatformFilterPredicatesProvider")},filterPredicate:null}),o=(0,r.memo)((function({children:e}){const[t,n]=(0,r.useState)(null),o=(0,r.useMemo)((()=>({filterPredicate:t,setFilterPredicate:n})),[t]);return(0,i.jsx)(l.Provider,{value:o,children:e})}));function s(){return(0,r.useContext)(l)}},91797:(e,t,n)=>{n.d(t,{K:()=>c,l:()=>u});var r=n(30758),i=n(2814),l=n(13295),o=n(29074),s=n(89273),a=n(86070);const d=(0,r.createContext)(null);function u({children:e}){const{playlist:t,contentsOptions:n}=(0,i.g)(),u=(0,o.m)(),c=(0,r.useCallback)((async(e,r)=>await u.getContents(t.metadata.uri,{...n,offset:e,limit:r})),[u,n,t.metadata.uri]),m=(0,l.E)({nrItems:t.contents.totalLength,fetch:c,limit:50,initialItems:t.contents.items});return(0,s.H)(t.metadata.uri,m.invalidateCache),(0,a.jsx)(d.Provider,{value:m,children:e})}function c(){const e=(0,r.useContext)(d);if(null===e)throw new Error("Trying to use 'ListPlatformItemsContext' without 'ListPlatformItemsProvider'!");return e}},79098:(e,t,n)=>{n.d(t,{Z:()=>s,k:()=>a});var r=n(30758),i=n(26413),l=n(86070);const o=(0,r.createContext)({setSortState:()=>{throw new Error("setSortState must be used within a ListPlatformSortProvider")},sortState:null}),s=r.memo((function({uri:e,children:t}){return(0,l.jsx)(i.E,{uri:e,defaultState:null,sortContext:o,children:t})}));function a(){return(0,r.useContext)(o)}},61295:(e,t,n)=>{n.d(t,{W:()=>w});var r=n(30758),i=n(31417),l=n(81067),o=n(92202),s=n(39795),a=n(2814),d=n(41522),u=n(91797),c=n(79098);var m=n(57764),S=n(29074),A=n(86070);const f=({children:e,uri:t})=>{const n=(0,S.m)().getCapabilities(),{filter:u}=(0,r.useContext)(s.g),{sortState:f}=(0,c.k)(),{filterPredicate:w}=(0,d.j)(),{metadataOptions:E,contentsOptions:h}=((e,t,n)=>(0,r.useMemo)((()=>({metadataOptions:{decorateFormatListData:!0,withSync:!0,hydrateCollaboratorsWithMembers:!0},contentsOptions:{offset:0,limit:25,filter:e,sort:t??void 0,filterPredicates:n?[n]:[]}})),[e,t,n]))(u,f,w),{data:C,isLoading:x,isError:D}=(0,m.W)(t,E,h);return!C||x?(0,A.jsx)(o.LoadingPage,{hasError:D,errorMessage:i.Ru.get("error.not_found.title.playlist"),loadOffline:n.canModifyOffline}):C.metadata.permissions&&!C.metadata.permissions.canView?(0,A.jsx)(l.Z,{uri:t}):(0,A.jsx)(a.H,{playlist:C,metadataOptions:E,contentsOptions:h,children:e})},w=({children:e,uri:t})=>(0,A.jsx)(s.s,{uri:t,children:(0,A.jsx)(d.d,{children:(0,A.jsx)(c.Z,{uri:t,children:(0,A.jsx)(f,{uri:t,children:(0,A.jsx)(u.l,{children:e})})})})})},47972:(e,t,n)=>{n.d(t,{d:()=>f});var r=n(30758),i=n(68448),l=n(87621),o=n(31417),s=n(67239),a=n(79098),d=n(59964),u=n(29074),c=n(86070);const m=r.memo((function({sortOptions:e,defaultSortField:t,enableViewModeMenu:n}){const i=(0,u.m)(),{canSort:l}=i.getCapabilities(),{sortState:m,setSortState:S}=(0,a.k)(),A=(0,r.useCallback)((e=>{const t=d.nw[e];S((0,d.Wc)(t,m))}),[S,m]),f=e.map((e=>d.kA[e]));"custom-order"===t&&f.unshift({key:"custom-order",value:o.Ru.get("sort.custom-order")});const w=d.kA[m?.field??t];return l?(0,c.jsx)(s.g,{options:f,onSelect:A,selected:w,sortOrder:(0,d.Qi)(m?.order??null),heading:o.Ru.get("drop_down.sort_by"),enableViewModeMenu:n}):null}));var S=n(21549);const A="cRlDGz_DCN_UOCt4Khg1",f=r.memo((function({filterPlaceholder:e,sortOptions:t,defaultSortField:n,enableViewModeMenu:o=!1}){const s=(0,u.m)(),{canSort:a,canFilter:d}=s.getCapabilities(),{spec:f,logger:w}=(0,S.r)(i.E,{}),E=(0,r.useCallback)((()=>{w.logInteraction(f.filterFieldFactory().keyStrokeFilter())}),[w,f]),h=(0,r.useCallback)((()=>{w.logInteraction(f.filterFieldFactory().hitClearFilter())}),[w,f]);return(0,c.jsxs)("div",{className:A,children:[d?(0,c.jsx)(r.Suspense,{fallback:null,children:(0,c.jsx)(l.S,{placeholder:e,onFilter:E,onClear:h})}):null,a?(0,c.jsx)(m,{sortOptions:t,defaultSortField:n,enableViewModeMenu:o}):null]})}))},72187:(e,t,n)=>{n.d(t,{g:()=>r.g});var r=n(2814)},59964:(e,t,n)=>{n.d(t,{Ap:()=>w,Qi:()=>m,Wc:()=>d,g6:()=>f,hK:()=>E,kA:()=>u,nw:()=>c});var r=n(31417),i=n(4266),l=n(34939);const o=[l.nw.ADDED_AT,l.nw.PUBLISH_DATE],s=e=>o.includes(e)?l.xB.DESC:l.xB.ASC,a={[l.xB.ASC]:l.xB.DESC,[l.xB.DESC]:l.xB.ASC},d=(e,t)=>null===e?null:t?.field!==e?{field:e,order:s(e)}:{field:e,order:a[t.order]},u={[l.nw.TITLE]:{key:"title",get value(){return r.Ru.get("sort.title")}},[l.nw.ARTIST]:{key:"artist",get value(){return r.Ru.get("sort.artist")}},[l.nw.ALBUM]:{key:"album",get value(){return r.Ru.get("sort.album")}},[l.nw.ADDED_BY]:{key:"added-by",get value(){return r.Ru.get("sort.added-by")}},[l.nw.ADDED_AT]:{key:"added-at",get value(){return r.Ru.get("collection.sort.recently-added")}},[l.nw.DURATION]:{key:"duration",get value(){return r.Ru.get("sort.duration")}},[l.nw.SHOW_NAME]:{key:"show-name",get value(){return r.Ru.get("collection.sort.creator")}},[l.nw.PUBLISH_DATE]:{key:"publish-date",get value(){return r.Ru.get("tracklist.header.release-date")}},"custom-order":{key:"custom-order",get value(){return r.Ru.get("sort.custom-order")}}},c={title:l.nw.TITLE,artist:l.nw.ARTIST,album:l.nw.ALBUM,"added-by":l.nw.ADDED_BY,"added-at":l.nw.ADDED_AT,duration:l.nw.DURATION,"show-name":l.nw.SHOW_NAME,"publish-date":l.nw.PUBLISH_DATE,"custom-order":null};function m(e){return null===e?i.H.NONE:e===l.xB.ASC?i.H.ASC:i.H.DESC}const S={[i.$.TITLE_AND_ARTIST]:[l.nw.TITLE,l.nw.ARTIST],[i.$.TITLE]:[l.nw.TITLE],[i.$.ADDED_BY]:[l.nw.ADDED_BY],[i.$.ADDED_AT]:[l.nw.ADDED_AT],[i.$.DURATION]:[l.nw.DURATION],[i.$.ARTIST]:[l.nw.ARTIST],[i.$.ALBUM]:[l.nw.ALBUM],[i.$.ALBUM_OR_PODCAST]:[l.nw.ALBUM,l.nw.SHOW_NAME],[i.$.ALBUM_OR_SHOW]:[l.nw.ALBUM,l.nw.SHOW_NAME],[i.$.ACTIONS]:[],[i.$.RELEASE_DATE]:[l.nw.PUBLISH_DATE],[i.$.INDEX]:[],[i.$.PLAYS]:[],[i.$.ADD]:[],[i.$.EVENT_DATE]:[],[i.$.EVENT_INFO]:[],[i.$.CONCERT]:[],[i.$.CONCERT_VENUE]:[],[i.$.TITLE_AND_AUTHOR]:[l.nw.TITLE],[i.$.AUTHOR]:[],[i.$.BPM]:[],[i.$.KEY]:[],[i.$.VIBE]:[]},A={[i.H.NONE]:null,[i.H.DESC]:l.xB.DESC,[i.H.ASC]:l.xB.ASC,[i.H.SECONDARY_DESC]:l.xB.DESC,[i.H.SECONDARY_ASC]:l.xB.ASC},f=e=>e.filter((e=>S[e].length>0)),w=(e,t)=>{const n=e.find((e=>t?.field&&S[e].includes(t.field)));if(!n||!t?.field)return{column:null,order:i.H.ASC};return S[n].indexOf(t.field)>0?{column:n,order:t.order===l.xB.ASC?i.H.SECONDARY_ASC:i.H.SECONDARY_DESC}:{column:n,order:t.order===l.xB.ASC?i.H.ASC:i.H.DESC}},E=(e,t,n)=>{const r=S[e].length>1?5:3;let l=null,o=null;if(e===t.column){let s=(t.order+1)%r;s!==i.H.NONE||n||(s+=1);const a=[i.H.SECONDARY_ASC,i.H.SECONDARY_DESC].includes(s)?1:0;l=S[e][a],o=A[s]}else l=S[e][0],o=A[i.H.ASC];return null===o?null:{field:l,order:o}}},84291:(e,t,n)=>{n.d(t,{f:()=>s,z:()=>o});var r=n(30758),i=n(85505),l=n(47095);function o(e,t=i.l0o){const n=(0,l.as)();return(0,r.useEffect)((()=>(e&&n((0,l.Mo)(e)),()=>{n((0,l.Hf)())})),[e,n]),e||t}const s=({color:e,fallbackColor:t})=>(o(e,t),null)}}]); +//# sourceMappingURL=5663.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/5727.css b/dot-config/spicetify/Extracted/Themed/xpui/5727.css new file mode 100755 index 00000000..8ff7cd32 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/5727.css @@ -0,0 +1 @@ +:root{--color:var(--spice-text)}.AkshwPjlDiQc0wgxuNaq{bottom:0;display:-webkit-box;display:-ms-flexbox;display:flex;left:0;overflow:hidden;position:absolute;right:0;top:0}.g_Jf36PKqEYC3jfWrOVP{cursor:crosshair;-ms-flex-negative:0;-webkit-animation:BidZU2f4ds8S7Zpcuvab 4s ease-in-out infinite;animation:BidZU2f4ds8S7Zpcuvab 4s ease-in-out infinite;background:var(--color);border:none;border-radius:80%;-webkit-box-shadow:inset -10px -10px 0 rgba(var(--spice-rgb-shadow),.07);box-shadow:inset -10px -10px 0 rgba(var(--spice-rgb-shadow),.07);display:inline-block;flex-shrink:0;height:160px;margin:0 .5em;outline:none;position:relative;text-align:center;top:115%;-webkit-transform-origin:bottom center;transform-origin:bottom center;-webkit-transition:top 0s ease-in-out,left 0s ease-in-out;transition:top 0s ease-in-out,left 0s ease-in-out;width:140px;z-index:100}.ubnsl0tOPoI_PmWk0HoF{top:-75%}.pDpuumKZj_mttxBIwev4{visibility:hidden}.g_Jf36PKqEYC3jfWrOVP:before{bottom:-20px;color:var(--color);content:"▲";display:block;font-size:20px;position:absolute;width:100%}.g_Jf36PKqEYC3jfWrOVP:after{background:rgba(var(--spice-rgb-selected-row),.2);content:"";height:250px;left:69px;position:absolute;top:172px;width:3px}@-webkit-keyframes BidZU2f4ds8S7Zpcuvab{0%,to{-webkit-transform:translateY(0) rotate(-4deg);transform:translateY(0) rotate(-4deg)}50%{-webkit-transform:translateY(-2em) rotate(4deg);transform:translateY(-2em) rotate(4deg)}}@keyframes BidZU2f4ds8S7Zpcuvab{0%,to{-webkit-transform:translateY(0) rotate(-4deg);transform:translateY(0) rotate(-4deg)}50%{-webkit-transform:translateY(-2em) rotate(4deg);transform:translateY(-2em) rotate(4deg)}} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/5727.js b/dot-config/spicetify/Extracted/Themed/xpui/5727.js new file mode 100755 index 00000000..0d3bd1d6 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/5727.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[5727],{15727:(e,a,n)=>{n.r(a),n.d(a,{default:()=>b});var t=n(30758),o=n(97500),r=n.n(o),l=n(95530),s=n(14343),u=n(31417),c=n(53133),i=n(38501);const d="AkshwPjlDiQc0wgxuNaq",f="g_Jf36PKqEYC3jfWrOVP",p="ubnsl0tOPoI_PmWk0HoF",m="pDpuumKZj_mttxBIwev4";var h=n(86070);const b=({colorLight:e,colorDark:a,name:n,years:o})=>{const b=(0,s.NC)(i.yOO,{loadingValue:!1}),{enqueueSnackbar:y}=(0,c.d)();(0,t.useEffect)((()=>{if(!b)return;const e=0===o?u.Ru.get("web-player.album.release",{name:n}):u.Ru.get("web-player.album.anniversary",o,{name:n,years:`${o}`});y(e)}),[b,n,o,y]);const[k,w]=(0,t.useReducer)(g,{balloons:Array.from({length:25}).map((()=>({animationDuration:Math.floor(50*Math.random())/10+2+"s",transitionDuration:Math.floor(50*Math.random())/10+12+"s",transform:`scale(${Math.floor(.4*Math.random())+.8})`,left:Math.floor(25*Math.random())-25,popped:!1})))}),[x,M]=(0,t.useState)(!1);return(0,t.useEffect)((()=>{const e=setTimeout((()=>{M(!0)}),1e3);return()=>{clearTimeout(e)}}),[M]),b?(0,h.jsx)("div",{className:d,children:k.balloons.map(((n,t)=>{const s=a&&t%2==0?a:e,u=s===a?"textBase":"textSubdued",{popped:c,...i}=n;return(0,h.jsx)("div",{children:(0,h.jsx)("button",{onClick:()=>w(t),className:r()(f,{[p]:x,[m]:c}),style:{"--color":s,...i},children:o>0&&t%3==0&&(0,h.jsx)(l.E,{variant:"headlineLarge",semanticColor:u,children:o})},t)},t)}))}):null};function g(e,a){return{balloons:e.balloons.map(((e,n)=>({...e,popped:a===n||e.popped})))}}}}]); +//# sourceMappingURL=5727.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/581.js b/dot-config/spicetify/Extracted/Themed/xpui/581.js new file mode 100755 index 00000000..bccbf8da --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/581.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[581],{89645:(e,s,i)=>{i.d(s,{j:()=>o});var r=i(75134),a=i(43743),t=i(38996),n=i(86070);const o=({name:e,uri:s,images:i,isHero:o,testId:l,description:d,index:c,requestId:u,color:m,variant:x})=>(0,n.jsx)(r.Z,{variant:x,index:c,featureIdentifier:"artist_concerts",headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,n.jsx)(a.M,{isHero:o,images:i,color:m}),renderSubHeaderContent:()=>(0,n.jsx)(t.c,{isHero:o,children:(0,n.jsx)("span",{children:d||""})}),testId:l,requestId:u})},68769:(e,s,i)=>{i.d(s,{I:()=>S});var r=i(30758),a=i(95530),t=i(77612),n=i(51813),o=i(48210),l=i(46111),d=i(82974),c=i(26391),u=i(43182),m=i(31417),x=i(21549),g=i(63096);const I="qFPnB4YPwJKBtmDadHJw",p="L1GB_UgpHH55rJC7bJSu",h="lwTOVx_hzbLLqRQNjpWq",j="fBzAZ8QqBJZ7jOCE9rR0",y="Cy4PWlzIF5qb7_LdHssZ";var C=i(86070);const b=({contentV2:e})=>(0,C.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:y,children:[(0,C.jsx)(t.D,{size:"small"}),e]}),f=({contentV2:e})=>(0,C.jsxs)(a.E,{as:"p",semanticColor:"textBrightAccent",className:y,children:[(0,C.jsx)(n.M,{size:"small"}),e]}),H=({contentV2:e})=>(0,C.jsx)(a.E,{as:"p",className:y,children:e}),v=e=>{switch(e.typeV2){case"SPOTIFY_EXCLUSIVE":return(0,C.jsx)(b,{...e});case"TOP_FANS_EXCLUSIVE":case"TOP_FANS_DISCOUNT":case"LIMITED_EDITION":return(0,C.jsx)(f,{...e});default:return(0,C.jsx)(H,{...e})}},P=({price:e,salePrice:s})=>s?(0,C.jsxs)("div",{children:[(0,C.jsxs)(a.E,{variant:"bodySmall",semanticColor:"textBrightAccent",children:[s," "]}),(0,C.jsx)(a.E,{variant:"bodySmall",style:{textDecoration:"line-through"},children:e})]}):(0,C.jsx)(a.E,{variant:"bodySmall",children:e}),S=({name:e,uri:s,href:i,images:a,index:t,price:n,testId:y,salePrice:b,label:f,artists:H})=>{const S=(0,r.useMemo)((()=>H.items.map((e=>"profile"in e.data?e.data.profile.name:"")).join(m.Ru.getSeparator())),[H.items]),{spec:T,logger:E}=(0,x.r)(u.y,{data:{position:t,uri:s,reason:f?.typeV2||""}}),k=(0,g.g)(a,{desiredSize:300}),N=(0,r.useCallback)((()=>{E.logInteraction(T.cardLinkFactory({position:0}).hitNavigateToExternalUri({destination:i})),window.open(i,"_blank")}),[i,E,T]);return(0,C.jsx)(o.Z,{id:s,"data-testid":y,title:(0,C.jsx)(l.Z,{className:j,children:e}),pretitle:f&&(0,C.jsx)(v,{typeV2:f.typeV2,contentV2:f.contentV2}),media:(0,C.jsx)("div",{className:I,children:k?(0,C.jsx)(d.M,{size:"sm",src:k?.url,alt:e??""}):(0,C.jsx)("div",{className:p,children:(0,C.jsx)("div",{className:h,children:(0,C.jsx)(c.E,{size:"xxlarge","aria-hidden":!0,"data-testid":"card-image-fallback"})})})}),onClick:N,size:"md",subtitle:(0,C.jsx)(P,{price:n,salePrice:b}),body:S},s)}},66872:(e,s,i)=>{i.d(s,{Q:()=>ee});var r=i(14343),a=i(90139),t=i(10831),n=i(89519),o=i(22726),l=i(89645),d=i(86573),c=i(31417),u=i(75134),m=i(43743),x=i(38996),g=i(89994),I=i(81288),p=i(86070);const h=({name:e,uri:s,images:i,isHero:r,onClick:a,testId:t,description:n,index:o,requestId:l,color:d,variant:h,logCardImpressions:j=!1})=>r?(0,p.jsx)(g.A,{featureIdentifier:"genre",index:o,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{children:n||c.Ru.get("card.tag.genre")})}),testId:t,requestId:l,logCardImpressions:j}):(0,p.jsx)(u.Z,{variant:h,index:o,featureIdentifier:"genre",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i,color:d}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{children:n||""})}),testId:t,requestId:l,logCardImpressions:j});var j=i(68769),y=i(80809),C=i(40855),b=i(30343),f=i(84779);const H=({name:e="",uri:s="",images:i=[],isHero:r,onClick:a,testId:t,index:n,variant:o})=>r?(0,p.jsx)(g.A,{featureIdentifier:"unknown",index:n,onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{isHero:!0,children:(0,p.jsx)(I.t,{})}),testId:t}):(0,p.jsx)(u.Z,{variant:o,index:n,featureIdentifier:"unknown",onClick:a,headerText:e,uri:s,isPlayable:!1,renderCardImage:()=>(0,p.jsx)(m.M,{isHero:r,images:i}),renderSubHeaderContent:()=>(0,p.jsx)(x.c,{children:(0,p.jsx)("span",{})}),testId:t});var v=i(77773),P=i(59724),S=i(59029);const T=({entity:e,index:s,testId:i,isHero:r=!1,variant:n})=>{const c=((0,o.o_h)(e.uri)||{}).type;if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:merch:")){const r=e.description?e.description.split("•")[0]:"";return(0,p.jsx)(j.I,{testId:i,index:s,name:e.name,uri:e.uri,href:e.href,images:e.images,price:r,artists:e.artists||{items:[]},label:null,salePrice:null})}if(("string"==typeof e.uri||e.uri instanceof String)&&e.uri.startsWith("spotify:artist:")&&e.uri.endsWith(":concerts"))return(0,p.jsx)(l.j,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});switch(c){case o.NQG.ALBUM:case o.NQG.COLLECTION_ALBUM:{const t=e;return(0,p.jsx)(a.a,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:t.name,uri:t.uri,images:t.images,artists:t.artists})}case o.NQG.ARTIST:{const a=e;return(0,p.jsx)(t.a,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images})}case o.NQG.EPISODE:{const a=e;return(0,p.jsx)(d.U,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,showImages:a.show?.images||[],durationMilliseconds:a.duration_ms,releaseDate:a.release_date,resume_point:a.resume_point,description:a.description,isExplicit:a.explicit,is19PlusOnly:!!a.tags?.includes("MOGEF-19+")})}case o.NQG.PLAYLIST:case o.NQG.PLAYLIST_V2:{const a=e,t=a.owner?.display_name||e.owner?.displayName||"";return(0,p.jsx)(y.B,{testId:i,isHero:r,index:s,variant:n,name:a.name,uri:a.uri,images:a.images,description:a.description,authorName:t})}case o.NQG.PROFILE:return(0,p.jsx)(C.a,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images});case o.NQG.SHOW:{const a=e;return(0,p.jsx)(b.o,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.images,publisher:a.publisher,mediaType:{audio:S.Q.AUDIO,video:S.Q.VIDEO,mixed:S.Q.MIXED}[a.media_type]??S.Q.AUDIO})}case o.NQG.APPLICATION:return(0,p.jsx)(h,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images,description:e.description});case o.NQG.TRACK:{const a=e;return(0,p.jsx)(f.w,{testId:i,isHero:r,index:s,sharingInfo:e.sharingInfo,variant:n,name:a.name,uri:a.uri,images:a.album?.images||[],artists:a.artists,album:a.album,isExplicit:a.explicit,is19PlusOnly:a.tags?.includes("MOGEF-19+")})}case o.NQG.COLLECTION:return e.uri.endsWith("your-episodes")?(0,p.jsx)(P.e,{variant:n,index:s}):(0,p.jsx)(v.o,{variant:n,index:s});default:return console.warn("Rendering a generic Card for unknown type:",c),(0,p.jsx)(H,{testId:i,isHero:r,index:s,variant:n,name:e.name,uri:e.uri,images:e.images})}};var E=i(97500),k=i.n(E),N=i(95530),q=i(49169),L=i(62787),O=i(65462),w=i(30758),A=i(10994),R=i(59521),_=i(21489),M=i(42162),U=i(44672),D=i(78774);const Q=w.memo((function({uri:e,sharingInfo:s}){const{spec:i}=(0,D.o)(e);return(0,p.jsx)(U.pZ,{value:"album",children:(0,p.jsxs)(A.W,{children:[(0,p.jsx)(M.h,{divider:"before",children:(0,p.jsx)(R.m,{uri:e,spec:i,sharingInfo:s,displayText:c.Ru.get("context-menu.copy-album-link")})}),(0,p.jsx)(_.q,{spec:i,divider:"before",uri:e})]})})}));var V=i(79570),z=i(79225),B=i(43560);const G=({artists:e,logger:s,spec:i})=>(0,p.jsx)("span",{children:e.map(((e,r)=>[r>0&&c.Ru.getSeparator(),(0,p.jsx)(L.m,{artist:e,index:r,logger:s,spec:i},e.uri)]))}),F=({artists:e,release:s,releaseTimezone:i})=>(0,p.jsx)(N.E,{variant:"bodySmall",semanticColor:"textSubdued",className:k()({[B.A.dividerAfter]:e.length>0}),children:(0,p.jsx)("span",{children:c.Ru.get("web-player.prerelease.releases_on",{date:c.Ru.formatDate((0,z.ad)(s.isoString),(0,z.s7)({month:"long",day:"numeric",year:"numeric",timeZone:i},s.precision))})})}),Z=({name:e,uri:s,images:i,artists:r=[],sharingInfo:a,isHero:t=!1,onClick:n,testId:o,index:l,requestId:d,color:h,release:j,releaseTimezone:y,variant:C,logCardImpressions:b=!1})=>{let f;const{playUri:H,playOptions:v}=(0,V.J)(s),P=()=>r.map((e=>e.name)).join(c.Ru.getSeparator());return f=t?(0,p.jsx)(g.A,{isPlayable:!1,index:l,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,P()),ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,P()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:!0,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(q.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(p.Fragment,{children:[(0,p.jsx)(I.t,{children:c.Ru.get("card.tag.album")}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),getSignifierContent:()=>(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:y}),testId:o,requestId:d,logCardImpressions:b}):(0,p.jsx)(u.Z,{variant:C,isPlayable:!1,onClick:n,headerText:e,featureIdentifier:"album",uri:s,playUri:H,playOptions:v,ariaPauseLabel:c.Ru.get("tracklist.a11y.pause",e,P()),index:l,ariaPlayLabel:c.Ru.get("tracklist.a11y.play",e,P()),renderCardImage:()=>(0,p.jsx)(m.M,{isHero:t,images:i,color:h,FallbackComponent:e=>(0,p.jsx)(q.I,{size:"xxlarge",...e})}),renderSubHeaderContent:(e,s)=>(0,p.jsxs)(x.c,{children:[(0,p.jsx)(F,{artists:r,release:j,releaseTimezone:y}),(0,p.jsx)(G,{logger:e,spec:s,artists:r})]}),testId:o,requestId:d,logCardImpressions:b}),(0,p.jsx)(O.h,{menu:(0,p.jsx)(Q,{uri:s,artistUri:r?.[0]?.uri,sharingInfo:a}),children:f})};var W=i(55926),J=i(38501),X=i(61714),K=i(16157),Y=i(7307),$=i(72051);const ee=({entity:e,index:s,testId:i,onClick:o,isHero:l=!1})=>{const c=(0,W.c)(),u=(0,r.NC)(J.LX5),m=(0,r.NC)(J.QTs);switch(e.type){case Y.c.ALBUM:return(0,p.jsx)(a.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,year:e.year,sharingInfo:null,requestId:e.requestId,color:e.color,isPlayable:e.isPlayable,isRestricted:e.playabilityReason===K.$c.CatalogueRestricted,logCardImpressions:m,albumType:e.albumType},e.uri);case Y.c.ARTIST:return(0,p.jsx)(t.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.AUDIOBOOK:return(0,p.jsx)(n.M,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,authorName:e.authorName,requestId:e.requestId,color:e.color,signifierText:e.signifierText,isPreRelease:e.isPreRelease,publishDate:e.publishDate,logCardImpressions:m},e.uri);case Y.c.EPISODE:return(0,p.jsx)(d.U,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,showImages:e.show?.images||[],durationMilliseconds:e.duration.milliseconds,releaseDate:e.release.isoString,resume_point:null,description:e.description,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,color:e.color,episodeShow:e.show,logCardImpressions:m,hasAssociatedVideo:e.mediaType?.includes($.C.Video)},e.uri);case Y.c.GENRE:return(0,p.jsx)(h,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.PLAYLIST:return(0,p.jsx)(y.B,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,description:"",authorName:e.owner.displayName,authorUri:e.owner.uri,requestId:e.requestId,color:e.color,isPlayable:!(0,X.p)(e.formatListData?.attributes),logCardImpressions:m,leaveTitleVisible:!0},e.uri);case Y.c.USER:return(0,p.jsx)(C.a,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.SHOW:return(0,p.jsx)(b.o,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,publisher:e.publisher,sharingInfo:null,requestId:e.requestId,color:e.color,logCardImpressions:m},e.uri);case Y.c.TRACK:return(0,p.jsx)(f.w,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.album?.images||[],artists:e.artists,album:c?null:e.album,isExplicit:e.isExplicit,is19PlusOnly:e.is19PlusOnly,sharingInfo:null,requestId:e.requestId,isLyricsMatch:e.isLyricsMatch,color:e.color,hasAssociatedVideo:e.hasAssociatedVideo&&u,logCardImpressions:m},e.uri);case Y.c.PRE_RELEASE_ALBUM:return(0,p.jsx)(Z,{testId:i,onClick:o,isHero:l,index:s,name:e.name,uri:e.uri,images:e.images,artists:e.artists,sharingInfo:null,requestId:e.requestId,color:e.color,release:e.release,releaseTimezone:e.releaseTimezone,logCardImpressions:m},e.uri);default:return console.warn('Rendering SearchEntityCard using the old method as the entity doesn\'t contain the new "type" EntityType enum.'),(0,p.jsx)(T,{testId:i,onClick:o,isHero:l,index:s,entity:e})}}},581:(e,s,i)=>{i.d(s,{X:()=>c});var r=i(7315),a=i(31417),t=i(66872);const n="pjP_jaM7PJzP3XsS4i3K",o="ap8U6ZVS8BqMxUdinBis",l="sHDdcNIw9AQLbLrpdcqO";var d=i(86070);const c=({entity:e,index:s,requestId:i,clearSearchHistory:c})=>(0,d.jsxs)("div",{className:n,children:[(0,d.jsx)(t.Q,{entity:{...e,requestId:i},index:s}),(0,d.jsx)("div",{className:o,children:(0,d.jsx)("button",{className:l,onClick:()=>c(e.uri),"aria-label":a.Ru.get("remove"),children:(0,d.jsx)(r.M,{size:"small"})})})]},e.uri)}}]); +//# sourceMappingURL=581.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/6704.js b/dot-config/spicetify/Extracted/Themed/xpui/6704.js new file mode 100755 index 00000000..73dfe493 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/6704.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[6704],{14036:(e,n,s)=>{s.d(n,{l:()=>u});var t=s(97500),l=s.n(t);const a="x-toggle-wrapper",i="x-toggle-indicator",o="JCFCfOY_6UEZZSOO2xrl",c="x-toggle-indicatorWrapper",r="x-toggle-input";var d=s(86070);const u=({value:e,disabled:n,onSelected:s,id:t,className:u,condensed:m=!1,inputRef:h})=>(0,d.jsxs)("label",{className:l()(a,u),children:[(0,d.jsx)("input",{id:t,className:r,type:"checkbox",disabled:n,checked:e,onChange:e=>{const n=e.target.checked;s(n)},ref:h}),(0,d.jsx)("span",{className:l()(c,{[o]:m}),children:(0,d.jsx)("span",{className:l()(i,{[o]:m})})})]})},6023:(e,n,s)=>{s.d(n,{p:()=>v});var t=s(30758),l=s(97500),a=s.n(l),i=s(95530),o=s(6772),c=s(65503),r=s(86677),d=s(31417),u=s(44971);const m="jAjrv_00X1qyxaEHmJCb",h="YVnLJCNcdaEeIGBQYqJS",C="pxocyhWhrvAeBiSlfjbd",p="aOt09fJWpST6CG8xfHuo";var x=s(86070);const v=t.memo((function({onClose:e,onConfirm:n,isOpen:s,itemCount:l}){const v=(0,t.useCallback)((s=>{n(),e(s)}),[n,e]),g=d.Ru.get("queue.confirm-title",l);return(0,x.jsx)(u.A,{animated:!0,shouldCloseOnEsc:!0,shouldCloseOnOverlayClick:!0,onRequestClose:e,contentLabel:g,isOpen:s,children:(0,x.jsxs)("div",{className:m,children:[(0,x.jsx)(i.E,{as:"h2",variant:"bodyMediumBold",className:h,children:g}),(0,x.jsx)(i.E,{as:"p",variant:"bodySmall",className:C,paddingBottom:o.lT,children:d.Ru.get("queue.confirm-message")}),(0,x.jsxs)("div",{className:a()("encore-light-theme",p),children:[(0,x.jsx)(c.H,{onClick:e,children:d.Ru.get("queue.cancel-button")}),(0,x.jsx)(r.$,{onClick:v,children:d.Ru.get("queue.confirm-button")})]})]})})}))},38547:(e,n,s)=>{s.d(n,{K:()=>d});var t=s(87030),l=s(95530),a=s(86677),i=s(31417),o=s(21082),c=s(45387),r=s(86070);const d=()=>(0,r.jsxs)("div",{className:c.A.emptyContainer,children:[(0,r.jsx)(t.j,{size:"xxlarge","aria-hidden":"true"}),(0,r.jsxs)("div",{className:c.A.titleContainer,children:[(0,r.jsx)(l.E,{as:"h1",variant:"titleMedium",semanticColor:"textBase",children:i.Ru.get("queue.empty-title")}),(0,r.jsx)("p",{children:i.Ru.get("queue.empty-description")})]}),(0,r.jsx)(o.N,{to:"/search",children:(0,r.jsx)(a.$,{colorSet:"invertedLight",children:i.Ru.get("queue.fine-something")})})]})},64343:(e,n,s)=>{s.d(n,{O:()=>r});var t=s(30758),l=s(32078),a=s(48713),i=s(608),o=s(21549),c=s(86070);const r=()=>{const{spec:e,logger:n,UBIFragment:s}=(0,o.r)(l.J,{}),{uri:r}=(0,i.f)(),d=(0,t.useCallback)(((s,t)=>{const l=e.inviteButtonFactory().hitShare({entityToBeShared:s,shareId:t});n.logInteraction(l)}),[n,e]),u=(0,t.useCallback)((()=>{const s=e.endButtonFactory().hitUiReveal();n.logInteraction(s)}),[n,e]),m=(0,t.useCallback)((()=>{const s=e.leaveButtonFactory().hitUiReveal();n.logInteraction(s)}),[n,e]),h=(0,t.useCallback)((()=>{const s=e.facepileButtonFactory().hitUiNavigate({destination:a.S.PARTICIPANTS_PAGE});n.logInteraction(s)}),[n,e]),C=(0,t.useCallback)((n=>(0,c.jsx)(s,{spec:e,...n})),[s,e]);return{logInviteClick:d,logEndClick:u,logLeaveClick:m,logFacePileClick:h,logStartJam:(0,t.useCallback)((()=>{const s=e.createJamButtonFactory().hitUiNavigate({destination:r??""});n.logInteraction(s)}),[n,e,r]),UBIFragmentWithSpec:C}}},30302:(e,n,s)=>{s.d(n,{Z:()=>$});var t=s(78464),l=s(30758),a=s(62411),i=s(95530),o=s(14343),c=s(31417),r=s(14036),d=s(97500),u=s.n(d),m=s(33242),h=s(16753),C=s(65503),p=s(7315),x=s(86677),v=s(50111);const g="_GA0LJ6qjoKBsWLq34XF",b="s_iKX8Su0w1W5b9yObSm",j="aQ5ntWUtU9bcqS9fS9aC",k="SxLR9RMcR2XyJCZuxYqv",y="vtk1i3JMLWObMppMQ0gH",S="x8qh9EgeC3AdLO0C54Og",N="Dm9gGjGoA7yNxClwSV24",f="MPtthrsnd9PdsCTssJqk";var E=s(86070);const w=({onClose:e,onCopyLink:n,inviteUrlQR:s})=>(0,E.jsxs)(h.a,{className:g,padding:"0",children:[(0,E.jsxs)("div",{className:b,children:[(0,E.jsxs)("div",{className:k,children:[(0,E.jsx)(i.E,{variant:"bodySmallBold",children:c.Ru.get("web-player.social-connect.invitation.qr-code.title")}),(0,E.jsx)(i.E,{variant:"bodySmall",semanticColor:"textSubdued",children:c.Ru.get("web-player.social-connect.invitation.qr-code.description")})]}),(0,E.jsx)(C.H,{semanticColor:"textSubdued",iconOnly:p.M,size:"small",onClick:e,condensedAll:!0,"aria-label":c.Ru.get("web-player.social-connect.invitation-modal.button-tertiary")})]}),(0,E.jsx)("div",{className:y}),(0,E.jsxs)("div",{className:u()(b,j,S),children:[(0,E.jsx)(x.$,{iconLeading:v._,colorSet:"invertedLight",size:"small",onClick:n,className:N,children:c.Ru.get("web-player.social-connect.invitation-modal.button-primary")}),(0,E.jsx)("div",{className:f,children:(0,E.jsx)(m.Ay,{value:s,size:100})})]})]});var I=s(74159),R=s(98293),A=s(47756);const O=({onClick:e})=>{const n=(0,a.wA)(),s=(0,l.useCallback)((()=>{e(),n((0,R.A9)(A.EL.END_SESSION))}),[n,e]);return(0,E.jsx)(I.n,{size:"small",onClick:s,children:c.Ru.get("web-player.social-connect.end-session.end-session-button")})},B=({onClick:e})=>(0,E.jsx)(I.n,{size:"small",onClick:async n=>{e(n)},children:c.Ru.get("web-player.social-connect.invite-button")}),L=({onClick:e})=>{const n=(0,a.wA)(),s=(0,l.useCallback)((()=>{e(),n((0,R.A9)(A.EL.LEAVE_SESSION))}),[n,e]);return(0,E.jsx)(I.n,{size:"small",onClick:s,children:c.Ru.get("web-player.social-connect.leave-session.leave-session-button")})};var q=s(85387),U=s(77828),P=s(68599),F=s(64333),T=s(48713),J=s(38501);const W="E6U6SyOECK4IENpzZw2R",Q="rirXgOjB8QWiJWDk5hSD",_=({currentSession:e,username:n,onClick:s})=>{const{sessionMembers:t}=e,a=(0,q.Zp)(),r=(0,o.NC)(J.eWj),{setQueueView:d}=(0,U.m)(),u=t.length+2>3?t.length-3:0,m=(0,F.t)(e,n,{userFirst:!0}),h=(0,l.useCallback)((()=>{s&&s(),r?d(U.p.PARTICIPANT_LIST):a(T.S.PARTICIPANTS_PAGE)}),[r,a,s,d]);return(0,E.jsxs)(I.n,{size:"small",className:W,onClick:h,"aria-label":c.Ru.get("web-player.social-connect.participant-list.title"),children:[(0,E.jsx)(P.g,{users:m,maxSlots:3,withoutOverflowBadge:!0}),u>0&&(0,E.jsx)(i.E,{variant:"bodySmallBold",semanticColor:"textBase",className:Q,children:`+${u}`})]})};var M=s(63779),V=s(64343),z=s(69693);const G="CyBimvsotsoxqwtiZeAn",H="_GKa4bilkTYbQLgcLogI",Z="uXHR7rkHhuz9kVPNWwYW",D="KFGFA5pPG0hgIB97pZfI",Y=({id:e,label:n,value:s,onChange:t})=>(0,E.jsxs)("label",{htmlFor:e,className:D,children:[(0,E.jsx)(i.E,{variant:"bodySmall",semanticColor:"textSubdued",children:n}),(0,E.jsx)(r.l,{id:e,value:s,onSelected:t,condensed:!0})]}),K=({className:e,emptyStateComponent:n})=>{const{currentSession:s,setQueueOnlyMode:t,setParticipantVolumeControl:r}=(0,z.D)(),d=(0,a.d4)((({session:e})=>e.user?.id)),u=s?.joinSessionShortLink,m=s?.joinSessionShortLinkQR,{logFacePileClick:h,logInviteClick:C,logEndClick:p,logLeaveClick:x,UBIFragmentWithSpec:v}=(0,V.O)(),g=(0,M.Z)(),b=(0,o.NC)(J.eWj),[j,k]=(0,l.useState)(!0),y=(0,l.useCallback)((()=>{h()}),[h]),S=(0,l.useCallback)((async()=>{u&&await g(u),C(u?.spotifyUri??"",u?.shareId??"")}),[g,u,C]),N=(0,l.useCallback)((async()=>{b?k((e=>!e)):S()}),[S,b]),f=(0,l.useCallback)((()=>{p()}),[p]),I=(0,l.useCallback)((()=>{x()}),[x]);if(!s?.active)return n?(0,E.jsx)(E.Fragment,{children:n}):null;const R=s.sessionMembers.find((e=>e.id===s.sessionOwnerId));return(0,E.jsx)(v,{children:(0,E.jsxs)("div",{className:e,children:[(0,E.jsx)("div",{className:G,children:(0,E.jsx)(i.E,{as:"h1",variant:"titleSmall",semanticColor:"textBase",children:c.Ru.get("web-player.social-connect.session-info.title",{host:R?.displayName??""})})}),(0,E.jsxs)("div",{className:H,children:[(0,E.jsxs)("div",{className:Z,children:[(0,E.jsx)(_,{currentSession:s,username:d,onClick:y}),(0,E.jsx)(B,{onClick:N}),s.isSessionOwner?(0,E.jsx)(O,{onClick:f}):(0,E.jsx)(L,{onClick:I})]}),j&&(0,E.jsx)(w,{onClose:()=>k(!1),onCopyLink:S,inviteUrlQR:m?.shareableUrl??""}),s.isSessionOwner&&(0,E.jsxs)("div",{children:[(0,E.jsx)(Y,{id:"queueOnlyMode",label:c.Ru.get("web-player.social-connect.controls.queue-only-mode"),value:!s.queueOnlyMode,onChange:e=>t(!e)}),"UNAVAILABLE"!==s.participantVolumeControl&&(0,E.jsx)(Y,{id:"participantVolumeControl",label:c.Ru.get("web-player.social-connect.controls.participant-volume-control"),value:"ENABLED"===s.participantVolumeControl,onChange:e=>r(e)})]})]})]})})};var X=s(35163);const $=e=>(0,E.jsx)(t.s,{onError:e=>{(0,X.Jy)(e,"JamQueueHeader")},suspenseFallback:e.emptyStateComponent,children:(0,E.jsx)(K,{...e})})},25619:(e,n,s)=>{s.d(n,{$:()=>t});let t=function(e){return e[e.NowPlaying=0]="NowPlaying",e[e.NextInQueue=1]="NextInQueue",e[e.NextUp=2]="NextUp",e}({})},48075:(e,n,s)=>{s.d(n,{H:()=>i,K:()=>a});var t=s(8473),l=s(608);function a(e){return"autoplay"===e?.provider}function i(){const{uri:e,description:n}=(0,l.f)(),{current:s,nextUp:i,queued:o}=(0,t.w)(),c=i.filter((e=>a(e)?e:"autoplay"!==e.provider)),r=!!o?.length,d=!!c?.length;return{uri:e,description:n,current:s,nextUp:c,queued:o,isEmpty:!1===(s||r||d),hasQueuedTracks:r,hasNextTracks:d}}},77828:(e,n,s)=>{s.d(n,{m:()=>t.m,p:()=>t.p});var t=s(94329)},8473:(e,n,s)=>{s.d(n,{w:()=>o});var t=s(30758),l=s(87464),a=s(87182),i=s(90326);function o(){const e=(0,a.z)(),[n,s]=(0,t.useState)(e.getQueue());return(0,i.p)(l.gd.QUEUE_UPDATE,(e=>s(e.data))),n}},45387:(e,n,s)=>{s.d(n,{A:()=>t});const t={emptyContainer:"BP2Fv3OX_ZYbjdA4lovg",titleContainer:"Olk6uKV_CIIVtWRrdRJc"}}}]); +//# sourceMappingURL=6704.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/7037.css b/dot-config/spicetify/Extracted/Themed/xpui/7037.css new file mode 100755 index 00000000..7d952d2c --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/7037.css @@ -0,0 +1 @@ +.OnnbOInFe49hYMQmhwUC{width:100%}.UP1rH6cQZiAZCdkPnDOg,.XZaBo7y3JfnBbjVV9TZo{position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 3)}.UP1rH6cQZiAZCdkPnDOg{max-width:calc(100% - var(--encore-spacing-looser-2))}.SEeVinRsd8ZYEQY4h1bX{height:inherit;width:100%}.SEeVinRsd8ZYEQY4h1bX img{width:100%}.dSMBEH0cx3KxzZGHN3rL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;height:100%;justify-content:center;max-height:720px}@media(height <= 768px){.dSMBEH0cx3KxzZGHN3rL{max-height:300px}}@media(height >= 769px)and (height <= 992px){.dSMBEH0cx3KxzZGHN3rL{max-height:500px}}.AVuE0OAzSCu5B0G4rwpo{aspect-ratio:9/16}.dSMBEH0cx3KxzZGHN3rL video{height:100%}.pvAyLo3KN8QP7KxQtiub{margin:calc(var(--encore-spacing-base)*-1);position:relative}.r4EqB8Z5_aywMW_8I84P{background:-webkit-gradient(linear,left top,left bottom,from(rgba(var(--spice-rgb-shadow),.7)),color-stop(13.54%,transparent),color-stop(78.65%,transparent),to(var(--spice-main)));background:linear-gradient(180deg,rgba(var(--spice-rgb-shadow),.7),transparent 13.54%,transparent 78.65%,var(--spice-main));display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;inset-block-start:0;inset-inline-start:0;position:absolute;-webkit-transition:opacity .3s ease-in;transition:opacity .3s ease-in;width:100%}.LS_ou3FibFdGi1PGoG_w{inset-block-end:0;-webkit-margin-before:0;margin-block-start:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2)}.iDW7b6oChePRpgfDFY3U{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.JiMklw0itqYJ1aE76Vi8,.iDW7b6oChePRpgfDFY3U{display:-webkit-box;display:-ms-flexbox;display:flex}.JiMklw0itqYJ1aE76Vi8{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;grid-area:adInfo}.NYcvpWpgvQYZploOD6rI{-webkit-box-align:center;-ms-flex-align:center;align-items:center;display:grid;grid-template-areas:"adInfo adActions";grid-template-columns:minmax(calc(100% - 112px),calc(100% - 96px)) 1fr;grid-gap:var(--encore-spacing-base)}.OpXrpghZvv_w9ygosJFP{display:-webkit-box;display:-ms-flexbox;display:flex;gap:var(--encore-spacing-base);grid-area:adActions;justify-self:end}.tD84X2SD0IicMx3osK8a{inset-block-end:0;-webkit-margin-before:0;margin-block-start:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2)}.mJucukPuB6OTWgaD4MZk{display:block}.mJucukPuB6OTWgaD4MZk:active,.mJucukPuB6OTWgaD4MZk:focus,.mJucukPuB6OTWgaD4MZk:hover,.mJucukPuB6OTWgaD4MZk[data-context-menu-open=true]{text-decoration:none}.i3o8ABclZov7rz8zzKYP{border-radius:var(--encore-corner-radius-larger-2);padding:var(--encore-spacing-base);-webkit-transition:background-color .4s ease-in-out;transition:background-color .4s ease-in-out}.i3o8ABclZov7rz8zzKYP:before{background-color:rgba(var(--spice-rgb-selected-row),.1);border-radius:inherit;content:"";height:100%;inset-block-start:0;inset-inline-start:0;opacity:0;pointer-events:none;position:absolute;-webkit-transition:opacity .25s ease;transition:opacity .25s ease;width:100%}.i3o8ABclZov7rz8zzKYP:hover:before{opacity:1}.i3o8ABclZov7rz8zzKYP:active{opacity:.7;-webkit-transform:scale(.98);transform:scale(.98);-webkit-transition:opacity ease,-webkit-transform .25s ease;transition:opacity ease,-webkit-transform .25s ease;transition:transform .25s ease,opacity ease;transition:transform .25s ease,opacity ease,-webkit-transform .25s ease}._9mvd0bTv9vUHyKGzvBNV{text-wrap:wrap;-webkit-padding-before:var(--encore-spacing-tighter-2);padding-block-start:var(--encore-spacing-tighter-2)}.hQjIgVttFxVwEZ52g6Rg{background:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--spice-rgb-shadow),.5)),to(rgba(var(--spice-rgb-shadow),.5))),-webkit-gradient(linear,left top,left bottom,from(#9334f5),to(#e94e35));background:linear-gradient(0deg,rgba(var(--spice-rgb-shadow),.5),rgba(var(--spice-rgb-shadow),.5)),linear-gradient(180deg,#9334f5,#e94e35);margin-bottom:var(--encore-spacing-looser);overflow-wrap:anywhere;overflow-y:auto;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-flow:column wrap;flex-flow:column wrap;place-content:space-around center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:var(--encore-corner-radius-larger-2);display:-webkit-box;display:-ms-flexbox;display:flex;opacity:1;padding-left:var(--encore-spacing-looser);padding-right:var(--encore-spacing-looser);text-align:center;-webkit-transition:opacity .1s ease-in 50ms;transition:opacity .1s ease-in 50ms}.zr0dLusU4AgiRoEVZVx_{padding-bottom:0}.FQKI6EvRALxogOFyociA{background-color:rgba(var(--spice-rgb-shadow),.5);-webkit-box-shadow:none;box-shadow:none;margin-bottom:var(--encore-spacing-tighter-4)}.o1cH6TNkpq2sTkq1EAZU{max-height:0;overflow:hidden}.urYkLZy00wWdQH24F1Ja{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"nothiddenandpad";animation-name:"nothiddenandpad"}.GneD3mdmK5FDZVz6bzhB #MTSvglGhr7gd3paX4exJ{-webkit-animation-duration:.3s;animation-duration:.3s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"surveyfadeout";animation-name:"surveyfadeout"}@-webkit-keyframes nothiddenandpad{to{height:-webkit-fit-content;height:fit-content;max-height:-webkit-fit-content;max-height:fit-content;opacity:1;overflow:unset;padding-top:var(--encore-spacing-base)}}@keyframes nothiddenandpad{to{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content;opacity:1;overflow:unset;padding-top:var(--encore-spacing-base)}}.HgfSrPwFpIvBDXNMx0NO{text-wrap:wrap;-webkit-padding-before:var(--encore-spacing-tighter-2);padding-block-start:var(--encore-spacing-tighter-2)}.FjDNaretUQGhB3YYHUaZ{left:0;position:absolute;top:0;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;display:none;height:100%;justify-content:center;opacity:0;text-align:center;-webkit-transition:opacity .3s ease-in 50ms;transition:opacity .3s ease-in 50ms;width:100%}.MDmTCQhrCnUXjUhyWx_A{opacity:1}.MDmTCQhrCnUXjUhyWx_A,.QcjxDZqAGwQOqerAjHdc{display:-webkit-box;display:-ms-flexbox;display:flex}.QcjxDZqAGwQOqerAjHdc{background:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--spice-rgb-shadow),.5)),to(rgba(var(--spice-rgb-shadow),.5))),-webkit-gradient(linear,left top,left bottom,from(#9334f5),to(#e94e35));background:linear-gradient(0deg,rgba(var(--spice-rgb-shadow),.5),rgba(var(--spice-rgb-shadow),.5)),linear-gradient(180deg,#9334f5,#e94e35);margin-bottom:var(--encore-spacing-looser);overflow-wrap:anywhere;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;-webkit-box-pack:center;-ms-flex-pack:center;aspect-ratio:1/1;justify-content:center}.GZDC018jhUZA8opoHkpM{overflow-y:auto}.xNk9rFVlHRml2zumyfQI{max-height:0;overflow:hidden}.rA7_f0w9lodVUT7ad3RC{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"expand";animation-name:"expand"}.FfcoZWtdfcG0Ihbesrub,.rA7_f0w9lodVUT7ad3RC{-webkit-animation-duration:.3s;animation-duration:.3s}.FfcoZWtdfcG0Ihbesrub{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"expandcontent";animation-name:"expandcontent"}.q1uiO23dnmvrVxxEOq9l{-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"surveyfadeout";animation-name:"surveyfadeout"}.KRI6OoYy611XXayRUTyE,.q1uiO23dnmvrVxxEOq9l{-webkit-animation-duration:.3s;animation-duration:.3s}.KRI6OoYy611XXayRUTyE{-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;-webkit-animation-iteration-count:1;animation-iteration-count:1;-webkit-animation-name:"padbottom";animation-name:"padbottom"}@-webkit-keyframes padbottom{to{padding-bottom:var(--encore-spacing-base)}}@keyframes padbottom{to{padding-bottom:var(--encore-spacing-base)}}@-webkit-keyframes expand{to{aspect-ratio:unset;max-height:-webkit-fit-content;max-height:fit-content}}@keyframes expand{to{aspect-ratio:unset;max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}}@-webkit-keyframes expandcontent{to{max-height:-webkit-fit-content;max-height:fit-content}}@keyframes expandcontent{to{max-height:-webkit-fit-content;max-height:-moz-fit-content;max-height:fit-content}}@-webkit-keyframes surveyfadeout{to{opacity:0}}@keyframes surveyfadeout{to{opacity:0}}.iFWtvDR8p3PNwLx46nWu{-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.iFWtvDR8p3PNwLx46nWu,.wj4kWjE4PuHVGqEf0ohK{display:-webkit-box;display:-ms-flexbox;display:flex}.wj4kWjE4PuHVGqEf0ohK{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%}.M7UVXKPsARIM71fmtSUG{inset-block-end:0;position:absolute;width:100%;z-index:calc(var(--video-player-z-index) + 2);-webkit-margin-before:0;margin-block-start:0}.HKhLNVB5OsH5osqax9lk{background:-webkit-gradient(linear,left top,left bottom,from(rgba(var(--spice-rgb-shadow),.7)),color-stop(13.54%,transparent),color-stop(78.65%,transparent),to(var(--spice-main)));background:linear-gradient(180deg,rgba(var(--spice-rgb-shadow),.7),transparent 13.54%,transparent 78.65%,var(--spice-main));display:-webkit-box;display:-ms-flexbox;display:flex;height:100%;inset-block-start:0;inset-inline-start:0;position:absolute;-webkit-transition:opacity .3s ease-in;transition:opacity .3s ease-in;width:100%;z-index:calc(var(--video-player-z-index) + 1)}.i_7T75rV7Rj7AyykwrCf{position:relative}.na5oNvZD9KtuYIUiIUZg{aspect-ratio:9/16;margin:0 auto;max-height:720px}@media(height <= 768px){.na5oNvZD9KtuYIUiIUZg{max-height:300px}}@media(height >= 769px)and (height <= 992px){.na5oNvZD9KtuYIUiIUZg{max-height:500px}}._7QFCuyjgT6BwUe1JJVL{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:var(--encore-spacing-base)}._7QFCuyjgT6BwUe1JJVL.g1fyNwi0G98CTbv9v4We .i_7T75rV7Rj7AyykwrCf{margin:calc(var(--encore-spacing-base)*-1)}@-webkit-keyframes SlideInBottom{0%{-webkit-transform:translateY(100px);transform:translateY(100px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes SlideInBottom{0%{-webkit-transform:translateY(100px);transform:translateY(100px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes FadeIn{0%{opacity:0}to{opacity:1}}@keyframes FadeIn{0%{opacity:0}to{opacity:1}}.nONhpa6k5EMxHTR1RXhM{--video-player-z-index:0;height:100%;margin:calc(var(--encore-spacing-base)*-1);overflow:hidden;position:relative}.nONhpa6k5EMxHTR1RXhM.SDP4__0ksgTwERvZfjE8{padding-bottom:var(--encore-spacing-looser)}.cp7_8T7Q27pZ5zYXUFOW{gap:var(--encore-spacing-looser);height:100%;padding:var(--encore-spacing-base)}.IVGg8Hz4Py4BaPEyJz0T,.cp7_8T7Q27pZ5zYXUFOW{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.IVGg8Hz4Py4BaPEyJz0T{gap:var(--encore-spacing-base);padding-top:var(--encore-spacing-base);position:relative}.IVGg8Hz4Py4BaPEyJz0T.SDP4__0ksgTwERvZfjE8{height:100%}.tUurYuAJ2ZftcyLRFJ9z{-webkit-animation:SlideInBottom .6s ease-in-out,FadeIn .6s linear;animation:SlideInBottom .6s ease-in-out,FadeIn .6s linear} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/7037.js b/dot-config/spicetify/Extracted/Themed/xpui/7037.js new file mode 100755 index 00000000..eb88ff6b --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/7037.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7037],{97281:(e,t,s)=>{s.d(t,{U:()=>d});var i=s(31417),n=s(38157),a=s(75830),r=s(86070);const d=({menu:e,onClick:t,"aria-label":s})=>(0,r.jsx)(a.b,{menu:e,children:(0,r.jsx)(n.e,{size:n.M.xs,label:i.Ru.get("more"),ariaLabel:s,onClick:t})})},29095:(e,t,s)=>{s.d(t,{n:()=>r});var i=s(65503),n=s(99701),a=s(86070);const r=({icon:e,activeIcon:t,label:s,isActive:r,...d})=>(0,a.jsx)(n.Zp,{label:s,children:(0,a.jsx)(i.H,{"aria-label":`${s}, ${r?"selected":"unselected"}, button`,"aria-pressed":r,semanticColor:r?"textBrightAccent":"textSubdued",iconOnly:r?t:e,"aria-haspopup":"menu",size:"small",...d})})},57037:(e,t,s)=>{s.r(t),s.d(t,{default:()=>Ot});var i=s(30758),n=s(97500),a=s.n(n),r=s(14343),d=s(41760),o=s(95530),c=s(31417),l=s(82909);const u={standardHeader:"OnnbOInFe49hYMQmhwUC",fixedHeader:"XZaBo7y3JfnBbjVV9TZo",verticalVideoHeader:"UP1rH6cQZiAZCdkPnDOg"};var v=s(86070);const m=({item:e,variant:t="bodyMediumBold",semanticColor:s="textBase",experience:i="standard"})=>{const n=u[`${i}Header`],a=e.isPodcastAd?c.Ru.get("ad-formats.npv.header.podcast-context"):c.Ru.get("ad-formats.npv.header.music-context");return(0,v.jsx)("div",{className:n,children:(0,v.jsx)(l.r,{children:(0,v.jsx)(o.E,{variant:t,semanticColor:s,children:a})},a)})};var x=s(62411),p=s(22984);const y="SEeVinRsd8ZYEQY4h1bX",g=({url:e})=>(0,v.jsx)("div",{className:y,children:(0,v.jsx)(p._,{testid:"cover-art-image",loading:"lazy",src:e})});var f=s(34296);const h=({item:e})=>{const{capturePlaybackError:t}=(0,i.useContext)(f.O),s=e.metadata?.["ad.canvas.url"];return(0,i.useEffect)((()=>{s||t()}),[s,t]),s?(0,v.jsx)(g,{url:s}):null};var j=s(88308),_=s(64369),b=s(97040),k=s(99859),I=s(2679);const A="dSMBEH0cx3KxzZGHN3rL";const E=({canvasUri:e,canvasUrl:t,children:s,fileId:n,playerContainerClass:r})=>{const{capturePlaybackError:d}=(0,i.useContext)(f.O),o=(0,i.useRef)(null),c=(0,i.useMemo)((()=>({disallowProtectedTracks:!0,enableWithoutEME:!0,videoPlayerContainer:`.${r}`,audioPlayerContainer:`.${r}`})),[r]),l=(0,b.H)(c,void 0,void 0,void 0,void 0),{isPlaying:u}=(0,I.GK)();return(0,j.Ij)((()=>{const s=function(e,t,s){return(0,_.a2)({fileId:t,url:s,uri:e,mediaType:"video",format:{}.DEBUG_OVERTURE_WITHOUT_EME?"GENERIC_MEDIA":"MANIFEST_ID",options:{},logData:{playbackId:(0,k.E)()}})}(e,n,t);if(s)return l.playTracks([s],{paused:!u,muted:!0,loop:!0}),l.on(_.LW.TRACK_LOADED,(()=>{const e=document.getElementsByClassName(r),t=e[0]?.querySelector("video");t&&o.current&&(o.current.appendChild(t),t.autoplay=!0)})),l.on(_.LW.ERROR,(e=>{d()})),()=>{l.stop(),l.removeAllListeners()}}),[n,e]),(0,v.jsx)("div",{"data-testid":"canvas-ad-player",className:a()(r,A),ref:o,children:s})};const T=({item:e})=>{const{capturePlaybackError:t}=(0,i.useContext)(f.O),s=e.metadata?.["ad.canvas.url"],n=e.metadata?.["ad.canvas.file_id"],a=(r=s,r?.split("/").pop());var r;const d=n||a;return(0,i.useEffect)((()=>{d||t()}),[d,t]),d?(0,v.jsx)(E,{playerContainerClass:"canvasAdPlayerNpv",canvasUri:e.uri,fileId:d,canvasUrl:s}):null};var N=s(39148),C=s(63676),M=s(89775),V=s(21082);const R="pvAyLo3KN8QP7KxQtiub",w="r4EqB8Z5_aywMW_8I84P",q=e=>{const{item:t,canvasAdType:s}=e;return"video"===s?(0,v.jsx)(T,{item:t}):(0,v.jsx)(h,{item:t})},Q=e=>{const t=(0,x.wA)(),{url:s}=(0,N.b)(e.item);return(0,v.jsxs)("div",{className:R,"data-testid":"canvas-ad-container",children:[(0,v.jsx)("div",{className:w}),s?(0,v.jsx)(V.N,{to:s,onClick:()=>{t((0,M.q5)(C.c.VIDEO_PLAYER,C.V.AD_NPV))},children:(0,v.jsx)(q,{...e})}):(0,v.jsx)(q,{...e})]})};var S=s(97281),O=s(70200),P=s(51642);const U="iDW7b6oChePRpgfDFY3U",F=({item:e})=>(0,v.jsxs)("div",{className:U,children:[(0,v.jsx)(P.T,{item:e}),(0,v.jsx)(O.t,{item:e})]});var D=s(16345),Z=s(8679);const B="JiMklw0itqYJ1aE76Vi8",L=({item:e})=>(0,v.jsxs)("div",{className:B,children:[(0,v.jsx)(Z.f,{item:e,surface:"AD_NPV"}),(0,v.jsx)(D.L,{item:e,surface:"AD_NPV"})]});var z=s(44119),W=s(89848),H=s(5093),$=s(29195);function Y(){const e=(0,$.vh)();return{linkUbiEvent:function({adId:t,ubiEventId:s,product:i,format:n,requestId:a}){e.send((0,H.A)({ad_id:t,ad_request_id:a,ad_format:n,content_type:i,ubi_event_id:s}))}}}var G=s(10994),K=s(12864),J=s(96164),X=s(98293),ee=s(78813),te=s(44672),se=s(33329);const ie=({item:e,spec:t,contextTrack:s})=>{const i=(0,x.wA)(),n=(0,se.s)(),{linkUbiEvent:a}=Y(),r=`${z.Q.getAdFormat(s)}_${z.Q.getAdProduct(s)}`;return(0,v.jsx)(K.D,{role:"menuitem",testid:"about-this-ad-context-menu-item",leadingIcon:(0,v.jsx)(J.p,{size:"small"}),"aria-label":c.Ru.get("ad-formats.dsa.aboutThisAd"),onClick:()=>{i((0,ee.Oc)()),i((0,X.b0)(e));const d=t.contextMenuFactory({identifier:e.metadata?.lineitem_id,reason:r}).triggerDsaFactory().hitUiNavigate({destination:"/context_menu"}),{interactionId:o}=n.logInteraction(d);a({adId:e.adId,requestId:e.requestId,ubiEventId:o,format:z.Q.getAdFormat(s),product:z.Q.getAdProduct(s)})},divider:"before",children:c.Ru.get("ad-formats.dsa.aboutThisAd")})},ne=(0,i.memo)((function(e){return(0,v.jsx)(te.pZ,{value:"about-this-ad",children:(0,v.jsx)(ie,{...e})})})),ae=(0,i.memo)((function({item:e,spec:t,contextTrack:s}){const n=(0,se.s)(),{linkUbiEvent:a}=Y(),r=`${z.Q.getAdFormat(s)}_${z.Q.getAdProduct(s)}`;return(0,i.useEffect)((()=>{(()=>{const i=n.logImpression(t.contextMenuFactory({identifier:e.metadata?.lineitem_id,reason:r}).impression());a({adId:e.adId,requestId:e.requestId,format:z.Q.getAdFormat(s),product:z.Q.getAdProduct(s),ubiEventId:i})})()}),[]),(0,v.jsx)(te.pZ,{value:"ad",children:(0,v.jsxs)(G.W,{children:[(0,v.jsx)(te.pZ,{value:"ad-title",children:(0,v.jsx)(K.D,{role:"menuitem",testid:"ad-title-context-menu-item",divider:"after",disabled:!0,children:e.metadata.advertiser})}),(0,v.jsx)(ne,{item:e,spec:t,contextTrack:s})]})})}));var re=s(38501);const de="NYcvpWpgvQYZploOD6rI",oe="OpXrpghZvv_w9ygosJFP",ce=({item:e,spec:t})=>{const s=(0,r.NC)(re.SeK,{loadingValue:!1}),i=(0,W.mr)(),n=(0,se.s)(),{linkUbiEvent:a}=Y(),d=`${z.Q.getAdFormat(e)}_${z.Q.getAdProduct(e)}`;return(0,v.jsxs)("div",{className:de,children:[(0,v.jsx)(L,{item:e}),(0,v.jsxs)("div",{className:oe,children:[(0,v.jsx)(F,{item:e}),s&&i?.isDsaEligible&&(0,v.jsx)("div",{"data-testid":"PanelHeader_AdContextMenuButton",children:(0,v.jsx)(S.U,{menu:(0,v.jsx)(ae,{item:i,contextTrack:e,spec:t}),onClick:()=>{if(i){const s=t.infoContainerFactory().contextMenuButtonFactory({identifier:i.metadata?.lineitem_id,reason:d}).hitUiNavigate({destination:"/context_menu"}),{interactionId:r}=n.logInteraction(s);a({adId:i.adId,requestId:i.requestId,format:z.Q.getAdFormat(e),product:z.Q.getAdProduct(e),ubiEventId:r})}}})})]})]})};var le=s(58765);const ue=({item:e,context:t,index:s})=>t?(0,v.jsx)(le.h,{context:t,item:e,index:s}):null,ve="tD84X2SD0IicMx3osK8a",me=({item:e,spec:t,canvasAdType:s})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(Q,{item:e,canvasAdType:s}),(0,v.jsx)("div",{className:ve,children:(0,v.jsx)(ce,{item:e,spec:t})})]}),xe=({item:e,spec:t,context:s,index:i})=>(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(ue,{item:e,context:s,index:i}),(0,v.jsx)(ce,{item:e,spec:t})]}),pe=e=>{const{item:t}=e,{state:s}=(0,i.useContext)(f.O),n=(0,r.NC)(re.U5l,{loadingValue:!1}),a=t?.metadata?.["ad.canvas.type"];return n&&("image"===a||"video"===a)&&s!==f.j.Errored?(0,v.jsx)(me,{...e,canvasAdType:a}):(0,v.jsx)(xe,{...e})};var ye=s(97848),ge=s(23046),fe=s(23041),he=s(81670),je=s(32411);const _e="mJucukPuB6OTWgaD4MZk",be="i3o8ABclZov7rz8zzKYP",ke=(0,i.lazy)((()=>s.e(8925).then(s.bind(s,78925)))),Ie=({item:e,backgroundColor:t,className:s})=>{const n=(0,x.wA)(),{url:r,buttonMessage:d,tagline:o}=(0,N.b)(e),l=d||c.Ru.get("ad-formats.learnMore");if(!r)return null;const u=a()(_e,s),m=(0,je.H)(r);return(0,v.jsx)(V.N,{to:m,"data-testid":"ad-companion-card",className:u,onClick:()=>{n((0,M.q5)(C.c.COMPANION_CARD,C.V.AD_NPV))},children:(0,v.jsx)(ye.v,{style:{backgroundColor:t},className:be,onClickHint:c.Ru.get("ad-formats.learnMore"),variant:"tinted",horizontalGap:(0,ge.po)("looser"),id:e.uri,title:(0,v.jsx)(fe.d,{variant:"mestoBold","data-testid":"ad-companion-card-tagline",children:o||l}),trailing:(0,v.jsx)(i.Suspense,{fallback:(0,v.jsx)(he.V,{}),children:o?(0,v.jsx)(ke,{text:l,clickUrl:m,onClick:()=>{n((0,M.q5)(C.c.CTA_BUTTON,C.V.AD_NPV))}}):(0,v.jsx)(he.V,{semanticColor:"textBase"})})})})};var Ae=s(26754),Ee=s(64820);const Te="_9mvd0bTv9vUHyKGzvBNV",Ne="hQjIgVttFxVwEZ52g6Rg",Ce=({isPodcastAd:e,noticeType:t,primaryText:s})=>{(0,i.useEffect)((()=>{const e=document.getElementById("connected-box");if(e){const t=e.offsetWidth;e.style.height=`${t}px`}}),[]);const n=e?c.Ru.get("ad-formats.survey-podcast-content"):c.Ru.get("ad-formats.survey-music-content");return(0,v.jsx)("div",{className:Ne,id:"connected-box",children:(0,v.jsxs)(v.Fragment,{children:["success"===t?(0,v.jsx)(Ae.T,{size:"xxlarge",spacing:"small",semanticColor:"textBase","data-testid":"survey-notice-check"}):(0,v.jsx)(Ee.b,{size:"xxlarge",spacing:"small",semanticColor:"textBase","data-testid":"survey-notice-exclamation"}),(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",className:Te,semanticColor:"textBase",children:s}),(0,v.jsx)(o.E,{children:n})]})})},Me=({isPodcastAd:e,logger:t})=>((0,i.useEffect)((()=>{t.logSurveyAdEventWithoutAd({event:"event_survey_on_connect",eventReason:"secondary_device"})}),[]),(0,v.jsx)(Ce,{isPodcastAd:e,noticeType:"alert",primaryText:c.Ru.get("ad-formats.survey-connected-note")})),Ve=({isPodcastAd:e,validationResult:t,logger:s})=>((0,i.useEffect)((()=>{s.logAdEvent({event:"errored",reason:"survey_malformed"}),s.logAdError({errorType:"survey_malformed",errorMessage:t.errorMessage})}),[]),(0,v.jsx)(Ce,{isPodcastAd:e,noticeType:"alert",primaryText:c.Ru.get("error-dialog.generic.header")}));var Re=s(16753),we=s(26316),qe=s(92876),Qe=s(31121),Se=s(81939);const Oe=()=>{const{logger:e}=(0,W.yU)();return e},Pe="zr0dLusU4AgiRoEVZVx_",Ue="FQKI6EvRALxogOFyociA",Fe=({data:e,selected:t,handleOptionClick:s,className:i,ad:n})=>{const r=Oe(),d=(i,a)=>{const d={id:i.id,"aria-label":`Select ${i.primaryText}`};return e.surveyQuestionType===we.xV.MULTI_SELECT?(0,v.jsx)(qe.c,{...d,checked:t.has(i.id),onChange:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:t.has(i.id)?"event_option_deselected":"event_option_selected",position:a,ad:n})}}):(0,v.jsx)(Qe.M,{...d,checked:t.has(i.id),onChange:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:"event_option_selected",position:a,ad:n})}})};return(0,v.jsx)(Se.g,{labelFor:e.id,withFieldset:!0,className:a()(Pe,i),children:(0,v.jsx)("div",{children:e.surveyQuestionOptions.map(((i,a)=>(0,v.jsx)(ye.v,{"data-testid":"survey-option-ad",className:Ue,id:i.id,variant:"elevated",title:i.primaryText,leading:d(i,a),isSelected:t.has(i.id),onClick:()=>{s({optionId:i.id,isExclusive:i.isExclusive,questionType:e.surveyQuestionType,position:a}),r.logSurveyAdEventWithAd({optionId:i.id,questionId:e.id,event:t.has(i.id)?"event_option_deselected":"event_option_selected",position:a,ad:n})}},i.id)))})})};var De=s(86677);const Ze="o1cH6TNkpq2sTkq1EAZU",Be="urYkLZy00wWdQH24F1Ja",Le="GneD3mdmK5FDZVz6bzhB",ze="MTSvglGhr7gd3paX4exJ",We=({selected:e,submitted:t,handleClick:s})=>(0,v.jsx)("div",{className:a()(Ze,Be,{[Le]:t}),children:(0,v.jsx)(De.$,{disabled:0===e.size,size:"medium",fullWidth:!0,colorSet:"invertedLight",label:"Submit","data-testid":"survey-submit-button",onClick:s,id:ze,children:c.Ru.get("ad-formats.survey-submit-button")})}),He="HgfSrPwFpIvBDXNMx0NO",$e="FjDNaretUQGhB3YYHUaZ",Ye="MDmTCQhrCnUXjUhyWx_A",Ge=({showThankYou:e,ad:t,questionId:s})=>{const n=Oe();return(0,i.useEffect)((()=>{e&&n.logSurveyAdEventWithAd({questionId:s,event:"event_thank_you_displayed",ad:t})}),[s,e]),(0,v.jsxs)("div",{className:a()($e,{[Ye]:e}),"data-testid":"survey-ad-thank-you",children:[(0,v.jsx)(Ae.T,{size:"xxlarge",spacing:"small"}),(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",className:He,"data-testid":"survey-ad-thank-you",children:c.Ru.get("ad-formats.survey-thankyou")})]})};function Ke(){const[e,t]=(0,i.useState)(new Map),[s,n]=(0,i.useState)(!1);return{selected:e,handleOptionClick:({optionId:s,isExclusive:i,questionType:n,position:a})=>{let r=new Map(e);n===we.xV.MULTI_SELECT?r=function({optionId:e,selected:t,isExclusive:s,position:i}){let n;t.has(e)?(n=new Map(t),n.delete(e)):n=function({optionId:e,selected:t,isExclusive:s,position:i}){const n=new Map(t);s&&n.clear();return t.forEach((({isExclusive:e},t)=>{e&&n.delete(t)})),n.set(e,{isExclusive:s,position:i}),n}({optionId:e,isExclusive:s,selected:t,position:i});return n}({optionId:s,isExclusive:i,selected:e,position:a}):n===we.xV.SINGLE_SELECT&&(r=function({optionId:e,selected:t,position:s}){let i=new Map(t);t.has(e)||(i=function({optionId:e,selected:t,position:s}){const i=new Map(t);return i.clear(),i.set(e,{isExclusive:!0,position:s}),i}({optionId:e,selected:t,position:s}));return i}({optionId:s,selected:e,position:a})),t(r)},setSurveyIsSubmitted:n,submitted:s}}class Je{constructor(e){this.isValid=e.isValid,this.errorMessage=e.errorMessage}}var Xe=s(81475),et=s(98742);const tt=({ad:e,eventSender:t,logger:s,questionId:i,selected:n})=>{const a=[];n.forEach(((e,t)=>{const s=(({id:e,selectedOption:t})=>et.$y.create({selectedSurveyQuestionOptionId:e,optionPositionIndex:t.position.toString()}))({id:t,selectedOption:e});a.push(s)}));const r=et.Tl.create({surveyQuestionId:i,selectedSurveyOptions:a}),d=et.BN.create({surveyQuestionAnswers:[r]}),o=et.A7.create({survey:d});s.logAdEvent({event:"survey_submitted",payload:o}),s.logAdEvent({event:"ended"}),t.send((0,Xe.i)({ad_id:e.adId,event:"event_survey_submitted",format:(0,we.gh)(e.format).toLowerCase(),in_focus:!0,lineitem_id:e.metadata?.lineitem_id,product_name:"brand_survey",question_id:i,request_id:e.requestId,response:JSON.stringify(o),slot:e.slot}))};const st=function(e,t=2e3){const s=(0,W.dY)();(0,i.useEffect)((()=>{if(!e)return;const i=setTimeout((()=>s.skipToNext()),t);return()=>clearTimeout(i)}),[t,e,s])},it="QcjxDZqAGwQOqerAjHdc",nt="GZDC018jhUZA8opoHkpM",at="xNk9rFVlHRml2zumyfQI",rt="rA7_f0w9lodVUT7ad3RC",dt="FfcoZWtdfcG0Ihbesrub",ot="q1uiO23dnmvrVxxEOq9l",ct="KRI6OoYy611XXayRUTyE",lt=({question:e,ad:t})=>{const s=Oe(),n=(0,$.vh)(),r=(0,W.dY)();(0,i.useEffect)((()=>{s.logSurveyAdEventWithAd({questionId:e.id,event:"event_companion_viewed",ad:t})}),[e.id]);const{selected:d,handleOptionClick:c,submitted:l,setSurveyIsSubmitted:u}=Ke();(0,i.useEffect)((()=>{e.surveyQuestionType in we.xV||(s.logAdEvent({event:"errored",reason:"survey_malformed"}),r.skipToNext())})),st(l,2e3);return(0,v.jsxs)(Re.a,{className:a()(it,rt),padding:"looser",children:[(0,v.jsxs)("div",{className:a()(nt,{[ot]:l}),children:[(0,v.jsxs)("div",{className:ct,children:[(0,v.jsx)(o.E,{as:"h1",variant:"titleSmall",paddingBottom:"tighter-2",children:e.primaryText}),(0,v.jsx)(o.E,{as:"p",semanticColor:"textSubdued",variant:"bodySmall",children:e.secondaryText})]}),(0,v.jsx)(Fe,{className:a()(at,dt),ad:t,selected:d,handleOptionClick:c,data:e})]}),(0,v.jsx)(We,{handleClick:()=>{u(!0),tt({eventSender:n,ad:t,selected:d,logger:s,questionId:e.id})},submitted:l,selected:d}),(0,v.jsx)(Ge,{showThankYou:l,ad:t,questionId:e.id})]})},ut=({survey:e,ad:t})=>e?(0,v.jsx)(lt,{question:e?.surveyQuestions[0],ad:t}):null,vt=e=>{return t=e,t.survey?.surveyQuestions?.length?(e=>!e.survey?.surveyTransparencyContent||0===Object.keys(e.survey.surveyTransparencyContent).length)(e)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content : missing"}):new Je({isValid:!0}):new Je({isValid:!1,errorMessage:"survey.survey_questions : missing"});var t},mt=e=>{const t=e?.[0];if(s=t,!s?.id||s.id.length<1)return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].id : missing"});var s;if((e=>(0,we.BM)(e?.surveyQuestionType)<=0)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].survey_question_type : invalid type"});if((e=>!e?.primaryText||e?.primaryText?.length<1)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].primary_text : missing"});if((e=>!e?.surveyQuestionOptions?.length)(t))return new Je({isValid:!1,errorMessage:"survey.survey_questions[0].survey_question_options : missing"});const i=t?.surveyQuestionOptions.find((e=>(e=>!e.id||e?.id?.length<1)(e)));if(i)return new Je({isValid:!1,errorMessage:`survey.survey_questions[0].survey_question_options[${t?.surveyQuestionOptions.indexOf(i)}].id : missing`});const n=t?.surveyQuestionOptions.find((e=>(e=>!e.primaryText||e.primaryText.length<1)(e)));return new Je(n?{isValid:!1,errorMessage:`survey.survey_questions[0].survey_question_options[${t?.surveyQuestionOptions.indexOf(n)}].primary_text : missing`}:{isValid:!0})},xt=e=>{if(!e)return new Je({isValid:!1,errorMessage:"no ad"});const t=(e=>e?.companions.find((e=>e.survey)))(e);if(!t)return new Je({isValid:!1,errorMessage:"companions.survey : missing"});const s=vt(t);if(s&&!s.isValid)return s;const i=t?.survey?.surveyQuestions,n=mt(i);if(n&&!n.isValid)return n;const a=t?.survey?.surveyTransparencyContent,r=(d=a)&&(e=>!e?.transparencyLabel||e?.transparencyLabel.length<1)(d)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content.transparency_label : missing"}):d&&(e=>!e?.transparencyUrl||e?.transparencyUrl.length<1)(d)?new Je({isValid:!1,errorMessage:"survey.survey_transparency_content.transparency_url : missing"}):new Je({isValid:!0});var d;return r||new Je({isValid:!0})},pt=(0,i.memo)((function({displayText:e,url:t,ad:s,questionId:n}){const a=Oe();return(0,i.useEffect)((()=>{a.logSurveyAdEventWithAd({questionId:n,event:"event_context_menu",ad:s})}),[n]),(0,v.jsx)(G.W,{children:(0,v.jsx)(K.D,{role:"menuitem",leadingIcon:(0,v.jsx)(J.p,{size:"small"}),"aria-label":`${e}, link`,to:t,children:e})})}));var yt=s(31233);const gt="iFWtvDR8p3PNwLx46nWu",ft="wj4kWjE4PuHVGqEf0ohK",ht=({item:e})=>{const t=(0,W.mr)(),s=xt(t),n=Oe(),a=(0,i.useMemo)((()=>t?.companions.find((e=>e.survey))?.survey),[t]),r=a?.surveyTransparencyContent,{currentDevice:d}=(0,yt.l)(),{isLocal:o}=d;return(0,v.jsxs)("div",{"data-testid":"survey-ad",className:ft,children:[o?t&&s.isValid?(0,v.jsx)(ut,{survey:a,ad:t}):(0,v.jsx)(Ve,{isPodcastAd:e?.isPodcastAd,validationResult:s,logger:n}):(0,v.jsx)(Me,{isPodcastAd:e?.isPodcastAd,logger:n}),(0,v.jsxs)("div",{className:gt,children:[(0,v.jsx)(L,{item:e}),r&&t&&(0,v.jsx)(S.U,{"aria-label":"More options, button",menu:(0,v.jsx)(pt,{questionId:a?.surveyQuestions[0]?.id,ad:t,displayText:r.transparencyLabel,url:r.transparencyUrl})})]})]})},jt=e=>{const t=(0,x.d4)((e=>e.ads?.vto));return"audio"===e?.mediaType||!t?.isMinimized};var _t=s(12200);const bt="M7UVXKPsARIM71fmtSUG",kt="HKhLNVB5OsH5osqax9lk",It="i_7T75rV7Rj7AyykwrCf",At="na5oNvZD9KtuYIUiIUZg",Et="_7QFCuyjgT6BwUe1JJVL",Tt="g1fyNwi0G98CTbv9v4We",Nt=({item:e,context:t,index:s,spec:i})=>{const n=jt(e),r="portrait"===e.videoOrientation,d=r&&!n?bt:"",o=a()(Et,{[Tt]:r}),c=a()({[At]:r});return(0,v.jsxs)("div",{className:o,children:[n?(0,v.jsx)(ue,{item:e,context:t,index:s}):(0,v.jsxs)("div",{className:It,children:[r&&(0,v.jsx)("div",{className:kt}),(0,v.jsx)("div",{className:c,children:(0,v.jsx)(_t.F,{})})]}),(0,v.jsx)("div",{className:d,children:(0,v.jsx)(ce,{item:e,spec:i})})]})};var Ct=s(85505),Mt=s(37948);var Vt=s(21549);const Rt="nONhpa6k5EMxHTR1RXhM",wt="SDP4__0ksgTwERvZfjE8",qt="cp7_8T7Q27pZ5zYXUFOW",Qt="IVGg8Hz4Py4BaPEyJz0T",St="tUurYuAJ2ZftcyLRFJ9z",Ot=({item:e,context:t,index:s})=>{const{logoImage:n}=(0,N.b)(e),o=jt(e),{state:c}=(0,i.useContext)(f.O),l=(0,r.NC)(re.U5l),{spec:u,UBIFragment:x}=(0,Vt.r)(d.m,{}),p=((e=null,t=0,s=Ct.CpN)=>{const[n,a]=(0,i.useState)(s),r=(0,Mt.z)(e,s,"colorDark");return(0,i.useEffect)((()=>{setTimeout((()=>{a(r)}),t)}),[t,r]),n})(z.Q.isVideoAd(e)?n:e?.images[0]?.url||n,600),y=(0,i.useMemo)((()=>z.Q.isVerticalVideoAd(e)&&!o),[e,o]),g=(0,i.useMemo)((()=>y?"verticalVideo":l&&z.Q.isCanvasAd(e)&&c!==f.j.Errored?"fixed":"standard"),[c,l,e,y]),h=(e=>{const t=(0,W.mr)(),s=t?.requestId,n=Oe(),a=(0,r.NC)(re.o4S,{loadingValue:!1});return(0,i.useEffect)((()=>{s&&z.Q.isSurveyAd(e)&&!a&&n.logAdError({errorType:"survey_ad_feature_disabled",errorMessage:"survey feature flag is disabled"})}),[]),z.Q.isSurveyAd(e)&&a?"survey":z.Q.isVideoAd(e)?"video":"audio"})(e),j="survey"===h;return(0,v.jsx)("div",{className:a()(Rt,{[wt]:j}),children:(0,v.jsx)(x,{spec:u,children:(0,v.jsxs)("div",{className:qt,children:[(0,v.jsxs)("div",{className:a()(Qt,{[wt]:j}),children:[(0,v.jsx)(m,{item:e,experience:g}),(()=>{switch(h){case"video":return(0,v.jsx)(Nt,{item:e,spec:u,index:s,context:t});case"survey":return(0,v.jsx)(ht,{item:e});default:return(0,v.jsx)(pe,{item:e,context:t,index:s,spec:u})}})()]}),j?null:(0,v.jsx)(Ie,{item:e,className:St,backgroundColor:p})]})})})}},70200:(e,t,s)=>{s.d(t,{t:()=>f});var i=s(62411),n=s(53248),a=s(89586),r=s(31417),d=s(29095),o=s(76612),c=s(2274),l=s(84859),u=s(75830),v=s(30758),m=s(10994),x=s(12864),p=s(44672),y=s(86070);const g=(0,v.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["not_relevant",r.Ru.get("ad-formats.ad-feedback.dislike.not-relevant")],["too_often",r.Ru.get("ad-formats.ad-feedback.dislike.too-often")],["unpleasant",r.Ru.get("ad-formats.ad-feedback.dislike.unpleasant-content")],["offensive",r.Ru.get("ad-formats.ad-feedback.dislike.offensive-content")],["do_not_like",r.Ru.get("ad-formats.ad-feedback.dislike.do-not-like")]]);return(0,y.jsx)(p.pZ,{value:"dislike-ad",children:(0,y.jsx)(m.W,{children:Array.from(t).map((([t,s])=>(0,y.jsx)(p.pZ,{value:s,children:(0,y.jsx)(x.D,{role:"menuitem","aria-label":s,onClick:()=>e(t,s),children:s})},t)))})})})),f=({item:e,isDisabled:t})=>{const s=(0,i.wA)(),{logAdFeedback:v}=(0,o.L)(e),m=(0,i.d4)((t=>(0,l.N)(t,e.id)));return(0,y.jsx)(u.b,{menu:(0,y.jsx)(g,{onFeedbackReasonSelect:(t,i)=>{e.id&&(s((0,c.NI)({adId:e.id,reason:i})),v(`dislike_${t}`))}}),children:(0,y.jsx)(d.n,{item:e,icon:n.P,activeIcon:a.X,label:r.Ru.get("ad-formats.ad-feedback.dislike"),isActive:m,"data-testid":"button-dislike-ad",onClick:()=>{if(e.id){if(m)return s((0,c.vA)({adId:e.id})),void v("cancel_dislike");s((0,c.NI)({adId:e.id})),v("dislike_menu")}},disabled:t})})}},51642:(e,t,s)=>{s.d(t,{T:()=>f});var i=s(62411),n=s(60487),a=s(35361),r=s(31417),d=s(29095),o=s(76612),c=s(2274),l=s(84859),u=s(75830),v=s(30758),m=s(10994),x=s(12864),p=s(44672),y=s(86070);const g=(0,v.memo)((function({onFeedbackReasonSelect:e}){const t=new Map([["relevant",r.Ru.get("ad-formats.ad-feedback.like.relevant")],["interested_in_brand",r.Ru.get("ad-formats.ad-feedback.like.interested-in-brand")],["interested_in_product",r.Ru.get("ad-formats.ad-feedback.like.interested-in-product")],["enjoyable",r.Ru.get("ad-formats.ad-feedback.like.enjoyable-content")],["discovered_new",r.Ru.get("ad-formats.ad-feedback.like.discovered-new")]]);return(0,y.jsx)(p.pZ,{value:"like-ad",children:(0,y.jsx)(m.W,{children:Array.from(t).map((([t,s])=>(0,y.jsx)(p.pZ,{value:s,children:(0,y.jsx)(x.D,{role:"menuitem","aria-label":s,onClick:()=>e(t,s),children:s})},t)))})})})),f=({item:e,isDisabled:t})=>{const s=(0,i.wA)(),{logAdFeedback:v}=(0,o.L)(e),m=(0,i.d4)((t=>(0,l.T)(t,e.id)));return(0,y.jsx)(u.b,{menu:(0,y.jsx)(g,{onFeedbackReasonSelect:(t,i)=>{e.id&&(s((0,c.F$)({adId:e.id,reason:i})),v(`like_${t}`))}}),children:(0,y.jsx)(d.n,{item:e,icon:n.G,activeIcon:a.q,label:r.Ru.get("ad-formats.ad-feedback.like"),isActive:m,"data-testid":"button-like-ad",onClick:()=>{if(e.id){if(m)return s((0,c.D$)({adId:e.id})),void v("cancel_like");s((0,c.F$)({adId:e.id})),v("like_menu")}},disabled:t})})}},76612:(e,t,s)=>{s.d(t,{L:()=>r});var i=s(86660),n=s(89848),a=s(29195);const r=e=>{const t=(0,n.dY)(),s=(0,a.vh)(),r=t.getInStreamAd();return{logAdFeedback:function(t){s.send((0,i.F)({ad_id:e.id,advertiser:e.advertiser,creative_id:r?.adId===e.id?r?.metadata?.creative_id:void 0,format:e.mediaType,line_item_id:r?.adId===e.id?r?.metadata?.lineitem_id:void 0,event:t}))}}}},84859:(e,t,s)=>{s.d(t,{N:()=>r,T:()=>a});var i=s(42551);const n=e=>e.ads.adFeedback,a=(0,i.Mz)([e=>n(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.liked)),r=(0,i.Mz)([e=>n(e),(e,t)=>t],((e,t)=>!(!t||e.adId!==t)&&e.disliked))}}]); +//# sourceMappingURL=7037.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/7607.js b/dot-config/spicetify/Extracted/Themed/xpui/7607.js new file mode 100755 index 00000000..2ca43dcb --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/7607.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[7607],{27607:(e,t,a)=>{a.d(t,{z2:()=>U});var i=a(30758),r=a(97500),n=a.n(r),s=a(96111),l=a(40638),o=a(27102);function c(e,t,a){const i=e.current;if(null===i)return 0;const r=i.getBoundingClientRect();return"vertical"===a?1-Math.max(0,Math.min((t.clientY-r.top)/r.height,1)):Math.max(0,Math.min((t.clientX-r.left)/r.width,1))}var u=a(68815),h=a(14343),d=a(77567);const f=20,g=[{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:f},{name:"normal",frames:f},{name:"dark",frames:320},{name:"dark",frames:80,isStartOfFlashlightEnter:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:40},{name:"flashlight-on",isInfinite:!0},{name:"dark",frames:f,isStartOfExit:!0},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"flashlight-on",frames:f},{name:"dark",frames:f},{name:"normal",isInfinite:!0,isEndOfExit:!0}],m=200;function b(e,t){const a=document.createElement("canvas"),i=a.getContext("2d");if(null===i)return null;const r=Math.sqrt(e**2+t**2),n=m;return a.width=r/1.5+2*n,a.height=r+2*n,i.translate(n,n),{canvas:a,context:i,width:a.width-2*n,height:a.height-2*n,padding:n}}function v(e,t,a,i,r=0){const n=i/2*Math.PI/180,s=a/Math.cos(n),l=Math.sin(n)*s*2;e.beginPath(),e.moveTo((t-l)/2,r),e.lineTo(t/2,r+a),e.lineTo((t-l)/2+l,r),e.closePath()}function p(e,t){const a=function(e,t){const a=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-nether-bottom-left.png"),e}),[]),r=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-nether-bottom-right.png"),e}),[]);return function(i){if(r){const a=e-r.naturalWidth,n=t-r.naturalHeight;i.drawImage(r,0,0,r.naturalWidth,r.naturalHeight,a,n,r.naturalWidth,r.naturalHeight)}if(a){const e=0,r=t-a.naturalHeight;i.drawImage(a,0,0,a.naturalWidth,a.naturalHeight,e,r,a.naturalWidth,a.naturalHeight)}}}(e,t),[r,n]=(0,i.useState)(y(e,t)),[s,l]=(0,i.useState)(w(e,t));return(0,i.useEffect)((()=>{n(y(e,t)),l(w(e,t))}),[e,t]),(i,n,l,o)=>{if(!r||!s)return;const c=l/100,u=n.left+n.width*c,h=n.top+n.height/2;let d=0;d=c>.5?(c-.5)/.5*-60:60-c/.5*60;const f=r.width,m=r.height,b=-r.width/2,v=-r.height,p=f,y=m;i.save(),i.fillStyle="rgba(0, 0, 0, 0.85)",i.fillRect(0,0,e,t);const w=i.createLinearGradient(e/2,0,e/2,t);w.addColorStop(0,"rgba(57, 139, 216, 0.3)"),w.addColorStop(1,"rgba(0, 29, 62, 0.15)"),i.fillStyle=w,i.fillRect(0,0,e,t),"flashlight-on"===g[o].name?(i.save(),i.translate(u,h),i.rotate(d*Math.PI/180),i.globalCompositeOperation="destination-out",i.drawImage(r,0,0,f,m,b,v+100,p,y),i.restore(),a(i),i.save(),i.translate(u,h),i.rotate(d*Math.PI/180),i.globalCompositeOperation="source-over",i.drawImage(s,0,0,f,m,b,v+100,p,y),i.restore()):a(i),i.restore()}}function y(e,t){const a=b(e,t);if(!a)return null;const{canvas:i,context:r,width:n,height:s,padding:l}=a,o=r.createLinearGradient(n/2,0,n/2,s);o.addColorStop(0,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)");const c=r.createLinearGradient(n/2,0,n/2,s);return c.addColorStop(.7,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.save(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,30,120),r.filter="blur(10px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(0, 0, 0, 1)",v(r,n,s,30,80),r.filter="blur(40px)",r.fill(),r.restore(),r.globalCompositeOperation="destination-out",r.fillStyle=o,r.fillRect(-l,-l,n+2*l,s+2*l),i}function w(e,t){const a=b(e,t);if(!a)return null;const{canvas:i,context:r,width:n,height:s,padding:l}=a;r.save(),r.fillStyle="rgba(80, 170, 255, 0.6)",v(r,n,s,30,120),r.filter="blur(10px)",r.fill(),r.restore();const o=r.createLinearGradient(n/2,0,n/2,s);o.addColorStop(.7,"rgba(0, 0, 0, 1)"),o.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=o,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",r.fillStyle="rgba(80, 170, 255, 0.8)",v(r,n,s,5,40),r.filter="blur(30px)",r.fill(),r.fillStyle="rgba(80, 170, 255, 0.4)",v(r,n,s,30,150),r.filter="blur(40px)",r.fill(),r.restore(),r.save(),r.translate(n/2,s-140),r.scale(1,10),r.fillStyle="rgba(198, 238, 251, 0.2)",r.filter="blur(24px)",r.beginPath(),r.arc(0,0,22,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.2)",r.filter="blur(18px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.save(),r.translate(n/2,s-70),r.scale(1,5),r.fillStyle="rgba(198, 238, 251, 0.1)",r.filter="blur(14px)",r.beginPath(),r.arc(0,0,18,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 0.1)",r.filter="blur(8px)",r.beginPath(),r.arc(0,0,20,0,2*Math.PI),r.fill(),r.restore(),r.fillStyle="rgba(100, 190, 255, 1)",r.filter="blur(22px)",r.beginPath(),r.arc(n/2,s+100,20,0,2*Math.PI),r.fill(),r.fillStyle="rgba(198, 238, 251, 1)",r.filter="blur(4px)",r.beginPath(),r.arc(n/2,s+100,14,0,2*Math.PI),r.fill(),r.fillStyle="rgba(234, 255, 255, 1)",r.filter="blur(1px)",r.beginPath(),r.arc(n/2,s+100,12,0,2*Math.PI),r.fill();const c=r.createLinearGradient(n/2,0,n/2,s);return c.addColorStop(0,"rgba(0, 0, 0, 1)"),c.addColorStop(1,"rgba(0, 0, 0, 0)"),r.globalCompositeOperation="destination-out",r.fillStyle=c,r.fillRect(-l,-l,n+2*l,s+2*l),r.globalCompositeOperation="source-over",i}const S=100,x=[{size:6,alpha:.5},{size:6,alpha:.4},{size:12,alpha:.3},{size:12,alpha:.3},{size:12,alpha:.3},{size:14,alpha:.2},{size:20,alpha:.2},{size:30,alpha:.2},{size:40,alpha:.1}],M=64,E=8,I=2;function C(e,t){const a=(0,i.useMemo)((()=>{const e=new Image;return e.src=(0,d.b)("images/stranger-things-spores.png"),e}),[]),[r,n]=(0,i.useState)(P(e,t));return(0,i.useEffect)((()=>{r?function(e,t,a){e.forEach((e=>{e.x=Math.random()*t,e.y=Math.random()*a}))}(r,e,t):n(P(e,t))}),[e,t,r]),function(i){null!==a&&r.forEach((r=>{r.x-=r.directionX*r.velocityX,r.y-=r.directionY*r.velocityY,r.y>t+10?(r.x=Math.random()*e,r.y=-10):r.x<-10&&(r.x=e+10,r.y=Math.random()*t);const n=r.spriteSheetX,s=r.spriteSheetY,l=M,o=M,c=r.x-r.size/2,u=r.y-r.size/2,h=r.size,d=r.size;i.save(),i.globalAlpha*=r.alpha,i.drawImage(a,n,s,l,o,c,u,h,d),i.restore()}))}}function P(e,t){const a=[];for(let i=0;i.5?1:-1,directionY:Math.random()>.5?1:-1,velocityX:s/300,velocityY:s/400})}return a}class k{_subscribers=[];_active=!1;unsubscribeToActivity(e){const t=this._subscribers.findIndex((t=>t.fn===e));-1!==t&&(clearTimeout(this._subscribers[t].inactiveTimeout),this._subscribers.splice(t,1))}subscribeToActivity(e,t){this._subscribers.push({fn:t,msInactive:e,isActive:!1})}enableActivityMonitor(){window.addEventListener("mousemove",this._onActivity),window.addEventListener("mouseup",this._onActivity),window.addEventListener("keydown",this._onActivity),window.addEventListener("scroll",this._onActivity,!0)}disableActivityMonitor(){window.removeEventListener("mousemove",this._onActivity),window.removeEventListener("mouseup",this._onActivity),window.removeEventListener("keydown",this._onActivity),window.removeEventListener("scroll",this._onActivity,!0),this._subscribers.forEach((e=>clearTimeout(e.inactiveTimeout))),this._subscribers=[]}_onActivity=()=>{this._subscribers.forEach((e=>{this._active||(this._active=!0,e.fn(this._active)),clearTimeout(e.inactiveTimeout),e.inactiveTimeout=setTimeout((()=>{this._active=!1,e.fn(this._active)}),e.msInactive)}))}}class T{frame=0;lastPhaseFrame=0;phase=0;animationFrameRequestId=null;flickerTimerId=null;isPlaying=!0;start(){this.lastPhaseFrame=this.frame,this.phase=0;const e=()=>setTimeout((()=>{this.flickerTimerId=e(),this.isPlaying&&g[this.phase].isInfinite&&this.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter)))}),15e3*Math.random()+5e3);this.flickerTimerId=e()}stop(){const e=g.findIndex((e=>e.isStartOfExit));this.phase{const{getPercentage:t,isDragging:a=!1,isPlayingStrangerThings:r=!1,progressBar:n}=e,s=(0,i.useMemo)((()=>new k),[]),l=(0,i.useMemo)((()=>new T),[]),o=(0,i.useRef)(null),[c,u]=(0,i.useState)(null),[h,d]=(0,i.useState)(window.innerHeight),[f,m]=(0,i.useState)(window.innerWidth),[b,v]=(0,i.useState)(!1),[y,w]=(0,i.useState)(!1),S=C(f,h),x=p(f,h),M=(0,i.useCallback)((e=>{!a&&r&&(e?l.stop():(l.start(),w(!0)))}),[a,r,l]),E=(0,i.useCallback)((()=>{r&&(l.setPhase(g.findIndex((e=>e.isStartOfFlashlightEnter))),w(!0))}),[r,l]),I=(0,i.useCallback)((()=>{l.stop()}),[l]),P=(0,i.useCallback)((()=>{if(!y)return void v(!0);v(!1);const e=window.innerHeight,t=window.innerWidth;m(t),d(e)}),[y]),R=(0,i.useCallback)((()=>{if(!o.current)return;const{frame:e,lastPhaseFrame:a,phase:i}=l;if(l.frame=e+1,g[i].isEndOfExit)w(!1);else{if(g[i].isInfinite||e-a===g[i].frames&&l.setPhase(i+1),o.current.width=f,o.current.height=h,"normal"!==g[i].name){const e=o.current.getContext("2d");if(!e||!c)return;const a=t();x(e,c,a,i),S(e)}l.animationFrameRequestId=requestAnimationFrame(R)}}),[h,f,x,S,t,c,l]);return(0,i.useEffect)((()=>{window.addEventListener("resize",P);const e=s;return e.enableActivityMonitor(),e.subscribeToActivity(5e3,M),()=>{window.removeEventListener("resize",P),e.disableActivityMonitor(),e.unsubscribeToActivity(M)}}),[s,M,P]),(0,i.useEffect)((()=>{r||l.stop()}),[r,l]),(0,i.useEffect)((()=>{a?E():a||I()}),[a,E,I]),(0,i.useEffect)((()=>{y?(b&&P(),l.animationFrameRequestId=requestAnimationFrame(R)):l.animationFrameRequestId&&cancelAnimationFrame(l.animationFrameRequestId)}),[y,R,P,b,l]),(0,i.useEffect)((()=>{n.current&&u(n.current.getBoundingClientRect())}),[f,h,n]),y?(0,A.jsx)("canvas",{className:_,ref:o,width:f,height:h}):null};var O=a(38501);const z=e=>(0,h.NC)(O.c3z,{loadingValue:!1})&&e.isPlayingStrangerThings?(0,A.jsx)(R,{...e}):null;var F=a(44074),D=a(82935);const L="playback-progressbar",q="playback-progressbar-isInteractive",N="progress-bar",j="x-progressBar-progressBarBg",W="x-progressBar-sliderArea",B="oShi2lRbnhFkEr2LlUqC",H="ZqlJ1uWjMeen9ye7Y7GC",Y="x-progressBar-fillColor",X="VI_bMRxDl9fS6qksct7W",G="sW0M_K97doEB3B4Ts58i",V="progress-bar--isDragging",Q="progress-bar__slider",K="GfN5haHC77OxfQqkHlIi",Z="OVsKgmQSwhS2WVE1B9Kc",U=({value:e,max:t,step:a,labelText:r,isInteractive:h=!0,forceActiveStyles:d=!1,onDragStart:f,onDragMove:g,onDragEnd:m,onStepForward:b,onStepBackward:v,saberConfig:p=null,isPlayingStrangerThings:y=!1,isAttackOnTitanEasterEggActive:w,direction:S="horizontal",enableAnimation:x,updateFrequency:M,offFrequencyUpdate:E,className:I,showValueAsTimeOverHandle:C=!1,...P})=>{const k=(0,i.useRef)(null),{isDragging:T,onMouseDown:_}=(({progressBarRef:e,onDragStart:t,onDragMove:a,onDragEnd:r,direction:n="horizontal"})=>{const[s,u]=(0,i.useState)(!1),h=(0,i.useRef)(!1),d=(0,o.ZY)(),f=(0,i.useRef)(t),g=(0,i.useRef)(a),m=(0,i.useRef)(r);f.current=t,g.current=a,m.current=r;const b=(0,l.YQ)((t=>{g.current(c(e,t,n)),h.current=!0}),20,{leading:!0,maxWait:20});return{isDragging:s,onMouseDown:(0,i.useCallback)((t=>{const a=t=>{u(!1),b.cancel(),m.current(c(e,t,n),{wasDraggedBeforeReleased:h.current}),d?.removeEventListener("pointermove",b),h.current=!1};0===t.button&&(f.current(c(e,t,n)),u(!0),d?.addEventListener("pointermove",b),d?.addEventListener("pointerup",a,{once:!0}),h.current=!1)}),[b,e,n,d])}})({progressBarRef:k,onDragStart:f,onDragMove:g,onDragEnd:m,direction:S}),R=(0,i.useRef)(null),[O,U]=(0,i.useState)(0),[$,J]=(0,i.useState)(0),ee=(0,i.useCallback)((e=>{if(R.current){const a=e.clientX-R.current.getBoundingClientRect().left;a>=0&&(U(a),J(a/R.current.clientWidth*t))}}),[t]),te=h?100*Math.max(0,Math.min(1,e/t)):0,ae=d||T,ie=h&&null!==p,re=h&&!(0,F.n)(),ne=(({onStepForward:e,onStepBackward:t,value:a})=>(0,l.YQ)((i=>{parseFloat(i.target.value)>a?e?.():t?.()}),100,{trailing:!1,leading:!0,maxWait:200}))({onStepForward:b,onStepBackward:v,value:e}),se=(0,i.useCallback)((()=>te),[te]),le=(0,o.ZY)(),oe=(0,i.useRef)(le?.visibilityState),ce=le?.visibilityState,ue=T||E||"hidden"===ce||"hidden"===oe.current||0===e;oe.current=ce;const he=x?B:"";return(0,A.jsxs)("div",{className:n()(L,I,{[q]:h,[H]:ue}),"data-testid":P["data-testid"],children:[(0,A.jsx)(s.o,{disabled:!h,type:"range",min:0,max:t,value:e,step:a,onChange:ne,"aria-valuetext":P["aria-valuetext"],children:r}),(0,A.jsxs)("div",{className:n()(N,{[X]:null!==p,[V]:ae}),style:{...ie?p:null,"--progress-bar-transform":`${te}%`,"--progress-bar-duration":`${Number(M)}ms`,...w?{"--fg-color":u.q,"--is-active-fg-color":u.q}:null},ref:R,onPointerDown:_,onMouseMove:C?ee:void 0,"data-testid":"progress-bar",children:[ie?(0,A.jsx)("div",{className:G,"data-testid":"progress-bar-saber-overlay"}):null,(0,A.jsxs)("div",{ref:k,className:j,"data-testid":"progress-bar-background",children:[(0,A.jsx)("div",{className:W,children:(0,A.jsx)("div",{className:n()(Y,he)})}),(0,A.jsx)("div",{className:n()(Q,he),children:C&&T&&(0,A.jsx)("div",{className:K,children:(0,D.f)(e)})}),C&&!T&&(0,A.jsx)("div",{className:Z,style:{insetInlineStart:O},children:(0,D.f)($)})]}),re&&(0,A.jsx)("div",{style:{width:"100%"},children:(0,A.jsx)(z,{getPercentage:se,progressBar:k,isPlayingStrangerThings:y,isDragging:T})})]})]})}},68815:(e,t,a)=>{a.d(t,{q:()=>n,O:()=>s});var i=a(2679);const r="spotify:playlist:37i9dQZF1DWXkVfVmXHa7l",n="#D4000E";function s(){const{isActive:e}=(0,i.l_)(r);return e}}}]); +//# sourceMappingURL=7607.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/838.js b/dot-config/spicetify/Extracted/Themed/xpui/838.js new file mode 100755 index 00000000..c7b08496 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/838.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[838],{3838:(t,r,n)=>{n.d(r,{extractColors:()=>g});var s=n(2672);const o="https://local-image.spotify.com";let i=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});var e=n(5592),a=n.n(e);var h=n(7145);const u=new function(){return a()('(()=>{"use strict";let t=function(t){return t[t.HEX=0]="HEX",t[t.HEXA=1]="HEXA",t[t.RGB=2]="RGB",t[t.RGBA=3]="RGBA",t[t.HSL=4]="HSL",t[t.HSLA=5]="HSLA",t}({});function r(t,r,n=1e-6){return Math.abs(t-r)[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})(?[a-f\\d]{2})?$/i.exec(t),n=r?.groups?.r,s=r?.groups?.g,o=r?.groups?.b,i=r?.groups?.a;if(void 0===n||void 0===s||void 0===o)throw new Error(`Invalid hex color code "${t}"`);return{r:n,g:s,b:o,a:i}}function i(t){const{a:r}=o(t);if(!r)return 1;return function(t,r,n){const s=t.toLocaleString("en",{useGrouping:!1,minimumFractionDigits:r,maximumFractionDigits:n});return Number(s)}(parseInt(r,16)/255,0,2)}function e(t){return t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4)}function a({rgb:{r:t,g:r,b:n}}){return.2126*e(t/255)+.7152*e(r/255)+.0722*e(n/255)}function h(t,r){const n=a(t),s=a(r);return(Math.max(n,s)+.05)/(Math.min(n,s)+.05)}class u{constructor(t,r,n,s=1){this.rgb=t,this.hsl=r,this.hsv=n,this.a=s}static BLACK=u.fromRGB({r:0,g:0,b:0});static WHITE=u.fromRGB({r:255,g:255,b:255});static fromRGB(t,n){if(t.r<0||t.g<0||t.b<0||t.r>255||t.g>255||t.b>255||n&&n<0||n&&n>1)throw Error(`Invalid RGB color: ${JSON.stringify(t)}, alpha: ${n}`);const s=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=Math.min(o,i,e),u=a-h;let c;const l=(a+h)/2,g=a;c=r(u,0)?0:r(g,o)?60*(0+(i-e)/u):r(g,i)?60*(2+(e-o)/u):60*(4+(o-i)/u),c%=360,c<0&&(c+=360);const f=0===l||1===l?0:(g-l)/Math.min(l,1-l);return{h:Math.round(c),s:f,l}}(t),o=function({r:t,g:n,b:s}){const o=t/255,i=n/255,e=s/255,a=Math.max(o,i,e),h=a-Math.min(o,i,e);let u;const c=a;u=r(h,0)?0:r(c,o)?60*(0+(i-e)/h):r(c,i)?60*(2+(e-o)/h):60*(4+(o-i)/h),u%=360,u<0&&(u+=360);const l=0===c?0:h/c;return{h:Math.round(u),s:l,v:c}}(t);return new u(t,s,o,n)}static fromHex(t,r){const n=function(t){const{r,g:n,b:s}=o(t);return{r:parseInt(r,16),g:parseInt(n,16),b:parseInt(s,16)}}(t),s=i(t);return u.fromRGB(n,r??s)}static fromHSV(t,r){const n=function({h:t,s:r,v:n}){const s=n*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromHSL(t,r){const n=function({h:t,s:r,l:n}){const s=(1-Math.abs(2*n-1))*r,o=t/60,i=s*(1-Math.abs(o%2-1));let e;e=o>=0&&o<=1?[s,i,0]:o>1&&o<=2?[i,s,0]:o>2&&o<=3?[0,s,i]:o>3&&o<=4?[0,i,s]:o>4&&o<=5?[i,0,s]:o>5&&o<=6?[s,0,i]:[0,0,0];const a=n-s/2;return{r:Math.round(255*(e[0]+a)),g:Math.round(255*(e[1]+a)),b:Math.round(255*(e[2]+a))}}(t);return u.fromRGB(n,r)}static fromInt(t,r){const n=function(t){return{r:t>>16&255,g:t>>8&255,b:255&t}}(t);return u.fromRGB(n,r)}static fromCSS(t,r){const n=function(t,r){const n=t.match(/^rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{rgb:{r:parseInt(t,10),g:parseInt(s,10),b:parseInt(o,10)},rgbAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(n){const{rgb:t,rgbAlpha:r}=n;return u.fromRGB(t,r)}const s=function(t){const r=t.match(/^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i);if(r)return r[1];return null}(t);if(s)return u.fromHex(s,r);const o=function(t,r){const n=t.match(/^hsla?\\((\\d+),\\s*(\\d+)%,\\s*(\\d+)%(?:,\\s*(\\d*(?:\\.\\d+)?))?\\)$/);if(n){const[t,s,o,i]=n.slice(1),e=r??parseFloat(i);return{hsl:{h:parseInt(t,10),s:parseInt(s,10)/100,l:parseInt(o,10)/100},hslAlpha:Number.isNaN(e)?void 0:e}}return null}(t,r);if(o){const{hsl:t,hslAlpha:r}=o;return u.fromHSL(t,r)}throw new Error(`Invalid or unsupported CSS color: ${t}`)}toCSS(r){switch(r){case t.HEX:return`#${n((o=this).rgb.r)}${n(o.rgb.g)}${n(o.rgb.b)}`;case t.HEXA:return function(t){return`#${n(t.rgb.r)}${n(t.rgb.g)}${n(t.rgb.b)}${n(Math.floor(255*t.a))}`}(this);case t.RGB:return function(t){return`rgb(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b})`}(this);case t.RGBA:return function(t){return`rgba(${t.rgb.r}, ${t.rgb.g}, ${t.rgb.b}, ${t.a})`}(this);case t.HSL:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsl(${r}, ${s(n)}, ${s(o)})`}(this);case t.HSLA:return function(t){const{h:r,s:n,l:o}=t.hsl;return`hsla(${r}, ${s(n)}, ${s(o)}, ${t.a})`}(this);default:throw new Error("Invalid or unsupported CSSColorFormat!")}var o}toRGBA255(){return{r:this.rgb.r,g:this.rgb.g,b:this.rgb.b,a:255*this.a}}contrastAdjust(t,r=4.5){let n=u.BLACK;if("light"===t&&(n=u.WHITE),n!==u.BLACK&&n!==u.WHITE)throw new Error("Only supports contrast calculation between black and white.");let s=h(this,n);if(s>=r)return this;let o=this.hsv.v,i=n===u.WHITE?-.02:.02,e=Number.MAX_VALUE,a=null;for(let t=0;t<100&&e>.07&&o>=0&&o<=1;t++){o=Math.min(o+i,1),a=u.fromHSV({h:this.hsv.h,s:this.hsl.s,v:o}),s=h(a,u.WHITE);const t=Math.round(10*Math.abs(s-r))/10;t>e&&(i*=-.5),e=t}return null===a?this:a}toString(){return`${this.rgb.r},${this.rgb.g},${this.rgb.b},${this.a}`}stringify(){return JSON.stringify(this)}static parse(t){const{rgb:r,hsl:n,hsv:s,a:o}=JSON.parse(t);return new u(r,n,s,o)}}class c{constructor(t,r){this.color=t,this.population=r}static fromColor(t,r){return new c(t,r)}static fromRGB(t,r){return new c(u.fromRGB(t),r)}}class l{constructor(t,r=[]){this._comparator=t,this._data=r}swap(t,r){[this._data[t],this._data[r]]=[this._data[r],this._data[t]]}compare(t,r){return this._comparator(this._data[t],this._data[r])}bubbleUp(t){for(;t>0;){const r=t-1>>>1;if(this.compare(t,r)>=0)break;this.swap(t,r),t=r}}bubbleDown(t){const r=this._data.length;for(;;){const n=1+(t<<1),s=n+1;let o=t;if(n0;)yield this.pop()}}const g=31;function f(t){const r=(t>>>10&31)<<3,n=(t>>>5&31)<<3,s=(t>>>0&31)<<3;return u.fromRGB({r,g:n,b:s})}function p(t,r){return Math.round((t>>>3)/r)<<3}function b({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return t*g*g+r*g+n-(s*g*g+o*g+i)}function m({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return r*g*g+t*g+n-(o*g*g+s*g+i)}function d({rgb:{r:t,g:r,b:n}},{rgb:{r:s,g:o,b:i}}){return n*g*g+r*g+t-(i*g*g+o*g+s)}class w{constructor(t,r){this.min=t,this.max=r}size(){return this.max-this.min+1}clampTo(t){this.min=this.max=t}extendTo(t){this.min=Math.min(this.min,t),this.max=Math.max(this.max,t)}}class _{_population=0;_spanR=new w(0,0);_spanG=new w(0,0);_spanB=new w(0,0);constructor(t){this._swatches=t,this.fitBox()}getVolume(){return this._spanR.size()*this._spanG.size()*this._spanB.size()}getColorCount(){return this._swatches.length}getAverageColor(){let t=0,r=0,n=0,s=0;for(const{color:o,population:i}of this._swatches)s+=i,t+=i*o.rgb.r,r+=i*o.rgb.g,n+=i*o.rgb.b;const o=p(t,s),i=p(r,s),e=p(n,s);return c.fromRGB({r:o,g:i,b:e},s)}canSplit(){return this.getColorCount()>1}split(){if(!this.canSplit())throw new Error("Can not split a box with only 1 color");const t=this.findSplitPoint(),r=new _(this._swatches.slice(t+1,this._swatches.length));return this._swatches.splice(t+1),this.fitBox(),r}fitBox(){this._population=0;for(let t=0;tt(r.color,n.color)));const r=Math.floor(this._population/2);for(let t=0,n=0;t=r)return Math.min(this._swatches.length-1,t);return 0}getLongestDimensionComparator(){const t=this._spanR.size(),r=this._spanG.size(),n=this._spanB.size();return t>=r&&t>=n?b:r>=t&&r>=n?m:d}}class M{queue=new l(((t,r)=>r.getVolume()-t.getVolume()));_swatches=[];constructor(t){this._options=t}static fromPixels(t,r){return new M(r).quantize(t)}quantize(t){const r=new Array(32768).fill(0);let n=0,s=0,o=0;for(let s=t.next();!s.done;s=t.next()){n++;r[((i=s.value)>>>0&255)>>3<<10|(i>>>8&255)>>3<<5|(i>>>16&255)>>3]++}var i;for(let t=0;tthis._options.maxColors&&(this._swatches=this.quantizePixels(this._options.maxColors)),{swatches:this._swatches,totalPixels:n,totalColors:s,totalSaturationFromHSV:o}}quantizePixels(t){this.queue.push(new _(this._swatches)),this.splitBoxes(t);const r=Array.from(this.queue.popAll()).map((t=>t.getAverageColor())),n=this._options.filter;return void 0!==n?r.filter((t=>n(t.color))):r}splitBoxes(t){for(;this.queue.size()null!==t&&r(t)>r(n)?t:n),null)}const x=30,S=80,R=2,A=.0016,B=.3,$=.1,G=45,I=.4,C=.6,E=.1,H=.02;function L(t,r,n){return(t-r)/(n-r)}function T(t){return(t%=360)<0?360+t:t}function y(t,r){const n=function(t){let r=Number.MAX_VALUE;for(const n of t)r=Math.min(r,n);r=-1*Math.abs(r);let n=0,s=360;for(const o of t){const t=T(o+r);t<180&&t>n&&(n=t),t>=180&&t=n.hue1&&r<=n.hue2?L(T(r),n.hue1,n.hue2):(s=360-n.hue2,L(T(r+s),0,T(n.hue1+s)))}function F(t,r){const n=t.map((t=>t.color.hsv.h)),s=function(t){let r=0,n=0;for(const s of t)r+=Math.cos(s/180*Math.PI),n+=Math.sin(s/180*Math.PI);const s=r/t.length,o=n/t.length,i=180*Math.atan2(o,s)/Math.PI%360;return i>=0?i:360-Math.abs(i)}(n),o=y(n,s);return o>I||o{return t.population/r>H||(n=t.color.hsv.h,o=s,i=G,Math.min(Math.abs(o-n),360-Math.abs(o-n))t.population/r>=A)).filter((t=>!(o>=$+E)||function({hsv:t}){return(t.v>.85||t.v<.15)&&t.s<.2||t.v<.15||t.s<.2||t.s<.2&&t.v<.4?0:(t.v+t.s)/2}(t.color)>=B));if(0===i.length)return null;const e=F(i,r),a=function(t){return t.map((t=>t.color.hsv.h)).every((t=>t>=x&&t<=S))}(e);return v(e,(t=>P(t,a,r)))}const D={min:.3,target:.5,max:.7},N={min:0,target:.26,max:.45},q={min:.55,target:.74,max:1},k={min:.35,target:1,max:1},V={min:0,target:.3,max:.4},X={saturation:.24,luminance:.52,population:.24},O={vibrantLight:{lightness:q,saturation:k,weights:X},vibrant:{lightness:D,saturation:k,weights:X},vibrantDark:{lightness:N,saturation:k,weights:X},mutedLight:{lightness:q,saturation:V,weights:X},muted:{lightness:D,saturation:V,weights:X},mutedDark:{lightness:N,saturation:V,weights:X}},U=c.fromRGB({r:83,g:83,b:83},1),J=c.fromRGB({r:83,g:83,b:83},1),j=c.fromRGB({r:127,g:127,b:127},1);function W(t,r){const{color:{hsl:n}}=t;return n.s>=r.saturation.min&&n.s<=r.saturation.max&&n.l>=r.lightness.min&&n.l<=r.lightness.max}function K(t,r,n){const{color:{hsl:s}}=t;let o=0,i=0,e=0;return r.weights.saturation>0&&(o=r.weights.saturation*(1-Math.abs(s.s-r.saturation.target))),r.weights.luminance>0&&(i=r.weights.luminance*(1-Math.abs(s.l-r.lightness.target))),r.weights.population>0&&(e=r.weights.population*(t.population/n)),o+i+e}let Y=function(t){return t[t.ARRAY_BUFFER=0]="ARRAY_BUFFER",t[t.IMAGE_BITMAP=1]="IMAGE_BITMAP",t}({});const Q=self;const Z=t=>!function({hsl:t}){return t.l<=.05}(t)&&!function({hsl:t}){return t.l>=.95}(t)&&!function({hsl:t}){return t.h>=10&&t.h<=37&&t.s<=.82}(t)&&function({hsv:t}){return t.v>.2}(t);Q.addEventListener("message",(t=>{const[r,n]=t.data,s=function(t){if(t.source===Y.IMAGE_BITMAP){const r=t.data,n=new OffscreenCanvas(r.width,r.height).getContext("2d");return n.drawImage(r,0,0,r.width,r.height),n.getImageData(0,0,r.width,r.height).data.buffer}return t.data}(n),o=function*(t,r){const n=new Uint32Array(t),s=Math.ceil(n.length/r);for(let t=0;tt.population)),a={};for(const[r,n]of Object.entries(o)){const s=v(t.filter((t=>!i.has(t.color.toString()))).filter((t=>W(t,n))),(t=>K(t,n,e?.population||1)));null!==s&&(a[r]=s,i.add(s.color.toString()))}const h=z(Object.values(a),r,n,s),u=h?c.fromColor(h.color.contrastAdjust("dark"),1):null,l=h?c.fromColor(h.color.contrastAdjust("light"),1):null;return{dominantSwatch:e,visRefSwatch:h||U,visRefDarkSwatch:u||J,visRefLightSwatch:l||j,visRefIsFallback:null===h,targetSwatches:a}}(i.swatches,i.totalPixels,i.totalColors,i.totalSaturationFromHSV);Q.postMessage([r,{colorRawJson:e.color.stringify(),colorLightJson:h.color.stringify(),colorDarkJson:a.color.stringify()}])}))})();\n',"Worker",void 0,void 0)};let c=0;async function l(t){const r=c++,n=new Promise(((t,n)=>{u.addEventListener("message",(n=>{const[o,i]=n.data;o===r&&t({colorRaw:s.Q.parse(i.colorRawJson),colorDark:s.Q.parse(i.colorDarkJson),colorLight:s.Q.parse(i.colorLightJson)})})),u.addEventListener("error",n)}));return u.postMessage([r,t],[t.data]),await n}async function g(t){let r;try{r=await async function(t){const r=new Image;return r.crossOrigin="anonymous",function(t){const r=0===t.indexOf("spotify:image:"),n=0===t.indexOf("spotify:mosaic:"),s=0===t.indexOf("spotify:localfileimage:");return r||n||s}(t)?r.src=`${o}?uri=${encodeURIComponent(t)}`:r.src=t,await r.decode(),r}(t)}catch(t){return Promise.resolve(h.A)}const n=r.naturalWidth,s=r.naturalHeight;if("createImageBitmap"in window&&"OffscreenCanvas"in window){const t=await window.createImageBitmap(r);return await async function(t){return await l({source:i.IMAGE_BITMAP,data:t})}(t)}const e=document.createElement("canvas"),a=e.getContext("2d");return e.width=n,e.height=s,a.drawImage(r,0,0,n,s),await async function(t){return await l({source:i.ARRAY_BUFFER,data:t.data.buffer})}(a.getImageData(0,0,n,s))}}}]); +//# sourceMappingURL=838.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/8676.js b/dot-config/spicetify/Extracted/Themed/xpui/8676.js new file mode 100755 index 00000000..e5153eb7 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/8676.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8676],{98676:(e,r,a)=>{a.d(r,{x:()=>L});const t="playback-bar",s="playback-bar__progress-time-elapsed",o="gglUjikTBtMzCZFgSmpS",n="dN6OLjjcmnuleiECu55A",l="DSdahCi0SDG37V9ZmsGO",i="playback-progressbar-container";var c=a(30758),u=a(97500),g=a.n(u),d=a(95530),p=a(14343),b=a(31417),h=a(27607),x=a(68815),f=a(78505),v=a(62021),m=a(82935);const w="main-playbackBarRemainingTime-container";var y=a(86070);const k=({position:e,duration:r,isPreview:a,semanticColor:t="textSubdued",isFullscreenMode:s=!1,className:o})=>{const[n,l]=(0,v.x)(f.fC,!1),i=(0,c.useCallback)((()=>{a||l(!n)}),[n,l,a]);return(0,y.jsx)(d.E,{as:"div","data-testid":"playback-duration","data-test-position":e,variant:s?"bodyMedium":"marginal",className:g()(w,o),onClick:i,semanticColor:t,children:n?`-${(0,m.f)(r-e)}`:(0,m.f)(r)})};var S=a(77567),C=a(58685),_=a(5805);const M="Bn7RYdPUyzN4qo1bC1Ic",N="OEe8k2xe6o6x9x0FAc4b",j=[{name:"Anakin",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"7px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_anakin.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Luke",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(135, 220, 90)","--blur-glow-color":"#1ed760","--blur-radius":"16px","--spread-radius":"4px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_luke.png")})`,"--saber-hilt-overlap":"5px"}},{name:"Vader",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"10px","--core-color":"white","--edge-glow-color":"rgb(229, 17, 21)","--blur-glow-color":"#cd1a2b","--blur-radius":"20px","--spread-radius":"14px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_vader.png")})`,"--saber-hilt-overlap":"6px"}},{name:"Rey",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"8px","--core-color":"white","--edge-glow-color":"rgb(249, 164, 11)","--blur-glow-color":"rgb(253, 175, 33)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_rey.png")})`,"--saber-hilt-overlap":"3px"}},{name:"Leia",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(55, 132, 214)","--blur-glow-color":"#2e77d0","--blur-radius":"16px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_leia.png")})`,"--saber-hilt-overlap":"2px"}},{name:"Mace",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"9px","--core-color":"white","--edge-glow-color":"rgb(90, 22, 167)","--blur-glow-color":"rgb(172, 57, 193)","--blur-radius":"20px","--spread-radius":"8px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_mace.png")})`,"--saber-hilt-overlap":"1px"}},{name:"Ahsoka",vars:{"--bg-color":"","--fg-color":"transparent","--is-active-fg-color":"transparent","--progress-bar-height":"6px","--core-color":"white","--edge-glow-color":"rgb(255,255,255)","--blur-glow-color":"rgb(255,255,255)","--blur-radius":"20px","--spread-radius":"5px","--saber-hilt-url":`url(${(0,S.b)("images/sw_saber_ahsoka1.png")})`,"--saber-hilt-overlap":"-9px","--saber-hilt-width":"100px","--saber-hilt-height":"36px"}}],F=["spotify:playlist:37i9dQZF1DXaUaRhCgtpCo","spotify:playlist:69BOXIItwwyxTgdz6flzvU","spotify:playlist:37i9dQZF1DWUgUvAPAFxdh"],O=["official_star_wars","kirbysayshi","hansencc"],E=/Star Wars/i,z="THX1138",D=z.length;function P({onChange:e}){const r=function(){const[e,r]=(0,c.useState)([]),[a,t]=(0,c.useState)(!1);return(0,c.useEffect)((()=>{const s=s=>{for(e.push(s.key);e.length>D;)e.shift();e.join("")===z&&t(!a),r([...e])};return window.addEventListener("keypress",s),()=>{window.removeEventListener("keypress",s)}}),[e,a]),(0,C.o)((e=>{const r=e?.context.uri??"",a=e?.context?.metadata?.context_owner??"",t=e?.item??void 0;return!!F.includes(r)||!!O.includes(a)||!!(0,_.v)(t)&&(E.test(t.name)||E.test(t.album.name))}))||a}(),{next:a,config:t}=function(e){const[r,a]=(0,c.useState)(0);return{next:()=>{a((r+1)%j.length)},config:e?j[r]:null}}(r),s=(0,c.useRef)(e);return s.current=e,(0,c.useEffect)((()=>{s.current(t?.vars??null)}),[t]),t?(0,y.jsx)("div",{className:M,children:(0,y.jsx)("button",{"data-testid":"saber-hilt-button","aria-label":b.Ru.get("playback-control.a11y.lightsaber-hilt-button",t?.name),className:N,style:t.vars,onClick:a})}):null}var A=a(9473),B=a(90813);const I=["spotify:playlist:37i9dQZF1DXc3KPAjGyPdm"];var R=a(38501),T=a(87182),U=a(86931),$=a(43398);const q=1e3,L=({isPreview:e,isFullscreenMode:r=!1,timerPlacement:a="inline",onChange:u,onDragStart:f,onDragEnd:v})=>{const w=(0,p.NC)(R.O14),[S,_]=(0,c.useState)(null),M=(0,T.z)(),N=(0,C.o)((e=>e),((e,r)=>e?.duration===r?.duration&&e?.hasContext===r?.hasContext&&e?.restrictions?.canSeek===r?.restrictions?.canSeek)),{seekBackward:j,seekForward:F,seekOffsetMs:O}=(0,$.p)(),E=N?.duration??0,z=N?.hasContext??!1,D=N?.restrictions?.canSeek??!1,[L,X,Z]=(0,U.S)(q),[Q,V]=(0,c.useState)(null),W=null!==Q?Q:L,G=null!==Q?Q:L+(w&&!Z?q:0),H=e=>{V(e*E),f?.()},K=(W>0||E>0)&&"true"!==N?.item?.metadata?.is_narration,Y=(0,m.f)(K?W:NaN),J=(0,m.f)(K?E:NaN),ee=function(){const e=(0,B.S)()!==A.z.CLOSED,r=(0,C.o)((e=>{const r=e?.context.uri??"";return I.includes(r)}));return!e&&r}(),re=(0,x.O)(),ae="above"===a?n:o;return(0,y.jsxs)("div",{className:g()(t,ae),children:["indicatorOnly"!==a&&(0,y.jsx)(d.E,{"data-testid":"playback-position",as:"div",variant:r?"bodyMedium":"marginal",className:s,semanticColor:r?"textBase":"textSubdued",children:Y}),(0,y.jsxs)("div",{className:i,children:[z?(0,y.jsx)(P,{onChange:e=>{_(e)}}):null,(0,y.jsx)(h.z2,{labelText:b.Ru.get("playback-control.a11y.seek-slider-button"),value:G,updateFrequency:q,offFrequencyUpdate:Z,max:E,step:O,"aria-valuetext":b.Ru.get("download.progress-global",Y,J),isInteractive:z&&K,onDragStart:H,onDragMove:H,onDragEnd:(e,{wasDraggedBeforeReleased:r})=>{if(V(null),v?.(),!D)return;const a=e*E;X(a),M.seekTo(a);const t=r?"drag":"hit";u?.(a,t)},onStepBackward:()=>{if(!D)return;const e=j();X(Math.max(0,Math.min(E,L-e)))},onStepForward:()=>{if(!D)return;const e=F();X(Math.max(0,Math.min(E,L+e)))},saberConfig:S,isPlayingStrangerThings:ee,isAttackOnTitanEasterEggActive:re,"data-testid":"playback-progressbar",enableAnimation:w,showValueAsTimeOverHandle:"indicatorOnly"===a})]}),"indicatorOnly"!==a&&(0,y.jsx)(k,{position:W,duration:K?E:NaN,isPreview:e,semanticColor:r?"textBase":"textSubdued",isFullscreenMode:r,className:l})]})}},9473:(e,r,a)=>{a.d(r,{z:()=>t.z});var t=a(1961)},90813:(e,r,a)=>{a.d(r,{S:()=>t.S});var t=a(19732)}}]); +//# sourceMappingURL=8676.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/8858.js b/dot-config/spicetify/Extracted/Themed/xpui/8858.js new file mode 100755 index 00000000..ac4e1adc --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/8858.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8858],{64652:(e,t,a)=>{a.d(t,{A:()=>m});var i=a(30758),n=a(99623),s=a(14343),r=a(17429),l=a(68750),o=a(555),c=a(29195),d=a(38501),u=a(1599);const m=function(e){const[t,a]=(0,i.useState)(),[m,h]=(0,i.useState)(!1),g=(0,c.vh)(),p=(0,s.NC)(d.SAn,{loadingValue:!1});return{data:t,error:m,getLeavebehinds:(0,i.useCallback)((async()=>{try{const t=await r.b6(u.n.getInstance(),(0,l.Fh)(e.surface),e.uri,e.playlistName,p);a(t.body)}catch(t){const a=t;g.send((0,n.G)({error_type:"fetchAdsFailure",error_message:a.name,http_error_code:a.status,surface:(0,l.Fh)(e.surface),request_type:"leavebehindAds",ad_content_origin:(0,o.Zl)(e.surface)})),h(!0)}}),[g,e.playlistName,e.surface,e.uri,p])}}},75040:(e,t,a)=>{a.d(t,{k:()=>d});var i=a(30758),n=a(31417),s=a(57239),r=a(89402),l=a(36025),o=a(7971),c=a(86070);const d=({id:e,children:t,targetURI:a,fadeOut:d=!1})=>{const u=(0,i.useCallback)((()=>{window.open((0,l.rw)(a).href)}),[a]),m={getTitle:()=>n.Ru.get("action-trigger.available-in-app-only"),getDescription:()=>n.Ru.get("action-trigger.listen-mixed-media-episode"),primaryButtonText:()=>n.Ru.get("action-trigger.button.get-app"),secondaryButtonText:()=>n.Ru.get("action-trigger.button.not-now"),isCTA:!0,intentPrimaryButton:"download-app",onLogInteraction:(0,r.W)(),shouldHideOnScroll:!0,fadeOut:d};return(0,c.jsx)(s.U,{className:o.A.container,id:e,onPrimaryButtonClick:u,options:m,children:t})}},87018:(e,t,a)=>{a.d(t,{X:()=>l});var i=a(97500),n=a.n(i),s=a(55760),r=a(86070);const l=({children:e})=>(0,r.jsx)("div",{className:n()(s.A.imageContainer,s.A.imageContainerNew),children:e})},2070:(e,t,a)=>{a.d(t,{B:()=>r});var i=a(95530),n=a(55760),s=a(86070);const r=({children:e})=>(0,s.jsx)(i.E,{variant:"bodySmall",className:n.A.pretitle,children:e})},1227:(e,t,a)=>{a.d(t,{g:()=>l});var i=a(95530),n=a(98712),s=a(51354),r=a(86070);const l=({children:e,className:t})=>{const a=(0,s.y)()===n.E.SMALL?"bodyMediumBold":"titleSmall";return(0,r.jsx)(i.E,{variant:a,"data-testid":"entityAuthor",className:t,children:e})}},13922:(e,t,a)=>{a.d(t,{N:()=>y});var i=a(30758),n=a(95530),s=a(31417),r=a(48896),l=a(86070);const o=i.memo((function({text:e,onTimeStampClick:t,children:a,className:s,enableTimestamps:o=!1}){const c=(0,i.useMemo)((()=>(0,l.jsx)(r.q,{html:e,onTimeStampClick:t,enableTimestamps:o})),[e,o,t]);return(0,l.jsxs)(n.E,{as:"div",variant:"bodyMedium",className:s,children:[c,a]})})),c="show-show-moreButton",d=(0,i.memo)((function({text:e,onTimeStampClick:t,onToggle:a,className:i,enableTimestamps:r}){return(0,l.jsx)(o,{className:i,text:e,onTimeStampClick:t,enableTimestamps:r,children:(0,l.jsx)("button",{"aria-expanded":!1,className:c,onClick:a,children:(0,l.jsxs)(n.E,{variant:"bodyMediumBold",children:["… ",s.Ru.get("show_more")]})})})})),u=(e,t,a)=>{const i=s.Ru.get("show_more").length,n=e.length+i+6;return a<=1&&n{const f=Math.round(g.length/a);if(h+=f>0?f:1,m)return null;const x=i-(h-f);if(!(p+1===e.length&&(u(g,a,x)||f<=x))&&h>=i){m=!0;const e=((e,t,a)=>{const i=s.Ru.get("show_more").length;if(u(e,t,a))return e;const n=t*a-i-6;return e.slice(0,n)})(g,a,x);return(0,l.jsx)(d,{text:e,onTimeStampClick:t,onToggle:n,className:r,enableTimestamps:c},p)}return(0,l.jsx)(o,{className:r,text:g,onTimeStampClick:t,enableTimestamps:c},p)})).filter((e=>null!==e)).map(((e,t,a)=>t+1===a.length?e:[e," "])).flat();return(0,l.jsx)(l.Fragment,{children:g})}));var h=a(42878);const g="TQXhY8PT8v1vogxO85c_",p="RKzJftL6TOVUXkXOPykT",f="mCKPqUiNNAO6GM3nRBXe",x=(e,t)=>({...e,...t}),b=(e="")=>e.split(/[ \u00a0]{2}/).filter(Boolean),v=(e="")=>e.replace("

","").split(/(?:<\/p>)/).filter(Boolean),y=(0,i.memo)((function({content:e,htmlContent:t,maxLines:a=2,className:c,onTimeStampClick:d=(()=>{}),onExpanded:u,enableTimestamps:y=!1,enableAutomaticLinkification:j=!1,isOpen:C=null}){const[N,_]=(0,i.useReducer)(x,(e=>({isOpen:e,contentWidth:0}))(C)),{isOpen:k,contentWidth:T}=N,S=(0,i.useRef)(null),E=(0,i.useRef)(!0),w=(0,i.useCallback)((()=>{_({isOpen:!k}),u&&u(!k)}),[k,u]);(0,i.useEffect)((()=>{_({isOpen:C})}),[e,C]),(0,i.useEffect)((()=>{null!==N.isOpen&&(E.current?E.current=!1:S.current?.querySelector("button[aria-expanded]")?.focus())}),[N.isOpen]);const A=T?T/7.8:Number.MAX_VALUE,R=(0,i.useCallback)((e=>{e&&(S.current=e,_({contentWidth:e.clientWidth}))}),[]),P=(0,i.useMemo)((()=>t?v(t).map((e=>(0,l.jsx)(r.q,{html:e,onTimeStampClick:d,enableTimestamps:y,enableAutomaticLinkification:j},e))):((e,t,a)=>b(e).map(((e,i)=>(0,l.jsx)(o,{className:p,text:e,onTimeStampClick:t,enableTimestamps:a},i))))(e,d,y)),[e,y,j,t,d]),L=(0,i.useMemo)((()=>t?v(t):b(e)),[e,t]);return(0,h.s)((()=>{S.current&&_({contentWidth:S.current.clientWidth})})),(0,l.jsx)("div",{className:c,children:(0,l.jsxs)("div",{ref:R,className:g,children:[k&&(0,l.jsxs)(l.Fragment,{children:[P,(0,l.jsx)("button",{"aria-expanded":!0,className:f,onClick:w,children:(0,l.jsx)(n.E,{variant:"bodyMediumBold",children:s.Ru.get("show_less")})})]}),!k&&(0,l.jsx)(m,{className:p,paragraphs:L,clickHandler:d,enableTimestamps:y,maxCharactersPerLine:A,maxLines:a,toggleExpandedState:w})]})})}))},48896:(e,t,a)=>{a.d(t,{q:()=>c});var i=a(30758),n=a(97500),s=a.n(n),r=a(38702),l=a(87794),o=a(86070);const c=i.memo(i.forwardRef((function({html:e,onTimeStampClick:t,enableTimestamps:a=!1,enableAutomaticLinkification:n=!1,semanticColor:c="textSubdued",className:d,asTextContent:u=!1},m){const h=(0,i.useMemo)((()=>(0,r.v)(e,t,a,c,n,u)),[a,n,e,t,c,u]);return(0,o.jsx)("div",{ref:m,className:s()(l.A.HTMLDescription,d),children:h})})))},38702:(e,t,a)=>{a.d(t,{v:()=>f});var i=a(30758),n=a(6936),s=a.n(n),r=a(95530);const l=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var o=a(21082),c=a(86070);const d=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,u=/^https?:\/\//;function m(e){return"string"==typeof e?(0,c.jsx)(c.Fragment,{children:e.split(d).map(((e,t)=>t%2?(0,c.jsx)(o.N,{to:`${u.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}var h=a(74786),g=a(87794);const p=(e=(()=>{}),t,a,n)=>{let s=0;const l={_:(e,t,r)=>{const l=void 0===t?e:r;return(0,c.jsx)(i.Fragment,{children:a&&!n?m(l):l},"fragment"+s++)}};if(n)return l;return{...l,p:e=>(0,c.jsx)(r.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:g.A.Paragraph,children:a?m(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,c.jsx)(h.D,{onClick:e,children:t.children}):t.href?(0,c.jsx)(o.N,{to:t.href,children:t.children}):(0,c.jsx)(c.Fragment,{children:t.children}),ul:e=>(0,c.jsx)("ul",{className:g.A.List,children:e.children}),ol:e=>(0,c.jsx)("ol",{className:g.A.List,children:e.children}),li:e=>(0,c.jsx)(r.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:g.A.ListItem,children:a?m(e.children):e.children}),br:()=>(0,c.jsx)("br",{}),h1:e=>(0,c.jsx)(r.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h2:e=>(0,c.jsx)(r.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h3:e=>(0,c.jsx)(r.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h4:e=>(0,c.jsx)(r.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h5:e=>(0,c.jsx)(r.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),h6:e=>(0,c.jsx)(r.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:g.A.Heading,children:e.children}),time:t=>(0,c.jsx)(h.D,{onClick:e,children:t.children})}},f=(e,t=(()=>{}),a=!1,i="textSubdued",n=!1,r=!1)=>{const o=a?e.split(l).map((e=>e.match(l)?`()`:e)).join(""):e;let c;try{c=s()(o,{transform:p(t,i,n,r),dangerouslySetChildren:[]})}catch{c=e}return c}},14409:(e,t,a)=>{a.d(t,{x:()=>l});var i=a(99701),n=a(64281);const s="BO7X8b8_SQhDyCjS0EOv";var r=a(86070);const l=({gatedEntityRelations:e})=>{if(!e)return!1;const t=e?.entitiesWithValueProps?.at(0),a=t?.valueProps.at(0)?.displayText,l=t?.summary?.forUserWithoutAccess;if(!a||!t)return null;const o=(0,r.jsx)(n.E,{text:a,className:s});return l?(0,r.jsx)(i.Zp,{label:l||a,children:o}):o}},99730:(e,t,a)=>{a.d(t,{P:()=>m});var i=a(14343),n=a(14409),s=a(45807),r=a(38501),l=a(99041),o=a(54003),c=a(18663),d=a(15838),u=a(86070);const m=({episode:e})=>{const t=(0,i.NC)(r.MCN,{loadingValue:!1}),{badges:a}=(0,d.b)((e=>"contentRating"in e)(e)?{contentRating:e?.contentRating?.label,isPaywalled:e.podcastSubscription?.isPaywalled}:{isExplicit:e?.isExplicit,isMOGEFRestricted:e?.is19PlusOnly,isPaywalled:e.podcastSubscription?.isPaywalled}),m=e.gatedEntityRelations&&e.gatedEntityRelations.entitiesWithValueProps.at(0),h=t&&(0,s.B)(m,e);return(0,u.jsxs)(u.Fragment,{children:[a.explicit&&(0,u.jsx)(l.U,{}),h?(0,u.jsx)(n.x,{gatedEntityRelations:e.gatedEntityRelations}):a.paid&&(0,u.jsx)(o.y,{}),a.nineteen&&(0,u.jsx)(c.q,{size:16})]})}},62814:(e,t,a)=>{a.d(t,{q:()=>v});var i=a(85387),n=a(97848),s=a(23041),r=a(79871),l=a(81670),o=a(86677),c=a(96250),d=a(14343),u=a(51747),m=a(22726),h=a(38501),g=a(32255),p=a(21549),f=a(7307);const x="_WHBoDpH7mFsuuTElglC";var b=a(86070);const v=({className:e,showCoverArt:t,gatedEntityCoverArt:a,gatedEntityRelations:v,upsellExplanation:y,hasAccess:j,showValueProps:C=!0})=>{const N=(0,d.NC)(h.MCN,{loadingValue:!1}),{spec:_,logger:k}=(0,p.r)(u.L,{}),T=(0,i.Zp)(),S=v?.entitiesWithValueProps.at(0);if(!N||!S?.summary||!y)return null;const{uri:E,valueProps:w,summary:A,fallbackNavigation:R}=S,P=0===w.length;let L,M,O,B=!1;if(j){if(!A.forUserWithAccess||P)return null;L=A.forUserWithAccess,O=(0,m.o_h)(E)?.toURLPath(!0)}else{if(!R&&P)return null;if(R)L=R.description,O=(0,m.o_h)(R.uri)?.toURLPath(!0);else{L=A.forUserWithoutAccess;M=C&&w.length>1?w.map((({displayText:e})=>e)):null,B=!0}}return(0,b.jsx)(n.v,{id:E,variant:"tinted","data-testid":"gated-podcast-banner",className:e,leading:Boolean(t)?(0,b.jsx)(g.b,{images:a||[],shape:g.u.ROUNDED_CORNERS,type:f.c.SHOW,title:L,className:x}):void 0,title:(0,b.jsx)(s.d,{lineClamp:2,children:L}),subtitle:M&&(0,b.jsx)(r.j,{hasTextSeparator:!0,lineClamp:2,children:M}),...O?{onClick:()=>{T(O),k.logInteraction(_.fallbackNavigationRowFactory().hitUiNavigate({destination:O}))},trailing:(0,b.jsx)(l.V,{size:"small",semanticColor:"textSubdued"})}:{trailing:B?(0,b.jsx)(o.$,{size:"small",iconLeading:c.H,href:y.url,target:"_blank",onClick:()=>{k.logInteraction(_.upsellButtonFactory().hitNavigateToExternalUri({destination:y.url}))},children:y.cta}):null}})}},45807:(e,t,a)=>{a.d(t,{B:()=>i,v:()=>n});const i=(e,t)=>!!e&&e.uri===t.uri,n=(e,t)=>!!e&&e.entitiesWithValueProps.at(0)?.uri===t},12755:(e,t,a)=>{a.d(t,{u:()=>r});var i=a(30758),n=a(95365),s=a(86070);const r=({pageId:e,uri:t,children:a})=>{const r=(0,n.u)(),l=(0,n.H)();return(0,i.useEffect)((()=>{r?.reportPageView({pageId:e,navigationalRoot:l??void 0,entityUri:t})}),[e,l,r,t]),(0,s.jsx)(s.Fragment,{children:a})}},44825:(e,t,a)=>{a.d(t,{C:()=>p});var i=a(30758),n=a(14343),s=a(89402),r=a(38501);const l=e=>e<=64?"small":e>640?"xlarge":e>300?"large":"standard";function o(e,t){return e.filter((e=>e.label?e.label===t:e.width?l(e.width)===t:!!e.height&&l(e.height)===t))[0]}var c=a(43798);var d=a(41031);function u(e){const t=o(e,"standard"),a=o(e,"large"),i=o(e,"small"),n=o(e,"xlarge");return{image_url:t?.url,image_height:t?.height?.toString(),image_width:t?.width?.toString(),image_url_large:a?.url,image_height_large:a?.height?.toString(),image_width_large:a?.width?.toString(),image_url_small:i?.url,image_height_small:i?.height?.toString(),image_width_small:i?.width?.toString(),image_url_xlarge:n?.url,image_height_xlarge:n?.height?.toString(),image_width_xlarge:n?.width?.toString()}}var m=a(87182),h=a(2679),g=a(7307);function p(e,t){const a=(0,s.W)(),l=(0,m.z)(),{isPlaying:o,isActive:p}=(0,h.te)(e?.uri||""),{isActive:f}=(0,h.l_)(t?.uri||""),x=(0,n.NC)(r.pZ0);return(0,i.useCallback)((i=>{if(!t||!e)return;const n=function(e,t,a=!1){const i=(e.coverArt?.sources||[]).sort(((e,t)=>(t.width||0)-(e.width||0))),n=(0,c.QH)(e,t),s=(0,c.gf)(t)||n,r=e.mediaTypes&&e.mediaTypes.includes(d.Cx.Video)?"video":"audio";return{uri:e.uri,title:e.name,subtitle:t.name,type:"episode",album_uri:t.uri,album_title:t.name,artist_uri:t.uri,artist_name:t.name,...u(i),media_type:a?r:"audio",isTrailer:n,anonymousPlaybackAllowed:s}}(e,t,x);f&&!o&&p&&!i?l.resume():f&&o&&!i?(a({type:"click",intent:"pause",targetUri:e.uri}),l.pause()):(a({type:"click",intent:"play",targetUri:e.uri}),l.play({uri:t.uri,pages:[{items:[{type:g.c.EPISODE,uri:e.uri,uid:null,metadata:n,provider:null}]}]},{referrerIdentifier:l.getReferrer(),featureIdentifier:"episode"},i))}),[t,e,x,f,o,p,l,a])}},58337:(e,t,a)=>{a.d(t,{H:()=>l});var i=a(30758),n=a(85505),s=a(47095),r=a(37948);function l(e=null,t=n.l0o){const{backgroundColor:a}=(0,s.oI)(),l=(0,s.as)(),o=(0,r.z)(e);return(0,i.useEffect)((()=>(l((0,s.Mo)(o)),()=>{l((0,s.Hf)())})),[o,l]),a||t}},87794:(e,t,a)=>{a.d(t,{A:()=>i});const i={Heading:"playlist-playlist-heading",HTMLDescription:"playlist-playlist-playlistDescription",List:"playlist-playlist-list",ListItem:"playlist-playlist-listItem",Paragraph:"playlist-playlist-paragraph"}}}]); +//# sourceMappingURL=8858.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/8925.js b/dot-config/spicetify/Extracted/Themed/xpui/8925.js new file mode 100755 index 00000000..71f715d4 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/8925.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[8925],{78925:(e,t,l)=>{l.r(t),l.d(t,{CtaButton:()=>i,default:()=>u});var a=l(30758),n=l(63123),o=l(85505),s=l(86677),c=l(21082),r=l(86070);const i=({"aria-label":e,text:t,onClick:l,clickUrl:i,backgroundColor:u,className:d})=>{const b=(0,a.useMemo)((()=>{if(!u)return;const e=(0,n.mA)(u);return{...e,text:{...e.text,base:o.LLE}}}),[u]);return(0,r.jsx)(c.N,{"aria-label":e||t,className:d,"data-testid":"ad-cta-button",to:i,onClick:e=>{e.stopPropagation(),l()},children:(0,r.jsx)(s.$,{UNSAFE_colorSet:b,colorSet:"invertedLight",size:"small",children:t})})},u=i}}]); +//# sourceMappingURL=8925.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/94.js b/dot-config/spicetify/Extracted/Themed/xpui/94.js new file mode 100755 index 00000000..0005d637 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/94.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[94],{60094:(e,n,t)=>{t.r(n),t.d(n,{default:()=>i});var r=t(62411),a=t(22726),l=t(32411),o=t(89775),s=t(86070);const d=({href:e,adEventReason:n,...t})=>{const a=(0,r.wA)();return(0,s.jsx)("a",{...t,href:e,onClick:()=>{a((0,o.q5)(n))},target:"_blank",rel:"noopener noreferrer",children:t.children})},f=({href:e,adEventReason:n,...t})=>e?(0,s.jsx)(d,{...t,href:e,adEventReason:n}):(0,s.jsx)("div",{...t}),i=({item:e,adEventReason:n,...t})=>(0,s.jsx)(f,{...t,adEventReason:n,"data-testid":"context-link","data-context-item-type":e.type,style:{border:"none"},href:(n=>{if(n)return(0,a.o_h)(n)?e.url?(0,l.H)(e.url):void 0:n})(e.url)})}}]); +//# sourceMappingURL=94.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/9512.js b/dot-config/spicetify/Extracted/Themed/xpui/9512.js new file mode 100755 index 00000000..d3361eac --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/9512.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9512],{6904:(e,t,n)=>{n.d(t,{A:()=>u});var s=n(30758),a=n(97500),i=n.n(a),r=n(22726),o=n(75411),l=n(86070);const c="div";class d extends s.Component{constructor(e){super(e),this.state={isDropTargetActive:!1},this.enterEventCount=0,this.leaveEventCount=0}componentDidMount(){document.body.addEventListener("dragend",this.handleDragEnd)}shouldComponentUpdate(e,t){return t.isDropTargetActive!==this.state.isDropTargetActive||e.children!==this.props.children||e.onDragEnter!==this.props.onDragEnter||e.onDragLeave!==this.props.onDragLeave||e.onDrop!==this.props.onDrop||e.types.length!==this.props.types.length||e.types.some(((e,t)=>e!==this.props.types[t]))}componentWillUnmount(){document.body.removeEventListener("dragend",this.handleDragEnd)}handleDragOver=e=>{this.getMatchingMimeTypes(e).length>0&&(e.preventDefault(),e.dataTransfer.dropEffect="copy")};handleDragEnter=e=>{this.enterEventCount&&!e.relatedTarget||(this.enterEventCount++,1===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.props.onDragEnter?.(e),this.setState({isDropTargetActive:!0})))};handleDragLeave=e=>{this.leaveEventCount++,this.leaveEventCount===this.enterEventCount&&this.getMatchingMimeTypes(e).length>0&&(this.enterEventCount=0,this.leaveEventCount=0,this.props.onDragLeave?.(e),this.setState({isDropTargetActive:!1}))};handleDragEnd=()=>{this.enterEventCount=0,this.leaveEventCount=0};handleDrop=e=>{if(0===this.getMatchingMimeTypes(e).length)return;const{onDragLeave:t,onDrop:n}=this.props,s=this.getMatchingDropData(e);this.enterEventCount=0,this.leaveEventCount=0;const a=e.defaultPrevented;e.preventDefault(),t?.(e),a||n(e,s),this.setState({isDropTargetActive:!1})};getMatchingMimeTypes(e){const t=this.props.types;return Array.from(e.dataTransfer.types).filter((e=>t.includes(e)))}getMatchingDropData(e){const t=this.getMatchingMimeTypes(e),n={};t.forEach((t=>{const s=e.dataTransfer.getData(t),a=0===t.indexOf("text/x-spotify"),i=a?s.split("\n"):[s];n[t]=i.map((e=>{if(a){const t=(0,r.o_h)(e);if(t)return t.toURI()}return e})).filter((e=>!!e))}));const s=e.dataTransfer.getData("text/plain");return n.all=s?s.split("\n").map((e=>{const t=(0,r.o_h)(e);return t?t.toURI():e})):[],n}render(){const{types:e=[],as:t=c,testId:n,className:s=""}=this.props,a=t,r=e.filter(Boolean).map((e=>`GlueDropTarget--${e.replace("text/x-spotify-","")}`));return(0,l.jsx)(a,{className:i()("GlueDropTarget",r,{"GlueDropTarget--active":this.state.isDropTargetActive},s),onDragOver:this.handleDragOver,onDragEnter:this.handleDragEnter,onDragLeave:this.handleDragLeave,onDrop:this.handleDrop,onContextMenu:this.props.onContextMenu,"data-testid":n,children:this.props.children})}}const u=e=>{const{supportsDragAndDrop:t}=(0,o._)();if(!t){const t=e.as??c;return(0,l.jsx)(t,{children:e.children})}return(0,l.jsx)(d,{...e})}},30536:(e,t,n)=>{n.d(t,{s:()=>i});var s=n(95530),a=n(86070);const i=({variant:e})=>(0,a.jsx)(s.E,{variant:e,semanticColor:"textBase",children:"Spotify"})},91127:(e,t,n)=>{n.d(t,{R:()=>d});var s=n(30758),a=n(62411),i=n(22726),r=n(2963),o=n(6904),l=n(27012),c=n(86070);const d=({uri:e,owner:t,children:n})=>{const d=(0,a.wA)(),u=(0,a.d4)((e=>e.session.user?.id)),m=(0,i.tbX)(e),p=(0,s.useCallback)(((t,n)=>{const s=[...n[l.O[i.NQG.ALBUM]]||[],...n[l.O[i.NQG.TRACK]]||[],...n[l.O[i.NQG.LOCAL_TRACK]]||[],...n[l.O[i.NQG.EPISODE]]||[]];s.length>0&&d((0,r.io)(e,s))}),[d,e]);return m&&t===u?(0,c.jsx)(o.A,{types:[l.O[i.NQG.ALBUM],l.O[i.NQG.TRACK],l.O[i.NQG.EPISODE],l.O[i.NQG.LOCAL]],onDrop:p,testId:"cover-drop-target",children:n}):(0,c.jsx)(c.Fragment,{children:n})}},4041:(e,t,n)=>{n.d(t,{a:()=>h});var s=n(30758),a=n(97500),i=n.n(a),r=n(31417),o=n(64143),l=n(29543),c=n(53133),d=n(60384),u=n(61451),m=n(5805),p=n(86070);const h=({context:e,item:t,className:n,onClick:a=(()=>{})})=>{const{dislikeEndpoint:h,shouldShowFeedbackControls:g}=(0,l.d)(e),{enqueueSnackbar:v}=(0,c.d)(),x=e.metadata?.[u.W.CONTEXT_DESCRIPTION]??"",{setDislikeFeedback:f}=(0,d.I)({uri:t.uri,setFeedbackPath:h,contextUri:e.uri}),y=(0,s.useCallback)((async()=>{f(),v(r.Ru.get("feedback.hide-song",x)),a?.()}),[f,v,x,a]);return(0,m.v)(t)&&g?(0,p.jsx)(o.O,{className:i()(n,{"control-button":!n,"control-button-feedback":!n}),isDisliked:!1,onClick:y}):null}},68599:(e,t,n)=>{n.d(t,{g:()=>h});var s=n(30758),a=n(97500),i=n.n(a),r=n(95530),o=n(31417),l=n(41616);const c="w0kwPDoelauN3C9dVoVe",d="xzLZD9uD3b4u9wecXAJY",u="DaFhhSm73r7rNpomErhI";var m=n(86070);const p=({children:e})=>(0,m.jsx)(m.Fragment,{children:e}),h=(0,s.forwardRef)((function({users:e,maxSlots:t=3,size:n,withoutOverflowBadge:s=!1,dropShadow:a=!1,AvatarWrapper:h=p},g){const v=Math.max(2,t),x=e.length>v?e.length-v+1:0,f=e.slice(0,v),{userIconSize:y,width:b,smallFontSize:D,largeFontSize:C}=(e=>{switch(e){case"xxlarge":return{userIconSize:"xlarge",width:64,smallFontSize:24,largeFontSize:32};case"xlarge":return{userIconSize:"large",width:48,smallFontSize:18,largeFontSize:24};case"large":return{userIconSize:"medium",width:32,smallFontSize:12,largeFontSize:16};case"medium":default:return{userIconSize:"small",width:24,smallFontSize:9,largeFontSize:12};case"small":return{userIconSize:"xsmall",width:18,smallFontSize:8,largeFontSize:10}}})(n),E=x>9?D:C,S=(0,m.jsx)("span",{className:i()(d,"encore-inverted-light-set"),style:{width:b,height:b},role:"presentation",children:(0,m.jsx)(r.E,{variant:"bodySmallBold",style:{fontSize:E},semanticColor:"textBase",children:`+${x}`})});return(0,m.jsx)("div",{className:i()(c),ref:g,children:f.map(((e,t)=>!s&&x>0&&t===v-1?(0,m.jsx)(h,{index:t,children:(0,m.jsx)(l.e,{images:[],userIconSize:y,label:o.Ru.get("web-player.social-connect.facepile.and-others",x),width:b,piled:!0,customPlaceholder:S})},"others"):(0,m.jsx)(h,{index:t,user:e,children:(0,m.jsx)(l.e,{images:e.images,userIconSize:y,label:e.displayName,displayName:e.displayName,username:e.username,width:b,piled:t>0,imageClassName:a?u:void 0})},e.displayName)))})}))},57969:(e,t,n)=>{n.d(t,{g:()=>c});var s=n(30758),a=n(92443),i=n(76730),r=n(25016),o=n(82662),l=n(53481);function c(){const e=(0,r.V)(),t=(0,l.u)(),[n,c]=(0,s.useState)(null),d=(0,s.useCallback)((async()=>{const n=e.getDefaultDevice();if(null===n)return void c(null);if(n.transportType!==a.Yg.BLUETOOTH)return void c({audioDevice:n});const s=await t.lookup(n.name);c({audioDevice:n,externalAccessory:s})}),[e,t]);return(0,o.k)(i.B.DEVICE_CONNECTED,d),(0,s.useEffect)((()=>{d()}),[d]),n}},31233:(e,t,n)=>{n.d(t,{l:()=>c});var s=n(14343),a=n(82921),i=n(79237),r=n(62642),o=n(43329);const l={id:"",connectStateId:"",name:"",type:r.bq.COMPUTER,isGroup:!1,isLocal:!0,isActive:!0,isConnecting:!1,isDisabled:!1,volume:0,losslessSupport:{fullySupported:!1,deviceSupported:!1,userEligible:!1},supportsLogout:!1,supportedMediaTypes:null},c=()=>{const e=(0,s.NC)(o.vF),t=(0,a.Z)(),{activeDevice:n,devices:r}=(0,i.v)((n=>({activeDevice:e?t.getActiveDevice():n.activeDevice,devices:e?t.getDevices():n.devices})));return{currentDevice:n??l,devices:r}}},29839:(e,t,n)=>{n.d(t,{r:()=>h});var s=n(30758),a=n(62411),i=n(10495),r=n(30631),o=n(28874),l=n(40339),c=n(53328),d=n(8428),u=n(62844),m=n(47756),p=n(92333);function h(){const e=(0,a.d4)(o.u),t=(0,a.wA)(),{setYlxSidebarState:n}=(0,u.sy)(),{mainLandmarkRef:h,lyricsCinemaRef:g}=(0,i.JT)(),{isActive:v,panelSend:x}=(0,l.AI)(d.Z.NowPlayingView);return{mode:e,setMode:(0,s.useCallback)((e=>{e===m.YU.cinema&&v?(g.current?.classList.add(p.A.lyricsCinemaVisible),h.current?.classList.add(p.A.nonDisplayedArea),n(u.fX.COLLAPSED),x(c.$S.NPV_BUTTON_CLICK)):(g.current?.classList.remove(p.A.lyricsCinemaVisible),h.current?.classList.remove(p.A.nonDisplayedArea),v||x(c.$S.NPV_BUTTON_CLICK)),t((0,r.gh)(e))}),[t,x,v,g,h,n])}}},20675:(e,t,n)=>{n.d(t,{P:()=>u,X:()=>d});var s=n(31417),a=n(75497),i=n(13947),r=n(45627),o=n(5805),l=n(4861),c=n(85907);function d(e){return(0,o.v)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.artists.map((({name:e})=>e)).join(s.Ru.getSeparator())):(0,r.p)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.show.name):(0,i.d)(e)?s.Ru.get("playback-control.now-playing-label",e.name,e.book.name):(0,a.N)(e)?s.Ru.get("ad-formats.advertisement"):(0,l.v)(e)?void 0:(0,c.d)(e)}function u(e){let t=d(e);return t||(t=s.Ru.get("queue.now-playing")),t}},29543:(e,t,n)=>{n.d(t,{d:()=>s});const s=e=>{const t=e?.metadata?.["dislike-endpoint"]??null;return{dislikeEndpoint:t,shouldShowFeedbackControls:"1"===e?.metadata?.["dislike-feedback-available"]&&null!==t}}},20883:(e,t,n)=>{n.d(t,{e:()=>g});var s=n(30758),a=n(21082),i=n(85425),r=n(20675),o=n(75497),l=n(13947),c=n(45627),d=n(5805),u=n(4861),m=n(85907),p=n(86070);const h=(0,s.lazy)((()=>n.e(94).then(n.bind(n,60094)))),g=({context:e,index:t,item:n,isVisible:g,children:v,className:x,referrer:f,onClick:y,adEventReason:b})=>{const D=(0,r.P)(n),C=n.type,E=g?void 0:-1;if((0,d.v)(n)||(0,c.p)(n)||(0,l.d)(n)){const s=(0,i.O)(e,n,t);return s?(0,p.jsx)(a.N,{className:x,referrer:f,"data-testid":"context-link","data-context-item-type":C,style:{border:"none"},to:s.to,search:s.search,"aria-label":D,tabIndex:E,onClick:y,children:v}):(0,p.jsx)(p.Fragment,{children:v})}return(0,o.N)(n)?(0,p.jsx)(s.Suspense,{fallback:(0,p.jsx)(p.Fragment,{children:v}),children:(0,p.jsx)(h,{item:n,"aria-label":D,tabIndex:E,adEventReason:b,children:v})}):(0,u.v)(n)?(0,p.jsx)(p.Fragment,{children:v}):(0,m.d)(n)}},49885:(e,t,n)=>{n.d(t,{j:()=>m});var s=n(30758),a=n(16273),i=n(50486),r=n(92443),o=n(43013),l=n(23805),c=n(89133),d=n(11388);const u={headphoneDevice:null,audioDevice:null,predictedState:null,isOnboarded:!1,currentState:{externalizationEnabled:!1,specificEnabled:!1},contentRestrictions:{specificRestricted:!1,externalizationRestricted:!1,processingCapabilitiesRestricted:!1},toggleTuneHeadphones:null,toggleTuneStudio:null,setFilterState:()=>Promise.resolve()},m=()=>{const e=(0,l.N)(),t=(0,a.jE)(),n=(0,o.l)(),m=(0,s.useMemo)((()=>["puffin-current-device"]),[]),{data:p,isLoading:h,isError:g}=(0,i.I)({queryKey:m,queryFn:async()=>await e.getFilterState(),gcTime:5e3,staleTime:5e3});var v;return v=()=>{t.invalidateQueries({queryKey:m})},(0,d.G)(c.n.UPDATE,v),{deviceFilterState:!n&&p||u,isMaybeHeadphoneDevice:(0,r.lS)(p?.audioDevice),isLoading:h,isError:g}}},15645:(e,t,n)=>{n.d(t,{o:()=>r});var s=n(30758),a=n(49885),i=n(62021);const r=()=>{const{deviceFilterState:e}=(0,a.j)(),t=(0,s.useMemo)((()=>e.audioDevice?.id),[e.audioDevice?.id]),[n,r]=(0,i.x)("onboarding-dismissed:puffin",{}),o=(0,s.useCallback)((()=>{t&&r({...n,[t]:(n[t]??0)+1})}),[t,n,r]);return{isDeviceDismissed:(0,s.useMemo)((()=>!!t&&n[t]>=3),[t,n]),incrementDismissCountForDevice:o}}},16514:(e,t,n)=>{n.d(t,{o:()=>w});var s=n(30758),a=n(97500),i=n.n(a),r=n(65503),o=n(52898),l=n(41562),c=n(14503),d=n(22726),u=n(31417),m=n(99701),p=n(38165),h=n(98712),g=n(51354),v=n(608),x=n(11893),f=n(33329),y=n(21549);const b="VcqCvLW71lZT4kqnCgt0";var D=n(86070);const C=({contextUri:e="",uri:t,id:n=t,className:a,canAdd:d})=>{const{description:x}=(0,v.f)(),C=(0,f.s)(),{spec:E}=(0,y.r)(c.A,{data:{uri:e}}),S=(0,s.useCallback)((()=>{C.logInteraction(E.undoButtonFactory({uri:t}).hitUiHide())}),[C,E,t]),w=(0,s.useCallback)((()=>{C.logInteraction(E.removeRecommendationButtonFactory({uri:t}).hitRemoveRecommendation({recommendedItemUri:t,contextUri:e}))}),[e,C,E,t]),A=(0,s.useCallback)((()=>{C.logInteraction(E.addRecommendationButtonFactory({uri:t}).hitAddToPlaylist({playlist:e,itemToBeAdded:t}))}),[e,C,E,t]),{removeRecommendation:N,addRecommendation:k,canRemoveRecommendation:R,canAddRecommendation:T}=(0,p.t)({uri:t,uid:n,contextUri:e,onUndo:S,onRemoveRecommendation:w,onAddRecommendation:A}),F=(0,s.useCallback)((()=>x?u.Ru.get("web-player.smart-shuffle.add-to-playlist-button",x):u.Ru.get("web-player.smart-shuffle.add-to-playlist-button-fallback")),[x]),I=(0,g.y)();return(0,D.jsxs)("div",{className:i()(b,a),children:[R&&(0,D.jsx)(m.Zp,{label:u.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),children:(0,D.jsx)(r.H,{onClick:N,iconOnly:o.P,size:I===h.E.MEDIUM?"medium":"small","aria-label":u.Ru.get("web-player.smart-shuffle.removed-from-recommendations-button"),condensedAll:!0})}),d&&T&&(0,D.jsx)(m.Zp,{label:F(),children:(0,D.jsx)(r.H,{onClick:k,iconOnly:l.P,size:I===h.E.MEDIUM?"medium":"small","aria-label":F(),condensedAll:!0})})]})},E=e=>{const t=(0,x.J)(e.contextUri);return(0,D.jsx)(C,{...e,canAdd:t?.canAdd??!1})},S=e=>(0,D.jsx)(C,{...e,canAdd:!0}),w=e=>e.contextUri&&(0,d.tbX)(e.contextUri)?(0,D.jsx)(E,{...e,contextUri:e.contextUri}):e.contextUri&&(0,d.Z0m)(e.contextUri)?(0,D.jsx)(S,{...e,contextUri:e.contextUri}):(0,D.jsx)(C,{...e,canAdd:!1})},64333:(e,t,n)=>{n.d(t,{c:()=>i,t:()=>r});var s=n(22726);const a=e=>({url:e}),i=e=>{const t=[];return e.largeImageUrl?t.push(a(e.largeImageUrl)):e.imageUrl&&t.push(a(e.imageUrl)),{displayName:e.displayName,images:t,username:e.username,uri:(0,s.Qjr)(e.username).toURI()}},r=(e,t,n)=>{const s=[],a=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId));a&&s.push(a);const r=e.isSessionOwner?void 0:e?.sessionMembers.find((({username:e})=>e===t));r&&(n?.userFirst?s.unshift(r):s.push(r));const o=e.sessionMembers.filter((({username:n,id:s})=>s!==e.sessionOwnerId&&n!==t));return[...s,...o].map(i)}},45836:(e,t,n)=>{n.d(t,{K:()=>f});var s=n(30758),a=n(62411),i=n(65238),r=n(95530),o=n(31417),l=n(75610),c=n(68599),d=n(64333),u=n(83123),m=n(22726),p=n(21549);var h=n(69693);const g="UWuPbrFbZar0lIcBFH31",v="wFkvSGFYuw6rhfwWWYWC";var x=n(86070);const f=()=>{const{currentSession:e}=(0,h.D)(),t=(0,a.d4)((({session:e})=>e.user?.id)),{logJamNameClick:n}=(()=>{const{spec:e,logger:t}=(0,p.r)(u.V,{});return{logJamNameClick:(0,s.useCallback)((()=>{const n=e.jamNameFactory().hitUiNavigate({destination:(0,m.K72)().toURI()});t.logInteraction(n)}),[t,e])}})(),{openQueue:f}=(0,l.R)(),y=(0,s.useCallback)((()=>{n(),f()}),[n,f]);if(!e?.active)return null;const b=e.sessionMembers.find((({id:t})=>t===e.sessionOwnerId)),D=(0,d.t)(e,t,{userFirst:!0});return(0,x.jsxs)("div",{className:g,children:[(0,x.jsx)(c.g,{users:D,dropShadow:!0,size:"small"}),(0,x.jsx)(i.Y,{className:v,onClick:y,semanticColor:"textBase",tabIndex:0,standalone:!0,children:(0,x.jsx)(r.E,{variant:"bodySmallBold",children:o.Ru.get("web-player.social-connect.session-info.title",{host:b?.displayName??""})})})]})}},20916:(e,t,n)=>{n.d(t,{v:()=>i});var s=n(23805),a=n(65292);const i=()=>{const e=(0,s.N)(),t="1"===(0,a.$)("is-puffin");return e.isAvailable()&&t}},11388:(e,t,n)=>{n.d(t,{G:()=>i});var s=n(30758),a=n(23805);function i(e,t){const n=(0,s.useRef)(t),i=(0,a.N)();n.current=t,(0,s.useEffect)((()=>{const t=i.getFiltersEvents();return t?.addListener(e,(e=>{n.current(e)}))}),[e,i])}},90754:(e,t,n)=>{n.d(t,{c:()=>o});var s=n(30758),a=n(66530),i=n(10565),r=n(66238);function o(e,t){const n=(0,i.d)(),o=(0,r.A)(t),l=(0,a.a)();(0,s.useEffect)((()=>n.getBroadcastingEvents().addListener(e,(e=>{l()&&o(e)}))),[n,o,e,l])}},92333:(e,t,n)=>{n.d(t,{A:()=>s});const s={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",lyricsCinemaVisible:"sgQuNaOh5Eu6vnzh3eoh",nonDisplayedArea:"KJNUWtMTBWtQrmsas64b",Container:"F3qS5Fne4ECzEWyFeJ5S",Controls:"dS_1_x4lBrx_vX9AMg6Q",Content:"mC8gFZzy9ZRO5c61MeuO"}}}]); +//# sourceMappingURL=9512.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/9549.js b/dot-config/spicetify/Extracted/Themed/xpui/9549.js new file mode 100755 index 00000000..7af69566 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/9549.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9549],{21394:(e,t,a)=>{a.d(t,{M:()=>u});var r=a(79209),i=a(25493),n=a(27012),s=a(68266),l=a(63547);const o="profile-editImage-imageContainer",d="profile-editImage-editImageButtonContainer";var c=a(86070);const u=function({onClick:e,name:t,images:a,canEdit:u,placeholderType:m,shape:h=i.u.SQUARE,dragUri:p=""}){const[g,x]=(0,s.P)(a),A=(0,l.b)(g,x)===l.g.loaded,{draggable:C,onDragStart:E}=(0,n.P)({itemUris:[p],dragLabelText:t});return(0,c.jsxs)("div",{className:o,"data-testid":`${m}-image`,draggable:C&&!!p,onDragStart:E,children:[(0,c.jsx)(i.b,{loading:"eager",name:t,images:a,placeholderType:m,shape:h}),u&&(0,c.jsx)("div",{className:d,children:(0,c.jsx)(r.a,{overlay:A,onClick:e,rounded:h===i.u.CIRCLE})})]})}},79209:(e,t,a)=>{a.d(t,{a:()=>g});var r=a(97500),i=a.n(r),n=a(10599),s=a(95530),l=a(31417);const o="main-editImage-buttonContainer",d="main-editImageButton-image",c="main-editImageButton-overlay",u="main-editImageButton-rounded",m="main-editImageButton-icon",h="main-editImageButton-copy";var p=a(86070);const g=function({overlay:e=!1,rounded:t=!1,onClick:a}){return(0,p.jsx)("div",{className:o,children:(0,p.jsx)("button",{"data-testid":"edit-image-button",className:i()(d,{[u]:t,[c]:e}),"aria-haspopup":"true",onClick:a,type:"button",children:(0,p.jsxs)("div",{className:i()(m,"icon"),children:[(0,p.jsx)(n.G,{size:"xlarge","aria-hidden":"true"}),(0,p.jsx)(s.E,{variant:"bodyMedium",className:h,children:l.Ru.get("choose_photo")})]})})})}},87018:(e,t,a)=>{a.d(t,{X:()=>l});var r=a(97500),i=a.n(r),n=a(55760),s=a(86070);const l=({children:e})=>(0,s.jsx)("div",{className:i()(n.A.imageContainer,n.A.imageContainerNew),children:e})},81113:(e,t,a)=>{a.d(t,{r:()=>n});const r={container:"GI8QLntnaSCh2ONX_y2c"};var i=a(86070);function n({children:e}){return(0,i.jsx)("div",{className:r.container,children:e})}},95510:(e,t,a)=>{a.d(t,{r:()=>x});var r=a(57292),i=a(50866),n=a(97500),s=a.n(n),l=a(31417),o=a(97701);const d=36e5,c=864e5;var u=a(67174);const m="poz9gZKE7xqFwgk231J4";function h(e,t){return e-e%t}var p=a(86070);const g=({durationMs:e,className:t})=>{const a=e>c;let r;var i;r=a?c:h(i=e,i>36e6?d:i>18e6?18e5:i>36e5?9e5:i>18e5?3e5:6e4);const{hours:n,minutes:g}=(0,o.S)(r);if(0===n&&0===g)return null;let x=(0,u.j)({h:n,m:g,s:0});return x=a?l.Ru.get("time.over",x):l.Ru.get("time.estimated",x),(0,p.jsx)("span",{className:s()(m,t),children:x})};function x({durationMs:e,isEstimate:t}){return 0===e?null:(0,p.jsx)(r.q,{children:t?(0,p.jsx)(g,{durationMs:e}):(0,p.jsx)(i.d,{durationMs:e})})}},75061:(e,t,a)=>{a.d(t,{W:()=>d});var r=a(97500),i=a.n(r),n=a(95530),s=a(31417),l=a(48046),o=a(86070);function d(){return(0,o.jsx)(n.E,{"data-separator":!0,variant:"bodySmall",semanticColor:"textSubdued",className:i()(l.A.separator,l.A.textSeparator),children:s.Ru.getSeparator()})}},2070:(e,t,a)=>{a.d(t,{B:()=>s});var r=a(95530),i=a(55760),n=a(86070);const s=({children:e})=>(0,n.jsx)(r.E,{variant:"bodySmall",className:i.A.pretitle,children:e})},81067:(e,t,a)=>{a.d(t,{Z:()=>h});var r=a(30758),i=a(85387),n=a(64820),s=a(95530),l=a(86677),o=a(31417),d=a(24533);const c="hOOwEKqNuXrNvOCB1SgZ",u="csEdkIN9z2LjJIuZraqz";var m=a(86070);const h=({uri:e})=>{const[t,a]=(0,d.A)(e),h=(0,i.Zp)(),p=(0,r.useCallback)((()=>{a(!1),h("/",{replace:!0})}),[h,a]);return(0,m.jsxs)("div",{className:c,children:[(0,m.jsx)(n.b,{size:"xxlarge"}),(0,m.jsxs)("div",{className:u,children:[(0,m.jsx)(s.E,{as:"p",variant:"titleSmall",children:o.Ru.get("forbidden-page.title")}),(0,m.jsx)(s.E,{as:"p",variant:"bodySmall",children:o.Ru.get("forbidden-page.description")})]}),t&&(0,m.jsx)(l.$,{colorSet:"invertedLight",onClick:p,children:o.Ru.get("remove_from_your_library")})]})}},48896:(e,t,a)=>{a.d(t,{q:()=>d});var r=a(30758),i=a(97500),n=a.n(i),s=a(38702),l=a(87794),o=a(86070);const d=r.memo(r.forwardRef((function({html:e,onTimeStampClick:t,enableTimestamps:a=!1,enableAutomaticLinkification:i=!1,semanticColor:d="textSubdued",className:c,asTextContent:u=!1},m){const h=(0,r.useMemo)((()=>(0,s.v)(e,t,a,d,i,u)),[a,i,e,t,d,u]);return(0,o.jsx)("div",{ref:m,className:n()(l.A.HTMLDescription,c),children:h})})))},38702:(e,t,a)=>{a.d(t,{v:()=>x});var r=a(30758),i=a(6936),n=a.n(i),s=a(95530);const l=/(\((?:[0-9]{1,3}:){1,2}[0-9]{2}\))/g;var o=a(21082),d=a(86070);const c=/((?:(?:https?:\/\/)|www\.)(?:(?:(?:[a-z\u00a1-\uffff0-9][-_]*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?:[/?#][^\s"]*)?)/gi,u=/^https?:\/\//;function m(e){return"string"==typeof e?(0,d.jsx)(d.Fragment,{children:e.split(c).map(((e,t)=>t%2?(0,d.jsx)(o.N,{to:`${u.test(e)?"":"https://"}${e}`,children:e},t):e))}):e}var h=a(74786),p=a(87794);const g=(e=(()=>{}),t,a,i)=>{let n=0;const l={_:(e,t,s)=>{const l=void 0===t?e:s;return(0,d.jsx)(r.Fragment,{children:a&&!i?m(l):l},"fragment"+n++)}};if(i)return l;return{...l,p:e=>(0,d.jsx)(s.E,{as:"p",variant:"bodyMedium",semanticColor:t,className:p.A.Paragraph,children:a?m(e.children):e.children}),a:t=>t.href?.startsWith("#t=")?(0,d.jsx)(h.D,{onClick:e,children:t.children}):t.href?(0,d.jsx)(o.N,{to:t.href,children:t.children}):(0,d.jsx)(d.Fragment,{children:t.children}),ul:e=>(0,d.jsx)("ul",{className:p.A.List,children:e.children}),ol:e=>(0,d.jsx)("ol",{className:p.A.List,children:e.children}),li:e=>(0,d.jsx)(s.E,{as:"li",variant:"bodyMedium",semanticColor:t,className:p.A.ListItem,children:a?m(e.children):e.children}),br:()=>(0,d.jsx)("br",{}),h1:e=>(0,d.jsx)(s.E,{as:"h1",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h2:e=>(0,d.jsx)(s.E,{as:"h2",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h3:e=>(0,d.jsx)(s.E,{as:"h3",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h4:e=>(0,d.jsx)(s.E,{as:"h4",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h5:e=>(0,d.jsx)(s.E,{as:"h5",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),h6:e=>(0,d.jsx)(s.E,{as:"h6",variant:"bodyMediumBold",semanticColor:t,className:p.A.Heading,children:e.children}),time:t=>(0,d.jsx)(h.D,{onClick:e,children:t.children})}},x=(e,t=(()=>{}),a=!1,r="textSubdued",i=!1,s=!1)=>{const o=a?e.split(l).map((e=>e.match(l)?`()`:e)).join(""):e;let d;try{d=n()(o,{transform:g(t,r,i,s),dangerouslySetChildren:[]})}catch{d=e}return d}},30416:(e,t,a)=>{a.d(t,{d:()=>g});var r=a(30758),i=a(31417),n=a(38682),s=a(67239),l=a(95446),o=a(4266);const d={"custom-order":l.RB,"title-and-artist-title":{column:o.$.TITLE_AND_ARTIST,order:o.H.ASC},"title-and-artist-artist":{column:o.$.TITLE_AND_ARTIST,order:o.H.SECONDARY_ASC},title:{column:o.$.TITLE,order:o.H.ASC},artist:{column:o.$.ARTIST,order:o.H.ASC},"added-by":{column:o.$.ADDED_BY,order:o.H.ASC},"added-at":{column:o.$.ADDED_AT,order:o.H.ASC},duration:{column:o.$.DURATION,order:o.H.ASC},album:{column:o.$.ALBUM,order:o.H.ASC},"album-or-podcast":{column:o.$.ALBUM_OR_PODCAST,order:o.H.ASC},"album-or-show":{column:o.$.ALBUM_OR_SHOW,order:o.H.ASC}},c={"title-and-artist-title":o.$.TITLE_AND_ARTIST,"title-and-artist-artist":o.$.TITLE_AND_ARTIST,title:o.$.TITLE,artist:o.$.ARTIST,"added-by":o.$.ADDED_BY,"added-at":o.$.ADDED_AT,duration:o.$.DURATION,album:o.$.ALBUM,"album-or-podcast":o.$.ALBUM_OR_PODCAST,"album-or-show":o.$.ALBUM_OR_SHOW},u={[o.H.NONE]:o.H.NONE,[o.H.ASC]:o.H.DESC,[o.H.DESC]:o.H.ASC,[o.H.SECONDARY_ASC]:o.H.SECONDARY_DESC,[o.H.SECONDARY_DESC]:o.H.SECONDARY_ASC},m={[o.$.INDEX]:{key:"custom-order",get value(){return i.Ru.get("sort.custom-order")}},[o.$.TITLE_AND_ARTIST]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.TITLE]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.ARTIST]:{key:"artist",get value(){return i.Ru.get("sort.artist")}},[o.$.ADDED_BY]:{key:"added-by",get value(){return i.Ru.get("sort.added-by")}},[o.$.ADDED_AT]:{key:"added-at",get value(){return i.Ru.get("sort.date-added")}},[o.$.DURATION]:{key:"duration",get value(){return i.Ru.get("sort.duration")}},[o.$.EVENT_DATE]:null,[o.$.EVENT_INFO]:null,[o.$.ALBUM]:{key:"album",get value(){return i.Ru.get("sort.album")}},[o.$.ALBUM_OR_PODCAST]:{key:"album-or-podcast",get value(){return i.Ru.get("sort.album-or-podcast")}},[o.$.ALBUM_OR_SHOW]:{key:"album-or-show",get value(){return i.Ru.get("sort.album-or-show")}},[o.$.PLAYS]:null,[o.$.RELEASE_DATE]:null,[o.$.ADD]:null,[o.$.ACTIONS]:null,[o.$.CONCERT_VENUE]:null,[o.$.CONCERT]:null,[o.$.TITLE_AND_AUTHOR]:{key:"title",get value(){return i.Ru.get("sort.title")}},[o.$.AUTHOR]:null,[o.$.BPM]:null,[o.$.KEY]:null,[o.$.VIBE]:null};var h=a(86070);function p(e){return!!e}const g=({columns:e,disabled:t,onSort:a})=>{const g=[...e],x=g.indexOf(o.$.TITLE_AND_ARTIST),A=g.indexOf(o.$.TITLE_AND_AUTHOR);-1!==x&&g.splice(x,1,o.$.TITLE,o.$.ARTIST),-1!==A&&g.splice(A,1);const{sortState:C,setSortState:E}=(0,r.useContext)(l.cL),T=function(e){return null===e.column?m[o.$.INDEX]:(0,n.kj)(e.column,e)?m[o.$.ARTIST]:m[e.column]}(C),b=(0,r.useCallback)((e=>{a?.(),E(((e,t,a)=>e?t!==c[e]?d[e]:{column:c[e],order:u[a]}:l.RB)(e,C.column,C.order))}),[a,E,C.column,C.order]),y=(0,r.useCallback)((()=>null!==C.column),[C.column]),v=g.map((e=>m[e])).filter(p);return(0,h.jsx)(s.g,{options:v,onSelect:b,selected:T,isSelectionChanged:y,sortOrder:C.order,heading:i.Ru.get("drop_down.sort_by"),disabled:t,enableViewModeMenu:!0})}},12835:(e,t,a)=>{a.d(t,{x:()=>U});var r=a(30758),i=a(95530),n=a(31417),s=a(65462),l=a(40675),o=a(21394),d=a(25577),c=a(87018),u=a(88711),m=a(46110),h=a(1246),p=a(2070),g=a(62986),x=a(99701),A=a(38702),C=a(48896),E=a(35895),T=a(63352),b=a(27438),y=a(73658),v=a(7858),S=a(93500),f=a(81113),j=a(95510),R=a(57292),N=a(21646),k=a(75061),_=a(79225);const I="JGhILoA1vonXX7tmvFj3";var D=a(86070);function L({creators:e,onCreatorClick:t,onPiledCreatorsClick:a,isTunaApplied:r,totalSaves:i,totalItems:s,durationMilliseconds:l,isEstimatedDuration:o,daylistNextUpdate:d,newEntries:c,hasTracks:u,hasEpisodes:m,hasAudiobooks:h}){return(0,D.jsxs)(y.X,{children:[(0,D.jsx)(v.j,{creators:e,onCreatorClick:t,onPiledCreatorsClick:a,isTunaApplied:r}),(0,D.jsx)(N.J,{}),i>0?(0,D.jsx)(R.q,{children:n.Ru.get("saves",i)}):null,(0,D.jsx)(N.J,{}),(0,D.jsxs)(f.r,{children:[(0,D.jsx)(S.G,{totalItems:s,containsAudiobooks:h,containsEpisodes:m,containsTracks:u}),(0,D.jsx)(k.W,{}),(0,D.jsx)(j.r,{durationMs:l,isEstimate:o})]}),(0,D.jsx)(N.J,{}),d&&(0,D.jsx)(R.q,{children:n.Ru.get("web-player.playlist.daylist.next-update",n.Ru.formatDate((0,_.ad)(d),{timeStyle:"short"}))}),c>0&&(0,D.jsx)(R.q,{className:I,children:n.Ru.get("chart.new-entries",c)})]})}var w=a(47362);const O=()=>!1;var M=a(26122),$=a(32999),B=a(33329),H=a(11860);const U=function({metadata:e,isPlaying:t,isPublished:a,togglePlay:y,backgroundColor:v,spec:S,specLikedSongs:f,totalItems:j,className:R}){const{uri:N,name:k,description:_="",images:I,totalLikes:U,duration:P,owner:X,isOwnedBySelf:F=!1,formatListData:G,madeFor:W=null,collaborators:z,hasSpotifyTracks:J,hasEpisodes:Y,hasSpotifyAudiobooks:K}=e,Z=G?.attributes||{},q=Z.header_image_url_desktop||Z.image_url||null,V=null!==q?[{url:q,width:null,height:null}]:[],Q="daylist"===G?.type?Z.expires:void 0,ee=(0,B.s)(),te=(0,r.useMemo)((()=>(0,w.c)(W,X,z?.items)),[W,X,z?.items]),ae=(0,r.useContext)(T.$$),re=(0,r.useContext)(b.VV),ie=(0,r.useCallback)((()=>{if(S){const e=S.ownerFactory().hitUiReveal();ee.logInteraction(e)}re({type:"open",uri:N})}),[re,N,S,ee]),ne=(0,r.useCallback)((e=>{if(S){const e=S?.descriptionTextFactory().hitUiReveal();ee.logInteraction(e)}ae({type:"open",playlistDetails:{name:k,description:_,image:I[0],uri:N},focusedElement:e})}),[S,ae,k,_,I,N,ee]),se=(0,r.useCallback)((()=>{if(S){const e=S.coverArtFactory().hitUiReveal();ee.logInteraction(e)}ae({type:"openWithImagePicker",playlistDetails:{name:k,description:_,image:I[0],uri:N}})}),[ae,k,_,I,N,ee,S]),le=(0,r.useCallback)(((e,t)=>{if(S){const e=S.ownerFactory().hitUiNavigate({destination:t.creator.uri});ee.logInteraction(e)}if(f){const e=f.ownerFactory().hitUiNavigate({destination:t.creator.uri});ee.logInteraction(e)}}),[ee,S,f]),oe=e.permissions?e.permissions?.isPrivate?n.Ru.get("private_playlist"):n.Ru.get("public_playlist"):n.Ru.get("playlist"),de=(0,D.jsx)(l.W,{uri:N,isPublished:a}),ce=(0,$._)(),ue=(0,r.useRef)(null),me=(0,M.K)({ref:ue});return(0,D.jsxs)(d.z,{backgroundColor:v,backgroundImages:V,className:R,children:[(0,D.jsxs)(m.h,{children:[(0,D.jsx)(E.D,{size:"medium",onClick:y,isPlaying:t,uri:N}),(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(h.X,{text:k,dragUri:N,dragLabel:k})})]}),q?null:(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(c.X,{children:(0,D.jsx)(o.M,{canEdit:F,name:k,images:ce(I,300)??[],onClick:se,placeholderType:"playlist",dragUri:N})})}),(0,D.jsxs)(u.Y,{children:[(0,D.jsx)(p.B,{children:oe}),(0,D.jsx)(s.h,{menu:de,children:(0,D.jsx)(g.mm,{canEdit:F,onClick:()=>{if(S){const e=S.titleFactory().hitUiReveal();ee.logInteraction(e)}ne(T.NV.TITLE)},dragUri:N,dragLabel:k,ariaLabel:n.Ru.get("playlist.edit-details.button",k),scaleAtMinWidth:g.tw,children:k})}),_&&(0,D.jsx)(x.Zp,{label:(0,A.v)(_),disabled:!me,children:(0,D.jsx)(i.E,{variant:"bodySmall",className:H.A.whiteOpacity,onClick:e=>{F&&(e=>{"href"in e.target||ne(T.NV.DESCRIPTION)})(e)},children:(0,D.jsx)(C.q,{ref:ue,html:_,onTimeStampClick:()=>{},className:H.A.playlistDescription})})}),(0,D.jsx)(L,{creators:te,onPiledCreatorsClick:ie,onCreatorClick:le,totalItems:j,totalSaves:U??0,durationMilliseconds:P?.milliseconds??0,isEstimatedDuration:!!P?.isEstimate,daylistNextUpdate:Q,newEntries:parseInt(Z.new_entries_count||"0",10),hasTracks:J??!1,hasEpisodes:Y??!1,hasAudiobooks:K??!1,isTunaApplied:O(e)})]})]})}},47362:(e,t,a)=>{function r(e){return e.user||null}function i(e){return!!e}function n(e,t=!1){return{id:e.username,uri:e.uri,name:e.username,displayName:e.displayName||void 0,images:e.images,isMadeFor:t}}function s(e,t,a=[]){return e?[n(e,!0)]:a.length>1?a.map(r).filter(i).map((e=>n(e))):[n(t)]}function l(e){return e.every((e=>"audiobook"===e?.type||null===e))}a.d(t,{R:()=>l,c:()=>s})},63547:(e,t,a)=>{a.d(t,{b:()=>n,g:()=>i});var r=a(30758);let i=function(e){return e[e.loading=0]="loading",e[e.loaded=1]="loaded",e[e.error=2]="error",e}({});function n(e,t){const a=e?i.loading:i.error,[n,s]=(0,r.useState)(a);return(0,r.useEffect)((()=>{const a=()=>{s(i.loaded)},r=()=>{s(i.error)};if(!e)return s(i.error),()=>{};s(i.loading);const n=document.createElement("img");return n.addEventListener("load",a),n.addEventListener("error",r),n.setAttribute("src",e),t&&n.setAttribute("srcSet",t),()=>{n.removeEventListener("load",a),n.removeEventListener("error",r)}}),[e,t]),n}},44898:(e,t,a)=>{function r(e,t){return{uri:e,playlistQueryOptions:t}}a.d(t,{A:()=>r})},87794:(e,t,a)=>{a.d(t,{A:()=>r});const r={Heading:"playlist-playlist-heading",HTMLDescription:"playlist-playlist-playlistDescription",List:"playlist-playlist-list",ListItem:"playlist-playlist-listItem",Paragraph:"playlist-playlist-paragraph"}},11860:(e,t,a)=>{a.d(t,{A:()=>r});const r={xs:"(min-width: 0px)",xsOnly:"(min-width: 0px) and (max-width: 767px)",sm:"(min-width: 768px)",smOnly:"(min-width: 768px) and (max-width: 1023px)",md:"(min-width: 1024px)",mdOnly:"(min-width: 1024px) and (max-width: 1279px)",lg:"(min-width: 1280px)",lgOnly:"(min-width: 1280px) and (max-width: 1919px)",xl:"(min-width: 1920px)",MINIMUM_HEADER_HEIGHT:"250px",MAXIMUM_HEADER_HEIGHT:"400px",IMAGE_SIZE:"192px",IMAGE_SIZE_BIG:"232px",BACKGROUND_HEIGHT_PERCENTAGE:"40vh",playlist:"playlist-playlist-playlist",searchBoxContainer:"playlist-playlist-searchBoxContainer",leadingSlot:"playlist-playlist-leadingSlot",recommendedTrackList:"playlist-playlist-recommendedTrackList",playlistContent:"playlist-playlist-playlistContent",playlistDescription:"playlist-playlist-playlistDescription",top:"playlist-playlist-top",header:"playlist-playlist-header",subtitle:"playlist-playlist-subtitle",refreshButton:"playlist-playlist-refreshButton",playlistImageContainer:"playlist-playlist-playlistImageContainer",playlistInlineCurationSection:"playlist-playlist-playlistInlineCurationSection",playlistInlineCurationTitle:"playlist-playlist-playlistInlineCurationTitle",playlistInlineCurationWrapper:"playlist-playlist-playlistInlineCurationWrapper",playlistInlineCurationCloseButton:"playlist-playlist-playlistInlineCurationCloseButton",playlistInlineCurationBackButton:"playlist-playlist-playlistInlineCurationBackButton",artistResultListTitle:"playlist-playlist-artistResultListTitle",seeMore:"playlist-playlist-seeMore",emptyStateContainer:"playlist-playlist-emptyStateContainer",searchResultListContainer:"playlist-playlist-searchResultListContainer",emptySearchTermContainer:"playlist-playlist-emptySearchTermContainer",whiteOpacity:"playlist-playlist-whiteOpacity",noBooklistSupportContainer:"playlist-playlist-noBooklistSupportContainer",concertsFooter:"playlist-playlist-concertsFooter",promoRow:"playlist-playlist-promoRow",promoTitle:"playlist-playlist-promoTitle",ctaLink:"playlist-playlist-ctaLink",promoImage:"playlist-playlist-promoImage",disclaimerContainer:"playlist-playlist-disclaimerContainer",icon:"playlist-playlist-icon"}}}]); +//# sourceMappingURL=9549.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/9705.css b/dot-config/spicetify/Extracted/Themed/xpui/9705.css new file mode 100755 index 00000000..50333471 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/9705.css @@ -0,0 +1 @@ +.lXCFF95KGbS0SOaHpdAB{max-height:100%;max-width:80%;overflow-y:auto;width:430px}._HgcBgHc6CvW_sHlxpho{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:flex-end}.O6O5YM0duU8pDRn1TejH,._HgcBgHc6CvW_sHlxpho{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%}.O6O5YM0duU8pDRn1TejH{background:var(--background-elevated-base);border-radius:5px;padding:16px 16px 40px;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;gap:8px;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.exAG_I7ORuHnlbPk7lg3{margin-bottom:8px;text-align:center}.gqTp9eYnllzbDIEjvXxF{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;background-color:var(--background-elevated-highlight);border-radius:5px;justify-content:center;margin-bottom:12px;min-width:220px;padding:12px 16px}.w88sM3XYAreRHd9N01v_{position:fixed;z-index:9999} \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/9705.js b/dot-config/spicetify/Extracted/Themed/xpui/9705.js new file mode 100755 index 00000000..6a95a400 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/9705.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[9705],{89705:(e,t,o)=>{o.r(t),o.d(t,{default:()=>R});var l=o(87150),s=o(30758),c=o(7315),n=o(95530),a=o(65503),r=o(50111),i=o(86677),d=o(96250),u=o(31417),p=o(44971),g=o(54926),x=o(19616),b=o(53133),C=o(33329),h=o(50671),v=o(33234);const m="lXCFF95KGbS0SOaHpdAB",j="_HgcBgHc6CvW_sHlxpho",_="O6O5YM0duU8pDRn1TejH",y="exAG_I7ORuHnlbPk7lg3",f="gqTp9eYnllzbDIEjvXxF";var k=o(86070);const F=e=>{const{enqueueSnackbar:t}=(0,b.d)(),o=(0,s.useMemo)((()=>e.url?e.spec?.restrictedAccessCodeModalFactory({uri:e.url}):void 0),[e.url,e.spec]),l=(0,s.useMemo)((()=>o?.copyButtonFactory()),[o]),p=(0,s.useMemo)((()=>o?.ctaButtonFactory()),[o]),x=(0,h.t)(o),m=(0,C.s)(),F=e.dates.start?(0,g.dp)((0,g.l4)(e.dates.start)):(0,g.dp)(new Date),R=e.dates.end?(0,g.dp)((0,g.l4)(e.dates.end)):void 0;return(0,k.jsxs)("section",{className:_,ref:x,children:[(0,k.jsx)("div",{className:j,children:(0,k.jsx)(H,{"aria-label":u.Ru.get("close"),iconOnly:c.M,size:"small",onClick:e.onClose})}),(0,k.jsx)(n.E,{variant:"titleSmall",semanticColor:"textBase",children:u.Ru.get("concert.presale.title")}),(0,k.jsxs)("div",{className:y,children:[(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.presale.code_description")}),F&&(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.presale.date_times",F,R)}),(0,k.jsx)(n.E,{as:"div",semanticColor:"textSubdued",children:u.Ru.get("concert.venue_dates")})]}),e.code&&(0,k.jsx)(a.H,{"data-testid":"code",className:f,iconTrailing:r._,onClick:()=>{l&&m.logInteraction(l.hitCopyToClipboard()),(e.copyToClipboard??v.l)(e.code),t(u.Ru.get("concert.code_copied"))},children:e.code}),(0,k.jsx)(i.$,{onClick:()=>{p&&e.url&&m.logInteraction(p.hitNavigateToExternalUri({destination:e.url}))},href:e.url,iconTrailing:d.H,target:"_blank",children:u.Ru.get("concerts.event.view")})]})},R=e=>(0,k.jsx)(p.A,{contentLabel:u.Ru.get("concert.presale.title"),isOpen:!0,className:m,onRequestClose:e.onClose,children:(0,k.jsx)(x.SnackbarProvider,{children:(0,k.jsx)(F,{...e})})});var H=(0,l.Ay)(a.H).withConfig({displayName:"PresaleModal___StyledButtonTertiary",componentId:"sc-atp5p6-0"})({color:"#FFFFFF",backgroundColor:"#000000",cursor:"pointer"})}}]); +//# sourceMappingURL=9705.js.map \ No newline at end of file diff --git a/dot-config/spicetify/Extracted/Themed/xpui/9928.js b/dot-config/spicetify/Extracted/Themed/xpui/9928.js new file mode 100755 index 00000000..b3ea2900 --- /dev/null +++ b/dot-config/spicetify/Extracted/Themed/xpui/9928.js @@ -0,0 +1,2 @@ +"use strict";(("undefined"!=typeof self?self:global).webpackChunkclient_web=("undefined"!=typeof self?self:global).webpackChunkclient_web||[]).push([[1408,9928],{70076:(e,i,t)=>{t.d(i,{x:()=>C});var n=t(30758),r=t(62411),s=t(95530),a=t(31417),c=t(97500),o=t.n(c),l=t(21743);const d="lyrics-lyricsContent-lyric",u="lyrics-lyricsContent-active",y="lyrics-lyricsContent-highlight",v="lyrics-lyricsContent-unsynced",p="lyrics-lyricsContent-isInteractive",m="lyrics-lyricsContent-text",f="Zg6tXwNaAAopLykLK7Cw",h="lyrics-lyricsContent-provider";var L=t(86070);const g=n.memo((function({onObserve:e,text:i,lineNumber:t,activeLineIndex:r,isTimeSynced:s,translationText:a,onClick:c,onActiveLineChange:h,windowIsVisible:g}){const{ref:b,inView:S}=(0,l.Wx)({threshold:0}),k=(0,n.useRef)(!1);(0,n.useEffect)((()=>{k.current||S&&g&&(e(i),k.current=!0)}),[S,e,i,g]);const w=(0,n.useRef)(),x=(0,n.useRef)(!0);(0,n.useEffect)((()=>{h(w,x.current),x.current=!1}),[r,h]);const I=(0,n.useCallback)((e=>{b(e),w.current=e||void 0}),[b]);return(0,L.jsxs)("div",{dir:"auto",className:o()(d,{[p]:!!c,[u]:r===t,[y]:r>t,[v]:!s}),"data-testid":"fullscreen-lyric",ref:I,onClick:c,children:[(0,L.jsx)("div",{className:m,children:i}),a&&(0,L.jsx)("div",{className:f,children:a})]})}));var b=t(86931);const S={start:0,end:1,text:""};var k=t(79657),w=t(29195),x=t(58685);var I=t(28874),T=t(31402);const C=n.memo((function({trackUri:e,data:i,format:t,onLineClick:c,onActiveLineChange:o,isSnippet:l}){const{provider:d,providerLyricsId:u,providerDisplayName:y,syncType:v,isTimeSynced:p}=i,m=(0,r.d4)(I.s),{lyricWithEmptyLines:f,activeLineIndex:C,hasSkipped:E,shouldAnimateScroll:N}=((e,i,t)=>{const r=(0,n.useRef)(0),{lyrics:s=[],isTimeSynced:a,alternatives:c}=i,o=(0,n.useRef)(0),[l]=(0,b.f)(500,(i=>i?.item?.uri===e)),d=t?c?.find((({language:e})=>e.substring(0,2)===t.substring(0,2)))?.lines:null,u=(0,n.useMemo)((()=>[...new Array(2).fill(S),...s].map(((e,i)=>({...e,lineNumber:i,translationText:d?.[i-2]})))),[s,d]),y=a?u.findIndex((({start:e,end:i})=>l>=e&&l2e3;return r.current=l,{lyricWithEmptyLines:u,activeLineIndex:y,prevActiveLineIndex:v,lineIndexDiff:y-v,shouldAnimateScroll:p,hasSkipped:m}})(e,i,m),A=function(e){const{trackUri:i,format:t,provider:r,providerLyricsId:s,syncType:a,isSnippet:c}=e,[o,l]=(0,n.useState)(!1),[d,u]=(0,n.useState)(0),[y,v]=(0,n.useState)(!1),p=(0,x.o)((e=>e?.playbackId??void 0)),m=(0,n.useMemo)((()=>(0,k.W)({lyrics_format:t,track_uri:i,provider:r,provider_lyrics_id:s,sync_type:a,playback_id:p,is_snippet:c})),[t,i,r,s,a,p,c]);(0,n.useEffect)((()=>{l(!1),u(0),v(!1);const e=setTimeout((()=>{v(!0)}),1500);return()=>{clearTimeout(e)}}),[m]);const f=(0,w.vh)();return(0,n.useEffect)((()=>{o||d>=140&&y&&(f.send(m),l(!0))}),[d,o,m,f,y]),(0,n.useCallback)((e=>{e.length>1&&u((i=>i+e.length))}),[u])}({trackUri:e,format:t,provider:d,providerLyricsId:u,syncType:v,isSnippet:l}),R=(0,T.g)();return(0,L.jsxs)(L.Fragment,{children:[f.map((({text:e,lineNumber:i,translationText:t})=>(0,L.jsx)(g,{text:e,translationText:t,lineNumber:i,activeLineIndex:C,isTimeSynced:p,onObserve:A,onClick:c&&(e=>c(e,f[i].start)),onActiveLineChange:(e,t)=>o({lineRef:e,firstUpdate:t,isFirstLine:p&&0===i,isActiveLine:p&&C===i,activeLineIndex:C,hasSkipped:E,shouldAnimateScroll:N}),windowIsVisible:"visible"===R},i))),!l&&y&&(0,L.jsx)("div",{className:h,children:(0,L.jsx)(s.E,{as:"p",variant:"bodySmall",dir:"auto",children:a.Ru.get("web-player.lyrics.providedBy",y)})})]})}))},62197:(e,i,t)=>{t.d(i,{H:()=>r,k:()=>n});const n=18e5,r=6e5},62752:(e,i,t)=>{t.d(i,{I:()=>h});var n=t(50486),r=t(14343),s=t(62197),a=t(1377),c=t(18133),o=t(2254),l=t(21398),d=t(411),u=t(36475);function y(e,i,t){const{startTimeMs:n,words:r}=e,s=t[i+1];return{start:n||0,end:s&&s.startTimeMs?s.startTimeMs:1/0,text:r}}function v(e){return d.Q.fromInt(e).toCSS(u.a.RGB)}var p=t(82935),m=t(43329);const f={hasLyrics:!1},h=(e,i)=>{const t=(0,p.h)(i||void 0,{desiredLabel:"large",desiredSize:600})??i?.[0]?.url??"",d=(0,c.X)(),u=(0,r.NC)(m.Tc,{loadingValue:m.LZ.CONTROL}),h={[m.LZ.CONTROL]:void 0,[m.LZ.SYSTEM_LANGUAGE]:navigator.language,[m.LZ.ALL_LANGUAGES]:"all"}[u],L=["lyrics",{uri:e,image:t,vocalRemoval:d}],{hasLyrics:g,isLoading:b}=(0,a.f)(e),{data:S,isLoading:k,isError:w}=(0,n.I)({queryKey:L,queryFn:async()=>{if(!e||!t)return f;const i=await async function(e,i,t=!1,n){try{const a=await(0,o.S)(e,i,t,n);return{hasLyrics:!0,isTimeSynced:(s=a.lyrics.syncType,"LINE_SYNCED"===s||"SYLLABLE_SYNCED"===s),syncType:a.lyrics.syncType,lyrics:a.lyrics.lines.map(y),colors:(r=a.colors,{text:v(r.text),activeText:v(r.highlightText),background:v(r.background)}),provider:a.lyrics.provider,providerDisplayName:a.lyrics.providerDisplayName,providerLyricsId:a.lyrics.providerLyricsId,hasVocalRemoval:a.hasVocalRemoval??!1,showUpsell:a.lyrics.showUpsell??!1,alternatives:a.lyrics.alternatives}}catch(e){if(e instanceof l.O&&404===e.status)return{hasLyrics:!1};throw e}var r,s}(e,t,d,h);return i},gcTime:s.k,staleTime:s.H,enabled:g}),x=b||k;let I=null;return x||(I=g?S??null:f),{data:I,loading:x,error:w}}},1377:(e,i,t)=>{t.d(i,{f:()=>d});var n=t(50486),r=t(24909),s=t(14343),a=t(22726),c=t(62197),o=t(2254),l=t(38501);const d=e=>{const i=!!e&&(0,a.U_m)(e),t=(0,s.NC)(l.s6w)&&i,{data:d,isLoading:u}=(0,n.I)({queryKey:["useLyricsAvailability",e],queryFn:async()=>!!e&&await(0,o.z)(e),gcTime:c.k,staleTime:c.H,enabled:t,placeholderData:r.rX});return{isLoading:u,hasLyrics:!!t&&(d??!1)}}},18893:(e,i,t)=>{t.d(i,{J:()=>s});var n=t(62752),r=t(58685);const s=()=>{const e=(0,r.o)((e=>e?.item),((e,i)=>e?.uri===i?.uri));return(0,n.I)(e?.uri,e?.images)}},18133:(e,i,t)=>{t.d(i,{X:()=>a});var n=t(14343),r=t(38501),s=t(77153);const a=()=>{const e=(0,s.S)(),{isSupported:i}=e.getCapabilities();return(0,n.NC)(r.OBX,{loadingValue:!1})&&i}},28874:(e,i,t)=>{t.d(i,{s:()=>r,u:()=>n});const n=e=>e.ui.lyrics.mode,r=e=>e.ui.lyrics.translationLanguage},2254:(e,i,t)=>{t.d(i,{S:()=>a,z:()=>c});var n=t(22726),r=t(1599),s=t(72671);const a=async(e,i,t,a)=>{const c=(0,n.o_h)(e).id,o=r.n.getInstance(),l={format:"json",vocalRemoval:t};a&&(l.clientLanguage=a);return(await o.build().withHost(s.Hj).withPath(`/track/${encodeURIComponent(c)}/image/${encodeURIComponent(i)}`).withQueryParameters(l).withEndpointIdentifier("/track/{trackId}").send()).body},c=async e=>{const i=(0,n.Y8v)((0,n.o_h)(e)?.id);if(!i)return!1;const t=r.n.getInstance(),a=await t.build().withHost(s.XE).withPath(`/track/${encodeURIComponent(i)}`).withEndpointIdentifier("/track/{trackId}").send();return a.body?.has_lyrics||!1}},31402:(e,i,t)=>{t.d(i,{g:()=>r});var n=t(30758);function r(){const[e,i]=(0,n.useState)(document.visibilityState);return(0,n.useEffect)((()=>{const e=()=>i(document.visibilityState);return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)}),[]),e}},84291:(e,i,t)=>{t.d(i,{f:()=>c,z:()=>a});var n=t(30758),r=t(85505),s=t(47095);function a(e,i=r.l0o){const t=(0,s.as)();return(0,n.useEffect)((()=>(e&&t((0,s.Mo)(e)),()=>{t((0,s.Hf)())})),[e,t]),e||i}const c=({color:e,fallbackColor:i})=>(a(e,i),null)},5179:(e,i,t)=>{t.d(i,{H:()=>a});var n=t(23300),r=t(58685),s=t(82935);function a(){const e=(0,r.o)((e=>e?.item),((e,i)=>e?.uri===i?.uri)),i=(0,s.h)(e?.images||void 0,{desiredLabel:"large",desiredSize:600})??e?.images?.[0]?.url??"",{data:t}=(0,n.g)([i]);return t??null}}}]); +//# sourceMappingURL=9928.js.map \ No newline at end of file diff --git a/dot-config/spicetify/config-xpui.ini b/dot-config/spicetify/config-xpui.ini index 6d3d68af..2166081a 100644 --- a/dot-config/spicetify/config-xpui.ini +++ b/dot-config/spicetify/config-xpui.ini @@ -28,5 +28,5 @@ expose_apis = 1 ; DO NOT CHANGE! [Backup] -version = 1.2.50.335.g5e2860a8 -with = 2.38.5 +version = 1.2.52.442.g01893f92 +with = 2.38.7 diff --git a/dot-config/swaync/colors.css b/dot-config/swaync/colors.css index 69d3eb06..8a40dc6e 100644 --- a/dot-config/swaync/colors.css +++ b/dot-config/swaync/colors.css @@ -1,18 +1,18 @@ -@define-color text-color #D6E5D6; -@define-color text-color-disabled #1C2122; -@define-color cc-bg rgba(28,33,34, 0.1); -@define-color noti-bg rgba(28,33,34, 0.1); -@define-color noti-bg-opaque rgba(28,33,34, 0.2); -@define-color noti-bg-darker rgba(28,33,34, 0.2); -@define-color bg-selected #1C2122; -@define-color cursor #D6E5D6; -@define-color noti-bg-hover rgba(45,70,35, 0.3); -@define-color noti-bg-hover-opaque rgba(45,70,35, 0.4); -@define-color noti-bg-hover-focus rgba(45,70,35, 0.3); -@define-color noti-close-bg rgba(28,33,34, 0.1); -@define-color noti-close-bg-hover rgba(28,33,34, 0.2); -@define-color bg-selected rgba(28,33,34, 0.1); -/* @define-color button-background #673D49; */ -@define-color button-active #014736; -@define-color noti-border-color #063A24; -/* @define-color urgent #BBD2BC; */ +@define-color text-color #F9F9FE; +@define-color text-color-disabled #120E19; +@define-color cc-bg rgba(18,14,25, 0.1); +@define-color noti-bg rgba(18,14,25, 0.1); +@define-color noti-bg-opaque rgba(18,14,25, 0.2); +@define-color noti-bg-darker rgba(18,14,25, 0.2); +@define-color bg-selected #120E19; +@define-color cursor #F9F9FE; +@define-color noti-bg-hover rgba(133,122,179, 0.3); +@define-color noti-bg-hover-opaque rgba(133,122,179, 0.4); +@define-color noti-bg-hover-focus rgba(133,122,179, 0.3); +@define-color noti-close-bg rgba(18,14,25, 0.1); +@define-color noti-close-bg-hover rgba(18,14,25, 0.2); +@define-color bg-selected rgba(18,14,25, 0.1); +/* @define-color button-background #ADADC7; */ +@define-color button-active #8576B6; +@define-color noti-border-color #0D0640; +/* @define-color urgent #EEEEF5; */ diff --git a/dot-config/waybar/colors.css b/dot-config/waybar/colors.css index 0752649d..c783c0da 100644 --- a/dot-config/waybar/colors.css +++ b/dot-config/waybar/colors.css @@ -1,20 +1,20 @@ -@define-color FOREGROUND #D6E5D6; -@define-color BACKGROUND rgba(28,33,34,0.25); -@define-color ACCENT #D6E5D6; +@define-color FOREGROUND #F9F9FE; +@define-color BACKGROUND rgba(18,14,25,0.25); +@define-color ACCENT #F9F9FE; -@define-color color0 #424749; -@define-color color1 #063A24; -@define-color color2 #5A2A2B; -@define-color color3 rgba(1,71,54,0.25); -@define-color color4 rgba(45,70,35,0.25); -@define-color color5 #673D49; -@define-color color6 #89B68A; -@define-color color7 #BBD2BC; -@define-color color8 #839384; -@define-color color9 #063A24; -@define-color color10 #5A2A2B; -@define-color color11 #014736; -@define-color color12 #2D4623; -@define-color color13 #673D49; -@define-color color14 #89B68A; -@define-color color15 #BBD2BC; +@define-color color0 #3A3742; +@define-color color1 #0D0640; +@define-color color2 #6C6E8E; +@define-color color3 rgba(133,118,182,0.25); +@define-color color4 rgba(133,122,179,0.25); +@define-color color5 #ADADC7; +@define-color color6 #EEEFFC; +@define-color color7 #EEEEF5; +@define-color color8 #A7A7AC; +@define-color color9 #0D0640; +@define-color color10 #6C6E8E; +@define-color color11 #8576B6; +@define-color color12 #857AB3; +@define-color color13 #ADADC7; +@define-color color14 #EEEFFC; +@define-color color15 #EEEEF5; -- cgit v1.2.3