CINXE.COM

Laptop Buying Guide | Pick the Best Laptop | Samsung UK

<!DOCTYPE html> <html lang="en-GB"> <head> <!-- PWA - manifest <link rel="manifest" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/pwa/manifest/uk.json"> --> <!-- PWA - Browser Compatible <script async src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/pwa/js/pwacompat.js"></script> --> <!-- <meta name="theme-color" content="#0c4da2"> --> <!-- Add to home screen for Safari on iOS --> <!-- <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="Samsung Shop"> <link rel="apple-touch-icon" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/pwa/icon/pwa_icon_192x192.png"> --> <!-- Add to home screen for Windows --> <!-- <meta name="msapplication-TileImage" content="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/pwa/icon/pwa_icon_192x192.png"> <meta name="msapplication-TileColor" content="#000000"> --> <link rel="preconnect" href="https://images.samsung.com"/> <!-- Load clientLibs required when initializing Authoring: head.html override required to be added! --> <!-- Load clientLibs required when initializing Authoring: head.html override required to be added! --> <meta charset="utf-8"/> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <meta http-equiv="content-type" content="text/html; charset=UTF-8"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <!-- SEO --> <title>Laptop Buying Guide | Pick the Best Laptop | Samsung UK</title> <meta name="title" content="Laptop Buying Guide | Pick the Best Laptop | Samsung UK"/> <link rel="canonical" href="https://www.samsung.com/uk/laptop-buying-guide/"/> <meta name="keywords" content="buying guide, laptop"/> <meta name="description" content="Learn how to choose the best laptop for you with Samsung. Find out the best screen size, battery life, memory &amp; storage to suit your needs &amp; more."/> <meta name="date" content="2024-08-17"/> <meta name="sitecode" content="uk"/> <meta name="twitter:card" content="Summary"/> <meta name="twitter:site" content="@SamsungUK"/> <meta name="twitter:creator" content="@SamsungUK"/> <meta name="twitter:url" content="https://www.samsung.com/uk/laptop-buying-guide/"/> <meta name="twitter:title" content="Laptop Buying Guide | Pick the Best Laptop | Samsung UK"/> <meta name="twitter:description" content="Learn how to choose the best laptop for you with Samsung. Find out the best screen size, battery life, memory &amp; storage to suit your needs &amp; more."/> <meta name="twitter:image" content="https://www.samsung.com/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/logo-square-letter.png"/> <meta property="og:url" content="https://www.samsung.com/uk/laptop-buying-guide/"/> <meta property="og:image" content="https://www.samsung.com/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/logo-square-letter.png"/> <meta property="og:type" content="website"/> <meta property="og:site_name" content="Samsung uk"/> <meta property="og:locale" content="en-GB"/> <meta property="og:title" content="Laptop Buying Guide | Pick the Best Laptop | Samsung UK"/> <meta property="og:description" content="Learn how to choose the best laptop for you with Samsung. Find out the best screen size, battery life, memory &amp; storage to suit your needs &amp; more."/> <meta property="og:country-name" content="uk"/> <meta property="name" content="Samsung uk"/> <meta property="image" content="https://www.samsung.com/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/logo-square-letter.png"/> <meta property="url" content="https://www.samsung.com/uk/laptop-buying-guide/"/> <meta property="description" content="Learn how to choose the best laptop for you with Samsung. Find out the best screen size, battery life, memory &amp; storage to suit your needs &amp; more."/> <meta property="keywords" content="buying guide, laptop"/> <link rel="icon" type="image/png" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/Favicon.png" sizes="96x96"/> <link rel="shortcut icon" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/Favicon.png"/> <link rel="apple-touch-icon" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/app_ico.png" sizes="144x144"/> <!-- css 위치 변경 1) fonts.css 2) local.css 3) clientlib 카테고리 (230317) --> <link rel="stylesheet" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-site/resources/global/css/fonts.css" type="text/css"/> <!-- Local CSS 등록 --> <!-- 파일의 내용이 있는 경우만 호출되도록 수정 (240528) --> <link rel="stylesheet" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-site/resources/uk/css/uk.css" type="text/css"/> <link rel="stylesheet" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-dependencies.min.72b3474a5ea9ec2c8b38096685e0928d.css" type="text/css"> <link rel="stylesheet" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-base-new-gnb.min.9f42454338d004aefad6d201b952d819.css" type="text/css"> <link rel="stylesheet" href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-templates/page-static-gnb/compact.min.4b17cd8c94e0fab423b1344edf9f0ea4.css" type="text/css"> <link rel="stylesheet" href="/etc.clientlibs/samsung/components/content/consumer/global/product-popup/pd-g-register-product-popup/clientlibs/site.min.0183b920d0d2fbbe262f01f565c45cd9.css" type="text/css"> <link rel="stylesheet" href="/etc.clientlibs/samsung/components/content/epp/common/ep-cm-g-barcode-scanner-popup/clientlibs/site.min.b791cc7424186d4c95539d287b2c66cc.css" type="text/css"> <link rel="stylesheet" href="/etc.clientlibs/samsung/components/content/consumer/global/common/cm-g-static-content/clientlibs/site.min.ae85240e2285ff65e974c0b136a75d59.css" type="text/css"/> <link rel="stylesheet" href="/etc.clientlibs/samsung/components/content/consumer/global/common/cm-g-text-block/clientlibs/site.min.d317a02bd188dfa8a9c0898ae8dec80d.css" type="text/css"/> <link rel="stylesheet" href="/etc.clientlibs/samsung/components/content/consumer/global/navigation/nv-g-breadcrumb/clientlibs/site.min.01c1e7bc1eb1645deacabd158fc75f0f.css" type="text/css"/> <script type="text/javascript"> var winhref = window.location.href.replace("/content/samsung","").replace(".html","/"); if ( winhref.indexOf("?") > 0) { winhref = winhref.substring(0, winhref.indexOf("?")); } var siteCode = winhref.split("/")[3]; //cn인 경우는 경로에서 siteCode를 추출할 수 없으므로 다른 방법으로 접근 if(winhref.indexOf("samsung.com.cn") > 0) { siteCode = "cn"; } //depth Info. var depth = winhref.split("/").length; var depth_last = winhref.split("/")[depth-1]; if(depth_last =="" || depth_last.charAt(0)=="?"){ depth -= 1; } //set pathIndicator(not product page) var pageName = ""; var depth_2 = ""; var depth_3 = ""; var depth_4 = ""; var depth_5 = ""; var digitalData = { "page" : { "pageInfo" : { "siteCode" : "uk", "pageName" : pageName, "pageID" : "L2NvbnRlbnQvc2Ftc3VuZy91ay9sYXB0b3AtYnV5aW5nLWd1aWRl", "pageTrack" : "microsite", "originPlaform" : "web" }, "pathIndicator" : { "depth_2" : depth_2, "depth_3" : depth_3, "depth_4" : depth_4, "depth_5" : depth_5 } }, "user": { "userDeviceList": [ ] }, "product" : { "category" : "", "model_code" : "", // PD class정보 이용하여 설정 "model_name" : "", // PD page(server-side) "displayName" : "", // PD class정보 이용하여 설정 "pvi_type_code" : "", //PD page(server-side) "pvi_type_name" : "", //PD page(server-side) "pvi_subtype_code" : "", //PD page(server-side) "pvi_subtype_name" : "",//PD page(server-side) "pd_type" : "", //PD type "content_id" : "", "products" : "", "prodView" : "" } } </script> <script type="text/javascript"> if("microsite" == "microsite"){ var depth_2 = "campaign".replace(/&/g, ' and ').replace(/ /g,' '); var depth_3 = "mobile".replace(/&/g, ' and ').replace(/ /g,' '); var depth_4 = "".replace(/&/g, ' and ').replace(/ /g,' '); var depth_5 = "".replace(/&/g, ' and ').replace(/ /g,' '); if("" != depth_2){ digitalData.page.pathIndicator.depth_2 = depth_2; } if("" != depth_3){ digitalData.page.pathIndicator.depth_3 = depth_3; } if("" != depth_4){ digitalData.page.pathIndicator.depth_4 = depth_4; } if("" != depth_5){ digitalData.page.pathIndicator.depth_5 = depth_5; } } </script> <!-- Excluding tagging-related scripts in Author mode --> <!-- Adobe Target Flicker handling --> <script type="text/javascript"> !function(e,i,t,n){var o=e.head,a=document.cookie.split("; ").find((e=>e.startsWith("cmapi_cookie_privacy=")));if((a?a.split("=")[1]:"").includes("3")&&o){if(i)return;var d=e.createElement("style");d.id="alloy-prehiding",d.innerText="body { opacity: 0 !important }",o.appendChild(d),setTimeout((function(){d.parentNode&&d.parentNode.removeChild(d)}),1500)}}(document,-1!==document.location.href.indexOf("adobe_authoring_enabled")); </script> <!-- End Adobe Target Flicker handling --> <!-- End Adobe Target Flicker handling --> <!-- Launch Header Embed Code --> <script src="//assets.adobedtm.com/72afb75f5516/2dae2587738a/launch-15ca6ca5d7c9.min.js" async></script> <!-- End Launch Header Embed Code --> <!-- ugcGallary --> <!-- true --> <!-- script type="text/javascript" src="https://in2.ecom-qa.samsung.com/in/web/dist/shopAppUtil.js"></script> --> <!-- script type="text/javascript" src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/js/shopAppUtil.js"></script> --> <script> let isWebView = false; let isPlatformReady = false; class ShopAppUtil { constructor(params) { this.params = params; // let startT = new Date().valueOf(); // console.log("★ startTime:", startT); // if(!!window.flutter_inappwebview){ let siteCode = "uk"; let appCookie = document.cookie.match(`(^|;) ?WebView=([^;]*)(;|$)`); if(appCookie != null && appCookie[2] === "Y"){ isWebView = true; }else if(siteCode !== "fr"){ isWebView = !!window.flutter_inappwebview; } // } if(isWebView){ window.addEventListener("flutterInAppWebViewPlatformReady", (event) => { // let responseT = new Date().valueOf(); // console.log("★ responseTime:", responseT); // console.log("★ responseTime-startTime:", responseT - startT); // console.log("flutterInAppWebViewPlatformReady, web view:", isWebView); isPlatformReady = true; params.readyCallback(); }); } } callHandler = (methodName, ...params) => { if (isPlatformReady) { return window.flutter_inappwebview.callHandler(methodName, ...params) } else { return Promise.reject("Calling methodName: "+methodName+", but webview not identified") } } logger = (info, value) => { this.params.logger && console.log(" "+info+" "+value+" ") } isWebView = () => { this.logger('Returning isWebView: ', isWebView); return isWebView; } isPlatformReady = () => { this.logger('Returning isPlatformReady: ', isPlatformReady); return isPlatformReady; } getAppVersionCode = () => new Promise((resolve, reject) => { this.callHandler('getAppVersionCode') .then(result => { this.logger("App version", result) resolve(result) }) .catch(err => { this.logger("Error in App version", err) reject(err) }) }) triggerAnalytics = (data) => new Promise((resolve, reject) => { this.callHandler('OnAnalyticsEvent', data) .then(result => { this.logger("OnAnalyticsEvent Success", result) resolve(JSON.stringify(result)) }) .catch(err => { this.logger("Error in OnAnalyticsEvent", err) reject(err) }) }) openExternalBrowser = (url) => new Promise((resolve, reject) => { this.callHandler('openExternalBrowser', url) .then(result => { this.logger("openExternalBrowser Success", result) resolve(JSON.stringify(result)) }) .catch(err => { this.logger("Error in openExternalBrowser", err) reject(err) }) }) setupCloseForBack = (exit, confirm, hide, backCallback) => { this.callHandler('configureBackV2', exit, confirm, hide, backCallback) .then(function (result) { console.log(JSON.stringify(result)); }) .catch(function (err) { console.log("Error in configureBackV2", err) }) } setupNormalBack = () => { this.callHandler('configureBackV2', false, false, false, '') .then(function (result) { console.log(JSON.stringify(result)); }) .catch(function (err) { console.log("Error in configureBackV2", err) }) } getUserDetails = () => new Promise((resolve, reject) => { this.callHandler('getUserDetails', 'window.setUserDetails') .then(result => { this.logger("User Details", result) resolve(result) }) .catch(err => { this.logger("Error in getUserDetails", err) reject(err) }) }) updateCartCount = (cartCount) => new Promise((resolve, reject) => { this.callHandler('updateCartCount', cartCount) .then(result => { this.logger("updated Cart Count", result) resolve(result) }) .catch(err => { this.logger("Error in updateCartCount", err) reject(err) }) }) getToken = () => new Promise((resolve, reject) => { this.callHandler('getToken', false) .then(result => { this.logger("GetToken Success", result) resolve(result) }) .catch(err => { this.logger("Error in getToken", err) reject(err) }) }) displayInAppReview = () => new Promise((resolve, reject) => { this.callHandler('displayInAppReview') .then(result => { this.logger("displayInAppReview success") resolve(result) }) .catch(err => { this.logger("displayInAppReview failed") reject(err) }) }) } // [START log_event] function logEvent(name, params) { if (!name) { return; } if (window.AnalyticsWebInterface) { // Call Android interface window.AnalyticsWebInterface.logEvent(name, JSON.stringify(params)); } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.firebase) { // Call iOS interface var message = { command: 'logEvent', name: name, parameters: params }; window.webkit.messageHandlers.firebase.postMessage(message); } else { // No Android or iOS interface found console.log("No native APIs found."); } } // [END log_event] // [START set_user_property] function setUserProperty(name, value) { if (!name || !value) { return; } if (window.AnalyticsWebInterface) { // Call Android interface window.AnalyticsWebInterface.setUserProperty(name, value); } else if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.firebase) { // Call iOS interface var message = { command: 'setUserProperty', name: name, value: value }; window.webkit.messageHandlers.firebase.postMessage(message); } else { // No Android or iOS interface found console.log("No native APIs found."); } } // [END set_user_property] /* document.getElementById("event1").addEventListener("click", function() { console.log("event1"); logEvent("event1", { foo: "bar", baz: 123 }); }); document.getElementById("event2").addEventListener("click", function() { console.log("event2"); logEvent("event2", { size: 123.456 }); }); document.getElementById("userprop").addEventListener("click", function() { console.log("userprop"); setUserProperty("userprop", "custom_value"); }); */ </script> <script> const hideHeaderFooterByWindowFlutterInappwebview = () => { //$('.gnb').hide(); if(document.querySelector(".gnb") != null && document.querySelector(".gnb").style != null) { document.querySelector(".gnb").style.display='none'; } if(document.querySelector(".nv00-gnb") != null && document.querySelector(".nv00-gnb").style != null) { document.querySelector(".nv00-gnb").style.display='none'; } if(document.querySelector(".nv00-gnb-v3") != null && document.querySelector(".nv00-gnb-v3").style != null) { document.querySelector(".nv00-gnb-v3").style.display='none'; } //CRHQ-9185 [B2C] shop app - DB 전환 건 - 쿠키 체크 및 미노출 처리 - 보완로직 if(document.querySelector(".cod05-app-banner") != null && document.querySelector(".cod05-app-banner").style != null) { document.querySelector(".cod05-app-banner").style.display='none'; } if(document.querySelector(".breadcrumb") != null && document.querySelector(".breadcrumb").style != null) { document.querySelector(".breadcrumb").style.display='none'; } if(document.querySelector(".nv17-breadcrumb") != null && document.querySelector(".nv17-breadcrumb").style != null) { document.querySelector(".nv17-breadcrumb").style.display='none'; } if(document.querySelector(".epp-breadcrumb") != null && document.querySelector(".epp-breadcrumb").style != null) { document.querySelector(".epp-breadcrumb").style.display='none'; } if(document.querySelector(".footer-column") != null && document.querySelector(".footer-column").style != null) { document.querySelector(".footer-column").style.display='none'; } if(("es" === "uk" || "de" === "uk") && document.querySelector(".footer-bottom") != null && document.querySelector(".footer-bottom").style != null) { document.querySelector(".footer-bottom").style.display='none'; } if(document.querySelector(".footer-language") != null && document.querySelector(".footer-language").style != null) { document.querySelector(".footer-language").style.display='none'; } if(document.querySelector(".footer-language__anchor") != null && document.querySelector(".footer-language__anchor").style != null) { document.querySelector(".footer-language__anchor").style.display='none'; } if(document.querySelector(".footer-language-wrap") != null && document.querySelector(".footer-language-wrap").style != null) { document.querySelector(".footer-language-wrap").style.display='none'; } if(document.querySelector(".footer-sns") != null && document.querySelector(".footer-sns").style != null) { document.querySelector(".footer-sns").style.display='none'; } if(document.querySelector(".footer-terms") != null && document.querySelector(".footer-terms").style != null) { document.querySelector(".footer-terms").style.display='none'; } if(document.querySelector("#teconsent") != null && document.querySelector("#teconsent").style != null) { document.querySelector("#teconsent").style.display='none'; } if(document.querySelector("#QSIFeedbackButton-btn") != null && document.querySelector("#QSIFeedbackButton-btn").style != null) { document.querySelector("#QSIFeedbackButton-btn").style.display='none'; } if (window.location.href.indexOf("/mypage/myproducts/") > -1 || window.location.href.indexOf("/mypage/myrepair/") > -1 || window.location.href.indexOf("/mypage/rewards/") > -1 || window.location.href.indexOf("/mypage/myreferrals/") > -1) { if(document.querySelector(".explore-lnb-navigation") != null && document.querySelector(".explore-lnb-navigation").style != null) { document.querySelector(".explore-lnb-navigation").style.display='none'; } if(document.querySelector(".nv-g-lnb") != null && document.querySelector(".nv-g-lnb").style != null) { document.querySelector(".nv-g-lnb").style.display='none'; } if(document.querySelector(".pd-g-floating-nav") != null && document.querySelector(".pd-g-floating-nav").style != null) { document.querySelector(".pd-g-floating-nav").style.display='none'; } document.querySelectorAll("#content a[target='_blank']").forEach(function(item){ item.removeAttribute('target'); }); } if("page-standard-pd" === "page-static-gnb" || "page-buying-pd" === "page-static-gnb" || "page-feature-pd" === "page-static-gnb") { if(document.querySelector(".pd-header-navigation__menu-epromoter-cta") != null && document.querySelector(".pd-header-navigation__menu-epromoter-cta").style != null) { document.querySelector(".pd-header-navigation__menu-epromoter-cta").style.display='none'; } if(document.querySelector(".product-detail-kv__cta-epromotor") != null && document.querySelector(".product-detail-kv__cta-epromotor").style != null) { document.querySelector(".product-detail-kv__cta-epromotor").style.display='none'; } }else if("page-bc-pd" === "page-static-gnb"){ document.querySelectorAll("#content .s-message-link").forEach(function(item){ item.style.display = "none"; }); } document.querySelectorAll("#content a[href$='.pdf'][target='_blank']").forEach(function(item){ item.removeAttribute('target'); }); if(document.querySelector(".cookie-bar__app-banner") != null && document.querySelector(".cookie-bar__app-banner").style != null) { document.querySelector(".cookie-bar__app-banner").style.display='none'; } if(document.querySelector(".cod05-app-banner") != null && document.querySelector(".cod05-app-banner").style != null) { document.querySelector(".cod05-app-banner").style.display='none'; } //[EPP] Partner Bar 미노출 처리 if(document.querySelector(".partner-bar-wrap") != null && document.querySelector(".partner-bar-wrap").style != null) { document.querySelector(".partner-bar-wrap").style.display='none'; } if(window.sg && window.sg.common && window.sg.common.utils){ window.sg.common.utils.visibleScroll(); } } let timerId = setInterval(() => { if(isWebView){ hideHeaderFooterByWindowFlutterInappwebview(); } if(window.location.href.indexOf("samsung.com.cn") > -1){ //cn국가인 경우 //추가된 userAgent 판단 로직 var ua = navigator.userAgent; var ualower = ua.toLowerCase(); if(/micromessenger/.test(ualower)){ //userAgent include 'micromessenger' if(/miniprogram/i.test(ualower)){ // 위챗 미니앱 //return 'wxApp'; hideHeaderFooterByWindowFlutterInappwebview(); } }else if(/aliapp/i.test(ualower) && /miniprogram/i.test(ualower)){//userAgent include 'aliapp', 'miniprogram' //return 'aliApp';// 알리 미니앱 hideHeaderFooterByWindowFlutterInappwebview(); } } }, 10); setTimeout(() => { clearInterval(timerId); }, 20000); const setSessionStorage = () => { const isInAppWebViewSessionStorage = sessionStorage.getItem("isInAppWebViewSessionStorage"); if(!isInAppWebViewSessionStorage){ // readyCallback에서 세팅 (기존에 없는 경우만 세팅) sessionStorage.setItem("isInAppWebViewSessionStorage", "true"); } } //new ShopAppUtil let shopAppUtilInstance = new ShopAppUtil({ logger: true, readyCallback: setSessionStorage }); document.addEventListener("DOMContentLoaded", function () { if(shopAppUtilInstance.isWebView() && typeof $ !== "undefined"){ $(document).off("click", ".pd-offer__item a"); $(document).on("click", ".pd-offer__item a", function (e) { let href = $(this).attr("href"); if(href.indexOf("samsungmembers") > -1){ //samsungmembers e.preventDefault(); shopAppUtilInstance.openExternalBrowser(href); } }); } }); //EMI 팝업에서 호출 확인 용 function hideModalEmipopup() { console.log("[from finance-popup.js] call hideModalEmipopup()!! "); $('#wrap > div.finance-popup > div > div > div > button').click(); } function hideModalEmipopupConsole() { console.log("dummy [from finance-popup.js] call hideModalEmipopup()!! "); } // App Login callback function function login_completed (login_result, identifier) { if("true" === login_result) { if("nv-g-mini-cart.checkout" === identifier) { location.href = window.sg.minicart.checkoutUrl; } } } // [CRHQ-1787],[SRD-15288] [AEM][SCIC] SHOP APP 로그인 연계 코드 추가 function login_completed_reload(login_result, identifier) { if(login_result === "true") { location.reload(); } } </script> <script>(window.BOOMR_mq=window.BOOMR_mq||[]).push(["addVar",{"rua.upush":"false","rua.cpush":"false","rua.upre":"false","rua.cpre":"false","rua.uprl":"false","rua.cprl":"false","rua.cprf":"false","rua.trans":"","rua.cook":"false","rua.ims":"false","rua.ufprl":"false","rua.cfprl":"false","rua.isuxp":"false","rua.texp":"norulematch","rua.ceh":"false","rua.ueh":"false","rua.ieh.st":"0"}]);</script> <script>!function(){function o(n,i){if(n&&i)for(var r in i)i.hasOwnProperty(r)&&(void 0===n[r]?n[r]=i[r]:n[r].constructor===Object&&i[r].constructor===Object?o(n[r],i[r]):n[r]=i[r])}try{var n=decodeURIComponent("%7B%20%22request_client_hints%22%3A%20true%20%7D");if(n.length>0&&window.JSON&&"function"==typeof window.JSON.parse){var i=JSON.parse(n);void 0!==window.BOOMR_config?o(window.BOOMR_config,i):window.BOOMR_config=i}}catch(r){window.console&&"function"==typeof window.console.error&&console.error("mPulse: Could not parse configuration",r)}}();</script> <script>!function(a){var e="https://s.go-mpulse.net/boomerang/",t="addEventListener";if("False"=="True")a.BOOMR_config=a.BOOMR_config||{},a.BOOMR_config.PageParams=a.BOOMR_config.PageParams||{},a.BOOMR_config.PageParams.pci=!0,e="https://s2.go-mpulse.net/boomerang/";if(window.BOOMR_API_key="VRZKC-5BSTD-4EWS3-R2J59-B8GYB",function(){function n(e){a.BOOMR_onload=e&&e.timeStamp||(new Date).getTime()}if(!a.BOOMR||!a.BOOMR.version&&!a.BOOMR.snippetExecuted){a.BOOMR=a.BOOMR||{},a.BOOMR.snippetExecuted=!0;var i,_,o,r=document.createElement("iframe");if(a[t])a[t]("load",n,!1);else if(a.attachEvent)a.attachEvent("onload",n);r.src="javascript:void(0)",r.title="",r.role="presentation",(r.frameElement||r).style.cssText="width:0;height:0;border:0;display:none;",o=document.getElementsByTagName("script")[0],o.parentNode.insertBefore(r,o);try{_=r.contentWindow.document}catch(O){i=document.domain,r.src="javascript:var d=document.open();d.domain='"+i+"';void(0);",_=r.contentWindow.document}_.open()._l=function(){var a=this.createElement("script");if(i)this.domain=i;a.id="boomr-if-as",a.src=e+"VRZKC-5BSTD-4EWS3-R2J59-B8GYB",BOOMR_lstart=(new Date).getTime(),this.body.appendChild(a)},_.write("<bo"+'dy onload="document._l();">'),_.close()}}(),"".length>0)if(a&&"performance"in a&&a.performance&&"function"==typeof a.performance.setResourceTimingBufferSize)a.performance.setResourceTimingBufferSize();!function(){if(BOOMR=a.BOOMR||{},BOOMR.plugins=BOOMR.plugins||{},!BOOMR.plugins.AK){var e=""=="true"?1:0,t="",n="bdpnbeqxjpkdmz2bytlq-f-0294c2079-clientnsv4-s.akamaihd.net",i="false"=="true"?2:1,_={"ak.v":"39","ak.cp":"112695","ak.ai":parseInt("293013",10),"ak.ol":"0","ak.cr":9,"ak.ipv":4,"ak.proto":"http/1.1","ak.rid":"5f90a8c7","ak.r":42017,"ak.a2":e,"ak.m":"x","ak.n":"essl","ak.bpcip":"8.222.208.0","ak.cport":55128,"ak.gh":"184.28.235.14","ak.quicv":"","ak.tlsv":"tls1.2","ak.0rtt":"","ak.0rtt.ed":"","ak.csrc":"-","ak.acc":"reno","ak.t":"1732363479","ak.ak":"hOBiQwZUYzCg5VSAfCLimQ==vJl+yZel/owJVLTGTmrLItcDpYrWAir4T6xcSGjBAq7luWdFOsPkrwwKxSw9amHR0n+tFjVBFSk6eKxE6ws1PLEmWPrCL6ckcfEyCZJ2aFe9DOnHsaHmn/bps0KXA4fDJAQMvRChuyEf4Hb4WzXOEVQwTyPhYUqs4oKNVqG4bGg3rS15xdN/c9zn7OcijqfmvDm+B9zTkAkXLL7LI/5sBUtCg2MemMWRbiDr3KKSfUi+usqEhO2BLUO37MywBiYTDDxj7JQtOfUfvECF222gkrReSmLRIgusujaNiyEWIcEM+O46+07zbvCgYeXuRmFScYhUsTWdpVOEFmd22XplkIFv4AKvtSUNRd8wkftMAO68avptGDoHHBuHOv8EhVqlytHdAgnl7DItDMznst8iYKAtxvjbeIVmG2HNjiTcD/U=","ak.pv":"3677","ak.dpoabenc":"","ak.tf":i};if(""!==t)_["ak.ruds"]=t;var o={i:!1,av:function(e){var t="http.initiator";if(e&&(!e[t]||"spa_hard"===e[t]))_["ak.feo"]=void 0!==a.aFeoApplied?1:0,BOOMR.addVar(_)},rv:function(){var a=["ak.bpcip","ak.cport","ak.cr","ak.csrc","ak.gh","ak.ipv","ak.m","ak.n","ak.ol","ak.proto","ak.quicv","ak.tlsv","ak.0rtt","ak.0rtt.ed","ak.r","ak.acc","ak.t","ak.tf"];BOOMR.removeVar(a)}};BOOMR.plugins.AK={akVars:_,akDNSPreFetchDomain:n,init:function(){if(!o.i){var a=BOOMR.subscribe;a("before_beacon",o.av,null,null),a("onbeacon",o.rv,null,null),o.i=!0}return this},is_complete:function(){return!0}}}}()}(window);</script></head> <body> <!-- ## PWA ## <sly data-sly-test="true"> <script> if('serviceWorker' in navigator) { navigator.serviceWorker.register('/sw.js') .then(function(registration) { console.log("Service Worker registered with scope:", registration.scope); }); } window.addEventListener('beforeinstallprompt', (e) => { // Prevent Chrome 67 and earlier from automatically showing the prompt //e.preventDefault(); console.log("beforeinstallprompt"); }); </script> </sly> --> <script> var isInIframe = (window.location != window.top.location); var isNotDotcom = ( window.location.href.indexOf('samsung.com') < 0); var isTopNotDotcom = ( window.top.location.href.indexOf('samsung.com') < 0); //404 페이지에서는 실행하지 않음. if ( window.location.href.indexOf('404') < 0 && isTopNotDotcom) { if ( isInIframe == true ) { console.log('isInIframe =' + isInIframe ); //에러 페이지 이동 self.location.href /"+siteCd+"/common/404.html window.location.href = '/uk/common/404.html'; } else { console.log('isInIframe =' + isInIframe ); } } </script> <div id="wrap"> <!-- 공통 hidden input 시작--> <!-- typeAheadDomain 기존 search/ -> 붙이던 부분 삭제함 필요시 search/를 붙여서 사용--> <input type="hidden" name="searchDomain" id="searchDomain" value="//searchapi.samsung.com/v6"/> <input type="hidden" name="esapiSearchDomain" id="esapiSearchDomain" value="https://esapi.samsung.com"/> <input type="hidden" name="scene7domain" id="scene7domain" value="//images.samsung.com/is/image/samsung/"/> <input type="hidden" name="reviewUseYN" id="reviewUseYN" value="Y"/> <input type="hidden" name="aplautYn" id="aplautYn" value="N"/> <input type="hidden" name="reevooUseYN" id="reevooUseYN" value="N"/> <input type="hidden" name="bvFlag" id="bvFlag" value="Y"/> <input type="hidden" name="bvRTLFlag" id="bvRTLFlag" value="N"/> <input type="hidden" name="multiLanguageYn" id="multiLanguageYn" value="N"/> <input type="hidden" name="localLang" id="localLang" value="en-gb"/> <!-- 기존 gnbRunmodeInfo-> runmodeInfo 이름 변경--> <input type="hidden" name="runmodeInfo" id="runmodeInfo" value="live"/> <input type="hidden" name="apiStageInfo" id="apiStageInfo" value="front"/> <input type="hidden" name="tempTitle" id="tempTitle" value="page-static-gnb"/> <input type="hidden" name="siteCode" id="siteCode" value="uk"/> <input type="hidden" name="store_sitecode" id="store_sitecode" value="uk"/> <input type="hidden" name="language" id="language" value="en_GB"/> <input type="hidden" name="serverType" id="serverType" value="prod"/> <!-- new-hybris --> <input type="hidden" name="gpvStoreDomain" id="gpvStoreDomain" value="https://p1.ecom.samsung.com"/> <input type="hidden" name="storeWebDomain" id="storeWebDomain" value="https://shop.samsung.com"/> <input type="hidden" name="shopIntegrationFlag" id="shopIntegrationFlag" value="Hybris-new"/> <input type="hidden" name="newHyvStoreDomain" id="newHyvStoreDomain"/> <!-- business page 여부 --> <input type="hidden" name="b2bFlag" id="b2bFlag" value="N"/> <input type="hidden" name="pageUrl" id="pageUrl"/> <input type="hidden" name="pathString" id="pathString"/> <input type="hidden" name="wishlistYn" id="wishlistYn"/> <input type="hidden" name="shopParmLang" id="shopParmLang"/> <input type="hidden" name="reservationDomain" id="reservationDomain"/> <!-- 공통 hidden input 끝--> <section class="progress cm-loader" style="display:none;"> <div class="progress__wrapper"> <div class="progress__circle-1"></div> <div class="progress__circle-2"></div> <div class="progress__circle-3"></div> <div class="progress__circle-4"></div> </div> </section> <script type="text/javascript" src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/js/crypto-js.min.js"></script> <header id="header" role="banner"> <!--googleoff: all--> <div class="skip-bar"> <a href="#content" id="skipToContent">Skip to content</a> <a href="#accHelp" id="skipToAccHelp">Skip to accessibility help</a> </div> </header> <div class="newpar new section"> </div> <div class="par iparys_inherited"> </div> <div class="nv16-country-selector" style="height: 0px;"> <div class="nv16-country-selector__content-wrap"> <div class="nv16-country-selector__content"> <div class="nv16-country-selector__description">Choose your location and language.</div> <div class="nv16-country-selector__select-contaniner"> <div class="nv16-country-selector__menu"> <div class="menu" data-comp-name="menu"> <select class="menu__select" tabindex="-1"><option selected value="uk" data-country-type="sitecd">United Kingdom / English</option><option value="other">Other Countries or location</option> </select> <button class="menu__select-field" aria-haspopup="listbox" aria-expanded="false" type="button" an-tr="nv16_gnb-country selector-navigation" an-ca="navigation" an-ac="gnb" an-la="country selector"> <span class="menu__select-field-text"></span> <svg class="menu__select-field-icon down" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> <svg class="menu__select-field-icon up" focusable="false" aria-hidden="true"> <use xlink:href="#close-up-bold" href="#close-up-bold"></use> </svg> </button> </div> </div> <div class="nv16-country-selector__continue"> <button class="cta cta--contained cta--black" aria-label="Button Label" data-action="countrySelectorContinue" an-tr="nv16_gnb-country selector-navigation" an-ca="navigation" an-ac="gnb" an-la="country selector:continue">Continue </button> </div> </div> <button class="nv16-country-selector__close" data-action="countrySelectorClose"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </div> <!--# COD05_Mobile App Download Banner #--> <section class="cod05-app-banner" style="display:none"> <!-- /* <div class="cod05-app-banner__icon"> <img src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/ico-shop-app-v2.png" alt="Samsung Shop App Icon"> </div> <div class="cod05-app-banner__content"> <h3 class="cod05-app-banner__title">Samsung Shop app</h3> <p class="cod05-app-banner__desc">Get $500 welcome voucher on login. Downlad the app now.</p> <a class="cta cta--underline cta--black cod05-app-banner__cta" href="#" aria-label="Link Title"> App download </a> </div> <button class="cod05-app-banner__close" data-action="countrySelectorClose"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> */--> </section> <!--# //COD05_Mobile App Download Banner #--> <input type="hidden" name="st_checked" id="st_checked" value="2024-11-22 06:12:08"/> <input type="hidden" name="cookieKey" id="cookieKey" value="cedc6238tqcf1t4f0vl7g50mc70d6a5a"/> <script> var gnbNewModelJson = {"gnbLeftModelList":[{"displayName":"Shop","englishName":"shop","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"New \u0026 Featured","englishName":"new and featured","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Samsung.com Exclusives","englishName":"samsung com exclusives","linkType":"move","linkUrl":"/uk/trending-now/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240109|20240218","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Samsung Shop App ","englishName":"samsung shop app ","linkType":"move","linkUrl":"/uk/apps/samsung-shop-app/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20231109|20231231","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"New 2024 TVs","englishName":"New 2024 TVs","linkType":"move","linkUrl":"/uk/tvs/all-tvs/?new-2024-tvs","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Game Portal","englishName":"game portal","linkType":"move","linkUrl":"/uk/game-portal/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230702|20230903","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Foldable Phones ","englishName":"foldable phones ","linkType":"move","linkUrl":"/uk/smartphones/galaxy-z/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230725|20231025","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Large Tablets","englishName":"large tablets","linkType":"move","linkUrl":"/uk/tablets/galaxy-tab-s/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20241010|20241231","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Gaming Products","englishName":"gaming","linkType":"move","linkUrl":"/uk/gaming/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20231002|20231231","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"SmartThings","englishName":"smartthings","linkType":"move","linkUrl":"/uk/smartthings/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Offers","englishName":"offers","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"All Offers","englishName":"all offers","linkType":"move","linkUrl":"/uk/offer/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Black Friday","englishName":"Black Friday","linkType":"move","linkUrl":"/uk/offer/black-friday/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Curated Collections","englishName":"curated collections","linkType":"move","linkUrl":"/uk/curated-collections/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Mobile Offers","englishName":"mobile offers","linkType":"move","linkUrl":"/uk/shop/mobile/home/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Television Offers","englishName":"television offers","linkType":"move","linkUrl":"/uk/offer/tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Laptop \u0026 Computing Offers","englishName":"laptop and computing offers","linkType":"move","linkUrl":"/uk/offer/computing/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240304|20240830","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Home Appliances Offers","englishName":"home appliances offers","linkType":"move","linkUrl":"/uk/offer/homeappliance/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Gifts","englishName":"galaxy gifts","linkType":"move","linkUrl":"/uk/mobile/galaxygifts/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Business Offers","englishName":"business offers","linkType":"move","linkUrl":"/uk/business/offers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Student \u0026 Youth Offers","englishName":"student and youth offers","linkType":"move","linkUrl":"/uk/students-offers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Key Worker \u0026 Teacher Offers","englishName":"Key Worker \u0026 Teacher Offers","linkType":"move","linkUrl":"/uk/key-worker-offers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Samsung Live","englishName":"samsung live","linkType":"move","linkUrl":"/uk/live-shopping/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Why buy from Samsung","englishName":"why buy from samsung","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"3","hasChildren":true,"level2List":[{"displayName":"Overview","englishName":"overview","linkType":"move","linkUrl":"/uk/why-buy-from-samsung/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false},{"displayName":"Pay with Samsung Finance","englishName":"pay with samsung finance","linkType":"move","linkUrl":"/uk/samsung-finance/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false},{"displayName":"Price Promise","englishName":"price promise","linkType":"move","linkUrl":"/uk/price-promise/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false},{"displayName":"Phone Contracts","englishName":"phone contracts","linkType":"move","linkUrl":"/uk/pay-monthly-contract/","displayFlag":"Y","mobileOnlyFlag":"N","isBadgeDisplay":false},{"displayName":"Pay with Klarna","englishName":"pay with klarna","linkType":"move","linkUrl":"/uk/klarna/","displayFlag":"Y","mobileOnlyFlag":"N","isBadgeDisplay":false},{"displayName":"Pay with PayPal","englishName":"pay with paypal","linkType":"move","linkUrl":"/uk/paypal-credit/","displayFlag":"Y","mobileOnlyFlag":"N","isBadgeDisplay":false},{"displayName":"Mobile Trade In","englishName":"mobile trade in","linkType":"move","linkUrl":"/uk/trade-in/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV \u0026 Appliance Trade-Up","englishName":"tv monitor and home appliance trade up","linkType":"move","linkUrl":"/uk/offer/trade-up/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Upgrade Members","englishName":"upgrade members","linkType":"move","linkUrl":"/uk/samsung-upgrade/","displayFlag":"Y","mobileOnlyFlag":"N","isBadgeDisplay":false},{"displayName":"Samsung Care+","englishName":"samsung care plus","linkType":"move","linkUrl":"/uk/offer/samsung-care-plus/","displayFlag":"Y","mobileOnlyFlag":"N","isBadgeDisplay":false},{"displayName":"Samsung Rewards","englishName":"samsung rewards","linkType":"move","linkUrl":"/uk/rewards/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false},{"displayName":"Samsung KX LDN\n","englishName":"Samsung KX LDN","linkType":"move","linkUrl":"https://www.samsung.com/uk/explore/kings-cross/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"AI","englishName":"ai","linkType":"move","linkUrl":"/uk/galaxy-ai/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"level1List":[{"displayName":"AI for All","englishName":"ai for all","linkType":"move","linkUrl":"/uk/ai-products/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy AI","englishName":"galaxy ai","linkType":"move","linkUrl":"/uk/galaxy-ai/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Samsung AI TV","englishName":"samsung ai tv","linkType":"move","linkUrl":"/uk/tvs/8k-tv/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Bespoke AI","englishName":"bespoke ai","linkType":"move","linkUrl":"/uk/home-appliances/bespoke-home/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"All AI Products","englishName":"all ai products","linkType":"move","linkUrl":"/uk/ai-products/all-ai-products/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"AI meets AI","englishName":"ai meets ai","linkType":"move","linkUrl":"/uk/ai-meets-ai/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false}],"layoutType":"l1only","ftImageAreaTitle":"New \u0026 Featured","containerAlignment":"left","ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Mobile","englishName":"mobile","linkType":"move","linkUrl":"/uk/mobile/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","groupCode":"23000000","apiUseFlag":false,"ftImageUseFlag1":true,"ftImageUseFlag2":true,"ftImageUseFlag3":true,"ftImageUseFlag4":true,"ftImageUseFlag5":true,"ftImageUseFlag6":true,"ftImageUseFlag7":true,"ftImageUseFlag8":true,"ftImageUseFlag9":true,"ftImageUrl1":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png","ftImageUrlDesktop1":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile1":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset1":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageAlt1":"Galaxy Z Fold6","ftImageAltEng1":"galaxy z fold6","ftDescription1":"Galaxy Z Fold6","ftDescriptionEng1":"galaxy z fold6","ftLinkUrl1":"/uk/smartphones/galaxy-z-fold6/","ftLinkType1":"move","hasChildren":true,"level1List":[{"displayName":"Discover Mobiles\n","englishName":"discover mobiles","linkType":"move","linkUrl":"/uk/mobile/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy AI","englishName":"galaxy aI","linkType":"move","linkUrl":"/uk/galaxy-ai/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Smartphone","englishName":"galaxy smartphone","linkType":"move","linkUrl":"/uk/smartphones/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Tab","englishName":"galaxy tab","linkType":"move","linkUrl":"/uk/tablets/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Book \u0026 Laptops","englishName":"galaxy book and laptops","linkType":"move","linkUrl":"/uk/galaxy-book/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Watch","englishName":"galaxy watch","linkType":"move","linkUrl":"/uk/watches/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Buds","englishName":"galaxy buds","linkType":"move","linkUrl":"/uk/audio-sound/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Ring","englishName":"galaxy ring","linkType":"move","linkUrl":"/uk/rings/all-rings/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy Accessories\n","englishName":"galaxy accessories","linkType":"move","linkUrl":"/uk/mobile-accessories/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"One UI","englishName":"one ui","linkType":"move","linkUrl":"/uk/one-ui/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Samsung Health","englishName":"samsung health","linkType":"move","linkUrl":"/uk/apps/samsung-health/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Apps \u0026 Services","englishName":"apps and services","linkType":"move","linkUrl":"/uk/apps/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Galaxy gifts","englishName":"galaxy gifts","linkType":"move","linkUrl":"/uk/mobile/galaxygifts/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Certified Re-Newed","englishName":"Certified Re-Newed","linkType":"move","linkUrl":"/uk/certified-re-newed-phones/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Why Galaxy","englishName":"why galaxy","linkType":"move","linkUrl":"/uk/mobile/why-galaxy/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Switch to Galaxy","englishName":"switch to galaxy","linkType":"move","linkUrl":"/uk/mobile/switch-to-galaxy/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Find The Best Samsung Phone","englishName":"find the best samsung phone","linkType":"move","linkUrl":"/uk/mobile-phone-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false}],"layoutType":"l1only","ftImageUrl2":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png","ftImageAlt2":"Galaxy Z Flip6","ftImageAltEng2":"galaxy z flip6","ftDescription2":"Galaxy Z Flip6","ftDescriptionEng2":"galaxy z flip6","ftLinkType2":"move","ftLinkUrl2":"/uk/smartphones/galaxy-z-flip6/","ftImageUrl3":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png","ftImageAlt3":"Galaxy S24 Ultra","ftImageAltEng3":"galaxy s24 ultra","ftDescription3":"Galaxy S24 Ultra","ftDescriptionEng3":"galaxy s24 ultra","ftLinkType3":"move","ftLinkUrl3":"/uk/smartphones/galaxy-s24-ultra/","ftImageUrl4":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png","ftImageAlt4":"Galaxy S24 | S24+","ftImageAltEng4":"galaxy s24 and s24 plus","ftDescription4":"Galaxy S24 | S24+","ftDescriptionEng4":"galaxy s24 and s24 plus","ftLinkType4":"move","ftLinkUrl4":"/uk/smartphones/galaxy-s24/","ftImageUrl5":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png","ftImageAlt5":"Galaxy S24 FE","ftImageAltEng5":"Galaxy S24 FE","ftDescription5":"Galaxy S24 FE","ftDescriptionEng5":"Galaxy S24 FE","ftLinkType5":"move","ftLinkUrl5":"/uk/smartphones/galaxy-s/galaxy-s24-fe-blue-128gb-sm-s721blbdeub/","ftImageUrl6":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png","ftImageAlt6":"Galaxy Tab S10 Series","ftImageAltEng6":"galaxy tab s10 series","ftDescription6":"Galaxy Tab S10 Series","ftDescriptionEng6":"galaxy tab s10 series","ftLinkType6":"move","ftLinkUrl6":"/uk/tablets/galaxy-tab-s/galaxy-tab-s10-ultra-grey-256gb-wi-fi-sm-x920nzareub/","ftImageUrl7":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png","ftImageAlt7":"Galaxy Watch Ultra","ftImageAltEng7":"galaxy watch ultra","ftDescription7":"Galaxy Watch Ultra","ftDescriptionEng7":"galaxy watch ultra","ftLinkType7":"move","ftLinkUrl7":"/uk/watches/galaxy-watch/galaxy-watch-ultra-titanium-grey-lte-sm-l705fdaaeua/","ftImageUrl8":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png","ftImageAlt8":"Galaxy Buds3 Pro","ftImageAltEng8":"galaxy buds3 pro","ftDescription8":"Galaxy Buds3 Pro","ftDescriptionEng8":"galaxy buds3 pro","ftLinkType8":"move","ftLinkUrl8":"/uk/audio-sound/galaxy-buds/galaxy-buds3-pro-silver-sm-r630nzaaeua/","ftImageUrl9":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png","ftImageAlt9":"Galaxy Ring","ftImageAltEng9":"galaxy ring","ftDescription9":"Galaxy Ring","ftDescriptionEng9":"galaxy ring","ftLinkType9":"move","ftLinkUrl9":"/uk/rings/galaxy-ring/galaxy-ring-titanium-black-size-10-sm-q500nzkaeub/","ftImageAreaTitle":"New \u0026 Featured","containerAlignment":"left","ftImageUrlDesktop2":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$84_68_PNG$","ftImageUrlDesktop3":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$84_68_PNG$","ftImageUrlDesktop4":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$84_68_PNG$","ftImageUrlDesktop5":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$84_68_PNG$","ftImageUrlDesktop6":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$84_68_PNG$","ftImageUrlDesktop7":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$84_68_PNG$","ftImageUrlDesktop8":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$84_68_PNG$","ftImageUrlDesktop9":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile2":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$168_136_PNG$","ftImageUrlMobile3":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$168_136_PNG$","ftImageUrlMobile4":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$168_136_PNG$","ftImageUrlMobile5":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$168_136_PNG$","ftImageUrlMobile6":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$168_136_PNG$","ftImageUrlMobile7":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$168_136_PNG$","ftImageUrlMobile8":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$168_136_PNG$","ftImageUrlMobile9":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset2":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset3":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset4":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset5":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset6":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset7":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset8":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$LazyLoad_Home_PNG$","ftImageUrlWithPreset9":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$LazyLoad_Home_PNG$","ftDataList":[{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png","ftImageAlt":"Galaxy Z Fold6","ftImageAltEng":"galaxy z fold6","ftDescription":"Galaxy Z Fold6","ftDescriptionEng":"galaxy z fold6","ftLinkType":"move","ftLinkUrl":"/uk/smartphones/galaxy-z-fold6/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240701|20241230","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png","ftImageAlt":"Galaxy Z Flip6","ftImageAltEng":"galaxy z flip6","ftDescription":"Galaxy Z Flip6","ftDescriptionEng":"galaxy z flip6","ftLinkType":"move","ftLinkUrl":"/uk/smartphones/galaxy-z-flip6/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240701|20241230","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png","ftImageAlt":"Galaxy S24 Ultra","ftImageAltEng":"galaxy s24 ultra","ftDescription":"Galaxy S24 Ultra","ftDescriptionEng":"galaxy s24 ultra","ftLinkType":"move","ftLinkUrl":"/uk/smartphones/galaxy-s24-ultra/","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":false},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png","ftImageAlt":"Galaxy S24 | S24+","ftImageAltEng":"galaxy s24 and s24 plus","ftDescription":"Galaxy S24 | S24+","ftDescriptionEng":"galaxy s24 and s24 plus","ftLinkType":"move","ftLinkUrl":"/uk/smartphones/galaxy-s24/","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":false},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png","ftImageAlt":"Galaxy S24 FE","ftImageAltEng":"Galaxy S24 FE","ftDescription":"Galaxy S24 FE","ftDescriptionEng":"Galaxy S24 FE","ftLinkType":"move","ftLinkUrl":"/uk/smartphones/galaxy-s/galaxy-s24-fe-blue-128gb-sm-s721blbdeub/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240924|20241231","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png","ftImageAlt":"Galaxy Tab S10 Series","ftImageAltEng":"galaxy tab s10 series","ftDescription":"Galaxy Tab S10 Series","ftDescriptionEng":"galaxy tab s10 series","ftLinkType":"move","ftLinkUrl":"/uk/tablets/galaxy-tab-s/galaxy-tab-s10-ultra-grey-256gb-wi-fi-sm-x920nzareub/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240924|20241231","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png","ftImageAlt":"Galaxy Watch Ultra","ftImageAltEng":"galaxy watch ultra","ftDescription":"Galaxy Watch Ultra","ftDescriptionEng":"galaxy watch ultra","ftLinkType":"move","ftLinkUrl":"/uk/watches/galaxy-watch/galaxy-watch-ultra-titanium-grey-lte-sm-l705fdaaeua/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240701|20241230","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png","ftImageAlt":"Galaxy Buds3 Pro","ftImageAltEng":"galaxy buds3 pro","ftDescription":"Galaxy Buds3 Pro","ftDescriptionEng":"galaxy buds3 pro","ftLinkType":"move","ftLinkUrl":"/uk/audio-sound/galaxy-buds/galaxy-buds3-pro-silver-sm-r630nzaaeua/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240701|20241230","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true},{"ftImageUseFlag":true,"ftImageUrl":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png","ftImageAlt":"Galaxy Ring","ftImageAltEng":"galaxy ring","ftDescription":"Galaxy Ring","ftDescriptionEng":"galaxy ring","ftLinkType":"move","ftLinkUrl":"/uk/rings/galaxy-ring/galaxy-ring-titanium-black-size-10-sm-q500nzkaeub/","ftBadgeFlag":"true","ftBadgeText":"NEW","ftBadgeType":"new","ftBadgePeriod":"20240701|20241230","ftImageUrlDesktop":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$84_68_PNG$","ftImageUrlMobile":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$168_136_PNG$","ftImageUrlWithPreset":"//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$LazyLoad_Home_PNG$","ftBadgeDisplay":true}],"ftbadgeFlag1":"true","ftbadgeText1":"NEW","ftbadgeType1":"new","ftbadgePeriod1":"20240701|20241230","ftbadgeFlag2":"true","ftbadgeText2":"NEW","ftbadgeType2":"new","ftbadgePeriod2":"20240701|20241230","ftbadgeFlag5":"true","ftbadgeText5":"NEW","ftbadgeType5":"new","ftbadgePeriod5":"20240924|20241231","ftbadgeFlag6":"true","ftbadgeText6":"NEW","ftbadgeType6":"new","ftbadgePeriod6":"20240924|20241231","ftbadgeFlag7":"true","ftbadgeText7":"NEW","ftbadgeType7":"new","ftbadgePeriod7":"20240701|20241230","ftbadgeFlag8":"true","ftbadgeText8":"NEW","ftbadgeType8":"new","ftbadgePeriod8":"20240701|20241230","ftbadgeFlag9":"true","ftbadgeText9":"NEW","ftbadgeType9":"new","ftbadgePeriod9":"20240701|20241230","ftbadgeDisplay1":true,"ftbadgeDisplay2":true,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":true,"ftbadgeDisplay6":true,"ftbadgeDisplay7":true,"ftbadgeDisplay8":true,"ftbadgeDisplay9":true},{"displayName":"TV \u0026 AV","englishName":"tv and audio","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","groupCode":"03000000","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"Recommended","englishName":"recommended","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Help choose my TV","englishName":"help choose my tv","linkType":"move","linkUrl":"/uk/tvs/help-me-choose/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Help choose my Sound Device","englishName":"help choose my sound device","linkType":"move","linkUrl":"/uk/audio-devices/help-me-choose/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20231019|20240219","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why Samsung TV","englishName":"why samsung tv","linkType":"move","linkUrl":"/uk/tvs/why-samsung-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240502|20240902","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why 8K TV","englishName":"why 8k tv","linkType":"move","linkUrl":"/uk/tvs/8k-tv/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why Neo QLED","englishName":"why neo qled","linkType":"move","linkUrl":"/uk/tvs/qled-tv/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why Samsung OLED","englishName":"why samsung oled","linkType":"move","linkUrl":"/uk/tvs/oled-tv/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why The Frame\n","englishName":"why the frame","linkType":"move","linkUrl":"/uk/lifestyle-tvs/the-frame/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Best Samsung Gaming TV","englishName":"best samsung gaming tv","linkType":"move","linkUrl":"/uk/tvs/gaming-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20221207|20230331","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Best Samsung TV for Sports","englishName":"best samsung tv for sports","linkType":"move","linkUrl":"/uk/tvs/sports-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240502|20240902","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why Samsung Smart TV\n","englishName":"why samsung smart tv","linkType":"move","linkUrl":"/uk/tvs/smart-tv/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Made for UK","englishName":"made for UK","linkType":"move","linkUrl":"/uk/tvs/smart-tv/made-for-uk/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV buying guide\n","englishName":"tv buying guide","linkType":"move","linkUrl":"/uk/tvs/tv-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Micro LED","englishName":"micro led","linkType":"move","linkUrl":"/uk/tvs/micro-led/highlights/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV and Soundbar Trade Up","englishName":"tv trade up","linkType":"move","linkUrl":"/uk/offer/trade-up/#tvs-tab","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240222|20240620","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV Bundles","englishName":"TV Bundles","linkType":"move","linkUrl":"https://www.samsung.com/uk/tvs/all-tvs/?tv-bundles","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240919|20241019","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"TVs","englishName":"tvs","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"none","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"Discover TVs","englishName":"discover tvs","linkType":"move","linkUrl":"/uk/tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Compare TVs","englishName":"Compare TVs","linkType":"move","linkUrl":"/uk/tvs/compare/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Neo QLED","englishName":"neo qled","linkType":"move","linkUrl":"/uk/tvs/neo-qled-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"QLED","englishName":"qled","linkType":"move","linkUrl":"/uk/tvs/qled-tv/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03290000","subTypeCode":"03291100","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20221207|20230331","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"OLED","englishName":"oled","linkType":"move","linkUrl":"/uk/tvs/oled-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240424|20241024","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"The Frame\n","englishName":"the frame","linkType":"move","linkUrl":"/uk/lifestyle-tvs/the-frame/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230523|20230823","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"The Serif\n","englishName":"the serif","linkType":"move","linkUrl":"/uk/lifestyle-tvs/the-serif/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"The Terrace\n","englishName":"the terrace","linkType":"move","linkUrl":"/uk/lifestyle-tvs/the-terrace/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"The Sero\n","englishName":"the sero","linkType":"move","linkUrl":"/uk/lifestyle-tvs/the-sero/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Crystal UHD","englishName":"crystal uhd","linkType":"move","linkUrl":"/uk/tvs/all-tvs/?crystal-uhd","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03290000","subTypeCode":"03291400","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230523|20230823","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Full HD/HD TVs","englishName":"full hd hd tvs","linkType":"move","linkUrl":"/uk/tvs/full-hd-tv/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03290000","subTypeCode":"03290500","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV Accessories","englishName":"tv accessories","linkType":"move","linkUrl":"/uk/tv-accessories/all-tv-accessories/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03360000","subTypeCode":"03360100","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Discover Lifestyle TVs","englishName":"discover lifestyle tvs","linkType":"move","linkUrl":"/uk/lifestyle-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"TV Range Navigator","englishName":"tv range navigator","linkType":"move","linkUrl":"/uk/tvs/#tv-ranges","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All TVs","englishName":"all tvs","linkType":"move","linkUrl":"/uk/tvs/all-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"TV by Size","englishName":"tv by size","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"none","layoutColumn":"3","hasChildren":true,"level2List":[{"displayName":"98 inch TVs","englishName":"98 inch tvs","linkType":"move","linkUrl":"/uk/tvs/98-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230806|20230907","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"85 inch TVs\n","englishName":"85 inch tvs","linkType":"move","linkUrl":"/uk/tvs/85-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"75 inch TVs\n","englishName":"75 inch tvs","linkType":"move","linkUrl":"/uk/tvs/75-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"65 inch TVs\n","englishName":"65 inch tvs","linkType":"move","linkUrl":"/uk/tvs/65-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"55 inch TVs\n","englishName":"55 inch tvs","linkType":"move","linkUrl":"/uk/tvs/55-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"50 inch TVs\n","englishName":"50 inch tvs","linkType":"move","linkUrl":"/uk/tvs/50-inch-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"43 inch TVs or smaller","englishName":"43 inch tvs","linkType":"move","linkUrl":"/uk/tvs/all-tvs/?43-and-under","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What size TV should I get?\n","englishName":"what size tv should i get","linkType":"move","linkUrl":"/uk/tvs/tv-buying-guide/what-size-tv-should-i-get/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why upgrade your screen size?","englishName":"why upgrade your screen size","linkType":"move","linkUrl":"/uk/big-screen-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why a 98” TV?","englishName":"why a 98 tv","linkType":"move","linkUrl":"/uk/tvs/supersize-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20231025|20240125","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All TVs\n","englishName":"all tvs","linkType":"move","linkUrl":"/uk/tvs/all-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"TV by Resolution\n","englishName":"tv by resolution","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"4","hasChildren":true,"level2List":[{"displayName":"8K TVs\n","englishName":"8k tvs","linkType":"move","linkUrl":"/uk/tvs/8k-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"4K TVs\n","englishName":"4k tvs","linkType":"move","linkUrl":"/uk/tvs/uhd-4k-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Full HD/HD TVs\n","englishName":"full hd hd tvs","linkType":"move","linkUrl":"/uk/tvs/full-hd-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What is 4K TV?","englishName":"What is 4K TV?","linkType":"move","linkUrl":"/uk/tvs/tv-buying-guide/what-is-4k-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What is 8K TV?","englishName":"What is 8K TV?","linkType":"move","linkUrl":"/uk/tvs/tv-buying-guide/what-is-8k-tv/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Projectors","englishName":"projectors","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"5","hasChildren":true,"level2List":[{"displayName":"Discover Projectors","englishName":"discover projectors","linkType":"move","linkUrl":"/uk/projector/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false},{"displayName":"The Premiere","englishName":"the premiere","linkType":"move","linkUrl":"/uk/projectors/all-projectors/?the-premiere","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20241120|20250220","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"The Freestyle","englishName":"The Freestyle","linkType":"move","linkUrl":"/uk/projectors/the-freestyle/the-freestyle-2nd-gen-sp-lff3claxxxu/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230901|20231201","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Projector Accessories\n","englishName":"projector accessories","linkType":"move","linkUrl":"/uk/projector-accessories/all-projector-accessories/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Projectors","englishName":"all projectors","linkType":"move","linkUrl":"/uk/projectors/all-projectors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Sound Devices","englishName":"sound devices","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","layoutColumn":"6","hasChildren":true,"level2List":[{"displayName":"Discover Sound Devices","englishName":"discover sound devices","linkType":"move","linkUrl":"/uk/audio-devices/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Soundbar Buying Guide","englishName":"Soundbar Buying Guide","linkType":"move","linkUrl":"/uk/audio-devices/soundbar-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20231205|20240228","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Q-series Soundbars","englishName":"q series soundbars","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?q-series-soundbars","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03351400","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Ultra Slim Soundbars","englishName":"ultra slim soundbars","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?ultra-slim-soundbars","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"S-series Soundbars","englishName":"s series soundbars","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?s-series-soundbars","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03351600","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"B-series Soundbars\n","englishName":"b series soundbars","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?b-series-soundbars","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All in One Soundbars","englishName":"all in one soundbars","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?all-in-one-soundbars","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03350900","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Soundbars with Subwoofers\n","englishName":"soundbars with subwoofers","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?soundbars-with-sub-woofers","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03351000","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Music Frame","englishName":"music frame","linkType":"move","linkUrl":"https://www.samsung.com/uk/audio-devices/all-audio-devices/?music-frame","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20241120|20250220","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Sound Towers","englishName":"sound towers","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/?sound-tower","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03351500","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Audio Accessories","englishName":"audio accessories","linkType":"move","linkUrl":"/uk/audio-accessories/all-audio-accessories/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"03000000","typeCode":"03350000","subTypeCode":"03350600","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Soundbar Range Navigator","englishName":"Soundbar Range Navigator","linkType":"move","linkUrl":"/uk/audio-devices/#SoundbarRangeNavigator","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20231205|20240228","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Sound Devices","englishName":"all sound devices","linkType":"move","linkUrl":"/uk/audio-devices/all-audio-devices/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Home Appliances","englishName":"home appliances","linkType":"move","linkUrl":"/uk/home-appliances/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","groupCode":"07000000","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"Recommended","englishName":"recommended","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Discover Bespoke AI","englishName":"Discover Bespoke AI","linkType":"move","linkUrl":"/uk/home-appliances/bespoke-ai/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20221206|20240602","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Why Samsung?","englishName":"Why Samsung","linkType":"move","linkUrl":"/uk/home-appliances/why-samsung-appliances/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240730|20240830","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"AI Energy Saving","englishName":"AI Energy Saving","linkType":"move","linkUrl":"/uk/home-appliances/ai-energy-saving/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240402|20240602","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE AI meets SmartThings","englishName":"BESPOKE AI meets SmartThings","linkType":"move","linkUrl":"/uk/home-appliances/bespoke-ai-smartthings/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"British Gas Promo","englishName":"british gas promo","linkType":"move","linkUrl":"/uk/offer/british-gas-bill-credit-promotion/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Autumn Cashback","englishName":"autumn cashback","linkType":"move","linkUrl":"/uk/offer/autumn-appliance-sale/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Persil Offer","englishName":"Persil Offer","linkType":"move","linkUrl":"/uk/offer/free-persil-with-washing-machine-deals/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Discover Home Appliances","englishName":"discover home appliances","linkType":"move","linkUrl":"/uk/home-appliances/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Pet Care Appliances","englishName":"Pet Care Appliances","linkType":"move","linkUrl":"https://www.samsung.com/uk/home-appliances/pet-care/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230406|20230706","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Build Your Home Appliances Bundle","englishName":"build your appliances bundle","linkType":"move","linkUrl":"/uk/offer/homeappliance/bundles/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Energy Efficient Appliances","englishName":"energy efficiency appliances","linkType":"move","linkUrl":"/uk/home-appliances/learn/energy-efficient-home-appliances/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"eco","badgeText":"Eco","badgePeriod":"20230105|20230606","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Home Appliance Trade Up\n","englishName":"Home Appliance Trade Up","linkType":"move","linkUrl":"/uk/offer/trade-up/#refrigerator-tab","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Home Appliance Buying Guide","englishName":"buying guide","linkType":"move","linkUrl":"/uk/home-appliances/buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Samsung Food","englishName":"samsung food","linkType":"move","linkUrl":"/uk/home-appliances/samsung-food/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230901|20231201","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Refrigerators","englishName":"refrigerators","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"Discover Refrigerators","englishName":"discover refrigerators","linkType":"move","linkUrl":"/uk/refrigerators/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE Refrigerators","englishName":"bespoke refrigerators","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/?bespoke-ai-new+bespoke+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20221204|20230629","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Energy Efficient Fridge Freezers","englishName":"energy efficientf fridge freezers","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/energy-efficient/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"eco","badgeText":"Eco","badgePeriod":"20230103|20230430","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Smart Fridge Freezers","englishName":"smart fridge freezers","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/smart/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07260000","subTypeCode":"07260600","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"French Style Fridge Freezer","englishName":"french style fridge freezer","linkType":"move","linkUrl":"/uk/refrigerators/french-door/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07260000","subTypeCode":"07260100","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"American Style Fridge Freezer","englishName":"american style fridge freezer","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/american-style/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07260000","subTypeCode":"07260400","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Classic Fridge Freezers","englishName":"classic fridge freezers","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/?classic-fridge-freezer+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07260000","subTypeCode":"07260600","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"One Door Fridge or Freezer","englishName":"one door","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/?1-door-fridge+1-door-freezer+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Integrated Refrigerators","englishName":"integrated refrigerators","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/integrated-fridge-freezer/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230308|20230608","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Fridge Freezer Accessories","englishName":"fridge freezer accessories","linkType":"move","linkUrl":"/uk/home-appliance-accessories/all-home-appliance-accessories/refrigerators/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07260000","subTypeCode":"07261000","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Refrigeration Buying Guide","englishName":"Refrigeration Buying Guide","linkType":"move","linkUrl":"/uk/home-appliances/buying-guide/what-is-the-best-type-of-fridge-freezer/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Refrigerators","englishName":"all refrigerators","linkType":"move","linkUrl":"/uk/refrigerators/all-refrigerators/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Laundry","englishName":"laundry","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","layoutColumn":"3","hasChildren":true,"level2List":[{"displayName":"Discover Laundry","englishName":"discover laundry","linkType":"move","linkUrl":"/uk/washers-and-dryers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE AIᵀᴹ Laundry","englishName":"bespoke ai laundry","linkType":"move","linkUrl":"/uk/washers-and-dryers/all-washers-and-dryers/?bespoke-ai-washing-machine+bespoke-ai-tumble-dryer+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20220823|20230630","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Energy Efficient Washing Machines\n","englishName":"Energy Efficient Washing Machines","linkType":"move","linkUrl":"/uk/washers-and-dryers/washing-machines/energy-efficient/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"eco","badgeText":"Eco","badgePeriod":"20230103|20230430","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Energy Efficient Tumble Dryers\n","englishName":"Energy Efficient Tumble Dryers","linkType":"move","linkUrl":"/uk/washers-and-dryers/dryers/energy-efficient/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"eco","badgeText":"Eco","badgePeriod":"20230208|20230430","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Washing Machines","englishName":"washing machines","linkType":"move","linkUrl":"/uk/washers-and-dryers/washing-machines/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07230000","subTypeCode":"07230500","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Washer Dryers","englishName":"washer dryers","linkType":"move","linkUrl":"/uk/washers-and-dryers/washer-dryer-combo/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07230000","subTypeCode":"07230400","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Tumble Dryers","englishName":"tumble dryers","linkType":"move","linkUrl":"/uk/washers-and-dryers/dryers/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07230000","subTypeCode":"07230600","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Laundry Accessories","englishName":"laundry accessories","linkType":"move","linkUrl":"/uk/home-appliance-accessories/all-home-appliance-accessories/?washers-and-dryers","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Laundry Series Navigator","englishName":"kaundry series navigator","linkType":"move","linkUrl":"/uk/washers-and-dryers/#series-explainer","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Laundry Appliance Buying Guide\n","englishName":"laundry appliance buying guide","linkType":"move","linkUrl":"/uk/home-appliances/buying-guide/what-size-washing-machine-do-i-need/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Laundry","englishName":"all laundry","linkType":"move","linkUrl":"/uk/washers-and-dryers/all-washers-and-dryers/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Vacuum Cleaners","englishName":"vacuum cleaners","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","layoutColumn":"4","hasChildren":true,"level2List":[{"displayName":"Discover Vacuum Cleaners","englishName":"discover vacuum cleaners","linkType":"move","linkUrl":"/uk/vacuum-cleaners/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE Jet™ AI Vacuum ","englishName":"bespoke jet ai vacuum","linkType":"move","linkUrl":"/uk/vacuum-cleaners/stick/bespoke-jet-ai-black-vs28c9784qk-eu/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20230530|20230731","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE Jet™ Stick Vacuums","englishName":"bespoke jet stick vacuums","linkType":"move","linkUrl":"/uk/vacuum-cleaners/all-vacuum-cleaners/?bespoke-jettm+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20221204|20230629","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Jet™ Cordless Stick Vacuums","englishName":"jet cordless stick vacuums","linkType":"move","linkUrl":"/uk/vacuum-cleaners/stick/?jet-stick+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07290000","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Jet Bot™ Robot Vacuums","englishName":"jet bot robot vacuums","linkType":"move","linkUrl":"/uk/vacuum-cleaners/robot/?robots+jet-bot-combo+available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Battery Packs \u0026 Accessories","englishName":"battery packs and accessories","linkType":"move","linkUrl":"/uk/home-appliance-accessories/all-home-appliance-accessories/vacuum-cleaners/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Vacuum Series Navigator","englishName":"vacuum series navigator","linkType":"move","linkUrl":"/uk/vacuum-cleaners/#series-explainer","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Vacuum Cleaner Buying Guide","englishName":"vacuum cleaner buying guide","linkType":"move","linkUrl":"/uk/home-appliances/learn/vacuum-cleaners/how-to-choose-a-vacuum-cleaner/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Vacuum Cleaners","englishName":"all vacuum cleaners","linkType":"move","linkUrl":"/uk/vacuum-cleaners/all-vacuum-cleaners/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Cooking Appliances","englishName":"cooking appliances","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","layoutColumn":"5","hasChildren":true,"level2List":[{"displayName":"Discover Cooking Appliances","englishName":"discover cooking appliances","linkType":"move","linkUrl":"/uk/cooking-appliances/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"BESPOKE Cooking Appliances","englishName":"bespoke cooking appliances","linkType":"move","linkUrl":"/uk/cooking-appliances/all-cooking-appliances/?bespoke+available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"hot","badgeText":"HOT","badgePeriod":"20230523|20230823","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Energy Efficient Cooking Appliances","englishName":"energy efficient cooking appliances","linkType":"move","linkUrl":"/uk/cooking-appliances/ovens/energy-efficient/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"eco","badgeText":"Eco","badgePeriod":"20230103|20230430","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Ovens","englishName":"ovens","linkType":"move","linkUrl":"/uk/cooking-appliances/ovens/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07270000","subTypeCode":"07271700","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Hobs","englishName":"hobs","linkType":"move","linkUrl":"/uk/cooking-appliances/hobs/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07270000","subTypeCode":"07271300","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Hoods","englishName":"hoods","linkType":"move","linkUrl":"/uk/cooking-appliances/hoods/?available-to-order","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07270000","subTypeCode":"07271800","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Microwaves","englishName":"microwaves","linkType":"move","linkUrl":"/uk/microwave-ovens/all-microwave-ovens/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07270000","subTypeCode":"07271400","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Cooking Appliances","englishName":"all cooking appliances","linkType":"move","linkUrl":"/uk/cooking-appliances/all-cooking-appliances/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Dishwashers","englishName":"dishwashers","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","layoutColumn":"6","hasChildren":true,"level2List":[{"displayName":"Discover Dishwashers","englishName":"discover dishwashers","linkType":"move","linkUrl":"/uk/dishwashers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Built- in Dishwashers","englishName":"built in dishwashers","linkType":"move","linkUrl":"/uk/dishwashers/built-in/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07240000","subTypeCode":"07240400","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Freestanding Dishwashers","englishName":"freestanding dishwashers","linkType":"move","linkUrl":"/uk/dishwashers/freestanding/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","groupCode":"07000000","typeCode":"07240000","subTypeCode":"07240100","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Dishwashers","englishName":"all dishwashers","linkType":"move","linkUrl":"/uk/dishwashers/all-dishwashers/?available-to-order/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]},{"displayName":"Heating \u0026 Cooling","englishName":"heating and cooling","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"6","hasChildren":true,"level2List":[{"displayName":"All Air Conditioners ","englishName":"all air conditioners ","linkType":"new","linkUrl":"https://samsung-climatesolutions.com/en-gb/b2c.html?cid\u003duk_ow_affiliate_samsung_air-conditioning_none_gnb-climatesolutions_other_creative3_segment3","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Heat Pumps ","englishName":"all heat pumps ","linkType":"new","linkUrl":"https://samsung-climatesolutions.com/en-gb/b2c/our-solutions/home/heat-pump-solutions.html?cid\u003duk_ow_affiliate_samsung_heatpump_none_gnb-climatesolutions_other_creative4_segment4","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Computing","englishName":"computing","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","groupCode":"31000000","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"Recommended","englishName":"recommended","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Laptop \u0026 Computing Offers","englishName":"laptop and computing offers","linkType":"move","linkUrl":"/uk/offer/computing/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240305|20240830","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Help me Choose my Monitor","englishName":"Help me Choose my Monitor","linkType":"move","linkUrl":"/uk/monitors/help-me-choose/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240627|20241227","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Best Samsung Gaming Laptop","englishName":"best samsung gaming setup","linkType":"move","linkUrl":"/uk/laptop-buying-guide/best-gaming-laptop/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What is the best Samsung Laptop?","englishName":"what is the best samsung laptop","linkType":"move","linkUrl":"/uk/laptop-buying-guide/samsung-laptop-series-explained/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What is the best Samsung Laptops for students?","englishName":"what is the best samsung laptop for students","linkType":"move","linkUrl":"/uk/laptop-buying-guide/best-laptop-for-students/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book Smart Switch ","englishName":"galaxy book smart switch","linkType":"move","linkUrl":"/uk/support/computing/use-smart-switch-to-transfer-your-data-to-your-new-galaxy-book/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitor Trade Up","englishName":"monitor trade up","linkType":"move","linkUrl":"/uk/offer/trade-up/#monitors-tab","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitor Buying Guide\n","englishName":"monitor buying guide","linkType":"move","linkUrl":"/uk/monitors/monitor-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"What is Odyssey Gaming?","englishName":"what is odyssey gaming","linkType":"move","linkUrl":"/uk/monitors/odyssey-gaming-monitor/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Smart Monitor Buying Guide","englishName":"smart monitor buying guide","linkType":"move","linkUrl":"/uk/monitors/smart_monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Which Monitor Resolution is best for you?","englishName":"which monitor resolution is best for you","linkType":"move","linkUrl":"/uk/monitors/monitor-buying-guide/how-to-select-by-resolution/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Galaxy Book \u0026 Laptops","englishName":"galaxy book and laptops","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"Discover Galaxy Book","englishName":"discover galaxy book","linkType":"move","linkUrl":"/uk/galaxy-book/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book5 Pro 360","englishName":"Galaxy Book5 Pro 360","linkType":"move","linkUrl":"/uk/computers/galaxy-book/galaxy-book5-pro360/buy/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240904|20250219","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4 Ultra","englishName":"galaxy book4 ultra","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4 Edge","englishName":"galaxy book4 edge","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book-edge","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4 Pro 360","englishName":"galaxy book4 pro 360","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book-360","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4 Pro","englishName":"galaxy book4 pro","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4 360","englishName":"galaxy book4 360","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book-360","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Book4","englishName":"Galaxy Book4","linkType":"move","linkUrl":"/uk/computers/all-computers/?galaxy-book","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Copilot+PC","englishName":"copilot+pc","linkType":"move","linkUrl":"/uk/computers/galaxy-book-copilot-plus-pcs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Samsung Chromebook","englishName":"samsung chromebook","linkType":"move","linkUrl":"/uk/computers/chromebook/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Accessories","englishName":"accessories","linkType":"move","linkUrl":"/uk/computer-accessories/all-computer-accessories/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Laptops","englishName":"all laptops","linkType":"move","linkUrl":"/uk/computers/all-computers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Compare","englishName":"compare","linkType":"move","linkUrl":"/uk/galaxy-book/compare/?product1\u003dnp950qed-kb1uk\u0026product2\u003dnp950xed-kb1uk\u0026product3\u003dnp935qdb-ka2uk","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Help Me Choose","englishName":"help me choose","linkType":"move","linkUrl":"/uk/laptop-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Galaxy Books Download Centre","englishName":"galaxy books download centre","linkType":"new","linkUrl":"https://www.samsung.com/global/galaxybooks-downloadcenter/?siteCode\u003duk","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Galaxy Book By Size","englishName":"galaxy book by size","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"3","hasChildren":true,"level2List":[{"displayName":"15.6\" - 16.0\"","englishName":"156 to 160","linkType":"move","linkUrl":"/uk/computers/all-computers/?156+160","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"13.3” - 14.0”\n","englishName":"133 to 149","linkType":"move","linkUrl":"/uk/computers/all-computers/?133+140","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"11.0” - 12.9”","englishName":"110 to 129","linkType":"move","linkUrl":"/uk/computers/all-computers/?110+124","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Galaxy Book By Size","englishName":"all galaxy book by size","linkType":"move","linkUrl":"/uk/computers/all-computers/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Computer Monitors","englishName":"computer monitors","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"4","hasChildren":true,"level2List":[{"displayName":"Help me Choose my Monitor","englishName":"Help me Choose my Monitor","linkType":"move","linkUrl":"/uk/monitors/help-me-choose/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240627|20241227","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Discover Computer Monitors","englishName":"discover computer monitors","linkType":"move","linkUrl":"/uk/monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Gaming Monitor","englishName":"gaming monitor","linkType":"move","linkUrl":"/uk/monitors/gaming/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Smart Monitor","englishName":"smart monitor","linkType":"move","linkUrl":"/uk/monitors/smart/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"High Resolution Monitor","englishName":"high resolution monitor","linkType":"move","linkUrl":"/uk/monitors/high-resolution/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"ViewFinity Monitor","englishName":"viewinfinity monitor","linkType":"move","linkUrl":"/uk/monitors/all-monitors/?viewfinity","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"4K UHD Monitor","englishName":"4k uhd monitor","linkType":"move","linkUrl":"/uk/monitors/4k-monitor/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Curved Monitor","englishName":"curved monitor","linkType":"move","linkUrl":"/uk/monitors/curved/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Ultrawide Monitor\n","englishName":"ultrawide monitor","linkType":"move","linkUrl":"/uk/monitors/ultra-wide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Business Monitor\n","englishName":"business","linkType":"move","linkUrl":"/uk/monitors/business/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Monitors\n","englishName":"all monitors","linkType":"move","linkUrl":"/uk/monitors/all-monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitor Buying Guide","englishName":"monitor buying guide","linkType":"move","linkUrl":"/uk/monitors/monitor-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Memory \u0026 Storage","englishName":"memory and storage","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"5","hasChildren":true,"level2List":[{"displayName":"Discover Memory \u0026 Storage","englishName":"discover memory and storage","linkType":"move","linkUrl":"/uk/memory-storage-devices/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"NVME SSD","englishName":"nvme ssd","linkType":"move","linkUrl":"/uk/memory-storage/nvme-ssd/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"SATA SSD","englishName":"sata ssd","linkType":"move","linkUrl":"/uk/memory-storage/sata-ssd/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Portable SSD","englishName":"portable ssd","linkType":"move","linkUrl":"/uk/memory-storage/portable-ssd/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Memory Cards","englishName":"memory cards","linkType":"move","linkUrl":"/uk/memory-storage/memory-card/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"USB Flash Drive","englishName":"usb flash drive","linkType":"move","linkUrl":"/uk/memory-storage/usb-flash-drive/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Memory \u0026 Storage","englishName":"all memory and storage","linkType":"move","linkUrl":"/uk/memory-storage/all-memory-storage/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Displays","englishName":"displays","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"Monitors","englishName":"monitors","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Help me Choose my Monitor","englishName":"Help me Choose my Monitor","linkType":"move","linkUrl":"/uk/monitors/help-me-choose/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"true","badgeType":"new","badgeText":"NEW","badgePeriod":"20240627|20241227","isBadgeDisplay":true,"shopLiveUseFlag":"false"},{"displayName":"Discover Monitors","englishName":"discover monitors","linkType":"move","linkUrl":"/uk/monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Gaming Monitor","englishName":"gaming monitor","linkType":"move","linkUrl":"/uk/monitors/gaming/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Smart Monitor","englishName":"smart monitor","linkType":"move","linkUrl":"/uk/monitors/smart/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"High Resolution Monitor","englishName":"high resolution monitor","linkType":"move","linkUrl":"/uk/monitors/high-resolution/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"ViewFinity Monitor","englishName":"viewinfinity monitor","linkType":"move","linkUrl":"/uk/monitors/all-monitors/?viewfinity","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"4K UHD Monitor","englishName":"4k uhd monitor","linkType":"move","linkUrl":"/uk/monitors/4k-monitor/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Curved Monitor","englishName":"curved monitor","linkType":"move","linkUrl":"/uk/monitors/curved/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Ultrawide Monitor","englishName":"ultrawide monitor","linkType":"move","linkUrl":"/uk/monitors/ultra-wide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Business Monitor\n","englishName":"business monitor","linkType":"move","linkUrl":"/uk/monitors/business/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"All Monitors","englishName":"all monitors","linkType":"move","linkUrl":"/uk/monitors/all-monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitor Buying Guide","englishName":"monitor buying guide","linkType":"move","linkUrl":"/uk/monitors/monitor-buying-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitor Trade Up","englishName":"monitor tradeup","linkType":"move","linkUrl":"/uk/offer/trade-up/#monitors-tab","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"For Business","englishName":"for business","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"Discover Commercial TVs","englishName":"discover commercial tvs","linkType":"new","linkUrl":"/uk/business/commercial-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"SMART Signage","englishName":"smart signage","linkType":"new","linkUrl":"/uk/business/smart-signage/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"LED Signage","englishName":"led signage","linkType":"new","linkUrl":"/uk/business/led-signage/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Commercial TVs","englishName":"commercial tvs","linkType":"new","linkUrl":"/uk/business/commercial-tvs/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Monitors","englishName":"monitors","linkType":"new","linkUrl":"/uk/business/monitors/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Accessories","englishName":"Accessories","linkType":"move","linkUrl":"/uk/accessories/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":false,"layoutType":"l1only","ftImageAreaTitle":"New \u0026 Featured","ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"SmartThings","englishName":"smartthings","linkType":"move","linkUrl":"/uk/smartthings/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":false,"level1List":[],"layoutType":"l1only","ftImageAreaTitle":"New \u0026 Featured","containerAlignment":"left","ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"Black Friday","englishName":"Black Friday","linkType":"move","linkUrl":"/uk/offer/black-friday/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"left","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":false,"layoutType":"l1l2spread","containerAlignment":"left","ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false}],"gnbRightModelList":[{"displayName":"Support","englishName":"support","linkType":"move","linkUrl":"/uk/support/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"right","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"layoutType":"l1l2spread","level1ColumnList":[[{"displayName":"Product Help","englishName":"product help","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":true,"level2List":[{"displayName":"Support Home","englishName":"support home","linkType":"move","linkUrl":"/uk/support/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Manual and Software","englishName":"Manual and Software","linkType":"move","linkUrl":"/uk/support/user-manuals-and-guide/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Search Support","englishName":"search support","linkType":"move","linkUrl":"/uk/search/?searchvalue\u003dmobile#support","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"SHOP FAQ","englishName":"shop faq","linkType":"move","linkUrl":"/uk/shop-faq/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"How to Guides","englishName":"how to guides","linkType":"move","linkUrl":"/uk/support/product-help/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Repairs \u0026 Warranty","englishName":"repair and warranty","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"2","hasChildren":true,"level2List":[{"displayName":"Warranty Information","englishName":"warranty information","linkType":"move","linkUrl":"/uk/support/warranty/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Troubleshoot \u0026 Book a Repair","englishName":"troubleshoot and book a repair","linkType":"move","linkUrl":"/uk/support/repair/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Track My Repair","englishName":"track my repair","linkType":"move","linkUrl":"/uk/support/repair/track-my-repair/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Register your Samsung Product","englishName":"register your samsung product","linkType":"move","linkUrl":"/uk/support/warranty/register-your-samsung-product-warranty/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Spare Parts","englishName":"spare parts","linkType":"move","linkUrl":"/uk/support/spare-parts/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Self-Repair","englishName":"self repair","linkType":"move","linkUrl":"/uk/support/self-repair/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Contact","englishName":"contact","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"3","hasChildren":true,"level2List":[{"displayName":"Contact Us","englishName":"contact us","linkType":"move","linkUrl":"/uk/support/contact/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Sign Language Support","englishName":"sign language support","linkType":"move","linkUrl":"/uk/support/contact/accessibility/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"},{"displayName":"Ask the Community","englishName":"ask the community","linkType":"new","linkUrl":"https://eu.community.samsung.com/?category.id\u003duk\u0026profile.language\u003den-gb","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}],[{"displayName":"Additional Info","englishName":"additional info","linkType":"move","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"4","hasChildren":true,"level2List":[{"displayName":"News \u0026 Alerts","englishName":"news and alerts","linkType":"move","linkUrl":"/uk/support/newsalert/","displayFlag":"Y","mobileOnlyFlag":"N","badgeFlag":"false","isBadgeDisplay":false,"shopLiveUseFlag":"false"}]}]],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},{"displayName":"For Business","englishName":"for business","linkType":"move","linkUrl":"/uk/business/","displayFlag":"Y","mobileOnlyFlag":"N","menuPosition":"right","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":false,"level1List":[],"layoutType":"l1only","ftImageAreaTitle":"New \u0026 Featured","ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false}],"beforeLoginModel":{"displayName":"Before Login","englishName":"before_login","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"level1List":[{"displayName":"Orders","englishName":"orders","linkType":"move","linkUrl":"/uk/mypage/orders/","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false},{"displayName":"Product Registration\n","englishName":"product registration","linkType":"move","linkUrl":"/uk/mypage/myproducts/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Samsung Rewards","englishName":"samsung rewards","linkType":"move","linkUrl":"/uk/rewards/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Members","englishName":"members","linkType":"move","linkUrl":"/uk/members/","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false}],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},"afterLoginModel":{"displayName":"After Login","englishName":"after_login","apiUseFlag":false,"ftImageUseFlag1":false,"ftImageUseFlag2":false,"ftImageUseFlag3":false,"ftImageUseFlag4":false,"ftImageUseFlag5":false,"ftImageUseFlag6":false,"ftImageUseFlag7":false,"ftImageUseFlag8":false,"ftImageUseFlag9":false,"hasChildren":true,"level1List":[{"displayName":"My page","englishName":"my page","linkType":"move","linkUrl":"/uk/mypage/","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false},{"displayName":"Orders","englishName":"orders","linkType":"move","linkUrl":"/uk/mypage/orders/","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false},{"displayName":"Wishlist","englishName":"wishlist","linkType":"new","linkUrl":"https://shop.samsung.com/uk/mypage/wishlist","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false},{"displayName":"Product Registration\n","englishName":"product registration","linkType":"move","linkUrl":"/uk/mypage/myproducts/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"My Rewards","englishName":"my rewards","linkType":"move","linkUrl":"/uk/mypage/rewards/","displayFlag":"Y","mobileOnlyFlag":"N","layoutColumn":"1","hasChildren":false},{"displayName":"Members","englishName":"members","linkType":"move","linkUrl":"/uk/members/","displayFlag":"Y","mobileOnlyFlag":"N","hasChildren":false}],"ftbadgeDisplay1":false,"ftbadgeDisplay2":false,"ftbadgeDisplay3":false,"ftbadgeDisplay4":false,"ftbadgeDisplay5":false,"ftbadgeDisplay6":false,"ftbadgeDisplay7":false,"ftbadgeDisplay8":false,"ftbadgeDisplay9":false},"gnbUtilModel":{"isLogin":"Y","isCart":"Y","shopIntegrationFlag":"Hybris-new","loginLinkUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate","logoutUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signOutGate","stgloginLinkUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate","stglogoutUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signOutGate","preqaloginLinkUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate","preqalogoutUrl":"https://account.samsung.com/accounts/v1/Samsung_com_UK/signOutGate","SAsignOutURL":"/aemapi/v6/data-login/afterLogout.uk.json","loginAccountServiceId":"84hg4924k6","SAserviceName":"SAMSUNG","countryCode":"GB","countryIsoCode":"GBR","languageCode":"en","registURL":"/aemapi/v6/data-login/afterLogin.uk.json","stgStoreDomain":"https://s3-smn4-api.ecom-stg.samsung.com","preqaStoreDomain":"https://api.shop.samsung.com","preqa2StoreDomain":"https://api.shop.samsung.com","uatStoreDomain":"https://s3-smn4-api.ecom-stg.samsung.com","uatStoreWebDomain":"https://stg3.shop.samsung.com","orderUrl":"/uk/web/my-orders/","cartUrl":"https://shop.samsung.com/uk/cart/","useFullCartUrl":false,"emailActivationURL":"/aemapi/v6/data-login/emailActivationURL.uk.json","storeDomain":"https://api.shop.samsung.com","trackOrderUrl":"/uk/web/search-orders/","privacyTag1":"\u003ca href\u003d\u0027/uk/info/privacy/\u0027 target\u003d\u0027_blank\u0027 class\u003d\u0027link-text\u0027 title\u003d\"Open in a new window\"\u003e","privacyTag2":"\u003c/a\u003e","wishlistUrl":"/uk/web/my-wishlist/","SAinfoUrl":"/uk/web/my-details/","saStoreDomain":"https://api.shop.samsung.com","stgStoreWebDomain":"https://stg3.shop.samsung.com","storeWebDomain":"https://shop.samsung.com","mySamsungRewardsTierType":"global","newMyRewardGrantPoint":"5%","newMyRewardCurrencyConv":"0.001"},"homeLinkPath":"/uk/","language":"en_GB"}; </script> <nav id="component-id" class="nv00-gnb" role="navigation" aria-label="main navigation"> <div class="nv00-gnb__inner-wrap"> <div class="nv00-gnb__inner-wrap-looping--start" tabindex="0"></div> <div class="nv00-gnb__logo-wrap"> <a href="/uk/" class="nv00-gnb__logo " an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="logo" aria-label="Samsung"> <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="120" height="32" viewBox="0 0 120 32"> <rect id="Clear_space" width="120" height="32" fill="none"/> <path id="Logo_ratio" d="M0,11.651V10.511H3.994v1.45a1.334,1.334,0,0,0,1.494,1.346A1.3,1.3,0,0,0,6.932,12.3a1.833,1.833,0,0,0-.026-1.113C6.133,9.243.851,8.363.18,5.333a5.347,5.347,0,0,1-.025-2.02C.567.88,2.705,0,5.359,0c2.113,0,5.025.492,5.025,3.754V4.816H6.674V3.884A1.275,1.275,0,0,0,5.282,2.537a1.25,1.25,0,0,0-1.365,1.01,2.021,2.021,0,0,0,.026.777c.437,1.734,6.081,2.667,6.7,5.8a6.943,6.943,0,0,1,.025,2.46C10.307,15.068,8.091,16,5.412,16,2.6,16,0,14.99,0,11.651ZM48.392,11.6V10.46h3.943v1.424A1.312,1.312,0,0,0,53.8,13.23a1.286,1.286,0,0,0,1.443-.984,1.759,1.759,0,0,0-.025-1.088c-.748-1.915-5.979-2.8-6.648-5.825a5.215,5.215,0,0,1-.026-1.994C48.959.932,51.1.052,53.7.052c2.088,0,4.973.518,4.973,3.728V4.816H54.989V3.91a1.268,1.268,0,0,0-1.365-1.346,1.2,1.2,0,0,0-1.34.984,2.017,2.017,0,0,0,.025.777c.412,1.734,6,2.641,6.623,5.747a6.806,6.806,0,0,1,.025,2.434c-.361,2.486-2.551,3.392-5.2,3.392C50.97,15.9,48.392,14.887,48.392,11.6Zm14.121.545a5.876,5.876,0,0,1-.025-.985V.44H66.25V11.495a4.111,4.111,0,0,0,.025.57,1.468,1.468,0,0,0,2.835,0,3.97,3.97,0,0,0,.026-.57V.44H72.9V11.158c0,.285-.026.829-.026.985-.257,2.8-2.448,3.7-5.179,3.7S62.771,14.938,62.513,12.143Zm30.974-.156A7.808,7.808,0,0,1,93.435,11V4.712c0-.259.025-.725.051-.985C93.821.932,96.063.052,98.717.052c2.629,0,4.947.88,5.206,3.676a7.185,7.185,0,0,1,.025.985V5.2h-3.762V4.376a3.1,3.1,0,0,0-.051-.57,1.553,1.553,0,0,0-2.964,0,3.088,3.088,0,0,0-.051.7V11.34a4.17,4.17,0,0,0,.026.57A1.472,1.472,0,0,0,98.717,13a1.406,1.406,0,0,0,1.52-1.087,2.09,2.09,0,0,0,.026-.57V9.165h-1.52V6.99H104V11a7.674,7.674,0,0,1-.052.984c-.257,2.718-2.6,3.676-5.231,3.676S93.744,14.705,93.487,11.987ZM41.049,15.378l-.1-13.825L38.369,15.378H34.607L32.055,1.553l-.1,13.825H28.242L28.551.466h6.056l1.881,11.651L38.369.466h6.055l.335,14.912Zm-19.79,0L19.249,1.553,17.187,15.378H13.168L15.9.466h6.623l2.732,14.912Zm62.977-.155L80.5,2.822l.206,12.4H77.046V.466h5.514l3.5,12.013L85.859.466h3.685V15.224Z" transform="translate(8 8)"/> </svg> </a> </div> <div class="nv00-gnb__search-wrap"> <button class="nv00-gnb__backward-btn"> <span class="hidden">previous menu</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#backward-bold" href="#backward-bold"></use> </svg> </button> <button class="nv00-gnb__search-btn gnb__search-btn-js" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="search"> <span class="hidden">search</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#search-bold" href="#search-bold"></use> </svg> </button> <button class="nv00-gnb__close-btn" an-tr="nv00_gnb-gnb-navigation2" an-ca="navigation" an-ac="gnb" an-la="gnb:close"> <span class="hidden">close menu</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <!-- 로그인 mobile S --> <div class="nv00-gnb__user-account-wrap"> <div class="nv00-gnb__user-account before-login"> <a class="nv00-gnb__user-account-link loginBtn" href="javascript:;" data-linkinfo="https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="sign in sign up"> Sign In/Sign-Up </a> <p class="nv00-gnb__utility-user-menu-rewards"> <a href="/uk/why-samsung-account/" class="nv00-gnb__utility-user-menu-rewards-link" aria-label="Why Create a Samsung Account? Samsung Rewards" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="rewards"> Why Create a Samsung Account? <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </a> </p> </div> <div class="nv00-gnb__user-account after-login"> <a class="nv00-gnb__user-account-link js-user-name" aria-label="Manage Account" href="https://account.samsung.com/membership/contents/profile/profile-gate"> <div class="image js-gnb-afterlogin-image"> <img class="image__main" src="" alt="alternative-text" role="img" data-comp-name="image"/> </div> <span class="account-icon js-gnb-afterlogin-no-image"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#user-bold" href="#user-bold"></use> </svg> </span> <p class="user-name"></p> <p class="hidden">Manage Account</p> </a> <p class="nv00-gnb__utility-user-menu-rewards"> <a href="/uk/why-samsung-account/" class="nv00-gnb__utility-user-menu-rewards-link" aria-label="Why Create a Samsung Account? Samsung Rewards" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="rewards"> Why Create a Samsung Account? <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </a> </p> </div> </div> <!-- 로그인 mobile E --> <div class="nv00-gnb__l0-menu-wrap"> <ul class="nv00-gnb__l0-menu-list left-menu" role="menubar"> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop"> Shop <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container left-side"> <p class="nv00-gnb__l1-menu-container-title">Shop<!-- 44 --></p> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="shop:new and featured" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured"> New &amp; Featured <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/trending-now/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:samsung com exclusives" role="menuitem"> Samsung.com Exclusives </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/apps/samsung-shop-app/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:samsung shop app " role="menuitem"> Samsung Shop App </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/all-tvs/?new-2024-tvs" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:new 2024 tvs" role="menuitem"> New 2024 TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/game-portal/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:game portal" role="menuitem"> Game Portal </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/smartphones/galaxy-z/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:foldable phones " role="menuitem"> Foldable Phones </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tablets/galaxy-tab-s/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:large tablets" role="menuitem"> Large Tablets <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/gaming/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:gaming" role="menuitem"> Gaming Products </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/smartthings/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:new and featured:smartthings" role="menuitem"> SmartThings </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="shop:offers" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers"> Offers <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:all offers" role="menuitem"> All Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/black-friday/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:black friday" role="menuitem"> Black Friday </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/curated-collections/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:curated collections" role="menuitem"> Curated Collections </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/shop/mobile/home/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:mobile offers" role="menuitem"> Mobile Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:television offers" role="menuitem"> Television Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/computing/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:laptop and computing offers" role="menuitem"> Laptop &amp; Computing Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/homeappliance/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:home appliances offers" role="menuitem"> Home Appliances Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/mobile/galaxygifts/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:galaxy gifts" role="menuitem"> Galaxy Gifts </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/offers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:business offers" role="menuitem"> Business Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/students-offers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:student and youth offers" role="menuitem"> Student &amp; Youth Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/key-worker-offers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:key worker &amp; teacher offers" role="menuitem"> Key Worker &amp; Teacher Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/live-shopping/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:offers:samsung live" role="menuitem"> Samsung Live </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="shop:why buy from samsung" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung"> Why buy from Samsung <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/why-buy-from-samsung/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:overview" role="menuitem"> Overview </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/samsung-finance/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:pay with samsung finance" role="menuitem"> Pay with Samsung Finance </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/price-promise/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:price promise" role="menuitem"> Price Promise </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/pay-monthly-contract/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:phone contracts" role="menuitem"> Phone Contracts </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/klarna/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:pay with klarna" role="menuitem"> Pay with Klarna </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/paypal-credit/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:pay with paypal" role="menuitem"> Pay with PayPal </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/trade-in/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:mobile trade in" role="menuitem"> Mobile Trade In </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/trade-up/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:tv monitor and home appliance trade up" role="menuitem"> TV &amp; Appliance Trade-Up </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/samsung-upgrade/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:upgrade members" role="menuitem"> Upgrade Members </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/samsung-care-plus/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:samsung care plus" role="menuitem"> Samsung Care+ </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/rewards/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:samsung rewards" role="menuitem"> Samsung Rewards </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://www.samsung.com/uk/explore/kings-cross/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="shop:why buy from samsung:samsung kx ldn" role="menuitem"> Samsung KX LDN<br /> </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai"> AI <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container"> <p class="nv00-gnb__l1-menu-container-title">AI</p><!-- 90 --> <div class="nv00-gnb__l1-menu-wrap l1-only"> <ul class="nv00-gnb__l1-menu-list" role="menu"> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/ai-products/" data-engname="ai:ai for all" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:ai for all" role="menuitem"> AI for All </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/galaxy-ai/" data-engname="ai:galaxy ai" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:galaxy ai" role="menuitem"> Galaxy AI </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/tvs/8k-tv/highlights/" data-engname="ai:samsung ai tv" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:samsung ai tv" role="menuitem"> Samsung AI TV </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/home-appliances/bespoke-home/" data-engname="ai:bespoke ai" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:bespoke ai" role="menuitem"> Bespoke AI </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/ai-products/all-ai-products/" data-engname="ai:all ai products" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:all ai products" role="menuitem"> All AI Products </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/ai-meets-ai/" data-engname="ai:ai meets ai" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="ai:ai meets ai" role="menuitem"> AI meets AI </a> </li> </ul> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile"> Mobile <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container"> <p class="nv00-gnb__l1-menu-container-title">Mobile</p><!-- 90 --> <div class="nv00-gnb__l1-menu-wrap l1-only"> <ul class="nv00-gnb__l1-menu-list" role="menu"> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile/" data-engname="mobile:discover mobiles" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:discover mobiles" role="menuitem"> Discover Mobiles<br /> </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/galaxy-ai/" data-engname="mobile:galaxy ai" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy ai" role="menuitem"> Galaxy AI </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/smartphones/" data-engname="mobile:galaxy smartphone" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy smartphone" role="menuitem"> Galaxy Smartphone </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/tablets/" data-engname="mobile:galaxy tab" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy tab" role="menuitem"> Galaxy Tab </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/galaxy-book/" data-engname="mobile:galaxy book and laptops" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy book and laptops" role="menuitem"> Galaxy Book &amp; Laptops </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/watches/" data-engname="mobile:galaxy watch" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy watch" role="menuitem"> Galaxy Watch </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/audio-sound/" data-engname="mobile:galaxy buds" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy buds" role="menuitem"> Galaxy Buds </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/rings/all-rings/" data-engname="mobile:galaxy ring" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy ring" role="menuitem"> Galaxy Ring </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile-accessories/" data-engname="mobile:galaxy accessories" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy accessories" role="menuitem"> Galaxy Accessories<br /> </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/one-ui/" data-engname="mobile:one ui" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:one ui" role="menuitem"> One UI </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/apps/samsung-health/" data-engname="mobile:samsung health" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:samsung health" role="menuitem"> Samsung Health </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/apps/" data-engname="mobile:apps and services" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:apps and services" role="menuitem"> Apps &amp; Services </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile/galaxygifts/" data-engname="mobile:galaxy gifts" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:galaxy gifts" role="menuitem"> Galaxy gifts </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/certified-re-newed-phones/" data-engname="mobile:certified re-newed" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:certified re-newed" role="menuitem"> Certified Re-Newed </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile/why-galaxy/" data-engname="mobile:why galaxy" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:why galaxy" role="menuitem"> Why Galaxy </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile/switch-to-galaxy/" data-engname="mobile:switch to galaxy" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:switch to galaxy" role="menuitem"> Switch to Galaxy </a> </li> <li class="nv00-gnb__l1-menu"> <a class="nv00-gnb__l1-menu-link" href="/uk/mobile-phone-buying-guide/" data-engname="mobile:find the best samsung phone" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="mobile:find the best samsung phone" role="menuitem"> Find The Best Samsung Phone </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap featured-products-thumbnail"> <p class="nv00-gnb__featured-products-thumbnail-title">New &amp; Featured</p> <div class="nv00-gnb__featured-products-thumbnail-item-container"> <button class="nv00-gnb__featured-products-thumbnail-item--previous"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#previous-regular" href="#previous-regular"></use> </svg> </button> <ul class="nv00-gnb__featured-products-thumbnail-item-wrap" role="menu"> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/smartphones/galaxy-z-fold6/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy z fold6" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Z Fold6" data-mobile-alt="Galaxy Z Fold6" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_Q6_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy Z Fold6" data-mobile-alt="Galaxy Z Fold6" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Z Fold6</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/smartphones/galaxy-z-flip6/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy z flip6" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Z Flip6" data-mobile-alt="Galaxy Z Flip6" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/GNB_B6_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy Z Flip6" data-mobile-alt="Galaxy Z Flip6" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Z Flip6</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/smartphones/galaxy-s24-ultra/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy s24 ultra" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy S24 Ultra" data-mobile-alt="Galaxy S24 Ultra" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E3_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy S24 Ultra" data-mobile-alt="Galaxy S24 Ultra" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy S24 Ultra</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/smartphones/galaxy-s24/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy s24 and s24 plus" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy S24 | S24+" data-mobile-alt="Galaxy S24 | S24+" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2404/gnb/GNB_E1E2_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy S24 | S24+" data-mobile-alt="Galaxy S24 | S24+" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy S24 | S24+</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/smartphones/galaxy-s/galaxy-s24-fe-blue-128gb-sm-s721blbdeub/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:Galaxy S24 FE" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy S24 FE" data-mobile-alt="Galaxy S24 FE" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_R12_168x136_mo-1.png?$168_136_PNG$" data-desktop-alt="Galaxy S24 FE" data-mobile-alt="Galaxy S24 FE" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy S24 FE</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/tablets/galaxy-tab-s/galaxy-tab-s10-ultra-grey-256gb-wi-fi-sm-x920nzareub/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy tab s10 series" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Tab S10 Series" data-mobile-alt="Galaxy Tab S10 Series" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/gnb/GNB_TS10-Series_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy Tab S10 Series" data-mobile-alt="Galaxy Tab S10 Series" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Tab S10 Series</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/watches/galaxy-watch/galaxy-watch-ultra-titanium-grey-lte-sm-l705fdaaeua/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy watch ultra" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Watch Ultra" data-mobile-alt="Galaxy Watch Ultra" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/WatchUltra_GNB_mo_168x136.png?$168_136_PNG$" data-desktop-alt="Galaxy Watch Ultra" data-mobile-alt="Galaxy Watch Ultra" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Watch Ultra</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/audio-sound/galaxy-buds/galaxy-buds3-pro-silver-sm-r630nzaaeua/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy buds3 pro" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Buds3 Pro" data-mobile-alt="Galaxy Buds3 Pro" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/HOME_Buds3Pro_GNB_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy Buds3 Pro" data-mobile-alt="Galaxy Buds3 Pro" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Buds3 Pro</p> </a> </li> <li class="nv00-gnb__featured-products-thumbnail-item"> <a href="/uk/rings/galaxy-ring/galaxy-ring-titanium-black-size-10-sm-q500nzkaeub/" an-tr="nv00_gnb-feature image-navigation2" an-ca="navigation" an-ac="gnb" an-la="feature image:mobile:galaxy ring" class="nv00-gnb__featured-products-thumbnail-item-link" role="menuitem"> <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> <div class="image"> <img class="image__preview lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$LazyLoad_Home_PNG$" data-desktop-alt="Galaxy Ring" data-mobile-alt="Galaxy Ring" role="img" data-comp-name="image"/> <img class="image__main lazy-load-man" data-src="//images.samsung.com/is/image/samsung/assets/uk/2407/gnb/Ring_GNB_168x136_mo.png?$168_136_PNG$" data-desktop-alt="Galaxy Ring" data-mobile-alt="Galaxy Ring" role="img" data-comp-name="image"/> </div> <p class="nv00-gnb__featured-products-thumbnail-item-name">Galaxy Ring</p> </a> </li> </ul> <button class="nv00-gnb__featured-products-thumbnail-item--next"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-regular" href="#next-regular"></use> </svg> </button> </div> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio"> TV &amp; AV <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container left-side"> <p class="nv00-gnb__l1-menu-container-title">TV &amp; AV<!-- 44 --></p> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:recommended" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended"> Recommended <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/help-me-choose/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:help choose my tv" role="menuitem"> Help choose my TV </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/help-me-choose/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:help choose my sound device" role="menuitem"> Help choose my Sound Device </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/why-samsung-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why samsung tv" role="menuitem"> Why Samsung TV </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/8k-tv/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why 8k tv" role="menuitem"> Why 8K TV </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/qled-tv/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why neo qled" role="menuitem"> Why Neo QLED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/oled-tv/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why samsung oled" role="menuitem"> Why Samsung OLED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/the-frame/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why the frame" role="menuitem"> Why The Frame<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/gaming-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:best samsung gaming tv" role="menuitem"> Best Samsung Gaming TV </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/sports-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:best samsung tv for sports" role="menuitem"> Best Samsung TV for Sports </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/smart-tv/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:why samsung smart tv" role="menuitem"> Why Samsung Smart TV<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/smart-tv/made-for-uk/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:made for uk" role="menuitem"> Made for UK </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/tv-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:tv buying guide" role="menuitem"> TV buying guide<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/micro-led/highlights/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:micro led" role="menuitem"> Micro LED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/trade-up/#tvs-tab" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:tv trade up" role="menuitem"> TV and Soundbar Trade Up </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://www.samsung.com/uk/tvs/all-tvs/?tv-bundles" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:recommended:tv bundles" role="menuitem"> TV Bundles </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="none"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:tvs" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs"> TVs <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:discover tvs" role="menuitem"> Discover TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/compare/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:compare tvs" role="menuitem"> Compare TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/neo-qled-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:neo qled" role="menuitem"> Neo QLED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/qled-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:qled" role="menuitem"> QLED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/oled-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:oled" role="menuitem"> OLED </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/the-frame/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:the frame" role="menuitem"> The Frame<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/the-serif/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:the serif" role="menuitem"> The Serif<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/the-terrace/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:the terrace" role="menuitem"> The Terrace<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/the-sero/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:the sero" role="menuitem"> The Sero<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/all-tvs/?crystal-uhd" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:crystal uhd" role="menuitem"> Crystal UHD </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/full-hd-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:full hd hd tvs" role="menuitem"> Full HD/HD TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tv-accessories/all-tv-accessories/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:tv accessories" role="menuitem"> TV Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/lifestyle-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:discover lifestyle tvs" role="menuitem"> Discover Lifestyle TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/#tv-ranges" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:tv range navigator" role="menuitem"> TV Range Navigator </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/all-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tvs:all tvs" role="menuitem"> All TVs </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="none"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:tv by size" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size"> TV by Size <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/98-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:98 inch tvs" role="menuitem"> 98 inch TVs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/85-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:85 inch tvs" role="menuitem"> 85 inch TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/75-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:75 inch tvs" role="menuitem"> 75 inch TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/65-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:65 inch tvs" role="menuitem"> 65 inch TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/55-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:55 inch tvs" role="menuitem"> 55 inch TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/50-inch-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:50 inch tvs" role="menuitem"> 50 inch TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/all-tvs/?43-and-under" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:43 inch tvs" role="menuitem"> 43 inch TVs or smaller </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/tv-buying-guide/what-size-tv-should-i-get/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:what size tv should i get" role="menuitem"> What size TV should I get?<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/big-screen-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:why upgrade your screen size" role="menuitem"> Why upgrade your screen size? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/supersize-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:why a 98 tv" role="menuitem"> Why a 98” TV? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/all-tvs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by size:all tvs" role="menuitem"> All TVs<br /> </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:tv by resolution" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution"> TV by Resolution<br /> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/8k-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution:8k tvs" role="menuitem"> 8K TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/uhd-4k-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution:4k tvs" role="menuitem"> 4K TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/full-hd-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution:full hd hd tvs" role="menuitem"> Full HD/HD TVs<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/tv-buying-guide/what-is-4k-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution:what is 4k tv?" role="menuitem"> What is 4K TV? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/tvs/tv-buying-guide/what-is-8k-tv/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:tv by resolution:what is 8k tv?" role="menuitem"> What is 8K TV? </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:projectors" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors"> Projectors <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/projector/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors:discover projectors" role="menuitem"> Discover Projectors </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/projectors/all-projectors/?the-premiere" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors:the premiere" role="menuitem"> The Premiere <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/projectors/the-freestyle/the-freestyle-2nd-gen-sp-lff3claxxxu/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors:the freestyle" role="menuitem"> The Freestyle </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/projector-accessories/all-projector-accessories/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors:projector accessories" role="menuitem"> Projector Accessories<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/projectors/all-projectors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:projectors:all projectors" role="menuitem"> All Projectors </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="03000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="tv and audio:sound devices" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices"> Sound Devices <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:discover sound devices" role="menuitem"> Discover Sound Devices </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/soundbar-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:soundbar buying guide" role="menuitem"> Soundbar Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?q-series-soundbars" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:q series soundbars" role="menuitem"> Q-series Soundbars </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?ultra-slim-soundbars" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:ultra slim soundbars" role="menuitem"> Ultra Slim Soundbars </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?s-series-soundbars" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:s series soundbars" role="menuitem"> S-series Soundbars </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?b-series-soundbars" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:b series soundbars" role="menuitem"> B-series Soundbars<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?all-in-one-soundbars" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:all in one soundbars" role="menuitem"> All in One Soundbars </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?soundbars-with-sub-woofers" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:soundbars with subwoofers" role="menuitem"> Soundbars with Subwoofers<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://www.samsung.com/uk/audio-devices/all-audio-devices/?music-frame" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:music frame" role="menuitem"> Music Frame <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/?sound-tower" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:sound towers" role="menuitem"> Sound Towers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-accessories/all-audio-accessories/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:audio accessories" role="menuitem"> Audio Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/#SoundbarRangeNavigator" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:soundbar range navigator" role="menuitem"> Soundbar Range Navigator </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/audio-devices/all-audio-devices/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="tv and audio:sound devices:all sound devices" role="menuitem"> All Sound Devices </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances"> Home Appliances <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container left-side"> <p class="nv00-gnb__l1-menu-container-title">Home Appliances<!-- 44 --></p> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:recommended" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended"> Recommended <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/bespoke-ai/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:discover bespoke ai" role="menuitem"> Discover Bespoke AI </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/why-samsung-appliances/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:why samsung" role="menuitem"> Why Samsung? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/ai-energy-saving/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:ai energy saving" role="menuitem"> AI Energy Saving </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/bespoke-ai-smartthings/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:bespoke ai meets smartthings" role="menuitem"> BESPOKE AI meets SmartThings </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/british-gas-bill-credit-promotion/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:british gas promo" role="menuitem"> British Gas Promo </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/autumn-appliance-sale/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:autumn cashback" role="menuitem"> Autumn Cashback </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/free-persil-with-washing-machine-deals/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:persil offer" role="menuitem"> Persil Offer </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:discover home appliances" role="menuitem"> Discover Home Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://www.samsung.com/uk/home-appliances/pet-care/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:pet care appliances" role="menuitem"> Pet Care Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/homeappliance/bundles/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:build your appliances bundle" role="menuitem"> Build Your Home Appliances Bundle </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/learn/energy-efficient-home-appliances/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:energy efficiency appliances" role="menuitem"> Energy Efficient Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/trade-up/#refrigerator-tab" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:home appliance trade up" role="menuitem"> Home Appliance Trade Up<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:buying guide" role="menuitem"> Home Appliance Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/samsung-food/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:recommended:samsung food" role="menuitem"> Samsung Food </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="07000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:refrigerators" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators"> Refrigerators <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:discover refrigerators" role="menuitem"> Discover Refrigerators </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/?bespoke-ai-new+bespoke+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:bespoke refrigerators" role="menuitem"> BESPOKE Refrigerators </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/energy-efficient/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:energy efficientf fridge freezers" role="menuitem"> Energy Efficient Fridge Freezers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/smart/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:smart fridge freezers" role="menuitem"> Smart Fridge Freezers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/french-door/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:french style fridge freezer" role="menuitem"> French Style Fridge Freezer </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/american-style/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:american style fridge freezer" role="menuitem"> American Style Fridge Freezer </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/?classic-fridge-freezer+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:classic fridge freezers" role="menuitem"> Classic Fridge Freezers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/?1-door-fridge+1-door-freezer+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:one door" role="menuitem"> One Door Fridge or Freezer </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/integrated-fridge-freezer/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:integrated refrigerators" role="menuitem"> Integrated Refrigerators </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliance-accessories/all-home-appliance-accessories/refrigerators/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:fridge freezer accessories" role="menuitem"> Fridge Freezer Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/buying-guide/what-is-the-best-type-of-fridge-freezer/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:refrigeration buying guide" role="menuitem"> Refrigeration Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/refrigerators/all-refrigerators/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:refrigerators:all refrigerators" role="menuitem"> All Refrigerators </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="07000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:laundry" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry"> Laundry <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:discover laundry" role="menuitem"> Discover Laundry </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/all-washers-and-dryers/?bespoke-ai-washing-machine+bespoke-ai-tumble-dryer+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:bespoke ai laundry" role="menuitem"> BESPOKE AIᵀᴹ Laundry </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/washing-machines/energy-efficient/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:energy efficient washing machines" role="menuitem"> Energy Efficient Washing Machines<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/dryers/energy-efficient/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:energy efficient tumble dryers" role="menuitem"> Energy Efficient Tumble Dryers<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/washing-machines/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:washing machines" role="menuitem"> Washing Machines </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/washer-dryer-combo/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:washer dryers" role="menuitem"> Washer Dryers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/dryers/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:tumble dryers" role="menuitem"> Tumble Dryers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliance-accessories/all-home-appliance-accessories/?washers-and-dryers" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:laundry accessories" role="menuitem"> Laundry Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/#series-explainer" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:kaundry series navigator" role="menuitem"> Laundry Series Navigator </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/buying-guide/what-size-washing-machine-do-i-need/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:laundry appliance buying guide" role="menuitem"> Laundry Appliance Buying Guide<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/washers-and-dryers/all-washers-and-dryers/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:laundry:all laundry" role="menuitem"> All Laundry </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="07000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:vacuum cleaners" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners"> Vacuum Cleaners <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:discover vacuum cleaners" role="menuitem"> Discover Vacuum Cleaners </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/stick/bespoke-jet-ai-black-vs28c9784qk-eu/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:bespoke jet ai vacuum" role="menuitem"> BESPOKE Jet™ AI Vacuum </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/all-vacuum-cleaners/?bespoke-jettm+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:bespoke jet stick vacuums" role="menuitem"> BESPOKE Jet™ Stick Vacuums </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/stick/?jet-stick+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:jet cordless stick vacuums" role="menuitem"> Jet™ Cordless Stick Vacuums </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/robot/?robots+jet-bot-combo+available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:jet bot robot vacuums" role="menuitem"> Jet Bot™ Robot Vacuums </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliance-accessories/all-home-appliance-accessories/vacuum-cleaners/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:battery packs and accessories" role="menuitem"> Battery Packs &amp; Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/#series-explainer" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:vacuum series navigator" role="menuitem"> Vacuum Series Navigator </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/home-appliances/learn/vacuum-cleaners/how-to-choose-a-vacuum-cleaner/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:vacuum cleaner buying guide" role="menuitem"> Vacuum Cleaner Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/vacuum-cleaners/all-vacuum-cleaners/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:vacuum cleaners:all vacuum cleaners" role="menuitem"> All Vacuum Cleaners </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="07000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:cooking appliances" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances"> Cooking Appliances <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:discover cooking appliances" role="menuitem"> Discover Cooking Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/all-cooking-appliances/?bespoke+available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:bespoke cooking appliances" role="menuitem"> BESPOKE Cooking Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/ovens/energy-efficient/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:energy efficient cooking appliances" role="menuitem"> Energy Efficient Cooking Appliances </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/ovens/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:ovens" role="menuitem"> Ovens </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/hobs/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:hobs" role="menuitem"> Hobs </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/hoods/?available-to-order" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:hoods" role="menuitem"> Hoods </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/microwave-ovens/all-microwave-ovens/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:microwaves" role="menuitem"> Microwaves </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/cooking-appliances/all-cooking-appliances/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:cooking appliances:all cooking appliances" role="menuitem"> All Cooking Appliances </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu" data-group-code="07000000"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:dishwashers" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:dishwashers"> Dishwashers <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/dishwashers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:dishwashers:discover dishwashers" role="menuitem"> Discover Dishwashers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/dishwashers/built-in/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:dishwashers:built in dishwashers" role="menuitem"> Built- in Dishwashers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/dishwashers/freestanding/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:dishwashers:freestanding dishwashers" role="menuitem"> Freestanding Dishwashers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/dishwashers/all-dishwashers/?available-to-order/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:dishwashers:all dishwashers" role="menuitem"> All Dishwashers </a> </li> </ul> <div class="nv00-gnb__l1-menu desktop-only"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:heating and cooling" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling"> Heating &amp; Cooling <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://samsung-climatesolutions.com/en-gb/b2c.html?cid=uk_ow_affiliate_samsung_air-conditioning_none_gnb-climatesolutions_other_creative3_segment3" aria-label="All Air Conditioners : Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling:all air conditioners " role="menuitem" target="_blank"> All Air Conditioners <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://samsung-climatesolutions.com/en-gb/b2c/our-solutions/home/heat-pump-solutions.html?cid=uk_ow_affiliate_samsung_heatpump_none_gnb-climatesolutions_other_creative4_segment4" aria-label="All Heat Pumps : Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling:all heat pumps " role="menuitem" target="_blank"> All Heat Pumps <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="home appliances:heating and cooling" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling"> Heating &amp; Cooling <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://samsung-climatesolutions.com/en-gb/b2c.html?cid=uk_ow_affiliate_samsung_air-conditioning_none_gnb-climatesolutions_other_creative3_segment3" aria-label="All Air Conditioners : Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling:all air conditioners " role="menuitem" target="_blank"> All Air Conditioners <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://samsung-climatesolutions.com/en-gb/b2c/our-solutions/home/heat-pump-solutions.html?cid=uk_ow_affiliate_samsung_heatpump_none_gnb-climatesolutions_other_creative4_segment4" aria-label="All Heat Pumps : Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="home appliances:heating and cooling:all heat pumps " role="menuitem" target="_blank"> All Heat Pumps <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> </ul> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing"> Computing <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container left-side"> <p class="nv00-gnb__l1-menu-container-title">Computing<!-- 44 --></p> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="computing:recommended" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended"> Recommended <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/computing/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:laptop and computing offers" role="menuitem"> Laptop &amp; Computing Offers </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/help-me-choose/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:help me choose my monitor" role="menuitem"> Help me Choose my Monitor <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/laptop-buying-guide/best-gaming-laptop/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:best samsung gaming setup" role="menuitem"> Best Samsung Gaming Laptop </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/laptop-buying-guide/samsung-laptop-series-explained/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:what is the best samsung laptop" role="menuitem"> What is the best Samsung Laptop? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/laptop-buying-guide/best-laptop-for-students/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:what is the best samsung laptop for students" role="menuitem"> What is the best Samsung Laptops for students? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/computing/use-smart-switch-to-transfer-your-data-to-your-new-galaxy-book/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:galaxy book smart switch" role="menuitem"> Galaxy Book Smart Switch </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/trade-up/#monitors-tab" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:monitor trade up" role="menuitem"> Monitor Trade Up </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/monitor-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:monitor buying guide" role="menuitem"> Monitor Buying Guide<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/odyssey-gaming-monitor/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:what is odyssey gaming" role="menuitem"> What is Odyssey Gaming? </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/smart_monitors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:smart monitor buying guide" role="menuitem"> Smart Monitor Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/monitor-buying-guide/how-to-select-by-resolution/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:recommended:which monitor resolution is best for you" role="menuitem"> Which Monitor Resolution is best for you? </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="computing:galaxy book and laptops" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops"> Galaxy Book &amp; Laptops <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/galaxy-book/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:discover galaxy book" role="menuitem"> Discover Galaxy Book </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/galaxy-book/galaxy-book5-pro360/buy/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book5 pro 360" role="menuitem"> Galaxy Book5 Pro 360 <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4 ultra" role="menuitem"> Galaxy Book4 Ultra </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book-edge" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4 edge" role="menuitem"> Galaxy Book4 Edge </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book-360" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4 pro 360" role="menuitem"> Galaxy Book4 Pro 360 </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4 pro" role="menuitem"> Galaxy Book4 Pro </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book-360" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4 360" role="menuitem"> Galaxy Book4 360 </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?galaxy-book" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy book4" role="menuitem"> Galaxy Book4 </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/galaxy-book-copilot-plus-pcs/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:copilot+pc" role="menuitem"> Copilot+PC </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/chromebook/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:samsung chromebook" role="menuitem"> Samsung Chromebook </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computer-accessories/all-computer-accessories/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:accessories" role="menuitem"> Accessories </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:all laptops" role="menuitem"> All Laptops </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/galaxy-book/compare/?product1=np950qed-kb1uk&product2=np950xed-kb1uk&product3=np935qdb-ka2uk" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:compare" role="menuitem"> Compare </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/laptop-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:help me choose" role="menuitem"> Help Me Choose </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://www.samsung.com/global/galaxybooks-downloadcenter/?siteCode=uk" aria-label="Galaxy Books Download Centre: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book and laptops:galaxy books download centre" role="menuitem" target="_blank"> Galaxy Books Download Centre <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="computing:galaxy book by size" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book by size"> Galaxy Book By Size <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?156+160" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book by size:156 to 160" role="menuitem"> 15.6&quot; - 16.0&quot; </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?133+140" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book by size:133 to 149" role="menuitem"> 13.3” - 14.0”<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/?110+124" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book by size:110 to 129" role="menuitem"> 11.0” - 12.9” </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/computers/all-computers/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:galaxy book by size:all galaxy book by size" role="menuitem"> All Galaxy Book By Size </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="computing:computer monitors" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors"> Computer Monitors <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/help-me-choose/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:help me choose my monitor" role="menuitem"> Help me Choose my Monitor <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:discover computer monitors" role="menuitem"> Discover Computer Monitors </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/gaming/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:gaming monitor" role="menuitem"> Gaming Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/smart/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:smart monitor" role="menuitem"> Smart Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/high-resolution/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:high resolution monitor" role="menuitem"> High Resolution Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/all-monitors/?viewfinity" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:viewinfinity monitor" role="menuitem"> ViewFinity Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/4k-monitor/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:4k uhd monitor" role="menuitem"> 4K UHD Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/curved/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:curved monitor" role="menuitem"> Curved Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/ultra-wide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:ultrawide monitor" role="menuitem"> Ultrawide Monitor<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/business/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:business" role="menuitem"> Business Monitor<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/all-monitors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:all monitors" role="menuitem"> All Monitors<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/monitor-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:computer monitors:monitor buying guide" role="menuitem"> Monitor Buying Guide </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="computing:memory and storage" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage"> Memory &amp; Storage <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage-devices/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:discover memory and storage" role="menuitem"> Discover Memory &amp; Storage </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/nvme-ssd/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:nvme ssd" role="menuitem"> NVME SSD </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/sata-ssd/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:sata ssd" role="menuitem"> SATA SSD </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/portable-ssd/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:portable ssd" role="menuitem"> Portable SSD </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/memory-card/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:memory cards" role="menuitem"> Memory Cards </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/usb-flash-drive/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:usb flash drive" role="menuitem"> USB Flash Drive </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/memory-storage/all-memory-storage/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="computing:memory and storage:all memory and storage" role="menuitem"> All Memory &amp; Storage </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays"> Displays <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container "> <p class="nv00-gnb__l1-menu-container-title">Displays<!-- 44 --></p> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="displays:monitors" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors"> Monitors <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/help-me-choose/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:help me choose my monitor" role="menuitem"> Help me Choose my Monitor <span class="badge-icon badge-icon--label badge-icon--bg-color-blue">New</span> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:discover monitors" role="menuitem"> Discover Monitors </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/gaming/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:gaming monitor" role="menuitem"> Gaming Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/smart/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:smart monitor" role="menuitem"> Smart Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/high-resolution/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:high resolution monitor" role="menuitem"> High Resolution Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/all-monitors/?viewfinity" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:viewinfinity monitor" role="menuitem"> ViewFinity Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/4k-monitor/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:4k uhd monitor" role="menuitem"> 4K UHD Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/curved/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:curved monitor" role="menuitem"> Curved Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/ultra-wide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:ultrawide monitor" role="menuitem"> Ultrawide Monitor </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/business/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:business monitor" role="menuitem"> Business Monitor<br /> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/all-monitors/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:all monitors" role="menuitem"> All Monitors </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/monitors/monitor-buying-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:monitor buying guide" role="menuitem"> Monitor Buying Guide </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/offer/trade-up/#monitors-tab" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:monitors:monitor tradeup" role="menuitem"> Monitor Trade Up </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="displays:for business" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business"> For Business <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/commercial-tvs/" aria-label="Discover Commercial TVs: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business:discover commercial tvs" role="menuitem" target="_blank"> Discover Commercial TVs <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/smart-signage/" aria-label="SMART Signage: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business:smart signage" role="menuitem" target="_blank"> SMART Signage <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/led-signage/" aria-label="LED Signage: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business:led signage" role="menuitem" target="_blank"> LED Signage <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/commercial-tvs/" aria-label="Commercial TVs: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business:commercial tvs" role="menuitem" target="_blank"> Commercial TVs <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/business/monitors/" aria-label="Monitors: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="displays:for business:monitors" role="menuitem" target="_blank"> Monitors <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <a class="nv00-gnb__l0-menu-link" href="/uk/accessories/" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="accessories" role="menuitem"> Accessories </a> </li> <li class="nv00-gnb__l0-menu"> <a class="nv00-gnb__l0-menu-link" href="/uk/smartthings/" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="smartthings" role="menuitem"> SmartThings </a> </li> <li class="nv00-gnb__l0-menu"> <a class="nv00-gnb__l0-menu-link" href="/uk/offer/black-friday/" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="black friday" role="menuitem"> Black Friday </a> </li> </ul> <ul class="nv00-gnb__l0-menu-list right-menu" role="menubar"> <li class="nv00-gnb__l0-menu"> <button class="nv00-gnb__l0-menu-btn" role="menuitem" aria-expanded="false" aria-haspopup="true" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support"> Support <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </button> <div class="nv00-gnb__l1-menu-container right-side"> <p class="nv00-gnb__l1-menu-container-title">Support</p><!-- 205 --> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="support:product help" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help"> Product Help <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help:support home" role="menuitem"> Support Home </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/user-manuals-and-guide/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help:manual and software" role="menuitem"> Manual and Software </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/search/?searchvalue=mobile#support" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help:search support" role="menuitem"> Search Support </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/shop-faq/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help:shop faq" role="menuitem"> SHOP FAQ </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/product-help/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:product help:how to guides" role="menuitem"> How to Guides </a> </li> </ul> </div> <!-- 205 --> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="support:repair and warranty" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty"> Repairs &amp; Warranty <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/warranty/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:warranty information" role="menuitem"> Warranty Information </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/repair/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:troubleshoot and book a repair" role="menuitem"> Troubleshoot &amp; Book a Repair </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/repair/track-my-repair/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:track my repair" role="menuitem"> Track My Repair </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/warranty/register-your-samsung-product-warranty/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:register your samsung product" role="menuitem"> Register your Samsung Product </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/spare-parts/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:spare parts" role="menuitem"> Spare Parts </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/self-repair/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:repair and warranty:self repair" role="menuitem"> Self-Repair </a> </li> </ul> </div> <!-- 205 --> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="support:contact" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:contact"> Contact <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/contact/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:contact:contact us" role="menuitem"> Contact Us </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/contact/accessibility/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:contact:sign language support" role="menuitem"> Sign Language Support </a> </li> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="https://eu.community.samsung.com/?category.id=uk&profile.language=en-gb" aria-label="Ask the Community: Open in a new window" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:contact:ask the community" role="menuitem" target="_blank"> Ask the Community <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> </ul> </div> <!-- 205 --> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread"> <div class="nv00-gnb__l1-menu"> <h3 class="nv00-gnb__l1-menu-btn" data-engname="support:additional info" an-tr="nv00_gnb-2depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:additional info"> Additional Info <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> </h3> </div> <ul class="nv00-gnb__l2-menu-list" role="menu"> <li class="nv00-gnb__l2-menu"> <a class="nv00-gnb__l2-menu-link" href="/uk/support/newsalert/" an-tr="nv00_gnb-3depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="support:additional info:news and alerts" role="menuitem"> News &amp; Alerts </a> </li> </ul> </div> <div class="nv00-gnb__l1-menu-wrap l1-l2-spread mobile-only"> </div> </div> </li> <li class="nv00-gnb__l0-menu"> <a class="nv00-gnb__l0-menu-link" href="/uk/business/" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="for business" role="menuitem"> For Business </a> </li> </ul> </div> <div class="nv00-gnb__utility-wrap"> <div class="nv00-gnb__utility search"> <button class="nv00-gnb__utility-btn gnb__search-btn-js" an-tr="nv00_gnb-microsite-l0-navigation2" an-ca="navigation" an-ac="gnb" an-la="search" aria-haspopup="true" aria-expanded="false"> <span class="hidden">Search </span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#search-bold" href="#search-bold"></use> </svg> </button> </div> <div class="nv00-gnb__utility cart"> <a class="nv00-gnb__utility-btn js-global-cart-btn js-has-carturl" data-cart-url="https://shop.samsung.com/uk/cart/" href="https://shop.samsung.com/uk/cart/" an-tr="nv00_gnb--cart-depth1" an-ca="navigation" an-ac="gnb" an-la="cart" role="button"> <span class="hidden">Basket</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#cart-bold" href="#cart-bold"></use> </svg> <span class="cart-in-number gnb-cart-count" aria-live="polite" style="display:none;"><span class="hidden">Number of Products : </span></span> </a> </div> <div class="nv00-gnb__utility before-login"> <a class="nv00-gnb__utility-btn mobile-only loginBtn" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="login" aria-label="Manage Account" href="javascript:;" role="button"> <span class="hidden">Sign In/Sign-Up</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#user-bold" href="#user-bold"></use> </svg> </a> <ul class="nv00-gnb__utility-user-menu-list" role="menu"> <li class="nv00-gnb__utility-user-menu desktop-only"> <a class="nv00-gnb__utility-user-menu-link loginBtn" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="sign in sign up" aria-label="sign in sign up" href="javascript:;" data-linkinfo="https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate" role="menuitem"> Sign In/Sign-Up </a> <p class="nv00-gnb__utility-user-menu-rewards"> <a href="/uk/why-samsung-account/" class="nv00-gnb__utility-user-menu-rewards-link" aria-label="Why Create a Samsung Account? Samsung Rewards" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="rewards"> Why Create a Samsung Account? <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </a> </p> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" href="/uk/mypage/orders/" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="orders" aria-label="orders" role="menuitem"> Orders </a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" href="/uk/mypage/myproducts/" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="product registration" aria-label="product registration" role="menuitem"> Product Registration<br /> </a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" href="/uk/rewards/" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="samsung rewards" aria-label="samsung rewards" role="menuitem"> Samsung Rewards </a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" href="/uk/members/" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="members" aria-label="members" role="menuitem"> Members </a> </li> </ul> </div> <div class="nv00-gnb__utility after-login"> <a class="nv00-gnb__utility-btn mobile-only js-account" href="javascript:;" role="button" aria-label="Manage Account"> <span class="hidden">Manage Account</span> <div class="image js-gnb-afterlogin-image"> <img class="image__main" src="" alt="alternative-text" role="img" data-comp-name="image"/> </div> <span class="account-icon js-gnb-afterlogin-no-image"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#user-bold" href="#user-bold"></use> </svg> </span> </a> <ul class="nv00-gnb__utility-user-menu-list" role="menu"> <li class="nv00-gnb__utility-user-menu user desktop-only"> <a class="nv00-gnb__utility-user-menu-link js-user-name" href="https://account.samsung.com/membership/contents/profile/profile-gate" role="menuitem" aria-label="Manage Account"> <div class="image js-gnb-afterlogin-image"> <img class="image__main" src="" alt="alternative-text" role="img" data-comp-name="image"/> </div> <span class="account-icon js-gnb-afterlogin-no-image"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#user-bold" href="#user-bold"></use> </svg> </span> <p class="user-name"></p> <p class="hidden">Manage Account</p> </a> <p class="nv00-gnb__utility-user-menu-rewards"> <a href="/uk/why-samsung-account/" class="nv00-gnb__utility-user-menu-rewards-link" aria-label="Why Create a Samsung Account? Samsung Rewards" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="rewards"> Why Create a Samsung Account? <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#next-bold" href="#next-bold"></use> </svg> </a> </p> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="my page" target="_self" aria-label="my page" href="/uk/mypage/" role="menuitem">My page</a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="orders" target="_self" aria-label="orders" href="/uk/mypage/orders/" role="menuitem">Orders</a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="wishlist" target="_blank" aria-label="wishlist" href="https://shop.samsung.com/uk/mypage/wishlist" role="menuitem">Wishlist</a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="product registration" target="_self" aria-label="product registration" href="/uk/mypage/myproducts/" role="menuitem">Product Registration<br /></a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="my rewards" target="_self" aria-label="my rewards" href="/uk/mypage/rewards/" role="menuitem">My Rewards</a> </li> <li class="nv00-gnb__utility-user-menu"> <a class="nv00-gnb__utility-user-menu-link" an-tr="nv00_gnb-account-account" an-ca="account" an-ac="gnb" an-la="members" target="_self" aria-label="members" href="/uk/members/" role="menuitem">Members</a> </li> <li class="nv00-gnb__utility-user-menu"> <a href="javascript:;" class="nv00-gnb__utility-user-menu-link logoutBtn" an-tr="nv00_gnb-1depth-navigation2" an-ca="navigation" an-ac="gnb" an-la="logout" aria-label="logout" role="menuitem">Log out</a> </li> </ul> </div> <div class="nv00-gnb__utility hamburger"> <button class="nv00-gnb__utility-btn" an-tr="nv00_gnb-gnb-navigation2" an-ca="navigation" an-ac="gnb" an-la="gnb:open" aria-expanded="false" aria-haspopup="true"> <span class="hidden">Navigation</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#menu-bold" href="#menu-bold"></use> </svg> </button> </div> </div> <div class="nv00-gnb__inner-wrap-looping--end" tabindex="0"></div> </div> <div class="nv00-gnb__dim-wrap" aria-hidden="true"></div> <form id="signInForm" name="signInForm" method="get" action="https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate"> <input type="hidden" name="response_type" id="response_type" value=""/> <input type="hidden" name="client_id" value="84hg4924k6"/> <input type="hidden" name="locale" id="locale" value=""/> <input type="hidden" name="countryCode" value="GB"/> <input type="hidden" name="redirect_uri" id="redirect_uri" value="/aemapi/v6/data-login/afterLogin.uk.json"/> <input type="hidden" name="state" id="signInState" value=""/> <input type="hidden" name="goBackURL" id="signInGoBackURL" value=""/> <input type="hidden" name="scope" id="scope" value=""/> </form> <!-- SA 로그아웃호출 폼 --> <form id="signOutForm" name="signOutForm" method="get" action="https://account.samsung.com/accounts/v1/Samsung_com_UK/signOutGate"> <input type="hidden" name="client_id" value="84hg4924k6"/> <input type="hidden" name="state" id="signOutState" value=""/> <input type="hidden" name="signOutURL" id="signOutURL" value="/aemapi/v6/data-login/afterLogout.uk.json"/> </form> <!-- 회원가입 폼 --> <form id="joinForm" name="joinForm" method="post" action="https://account.samsung.com/membership/"> <input type="hidden" name="actionID" value="SignupAP"/> <input type="hidden" name="serviceID" value="84hg4924k6"/> <input type="hidden" name="serviceName" value="SAMSUNG"/> <input type="hidden" name="domain" value=""/> <input type="hidden" name="countryCode" value="GB"/> <input type="hidden" name="languageCode" value="en"/> <input type="hidden" name="registURL" id="joinRegistURL" value="/aemapi/v6/data-login/afterLogin.uk.json"/> <input type="hidden" name="returnURL" id="joinReturnURL"/> <input type="hidden" name="goBackURL" id="joinGoBackURL" value=""/> <input type="hidden" name="ssoType" value="ENC_TK"/> <input type="hidden" name="emailActivationURL" id="joinEmailActivationURL" value="/aemapi/v6/data-login/emailActivationURL.uk.json"/> </form> <!-- Find Email 폼 --> <form id="findAccountForm" name="findAccountForm" method="post" action="https://account.samsung.com/membership/"> <input type="hidden" name="actionID" value="FindEmail"/> <input type="hidden" name="serviceID" value="84hg4924k6"/> <input type="hidden" name="serviceName" value="SAMSUNG"/> <input type="hidden" name="domain" value=""/> <input type="hidden" name="countryCode" value="GB"/> <input type="hidden" name="languageCode" value="en"/> <input type="hidden" name="goBackURL" id="findGoBackURL" value=""/> <input type="hidden" name="ssoType" value="ENC_TK"/> </form> <!-- Account Modify Form --> <form id="accountModifyForm" name="accountModifyForm" method="post" action="https://account.samsung.com/membership/"> <input type="hidden" name="actionID" value="ModifyUserInfo"/> <input type="hidden" name="serviceID" value="84hg4924k6"/> <input type="hidden" name="serviceName" value="SAMSUNG"/> <input type="hidden" name="domain" value=""/> <input type="hidden" name="countryCode" value="GB"/> <input type="hidden" name="languageCode" value="en"/> <input type="hidden" name="goBackURL" id="accountModifyGoBackURL" value=""/> <input type="hidden" name="ssoType" value="ENC_TK"/> </form> <form id="textForm" name="textForm"> <input type="hidden" name="productCountText" id="productCountText" value="Number of products"/> </form> <input type="hidden" name="domain" id="domain" value="www.samsung.com"/> <input type="hidden" name="useLogin" id="useLogin" value="Y"/> <input type="hidden" name="useStore" id="useStore" value="Y"/> <input type="hidden" name="storeDomain" id="storeDomain" value="https://api.shop.samsung.com"/> <input type="hidden" name="hybrisApiJson" id="hybrisApiJson"/> <input type="hidden" name="addToCartPostYn" id="addToCartPostYn"/> <input type="hidden" name="useNewAddToCartApi" id="useNewAddToCartApi"/> <input type="hidden" name="loginLinkURL" id="loginLinkURL" value="https://account.samsung.com/accounts/v1/Samsung_com_UK/signInGate"/> <input type="hidden" name="logoutURL" id="logoutURL" value="https://account.samsung.com/accounts/v1/Samsung_com_UK/signOutGate"/> <input type="hidden" name="updateProfileURL" id="updateProfileURL"/> <input type="hidden" name="isLoginWithNoStore" id="isLoginWithNoStore"/> <input type="hidden" name="countryCode" id="countryCode" value="GB"/> <input type="hidden" name="languageCode" id="languageCode" value="en"/> <input type="hidden" name="loginAccountServiceId" id="loginAccountServiceId" value="84hg4924k6"/> <input type="hidden" name="emailActivationURL" id="emailActivationURL" value="/aemapi/v6/data-login/emailActivationURL.uk.json"/> <input type="hidden" name="shopIntegrationFlag" id="shopIntegrationFlag" value="Hybris-new"/> <input type="hidden" name="tieredPriceUseYn" id="tieredPriceUseYn"/> <input type="hidden" name="mySamsungRewardsTierType" id="mySamsungRewardsTierType" value="global"/> <input type="hidden" name="newMyRewardCurrencyConv" id="newMyRewardCurrencyConv" value="0.001"/> <input type="hidden" name="countryIsoCode" id="countryIsoCode" value="GBR"/> <input type="hidden" name="loginValidateYnForGPv2" id="loginValidateYnForGPv2" value=""/> <div class="nv00-gnb__layer-popup-wrap"> <div class="nv00-gnb__layer-popup-looping--start" tabindex="0"></div> <div class="layer-popup gnb-layer_popup-js" id="layerEmptyCart"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#info-regular" href="#info-regular"></use> </svg> <p class="layer-popup__desc information-text">Your basket is empty.</p> <div class="layer-popup__cta-wrap"> <button class="cta cta--contained cta--black gnb-js-layer-close" an-tr="nv00_gnb-microsite-cart popup-other_interaction" an-ca="other interaction" an-ac="cart is empty:OK" an-la="cart is empty:OK" aria-label="Accessibility Text" onclick="window.sg.components.nv00Gnb.closeLayerPopup(this);"> OK </button> </div> <button class="layer-popup__close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="layer-popup gnb-layer_popup-js" id="layerInsufficientStock"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#info-regular" href="#info-regular"></use> </svg> <p class="layer-popup__desc information-text">Sorry this item is out of stock</p> <div class="layer-popup__cta-wrap"> <button class="cta cta--contained cta--black gnb-js-layer-close" aria-label="Accessibility Text" onclick="window.sg.components.nv00Gnb.closeLayerPopup(this);"> OK </button> </div> <button class="layer-popup__close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="layer-popup gnb__remove-product gnb-layer_popup-js" id="layerRemoveProduct"> <p class="layer-popup__title">Remove </p> <p class="layer-popup__desc">Code not valid with this product<br/>Are you sure to remove this product?</p> <div class="layer-popup__cta-wrap"> <button class="cta cta--outlined cta--black" aria-label="Accessibility Text"> Add to wishlist </button> <button class="cta cta--contained cta--black" aria-label="Accessibility Text"> Delete </button> </div> <button class="layer-popup__close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="layer-popup gnb-layer_popup-js gnb__popup-privacy" id="layerPrivacy"> <p class="layer-popup__title">Privacy Policy</p> <div class="layer-popup__checkbox-wrap"> <div class="checkbox-v2"> <input class="checkbox-v2__input" type="checkbox" name="checkbox" id="privacy-terms"/> <label class="checkbox-v2__label" for="privacy-terms"> <span class="checkbox-v2__label-box-wrap"> <span class="checkbox-v2__label-box"> <svg class="checkbox-v2__label-box-icon" focusable="false" aria-hidden="true"> <use xlink:href="#done-bold" href="#done-bold"></use> </svg> </span> </span> <span class="checkbox-v2__label-text">I have read and agree to the Samsung.com <a href='/uk/info/privacy/' target='_blank' class='link-text' title="Open in a new window">Privacy Policy</a></span> </label> </div> <p class="layer-popup__checkbox-desc error" id="errorPrivacy">Tick this box to proceed to Samsung.com.</p> <div class="checkbox-v2"> <input class="checkbox-v2__input" type="checkbox" name="checkbox" id="privacy-terms2"/> <label class="checkbox-v2__label" for="privacy-terms2"> <span class="checkbox-v2__label-box-wrap"> <span class="checkbox-v2__label-box"> <svg class="checkbox-v2__label-box-icon" focusable="false" aria-hidden="true"> <use xlink:href="#done-bold" href="#done-bold"></use> </svg> </span> </span> <span class="checkbox-v2__label-text">By ticking this box, I accept Samsung Service Updates, including : </span></label></div><p class="layer-popup__checkbox-desc">Samsung.com Services and marketing information, new product and service announcements as well as special offers, events and newsletters.</p> </div> <div class="layer-popup__cta-wrap"> <button id="privacyBtn" class="cta cta--outlined cta--black" aria-label="Accessibility Text">PROCEED TO SAMSUNG.COM</button> <button class="cta cta--contained cta--black login-leave-btn" aria-label="Accessibility Text" onclick="window.sg.components.nv00Gnb.closeLayerPopup(this);">Close</button> </div> <button class="layer-popup__close login-leave-btn" data-focus-id="shop-popover-close" data-tab-disable="true"> <span class="hidden">Close Privacy Policy</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="layer-popup gnb__popup-privacy gnb-layer_popup-js" id="layerPreference"> <p class="layer-popup__title">Check preferences</p> <p class="layer-popup__desc">Help us to make recommendations for you by telling us what you like</p> <div class="layer-popup__cta-wrap"> <button id="preferenceCheckBtn" class="cta cta--outlined cta--black" aria-label="Accessibility Text">Yes</button> <button id="privacyCloseBtn" class="cta cta--contained cta--black" aria-label="Accessibility Text" onclick="window.sg.components.nv00Gnb.closeLayerPopup(this);">Later</button> </div> <button class="layer-popup__close" data-focus-id="shop-popover-close" data-tab-disable="true"> <span class="hidden">Close Check Preferences</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="nv00-gnb__layer-popup-looping--end" tabindex="0"></div> </div> </nav> <!--googleon: all--> <input type="hidden" name="sc_gnb_searchURL" id="sc_gnb_searchURL" value="/uk/aisearch"/> <input type="hidden" name="sc_gnb_placeholder" id="sc_gnb_placeholder" value="Galaxy Z Fold6"/> <input type="hidden" name="sc_gnb_aiSearchUseYn" id="sc_gnb_aiSearchUseYn" value="Y"/> <input type="hidden" name="eppFlag" id="eppFlag" value="N"/> <!--googleoff: all--> <section class="gnb-search" role="dialog" aria-modal="true" style="display: none;"> <div class="gnb-search__dimmed"></div> <div class="gnb-search__looping--start" tabindex="0"></div> <div class="gnb-search__contents"> <h2 class="text-title">What are you looking for?</h2> <div class="gnb-search__search-wrap"> <form action="javascript:;" class="gnb-search__form" role="search" autocomplete="off"> <fieldset> <legend>Search form</legend> <div class="gnb-search__input-wrap"> <button type="button" class="gnb-search__input-btn--close"> <span class="hidden">Close</span> <svg class="icon" focusable="false"> <use xlink:href="#backward-bold" href="#backward-bold"></use> </svg> </button> <label class="hidden" for="gnb-search-keyword">Search Keyword</label> <input type="text" name="search" class="gnb-search__input" id="gnb-search-keyword" maxlength="64" an-tr="search layer--search bar-submit" an-ca="search" an-ac="search layer" an-la="search bar:keyword submit:"/> <span class="gnb-search__placeholder">Galaxy Z Fold6</span> <!-- input 에 text 가 입력되어 있으면 .gnb-search__input-btn--cancel--show 추가 --> <button type="button" class="gnb-search__input-btn--cancel" an-tr="search layer-microsite-keyword delete-search" an-ca="search" an-ac="search layer" an-la="search bar:keyword delete"> <span class="hidden">Delete</span> <svg class="icon" focusable="false"> <use xlink:href="#cancel-bold" href="#cancel-bold"></use> </svg> </button> <button type="submit" class="gnb-search__input-btn--search" an-tr="search layer-microsite-submit-search" an-ca="search" an-ac="search layer" an-la="search bar:keyword submit:keyword"> <span class="hidden">Search</span> <svg class="icon" focusable="false"> <use xlink:href="#search-bold" href="#search-bold"></use> </svg> </button> <button type="button" class="gnb-search__input-btn--scan-barcode"> <span class="hidden">Scan Barcode</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#barcode-regular" href="#barcode-regular"></use> </svg> </button> </div> </fieldset> </form> <div class="gnb-search__result-wrap gnb-search__result-wrap--hide" style="overflow: auto;"> <div class="gnb-search__no-suggestions gnb-search__no-suggestions--hide"> <div class="gnb-search__result-title-wrap"> <h3 class="gnb-search__result-title">No Suggestions</h3> </div> </div> <div class="gnb-search__related gnb-search__related--hide"> <div class="gnb-search__result-title-wrap"> <h3 class="gnb-search__result-title">Suggested Searches</h3> </div> <ul class="gnb-search__result-list" role="list"> </ul> </div> <div class="gnb-search__popular-keyword gnb-search__popular-keyword--hide"> <div class="gnb-search__result-title-wrap"> <h3 class="gnb-search__result-title">Popular Keyword</h3> </div> <ul class="gnb-search__result-list" role="list"> </ul> </div> <div class="gnb-search__history gnb-search__history--hide"> <div class="gnb-search__result-title-wrap"> <h3 class="gnb-search__result-title">Search History</h3> <button class="gnb-search__btn--history-clear" an-tr="search layer-microsite-clear all-search" an-ca="search" an-ac="search layer" an-la="search history:clear all"> Clear All </button> </div> <ul class="gnb-search__result-list" role="list"> </ul> </div> </div> </div> <!-- .gnb-search__result-wrap--hide 가 제거될 때 .gnb-search__chip-wrap--hide 추가 --> <div class="gnb-search__chip-wrap" role="list"> <h3 class="hidden">recommended search</h3> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:galaxy z fold6">Galaxy Z Fold6</a> </div> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:galaxy z flip6">Galaxy Z Flip6</a> </div> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:neo qled">Neo QLED</a> </div> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:the frame">The Frame</a> </div> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:bespoke jet">BESPOKE Jet</a> </div> <div role="listitem"> <a class="gnb-search__chip" aria-label="search" an-tr="sr01_search input--ctabutton" an-ca="search" an-ac="search layer" an-la="search chips:bespoke refrigerators">BESPOKE Refrigerators</a> </div> </div> <button class="gnb-search__btn--close" an-tr="search layer-microsite-close-search" an-ca="search" an-ac="search layer" an-la="close"> <span class="hidden">Close</span> <svg class="icon" focusable="false"> <use xlink:href="#cancel-close-regular" href="#cancel-close-regular"></use> </svg> </button> </div> <div class="gnb-search__looping--end" tabindex="0"></div> </section> <!--googleon: all--> <div id="content" role="main"> <div class="root responsivegrid"> <div class="aem-Grid aem-Grid--12 aem-Grid--default--12 "> <div class="responsivegrid aem-GridColumn aem-GridColumn--default--12"> <div class="aem-Grid aem-Grid--12 aem-Grid--default--12 "> <div class="static-content aem-GridColumn aem-GridColumn--default--12"> <style> .hideInAem { display: none; font-size: 16px; font-weight: bold; } .aem-AuthorLayer-Edit .hideInAem { display: block; text-align: center; background-color: #00246B; color: #CADCFC; padding: 40px 35vw; } .hideInAem span{ font-family: 'Courier New', monospace; color: blue; } </style> <p class="hideInAem"> Shorts Module </p> <style> .seek-bar.svelte-15q4xgo.svelte-15q4xgo{position:absolute;bottom:0;width:100%;height:6px;background-color:#3c3c3c7f;cursor:pointer;overflow:hidden;display:flex;align-items:flex-start;border-bottom-right-radius:6px;border-bottom-left-radius:6px;z-index:5}.seek-bar.svelte-15q4xgo.svelte-15q4xgo:focus{outline:none}.seek-bar.svelte-15q4xgo .seek-bar-progress.svelte-15q4xgo,.seek-bar.svelte-15q4xgo .hover.svelte-15q4xgo{background-color:#2189ff;position:absolute;left:0;bottom:0;width:100%;height:100%;z-index:2;transform:scaleX(0);transform-origin:left;transition:transform .3s linear;pointer-events:none}.seek-bar.svelte-15q4xgo .hover.svelte-15q4xgo{background-color:#fff;transition:none;z-index:1}.shorts-overlay.svelte-v6s7b2.svelte-v6s7b2{position:absolute;top:0;left:0;right:0;bottom:0;z-index:10;overflow:hidden;pointer-events:none}.shorts-shop-popup.svelte-v6s7b2.svelte-v6s7b2{position:absolute;pointer-events:auto;bottom:0;left:0;right:0;z-index:5;height:340px;background:linear-gradient(180deg,#202020e6,#000);-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);transition:transform .1s ease-in-out,bottom .05s ease;transform-origin:bottom;max-height:40vh}@media (max-width: 767px){.shorts-shop-popup.svelte-v6s7b2.svelte-v6s7b2{height:69.4vw;max-height:30vh}}.drag-pill.svelte-v6s7b2.svelte-v6s7b2{width:50px;height:5px;border-radius:50px;background:#cbc4c4;position:absolute;top:15px;left:50%;transform:translate(-50%)}@media (min-width: 768px){.drag-pill.svelte-v6s7b2.svelte-v6s7b2{display:none}}.close-shorts-overlay.svelte-v6s7b2.svelte-v6s7b2{position:absolute;top:15px;left:50%;transform:translate(-50%);width:20px;height:20px;cursor:pointer}@media (max-width: 767px){.close-shorts-overlay.svelte-v6s7b2.svelte-v6s7b2{display:none}}.shorts-shop-content.svelte-v6s7b2.svelte-v6s7b2{padding:40px}@media (max-width: 767px){.shorts-shop-content.svelte-v6s7b2.svelte-v6s7b2{padding:11.1vw 8.33vw}}.shop-content-top.svelte-v6s7b2.svelte-v6s7b2{display:flex;justify-content:space-between;align-items:center;margin-bottom:40px}.shop-content-top.svelte-v6s7b2 p.svelte-v6s7b2{color:#fff;font-weight:700;font-size:min(1.6vh,16px)}.shop-content-product.svelte-v6s7b2.svelte-v6s7b2{display:flex;justify-content:space-between;align-items:center}.shop-content-image-container.svelte-v6s7b2.svelte-v6s7b2{width:40%;max-width:150px;height:auto;aspect-ratio:15 / 13;border-radius:6px;background-color:#fff;flex-shrink:0}@media (max-width: 767px){.shop-content-image-container.svelte-v6s7b2.svelte-v6s7b2{width:34.7vw}}.shop-content-image-container.svelte-v6s7b2 img.svelte-v6s7b2{width:100%;height:100%;-o-object-fit:contain;object-fit:contain;border-radius:6px}.shop-content-product-description.svelte-v6s7b2.svelte-v6s7b2{display:flex;flex-direction:column;justify-content:space-between;align-items:flex-start;flex-grow:1;margin-left:30px;align-self:stretch}@media (max-width: 767px){.shop-content-product-description.svelte-v6s7b2.svelte-v6s7b2{margin-left:4.17vw}}.shop-content-product-description.svelte-v6s7b2 h5.svelte-v6s7b2{font-family:SamsungSharpSans,arial,sans-serif;color:#fff;font-size:min(2vh,20px);margin:0;margin-bottom:min(1vh,10px)}@media (max-width: 767px){.shop-content-product-description.svelte-v6s7b2 h5.svelte-v6s7b2{font-size:5vw;margin-bottom:1.39vw}}.shop-content-product-description.svelte-v6s7b2 p.svelte-v6s7b2{font-size:min(1.4vh,14px);font-family:SamsungOne,arial,sans-serif;color:#cbc4c4;margin:0}.shop-content-product-description.svelte-v6s7b2 a.svelte-v6s7b2{font-family:SamsungOne,arial,sans-serif;font-size:min(1.4vh,14px);color:#fff;background-color:#2189ff;border-radius:6px;padding:12px 0;padding:min(1.2vh,12px) 0;display:inline-flex;align-self:stretch;justify-content:center}a.svelte-en0di3{color:#fff;font-weight:400;-webkit-text-decoration:underline;text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:1.5px}.play-pause-container.svelte-1aulsri{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:9999;-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:none}svg.svelte-1aulsri{animation:svelte-1aulsri-fadeOut .67s ease-out forwards}@keyframes svelte-1aulsri-fadeOut{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(1.5)}}.thumbnail.svelte-1bjq20e.svelte-1bjq20e{--btm-pd:60px;display:inline-block;aspect-ratio:9 / 16;height:95vh;width:auto;flex:0 0 auto;background-color:#000;scroll-snap-align:center;margin-right:25vw}@media (max-height: 600px){.thumbnail.svelte-1bjq20e.svelte-1bjq20e{margin-right:calc(50vw - 53.4375vh)}}.thumbnail.svelte-1bjq20e.svelte-1bjq20e{background-position:center;background-size:cover;background-repeat:no-repeat;border-radius:6px;position:relative}.thumbnail.svelte-1bjq20e.svelte-1bjq20e:first-of-type{margin-left:calc(50vw - 26.71875vh)}.thumbnail.svelte-1bjq20e.svelte-1bjq20e:last-of-type{margin-right:calc(50vw - 26.71875vh)}@media (max-width: 767px){.thumbnail.svelte-1bjq20e.svelte-1bjq20e{width:100vw;max-height:90vh;max-height:90dvh;-o-object-fit:cover;object-fit:cover;margin:5vh 0}.thumbnail.svelte-1bjq20e.svelte-1bjq20e:first-of-type,.thumbnail.svelte-1bjq20e.svelte-1bjq20e:last-of-type{margin:5vh 0}.thumbnail.svelte-1bjq20e.svelte-1bjq20e:first-of-type{margin-top:20vh}.thumbnail.svelte-1bjq20e.svelte-1bjq20e:last-of-type{margin-bottom:10vh}}video.svelte-1bjq20e.svelte-1bjq20e{width:100%;height:100%;-o-object-fit:cover;object-fit:cover;border-radius:6px}@media (max-width: 767px){div.arrows.svelte-1bjq20e.svelte-1bjq20e{display:none}}div.shorts-arrow.svelte-1bjq20e.svelte-1bjq20e{position:absolute;top:50%;cursor:pointer}div.shorts-arrow.arrow-first.svelte-1bjq20e.svelte-1bjq20e{left:-80px;transform:translateY(-50%) rotate(-90deg)}div.shorts-arrow.arrow-second.svelte-1bjq20e.svelte-1bjq20e{right:-80px;transform:translateY(-50%) rotate(90deg)}div.shorts-arrow.hide.svelte-1bjq20e.svelte-1bjq20e{display:none}*[role=button].svelte-1bjq20e.svelte-1bjq20e{-webkit-tap-highlight-color:transparent}div.shorts-mute-btn.svelte-1bjq20e.svelte-1bjq20e{position:absolute;top:24px;left:24px;cursor:pointer;width:64px;height:64px;z-index:3}@media (max-width: 767px){div.shorts-mute-btn.svelte-1bjq20e.svelte-1bjq20e{top:auto;top:initial;left:auto;left:initial;right:24px;bottom:60px;bottom:var(--btm-pd, 60px);width:48px;height:48px}}div.shorts-close-btn.svelte-1bjq20e.svelte-1bjq20e{position:absolute;top:0;right:-55px;width:30px;height:30px;cursor:pointer}@media (max-width: 767px){div.shorts-close-btn.svelte-1bjq20e.svelte-1bjq20e{right:24px;top:24px}}div.shorts-info-content.svelte-1bjq20e.svelte-1bjq20e{position:absolute;z-index:3;bottom:60px;bottom:var(--btm-pd, 60px);left:24px;right:24px;margin-right:80px;display:flex;flex-direction:column;align-items:flex-start;gap:15px}div.shorts-info-content.svelte-1bjq20e .shop-btn.svelte-1bjq20e{display:inline-flex;align-items:center;gap:min(.8vh,8px);padding:min(1vh,10px) min(2vh,20px);background-color:#000;border-radius:50px;cursor:pointer}div.shorts-info-content.svelte-1bjq20e .shop-btn span.svelte-1bjq20e{color:#fff;font-family:SamsungOne,sans-serif;font-size:min(1.4vh,14px)}@media (max-width: 767px){div.shorts-info-content.svelte-1bjq20e .shop-btn span.svelte-1bjq20e{font-size:14px}}@media (max-width: 767px){div.shorts-info-content.svelte-1bjq20e .shop-btn.svelte-1bjq20e{padding:2.78vw 5.56vw;gap:2.22vw}}div.shorts-info-content.svelte-1bjq20e [ref=sst]{color:#fff;font-size:min(1.8vh,18px);text-align:left;font-family:SamsungOne,sans-serif;margin:15px 0 0}@media (max-width: 767px){div.shorts-info-content.svelte-1bjq20e [ref=sst]{font-size:16px}}div.fade-out-video.svelte-1bjq20e.svelte-1bjq20e{position:absolute;bottom:0;left:0;right:0;height:120px;background:linear-gradient(to top,#000000bf,#0000);z-index:2}.shorts-bg.svelte-1gvmdpp{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000000f2;display:flex;justify-content:center;align-items:center;z-index:9999}.shorts-carousel.svelte-1gvmdpp{height:100%;max-height:100vh;display:flex;justify-content:flex-start;align-items:center;overflow-x:scroll;flex-wrap:nowrap;scroll-snap-type:x mandatory}.shorts-carousel.svelte-1gvmdpp::-webkit-scrollbar{display:none}.shorts-carousel.svelte-1gvmdpp{-ms-overflow-style:none;scrollbar-width:none}@media (max-width: 767px){.shorts-carousel.svelte-1gvmdpp{flex-direction:column;justify-content:flex-start;align-items:center;scroll-snap-type:y mandatory}}@media (max-width: 767px){svg.svelte-l7r38q{display:none}}div.thumbnail.svelte-15zqe5d.svelte-15zqe5d{border-radius:10px;width:min(250px,17.4vw);padding:min(20px,1.39vw);aspect-ratio:25/45;background-size:cover;background-position:center;background-repeat:no-repeat;cursor:pointer;position:relative;display:flex;flex-direction:column;justify-content:flex-end}div.thumbnail.svelte-15zqe5d.svelte-15zqe5d:after{content:"";position:absolute;bottom:-30px;height:140px;width:100%;background:linear-gradient(0deg,#0000,#0000);border-radius:10px}@media (max-width: 767px){div.thumbnail.svelte-15zqe5d.svelte-15zqe5d{width:min(150px,41.7vw);padding:min(15px,4.17vw) min(10px,2.78vw)}}.thumbnail-content.svelte-15zqe5d.svelte-15zqe5d{z-index:2;display:flex;align-items:flex-start;gap:min(10px,.694vw);height:70px}@media (max-width: 767px){.thumbnail-content.svelte-15zqe5d.svelte-15zqe5d{align-items:flex-end;height:min(100px,27.8vw)}}.thumbnail-content.svelte-15zqe5d>.svelte-15zqe5d{flex:1 1 100%}h4.svelte-15zqe5d.svelte-15zqe5d{font-size:min(15px,3.33vw);color:#fff;margin:0;padding:0;font-family:SamsungSharpSans,arial,sans-serif;font-weight:700;line-height:1.2}@media (min-width: 768px){h4.svelte-15zqe5d.svelte-15zqe5d{font-size:min(14px,.972vw)}}.cheil-samsung-shorts.svelte-1ngxxea{background:#fff;padding:min(50px,3.47vw) 0}@media (max-width: 767px){.cheil-samsung-shorts.svelte-1ngxxea{padding:min(50px,13.9vw) 0}}h3.svelte-1ngxxea{font-family:SamsungSharpSans,arial,sans-serif;font-size:min(38px,2.64vw);margin:0 auto min(25px,1.74vw);display:block;text-align:center}@media (max-width: 767px){h3.svelte-1ngxxea{font-size:min(30px,8.33vw);margin:0 auto min(25px,6.94vw)}}.thumbnail-container.svelte-1ngxxea{display:flex;gap:min(20px,1.39vw);margin:0 min(24px,1.67vw);max-width:100%;justify-content:center}@media (max-width: 767px){.thumbnail-container.svelte-1ngxxea{margin:0 min(12px,3.33vw);flex-wrap:wrap;gap:min(10px,2.78vw)}} </style> <script> ;(function(win,doc,callback){'use strict';callback=callback||function(){};function detach(){if(doc.addEventListener){doc.removeEventListener('DOMContentLoaded',completed);}else{doc.detachEvent('onreadystatechange',completed);}}function completed(){if(doc.addEventListener||event.type==='load'||doc.readyState==='complete'){detach();callback(window,window.jQuery);}}function init(){if (doc.addEventListener){doc.addEventListener('DOMContentLoaded',completed);}else{doc.attachEvent('onreadystatechange',completed);}}init();})(window,document,function(win,$){ (function(){ var Ea=Object.defineProperty;var Ta=(r,e,t)=>e in r?Ea(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var qs=(r,e,t)=>Ta(r,typeof e!="symbol"?e+"":e,t);(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))s(i);new MutationObserver(i=>{for(const n of i)if(n.type==="childList")for(const o of n.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&s(o)}).observe(document,{childList:!0,subtree:!0});function t(i){const n={};return i.integrity&&(n.integrity=i.integrity),i.referrerPolicy&&(n.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?n.credentials="include":i.crossOrigin==="anonymous"?n.credentials="omit":n.credentials="same-origin",n}function s(i){if(i.ep)return;i.ep=!0;const n=t(i);fetch(i.href,n)}})();function oe(){}const Vs=r=>r;function Wn(r,e){for(const t in e)r[t]=e[t];return r}function Yn(r){return r()}function xr(){return Object.create(null)}function Me(r){r.forEach(Yn)}function We(r){return typeof r=="function"}function Ce(r,e){return r!=r?e==e:r!==e||r&&typeof r=="object"||typeof r=="function"}let rs;function mi(r,e){return r===e?!0:(rs||(rs=document.createElement("a")),rs.href=e,r===rs.href)}function xa(r){return Object.keys(r).length===0}function Sa(r,...e){if(r==null){for(const s of e)s(void 0);return oe}const t=r.subscribe(...e);return t.unsubscribe?()=>t.unsubscribe():t}function va(r,e,t){r.$$.on_destroy.push(Sa(e,t))}function La(r,e,t,s){if(r){const i=qn(r,e,t,s);return r[0](i)}}function qn(r,e,t,s){return r[1]&&s?Wn(t.ctx.slice(),r[1](s(e))):t.ctx}function Aa(r,e,t,s){if(r[2]&&s){const i=r[2](s(t));if(e.dirty===void 0)return i;if(typeof i=="object"){const n=[],o=Math.max(e.dirty.length,i.length);for(let a=0;a<o;a+=1)n[a]=e.dirty[a]|i[a];return n}return e.dirty|i}return e.dirty}function ba(r,e,t,s,i,n){if(i){const o=qn(e,t,s,n);r.p(o,i)}}function _a(r){if(r.ctx.length>32){const e=[],t=r.ctx.length/32;for(let s=0;s<t;s++)e[s]=-1;return e}return-1}const jn=typeof window<"u";let Ui=jn?()=>window.performance.now():()=>Date.now(),Gi=jn?r=>requestAnimationFrame(r):oe;const Ot=new Set;function zn(r){Ot.forEach(e=>{e.c(r)||(Ot.delete(e),e.f())}),Ot.size!==0&&Gi(zn)}function $i(r){let e;return Ot.size===0&&Gi(zn),{promise:new Promise(t=>{Ot.add(e={c:r,f:t})}),abort(){Ot.delete(e)}}}const Ra=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function $(r,e){r.appendChild(e)}function Xn(r){if(!r)return document;const e=r.getRootNode?r.getRootNode():r.ownerDocument;return e&&e.host?e:r.ownerDocument}function Ia(r){const e=z("style");return e.textContent="/* empty */",Da(Xn(r),e),e.sheet}function Da(r,e){return $(r.head||r,e),e.sheet}function ie(r,e,t){r.insertBefore(e,t||null)}function J(r){r.parentNode&&r.parentNode.removeChild(r)}function pi(r,e){for(let t=0;t<r.length;t+=1)r[t]&&r[t].d(e)}function z(r){return document.createElement(r)}function fe(r){return document.createElementNS("http://www.w3.org/2000/svg",r)}function rt(r){return document.createTextNode(r)}function de(){return rt(" ")}function Vi(){return rt("")}function le(r,e,t,s){return r.addEventListener(e,t,s),()=>r.removeEventListener(e,t,s)}function yi(r){return function(e){return e.preventDefault(),r.call(this,e)}}function Ei(r){return function(e){return e.stopPropagation(),r.call(this,e)}}function S(r,e,t){t==null?r.removeAttribute(e):r.getAttribute(e)!==t&&r.setAttribute(e,t)}const Ca=["width","height"];function wa(r,e){const t=Object.getOwnPropertyDescriptors(r.__proto__);for(const s in e)e[s]==null?r.removeAttribute(s):s==="style"?r.style.cssText=e[s]:s==="__value"?r.value=r[s]=e[s]:t[s]&&t[s].set&&Ca.indexOf(s)===-1?r[s]=e[s]:S(r,s,e[s])}function ka(r,e){Object.keys(e).forEach(t=>{Pa(r,t,e[t])})}function Pa(r,e,t){const s=e.toLowerCase();s in r?r[s]=typeof r[s]=="boolean"&&t===""?!0:t:e in r?r[e]=typeof r[e]=="boolean"&&t===""?!0:t:S(r,e,t)}function Sr(r){return/-/.test(r)?ka:wa}function Fa(r){return Array.from(r.childNodes)}function _s(r,e){e=""+e,r.data!==e&&(r.data=e)}function Ue(r,e,t,s){t==null?r.style.removeProperty(e):r.style.setProperty(e,t,"")}function ns(r,e,t){r.classList.toggle(e,!!t)}function Oa(r,e,{bubbles:t=!1,cancelable:s=!1}={}){return new CustomEvent(r,{detail:e,bubbles:t,cancelable:s})}const Rs=new Map;let Is=0;function Ma(r){let e=5381,t=r.length;for(;t--;)e=(e<<5)-e^r.charCodeAt(t);return e>>>0}function Na(r,e){const t={stylesheet:Ia(e),rules:{}};return Rs.set(r,t),t}function Ds(r,e,t,s,i,n,o,a=0){const l=16.666/s;let c=`{ `;for(let p=0;p<=1;p+=l){const E=e+(t-e)*n(p);c+=p*100+`%{${o(E,1-E)}} `}const u=c+`100% {${o(t,1-t)}} }`,h=`__svelte_${Ma(u)}_${a}`,d=Xn(r),{stylesheet:g,rules:f}=Rs.get(d)||Na(d,r);f[h]||(f[h]=!0,g.insertRule(`@keyframes ${h} ${u}`,g.cssRules.length));const m=r.style.animation||"";return r.style.animation=`${m?`${m}, `:""}${h} ${s}ms linear ${i}ms 1 both`,Is+=1,h}function Cs(r,e){const t=(r.style.animation||"").split(", "),s=t.filter(e?n=>n.indexOf(e)<0:n=>n.indexOf("__svelte")===-1),i=t.length-s.length;i&&(r.style.animation=s.join(", "),Is-=i,Is||Ba())}function Ba(){Gi(()=>{Is||(Rs.forEach(r=>{const{ownerNode:e}=r.stylesheet;e&&J(e)}),Rs.clear())})}let Qt;function jt(r){Qt=r}function Ki(){if(!Qt)throw new Error("Function called outside component initialization");return Qt}function Hi(r){Ki().$$.on_mount.push(r)}function Ua(r,e){return Ki().$$.context.set(r,e),e}function Qn(r){return Ki().$$.context.get(r)}function vr(r,e){const t=r.$$.callbacks[e.type];t&&t.slice().forEach(s=>s.call(this,e))}const kt=[],et=[];let Mt=[];const Ti=[],Ga=Promise.resolve();let xi=!1;function $a(){xi||(xi=!0,Ga.then(Zn))}function Fe(r){Mt.push(r)}function os(r){Ti.push(r)}const js=new Set;let bt=0;function Zn(){if(bt!==0)return;const r=Qt;do{try{for(;bt<kt.length;){const e=kt[bt];bt++,jt(e),Va(e.$$)}}catch(e){throw kt.length=0,bt=0,e}for(jt(null),kt.length=0,bt=0;et.length;)et.pop()();for(let e=0;e<Mt.length;e+=1){const t=Mt[e];js.has(t)||(js.add(t),t())}Mt.length=0}while(kt.length);for(;Ti.length;)Ti.pop()();xi=!1,js.clear(),jt(r)}function Va(r){if(r.fragment!==null){r.update(),Me(r.before_update);const e=r.dirty;r.dirty=[-1],r.fragment&&r.fragment.p(r.ctx,e),r.after_update.forEach(Fe)}}function Ka(r){const e=[],t=[];Mt.forEach(s=>r.indexOf(s)===-1?e.push(s):t.push(s)),t.forEach(s=>s()),Mt=e}let Yt;function Wi(){return Yt||(Yt=Promise.resolve(),Yt.then(()=>{Yt=null})),Yt}function vt(r,e,t){r.dispatchEvent(Oa(`${e?"intro":"outro"}${t}`))}const Ts=new Set;let tt;function ct(){tt={r:0,c:[],p:tt}}function ut(){tt.r||Me(tt.c),tt=tt.p}function X(r,e){r&&r.i&&(Ts.delete(r),r.i(e))}function se(r,e,t,s){if(r&&r.o){if(Ts.has(r))return;Ts.add(r),tt.c.push(()=>{Ts.delete(r),s&&(t&&r.d(1),s())}),r.o(e)}else s&&s()}const Yi={duration:0};function Jn(r,e,t){const s={direction:"in"};let i=e(r,t,s),n=!1,o,a,l=0;function c(){o&&Cs(r,o)}function u(){const{delay:d=0,duration:g=300,easing:f=Vs,tick:m=oe,css:p}=i||Yi;p&&(o=Ds(r,0,1,g,d,f,p,l++)),m(0,1);const E=Ui()+d,x=E+g;a&&a.abort(),n=!0,Fe(()=>vt(r,!0,"start")),a=$i(T=>{if(n){if(T>=x)return m(1,0),vt(r,!0,"end"),c(),n=!1;if(T>=E){const _=f((T-E)/g);m(_,1-_)}}return n})}let h=!1;return{start(){h||(h=!0,Cs(r),We(i)?(i=i(s),Wi().then(u)):u())},invalidate(){h=!1},end(){n&&(c(),n=!1)}}}function eo(r,e,t){const s={direction:"out"};let i=e(r,t,s),n=!0,o;const a=tt;a.r+=1;let l;function c(){const{delay:u=0,duration:h=300,easing:d=Vs,tick:g=oe,css:f}=i||Yi;f&&(o=Ds(r,1,0,h,u,d,f));const m=Ui()+u,p=m+h;Fe(()=>vt(r,!1,"start")),"inert"in r&&(l=r.inert,r.inert=!0),$i(E=>{if(n){if(E>=p)return g(0,1),vt(r,!1,"end"),--a.r||Me(a.c),!1;if(E>=m){const x=d((E-m)/h);g(1-x,x)}}return n})}return We(i)?Wi().then(()=>{i=i(s),c()}):c(),{end(u){u&&"inert"in r&&(r.inert=l),u&&i.tick&&i.tick(1,0),n&&(o&&Cs(r,o),n=!1)}}}function Qe(r,e,t,s){let n=e(r,t,{direction:"both"}),o=s?0:1,a=null,l=null,c=null,u;function h(){c&&Cs(r,c)}function d(f,m){const p=f.b-o;return m*=Math.abs(p),{a:o,b:f.b,d:p,duration:m,start:f.start,end:f.start+m,group:f.group}}function g(f){const{delay:m=0,duration:p=300,easing:E=Vs,tick:x=oe,css:T}=n||Yi,_={start:Ui()+m,b:f};f||(_.group=tt,tt.r+=1),"inert"in r&&(f?u!==void 0&&(r.inert=u):(u=r.inert,r.inert=!0)),a||l?l=_:(T&&(h(),c=Ds(r,o,f,p,m,E,T)),f&&x(0,1),a=d(_,p),Fe(()=>vt(r,f,"start")),$i(A=>{if(l&&A>l.start&&(a=d(l,p),l=null,vt(r,a.b,"start"),T&&(h(),c=Ds(r,o,a.b,a.duration,0,E,n.css))),a){if(A>=a.end)x(o=a.b,1-o),vt(r,a.b,"end"),l||(a.b?h():--a.group.r||Me(a.group.c)),a=null;else if(A>=a.start){const C=A-a.start;o=a.a+a.d*E(C/a.duration),x(o,1-o)}}return!!(a||l)}))}return{run(f){We(n)?Wi().then(()=>{n=n({direction:f?"in":"out"}),g(f)}):g(f)},end(){h(),a=l=null}}}function Pt(r){return(r==null?void 0:r.length)!==void 0?r:Array.from(r)}function Ha(r,e){const t={},s={},i={$$scope:1};let n=r.length;for(;n--;){const o=r[n],a=e[n];if(a){for(const l in o)l in a||(s[l]=1);for(const l in a)i[l]||(t[l]=a[l],i[l]=1);r[n]=a}else for(const l in o)i[l]=1}for(const o in s)o in t||(t[o]=void 0);return t}function as(r,e,t){const s=r.$$.props[e];s!==void 0&&(r.$$.bound[s]=t,t(r.$$.ctx[s]))}function De(r){r&&r.c()}function Ae(r,e,t){const{fragment:s,after_update:i}=r.$$;s&&s.m(e,t),Fe(()=>{const n=r.$$.on_mount.map(Yn).filter(We);r.$$.on_destroy?r.$$.on_destroy.push(...n):Me(n),r.$$.on_mount=[]}),i.forEach(Fe)}function be(r,e){const t=r.$$;t.fragment!==null&&(Ka(t.after_update),Me(t.on_destroy),t.fragment&&t.fragment.d(e),t.on_destroy=t.fragment=null,t.ctx=[])}function Wa(r,e){r.$$.dirty[0]===-1&&(kt.push(r),$a(),r.$$.dirty.fill(0)),r.$$.dirty[e/31|0]|=1<<e%31}function ke(r,e,t,s,i,n,o=null,a=[-1]){const l=Qt;jt(r);const c=r.$$={fragment:null,ctx:[],props:n,update:oe,not_equal:i,bound:xr(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:xr(),dirty:a,skip_bound:!1,root:e.target||l.$$.root};o&&o(c.root);let u=!1;if(c.ctx=t?t(r,e.props||{},(h,d,...g)=>{const f=g.length?g[0]:d;return c.ctx&&i(c.ctx[h],c.ctx[h]=f)&&(!c.skip_bound&&c.bound[h]&&c.bound[h](f),u&&Wa(r,h)),d}):[],c.update(),u=!0,Me(c.before_update),c.fragment=s?s(c.ctx):!1,e.target){if(e.hydrate){const h=Fa(e.target);c.fragment&&c.fragment.l(h),h.forEach(J)}else c.fragment&&c.fragment.c();e.intro&&X(r.$$.fragment),Ae(r,e.target,e.anchor),Zn()}jt(l)}class Pe{constructor(){qs(this,"$$");qs(this,"$$set")}$destroy(){be(this,1),this.$destroy=oe}$on(e,t){if(!We(t))return oe;const s=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return s.push(t),()=>{const i=s.indexOf(t);i!==-1&&s.splice(i,1)}}$set(e){this.$$set&&!xa(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}const Ya="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(Ya);function qa(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var to={exports:{}};(function(r,e){(function(t){var s=/^(?=((?:[a-zA-Z0-9+\-.]+:)?))\1(?=((?:\/\/[^\/?#]*)?))\2(?=((?:(?:[^?#\/]*\/)*[^;?#\/]*)?))\3((?:;[^?#]*)?)(\?[^#]*)?(#[^]*)?$/,i=/^(?=([^\/?#]*))\1([^]*)$/,n=/(?:\/|^)\.(?=\/)/g,o=/(?:\/|^)\.\.\/(?!\.\.\/)[^\/]*(?=\/)/g,a={buildAbsoluteURL:function(l,c,u){if(u=u||{},l=l.trim(),c=c.trim(),!c){if(!u.alwaysNormalize)return l;var h=a.parseURL(l);if(!h)throw new Error("Error trying to parse base URL.");return h.path=a.normalizePath(h.path),a.buildURLFromParts(h)}var d=a.parseURL(c);if(!d)throw new Error("Error trying to parse relative URL.");if(d.scheme)return u.alwaysNormalize?(d.path=a.normalizePath(d.path),a.buildURLFromParts(d)):c;var g=a.parseURL(l);if(!g)throw new Error("Error trying to parse base URL.");if(!g.netLoc&&g.path&&g.path[0]!=="/"){var f=i.exec(g.path);g.netLoc=f[1],g.path=f[2]}g.netLoc&&!g.path&&(g.path="/");var m={scheme:g.scheme,netLoc:d.netLoc,path:null,params:d.params,query:d.query,fragment:d.fragment};if(!d.netLoc&&(m.netLoc=g.netLoc,d.path[0]!=="/"))if(!d.path)m.path=g.path,d.params||(m.params=g.params,d.query||(m.query=g.query));else{var p=g.path,E=p.substring(0,p.lastIndexOf("/")+1)+d.path;m.path=a.normalizePath(E)}return m.path===null&&(m.path=u.alwaysNormalize?a.normalizePath(d.path):d.path),a.buildURLFromParts(m)},parseURL:function(l){var c=s.exec(l);return c?{scheme:c[1]||"",netLoc:c[2]||"",path:c[3]||"",params:c[4]||"",query:c[5]||"",fragment:c[6]||""}:null},normalizePath:function(l){for(l=l.split("").reverse().join("").replace(n,"");l.length!==(l=l.replace(o,"")).length;);return l.split("").reverse().join("")},buildURLFromParts:function(l){return l.scheme+l.netLoc+l.path+l.params+l.query+l.fragment}};r.exports=a})()})(to);var qi=to.exports;function ja(r,e,t){return(e=Xa(e))in r?Object.defineProperty(r,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[e]=t,r}function pe(){return pe=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var s in t)({}).hasOwnProperty.call(t,s)&&(r[s]=t[s])}return r},pe.apply(null,arguments)}function Lr(r,e){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(r);e&&(s=s.filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable})),t.push.apply(t,s)}return t}function ve(r){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?Lr(Object(t),!0).forEach(function(s){ja(r,s,t[s])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):Lr(Object(t)).forEach(function(s){Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(t,s))})}return r}function za(r,e){if(typeof r!="object"||!r)return r;var t=r[Symbol.toPrimitive];if(t!==void 0){var s=t.call(r,e||"default");if(typeof s!="object")return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Xa(r){var e=za(r,"string");return typeof e=="symbol"?e:e+""}const V=Number.isFinite||function(r){return typeof r=="number"&&isFinite(r)},Qa=Number.isSafeInteger||function(r){return typeof r=="number"&&Math.abs(r)<=Za},Za=Number.MAX_SAFE_INTEGER||9007199254740991;let y=function(r){return r.MEDIA_ATTACHING="hlsMediaAttaching",r.MEDIA_ATTACHED="hlsMediaAttached",r.MEDIA_DETACHING="hlsMediaDetaching",r.MEDIA_DETACHED="hlsMediaDetached",r.MEDIA_ENDED="hlsMediaEnded",r.BUFFER_RESET="hlsBufferReset",r.BUFFER_CODECS="hlsBufferCodecs",r.BUFFER_CREATED="hlsBufferCreated",r.BUFFER_APPENDING="hlsBufferAppending",r.BUFFER_APPENDED="hlsBufferAppended",r.BUFFER_EOS="hlsBufferEos",r.BUFFER_FLUSHING="hlsBufferFlushing",r.BUFFER_FLUSHED="hlsBufferFlushed",r.MANIFEST_LOADING="hlsManifestLoading",r.MANIFEST_LOADED="hlsManifestLoaded",r.MANIFEST_PARSED="hlsManifestParsed",r.LEVEL_SWITCHING="hlsLevelSwitching",r.LEVEL_SWITCHED="hlsLevelSwitched",r.LEVEL_LOADING="hlsLevelLoading",r.LEVEL_LOADED="hlsLevelLoaded",r.LEVEL_UPDATED="hlsLevelUpdated",r.LEVEL_PTS_UPDATED="hlsLevelPtsUpdated",r.LEVELS_UPDATED="hlsLevelsUpdated",r.AUDIO_TRACKS_UPDATED="hlsAudioTracksUpdated",r.AUDIO_TRACK_SWITCHING="hlsAudioTrackSwitching",r.AUDIO_TRACK_SWITCHED="hlsAudioTrackSwitched",r.AUDIO_TRACK_LOADING="hlsAudioTrackLoading",r.AUDIO_TRACK_LOADED="hlsAudioTrackLoaded",r.SUBTITLE_TRACKS_UPDATED="hlsSubtitleTracksUpdated",r.SUBTITLE_TRACKS_CLEARED="hlsSubtitleTracksCleared",r.SUBTITLE_TRACK_SWITCH="hlsSubtitleTrackSwitch",r.SUBTITLE_TRACK_LOADING="hlsSubtitleTrackLoading",r.SUBTITLE_TRACK_LOADED="hlsSubtitleTrackLoaded",r.SUBTITLE_FRAG_PROCESSED="hlsSubtitleFragProcessed",r.CUES_PARSED="hlsCuesParsed",r.NON_NATIVE_TEXT_TRACKS_FOUND="hlsNonNativeTextTracksFound",r.INIT_PTS_FOUND="hlsInitPtsFound",r.FRAG_LOADING="hlsFragLoading",r.FRAG_LOAD_EMERGENCY_ABORTED="hlsFragLoadEmergencyAborted",r.FRAG_LOADED="hlsFragLoaded",r.FRAG_DECRYPTED="hlsFragDecrypted",r.FRAG_PARSING_INIT_SEGMENT="hlsFragParsingInitSegment",r.FRAG_PARSING_USERDATA="hlsFragParsingUserdata",r.FRAG_PARSING_METADATA="hlsFragParsingMetadata",r.FRAG_PARSED="hlsFragParsed",r.FRAG_BUFFERED="hlsFragBuffered",r.FRAG_CHANGED="hlsFragChanged",r.FPS_DROP="hlsFpsDrop",r.FPS_DROP_LEVEL_CAPPING="hlsFpsDropLevelCapping",r.MAX_AUTO_LEVEL_UPDATED="hlsMaxAutoLevelUpdated",r.ERROR="hlsError",r.DESTROYING="hlsDestroying",r.KEY_LOADING="hlsKeyLoading",r.KEY_LOADED="hlsKeyLoaded",r.LIVE_BACK_BUFFER_REACHED="hlsLiveBackBufferReached",r.BACK_BUFFER_REACHED="hlsBackBufferReached",r.STEERING_MANIFEST_LOADED="hlsSteeringManifestLoaded",r}({}),Y=function(r){return r.NETWORK_ERROR="networkError",r.MEDIA_ERROR="mediaError",r.KEY_SYSTEM_ERROR="keySystemError",r.MUX_ERROR="muxError",r.OTHER_ERROR="otherError",r}({}),D=function(r){return r.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",r.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",r.KEY_SYSTEM_NO_SESSION="keySystemNoSession",r.KEY_SYSTEM_NO_CONFIGURED_LICENSE="keySystemNoConfiguredLicense",r.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED="keySystemServerCertificateRequestFailed",r.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED="keySystemServerCertificateUpdateFailed",r.KEY_SYSTEM_SESSION_UPDATE_FAILED="keySystemSessionUpdateFailed",r.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED="keySystemStatusOutputRestricted",r.KEY_SYSTEM_STATUS_INTERNAL_ERROR="keySystemStatusInternalError",r.MANIFEST_LOAD_ERROR="manifestLoadError",r.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",r.MANIFEST_PARSING_ERROR="manifestParsingError",r.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",r.LEVEL_EMPTY_ERROR="levelEmptyError",r.LEVEL_LOAD_ERROR="levelLoadError",r.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",r.LEVEL_PARSING_ERROR="levelParsingError",r.LEVEL_SWITCH_ERROR="levelSwitchError",r.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",r.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",r.SUBTITLE_LOAD_ERROR="subtitleTrackLoadError",r.SUBTITLE_TRACK_LOAD_TIMEOUT="subtitleTrackLoadTimeOut",r.FRAG_LOAD_ERROR="fragLoadError",r.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",r.FRAG_DECRYPT_ERROR="fragDecryptError",r.FRAG_PARSING_ERROR="fragParsingError",r.FRAG_GAP="fragGap",r.REMUX_ALLOC_ERROR="remuxAllocError",r.KEY_LOAD_ERROR="keyLoadError",r.KEY_LOAD_TIMEOUT="keyLoadTimeOut",r.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",r.BUFFER_INCOMPATIBLE_CODECS_ERROR="bufferIncompatibleCodecsError",r.BUFFER_APPEND_ERROR="bufferAppendError",r.BUFFER_APPENDING_ERROR="bufferAppendingError",r.BUFFER_STALLED_ERROR="bufferStalledError",r.BUFFER_FULL_ERROR="bufferFullError",r.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",r.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",r.INTERNAL_EXCEPTION="internalException",r.INTERNAL_ABORTED="aborted",r.ATTACH_MEDIA_ERROR="attachMediaError",r.UNKNOWN="unknown",r}({});class yt{constructor(e,t){this.trace=void 0,this.debug=void 0,this.log=void 0,this.warn=void 0,this.info=void 0,this.error=void 0;const s=`[${e}]:`;this.trace=dt,this.debug=t.debug.bind(null,s),this.log=t.log.bind(null,s),this.warn=t.warn.bind(null,s),this.info=t.info.bind(null,s),this.error=t.error.bind(null,s)}}const dt=function(){},Ja={trace:dt,debug:dt,log:dt,warn:dt,info:dt,error:dt};function Si(){return pe({},Ja)}function el(r,e){const t=self.console[r];return t?t.bind(self.console,`[${r}] >`):dt}function Ar(r,e,t){return e[r]?e[r].bind(e):el(r)}const vi=Si();function tl(r,e,t){const s=Si();if(typeof console=="object"&&r===!0||typeof r=="object"){const i=["debug","log","info","warn","error"];i.forEach(n=>{s[n]=Ar(n,r)});try{s.log(`Debug logs enabled for "${e}" in hls.js version 1.5.14-0.canary.10515`)}catch{return Si()}i.forEach(n=>{vi[n]=Ar(n,r)})}else pe(vi,s);return s}const te=vi,so=/\{\$([a-zA-Z0-9-_]+)\}/g;function br(r){return so.test(r)}function Li(r,e){if(r.variableList!==null||r.hasVariableRefs){const t=r.variableList;return e.replace(so,s=>{const i=s.substring(2,s.length-1),n=t==null?void 0:t[i];return n===void 0?(r.playlistParsingError||(r.playlistParsingError=new Error(`Missing preceding EXT-X-DEFINE tag for Variable Reference: "${i}"`)),s):n})}return e}function _r(r,e,t){let s=r.variableList;s||(r.variableList=s={});let i,n;if("QUERYPARAM"in e){i=e.QUERYPARAM;try{const o=new self.URL(t).searchParams;if(o.has(i))n=o.get(i);else throw new Error(`"${i}" does not match any query parameter in URI: "${t}"`)}catch(o){r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE QUERYPARAM: ${o.message}`))}}else i=e.NAME,n=e.VALUE;i in s?r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE duplicate Variable Name declarations: "${i}"`)):s[i]=n||""}function sl(r,e,t){const s=e.IMPORT;if(t&&s in t){let i=r.variableList;i||(r.variableList=i={}),i[s]=t[s]}else r.playlistParsingError||(r.playlistParsingError=new Error(`EXT-X-DEFINE IMPORT attribute not found in Multivariant Playlist: "${s}"`))}const il=/^(\d+)x(\d+)$/,Rr=/(.+?)=(".*?"|.*?)(?:,|$)/g;class me{constructor(e,t){typeof e=="string"&&(e=me.parseAttrList(e,t)),pe(this,e)}get clientAttrs(){return Object.keys(this).filter(e=>e.substring(0,2)==="X-")}decimalInteger(e){const t=parseInt(this[e],10);return t>Number.MAX_SAFE_INTEGER?1/0:t}hexadecimalInteger(e){if(this[e]){let t=(this[e]||"0x").slice(2);t=(t.length&1?"0":"")+t;const s=new Uint8Array(t.length/2);for(let i=0;i<t.length/2;i++)s[i]=parseInt(t.slice(i*2,i*2+2),16);return s}else return null}hexadecimalIntegerAsNumber(e){const t=parseInt(this[e],16);return t>Number.MAX_SAFE_INTEGER?1/0:t}decimalFloatingPoint(e){return parseFloat(this[e])}optionalFloat(e,t){const s=this[e];return s?parseFloat(s):t}enumeratedString(e){return this[e]}enumeratedStringList(e,t){const s=this[e];return(s?s.split(/[ ,]+/):[]).reduce((i,n)=>(i[n.toLowerCase()]=!0,i),t)}bool(e){return this[e]==="YES"}decimalResolution(e){const t=il.exec(this[e]);if(t!==null)return{width:parseInt(t[1],10),height:parseInt(t[2],10)}}static parseAttrList(e,t){let s;const i={},n='"';for(Rr.lastIndex=0;(s=Rr.exec(e))!==null;){const o=s[1].trim();let a=s[2];const l=a.indexOf(n)===0&&a.lastIndexOf(n)===a.length-1;let c=!1;if(l)a=a.slice(1,-1);else switch(o){case"IV":case"SCTE35-CMD":case"SCTE35-IN":case"SCTE35-OUT":c=!0}if(t&&(l||c))a=Li(t,a);else if(!c&&!l)switch(o){case"CLOSED-CAPTIONS":if(a==="NONE")break;case"ALLOWED-CPC":case"CLASS":case"ASSOC-LANGUAGE":case"AUDIO":case"BYTERANGE":case"CHANNELS":case"CHARACTERISTICS":case"CODECS":case"DATA-ID":case"END-DATE":case"GROUP-ID":case"ID":case"IMPORT":case"INSTREAM-ID":case"KEYFORMAT":case"KEYFORMATVERSIONS":case"LANGUAGE":case"NAME":case"PATHWAY-ID":case"QUERYPARAM":case"RECENTLY-REMOVED-DATERANGES":case"SERVER-URI":case"STABLE-RENDITION-ID":case"STABLE-VARIANT-ID":case"START-DATE":case"SUBTITLES":case"SUPPLEMENTAL-CODECS":case"URI":case"VALUE":case"VIDEO":case"X-ASSET-LIST":case"X-ASSET-URI":te.warn(`${e}: attribute ${o} is missing quotes`)}i[o]=a}return i}}const rl="com.apple.hls.interstitial";function nl(r){return r!=="ID"&&r!=="CLASS"&&r!=="CUE"&&r!=="START-DATE"&&r!=="DURATION"&&r!=="END-DATE"&&r!=="END-ON-NEXT"}function ol(r){return r==="SCTE35-OUT"||r==="SCTE35-IN"||r==="SCTE35-CMD"}class io{constructor(e,t,s=0){var i;if(this.attr=void 0,this.tagAnchor=void 0,this.tagOrder=void 0,this._startDate=void 0,this._endDate=void 0,this._cue=void 0,this._badValueForSameId=void 0,this.tagAnchor=(t==null?void 0:t.tagAnchor)||null,this.tagOrder=(i=t==null?void 0:t.tagOrder)!=null?i:s,t){const n=t.attr;for(const o in n)if(Object.prototype.hasOwnProperty.call(e,o)&&e[o]!==n[o]){te.warn(`DATERANGE tag attribute: "${o}" does not match for tags with ID: "${e.ID}"`),this._badValueForSameId=o;break}e=pe(new me({}),n,e)}if(this.attr=e,this._startDate=t?t.startDate:new Date(e["START-DATE"]),"END-DATE"in this.attr){const n=(t==null?void 0:t.endDate)||new Date(this.attr["END-DATE"]);V(n.getTime())&&(this._endDate=n)}}get id(){return this.attr.ID}get class(){return this.attr.CLASS}get cue(){const e=this._cue;return e===void 0?this._cue=this.attr.enumeratedStringList(this.attr.CUE?"CUE":"X-CUE",{pre:!1,post:!1,once:!1}):e}get startTime(){const{tagAnchor:e}=this;return e===null||e.programDateTime===null?(te.warn(`Expected tagAnchor Fragment with PDT set for DateRange "${this.id}": ${e}`),NaN):e.start+(this.startDate.getTime()-e.programDateTime)/1e3}get startDate(){return this._startDate}get endDate(){if(this._endDate)return this._endDate;const e=this.duration;return e!==null?new Date(this._startDate.getTime()+e*1e3):null}get duration(){if("DURATION"in this.attr){const e=this.attr.decimalFloatingPoint("DURATION");if(V(e))return e}else if(this._endDate)return(this._endDate.getTime()-this._startDate.getTime())/1e3;return null}get plannedDuration(){return"PLANNED-DURATION"in this.attr?this.attr.decimalFloatingPoint("PLANNED-DURATION"):null}get endOnNext(){return this.attr.bool("END-ON-NEXT")}get isInterstitial(){return this.class===rl}get isValid(){return!!this.id&&!this._badValueForSameId&&V(this.startDate.getTime())&&(this.duration===null||this.duration>=0)&&(!this.endOnNext||!!this.class)&&(!this.attr.CUE||!this.cue.pre&&!this.cue.post||this.cue.pre!==this.cue.post)&&(!this.isInterstitial||"X-ASSET-URI"in this.attr||"X-ASSET-LIST"in this.attr)}}class Ks{constructor(){this.aborted=!1,this.loaded=0,this.retry=0,this.total=0,this.chunkCount=0,this.bwEstimate=0,this.loading={start:0,first:0,end:0},this.parsing={start:0,end:0},this.buffering={start:0,first:0,end:0}}}var ce={AUDIO:"audio",VIDEO:"video",AUDIOVIDEO:"audiovideo"};class ro{constructor(e){this._byteRange=null,this._url=null,this.baseurl=void 0,this.relurl=void 0,this.elementaryStreams={[ce.AUDIO]:null,[ce.VIDEO]:null,[ce.AUDIOVIDEO]:null},this.baseurl=e}setByteRange(e,t){const s=e.split("@",2);let i;s.length===1?i=(t==null?void 0:t.byteRangeEndOffset)||0:i=parseInt(s[1]),this._byteRange=[i,parseInt(s[0])+i]}get byteRange(){return this._byteRange?this._byteRange:[]}get byteRangeStartOffset(){return this.byteRange[0]}get byteRangeEndOffset(){return this.byteRange[1]}get url(){return!this._url&&this.baseurl&&this.relurl&&(this._url=qi.buildAbsoluteURL(this.baseurl,this.relurl,{alwaysNormalize:!0})),this._url||""}set url(e){this._url=e}}class zs extends ro{constructor(e,t){super(t),this._decryptdata=null,this.rawProgramDateTime=null,this.programDateTime=null,this.tagList=[],this.duration=0,this.sn=0,this.levelkeys=void 0,this.type=void 0,this.loader=null,this.keyLoader=null,this.level=-1,this.cc=0,this.startPTS=void 0,this.endPTS=void 0,this.startDTS=void 0,this.endDTS=void 0,this.start=0,this.deltaPTS=void 0,this.maxStartPTS=void 0,this.minEndPTS=void 0,this.stats=new Ks,this.data=void 0,this.bitrateTest=!1,this.title=null,this.initSegment=null,this.endList=void 0,this.gap=void 0,this.urlId=0,this.type=e}get decryptdata(){const{levelkeys:e}=this;if(!e&&!this._decryptdata)return null;if(!this._decryptdata&&this.levelkeys&&!this.levelkeys.NONE){const t=this.levelkeys.identity;if(t)this._decryptdata=t.getDecryptData(this.sn);else{const s=Object.keys(this.levelkeys);if(s.length===1)return this._decryptdata=this.levelkeys[s[0]].getDecryptData(this.sn)}}return this._decryptdata}get end(){return this.start+this.duration}get endProgramDateTime(){if(this.programDateTime===null||!V(this.programDateTime))return null;const e=V(this.duration)?this.duration:0;return this.programDateTime+e*1e3}get encrypted(){var e;if((e=this._decryptdata)!=null&&e.encrypted)return!0;if(this.levelkeys){const t=Object.keys(this.levelkeys),s=t.length;if(s>1||s===1&&this.levelkeys[t[0]].encrypted)return!0}return!1}setKeyFormat(e){if(this.levelkeys){const t=this.levelkeys[e];t&&!this._decryptdata&&(this._decryptdata=t.getDecryptData(this.sn))}}abortRequests(){var e,t;(e=this.loader)==null||e.abort(),(t=this.keyLoader)==null||t.abort()}setElementaryStreamInfo(e,t,s,i,n,o=!1){const{elementaryStreams:a}=this,l=a[e];if(!l){a[e]={startPTS:t,endPTS:s,startDTS:i,endDTS:n,partial:o};return}l.startPTS=Math.min(l.startPTS,t),l.endPTS=Math.max(l.endPTS,s),l.startDTS=Math.min(l.startDTS,i),l.endDTS=Math.max(l.endDTS,n)}clearElementaryStreamInfo(){const{elementaryStreams:e}=this;e[ce.AUDIO]=null,e[ce.VIDEO]=null,e[ce.AUDIOVIDEO]=null}}class al extends ro{constructor(e,t,s,i,n){super(s),this.fragOffset=0,this.duration=0,this.gap=!1,this.independent=!1,this.relurl=void 0,this.fragment=void 0,this.index=void 0,this.stats=new Ks,this.duration=e.decimalFloatingPoint("DURATION"),this.gap=e.bool("GAP"),this.independent=e.bool("INDEPENDENT"),this.relurl=e.enumeratedString("URI"),this.fragment=t,this.index=i;const o=e.enumeratedString("BYTERANGE");o&&this.setByteRange(o,n),n&&(this.fragOffset=n.fragOffset+n.duration)}get start(){return this.fragment.start+this.fragOffset}get end(){return this.start+this.duration}get loaded(){const{elementaryStreams:e}=this;return!!(e.audio||e.video||e.audiovideo)}}const ll=10;class cl{constructor(e){this.PTSKnown=!1,this.alignedSliding=!1,this.averagetargetduration=void 0,this.endCC=0,this.endSN=0,this.fragments=void 0,this.fragmentHint=void 0,this.partList=null,this.dateRanges=void 0,this.dateRangeTagCount=0,this.live=!0,this.ageHeader=0,this.advancedDateTime=void 0,this.updated=!0,this.advanced=!0,this.availabilityDelay=void 0,this.misses=0,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=void 0,this.m3u8="",this.version=null,this.canBlockReload=!1,this.canSkipUntil=0,this.canSkipDateRanges=!1,this.skippedSegments=0,this.recentlyRemovedDateranges=void 0,this.partHoldBack=0,this.holdBack=0,this.partTarget=0,this.preloadHint=void 0,this.renditionReports=void 0,this.tuneInGoal=0,this.deltaUpdateFailed=void 0,this.driftStartTime=0,this.driftEndTime=0,this.driftStart=0,this.driftEnd=0,this.encryptedFragments=void 0,this.playlistParsingError=null,this.variableList=null,this.hasVariableRefs=!1,this.fragments=[],this.encryptedFragments=[],this.dateRanges={},this.url=e}reloaded(e){if(!e){this.advanced=!0,this.updated=!0;return}const t=this.lastPartSn-e.lastPartSn,s=this.lastPartIndex-e.lastPartIndex;this.updated=this.endSN!==e.endSN||!!s||!!t||!this.live,this.advanced=this.endSN>e.endSN||t>0||t===0&&s>0,this.updated||this.advanced?this.misses=Math.floor(e.misses*.6):this.misses=e.misses+1,this.availabilityDelay=e.availabilityDelay}get hasProgramDateTime(){return this.fragments.length?V(this.fragments[this.fragments.length-1].programDateTime):!1}get levelTargetDuration(){return this.averagetargetduration||this.targetduration||ll}get drift(){const e=this.driftEndTime-this.driftStartTime;return e>0?(this.driftEnd-this.driftStart)*1e3/e:1}get edge(){return this.partEnd||this.fragmentEnd}get partEnd(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].end:this.fragmentEnd}get fragmentEnd(){var e;return(e=this.fragments)!=null&&e.length?this.fragments[this.fragments.length-1].end:0}get age(){return this.advancedDateTime?Math.max(Date.now()-this.advancedDateTime,0)/1e3:0}get lastPartIndex(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].index:-1}get lastPartSn(){var e;return(e=this.partList)!=null&&e.length?this.partList[this.partList.length-1].fragment.sn:this.endSN}}function ji(r){return Uint8Array.from(atob(r),e=>e.charCodeAt(0))}function Ai(r){return Uint8Array.from(unescape(encodeURIComponent(r)),e=>e.charCodeAt(0))}function ul(r){const e=Ai(r).subarray(0,16),t=new Uint8Array(16);return t.set(e,16-e.length),t}function hl(r){const e=function(s,i,n){const o=s[i];s[i]=s[n],s[n]=o};e(r,0,3),e(r,1,2),e(r,4,5),e(r,6,7)}function dl(r){const e=r.split(":");let t=null;if(e[0]==="data"&&e.length===2){const s=e[1].split(";"),i=s[s.length-1].split(",");if(i.length===2){const n=i[0]==="base64",o=i[1];n?(s.splice(-1,1),t=ji(o)):t=ul(o)}}return t}var mt={cbc:0,ctr:1};function Nt(r){return r==="AES-128"||r==="AES-256"||r==="AES-256-CTR"}function zi(r){switch(r){case"AES-128":case"AES-256":return mt.cbc;case"AES-256-CTR":return mt.ctr;default:throw new Error(`invalid full segment method ${r}`)}}const ws=typeof self<"u"?self:void 0;var ge={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.fps",PLAYREADY:"com.microsoft.playready",WIDEVINE:"com.widevine.alpha"},we={CLEARKEY:"org.w3.clearkey",FAIRPLAY:"com.apple.streamingkeydelivery",PLAYREADY:"com.microsoft.playready",WIDEVINE:"urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed"};function Ir(r){switch(r){case we.FAIRPLAY:return ge.FAIRPLAY;case we.PLAYREADY:return ge.PLAYREADY;case we.WIDEVINE:return ge.WIDEVINE;case we.CLEARKEY:return ge.CLEARKEY}}var no={WIDEVINE:"edef8ba979d64acea3c827dcd51d21ed"};function fl(r){if(r===no.WIDEVINE)return ge.WIDEVINE}function Dr(r){switch(r){case ge.FAIRPLAY:return we.FAIRPLAY;case ge.PLAYREADY:return we.PLAYREADY;case ge.WIDEVINE:return we.WIDEVINE;case ge.CLEARKEY:return we.CLEARKEY}}function Xs(r){const{drmSystems:e,widevineLicenseUrl:t}=r,s=e?[ge.FAIRPLAY,ge.WIDEVINE,ge.PLAYREADY,ge.CLEARKEY].filter(i=>!!e[i]):[];return!s[ge.WIDEVINE]&&t&&s.push(ge.WIDEVINE),s}const oo=function(r){return ws!=null&&(r=ws.navigator)!=null&&r.requestMediaKeySystemAccess?self.navigator.requestMediaKeySystemAccess.bind(self.navigator):null}();function gl(r,e,t,s){let i;switch(r){case ge.FAIRPLAY:i=["cenc","sinf"];break;case ge.WIDEVINE:case ge.PLAYREADY:i=["cenc"];break;case ge.CLEARKEY:i=["cenc","keyids"];break;default:throw new Error(`Unknown key-system: ${r}`)}return ml(i,e,t,s)}function ml(r,e,t,s){return[{initDataTypes:r,persistentState:s.persistentState||"optional",distinctiveIdentifier:s.distinctiveIdentifier||"optional",sessionTypes:s.sessionTypes||[s.sessionType||"temporary"],audioCapabilities:e.map(n=>({contentType:`audio/mp4; codecs="${n}"`,robustness:s.audioRobustness||"",encryptionScheme:s.audioEncryptionScheme||null})),videoCapabilities:t.map(n=>({contentType:`video/mp4; codecs="${n}"`,robustness:s.videoRobustness||"",encryptionScheme:s.videoEncryptionScheme||null}))}]}function Lt(r,e,t){return Uint8Array.prototype.slice?r.slice(e,t):new Uint8Array(Array.prototype.slice.call(r,e,t))}function Oe(r,e=!1){if(typeof TextDecoder<"u"){const c=new TextDecoder("utf-8").decode(r);if(e){const u=c.indexOf("\0");return u!==-1?c.substring(0,u):c}return c.replace(/\0/g,"")}const t=r.length;let s,i,n,o="",a=0;for(;a<t;){if(s=r[a++],s===0&&e)return o;if(s===0||s===3)continue;switch(s>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:o+=String.fromCharCode(s);break;case 12:case 13:i=r[a++],o+=String.fromCharCode((s&31)<<6|i&63);break;case 14:i=r[a++],n=r[a++],o+=String.fromCharCode((s&15)<<12|(i&63)<<6|(n&63)<<0);break}}return o}const Xe={hexDump:function(r){let e="";for(let t=0;t<r.length;t++){let s=r[t].toString(16);s.length<2&&(s="0"+s),e+=s}return e}},ks=Math.pow(2,32)-1,pl=[].push,ao={video:1,audio:2,id3:3,text:4};function Se(r){return String.fromCharCode.apply(null,r)}function lo(r,e){const t=r[e]<<8|r[e+1];return t<0?65536+t:t}function W(r,e){const t=co(r,e);return t<0?4294967296+t:t}function Cr(r,e){let t=W(r,e);return t*=Math.pow(2,32),t+=W(r,e+4),t}function co(r,e){return r[e]<<24|r[e+1]<<16|r[e+2]<<8|r[e+3]}function Qs(r,e,t){r[e]=t>>24,r[e+1]=t>>16&255,r[e+2]=t>>8&255,r[e+3]=t&255}function yl(r){const e=r.byteLength;for(let t=0;t<e;){const s=W(r,t);if(s>8&&r[t+4]===109&&r[t+5]===111&&r[t+6]===111&&r[t+7]===102)return!0;t=s>1?t+s:e}return!1}function Q(r,e){const t=[];if(!e.length)return t;const s=r.byteLength;for(let i=0;i<s;){const n=W(r,i),o=Se(r.subarray(i+4,i+8)),a=n>1?i+n:s;if(o===e[0])if(e.length===1)t.push(r.subarray(i+8,a));else{const l=Q(r.subarray(i+8,a),e.slice(1));l.length&&pl.apply(t,l)}i=a}return t}function El(r){const e=[],t=r[0];let s=8;const i=W(r,s);s+=4;let n=0,o=0;t===0?(n=W(r,s),o=W(r,s+4),s+=8):(n=Cr(r,s),o=Cr(r,s+8),s+=16),s+=2;let a=r.length+o;const l=lo(r,s);s+=2;for(let c=0;c<l;c++){let u=s;const h=W(r,u);u+=4;const d=h&2147483647;if((h&2147483648)>>>31===1)return te.warn("SIDX has hierarchical references (not supported)"),null;const f=W(r,u);u+=4,e.push({referenceSize:d,subsegmentDuration:f,info:{duration:f/i,start:a,end:a+d-1}}),a+=d,u+=4,s=u}return{earliestPresentationTime:n,timescale:i,version:t,referencesCount:l,references:e}}function uo(r){const e=[],t=Q(r,["moov","trak"]);for(let i=0;i<t.length;i++){const n=t[i],o=Q(n,["tkhd"])[0];if(o){let a=o[0];const l=W(o,a===0?12:20),c=Q(n,["mdia","mdhd"])[0];if(c){a=c[0];const u=W(c,a===0?12:20),h=Q(n,["mdia","hdlr"])[0];if(h){const d=Se(h.subarray(8,12)),g={soun:ce.AUDIO,vide:ce.VIDEO}[d];if(g){const f=Q(n,["mdia","minf","stbl","stsd"])[0],m=Tl(f);e[l]={timescale:u,type:g},e[g]=ve({timescale:u,id:l},m)}}}}}return Q(r,["moov","mvex","trex"]).forEach(i=>{const n=W(i,4),o=e[n];o&&(o.default={duration:W(i,12),flags:W(i,20)})}),e}function Tl(r){const e=r.subarray(8),t=e.subarray(86),s=Se(e.subarray(4,8));let i=s;const n=s==="enca"||s==="encv";if(n){const a=Q(e,[s])[0].subarray(s==="enca"?28:78);Q(a,["sinf"]).forEach(c=>{const u=Q(c,["schm"])[0];if(u){const h=Se(u.subarray(4,8));if(h==="cbcs"||h==="cenc"){const d=Q(c,["frma"])[0];d&&(i=Se(d))}}})}switch(i){case"avc1":case"avc2":case"avc3":case"avc4":{const o=Q(t,["avcC"])[0];i+="."+ls(o[1])+ls(o[2])+ls(o[3]);break}case"mp4a":{const o=Q(e,[s])[0],a=Q(o.subarray(28),["esds"])[0];if(a&&a.length>7){let l=4;if(a[l++]!==3)break;l=Zs(a,l),l+=2;const c=a[l++];if(c&128&&(l+=2),c&64&&(l+=a[l++]),a[l++]!==4)break;l=Zs(a,l);const u=a[l++];if(u===64)i+="."+ls(u);else break;if(l+=12,a[l++]!==5)break;l=Zs(a,l);const h=a[l++];let d=(h&248)>>3;d===31&&(d+=1+((h&7)<<3)+((a[l]&224)>>5)),i+="."+d}break}case"hvc1":case"hev1":{const o=Q(t,["hvcC"])[0],a=o[1],l=["","A","B","C"][a>>6],c=a&31,u=W(o,2),h=(a&32)>>5?"H":"L",d=o[12],g=o.subarray(6,12);i+="."+l+c,i+="."+u.toString(16).toUpperCase(),i+="."+h+d;let f="";for(let m=g.length;m--;){const p=g[m];(p||f)&&(f="."+p.toString(16).toUpperCase()+f)}i+=f;break}case"dvh1":case"dvhe":{const o=Q(t,["dvcC"])[0],a=o[2]>>1&127,l=o[2]<<5&32|o[3]>>3&31;i+="."+qe(a)+"."+qe(l);break}case"vp09":{const o=Q(t,["vpcC"])[0],a=o[4],l=o[5],c=o[6]>>4&15;i+="."+qe(a)+"."+qe(l)+"."+qe(c);break}case"av01":{const o=Q(t,["av1C"])[0],a=o[1]>>>5,l=o[1]&31,c=o[2]>>>7?"H":"M",u=(o[2]&64)>>6,h=(o[2]&32)>>5,d=a===2&&u?h?12:10:u?10:8,g=(o[2]&16)>>4,f=(o[2]&8)>>3,m=(o[2]&4)>>2,p=o[2]&3;i+="."+a+"."+qe(l)+c+"."+qe(d)+"."+g+"."+f+m+p+"."+qe(1)+"."+qe(1)+"."+qe(1)+"."+0;break}}return{codec:i,encrypted:n}}function Zs(r,e){const t=e+5;for(;r[e++]&128&&e<t;);return e}function ls(r){return("0"+r.toString(16).toUpperCase()).slice(-2)}function qe(r){return(r<10?"0":"")+r}function xl(r,e){if(!r||!e)return r;const t=e.keyId;return t&&e.isCommonEncryption&&Q(r,["moov","trak"]).forEach(i=>{const o=Q(i,["mdia","minf","stbl","stsd"])[0].subarray(8);let a=Q(o,["enca"]);const l=a.length>0;l||(a=Q(o,["encv"])),a.forEach(c=>{const u=l?c.subarray(28):c.subarray(78);Q(u,["sinf"]).forEach(d=>{const g=ho(d);if(g){const f=g.subarray(8,24);f.some(m=>m!==0)||(te.log(`[eme] Patching keyId in 'enc${l?"a":"v"}>sinf>>tenc' box: ${Xe.hexDump(f)} -> ${Xe.hexDump(t)}`),g.set(t,8))}})})}),r}function ho(r){const e=Q(r,["schm"])[0];if(e){const t=Se(e.subarray(4,8));if(t==="cbcs"||t==="cenc")return Q(r,["schi","tenc"])[0]}return te.error("[eme] missing 'schm' box"),null}function Sl(r,e){return Q(e,["moof","traf"]).reduce((t,s)=>{const i=Q(s,["tfdt"])[0],n=i[0],o=Q(s,["tfhd"]).reduce((a,l)=>{const c=W(l,4),u=r[c];if(u){let h=W(i,4);if(n===1){if(h===ks)return te.warn("[mp4-demuxer]: Ignoring assumed invalid signed 64-bit track fragment decode time"),a;h*=ks+1,h+=W(i,8)}const d=u.timescale||9e4,g=h/d;if(V(g)&&(a===null||g<a))return g}return a},null);return o!==null&&V(o)&&(t===null||o<t)?o:t},null)}function vl(r,e){let t=0,s=0,i=0;const n=Q(r,["moof","traf"]);for(let o=0;o<n.length;o++){const a=n[o],l=Q(a,["tfhd"])[0],c=W(l,4),u=e[c];if(!u)continue;const h=u.default,d=W(l,0)|(h==null?void 0:h.flags);let g=h==null?void 0:h.duration;d&8&&(d&2?g=W(l,12):g=W(l,8));const f=u.timescale||9e4,m=Q(a,["trun"]);for(let p=0;p<m.length;p++){if(t=Ll(m[p]),!t&&g){const E=W(m[p],4);t=g*E}u.type===ce.VIDEO?s+=t/f:u.type===ce.AUDIO&&(i+=t/f)}}if(s===0&&i===0){let o=1/0,a=0,l=0;const c=Q(r,["sidx"]);for(let u=0;u<c.length;u++){const h=El(c[u]);if(h!=null&&h.references){o=Math.min(o,h.earliestPresentationTime/h.timescale);const d=h.references.reduce((g,f)=>g+f.info.duration||0,0);a=Math.max(a,d+h.earliestPresentationTime/h.timescale),l=a-o}}if(l&&V(l))return l}return s||i}function Ll(r){const e=W(r,0);let t=8;e&1&&(t+=4),e&4&&(t+=4);let s=0;const i=W(r,4);for(let n=0;n<i;n++){if(e&256){const o=W(r,t);s+=o,t+=4}e&512&&(t+=4),e&1024&&(t+=4),e&2048&&(t+=4)}return s}function Al(r,e,t){Q(e,["moof","traf"]).forEach(s=>{Q(s,["tfhd"]).forEach(i=>{const n=W(i,4),o=r[n];if(!o)return;const a=o.timescale||9e4;Q(s,["tfdt"]).forEach(l=>{const c=l[0],u=t*a;if(u){let h=W(l,4);if(c===0)h-=u,h=Math.max(h,0),Qs(l,4,h);else{h*=Math.pow(2,32),h+=W(l,8),h-=u,h=Math.max(h,0);const d=Math.floor(h/(ks+1)),g=Math.floor(h%(ks+1));Qs(l,4,d),Qs(l,8,g)}}})})})}function bl(r){const e={valid:null,remainder:null},t=Q(r,["moof"]);if(t.length<2)return e.remainder=r,e;const s=t[t.length-1];return e.valid=Lt(r,0,s.byteOffset-8),e.remainder=Lt(r,s.byteOffset-8),e}function $e(r,e){const t=new Uint8Array(r.length+e.length);return t.set(r),t.set(e,r.length),t}function wr(r,e){const t=[],s=e.samples,i=e.timescale,n=e.id;let o=!1;return Q(s,["moof"]).map(l=>{const c=l.byteOffset-8;Q(l,["traf"]).map(h=>{const d=Q(h,["tfdt"]).map(g=>{const f=g[0];let m=W(g,4);return f===1&&(m*=Math.pow(2,32),m+=W(g,8)),m/i})[0];return d!==void 0&&(r=d),Q(h,["tfhd"]).map(g=>{const f=W(g,4),m=W(g,0)&16777215,p=(m&1)!==0,E=(m&2)!==0,x=(m&8)!==0;let T=0;const _=(m&16)!==0;let A=0;const C=(m&32)!==0;let L=8;f===n&&(p&&(L+=8),E&&(L+=4),x&&(T=W(g,L),L+=4),_&&(A=W(g,L),L+=4),C&&(L+=4),e.type==="video"&&(o=_l(e.codec)),Q(h,["trun"]).map(v=>{const I=v[0],R=W(v,0)&16777215,k=(R&1)!==0;let U=0;const K=(R&4)!==0,O=(R&256)!==0;let G=0;const P=(R&512)!==0;let F=0;const Z=(R&1024)!==0,N=(R&2048)!==0;let M=0;const q=W(v,4);let j=8;k&&(U=W(v,j),j+=4),K&&(j+=4);let ee=U+c;for(let ae=0;ae<q;ae++){if(O?(G=W(v,j),j+=4):G=T,P?(F=W(v,j),j+=4):F=A,Z&&(j+=4),N&&(I===0?M=W(v,j):M=co(v,j),j+=4),e.type===ce.VIDEO){let he=0;for(;he<F;){const B=W(s,ee);if(ee+=4,Rl(o,s[ee])){const ye=s.subarray(ee,ee+B);Xi(ye,o?2:1,r+M/i,t)}ee+=B,he+=B+4}}r+=G/i}}))})})}),t}function _l(r){if(!r)return!1;const e=r.indexOf("."),t=e<0?r:r.substring(0,e);return t==="hvc1"||t==="hev1"||t==="dvh1"||t==="dvhe"}function Rl(r,e){if(r){const t=e>>1&63;return t===39||t===40}else return(e&31)===6}function Xi(r,e,t,s){const i=fo(r);let n=0;n+=e;let o=0,a=0,l=0;for(;n<i.length;){o=0;do{if(n>=i.length)break;l=i[n++],o+=l}while(l===255);a=0;do{if(n>=i.length)break;l=i[n++],a+=l}while(l===255);const c=i.length-n;let u=n;if(a<c)n+=a;else if(a>c){te.error(`Malformed SEI payload. ${a} is too small, only ${c} bytes left to parse.`);break}if(o===4){if(i[u++]===181){const d=lo(i,u);if(u+=2,d===49){const g=W(i,u);if(u+=4,g===1195456820){const f=i[u++];if(f===3){const m=i[u++],p=31&m,E=64&m,x=E?2+p*3:0,T=new Uint8Array(x);if(E){T[0]=m;for(let _=1;_<x;_++)T[_]=i[u++]}s.push({type:f,payloadType:o,pts:t,bytes:T})}}}}}else if(o===5&&a>16){const h=[];for(let f=0;f<16;f++){const m=i[u++].toString(16);h.push(m.length==1?"0"+m:m),(f===3||f===5||f===7||f===9)&&h.push("-")}const d=a-16,g=new Uint8Array(d);for(let f=0;f<d;f++)g[f]=i[u++];s.push({payloadType:o,pts:t,uuid:h.join(""),userData:Oe(g),userDataBytes:g})}}}function fo(r){const e=r.byteLength,t=[];let s=1;for(;s<e-2;)r[s]===0&&r[s+1]===0&&r[s+2]===3?(t.push(s+2),s+=2):s++;if(t.length===0)return r;const i=e-t.length,n=new Uint8Array(i);let o=0;for(s=0;s<i;o++,s++)o===t[0]&&(o++,t.shift()),n[s]=r[o];return n}function Il(r){const e=r[0];let t="",s="",i=0,n=0,o=0,a=0,l=0,c=0;if(e===0){for(;Se(r.subarray(c,c+1))!=="\0";)t+=Se(r.subarray(c,c+1)),c+=1;for(t+=Se(r.subarray(c,c+1)),c+=1;Se(r.subarray(c,c+1))!=="\0";)s+=Se(r.subarray(c,c+1)),c+=1;s+=Se(r.subarray(c,c+1)),c+=1,i=W(r,12),n=W(r,16),a=W(r,20),l=W(r,24),c=28}else if(e===1){c+=4,i=W(r,c),c+=4;const h=W(r,c);c+=4;const d=W(r,c);for(c+=4,o=2**32*h+d,Qa(o)||(o=Number.MAX_SAFE_INTEGER,te.warn("Presentation time exceeds safe integer limit and wrapped to max safe integer in parsing emsg box")),a=W(r,c),c+=4,l=W(r,c),c+=4;Se(r.subarray(c,c+1))!=="\0";)t+=Se(r.subarray(c,c+1)),c+=1;for(t+=Se(r.subarray(c,c+1)),c+=1;Se(r.subarray(c,c+1))!=="\0";)s+=Se(r.subarray(c,c+1)),c+=1;s+=Se(r.subarray(c,c+1)),c+=1}const u=r.subarray(c,r.byteLength);return{schemeIdUri:t,value:s,timeScale:i,presentationTime:o,presentationTimeDelta:n,eventDuration:a,id:l,payload:u}}function Dl(r,...e){const t=e.length;let s=8,i=t;for(;i--;)s+=e[i].byteLength;const n=new Uint8Array(s);for(n[0]=s>>24&255,n[1]=s>>16&255,n[2]=s>>8&255,n[3]=s&255,n.set(r,4),i=0,s=8;i<t;i++)n.set(e[i],s),s+=e[i].byteLength;return n}function Cl(r,e,t){if(r.byteLength!==16)throw new RangeError("Invalid system id");let s,i;s=0,i=new Uint8Array;let n;s>0?(n=new Uint8Array(4),e.length>0&&new DataView(n.buffer).setUint32(0,e.length,!1)):n=new Uint8Array;const o=new Uint8Array(4);return t&&t.byteLength>0&&new DataView(o.buffer).setUint32(0,t.byteLength,!1),Dl([112,115,115,104],new Uint8Array([s,0,0,0]),r,n,i,o,t||new Uint8Array)}function wl(r){if(!(r instanceof ArrayBuffer)||r.byteLength<32)return null;const e={version:0,systemId:"",kids:null,data:null},t=new DataView(r),s=t.getUint32(0);if(r.byteLength!==s&&s>44||t.getUint32(4)!==1886614376||(e.version=t.getUint32(8)>>>24,e.version>1))return null;e.systemId=Xe.hexDump(new Uint8Array(r,12,16));const n=t.getUint32(28);if(e.version===0){if(s-32<n)return null;e.data=new Uint8Array(r,32,n)}else if(e.version===1){e.kids=[];for(let o=0;o<n;o++)e.kids.push(new Uint8Array(r,32+o*16,16))}return e}let cs={};class Zt{static clearKeyUriToKeyIdMap(){cs={}}constructor(e,t,s,i=[1],n=null){this.uri=void 0,this.method=void 0,this.keyFormat=void 0,this.keyFormatVersions=void 0,this.encrypted=void 0,this.isCommonEncryption=void 0,this.iv=null,this.key=null,this.keyId=null,this.pssh=null,this.method=e,this.uri=t,this.keyFormat=s,this.keyFormatVersions=i,this.iv=n,this.encrypted=e?e!=="NONE":!1,this.isCommonEncryption=this.encrypted&&!Nt(e)}isSupported(){if(this.method){if(Nt(this.method)||this.method==="NONE")return!0;if(this.keyFormat==="identity")return this.method==="SAMPLE-AES";switch(this.keyFormat){case we.FAIRPLAY:case we.WIDEVINE:case we.PLAYREADY:case we.CLEARKEY:return["ISO-23001-7","SAMPLE-AES","SAMPLE-AES-CENC","SAMPLE-AES-CTR"].indexOf(this.method)!==-1}}return!1}getDecryptData(e){if(!this.encrypted||!this.uri)return null;if(Nt(this.method)&&this.uri&&!this.iv){typeof e!="number"&&(te.warn(`missing IV for initialization segment with method="${this.method}" - compliance issue`),e=0);const s=kl(e);return new Zt(this.method,this.uri,"identity",this.keyFormatVersions,s)}const t=dl(this.uri);if(t)switch(this.keyFormat){case we.WIDEVINE:this.pssh=t,t.length>=22&&(this.keyId=t.subarray(t.length-22,t.length-6));break;case we.PLAYREADY:{const s=new Uint8Array([154,4,240,121,152,64,66,134,171,146,230,91,224,136,95,149]);this.pssh=Cl(s,null,t);const i=new Uint16Array(t.buffer,t.byteOffset,t.byteLength/2),n=String.fromCharCode.apply(null,Array.from(i)),o=n.substring(n.indexOf("<"),n.length),c=new DOMParser().parseFromString(o,"text/xml").getElementsByTagName("KID")[0];if(c){const u=c.childNodes[0]?c.childNodes[0].nodeValue:c.getAttribute("VALUE");if(u){const h=ji(u).subarray(0,16);hl(h),this.keyId=h}}break}default:{let s=t.subarray(0,16);if(s.length!==16){const i=new Uint8Array(16);i.set(s,16-s.length),s=i}this.keyId=s;break}}if(!this.keyId||this.keyId.byteLength!==16){let s=cs[this.uri];if(!s){const i=Object.keys(cs).length%Number.MAX_SAFE_INTEGER;s=new Uint8Array(16),new DataView(s.buffer,12,4).setUint32(0,i),cs[this.uri]=s}this.keyId=s}return this}}function kl(r){const e=new Uint8Array(16);for(let t=12;t<16;t++)e[t]=r>>8*(15-t)&255;return e}function pt(r=!0){return typeof self>"u"?void 0:(r||!self.MediaSource)&&self.ManagedMediaSource||self.MediaSource||self.WebKitMediaSource}function Pl(r){return typeof self<"u"&&r===self.ManagedMediaSource}const Ps={audio:{a3ds:1,"ac-3":.95,"ac-4":1,alac:.9,alaw:1,dra1:1,"dts+":1,"dts-":1,dtsc:1,dtse:1,dtsh:1,"ec-3":.9,enca:1,fLaC:.9,flac:.9,FLAC:.9,g719:1,g726:1,m4ae:1,mha1:1,mha2:1,mhm1:1,mhm2:1,mlpa:1,mp4a:1,"raw ":1,Opus:1,opus:1,samr:1,sawb:1,sawp:1,sevc:1,sqcp:1,ssmv:1,twos:1,ulaw:1},video:{avc1:1,avc2:1,avc3:1,avc4:1,avcp:1,av01:.8,drac:1,dva1:1,dvav:1,dvh1:.7,dvhe:.7,encv:1,hev1:.75,hvc1:.75,mjp2:1,mp4v:1,mvc1:1,mvc2:1,mvc3:1,mvc4:1,resv:1,rv60:1,s263:1,svc1:1,svc2:1,"vc-1":1,vp08:1,vp09:.9},text:{stpp:1,wvtt:1}};function Fl(r,e){const t=Ps[e];return!!t&&!!t[r.slice(0,4)]}function Js(r,e,t=!0){return!r.split(",").some(s=>!go(s,e,t))}function go(r,e,t=!0){var s;const i=pt(t);return(s=i==null?void 0:i.isTypeSupported(Jt(r,e)))!=null?s:!1}function Jt(r,e){return`${e}/mp4;codecs="${r}"`}function kr(r){if(r){const e=r.substring(0,4);return Ps.video[e]}return 2}function Fs(r){return r.split(",").reduce((e,t)=>{const s=Ps.video[t];return s?(s*2+e)/(e?3:2):(Ps.audio[t]+e)/(e?2:1)},0)}const ei={};function Ol(r,e=!0){if(ei[r])return ei[r];const t={flac:["flac","fLaC","FLAC"],opus:["opus","Opus"],"mp4a.40.34":["mp3"]}[r];for(let i=0;i<t.length;i++){var s;if(go(t[i],"audio",e))return ei[r]=t[i],t[i];if(t[i]==="mp3"&&(s=pt(e))!=null&&s.isTypeSupported("audio/mpeg"))return""}return r}const Ml=/flac|opus|mp4a\.40\.34/i;function Os(r,e=!0){return r.replace(Ml,t=>Ol(t.toLowerCase(),e))}function Pr(r,e){return r&&r!=="mp4a"?r:e&&e.split(",")[0]}function Nl(r){const e=r.split(",");for(let t=0;t<e.length;t++){const s=e[t].split(".");if(s.length>2){let i=s.shift()+".";i+=parseInt(s.shift()).toString(16),i+=("000"+parseInt(s.shift()).toString(16)).slice(-4),e[t]=i}}return e.join(",")}function Fr(r){const e=pt(r)||{isTypeSupported:()=>!1};return{mpeg:e.isTypeSupported("audio/mpeg"),mp3:e.isTypeSupported('audio/mp4; codecs="mp3"'),ac3:e.isTypeSupported('audio/mp4; codecs="ac-3"')}}const Or=/#EXT-X-STREAM-INF:([^\r\n]*)(?:[\r\n](?:#[^\r\n]*)?)*([^\r\n]+)|#EXT-X-(SESSION-DATA|SESSION-KEY|DEFINE|CONTENT-STEERING|START):([^\r\n]*)[\r\n]+/g,Mr=/#EXT-X-MEDIA:(.*)/g,Bl=/^#EXT(?:INF|-X-TARGETDURATION):/m,Nr=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/(?!#) *(\S[^\r\n]*)/.source,/#EXT-X-BYTERANGE:*(.+)/.source,/#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/#.*/.source].join("|"),"g"),Ul=new RegExp([/#(EXTM3U)/.source,/#EXT-X-(DATERANGE|DEFINE|KEY|MAP|PART|PART-INF|PLAYLIST-TYPE|PRELOAD-HINT|RENDITION-REPORT|SERVER-CONTROL|SKIP|START):(.+)/.source,/#EXT-X-(BITRATE|DISCONTINUITY-SEQUENCE|MEDIA-SEQUENCE|TARGETDURATION|VERSION): *(\d+)/.source,/#EXT-X-(DISCONTINUITY|ENDLIST|GAP|INDEPENDENT-SEGMENTS)/.source,/(#)([^:]*):(.*)/.source,/(#)(.*)(?:.*)\r?\n?/.source].join("|"));class st{static findGroup(e,t){for(let s=0;s<e.length;s++){const i=e[s];if(i.id===t)return i}}static resolve(e,t){return qi.buildAbsoluteURL(t,e,{alwaysNormalize:!0})}static isMediaPlaylist(e){return Bl.test(e)}static parseMasterPlaylist(e,t){const s=br(e),i={contentSteering:null,levels:[],playlistParsingError:null,sessionData:null,sessionKeys:null,startTimeOffset:null,variableList:null,hasVariableRefs:s},n=[];Or.lastIndex=0;let o;for(;(o=Or.exec(e))!=null;)if(o[1]){var a;const c=new me(o[1],i),u=Li(i,o[2]),h={attrs:c,bitrate:c.decimalInteger("BANDWIDTH")||c.decimalInteger("AVERAGE-BANDWIDTH"),name:c.NAME,url:st.resolve(u,t)},d=c.decimalResolution("RESOLUTION");d&&(h.width=d.width,h.height=d.height),$l(c.CODECS,h),(a=h.unknownCodecs)!=null&&a.length||n.push(h),i.levels.push(h)}else if(o[3]){const c=o[3],u=o[4];switch(c){case"SESSION-DATA":{const h=new me(u,i),d=h["DATA-ID"];d&&(i.sessionData===null&&(i.sessionData={}),i.sessionData[d]=h);break}case"SESSION-KEY":{const h=Br(u,t,i);h.encrypted&&h.isSupported()?(i.sessionKeys===null&&(i.sessionKeys=[]),i.sessionKeys.push(h)):te.warn(`[Keys] Ignoring invalid EXT-X-SESSION-KEY tag: "${u}"`);break}case"DEFINE":{{const h=new me(u,i);_r(i,h,t)}break}case"CONTENT-STEERING":{const h=new me(u,i);i.contentSteering={uri:st.resolve(h["SERVER-URI"],t),pathwayId:h["PATHWAY-ID"]||"."};break}case"START":{i.startTimeOffset=Ur(u);break}}}const l=n.length>0&&n.length<i.levels.length;return i.levels=l?n:i.levels,i.levels.length===0&&(i.playlistParsingError=new Error("no levels found in manifest")),i}static parseMasterPlaylistMedia(e,t,s){let i;const n={},o=s.levels,a={AUDIO:o.map(c=>({id:c.attrs.AUDIO,audioCodec:c.audioCodec})),SUBTITLES:o.map(c=>({id:c.attrs.SUBTITLES,textCodec:c.textCodec})),"CLOSED-CAPTIONS":[]};let l=0;for(Mr.lastIndex=0;(i=Mr.exec(e))!==null;){const c=new me(i[1],s),u=c.TYPE;if(u){const h=a[u],d=n[u]||[];n[u]=d;const g=c.LANGUAGE,f=c["ASSOC-LANGUAGE"],m=c.CHANNELS,p=c.CHARACTERISTICS,E=c["INSTREAM-ID"],x={attrs:c,bitrate:0,id:l++,groupId:c["GROUP-ID"]||"",name:c.NAME||g||"",type:u,default:c.bool("DEFAULT"),autoselect:c.bool("AUTOSELECT"),forced:c.bool("FORCED"),lang:g,url:c.URI?st.resolve(c.URI,t):""};if(f&&(x.assocLang=f),m&&(x.channels=m),p&&(x.characteristics=p),E&&(x.instreamId=E),h!=null&&h.length){const T=st.findGroup(h,x.groupId)||h[0];Gr(x,T,"audioCodec"),Gr(x,T,"textCodec")}d.push(x)}}return n}static parseLevelPlaylist(e,t,s,i,n,o){const a=new cl(t),l=a.fragments,c=[];let u=null,h=0,d=0,g=0,f=0,m=null,p=new zs(i,t),E,x,T,_=-1,A=!1,C=null;for(Nr.lastIndex=0,a.m3u8=e,a.hasVariableRefs=br(e);(E=Nr.exec(e))!==null;){A&&(A=!1,p=new zs(i,t),p.start=g,p.sn=h,p.cc=f,p.level=s,u&&(p.initSegment=u,p.rawProgramDateTime=u.rawProgramDateTime,u.rawProgramDateTime=null,C&&(p.setByteRange(C),C=null)));const R=E[1];if(R){p.duration=parseFloat(R);const k=(" "+E[2]).slice(1);p.title=k||null,p.tagList.push(k?["INF",R,k]:["INF",R])}else if(E[3]){if(V(p.duration)){p.start=g,T&&Vr(p,T,a),p.sn=h,p.level=s,p.cc=f,l.push(p);const k=(" "+E[3]).slice(1);p.relurl=Li(a,k),bi(p,m,c),m=p,g+=p.duration,h++,d=0,A=!0}}else if(E[4]){const k=(" "+E[4]).slice(1);m?p.setByteRange(k,m):p.setByteRange(k)}else if(E[5])p.rawProgramDateTime=(" "+E[5]).slice(1),p.tagList.push(["PROGRAM-DATE-TIME",p.rawProgramDateTime]),_===-1&&(_=l.length);else{if(E=E[0].match(Ul),!E){te.warn("No matches on slow regex match for level playlist!");continue}for(x=1;x<E.length&&!(typeof E[x]<"u");x++);const k=(" "+E[x]).slice(1),U=(" "+E[x+1]).slice(1),K=E[x+2]?(" "+E[x+2]).slice(1):"";switch(k){case"PLAYLIST-TYPE":a.type=U.toUpperCase();break;case"MEDIA-SEQUENCE":h=a.startSN=parseInt(U);break;case"SKIP":{a.skippedSegments&&(a.playlistParsingError=new Error("#EXT-X-SKIP MUST NOT appear more than once in a Playlist"));const O=new me(U,a),G=O.decimalInteger("SKIPPED-SEGMENTS");if(V(G)){a.skippedSegments+=G;for(let F=G;F--;)l.push(null);h+=G}const P=O.enumeratedString("RECENTLY-REMOVED-DATERANGES");P&&(a.recentlyRemovedDateranges=(a.recentlyRemovedDateranges||[]).concat(P.split(" ")));break}case"TARGETDURATION":a.targetduration=Math.max(parseInt(U),1);break;case"VERSION":a.version=parseInt(U);break;case"INDEPENDENT-SEGMENTS":case"EXTM3U":break;case"ENDLIST":a.live=!1;break;case"#":(U||K)&&p.tagList.push(K?[U,K]:[U]);break;case"DISCONTINUITY":f++,p.tagList.push(["DIS"]);break;case"GAP":p.gap=!0,p.tagList.push([k]);break;case"BITRATE":p.tagList.push([k,U]);break;case"DATERANGE":{const O=new me(U,a),G=new io(O,a.dateRanges[O.ID],a.dateRangeTagCount);a.dateRangeTagCount++,G.isValid||a.skippedSegments?a.dateRanges[G.id]=G:te.warn(`Ignoring invalid DATERANGE tag: "${U}"`),p.tagList.push(["EXT-X-DATERANGE",U]);break}case"DEFINE":{{const O=new me(U,a);"IMPORT"in O?sl(a,O,o):_r(a,O,t)}break}case"DISCONTINUITY-SEQUENCE":f=parseInt(U);break;case"KEY":{const O=Br(U,t,a);if(O.isSupported()){if(O.method==="NONE"){T=void 0;break}T||(T={}),T[O.keyFormat]&&(T=pe({},T)),T[O.keyFormat]=O}else te.warn(`[Keys] Ignoring invalid EXT-X-KEY tag: "${U}"`);break}case"START":a.startTimeOffset=Ur(U);break;case"MAP":{const O=new me(U,a);if(p.duration){const G=new zs(i,t);$r(G,O,s,T),u=G,p.initSegment=u,u.rawProgramDateTime&&!p.rawProgramDateTime&&(p.rawProgramDateTime=u.rawProgramDateTime)}else{const G=p.byteRangeEndOffset;if(G){const P=p.byteRangeStartOffset;C=`${G-P}@${P}`}else C=null;$r(p,O,s,T),u=p,A=!0}u.cc=f;break}case"SERVER-CONTROL":{const O=new me(U);a.canBlockReload=O.bool("CAN-BLOCK-RELOAD"),a.canSkipUntil=O.optionalFloat("CAN-SKIP-UNTIL",0),a.canSkipDateRanges=a.canSkipUntil>0&&O.bool("CAN-SKIP-DATERANGES"),a.partHoldBack=O.optionalFloat("PART-HOLD-BACK",0),a.holdBack=O.optionalFloat("HOLD-BACK",0);break}case"PART-INF":{const O=new me(U);a.partTarget=O.decimalFloatingPoint("PART-TARGET");break}case"PART":{let O=a.partList;O||(O=a.partList=[]);const G=d>0?O[O.length-1]:void 0,P=d++,F=new me(U,a),Z=new al(F,p,t,P,G);O.push(Z),p.duration+=Z.duration;break}case"PRELOAD-HINT":{const O=new me(U,a);a.preloadHint=O;break}case"RENDITION-REPORT":{const O=new me(U,a);a.renditionReports=a.renditionReports||[],a.renditionReports.push(O);break}default:te.warn(`line parsed but not handled: ${E}`);break}}}m&&!m.relurl?(l.pop(),g-=m.duration,a.partList&&(a.fragmentHint=m)):a.partList&&(bi(p,m,c),p.cc=f,a.fragmentHint=p,T&&Vr(p,T,a));const L=l.length,v=l[0],I=l[L-1];if(g+=a.skippedSegments*a.targetduration,g>0&&L&&I){a.averagetargetduration=g/L;const R=I.sn;a.endSN=R!=="initSegment"?R:0,a.live||(I.endList=!0),v&&(a.startCC=v.cc),_>0&&(Vl(l,_),v&&c.unshift(v))}else a.endSN=0,a.startCC=0;return a.fragmentHint&&(g+=a.fragmentHint.duration),a.totalduration=g,c.length&&a.dateRangeTagCount&&v&&mo(c,a),a.endCC=f,a}}function mo(r,e){const t=r.length,s=r[t-1],i=e.live?1/0:e.totalduration,n=Object.keys(e.dateRanges);for(let o=n.length;o--;){const a=e.dateRanges[n[o]],l=a.startDate.getTime();a.tagAnchor=s;for(let c=t;c--;){const u=Gl(e,l,r,c,i);if(u!==-1){a.tagAnchor=e.fragments[u];break}}}}function Gl(r,e,t,s,i){const n=t[s];if(n){var o;const a=(((o=t[s+1])==null?void 0:o.start)||i)-n.start,l=n.programDateTime;if((e>=l||s===0)&&e<=l+a*1e3){const c=t[s].sn-r.startSN,u=r.fragments;if(u.length>t.length){const d=(t[s+1]||u[u.length-1]).sn-r.startSN;for(let g=d;g>c;g--){const f=u[g].programDateTime;if(e>=f&&e<f+u[g].duration*1e3)return g}}return c}}return-1}function Br(r,e,t){var s,i;const n=new me(r,t),o=(s=n.METHOD)!=null?s:"",a=n.URI,l=n.hexadecimalInteger("IV"),c=n.KEYFORMATVERSIONS,u=(i=n.KEYFORMAT)!=null?i:"identity";a&&n.IV&&!l&&te.error(`Invalid IV: ${n.IV}`);const h=a?st.resolve(a,e):"",d=(c||"1").split("/").map(Number).filter(Number.isFinite);return new Zt(o,h,u,d,l)}function Ur(r){const t=new me(r).decimalFloatingPoint("TIME-OFFSET");return V(t)?t:null}function $l(r,e){let t=(r||"").split(/[ ,]+/).filter(s=>s);["video","audio","text"].forEach(s=>{const i=t.filter(n=>Fl(n,s));i.length&&(e[`${s}Codec`]=i.join(","),t=t.filter(n=>i.indexOf(n)===-1))}),e.unknownCodecs=t}function Gr(r,e,t){const s=e[t];s&&(r[t]=s)}function Vl(r,e){let t=r[e];for(let s=e;s--;){const i=r[s];if(!i)return;i.programDateTime=t.programDateTime-i.duration*1e3,t=i}}function bi(r,e,t){if(r.rawProgramDateTime){if(r.programDateTime=Date.parse(r.rawProgramDateTime),!V(r.programDateTime)){r.programDateTime=null,r.rawProgramDateTime=null;return}t.push(r)}else e!=null&&e.programDateTime&&(r.programDateTime=e.endProgramDateTime)}function $r(r,e,t,s){r.relurl=e.URI,e.BYTERANGE&&r.setByteRange(e.BYTERANGE),r.level=t,r.sn="initSegment",s&&(r.levelkeys=s),r.initSegment=null}function Vr(r,e,t){r.levelkeys=e;const{encryptedFragments:s}=t;(!s.length||s[s.length-1].levelkeys!==e)&&Object.keys(e).some(i=>e[i].isCommonEncryption)&&s.push(r)}var re={MANIFEST:"manifest",LEVEL:"level",AUDIO_TRACK:"audioTrack",SUBTITLE_TRACK:"subtitleTrack"},H={MAIN:"main",AUDIO:"audio",SUBTITLE:"subtitle"};function Kr(r){const{type:e}=r;switch(e){case re.AUDIO_TRACK:return H.AUDIO;case re.SUBTITLE_TRACK:return H.SUBTITLE;default:return H.MAIN}}function ti(r,e){let t=r.url;return(t===void 0||t.indexOf("data:")===0)&&(t=e.url),t}class Kl{constructor(e){this.hls=void 0,this.loaders=Object.create(null),this.variableList=null,this.hls=e,this.registerListeners()}startLoad(e){}stopLoad(){this.destroyInternalLoaders()}registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.on(y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.AUDIO_TRACK_LOADING,this.onAudioTrackLoading,this),e.off(y.SUBTITLE_TRACK_LOADING,this.onSubtitleTrackLoading,this)}createInternalLoader(e){const t=this.hls.config,s=t.pLoader,i=t.loader,n=s||i,o=new n(t);return this.loaders[e.type]=o,o}getInternalLoader(e){return this.loaders[e.type]}resetInternalLoader(e){this.loaders[e]&&delete this.loaders[e]}destroyInternalLoaders(){for(const e in this.loaders){const t=this.loaders[e];t&&t.destroy(),this.resetInternalLoader(e)}}destroy(){this.variableList=null,this.unregisterListeners(),this.destroyInternalLoaders()}onManifestLoading(e,t){const{url:s}=t;this.variableList=null,this.load({id:null,level:0,responseType:"text",type:re.MANIFEST,url:s,deliveryDirectives:null})}onLevelLoading(e,t){const{id:s,level:i,pathwayId:n,url:o,deliveryDirectives:a}=t;this.load({id:s,level:i,pathwayId:n,responseType:"text",type:re.LEVEL,url:o,deliveryDirectives:a})}onAudioTrackLoading(e,t){const{id:s,groupId:i,url:n,deliveryDirectives:o}=t;this.load({id:s,groupId:i,level:null,responseType:"text",type:re.AUDIO_TRACK,url:n,deliveryDirectives:o})}onSubtitleTrackLoading(e,t){const{id:s,groupId:i,url:n,deliveryDirectives:o}=t;this.load({id:s,groupId:i,level:null,responseType:"text",type:re.SUBTITLE_TRACK,url:n,deliveryDirectives:o})}load(e){var t;const s=this.hls.config;let i=this.getInternalLoader(e);if(i){const c=i.context;if(c&&c.url===e.url&&c.level===e.level){this.hls.logger.trace("[playlist-loader]: playlist request ongoing");return}this.hls.logger.log(`[playlist-loader]: aborting previous loader for type: ${e.type}`),i.abort()}let n;if(e.type===re.MANIFEST?n=s.manifestLoadPolicy.default:n=pe({},s.playlistLoadPolicy.default,{timeoutRetry:null,errorRetry:null}),i=this.createInternalLoader(e),V((t=e.deliveryDirectives)==null?void 0:t.part)){let c;if(e.type===re.LEVEL&&e.level!==null?c=this.hls.levels[e.level].details:e.type===re.AUDIO_TRACK&&e.id!==null?c=this.hls.audioTracks[e.id].details:e.type===re.SUBTITLE_TRACK&&e.id!==null&&(c=this.hls.subtitleTracks[e.id].details),c){const u=c.partTarget,h=c.targetduration;if(u&&h){const d=Math.max(u*3,h*.8)*1e3;n=pe({},n,{maxTimeToFirstByteMs:Math.min(d,n.maxTimeToFirstByteMs),maxLoadTimeMs:Math.min(d,n.maxTimeToFirstByteMs)})}}}const o=n.errorRetry||n.timeoutRetry||{},a={loadPolicy:n,timeout:n.maxLoadTimeMs,maxRetry:o.maxNumRetry||0,retryDelay:o.retryDelayMs||0,maxRetryDelay:o.maxRetryDelayMs||0},l={onSuccess:(c,u,h,d)=>{const g=this.getInternalLoader(h);this.resetInternalLoader(h.type);const f=c.data;if(f.indexOf("#EXTM3U")!==0){this.handleManifestParsingError(c,h,new Error("no EXTM3U delimiter"),d||null,u);return}u.parsing.start=performance.now(),st.isMediaPlaylist(f)?this.handleTrackOrLevelPlaylist(c,u,h,d||null,g):this.handleMasterPlaylist(c,u,h,d)},onError:(c,u,h,d)=>{this.handleNetworkError(u,h,!1,c,d)},onTimeout:(c,u,h)=>{this.handleNetworkError(u,h,!0,void 0,c)}};i.load(e,a,l)}handleMasterPlaylist(e,t,s,i){const n=this.hls,o=e.data,a=ti(e,s),l=st.parseMasterPlaylist(o,a);if(l.playlistParsingError){this.handleManifestParsingError(e,s,l.playlistParsingError,i,t);return}const{contentSteering:c,levels:u,sessionData:h,sessionKeys:d,startTimeOffset:g,variableList:f}=l;this.variableList=f;const{AUDIO:m=[],SUBTITLES:p,"CLOSED-CAPTIONS":E}=st.parseMasterPlaylistMedia(o,a,l);m.length&&!m.some(T=>!T.url)&&u[0].audioCodec&&!u[0].attrs.AUDIO&&(this.hls.logger.log("[playlist-loader]: audio codec signaled in quality level, but no embedded audio track signaled, create one"),m.unshift({type:"main",name:"main",groupId:"main",default:!1,autoselect:!1,forced:!1,id:-1,attrs:new me({}),bitrate:0,url:""})),n.trigger(y.MANIFEST_LOADED,{levels:u,audioTracks:m,subtitles:p,captions:E,contentSteering:c,url:a,stats:t,networkDetails:i,sessionData:h,sessionKeys:d,startTimeOffset:g,variableList:f})}handleTrackOrLevelPlaylist(e,t,s,i,n){const o=this.hls,{id:a,level:l,type:c}=s,u=ti(e,s),h=V(l)?l:V(a)?a:0,d=Kr(s),g=st.parseLevelPlaylist(e.data,u,h,d,0,this.variableList);if(c===re.MANIFEST){const f={attrs:new me({}),bitrate:0,details:g,name:"",url:u};o.trigger(y.MANIFEST_LOADED,{levels:[f],audioTracks:[],url:u,stats:t,networkDetails:i,sessionData:null,sessionKeys:null,contentSteering:null,startTimeOffset:null,variableList:null})}t.parsing.end=performance.now(),s.levelDetails=g,this.handlePlaylistLoaded(g,e,t,s,i,n)}handleManifestParsingError(e,t,s,i,n){this.hls.trigger(y.ERROR,{type:Y.NETWORK_ERROR,details:D.MANIFEST_PARSING_ERROR,fatal:t.type===re.MANIFEST,url:e.url,err:s,error:s,reason:s.message,response:e,context:t,networkDetails:i,stats:n})}handleNetworkError(e,t,s=!1,i,n){let o=`A network ${s?"timeout":"error"+(i?" (status "+i.code+")":"")} occurred while loading ${e.type}`;e.type===re.LEVEL?o+=`: ${e.level} id: ${e.id}`:(e.type===re.AUDIO_TRACK||e.type===re.SUBTITLE_TRACK)&&(o+=` id: ${e.id} group-id: "${e.groupId}"`);const a=new Error(o);this.hls.logger.warn(`[playlist-loader]: ${o}`);let l=D.UNKNOWN,c=!1;const u=this.getInternalLoader(e);switch(e.type){case re.MANIFEST:l=s?D.MANIFEST_LOAD_TIMEOUT:D.MANIFEST_LOAD_ERROR,c=!0;break;case re.LEVEL:l=s?D.LEVEL_LOAD_TIMEOUT:D.LEVEL_LOAD_ERROR,c=!1;break;case re.AUDIO_TRACK:l=s?D.AUDIO_TRACK_LOAD_TIMEOUT:D.AUDIO_TRACK_LOAD_ERROR,c=!1;break;case re.SUBTITLE_TRACK:l=s?D.SUBTITLE_TRACK_LOAD_TIMEOUT:D.SUBTITLE_LOAD_ERROR,c=!1;break}u&&this.resetInternalLoader(e.type);const h={type:Y.NETWORK_ERROR,details:l,fatal:c,url:e.url,loader:u,context:e,error:a,networkDetails:t,stats:n};if(i){const d=(t==null?void 0:t.url)||e.url;h.response=ve({url:d,data:void 0},i)}this.hls.trigger(y.ERROR,h)}handlePlaylistLoaded(e,t,s,i,n,o){const a=this.hls,{type:l,level:c,id:u,groupId:h,deliveryDirectives:d}=i,g=ti(t,i),f=Kr(i),m=typeof i.level=="number"&&f===H.MAIN?c:void 0;if(!e.fragments.length){const E=new Error("No Segments found in Playlist");a.trigger(y.ERROR,{type:Y.NETWORK_ERROR,details:D.LEVEL_EMPTY_ERROR,fatal:!1,url:g,error:E,reason:E.message,response:t,context:i,level:m,parent:f,networkDetails:n,stats:s});return}e.targetduration||(e.playlistParsingError=new Error("Missing Target Duration"));const p=e.playlistParsingError;if(p){a.trigger(y.ERROR,{type:Y.NETWORK_ERROR,details:D.LEVEL_PARSING_ERROR,fatal:!1,url:g,error:p,reason:p.message,response:t,context:i,level:m,parent:f,networkDetails:n,stats:s});return}switch(e.live&&o&&(o.getCacheAge&&(e.ageHeader=o.getCacheAge()||0),(!o.getCacheAge||isNaN(e.ageHeader))&&(e.ageHeader=0)),l){case re.MANIFEST:case re.LEVEL:a.trigger(y.LEVEL_LOADED,{details:e,level:m||0,id:u||0,stats:s,networkDetails:n,deliveryDirectives:d});break;case re.AUDIO_TRACK:a.trigger(y.AUDIO_TRACK_LOADED,{details:e,id:u||0,groupId:h||"",stats:s,networkDetails:n,deliveryDirectives:d});break;case re.SUBTITLE_TRACK:a.trigger(y.SUBTITLE_TRACK_LOADED,{details:e,id:u||0,groupId:h||"",stats:s,networkDetails:n,deliveryDirectives:d});break}}}function po(r,e){let t;try{t=new Event("addtrack")}catch{t=document.createEvent("Event"),t.initEvent("addtrack",!1,!1)}t.track=r,e.dispatchEvent(t)}function yo(r,e){const t=r.mode;if(t==="disabled"&&(r.mode="hidden"),r.cues&&!r.cues.getCueById(e.id))try{if(r.addCue(e),!r.cues.getCueById(e.id))throw new Error(`addCue is failed for: ${e}`)}catch(s){te.debug(`[texttrack-utils]: ${s}`);try{const i=new self.TextTrackCue(e.startTime,e.endTime,e.text);i.id=e.id,r.addCue(i)}catch(i){te.debug(`[texttrack-utils]: Legacy TextTrackCue fallback failed: ${i}`)}}t==="disabled"&&(r.mode=t)}function Ft(r){const e=r.mode;if(e==="disabled"&&(r.mode="hidden"),r.cues)for(let t=r.cues.length;t--;)r.removeCue(r.cues[t]);e==="disabled"&&(r.mode=e)}function _i(r,e,t,s){const i=r.mode;if(i==="disabled"&&(r.mode="hidden"),r.cues&&r.cues.length>0){const n=Wl(r.cues,e,t);for(let o=0;o<n.length;o++)(!s||s(n[o]))&&r.removeCue(n[o])}i==="disabled"&&(r.mode=i)}function Hl(r,e){if(e<r[0].startTime)return 0;const t=r.length-1;if(e>r[t].endTime)return-1;let s=0,i=t;for(;s<=i;){const n=Math.floor((i+s)/2);if(e<r[n].startTime)i=n-1;else if(e>r[n].startTime&&s<t)s=n+1;else return n}return r[s].startTime-e<e-r[i].startTime?s:i}function Wl(r,e,t){const s=[],i=Hl(r,e);if(i>-1)for(let n=i,o=r.length;n<o;n++){const a=r[n];if(a.startTime>=e&&a.endTime<=t)s.push(a);else if(a.startTime>t)return s}return s}function xs(r){const e=[];for(let t=0;t<r.length;t++){const s=r[t];(s.kind==="subtitles"||s.kind==="captions")&&s.label&&e.push(r[t])}return e}var He={audioId3:"org.id3",dateRange:"com.apple.quicktime.HLS",emsg:"https://aomedia.org/emsg/ID3"};function Yl(r){if(r.size<2)return;const e=Oe(r.data,!0),t=new Uint8Array(r.data.subarray(e.length+1));return{key:r.type,info:e,data:t.buffer}}function ql(r){if(r.size<2)return;if(r.type==="TXXX"){let t=1;const s=Oe(r.data.subarray(t),!0);t+=s.length+1;const i=Oe(r.data.subarray(t));return{key:r.type,info:s,data:i}}const e=Oe(r.data.subarray(1));return{key:r.type,info:"",data:e}}function jl(r){if(r.type==="WXXX"){if(r.size<2)return;let t=1;const s=Oe(r.data.subarray(t),!0);t+=s.length+1;const i=Oe(r.data.subarray(t));return{key:r.type,info:s,data:i}}const e=Oe(r.data);return{key:r.type,info:"",data:e}}function si(r,e=0,t=1/0){return zl(r,e,t,Uint8Array)}function zl(r,e,t,s){const i=Xl(r);let n=1;"BYTES_PER_ELEMENT"in s&&(n=s.BYTES_PER_ELEMENT);const o=Ql(r)?r.byteOffset:0,a=(o+r.byteLength)/n,l=(o+e)/n,c=Math.floor(Math.max(0,Math.min(l,a))),u=Math.floor(Math.min(c+Math.max(t,0),a));return new s(i,c,u-c)}function Xl(r){return r instanceof ArrayBuffer?r:r.buffer}function Ql(r){return r&&r.buffer instanceof ArrayBuffer&&r.byteLength!==void 0&&r.byteOffset!==void 0}function Zl(r){return r instanceof ArrayBuffer?r:r.byteOffset==0&&r.byteLength==r.buffer.byteLength?r.buffer:new Uint8Array(r).buffer}function Jl(r){return btoa(String.fromCharCode(...r))}function Eo(r,e){if(r<0)return-Eo(-r,e);const t=Math.pow(10,e);if(Math.abs(r*t%1-.5)<Number.EPSILON){const i=Math.floor(r*t);return(i%2===0?i:i+1)/t}else return Math.round(r*t)/t}function ec(r,e){const t=new URL(r),s=new URL(e);if(t.origin!==s.origin)return r;const i=t.pathname.split("/").slice(1),n=s.pathname.split("/").slice(1,-1);for(;i[0]===n[0];)i.shift(),n.shift();for(;n.length;)n.shift(),i.unshift("..");return i.join("/")}function tc(){try{return crypto.randomUUID()}catch{try{const e=URL.createObjectURL(new Blob),t=e.toString();return URL.revokeObjectURL(e),t.slice(t.lastIndexOf("/")+1)}catch{let t=new Date().getTime();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,i=>{const n=(t+Math.random()*16)%16|0;return t=Math.floor(t/16),(i=="x"?n:n&3|8).toString(16)})}}}function sc(r){const e={key:r.type,description:"",data:"",mimeType:null,pictureType:null},t=3;if(r.size<2)return;if(r.data[0]!==t){console.log("Ignore frame with unrecognized character encoding");return}const s=r.data.subarray(1).indexOf(0);if(s===-1)return;const i=Oe(si(r.data,1,s)),n=r.data[2+s],o=r.data.subarray(3+s).indexOf(0);if(o===-1)return;const a=Oe(si(r.data,3+s,o));let l;return i==="-->"?l=Oe(si(r.data,4+s+o)):l=Zl(r.data.subarray(4+s+o)),e.mimeType=i,e.pictureType=n,e.description=a,e.data=l,e}function ic(r){return r.type==="PRIV"?Yl(r):r.type[0]==="W"?jl(r):r.type==="APIC"?sc(r):ql(r)}function Hs(r,e){let t=0;return t=(r[e]&127)<<21,t|=(r[e+1]&127)<<14,t|=(r[e+2]&127)<<7,t|=r[e+3]&127,t}function rc(r){const e=String.fromCharCode(r[0],r[1],r[2],r[3]),t=Hs(r,4),s=10;return{type:e,size:t,data:r.subarray(s,s+t)}}function To(r,e){return e+10<=r.length&&r[e]===51&&r[e+1]===68&&r[e+2]===73&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128}function Qi(r,e){return e+10<=r.length&&r[e]===73&&r[e+1]===68&&r[e+2]===51&&r[e+3]<255&&r[e+4]<255&&r[e+6]<128&&r[e+7]<128&&r[e+8]<128&&r[e+9]<128}const us=10,nc=10;function xo(r){let e=0;const t=[];for(;Qi(r,e);){const s=Hs(r,e+6);r[e+5]>>6&1&&(e+=us),e+=us;const i=e+s;for(;e+nc<i;){const n=rc(r.subarray(e)),o=ic(n);o&&t.push(o),e+=n.size+us}To(r,e)&&(e+=us)}return t}function So(r){return r&&r.key==="PRIV"&&r.info==="com.apple.streaming.transportStreamTimestamp"}const oc=.25;function Ri(){if(!(typeof self>"u"))return self.VTTCue||self.TextTrackCue}function Hr(r,e,t,s,i){let n=new r(e,t,"");try{n.value=s,i&&(n.type=i)}catch{n=new r(e,t,JSON.stringify(i?ve({type:i},s):s))}return n}const hs=(()=>{const r=Ri();try{r&&new r(0,Number.POSITIVE_INFINITY,"")}catch{return Number.MAX_VALUE}return Number.POSITIVE_INFINITY})();function ac(r){return Uint8Array.from(r.replace(/^0x/,"").replace(/([\da-fA-F]{2}) ?/g,"0x$1 ").replace(/ +$/,"").split(" ")).buffer}class lc{constructor(e){this.hls=void 0,this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=e,this._registerListeners()}destroy(){this._unregisterListeners(),this.id3Track=null,this.media=null,this.dateRangeCuesAppended={},this.hls=null}_registerListeners(){const{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}_unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_PARSING_METADATA,this.onFragParsingMetadata,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.LEVEL_PTS_UPDATED,this.onLevelPtsUpdated,this)}onMediaAttached(e,t){this.media=t.media}onMediaDetaching(){this.id3Track&&(Ft(this.id3Track),this.id3Track=null),this.media=null,this.dateRangeCuesAppended={}}onManifestLoading(){this.dateRangeCuesAppended={}}createTrack(e){const t=this.getID3Track(e.textTracks);return t.mode="hidden",t}getID3Track(e){if(this.media){for(let t=0;t<e.length;t++){const s=e[t];if(s.kind==="metadata"&&s.label==="id3")return po(s,this.media),s}return this.media.addTextTrack("metadata","id3")}}onFragParsingMetadata(e,t){if(!this.media)return;const{hls:{config:{enableEmsgMetadataCues:s,enableID3MetadataCues:i}}}=this;if(!s&&!i)return;const{samples:n}=t;this.id3Track||(this.id3Track=this.createTrack(this.media));const o=Ri();if(o)for(let a=0;a<n.length;a++){const l=n[a].type;if(l===He.emsg&&!s||!i)continue;const c=xo(n[a].data);if(c){const u=n[a].pts;let h=u+n[a].duration;h>hs&&(h=hs),h-u<=0&&(h=u+oc);for(let g=0;g<c.length;g++){const f=c[g];if(!So(f)){this.updateId3CueEnds(u,l);const m=Hr(o,u,h,f,l);m&&this.id3Track.addCue(m)}}}}}updateId3CueEnds(e,t){var s;const i=(s=this.id3Track)==null?void 0:s.cues;if(i)for(let n=i.length;n--;){const o=i[n];o.type===t&&o.startTime<e&&o.endTime===hs&&(o.endTime=e)}}onBufferFlushing(e,{startOffset:t,endOffset:s,type:i}){const{id3Track:n,hls:o}=this;if(!o)return;const{config:{enableEmsgMetadataCues:a,enableID3MetadataCues:l}}=o;if(n&&(a||l)){let c;i==="audio"?c=u=>u.type===He.audioId3&&l:i==="video"?c=u=>u.type===He.emsg&&a:c=u=>u.type===He.audioId3&&l||u.type===He.emsg&&a,_i(n,t,s,c)}}onLevelUpdated(e,{details:t}){this.updateDateRangeCues(t,!0)}onLevelPtsUpdated(e,t){Math.abs(t.drift)>.01&&this.updateDateRangeCues(t.details)}updateDateRangeCues(e,t){if(!this.media||!e.hasProgramDateTime||!this.hls.config.enableDateRangeMetadataCues)return;const{dateRangeCuesAppended:s,id3Track:i}=this,{dateRanges:n}=e,o=Object.keys(n);if(i&&t){const c=Object.keys(s).filter(u=>!o.includes(u));for(let u=c.length;u--;){const h=c[u];Object.keys(s[h].cues).forEach(d=>{i.removeCue(s[h].cues[d])}),delete s[h]}}const a=e.fragments[e.fragments.length-1];if(o.length===0||!V(a==null?void 0:a.programDateTime))return;this.id3Track||(this.id3Track=this.createTrack(this.media));const l=Ri();for(let c=0;c<o.length;c++){const u=o[c],h=n[u],d=h.startTime,g=s[u],f=(g==null?void 0:g.cues)||{};let m=(g==null?void 0:g.durationKnown)||!1,p=hs;const{duration:E,endDate:x}=h;if(x&&E!==null)p=d+E,m=!0;else if(h.endOnNext&&!m){const _=o.reduce((A,C)=>{if(C!==h.id){const L=n[C];if(L.class===h.class&&L.startDate>h.startDate&&(!A||h.startDate<A.startDate))return L}return A},null);_&&(p=_.startTime,m=!0)}const T=Object.keys(h.attr);for(let _=0;_<T.length;_++){const A=T[_];if(!nl(A))continue;const C=f[A];if(C)m&&!g.durationKnown?C.endTime=p:Math.abs(C.startTime-d)>.01&&(C.startTime=d,C.endTime=p);else if(l){let L=h.attr[A];ol(A)&&(L=ac(L));const v=Hr(l,d,p,{key:A,data:L},He.dateRange);v&&(v.id=u,this.id3Track.addCue(v),f[A]=v)}}s[u]={cues:f,dateRange:h,durationKnown:m}}}}class cc{constructor(e){this.hls=void 0,this.config=void 0,this.media=null,this.levelDetails=null,this.currentTime=0,this.stallCount=0,this._latency=null,this._targetLatencyUpdated=!1,this.onTimeupdate=()=>{const{media:t,levelDetails:s}=this;if(!t||!s)return;this.currentTime=t.currentTime;const i=this.computeLatency();if(i===null)return;this._latency=i;const{lowLatencyMode:n,maxLiveSyncPlaybackRate:o}=this.config;if(!n||o===1||!s.live)return;const a=this.targetLatency;if(a===null)return;const l=i-a,c=Math.min(this.maxLatency,a+s.targetduration);if(l<c&&l>.05&&this.forwardBufferLength>1){const h=Math.min(2,Math.max(1,o)),d=Math.round(2/(1+Math.exp(-.75*l-this.edgeStalled))*20)/20;t.playbackRate=Math.min(h,Math.max(1,d))}else t.playbackRate!==1&&t.playbackRate!==0&&(t.playbackRate=1)},this.hls=e,this.config=e.config,this.registerListeners()}get latency(){return this._latency||0}get maxLatency(){const{config:e,levelDetails:t}=this;return e.liveMaxLatencyDuration!==void 0?e.liveMaxLatencyDuration:t?e.liveMaxLatencyDurationCount*t.targetduration:0}get targetLatency(){const{levelDetails:e}=this;if(e===null)return null;const{holdBack:t,partHoldBack:s,targetduration:i}=e,{liveSyncDuration:n,liveSyncDurationCount:o,lowLatencyMode:a}=this.config,l=this.hls.userConfig;let c=a&&s||t;(this._targetLatencyUpdated||l.liveSyncDuration||l.liveSyncDurationCount||c===0)&&(c=n!==void 0?n:o*i);const u=i;return c+Math.min(this.stallCount*this.config.liveSyncOnStallIncrease,u)}set targetLatency(e){this.stallCount=0,this.config.liveSyncDuration=e,this._targetLatencyUpdated=!0}get liveSyncPosition(){const e=this.estimateLiveEdge(),t=this.targetLatency,s=this.levelDetails;if(e===null||t===null||s===null)return null;const i=s.edge,n=e-t-this.edgeStalled,o=i-s.totalduration,a=i-(this.config.lowLatencyMode&&s.partTarget||s.targetduration);return Math.min(Math.max(o,n),a)}get drift(){const{levelDetails:e}=this;return e===null?1:e.drift}get edgeStalled(){const{levelDetails:e}=this;if(e===null)return 0;const t=(this.config.lowLatencyMode&&e.partTarget||e.targetduration)*3;return Math.max(e.age-t,0)}get forwardBufferLength(){const{media:e,levelDetails:t}=this;if(!e||!t)return 0;const s=e.buffered.length;return(s?e.buffered.end(s-1):t.edge)-this.currentTime}destroy(){this.unregisterListeners(),this.onMediaDetaching(),this.levelDetails=null,this.hls=null}registerListeners(){this.hls.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.on(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.on(y.ERROR,this.onError,this)}unregisterListeners(){this.hls.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),this.hls.off(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),this.hls.off(y.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("timeupdate",this.onTimeupdate)}onMediaDetaching(){this.media&&(this.media.removeEventListener("timeupdate",this.onTimeupdate),this.media=null)}onManifestLoading(){this.levelDetails=null,this._latency=null,this.stallCount=0}onLevelUpdated(e,{details:t}){this.levelDetails=t,t.advanced&&this.onTimeupdate(),!t.live&&this.media&&this.media.removeEventListener("timeupdate",this.onTimeupdate)}onError(e,t){var s;t.details===D.BUFFER_STALLED_ERROR&&(this.stallCount++,(s=this.levelDetails)!=null&&s.live&&this.hls.logger.warn("[latency-controller]: Stall detected, adjusting target latency"))}estimateLiveEdge(){const{levelDetails:e}=this;return e===null?null:e.edge+e.age}computeLatency(){const e=this.estimateLiveEdge();return e===null?null:e-this.currentTime}}const Ii=["NONE","TYPE-0","TYPE-1",null];function uc(r){return Ii.indexOf(r)>-1}const Ms=["SDR","PQ","HLG"];function hc(r){return!!r&&Ms.indexOf(r)>-1}var Ss={No:"",Yes:"YES",v2:"v2"};function Wr(r){const{canSkipUntil:e,canSkipDateRanges:t,age:s}=r,i=s<e/2;return e&&i?t?Ss.v2:Ss.Yes:Ss.No}class Yr{constructor(e,t,s){this.msn=void 0,this.part=void 0,this.skip=void 0,this.msn=e,this.part=t,this.skip=s}addDirectives(e){const t=new self.URL(e);return this.msn!==void 0&&t.searchParams.set("_HLS_msn",this.msn.toString()),this.part!==void 0&&t.searchParams.set("_HLS_part",this.part.toString()),this.skip&&t.searchParams.set("_HLS_skip",this.skip),t.href}}class Gt{constructor(e){this._attrs=void 0,this.audioCodec=void 0,this.bitrate=void 0,this.codecSet=void 0,this.url=void 0,this.frameRate=void 0,this.height=void 0,this.id=void 0,this.name=void 0,this.videoCodec=void 0,this.width=void 0,this.details=void 0,this.fragmentError=0,this.loadError=0,this.loaded=void 0,this.realBitrate=0,this.supportedPromise=void 0,this.supportedResult=void 0,this._avgBitrate=0,this._audioGroups=void 0,this._subtitleGroups=void 0,this._urlId=0,this.url=[e.url],this._attrs=[e.attrs],this.bitrate=e.bitrate,e.details&&(this.details=e.details),this.id=e.id||0,this.name=e.name,this.width=e.width||0,this.height=e.height||0,this.frameRate=e.attrs.optionalFloat("FRAME-RATE",0),this._avgBitrate=e.attrs.decimalInteger("AVERAGE-BANDWIDTH"),this.audioCodec=e.audioCodec,this.videoCodec=e.videoCodec,this.codecSet=[e.videoCodec,e.audioCodec].filter(t=>!!t).map(t=>t.substring(0,4)).join(","),this.addGroupId("audio",e.attrs.AUDIO),this.addGroupId("text",e.attrs.SUBTITLES)}get maxBitrate(){return Math.max(this.realBitrate,this.bitrate)}get averageBitrate(){return this._avgBitrate||this.realBitrate||this.bitrate}get attrs(){return this._attrs[0]}get codecs(){return this.attrs.CODECS||""}get pathwayId(){return this.attrs["PATHWAY-ID"]||"."}get videoRange(){return this.attrs["VIDEO-RANGE"]||"SDR"}get score(){return this.attrs.optionalFloat("SCORE",0)}get uri(){return this.url[0]||""}hasAudioGroup(e){return qr(this._audioGroups,e)}hasSubtitleGroup(e){return qr(this._subtitleGroups,e)}get audioGroups(){return this._audioGroups}get subtitleGroups(){return this._subtitleGroups}addGroupId(e,t){if(t){if(e==="audio"){let s=this._audioGroups;s||(s=this._audioGroups=[]),s.indexOf(t)===-1&&s.push(t)}else if(e==="text"){let s=this._subtitleGroups;s||(s=this._subtitleGroups=[]),s.indexOf(t)===-1&&s.push(t)}}}get urlId(){return 0}set urlId(e){}get audioGroupIds(){return this.audioGroups?[this.audioGroupId]:void 0}get textGroupIds(){return this.subtitleGroups?[this.textGroupId]:void 0}get audioGroupId(){var e;return(e=this.audioGroups)==null?void 0:e[0]}get textGroupId(){var e;return(e=this.subtitleGroups)==null?void 0:e[0]}addFallback(){}}function qr(r,e){return!e||!r?!1:r.indexOf(e)!==-1}function ii(r,e){const t=e.startPTS;if(V(t)){let s=0,i;e.sn>r.sn?(s=t-r.start,i=r):(s=r.start-t,i=e),i.duration!==s&&(i.duration=s)}else e.sn>r.sn?r.cc===e.cc&&r.minEndPTS?e.start=r.start+(r.minEndPTS-r.start):e.start=r.start+r.duration:e.start=Math.max(r.start-e.duration,0)}function vo(r,e,t,s,i,n){s-t<=0&&(te.warn("Fragment should have a positive duration",e),s=t+e.duration,n=i+e.duration);let a=t,l=s;const c=e.startPTS,u=e.endPTS;if(V(c)){const p=Math.abs(c-t);V(e.deltaPTS)?e.deltaPTS=Math.max(p,e.deltaPTS):e.deltaPTS=p,a=Math.max(t,c),t=Math.min(t,c),i=Math.min(i,e.startDTS),l=Math.min(s,u),s=Math.max(s,u),n=Math.max(n,e.endDTS)}const h=t-e.start;e.start!==0&&(e.start=t),e.duration=s-e.start,e.startPTS=t,e.maxStartPTS=a,e.startDTS=i,e.endPTS=s,e.minEndPTS=l,e.endDTS=n;const d=e.sn;if(!r||d<r.startSN||d>r.endSN)return 0;let g;const f=d-r.startSN,m=r.fragments;for(m[f]=e,g=f;g>0;g--)ii(m[g],m[g-1]);for(g=f;g<m.length-1;g++)ii(m[g],m[g+1]);return r.fragmentHint&&ii(m[m.length-1],r.fragmentHint),r.PTSKnown=r.alignedSliding=!0,h}function dc(r,e){let t=null;const s=r.fragments;for(let c=s.length-1;c>=0;c--){const u=s[c].initSegment;if(u){t=u;break}}r.fragmentHint&&delete r.fragmentHint.endPTS;let i=0,n;mc(r,e,(c,u)=>{c.relurl&&(i=c.cc-u.cc),V(c.startPTS)&&V(c.endPTS)&&(u.start=u.startPTS=c.startPTS,u.startDTS=c.startDTS,u.maxStartPTS=c.maxStartPTS,u.endPTS=c.endPTS,u.endDTS=c.endDTS,u.minEndPTS=c.minEndPTS,u.duration=c.endPTS-c.startPTS,u.duration&&(n=u),e.PTSKnown=e.alignedSliding=!0),u.elementaryStreams=c.elementaryStreams,u.loader=c.loader,u.stats=c.stats,c.initSegment&&(u.initSegment=c.initSegment,t=c.initSegment)});const o=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments;if(t&&o.forEach(c=>{var u;c&&(!c.initSegment||c.initSegment.relurl===((u=t)==null?void 0:u.relurl))&&(c.initSegment=t)}),e.skippedSegments)if(e.deltaUpdateFailed=e.fragments.some(c=>!c),e.deltaUpdateFailed){te.warn("[level-helper] Previous playlist missing segments skipped in delta playlist");for(let c=e.skippedSegments;c--;)e.fragments.shift();e.startSN=e.fragments[0].sn,e.startCC=e.fragments[0].cc}else{e.canSkipDateRanges&&(e.dateRanges=fc(r.dateRanges,e));const c=r.fragments.filter(u=>u.rawProgramDateTime);if(r.hasProgramDateTime&&!e.hasProgramDateTime)for(let u=1;u<o.length;u++)o[u].programDateTime===null&&bi(o[u],o[u-1],c);mo(c,e)}const a=e.fragments;if(i){te.warn("discontinuity sliding from playlist, take drift into account");for(let c=0;c<a.length;c++)a[c].cc+=i}e.skippedSegments&&(e.startCC=e.fragments[0].cc),gc(r.partList,e.partList,(c,u)=>{u.elementaryStreams=c.elementaryStreams,u.stats=c.stats}),n?vo(e,n,n.startPTS,n.endPTS,n.startDTS,n.endDTS):Lo(r,e),a.length&&(e.totalduration=e.edge-a[0].start),e.driftStartTime=r.driftStartTime,e.driftStart=r.driftStart;const l=e.advancedDateTime;if(e.advanced&&l){const c=e.edge;e.driftStart||(e.driftStartTime=l,e.driftStart=c),e.driftEndTime=l,e.driftEnd=c}else e.driftEndTime=r.driftEndTime,e.driftEnd=r.driftEnd,e.advancedDateTime=r.advancedDateTime}function fc(r,e){const{dateRanges:t,recentlyRemovedDateranges:s}=e,i=pe({},r);s&&s.forEach(a=>{delete i[a]});const o=Object.keys(i).length;return o&&Object.keys(t).forEach(a=>{const l=i[a],c=new io(t[a].attr,l);c.isValid?(i[a]=c,l||(c.tagOrder+=o)):te.warn(`Ignoring invalid Playlist Delta Update DATERANGE tag: "${JSON.stringify(t[a].attr)}"`)}),i}function gc(r,e,t){if(r&&e){let s=0;for(let i=0,n=r.length;i<=n;i++){const o=r[i],a=e[i+s];o&&a&&o.index===a.index&&o.fragment.sn===a.fragment.sn?t(o,a):s--}}}function mc(r,e,t){const s=e.skippedSegments,i=Math.max(r.startSN,e.startSN)-e.startSN,n=(r.fragmentHint?1:0)+(s?e.endSN:Math.min(r.endSN,e.endSN))-e.startSN,o=e.startSN-r.startSN,a=e.fragmentHint?e.fragments.concat(e.fragmentHint):e.fragments,l=r.fragmentHint?r.fragments.concat(r.fragmentHint):r.fragments;for(let c=i;c<=n;c++){const u=l[o+c];let h=a[c];s&&!h&&u&&(h=e.fragments[c]=u),u&&h&&t(u,h)}}function Lo(r,e){const t=e.startSN+e.skippedSegments-r.startSN,s=r.fragments;t<0||t>=s.length||Di(e,s[t].start)}function Di(r,e){if(e){const t=r.fragments;for(let s=r.skippedSegments;s<t.length;s++)t[s].start+=e;r.fragmentHint&&(r.fragmentHint.start+=e)}}function pc(r,e=1/0){let t=1e3*r.targetduration;if(r.updated){const s=r.fragments;if(s.length&&t*4>e){const n=s[s.length-1].duration*1e3;n<t&&(t=n)}}else t/=2;return Math.round(t)}function yc(r,e,t){if(!r)return null;let s=r.fragments[e-r.startSN];return s||(s=r.fragmentHint,s&&s.sn===e)?s:e<r.startSN&&t&&t.sn===e?t:null}function jr(r,e,t){return r?Ao(r.partList,e,t):null}function Ao(r,e,t){if(r)for(let s=r.length;s--;){const i=r[s];if(i.index===t&&i.fragment.sn===e)return i}return null}function bo(r){r.forEach((e,t)=>{const{details:s}=e;s!=null&&s.fragments&&s.fragments.forEach(i=>{i.level=t})})}function Ns(r){switch(r.details){case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_TIMEOUT:case D.LEVEL_LOAD_TIMEOUT:case D.MANIFEST_LOAD_TIMEOUT:return!0}return!1}function zr(r,e){const t=Ns(e);return r.default[`${t?"timeout":"error"}Retry`]}function Zi(r,e){const t=r.backoff==="linear"?1:Math.pow(2,e);return Math.min(t*r.retryDelayMs,r.maxRetryDelayMs)}function Xr(r){return ve(ve({},r),{errorRetry:null,timeoutRetry:null})}function Bs(r,e,t,s){if(!r)return!1;const i=s==null?void 0:s.code,n=e<r.maxNumRetry&&(Ec(i)||!!t);return r.shouldRetry?r.shouldRetry(r,e,t,s,n):n}function Ec(r){return r===0&&navigator.onLine===!1||!!r&&(r<400||r>499)}const Ji={search:function(r,e){let t=0,s=r.length-1,i=null,n=null;for(;t<=s;){i=(t+s)/2|0,n=r[i];const o=e(n);if(o>0)t=i+1;else if(o<0)s=i-1;else return n}return null}};function Tc(r,e,t){if(e===null||!Array.isArray(r)||!r.length||!V(e))return null;const s=r[0].programDateTime;if(e<(s||0))return null;const i=r[r.length-1].endProgramDateTime;if(e>=(i||0))return null;t=t||0;for(let n=0;n<r.length;++n){const o=r[n];if(Sc(e,t,o))return o}return null}function es(r,e,t=0,s=0,i=.005){let n=null;if(r){n=e[1+r.sn-e[0].sn]||null;const a=r.endDTS-t;a>0&&a<15e-7&&(t+=15e-7),n&&r.level!==n.level&&n.end<=r.end&&(n=e[2+r.sn-e[0].sn]||null)}else t===0&&e[0].start===0&&(n=e[0]);if(n&&((!r||r.level===n.level)&&Qr(t,s,n)===0||xc(n,r,Math.min(i,s))))return n;const o=Ji.search(e,Qr.bind(null,t,s));return o&&(o!==r||!n)?o:n}function xc(r,e,t){if(e&&e.start===0&&e.level<r.level&&(e.endPTS||0)>0){const s=e.tagList.reduce((i,n)=>(n[0]==="INF"&&(i+=parseFloat(n[1])),i),t);return r.start<=s}return!1}function Qr(r=0,e=0,t){if(t.start<=r&&t.start+t.duration>r)return 0;const s=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0));return t.start+t.duration-s<=r?1:t.start-s>r&&t.start?-1:0}function Sc(r,e,t){const s=Math.min(e,t.duration+(t.deltaPTS?t.deltaPTS:0))*1e3;return(t.endProgramDateTime||0)-s>r}function _o(r,e){return Ji.search(r,t=>t.cc<e?1:t.cc>e?-1:0)}function vc(r,e,t){if(r&&r.startCC<=e&&r.endCC>=e){const s=t.start,i=t.end;return Ji.search(r.fragments,n=>n.cc<e||n.end<=s?1:n.cc>e||n.start>=i?-1:0)}return null}var Ie={DoNothing:0,SendEndCallback:1,SendAlternateToPenaltyBox:2,RemoveAlternatePermanently:3,InsertDiscontinuity:4,RetryRequest:5},ze={None:0,MoveAllAlternatesMatchingHost:1,MoveAllAlternatesMatchingHDCP:2,SwitchToSDR:4};class Lc extends yt{constructor(e){super("error-controller",e.logger),this.hls=void 0,this.playlistError=0,this.penalizedRenditions={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(y.ERROR,this.onError,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this)}unregisterListeners(){const e=this.hls;e&&(e.off(y.ERROR,this.onError,this),e.off(y.ERROR,this.onErrorOut,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this))}destroy(){this.unregisterListeners(),this.hls=null,this.penalizedRenditions={}}startLoad(e){}stopLoad(){this.playlistError=0}getVariantLevelIndex(e){return(e==null?void 0:e.type)===H.MAIN?e.level:this.hls.loadLevel}onManifestLoading(){this.playlistError=0,this.penalizedRenditions={}}onLevelUpdated(){this.playlistError=0}onError(e,t){var s;if(t.fatal)return;const i=this.hls,n=t.context;switch(t.details){case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:t.errorAction=this.getFragRetryOrSwitchAction(t);return;case D.FRAG_PARSING_ERROR:if((s=t.frag)!=null&&s.gap){t.errorAction=Zr();return}case D.FRAG_GAP:case D.FRAG_DECRYPT_ERROR:{t.errorAction=this.getFragRetryOrSwitchAction(t),t.errorAction.action=Ie.SendAlternateToPenaltyBox;return}case D.LEVEL_EMPTY_ERROR:case D.LEVEL_PARSING_ERROR:{var o,a;const c=t.parent===H.MAIN?t.level:i.loadLevel;t.details===D.LEVEL_EMPTY_ERROR&&((o=t.context)!=null&&(a=o.levelDetails)!=null&&a.live)?t.errorAction=this.getPlaylistRetryOrSwitchAction(t,c):(t.levelRetry=!1,t.errorAction=this.getLevelSwitchAction(t,c))}return;case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:typeof(n==null?void 0:n.level)=="number"&&(t.errorAction=this.getPlaylistRetryOrSwitchAction(t,n.level));return;case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.SUBTITLE_LOAD_ERROR:case D.SUBTITLE_TRACK_LOAD_TIMEOUT:if(n){const c=i.levels[i.loadLevel];if(c&&(n.type===re.AUDIO_TRACK&&c.hasAudioGroup(n.groupId)||n.type===re.SUBTITLE_TRACK&&c.hasSubtitleGroup(n.groupId))){t.errorAction=this.getPlaylistRetryOrSwitchAction(t,i.loadLevel),t.errorAction.action=Ie.SendAlternateToPenaltyBox,t.errorAction.flags=ze.MoveAllAlternatesMatchingHost;return}}return;case D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED:{const c=i.levels[i.loadLevel],u=c==null?void 0:c.attrs["HDCP-LEVEL"];u?t.errorAction={action:Ie.SendAlternateToPenaltyBox,flags:ze.MoveAllAlternatesMatchingHDCP,hdcpLevel:u}:this.keySystemError(t)}return;case D.BUFFER_ADD_CODEC_ERROR:case D.REMUX_ALLOC_ERROR:case D.BUFFER_APPEND_ERROR:if(!t.errorAction){var l;t.errorAction=this.getLevelSwitchAction(t,(l=t.level)!=null?l:i.loadLevel)}return;case D.INTERNAL_EXCEPTION:case D.BUFFER_APPENDING_ERROR:case D.BUFFER_FULL_ERROR:case D.LEVEL_SWITCH_ERROR:case D.BUFFER_STALLED_ERROR:case D.BUFFER_SEEK_OVER_HOLE:case D.BUFFER_NUDGE_ON_STALL:t.errorAction=Zr();return}t.type===Y.KEY_SYSTEM_ERROR&&this.keySystemError(t)}keySystemError(e){const t=this.getVariantLevelIndex(e.frag);e.levelRetry=!1,e.errorAction=this.getLevelSwitchAction(e,t)}getPlaylistRetryOrSwitchAction(e,t){const s=this.hls,i=zr(s.config.playlistLoadPolicy,e),n=this.playlistError++;if(Bs(i,n,Ns(e),e.response))return{action:Ie.RetryRequest,flags:ze.None,retryConfig:i,retryCount:n};const a=this.getLevelSwitchAction(e,t);return i&&(a.retryConfig=i,a.retryCount=n),a}getFragRetryOrSwitchAction(e){const t=this.hls,s=this.getVariantLevelIndex(e.frag),i=t.levels[s],{fragLoadPolicy:n,keyLoadPolicy:o}=t.config,a=zr(e.details.startsWith("key")?o:n,e),l=t.levels.reduce((u,h)=>u+h.fragmentError,0);if(i&&(e.details!==D.FRAG_GAP&&i.fragmentError++,Bs(a,l,Ns(e),e.response)))return{action:Ie.RetryRequest,flags:ze.None,retryConfig:a,retryCount:l};const c=this.getLevelSwitchAction(e,s);return a&&(c.retryConfig=a,c.retryCount=l),c}getLevelSwitchAction(e,t){const s=this.hls;t==null&&(t=s.loadLevel);const i=this.hls.levels[t];if(i){var n,o;const c=e.details;i.loadError++,c===D.BUFFER_APPEND_ERROR&&i.fragmentError++;let u=-1;const{levels:h,loadLevel:d,minAutoLevel:g,maxAutoLevel:f}=s;s.autoLevelEnabled||(s.loadLevel=-1);const m=(n=e.frag)==null?void 0:n.type,E=(m===H.AUDIO&&c===D.FRAG_PARSING_ERROR||e.sourceBufferName==="audio"&&(c===D.BUFFER_ADD_CODEC_ERROR||c===D.BUFFER_APPEND_ERROR))&&h.some(({audioCodec:C})=>i.audioCodec!==C),T=e.sourceBufferName==="video"&&(c===D.BUFFER_ADD_CODEC_ERROR||c===D.BUFFER_APPEND_ERROR)&&h.some(({codecSet:C,audioCodec:L})=>i.codecSet!==C&&i.audioCodec===L),{type:_,groupId:A}=(o=e.context)!=null?o:{};for(let C=h.length;C--;){const L=(C+d)%h.length;if(L!==d&&L>=g&&L<=f&&h[L].loadError===0){var a,l;const v=h[L];if(c===D.FRAG_GAP&&m===H.MAIN&&e.frag){const I=h[L].details;if(I){const R=es(e.frag,I.fragments,e.frag.start);if(R!=null&&R.gap)continue}}else{if(_===re.AUDIO_TRACK&&v.hasAudioGroup(A)||_===re.SUBTITLE_TRACK&&v.hasSubtitleGroup(A))continue;if(m===H.AUDIO&&(a=i.audioGroups)!=null&&a.some(I=>v.hasAudioGroup(I))||m===H.SUBTITLE&&(l=i.subtitleGroups)!=null&&l.some(I=>v.hasSubtitleGroup(I))||E&&i.audioCodec===v.audioCodec||!E&&i.audioCodec!==v.audioCodec||T&&i.codecSet===v.codecSet)continue}u=L;break}}if(u>-1&&s.loadLevel!==u)return e.levelRetry=!0,this.playlistError=0,{action:Ie.SendAlternateToPenaltyBox,flags:ze.None,nextAutoLevel:u}}return{action:Ie.SendAlternateToPenaltyBox,flags:ze.MoveAllAlternatesMatchingHost}}onErrorOut(e,t){var s;switch((s=t.errorAction)==null?void 0:s.action){case Ie.DoNothing:break;case Ie.SendAlternateToPenaltyBox:this.sendAlternateToPenaltyBox(t),!t.errorAction.resolved&&t.details!==D.FRAG_GAP?t.fatal=!0:/MediaSource readyState: ended/.test(t.error.message)&&(this.warn(`MediaSource ended after "${t.sourceBufferName}" sourceBuffer append error. Attempting to recover from media error.`),this.hls.recoverMediaError());break}if(t.fatal){this.hls.stopLoad();return}}sendAlternateToPenaltyBox(e){const t=this.hls,s=e.errorAction;if(!s)return;const{flags:i,hdcpLevel:n,nextAutoLevel:o}=s;switch(i){case ze.None:this.switchLevel(e,o);break;case ze.MoveAllAlternatesMatchingHDCP:n&&(t.maxHdcpLevel=Ii[Ii.indexOf(n)-1],s.resolved=!0),this.warn(`Restricting playback to HDCP-LEVEL of "${t.maxHdcpLevel}" or lower`);break}s.resolved||this.switchLevel(e,o)}switchLevel(e,t){t!==void 0&&e.errorAction&&(this.warn(`switching to level ${t} after ${e.details}`),this.hls.nextAutoLevel=t,e.errorAction.resolved=!0,this.hls.nextLoadLevel=this.hls.nextAutoLevel)}}function Zr(r){return{action:Ie.DoNothing,flags:ze.None}}class er extends yt{constructor(e,t){super(t,e.logger),this.hls=void 0,this.timer=-1,this.requestScheduled=-1,this.canLoad=!1,this.hls=e}destroy(){this.clearTimer(),this.hls=this.log=this.warn=null}clearTimer(){this.timer!==-1&&(self.clearTimeout(this.timer),this.timer=-1)}startLoad(){this.canLoad=!0,this.requestScheduled=-1,this.loadPlaylist()}stopLoad(){this.canLoad=!1,this.clearTimer()}switchParams(e,t,s){const i=t==null?void 0:t.renditionReports;if(i){let n=-1;for(let o=0;o<i.length;o++){const a=i[o];let l;try{l=new self.URL(a.URI,t.url).href}catch(c){this.warn(`Could not construct new URL for Rendition Report: ${c}`),l=a.URI||""}if(l===e){n=o;break}else l===e.substring(0,l.length)&&(n=o)}if(n!==-1){const o=i[n],a=parseInt(o["LAST-MSN"])||(t==null?void 0:t.lastPartSn);let l=parseInt(o["LAST-PART"])||(t==null?void 0:t.lastPartIndex);if(this.hls.config.lowLatencyMode){const u=Math.min(t.age-t.partTarget,t.targetduration);l>=0&&u>t.partTarget&&(l+=1)}const c=s&&Wr(s);return new Yr(a,l>=0?l:void 0,c)}}}loadPlaylist(e){this.requestScheduled===-1&&(this.requestScheduled=self.performance.now())}shouldLoadPlaylist(e){return this.canLoad&&!!e&&!!e.url&&(!e.details||e.details.live)}shouldReloadPlaylist(e){return this.timer===-1&&this.requestScheduled===-1&&this.shouldLoadPlaylist(e)}playlistLoaded(e,t,s){const{details:i,stats:n}=t,o=self.performance.now(),a=n.loading.first?Math.max(0,o-n.loading.first):0;if(i.advancedDateTime=Date.now()-a,i.live||s!=null&&s.live){if(i.reloaded(s),s&&this.log(`live playlist ${e} ${i.advanced?"REFRESHED "+i.lastPartSn+"-"+i.lastPartIndex:i.updated?"UPDATED":"MISSED"}`),s&&i.fragments.length>0&&dc(s,i),!this.canLoad||!i.live)return;let l,c,u;if(i.canBlockReload&&i.endSN&&i.advanced){const p=this.hls.config.lowLatencyMode,E=i.lastPartSn,x=i.endSN,T=i.lastPartIndex,_=T!==-1,A=E===x,C=p?0:T;_?(c=A?x+1:E,u=A?C:T+1):c=x+1;const L=i.age,v=L+i.ageHeader;let I=Math.min(v-i.partTarget,i.targetduration*1.5);if(I>0){if(v>i.targetduration*3)this.log(`Playlist last advanced ${L.toFixed(2)}s ago. Omitting segment and part directives.`),c=void 0,u=void 0;else if(s!=null&&s.tuneInGoal&&v-i.partTarget>s.tuneInGoal)this.warn(`CDN Tune-in goal increased from: ${s.tuneInGoal} to: ${I} with playlist age: ${i.age}`),I=0;else{const R=Math.floor(I/i.targetduration);if(c+=R,u!==void 0){const k=Math.round(I%i.targetduration/i.partTarget);u+=k}this.log(`CDN Tune-in age: ${i.ageHeader}s last advanced ${L.toFixed(2)}s goal: ${I} skip sn ${R} to part ${u}`)}i.tuneInGoal=I}if(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u),p||!A){this.loadPlaylist(l);return}}else(i.canBlockReload||i.canSkipUntil)&&(l=this.getDeliveryDirectives(i,t.deliveryDirectives,c,u));const h=this.hls.mainForwardBufferInfo,d=h?h.end-h.len:0,g=(i.edge-d)*1e3,f=pc(i,g);i.updated&&o>this.requestScheduled+f&&(this.requestScheduled=n.loading.start),c!==void 0&&i.canBlockReload?this.requestScheduled=n.loading.first+f-(i.partTarget*1e3||1e3):this.requestScheduled===-1||this.requestScheduled+f<o?this.requestScheduled=o:this.requestScheduled-o<=0&&(this.requestScheduled+=f);let m=this.requestScheduled-o;m=Math.max(0,m),this.log(`reload live playlist ${e} in ${Math.round(m)} ms`),this.timer=self.setTimeout(()=>this.loadPlaylist(l),m)}else this.clearTimer()}getDeliveryDirectives(e,t,s,i){let n=Wr(e);return t!=null&&t.skip&&e.deltaUpdateFailed&&(s=t.msn,i=t.part,n=Ss.No),new Yr(s,i,n)}checkRetry(e){const t=e.details,s=Ns(e),i=e.errorAction,{action:n,retryCount:o=0,retryConfig:a}=i||{},l=!!i&&!!a&&(n===Ie.RetryRequest||!i.resolved&&n===Ie.SendAlternateToPenaltyBox);if(l){var c;if(this.requestScheduled=-1,o>=a.maxNumRetry)return!1;if(s&&(c=e.context)!=null&&c.deliveryDirectives)this.warn(`Retrying playlist loading ${o+1}/${a.maxNumRetry} after "${t}" without delivery-directives`),this.loadPlaylist();else{const u=Zi(a,o);this.timer=self.setTimeout(()=>this.loadPlaylist(),u),this.warn(`Retrying playlist loading ${o+1}/${a.maxNumRetry} after "${t}" in ${u}ms`)}e.levelRetry=!0,i.resolved=!0}return l}}class _t{constructor(e,t=0,s=0){this.halfLife=void 0,this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.halfLife=e,this.alpha_=e?Math.exp(Math.log(.5)/e):0,this.estimate_=t,this.totalWeight_=s}sample(e,t){const s=Math.pow(this.alpha_,e);this.estimate_=t*(1-s)+s*this.estimate_,this.totalWeight_+=e}getTotalWeight(){return this.totalWeight_}getEstimate(){if(this.alpha_){const e=1-Math.pow(this.alpha_,this.totalWeight_);if(e)return this.estimate_/e}return this.estimate_}}class Ac{constructor(e,t,s,i=100){this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.defaultTTFB_=void 0,this.ttfb_=void 0,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new _t(e),this.fast_=new _t(t),this.defaultTTFB_=i,this.ttfb_=new _t(e)}update(e,t){const{slow_:s,fast_:i,ttfb_:n}=this;s.halfLife!==e&&(this.slow_=new _t(e,s.getEstimate(),s.getTotalWeight())),i.halfLife!==t&&(this.fast_=new _t(t,i.getEstimate(),i.getTotalWeight())),n.halfLife!==e&&(this.ttfb_=new _t(e,n.getEstimate(),n.getTotalWeight()))}sample(e,t){e=Math.max(e,this.minDelayMs_);const s=8*t,i=e/1e3,n=s/i;this.fast_.sample(i,n),this.slow_.sample(i,n)}sampleTTFB(e){const t=e/1e3,s=Math.sqrt(2)*Math.exp(-Math.pow(t,2)/2);this.ttfb_.sample(s,Math.max(e,5))}canEstimate(){return this.fast_.getTotalWeight()>=this.minWeight_}getEstimate(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_}getEstimateTTFB(){return this.ttfb_.getTotalWeight()>=this.minWeight_?this.ttfb_.getEstimate():this.defaultTTFB_}destroy(){}}const Ro={supported:!0,configurations:[],decodingInfoResults:[{supported:!0,powerEfficient:!0,smooth:!0}]},Jr={};function bc(r,e,t,s,i,n){const o=r.audioCodec?r.audioGroups:null,a=n==null?void 0:n.audioCodec,l=n==null?void 0:n.channels,c=l?parseInt(l):a?1/0:2;let u=null;if(o!=null&&o.length)try{o.length===1&&o[0]?u=e.groups[o[0]].channels:u=o.reduce((h,d)=>{if(d){const g=e.groups[d];if(!g)throw new Error(`Audio track group ${d} not found`);Object.keys(g.channels).forEach(f=>{h[f]=(h[f]||0)+g.channels[f]})}return h},{2:0})}catch{return!0}return r.videoCodec!==void 0&&(r.width>1920&&r.height>1088||r.height>1920&&r.width>1088||r.frameRate>Math.max(s,30)||r.videoRange!=="SDR"&&r.videoRange!==t||r.bitrate>Math.max(i,8e6))||!!u&&V(c)&&Object.keys(u).some(h=>parseInt(h)>c)}function _c(r,e,t){const s=r.videoCodec,i=r.audioCodec;if(!s||!i||!t)return Promise.resolve(Ro);const n={width:r.width,height:r.height,bitrate:Math.ceil(Math.max(r.bitrate*.9,r.averageBitrate)),framerate:r.frameRate||30},o=r.videoRange;o!=="SDR"&&(n.transferFunction=o.toLowerCase());const a=s.split(",").map(l=>({type:"media-source",video:ve(ve({},n),{},{contentType:Jt(l,"video")})}));return i&&r.audioGroups&&r.audioGroups.forEach(l=>{var c;l&&((c=e.groups[l])==null||c.tracks.forEach(u=>{if(u.groupId===l){const h=u.channels||"",d=parseFloat(h);V(d)&&d>2&&a.push.apply(a,i.split(",").map(g=>({type:"media-source",audio:{contentType:Jt(g,"audio"),channels:""+d}})))}}))}),Promise.all(a.map(l=>{const c=Rc(l);return Jr[c]||(Jr[c]=t.decodingInfo(l))})).then(l=>({supported:!l.some(c=>!c.supported),configurations:a,decodingInfoResults:l})).catch(l=>({supported:!1,configurations:a,decodingInfoResults:[],error:l}))}function Rc(r){const{audio:e,video:t}=r,s=t||e;if(s){const i=s.contentType.split('"')[1];if(t)return`r${t.height}x${t.width}f${Math.ceil(t.framerate)}${t.transferFunction||"sd"}_${i}_${Math.ceil(t.bitrate/1e5)}`;if(e)return`c${e.channels}${e.spatialRendering?"s":"n"}_${i}`}return""}function Ic(){if(typeof matchMedia=="function"){const r=matchMedia("(dynamic-range: high)"),e=matchMedia("bad query");if(r.media!==e.media)return r.matches===!0}return!1}function Dc(r,e){let t=!1,s=[];if(r&&(t=r!=="SDR",s=[r]),e){s=e.allowedVideoRanges||Ms.slice(0);const i=s.join("")!=="SDR"&&!e.videoCodec;t=e.preferHDR!==void 0?e.preferHDR:i&&Ic(),t||(s=["SDR"])}return{preferHDR:t,allowedVideoRanges:s}}function Cc(r,e,t,s,i){const n=Object.keys(r),o=s==null?void 0:s.channels,a=s==null?void 0:s.audioCodec,l=i==null?void 0:i.videoCodec,c=o&&parseInt(o)===2;let u=!1,h=!1,d=1/0,g=1/0,f=1/0,m=1/0,p=0,E=[];const{preferHDR:x,allowedVideoRanges:T}=Dc(e,i);for(let v=n.length;v--;){const I=r[n[v]];u||(u=I.channels[2]>0),d=Math.min(d,I.minHeight),g=Math.min(g,I.minFramerate),f=Math.min(f,I.minBitrate),T.filter(k=>I.videoRanges[k]>0).length>0&&(h=!0)}d=V(d)?d:0,g=V(g)?g:0;const _=Math.max(1080,d),A=Math.max(30,g);f=V(f)?f:t,t=Math.max(f,t),h||(e=void 0);const C=n.length>1;return{codecSet:n.reduce((v,I)=>{const R=r[I];if(I===v)return v;if(E=h?T.filter(k=>R.videoRanges[k]>0):[],C){if(R.minBitrate>t)return je(I,`min bitrate of ${R.minBitrate} > current estimate of ${t}`),v;if(!R.hasDefaultAudio)return je(I,"no renditions with default or auto-select sound found"),v;if(a&&I.indexOf(a.substring(0,4))%5!==0)return je(I,`audio codec preference "${a}" not found`),v;if(o&&!c){if(!R.channels[o])return je(I,`no renditions with ${o} channel sound found (channels options: ${Object.keys(R.channels)})`),v}else if((!a||c)&&u&&R.channels[2]===0)return je(I,"no renditions with stereo sound found"),v;if(R.minHeight>_)return je(I,`min resolution of ${R.minHeight} > maximum of ${_}`),v;if(R.minFramerate>A)return je(I,`min framerate of ${R.minFramerate} > maximum of ${A}`),v;if(!E.some(k=>R.videoRanges[k]>0))return je(I,`no variants with VIDEO-RANGE of ${JSON.stringify(E)} found`),v;if(l&&I.indexOf(l.substring(0,4))%5!==0)return je(I,`video codec preference "${l}" not found`),v;if(R.maxScore<p)return je(I,`max score of ${R.maxScore} < selected max of ${p}`),v}return v&&(Fs(I)>=Fs(v)||R.fragmentError>r[v].fragmentError)?v:(m=R.minIndex,p=R.maxScore,I)},void 0),videoRanges:E,preferHDR:x,minFramerate:g,minBitrate:f,minIndex:m}}function je(r,e){te.log(`[abr] start candidates with "${r}" ignored because ${e}`)}function wc(r){return r.reduce((e,t)=>{let s=e.groups[t.groupId];s||(s=e.groups[t.groupId]={tracks:[],channels:{2:0},hasDefault:!1,hasAutoSelect:!1}),s.tracks.push(t);const i=t.channels||"2";return s.channels[i]=(s.channels[i]||0)+1,s.hasDefault=s.hasDefault||t.default,s.hasAutoSelect=s.hasAutoSelect||t.autoselect,s.hasDefault&&(e.hasDefaultAudio=!0),s.hasAutoSelect&&(e.hasAutoSelectAudio=!0),e},{hasDefaultAudio:!1,hasAutoSelectAudio:!1,groups:{}})}function kc(r,e,t,s){return r.slice(t,s+1).reduce((i,n,o)=>{if(!n.codecSet)return i;const a=n.audioGroups;let l=i[n.codecSet];l||(i[n.codecSet]=l={minBitrate:1/0,minHeight:1/0,minFramerate:1/0,minIndex:o,maxScore:0,videoRanges:{SDR:0},channels:{2:0},hasDefaultAudio:!a,fragmentError:0}),l.minBitrate=Math.min(l.minBitrate,n.bitrate);const c=Math.min(n.height,n.width);return l.minHeight=Math.min(l.minHeight,c),l.minFramerate=Math.min(l.minFramerate,n.frameRate),l.minIndex=Math.min(l.minIndex,o),l.maxScore=Math.max(l.maxScore,n.score),l.fragmentError+=n.fragmentError,l.videoRanges[n.videoRange]=(l.videoRanges[n.videoRange]||0)+1,a&&a.forEach(u=>{if(!u)return;const h=e.groups[u];h&&(l.hasDefaultAudio=l.hasDefaultAudio||e.hasDefaultAudio?h.hasDefault:h.hasAutoSelect||!e.hasDefaultAudio&&!e.hasAutoSelectAudio,Object.keys(h.channels).forEach(d=>{l.channels[d]=(l.channels[d]||0)+h.channels[d]}))}),i},{})}function it(r,e,t){if("attrs"in r){const s=e.indexOf(r);if(s!==-1)return s}for(let s=0;s<e.length;s++){const i=e[s];if(Bt(r,i,t))return s}return-1}function Bt(r,e,t){const{groupId:s,name:i,lang:n,assocLang:o,characteristics:a,default:l}=r,c=r.forced;return(s===void 0||e.groupId===s)&&(i===void 0||e.name===i)&&(n===void 0||e.lang===n)&&(n===void 0||e.assocLang===o)&&(l===void 0||e.default===l)&&(c===void 0||e.forced===c)&&(a===void 0||Pc(a,e.characteristics))&&(t===void 0||t(r,e))}function Pc(r,e=""){const t=r.split(","),s=e.split(",");return t.length===s.length&&!t.some(i=>s.indexOf(i)===-1)}function Rt(r,e){const{audioCodec:t,channels:s}=r;return(t===void 0||(e.audioCodec||"").substring(0,4)===t.substring(0,4))&&(s===void 0||s===(e.channels||"2"))}function Fc(r,e,t,s,i){const n=e[s],a=e.reduce((d,g,f)=>{const m=g.uri;return(d[m]||(d[m]=[])).push(f),d},{})[n.uri];a.length>1&&(s=Math.max.apply(Math,a));const l=n.videoRange,c=n.frameRate,u=n.codecSet.substring(0,4),h=en(e,s,d=>{if(d.videoRange!==l||d.frameRate!==c||d.codecSet.substring(0,4)!==u)return!1;const g=d.audioGroups,f=t.filter(m=>!g||g.indexOf(m.groupId)!==-1);return it(r,f,i)>-1});return h>-1?h:en(e,s,d=>{const g=d.audioGroups,f=t.filter(m=>!g||g.indexOf(m.groupId)!==-1);return it(r,f,i)>-1})}function en(r,e,t){for(let s=e;s;s--)if(t(r[s]))return s;for(let s=e+1;s<r.length;s++)if(t(r[s]))return s;return-1}class Oc extends yt{constructor(e){super("abr",e.logger),this.hls=void 0,this.lastLevelLoadSec=0,this.lastLoadedFragLevel=-1,this.firstSelection=-1,this._nextAutoLevel=-1,this.nextAutoLevelKey="",this.audioTracksByGroup=null,this.codecTiers=null,this.timer=-1,this.fragCurrent=null,this.partCurrent=null,this.bitrateTestDelay=0,this.bwEstimator=void 0,this._abandonRulesCheck=()=>{const{fragCurrent:t,partCurrent:s,hls:i}=this,{autoLevelEnabled:n,media:o}=i;if(!t||!o)return;const a=performance.now(),l=s?s.stats:t.stats,c=s?s.duration:t.duration,u=a-l.loading.start,h=i.minAutoLevel;if(l.aborted||l.loaded&&l.loaded===l.total||t.level<=h){this.clearTimer(),this._nextAutoLevel=-1;return}if(!n||o.paused||!o.playbackRate||!o.readyState)return;const d=i.mainForwardBufferInfo;if(d===null)return;const g=this.bwEstimator.getEstimateTTFB(),f=Math.abs(o.playbackRate);if(u<=Math.max(g,1e3*(c/(f*2))))return;const m=d.len/f,p=l.loading.first?l.loading.first-l.loading.start:-1,E=l.loaded&&p>-1,x=this.getBwEstimate(),T=i.levels,_=T[t.level],A=l.total||Math.max(l.loaded,Math.round(c*_.averageBitrate/8));let C=E?u-p:u;C<1&&E&&(C=Math.min(u,l.loaded*8/x));const L=E?l.loaded*1e3/C:0,v=L?(A-l.loaded)/L:A*8/x+g/1e3;if(v<=m)return;const I=L?L*8:x;let R=Number.POSITIVE_INFINITY,k;for(k=t.level-1;k>h;k--){const K=T[k].maxBitrate;if(R=this.getTimeToLoadFrag(g/1e3,I,c*K,!T[k].details),R<m)break}if(R>=v||R>c*10)return;i.nextLoadLevel=i.nextAutoLevel=k,E?this.bwEstimator.sample(u-Math.min(g,p),l.loaded):this.bwEstimator.sampleTTFB(u);const U=T[k].maxBitrate;this.getBwEstimate()*this.hls.config.abrBandWidthUpFactor>U&&this.resetEstimator(U),this.clearTimer(),this.warn(`Fragment ${t.sn}${s?" part "+s.index:""} of level ${t.level} is loading too slowly; Time to underbuffer: ${m.toFixed(3)} s Estimated load time for current fragment: ${v.toFixed(3)} s Estimated load time for down switch fragment: ${R.toFixed(3)} s TTFB estimate: ${p|0} ms Current BW estimate: ${V(x)?x|0:"Unknown"} bps New BW estimate: ${this.getBwEstimate()|0} bps Switching to level ${k} @ ${U|0} bps`),i.trigger(y.FRAG_LOAD_EMERGENCY_ABORTED,{frag:t,part:s,stats:l})},this.hls=e,this.bwEstimator=this.initEstimator(),this.registerListeners()}resetEstimator(e){e&&(this.log(`setting initial bwe to ${e}`),this.hls.config.abrEwmaDefaultEstimate=e),this.firstSelection=-1,this.bwEstimator=this.initEstimator()}initEstimator(){const e=this.hls.config;return new Ac(e.abrEwmaSlowVoD,e.abrEwmaFastVoD,e.abrEwmaDefaultEstimate)}registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.MAX_AUTO_LEVEL_UPDATED,this.onMaxAutoLevelUpdated,this),e.off(y.ERROR,this.onError,this))}destroy(){this.unregisterListeners(),this.clearTimer(),this.hls=this._abandonRulesCheck=null,this.fragCurrent=this.partCurrent=null}onManifestLoading(e,t){this.lastLoadedFragLevel=-1,this.firstSelection=-1,this.lastLevelLoadSec=0,this.fragCurrent=this.partCurrent=null,this.onLevelsUpdated(),this.clearTimer()}onLevelsUpdated(){this.lastLoadedFragLevel>-1&&this.fragCurrent&&(this.lastLoadedFragLevel=this.fragCurrent.level),this._nextAutoLevel=-1,this.onMaxAutoLevelUpdated(),this.codecTiers=null,this.audioTracksByGroup=null}onMaxAutoLevelUpdated(){this.firstSelection=-1,this.nextAutoLevelKey=""}onFragLoading(e,t){const s=t.frag;if(!this.ignoreFragment(s)){if(!s.bitrateTest){var i;this.fragCurrent=s,this.partCurrent=(i=t.part)!=null?i:null}this.clearTimer(),this.timer=self.setInterval(this._abandonRulesCheck,100)}}onLevelSwitching(e,t){this.clearTimer()}onError(e,t){if(!t.fatal)switch(t.details){case D.BUFFER_ADD_CODEC_ERROR:case D.BUFFER_APPEND_ERROR:this.lastLoadedFragLevel=-1,this.firstSelection=-1;break;case D.FRAG_LOAD_TIMEOUT:{const s=t.frag,{fragCurrent:i,partCurrent:n}=this;if(s&&i&&s.sn===i.sn&&s.level===i.level){const o=performance.now(),a=n?n.stats:s.stats,l=o-a.loading.start,c=a.loading.first?a.loading.first-a.loading.start:-1;if(a.loaded&&c>-1){const h=this.bwEstimator.getEstimateTTFB();this.bwEstimator.sample(l-Math.min(h,c),a.loaded)}else this.bwEstimator.sampleTTFB(l)}break}}}getTimeToLoadFrag(e,t,s,i){const n=e+s/t,o=i?this.lastLevelLoadSec:0;return n+o}onLevelLoaded(e,t){const s=this.hls.config,{loading:i}=t.stats,n=i.end-i.start;V(n)&&(this.lastLevelLoadSec=n/1e3),t.details.live?this.bwEstimator.update(s.abrEwmaSlowLive,s.abrEwmaFastLive):this.bwEstimator.update(s.abrEwmaSlowVoD,s.abrEwmaFastVoD)}onFragLoaded(e,{frag:t,part:s}){const i=s?s.stats:t.stats;if(t.type===H.MAIN&&this.bwEstimator.sampleTTFB(i.loading.first-i.loading.start),!this.ignoreFragment(t)){if(this.clearTimer(),t.level===this._nextAutoLevel&&(this._nextAutoLevel=-1),this.firstSelection=-1,this.hls.config.abrMaxWithRealBitrate){const n=s?s.duration:t.duration,o=this.hls.levels[t.level],a=(o.loaded?o.loaded.bytes:0)+i.loaded,l=(o.loaded?o.loaded.duration:0)+n;o.loaded={bytes:a,duration:l},o.realBitrate=Math.round(8*a/l)}if(t.bitrateTest){const n={stats:i,frag:t,part:s,id:t.type};this.onFragBuffered(y.FRAG_BUFFERED,n),t.bitrateTest=!1}else this.lastLoadedFragLevel=t.level}}onFragBuffered(e,t){const{frag:s,part:i}=t,n=i!=null&&i.stats.loaded?i.stats:s.stats;if(n.aborted||this.ignoreFragment(s))return;const o=n.parsing.end-n.loading.start-Math.min(n.loading.first-n.loading.start,this.bwEstimator.getEstimateTTFB());this.bwEstimator.sample(o,n.loaded),n.bwEstimate=this.getBwEstimate(),s.bitrateTest?this.bitrateTestDelay=o/1e3:this.bitrateTestDelay=0}ignoreFragment(e){return e.type!==H.MAIN||e.sn==="initSegment"}clearTimer(){this.timer>-1&&(self.clearInterval(this.timer),this.timer=-1)}get firstAutoLevel(){const{maxAutoLevel:e,minAutoLevel:t}=this.hls,s=this.getBwEstimate(),i=this.hls.config.maxStarvationDelay,n=this.findBestLevel(s,t,e,0,i,1,1);if(n>-1)return n;const o=this.hls.firstLevel,a=Math.min(Math.max(o,t),e);return this.warn(`Could not find best starting auto level. Defaulting to first in playlist ${o} clamped to ${a}`),a}get forcedAutoLevel(){return this.nextAutoLevelKey?-1:this._nextAutoLevel}get nextAutoLevel(){const e=this.forcedAutoLevel,s=this.bwEstimator.canEstimate(),i=this.lastLoadedFragLevel>-1;if(e!==-1&&(!s||!i||this.nextAutoLevelKey===this.getAutoLevelKey()))return e;const n=s&&i?this.getNextABRAutoLevel():this.firstAutoLevel;if(e!==-1){const o=this.hls.levels;if(o.length>Math.max(e,n)&&o[e].loadError<=o[n].loadError)return e}return this._nextAutoLevel=n,this.nextAutoLevelKey=this.getAutoLevelKey(),n}getAutoLevelKey(){return`${this.getBwEstimate()}_${this.getStarvationDelay().toFixed(2)}`}getNextABRAutoLevel(){const{fragCurrent:e,partCurrent:t,hls:s}=this;if(s.levels.length<=1)return s.loadLevel;const{maxAutoLevel:i,config:n,minAutoLevel:o}=s,a=t?t.duration:e?e.duration:0,l=this.getBwEstimate(),c=this.getStarvationDelay();let u=n.abrBandWidthFactor,h=n.abrBandWidthUpFactor;if(c){const p=this.findBestLevel(l,o,i,c,0,u,h);if(p>=0)return p}let d=a?Math.min(a,n.maxStarvationDelay):n.maxStarvationDelay;if(!c){const p=this.bitrateTestDelay;p&&(d=(a?Math.min(a,n.maxLoadingDelay):n.maxLoadingDelay)-p,this.info(`bitrate test took ${Math.round(1e3*p)}ms, set first fragment max fetchDuration to ${Math.round(1e3*d)} ms`),u=h=1)}const g=this.findBestLevel(l,o,i,c,d,u,h);if(this.info(`${c?"rebuffering expected":"buffer is empty"}, optimal quality level ${g}`),g>-1)return g;const f=s.levels[o],m=s.levels[s.loadLevel];return(f==null?void 0:f.bitrate)<(m==null?void 0:m.bitrate)?o:s.loadLevel}getStarvationDelay(){const e=this.hls,t=e.media;if(!t)return 1/0;const s=t&&t.playbackRate!==0?Math.abs(t.playbackRate):1,i=e.mainForwardBufferInfo;return(i?i.len:0)/s}getBwEstimate(){return this.bwEstimator.canEstimate()?this.bwEstimator.getEstimate():this.hls.config.abrEwmaDefaultEstimate}findBestLevel(e,t,s,i,n,o,a){var l;const c=i+n,u=this.lastLoadedFragLevel,h=u===-1?this.hls.firstLevel:u,{fragCurrent:d,partCurrent:g}=this,{levels:f,allAudioTracks:m,loadLevel:p,config:E}=this.hls;if(f.length===1)return 0;const x=f[h],T=!!(x!=null&&(l=x.details)!=null&&l.live),_=p===-1||u===-1;let A,C="SDR",L=(x==null?void 0:x.frameRate)||0;const{audioPreference:v,videoPreference:I}=E,R=this.audioTracksByGroup||(this.audioTracksByGroup=wc(m));let k=-1;if(_){if(this.firstSelection!==-1)return this.firstSelection;const P=this.codecTiers||(this.codecTiers=kc(f,R,t,s)),F=Cc(P,C,e,v,I),{codecSet:Z,videoRanges:N,minFramerate:M,minBitrate:q,minIndex:j,preferHDR:ee}=F;k=j,A=Z,C=ee?N[N.length-1]:N[0],L=M,e=Math.max(e,q),this.log(`picked start tier ${JSON.stringify(F)}`)}else A=x==null?void 0:x.codecSet,C=x==null?void 0:x.videoRange;const U=g?g.duration:d?d.duration:0,K=this.bwEstimator.getEstimateTTFB()/1e3,O=[];for(let P=s;P>=t;P--){var G;const F=f[P],Z=P>h;if(!F)continue;if(E.useMediaCapabilities&&!F.supportedResult&&!F.supportedPromise){const he=navigator.mediaCapabilities;typeof(he==null?void 0:he.decodingInfo)=="function"&&bc(F,R,C,L,e,v)?(F.supportedPromise=_c(F,R,he),F.supportedPromise.then(B=>{if(!this.hls)return;F.supportedResult=B;const ye=this.hls.levels,xe=ye.indexOf(F);B.error?this.warn(`MediaCapabilities decodingInfo error: "${B.error}" for level ${xe} ${JSON.stringify(B)}`):B.supported||(this.warn(`Unsupported MediaCapabilities decodingInfo result for level ${xe} ${JSON.stringify(B)}`),xe>-1&&ye.length>1&&(this.log(`Removing unsupported level ${xe}`),this.hls.removeLevel(xe)))})):F.supportedResult=Ro}if((A&&F.codecSet!==A||C&&F.videoRange!==C||Z&&L>F.frameRate||!Z&&L>0&&L<F.frameRate||F.supportedResult&&!((G=F.supportedResult.decodingInfoResults)!=null&&G[0].smooth))&&(!_||P!==k)){O.push(P);continue}const N=F.details,M=(g?N==null?void 0:N.partTarget:N==null?void 0:N.averagetargetduration)||U;let q;Z?q=a*e:q=o*e;const j=U&&i>=U*2&&n===0?f[P].averageBitrate:f[P].maxBitrate,ee=this.getTimeToLoadFrag(K,q,j*M,N===void 0);if(q>=j&&(P===u||F.loadError===0&&F.fragmentError===0)&&(ee<=K||!V(ee)||T&&!this.bitrateTestDelay||ee<c)){const he=this.forcedAutoLevel;return P!==p&&(he===-1||he!==p)&&(O.length&&this.trace(`Skipped level(s) ${O.join(",")} of ${s} max with CODECS and VIDEO-RANGE:"${f[O[0]].codecs}" ${f[O[0]].videoRange}; not compatible with "${x.codecs}" ${C}`),this.info(`switch candidate:${h}->${P} adjustedbw(${Math.round(q)})-bitrate=${Math.round(q-j)} ttfb:${K.toFixed(1)} avgDuration:${M.toFixed(1)} maxFetchDuration:${c.toFixed(1)} fetchDuration:${ee.toFixed(1)} firstSelection:${_} codecSet:${F.codecSet} videoRange:${F.videoRange} hls.loadLevel:${p}`)),_&&(this.firstSelection=P),P}}return-1}set nextAutoLevel(e){const{maxAutoLevel:t,minAutoLevel:s}=this.hls,i=Math.min(Math.max(e,s),t);this._nextAutoLevel!==i&&(this.nextAutoLevelKey="",this._nextAutoLevel=i)}}class Mc extends yt{constructor(e,t){super(e,t),this._boundTick=void 0,this._tickTimer=null,this._tickInterval=null,this._tickCallCount=0,this._boundTick=this.tick.bind(this)}destroy(){this.onHandlerDestroying(),this.onHandlerDestroyed()}onHandlerDestroying(){this.clearNextTick(),this.clearInterval()}onHandlerDestroyed(){}hasInterval(){return!!this._tickInterval}hasNextTick(){return!!this._tickTimer}setInterval(e){return this._tickInterval?!1:(this._tickCallCount=0,this._tickInterval=self.setInterval(this._boundTick,e),!0)}clearInterval(){return this._tickInterval?(self.clearInterval(this._tickInterval),this._tickInterval=null,!0):!1}clearNextTick(){return this._tickTimer?(self.clearTimeout(this._tickTimer),this._tickTimer=null,!0):!1}tick(){this._tickCallCount++,this._tickCallCount===1&&(this.doTick(),this._tickCallCount>1&&this.tickImmediate(),this._tickCallCount=0)}tickImmediate(){this.clearNextTick(),this._tickTimer=self.setTimeout(this._boundTick,0)}doTick(){}}var Te={NOT_LOADED:"NOT_LOADED",APPENDING:"APPENDING",PARTIAL:"PARTIAL",OK:"OK"};class Nc{constructor(e){this.activePartLists=Object.create(null),this.endListFragments=Object.create(null),this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.bufferPadding=.2,this.hls=void 0,this.hasGaps=!1,this.hls=e,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.BUFFER_APPENDED,this.onBufferAppended,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this)}_unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.BUFFER_APPENDED,this.onBufferAppended,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this)}destroy(){this._unregisterListeners(),this.fragments=this.activePartLists=this.endListFragments=this.timeRanges=null}getAppendedFrag(e,t){const s=this.activePartLists[t];if(s)for(let i=s.length;i--;){const n=s[i];if(!n)break;const o=n.end;if(n.start<=e&&o!==null&&e<=o)return n}return this.getBufferedFrag(e,t)}getBufferedFrag(e,t){return this.getFragAtPos(e,t,!0)}getFragAtPos(e,t,s){const{fragments:i}=this,n=Object.keys(i);for(let o=n.length;o--;){const a=i[n[o]];if((a==null?void 0:a.body.type)===t&&(!s||a.buffered)){const l=a.body;if(l.start<=e&&e<=l.end)return l}}return null}detectEvictedFragments(e,t,s,i,n){this.timeRanges&&(this.timeRanges[e]=t);const o=(i==null?void 0:i.fragment.sn)||-1;Object.keys(this.fragments).forEach(a=>{const l=this.fragments[a];if(!l||o>=l.body.sn)return;if(!l.buffered&&(!l.loaded||n)){l.body.type===s&&this.removeFragment(l.body);return}const c=l.range[e];if(c){if(c.time.length===0){this.removeFragment(l.body);return}c.time.some(u=>{const h=!this.isTimeBuffered(u.startPTS,u.endPTS,t);return h&&this.removeFragment(l.body),h})}})}detectPartialFragments(e){const t=this.timeRanges;if(!t||e.frag.sn==="initSegment")return;const s=e.frag,i=It(s),n=this.fragments[i];if(!n||n.buffered&&s.gap)return;const o=!s.relurl;Object.keys(t).forEach(a=>{const l=s.elementaryStreams[a];if(!l)return;const c=t[a],u=o||l.partial===!0;n.range[a]=this.getBufferedTimes(s,e.part,u,c)}),n.loaded=null,Object.keys(n.range).length?(n.buffered=!0,(n.body.endList=s.endList||n.body.endList)&&(this.endListFragments[n.body.type]=n),ds(n)||this.removeParts(s.sn-1,s.type)):this.removeFragment(n.body)}removeParts(e,t){const s=this.activePartLists[t];s&&(this.activePartLists[t]=s.filter(i=>i.fragment.sn>=e))}fragBuffered(e,t){const s=It(e);let i=this.fragments[s];!i&&t&&(i=this.fragments[s]={body:e,appendedPTS:null,loaded:null,buffered:!1,range:Object.create(null)},e.gap&&(this.hasGaps=!0)),i&&(i.loaded=null,i.buffered=!0)}getBufferedTimes(e,t,s,i){const n={time:[],partial:s},o=e.start,a=e.end,l=e.minEndPTS||a,c=e.maxStartPTS||o;for(let u=0;u<i.length;u++){const h=i.start(u)-this.bufferPadding,d=i.end(u)+this.bufferPadding;if(c>=h&&l<=d){n.time.push({startPTS:Math.max(o,i.start(u)),endPTS:Math.min(a,i.end(u))});break}else if(o<d&&a>h){const g=Math.max(o,i.start(u)),f=Math.min(a,i.end(u));f>g&&(n.partial=!0,n.time.push({startPTS:g,endPTS:f}))}else if(a<=h)break}return n}getPartialFragment(e){let t=null,s,i,n,o=0;const{bufferPadding:a,fragments:l}=this;return Object.keys(l).forEach(c=>{const u=l[c];u&&ds(u)&&(i=u.body.start-a,n=u.body.end+a,e>=i&&e<=n&&(s=Math.min(e-i,n-e),o<=s&&(t=u.body,o=s)))}),t}isEndListAppended(e){const t=this.endListFragments[e];return t!==void 0&&(t.buffered||ds(t))}getState(e){const t=It(e),s=this.fragments[t];return s?s.buffered?ds(s)?Te.PARTIAL:Te.OK:Te.APPENDING:Te.NOT_LOADED}isTimeBuffered(e,t,s){let i,n;for(let o=0;o<s.length;o++){if(i=s.start(o)-this.bufferPadding,n=s.end(o)+this.bufferPadding,e>=i&&t<=n)return!0;if(t<=i)return!1}return!1}onManifestLoading(){this.removeAllFragments()}onFragLoaded(e,t){if(t.frag.sn==="initSegment"||t.frag.bitrateTest)return;const s=t.frag,i=t.part?null:t,n=It(s);this.fragments[n]={body:s,appendedPTS:null,loaded:i,buffered:!1,range:Object.create(null)}}onBufferAppended(e,t){const{frag:s,part:i,timeRanges:n,type:o}=t;if(s.sn==="initSegment")return;const a=s.type;if(i){let c=this.activePartLists[a];c||(this.activePartLists[a]=c=[]),c.push(i)}this.timeRanges=n;const l=n[o];this.detectEvictedFragments(o,l,a,i)}onFragBuffered(e,t){this.detectPartialFragments(t)}hasFragment(e){const t=It(e);return!!this.fragments[t]}hasFragments(e){const{fragments:t}=this,s=Object.keys(t);if(!e)return s.length>0;for(let i=s.length;i--;){const n=t[s[i]];if((n==null?void 0:n.body.type)===e)return!0}return!1}hasParts(e){var t;return!!((t=this.activePartLists[e])!=null&&t.length)}removeFragmentsInRange(e,t,s,i,n){i&&!this.hasGaps||Object.keys(this.fragments).forEach(o=>{const a=this.fragments[o];if(!a)return;const l=a.body;l.type!==s||i&&!l.gap||l.start<t&&l.end>e&&(a.buffered||n)&&this.removeFragment(l)})}removeFragment(e){const t=It(e);e.stats.loaded=0,e.clearElementaryStreamInfo();const s=this.activePartLists[e.type];if(s){const i=e.sn;this.activePartLists[e.type]=s.filter(n=>n.fragment.sn!==i)}delete this.fragments[t],e.endList&&delete this.endListFragments[e.type]}removeAllFragments(){this.fragments=Object.create(null),this.endListFragments=Object.create(null),this.activePartLists=Object.create(null),this.hasGaps=!1}}function ds(r){var e,t,s;return r.buffered&&(r.body.gap||((e=r.range.video)==null?void 0:e.partial)||((t=r.range.audio)==null?void 0:t.partial)||((s=r.range.audiovideo)==null?void 0:s.partial))}function It(r){return`${r.type}_${r.level}_${r.sn}`}const tn={length:0,start:()=>0,end:()=>0};class ue{static isBuffered(e,t){if(e){const s=ue.getBuffered(e);for(let i=s.length;i--;)if(t>=s.start(i)&&t<=s.end(i))return!0}return!1}static bufferInfo(e,t,s){if(e){const i=ue.getBuffered(e);if(i.length){const n=[];for(let o=0;o<i.length;o++)n.push({start:i.start(o),end:i.end(o)});return ue.bufferedInfo(n,t,s)}}return{len:0,start:t,end:t,nextStart:void 0}}static bufferedInfo(e,t,s){t=Math.max(0,t),e.sort((c,u)=>c.start-u.start||u.end-c.end);let i=[];if(s)for(let c=0;c<e.length;c++){const u=i.length;if(u){const h=i[u-1].end;e[c].start-h<s?e[c].end>h&&(i[u-1].end=e[c].end):i.push(e[c])}else i.push(e[c])}else i=e;let n=0,o,a=t,l=t;for(let c=0;c<i.length;c++){const u=i[c].start,h=i[c].end;if(t+s>=u&&t<h)a=u,l=h,n=l-t;else if(t+s<u){o=u;break}}return{len:n,start:a||0,end:l||0,nextStart:o}}static getBuffered(e){try{return e.buffered||tn}catch(t){return te.log("failed to get media.buffered",t),tn}}}class tr{constructor(e,t,s,i=0,n=-1,o=!1){this.level=void 0,this.sn=void 0,this.part=void 0,this.id=void 0,this.size=void 0,this.partial=void 0,this.transmuxing=fs(),this.buffering={audio:fs(),video:fs(),audiovideo:fs()},this.level=e,this.sn=t,this.id=s,this.size=i,this.part=n,this.partial=o}}function fs(){return{start:0,executeStart:0,executeEnd:0,end:0}}function zt(r,e){for(let s=0,i=r.length;s<i;s++){var t;if(((t=r[s])==null?void 0:t.cc)===e)return r[s]}return null}function Bc(r,e){return!!(r&&e.startCC<r.endCC&&e.endCC>r.startCC)}function sn(r,e){if(r){const t=r.start+e;r.start=r.startPTS=t,r.endPTS=t+r.duration}}function Io(r,e){const t=e.fragments;for(let s=0,i=t.length;s<i;s++)sn(t[s],r);e.fragmentHint&&sn(e.fragmentHint,r),e.alignedSliding=!0}function Uc(r,e,t){e&&(Gc(t,e),!t.alignedSliding&&e&&Us(t,e),!t.alignedSliding&&e&&!t.skippedSegments&&Lo(e,t))}function Gc(r,e){if(!Bc(e,r))return;const t=Math.min(e.endCC,r.endCC),s=zt(e.fragments,t),i=zt(r.fragments,t);if(!s||!i)return;te.log(`Aligning playlist at start of dicontinuity sequence ${t}`);const n=s.start-i.start;Io(n,r)}function Us(r,e){if(!r.hasProgramDateTime||!e.hasProgramDateTime)return;const t=r.fragments,s=e.fragments;if(!t.length||!s.length)return;let i,n;const o=Math.min(e.endCC,r.endCC);e.startCC<o&&r.startCC<o&&(i=zt(s,o),n=zt(t,o)),(!i||!n)&&(i=s[Math.floor(s.length/2)],n=zt(t,i.cc)||t[Math.floor(t.length/2)]);const a=i.programDateTime,l=n.programDateTime;if(!a||!l)return;const c=(l-a)/1e3-(n.start-i.start);Io(c,r)}const rn=Math.pow(2,17);class $c{constructor(e){this.config=void 0,this.loader=null,this.partLoadTimeout=-1,this.config=e}destroy(){this.loader&&(this.loader.destroy(),this.loader=null)}abort(){this.loader&&this.loader.abort()}load(e,t){const s=e.url;if(!s)return Promise.reject(new at({type:Y.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,error:new Error(`Fragment does not have a ${s?"part list":"url"}`),networkDetails:null}));this.abort();const i=this.config,n=i.fLoader,o=i.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap)if(e.tagList.some(g=>g[0]==="GAP")){l(on(e));return}else e.gap=!1;const c=this.loader=n?new n(i):new o(i),u=nn(e);e.loader=c;const h=Xr(i.fragLoadPolicy.default),d={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:e.sn==="initSegment"?1/0:rn};e.stats=c.stats,c.load(u,d,{onSuccess:(g,f,m,p)=>{this.resetLoader(e,c);let E=g.data;m.resetIV&&e.decryptdata&&(e.decryptdata.iv=new Uint8Array(E.slice(0,16)),E=E.slice(16)),a({frag:e,part:null,payload:E,networkDetails:p})},onError:(g,f,m,p)=>{this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,response:ve({url:s,data:void 0},g),error:new Error(`HTTP Error ${g.code} ${g.text}`),networkDetails:m,stats:p}))},onAbort:(g,f,m)=>{this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,error:new Error("Aborted"),networkDetails:m,stats:g}))},onTimeout:(g,f,m)=>{this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:m,stats:g}))},onProgress:(g,f,m,p)=>{t&&t({frag:e,part:null,payload:m,networkDetails:p})}})})}loadPart(e,t,s){this.abort();const i=this.config,n=i.fLoader,o=i.loader;return new Promise((a,l)=>{if(this.loader&&this.loader.destroy(),e.gap||t.gap){l(on(e,t));return}const c=this.loader=n?new n(i):new o(i),u=nn(e,t);e.loader=c;const h=Xr(i.fragLoadPolicy.default),d={loadPolicy:h,timeout:h.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0,highWaterMark:rn};t.stats=c.stats,c.load(u,d,{onSuccess:(g,f,m,p)=>{this.resetLoader(e,c),this.updateStatsFromPart(e,t);const E={frag:e,part:t,payload:g.data,networkDetails:p};s(E),a(E)},onError:(g,f,m,p)=>{this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.FRAG_LOAD_ERROR,fatal:!1,frag:e,part:t,response:ve({url:u.url,data:void 0},g),error:new Error(`HTTP Error ${g.code} ${g.text}`),networkDetails:m,stats:p}))},onAbort:(g,f,m)=>{e.stats.aborted=t.stats.aborted,this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.INTERNAL_ABORTED,fatal:!1,frag:e,part:t,error:new Error("Aborted"),networkDetails:m,stats:g}))},onTimeout:(g,f,m)=>{this.resetLoader(e,c),l(new at({type:Y.NETWORK_ERROR,details:D.FRAG_LOAD_TIMEOUT,fatal:!1,frag:e,part:t,error:new Error(`Timeout after ${d.timeout}ms`),networkDetails:m,stats:g}))}})})}updateStatsFromPart(e,t){const s=e.stats,i=t.stats,n=i.total;if(s.loaded+=i.loaded,n){const l=Math.round(e.duration/t.duration),c=Math.min(Math.round(s.loaded/n),l),h=(l-c)*Math.round(s.loaded/c);s.total=s.loaded+h}else s.total=Math.max(s.loaded,s.total);const o=s.loading,a=i.loading;o.start?o.first+=a.first-a.start:(o.start=a.start,o.first=a.first),o.end=a.end}resetLoader(e,t){e.loader=null,this.loader===t&&(self.clearTimeout(this.partLoadTimeout),this.loader=null),t.destroy()}}function nn(r,e=null){const t=e||r,s={frag:r,part:e,responseType:"arraybuffer",url:t.url,headers:{},rangeStart:0,rangeEnd:0},i=t.byteRangeStartOffset,n=t.byteRangeEndOffset;if(V(i)&&V(n)){var o;let a=i,l=n;if(r.sn==="initSegment"&&Vc((o=r.decryptdata)==null?void 0:o.method)){const c=n-i;c%16&&(l=n+(16-c%16)),i!==0&&(s.resetIV=!0,a=i-16)}s.rangeStart=a,s.rangeEnd=l}return s}function on(r,e){const t=new Error(`GAP ${r.gap?"tag":"attribute"} found`),s={type:Y.MEDIA_ERROR,details:D.FRAG_GAP,fatal:!1,frag:r,error:t,networkDetails:null};return e&&(s.part=e),(e||r).stats.aborted=!0,new at(s)}function Vc(r){return r==="AES-128"||r==="AES-256"}class at extends Error{constructor(e){super(e.error.message),this.data=void 0,this.data=e}}class Kc{constructor(e,t,s){this.subtle=void 0,this.aesIV=void 0,this.aesMode=void 0,this.subtle=e,this.aesIV=t,this.aesMode=s}decrypt(e,t){switch(this.aesMode){case mt.cbc:return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},t,e);case mt.ctr:return this.subtle.decrypt({name:"AES-CTR",counter:this.aesIV,length:64},t,e);default:throw new Error(`[AESCrypto] invalid aes mode ${this.aesMode}`)}}}class Hc{constructor(e,t,s){this.subtle=void 0,this.key=void 0,this.aesMode=void 0,this.subtle=e,this.key=t,this.aesMode=s}expandKey(){const e=Wc(this.aesMode);return this.subtle.importKey("raw",this.key,{name:e},!1,["encrypt","decrypt"])}}function Wc(r){switch(r){case mt.cbc:return"AES-CBC";case mt.ctr:return"AES-CTR";default:throw new Error(`[FastAESKey] invalid aes mode ${r}`)}}function Yc(r){const e=r.byteLength,t=e&&new DataView(r.buffer).getUint8(e-1);return t?Lt(r,0,e-t):r}class qc{constructor(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.ksRows=0,this.keySize=0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.initTable()}uint8ArrayToUint32Array_(e){const t=new DataView(e),s=new Uint32Array(4);for(let i=0;i<4;i++)s[i]=t.getUint32(i*4);return s}initTable(){const e=this.sBox,t=this.invSBox,s=this.subMix,i=s[0],n=s[1],o=s[2],a=s[3],l=this.invSubMix,c=l[0],u=l[1],h=l[2],d=l[3],g=new Uint32Array(256);let f=0,m=0,p=0;for(p=0;p<256;p++)p<128?g[p]=p<<1:g[p]=p<<1^283;for(p=0;p<256;p++){let E=m^m<<1^m<<2^m<<3^m<<4;E=E>>>8^E&255^99,e[f]=E,t[E]=f;const x=g[f],T=g[x],_=g[T];let A=g[E]*257^E*16843008;i[f]=A<<24|A>>>8,n[f]=A<<16|A>>>16,o[f]=A<<8|A>>>24,a[f]=A,A=_*16843009^T*65537^x*257^f*16843008,c[E]=A<<24|A>>>8,u[E]=A<<16|A>>>16,h[E]=A<<8|A>>>24,d[E]=A,f?(f=x^g[g[g[_^x]]],m^=g[g[m]]):f=m=1}}expandKey(e){const t=this.uint8ArrayToUint32Array_(e);let s=!0,i=0;for(;i<t.length&&s;)s=t[i]===this.key[i],i++;if(s)return;this.key=t;const n=this.keySize=t.length;if(n!==4&&n!==6&&n!==8)throw new Error("Invalid aes key size="+n);const o=this.ksRows=(n+6+1)*4;let a,l;const c=this.keySchedule=new Uint32Array(o),u=this.invKeySchedule=new Uint32Array(o),h=this.sBox,d=this.rcon,g=this.invSubMix,f=g[0],m=g[1],p=g[2],E=g[3];let x,T;for(a=0;a<o;a++){if(a<n){x=c[a]=t[a];continue}T=x,a%n===0?(T=T<<8|T>>>24,T=h[T>>>24]<<24|h[T>>>16&255]<<16|h[T>>>8&255]<<8|h[T&255],T^=d[a/n|0]<<24):n>6&&a%n===4&&(T=h[T>>>24]<<24|h[T>>>16&255]<<16|h[T>>>8&255]<<8|h[T&255]),c[a]=x=(c[a-n]^T)>>>0}for(l=0;l<o;l++)a=o-l,l&3?T=c[a]:T=c[a-4],l<4||a<=4?u[l]=T:u[l]=f[h[T>>>24]]^m[h[T>>>16&255]]^p[h[T>>>8&255]]^E[h[T&255]],u[l]=u[l]>>>0}networkToHostOrderSwap(e){return e<<24|(e&65280)<<8|(e&16711680)>>8|e>>>24}decrypt(e,t,s){const i=this.keySize+6,n=this.invKeySchedule,o=this.invSBox,a=this.invSubMix,l=a[0],c=a[1],u=a[2],h=a[3],d=this.uint8ArrayToUint32Array_(s);let g=d[0],f=d[1],m=d[2],p=d[3];const E=new Int32Array(e),x=new Int32Array(E.length);let T,_,A,C,L,v,I,R,k,U,K,O,G,P;const F=this.networkToHostOrderSwap;for(;t<E.length;){for(k=F(E[t]),U=F(E[t+1]),K=F(E[t+2]),O=F(E[t+3]),L=k^n[0],v=O^n[1],I=K^n[2],R=U^n[3],G=4,P=1;P<i;P++)T=l[L>>>24]^c[v>>16&255]^u[I>>8&255]^h[R&255]^n[G],_=l[v>>>24]^c[I>>16&255]^u[R>>8&255]^h[L&255]^n[G+1],A=l[I>>>24]^c[R>>16&255]^u[L>>8&255]^h[v&255]^n[G+2],C=l[R>>>24]^c[L>>16&255]^u[v>>8&255]^h[I&255]^n[G+3],L=T,v=_,I=A,R=C,G=G+4;T=o[L>>>24]<<24^o[v>>16&255]<<16^o[I>>8&255]<<8^o[R&255]^n[G],_=o[v>>>24]<<24^o[I>>16&255]<<16^o[R>>8&255]<<8^o[L&255]^n[G+1],A=o[I>>>24]<<24^o[R>>16&255]<<16^o[L>>8&255]<<8^o[v&255]^n[G+2],C=o[R>>>24]<<24^o[L>>16&255]<<16^o[v>>8&255]<<8^o[I&255]^n[G+3],x[t]=F(T^g),x[t+1]=F(C^f),x[t+2]=F(A^m),x[t+3]=F(_^p),g=k,f=U,m=K,p=O,t=t+4}return x.buffer}}const jc=16;class sr{constructor(e,{removePKCS7Padding:t=!0}={}){if(this.logEnabled=!0,this.removePKCS7Padding=void 0,this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null,this.useSoftware=void 0,this.enableSoftwareAES=void 0,this.enableSoftwareAES=e.enableSoftwareAES,this.removePKCS7Padding=t,t)try{const s=self.crypto;s&&(this.subtle=s.subtle||s.webkitSubtle)}catch{}this.useSoftware=!this.subtle}destroy(){this.subtle=null,this.softwareDecrypter=null,this.key=null,this.fastAesKey=null,this.remainderData=null,this.currentIV=null,this.currentResult=null}isSync(){return this.useSoftware}flush(){const{currentResult:e,remainderData:t}=this;if(!e||t)return this.reset(),null;const s=new Uint8Array(e);return this.reset(),this.removePKCS7Padding?Yc(s):s}reset(){this.currentResult=null,this.currentIV=null,this.remainderData=null,this.softwareDecrypter&&(this.softwareDecrypter=null)}decrypt(e,t,s,i){return this.useSoftware?new Promise((n,o)=>{this.softwareDecrypt(new Uint8Array(e),t,s,i);const a=this.flush();a?n(a.buffer):o(new Error("[softwareDecrypt] Failed to decrypt data"))}):this.webCryptoDecrypt(new Uint8Array(e),t,s,i)}softwareDecrypt(e,t,s,i){const{currentIV:n,currentResult:o,remainderData:a}=this;if(i!==mt.cbc||t.byteLength!==16)return te.warn("SoftwareDecrypt: can only handle AES-128-CBC"),null;this.logOnce("JS AES decrypt"),a&&(e=$e(a,e),this.remainderData=null);const l=this.getValidChunk(e);if(!l.length)return null;n&&(s=n);let c=this.softwareDecrypter;c||(c=this.softwareDecrypter=new qc),c.expandKey(t);const u=o;return this.currentResult=c.decrypt(l.buffer,0,s),this.currentIV=Lt(l,-16).buffer,u||null}webCryptoDecrypt(e,t,s,i){if(this.key!==t||!this.fastAesKey){if(!this.subtle)return Promise.resolve(this.onWebCryptoError(e,t,s,i));this.key=t,this.fastAesKey=new Hc(this.subtle,t,i)}return this.fastAesKey.expandKey().then(n=>this.subtle?(this.logOnce("WebCrypto AES decrypt"),new Kc(this.subtle,new Uint8Array(s),i).decrypt(e.buffer,n)):Promise.reject(new Error("web crypto not initialized"))).catch(n=>(te.warn(`[decrypter]: WebCrypto Error, disable WebCrypto API, ${n.name}: ${n.message}`),this.onWebCryptoError(e,t,s,i)))}onWebCryptoError(e,t,s,i){const n=this.enableSoftwareAES;if(n){this.useSoftware=!0,this.logEnabled=!0,this.softwareDecrypt(e,t,s,i);const o=this.flush();if(o)return o.buffer}throw new Error("WebCrypto"+(n?" and softwareDecrypt":"")+": failed to decrypt data")}getValidChunk(e){let t=e;const s=e.length-e.length%jc;return s!==e.length&&(t=Lt(e,0,s),this.remainderData=Lt(e,s)),t}logOnce(e){this.logEnabled&&(te.log(`[decrypter]: ${e}`),this.logEnabled=!1)}}const zc={toString:function(r){let e="";const t=r.length;for(let s=0;s<t;s++)e+=`[${r.start(s).toFixed(3)}-${r.end(s).toFixed(3)}]`;return e}},w={STOPPED:"STOPPED",IDLE:"IDLE",KEY_LOADING:"KEY_LOADING",FRAG_LOADING:"FRAG_LOADING",FRAG_LOADING_WAITING_RETRY:"FRAG_LOADING_WAITING_RETRY",WAITING_TRACK:"WAITING_TRACK",PARSING:"PARSING",PARSED:"PARSED",ENDED:"ENDED",ERROR:"ERROR",WAITING_INIT_PTS:"WAITING_INIT_PTS",WAITING_LEVEL:"WAITING_LEVEL"};class ir extends Mc{constructor(e,t,s,i,n){super(i,e.logger),this.hls=void 0,this.fragPrevious=null,this.fragCurrent=null,this.fragmentTracker=void 0,this.transmuxer=null,this._state=w.STOPPED,this.playlistType=void 0,this.media=null,this.mediaBuffer=null,this.config=void 0,this.bitrateTest=!1,this.lastCurrentTime=0,this.nextLoadPosition=0,this.startPosition=0,this.startTimeOffset=null,this.loadedmetadata=!1,this.retryDate=0,this.levels=null,this.fragmentLoader=void 0,this.keyLoader=void 0,this.levelLastLoaded=null,this.startFragRequested=!1,this.decrypter=void 0,this.initPTS=[],this.buffering=!0,this.loadingParts=!1,this.loopSn=void 0,this.onMediaSeeking=()=>{const{config:o,fragCurrent:a,media:l,mediaBuffer:c,state:u}=this,h=l?l.currentTime:0,d=ue.bufferInfo(c||l,h,o.maxBufferHole);if(this.log(`media seeking to ${V(h)?h.toFixed(3):h}, state: ${u}`),this.state===w.ENDED)this.resetLoadingState();else if(a){const g=o.maxFragLookUpTolerance,f=a.start-g,m=a.start+a.duration+g;if(!d.len||m<d.start||f>d.end){const p=h>m;(h<f||p)&&(p&&a.loader&&(this.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),a.abortRequests(),this.resetLoadingState()),this.fragPrevious=null)}}if(l){this.fragmentTracker.removeFragmentsInRange(h,1/0,this.playlistType,!0);const g=this.lastCurrentTime;if(h>g&&(this.lastCurrentTime=h),!this.loadingParts){const f=Math.max(d.end,h),m=this.shouldLoadParts(this.getLevelDetails(),f);m&&(this.log(`LL-Part loading ON after seeking to ${h.toFixed(2)} with buffer @${f.toFixed(2)}`),this.loadingParts=m)}}!this.loadedmetadata&&!d.len&&(this.nextLoadPosition=this.startPosition=h),this.tickImmediate()},this.onMediaEnded=()=>{this.startPosition=this.lastCurrentTime=0,this.playlistType===H.MAIN&&this.hls.trigger(y.MEDIA_ENDED,{stalled:!1})},this.playlistType=n,this.hls=e,this.fragmentLoader=new $c(e.config),this.keyLoader=s,this.fragmentTracker=t,this.config=e.config,this.decrypter=new sr(e.config)}registerListeners(){const{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.ERROR,this.onError,this)}doTick(){this.onTickEnd()}onTickEnd(){}startLoad(e){}stopLoad(){if(this.state===w.STOPPED)return;this.fragmentLoader.abort(),this.keyLoader.abort(this.playlistType);const e=this.fragCurrent;e!=null&&e.loader&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.resetTransmuxer(),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=w.STOPPED}pauseBuffering(){this.buffering=!1}resumeBuffering(){this.buffering=!0}_streamEnded(e,t){if(t.live||e.nextStart||!e.end||!this.media)return!1;const s=t.partList;if(s!=null&&s.length){const n=s[s.length-1];return ue.isBuffered(this.media,n.start+n.duration/2)}const i=t.fragments[t.fragments.length-1].type;return this.fragmentTracker.isEndListAppended(i)}getLevelDetails(){if(this.levels&&this.levelLastLoaded!==null){var e;return(e=this.levelLastLoaded)==null?void 0:e.details}}onMediaAttached(e,t){const s=this.media=this.mediaBuffer=t.media;s.addEventListener("seeking",this.onMediaSeeking),s.addEventListener("ended",this.onMediaEnded);const i=this.config;this.levels&&i.autoStartLoad&&this.state===w.STOPPED&&this.startLoad(i.startPosition)}onMediaDetaching(){const e=this.media;e!=null&&e.ended&&(this.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0),e&&(e.removeEventListener("seeking",this.onMediaSeeking),e.removeEventListener("ended",this.onMediaEnded)),this.keyLoader&&this.keyLoader.detach(),this.media=this.mediaBuffer=null,this.loopSn=void 0,this.startFragRequested=this.loadedmetadata=this.loadingParts=!1,this.fragmentTracker.removeAllFragments(),this.stopLoad()}onManifestLoading(){this.initPTS=[],this.levels=this.levelLastLoaded=this.fragCurrent=null,this.lastCurrentTime=this.startPosition=0,this.startFragRequested=!1}onError(e,t){}onManifestLoaded(e,t){this.startTimeOffset=t.startTimeOffset}onHandlerDestroying(){this.stopLoad(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),super.onHandlerDestroying(),this.hls=this.onMediaSeeking=this.onMediaEnded=null}onHandlerDestroyed(){this.state=w.STOPPED,this.fragmentLoader&&this.fragmentLoader.destroy(),this.keyLoader&&this.keyLoader.destroy(),this.decrypter&&this.decrypter.destroy(),this.hls=this.log=this.warn=this.decrypter=this.keyLoader=this.fragmentLoader=this.fragmentTracker=null,super.onHandlerDestroyed()}loadFragment(e,t,s){this.startFragRequested=!0,this._loadFragForPlayback(e,t,s)}_loadFragForPlayback(e,t,s){const i=n=>{if(this.fragContextChanged(e)){this.warn(`Fragment ${e.sn}${n.part?" p: "+n.part.index:""} of level ${e.level} was dropped during download.`),this.fragmentTracker.removeFragment(e);return}e.stats.chunkCount++,this._handleFragmentLoadProgress(n)};this._doFragLoad(e,t,s,i).then(n=>{if(!n)return;const o=this.state;if(this.fragContextChanged(e)){(o===w.FRAG_LOADING||!this.fragCurrent&&o===w.PARSING)&&(this.fragmentTracker.removeFragment(e),this.state=w.IDLE);return}"payload"in n&&(this.log(`Loaded ${e.type} sn: ${e.sn} of ${this.playlistLabel()} ${e.level}`),this.hls.trigger(y.FRAG_LOADED,n)),this._handleFragmentLoadComplete(n)}).catch(n=>{this.state===w.STOPPED||this.state===w.ERROR||(this.warn(`Frag error: ${(n==null?void 0:n.message)||n}`),this.resetFragmentLoading(e))})}clearTrackerIfNeeded(e){var t;const{fragmentTracker:s}=this;if(s.getState(e)===Te.APPENDING){const n=e.type,o=this.getFwdBufferInfo(this.mediaBuffer,n),a=Math.max(e.duration,o?o.len:this.config.maxBufferLength),l=this.backtrackFragment;((l?e.sn-l.sn:0)===1||this.reduceMaxBufferLength(a,e.duration))&&s.removeFragment(e)}else((t=this.mediaBuffer)==null?void 0:t.buffered.length)===0?s.removeAllFragments():s.hasParts(e.type)&&(s.detectPartialFragments({frag:e,part:null,stats:e.stats,id:e.type}),s.getState(e)===Te.PARTIAL&&s.removeFragment(e))}checkLiveUpdate(e){if(e.updated&&!e.live){const t=e.fragments[e.fragments.length-1];this.fragmentTracker.detectPartialFragments({frag:t,part:null,stats:t.stats,id:t.type})}e.fragments[0]||(e.deltaUpdateFailed=!0)}flushMainBuffer(e,t,s=null){if(!(e-t))return;const i={startOffset:e,endOffset:t,type:s};this.hls.trigger(y.BUFFER_FLUSHING,i)}_loadInitSegment(e,t){this._doFragLoad(e,t).then(s=>{if(!s||this.fragContextChanged(e)||!this.levels)throw new Error("init load aborted");return s}).then(s=>{const{hls:i}=this,{payload:n}=s,o=e.decryptdata;if(n&&n.byteLength>0&&o!=null&&o.key&&o.iv&&Nt(o.method)){const a=self.performance.now();return this.decrypter.decrypt(new Uint8Array(n),o.key.buffer,o.iv.buffer,zi(o.method)).catch(l=>{throw i.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:l,reason:l.message,frag:e}),l}).then(l=>{const c=self.performance.now();return i.trigger(y.FRAG_DECRYPTED,{frag:e,payload:l,stats:{tstart:a,tdecrypt:c}}),s.payload=l,this.completeInitSegmentLoad(s)})}return this.completeInitSegmentLoad(s)}).catch(s=>{this.state===w.STOPPED||this.state===w.ERROR||(this.warn(s),this.resetFragmentLoading(e))})}completeInitSegmentLoad(e){const{levels:t}=this;if(!t)throw new Error("init load aborted, missing levels");const s=e.frag.stats;this.state!==w.STOPPED&&(this.state=w.IDLE),e.frag.data=new Uint8Array(e.payload),s.parsing.start=s.buffering.start=self.performance.now(),s.parsing.end=s.buffering.end=self.performance.now(),this.tick()}fragContextChanged(e){const{fragCurrent:t}=this;return!e||!t||e.sn!==t.sn||e.level!==t.level}fragBufferedComplete(e,t){var s,i;const n=this.mediaBuffer?this.mediaBuffer:this.media;if(this.log(`Buffered ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e)} > buffer:${n?zc.toString(ue.getBuffered(n)):"(detached)"})`),e.sn!=="initSegment"){var o;if(e.type!==H.SUBTITLE){const l=e.elementaryStreams;if(!Object.keys(l).some(c=>!!l[c])){this.state=w.IDLE;return}}const a=(o=this.levels)==null?void 0:o[e.level];a!=null&&a.fragmentError&&(this.log(`Resetting level fragment error count of ${a.fragmentError} on frag buffered`),a.fragmentError=0)}this.state=w.IDLE,n&&(!this.loadedmetadata&&e.type==H.MAIN&&n.buffered.length&&((s=this.fragCurrent)==null?void 0:s.sn)===((i=this.fragPrevious)==null?void 0:i.sn)&&(this.loadedmetadata=!0,this.seekToStartPos()),this.tick())}seekToStartPos(){}_handleFragmentLoadComplete(e){const{transmuxer:t}=this;if(!t)return;const{frag:s,part:i,partsLoaded:n}=e,o=!n||n.length===0||n.some(l=>!l),a=new tr(s.level,s.sn,s.stats.chunkCount+1,0,i?i.index:-1,!o);t.flush(a)}_handleFragmentLoadProgress(e){}_doFragLoad(e,t,s=null,i){var n;this.fragCurrent=e;const o=t==null?void 0:t.details;if(!this.levels||!o)throw new Error(`frag load aborted, missing level${o?"":" detail"}s`);let a=null;e.encrypted&&!((n=e.decryptdata)!=null&&n.key)?(this.log(`Loading key for ${e.sn} of [${o.startSN}-${o.endSN}], ${this.playlistLabel()} ${e.level}`),this.state=w.KEY_LOADING,this.fragCurrent=e,a=this.keyLoader.load(e).then(h=>{if(!this.fragContextChanged(h.frag))return this.hls.trigger(y.KEY_LOADED,h),this.state===w.KEY_LOADING&&(this.state=w.IDLE),h}),this.hls.trigger(y.KEY_LOADING,{frag:e}),this.fragCurrent===null&&(a=Promise.reject(new Error("frag load aborted, context changed in KEY_LOADING")))):!e.encrypted&&o.encryptedFragments.length&&this.keyLoader.loadClear(e,o.encryptedFragments);const l=this.fragPrevious;if(e.sn!=="initSegment"&&(!l||e.sn!==l.sn)){const h=this.shouldLoadParts(t.details,e.end);h!==this.loadingParts&&(this.log(`LL-Part loading ${h?"ON":"OFF"} loading sn ${l==null?void 0:l.sn}->${e.sn}`),this.loadingParts=h)}if(s=Math.max(e.start,s||0),this.loadingParts&&e.sn!=="initSegment"){const h=o.partList;if(h&&i){s>e.end&&o.fragmentHint&&(e=o.fragmentHint);const d=this.getNextPart(h,e,s);if(d>-1){const g=h[d];this.log(`Loading part sn: ${e.sn} p: ${g.index} cc: ${e.cc} of playlist [${o.startSN}-${o.endSN}] parts [0-${d}-${h.length-1}] ${this.playlistLabel()}: ${e.level}, target: ${parseFloat(s.toFixed(3))}`),this.nextLoadPosition=g.start+g.duration,this.state=w.FRAG_LOADING;let f;return a?f=a.then(m=>!m||this.fragContextChanged(m.frag)?null:this.doFragPartsLoad(e,g,t,i)).catch(m=>this.handleFragLoadError(m)):f=this.doFragPartsLoad(e,g,t,i).catch(m=>this.handleFragLoadError(m)),this.hls.trigger(y.FRAG_LOADING,{frag:e,part:g,targetBufferTime:s}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING parts")):f}else if(!e.url||this.loadedEndOfParts(h,s))return Promise.resolve(null)}}if(e.sn!=="initSegment"&&this.loadingParts)this.log(`LL-Part loading OFF after next part miss @${s.toFixed(2)}`),this.loadingParts=!1;else if(!e.url)return Promise.resolve(null);this.log(`Loading ${e.type} sn: ${e.sn} of ${this.fragInfo(e,!1)}) cc: ${e.cc} ${o?"["+o.startSN+"-"+o.endSN+"]":""}, target: ${parseFloat(s.toFixed(3))}`),V(e.sn)&&!this.bitrateTest&&(this.nextLoadPosition=e.start+e.duration),this.state=w.FRAG_LOADING;const c=this.config.progressive;let u;return c&&a?u=a.then(h=>!h||this.fragContextChanged(h==null?void 0:h.frag)?null:this.fragmentLoader.load(e,i)).catch(h=>this.handleFragLoadError(h)):u=Promise.all([this.fragmentLoader.load(e,c?i:void 0),a]).then(([h])=>(!c&&h&&i&&i(h),h)).catch(h=>this.handleFragLoadError(h)),this.hls.trigger(y.FRAG_LOADING,{frag:e,targetBufferTime:s}),this.fragCurrent===null?Promise.reject(new Error("frag load aborted, context changed in FRAG_LOADING")):u}doFragPartsLoad(e,t,s,i){return new Promise((n,o)=>{var a;const l=[],c=(a=s.details)==null?void 0:a.partList,u=h=>{this.fragmentLoader.loadPart(e,h,i).then(d=>{l[h.index]=d;const g=d.part;this.hls.trigger(y.FRAG_LOADED,d);const f=jr(s.details,e.sn,h.index+1)||Ao(c,e.sn,h.index+1);if(f)u(f);else return n({frag:e,part:g,partsLoaded:l})}).catch(o)};u(t)})}handleFragLoadError(e){if("data"in e){const t=e.data;e.data&&t.details===D.INTERNAL_ABORTED?this.handleFragLoadAborted(t.frag,t.part):this.hls.trigger(y.ERROR,t)}else this.hls.trigger(y.ERROR,{type:Y.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,err:e,error:e,fatal:!0});return null}_handleTransmuxerFlush(e){const t=this.getCurrentContext(e);if(!t||this.state!==w.PARSING){!this.fragCurrent&&this.state!==w.STOPPED&&this.state!==w.ERROR&&(this.state=w.IDLE);return}const{frag:s,part:i,level:n}=t,o=self.performance.now();s.stats.parsing.end=o,i&&(i.stats.parsing.end=o);const a=this.getLevelDetails(),c=a&&s.sn>a.endSN||this.shouldLoadParts(a,s.end);c!==this.loadingParts&&(this.log(`LL-Part loading ${c?"ON":"OFF"} after parsing segment ending @${s.end.toFixed(2)}`),this.loadingParts=c),this.updateLevelTiming(s,i,n,e.partial)}shouldLoadParts(e,t){if(this.config.lowLatencyMode){if(!e)return this.loadingParts;if(e!=null&&e.partList){var s;const i=e.partList[0],n=i.end+(((s=e.fragmentHint)==null?void 0:s.duration)||0);if(t>=n&&this.lastCurrentTime>i.start-i.fragment.duration)return!0}}return!1}getCurrentContext(e){const{levels:t,fragCurrent:s}=this,{level:i,sn:n,part:o}=e;if(!(t!=null&&t[i]))return this.warn(`Levels object was unset while buffering fragment ${n} of level ${i}. The current chunk will not be buffered.`),null;const a=t[i],l=a.details,c=o>-1?jr(l,n,o):null,u=c?c.fragment:yc(l,n,s);return u?(s&&s!==u&&(u.stats=s.stats),{frag:u,part:c,level:a}):null}bufferFragmentData(e,t,s,i,n){var o;if(!e||this.state!==w.PARSING)return;const{data1:a,data2:l}=e;let c=a;if(a&&l&&(c=$e(a,l)),!((o=c)!=null&&o.length))return;const u={type:e.type,frag:t,part:s,chunkMeta:i,parent:t.type,data:c};if(this.hls.trigger(y.BUFFER_APPENDING,u),e.dropped&&e.independent&&!s){if(n)return;this.flushBufferGap(t)}}flushBufferGap(e){const t=this.media;if(!t)return;if(!ue.isBuffered(t,t.currentTime)){this.flushMainBuffer(0,e.start);return}const s=t.currentTime,i=ue.bufferInfo(t,s,0),n=e.duration,o=Math.min(this.config.maxFragLookUpTolerance*2,n*.25),a=Math.max(Math.min(e.start-o,i.end-o),s+o);e.start-a>o&&this.flushMainBuffer(a,e.start)}getFwdBufferInfo(e,t){var s;const i=this.getLoadPosition();if(!V(i))return null;const o=this.lastCurrentTime>i||(s=this.media)!=null&&s.paused?0:this.config.maxBufferHole;return this.getFwdBufferInfoAtPos(e,i,t,o)}getFwdBufferInfoAtPos(e,t,s,i){const n=ue.bufferInfo(e,t,i);if(n.len===0&&n.nextStart!==void 0){const o=this.fragmentTracker.getBufferedFrag(t,s);if(o&&(n.nextStart<=o.end||o.gap))return ue.bufferInfo(e,t,Math.max(n.nextStart,i))}return n}getMaxBufferLength(e){const{config:t}=this;let s;return e?s=Math.max(8*t.maxBufferSize/e,t.maxBufferLength):s=t.maxBufferLength,Math.min(s,t.maxMaxBufferLength)}reduceMaxBufferLength(e,t){const s=this.config,i=Math.max(Math.min(e-t,s.maxBufferLength),t),n=Math.max(e-t*3,s.maxMaxBufferLength/2,i);return n>=i?(s.maxMaxBufferLength=n,this.warn(`Reduce max buffer length to ${n}s`),!0):!1}getAppendedFrag(e,t=H.MAIN){var s;const i=(s=this.fragmentTracker)==null?void 0:s.getAppendedFrag(e,t);return i&&"fragment"in i?i.fragment:i}getNextFragment(e,t){const s=t.fragments,i=s.length;if(!i)return null;const{config:n}=this,o=s[0].start,a=n.lowLatencyMode&&!!t.partList;let l=null;if(t.live){const c=n.initialLiveManifestSize;if(i<c)return this.warn(`Not enough fragments to start playback (have: ${i}, need: ${c})`),null;(!t.PTSKnown&&!this.startFragRequested&&this.startPosition===-1||e<o)&&(a&&!this.loadingParts&&(this.log("LL-Part loading ON for initial live fragment"),this.loadingParts=!0),l=this.getInitialLiveFragment(t,s),this.startPosition=this.nextLoadPosition=l?this.hls.liveSyncPosition||l.start:e)}else e<=o&&(l=s[0]);if(!l){const c=this.loadingParts?t.partEnd:t.fragmentEnd;l=this.getFragmentAtPosition(e,c,t)}return this.mapToInitFragWhenRequired(l)}isLoopLoading(e,t){const s=this.fragmentTracker.getState(e);return(s===Te.OK||s===Te.PARTIAL&&!!e.gap)&&this.nextLoadPosition>t}getNextFragmentLoopLoading(e,t,s,i,n){let o=null;if(e.gap&&(o=this.getNextFragment(this.nextLoadPosition,t),o&&!o.gap&&s.nextStart)){const a=this.getFwdBufferInfoAtPos(this.mediaBuffer?this.mediaBuffer:this.media,s.nextStart,i,0);if(a!==null&&s.len+a.len>=n){const l=o.sn;return this.loopSn!==l&&(this.log(`buffer full after gaps in "${i}" playlist starting at sn: ${l}`),this.loopSn=l),null}}return this.loopSn=void 0,o}mapToInitFragWhenRequired(e){return e!=null&&e.initSegment&&!(e!=null&&e.initSegment.data)&&!this.bitrateTest?e.initSegment:e}getNextPart(e,t,s){let i=-1,n=!1,o=!0;for(let a=0,l=e.length;a<l;a++){const c=e[a];if(o=o&&!c.independent,i>-1&&s<c.start)break;const u=c.loaded;u?i=-1:(n||c.independent||o)&&c.fragment===t&&(i=a),n=u}return i}loadedEndOfParts(e,t){const s=e[e.length-1];return s&&t>s.start&&s.loaded}getInitialLiveFragment(e,t){const s=this.fragPrevious;let i=null;if(s){if(e.hasProgramDateTime&&(this.log(`Live playlist, switching playlist, load frag with same PDT: ${s.programDateTime}`),i=Tc(t,s.endProgramDateTime,this.config.maxFragLookUpTolerance)),!i){const n=s.sn+1;if(n>=e.startSN&&n<=e.endSN){const o=t[n-e.startSN];s.cc===o.cc&&(i=o,this.log(`Live playlist, switching playlist, load frag with next SN: ${i.sn}`))}i||(i=_o(t,s.cc),i&&this.log(`Live playlist, switching playlist, load frag with same CC: ${i.sn}`))}}else{const n=this.hls.liveSyncPosition;n!==null&&(i=this.getFragmentAtPosition(n,this.bitrateTest?e.fragmentEnd:e.edge,e))}return i}getFragmentAtPosition(e,t,s){const{config:i}=this;let{fragPrevious:n}=this,{fragments:o,endSN:a}=s;const{fragmentHint:l}=s,{maxFragLookUpTolerance:c}=i,u=s.partList,h=!!(this.loadingParts&&u!=null&&u.length&&l);h&&l&&!this.bitrateTest&&(o=o.concat(l),a=l.sn);let d;if(e<t){var g;const m=e<this.lastCurrentTime||e>t-c||(g=this.media)!=null&&g.paused?0:c;d=es(n,o,e,m)}else d=o[o.length-1];if(d){const f=d.sn-s.startSN,m=this.fragmentTracker.getState(d);if((m===Te.OK||m===Te.PARTIAL&&d.gap)&&(n=d),n&&d.sn===n.sn&&(!h||u[0].fragment.sn>d.sn)&&n&&d.level===n.level){const E=o[f+1];d.sn<a&&this.fragmentTracker.getState(E)!==Te.OK?d=E:d=null}}return d}synchronizeToLiveEdge(e){const{config:t,media:s}=this;if(!s)return;const i=this.hls.liveSyncPosition,n=s.currentTime,o=e.fragments[0].start,a=e.edge,l=n>=o-t.maxFragLookUpTolerance&&n<=a;if(i!==null&&s.duration>i&&(n<i||!l)){const c=t.liveMaxLatencyDuration!==void 0?t.liveMaxLatencyDuration:t.liveMaxLatencyDurationCount*e.targetduration;(!l&&s.readyState<4||n<a-c)&&(this.loadedmetadata||(this.nextLoadPosition=i),s.readyState&&(this.warn(`Playback: ${n.toFixed(3)} is located too far from the end of live sliding playlist: ${a}, reset currentTime to : ${i.toFixed(3)}`),s.currentTime=i))}}alignPlaylists(e,t,s){const i=e.fragments.length;if(!i)return this.warn("No fragments in live playlist"),0;const n=e.fragments[0].start,o=!t,a=e.alignedSliding&&V(n);if(o||!a&&!n){const{fragPrevious:l}=this;Uc(l,s,e);const c=e.fragments[0].start;return this.log(`Live playlist sliding: ${c.toFixed(2)} start-sn: ${t?t.startSN:"na"}->${e.startSN} prev-sn: ${l?l.sn:"na"} fragments: ${i}`),c}return n}waitForCdnTuneIn(e){return e.live&&e.canBlockReload&&e.partTarget&&e.tuneInGoal>Math.max(e.partHoldBack,e.partTarget*3)}setStartPosition(e,t){let s=this.startPosition;if(s<t&&(s=-1),s===-1||this.lastCurrentTime===-1){const i=this.startTimeOffset!==null,n=i?this.startTimeOffset:e.startTimeOffset;n!==null&&V(n)?(s=t+n,n<0&&(s+=e.edge),s=Math.min(Math.max(t,s),t+e.totalduration),this.log(`Start time offset ${n} found in ${i?"multivariant":"media"} playlist, adjust startPosition to ${s}`),this.startPosition=s):e.live?s=this.hls.liveSyncPosition||t:this.startPosition=s=0,this.lastCurrentTime=s}this.nextLoadPosition=s}getLoadPosition(){const{media:e}=this;let t=0;return this.loadedmetadata&&e?t=e.currentTime:this.nextLoadPosition&&(t=this.nextLoadPosition),t}handleFragLoadAborted(e,t){this.transmuxer&&e.sn!=="initSegment"&&e.stats.aborted&&(this.warn(`Fragment ${e.sn}${t?" part "+t.index:""} of level ${e.level} was aborted`),this.resetFragmentLoading(e))}resetFragmentLoading(e){(!this.fragCurrent||!this.fragContextChanged(e)&&this.state!==w.FRAG_LOADING_WAITING_RETRY)&&(this.state=w.IDLE)}onFragmentOrKeyLoadError(e,t){if(t.chunkMeta&&!t.frag){const u=this.getCurrentContext(t.chunkMeta);u&&(t.frag=u.frag)}const s=t.frag;if(!s||s.type!==e||!this.levels)return;if(this.fragContextChanged(s)){var i;this.warn(`Frag load error must match current frag to retry ${s.url} > ${(i=this.fragCurrent)==null?void 0:i.url}`);return}const n=t.details===D.FRAG_GAP;n&&this.fragmentTracker.fragBuffered(s,!0);const o=t.errorAction,{action:a,retryCount:l=0,retryConfig:c}=o||{};if(o&&a===Ie.RetryRequest&&c){this.resetStartWhenNotLoaded(this.levelLastLoaded);const u=Zi(c,l);this.warn(`Fragment ${s.sn} of ${e} ${s.level} errored with ${t.details}, retrying loading ${l+1}/${c.maxNumRetry} in ${u}ms`),o.resolved=!0,this.retryDate=self.performance.now()+u,this.state=w.FRAG_LOADING_WAITING_RETRY}else if(c&&o)if(this.resetFragmentErrors(e),l<c.maxNumRetry)!n&&a!==Ie.RemoveAlternatePermanently&&(o.resolved=!0);else{this.warn(`${t.details} reached or exceeded max retry (${l})`);return}else(o==null?void 0:o.action)===Ie.SendAlternateToPenaltyBox?this.state=w.WAITING_LEVEL:this.state=w.ERROR;this.tickImmediate()}reduceLengthAndFlushBuffer(e){if(this.state===w.PARSING||this.state===w.PARSED){const t=e.frag,s=e.parent,i=this.getFwdBufferInfo(this.mediaBuffer,s),n=i&&i.len>.5;n&&this.reduceMaxBufferLength(i.len,(t==null?void 0:t.duration)||10);const o=!n;return o&&this.warn(`Buffer full error while media.currentTime is not buffered, flush ${s} buffer`),t&&(this.fragmentTracker.removeFragment(t),this.nextLoadPosition=t.start),this.resetLoadingState(),o}return!1}resetFragmentErrors(e){e===H.AUDIO&&(this.fragCurrent=null),this.loadedmetadata||(this.startFragRequested=!1),this.state!==w.STOPPED&&(this.state=w.IDLE)}afterBufferFlushed(e,t,s){if(!e)return;const i=ue.getBuffered(e);this.fragmentTracker.detectEvictedFragments(t,i,s),this.state===w.ENDED&&this.resetLoadingState()}resetLoadingState(){this.log("Reset loading state"),this.fragCurrent=null,this.fragPrevious=null,this.state!==w.STOPPED&&(this.state=w.IDLE)}resetStartWhenNotLoaded(e){if(!this.loadedmetadata){this.startFragRequested=!1;const t=e?e.details:null;t!=null&&t.live?(this.startPosition=-1,this.setStartPosition(t,0),this.resetLoadingState()):this.nextLoadPosition=this.startPosition}}resetWhenMissingContext(e){this.warn(`The loading context changed while buffering fragment ${e.sn} of level ${e.level}. This chunk will not be buffered.`),this.removeUnbufferedFrags(),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState()}removeUnbufferedFrags(e=0){this.fragmentTracker.removeFragmentsInRange(e,1/0,this.playlistType,!1,!0)}updateLevelTiming(e,t,s,i){var n;const o=s.details;if(!o){this.warn("level.details undefined");return}if(!Object.keys(e.elementaryStreams).reduce((l,c)=>{const u=e.elementaryStreams[c];if(u){const h=u.endPTS-u.startPTS;if(h<=0)return this.warn(`Could not parse fragment ${e.sn} ${c} duration reliably (${h})`),l||!1;const d=i?0:vo(o,e,u.startPTS,u.endPTS,u.startDTS,u.endDTS);return this.hls.trigger(y.LEVEL_PTS_UPDATED,{details:o,level:s,drift:d,type:c,frag:e,start:u.startPTS,end:u.endPTS}),!0}return l},!1)&&((n=this.transmuxer)==null?void 0:n.error)===null){const l=new Error(`Found no media in fragment ${e.sn} of level ${e.level} resetting transmuxer to fallback to playlist timing`);if(s.fragmentError===0&&(s.fragmentError++,e.gap=!0,this.fragmentTracker.removeFragment(e),this.fragmentTracker.fragBuffered(e,!0)),this.warn(l.message),this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:l,frag:e,reason:`Found no media in msn ${e.sn} of level "${s.url}"`}),!this.hls)return;this.resetTransmuxer()}this.state=w.PARSED,this.log(`Parsed ${e.type} sn: ${e.sn}${t?" part: "+t.index:""} of ${this.fragInfo(e)})`),this.hls.trigger(y.FRAG_PARSED,{frag:e,part:t})}playlistLabel(){return this.playlistType===H.MAIN?"level":"track"}fragInfo(e,t=!0){var s,i;return`${this.playlistLabel()} ${e.level} (frag:[${((s=t?e.startPTS:e.start)!=null?s:NaN).toFixed(3)}-${((i=t?e.endPTS:e.end)!=null?i:NaN).toFixed(3)}]`}resetTransmuxer(){var e;(e=this.transmuxer)==null||e.reset()}recoverWorkerError(e){e.event==="demuxerWorker"&&(this.fragmentTracker.removeAllFragments(),this.transmuxer&&(this.transmuxer.destroy(),this.transmuxer=null),this.resetStartWhenNotLoaded(this.levelLastLoaded),this.resetLoadingState())}set state(e){const t=this._state;t!==e&&(this._state=e,this.log(`${t}->${e}`))}get state(){return this._state}}class Do{constructor(){this.chunks=[],this.dataLength=0}push(e){this.chunks.push(e),this.dataLength+=e.length}flush(){const{chunks:e,dataLength:t}=this;let s;if(e.length)e.length===1?s=e[0]:s=Xc(e,t);else return new Uint8Array(0);return this.reset(),s}reset(){this.chunks.length=0,this.dataLength=0}}function Xc(r,e){const t=new Uint8Array(e);let s=0;for(let i=0;i<r.length;i++){const n=r[i];t.set(n,s),s+=n.length}return t}const ts="1.5.14-0.canary.10515",$t={};function Qc(){return typeof __HLS_WORKER_BUNDLE__=="function"}function Zc(){const r=$t[ts];if(r)return r.clientCount++,r;const e=new self.Blob([`var exports={};var module={exports:exports};function define(f){f()};define.amd=true;(${__HLS_WORKER_BUNDLE__.toString()})(true);`],{type:"text/javascript"}),t=self.URL.createObjectURL(e),i={worker:new self.Worker(t),objectURL:t,clientCount:1};return $t[ts]=i,i}function Jc(r){const e=$t[r];if(e)return e.clientCount++,e;const t=new self.URL(r,self.location.href).href,i={worker:new self.Worker(t),scriptURL:t,clientCount:1};return $t[r]=i,i}function eu(r){const e=$t[r||ts];if(e&&e.clientCount--===1){const{worker:s,objectURL:i}=e;delete $t[r||ts],i&&self.URL.revokeObjectURL(i),s.terminate()}}function Ze(r="",e=9e4){return{type:r,id:-1,pid:-1,inputTimeScale:e,sequenceNumber:-1,samples:[],dropped:0}}function ss(r,e){const t=e;let s=0;for(;Qi(r,e);){s+=10;const i=Hs(r,e+6);s+=i,To(r,e+10)&&(s+=10),e+=s}if(s>0)return r.subarray(t,t+s)}function tu(r){if(r.data.byteLength===8){const e=new Uint8Array(r.data),t=e[3]&1;let s=(e[4]<<23)+(e[5]<<15)+(e[6]<<7)+e[7];return s/=45,t&&(s+=4772185884e-2),Math.round(s)}}function rr(r){const e=xo(r);for(let t=0;t<e.length;t++){const s=e[t];if(So(s))return tu(s)}}function su(r,e){return Qi(r,e)&&Hs(r,e+6)+10<=r.length-e}class nr{constructor(){this._audioTrack=void 0,this._id3Track=void 0,this.frameIndex=0,this.cachedData=null,this.basePTS=null,this.initPTS=null,this.lastPTS=null}resetInitSegment(e,t,s,i){this._id3Track={type:"id3",id:3,pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0}}resetTimeStamp(e){this.initPTS=e,this.resetContiguity()}resetContiguity(){this.basePTS=null,this.lastPTS=null,this.frameIndex=0}canParse(e,t){return!1}appendFrame(e,t,s){}demux(e,t){this.cachedData&&(e=$e(this.cachedData,e),this.cachedData=null);let s=ss(e,0),i=s?s.length:0,n;const o=this._audioTrack,a=this._id3Track,l=s?rr(s):void 0,c=e.length;for((this.basePTS===null||this.frameIndex===0&&V(l))&&(this.basePTS=iu(l,t,this.initPTS),this.lastPTS=this.basePTS),this.lastPTS===null&&(this.lastPTS=this.basePTS),s&&s.length>0&&a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:He.audioId3,duration:Number.POSITIVE_INFINITY});i<c;){if(this.canParse(e,i)){const u=this.appendFrame(o,e,i);u?(this.frameIndex++,this.lastPTS=u.sample.pts,i+=u.length,n=i):i=c}else su(e,i)?(s=ss(e,i),a.samples.push({pts:this.lastPTS,dts:this.lastPTS,data:s,type:He.audioId3,duration:Number.POSITIVE_INFINITY}),i+=s.length,n=i):i++;if(i===c&&n!==c){const u=Lt(e,n);this.cachedData?this.cachedData=$e(this.cachedData,u):this.cachedData=u}}return{audioTrack:o,videoTrack:Ze(),id3Track:a,textTrack:Ze()}}demuxSampleAes(e,t,s){return Promise.reject(new Error(`[${this}] This demuxer does not support Sample-AES decryption`))}flush(e){const t=this.cachedData;return t&&(this.cachedData=null,this.demux(t,0)),{audioTrack:this._audioTrack,videoTrack:Ze(),id3Track:this._id3Track,textTrack:Ze()}}destroy(){}}const iu=(r,e,t)=>{if(V(r))return r*90;const s=t?t.baseTime*9e4/t.timescale:0;return e*9e4+s};function ru(r,e,t,s){let i,n,o,a,l;const c=navigator.userAgent.toLowerCase(),u=s,h=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];i=n=((e[t+2]&192)>>>6)+1;const d=(e[t+2]&60)>>>2;if(d>h.length-1){const g=new Error(`invalid ADTS sampling index:${d}`);r.emit(y.ERROR,y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!0,error:g,reason:g.message});return}return a=(e[t+2]&1)<<2,a|=(e[t+3]&192)>>>6,te.log(`manifest codec:${s}, ADTS type:${i}, samplingIndex:${d}`),/firefox|palemoon/i.test(c)?d>=6?(i=5,l=new Array(4),o=d-3):(i=2,l=new Array(2),o=d):c.indexOf("android")!==-1?(i=2,l=new Array(2),o=d):(i=5,l=new Array(4),s&&(s.indexOf("mp4a.40.29")!==-1||s.indexOf("mp4a.40.5")!==-1)||!s&&d>=6?o=d-3:((s&&s.indexOf("mp4a.40.2")!==-1&&(d>=6&&a===1||/vivaldi/i.test(c))||!s&&a===1)&&(i=2,l=new Array(2)),o=d)),l[0]=i<<3,l[0]|=(d&14)>>1,l[1]|=(d&1)<<7,l[1]|=a<<3,i===5&&(l[1]|=(o&14)>>1,l[2]=(o&1)<<7,l[2]|=8,l[3]=0),{config:l,samplerate:h[d],channelCount:a,codec:"mp4a.40."+i,parsedCodec:"mp4a.40."+n,manifestCodec:u}}function Co(r,e){return r[e]===255&&(r[e+1]&246)===240}function wo(r,e){return r[e+1]&1?7:9}function or(r,e){return(r[e+3]&3)<<11|r[e+4]<<3|(r[e+5]&224)>>>5}function nu(r,e){return e+5<r.length}function Gs(r,e){return e+1<r.length&&Co(r,e)}function ou(r,e){return nu(r,e)&&Co(r,e)&&or(r,e)<=r.length-e}function au(r,e){if(Gs(r,e)){const t=wo(r,e);if(e+t>=r.length)return!1;const s=or(r,e);if(s<=t)return!1;const i=e+s;return i===r.length||Gs(r,i)}return!1}function ko(r,e,t,s,i){if(!r.samplerate){const n=ru(e,t,s,i);if(!n)return;r.config=n.config,r.samplerate=n.samplerate,r.channelCount=n.channelCount,r.codec=n.codec,r.manifestCodec=n.manifestCodec,r.parsedCodec=n.parsedCodec,te.log(`parsed codec:${r.parsedCodec}, codec:${r.codec}, rate:${n.samplerate}, channels:${n.channelCount}`)}}function Po(r){return 1024*9e4/r}function lu(r,e){const t=wo(r,e);if(e+t<=r.length){const s=or(r,e)-t;if(s>0)return{headerLength:t,frameLength:s}}}function Fo(r,e,t,s,i){const n=Po(r.samplerate),o=s+i*n,a=lu(e,t);let l;if(a){const{frameLength:h,headerLength:d}=a,g=d+h,f=Math.max(0,t+g-e.length);f?(l=new Uint8Array(g-d),l.set(e.subarray(t+d,e.length),0)):l=e.subarray(t+d,t+g);const m={unit:l,pts:o};return f||r.samples.push(m),{sample:m,length:g,missing:f}}const c=e.length-t;return l=new Uint8Array(c),l.set(e.subarray(t,e.length),0),{sample:{unit:l,pts:o},length:c,missing:-1}}let gs=null;const cu=[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],uu=[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],hu=[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],du=[0,1,1,4];function Oo(r,e,t,s,i){if(t+24>e.length)return;const n=Mo(e,t);if(n&&t+n.frameLength<=e.length){const o=n.samplesPerFrame*9e4/n.sampleRate,a=s+i*o,l={unit:e.subarray(t,t+n.frameLength),pts:a,dts:a};return r.config=[],r.channelCount=n.channelCount,r.samplerate=n.sampleRate,r.samples.push(l),{sample:l,length:n.frameLength,missing:0}}}function Mo(r,e){const t=r[e+1]>>3&3,s=r[e+1]>>1&3,i=r[e+2]>>4&15,n=r[e+2]>>2&3;if(t!==1&&i!==0&&i!==15&&n!==3){const o=r[e+2]>>1&1,a=r[e+3]>>6,l=t===3?3-s:s===3?3:4,c=cu[l*14+i-1]*1e3,h=uu[(t===3?0:t===2?1:2)*3+n],d=a===3?1:2,g=hu[t][s],f=du[s],m=g*8*f,p=Math.floor(g*c/h+o)*f;if(gs===null){const T=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);gs=T?parseInt(T[1]):0}return!!gs&&gs<=87&&s===2&&c>=224e3&&a===0&&(r[e+3]=r[e+3]|128),{sampleRate:h,channelCount:d,frameLength:p,samplesPerFrame:m}}}function ar(r,e){return r[e]===255&&(r[e+1]&224)===224&&(r[e+1]&6)!==0}function No(r,e){return e+1<r.length&&ar(r,e)}function fu(r,e){return ar(r,e)&&4<=r.length-e}function Bo(r,e){if(e+1<r.length&&ar(r,e)){const s=Mo(r,e);let i=4;s!=null&&s.frameLength&&(i=s.frameLength);const n=e+i;return n===r.length||No(r,n)}return!1}class gu extends nr{constructor(e,t){super(),this.observer=void 0,this.config=void 0,this.observer=e,this.config=t}resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/adts",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"aac",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e,t){if(!e)return!1;const s=ss(e,0);let i=(s==null?void 0:s.length)||0;if(Bo(e,i))return!1;for(let n=e.length;i<n;i++)if(au(e,i))return t.log("ADTS sync word found !"),!0;return!1}canParse(e,t){return ou(e,t)}appendFrame(e,t,s){ko(e,this.observer,t,s,e.manifestCodec);const i=Fo(e,t,s,this.basePTS,this.frameIndex);if(i&&i.missing===0)return i}}const mu=/\/emsg[-/]ID3/i;class pu{constructor(e,t){this.remainderData=null,this.timeOffset=0,this.config=void 0,this.videoTrack=void 0,this.audioTrack=void 0,this.id3Track=void 0,this.txtTrack=void 0,this.config=t}resetTimeStamp(){}resetInitSegment(e,t,s,i){const n=this.videoTrack=Ze("video",1),o=this.audioTrack=Ze("audio",1),a=this.txtTrack=Ze("text",1);if(this.id3Track=Ze("id3",1),this.timeOffset=0,!(e!=null&&e.byteLength))return;const l=uo(e);if(l.video){const{id:c,timescale:u,codec:h}=l.video;n.id=c,n.timescale=a.timescale=u,n.codec=h}if(l.audio){const{id:c,timescale:u,codec:h}=l.audio;o.id=c,o.timescale=u,o.codec=h}a.id=ao.text,n.sampleDuration=0,n.duration=o.duration=i}resetContiguity(){this.remainderData=null}static probe(e){return yl(e)}demux(e,t){this.timeOffset=t;let s=e;const i=this.videoTrack,n=this.txtTrack;if(this.config.progressive){this.remainderData&&(s=$e(this.remainderData,e));const a=bl(s);this.remainderData=a.remainder,i.samples=a.valid||new Uint8Array}else i.samples=s;const o=this.extractID3Track(i,t);return n.samples=wr(t,i),{videoTrack:i,audioTrack:this.audioTrack,id3Track:o,textTrack:this.txtTrack}}flush(){const e=this.timeOffset,t=this.videoTrack,s=this.txtTrack;t.samples=this.remainderData||new Uint8Array,this.remainderData=null;const i=this.extractID3Track(t,this.timeOffset);return s.samples=wr(e,t),{videoTrack:t,audioTrack:Ze(),id3Track:i,textTrack:Ze()}}extractID3Track(e,t){const s=this.id3Track;if(e.samples.length){const i=Q(e.samples,["emsg"]);i&&i.forEach(n=>{const o=Il(n);if(mu.test(o.schemeIdUri)){const a=V(o.presentationTime)?o.presentationTime/o.timeScale:t+o.presentationTimeDelta/o.timeScale;let l=o.eventDuration===4294967295?Number.POSITIVE_INFINITY:o.eventDuration/o.timeScale;l<=.001&&(l=Number.POSITIVE_INFINITY);const c=o.payload;s.samples.push({data:c,len:c.byteLength,dts:a,pts:a,type:He.emsg,duration:l})}})}return s}demuxSampleAes(e,t,s){return Promise.reject(new Error("The MP4 demuxer does not support SAMPLE-AES decryption"))}destroy(){}}const Uo=(r,e)=>{let t=0,s=5;e+=s;const i=new Uint32Array(1),n=new Uint32Array(1),o=new Uint8Array(1);for(;s>0;){o[0]=r[e];const a=Math.min(s,8),l=8-a;n[0]=4278190080>>>24+l<<l,i[0]=(o[0]&n[0])>>l,t=t?t<<a|i[0]:i[0],e+=1,s-=a}return t};class yu extends nr{constructor(e){super(),this.observer=void 0,this.observer=e}resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/ac-3",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"ac3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}canParse(e,t){return t+64<e.length}appendFrame(e,t,s){const i=Go(e,t,s,this.basePTS,this.frameIndex);if(i!==-1)return{sample:e.samples[e.samples.length-1],length:i,missing:0}}static probe(e){if(!e)return!1;const t=ss(e,0);if(!t)return!1;const s=t.length;return e[s]===11&&e[s+1]===119&&rr(t)!==void 0&&Uo(e,s)<16}}function Go(r,e,t,s,i){if(t+8>e.length||e[t]!==11||e[t+1]!==119)return-1;const n=e[t+4]>>6;if(n>=3)return-1;const a=[48e3,44100,32e3][n],l=e[t+4]&63,u=[64,69,96,64,70,96,80,87,120,80,88,120,96,104,144,96,105,144,112,121,168,112,122,168,128,139,192,128,140,192,160,174,240,160,175,240,192,208,288,192,209,288,224,243,336,224,244,336,256,278,384,256,279,384,320,348,480,320,349,480,384,417,576,384,418,576,448,487,672,448,488,672,512,557,768,512,558,768,640,696,960,640,697,960,768,835,1152,768,836,1152,896,975,1344,896,976,1344,1024,1114,1536,1024,1115,1536,1152,1253,1728,1152,1254,1728,1280,1393,1920,1280,1394,1920][l*3+n]*2;if(t+u>e.length)return-1;const h=e[t+6]>>5;let d=0;h===2?d+=2:(h&1&&h!==1&&(d+=2),h&4&&(d+=2));const g=(e[t+6]<<8|e[t+7])>>12-d&1,m=[2,1,2,3,3,4,4,5][h]+g,p=e[t+5]>>3,E=e[t+5]&7,x=new Uint8Array([n<<6|p<<1|E>>2,(E&3)<<6|h<<3|g<<2|l>>4,l<<4&224]),T=1536/a*9e4,_=s+i*T,A=e.subarray(t,t+u);return r.config=x,r.channelCount=m,r.samplerate=a,r.samples.push({unit:A,pts:_}),u}class $o{constructor(){this.VideoSample=null}createVideoSample(e,t,s,i){return{key:e,frame:!1,pts:t,dts:s,units:[],debug:i,length:0}}getLastNalUnit(e){var t;let s=this.VideoSample,i;if((!s||s.units.length===0)&&(s=e[e.length-1]),(t=s)!=null&&t.units){const n=s.units;i=n[n.length-1]}return i}pushAccessUnit(e,t){if(e.units.length&&e.frame){if(e.pts===void 0){const s=t.samples,i=s.length;if(i){const n=s[i-1];e.pts=n.pts,e.dts=n.dts}else{t.dropped++;return}}t.samples.push(e)}e.debug.length&&te.log(e.pts+"/"+e.dts+":"+e.debug)}parseNALu(e,t,s){const i=t.byteLength;let n=e.naluState||0;const o=n,a=[];let l=0,c,u,h,d=-1,g=0;for(n===-1&&(d=0,g=this.getNALuType(t,0),n=0,l=1);l<i;){if(c=t[l++],!n){n=c?0:1;continue}if(n===1){n=c?0:2;continue}if(!c)n=3;else if(c===1){if(u=l-n-1,d>=0){const f={data:t.subarray(d,u),type:g};a.push(f)}else{const f=this.getLastNalUnit(e.samples);f&&(o&&l<=4-o&&f.state&&(f.data=f.data.subarray(0,f.data.byteLength-o)),u>0&&(f.data=$e(f.data,t.subarray(0,u)),f.state=0))}l<i?(h=this.getNALuType(t,l),d=l,g=h,n=0):n=-1}else n=0}if(d>=0&&n>=0){const f={data:t.subarray(d,i),type:g,state:n};a.push(f)}if(a.length===0){const f=this.getLastNalUnit(e.samples);f&&(f.data=$e(f.data,t))}return e.naluState=n,a}}class Xt{constructor(e){this.data=void 0,this.bytesAvailable=void 0,this.word=void 0,this.bitsAvailable=void 0,this.data=e,this.bytesAvailable=e.byteLength,this.word=0,this.bitsAvailable=0}loadWord(){const e=this.data,t=this.bytesAvailable,s=e.byteLength-t,i=new Uint8Array(4),n=Math.min(4,t);if(n===0)throw new Error("no bytes available");i.set(e.subarray(s,s+n)),this.word=new DataView(i.buffer).getUint32(0),this.bitsAvailable=n*8,this.bytesAvailable-=n}skipBits(e){let t;e=Math.min(e,this.bytesAvailable*8+this.bitsAvailable),this.bitsAvailable>e?(this.word<<=e,this.bitsAvailable-=e):(e-=this.bitsAvailable,t=e>>3,e-=t<<3,this.bytesAvailable-=t,this.loadWord(),this.word<<=e,this.bitsAvailable-=e)}readBits(e){let t=Math.min(this.bitsAvailable,e);const s=this.word>>>32-t;if(e>32&&te.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=t,this.bitsAvailable>0)this.word<<=t;else if(this.bytesAvailable>0)this.loadWord();else throw new Error("no bits available");return t=e-t,t>0&&this.bitsAvailable?s<<t|this.readBits(t):s}skipLZ(){let e;for(e=0;e<this.bitsAvailable;++e)if(this.word&2147483648>>>e)return this.word<<=e,this.bitsAvailable-=e,e;return this.loadWord(),e+this.skipLZ()}skipUEG(){this.skipBits(1+this.skipLZ())}skipEG(){this.skipBits(1+this.skipLZ())}readUEG(){const e=this.skipLZ();return this.readBits(e+1)-1}readEG(){const e=this.readUEG();return 1&e?1+e>>>1:-1*(e>>>1)}readBoolean(){return this.readBits(1)===1}readUByte(){return this.readBits(8)}readUShort(){return this.readBits(16)}readUInt(){return this.readBits(32)}}class an extends $o{parsePES(e,t,s,i,n){const o=this.parseNALu(e,s.data,i);let a=this.VideoSample,l,c=!1;s.data=null,a&&o.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"")),o.forEach(u=>{var h;switch(u.type){case 1:{let m=!1;l=!0;const p=u.data;if(c&&p.length>4){const E=this.readSliceType(p);(E===2||E===4||E===7||E===9)&&(m=!0)}if(m){var d;(d=a)!=null&&d.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.frame=!0,a.key=m;break}case 5:l=!0,(h=a)!=null&&h.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.key=!0,a.frame=!0;break;case 6:{l=!0,Xi(u.data,1,s.pts,t.samples);break}case 7:{var g,f;l=!0,c=!0;const m=u.data,p=this.readSPS(m);if(!e.sps||e.width!==p.width||e.height!==p.height||((g=e.pixelRatio)==null?void 0:g[0])!==p.pixelRatio[0]||((f=e.pixelRatio)==null?void 0:f[1])!==p.pixelRatio[1]){e.width=p.width,e.height=p.height,e.pixelRatio=p.pixelRatio,e.sps=[m],e.duration=n;const E=m.subarray(1,4);let x="avc1.";for(let T=0;T<3;T++){let _=E[T].toString(16);_.length<2&&(_="0"+_),x+=_}e.codec=x}break}case 8:l=!0,e.pps=[u.data];break;case 9:l=!0,e.audFound=!0,a&&this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"");break;case 12:l=!0;break;default:l=!1,a&&(a.debug+="unknown NAL "+u.type+" ");break}a&&l&&a.units.push(u)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return e[t]&31}readSliceType(e){const t=new Xt(e);return t.readUByte(),t.readUEG(),t.readUEG()}skipScalingList(e,t){let s=8,i=8,n;for(let o=0;o<e;o++)i!==0&&(n=t.readEG(),i=(s+n+256)%256),s=i===0?s:i}readSPS(e){const t=new Xt(e);let s=0,i=0,n=0,o=0,a,l,c;const u=t.readUByte.bind(t),h=t.readBits.bind(t),d=t.readUEG.bind(t),g=t.readBoolean.bind(t),f=t.skipBits.bind(t),m=t.skipEG.bind(t),p=t.skipUEG.bind(t),E=this.skipScalingList.bind(this);u();const x=u();if(h(5),f(3),u(),p(),x===100||x===110||x===122||x===244||x===44||x===83||x===86||x===118||x===128){const v=d();if(v===3&&f(1),p(),p(),f(1),g())for(l=v!==3?8:12,c=0;c<l;c++)g()&&(c<6?E(16,t):E(64,t))}p();const T=d();if(T===0)d();else if(T===1)for(f(1),m(),m(),a=d(),c=0;c<a;c++)m();p(),f(1);const _=d(),A=d(),C=h(1);C===0&&f(1),f(1),g()&&(s=d(),i=d(),n=d(),o=d());let L=[1,1];if(g()&&g())switch(u()){case 1:L=[1,1];break;case 2:L=[12,11];break;case 3:L=[10,11];break;case 4:L=[16,11];break;case 5:L=[40,33];break;case 6:L=[24,11];break;case 7:L=[20,11];break;case 8:L=[32,11];break;case 9:L=[80,33];break;case 10:L=[18,11];break;case 11:L=[15,11];break;case 12:L=[64,33];break;case 13:L=[160,99];break;case 14:L=[4,3];break;case 15:L=[3,2];break;case 16:L=[2,1];break;case 255:{L=[u()<<8|u(),u()<<8|u()];break}}return{width:Math.ceil((_+1)*16-s*2-i*2),height:(2-C)*(A+1)*16-(C?2:4)*(n+o),pixelRatio:L}}}class ln extends $o{constructor(...e){super(...e),this.initVPS=null}parsePES(e,t,s,i,n){const o=this.parseNALu(e,s.data,i);let a=this.VideoSample,l,c=!1;s.data=null,a&&o.length&&!e.audFound&&(this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"")),o.forEach(u=>{var h;switch(u.type){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:a||(a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"")),a.frame=!0,l=!0;break;case 16:case 17:case 18:case 21:if(l=!0,c){var d;(d=a)!=null&&d.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null)}a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.key=!0,a.frame=!0;break;case 19:case 20:l=!0,(h=a)!=null&&h.frame&&!a.key&&(this.pushAccessUnit(a,e),a=this.VideoSample=null),a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.key=!0,a.frame=!0;break;case 39:l=!0,Xi(u.data,2,s.pts,t.samples);break;case 32:if(l=!0,!e.vps){const g=this.readVPS(u.data);e.params=ve({},g),this.initVPS=u.data}e.vps=[u.data];break;case 33:if(l=!0,c=!0,typeof e.params=="object"){if(e.vps!==void 0&&e.vps[0]!==this.initVPS&&e.sps!==void 0&&!this.matchSPS(e.sps[0],u.data)&&(this.initVPS=e.vps[0],e.sps=e.pps=void 0),!e.sps){const g=this.readSPS(u.data);e.width=g.width,e.height=g.height,e.pixelRatio=g.pixelRatio,e.duration=n,e.codec=g.codecString,e.sps=[];for(const f in g.params)e.params[f]=g.params[f]}e.vps!==void 0&&e.vps[0]===this.initVPS&&e.sps.push(u.data)}a||(a=this.VideoSample=this.createVideoSample(!0,s.pts,s.dts,"")),a.key=!0;break;case 34:if(l=!0,typeof e.params=="object"){if(!e.pps){e.pps=[];const g=this.readPPS(u.data);for(const f in g)e.params[f]=g[f]}(this.initVPS!==null||e.pps.length===0)&&e.pps.push(u.data)}break;case 35:l=!0,e.audFound=!0,a&&this.pushAccessUnit(a,e),a=this.VideoSample=this.createVideoSample(!1,s.pts,s.dts,"");break;default:l=!1,a&&(a.debug+="unknown or irrelevant NAL "+u.type+" ");break}a&&l&&a.units.push(u)}),i&&a&&(this.pushAccessUnit(a,e),this.VideoSample=null)}getNALuType(e,t){return(e[t]&126)>>>1}ebsp2rbsp(e){const t=new Uint8Array(e.byteLength);let s=0;for(let i=0;i<e.byteLength;i++)i>=2&&e[i]===3&&e[i-1]===0&&e[i-2]===0||(t[s]=e[i],s++);return new Uint8Array(t.buffer,0,s)}readVPS(e){const t=new Xt(e);t.readUByte(),t.readUByte(),t.readBits(4),t.skipBits(2),t.readBits(6);const s=t.readBits(3),i=t.readBoolean();return{numTemporalLayers:s+1,temporalIdNested:i}}readSPS(e){const t=new Xt(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.readBits(4);const s=t.readBits(3);t.readBoolean();const i=t.readBits(2),n=t.readBoolean(),o=t.readBits(5),a=t.readUByte(),l=t.readUByte(),c=t.readUByte(),u=t.readUByte(),h=t.readUByte(),d=t.readUByte(),g=t.readUByte(),f=t.readUByte(),m=t.readUByte(),p=t.readUByte(),E=t.readUByte(),x=[],T=[];for(let ne=0;ne<s;ne++)x.push(t.readBoolean()),T.push(t.readBoolean());if(s>0)for(let ne=s;ne<8;ne++)t.readBits(2);for(let ne=0;ne<s;ne++)x[ne]&&(t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte(),t.readUByte()),T[ne]&&t.readUByte();t.readUEG();const _=t.readUEG();_==3&&t.skipBits(1);const A=t.readUEG(),C=t.readUEG(),L=t.readBoolean();let v=0,I=0,R=0,k=0;L&&(v+=t.readUEG(),I+=t.readUEG(),R+=t.readUEG(),k+=t.readUEG());const U=t.readUEG(),K=t.readUEG(),O=t.readUEG(),G=t.readBoolean();for(let ne=G?0:s;ne<=s;ne++)t.skipUEG(),t.skipUEG(),t.skipUEG();if(t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.skipUEG(),t.readBoolean()&&t.readBoolean())for(let _e=0;_e<4;_e++)for(let Ne=0;Ne<(_e===3?2:6);Ne++)if(!t.readBoolean())t.readUEG();else{const Ve=Math.min(64,1<<4+(_e<<1));_e>1&&t.readEG();for(let At=0;At<Ve;At++)t.readEG()}t.readBoolean(),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.skipUEG(),t.skipUEG(),t.readBoolean());const Z=t.readUEG();let N=0;for(let ne=0;ne<Z;ne++){let _e=!1;if(ne!==0&&(_e=t.readBoolean()),_e){ne===Z&&t.readUEG(),t.readBoolean(),t.readUEG();let Ne=0;for(let Et=0;Et<=N;Et++){const Ve=t.readBoolean();let At=!1;Ve||(At=t.readBoolean()),(Ve||At)&&Ne++}N=Ne}else{const Ne=t.readUEG(),Et=t.readUEG();N=Ne+Et;for(let Ve=0;Ve<Ne;Ve++)t.readUEG(),t.readBoolean();for(let Ve=0;Ve<Et;Ve++)t.readUEG(),t.readBoolean()}}if(t.readBoolean()){const ne=t.readUEG();for(let _e=0;_e<ne;_e++){for(let Ne=0;Ne<O+4;Ne++)t.readBits(1);t.readBits(1)}}let q=0,j=1,ee=1,ae=!0,he=1,B=0;t.readBoolean(),t.readBoolean();let ye=!1;if(t.readBoolean()){if(t.readBoolean()){const Tt=t.readUByte(),mr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],is=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Tt>0&&Tt<16?(j=mr[Tt-1],ee=is[Tt-1]):Tt===255&&(j=t.readBits(16),ee=t.readBits(16))}if(t.readBoolean()&&t.readBoolean(),t.readBoolean()&&(t.readBits(3),t.readBoolean(),t.readBoolean()&&(t.readUByte(),t.readUByte(),t.readUByte())),t.readBoolean()&&(t.readUEG(),t.readUEG()),t.readBoolean(),t.readBoolean(),t.readBoolean(),ye=t.readBoolean(),ye&&(v+=t.readUEG(),I+=t.readUEG(),R+=t.readUEG(),k+=t.readUEG()),t.readBoolean()&&(he=t.readBits(32),B=t.readBits(32),t.readBoolean()&&t.readUEG(),t.readBoolean())){const is=t.readBoolean(),pr=t.readBoolean();let Ht=!1;(is||pr)&&(Ht=t.readBoolean(),Ht&&(t.readUByte(),t.readBits(5),t.readBoolean(),t.readBits(5)),t.readBits(4),t.readBits(4),Ht&&t.readBits(4),t.readBits(5),t.readBits(5),t.readBits(5));for(let yr=0;yr<=s;yr++){ae=t.readBoolean();const ya=ae||t.readBoolean();let Er=!1;ya?t.readEG():Er=t.readBoolean();const Tr=Er?1:t.readUEG()+1;if(is)for(let Wt=0;Wt<Tr;Wt++)t.readUEG(),t.readUEG(),Ht&&(t.readUEG(),t.readUEG()),t.skipBits(1);if(pr)for(let Wt=0;Wt<Tr;Wt++)t.readUEG(),t.readUEG(),Ht&&(t.readUEG(),t.readUEG()),t.skipBits(1)}}t.readBoolean()&&(t.readBoolean(),t.readBoolean(),t.readBoolean(),q=t.readUEG())}let Ye=A,gr=C;if(L||ye){let ne=1,_e=1;_===1?ne=_e=2:_==2&&(ne=2),Ye=A-ne*I-ne*v,gr=C-_e*k-_e*R}const ma=i?["A","B","C"][i]:"",pa=a<<24|l<<16|c<<8|u;let Ws=0;for(let ne=0;ne<32;ne++)Ws=(Ws|(pa>>ne&1)<<31-ne)>>>0;let Ys=Ws.toString(16);return o===1&&Ys==="2"&&(Ys="6"),{codecString:`hvc1.${ma}${o}.${Ys}.${n?"H":"L"}${E}.B0`,params:{general_tier_flag:n,general_profile_idc:o,general_profile_space:i,general_profile_compatibility_flags:[a,l,c,u],general_constraint_indicator_flags:[h,d,g,f,m,p],general_level_idc:E,bit_depth:U+8,bit_depth_luma_minus8:U,bit_depth_chroma_minus8:K,min_spatial_segmentation_idc:q,chroma_format_idc:_,frame_rate:{fixed:ae,fps:B/he}},width:Ye,height:gr,pixelRatio:[j,ee]}}readPPS(e){const t=new Xt(this.ebsp2rbsp(e));t.readUByte(),t.readUByte(),t.skipUEG(),t.skipUEG(),t.skipBits(2),t.skipBits(3),t.skipBits(2),t.skipUEG(),t.skipUEG(),t.skipEG(),t.skipBits(2),t.readBoolean()&&t.skipUEG(),t.skipEG(),t.skipEG(),t.skipBits(4);const i=t.readBoolean(),n=t.readBoolean();let o=1;return n&&i?o=0:n?o=3:i&&(o=2),{parallelismType:o}}matchSPS(e,t){return String.fromCharCode.apply(null,e).substr(3)===String.fromCharCode.apply(null,t).substr(3)}}class Eu{constructor(e,t,s){this.keyData=void 0,this.decrypter=void 0,this.keyData=s,this.decrypter=new sr(t,{removePKCS7Padding:!1})}decryptBuffer(e){return this.decrypter.decrypt(e,this.keyData.key.buffer,this.keyData.iv.buffer,mt.cbc)}decryptAacSample(e,t,s){const i=e[t].unit;if(i.length<=16)return;const n=i.subarray(16,i.length-i.length%16),o=n.buffer.slice(n.byteOffset,n.byteOffset+n.length);this.decryptBuffer(o).then(a=>{const l=new Uint8Array(a);i.set(l,16),this.decrypter.isSync()||this.decryptAacSamples(e,t+1,s)})}decryptAacSamples(e,t,s){for(;;t++){if(t>=e.length){s();return}if(!(e[t].unit.length<32)&&(this.decryptAacSample(e,t,s),!this.decrypter.isSync()))return}}getAvcEncryptedData(e){const t=Math.floor((e.length-48)/160)*16+16,s=new Int8Array(t);let i=0;for(let n=32;n<e.length-16;n+=160,i+=16)s.set(e.subarray(n,n+16),i);return s}getAvcDecryptedUnit(e,t){const s=new Uint8Array(t);let i=0;for(let n=32;n<e.length-16;n+=160,i+=16)e.set(s.subarray(i,i+16),n);return e}decryptAvcSample(e,t,s,i,n){const o=fo(n.data),a=this.getAvcEncryptedData(o);this.decryptBuffer(a.buffer).then(l=>{n.data=this.getAvcDecryptedUnit(o,l),this.decrypter.isSync()||this.decryptAvcSamples(e,t,s+1,i)})}decryptAvcSamples(e,t,s,i){if(e instanceof Uint8Array)throw new Error("Cannot decrypt samples of type Uint8Array");for(;;t++,s=0){if(t>=e.length){i();return}const n=e[t].units;for(;!(s>=n.length);s++){const o=n[s];if(!(o.data.length<=48||o.type!==1&&o.type!==5)&&(this.decryptAvcSample(e,t,s,i,o),!this.decrypter.isSync()))return}}}}const Le=188;class ft{constructor(e,t,s,i){this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.sampleAes=null,this.pmtParsed=!1,this.audioCodec=void 0,this.videoCodec=void 0,this._duration=0,this._pmtId=-1,this._videoTrack=void 0,this._audioTrack=void 0,this._id3Track=void 0,this._txtTrack=void 0,this.aacOverFlow=null,this.remainderData=null,this.videoParser=void 0,this.observer=e,this.config=t,this.typeSupported=s,this.logger=i,this.videoParser=null}static probe(e,t){const s=ft.syncOffset(e);return s>0&&t.warn(`MPEG2-TS detected but first sync word found @ offset ${s}`),s!==-1}static syncOffset(e){const t=e.length;let s=Math.min(Le*5,t-Le)+1,i=0;for(;i<s;){let n=!1,o=-1,a=0;for(let l=i;l<t;l+=Le)if(e[l]===71&&(t-l===Le||e[l+Le]===71)){if(a++,o===-1&&(o=l,o!==0&&(s=Math.min(o+Le*99,e.length-Le)+1)),n||(n=Ci(e,l)===0),n&&a>1&&(o===0&&a>2||l+Le>s))return o}else{if(a)return-1;break}i++}return-1}static createTrack(e,t){return{container:e==="video"||e==="audio"?"video/mp2t":void 0,type:e,id:ao[e],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:0,duration:e==="audio"?t:void 0}}resetInitSegment(e,t,s,i){this.pmtParsed=!1,this._pmtId=-1,this._videoTrack=ft.createTrack("video"),this._audioTrack=ft.createTrack("audio",i),this._id3Track=ft.createTrack("id3"),this._txtTrack=ft.createTrack("text"),this._audioTrack.segmentCodec="aac",this.aacOverFlow=null,this.remainderData=null,this.audioCodec=t,this.videoCodec=s,this._duration=i}resetTimeStamp(){}resetContiguity(){const{_audioTrack:e,_videoTrack:t,_id3Track:s}=this;e&&(e.pesData=null),t&&(t.pesData=null),s&&(s.pesData=null),this.aacOverFlow=null,this.remainderData=null}demux(e,t,s=!1,i=!1){s||(this.sampleAes=null);let n;const o=this._videoTrack,a=this._audioTrack,l=this._id3Track,c=this._txtTrack;let u=o.pid,h=o.pesData,d=a.pid,g=l.pid,f=a.pesData,m=l.pesData,p=null,E=this.pmtParsed,x=this._pmtId,T=e.length;if(this.remainderData&&(e=$e(this.remainderData,e),T=e.length,this.remainderData=null),T<Le&&!i)return this.remainderData=e,{audioTrack:a,videoTrack:o,id3Track:l,textTrack:c};const _=Math.max(0,ft.syncOffset(e));T-=(T-_)%Le,T<e.byteLength&&!i&&(this.remainderData=new Uint8Array(e.buffer,T,e.buffer.byteLength-T));let A=0;for(let L=_;L<T;L+=Le)if(e[L]===71){const v=!!(e[L+1]&64),I=Ci(e,L),R=(e[L+3]&48)>>4;let k;if(R>1){if(k=L+5+e[L+4],k===L+Le)continue}else k=L+4;switch(I){case u:if(v){if(h&&(n=Dt(h,this.logger))){if(this.videoParser===null)switch(o.segmentCodec){case"avc":this.videoParser=new an;break;case"hevc":this.videoParser=new ln;break}this.videoParser!==null&&this.videoParser.parsePES(o,c,n,!1,this._duration)}h={data:[],size:0}}h&&(h.data.push(e.subarray(k,L+Le)),h.size+=L+Le-k);break;case d:if(v){if(f&&(n=Dt(f,this.logger)))switch(a.segmentCodec){case"aac":this.parseAACPES(a,n);break;case"mp3":this.parseMPEGPES(a,n);break;case"ac3":this.parseAC3PES(a,n);break}f={data:[],size:0}}f&&(f.data.push(e.subarray(k,L+Le)),f.size+=L+Le-k);break;case g:v&&(m&&(n=Dt(m,this.logger))&&this.parseID3PES(l,n),m={data:[],size:0}),m&&(m.data.push(e.subarray(k,L+Le)),m.size+=L+Le-k);break;case 0:v&&(k+=e[k]+1),x=this._pmtId=Tu(e,k);break;case x:{v&&(k+=e[k]+1);const U=xu(e,k,this.typeSupported,s,this.observer,this.logger);u=U.videoPid,u>0&&(o.pid=u,o.segmentCodec=U.segmentVideoCodec),d=U.audioPid,d>0&&(a.pid=d,a.segmentCodec=U.segmentAudioCodec),g=U.id3Pid,g>0&&(l.pid=g),p!==null&&!E&&(this.logger.warn(`MPEG-TS PMT found at ${L} after unknown PID '${p}'. Backtracking to sync byte @${_} to parse all TS packets.`),p=null,L=_-188),E=this.pmtParsed=!0;break}case 17:case 8191:break;default:p=I;break}}else A++;A>0&&wi(this.observer,new Error(`Found ${A} TS packet/s that do not start with 0x47`),void 0,this.logger),o.pesData=h,a.pesData=f,l.pesData=m;const C={audioTrack:a,videoTrack:o,id3Track:l,textTrack:c};return i&&this.extractRemainingSamples(C),C}flush(){const{remainderData:e}=this;this.remainderData=null;let t;return e?t=this.demux(e,-1,!1,!0):t={videoTrack:this._videoTrack,audioTrack:this._audioTrack,id3Track:this._id3Track,textTrack:this._txtTrack},this.extractRemainingSamples(t),this.sampleAes?this.decrypt(t,this.sampleAes):t}extractRemainingSamples(e){const{audioTrack:t,videoTrack:s,id3Track:i,textTrack:n}=e,o=s.pesData,a=t.pesData,l=i.pesData;let c;if(o&&(c=Dt(o,this.logger))){if(this.videoParser===null)switch(s.segmentCodec){case"avc":this.videoParser=new an;break;case"hevc":this.videoParser=new ln;break}this.videoParser!==null&&(this.videoParser.parsePES(s,n,c,!0,this._duration),s.pesData=null)}else s.pesData=o;if(a&&(c=Dt(a,this.logger))){switch(t.segmentCodec){case"aac":this.parseAACPES(t,c);break;case"mp3":this.parseMPEGPES(t,c);break;case"ac3":this.parseAC3PES(t,c);break}t.pesData=null}else a!=null&&a.size&&this.logger.log("last AAC PES packet truncated,might overlap between fragments"),t.pesData=a;l&&(c=Dt(l,this.logger))?(this.parseID3PES(i,c),i.pesData=null):i.pesData=l}demuxSampleAes(e,t,s){const i=this.demux(e,s,!0,!this.config.progressive),n=this.sampleAes=new Eu(this.observer,this.config,t);return this.decrypt(i,n)}decrypt(e,t){return new Promise(s=>{const{audioTrack:i,videoTrack:n}=e;i.samples&&i.segmentCodec==="aac"?t.decryptAacSamples(i.samples,0,()=>{n.samples?t.decryptAvcSamples(n.samples,0,0,()=>{s(e)}):s(e)}):n.samples&&t.decryptAvcSamples(n.samples,0,0,()=>{s(e)})})}destroy(){this._duration=0}parseAACPES(e,t){let s=0;const i=this.aacOverFlow;let n=t.data;if(i){this.aacOverFlow=null;const h=i.missing,d=i.sample.unit.byteLength;if(h===-1)n=$e(i.sample.unit,n);else{const g=d-h;i.sample.unit.set(n.subarray(0,h),g),e.samples.push(i.sample),s=i.missing}}let o,a;for(o=s,a=n.length;o<a-1&&!Gs(n,o);o++);if(o!==s){let h;const d=o<a-1;if(d?h=`AAC PES did not start with ADTS header,offset:${o}`:h="No ADTS header found in AAC PES",wi(this.observer,new Error(h),d,this.logger),!d)return}ko(e,this.observer,n,o,this.audioCodec);let l;if(t.pts!==void 0)l=t.pts;else if(i){const h=Po(e.samplerate);l=i.sample.pts+h}else{this.logger.warn("[tsdemuxer]: AAC PES unknown PTS");return}let c=0,u;for(;o<a;)if(u=Fo(e,n,o,l,c),o+=u.length,u.missing){this.aacOverFlow=u;break}else for(c++;o<a-1&&!Gs(n,o);o++);}parseMPEGPES(e,t){const s=t.data,i=s.length;let n=0,o=0;const a=t.pts;if(a===void 0){this.logger.warn("[tsdemuxer]: MPEG PES unknown PTS");return}for(;o<i;)if(No(s,o)){const l=Oo(e,s,o,a,n);if(l)o+=l.length,n++;else break}else o++}parseAC3PES(e,t){{const s=t.data,i=t.pts;if(i===void 0){this.logger.warn("[tsdemuxer]: AC3 PES unknown PTS");return}const n=s.length;let o=0,a=0,l;for(;a<n&&(l=Go(e,s,a,i,o++))>0;)a+=l}}parseID3PES(e,t){if(t.pts===void 0){this.logger.warn("[tsdemuxer]: ID3 PES unknown PTS");return}const s=pe({},t,{type:this._videoTrack?He.emsg:He.audioId3,duration:Number.POSITIVE_INFINITY});e.samples.push(s)}}function Ci(r,e){return((r[e+1]&31)<<8)+r[e+2]}function Tu(r,e){return(r[e+10]&31)<<8|r[e+11]}function xu(r,e,t,s,i,n){const o={audioPid:-1,videoPid:-1,id3Pid:-1,segmentVideoCodec:"avc",segmentAudioCodec:"aac"},a=(r[e+1]&15)<<8|r[e+2],l=e+3+a-4,c=(r[e+10]&15)<<8|r[e+11];for(e+=12+c;e<l;){const u=Ci(r,e),h=(r[e+3]&15)<<8|r[e+4];switch(r[e]){case 207:if(!s){ri("ADTS AAC",n);break}case 15:o.audioPid===-1&&(o.audioPid=u);break;case 21:o.id3Pid===-1&&(o.id3Pid=u);break;case 219:if(!s){ri("H.264",n);break}case 27:o.videoPid===-1&&(o.videoPid=u,o.segmentVideoCodec="avc");break;case 3:case 4:!t.mpeg&&!t.mp3?n.log("MPEG audio found, not supported in this browser"):o.audioPid===-1&&(o.audioPid=u,o.segmentAudioCodec="mp3");break;case 193:if(!s){ri("AC-3",n);break}case 129:t.ac3?o.audioPid===-1&&(o.audioPid=u,o.segmentAudioCodec="ac3"):n.log("AC-3 audio found, not supported in this browser");break;case 6:if(o.audioPid===-1&&h>0){let d=e+5,g=h;for(;g>2;){switch(r[d]){case 106:t.ac3!==!0?n.log("AC-3 audio found, not supported in this browser for now"):(o.audioPid=u,o.segmentAudioCodec="ac3");break}const m=r[d+1]+2;d+=m,g-=m}}break;case 194:case 135:return wi(i,new Error("Unsupported EC-3 in M2TS found"),void 0,n),o;case 36:o.videoPid===-1&&(o.videoPid=u,o.segmentVideoCodec="hevc",n.log("HEVC in M2TS found"));break}e+=h+5}return o}function wi(r,e,t,s){s.warn(`parsing error: ${e.message}`),r.emit(y.ERROR,y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,levelRetry:t,error:e,reason:e.message})}function ri(r,e){e.log(`${r} with AES-128-CBC encryption found in unencrypted stream`)}function Dt(r,e){let t=0,s,i,n,o,a;const l=r.data;if(!r||r.size===0)return null;for(;l[0].length<19&&l.length>1;)l[0]=$e(l[0],l[1]),l.splice(1,1);if(s=l[0],(s[0]<<16)+(s[1]<<8)+s[2]===1){if(i=(s[4]<<8)+s[5],i&&i>r.size-6)return null;const u=s[7];u&192&&(o=(s[9]&14)*536870912+(s[10]&255)*4194304+(s[11]&254)*16384+(s[12]&255)*128+(s[13]&254)/2,u&64?(a=(s[14]&14)*536870912+(s[15]&255)*4194304+(s[16]&254)*16384+(s[17]&255)*128+(s[18]&254)/2,o-a>60*9e4&&(e.warn(`${Math.round((o-a)/9e4)}s delta between PTS and DTS, align them`),o=a)):a=o),n=s[8];let h=n+9;if(r.size<=h)return null;r.size-=h;const d=new Uint8Array(r.size);for(let g=0,f=l.length;g<f;g++){s=l[g];let m=s.byteLength;if(h)if(h>m){h-=m;continue}else s=s.subarray(h),m-=h,h=0;d.set(s,t),t+=m}return i&&(i-=n+3),{data:d,pts:o,dts:a,len:i}}return null}class Su extends nr{resetInitSegment(e,t,s,i){super.resetInitSegment(e,t,s,i),this._audioTrack={container:"audio/mpeg",type:"audio",id:2,pid:-1,sequenceNumber:0,segmentCodec:"mp3",samples:[],manifestCodec:t,duration:i,inputTimeScale:9e4,dropped:0}}static probe(e){if(!e)return!1;const t=ss(e,0);let s=(t==null?void 0:t.length)||0;if(t&&e[s]===11&&e[s+1]===119&&rr(t)!==void 0&&Uo(e,s)<=16)return!1;for(let i=e.length;s<i;s++)if(Bo(e,s))return te.log("MPEG Audio sync word found !"),!0;return!1}canParse(e,t){return fu(e,t)}appendFrame(e,t,s){if(this.basePTS!==null)return Oo(e,t,s,this.basePTS,this.frameIndex)}}class vu{static getSilentFrame(e,t){switch(e){case"mp4a.40.2":if(t===1)return new Uint8Array([0,200,0,128,35,128]);if(t===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(t===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(t===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(t===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(t===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224]);break;default:if(t===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(t===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);break}}}const ht=Math.pow(2,32)-1;class b{static init(){b.types={avc1:[],avcC:[],hvc1:[],hvcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],dac3:[],"ac-3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]};let e;for(e in b.types)b.types.hasOwnProperty(e)&&(b.types[e]=[e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2),e.charCodeAt(3)]);const t=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);b.HDLR_TYPES={video:t,audio:s};const i=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),n=new Uint8Array([0,0,0,0,0,0,0,0]);b.STTS=b.STSC=b.STCO=n,b.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),b.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),b.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),b.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);const o=new Uint8Array([105,115,111,109]),a=new Uint8Array([97,118,99,49]),l=new Uint8Array([0,0,0,1]);b.FTYP=b.box(b.types.ftyp,o,l,o,a),b.DINF=b.box(b.types.dinf,b.box(b.types.dref,i))}static box(e,...t){let s=8,i=t.length;const n=i;for(;i--;)s+=t[i].byteLength;const o=new Uint8Array(s);for(o[0]=s>>24&255,o[1]=s>>16&255,o[2]=s>>8&255,o[3]=s&255,o.set(e,4),i=0,s=8;i<n;i++)o.set(t[i],s),s+=t[i].byteLength;return o}static hdlr(e){return b.box(b.types.hdlr,b.HDLR_TYPES[e])}static mdat(e){return b.box(b.types.mdat,e)}static mdhd(e,t){t*=e;const s=Math.floor(t/(ht+1)),i=Math.floor(t%(ht+1));return b.box(b.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255,85,196,0,0]))}static mdia(e){return b.box(b.types.mdia,b.mdhd(e.timescale,e.duration),b.hdlr(e.type),b.minf(e))}static mfhd(e){return b.box(b.types.mfhd,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,e&255]))}static minf(e){return e.type==="audio"?b.box(b.types.minf,b.box(b.types.smhd,b.SMHD),b.DINF,b.stbl(e)):b.box(b.types.minf,b.box(b.types.vmhd,b.VMHD),b.DINF,b.stbl(e))}static moof(e,t,s){return b.box(b.types.moof,b.mfhd(e),b.traf(s,t))}static moov(e){let t=e.length;const s=[];for(;t--;)s[t]=b.trak(e[t]);return b.box.apply(null,[b.types.moov,b.mvhd(e[0].timescale,e[0].duration)].concat(s).concat(b.mvex(e)))}static mvex(e){let t=e.length;const s=[];for(;t--;)s[t]=b.trex(e[t]);return b.box.apply(null,[b.types.mvex,...s])}static mvhd(e,t){t*=e;const s=Math.floor(t/(ht+1)),i=Math.floor(t%(ht+1)),n=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,e&255,s>>24,s>>16&255,s>>8&255,s&255,i>>24,i>>16&255,i>>8&255,i&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return b.box(b.types.mvhd,n)}static sdtp(e){const t=e.samples||[],s=new Uint8Array(4+t.length);let i,n;for(i=0;i<t.length;i++)n=t[i].flags,s[i+4]=n.dependsOn<<4|n.isDependedOn<<2|n.hasRedundancy;return b.box(b.types.sdtp,s)}static stbl(e){return b.box(b.types.stbl,b.stsd(e),b.box(b.types.stts,b.STTS),b.box(b.types.stsc,b.STSC),b.box(b.types.stsz,b.STSZ),b.box(b.types.stco,b.STCO))}static avc1(e){let t=[],s=[],i,n,o;for(i=0;i<e.sps.length;i++)n=e.sps[i],o=n.byteLength,t.push(o>>>8&255),t.push(o&255),t=t.concat(Array.prototype.slice.call(n));for(i=0;i<e.pps.length;i++)n=e.pps[i],o=n.byteLength,s.push(o>>>8&255),s.push(o&255),s=s.concat(Array.prototype.slice.call(n));const a=b.box(b.types.avcC,new Uint8Array([1,t[3],t[4],t[5],255,224|e.sps.length].concat(t).concat([e.pps.length]).concat(s))),l=e.width,c=e.height,u=e.pixelRatio[0],h=e.pixelRatio[1];return b.box(b.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,l>>8&255,l&255,c>>8&255,c&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),a,b.box(b.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),b.box(b.types.pasp,new Uint8Array([u>>24,u>>16&255,u>>8&255,u&255,h>>24,h>>16&255,h>>8&255,h&255])))}static esds(e){const t=e.config.length;return new Uint8Array([0,0,0,0,3,23+t,0,1,0,4,15+t,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([t]).concat(e.config).concat([6,1,2]))}static audioStsd(e){const t=e.samplerate;return new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,e.channelCount,0,16,0,0,0,0,t>>8&255,t&255,0,0])}static mp4a(e){return b.box(b.types.mp4a,b.audioStsd(e),b.box(b.types.esds,b.esds(e)))}static mp3(e){return b.box(b.types[".mp3"],b.audioStsd(e))}static ac3(e){return b.box(b.types["ac-3"],b.audioStsd(e),b.box(b.types.dac3,e.config))}static stsd(e){return e.type==="audio"?e.segmentCodec==="mp3"&&e.codec==="mp3"?b.box(b.types.stsd,b.STSD,b.mp3(e)):e.segmentCodec==="ac3"?b.box(b.types.stsd,b.STSD,b.ac3(e)):b.box(b.types.stsd,b.STSD,b.mp4a(e)):e.segmentCodec==="avc"?b.box(b.types.stsd,b.STSD,b.avc1(e)):b.box(b.types.stsd,b.STSD,b.hvc1(e))}static tkhd(e){const t=e.id,s=e.duration*e.timescale,i=e.width,n=e.height,o=Math.floor(s/(ht+1)),a=Math.floor(s%(ht+1));return b.box(b.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,t>>24&255,t>>16&255,t>>8&255,t&255,0,0,0,0,o>>24,o>>16&255,o>>8&255,o&255,a>>24,a>>16&255,a>>8&255,a&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,i>>8&255,i&255,0,0,n>>8&255,n&255,0,0]))}static traf(e,t){const s=b.sdtp(e),i=e.id,n=Math.floor(t/(ht+1)),o=Math.floor(t%(ht+1));return b.box(b.types.traf,b.box(b.types.tfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,i&255])),b.box(b.types.tfdt,new Uint8Array([1,0,0,0,n>>24,n>>16&255,n>>8&255,n&255,o>>24,o>>16&255,o>>8&255,o&255])),b.trun(e,s.length+16+20+8+16+8+8),s)}static trak(e){return e.duration=e.duration||4294967295,b.box(b.types.trak,b.tkhd(e),b.mdia(e))}static trex(e){const t=e.id;return b.box(b.types.trex,new Uint8Array([0,0,0,0,t>>24,t>>16&255,t>>8&255,t&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))}static trun(e,t){const s=e.samples||[],i=s.length,n=12+16*i,o=new Uint8Array(n);let a,l,c,u,h,d;for(t+=8+n,o.set([e.type==="video"?1:0,0,15,1,i>>>24&255,i>>>16&255,i>>>8&255,i&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255],0),a=0;a<i;a++)l=s[a],c=l.duration,u=l.size,h=l.flags,d=l.cts,o.set([c>>>24&255,c>>>16&255,c>>>8&255,c&255,u>>>24&255,u>>>16&255,u>>>8&255,u&255,h.isLeading<<2|h.dependsOn,h.isDependedOn<<6|h.hasRedundancy<<4|h.paddingValue<<1|h.isNonSync,h.degradPrio&61440,h.degradPrio&15,d>>>24&255,d>>>16&255,d>>>8&255,d&255],12+16*a);return b.box(b.types.trun,o)}static initSegment(e){b.types||b.init();const t=b.moov(e);return $e(b.FTYP,t)}static hvc1(e){const t=e.params,s=[e.vps,e.sps,e.pps],i=4,n=new Uint8Array([1,t.general_profile_space<<6|(t.general_tier_flag?32:0)|t.general_profile_idc,t.general_profile_compatibility_flags[0],t.general_profile_compatibility_flags[1],t.general_profile_compatibility_flags[2],t.general_profile_compatibility_flags[3],t.general_constraint_indicator_flags[0],t.general_constraint_indicator_flags[1],t.general_constraint_indicator_flags[2],t.general_constraint_indicator_flags[3],t.general_constraint_indicator_flags[4],t.general_constraint_indicator_flags[5],t.general_level_idc,240|t.min_spatial_segmentation_idc>>8,255&t.min_spatial_segmentation_idc,252|t.parallelismType,252|t.chroma_format_idc,248|t.bit_depth_luma_minus8,248|t.bit_depth_chroma_minus8,0,parseInt(t.frame_rate.fps),i-1|t.temporal_id_nested<<2|t.num_temporal_layers<<3|(t.frame_rate.fixed?64:0),s.length]);let o=n.length;for(let f=0;f<s.length;f+=1){o+=3;for(let m=0;m<s[f].length;m+=1)o+=2+s[f][m].length}const a=new Uint8Array(o);a.set(n,0),o=n.length;const l=s.length-1;for(let f=0;f<s.length;f+=1){a.set(new Uint8Array([32+f|(f===l?128:0),0,s[f].length]),o),o+=3;for(let m=0;m<s[f].length;m+=1)a.set(new Uint8Array([s[f][m].length>>8,s[f][m].length&255]),o),o+=2,a.set(s[f][m],o),o+=s[f][m].length}const c=b.box(b.types.hvcC,a),u=e.width,h=e.height,d=e.pixelRatio[0],g=e.pixelRatio[1];return b.box(b.types.hvc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,u>>8&255,u&255,h>>8&255,h&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),c,b.box(b.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),b.box(b.types.pasp,new Uint8Array([d>>24,d>>16&255,d>>8&255,d&255,g>>24,g>>16&255,g>>8&255,g&255])))}}b.types=void 0;b.HDLR_TYPES=void 0;b.STTS=void 0;b.STSC=void 0;b.STCO=void 0;b.STSZ=void 0;b.VMHD=void 0;b.SMHD=void 0;b.STSD=void 0;b.FTYP=void 0;b.DINF=void 0;const Vo=9e4;function lr(r,e,t=1,s=!1){const i=r*e*t;return s?Math.round(i):i}function Lu(r,e,t=1,s=!1){return lr(r,e,1/t,s)}function qt(r,e=!1){return lr(r,1e3,1/Vo,e)}function Au(r,e=1){return lr(r,Vo,1/e)}const bu=10*1e3,_u=1024,Ru=1152,Iu=1536;let Ct=null,ni=null;class vs{constructor(e,t,s,i){if(this.logger=void 0,this.observer=void 0,this.config=void 0,this.typeSupported=void 0,this.ISGenerated=!1,this._initPTS=null,this._initDTS=null,this.nextAvcDts=null,this.nextAudioPts=null,this.videoSampleDuration=null,this.isAudioContiguous=!1,this.isVideoContiguous=!1,this.videoTrackConfig=void 0,this.observer=e,this.config=t,this.typeSupported=s,this.logger=i,this.ISGenerated=!1,Ct===null){const o=(navigator.userAgent||"").match(/Chrome\/(\d+)/i);Ct=o?parseInt(o[1]):0}if(ni===null){const n=navigator.userAgent.match(/Safari\/(\d+)/i);ni=n?parseInt(n[1]):0}}destroy(){this.config=this.videoTrackConfig=this._initPTS=this._initDTS=null}resetTimeStamp(e){this.logger.log("[mp4-remuxer]: initPTS & initDTS reset"),this._initPTS=this._initDTS=e}resetNextTimestamp(){this.logger.log("[mp4-remuxer]: reset next timestamp"),this.isVideoContiguous=!1,this.isAudioContiguous=!1}resetInitSegment(){this.logger.log("[mp4-remuxer]: ISGenerated flag reset"),this.ISGenerated=!1,this.videoTrackConfig=void 0}getVideoStartPts(e){let t=!1;const s=e.reduce((i,n)=>{const o=n.pts-i;return o<-4294967296?(t=!0,Ge(i,n.pts)):o>0?i:n.pts},e[0].pts);return t&&this.logger.debug("PTS rollover detected"),s}remux(e,t,s,i,n,o,a,l){let c,u,h,d,g,f,m=n,p=n;const E=e.pid>-1,x=t.pid>-1,T=t.samples.length,_=e.samples.length>0,A=a&&T>0||T>1;if((!E||_)&&(!x||A)||this.ISGenerated||a){if(this.ISGenerated){var L,v,I,R;const O=this.videoTrackConfig;(O&&(t.width!==O.width||t.height!==O.height||((L=t.pixelRatio)==null?void 0:L[0])!==((v=O.pixelRatio)==null?void 0:v[0])||((I=t.pixelRatio)==null?void 0:I[1])!==((R=O.pixelRatio)==null?void 0:R[1]))||!O&&A||this.nextAudioPts===null&&_)&&this.resetInitSegment()}this.ISGenerated||(h=this.generateIS(e,t,n,o));const k=this.isVideoContiguous;let U=-1,K;if(A&&(U=Du(t.samples),!k&&this.config.forceKeyFrameOnDiscontinuity))if(f=!0,U>0){this.logger.warn(`[mp4-remuxer]: Dropped ${U} out of ${T} video samples due to a missing keyframe`);const O=this.getVideoStartPts(t.samples);t.samples=t.samples.slice(U),t.dropped+=U,p+=(t.samples[0].pts-O)/t.inputTimeScale,K=p}else U===-1&&(this.logger.warn(`[mp4-remuxer]: No keyframe found out of ${T} video samples`),f=!1);if(this.ISGenerated){if(_&&A){const O=this.getVideoStartPts(t.samples),P=(Ge(e.samples[0].pts,O)-O)/t.inputTimeScale;m+=Math.max(0,P),p+=Math.max(0,-P)}if(_){if(e.samplerate||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as audio detected"),h=this.generateIS(e,t,n,o)),u=this.remuxAudio(e,m,this.isAudioContiguous,o,x||A||l===H.AUDIO?p:void 0),A){const O=u?u.endPTS-u.startPTS:0;t.inputTimeScale||(this.logger.warn("[mp4-remuxer]: regenerate InitSegment as video detected"),h=this.generateIS(e,t,n,o)),c=this.remuxVideo(t,p,k,O)}}else A&&(c=this.remuxVideo(t,p,k,0));c&&(c.firstKeyFrame=U,c.independent=U!==-1,c.firstKeyFramePTS=K)}}return this.ISGenerated&&this._initPTS&&this._initDTS&&(s.samples.length&&(g=Ko(s,n,this._initPTS,this._initDTS)),i.samples.length&&(d=Ho(i,n,this._initPTS))),{audio:u,video:c,initSegment:h,independent:f,text:d,id3:g}}generateIS(e,t,s,i){const n=e.samples,o=t.samples,a=this.typeSupported,l={},c=this._initPTS;let u=!c||i,h="audio/mp4",d,g,f;if(u&&(d=g=1/0),e.config&&n.length){switch(e.timescale=e.samplerate,e.segmentCodec){case"mp3":a.mpeg?(h="audio/mpeg",e.codec=""):a.mp3&&(e.codec="mp3");break;case"ac3":e.codec="ac-3";break}l.audio={id:"audio",container:h,codec:e.codec,initSegment:e.segmentCodec==="mp3"&&a.mpeg?new Uint8Array(0):b.initSegment([e]),metadata:{channelCount:e.channelCount}},u&&(f=e.inputTimeScale,!c||f!==c.timescale?d=g=n[0].pts-Math.round(f*s):u=!1)}if(t.sps&&t.pps&&o.length){if(t.timescale=t.inputTimeScale,l.video={id:"main",container:"video/mp4",codec:t.codec,initSegment:b.initSegment([t]),metadata:{width:t.width,height:t.height}},u)if(f=t.inputTimeScale,!c||f!==c.timescale){const m=this.getVideoStartPts(o),p=Math.round(f*s);g=Math.min(g,Ge(o[0].dts,m)-p),d=Math.min(d,m-p)}else u=!1;this.videoTrackConfig={width:t.width,height:t.height,pixelRatio:t.pixelRatio}}if(Object.keys(l).length)return this.ISGenerated=!0,u?(this._initPTS={baseTime:d,timescale:f},this._initDTS={baseTime:g,timescale:f}):d=f=void 0,{tracks:l,initPTS:d,timescale:f}}remuxVideo(e,t,s,i){const n=e.inputTimeScale,o=e.samples,a=[],l=o.length,c=this._initPTS;let u=this.nextAvcDts,h=8,d=this.videoSampleDuration,g,f,m=Number.POSITIVE_INFINITY,p=Number.NEGATIVE_INFINITY,E=!1;if(!s||u===null){const N=t*n,M=o[0].pts-Ge(o[0].dts,o[0].pts);Ct&&u!==null&&Math.abs(N-M-u)<15e3?s=!0:u=N-M}const x=c.baseTime*n/c.timescale;for(let N=0;N<l;N++){const M=o[N];M.pts=Ge(M.pts-x,u),M.dts=Ge(M.dts-x,u),M.dts<o[N>0?N-1:N].dts&&(E=!0)}E&&o.sort(function(N,M){const q=N.dts-M.dts,j=N.pts-M.pts;return q||j}),g=o[0].dts,f=o[o.length-1].dts;const T=f-g,_=T?Math.round(T/(l-1)):d||e.inputTimeScale/30;if(s){const N=g-u,M=N>_,q=N<-1;if((M||q)&&(M?this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${qt(N,!0)} ms (${N}dts) hole between fragments detected at ${t.toFixed(3)}`):this.logger.warn(`${(e.segmentCodec||"").toUpperCase()}: ${qt(-N,!0)} ms (${N}dts) overlapping between fragments detected at ${t.toFixed(3)}`),!q||u>=o[0].pts||Ct)){g=u;const j=o[0].pts-N;if(M)o[0].dts=g,o[0].pts=j;else{let ee=!0;for(let ae=0;ae<o.length&&!(o[ae].dts>j&&ee);ae++){const he=o[ae].pts;if(o[ae].dts-=N,o[ae].pts-=N,ae<o.length-1){const B=o[ae+1].pts,ye=o[ae].pts,xe=B<=ye,Ye=B<=he;ee=xe==Ye}}}this.logger.log(`Video: Initial PTS/DTS adjusted: ${qt(j,!0)}/${qt(g,!0)}, delta: ${qt(N,!0)} ms`)}}g=Math.max(0,g);let A=0,C=0,L=g;for(let N=0;N<l;N++){const M=o[N],q=M.units,j=q.length;let ee=0;for(let ae=0;ae<j;ae++)ee+=q[ae].data.length;C+=ee,A+=j,M.length=ee,M.dts<L?(M.dts=L,L+=_/4|0||1):L=M.dts,m=Math.min(M.pts,m),p=Math.max(M.pts,p)}f=o[l-1].dts;const v=C+4*A+8;let I;try{I=new Uint8Array(v)}catch(N){this.observer.emit(y.ERROR,y.ERROR,{type:Y.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:N,bytes:v,reason:`fail allocating video mdat ${v}`});return}const R=new DataView(I.buffer);R.setUint32(0,v),I.set(b.types.mdat,4);let k=!1,U=Number.POSITIVE_INFINITY,K=Number.POSITIVE_INFINITY,O=Number.NEGATIVE_INFINITY,G=Number.NEGATIVE_INFINITY;for(let N=0;N<l;N++){const M=o[N],q=M.units;let j=0;for(let he=0,B=q.length;he<B;he++){const ye=q[he],xe=ye.data,Ye=ye.data.byteLength;R.setUint32(h,Ye),h+=4,I.set(xe,h),h+=Ye,j+=4+Ye}let ee;if(N<l-1)d=o[N+1].dts-M.dts,ee=o[N+1].pts-M.pts;else{const he=this.config,B=N>0?M.dts-o[N-1].dts:_;if(ee=N>0?M.pts-o[N-1].pts:_,he.stretchShortVideoTrack&&this.nextAudioPts!==null){const ye=Math.floor(he.maxBufferHole*n),xe=(i?m+i*n:this.nextAudioPts)-M.pts;xe>ye?(d=xe-B,d<0?d=B:k=!0,this.logger.log(`[mp4-remuxer]: It is approximately ${xe/90} ms to the next segment; using duration ${d/90} ms for the last video frame.`)):d=B}else d=B}const ae=Math.round(M.pts-M.dts);U=Math.min(U,d),O=Math.max(O,d),K=Math.min(K,ee),G=Math.max(G,ee),a.push(new cn(M.key,d,j,ae))}if(a.length){if(Ct){if(Ct<70){const N=a[0].flags;N.dependsOn=2,N.isNonSync=0}}else if(ni&&G-K<O-U&&_/O<.025&&a[0].cts===0){this.logger.warn("Found irregular gaps in sample duration. Using PTS instead of DTS to determine MP4 sample duration.");let N=g;for(let M=0,q=a.length;M<q;M++){const j=N+a[M].duration,ee=N+a[M].cts;if(M<q-1){const ae=j+a[M+1].cts;a[M].duration=ae-ee}else a[M].duration=M?a[M-1].duration:_;a[M].cts=0,N=j}}}d=k||!d?_:d,this.nextAvcDts=u=f+d,this.videoSampleDuration=d,this.isVideoContiguous=!0;const Z={data1:b.moof(e.sequenceNumber++,g,pe({},e,{samples:a})),data2:I,startPTS:m/n,endPTS:(p+d)/n,startDTS:g/n,endDTS:u/n,type:"video",hasAudio:!1,hasVideo:!0,nb:a.length,dropped:e.dropped};return e.samples=[],e.dropped=0,Z}getSamplesPerFrame(e){switch(e.segmentCodec){case"mp3":return Ru;case"ac3":return Iu;default:return _u}}remuxAudio(e,t,s,i,n){const o=e.inputTimeScale,a=e.samplerate?e.samplerate:o,l=o/a,c=this.getSamplesPerFrame(e),u=c*l,h=this._initPTS,d=e.segmentCodec==="mp3"&&this.typeSupported.mpeg,g=[],f=n!==void 0;let m=e.samples,p=d?0:8,E=this.nextAudioPts||-1;const x=t*o,T=h.baseTime*o/h.timescale;if(this.isAudioContiguous=s=s||m.length&&E>0&&(i&&Math.abs(x-E)<9e3||Math.abs(Ge(m[0].pts-T,x)-E)<20*u),m.forEach(function(P){P.pts=Ge(P.pts-T,x)}),!s||E<0){if(m=m.filter(P=>P.pts>=0),!m.length)return;n===0?E=0:i&&!f?E=Math.max(0,x):E=m[0].pts}if(e.segmentCodec==="aac"){const P=this.config.maxAudioFramesDrift;for(let F=0,Z=E;F<m.length;F++){const N=m[F],M=N.pts,q=M-Z,j=Math.abs(1e3*q/o);if(q<=-P*u&&f)F===0&&(this.logger.warn(`Audio frame @ ${(M/o).toFixed(3)}s overlaps nextAudioPts by ${Math.round(1e3*q/o)} ms.`),this.nextAudioPts=E=Z=M);else if(q>=P*u&&j<bu&&f){let ee=Math.round(q/u);Z=M-ee*u,Z<0&&(ee--,Z+=u),F===0&&(this.nextAudioPts=E=Z),this.logger.warn(`[mp4-remuxer]: Injecting ${ee} audio frame @ ${(Z/o).toFixed(3)}s due to ${Math.round(1e3*q/o)} ms gap.`);for(let ae=0;ae<ee;ae++){const he=Math.max(Z,0);let B=vu.getSilentFrame(e.parsedCodec||e.manifestCodec||e.codec,e.channelCount);B||(this.logger.log("[mp4-remuxer]: Unable to get silent frame for given audio codec; duplicating last frame instead."),B=N.unit.subarray()),m.splice(F,0,{unit:B,pts:he}),Z+=u,F++}}N.pts=Z,Z+=u}}let _=null,A=null,C,L=0,v=m.length;for(;v--;)L+=m[v].unit.byteLength;for(let P=0,F=m.length;P<F;P++){const Z=m[P],N=Z.unit;let M=Z.pts;if(A!==null){const j=g[P-1];j.duration=Math.round((M-A)/l)}else if(s&&e.segmentCodec==="aac"&&(M=E),_=M,L>0){L+=p;try{C=new Uint8Array(L)}catch(j){this.observer.emit(y.ERROR,y.ERROR,{type:Y.MUX_ERROR,details:D.REMUX_ALLOC_ERROR,fatal:!1,error:j,bytes:L,reason:`fail allocating audio mdat ${L}`});return}d||(new DataView(C.buffer).setUint32(0,L),C.set(b.types.mdat,4))}else return;C.set(N,p);const q=N.byteLength;p+=q,g.push(new cn(!0,c,q,0)),A=M}const I=g.length;if(!I)return;const R=g[g.length-1];this.nextAudioPts=E=A+l*R.duration;const k=d?new Uint8Array(0):b.moof(e.sequenceNumber++,_/l,pe({},e,{samples:g}));e.samples=[];const U=_/o,K=E/o,G={data1:k,data2:C,startPTS:U,endPTS:K,startDTS:U,endDTS:K,type:"audio",hasAudio:!0,hasVideo:!1,nb:I};return this.isAudioContiguous=!0,G}}function Ge(r,e){let t;if(e===null)return r;for(e<r?t=-8589934592:t=8589934592;Math.abs(r-e)>4294967296;)r+=t;return r}function Du(r){for(let e=0;e<r.length;e++)if(r[e].key)return e;return-1}function Ko(r,e,t,s){const i=r.samples.length;if(!i)return;const n=r.inputTimeScale;for(let a=0;a<i;a++){const l=r.samples[a];l.pts=Ge(l.pts-t.baseTime*n/t.timescale,e*n)/n,l.dts=Ge(l.dts-s.baseTime*n/s.timescale,e*n)/n}const o=r.samples;return r.samples=[],{samples:o}}function Ho(r,e,t){const s=r.samples.length;if(!s)return;const i=r.inputTimeScale;for(let o=0;o<s;o++){const a=r.samples[o];a.pts=Ge(a.pts-t.baseTime*i/t.timescale,e*i)/i}r.samples.sort((o,a)=>o.pts-a.pts);const n=r.samples;return r.samples=[],{samples:n}}class cn{constructor(e,t,s,i){this.size=void 0,this.duration=void 0,this.cts=void 0,this.flags=void 0,this.duration=t,this.size=s,this.cts=i,this.flags={isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:e?2:1,isNonSync:e?0:1}}}class Cu{constructor(e,t,s,i){this.logger=void 0,this.emitInitSegment=!1,this.audioCodec=void 0,this.videoCodec=void 0,this.initData=void 0,this.initPTS=null,this.initTracks=void 0,this.lastEndTime=null,this.logger=i}destroy(){}resetTimeStamp(e){this.initPTS=e,this.lastEndTime=null}resetNextTimestamp(){this.lastEndTime=null}resetInitSegment(e,t,s,i){this.audioCodec=t,this.videoCodec=s,this.generateInitSegment(xl(e,i)),this.emitInitSegment=!0}generateInitSegment(e){let{audioCodec:t,videoCodec:s}=this;if(!(e!=null&&e.byteLength)){this.initTracks=void 0,this.initData=void 0;return}const i=this.initData=uo(e);i.audio&&(t=un(i.audio,ce.AUDIO)),i.video&&(s=un(i.video,ce.VIDEO));const n={};i.audio&&i.video?n.audiovideo={container:"video/mp4",codec:t+","+s,initSegment:e,id:"main"}:i.audio?n.audio={container:"audio/mp4",codec:t,initSegment:e,id:"audio"}:i.video?n.video={container:"video/mp4",codec:s,initSegment:e,id:"main"}:this.logger.warn("[passthrough-remuxer.ts]: initSegment does not contain moov or trak boxes."),this.initTracks=n}remux(e,t,s,i,n,o){var a,l;let{initPTS:c,lastEndTime:u}=this;const h={audio:void 0,video:void 0,text:i,id3:s,initSegment:void 0};V(u)||(u=this.lastEndTime=n||0);const d=t.samples;if(!(d!=null&&d.length))return h;const g={initPTS:void 0,timescale:1};let f=this.initData;if((a=f)!=null&&a.length||(this.generateInitSegment(d),f=this.initData),!((l=f)!=null&&l.length))return this.logger.warn("[passthrough-remuxer.ts]: Failed to generate initSegment."),h;this.emitInitSegment&&(g.tracks=this.initTracks,this.emitInitSegment=!1);const m=vl(d,f),p=Sl(f,d),E=p===null?n:p;(wu(c,E,n,m)||g.timescale!==c.timescale&&o)&&(g.initPTS=E-n,c&&c.timescale===1&&this.logger.warn(`Adjusting initPTS @${n} from ${c.baseTime/c.timescale} to ${g.initPTS}`),this.initPTS=c={baseTime:g.initPTS,timescale:1});const x=e?E-c.baseTime/c.timescale:u,T=x+m;Al(f,d,c.baseTime/c.timescale),m>0?this.lastEndTime=T:(this.logger.warn("Duration parsed from mp4 should be greater than zero"),this.resetNextTimestamp());const _=!!f.audio,A=!!f.video;let C="";_&&(C+="audio"),A&&(C+="video");const L={data1:d,startPTS:x,startDTS:x,endPTS:T,endDTS:T,type:C,hasAudio:_,hasVideo:A,nb:1,dropped:0};return h.audio=L.type==="audio"?L:void 0,h.video=L.type!=="audio"?L:void 0,h.initSegment=g,h.id3=Ko(s,n,c,c),i.samples.length&&(h.text=Ho(i,n,c)),h}}function wu(r,e,t,s){if(r===null)return!0;const i=Math.max(s,1),n=e-r.baseTime/r.timescale;return Math.abs(n-t)>i}function un(r,e){const t=r==null?void 0:r.codec;if(t&&t.length>4)return t;if(e===ce.AUDIO){if(t==="ec-3"||t==="ac-3"||t==="alac")return t;if(t==="fLaC"||t==="Opus")return Os(t,!1);const s="mp4a.40.5";return this.logger.info(`Parsed audio codec "${t}" or audio object type not handled. Using "${s}"`),s}return this.logger.warn(`Unhandled video codec "${t}"`),t==="hvc1"||t==="hev1"?"hvc1.1.6.L120.90":t==="av01"?"av01.0.04M.08":"avc1.42e01e"}let lt;try{lt=self.performance.now.bind(self.performance)}catch{lt=Date.now}const Ls=[{demux:pu,remux:Cu},{demux:ft,remux:vs},{demux:gu,remux:vs},{demux:Su,remux:vs}];Ls.splice(2,0,{demux:yu,remux:vs});class hn{constructor(e,t,s,i,n,o){this.asyncResult=!1,this.logger=void 0,this.observer=void 0,this.typeSupported=void 0,this.config=void 0,this.id=void 0,this.demuxer=void 0,this.remuxer=void 0,this.decrypter=void 0,this.probe=void 0,this.decryptionPromise=null,this.transmuxConfig=void 0,this.currentTransmuxState=void 0,this.observer=e,this.typeSupported=t,this.config=s,this.id=n,this.logger=o}configure(e){this.transmuxConfig=e,this.decrypter&&this.decrypter.reset()}push(e,t,s,i){const n=s.transmuxing;n.executeStart=lt();let o=new Uint8Array(e);const{currentTransmuxState:a,transmuxConfig:l}=this;i&&(this.currentTransmuxState=i);const{contiguous:c,discontinuity:u,trackSwitch:h,accurateTimeOffset:d,timeOffset:g,initSegmentChange:f}=i||a,{audioCodec:m,videoCodec:p,defaultInitPts:E,duration:x,initSegmentData:T}=l,_=ku(o,t);if(_&&Nt(_.method)){const v=this.getDecrypter(),I=zi(_.method);if(v.isSync()){let R=v.softwareDecrypt(o,_.key.buffer,_.iv.buffer,I);if(s.part>-1&&(R=v.flush()),!R)return n.executeEnd=lt(),oi(s);o=new Uint8Array(R)}else return this.asyncResult=!0,this.decryptionPromise=v.webCryptoDecrypt(o,_.key.buffer,_.iv.buffer,I).then(R=>{const k=this.push(R,null,s);return this.decryptionPromise=null,k}),this.decryptionPromise}const A=this.needsProbing(u,h);if(A){const v=this.configureTransmuxer(o);if(v)return this.logger.warn(`[transmuxer] ${v.message}`),this.observer.emit(y.ERROR,y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,fatal:!1,error:v,reason:v.message}),n.executeEnd=lt(),oi(s)}(u||h||f||A)&&this.resetInitSegment(T,m,p,x,t),(u||f||A)&&this.resetInitialTimestamp(E),c||this.resetContiguity();const C=this.transmux(o,_,g,d,s);this.asyncResult=$s(C);const L=this.currentTransmuxState;return L.contiguous=!0,L.discontinuity=!1,L.trackSwitch=!1,n.executeEnd=lt(),C}flush(e){const t=e.transmuxing;t.executeStart=lt();const{decrypter:s,currentTransmuxState:i,decryptionPromise:n}=this;if(n)return this.asyncResult=!0,n.then(()=>this.flush(e));const o=[],{timeOffset:a}=i;if(s){const h=s.flush();h&&o.push(this.push(h,null,e))}const{demuxer:l,remuxer:c}=this;if(!l||!c){t.executeEnd=lt();const h=[oi(e)];return this.asyncResult?Promise.resolve(h):h}const u=l.flush(a);return $s(u)?(this.asyncResult=!0,u.then(h=>(this.flushRemux(o,h,e),o))):(this.flushRemux(o,u,e),this.asyncResult?Promise.resolve(o):o)}flushRemux(e,t,s){const{audioTrack:i,videoTrack:n,id3Track:o,textTrack:a}=t,{accurateTimeOffset:l,timeOffset:c}=this.currentTransmuxState;this.logger.log(`[transmuxer.ts]: Flushed ${this.id} sn: ${s.sn}${s.part>-1?" p: "+s.part:""} of ${this.id===H.MAIN?"level":"track"} ${s.level}`);const u=this.remuxer.remux(i,n,o,a,c,l,!0,this.id);e.push({remuxResult:u,chunkMeta:s}),s.transmuxing.executeEnd=lt()}resetInitialTimestamp(e){const{demuxer:t,remuxer:s}=this;!t||!s||(t.resetTimeStamp(e),s.resetTimeStamp(e))}resetContiguity(){const{demuxer:e,remuxer:t}=this;!e||!t||(e.resetContiguity(),t.resetNextTimestamp())}resetInitSegment(e,t,s,i,n){const{demuxer:o,remuxer:a}=this;!o||!a||(o.resetInitSegment(e,t,s,i),a.resetInitSegment(e,t,s,n))}destroy(){this.demuxer&&(this.demuxer.destroy(),this.demuxer=void 0),this.remuxer&&(this.remuxer.destroy(),this.remuxer=void 0)}transmux(e,t,s,i,n){let o;return t&&t.method==="SAMPLE-AES"?o=this.transmuxSampleAes(e,t,s,i,n):o=this.transmuxUnencrypted(e,s,i,n),o}transmuxUnencrypted(e,t,s,i){const{audioTrack:n,videoTrack:o,id3Track:a,textTrack:l}=this.demuxer.demux(e,t,!1,!this.config.progressive);return{remuxResult:this.remuxer.remux(n,o,a,l,t,s,!1,this.id),chunkMeta:i}}transmuxSampleAes(e,t,s,i,n){return this.demuxer.demuxSampleAes(e,t,s).then(o=>({remuxResult:this.remuxer.remux(o.audioTrack,o.videoTrack,o.id3Track,o.textTrack,s,i,!1,this.id),chunkMeta:n}))}configureTransmuxer(e){const{config:t,observer:s,typeSupported:i}=this;let n;for(let h=0,d=Ls.length;h<d;h++){var o;if((o=Ls[h].demux)!=null&&o.probe(e,this.logger)){n=Ls[h];break}}if(!n)return new Error("Failed to find demuxer by probing fragment data");const a=this.demuxer,l=this.remuxer,c=n.remux,u=n.demux;(!l||!(l instanceof c))&&(this.remuxer=new c(s,t,i,this.logger)),(!a||!(a instanceof u))&&(this.demuxer=new u(s,t,i,this.logger),this.probe=u.probe)}needsProbing(e,t){return!this.demuxer||!this.remuxer||e||t}getDecrypter(){let e=this.decrypter;return e||(e=this.decrypter=new sr(this.config)),e}}function ku(r,e){let t=null;return r.byteLength>0&&(e==null?void 0:e.key)!=null&&e.iv!==null&&e.method!=null&&(t=e),t}const oi=r=>({remuxResult:{},chunkMeta:r});function $s(r){return"then"in r&&r.then instanceof Function}class Pu{constructor(e,t,s,i,n){this.audioCodec=void 0,this.videoCodec=void 0,this.initSegmentData=void 0,this.duration=void 0,this.defaultInitPts=void 0,this.audioCodec=e,this.videoCodec=t,this.initSegmentData=s,this.duration=i,this.defaultInitPts=n||null}}class Fu{constructor(e,t,s,i,n,o){this.discontinuity=void 0,this.contiguous=void 0,this.accurateTimeOffset=void 0,this.trackSwitch=void 0,this.timeOffset=void 0,this.initSegmentChange=void 0,this.discontinuity=e,this.contiguous=t,this.accurateTimeOffset=s,this.trackSwitch=i,this.timeOffset=n,this.initSegmentChange=o}}var Wo={exports:{}};(function(r){var e=Object.prototype.hasOwnProperty,t="~";function s(){}Object.create&&(s.prototype=Object.create(null),new s().__proto__||(t=!1));function i(l,c,u){this.fn=l,this.context=c,this.once=u||!1}function n(l,c,u,h,d){if(typeof u!="function")throw new TypeError("The listener must be a function");var g=new i(u,h||l,d),f=t?t+c:c;return l._events[f]?l._events[f].fn?l._events[f]=[l._events[f],g]:l._events[f].push(g):(l._events[f]=g,l._eventsCount++),l}function o(l,c){--l._eventsCount===0?l._events=new s:delete l._events[c]}function a(){this._events=new s,this._eventsCount=0}a.prototype.eventNames=function(){var c=[],u,h;if(this._eventsCount===0)return c;for(h in u=this._events)e.call(u,h)&&c.push(t?h.slice(1):h);return Object.getOwnPropertySymbols?c.concat(Object.getOwnPropertySymbols(u)):c},a.prototype.listeners=function(c){var u=t?t+c:c,h=this._events[u];if(!h)return[];if(h.fn)return[h.fn];for(var d=0,g=h.length,f=new Array(g);d<g;d++)f[d]=h[d].fn;return f},a.prototype.listenerCount=function(c){var u=t?t+c:c,h=this._events[u];return h?h.fn?1:h.length:0},a.prototype.emit=function(c,u,h,d,g,f){var m=t?t+c:c;if(!this._events[m])return!1;var p=this._events[m],E=arguments.length,x,T;if(p.fn){switch(p.once&&this.removeListener(c,p.fn,void 0,!0),E){case 1:return p.fn.call(p.context),!0;case 2:return p.fn.call(p.context,u),!0;case 3:return p.fn.call(p.context,u,h),!0;case 4:return p.fn.call(p.context,u,h,d),!0;case 5:return p.fn.call(p.context,u,h,d,g),!0;case 6:return p.fn.call(p.context,u,h,d,g,f),!0}for(T=1,x=new Array(E-1);T<E;T++)x[T-1]=arguments[T];p.fn.apply(p.context,x)}else{var _=p.length,A;for(T=0;T<_;T++)switch(p[T].once&&this.removeListener(c,p[T].fn,void 0,!0),E){case 1:p[T].fn.call(p[T].context);break;case 2:p[T].fn.call(p[T].context,u);break;case 3:p[T].fn.call(p[T].context,u,h);break;case 4:p[T].fn.call(p[T].context,u,h,d);break;default:if(!x)for(A=1,x=new Array(E-1);A<E;A++)x[A-1]=arguments[A];p[T].fn.apply(p[T].context,x)}}return!0},a.prototype.on=function(c,u,h){return n(this,c,u,h,!1)},a.prototype.once=function(c,u,h){return n(this,c,u,h,!0)},a.prototype.removeListener=function(c,u,h,d){var g=t?t+c:c;if(!this._events[g])return this;if(!u)return o(this,g),this;var f=this._events[g];if(f.fn)f.fn===u&&(!d||f.once)&&(!h||f.context===h)&&o(this,g);else{for(var m=0,p=[],E=f.length;m<E;m++)(f[m].fn!==u||d&&!f[m].once||h&&f[m].context!==h)&&p.push(f[m]);p.length?this._events[g]=p.length===1?p[0]:p:o(this,g)}return this},a.prototype.removeAllListeners=function(c){var u;return c?(u=t?t+c:c,this._events[u]&&o(this,u)):(this._events=new s,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=t,a.EventEmitter=a,r.exports=a})(Wo);var Ou=Wo.exports,cr=qa(Ou);let dn=0;class Yo{constructor(e,t,s,i){this.error=null,this.hls=void 0,this.id=void 0,this.instanceNo=dn++,this.observer=void 0,this.frag=null,this.part=null,this.useWorker=void 0,this.workerContext=null,this.transmuxer=null,this.onTransmuxComplete=void 0,this.onFlush=void 0,this.onWorkerMessage=l=>{const c=l.data,u=this.hls;if(!(!u||!(c!=null&&c.event)||c.instanceNo!==this.instanceNo))switch(c.event){case"init":{var h;const d=(h=this.workerContext)==null?void 0:h.objectURL;d&&self.URL.revokeObjectURL(d);break}case"transmuxComplete":{this.handleTransmuxComplete(c.data);break}case"flush":{this.onFlush(c.data);break}case"workerLog":{u.logger[c.data.logType]&&u.logger[c.data.logType](c.data.message);break}default:{c.data=c.data||{},c.data.frag=this.frag,c.data.part=this.part,c.data.id=this.id,u.trigger(c.event,c.data);break}}},this.onWorkerError=l=>{if(!this.hls)return;const c=new Error(`${l.message} (${l.filename}:${l.lineno})`);this.hls.config.enableWorker=!1,this.hls.logger.warn(`Error in "${this.id}" Web Worker, fallback to inline`),this.hls.trigger(y.ERROR,{type:Y.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:!1,event:"demuxerWorker",error:c})};const n=e.config;this.hls=e,this.id=t,this.useWorker=!!n.enableWorker,this.onTransmuxComplete=s,this.onFlush=i;const o=(l,c)=>{c=c||{},c.frag=this.frag||void 0,l===y.ERROR&&(c=c,c.parent=this.id,c.part=this.part,this.error=c.error),this.hls.trigger(l,c)};this.observer=new cr,this.observer.on(y.FRAG_DECRYPTED,o),this.observer.on(y.ERROR,o);const a=Fr(n.preferManagedMediaSource);if(this.useWorker&&typeof Worker<"u"){const l=this.hls.logger;if(n.workerPath||Qc()){try{n.workerPath?(l.log(`loading Web Worker ${n.workerPath} for "${t}"`),this.workerContext=Jc(n.workerPath)):(l.log(`injecting Web Worker for "${t}"`),this.workerContext=Zc());const{worker:u}=this.workerContext;u.addEventListener("message",this.onWorkerMessage),u.addEventListener("error",this.onWorkerError),u.postMessage({instanceNo:this.instanceNo,cmd:"init",typeSupported:a,id:t,config:JSON.stringify(n)})}catch(u){l.warn(`Error setting up "${t}" Web Worker, fallback to inline`,u),this.terminateWorker(),this.error=null,this.transmuxer=new hn(this.observer,a,n,"",t,e.logger)}return}}this.transmuxer=new hn(this.observer,a,n,"",t,e.logger)}reset(){if(this.frag=null,this.part=null,this.workerContext){const e=this.instanceNo;this.instanceNo=dn++;const t=this.hls.config,s=Fr(t.preferManagedMediaSource);this.workerContext.worker.postMessage({instanceNo:this.instanceNo,cmd:"reset",resetNo:e,typeSupported:s,id:this.id,config:JSON.stringify(t)})}}terminateWorker(){if(this.workerContext){const{worker:e}=this.workerContext;this.workerContext=null,e.removeEventListener("message",this.onWorkerMessage),e.removeEventListener("error",this.onWorkerError),eu(this.hls.config.workerPath)}}destroy(){if(this.workerContext)this.terminateWorker(),this.onWorkerMessage=this.onWorkerError=null;else{const t=this.transmuxer;t&&(t.destroy(),this.transmuxer=null)}const e=this.observer;e&&e.removeAllListeners(),this.frag=null,this.part=null,this.observer=null,this.hls=null}push(e,t,s,i,n,o,a,l,c,u){var h,d;c.transmuxing.start=self.performance.now();const{instanceNo:g,transmuxer:f}=this,m=o?o.start:n.start,p=n.decryptdata,E=this.frag,x=!(E&&n.cc===E.cc),T=!(E&&c.level===E.level),_=E?c.sn-E.sn:-1,A=this.part?c.part-this.part.index:-1,C=_===0&&c.id>1&&c.id===(E==null?void 0:E.stats.chunkCount),L=!T&&(_===1||_===0&&(A===1||C&&A<=0)),v=self.performance.now();(T||_||n.stats.parsing.start===0)&&(n.stats.parsing.start=v),o&&(A||!L)&&(o.stats.parsing.start=v);const I=!(E&&((h=n.initSegment)==null?void 0:h.url)===((d=E.initSegment)==null?void 0:d.url)),R=new Fu(x,L,l,T,m,I);if(!L||x||I){this.hls.logger.log(`[transmuxer-interface, ${n.type}]: Starting new transmux session for sn: ${c.sn} p: ${c.part} level: ${c.level} id: ${c.id} discontinuity: ${x} trackSwitch: ${T} contiguous: ${L} accurateTimeOffset: ${l} timeOffset: ${m} initSegmentChange: ${I}`);const k=new Pu(s,i,t,a,u);this.configureTransmuxer(k)}if(this.frag=n,this.part=o,this.workerContext)this.workerContext.worker.postMessage({instanceNo:g,cmd:"demux",data:e,decryptdata:p,chunkMeta:c,state:R},e instanceof ArrayBuffer?[e]:[]);else if(f){const k=f.push(e,p,c,R);$s(k)?k.then(U=>{this.handleTransmuxComplete(U)}).catch(U=>{this.transmuxerError(U,c,"transmuxer-interface push error")}):this.handleTransmuxComplete(k)}}flush(e){e.transmuxing.start=self.performance.now();const{instanceNo:t,transmuxer:s}=this;if(this.workerContext)this.workerContext.worker.postMessage({instanceNo:t,cmd:"flush",chunkMeta:e});else if(s){const i=s.flush(e);$s(i)?i.then(n=>{this.handleFlushResult(n,e)}).catch(n=>{this.transmuxerError(n,e,"transmuxer-interface flush error")}):this.handleFlushResult(i,e)}}transmuxerError(e,t,s){this.hls&&(this.error=e,this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_PARSING_ERROR,chunkMeta:t,frag:this.frag||void 0,part:this.part||void 0,fatal:!1,error:e,err:e,reason:s}))}handleFlushResult(e,t){e.forEach(s=>{this.handleTransmuxComplete(s)}),this.onFlush(t)}configureTransmuxer(e){const{instanceNo:t,transmuxer:s}=this;this.workerContext?this.workerContext.worker.postMessage({instanceNo:t,cmd:"configure",config:e}):s&&s.configure(e)}handleTransmuxComplete(e){e.chunkMeta.transmuxing.end=self.performance.now(),this.onTransmuxComplete(e)}}function qo(r,e){if(r.length!==e.length)return!1;for(let t=0;t<r.length;t++)if(!Vt(r[t].attrs,e[t].attrs))return!1;return!0}function Vt(r,e,t){const s=r["STABLE-RENDITION-ID"];return s&&!t?s===e["STABLE-RENDITION-ID"]:!(t||["LANGUAGE","NAME","CHARACTERISTICS","AUTOSELECT","DEFAULT","FORCED","ASSOC-LANGUAGE"]).some(i=>r[i]!==e[i])}function ki(r,e){return e.label.toLowerCase()===r.name.toLowerCase()&&(!e.language||e.language.toLowerCase()===(r.lang||"").toLowerCase())}const fn=100;class Mu extends ir{constructor(e,t,s){super(e,t,s,"audio-stream-controller",H.AUDIO),this.videoAnchor=null,this.mainFragLoading=null,this.bufferedTrack=null,this.switchingTrack=null,this.trackId=-1,this.waitingData=null,this.mainDetails=null,this.flushing=!1,this.bufferFlushed=!1,this.cachedTrackLoadedData=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null,this.bufferedTrack=null,this.switchingTrack=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){const{hls:e}=this;e&&(super.unregisterListeners(),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.AUDIO_TRACKS_UPDATED,this.onAudioTracksUpdated,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this))}onInitPtsFound(e,{frag:t,id:s,initPTS:i,timescale:n}){if(s===H.MAIN){const o=t.cc,a=this.fragCurrent;if(this.initPTS[o]={baseTime:i,timescale:n},this.log(`InitPTS for cc: ${o} found from main: ${i}/${n}`),this.videoAnchor=t,this.state===w.WAITING_INIT_PTS){const l=this.waitingData;(!l||l.frag.cc!==o)&&(this.nextLoadPosition=this.findSyncFrag(t).start),this.tick()}else!this.loadedmetadata&&a&&a.cc!==o&&(this.startFragRequested=!1,this.nextLoadPosition=this.findSyncFrag(t).start,a.abortRequests(),this.resetLoadingState())}}findSyncFrag(e){const t=this.getLevelDetails(),s=e.cc;return vc(t,s,e)||t&&_o(t.fragments,s)||e}startLoad(e){if(!this.levels){this.startPosition=e,this.state=w.STOPPED;return}const t=this.lastCurrentTime;this.stopLoad(),this.setInterval(fn),t>0&&e===-1?(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t,this.state=w.IDLE):(this.loadedmetadata=!1,this.state=w.WAITING_TRACK),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}doTick(){switch(this.state){case w.IDLE:this.doTickIdle();break;case w.WAITING_TRACK:{var e;const{levels:s,trackId:i}=this,n=s==null||(e=s[i])==null?void 0:e.details;if(n){if(this.waitForCdnTuneIn(n))break;this.state=w.WAITING_INIT_PTS}break}case w.FRAG_LOADING_WAITING_RETRY:{var t;const s=performance.now(),i=this.retryDate;if(!i||s>=i||(t=this.media)!=null&&t.seeking){const{levels:n,trackId:o}=this;this.log("RetryDate reached, switch back to IDLE state"),this.resetStartWhenNotLoaded((n==null?void 0:n[o])||null),this.state=w.IDLE}break}case w.WAITING_INIT_PTS:{const s=this.waitingData;if(s){const{frag:i,part:n,cache:o,complete:a}=s,l=this.videoAnchor;if(this.initPTS[i.cc]!==void 0){this.waitingData=null,this.state=w.FRAG_LOADING;const c=o.flush(),u={frag:i,part:n,payload:c,networkDetails:null};this._handleFragmentLoadProgress(u),a&&super._handleFragmentLoadComplete(u)}else l&&l.cc!==s.frag.cc&&(this.log(`Waiting fragment cc (${i.cc}) cancelled because video is at cc ${l.cc}`),this.nextLoadPosition=this.findSyncFrag(l).start,this.clearWaitingFragment())}else this.state!==w.STOPPED&&(this.state=w.IDLE)}}this.onTickEnd()}clearWaitingFragment(){const e=this.waitingData;e&&(this.loadedmetadata||(this.startFragRequested=!1),this.fragmentTracker.removeFragment(e.frag),this.waitingData=null,this.state!==w.STOPPED&&(this.state=w.IDLE))}resetLoadingState(){this.clearWaitingFragment(),super.resetLoadingState()}onTickEnd(){const{media:e}=this;e!=null&&e.readyState&&(this.lastCurrentTime=e.currentTime)}doTickIdle(){var e;const{hls:t,levels:s,media:i,trackId:n}=this,o=t.config;if(!this.buffering||!i&&(this.startFragRequested||!o.startFragPrefetch)||!(s!=null&&s[n]))return;const a=s[n],l=a.details;if(!l||l.live&&this.levelLastLoaded!==a||this.waitForCdnTuneIn(l)){this.state=w.WAITING_TRACK;return}const c=this.mediaBuffer?this.mediaBuffer:this.media;this.bufferFlushed&&c&&(this.bufferFlushed=!1,this.afterBufferFlushed(c,ce.AUDIO,H.AUDIO));const u=this.getFwdBufferInfo(c,H.AUDIO);if(u===null)return;const{bufferedTrack:h,switchingTrack:d}=this;if(!d&&this._streamEnded(u,l)){t.trigger(y.BUFFER_EOS,{type:"audio"}),this.state=w.ENDED;return}const g=u.len,f=t.maxBufferLength,m=l.fragments,p=m[0].start,E=this.getLoadPosition();let x=this.flushing?E:u.end;if(d&&i){const A=E;h&&!Vt(d.attrs,h.attrs)&&(x=A),l.PTSKnown&&A<p&&(u.end>p||u.nextStart)&&(this.log("Alt audio track ahead of main track, seek to start of alt audio track"),i.currentTime=p+.05)}if(g>=f&&!d&&x<m[m.length-1].start)return;let T=this.getNextFragment(x,l);if(T&&this.isLoopLoading(T,x)&&(T=this.getNextFragmentLoopLoading(T,l,u,H.MAIN,f)),!T){this.bufferFlushed=!0;return}const _=(e=this.mainFragLoading)==null?void 0:e.frag;if(this.startFragRequested&&_&&_.sn!=="initSegment"&&T.sn!=="initSegment"&&!T.endList&&(!l.live||!this.loadingParts&&x<this.hls.liveSyncPosition)){let A=_;if(T.start>A.end){const L=this.fragmentTracker.getFragAtPos(x,H.MAIN);L&&L.end>_.end&&(A=L,this.mainFragLoading={frag:L,targetBufferTime:null})}if(T.start>A.end)return}this.loadFragment(T,a,x)}onMediaDetaching(){this.bufferFlushed=this.flushing=!1,super.onMediaDetaching()}onAudioTracksUpdated(e,{audioTracks:t}){this.resetTransmuxer(),this.levels=t.map(s=>new Gt(s))}onAudioTrackSwitching(e,t){const s=!!t.url;this.trackId=t.id;const{fragCurrent:i}=this;i&&(i.abortRequests(),this.removeUnbufferedFrags(i.start)),this.resetLoadingState(),s?(this.switchingTrack=t,this.flushAudioIfNeeded(t),this.state!==w.STOPPED&&(this.setInterval(fn),this.state=w.IDLE,this.tick())):(this.resetTransmuxer(),this.switchingTrack=null,this.bufferedTrack=t,this.clearInterval())}onManifestLoading(){super.onManifestLoading(),this.bufferFlushed=this.flushing=!1,this.mainDetails=this.waitingData=this.videoAnchor=this.bufferedTrack=this.cachedTrackLoadedData=this.switchingTrack=null,this.trackId=-1}onLevelLoaded(e,t){this.mainDetails=t.details,this.cachedTrackLoadedData!==null&&(this.hls.trigger(y.AUDIO_TRACK_LOADED,this.cachedTrackLoadedData),this.cachedTrackLoadedData=null)}onAudioTrackLoaded(e,t){var s;if(this.mainDetails==null){this.cachedTrackLoadedData=t;return}const{levels:i}=this,{details:n,id:o}=t;if(!i){this.warn(`Audio tracks were reset while loading level ${o}`);return}this.log(`Audio track ${o} loaded [${n.startSN},${n.endSN}]${n.lastPartSn?`[part-${n.lastPartSn}-${n.lastPartIndex}]`:""},duration:${n.totalduration}`);const a=i[o];let l=0;if(n.live||(s=a.details)!=null&&s.live){this.checkLiveUpdate(n);const u=this.mainDetails;if(n.deltaUpdateFailed||!u)return;if(!a.details&&n.hasProgramDateTime&&u.hasProgramDateTime)Us(n,u),l=n.fragments[0].start;else{var c;l=this.alignPlaylists(n,a.details,(c=this.levelLastLoaded)==null?void 0:c.details)}}a.details=n,this.levelLastLoaded=a,!this.startFragRequested&&(this.mainDetails||!n.live)&&this.setStartPosition(this.mainDetails||n,l),this.state===w.WAITING_TRACK&&!this.waitForCdnTuneIn(n)&&(this.state=w.IDLE),this.tick()}_handleFragmentLoadProgress(e){var t;const s=e.frag,{part:i,payload:n}=e,{config:o,trackId:a,levels:l}=this;if(!l){this.warn(`Audio tracks were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);return}const c=l[a];if(!c){this.warn("Audio track is undefined on fragment load progress");return}const u=c.details;if(!u){this.warn("Audio track details undefined on fragment load progress"),this.removeUnbufferedFrags(s.start);return}const h=o.defaultAudioCodec||c.audioCodec||"mp4a.40.2";let d=this.transmuxer;d||(d=this.transmuxer=new Yo(this.hls,H.AUDIO,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)));const g=this.initPTS[s.cc],f=(t=s.initSegment)==null?void 0:t.data;if(g!==void 0){const p=i?i.index:-1,E=p!==-1,x=new tr(s.level,s.sn,s.stats.chunkCount,n.byteLength,p,E);d.push(n,f,h,"",s,i,u.totalduration,!1,x,g)}else{this.log(`Unknown video PTS for cc ${s.cc}, waiting for video PTS before demuxing audio frag ${s.sn} of [${u.startSN} ,${u.endSN}],track ${a}`);const{cache:m}=this.waitingData=this.waitingData||{frag:s,part:i,cache:new Do,complete:!1};m.push(new Uint8Array(n)),this.state=w.WAITING_INIT_PTS}}_handleFragmentLoadComplete(e){if(this.waitingData){this.waitingData.complete=!0;return}super._handleFragmentLoadComplete(e)}onBufferReset(){this.mediaBuffer=null,this.loadedmetadata=!1}onBufferCreated(e,t){const s=t.tracks.audio;s&&(this.mediaBuffer=s.buffer||null)}onFragLoading(e,t){t.frag.type===H.MAIN&&t.frag.sn!=="initSegment"&&(this.mainFragLoading=t,this.state===w.IDLE&&this.tick())}onFragBuffered(e,t){const{frag:s,part:i}=t;if(s.type!==H.AUDIO){if(!this.loadedmetadata&&s.type===H.MAIN){const n=this.fragmentTracker.getState(s);(n===Te.OK||n===Te.PARTIAL)&&(this.loadedmetadata=!0)}return}if(this.fragContextChanged(s)){this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}, audioSwitch: ${this.switchingTrack?this.switchingTrack.name:"false"}`);return}if(s.sn!=="initSegment"){this.fragPrevious=s;const n=this.switchingTrack;n&&(this.bufferedTrack=n,this.switchingTrack=null,this.hls.trigger(y.AUDIO_TRACK_SWITCHED,ve({},n)))}this.fragBufferedComplete(s,i)}onError(e,t){var s;if(t.fatal){this.state=w.ERROR;return}switch(t.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.AUDIO,t);break;case D.AUDIO_TRACK_LOAD_ERROR:case D.AUDIO_TRACK_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===w.WAITING_TRACK&&((s=t.context)==null?void 0:s.type)===re.AUDIO_TRACK&&(this.state=w.IDLE);break;case D.BUFFER_APPEND_ERROR:case D.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="audio")return;if(t.details===D.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&(this.bufferedTrack=null,super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"));break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}onBufferFlushing(e,{type:t}){t!==ce.VIDEO&&(this.flushing=!0)}onBufferFlushed(e,{type:t}){if(t!==ce.VIDEO){this.flushing=!1,this.bufferFlushed=!0,this.state===w.ENDED&&(this.state=w.IDLE);const s=this.mediaBuffer||this.media;s&&(this.afterBufferFlushed(s,t,H.AUDIO),this.tick())}}_handleTransmuxComplete(e){var t;const s="audio",{hls:i}=this,{remuxResult:n,chunkMeta:o}=e,a=this.getCurrentContext(o);if(!a){this.resetWhenMissingContext(o);return}const{frag:l,part:c,level:u}=a,{details:h}=u,{audio:d,text:g,id3:f,initSegment:m}=n;if(this.fragContextChanged(l)||!h){this.fragmentTracker.removeFragment(l);return}if(this.state=w.PARSING,this.switchingTrack&&d&&this.completeAudioSwitch(this.switchingTrack),m!=null&&m.tracks){const p=l.initSegment||l;this._bufferInitSegment(u,m.tracks,p,o),i.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:p,id:s,tracks:m.tracks})}if(d){const{startPTS:p,endPTS:E,startDTS:x,endDTS:T}=d;c&&(c.elementaryStreams[ce.AUDIO]={startPTS:p,endPTS:E,startDTS:x,endDTS:T}),l.setElementaryStreamInfo(ce.AUDIO,p,E,x,T),this.bufferFragmentData(d,l,c,o)}if(f!=null&&(t=f.samples)!=null&&t.length){const p=pe({id:s,frag:l,details:h},f);i.trigger(y.FRAG_PARSING_METADATA,p)}if(g){const p=pe({id:s,frag:l,details:h},g);i.trigger(y.FRAG_PARSING_USERDATA,p)}}_bufferInitSegment(e,t,s,i){if(this.state!==w.PARSING||(t.video&&delete t.video,t.audiovideo&&delete t.audiovideo,!t.audio))return;const n=t.audio;n.id="audio";const o=e.audioCodec;this.log(`Init audio buffer, container:${n.container}, codecs[level/parsed]=[${o}/${n.codec}]`),o&&o.split(",").length===1&&(n.levelCodec=o),this.hls.trigger(y.BUFFER_CODECS,t);const a=n.initSegment;if(a!=null&&a.byteLength){const l={type:"audio",frag:s,part:null,chunkMeta:i,parent:s.type,data:a};this.hls.trigger(y.BUFFER_APPENDING,l)}this.tickImmediate()}loadFragment(e,t,s){const i=this.fragmentTracker.getState(e);if(this.switchingTrack||i===Te.NOT_LOADED||i===Te.PARTIAL){var n;if(e.sn==="initSegment")this._loadInitSegment(e,t);else if((n=t.details)!=null&&n.live&&!this.initPTS[e.cc]){this.log(`Waiting for video PTS in continuity counter ${e.cc} of live stream before loading audio fragment ${e.sn} of level ${this.trackId}`),this.state=w.WAITING_INIT_PTS;const o=this.mainDetails;o&&o.fragments[0].start!==t.details.fragments[0].start&&Us(t.details,o)}else super.loadFragment(e,t,s)}else this.clearTrackerIfNeeded(e)}flushAudioIfNeeded(e){const{media:t,bufferedTrack:s}=this,i=s==null?void 0:s.attrs,n=e.attrs;t&&i&&(i.CHANNELS!==n.CHANNELS||s.name!==e.name||s.lang!==e.lang)&&(this.log("Switching audio track : flushing all audio"),super.flushMainBuffer(0,Number.POSITIVE_INFINITY,"audio"),this.bufferedTrack=null)}completeAudioSwitch(e){const{hls:t}=this;this.flushAudioIfNeeded(e),this.bufferedTrack=e,this.switchingTrack=null,t.trigger(y.AUDIO_TRACK_SWITCHED,ve({},e))}}class Nu extends er{constructor(e){super(e,"audio-track-controller"),this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.registerListeners()}registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.AUDIO_TRACK_LOADED,this.onAudioTrackLoaded,this),e.off(y.ERROR,this.onError,this)}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,super.destroy()}onManifestLoading(){this.tracks=[],this.tracksInGroup=[],this.groupIds=null,this.currentTrack=null,this.trackId=-1,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.audioTracks||[]}onAudioTrackLoaded(e,t){const{id:s,groupId:i,details:n}=t,o=this.tracksInGroup[s];if(!o||o.groupId!==i){this.warn(`Audio track with id:${s} and group:${i} not found in active group ${o==null?void 0:o.groupId}`);return}const a=o.details;o.details=t.details,this.log(`Audio track ${s} "${o.name}" lang:${o.lang} group:${i} loaded [${n.startSN}-${n.endSN}]`),s===this.trackId&&this.playlistLoaded(s,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const s=t.audioGroups||null,i=this.groupIds;let n=this.currentTrack;if(!s||(i==null?void 0:i.length)!==(s==null?void 0:s.length)||s!=null&&s.some(a=>(i==null?void 0:i.indexOf(a))===-1)){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const a=this.tracks.filter(d=>!s||s.indexOf(d.groupId)!==-1);if(a.length)this.selectDefaultTrack&&!a.some(d=>d.default)&&(this.selectDefaultTrack=!1),a.forEach((d,g)=>{d.id=g});else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=a;const l=this.hls.config.audioPreference;if(!n&&l){const d=it(l,a,Rt);if(d>-1)n=a[d];else{const g=it(l,this.tracks);n=this.tracks[g]}}let c=this.findTrackId(n);c===-1&&n&&(c=this.findTrackId(null));const u={audioTracks:a};this.log(`Updating audio tracks, ${a.length} track(s) found in group(s): ${s==null?void 0:s.join(",")}`),this.hls.trigger(y.AUDIO_TRACKS_UPDATED,u);const h=this.trackId;if(c!==-1&&h===-1)this.setAudioTrack(c);else if(a.length&&h===-1){var o;const d=new Error(`No audio track selected for current audio group-ID(s): ${(o=this.groupIds)==null?void 0:o.join(",")} track count: ${a.length}`);this.warn(d.message),this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.AUDIO_TRACK_LOAD_ERROR,fatal:!0,error:d})}}else this.shouldReloadPlaylist(n)&&this.setAudioTrack(this.trackId)}onError(e,t){t.fatal||!t.context||t.context.type===re.AUDIO_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&(this.requestScheduled=-1,this.checkRetry(t))}get allAudioTracks(){return this.tracks}get audioTracks(){return this.tracksInGroup}get audioTrack(){return this.trackId}set audioTrack(e){this.selectDefaultTrack=!1,this.setAudioTrack(e)}setAudioOption(e){const t=this.hls;if(t.config.audioPreference=e,e){const s=this.allAudioTracks;if(this.selectDefaultTrack=!1,s.length){const i=this.currentTrack;if(i&&Bt(e,i,Rt))return i;const n=it(e,this.tracksInGroup,Rt);if(n>-1){const o=this.tracksInGroup[n];return this.setAudioTrack(n),o}else if(i){let o=t.loadLevel;o===-1&&(o=t.firstAutoLevel);const a=Fc(e,t.levels,s,o,Rt);if(a===-1)return null;t.nextLoadLevel=a}if(e.channels||e.audioCodec){const o=it(e,s);if(o>-1)return s[o]}}}return null}setAudioTrack(e){const t=this.tracksInGroup;if(e<0||e>=t.length){this.warn(`Invalid audio track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=t[e],n=i.details&&!i.details.live;if(e===this.trackId&&i===s&&n||(this.log(`Switching to audio-track ${e} "${i.name}" lang:${i.lang} group:${i.groupId} channels:${i.channels}`),this.trackId=e,this.currentTrack=i,this.hls.trigger(y.AUDIO_TRACK_SWITCHING,ve({},i)),n))return;const o=this.switchParams(i.url,s==null?void 0:s.details,i.details);this.loadPlaylist(o)}findTrackId(e){const t=this.tracksInGroup;for(let s=0;s<t.length;s++){const i=t[s];if(!(this.selectDefaultTrack&&!i.default)&&(!e||Bt(e,i,Rt)))return s}if(e){const{name:s,lang:i,assocLang:n,characteristics:o,audioCodec:a,channels:l}=e;for(let c=0;c<t.length;c++){const u=t[c];if(Bt({name:s,lang:i,assocLang:n,characteristics:o,audioCodec:a,channels:l},u,Rt))return c}for(let c=0;c<t.length;c++){const u=t[c];if(Vt(e.attrs,u.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return c}for(let c=0;c<t.length;c++){const u=t[c];if(Vt(e.attrs,u.attrs,["LANGUAGE"]))return c}}return-1}loadPlaylist(e){const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){super.loadPlaylist();const s=t.id,i=t.groupId;let n=t.url;if(e)try{n=e.addDirectives(n)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}this.log(`loading audio-track playlist ${s} "${t.name}" lang:${t.lang} group:${i}`),this.clearTimer(),this.hls.trigger(y.AUDIO_TRACK_LOADING,{url:n,id:s,groupId:i,deliveryDirectives:e||null})}}}const gn=500;class Bu extends ir{constructor(e,t,s){super(e,t,s,"subtitle-stream-controller",H.SUBTITLE),this.currentTrackId=-1,this.tracksBuffered=[],this.mainDetails=null,this.registerListeners()}onHandlerDestroying(){this.unregisterListeners(),super.onHandlerDestroying(),this.mainDetails=null}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.on(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.SUBTITLE_TRACK_SWITCH,this.onSubtitleTrackSwitch,this),e.off(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(y.SUBTITLE_FRAG_PROCESSED,this.onSubtitleFragProcessed,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this)}startLoad(e){this.stopLoad(),this.state=w.IDLE,this.setInterval(gn),this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}onManifestLoading(){super.onManifestLoading(),this.mainDetails=null}onMediaDetaching(){this.tracksBuffered=[],super.onMediaDetaching()}onLevelLoaded(e,t){this.mainDetails=t.details}onSubtitleFragProcessed(e,t){const{frag:s,success:i}=t;if(s.sn!=="initSegment"&&(this.fragPrevious=s),this.state=w.IDLE,!i)return;const n=this.tracksBuffered[this.currentTrackId];if(!n)return;let o;const a=s.start;for(let c=0;c<n.length;c++)if(a>=n[c].start&&a<=n[c].end){o=n[c];break}const l=s.start+s.duration;o?o.end=l:(o={start:a,end:l},n.push(o)),this.fragmentTracker.fragBuffered(s),this.fragBufferedComplete(s,null)}onBufferFlushing(e,t){const{startOffset:s,endOffset:i}=t;if(s===0&&i!==Number.POSITIVE_INFINITY){const n=i-1;if(n<=0)return;t.endOffsetSubtitles=Math.max(0,n),this.tracksBuffered.forEach(o=>{for(let a=0;a<o.length;){if(o[a].end<=n){o.shift();continue}else if(o[a].start<n)o[a].start=n;else break;a++}}),this.fragmentTracker.removeFragmentsInRange(s,n,H.SUBTITLE)}}onFragBuffered(e,t){if(!this.loadedmetadata&&t.frag.type===H.MAIN){var s;(s=this.media)!=null&&s.buffered.length&&(this.loadedmetadata=!0)}}onError(e,t){const s=t.frag;(s==null?void 0:s.type)===H.SUBTITLE&&(t.details===D.FRAG_GAP&&this.fragmentTracker.fragBuffered(s,!0),this.fragCurrent&&this.fragCurrent.abortRequests(),this.state!==w.STOPPED&&(this.state=w.IDLE))}onSubtitleTracksUpdated(e,{subtitleTracks:t}){if(this.levels&&qo(this.levels,t)){this.levels=t.map(s=>new Gt(s));return}this.tracksBuffered=[],this.levels=t.map(s=>{const i=new Gt(s);return this.tracksBuffered[i.id]=[],i}),this.fragmentTracker.removeFragmentsInRange(0,Number.POSITIVE_INFINITY,H.SUBTITLE),this.fragPrevious=null,this.mediaBuffer=null}onSubtitleTrackSwitch(e,t){var s;if(this.currentTrackId=t.id,!((s=this.levels)!=null&&s.length)||this.currentTrackId===-1){this.clearInterval();return}const i=this.levels[this.currentTrackId];i!=null&&i.details?this.mediaBuffer=this.mediaBufferTimeRanges:this.mediaBuffer=null,i&&this.state!==w.STOPPED&&this.setInterval(gn)}onSubtitleTrackLoaded(e,t){var s;const{currentTrackId:i,levels:n}=this,{details:o,id:a}=t;if(!n){this.warn(`Subtitle tracks were reset while loading level ${a}`);return}const l=n[a];if(a>=n.length||!l)return;this.log(`Subtitle track ${a} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""},duration:${o.totalduration}`),this.mediaBuffer=this.mediaBufferTimeRanges;let c=0;if(o.live||(s=l.details)!=null&&s.live){const h=this.mainDetails;if(o.deltaUpdateFailed||!h)return;const d=h.fragments[0];if(!l.details)o.hasProgramDateTime&&h.hasProgramDateTime?(Us(o,h),c=o.fragments[0].start):d&&(c=d.start,Di(o,c));else{var u;c=this.alignPlaylists(o,l.details,(u=this.levelLastLoaded)==null?void 0:u.details),c===0&&d&&(c=d.start,Di(o,c))}}l.details=o,this.levelLastLoaded=l,a===i&&(!this.startFragRequested&&(this.mainDetails||!o.live)&&this.setStartPosition(this.mainDetails||o,c),this.tick(),o.live&&!this.fragCurrent&&this.media&&this.state===w.IDLE&&(es(null,o.fragments,this.media.currentTime,0)||(this.warn("Subtitle playlist not aligned with playback"),l.details=void 0)))}_handleFragmentLoadComplete(e){const{frag:t,payload:s}=e,i=t.decryptdata,n=this.hls;if(!this.fragContextChanged(t)&&s&&s.byteLength>0&&i!=null&&i.key&&i.iv&&Nt(i.method)){const o=performance.now();this.decrypter.decrypt(new Uint8Array(s),i.key.buffer,i.iv.buffer,zi(i.method)).catch(a=>{throw n.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.FRAG_DECRYPT_ERROR,fatal:!1,error:a,reason:a.message,frag:t}),a}).then(a=>{const l=performance.now();n.trigger(y.FRAG_DECRYPTED,{frag:t,payload:a,stats:{tstart:o,tdecrypt:l}})}).catch(a=>{this.warn(`${a.name}: ${a.message}`),this.state=w.IDLE})}}doTick(){if(!this.media){this.state=w.IDLE;return}if(this.state===w.IDLE){const{currentTrackId:e,levels:t}=this,s=t==null?void 0:t[e];if(!s||!t.length||!s.details)return;const{config:i}=this,n=this.getLoadPosition(),o=ue.bufferedInfo(this.tracksBuffered[this.currentTrackId]||[],n,i.maxBufferHole),{end:a,len:l}=o,c=s.details,u=this.hls.maxBufferLength+c.levelTargetDuration;if(l>u)return;const h=c.fragments,d=h.length,g=c.edge;let f=null;const m=this.fragPrevious;if(a<g){const p=i.maxFragLookUpTolerance,E=a>g-p?0:p;f=es(m,h,Math.max(h[0].start,a),E),!f&&m&&m.start<h[0].start&&(f=h[0])}else f=h[d-1];if(!f)return;if(f=this.mapToInitFragWhenRequired(f),f.sn!=="initSegment"){const p=f.sn-c.startSN,E=h[p-1];E&&E.cc===f.cc&&this.fragmentTracker.getState(E)===Te.NOT_LOADED&&(f=E)}this.fragmentTracker.getState(f)===Te.NOT_LOADED&&this.loadFragment(f,s,a)}}loadFragment(e,t,s){e.sn==="initSegment"?this._loadInitSegment(e,t):super.loadFragment(e,t,s)}get mediaBufferTimeRanges(){return new Uu(this.tracksBuffered[this.currentTrackId]||[])}}class Uu{constructor(e){this.buffered=void 0;const t=(s,i,n)=>{if(i=i>>>0,i>n-1)throw new DOMException(`Failed to execute '${s}' on 'TimeRanges': The index provided (${i}) is greater than the maximum bound (${n})`);return e[i][s]};this.buffered={get length(){return e.length},end(s){return t("end",s,e.length)},start(s){return t("start",s,e.length)}}}}class Gu extends er{constructor(e){super(e,"subtitle-track-controller"),this.media=null,this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0,this.queuedDefaultTrack=-1,this.useTextTrackPolling=!1,this.subtitlePollingInterval=-1,this._subtitleDisplay=!0,this.asyncPollTrackChange=()=>this.pollTrackChange(0),this.onTextTracksChanged=()=>{if(this.useTextTrackPolling||self.clearInterval(this.subtitlePollingInterval),!this.media||!this.hls.config.renderTextTracksNatively)return;let t=null;const s=xs(this.media.textTracks);for(let n=0;n<s.length;n++)if(s[n].mode==="hidden")t=s[n];else if(s[n].mode==="showing"){t=s[n];break}const i=this.findTrackForTextTrack(t);this.subtitleTrack!==i&&this.setSubtitleTrack(i)},this.registerListeners()}destroy(){this.unregisterListeners(),this.tracks.length=0,this.tracksInGroup.length=0,this.currentTrack=null,this.onTextTracksChanged=this.asyncPollTrackChange=null,super.destroy()}get subtitleDisplay(){return this._subtitleDisplay}set subtitleDisplay(e){this._subtitleDisplay=e,this.trackId>-1&&this.toggleTrackModes()}registerListeners(){const{hls:e}=this;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.on(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADING,this.onLevelLoading,this),e.off(y.LEVEL_SWITCHING,this.onLevelSwitching,this),e.off(y.SUBTITLE_TRACK_LOADED,this.onSubtitleTrackLoaded,this),e.off(y.ERROR,this.onError,this)}onMediaAttached(e,t){this.media=t.media,this.media&&(this.queuedDefaultTrack>-1&&(this.subtitleTrack=this.queuedDefaultTrack,this.queuedDefaultTrack=-1),this.useTextTrackPolling=!(this.media.textTracks&&"onchange"in this.media.textTracks),this.useTextTrackPolling?this.pollTrackChange(500):this.media.textTracks.addEventListener("change",this.asyncPollTrackChange))}pollTrackChange(e){self.clearInterval(this.subtitlePollingInterval),this.subtitlePollingInterval=self.setInterval(this.onTextTracksChanged,e)}onMediaDetaching(){if(!this.media)return;self.clearInterval(this.subtitlePollingInterval),this.useTextTrackPolling||this.media.textTracks.removeEventListener("change",this.asyncPollTrackChange),this.trackId>-1&&(this.queuedDefaultTrack=this.trackId),xs(this.media.textTracks).forEach(t=>{Ft(t)}),this.subtitleTrack=-1,this.media=null}onManifestLoading(){this.tracks=[],this.groupIds=null,this.tracksInGroup=[],this.trackId=-1,this.currentTrack=null,this.selectDefaultTrack=!0}onManifestParsed(e,t){this.tracks=t.subtitleTracks}onSubtitleTrackLoaded(e,t){const{id:s,groupId:i,details:n}=t,o=this.tracksInGroup[s];if(!o||o.groupId!==i){this.warn(`Subtitle track with id:${s} and group:${i} not found in active group ${o==null?void 0:o.groupId}`);return}const a=o.details;o.details=t.details,this.log(`Subtitle track ${s} "${o.name}" lang:${o.lang} group:${i} loaded [${n.startSN}-${n.endSN}]`),s===this.trackId&&this.playlistLoaded(s,t,a)}onLevelLoading(e,t){this.switchLevel(t.level)}onLevelSwitching(e,t){this.switchLevel(t.level)}switchLevel(e){const t=this.hls.levels[e];if(!t)return;const s=t.subtitleGroups||null,i=this.groupIds;let n=this.currentTrack;if(!s||(i==null?void 0:i.length)!==(s==null?void 0:s.length)||s!=null&&s.some(o=>(i==null?void 0:i.indexOf(o))===-1)){this.groupIds=s,this.trackId=-1,this.currentTrack=null;const o=this.tracks.filter(u=>!s||s.indexOf(u.groupId)!==-1);if(o.length)this.selectDefaultTrack&&!o.some(u=>u.default)&&(this.selectDefaultTrack=!1),o.forEach((u,h)=>{u.id=h});else if(!n&&!this.tracksInGroup.length)return;this.tracksInGroup=o;const a=this.hls.config.subtitlePreference;if(!n&&a){this.selectDefaultTrack=!1;const u=it(a,o);if(u>-1)n=o[u];else{const h=it(a,this.tracks);n=this.tracks[h]}}let l=this.findTrackId(n);l===-1&&n&&(l=this.findTrackId(null));const c={subtitleTracks:o};this.log(`Updating subtitle tracks, ${o.length} track(s) found in "${s==null?void 0:s.join(",")}" group-id`),this.hls.trigger(y.SUBTITLE_TRACKS_UPDATED,c),l!==-1&&this.trackId===-1&&this.setSubtitleTrack(l)}else this.shouldReloadPlaylist(n)&&this.setSubtitleTrack(this.trackId)}findTrackId(e){const t=this.tracksInGroup,s=this.selectDefaultTrack;for(let i=0;i<t.length;i++){const n=t[i];if(!(s&&!n.default||!s&&!e)&&(!e||Bt(n,e)))return i}if(e){for(let i=0;i<t.length;i++){const n=t[i];if(Vt(e.attrs,n.attrs,["LANGUAGE","ASSOC-LANGUAGE","CHARACTERISTICS"]))return i}for(let i=0;i<t.length;i++){const n=t[i];if(Vt(e.attrs,n.attrs,["LANGUAGE"]))return i}}return-1}findTrackForTextTrack(e){if(e){const t=this.tracksInGroup;for(let s=0;s<t.length;s++){const i=t[s];if(ki(i,e))return s}}return-1}onError(e,t){t.fatal||!t.context||t.context.type===re.SUBTITLE_TRACK&&t.context.id===this.trackId&&(!this.groupIds||this.groupIds.indexOf(t.context.groupId)!==-1)&&this.checkRetry(t)}get allSubtitleTracks(){return this.tracks}get subtitleTracks(){return this.tracksInGroup}get subtitleTrack(){return this.trackId}set subtitleTrack(e){this.selectDefaultTrack=!1,this.setSubtitleTrack(e)}setSubtitleOption(e){if(this.hls.config.subtitlePreference=e,e){const t=this.allSubtitleTracks;if(this.selectDefaultTrack=!1,t.length){const s=this.currentTrack;if(s&&Bt(e,s))return s;const i=it(e,this.tracksInGroup);if(i>-1){const n=this.tracksInGroup[i];return this.setSubtitleTrack(i),n}else{if(s)return null;{const n=it(e,t);if(n>-1)return t[n]}}}}return null}loadPlaylist(e){super.loadPlaylist();const t=this.currentTrack;if(this.shouldLoadPlaylist(t)&&t){const s=t.id,i=t.groupId;let n=t.url;if(e)try{n=e.addDirectives(n)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}this.log(`Loading subtitle playlist for id ${s}`),this.hls.trigger(y.SUBTITLE_TRACK_LOADING,{url:n,id:s,groupId:i,deliveryDirectives:e||null})}}toggleTrackModes(){const{media:e}=this;if(!e)return;const t=xs(e.textTracks),s=this.currentTrack;let i;if(s&&(i=t.filter(n=>ki(s,n))[0],i||this.warn(`Unable to find subtitle TextTrack with name "${s.name}" and language "${s.lang}"`)),[].slice.call(t).forEach(n=>{n.mode!=="disabled"&&n!==i&&(n.mode="disabled")}),i){const n=this.subtitleDisplay?"showing":"hidden";i.mode!==n&&(i.mode=n)}}setSubtitleTrack(e){const t=this.tracksInGroup;if(!this.media){this.queuedDefaultTrack=e;return}if(e<-1||e>=t.length||!V(e)){this.warn(`Invalid subtitle track id: ${e}`);return}this.clearTimer(),this.selectDefaultTrack=!1;const s=this.currentTrack,i=t[e]||null;if(this.trackId=e,this.currentTrack=i,this.toggleTrackModes(),!i){this.hls.trigger(y.SUBTITLE_TRACK_SWITCH,{id:e});return}const n=!!i.details&&!i.details.live;if(e===this.trackId&&i===s&&n)return;this.log(`Switching to subtitle-track ${e}`+(i?` "${i.name}" lang:${i.lang} group:${i.groupId}`:""));const{id:o,groupId:a="",name:l,type:c,url:u}=i;this.hls.trigger(y.SUBTITLE_TRACK_SWITCH,{id:o,groupId:a,name:l,type:c,url:u});const h=this.switchParams(i.url,s==null?void 0:s.details,i.details);this.loadPlaylist(h)}}class $u{constructor(e){this.buffers=void 0,this.queues={video:[],audio:[],audiovideo:[]},this.buffers=e}append(e,t,s){const i=this.queues[t];i.push(e),i.length===1&&!s&&this.executeNext(t)}appendBlocker(e){return new Promise(t=>{const s={execute:t,onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.append(s,e)})}unblockAudio(e){this.queues.audio[0]===e&&this.shiftAndExecuteNext("audio")}executeNext(e){const t=this.queues[e];if(t.length){const s=t[0];try{s.execute()}catch(i){te.warn(`[buffer-operation-queue]: Exception executing "${e}" SourceBuffer operation: ${i}`),s.onError(i);const n=this.buffers[e];n!=null&&n.updating||this.shiftAndExecuteNext(e)}}}shiftAndExecuteNext(e){this.queues[e].shift(),this.executeNext(e)}current(e){return this.queues[e][0]}}const mn=/(avc[1234]|hvc1|hev1|dvh[1e]|vp09|av01)(?:\.[^.,]+)+/;class Vu extends yt{constructor(e,t){super("buffer-controller",e.logger),this.details=null,this._objectUrl=null,this.operationQueue=void 0,this.listeners=void 0,this.hls=void 0,this.fragmentTracker=void 0,this.bufferCodecEventsExpected=0,this._bufferCodecEventsTotal=0,this.media=null,this.mediaSource=null,this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0,this.appendSource=void 0,this.appendErrors={audio:0,video:0,audiovideo:0},this.tracks={},this.pendingTracks={},this.sourceBuffer=void 0,this._onEndStreaming=s=>{this.hls&&this.hls.pauseBuffering()},this._onStartStreaming=s=>{this.hls&&this.hls.resumeBuffering()},this._onMediaSourceOpen=()=>{const{media:s,mediaSource:i}=this;if(this.log("Media source opened"),s){s.removeEventListener("emptied",this._onMediaEmptied);const n=this.getDurationAndRange();n&&this.updateMediaSource(n),this.hls.trigger(y.MEDIA_ATTACHED,{media:s,mediaSource:i})}i&&i.removeEventListener("sourceopen",this._onMediaSourceOpen),this.checkPendingTracks()},this._onMediaSourceClose=()=>{this.log("Media source closed")},this._onMediaSourceEnded=()=>{this.log("Media source ended")},this._onMediaEmptied=()=>{const{mediaSrc:s,_objectUrl:i}=this;s!==i&&this.error(`Media element src was set while attaching MediaSource (${i} > ${s})`)},this.hls=e,this.fragmentTracker=t,this.appendSource=Pl(pt(e.config.preferManagedMediaSource)),this._initSourceBuffer(),this.registerListeners()}hasSourceTypes(){return this.getSourceBufferTypes().length>0||Object.keys(this.pendingTracks).length>0}destroy(){this.unregisterListeners(),this.details=null,this.lastMpegAudioChunk=null,this.hls=this.fragmentTracker=null,this._onMediaSourceOpen=this._onMediaSourceClose=null,this._onMediaSourceEnded=null,this._onStartStreaming=this._onEndStreaming=null}registerListeners(){const{hls:e}=this;e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.BUFFER_RESET,this.onBufferReset,this),e.on(y.BUFFER_APPENDING,this.onBufferAppending,this),e.on(y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(y.BUFFER_EOS,this.onBufferEos,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.on(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.on(y.FRAG_PARSED,this.onFragParsed,this),e.on(y.FRAG_CHANGED,this.onFragChanged,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.BUFFER_RESET,this.onBufferReset,this),e.off(y.BUFFER_APPENDING,this.onBufferAppending,this),e.off(y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(y.BUFFER_EOS,this.onBufferEos,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),e.off(y.LEVEL_UPDATED,this.onLevelUpdated,this),e.off(y.FRAG_PARSED,this.onFragParsed,this),e.off(y.FRAG_CHANGED,this.onFragChanged,this),e.off(y.ERROR,this.onError,this)}_initSourceBuffer(){this.sourceBuffer={},this.operationQueue=new $u(this.sourceBuffer),this.listeners={audio:[],video:[],audiovideo:[]},this.resetAppendErrors(),this.lastMpegAudioChunk=null,this.blockedAudioAppend=null,this.lastVideoAppendEnd=0}onManifestLoading(){this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=0,this.details=null}onManifestParsed(e,t){let s=2;(t.audio&&!t.video||!t.altAudio)&&(s=1),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal=s,this.log(`${this.bufferCodecEventsExpected} bufferCodec event(s) expected`)}onMediaAttaching(e,t){const s=this.media=t.media,i=pt(this.appendSource);if(s&&i){var n;const o=this.mediaSource=new i;this.log(`created media source: ${(n=o.constructor)==null?void 0:n.name}`),o.addEventListener("sourceopen",this._onMediaSourceOpen),o.addEventListener("sourceended",this._onMediaSourceEnded),o.addEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(o.addEventListener("startstreaming",this._onStartStreaming),o.addEventListener("endstreaming",this._onEndStreaming));const a=this._objectUrl=self.URL.createObjectURL(o);if(this.appendSource)try{s.removeAttribute("src");const l=self.ManagedMediaSource;s.disableRemotePlayback=s.disableRemotePlayback||l&&o instanceof l,pn(s),Ku(s,a),s.load()}catch{s.src=a}else s.src=a;s.addEventListener("emptied",this._onMediaEmptied)}}onMediaDetaching(){const{media:e,mediaSource:t,_objectUrl:s}=this;if(t){if(this.log("media source detaching"),t.readyState==="open")try{t.endOfStream()}catch(i){this.warn(`onMediaDetaching: ${i.message} while calling endOfStream`)}this.onBufferReset(),t.removeEventListener("sourceopen",this._onMediaSourceOpen),t.removeEventListener("sourceended",this._onMediaSourceEnded),t.removeEventListener("sourceclose",this._onMediaSourceClose),this.appendSource&&(t.removeEventListener("startstreaming",this._onStartStreaming),t.removeEventListener("endstreaming",this._onEndStreaming)),this.mediaSource=null,this._objectUrl=null}e&&(e.removeEventListener("emptied",this._onMediaEmptied),s&&self.URL.revokeObjectURL(s),this.mediaSrc===s?(e.removeAttribute("src"),this.appendSource&&pn(e),e.load()):this.warn("media|source.src was changed by a third party - skip cleanup"),this.media=null),this.bufferCodecEventsExpected=this._bufferCodecEventsTotal,this.pendingTracks={},this.tracks={},this.hls.trigger(y.MEDIA_DETACHED,void 0)}onBufferReset(){this.getSourceBufferTypes().forEach(e=>{this.resetBuffer(e)}),this._initSourceBuffer(),this.hls.resumeBuffering()}resetBuffer(e){const t=this.sourceBuffer[e];try{if(t){var s;this.removeBufferListeners(e),this.sourceBuffer[e]=void 0,(s=this.mediaSource)!=null&&s.sourceBuffers.length&&this.mediaSource.removeSourceBuffer(t)}}catch(i){this.warn(`onBufferReset ${e}`,i)}}onBufferCodecs(e,t){const s=this.getSourceBufferTypes().length,i=Object.keys(t);if(i.forEach(o=>{if(s){var a;const c=this.tracks[o];if(c&&typeof((a=c.buffer)==null?void 0:a.changeType)=="function"){var l;const{id:u,codec:h,levelCodec:d,container:g,metadata:f}=t[o],m=Pr(c.codec,c.levelCodec),p=m==null?void 0:m.replace(mn,"$1");let E=Pr(h,d);const x=(l=E)==null?void 0:l.replace(mn,"$1");if(E&&p!==x){o.slice(0,5)==="audio"&&(E=Os(E,this.appendSource));const T=`${g};codecs=${E}`;this.appendChangeType(o,T),this.log(`switching codec ${m} to ${E}`),this.tracks[o]={buffer:c.buffer,codec:h,container:g,levelCodec:d,metadata:f,id:u}}}}else this.pendingTracks[o]=t[o]}),s)return;const n=Math.max(this.bufferCodecEventsExpected-1,0);this.bufferCodecEventsExpected!==n&&(this.log(`${n} bufferCodec event(s) expected ${i.join(",")}`),this.bufferCodecEventsExpected=n),this.mediaSource&&this.mediaSource.readyState==="open"&&this.checkPendingTracks()}appendChangeType(e,t){const{operationQueue:s}=this,i={execute:()=>{const n=this.sourceBuffer[e];n&&(this.log(`changing ${e} sourceBuffer type to ${t}`),n.changeType(t)),s.shiftAndExecuteNext(e)},onStart:()=>{},onComplete:()=>{},onError:n=>{this.warn(`Failed to change ${e} SourceBuffer type`,n)}};s.append(i,e,!!this.pendingTracks[e])}blockAudio(e){var t;const s=e.start,i=s+e.duration*.05;if(((t=this.fragmentTracker.getAppendedFrag(s,H.MAIN))==null?void 0:t.gap)===!0)return;const o={execute:()=>{var a;(this.lastVideoAppendEnd>i||this.sourceBuffer.video&&ue.isBuffered(this.sourceBuffer.video,i)||((a=this.fragmentTracker.getAppendedFrag(i,H.MAIN))==null?void 0:a.gap)===!0)&&(this.blockedAudioAppend=null,this.operationQueue.shiftAndExecuteNext("audio"))},onStart:()=>{},onComplete:()=>{},onError:()=>{}};this.blockedAudioAppend={op:o,frag:e},this.operationQueue.append(o,"audio",!0)}unblockAudio(){const e=this.blockedAudioAppend;e&&(this.blockedAudioAppend=null,this.operationQueue.unblockAudio(e.op))}onBufferAppending(e,t){const{operationQueue:s,tracks:i}=this,{data:n,type:o,parent:a,frag:l,part:c,chunkMeta:u}=t,h=u.buffering[o],d=l.sn,g=self.performance.now();h.start=g;const f=l.stats.buffering,m=c?c.stats.buffering:null;f.start===0&&(f.start=g),m&&m.start===0&&(m.start=g);const p=i.audio;let E=!1;o==="audio"&&(p==null?void 0:p.container)==="audio/mpeg"&&(E=!this.lastMpegAudioChunk||u.id===1||this.lastMpegAudioChunk.sn!==u.sn,this.lastMpegAudioChunk=u);const x=this.sourceBuffer.video;if(x&&d!=="initSegment"){const A=c||l,C=this.blockedAudioAppend;if(o==="audio"&&a!=="main"&&!this.blockedAudioAppend){const v=A.start+A.duration*.05,I=x.buffered,R=this.operationQueue.current("video");!I.length&&!R?this.blockAudio(A):!R&&!ue.isBuffered(x,v)&&this.lastVideoAppendEnd<v&&this.blockAudio(A)}else if(o==="video"){const L=A.end;if(C){const v=C.frag.start;(L>v||L<this.lastVideoAppendEnd||ue.isBuffered(x,v))&&this.unblockAudio()}this.lastVideoAppendEnd=L}}const T=(c||l).start,_={execute:()=>{if(h.executeStart=self.performance.now(),E){const A=this.sourceBuffer[o];if(A){const C=T-A.timestampOffset;Math.abs(C)>=.1&&(this.log(`Updating audio SourceBuffer timestampOffset to ${T} (delta: ${C}) sn: ${d})`),A.timestampOffset=T)}}this.appendExecutor(n,o)},onStart:()=>{},onComplete:()=>{const A=self.performance.now();h.executeEnd=h.end=A,f.first===0&&(f.first=A),m&&m.first===0&&(m.first=A);const{sourceBuffer:C}=this,L={};for(const v in C)L[v]=ue.getBuffered(C[v]);this.appendErrors[o]=0,o==="audio"||o==="video"?this.appendErrors.audiovideo=0:(this.appendErrors.audio=0,this.appendErrors.video=0),this.hls.trigger(y.BUFFER_APPENDED,{type:o,frag:l,part:c,chunkMeta:u,parent:l.type,timeRanges:L})},onError:A=>{const C={type:Y.MEDIA_ERROR,parent:l.type,details:D.BUFFER_APPEND_ERROR,sourceBufferName:o,frag:l,part:c,chunkMeta:u,error:A,err:A,fatal:!1};if(A.code===DOMException.QUOTA_EXCEEDED_ERR)C.details=D.BUFFER_FULL_ERROR;else{const L=++this.appendErrors[o];C.details=D.BUFFER_APPEND_ERROR,this.warn(`Failed ${L}/${this.hls.config.appendErrorMaxRetry} times to append segment in "${o}" sourceBuffer`),L>=this.hls.config.appendErrorMaxRetry&&(C.fatal=!0)}this.hls.trigger(y.ERROR,C)}};s.append(_,o,!!this.pendingTracks[o])}getFlushOp(e,t,s){return{execute:()=>{this.removeExecutor(e,t,s)},onStart:()=>{},onComplete:()=>{this.hls.trigger(y.BUFFER_FLUSHED,{type:e})},onError:i=>{this.warn(`Failed to remove from ${e} SourceBuffer`,i)}}}onBufferFlushing(e,t){const{operationQueue:s}=this,{type:i,startOffset:n,endOffset:o}=t;i?s.append(this.getFlushOp(i,n,o),i):this.getSourceBufferTypes().forEach(a=>{s.append(this.getFlushOp(a,n,o),a)})}onFragParsed(e,t){const{frag:s,part:i}=t,n=[],o=i?i.elementaryStreams:s.elementaryStreams;o[ce.AUDIOVIDEO]?n.push("audiovideo"):(o[ce.AUDIO]&&n.push("audio"),o[ce.VIDEO]&&n.push("video"));const a=()=>{const l=self.performance.now();s.stats.buffering.end=l,i&&(i.stats.buffering.end=l);const c=i?i.stats:s.stats;this.hls.trigger(y.FRAG_BUFFERED,{frag:s,part:i,stats:c,id:s.type})};n.length===0&&this.warn(`Fragments must have at least one ElementaryStreamType set. type: ${s.type} level: ${s.level} sn: ${s.sn}`),this.blockBuffers(a,n)}onFragChanged(e,t){this.trimBuffers()}onBufferEos(e,t){t.type==="video"&&this.unblockAudio(),this.getSourceBufferTypes().reduce((i,n)=>{const o=this.sourceBuffer[n];return o&&(!t.type||t.type===n)&&(o.ending=!0,o.ended||(o.ended=!0,this.log(`${n} sourceBuffer now EOS`))),i&&!!(!o||o.ended)},!0)&&(this.log("Queueing mediaSource.endOfStream()"),this.blockBuffers(()=>{this.getSourceBufferTypes().forEach(n=>{const o=this.sourceBuffer[n];o&&(o.ending=!1)});const{mediaSource:i}=this;if(!i||i.readyState!=="open"){i&&this.log(`Could not call mediaSource.endOfStream(). mediaSource.readyState: ${i.readyState}`);return}this.log("Calling mediaSource.endOfStream()"),i.endOfStream()}))}onLevelUpdated(e,{details:t}){if(!t.fragments.length)return;this.details=t;const s=this.getDurationAndRange();s&&(this.getSourceBufferTypes().length?this.blockBuffers(()=>this.updateMediaSource(s)):this.updateMediaSource(s))}onError(e,t){if(t.details===D.BUFFER_APPEND_ERROR&&t.frag){var s;const i=(s=t.errorAction)==null?void 0:s.nextAutoLevel;V(i)&&i!==t.frag.level&&this.resetAppendErrors()}}resetAppendErrors(){this.appendErrors={audio:0,video:0,audiovideo:0}}trimBuffers(){const{hls:e,details:t,media:s}=this;if(!s||t===null||!this.getSourceBufferTypes().length)return;const n=e.config,o=s.currentTime,a=t.levelTargetDuration,l=t.live&&n.liveBackBufferLength!==null?n.liveBackBufferLength:n.backBufferLength;if(V(l)&&l>0){const c=Math.max(l,a),u=Math.floor(o/a)*a-c;this.flushBackBuffer(o,a,u)}if(V(n.frontBufferFlushThreshold)&&n.frontBufferFlushThreshold>0){const c=Math.max(n.maxBufferLength,n.frontBufferFlushThreshold),u=Math.max(c,a),h=Math.floor(o/a)*a+u;this.flushFrontBuffer(o,a,h)}}flushBackBuffer(e,t,s){const{details:i,sourceBuffer:n}=this;this.getSourceBufferTypes().forEach(a=>{const l=n[a];if(l){const c=ue.getBuffered(l);if(c.length>0&&s>c.start(0)){if(this.hls.trigger(y.BACK_BUFFER_REACHED,{bufferEnd:s}),i!=null&&i.live)this.hls.trigger(y.LIVE_BACK_BUFFER_REACHED,{bufferEnd:s});else if(l.ended&&c.end(c.length-1)-e<t*2){this.log(`Cannot flush ${a} back buffer while SourceBuffer is in ended state`);return}this.hls.trigger(y.BUFFER_FLUSHING,{startOffset:0,endOffset:s,type:a})}}})}flushFrontBuffer(e,t,s){const{sourceBuffer:i}=this;this.getSourceBufferTypes().forEach(o=>{const a=i[o];if(a){const l=ue.getBuffered(a),c=l.length;if(c<2)return;const u=l.start(c-1),h=l.end(c-1);if(s>u||e>=u&&e<=h)return;if(a.ended&&e-h<2*t){this.log(`Cannot flush ${o} front buffer while SourceBuffer is in ended state`);return}this.hls.trigger(y.BUFFER_FLUSHING,{startOffset:u,endOffset:1/0,type:o})}})}getDurationAndRange(){if(!this.details||!this.media||!this.mediaSource||this.mediaSource.readyState!=="open")return null;const{details:e,hls:t,media:s,mediaSource:i}=this,n=e.fragments[0].start+e.totalduration,o=s.duration,a=V(i.duration)?i.duration:0;if(e.live&&t.config.liveDurationInfinity){if(i.duration=1/0,e.fragments.length&&e.live&&i.setLiveSeekableRange){const c=Math.max(0,e.fragments[0].start),u=Math.max(c,c+e.totalduration);return{duration:1/0,start:c,end:u}}return{duration:1/0}}else if(n>a&&n>o||!V(o))return{duration:n};return null}updateMediaSource({duration:e,start:t,end:s}){!this.media||!this.mediaSource||this.mediaSource.readyState!=="open"||(V(e)&&this.log(`Updating Media Source duration to ${e.toFixed(3)}`),this.mediaSource.duration=e,t!==void 0&&s!==void 0&&(this.log(`Media Source duration is set to ${this.mediaSource.duration}. Setting seekable range to ${t}-${s}.`),this.mediaSource.setLiveSeekableRange(t,s)))}checkPendingTracks(){const{bufferCodecEventsExpected:e,operationQueue:t,pendingTracks:s}=this,i=Object.keys(s).length;if(i&&(!e||i===2||"audiovideo"in s)){this.createSourceBuffers(s),this.pendingTracks={};const n=this.getSourceBufferTypes();if(n.length)this.hls.trigger(y.BUFFER_CREATED,{tracks:this.tracks}),n.forEach(o=>{t.executeNext(o)});else{const o=new Error("could not create source buffer for media codec(s)");this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_INCOMPATIBLE_CODECS_ERROR,fatal:!0,error:o,reason:o.message})}}}createSourceBuffers(e){const{sourceBuffer:t,mediaSource:s}=this;if(!s)throw Error("createSourceBuffers called when mediaSource was null");for(const n in e)if(!t[n]){var i;const o=e[n];if(!o)throw Error(`source buffer exists for track ${n}, however track does not`);let a=((i=o.levelCodec)==null?void 0:i.indexOf(","))===-1?o.levelCodec:o.codec;a&&n.slice(0,5)==="audio"&&(a=Os(a,this.appendSource));const l=`${o.container};codecs=${a}`;this.log(`creating sourceBuffer(${l})`);try{const c=t[n]=s.addSourceBuffer(l),u=n;this.addBufferListener(u,"updatestart",this._onSBUpdateStart),this.addBufferListener(u,"updateend",this._onSBUpdateEnd),this.addBufferListener(u,"error",this._onSBUpdateError),this.appendSource&&this.addBufferListener(u,"bufferedchange",(h,d)=>{const g=d.removedRanges;g!=null&&g.length&&this.hls.trigger(y.BUFFER_FLUSHED,{type:n})}),this.tracks[n]={buffer:c,codec:a,container:o.container,levelCodec:o.levelCodec,metadata:o.metadata,id:o.id}}catch(c){this.error(`error while trying to add sourceBuffer: ${c.message}`),this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_ADD_CODEC_ERROR,fatal:!1,error:c,sourceBufferName:n,mimeType:l})}}}get mediaSrc(){var e;const t=((e=this.media)==null?void 0:e.firstChild)||this.media;return t==null?void 0:t.src}_onSBUpdateStart(e){const{operationQueue:t}=this;t.current(e).onStart()}_onSBUpdateEnd(e){var t;if(((t=this.mediaSource)==null?void 0:t.readyState)==="closed"){this.resetBuffer(e);return}const{operationQueue:s}=this;s.current(e).onComplete(),s.shiftAndExecuteNext(e)}_onSBUpdateError(e,t){var s;const i=new Error(`${e} SourceBuffer error. MediaSource readyState: ${(s=this.mediaSource)==null?void 0:s.readyState}`);this.error(`${i}`,t),this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_APPENDING_ERROR,sourceBufferName:e,error:i,fatal:!1});const n=this.operationQueue.current(e);n&&n.onError(i)}removeExecutor(e,t,s){const{media:i,mediaSource:n,operationQueue:o,sourceBuffer:a}=this,l=a[e];if(!i||!n||!l){this.warn(`Attempting to remove from the ${e} SourceBuffer, but it does not exist`),o.shiftAndExecuteNext(e);return}const c=V(i.duration)?i.duration:1/0,u=V(n.duration)?n.duration:1/0,h=Math.max(0,t),d=Math.min(s,c,u);d>h&&(!l.ending||l.ended)?(l.ended=!1,this.log(`Removing [${h},${d}] from the ${e} SourceBuffer`),l.remove(h,d)):o.shiftAndExecuteNext(e)}appendExecutor(e,t){const s=this.sourceBuffer[t];if(!s){if(!this.pendingTracks[t])throw new Error(`Attempting to append to the ${t} SourceBuffer, but it does not exist`);return}s.ending=!1,s.ended=!1,s.appendBuffer(e)}blockBuffers(e,t=this.getSourceBufferTypes()){if(!t.length){this.log("Blocking operation requested, but no SourceBuffers exist"),Promise.resolve().then(e);return}const{operationQueue:s}=this,i=t.map(o=>s.appendBlocker(o));t.length>1&&!!this.blockedAudioAppend&&this.unblockAudio(),Promise.all(i).then(o=>{e(),t.forEach((a,l)=>{const c=this.sourceBuffer[a];c!=null&&c.updating||s.shiftAndExecuteNext(a)})})}getSourceBufferTypes(){return Object.keys(this.sourceBuffer)}addBufferListener(e,t,s){const i=this.sourceBuffer[e];if(!i)return;const n=s.bind(this,e);this.listeners[e].push({event:t,listener:n}),i.addEventListener(t,n)}removeBufferListeners(e){const t=this.sourceBuffer[e];t&&this.listeners[e].forEach(s=>{t.removeEventListener(s.event,s.listener)})}}function pn(r){const e=r.querySelectorAll("source");[].slice.call(e).forEach(t=>{r.removeChild(t)})}function Ku(r,e){const t=self.document.createElement("source");t.type="video/mp4",t.src=e,r.appendChild(t)}const Hu={42:225,92:233,94:237,95:243,96:250,123:231,124:247,125:209,126:241,127:9608,128:174,129:176,130:189,131:191,132:8482,133:162,134:163,135:9834,136:224,137:32,138:232,139:226,140:234,141:238,142:244,143:251,144:193,145:201,146:211,147:218,148:220,149:252,150:8216,151:161,152:42,153:8217,154:9473,155:169,156:8480,157:8226,158:8220,159:8221,160:192,161:194,162:199,163:200,164:202,165:203,166:235,167:206,168:207,169:239,170:212,171:217,172:249,173:219,174:171,175:187,176:195,177:227,178:205,179:204,180:236,181:210,182:242,183:213,184:245,185:123,186:125,187:92,188:94,189:95,190:124,191:8764,192:196,193:228,194:214,195:246,196:223,197:165,198:164,199:9475,200:197,201:229,202:216,203:248,204:9487,205:9491,206:9495,207:9499},jo=r=>String.fromCharCode(Hu[r]||r),Ke=15,ot=100,Wu={17:1,18:3,21:5,22:7,23:9,16:11,19:12,20:14},Yu={17:2,18:4,21:6,22:8,23:10,19:13,20:15},qu={25:1,26:3,29:5,30:7,31:9,24:11,27:12,28:14},ju={25:2,26:4,29:6,30:8,31:10,27:13,28:15},zu=["white","green","blue","cyan","red","yellow","magenta","black","transparent"];class Xu{constructor(){this.time=null,this.verboseLevel=0}log(e,t){if(this.verboseLevel>=e){const s=typeof t=="function"?t():t;te.log(`${this.time} [${e}] ${s}`)}}}const xt=function(e){const t=[];for(let s=0;s<e.length;s++)t.push(e[s].toString(16));return t};class zo{constructor(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}reset(){this.foreground="white",this.underline=!1,this.italics=!1,this.background="black",this.flash=!1}setStyles(e){const t=["foreground","underline","italics","background","flash"];for(let s=0;s<t.length;s++){const i=t[s];e.hasOwnProperty(i)&&(this[i]=e[i])}}isDefault(){return this.foreground==="white"&&!this.underline&&!this.italics&&this.background==="black"&&!this.flash}equals(e){return this.foreground===e.foreground&&this.underline===e.underline&&this.italics===e.italics&&this.background===e.background&&this.flash===e.flash}copy(e){this.foreground=e.foreground,this.underline=e.underline,this.italics=e.italics,this.background=e.background,this.flash=e.flash}toString(){return"color="+this.foreground+", underline="+this.underline+", italics="+this.italics+", background="+this.background+", flash="+this.flash}}class Qu{constructor(){this.uchar=" ",this.penState=new zo}reset(){this.uchar=" ",this.penState.reset()}setChar(e,t){this.uchar=e,this.penState.copy(t)}setPenState(e){this.penState.copy(e)}equals(e){return this.uchar===e.uchar&&this.penState.equals(e.penState)}copy(e){this.uchar=e.uchar,this.penState.copy(e.penState)}isEmpty(){return this.uchar===" "&&this.penState.isDefault()}}class Zu{constructor(e){this.chars=[],this.pos=0,this.currPenState=new zo,this.cueStartTime=null,this.logger=void 0;for(let t=0;t<ot;t++)this.chars.push(new Qu);this.logger=e}equals(e){for(let t=0;t<ot;t++)if(!this.chars[t].equals(e.chars[t]))return!1;return!0}copy(e){for(let t=0;t<ot;t++)this.chars[t].copy(e.chars[t])}isEmpty(){let e=!0;for(let t=0;t<ot;t++)if(!this.chars[t].isEmpty()){e=!1;break}return e}setCursor(e){this.pos!==e&&(this.pos=e),this.pos<0?(this.logger.log(3,"Negative cursor position "+this.pos),this.pos=0):this.pos>ot&&(this.logger.log(3,"Too large cursor position "+this.pos),this.pos=ot)}moveCursor(e){const t=this.pos+e;if(e>1)for(let s=this.pos+1;s<t+1;s++)this.chars[s].setPenState(this.currPenState);this.setCursor(t)}backSpace(){this.moveCursor(-1),this.chars[this.pos].setChar(" ",this.currPenState)}insertChar(e){e>=144&&this.backSpace();const t=jo(e);if(this.pos>=ot){this.logger.log(0,()=>"Cannot insert "+e.toString(16)+" ("+t+") at position "+this.pos+". Skipping it!");return}this.chars[this.pos].setChar(t,this.currPenState),this.moveCursor(1)}clearFromPos(e){let t;for(t=e;t<ot;t++)this.chars[t].reset()}clear(){this.clearFromPos(0),this.pos=0,this.currPenState.reset()}clearToEndOfRow(){this.clearFromPos(this.pos)}getTextString(){const e=[];let t=!0;for(let s=0;s<ot;s++){const i=this.chars[s].uchar;i!==" "&&(t=!1),e.push(i)}return t?"":e.join("")}setPenStyles(e){this.currPenState.setStyles(e),this.chars[this.pos].setPenState(this.currPenState)}}class ai{constructor(e){this.rows=[],this.currRow=Ke-1,this.nrRollUpRows=null,this.lastOutputScreen=null,this.logger=void 0;for(let t=0;t<Ke;t++)this.rows.push(new Zu(e));this.logger=e}reset(){for(let e=0;e<Ke;e++)this.rows[e].clear();this.currRow=Ke-1}equals(e){let t=!0;for(let s=0;s<Ke;s++)if(!this.rows[s].equals(e.rows[s])){t=!1;break}return t}copy(e){for(let t=0;t<Ke;t++)this.rows[t].copy(e.rows[t])}isEmpty(){let e=!0;for(let t=0;t<Ke;t++)if(!this.rows[t].isEmpty()){e=!1;break}return e}backSpace(){this.rows[this.currRow].backSpace()}clearToEndOfRow(){this.rows[this.currRow].clearToEndOfRow()}insertChar(e){this.rows[this.currRow].insertChar(e)}setPen(e){this.rows[this.currRow].setPenStyles(e)}moveCursor(e){this.rows[this.currRow].moveCursor(e)}setCursor(e){this.logger.log(2,"setCursor: "+e),this.rows[this.currRow].setCursor(e)}setPAC(e){this.logger.log(2,()=>"pacData = "+JSON.stringify(e));let t=e.row-1;if(this.nrRollUpRows&&t<this.nrRollUpRows-1&&(t=this.nrRollUpRows-1),this.nrRollUpRows&&this.currRow!==t){for(let a=0;a<Ke;a++)this.rows[a].clear();const n=this.currRow+1-this.nrRollUpRows,o=this.lastOutputScreen;if(o){const a=o.rows[n].cueStartTime,l=this.logger.time;if(a!==null&&l!==null&&a<l)for(let c=0;c<this.nrRollUpRows;c++)this.rows[t-this.nrRollUpRows+c+1].copy(o.rows[n+c])}}this.currRow=t;const s=this.rows[this.currRow];if(e.indent!==null){const n=e.indent,o=Math.max(n-1,0);s.setCursor(e.indent),e.color=s.chars[o].penState.foreground}const i={foreground:e.color,underline:e.underline,italics:e.italics,background:"black",flash:!1};this.setPen(i)}setBkgData(e){this.logger.log(2,()=>"bkgData = "+JSON.stringify(e)),this.backSpace(),this.setPen(e),this.insertChar(32)}setRollUpRows(e){this.nrRollUpRows=e}rollUp(){if(this.nrRollUpRows===null){this.logger.log(3,"roll_up but nrRollUpRows not set yet");return}this.logger.log(1,()=>this.getDisplayText());const e=this.currRow+1-this.nrRollUpRows,t=this.rows.splice(e,1)[0];t.clear(),this.rows.splice(this.currRow,0,t),this.logger.log(2,"Rolling up")}getDisplayText(e){e=e||!1;const t=[];let s="",i=-1;for(let n=0;n<Ke;n++){const o=this.rows[n].getTextString();o&&(i=n+1,e?t.push("Row "+i+": '"+o+"'"):t.push(o.trim()))}return t.length>0&&(e?s="["+t.join(" | ")+"]":s=t.join(` `)),s}getTextAndFormat(){return this.rows}}class yn{constructor(e,t,s){this.chNr=void 0,this.outputFilter=void 0,this.mode=void 0,this.verbose=void 0,this.displayedMemory=void 0,this.nonDisplayedMemory=void 0,this.lastOutputScreen=void 0,this.currRollUpRow=void 0,this.writeScreen=void 0,this.cueStartTime=void 0,this.logger=void 0,this.chNr=e,this.outputFilter=t,this.mode=null,this.verbose=0,this.displayedMemory=new ai(s),this.nonDisplayedMemory=new ai(s),this.lastOutputScreen=new ai(s),this.currRollUpRow=this.displayedMemory.rows[Ke-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null,this.logger=s}reset(){this.mode=null,this.displayedMemory.reset(),this.nonDisplayedMemory.reset(),this.lastOutputScreen.reset(),this.outputFilter.reset(),this.currRollUpRow=this.displayedMemory.rows[Ke-1],this.writeScreen=this.displayedMemory,this.mode=null,this.cueStartTime=null}getHandler(){return this.outputFilter}setHandler(e){this.outputFilter=e}setPAC(e){this.writeScreen.setPAC(e)}setBkgData(e){this.writeScreen.setBkgData(e)}setMode(e){e!==this.mode&&(this.mode=e,this.logger.log(2,()=>"MODE="+e),this.mode==="MODE_POP-ON"?this.writeScreen=this.nonDisplayedMemory:(this.writeScreen=this.displayedMemory,this.writeScreen.reset()),this.mode!=="MODE_ROLL-UP"&&(this.displayedMemory.nrRollUpRows=null,this.nonDisplayedMemory.nrRollUpRows=null),this.mode=e)}insertChars(e){for(let s=0;s<e.length;s++)this.writeScreen.insertChar(e[s]);const t=this.writeScreen===this.displayedMemory?"DISP":"NON_DISP";this.logger.log(2,()=>t+": "+this.writeScreen.getDisplayText(!0)),(this.mode==="MODE_PAINT-ON"||this.mode==="MODE_ROLL-UP")&&(this.logger.log(1,()=>"DISPLAYED: "+this.displayedMemory.getDisplayText(!0)),this.outputDataUpdate())}ccRCL(){this.logger.log(2,"RCL - Resume Caption Loading"),this.setMode("MODE_POP-ON")}ccBS(){this.logger.log(2,"BS - BackSpace"),this.mode!=="MODE_TEXT"&&(this.writeScreen.backSpace(),this.writeScreen===this.displayedMemory&&this.outputDataUpdate())}ccAOF(){}ccAON(){}ccDER(){this.logger.log(2,"DER- Delete to End of Row"),this.writeScreen.clearToEndOfRow(),this.outputDataUpdate()}ccRU(e){this.logger.log(2,"RU("+e+") - Roll Up"),this.writeScreen=this.displayedMemory,this.setMode("MODE_ROLL-UP"),this.writeScreen.setRollUpRows(e)}ccFON(){this.logger.log(2,"FON - Flash On"),this.writeScreen.setPen({flash:!0})}ccRDC(){this.logger.log(2,"RDC - Resume Direct Captioning"),this.setMode("MODE_PAINT-ON")}ccTR(){this.logger.log(2,"TR"),this.setMode("MODE_TEXT")}ccRTD(){this.logger.log(2,"RTD"),this.setMode("MODE_TEXT")}ccEDM(){this.logger.log(2,"EDM - Erase Displayed Memory"),this.displayedMemory.reset(),this.outputDataUpdate(!0)}ccCR(){this.logger.log(2,"CR - Carriage Return"),this.writeScreen.rollUp(),this.outputDataUpdate(!0)}ccENM(){this.logger.log(2,"ENM - Erase Non-displayed Memory"),this.nonDisplayedMemory.reset()}ccEOC(){if(this.logger.log(2,"EOC - End Of Caption"),this.mode==="MODE_POP-ON"){const e=this.displayedMemory;this.displayedMemory=this.nonDisplayedMemory,this.nonDisplayedMemory=e,this.writeScreen=this.nonDisplayedMemory,this.logger.log(1,()=>"DISP: "+this.displayedMemory.getDisplayText())}this.outputDataUpdate(!0)}ccTO(e){this.logger.log(2,"TO("+e+") - Tab Offset"),this.writeScreen.moveCursor(e)}ccMIDROW(e){const t={flash:!1};if(t.underline=e%2===1,t.italics=e>=46,t.italics)t.foreground="white";else{const s=Math.floor(e/2)-16,i=["white","green","blue","cyan","red","yellow","magenta"];t.foreground=i[s]}this.logger.log(2,"MIDROW: "+JSON.stringify(t)),this.writeScreen.setPen(t)}outputDataUpdate(e=!1){const t=this.logger.time;t!==null&&this.outputFilter&&(this.cueStartTime===null&&!this.displayedMemory.isEmpty()?this.cueStartTime=t:this.displayedMemory.equals(this.lastOutputScreen)||(this.outputFilter.newCue(this.cueStartTime,t,this.lastOutputScreen),e&&this.outputFilter.dispatchCue&&this.outputFilter.dispatchCue(),this.cueStartTime=this.displayedMemory.isEmpty()?null:t),this.lastOutputScreen.copy(this.displayedMemory))}cueSplitAtTime(e){this.outputFilter&&(this.displayedMemory.isEmpty()||(this.outputFilter.newCue&&this.outputFilter.newCue(this.cueStartTime,e,this.displayedMemory),this.cueStartTime=e))}}class En{constructor(e,t,s){this.channels=void 0,this.currentChannel=0,this.cmdHistory=eh(),this.logger=void 0;const i=this.logger=new Xu;this.channels=[null,new yn(e,t,i),new yn(e+1,s,i)]}getHandler(e){return this.channels[e].getHandler()}setHandler(e,t){this.channels[e].setHandler(t)}addData(e,t){this.logger.time=e;for(let s=0;s<t.length;s+=2){const i=t[s]&127,n=t[s+1]&127;let o=!1,a=null;if(i===0&&n===0)continue;this.logger.log(3,()=>"["+xt([t[s],t[s+1]])+"] -> ("+xt([i,n])+")");const l=this.cmdHistory;if(i>=16&&i<=31){if(Ju(i,n,l)){ms(null,null,l),this.logger.log(3,()=>"Repeated command ("+xt([i,n])+") is dropped");continue}ms(i,n,this.cmdHistory),o=this.parseCmd(i,n),o||(o=this.parseMidrow(i,n)),o||(o=this.parsePAC(i,n)),o||(o=this.parseBackgroundAttributes(i,n))}else ms(null,null,l);if(!o&&(a=this.parseChars(i,n),a)){const u=this.currentChannel;u&&u>0?this.channels[u].insertChars(a):this.logger.log(2,"No channel found yet. TEXT-MODE?")}!o&&!a&&this.logger.log(2,()=>"Couldn't parse cleaned data "+xt([i,n])+" orig: "+xt([t[s],t[s+1]]))}}parseCmd(e,t){const s=(e===20||e===28||e===21||e===29)&&t>=32&&t<=47,i=(e===23||e===31)&&t>=33&&t<=35;if(!(s||i))return!1;const n=e===20||e===21||e===23?1:2,o=this.channels[n];return e===20||e===21||e===28||e===29?t===32?o.ccRCL():t===33?o.ccBS():t===34?o.ccAOF():t===35?o.ccAON():t===36?o.ccDER():t===37?o.ccRU(2):t===38?o.ccRU(3):t===39?o.ccRU(4):t===40?o.ccFON():t===41?o.ccRDC():t===42?o.ccTR():t===43?o.ccRTD():t===44?o.ccEDM():t===45?o.ccCR():t===46?o.ccENM():t===47&&o.ccEOC():o.ccTO(t-32),this.currentChannel=n,!0}parseMidrow(e,t){let s=0;if((e===17||e===25)&&t>=32&&t<=47){if(e===17?s=1:s=2,s!==this.currentChannel)return this.logger.log(0,"Mismatch channel in midrow parsing"),!1;const i=this.channels[s];return i?(i.ccMIDROW(t),this.logger.log(3,()=>"MIDROW ("+xt([e,t])+")"),!0):!1}return!1}parsePAC(e,t){let s;const i=(e>=17&&e<=23||e>=25&&e<=31)&&t>=64&&t<=127,n=(e===16||e===24)&&t>=64&&t<=95;if(!(i||n))return!1;const o=e<=23?1:2;t>=64&&t<=95?s=o===1?Wu[e]:qu[e]:s=o===1?Yu[e]:ju[e];const a=this.channels[o];return a?(a.setPAC(this.interpretPAC(s,t)),this.currentChannel=o,!0):!1}interpretPAC(e,t){let s;const i={color:null,italics:!1,indent:null,underline:!1,row:e};return t>95?s=t-96:s=t-64,i.underline=(s&1)===1,s<=13?i.color=["white","green","blue","cyan","red","yellow","magenta","white"][Math.floor(s/2)]:s<=15?(i.italics=!0,i.color="white"):i.indent=Math.floor((s-16)/2)*4,i}parseChars(e,t){let s,i=null,n=null;if(e>=25?(s=2,n=e-8):(s=1,n=e),n>=17&&n<=19){let o;n===17?o=t+80:n===18?o=t+112:o=t+144,this.logger.log(2,()=>"Special char '"+jo(o)+"' in channel "+s),i=[o]}else e>=32&&e<=127&&(i=t===0?[e]:[e,t]);return i&&this.logger.log(3,()=>"Char codes = "+xt(i).join(",")),i}parseBackgroundAttributes(e,t){const s=(e===16||e===24)&&t>=32&&t<=47,i=(e===23||e===31)&&t>=45&&t<=47;if(!(s||i))return!1;let n;const o={};e===16||e===24?(n=Math.floor((t-32)/2),o.background=zu[n],t%2===1&&(o.background=o.background+"_semi")):t===45?o.background="transparent":(o.foreground="black",t===47&&(o.underline=!0));const a=e<=23?1:2;return this.channels[a].setBkgData(o),!0}reset(){for(let e=0;e<Object.keys(this.channels).length;e++){const t=this.channels[e];t&&t.reset()}ms(null,null,this.cmdHistory)}cueSplitAtTime(e){for(let t=0;t<this.channels.length;t++){const s=this.channels[t];s&&s.cueSplitAtTime(e)}}}function ms(r,e,t){t.a=r,t.b=e}function Ju(r,e,t){return t.a===r&&t.b===e}function eh(){return{a:null,b:null}}class ps{constructor(e,t){this.timelineController=void 0,this.cueRanges=[],this.trackName=void 0,this.startTime=null,this.endTime=null,this.screen=null,this.timelineController=e,this.trackName=t}dispatchCue(){this.startTime!==null&&(this.timelineController.addCues(this.trackName,this.startTime,this.endTime,this.screen,this.cueRanges),this.startTime=null)}newCue(e,t,s){(this.startTime===null||this.startTime>e)&&(this.startTime=e),this.endTime=t,this.screen=s,this.timelineController.createCaptionsTrack(this.trackName)}reset(){this.cueRanges=[],this.startTime=null}}var ur=function(){if(ws!=null&&ws.VTTCue)return self.VTTCue;const r=["","lr","rl"],e=["start","middle","end","left","right"];function t(a,l){if(typeof l!="string"||!Array.isArray(a))return!1;const c=l.toLowerCase();return~a.indexOf(c)?c:!1}function s(a){return t(r,a)}function i(a){return t(e,a)}function n(a,...l){let c=1;for(;c<arguments.length;c++){const u=arguments[c];for(const h in u)a[h]=u[h]}return a}function o(a,l,c){const u=this,h={enumerable:!0};u.hasBeenReset=!1;let d="",g=!1,f=a,m=l,p=c,E=null,x="",T=!0,_="auto",A="start",C=50,L="middle",v=50,I="middle";Object.defineProperty(u,"id",n({},h,{get:function(){return d},set:function(R){d=""+R}})),Object.defineProperty(u,"pauseOnExit",n({},h,{get:function(){return g},set:function(R){g=!!R}})),Object.defineProperty(u,"startTime",n({},h,{get:function(){return f},set:function(R){if(typeof R!="number")throw new TypeError("Start time must be set to a number.");f=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"endTime",n({},h,{get:function(){return m},set:function(R){if(typeof R!="number")throw new TypeError("End time must be set to a number.");m=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"text",n({},h,{get:function(){return p},set:function(R){p=""+R,this.hasBeenReset=!0}})),Object.defineProperty(u,"region",n({},h,{get:function(){return E},set:function(R){E=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"vertical",n({},h,{get:function(){return x},set:function(R){const k=s(R);if(k===!1)throw new SyntaxError("An invalid or illegal string was specified.");x=k,this.hasBeenReset=!0}})),Object.defineProperty(u,"snapToLines",n({},h,{get:function(){return T},set:function(R){T=!!R,this.hasBeenReset=!0}})),Object.defineProperty(u,"line",n({},h,{get:function(){return _},set:function(R){if(typeof R!="number"&&R!=="auto")throw new SyntaxError("An invalid number or illegal string was specified.");_=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"lineAlign",n({},h,{get:function(){return A},set:function(R){const k=i(R);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");A=k,this.hasBeenReset=!0}})),Object.defineProperty(u,"position",n({},h,{get:function(){return C},set:function(R){if(R<0||R>100)throw new Error("Position must be between 0 and 100.");C=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"positionAlign",n({},h,{get:function(){return L},set:function(R){const k=i(R);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");L=k,this.hasBeenReset=!0}})),Object.defineProperty(u,"size",n({},h,{get:function(){return v},set:function(R){if(R<0||R>100)throw new Error("Size must be between 0 and 100.");v=R,this.hasBeenReset=!0}})),Object.defineProperty(u,"align",n({},h,{get:function(){return I},set:function(R){const k=i(R);if(!k)throw new SyntaxError("An invalid or illegal string was specified.");I=k,this.hasBeenReset=!0}})),u.displayState=void 0}return o.prototype.getCueAsHTML=function(){return self.WebVTT.convertCueToDOMTree(self,this.text)},o}();class th{decode(e,t){if(!e)return"";if(typeof e!="string")throw new Error("Error - expected string data.");return decodeURIComponent(encodeURIComponent(e))}}function Xo(r){function e(s,i,n,o){return(s|0)*3600+(i|0)*60+(n|0)+parseFloat(o||0)}const t=r.match(/^(?:(\d+):)?(\d{2}):(\d{2})(\.\d+)?/);return t?parseFloat(t[2])>59?e(t[2],t[3],0,t[4]):e(t[1],t[2],t[3],t[4]):null}class sh{constructor(){this.values=Object.create(null)}set(e,t){!this.get(e)&&t!==""&&(this.values[e]=t)}get(e,t,s){return s?this.has(e)?this.values[e]:t[s]:this.has(e)?this.values[e]:t}has(e){return e in this.values}alt(e,t,s){for(let i=0;i<s.length;++i)if(t===s[i]){this.set(e,t);break}}integer(e,t){/^-?\d+$/.test(t)&&this.set(e,parseInt(t,10))}percent(e,t){if(/^([\d]{1,3})(\.[\d]*)?%$/.test(t)){const s=parseFloat(t);if(s>=0&&s<=100)return this.set(e,s),!0}return!1}}function Qo(r,e,t,s){const i=s?r.split(s):[r];for(const n in i){if(typeof i[n]!="string")continue;const o=i[n].split(t);if(o.length!==2)continue;const a=o[0],l=o[1];e(a,l)}}const Pi=new ur(0,0,""),ys=Pi.align==="middle"?"middle":"center";function ih(r,e,t){const s=r;function i(){const a=Xo(r);if(a===null)throw new Error("Malformed timestamp: "+s);return r=r.replace(/^[^\sa-zA-Z-]+/,""),a}function n(a,l){const c=new sh;Qo(a,function(d,g){let f;switch(d){case"region":for(let m=t.length-1;m>=0;m--)if(t[m].id===g){c.set(d,t[m].region);break}break;case"vertical":c.alt(d,g,["rl","lr"]);break;case"line":f=g.split(","),c.integer(d,f[0]),c.percent(d,f[0])&&c.set("snapToLines",!1),c.alt(d,f[0],["auto"]),f.length===2&&c.alt("lineAlign",f[1],["start",ys,"end"]);break;case"position":f=g.split(","),c.percent(d,f[0]),f.length===2&&c.alt("positionAlign",f[1],["start",ys,"end","line-left","line-right","auto"]);break;case"size":c.percent(d,g);break;case"align":c.alt(d,g,["start",ys,"end","left","right"]);break}},/:/,/\s/),l.region=c.get("region",null),l.vertical=c.get("vertical","");let u=c.get("line","auto");u==="auto"&&Pi.line===-1&&(u=-1),l.line=u,l.lineAlign=c.get("lineAlign","start"),l.snapToLines=c.get("snapToLines",!0),l.size=c.get("size",100),l.align=c.get("align",ys);let h=c.get("position","auto");h==="auto"&&Pi.position===50&&(h=l.align==="start"||l.align==="left"?0:l.align==="end"||l.align==="right"?100:50),l.position=h}function o(){r=r.replace(/^\s+/,"")}if(o(),e.startTime=i(),o(),r.slice(0,3)!=="-->")throw new Error("Malformed time stamp (time stamps must be separated by '-->'): "+s);r=r.slice(3),o(),e.endTime=i(),o(),n(r,e)}function Zo(r){return r.replace(/<br(?: \/)?>/gi,` `)}class rh{constructor(){this.state="INITIAL",this.buffer="",this.decoder=new th,this.regionList=[],this.cue=null,this.oncue=void 0,this.onparsingerror=void 0,this.onflush=void 0}parse(e){const t=this;e&&(t.buffer+=t.decoder.decode(e,{stream:!0}));function s(){let n=t.buffer,o=0;for(n=Zo(n);o<n.length&&n[o]!=="\r"&&n[o]!==` `;)++o;const a=n.slice(0,o);return n[o]==="\r"&&++o,n[o]===` `&&++o,t.buffer=n.slice(o),a}function i(n){Qo(n,function(o,a){},/:/)}try{let n="";if(t.state==="INITIAL"){if(!/\r\n|\n/.test(t.buffer))return this;n=s();const a=n.match(/^()?WEBVTT([ \t].*)?$/);if(!(a!=null&&a[0]))throw new Error("Malformed WebVTT signature.");t.state="HEADER"}let o=!1;for(;t.buffer;){if(!/\r\n|\n/.test(t.buffer))return this;switch(o?o=!1:n=s(),t.state){case"HEADER":/:/.test(n)?i(n):n||(t.state="ID");continue;case"NOTE":n||(t.state="ID");continue;case"ID":if(/^NOTE($|[ \t])/.test(n)){t.state="NOTE";break}if(!n)continue;if(t.cue=new ur(0,0,""),t.state="CUE",n.indexOf("-->")===-1){t.cue.id=n;continue}case"CUE":if(!t.cue){t.state="BADCUE";continue}try{ih(n,t.cue,t.regionList)}catch{t.cue=null,t.state="BADCUE";continue}t.state="CUETEXT";continue;case"CUETEXT":{const a=n.indexOf("-->")!==-1;if(!n||a&&(o=!0)){t.oncue&&t.cue&&t.oncue(t.cue),t.cue=null,t.state="ID";continue}if(t.cue===null)continue;t.cue.text&&(t.cue.text+=` `),t.cue.text+=n}continue;case"BADCUE":n||(t.state="ID")}}}catch{t.state==="CUETEXT"&&t.cue&&t.oncue&&t.oncue(t.cue),t.cue=null,t.state=t.state==="INITIAL"?"BADWEBVTT":"BADCUE"}return this}flush(){const e=this;try{if((e.cue||e.state==="HEADER")&&(e.buffer+=` `,e.parse()),e.state==="INITIAL"||e.state==="BADWEBVTT")throw new Error("Malformed WebVTT signature.")}catch(t){e.onparsingerror&&e.onparsingerror(t)}return e.onflush&&e.onflush(),this}}function li(r){let e=5381,t=r.length;for(;t;)e=e*33^r.charCodeAt(--t);return(e>>>0).toString()}const nh=/\r\n|\n\r|\n|\r/g,ci=function(e,t,s=0){return e.slice(s,s+t.length)===t},oh=function(e){let t=parseInt(e.slice(-3));const s=parseInt(e.slice(-6,-4)),i=parseInt(e.slice(-9,-7)),n=e.length>9?parseInt(e.substring(0,e.indexOf(":"))):0;if(!V(t)||!V(s)||!V(i)||!V(n))throw Error(`Malformed X-TIMESTAMP-MAP: Local:${e}`);return t+=1e3*s,t+=60*1e3*i,t+=60*60*1e3*n,t};function hr(r,e,t){return li(r.toString())+li(e.toString())+li(t)}const ah=function(e,t,s){let i=e[t],n=e[i.prevCC];if(!n||!n.new&&i.new){e.ccOffset=e.presentationOffset=i.start,i.new=!1;return}for(;(o=n)!=null&&o.new;){var o;e.ccOffset+=i.start-n.start,i.new=!1,i=n,n=e[i.prevCC]}e.presentationOffset=s};function lh(r,e,t,s,i,n,o){const a=new rh,l=Oe(new Uint8Array(r)).trim().replace(nh,` `).split(` `),c=[],u=e?Au(e.baseTime,e.timescale):0;let h="00:00.000",d=0,g=0,f,m=!0;a.oncue=function(p){const E=t[s];let x=t.ccOffset;const T=(d-u)/9e4;if(E!=null&&E.new&&(g!==void 0?x=t.ccOffset=E.start:ah(t,s,T)),T){if(!e){f=new Error("Missing initPTS for VTT MPEGTS");return}x=T-t.presentationOffset}const _=p.endTime-p.startTime,A=Ge((p.startTime+x-g)*9e4,i*9e4)/9e4;p.startTime=Math.max(A,0),p.endTime=Math.max(A+_,0);const C=p.text.trim();p.text=decodeURIComponent(encodeURIComponent(C)),p.id||(p.id=hr(p.startTime,p.endTime,C)),p.endTime>0&&c.push(p)},a.onparsingerror=function(p){f=p},a.onflush=function(){if(f){o(f);return}n(c)},l.forEach(p=>{if(m)if(ci(p,"X-TIMESTAMP-MAP=")){m=!1,p.slice(16).split(",").forEach(E=>{ci(E,"LOCAL:")?h=E.slice(6):ci(E,"MPEGTS:")&&(d=parseInt(E.slice(7)))});try{g=oh(h)/1e3}catch(E){f=E}return}else p===""&&(m=!1);a.parse(p+` `)}),a.flush()}const ui="stpp.ttml.im1t",Jo=/^(\d{2,}):(\d{2}):(\d{2}):(\d{2})\.?(\d+)?$/,ea=/^(\d*(?:\.\d*)?)(h|m|s|ms|f|t)$/,ch={left:"start",center:"center",right:"end",start:"start",end:"end"};function Tn(r,e,t,s){const i=Q(new Uint8Array(r),["mdat"]);if(i.length===0){s(new Error("Could not parse IMSC1 mdat"));return}const n=i.map(a=>Oe(a)),o=Lu(e.baseTime,1,e.timescale);try{n.forEach(a=>t(uh(a,o)))}catch(a){s(a)}}function uh(r,e){const i=new DOMParser().parseFromString(r,"text/xml").getElementsByTagName("tt")[0];if(!i)throw new Error("Invalid ttml");const n={frameRate:30,subFrameRate:1,frameRateMultiplier:0,tickRate:0},o=Object.keys(n).reduce((h,d)=>(h[d]=i.getAttribute(`ttp:${d}`)||n[d],h),{}),a=i.getAttribute("xml:space")!=="preserve",l=xn(hi(i,"styling","style")),c=xn(hi(i,"layout","region")),u=hi(i,"body","[begin]");return[].map.call(u,h=>{const d=ta(h,a);if(!d||!h.hasAttribute("begin"))return null;const g=fi(h.getAttribute("begin"),o),f=fi(h.getAttribute("dur"),o);let m=fi(h.getAttribute("end"),o);if(g===null)throw Sn(h);if(m===null){if(f===null)throw Sn(h);m=g+f}const p=new ur(g-e,m-e,d);p.id=hr(p.startTime,p.endTime,p.text);const E=c[h.getAttribute("region")],x=l[h.getAttribute("style")],T=hh(E,x,l),{textAlign:_}=T;if(_){const A=ch[_];A&&(p.lineAlign=A),p.align=_}return pe(p,T),p}).filter(h=>h!==null)}function hi(r,e,t){const s=r.getElementsByTagName(e)[0];return s?[].slice.call(s.querySelectorAll(t)):[]}function xn(r){return r.reduce((e,t)=>{const s=t.getAttribute("xml:id");return s&&(e[s]=t),e},{})}function ta(r,e){return[].slice.call(r.childNodes).reduce((t,s,i)=>{var n;return s.nodeName==="br"&&i?t+` `:(n=s.childNodes)!=null&&n.length?ta(s,e):e?t+s.textContent.trim().replace(/\s+/g," "):t+s.textContent},"")}function hh(r,e,t){const s="http://www.w3.org/ns/ttml#styling";let i=null;const n=["displayAlign","textAlign","color","backgroundColor","fontSize","fontFamily"],o=r!=null&&r.hasAttribute("style")?r.getAttribute("style"):null;return o&&t.hasOwnProperty(o)&&(i=t[o]),n.reduce((a,l)=>{const c=di(e,s,l)||di(r,s,l)||di(i,s,l);return c&&(a[l]=c),a},{})}function di(r,e,t){return r&&r.hasAttributeNS(e,t)?r.getAttributeNS(e,t):null}function Sn(r){return new Error(`Could not parse ttml timestamp ${r}`)}function fi(r,e){if(!r)return null;let t=Xo(r);return t===null&&(Jo.test(r)?t=dh(r,e):ea.test(r)&&(t=fh(r,e))),t}function dh(r,e){const t=Jo.exec(r),s=(t[4]|0)+(t[5]|0)/e.subFrameRate;return(t[1]|0)*3600+(t[2]|0)*60+(t[3]|0)+s/e.frameRate}function fh(r,e){const t=ea.exec(r),s=Number(t[1]);switch(t[2]){case"h":return s*3600;case"m":return s*60;case"ms":return s*1e3;case"f":return s/e.frameRate;case"t":return s/e.tickRate}return s}class gh{constructor(e){this.hls=void 0,this.media=null,this.config=void 0,this.enabled=!0,this.Cues=void 0,this.textTracks=[],this.tracks=[],this.initPTS=[],this.unparsedVttFrags=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.cea608Parser1=void 0,this.cea608Parser2=void 0,this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ln(),this.captionsProperties=void 0,this.hls=e,this.config=e.config,this.Cues=e.config.cueHandler,this.captionsProperties={textTrack1:{label:this.config.captionsTextTrack1Label,languageCode:this.config.captionsTextTrack1LanguageCode},textTrack2:{label:this.config.captionsTextTrack2Label,languageCode:this.config.captionsTextTrack2LanguageCode},textTrack3:{label:this.config.captionsTextTrack3Label,languageCode:this.config.captionsTextTrack3LanguageCode},textTrack4:{label:this.config.captionsTextTrack4Label,languageCode:this.config.captionsTextTrack4LanguageCode}},e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.on(y.FRAG_LOADING,this.onFragLoading,this),e.on(y.FRAG_LOADED,this.onFragLoaded,this),e.on(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.on(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.on(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.on(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.on(y.BUFFER_FLUSHING,this.onBufferFlushing,this)}destroy(){const{hls:e}=this;e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this),e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.SUBTITLE_TRACKS_UPDATED,this.onSubtitleTracksUpdated,this),e.off(y.FRAG_LOADING,this.onFragLoading,this),e.off(y.FRAG_LOADED,this.onFragLoaded,this),e.off(y.FRAG_PARSING_USERDATA,this.onFragParsingUserdata,this),e.off(y.FRAG_DECRYPTED,this.onFragDecrypted,this),e.off(y.INIT_PTS_FOUND,this.onInitPtsFound,this),e.off(y.SUBTITLE_TRACKS_CLEARED,this.onSubtitleTracksCleared,this),e.off(y.BUFFER_FLUSHING,this.onBufferFlushing,this),this.hls=this.config=this.media=null,this.cea608Parser1=this.cea608Parser2=void 0}initCea608Parsers(){const e=new ps(this,"textTrack1"),t=new ps(this,"textTrack2"),s=new ps(this,"textTrack3"),i=new ps(this,"textTrack4");this.cea608Parser1=new En(1,e,t),this.cea608Parser2=new En(3,s,i)}addCues(e,t,s,i,n){let o=!1;for(let a=n.length;a--;){const l=n[a],c=mh(l[0],l[1],t,s);if(c>=0&&(l[0]=Math.min(l[0],t),l[1]=Math.max(l[1],s),o=!0,c/(s-t)>.5))return}if(o||n.push([t,s]),this.config.renderTextTracksNatively){const a=this.captionsTracks[e];this.Cues.newCue(a,t,s,i)}else{const a=this.Cues.newCue(null,t,s,i);this.hls.trigger(y.CUES_PARSED,{type:"captions",cues:a,track:e})}}onInitPtsFound(e,{frag:t,id:s,initPTS:i,timescale:n}){const{unparsedVttFrags:o}=this;s===H.MAIN&&(this.initPTS[t.cc]={baseTime:i,timescale:n}),o.length&&(this.unparsedVttFrags=[],o.forEach(a=>{this.onFragLoaded(y.FRAG_LOADED,a)}))}getExistingTrack(e,t){const{media:s}=this;if(s)for(let i=0;i<s.textTracks.length;i++){const n=s.textTracks[i];if(vn(n,{name:e,lang:t,characteristics:"transcribes-spoken-dialog,describes-music-and-sound",attrs:{}}))return n}return null}createCaptionsTrack(e){this.config.renderTextTracksNatively?this.createNativeTrack(e):this.createNonNativeTrack(e)}createNativeTrack(e){if(this.captionsTracks[e])return;const{captionsProperties:t,captionsTracks:s,media:i}=this,{label:n,languageCode:o}=t[e],a=this.getExistingTrack(n,o);if(a)s[e]=a,Ft(s[e]),po(s[e],i);else{const l=this.createTextTrack("captions",n,o);l&&(l[e]=!0,s[e]=l)}}createNonNativeTrack(e){if(this.nonNativeCaptionsTracks[e])return;const t=this.captionsProperties[e];if(!t)return;const s=t.label,i={_id:e,label:s,kind:"captions",default:t.media?!!t.media.default:!1,closedCaptions:t.media};this.nonNativeCaptionsTracks[e]=i,this.hls.trigger(y.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:[i]})}createTextTrack(e,t,s){const i=this.media;if(i)return i.addTextTrack(e,t,s)}onMediaAttaching(e,t){this.media=t.media,this._cleanTracks()}onMediaDetaching(){const{captionsTracks:e}=this;Object.keys(e).forEach(t=>{Ft(e[t]),delete e[t]}),this.nonNativeCaptionsTracks={},this.media=null}onManifestLoading(){this.lastCc=-1,this.lastSn=-1,this.lastPartIndex=-1,this.prevCC=-1,this.vttCCs=Ln(),this._cleanTracks(),this.tracks=[],this.captionsTracks={},this.nonNativeCaptionsTracks={},this.textTracks=[],this.unparsedVttFrags=[],this.initPTS=[],this.cea608Parser1&&this.cea608Parser2&&(this.cea608Parser1.reset(),this.cea608Parser2.reset())}_cleanTracks(){const{media:e}=this;if(!e)return;const t=e.textTracks;if(t)for(let s=0;s<t.length;s++)Ft(t[s])}onSubtitleTracksUpdated(e,t){const s=t.subtitleTracks||[],i=s.some(n=>n.textCodec===ui);if(this.config.enableWebVTT||i&&this.config.enableIMSC1){if(qo(this.tracks,s)){this.tracks=s;return}if(this.textTracks=[],this.tracks=s,this.config.renderTextTracksNatively){const o=this.media,a=o?xs(o.textTracks):null;if(this.tracks.forEach((l,c)=>{let u;if(a){let h=null;for(let d=0;d<a.length;d++)if(a[d]&&vn(a[d],l)){h=a[d],a[d]=null;break}h&&(u=h)}if(u)Ft(u);else{const h=sa(l);u=this.createTextTrack(h,l.name,l.lang),u&&(u.mode="disabled")}u&&this.textTracks.push(u)}),a!=null&&a.length){const l=a.filter(c=>c!==null).map(c=>c.label);l.length&&this.hls.logger.warn(`Media element contains unused subtitle tracks: ${l.join(", ")}. Replace media element for each source to clear TextTracks and captions menu.`)}}else if(this.tracks.length){const o=this.tracks.map(a=>({label:a.name,kind:a.type.toLowerCase(),default:a.default,subtitleTrack:a}));this.hls.trigger(y.NON_NATIVE_TEXT_TRACKS_FOUND,{tracks:o})}}}onManifestLoaded(e,t){this.config.enableCEA708Captions&&t.captions&&t.captions.forEach(s=>{const i=/(?:CC|SERVICE)([1-4])/.exec(s.instreamId);if(!i)return;const n=`textTrack${i[1]}`,o=this.captionsProperties[n];o&&(o.label=s.name,s.lang&&(o.languageCode=s.lang),o.media=s)})}closedCaptionsForLevel(e){const t=this.hls.levels[e.level];return t==null?void 0:t.attrs["CLOSED-CAPTIONS"]}onFragLoading(e,t){if(this.enabled&&t.frag.type===H.MAIN){var s,i;const{cea608Parser1:n,cea608Parser2:o,lastSn:a}=this,{cc:l,sn:c}=t.frag,u=(s=(i=t.part)==null?void 0:i.index)!=null?s:-1;n&&o&&(c!==a+1||c===a&&u!==this.lastPartIndex+1||l!==this.lastCc)&&(n.reset(),o.reset()),this.lastCc=l,this.lastSn=c,this.lastPartIndex=u}}onFragLoaded(e,t){const{frag:s,payload:i}=t;if(s.type===H.SUBTITLE)if(i.byteLength){const n=s.decryptdata,o="stats"in t;if(n==null||!n.encrypted||o){const a=this.tracks[s.level],l=this.vttCCs;l[s.cc]||(l[s.cc]={start:s.start,prevCC:this.prevCC,new:!0},this.prevCC=s.cc),a&&a.textCodec===ui?this._parseIMSC1(s,i):this._parseVTTs(t)}}else this.hls.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:new Error("Empty subtitle payload")})}_parseIMSC1(e,t){const s=this.hls;Tn(t,this.initPTS[e.cc],i=>{this._appendCues(i,e.level),s.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:e})},i=>{s.logger.log(`Failed to parse IMSC1: ${i}`),s.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:e,error:i})})}_parseVTTs(e){var t;const{frag:s,payload:i}=e,{initPTS:n,unparsedVttFrags:o}=this,a=n.length-1;if(!n[s.cc]&&a===-1){o.push(e);return}const l=this.hls,c=(t=s.initSegment)!=null&&t.data?$e(s.initSegment.data,new Uint8Array(i)):i;lh(c,this.initPTS[s.cc],this.vttCCs,s.cc,s.start,u=>{this._appendCues(u,s.level),l.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!0,frag:s})},u=>{const h=u.message==="Missing initPTS for VTT MPEGTS";h?o.push(e):this._fallbackToIMSC1(s,i),l.logger.log(`Failed to parse VTT cue: ${u}`),!(h&&a>s.cc)&&l.trigger(y.SUBTITLE_FRAG_PROCESSED,{success:!1,frag:s,error:u})})}_fallbackToIMSC1(e,t){const s=this.tracks[e.level];s.textCodec||Tn(t,this.initPTS[e.cc],()=>{s.textCodec=ui,this._parseIMSC1(e,t)},()=>{s.textCodec="wvtt"})}_appendCues(e,t){const s=this.hls;if(this.config.renderTextTracksNatively){const i=this.textTracks[t];if(!i||i.mode==="disabled")return;e.forEach(n=>yo(i,n))}else{const i=this.tracks[t];if(!i)return;const n=i.default?"default":"subtitles"+t;s.trigger(y.CUES_PARSED,{type:"subtitles",cues:e,track:n})}}onFragDecrypted(e,t){const{frag:s}=t;s.type===H.SUBTITLE&&this.onFragLoaded(y.FRAG_LOADED,t)}onSubtitleTracksCleared(){this.tracks=[],this.captionsTracks={}}onFragParsingUserdata(e,t){if(!this.enabled||!this.config.enableCEA708Captions)return;const{frag:s,samples:i}=t;if(!(s.type===H.MAIN&&this.closedCaptionsForLevel(s)==="NONE"))for(let n=0;n<i.length;n++){const o=i[n].bytes;if(o){this.cea608Parser1||this.initCea608Parsers();const a=this.extractCea608Data(o);this.cea608Parser1.addData(i[n].pts,a[0]),this.cea608Parser2.addData(i[n].pts,a[1])}}}onBufferFlushing(e,{startOffset:t,endOffset:s,endOffsetSubtitles:i,type:n}){const{media:o}=this;if(!(!o||o.currentTime<s)){if(!n||n==="video"){const{captionsTracks:a}=this;Object.keys(a).forEach(l=>_i(a[l],t,s))}if(this.config.renderTextTracksNatively&&t===0&&i!==void 0){const{textTracks:a}=this;Object.keys(a).forEach(l=>_i(a[l],t,i))}}}extractCea608Data(e){const t=[[],[]],s=e[0]&31;let i=2;for(let n=0;n<s;n++){const o=e[i++],a=127&e[i++],l=127&e[i++];if(a===0&&l===0)continue;if((4&o)!==0){const u=3&o;(u===0||u===1)&&(t[u].push(a),t[u].push(l))}}return t}}function sa(r){return r.characteristics&&/transcribes-spoken-dialog/gi.test(r.characteristics)&&/describes-music-and-sound/gi.test(r.characteristics)?"captions":"subtitles"}function vn(r,e){return!!r&&r.kind===sa(e)&&ki(e,r)}function mh(r,e,t,s){return Math.min(e,s)-Math.max(r,t)}function Ln(){return{ccOffset:0,presentationOffset:0,0:{start:0,prevCC:-1,new:!0}}}class dr{constructor(e){this.hls=void 0,this.autoLevelCapping=void 0,this.firstLevel=void 0,this.media=void 0,this.restrictedLevels=void 0,this.timer=void 0,this.clientRect=void 0,this.streamController=void 0,this.hls=e,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.firstLevel=-1,this.media=null,this.restrictedLevels=[],this.timer=void 0,this.clientRect=null,this.registerListeners()}setStreamController(e){this.streamController=e}destroy(){this.hls&&this.unregisterListener(),this.timer&&this.stopCapping(),this.media=null,this.clientRect=null,this.hls=this.streamController=null}registerListeners(){const{hls:e}=this;e.on(y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.BUFFER_CODECS,this.onBufferCodecs,this),e.on(y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListener(){const{hls:e}=this;e.off(y.FPS_DROP_LEVEL_CAPPING,this.onFpsDropLevelCapping,this),e.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.BUFFER_CODECS,this.onBufferCodecs,this),e.off(y.MEDIA_DETACHING,this.onMediaDetaching,this)}onFpsDropLevelCapping(e,t){const s=this.hls.levels[t.droppedLevel];this.isLevelAllowed(s)&&this.restrictedLevels.push({bitrate:s.bitrate,height:s.height,width:s.width})}onMediaAttaching(e,t){this.media=t.media instanceof HTMLVideoElement?t.media:null,this.clientRect=null,this.timer&&this.hls.levels.length&&this.detectPlayerSize()}onManifestParsed(e,t){const s=this.hls;this.restrictedLevels=[],this.firstLevel=t.firstLevel,s.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onLevelsUpdated(e,t){this.timer&&V(this.autoLevelCapping)&&this.detectPlayerSize()}onBufferCodecs(e,t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()}onMediaDetaching(){this.stopCapping(),this.media=null}detectPlayerSize(){if(this.media){if(this.mediaHeight<=0||this.mediaWidth<=0){this.clientRect=null;return}const e=this.hls.levels;if(e.length){const t=this.hls,s=this.getMaxLevel(e.length-1);s!==this.autoLevelCapping&&t.logger.log(`Setting autoLevelCapping to ${s}: ${e[s].height}p@${e[s].bitrate} for media ${this.mediaWidth}x${this.mediaHeight}`),t.autoLevelCapping=s,t.autoLevelEnabled&&t.autoLevelCapping>this.autoLevelCapping&&this.streamController&&this.streamController.nextLevelSwitch(),this.autoLevelCapping=t.autoLevelCapping}}}getMaxLevel(e){const t=this.hls.levels;if(!t.length)return-1;const s=t.filter((i,n)=>this.isLevelAllowed(i)&&n<=e);return this.clientRect=null,dr.getMaxLevelByMediaSize(s,this.mediaWidth,this.mediaHeight)}startCapping(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,self.clearInterval(this.timer),this.timer=self.setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())}stopCapping(){this.restrictedLevels=[],this.firstLevel=-1,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(self.clearInterval(this.timer),this.timer=void 0)}getDimensions(){if(this.clientRect)return this.clientRect;const e=this.media,t={width:0,height:0};if(e){const s=e.getBoundingClientRect();t.width=s.width,t.height=s.height,!t.width&&!t.height&&(t.width=s.right-s.left||e.width||0,t.height=s.bottom-s.top||e.height||0)}return this.clientRect=t,t}get mediaWidth(){return this.getDimensions().width*this.contentScaleFactor}get mediaHeight(){return this.getDimensions().height*this.contentScaleFactor}get contentScaleFactor(){let e=1;if(!this.hls.config.ignoreDevicePixelRatio)try{e=self.devicePixelRatio}catch{}return e}isLevelAllowed(e){return!this.restrictedLevels.some(s=>e.bitrate===s.bitrate&&e.width===s.width&&e.height===s.height)}static getMaxLevelByMediaSize(e,t,s){if(!(e!=null&&e.length))return-1;const i=(a,l)=>l?a.width!==l.width||a.height!==l.height:!0;let n=e.length-1;const o=Math.max(t,s);for(let a=0;a<e.length;a+=1){const l=e[a];if((l.width>=o||l.height>=o)&&i(l,e[a+1])){n=a;break}}return n}}class ph{constructor(e){this.hls=void 0,this.isVideoPlaybackQualityAvailable=!1,this.timer=void 0,this.media=null,this.lastTime=void 0,this.lastDroppedFrames=0,this.lastDecodedFrames=0,this.streamController=void 0,this.hls=e,this.registerListeners()}setStreamController(e){this.streamController=e}registerListeners(){this.hls.on(y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.on(y.MEDIA_DETACHING,this.onMediaDetaching,this)}unregisterListeners(){this.hls.off(y.MEDIA_ATTACHING,this.onMediaAttaching,this),this.hls.off(y.MEDIA_DETACHING,this.onMediaDetaching,this)}destroy(){this.timer&&clearInterval(this.timer),this.unregisterListeners(),this.isVideoPlaybackQualityAvailable=!1,this.media=null}onMediaAttaching(e,t){const s=this.hls.config;if(s.capLevelOnFPSDrop){const i=t.media instanceof self.HTMLVideoElement?t.media:null;this.media=i,i&&typeof i.getVideoPlaybackQuality=="function"&&(this.isVideoPlaybackQualityAvailable=!0),self.clearInterval(this.timer),this.timer=self.setInterval(this.checkFPSInterval.bind(this),s.fpsDroppedMonitoringPeriod)}}onMediaDetaching(){this.media=null}checkFPS(e,t,s){const i=performance.now();if(t){if(this.lastTime){const n=i-this.lastTime,o=s-this.lastDroppedFrames,a=t-this.lastDecodedFrames,l=1e3*o/n,c=this.hls;if(c.trigger(y.FPS_DROP,{currentDropped:o,currentDecoded:a,totalDroppedFrames:s}),l>0&&o>c.config.fpsDroppedMonitoringThreshold*a){let u=c.currentLevel;c.logger.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(c.autoLevelCapping===-1||c.autoLevelCapping>=u)&&(u=u-1,c.trigger(y.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:c.currentLevel}),c.autoLevelCapping=u,this.streamController.nextLevelSwitch())}}this.lastTime=i,this.lastDroppedFrames=s,this.lastDecodedFrames=t}}checkFPSInterval(){const e=this.media;if(e)if(this.isVideoPlaybackQualityAvailable){const t=e.getVideoPlaybackQuality();this.checkFPS(e,t.totalVideoFrames,t.droppedVideoFrames)}else this.checkFPS(e,e.webkitDecodedFrameCount,e.webkitDroppedFrameCount)}}class Ut extends yt{constructor(e){super("eme",e.logger),this.hls=void 0,this.config=void 0,this.media=null,this.keyFormatPromise=null,this.keySystemAccessPromises={},this._requestLicenseFailureCount=0,this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},this.setMediaKeysQueue=Ut.CDMCleanupPromise?[Ut.CDMCleanupPromise]:[],this.onMediaEncrypted=t=>{const{initDataType:s,initData:i}=t;if(this.debug(`"${t.type}" event: init data type: "${s}"`),i===null)return;let n,o;if(s==="sinf"&&this.config.drmSystems[ge.FAIRPLAY]){const h=Se(new Uint8Array(i));try{const d=ji(JSON.parse(h).sinf),g=ho(new Uint8Array(d));if(!g)return;n=g.subarray(8,24),o=ge.FAIRPLAY}catch{this.warn('Failed to parse sinf "encrypted" event message initData');return}}else{const h=wl(i);if(h===null)return;h.version===0&&h.systemId===no.WIDEVINE&&h.data&&(n=h.data.subarray(8,24)),o=fl(h.systemId)}if(!o||!n)return;const a=Xe.hexDump(n),{keyIdToKeySessionPromise:l,mediaKeySessions:c}=this;let u=l[a];for(let h=0;h<c.length;h++){const d=c[h],g=d.decryptdata;if(g.pssh||!g.keyId)continue;const f=Xe.hexDump(g.keyId);if(a===f||g.uri.replace(/-/g,"").indexOf(a)!==-1){u=l[f],delete l[f],g.pssh=new Uint8Array(i),g.keyId=n,u=l[a]=u.then(()=>this.generateRequestWithPreferredKeySession(d,s,i,"encrypted-event-key-match"));break}}u||(u=l[a]=this.getKeySystemSelectionPromise([o]).then(({keySystem:h,mediaKeys:d})=>{var g;this.throwIfDestroyed();const f=new Zt("ISO-23001-7",a,(g=Dr(h))!=null?g:"");return f.pssh=new Uint8Array(i),f.keyId=n,this.attemptSetMediaKeys(h,d).then(()=>{this.throwIfDestroyed();const m=this.createMediaKeySessionContext({decryptdata:f,keySystem:h,mediaKeys:d});return this.generateRequestWithPreferredKeySession(m,s,i,"encrypted-event-no-match")})})),u.catch(h=>this.handleError(h))},this.onWaitingForKey=t=>{this.log(`"${t.type}" event`)},this.hls=e,this.config=e.config,this.registerListeners()}destroy(){this.unregisterListeners(),this.onMediaDetached();const e=this.config;e.requestMediaKeySystemAccessFunc=null,e.licenseXhrSetup=e.licenseResponseCallback=void 0,e.drmSystems=e.drmSystemOptions={},this.hls=this.config=this.keyIdToKeySessionPromise=null,this.onMediaEncrypted=this.onWaitingForKey=null}registerListeners(){this.hls.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.on(y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.on(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.on(y.MANIFEST_LOADED,this.onManifestLoaded,this)}unregisterListeners(){this.hls.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),this.hls.off(y.MEDIA_DETACHED,this.onMediaDetached,this),this.hls.off(y.MANIFEST_LOADING,this.onManifestLoading,this),this.hls.off(y.MANIFEST_LOADED,this.onManifestLoaded,this)}getLicenseServerUrl(e){const{drmSystems:t,widevineLicenseUrl:s}=this.config,i=t[e];if(i)return i.licenseUrl;if(e===ge.WIDEVINE&&s)return s;throw new Error(`no license server URL configured for key-system "${e}"`)}getServerCertificateUrl(e){const{drmSystems:t}=this.config,s=t[e];if(s)return s.serverCertificateUrl;this.log(`No Server Certificate in config.drmSystems["${e}"]`)}attemptKeySystemAccess(e){const t=this.hls.levels,s=(o,a,l)=>!!o&&l.indexOf(o)===a,i=t.map(o=>o.audioCodec).filter(s),n=t.map(o=>o.videoCodec).filter(s);return i.length+n.length===0&&n.push("avc1.42e01e"),new Promise((o,a)=>{const l=c=>{const u=c.shift();this.getMediaKeysPromise(u,i,n).then(h=>o({keySystem:u,mediaKeys:h})).catch(h=>{c.length?l(c):h instanceof Be?a(h):a(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_ACCESS,error:h,fatal:!0},h.message))})};l(e)})}requestMediaKeySystemAccess(e,t){const{requestMediaKeySystemAccessFunc:s}=this.config;if(typeof s!="function"){let i=`Configured requestMediaKeySystemAccess is not a function ${s}`;return oo===null&&self.location.protocol==="http:"&&(i=`navigator.requestMediaKeySystemAccess is not available over insecure protocol ${location.protocol}`),Promise.reject(new Error(i))}return s(e,t)}getMediaKeysPromise(e,t,s){const i=gl(e,t,s,this.config.drmSystemOptions),n=this.keySystemAccessPromises[e];let o=n==null?void 0:n.keySystemAccess;if(!o){this.log(`Requesting encrypted media "${e}" key-system access with config: ${JSON.stringify(i)}`),o=this.requestMediaKeySystemAccess(e,i);const a=this.keySystemAccessPromises[e]={keySystemAccess:o};return o.catch(l=>{this.log(`Failed to obtain access to key-system "${e}": ${l}`)}),o.then(l=>{this.log(`Access for key-system "${l.keySystem}" obtained`);const c=this.fetchServerCertificate(e);return this.log(`Create media-keys for "${e}"`),a.mediaKeys=l.createMediaKeys().then(u=>(this.log(`Media-keys created for "${e}"`),c.then(h=>h?this.setMediaKeysServerCertificate(u,e,h):u))),a.mediaKeys.catch(u=>{this.error(`Failed to create media-keys for "${e}"}: ${u}`)}),a.mediaKeys})}return o.then(()=>n.mediaKeys)}createMediaKeySessionContext({decryptdata:e,keySystem:t,mediaKeys:s}){this.log(`Creating key-system session "${t}" keyId: ${Xe.hexDump(e.keyId||[])}`);const i=s.createSession(),n={decryptdata:e,keySystem:t,mediaKeys:s,mediaKeysSession:i,keyStatus:"status-pending"};return this.mediaKeySessions.push(n),n}renewKeySession(e){const t=e.decryptdata;if(t.pssh){const s=this.createMediaKeySessionContext(e),i=this.getKeyIdString(t),n="cenc";this.keyIdToKeySessionPromise[i]=this.generateRequestWithPreferredKeySession(s,n,t.pssh,"expired")}else this.warn("Could not renew expired session. Missing pssh initData.");this.removeSession(e)}getKeyIdString(e){if(!e)throw new Error("Could not read keyId of undefined decryptdata");if(e.keyId===null)throw new Error("keyId is null");return Xe.hexDump(e.keyId)}updateKeySession(e,t){var s;const i=e.mediaKeysSession;return this.log(`Updating key-session "${i.sessionId}" for keyID ${Xe.hexDump(((s=e.decryptdata)==null?void 0:s.keyId)||[])} } (data length: ${t&&t.byteLength})`),i.update(t)}selectKeySystemFormat(e){const t=Object.keys(e.levelkeys||{});return this.keyFormatPromise||(this.log(`Selecting key-system from fragment (sn: ${e.sn} ${e.type}: ${e.level}) key formats ${t.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(t)),this.keyFormatPromise}getKeyFormatPromise(e){return new Promise((t,s)=>{const i=Xs(this.config),n=e.map(Ir).filter(o=>!!o&&i.indexOf(o)!==-1);return this.getKeySystemSelectionPromise(n).then(({keySystem:o})=>{const a=Dr(o);a?t(a):s(new Error(`Unable to find format for key-system "${o}"`))}).catch(s)})}loadKey(e){const t=e.keyInfo.decryptdata,s=this.getKeyIdString(t),i=`(keyId: ${s} format: "${t.keyFormat}" method: ${t.method} uri: ${t.uri})`;this.log(`Starting session for key ${i}`);let n=this.keyIdToKeySessionPromise[s];return n||(n=this.keyIdToKeySessionPromise[s]=this.getKeySystemForKeyPromise(t).then(({keySystem:o,mediaKeys:a})=>(this.throwIfDestroyed(),this.log(`Handle encrypted media sn: ${e.frag.sn} ${e.frag.type}: ${e.frag.level} using key ${i}`),this.attemptSetMediaKeys(o,a).then(()=>{this.throwIfDestroyed();const l=this.createMediaKeySessionContext({keySystem:o,mediaKeys:a,decryptdata:t});return this.generateRequestWithPreferredKeySession(l,"cenc",t.pssh,"playlist-key")}))),n.catch(o=>this.handleError(o))),n}throwIfDestroyed(e="Invalid state"){if(!this.hls)throw new Error("invalid state")}handleError(e){this.hls&&(this.error(e.message),e instanceof Be?this.hls.trigger(y.ERROR,e.data):this.hls.trigger(y.ERROR,{type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_KEYS,error:e,fatal:!0}))}getKeySystemForKeyPromise(e){const t=this.getKeyIdString(e),s=this.keyIdToKeySessionPromise[t];if(!s){const i=Ir(e.keyFormat),n=i?[i]:Xs(this.config);return this.attemptKeySystemAccess(n)}return s}getKeySystemSelectionPromise(e){if(e.length||(e=Xs(this.config)),e.length===0)throw new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_CONFIGURED_LICENSE,fatal:!0},`Missing key-system license configuration options ${JSON.stringify({drmSystems:this.config.drmSystems})}`);return this.attemptKeySystemAccess(e)}attemptSetMediaKeys(e,t){const s=this.setMediaKeysQueue.slice();this.log(`Setting media-keys for "${e}"`);const i=Promise.all(s).then(()=>{if(!this.media)throw new Error("Attempted to set mediaKeys without media element attached");return this.media.setMediaKeys(t)});return this.setMediaKeysQueue.push(i),i.then(()=>{this.log(`Media-keys set for "${e}"`),s.push(i),this.setMediaKeysQueue=this.setMediaKeysQueue.filter(n=>s.indexOf(n)===-1)})}generateRequestWithPreferredKeySession(e,t,s,i){var n,o;const a=(n=this.config.drmSystems)==null||(o=n[e.keySystem])==null?void 0:o.generateRequest;if(a)try{const f=a.call(this.hls,t,s,e);if(!f)throw new Error("Invalid response from configured generateRequest filter");t=f.initDataType,s=e.decryptdata.pssh=f.initData?new Uint8Array(f.initData):null}catch(f){var l;if(this.warn(f.message),(l=this.hls)!=null&&l.config.debug)throw f}if(s===null)return this.log(`Skipping key-session request for "${i}" (no initData)`),Promise.resolve(e);const c=this.getKeyIdString(e.decryptdata);this.log(`Generating key-session request for "${i}": ${c} (init data type: ${t} length: ${s?s.byteLength:null})`);const u=new cr,h=e._onmessage=f=>{const m=e.mediaKeysSession;if(!m){u.emit("error",new Error("invalid state"));return}const{messageType:p,message:E}=f;this.log(`"${p}" message event for session "${m.sessionId}" message size: ${E.byteLength}`),p==="license-request"||p==="license-renewal"?this.renewLicense(e,E).catch(x=>{this.handleError(x),u.emit("error",x)}):p==="license-release"?e.keySystem===ge.FAIRPLAY&&(this.updateKeySession(e,Ai("acknowledged")),this.removeSession(e)):this.warn(`unhandled media key message type "${p}"`)},d=e._onkeystatuseschange=f=>{if(!e.mediaKeysSession){u.emit("error",new Error("invalid state"));return}this.onKeyStatusChange(e);const p=e.keyStatus;u.emit("keyStatus",p),p==="expired"&&(this.warn(`${e.keySystem} expired for key ${c}`),this.renewKeySession(e))};e.mediaKeysSession.addEventListener("message",h),e.mediaKeysSession.addEventListener("keystatuseschange",d);const g=new Promise((f,m)=>{u.on("error",m),u.on("keyStatus",p=>{p.startsWith("usable")?f():p==="output-restricted"?m(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_OUTPUT_RESTRICTED,fatal:!1},"HDCP level output restricted")):p==="internal-error"?m(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_STATUS_INTERNAL_ERROR,fatal:!0},`key status changed to "${p}"`)):p==="expired"?m(new Error("key expired while generating request")):this.warn(`unhandled key status change "${p}"`)})});return e.mediaKeysSession.generateRequest(t,s).then(()=>{var f;this.log(`Request generated for key-session "${(f=e.mediaKeysSession)==null?void 0:f.sessionId}" keyId: ${c}`)}).catch(f=>{throw new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_NO_SESSION,error:f,fatal:!1},`Error generating key-session request: ${f}`)}).then(()=>g).catch(f=>{throw u.removeAllListeners(),this.removeSession(e),f}).then(()=>(u.removeAllListeners(),e))}onKeyStatusChange(e){e.mediaKeysSession.keyStatuses.forEach((t,s)=>{this.log(`key status change "${t}" for keyStatuses keyId: ${Xe.hexDump("buffer"in s?new Uint8Array(s.buffer,s.byteOffset,s.byteLength):new Uint8Array(s))} session keyId: ${Xe.hexDump(new Uint8Array(e.decryptdata.keyId||[]))} uri: ${e.decryptdata.uri}`),e.keyStatus=t})}fetchServerCertificate(e){const t=this.config,s=t.loader,i=new s(t),n=this.getServerCertificateUrl(e);return n?(this.log(`Fetching server certificate for "${e}"`),new Promise((o,a)=>{const l={responseType:"arraybuffer",url:n},c=t.certLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(d,g,f,m)=>{o(d.data)},onError:(d,g,f,m)=>{a(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:f,response:ve({url:l.url,data:void 0},d)},`"${e}" certificate request failed (${n}). Status: ${d.code} (${d.text})`))},onTimeout:(d,g,f)=>{a(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_REQUEST_FAILED,fatal:!0,networkDetails:f,response:{url:l.url,data:void 0}},`"${e}" certificate request timed out (${n})`))},onAbort:(d,g,f)=>{a(new Error("aborted"))}};i.load(l,u,h)})):Promise.resolve()}setMediaKeysServerCertificate(e,t,s){return new Promise((i,n)=>{e.setServerCertificate(s).then(o=>{this.log(`setServerCertificate ${o?"success":"not supported by CDM"} (${s==null?void 0:s.byteLength}) on "${t}"`),i(e)}).catch(o=>{n(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SERVER_CERTIFICATE_UPDATE_FAILED,error:o,fatal:!0},o.message))})})}renewLicense(e,t){return this.requestLicense(e,new Uint8Array(t)).then(s=>this.updateKeySession(e,new Uint8Array(s)).catch(i=>{throw new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_SESSION_UPDATE_FAILED,error:i,fatal:!0},i.message)}))}unpackPlayReadyKeyMessage(e,t){const s=String.fromCharCode.apply(null,new Uint16Array(t.buffer));if(!s.includes("PlayReadyKeyMessage"))return e.setRequestHeader("Content-Type","text/xml; charset=utf-8"),t;const i=new DOMParser().parseFromString(s,"application/xml"),n=i.querySelectorAll("HttpHeader");if(n.length>0){let u;for(let h=0,d=n.length;h<d;h++){var o,a;u=n[h];const g=(o=u.querySelector("name"))==null?void 0:o.textContent,f=(a=u.querySelector("value"))==null?void 0:a.textContent;g&&f&&e.setRequestHeader(g,f)}}const l=i.querySelector("Challenge"),c=l==null?void 0:l.textContent;if(!c)throw new Error("Cannot find <Challenge> in key message");return Ai(atob(c))}setupLicenseXHR(e,t,s,i){const n=this.config.licenseXhrSetup;return n?Promise.resolve().then(()=>{if(!s.decryptdata)throw new Error("Key removed");return n.call(this.hls,e,t,s,i)}).catch(o=>{if(!s.decryptdata)throw o;return e.open("POST",t,!0),n.call(this.hls,e,t,s,i)}).then(o=>(e.readyState||e.open("POST",t,!0),{xhr:e,licenseChallenge:o||i})):(e.open("POST",t,!0),Promise.resolve({xhr:e,licenseChallenge:i}))}requestLicense(e,t){const s=this.config.keyLoadPolicy.default;return new Promise((i,n)=>{const o=this.getLicenseServerUrl(e.keySystem);this.log(`Sending license request to URL: ${o}`);const a=new XMLHttpRequest;a.responseType="arraybuffer",a.onreadystatechange=()=>{if(!this.hls||!e.mediaKeysSession)return n(new Error("invalid state"));if(a.readyState===4)if(a.status===200){this._requestLicenseFailureCount=0;let l=a.response;this.log(`License received ${l instanceof ArrayBuffer?l.byteLength:l}`);const c=this.config.licenseResponseCallback;if(c)try{l=c.call(this.hls,a,o,e)}catch(u){this.error(u)}i(l)}else{const l=s.errorRetry,c=l?l.maxNumRetry:0;if(this._requestLicenseFailureCount++,this._requestLicenseFailureCount>c||a.status>=400&&a.status<500)n(new Be({type:Y.KEY_SYSTEM_ERROR,details:D.KEY_SYSTEM_LICENSE_REQUEST_FAILED,fatal:!0,networkDetails:a,response:{url:o,data:void 0,code:a.status,text:a.statusText}},`License Request XHR failed (${o}). Status: ${a.status} (${a.statusText})`));else{const u=c-this._requestLicenseFailureCount+1;this.warn(`Retrying license request, ${u} attempts left`),this.requestLicense(e,t).then(i,n)}}},e.licenseXhr&&e.licenseXhr.readyState!==XMLHttpRequest.DONE&&e.licenseXhr.abort(),e.licenseXhr=a,this.setupLicenseXHR(a,o,e,t).then(({xhr:l,licenseChallenge:c})=>{e.keySystem==ge.PLAYREADY&&(c=this.unpackPlayReadyKeyMessage(l,c)),l.send(c)})})}onMediaAttached(e,t){if(!this.config.emeEnabled)return;const s=t.media;this.media=s,s.addEventListener("encrypted",this.onMediaEncrypted),s.addEventListener("waitingforkey",this.onWaitingForKey)}onMediaDetached(){const e=this.media,t=this.mediaKeySessions;e&&(e.removeEventListener("encrypted",this.onMediaEncrypted),e.removeEventListener("waitingforkey",this.onWaitingForKey),this.media=null),this._requestLicenseFailureCount=0,this.setMediaKeysQueue=[],this.mediaKeySessions=[],this.keyIdToKeySessionPromise={},Zt.clearKeyUriToKeyIdMap();const s=t.length;Ut.CDMCleanupPromise=Promise.all(t.map(i=>this.removeSession(i)).concat(e==null?void 0:e.setMediaKeys(null).catch(i=>{this.log(`Could not clear media keys: ${i}`)}))).then(()=>{s&&(this.log("finished closing key sessions and clearing media keys"),t.length=0)}).catch(i=>{this.log(`Could not close sessions and clear media keys: ${i}`)})}onManifestLoading(){this.keyFormatPromise=null}onManifestLoaded(e,{sessionKeys:t}){if(!(!t||!this.config.emeEnabled)&&!this.keyFormatPromise){const s=t.reduce((i,n)=>(i.indexOf(n.keyFormat)===-1&&i.push(n.keyFormat),i),[]);this.log(`Selecting key-system from session-keys ${s.join(", ")}`),this.keyFormatPromise=this.getKeyFormatPromise(s)}}removeSession(e){const{mediaKeysSession:t,licenseXhr:s}=e;if(t){this.log(`Remove licenses and keys and close session ${t.sessionId}`),e._onmessage&&(t.removeEventListener("message",e._onmessage),e._onmessage=void 0),e._onkeystatuseschange&&(t.removeEventListener("keystatuseschange",e._onkeystatuseschange),e._onkeystatuseschange=void 0),s&&s.readyState!==XMLHttpRequest.DONE&&s.abort(),e.mediaKeysSession=e.decryptdata=e.licenseXhr=void 0;const i=this.mediaKeySessions.indexOf(e);return i>-1&&this.mediaKeySessions.splice(i,1),t.remove().catch(n=>{this.log(`Could not remove session: ${n}`)}).then(()=>t.close()).catch(n=>{this.log(`Could not close session: ${n}`)})}}}Ut.CDMCleanupPromise=void 0;class Be extends Error{constructor(e,t){super(t),this.data=void 0,e.error||(e.error=new Error(t)),this.data=e,e.err=e.error}}var Re;(function(r){r.MANIFEST="m",r.AUDIO="a",r.VIDEO="v",r.MUXED="av",r.INIT="i",r.CAPTION="c",r.TIMED_TEXT="tt",r.KEY="k",r.OTHER="o"})(Re||(Re={}));var Fi;(function(r){r.DASH="d",r.HLS="h",r.SMOOTH="s",r.OTHER="o"})(Fi||(Fi={}));var St;(function(r){r.OBJECT="CMCD-Object",r.REQUEST="CMCD-Request",r.SESSION="CMCD-Session",r.STATUS="CMCD-Status"})(St||(St={}));const yh={[St.OBJECT]:["br","d","ot","tb"],[St.REQUEST]:["bl","dl","mtp","nor","nrr","su"],[St.SESSION]:["cid","pr","sf","sid","st","v"],[St.STATUS]:["bs","rtp"]};class Kt{constructor(e,t){Array.isArray(e)&&(e=e.map(s=>s instanceof Kt?s:new Kt(s))),this.value=e,this.params=t}}const Eh="Dict";function Th(r){return Array.isArray(r)?JSON.stringify(r):r instanceof Map?"Map{}":r instanceof Set?"Set{}":typeof r=="object"?JSON.stringify(r):String(r)}function xh(r,e,t,s){return new Error(`failed to ${r} "${Th(e)}" as ${t}`,{cause:s})}function nt(r,e,t){return xh("serialize",r,e,t)}class ia{constructor(e){this.description=e}}const An="Bare Item",Sh="Boolean";function vh(r){if(typeof r!="boolean")throw nt(r,Sh);return r?"?1":"?0"}const Lh="Byte Sequence";function Ah(r){if(ArrayBuffer.isView(r)===!1)throw nt(r,Lh);return`:${Jl(r)}:`}const bh="Integer";function _h(r){return r<-999999999999999||999999999999999<r}function ra(r){if(_h(r))throw nt(r,bh);return r.toString()}function Rh(r){return`@${ra(r.getTime()/1e3)}`}const Ih="Decimal";function Dh(r){const e=Eo(r,3);if(Math.floor(Math.abs(e)).toString().length>12)throw nt(r,Ih);const t=e.toString();return t.includes(".")?t:`${t}.0`}const Ch="String",wh=/[\x00-\x1f\x7f]+/;function kh(r){if(wh.test(r))throw nt(r,Ch);return`"${r.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`}function Ph(r){return r.description||r.toString().slice(7,-1)}const Fh="Token";function bn(r){const e=Ph(r);if(/^([a-zA-Z*])([!#$%&'*+\-.^_`|~\w:/]*)$/.test(e)===!1)throw nt(e,Fh);return e}function Oi(r){switch(typeof r){case"number":if(!V(r))throw nt(r,An);return Number.isInteger(r)?ra(r):Dh(r);case"string":return kh(r);case"symbol":return bn(r);case"boolean":return vh(r);case"object":if(r instanceof Date)return Rh(r);if(r instanceof Uint8Array)return Ah(r);if(r instanceof ia)return bn(r);default:throw nt(r,An)}}const Oh="Key";function Mi(r){if(/^[a-z*][a-z0-9\-_.*]*$/.test(r)===!1)throw nt(r,Oh);return r}function fr(r){return r==null?"":Object.entries(r).map(([e,t])=>t===!0?`;${Mi(e)}`:`;${Mi(e)}=${Oi(t)}`).join("")}function na(r){return r instanceof Kt?`${Oi(r.value)}${fr(r.params)}`:Oi(r)}function Mh(r){return`(${r.value.map(na).join(" ")})${fr(r.params)}`}function Nh(r,e={whitespace:!0}){if(typeof r!="object")throw nt(r,Eh);const t=r instanceof Map?r.entries():Object.entries(r),s=e!=null&&e.whitespace?" ":"";return Array.from(t).map(([i,n])=>{n instanceof Kt||(n=new Kt(n));let o=Mi(i);return n.value===!0?o+=fr(n.params):(o+="=",Array.isArray(n.value)?o+=Mh(n):o+=na(n)),o}).join(`,${s}`)}function Bh(r,e){return Nh(r,e)}function Uh(r){return r==="ot"||r==="sf"||r==="st"}function Gh(r){return typeof r=="number"?V(r):r!=null&&r!==""&&r!==!1}const As=r=>Math.round(r),$h=(r,e)=>(e!=null&&e.baseUrl&&(r=ec(r,e.baseUrl)),encodeURIComponent(r)),Es=r=>As(r/100)*100,Vh={br:As,d:As,bl:Es,dl:Es,mtp:Es,nor:$h,rtp:Es,tb:As};function Kh(r,e){const t={};if(r==null||typeof r!="object")return t;const s=Object.keys(r).sort(),i=pe({},Vh,e==null?void 0:e.formatters),n=e==null?void 0:e.filter;return s.forEach(o=>{if(n!=null&&n(o))return;let a=r[o];const l=i[o];l&&(a=l(a,e)),!(o==="v"&&a===1)&&(o=="pr"&&a===1||Gh(a)&&(Uh(o)&&typeof a=="string"&&(a=new ia(a)),t[o]=a))}),t}function oa(r,e={}){return r?Bh(Kh(r,e),pe({whitespace:!1},e)):""}function Hh(r,e={}){const t={};if(!r)return t;const s=Object.entries(r),i=Object.entries(yh).concat(Object.entries((e==null?void 0:e.customHeaderMap)||{})),n=s.reduce((o,a)=>{var l,c;const[u,h]=a,d=((l=i.find(g=>g[1].includes(u)))===null||l===void 0?void 0:l[0])||St.REQUEST;return(c=o[d])!==null&&c!==void 0||(o[d]={}),o[d][u]=h,o},{});return Object.entries(n).reduce((o,[a,l])=>(o[a]=oa(l,e),o),t)}function Wh(r,e,t){return pe(r,Hh(e,t))}const Yh="CMCD";function qh(r,e={}){if(!r)return"";const t=oa(r,e);return`${Yh}=${encodeURIComponent(t)}`}const _n=/CMCD=[^&#]+/;function jh(r,e,t){const s=qh(e,t);if(!s)return r;if(_n.test(r))return r.replace(_n,s);const i=r.includes("?")?"&":"?";return`${r}${i}${s}`}class zh{constructor(e){this.hls=void 0,this.config=void 0,this.media=void 0,this.sid=void 0,this.cid=void 0,this.useHeaders=!1,this.includeKeys=void 0,this.initialized=!1,this.starved=!1,this.buffering=!0,this.audioBuffer=void 0,this.videoBuffer=void 0,this.onWaiting=()=>{this.initialized&&(this.starved=!0),this.buffering=!0},this.onPlaying=()=>{this.initialized||(this.initialized=!0),this.buffering=!1},this.applyPlaylistData=i=>{try{this.apply(i,{ot:Re.MANIFEST,su:!this.initialized})}catch(n){this.hls.logger.warn("Could not generate manifest CMCD data.",n)}},this.applyFragmentData=i=>{try{const{frag:n,part:o}=i,a=this.hls.levels[n.level],l=this.getObjectType(n),c={d:(o||n).duration*1e3,ot:l};(l===Re.VIDEO||l===Re.AUDIO||l==Re.MUXED)&&(c.br=a.bitrate/1e3,c.tb=this.getTopBandwidth(l)/1e3,c.bl=this.getBufferLength(l));const u=o?this.getNextPart(o):this.getNextFrag(n);u!=null&&u.url&&u.url!==n.url&&(c.nor=u.url),this.apply(i,c)}catch(n){this.hls.logger.warn("Could not generate segment CMCD data.",n)}},this.hls=e;const t=this.config=e.config,{cmcd:s}=t;s!=null&&(t.pLoader=this.createPlaylistLoader(),t.fLoader=this.createFragmentLoader(),this.sid=s.sessionId||tc(),this.cid=s.contentId,this.useHeaders=s.useHeaders===!0,this.includeKeys=s.includeKeys,this.registerListeners())}registerListeners(){const e=this.hls;e.on(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.on(y.MEDIA_DETACHED,this.onMediaDetached,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this)}unregisterListeners(){const e=this.hls;e.off(y.MEDIA_ATTACHED,this.onMediaAttached,this),e.off(y.MEDIA_DETACHED,this.onMediaDetached,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this)}destroy(){this.unregisterListeners(),this.onMediaDetached(),this.hls=this.config=this.audioBuffer=this.videoBuffer=null,this.onWaiting=this.onPlaying=this.media=null}onMediaAttached(e,t){this.media=t.media,this.media.addEventListener("waiting",this.onWaiting),this.media.addEventListener("playing",this.onPlaying)}onMediaDetached(){this.media&&(this.media.removeEventListener("waiting",this.onWaiting),this.media.removeEventListener("playing",this.onPlaying),this.media=null)}onBufferCreated(e,t){var s,i;this.audioBuffer=(s=t.tracks.audio)==null?void 0:s.buffer,this.videoBuffer=(i=t.tracks.video)==null?void 0:i.buffer}createData(){var e;return{v:1,sf:Fi.HLS,sid:this.sid,cid:this.cid,pr:(e=this.media)==null?void 0:e.playbackRate,mtp:this.hls.bandwidthEstimate/1e3}}apply(e,t={}){pe(t,this.createData());const s=t.ot===Re.INIT||t.ot===Re.VIDEO||t.ot===Re.MUXED;this.starved&&s&&(t.bs=!0,t.su=!0,this.starved=!1),t.su==null&&(t.su=this.buffering);const{includeKeys:i}=this;i&&(t=Object.keys(t).reduce((o,a)=>(i.includes(a)&&(o[a]=t[a]),o),{}));const n={baseUrl:e.url};this.useHeaders?(e.headers||(e.headers={}),Wh(e.headers,t,n)):e.url=jh(e.url,t,n)}getNextFrag(e){var t;const s=(t=this.hls.levels[e.level])==null?void 0:t.details;if(s){const i=e.sn-s.startSN;return s.fragments[i+1]}}getNextPart(e){var t,s;const{index:i,fragment:n}=e,o=(t=this.hls.levels[n.level])==null||(s=t.details)==null?void 0:s.partList;if(o){const{sn:a}=n;for(let l=o.length-1;l>=0;l--){const c=o[l];if(c.index===i&&c.fragment.sn===a)return o[l+1]}}}getObjectType(e){const{type:t}=e;if(t==="subtitle")return Re.TIMED_TEXT;if(e.sn==="initSegment")return Re.INIT;if(t==="audio")return Re.AUDIO;if(t==="main")return this.hls.audioTracks.length?Re.VIDEO:Re.MUXED}getTopBandwidth(e){let t=0,s;const i=this.hls;if(e===Re.AUDIO)s=i.audioTracks;else{const n=i.maxAutoLevel,o=n>-1?n+1:i.levels.length;s=i.levels.slice(0,o)}for(const n of s)n.bitrate>t&&(t=n.bitrate);return t>0?t:NaN}getBufferLength(e){const t=this.media,s=e===Re.AUDIO?this.audioBuffer:this.videoBuffer;return!s||!t?NaN:ue.bufferInfo(s,t.currentTime,this.config.maxBufferHole).len*1e3}createPlaylistLoader(){const{pLoader:e}=this.config,t=this.applyPlaylistData,s=e||this.config.loader;return class{constructor(n){this.loader=void 0,this.loader=new s(n)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(n,o,a){t(n),this.loader.load(n,o,a)}}}createFragmentLoader(){const{fLoader:e}=this.config,t=this.applyFragmentData,s=e||this.config.loader;return class{constructor(n){this.loader=void 0,this.loader=new s(n)}get stats(){return this.loader.stats}get context(){return this.loader.context}destroy(){this.loader.destroy()}abort(){this.loader.abort()}load(n,o,a){t(n),this.loader.load(n,o,a)}}}}const Xh=3e5;class Qh extends yt{constructor(e){super("content-steering",e.logger),this.hls=void 0,this.loader=null,this.uri=null,this.pathwayId=".",this._pathwayPriority=null,this.timeToLoad=300,this.reloadTimer=-1,this.updated=0,this.started=!1,this.enabled=!0,this.levels=null,this.audioTracks=null,this.subtitleTracks=null,this.penalizedPathways={},this.hls=e,this.registerListeners()}registerListeners(){const e=this.hls;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.ERROR,this.onError,this)}unregisterListeners(){const e=this.hls;e&&(e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.ERROR,this.onError,this))}pathways(){return(this.levels||[]).reduce((e,t)=>(e.indexOf(t.pathwayId)===-1&&e.push(t.pathwayId),e),[])}get pathwayPriority(){return this._pathwayPriority}set pathwayPriority(e){this.updatePathwayPriority(e)}startLoad(){if(this.started=!0,this.clearTimeout(),this.enabled&&this.uri){if(this.updated){const e=this.timeToLoad*1e3-(performance.now()-this.updated);if(e>0){this.scheduleRefresh(this.uri,e);return}}this.loadSteeringManifest(this.uri)}}stopLoad(){this.started=!1,this.loader&&(this.loader.destroy(),this.loader=null),this.clearTimeout()}clearTimeout(){this.reloadTimer!==-1&&(self.clearTimeout(this.reloadTimer),this.reloadTimer=-1)}destroy(){this.unregisterListeners(),this.stopLoad(),this.hls=null,this.levels=this.audioTracks=this.subtitleTracks=null}removeLevel(e){const t=this.levels;t&&(this.levels=t.filter(s=>s!==e))}onManifestLoading(){this.stopLoad(),this.enabled=!0,this.timeToLoad=300,this.updated=0,this.uri=null,this.pathwayId=".",this.levels=this.audioTracks=this.subtitleTracks=null}onManifestLoaded(e,t){const{contentSteering:s}=t;s!==null&&(this.pathwayId=s.pathwayId,this.uri=s.uri,this.started&&this.startLoad())}onManifestParsed(e,t){this.audioTracks=t.audioTracks,this.subtitleTracks=t.subtitleTracks}onError(e,t){const{errorAction:s}=t;if((s==null?void 0:s.action)===Ie.SendAlternateToPenaltyBox&&s.flags===ze.MoveAllAlternatesMatchingHost){const i=this.levels;let n=this._pathwayPriority,o=this.pathwayId;if(t.context){const{groupId:a,pathwayId:l,type:c}=t.context;a&&i?o=this.getPathwayForGroupId(a,c,o):l&&(o=l)}o in this.penalizedPathways||(this.penalizedPathways[o]=performance.now()),!n&&i&&(n=this.pathways()),n&&n.length>1&&(this.updatePathwayPriority(n),s.resolved=this.pathwayId!==o),s.resolved||this.warn(`Could not resolve ${t.details} ("${t.error.message}") with content-steering for Pathway: ${o} levels: ${i&&i.length} priorities: ${JSON.stringify(n)} penalized: ${JSON.stringify(this.penalizedPathways)}`)}}filterParsedLevels(e){this.levels=e;let t=this.getLevelsForPathway(this.pathwayId);if(t.length===0){const s=e[0].pathwayId;this.log(`No levels found in Pathway ${this.pathwayId}. Setting initial Pathway to "${s}"`),t=this.getLevelsForPathway(s),this.pathwayId=s}return t.length!==e.length?(this.log(`Found ${t.length}/${e.length} levels in Pathway "${this.pathwayId}"`),t):e}getLevelsForPathway(e){return this.levels===null?[]:this.levels.filter(t=>e===t.pathwayId)}updatePathwayPriority(e){this._pathwayPriority=e;let t;const s=this.penalizedPathways,i=performance.now();Object.keys(s).forEach(n=>{i-s[n]>Xh&&delete s[n]});for(let n=0;n<e.length;n++){const o=e[n];if(o in s)continue;if(o===this.pathwayId)return;const a=this.hls.nextLoadLevel,l=this.hls.levels[a];if(t=this.getLevelsForPathway(o),t.length>0){this.log(`Setting Pathway to "${o}"`),this.pathwayId=o,bo(t),this.hls.trigger(y.LEVELS_UPDATED,{levels:t});const c=this.hls.levels[a];l&&c&&this.levels&&(c.attrs["STABLE-VARIANT-ID"]!==l.attrs["STABLE-VARIANT-ID"]&&c.bitrate!==l.bitrate&&this.log(`Unstable Pathways change from bitrate ${l.bitrate} to ${c.bitrate}`),this.hls.nextLoadLevel=a);break}}}getPathwayForGroupId(e,t,s){const i=this.getLevelsForPathway(s).concat(this.levels||[]);for(let n=0;n<i.length;n++)if(t===re.AUDIO_TRACK&&i[n].hasAudioGroup(e)||t===re.SUBTITLE_TRACK&&i[n].hasSubtitleGroup(e))return i[n].pathwayId;return s}clonePathways(e){const t=this.levels;if(!t)return;const s={},i={};e.forEach(n=>{const{ID:o,"BASE-ID":a,"URI-REPLACEMENT":l}=n;if(t.some(u=>u.pathwayId===o))return;const c=this.getLevelsForPathway(a).map(u=>{const h=new me(u.attrs);h["PATHWAY-ID"]=o;const d=h.AUDIO&&`${h.AUDIO}_clone_${o}`,g=h.SUBTITLES&&`${h.SUBTITLES}_clone_${o}`;d&&(s[h.AUDIO]=d,h.AUDIO=d),g&&(i[h.SUBTITLES]=g,h.SUBTITLES=g);const f=aa(u.uri,h["STABLE-VARIANT-ID"],"PER-VARIANT-URIS",l),m=new Gt({attrs:h,audioCodec:u.audioCodec,bitrate:u.bitrate,height:u.height,name:u.name,url:f,videoCodec:u.videoCodec,width:u.width});if(u.audioGroups)for(let p=1;p<u.audioGroups.length;p++)m.addGroupId("audio",`${u.audioGroups[p]}_clone_${o}`);if(u.subtitleGroups)for(let p=1;p<u.subtitleGroups.length;p++)m.addGroupId("text",`${u.subtitleGroups[p]}_clone_${o}`);return m});t.push(...c),Rn(this.audioTracks,s,l,o),Rn(this.subtitleTracks,i,l,o)})}loadSteeringManifest(e){const t=this.hls.config,s=t.loader;this.loader&&this.loader.destroy(),this.loader=new s(t);let i;try{i=new self.URL(e)}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest URI: ${e}`);return}if(i.protocol!=="data:"){const u=(this.hls.bandwidthEstimate||t.abrEwmaDefaultEstimate)|0;i.searchParams.set("_HLS_pathway",this.pathwayId),i.searchParams.set("_HLS_throughput",""+u)}const n={responseType:"json",url:i.href},o=t.steeringManifestLoadPolicy.default,a=o.errorRetry||o.timeoutRetry||{},l={loadPolicy:o,timeout:o.maxLoadTimeMs,maxRetry:a.maxNumRetry||0,retryDelay:a.retryDelayMs||0,maxRetryDelay:a.maxRetryDelayMs||0},c={onSuccess:(u,h,d,g)=>{this.log(`Loaded steering manifest: "${i}"`);const f=u.data;if((f==null?void 0:f.VERSION)!==1){this.log(`Steering VERSION ${f.VERSION} not supported!`);return}this.updated=performance.now(),this.timeToLoad=f.TTL;const{"RELOAD-URI":m,"PATHWAY-CLONES":p,"PATHWAY-PRIORITY":E}=f;if(m)try{this.uri=new self.URL(m,i).href}catch{this.enabled=!1,this.log(`Failed to parse Steering Manifest RELOAD-URI: ${m}`);return}this.scheduleRefresh(this.uri||d.url),p&&this.clonePathways(p);const x={steeringManifest:f,url:i.toString()};this.hls.trigger(y.STEERING_MANIFEST_LOADED,x),E&&this.updatePathwayPriority(E)},onError:(u,h,d,g)=>{if(this.log(`Error loading steering manifest: ${u.code} ${u.text} (${h.url})`),this.stopLoad(),u.code===410){this.enabled=!1,this.log(`Steering manifest ${h.url} no longer available`);return}let f=this.timeToLoad*1e3;if(u.code===429){const m=this.loader;if(typeof(m==null?void 0:m.getResponseHeader)=="function"){const p=m.getResponseHeader("Retry-After");p&&(f=parseFloat(p)*1e3)}this.log(`Steering manifest ${h.url} rate limited`);return}this.scheduleRefresh(this.uri||h.url,f)},onTimeout:(u,h,d)=>{this.log(`Timeout loading steering manifest (${h.url})`),this.scheduleRefresh(this.uri||h.url)}};this.log(`Requesting steering manifest: ${i}`),this.loader.load(n,l,c)}scheduleRefresh(e,t=this.timeToLoad*1e3){this.clearTimeout(),this.reloadTimer=self.setTimeout(()=>{var s;const i=(s=this.hls)==null?void 0:s.media;if(i&&!i.ended){this.loadSteeringManifest(e);return}this.scheduleRefresh(e,this.timeToLoad*1e3)},t)}}function Rn(r,e,t,s){r&&Object.keys(e).forEach(i=>{const n=r.filter(o=>o.groupId===i).map(o=>{const a=pe({},o);return a.details=void 0,a.attrs=new me(a.attrs),a.url=a.attrs.URI=aa(o.url,o.attrs["STABLE-RENDITION-ID"],"PER-RENDITION-URIS",t),a.groupId=a.attrs["GROUP-ID"]=e[i],a.attrs["PATHWAY-ID"]=s,a});r.push(...n)})}function aa(r,e,t,s){const{HOST:i,PARAMS:n,[t]:o}=s;let a;e&&(a=o==null?void 0:o[e],a&&(r=a));const l=new self.URL(r);return i&&!a&&(l.host=i),n&&Object.keys(n).sort().forEach(c=>{c&&l.searchParams.set(c,n[c])}),l.href}const Zh=/^age:\s*[\d.]+\s*$/im;class la{constructor(e){this.xhrSetup=void 0,this.requestTimeout=void 0,this.retryTimeout=void 0,this.retryDelay=void 0,this.config=null,this.callbacks=null,this.context=null,this.loader=null,this.stats=void 0,this.xhrSetup=e&&e.xhrSetup||null,this.stats=new Ks,this.retryDelay=0}destroy(){this.callbacks=null,this.abortInternal(),this.loader=null,this.config=null,this.context=null,this.xhrSetup=null}abortInternal(){const e=this.loader;self.clearTimeout(this.requestTimeout),self.clearTimeout(this.retryTimeout),e&&(e.onreadystatechange=null,e.onprogress=null,e.readyState!==4&&(this.stats.aborted=!0,e.abort()))}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.loader)}load(e,t,s){if(this.stats.loading.start)throw new Error("Loader can only be used once.");this.stats.loading.start=self.performance.now(),this.context=e,this.config=t,this.callbacks=s,this.loadInternal()}loadInternal(){const{config:e,context:t}=this;if(!e||!t)return;const s=this.loader=new self.XMLHttpRequest,i=this.stats;i.loading.first=0,i.loaded=0,i.aborted=!1;const n=this.xhrSetup;n?Promise.resolve().then(()=>{if(!(this.loader!==s||this.stats.aborted))return n(s,t.url)}).catch(o=>{if(!(this.loader!==s||this.stats.aborted))return s.open("GET",t.url,!0),n(s,t.url)}).then(()=>{this.loader!==s||this.stats.aborted||this.openAndSendXhr(s,t,e)}).catch(o=>{this.callbacks.onError({code:s.status,text:o.message},t,s,i)}):this.openAndSendXhr(s,t,e)}openAndSendXhr(e,t,s){e.readyState||e.open("GET",t.url,!0);const i=t.headers,{maxTimeToFirstByteMs:n,maxLoadTimeMs:o}=s.loadPolicy;if(i)for(const a in i)e.setRequestHeader(a,i[a]);t.rangeEnd&&e.setRequestHeader("Range","bytes="+t.rangeStart+"-"+(t.rangeEnd-1)),e.onreadystatechange=this.readystatechange.bind(this),e.onprogress=this.loadprogress.bind(this),e.responseType=t.responseType,self.clearTimeout(this.requestTimeout),s.timeout=n&&V(n)?n:o,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),s.timeout),e.send()}readystatechange(){const{context:e,loader:t,stats:s}=this;if(!e||!t)return;const i=t.readyState,n=this.config;if(!s.aborted&&i>=2&&(s.loading.first===0&&(s.loading.first=Math.max(self.performance.now(),s.loading.start),n.timeout!==n.loadPolicy.maxLoadTimeMs&&(self.clearTimeout(this.requestTimeout),n.timeout=n.loadPolicy.maxLoadTimeMs,this.requestTimeout=self.setTimeout(this.loadtimeout.bind(this),n.loadPolicy.maxLoadTimeMs-(s.loading.first-s.loading.start)))),i===4)){self.clearTimeout(this.requestTimeout),t.onreadystatechange=null,t.onprogress=null;const o=t.status,a=t.responseType!=="text";if(o>=200&&o<300&&(a&&t.response||t.responseText!==null)){s.loading.end=Math.max(self.performance.now(),s.loading.first);const l=a?t.response:t.responseText,c=t.responseType==="arraybuffer"?l.byteLength:l.length;if(s.loaded=s.total=c,s.bwEstimate=s.total*8e3/(s.loading.end-s.loading.first),!this.callbacks)return;const u=this.callbacks.onProgress;if(u&&u(s,e,l,t),!this.callbacks)return;const h={url:t.responseURL,data:l,code:o};this.callbacks.onSuccess(h,s,e,t)}else{const l=n.loadPolicy.errorRetry,c=s.retry,u={url:e.url,data:void 0,code:o};Bs(l,c,!1,u)?this.retry(l):(te.error(`${o} while loading ${e.url}`),this.callbacks.onError({code:o,text:t.statusText},e,t,s))}}}loadtimeout(){if(!this.config)return;const e=this.config.loadPolicy.timeoutRetry,t=this.stats.retry;if(Bs(e,t,!0))this.retry(e);else{var s;te.warn(`timeout while loading ${(s=this.context)==null?void 0:s.url}`);const i=this.callbacks;i&&(this.abortInternal(),i.onTimeout(this.stats,this.context,this.loader))}}retry(e){const{context:t,stats:s}=this;this.retryDelay=Zi(e,s.retry),s.retry++,te.warn(`${status?"HTTP Status "+status:"Timeout"} while loading ${t==null?void 0:t.url}, retrying ${s.retry}/${e.maxNumRetry} in ${this.retryDelay}ms`),this.abortInternal(),this.loader=null,self.clearTimeout(this.retryTimeout),this.retryTimeout=self.setTimeout(this.loadInternal.bind(this),this.retryDelay)}loadprogress(e){const t=this.stats;t.loaded=e.loaded,e.lengthComputable&&(t.total=e.total)}getCacheAge(){let e=null;if(this.loader&&Zh.test(this.loader.getAllResponseHeaders())){const t=this.loader.getResponseHeader("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.loader&&new RegExp(`^${e}:\\s*[\\d.]+\\s*$`,"im").test(this.loader.getAllResponseHeaders())?this.loader.getResponseHeader(e):null}}function Jh(){if(self.fetch&&self.AbortController&&self.ReadableStream&&self.Request)try{return new self.ReadableStream({}),!0}catch{}return!1}const ed=/(\d+)-(\d+)\/(\d+)/;class In{constructor(e){this.fetchSetup=void 0,this.requestTimeout=void 0,this.request=null,this.response=null,this.controller=void 0,this.context=null,this.config=null,this.callbacks=null,this.stats=void 0,this.loader=null,this.fetchSetup=e.fetchSetup||rd,this.controller=new self.AbortController,this.stats=new Ks}destroy(){this.loader=this.callbacks=this.context=this.config=this.request=null,this.abortInternal(),this.response=null,this.fetchSetup=this.controller=this.stats=null}abortInternal(){this.controller&&!this.stats.loading.end&&(this.stats.aborted=!0,this.controller.abort())}abort(){var e;this.abortInternal(),(e=this.callbacks)!=null&&e.onAbort&&this.callbacks.onAbort(this.stats,this.context,this.response)}load(e,t,s){const i=this.stats;if(i.loading.start)throw new Error("Loader can only be used once.");i.loading.start=self.performance.now();const n=td(e,this.controller.signal),o=s.onProgress,a=e.responseType==="arraybuffer",l=a?"byteLength":"length",{maxTimeToFirstByteMs:c,maxLoadTimeMs:u}=t.loadPolicy;this.context=e,this.config=t,this.callbacks=s,this.request=this.fetchSetup(e,n),self.clearTimeout(this.requestTimeout),t.timeout=c&&V(c)?c:u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(i,e,this.response)},t.timeout),self.fetch(this.request).then(h=>{this.response=this.loader=h;const d=Math.max(self.performance.now(),i.loading.start);if(self.clearTimeout(this.requestTimeout),t.timeout=u,this.requestTimeout=self.setTimeout(()=>{this.abortInternal(),s.onTimeout(i,e,this.response)},u-(d-i.loading.start)),!h.ok){const{status:g,statusText:f}=h;throw new nd(f||"fetch, bad network response",g,h)}return i.loading.first=d,i.total=id(h.headers)||i.total,o&&V(t.highWaterMark)?this.loadProgressively(h,i,e,t.highWaterMark,o):a?h.arrayBuffer():e.responseType==="json"?h.json():h.text()}).then(h=>{const d=this.response;if(!d)throw new Error("loader destroyed");self.clearTimeout(this.requestTimeout),i.loading.end=Math.max(self.performance.now(),i.loading.first);const g=h[l];g&&(i.loaded=i.total=g);const f={url:d.url,data:h,code:d.status};o&&!V(t.highWaterMark)&&o(i,e,h,d),s.onSuccess(f,i,e,d)}).catch(h=>{if(self.clearTimeout(this.requestTimeout),i.aborted)return;const d=h&&h.code||0,g=h?h.message:null;s.onError({code:d,text:g},e,h?h.details:null,i)})}getCacheAge(){let e=null;if(this.response){const t=this.response.headers.get("age");e=t?parseFloat(t):null}return e}getResponseHeader(e){return this.response?this.response.headers.get(e):null}loadProgressively(e,t,s,i=0,n){const o=new Do,a=e.body.getReader(),l=()=>a.read().then(c=>{if(c.done)return o.dataLength&&n(t,s,o.flush(),e),Promise.resolve(new ArrayBuffer(0));const u=c.value,h=u.length;return t.loaded+=h,h<i||o.dataLength?(o.push(u),o.dataLength>=i&&n(t,s,o.flush(),e)):n(t,s,u,e),l()}).catch(()=>Promise.reject());return l()}}function td(r,e){const t={method:"GET",mode:"cors",credentials:"same-origin",signal:e,headers:new self.Headers(pe({},r.headers))};return r.rangeEnd&&t.headers.set("Range","bytes="+r.rangeStart+"-"+String(r.rangeEnd-1)),t}function sd(r){const e=ed.exec(r);if(e)return parseInt(e[2])-parseInt(e[1])+1}function id(r){const e=r.get("Content-Range");if(e){const s=sd(e);if(V(s))return s}const t=r.get("Content-Length");if(t)return parseInt(t)}function rd(r,e){return new self.Request(r.url,e)}class nd extends Error{constructor(e,t,s){super(e),this.code=void 0,this.details=void 0,this.code=t,this.details=s}}const od=/\s/,ad={newCue(r,e,t,s){const i=[];let n,o,a,l,c;const u=self.VTTCue||self.TextTrackCue;for(let d=0;d<s.rows.length;d++)if(n=s.rows[d],a=!0,l=0,c="",!n.isEmpty()){var h;for(let m=0;m<n.chars.length;m++)od.test(n.chars[m].uchar)&&a?l++:(c+=n.chars[m].uchar,a=!1);n.cueStartTime=e,e===t&&(t+=1e-4),l>=16?l--:l++;const g=Zo(c.trim()),f=hr(e,t,g);r!=null&&(h=r.cues)!=null&&h.getCueById(f)||(o=new u(e,t,g),o.id=f,o.line=d+1,o.align="left",o.position=10+Math.min(80,Math.floor(l*8/32)*10),i.push(o))}return r&&i.length&&(i.sort((d,g)=>d.line==="auto"||g.line==="auto"?0:d.line>8&&g.line>8?g.line-d.line:d.line-g.line),i.forEach(d=>yo(r,d))),i}},ld={maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:null,errorRetry:null},ca=ve(ve({autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,ignoreDevicePixelRatio:!1,preferManagedMediaSource:!0,initialLiveManifestSize:1,maxBufferLength:30,backBufferLength:1/0,frontBufferFlushThreshold:1/0,maxBufferSize:60*1e3*1e3,maxBufferHole:.1,highBufferWatchdogPeriod:2,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveSyncOnStallIncrease:1,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,maxLiveSyncPlaybackRate:1,liveDurationInfinity:!1,liveBackBufferLength:null,maxMaxBufferLength:600,enableWorker:!0,workerPath:null,enableSoftwareAES:!0,startLevel:void 0,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:la,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,licenseResponseCallback:void 0,abrController:Oc,bufferController:Vu,capLevelController:dr,errorController:Lc,fpsController:ph,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrEwmaDefaultEstimateMax:5e6,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,drmSystems:{},drmSystemOptions:{},requestMediaKeySystemAccessFunc:oo,testBandwidth:!0,progressive:!1,lowLatencyMode:!0,cmcd:void 0,enableDateRangeMetadataCues:!0,enableEmsgMetadataCues:!0,enableID3MetadataCues:!0,useMediaCapabilities:!0,certLoadPolicy:{default:ld},keyLoadPolicy:{default:{maxTimeToFirstByteMs:8e3,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"},errorRetry:{maxNumRetry:8,retryDelayMs:1e3,maxRetryDelayMs:2e4,backoff:"linear"}}},manifestLoadPolicy:{default:{maxTimeToFirstByteMs:1/0,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},playlistLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:2,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},fragLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:12e4,timeoutRetry:{maxNumRetry:4,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:6,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},steeringManifestLoadPolicy:{default:{maxTimeToFirstByteMs:1e4,maxLoadTimeMs:2e4,timeoutRetry:{maxNumRetry:2,retryDelayMs:0,maxRetryDelayMs:0},errorRetry:{maxNumRetry:1,retryDelayMs:1e3,maxRetryDelayMs:8e3}}},manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3},cd()),{},{subtitleStreamController:Bu,subtitleTrackController:Gu,timelineController:gh,audioStreamController:Mu,audioTrackController:Nu,emeController:Ut,cmcdController:zh,contentSteeringController:Qh});function cd(){return{cueHandler:ad,enableWebVTT:!0,enableIMSC1:!0,enableCEA708Captions:!0,captionsTextTrack1Label:"English",captionsTextTrack1LanguageCode:"en",captionsTextTrack2Label:"Spanish",captionsTextTrack2LanguageCode:"es",captionsTextTrack3Label:"Unknown CC",captionsTextTrack3LanguageCode:"",captionsTextTrack4Label:"Unknown CC",captionsTextTrack4LanguageCode:"",renderTextTracksNatively:!0}}function ud(r,e,t){if((e.liveSyncDurationCount||e.liveMaxLatencyDurationCount)&&(e.liveSyncDuration||e.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");if(e.liveMaxLatencyDurationCount!==void 0&&(e.liveSyncDurationCount===void 0||e.liveMaxLatencyDurationCount<=e.liveSyncDurationCount))throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be greater than "liveSyncDurationCount"');if(e.liveMaxLatencyDuration!==void 0&&(e.liveSyncDuration===void 0||e.liveMaxLatencyDuration<=e.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be greater than "liveSyncDuration"');const s=Ni(r),i=["manifest","level","frag"],n=["TimeOut","MaxRetry","RetryDelay","MaxRetryTimeout"];return i.forEach(o=>{const a=`${o==="level"?"playlist":o}LoadPolicy`,l=e[a]===void 0,c=[];n.forEach(u=>{const h=`${o}Loading${u}`,d=e[h];if(d!==void 0&&l){c.push(h);const g=s[a].default;switch(e[a]={default:g},u){case"TimeOut":g.maxLoadTimeMs=d,g.maxTimeToFirstByteMs=d;break;case"MaxRetry":g.errorRetry.maxNumRetry=d,g.timeoutRetry.maxNumRetry=d;break;case"RetryDelay":g.errorRetry.retryDelayMs=d,g.timeoutRetry.retryDelayMs=d;break;case"MaxRetryTimeout":g.errorRetry.maxRetryDelayMs=d,g.timeoutRetry.maxRetryDelayMs=d;break}}}),c.length&&t.warn(`hls.js config: "${c.join('", "')}" setting(s) are deprecated, use "${a}": ${JSON.stringify(e[a])}`)}),ve(ve({},s),e)}function Ni(r){return r&&typeof r=="object"?Array.isArray(r)?r.map(Ni):Object.keys(r).reduce((e,t)=>(e[t]=Ni(r[t]),e),{}):r}function hd(r,e){const t=r.loader;t!==In&&t!==la?(e.log("[config]: Custom loader detected, cannot enable progressive streaming"),r.progressive=!1):Jh()&&(r.loader=In,r.progressive=!0,r.enableSoftwareAES=!0,e.log("[config]: Progressive streaming enabled, using FetchLoader"))}class dd extends er{constructor(e,t){super(e,"level-controller"),this._levels=[],this._firstLevel=-1,this._maxAutoLevel=-1,this._startLevel=void 0,this.currentLevel=null,this.currentLevelIndex=-1,this.manualLevelIndex=-1,this.steering=void 0,this.onParsedComplete=void 0,this.steering=t,this._registerListeners()}_registerListeners(){const{hls:e}=this;e.on(y.MANIFEST_LOADING,this.onManifestLoading,this),e.on(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this),e.on(y.ERROR,this.onError,this)}_unregisterListeners(){const{hls:e}=this;e.off(y.MANIFEST_LOADING,this.onManifestLoading,this),e.off(y.MANIFEST_LOADED,this.onManifestLoaded,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this),e.off(y.ERROR,this.onError,this)}destroy(){this._unregisterListeners(),this.steering=null,this.resetLevels(),super.destroy()}stopLoad(){this._levels.forEach(t=>{t.loadError=0,t.fragmentError=0}),super.stopLoad()}resetLevels(){this._startLevel=void 0,this.manualLevelIndex=-1,this.currentLevelIndex=-1,this.currentLevel=null,this._levels=[],this._maxAutoLevel=-1}onManifestLoading(e,t){this.resetLevels()}onManifestLoaded(e,t){const s=this.hls.config.preferManagedMediaSource,i=[],n={},o={};let a=!1,l=!1,c=!1;t.levels.forEach(u=>{var h;const d=u.attrs;let{audioCodec:g,videoCodec:f}=u;g&&(u.audioCodec=g=Os(g,s)||void 0),((h=f)==null?void 0:h.indexOf("avc1"))===0&&(f=u.videoCodec=Nl(f));const{width:m,height:p,unknownCodecs:E}=u;if(a||(a=!!(m&&p)),l||(l=!!f),c||(c=!!g),E!=null&&E.length||g&&!Js(g,"audio",s)||f&&!Js(f,"video",s))return;const{CODECS:x,"FRAME-RATE":T,"HDCP-LEVEL":_,"PATHWAY-ID":A,RESOLUTION:C,"VIDEO-RANGE":L}=d,I=`${`${A||"."}-`}${u.bitrate}-${C}-${T}-${x}-${L}-${_}`;if(n[I])if(n[I].uri!==u.url&&!u.attrs["PATHWAY-ID"]){const R=o[I]+=1;u.attrs["PATHWAY-ID"]=new Array(R+1).join(".");const k=new Gt(u);n[I]=k,i.push(k)}else n[I].addGroupId("audio",d.AUDIO),n[I].addGroupId("text",d.SUBTITLES);else{const R=new Gt(u);n[I]=R,o[I]=1,i.push(R)}}),this.filterAndSortMediaOptions(i,t,a,l,c)}filterAndSortMediaOptions(e,t,s,i,n){let o=[],a=[],l=e;if((s||i)&&n&&(l=l.filter(({videoCodec:f,videoRange:m,width:p,height:E})=>(!!f||!!(p&&E))&&hc(m))),l.length===0){Promise.resolve().then(()=>{if(this.hls){t.levels.length&&this.warn(`One or more CODECS in variant not supported: ${JSON.stringify(t.levels[0].attrs)}`);const f=new Error("no level with compatible codecs found in manifest");this.hls.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:t.url,error:f,reason:f.message})}});return}if(t.audioTracks){const{preferManagedMediaSource:f}=this.hls.config;o=t.audioTracks.filter(m=>!m.audioCodec||Js(m.audioCodec,"audio",f)),Dn(o)}t.subtitles&&(a=t.subtitles,Dn(a));const c=l.slice(0);l.sort((f,m)=>{if(f.attrs["HDCP-LEVEL"]!==m.attrs["HDCP-LEVEL"])return(f.attrs["HDCP-LEVEL"]||"")>(m.attrs["HDCP-LEVEL"]||"")?1:-1;if(s&&f.height!==m.height)return f.height-m.height;if(f.frameRate!==m.frameRate)return f.frameRate-m.frameRate;if(f.videoRange!==m.videoRange)return Ms.indexOf(f.videoRange)-Ms.indexOf(m.videoRange);if(f.videoCodec!==m.videoCodec){const p=kr(f.videoCodec),E=kr(m.videoCodec);if(p!==E)return E-p}if(f.uri===m.uri&&f.codecSet!==m.codecSet){const p=Fs(f.codecSet),E=Fs(m.codecSet);if(p!==E)return E-p}return f.averageBitrate!==m.averageBitrate?f.averageBitrate-m.averageBitrate:0});let u=c[0];if(this.steering&&(l=this.steering.filterParsedLevels(l),l.length!==c.length)){for(let f=0;f<c.length;f++)if(c[f].pathwayId===l[0].pathwayId){u=c[f];break}}this._levels=l;for(let f=0;f<l.length;f++)if(l[f]===u){var h;this._firstLevel=f;const m=u.bitrate,p=this.hls.bandwidthEstimate;if(this.log(`manifest loaded, ${l.length} level(s) found, first bitrate: ${m}`),((h=this.hls.userConfig)==null?void 0:h.abrEwmaDefaultEstimate)===void 0){const E=Math.min(m,this.hls.config.abrEwmaDefaultEstimateMax);E>p&&p===ca.abrEwmaDefaultEstimate&&(this.hls.bandwidthEstimate=E)}break}const d=n&&!i,g={levels:l,audioTracks:o,subtitleTracks:a,sessionData:t.sessionData,sessionKeys:t.sessionKeys,firstLevel:this._firstLevel,stats:t.stats,audio:n,video:i,altAudio:!d&&o.some(f=>!!f.url)};this.hls.trigger(y.MANIFEST_PARSED,g),(this.hls.config.autoStartLoad||this.hls.forceStartLoad)&&this.hls.startLoad(this.hls.config.startPosition)}get levels(){return this._levels.length===0?null:this._levels}get level(){return this.currentLevelIndex}set level(e){const t=this._levels;if(t.length===0)return;if(e<0||e>=t.length){const u=new Error("invalid level idx"),h=e<0;if(this.hls.trigger(y.ERROR,{type:Y.OTHER_ERROR,details:D.LEVEL_SWITCH_ERROR,level:e,fatal:h,error:u,reason:u.message}),h)return;e=Math.min(e,t.length-1)}const s=this.currentLevelIndex,i=this.currentLevel,n=i?i.attrs["PATHWAY-ID"]:void 0,o=t[e],a=o.attrs["PATHWAY-ID"];if(this.currentLevelIndex=e,this.currentLevel=o,s===e&&o.details&&i&&n===a)return;this.log(`Switching to level ${e} (${o.height?o.height+"p ":""}${o.videoRange?o.videoRange+" ":""}${o.codecSet?o.codecSet+" ":""}@${o.bitrate})${a?" with Pathway "+a:""} from level ${s}${n?" with Pathway "+n:""}`);const l={level:e,attrs:o.attrs,details:o.details,bitrate:o.bitrate,averageBitrate:o.averageBitrate,maxBitrate:o.maxBitrate,realBitrate:o.realBitrate,width:o.width,height:o.height,codecSet:o.codecSet,audioCodec:o.audioCodec,videoCodec:o.videoCodec,audioGroups:o.audioGroups,subtitleGroups:o.subtitleGroups,loaded:o.loaded,loadError:o.loadError,fragmentError:o.fragmentError,name:o.name,id:o.id,uri:o.uri,url:o.url,urlId:0,audioGroupIds:o.audioGroupIds,textGroupIds:o.textGroupIds};this.hls.trigger(y.LEVEL_SWITCHING,l);const c=o.details;if(!c||c.live){const u=this.switchParams(o.uri,i==null?void 0:i.details,c);this.loadPlaylist(u)}}get manualLevel(){return this.manualLevelIndex}set manualLevel(e){this.manualLevelIndex=e,this._startLevel===void 0&&(this._startLevel=e),e!==-1&&(this.level=e)}get firstLevel(){return this._firstLevel}set firstLevel(e){this._firstLevel=e}get startLevel(){if(this._startLevel===void 0){const e=this.hls.config.startLevel;return e!==void 0?e:this.hls.firstAutoLevel}return this._startLevel}set startLevel(e){this._startLevel=e}get pathwayPriority(){return this.steering?this.steering.pathwayPriority:null}set pathwayPriority(e){if(this.steering){const t=this.steering.pathways(),s=e.filter(i=>t.indexOf(i)!==-1);if(e.length<1){this.warn(`pathwayPriority ${e} should contain at least one pathway from list: ${t}`);return}this.steering.pathwayPriority=s}}onError(e,t){t.fatal||!t.context||t.context.type===re.LEVEL&&t.context.level===this.level&&this.checkRetry(t)}onFragBuffered(e,{frag:t}){if(t!==void 0&&t.type===H.MAIN){const s=t.elementaryStreams;if(!Object.keys(s).some(n=>!!s[n]))return;const i=this._levels[t.level];i!=null&&i.loadError&&(this.log(`Resetting level error count of ${i.loadError} on frag buffered`),i.loadError=0)}}onLevelLoaded(e,t){var s;const{level:i,details:n}=t,o=this._levels[i];if(!o){var a;this.warn(`Invalid level index ${i}`),(a=t.deliveryDirectives)!=null&&a.skip&&(n.deltaUpdateFailed=!0);return}if(i===this.currentLevelIndex){o.fragmentError===0&&(o.loadError=0);let l=o.details;l===t.details&&l.advanced&&(l=void 0),this.playlistLoaded(i,t,l)}else(s=t.deliveryDirectives)!=null&&s.skip&&(n.deltaUpdateFailed=!0)}loadPlaylist(e){super.loadPlaylist();const t=this.currentLevelIndex,s=this.currentLevel;if(s&&this.shouldLoadPlaylist(s)){let i=s.uri;if(e)try{i=e.addDirectives(i)}catch(o){this.warn(`Could not construct new URL with HLS Delivery Directives: ${o}`)}const n=s.attrs["PATHWAY-ID"];this.log(`Loading level index ${t}${(e==null?void 0:e.msn)!==void 0?" at sn "+e.msn+" part "+e.part:""} with${n?" Pathway "+n:""} ${i}`),this.clearTimer(),this.hls.trigger(y.LEVEL_LOADING,{url:i,level:t,pathwayId:s.attrs["PATHWAY-ID"],id:0,deliveryDirectives:e||null})}}get nextLoadLevel(){return this.manualLevelIndex!==-1?this.manualLevelIndex:this.hls.nextAutoLevel}set nextLoadLevel(e){this.level=e,this.manualLevelIndex===-1&&(this.hls.nextAutoLevel=e)}removeLevel(e){var t;const s=this._levels.filter((i,n)=>n!==e?!0:(this.steering&&this.steering.removeLevel(i),i===this.currentLevel&&(this.currentLevel=null,this.currentLevelIndex=-1,i.details&&i.details.fragments.forEach(o=>o.level=-1)),!1));bo(s),this._levels=s,this.currentLevelIndex>-1&&(t=this.currentLevel)!=null&&t.details&&(this.currentLevelIndex=this.currentLevel.details.fragments[0].level),this.hls.trigger(y.LEVELS_UPDATED,{levels:s})}onLevelsUpdated(e,{levels:t}){this._levels=t}checkMaxAutoUpdated(){const{autoLevelCapping:e,maxAutoLevel:t,maxHdcpLevel:s}=this.hls;this._maxAutoLevel!==t&&(this._maxAutoLevel=t,this.hls.trigger(y.MAX_AUTO_LEVEL_UPDATED,{autoLevelCapping:e,levels:this.levels,maxAutoLevel:t,minAutoLevel:this.hls.minAutoLevel,maxHdcpLevel:s}))}}function Dn(r){const e={};r.forEach(t=>{const s=t.groupId||"";t.id=e[s]=e[s]||0,e[s]++})}class fd{constructor(e){this.config=void 0,this.keyUriToKeyInfo={},this.emeController=null,this.config=e}abort(e){for(const s in this.keyUriToKeyInfo){const i=this.keyUriToKeyInfo[s].loader;if(i){var t;if(e&&e!==((t=i.context)==null?void 0:t.frag.type))return;i.abort()}}}detach(){for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e];(t.mediaKeySessionContext||t.decryptdata.isCommonEncryption)&&delete this.keyUriToKeyInfo[e]}}destroy(){this.detach();for(const e in this.keyUriToKeyInfo){const t=this.keyUriToKeyInfo[e].loader;t&&t.destroy()}this.keyUriToKeyInfo={}}createKeyLoadError(e,t=D.KEY_LOAD_ERROR,s,i,n){return new at({type:Y.NETWORK_ERROR,details:t,fatal:!1,frag:e,response:n,error:s,networkDetails:i})}loadClear(e,t){if(this.emeController&&this.config.emeEnabled){const{sn:s,cc:i}=e;for(let n=0;n<t.length;n++){const o=t[n];if(i<=o.cc&&(s==="initSegment"||o.sn==="initSegment"||s<o.sn)){this.emeController.selectKeySystemFormat(o).then(a=>{o.setKeyFormat(a)});break}}}}load(e){return!e.decryptdata&&e.encrypted&&this.emeController?this.emeController.selectKeySystemFormat(e).then(t=>this.loadInternal(e,t)):this.loadInternal(e)}loadInternal(e,t){var s,i;t&&e.setKeyFormat(t);const n=e.decryptdata;if(!n){const c=new Error(t?`Expected frag.decryptdata to be defined after setting format ${t}`:"Missing decryption data on fragment in onKeyLoading");return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,c))}const o=n.uri;if(!o)return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error(`Invalid key URI: "${o}"`)));let a=this.keyUriToKeyInfo[o];if((s=a)!=null&&s.decryptdata.key)return n.key=a.decryptdata.key,Promise.resolve({frag:e,keyInfo:a});if((i=a)!=null&&i.keyLoadPromise){var l;switch((l=a.mediaKeySessionContext)==null?void 0:l.keyStatus){case void 0:case"status-pending":case"usable":case"usable-in-future":return a.keyLoadPromise.then(c=>(n.key=c.keyInfo.decryptdata.key,{frag:e,keyInfo:a}))}}switch(a=this.keyUriToKeyInfo[o]={decryptdata:n,keyLoadPromise:null,loader:null,mediaKeySessionContext:null},n.method){case"ISO-23001-7":case"SAMPLE-AES":case"SAMPLE-AES-CENC":case"SAMPLE-AES-CTR":return n.keyFormat==="identity"?this.loadKeyHTTP(a,e):this.loadKeyEME(a,e);case"AES-128":case"AES-256":case"AES-256-CTR":return this.loadKeyHTTP(a,e);default:return Promise.reject(this.createKeyLoadError(e,D.KEY_LOAD_ERROR,new Error(`Key supplied with unsupported METHOD: "${n.method}"`)))}}loadKeyEME(e,t){const s={frag:t,keyInfo:e};if(this.emeController&&this.config.emeEnabled){const i=this.emeController.loadKey(s);if(i)return(e.keyLoadPromise=i.then(n=>(e.mediaKeySessionContext=n,s))).catch(n=>{throw e.keyLoadPromise=null,n})}return Promise.resolve(s)}loadKeyHTTP(e,t){const s=this.config,i=s.loader,n=new i(s);return t.keyLoader=e.loader=n,e.keyLoadPromise=new Promise((o,a)=>{const l={keyInfo:e,frag:t,responseType:"arraybuffer",url:e.decryptdata.uri},c=s.keyLoadPolicy.default,u={loadPolicy:c,timeout:c.maxLoadTimeMs,maxRetry:0,retryDelay:0,maxRetryDelay:0},h={onSuccess:(d,g,f,m)=>{const{frag:p,keyInfo:E,url:x}=f;if(!p.decryptdata||E!==this.keyUriToKeyInfo[x])return a(this.createKeyLoadError(p,D.KEY_LOAD_ERROR,new Error("after key load, decryptdata unset or changed"),m));E.decryptdata.key=p.decryptdata.key=new Uint8Array(d.data),p.keyLoader=null,E.loader=null,o({frag:p,keyInfo:E})},onError:(d,g,f,m)=>{this.resetLoader(g),a(this.createKeyLoadError(t,D.KEY_LOAD_ERROR,new Error(`HTTP Error ${d.code} loading key ${d.text}`),f,ve({url:l.url,data:void 0},d)))},onTimeout:(d,g,f)=>{this.resetLoader(g),a(this.createKeyLoadError(t,D.KEY_LOAD_TIMEOUT,new Error("key loading timed out"),f))},onAbort:(d,g,f)=>{this.resetLoader(g),a(this.createKeyLoadError(t,D.INTERNAL_ABORTED,new Error("key loading aborted"),f))}};n.load(l,u,h)})}resetLoader(e){const{frag:t,keyInfo:s,url:i}=e,n=s.loader;t.keyLoader===n&&(t.keyLoader=null,s.loader=null),delete this.keyUriToKeyInfo[i],n&&n.destroy()}}function ua(){return self.SourceBuffer||self.WebKitSourceBuffer}function ha(){if(!pt())return!1;const e=ua();return!e||e.prototype&&typeof e.prototype.appendBuffer=="function"&&typeof e.prototype.remove=="function"}function gd(){if(!ha())return!1;const r=pt();return typeof(r==null?void 0:r.isTypeSupported)=="function"&&(["avc1.42E01E,mp4a.40.2","av01.0.01M.08","vp09.00.50.08"].some(e=>r.isTypeSupported(Jt(e,"video")))||["mp4a.40.2","fLaC"].some(e=>r.isTypeSupported(Jt(e,"audio"))))}function md(){var r;const e=ua();return typeof(e==null||(r=e.prototype)==null?void 0:r.changeType)=="function"}const pd=250,bs=2,yd=.1,Ed=.05;class Td extends yt{constructor(e,t,s,i){super("gap-controller",i.logger),this.config=void 0,this.media=null,this.fragmentTracker=void 0,this.hls=void 0,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1,this.ended=0,this.config=e,this.media=t,this.fragmentTracker=s,this.hls=i}destroy(){this.media=null,this.hls=this.fragmentTracker=null}poll(e,t,s,i){const{config:n,media:o,stalled:a}=this;if(o===null)return;const{currentTime:l,seeking:c}=o,u=this.seeking&&!c,h=!this.seeking&&c;if(this.seeking=c,l!==e){if(this.ended=0,this.moved=!0,c||(this.nudgeRetry=0),a!==null){if(this.stallReported){const E=self.performance.now()-a;this.warn(`playback not stuck anymore @${l}, after ${Math.round(E)}ms`),this.stallReported=!1}this.stalled=null}return}if(h||u){this.stalled=null;return}if(o.paused&&!c||o.ended||o.playbackRate===0||!ue.getBuffered(o).length){this.nudgeRetry=0;return}const d=ue.bufferInfo(o,l,0),g=d.nextStart||0;if(c){const E=d.len>bs,x=!g||t&&t.start<=l||g-l>bs&&!this.fragmentTracker.getPartialFragment(l);if(E||x)return;this.moved=!1}if(!this.moved&&this.stalled!==null){if(!(d.len>0)&&!g)return;const x=Math.max(g,d.start||0)-l,_=!!(s!=null&&s.live)?s.targetduration*2:bs,A=this.fragmentTracker.getPartialFragment(l);if(x>0&&(x<=_||A)){o.paused||this._trySkipBufferHole(A);return}}const f=self.performance.now();if(a===null){this.stalled=f;return}const m=f-a;if(!c&&m>=pd){if(i===w.ENDED&&!(s!=null&&s.live)&&Math.abs(l-((s==null?void 0:s.edge)||0))<1){if(m<1e3||this.ended)return;this.ended=l,this.hls.trigger(y.MEDIA_ENDED,{stalled:!0});return}if(this._reportStall(d),!this.media)return}const p=ue.bufferInfo(o,l,n.maxBufferHole);this._tryFixBufferStall(p,m)}_tryFixBufferStall(e,t){const{config:s,fragmentTracker:i,media:n}=this;if(n===null)return;const o=n.currentTime,a=i.getPartialFragment(o);a&&(this._trySkipBufferHole(a)||!this.media)||(e.len>s.maxBufferHole||e.nextStart&&e.nextStart-o<s.maxBufferHole)&&t>s.highBufferWatchdogPeriod*1e3&&(this.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this._tryNudgeBuffer())}_reportStall(e){const{hls:t,media:s,stallReported:i}=this;if(!i&&s){this.stallReported=!0;const n=new Error(`Playback stalling at @${s.currentTime} due to low buffer (${JSON.stringify(e)})`);this.warn(n.message),t.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,fatal:!1,error:n,buffer:e.len})}}_trySkipBufferHole(e){const{config:t,hls:s,media:i}=this;if(i===null)return 0;const n=i.currentTime,o=ue.bufferInfo(i,n,0),a=n<o.start?o.start:o.nextStart;if(a){const l=o.len<=t.maxBufferHole,c=o.len>0&&o.len<1&&i.readyState<3,u=a-n;if(u>0&&(l||c)){if(u>t.maxBufferHole){const{fragmentTracker:d}=this;let g=!1;if(n===0){const f=d.getAppendedFrag(0,H.MAIN);f&&a<f.end&&(g=!0)}if(!g){const f=e||d.getAppendedFrag(n,H.MAIN);if(f){let m=!1,p=f.end;for(;p<a;){const E=d.getPartialFragment(p);if(E)p+=E.duration;else{m=!0;break}}if(m)return 0}}}const h=Math.max(a+Ed,n+yd);if(this.warn(`skipping hole, adjusting currentTime from ${n} to ${h}`),this.moved=!0,this.stalled=null,i.currentTime=h,e&&!e.gap){const d=new Error(`fragment loaded with buffer holes, seeking from ${n} to ${h}`);s.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_SEEK_OVER_HOLE,fatal:!1,error:d,reason:d.message,frag:e})}return h}}return 0}_tryNudgeBuffer(){const{config:e,hls:t,media:s,nudgeRetry:i}=this;if(s===null)return;const n=s.currentTime;if(this.nudgeRetry++,i<e.nudgeMaxRetry){const o=n+(i+1)*e.nudgeOffset,a=new Error(`Nudging 'currentTime' from ${n} to ${o}`);this.warn(a.message),s.currentTime=o,t.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_NUDGE_ON_STALL,error:a,fatal:!1})}else{const o=new Error(`Playhead still not moving while enough data buffered @${n} after ${e.nudgeMaxRetry} nudges`);this.error(o.message),t.trigger(y.ERROR,{type:Y.MEDIA_ERROR,details:D.BUFFER_STALLED_ERROR,error:o,fatal:!0})}}}const xd=100;class Sd extends ir{constructor(e,t,s){super(e,t,s,"stream-controller",H.MAIN),this.audioCodecSwap=!1,this.gapController=null,this.level=-1,this._forceStartLoad=!1,this.altAudio=!1,this.audioOnly=!1,this.fragPlaying=null,this.fragLastKbps=0,this.couldBacktrack=!1,this.backtrackFragment=null,this.audioCodecSwitch=!1,this.videoBuffer=null,this.onMediaPlaying=()=>{this.tick()},this.onMediaSeeked=()=>{const i=this.media,n=i?i.currentTime:null;V(n)&&this.log(`Media seeked to ${n.toFixed(3)}`);const o=this.getMainFwdBufferInfo();if(o===null||o.len===0){this.warn(`Main forward buffer length on "seeked" event ${o?o.len:"empty"})`);return}this.tick()},this.registerListeners()}registerListeners(){super.registerListeners();const{hls:e}=this;e.on(y.MANIFEST_PARSED,this.onManifestParsed,this),e.on(y.LEVEL_LOADING,this.onLevelLoading,this),e.on(y.LEVEL_LOADED,this.onLevelLoaded,this),e.on(y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.on(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.on(y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.on(y.BUFFER_CREATED,this.onBufferCreated,this),e.on(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.on(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.on(y.FRAG_BUFFERED,this.onFragBuffered,this)}unregisterListeners(){super.unregisterListeners();const{hls:e}=this;e.off(y.MANIFEST_PARSED,this.onManifestParsed,this),e.off(y.LEVEL_LOADED,this.onLevelLoaded,this),e.off(y.FRAG_LOAD_EMERGENCY_ABORTED,this.onFragLoadEmergencyAborted,this),e.off(y.AUDIO_TRACK_SWITCHING,this.onAudioTrackSwitching,this),e.off(y.AUDIO_TRACK_SWITCHED,this.onAudioTrackSwitched,this),e.off(y.BUFFER_CREATED,this.onBufferCreated,this),e.off(y.BUFFER_FLUSHED,this.onBufferFlushed,this),e.off(y.LEVELS_UPDATED,this.onLevelsUpdated,this),e.off(y.FRAG_BUFFERED,this.onFragBuffered,this)}onHandlerDestroying(){this.onMediaPlaying=this.onMediaSeeked=null,this.unregisterListeners(),super.onHandlerDestroying()}startLoad(e){if(this.levels){const{lastCurrentTime:t,hls:s}=this;if(this.stopLoad(),this.setInterval(xd),this.level=-1,!this.startFragRequested){let i=s.startLevel;i===-1&&(s.config.testBandwidth&&this.levels.length>1?(i=0,this.bitrateTest=!0):i=s.firstAutoLevel),s.nextLoadLevel=i,this.level=s.loadLevel,this.loadedmetadata=!1}t>0&&e===-1&&(this.log(`Override startPosition with lastCurrentTime @${t.toFixed(3)}`),e=t),this.state=w.IDLE,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=e,this.tick()}else this._forceStartLoad=!0,this.state=w.STOPPED}stopLoad(){this._forceStartLoad=!1,super.stopLoad()}doTick(){switch(this.state){case w.WAITING_LEVEL:{const{levels:t,level:s}=this,i=t==null?void 0:t[s],n=i==null?void 0:i.details;if(n&&(!n.live||this.levelLastLoaded===i)){if(this.waitForCdnTuneIn(n))break;this.state=w.IDLE;break}else if(this.hls.nextLoadLevel!==this.level){this.state=w.IDLE;break}break}case w.FRAG_LOADING_WAITING_RETRY:{var e;const t=self.performance.now(),s=this.retryDate;if(!s||t>=s||(e=this.media)!=null&&e.seeking){const{levels:i,level:n}=this,o=i==null?void 0:i[n];this.resetStartWhenNotLoaded(o||null),this.state=w.IDLE}}break}this.state===w.IDLE&&this.doTickIdle(),this.onTickEnd()}onTickEnd(){super.onTickEnd(),this.checkBuffer(),this.checkFragmentChanged()}doTickIdle(){if(!this.buffering)return;const{hls:e,levelLastLoaded:t,levels:s,media:i}=this;if(t===null||!i&&(this.startFragRequested||!e.config.startFragPrefetch)||this.altAudio&&this.audioOnly)return;const n=e.nextLoadLevel;if(!(s!=null&&s[n]))return;const o=s[n],a=this.getMainFwdBufferInfo();if(a===null)return;const l=this.getLevelDetails();if(l&&this._streamEnded(a,l)){const m={};this.altAudio&&(m.type="video"),this.hls.trigger(y.BUFFER_EOS,m),this.state=w.ENDED;return}e.loadLevel!==n&&e.manualLevel===-1&&this.log(`Adapting to level ${n} from level ${this.level}`),this.level=e.nextLoadLevel=n;const c=o.details;if(!c||this.state===w.WAITING_LEVEL||c.live&&this.levelLastLoaded!==o){this.level=n,this.state=w.WAITING_LEVEL;return}const u=a.len,h=this.getMaxBufferLength(o.maxBitrate);if(u>=h)return;this.backtrackFragment&&this.backtrackFragment.start>a.end&&(this.backtrackFragment=null);const d=this.backtrackFragment?this.backtrackFragment.start:a.end;let g=this.getNextFragment(d,c);if(this.couldBacktrack&&!this.fragPrevious&&g&&g.sn!=="initSegment"&&this.fragmentTracker.getState(g)!==Te.OK){var f;const p=((f=this.backtrackFragment)!=null?f:g).sn-c.startSN,E=c.fragments[p-1];E&&g.cc===E.cc&&(g=E,this.fragmentTracker.removeFragment(E))}else this.backtrackFragment&&a.len&&(this.backtrackFragment=null);if(g&&this.isLoopLoading(g,d)){if(!g.gap){const p=this.audioOnly&&!this.altAudio?ce.AUDIO:ce.VIDEO,E=(p===ce.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;E&&this.afterBufferFlushed(E,p,H.MAIN)}g=this.getNextFragmentLoopLoading(g,c,a,H.MAIN,h)}g&&(g.initSegment&&!g.initSegment.data&&!this.bitrateTest&&(g=g.initSegment),this.loadFragment(g,o,d))}loadFragment(e,t,s){const i=this.fragmentTracker.getState(e);i===Te.NOT_LOADED||i===Te.PARTIAL?e.sn==="initSegment"?this._loadInitSegment(e,t):this.bitrateTest?(this.log(`Fragment ${e.sn} of level ${e.level} is being downloaded to test bitrate and will not be buffered`),this._loadBitrateTestFrag(e,t)):super.loadFragment(e,t,s):this.clearTrackerIfNeeded(e)}getBufferedFrag(e){return this.fragmentTracker.getBufferedFrag(e,H.MAIN)}followingBufferedFrag(e){return e?this.getBufferedFrag(e.end+.5):null}immediateLevelSwitch(){this.abortCurrentFrag(),this.flushMainBuffer(0,Number.POSITIVE_INFINITY)}nextLevelSwitch(){const{levels:e,media:t}=this;if(t!=null&&t.readyState){let s;const i=this.getAppendedFrag(t.currentTime);i&&i.start>1&&this.flushMainBuffer(0,i.start-1);const n=this.getLevelDetails();if(n!=null&&n.live){const a=this.getMainFwdBufferInfo();if(!a||a.len<n.targetduration*2)return}if(!t.paused&&e){const a=this.hls.nextLoadLevel,l=e[a],c=this.fragLastKbps;c&&this.fragCurrent?s=this.fragCurrent.duration*l.maxBitrate/(1e3*c)+1:s=0}else s=0;const o=this.getBufferedFrag(t.currentTime+s);if(o){const a=this.followingBufferedFrag(o);if(a){this.abortCurrentFrag();const l=a.maxStartPTS?a.maxStartPTS:a.start,c=a.duration,u=Math.max(o.end,l+Math.min(Math.max(c-this.config.maxFragLookUpTolerance,c*(this.couldBacktrack?.5:.125)),c*(this.couldBacktrack?.75:.25)));this.flushMainBuffer(u,Number.POSITIVE_INFINITY)}}}}abortCurrentFrag(){const e=this.fragCurrent;switch(this.fragCurrent=null,this.backtrackFragment=null,e&&(e.abortRequests(),this.fragmentTracker.removeFragment(e)),this.state){case w.KEY_LOADING:case w.FRAG_LOADING:case w.FRAG_LOADING_WAITING_RETRY:case w.PARSING:case w.PARSED:this.state=w.IDLE;break}this.nextLoadPosition=this.getLoadPosition()}flushMainBuffer(e,t){super.flushMainBuffer(e,t,this.altAudio?"video":null)}onMediaAttached(e,t){super.onMediaAttached(e,t);const s=t.media;s.addEventListener("playing",this.onMediaPlaying),s.addEventListener("seeked",this.onMediaSeeked),this.gapController=new Td(this.config,s,this.fragmentTracker,this.hls)}onMediaDetaching(){const{media:e}=this;e&&(e.removeEventListener("playing",this.onMediaPlaying),e.removeEventListener("seeked",this.onMediaSeeked)),this.videoBuffer=null,this.fragPlaying=null,this.gapController&&(this.gapController.destroy(),this.gapController=null),super.onMediaDetaching()}onManifestLoading(){super.onManifestLoading(),this.log("Trigger BUFFER_RESET"),this.hls.trigger(y.BUFFER_RESET,void 0),this.couldBacktrack=!1,this.fragLastKbps=0,this.fragPlaying=this.backtrackFragment=null,this.altAudio=this.audioOnly=!1}onManifestParsed(e,t){let s=!1,i=!1;t.levels.forEach(n=>{const o=n.audioCodec;o&&(s=s||o.indexOf("mp4a.40.2")!==-1,i=i||o.indexOf("mp4a.40.5")!==-1)}),this.audioCodecSwitch=s&&i&&!md(),this.audioCodecSwitch&&this.log("Both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.levels=t.levels,this.startFragRequested=!1}onLevelLoading(e,t){const{levels:s}=this;if(!s||this.state!==w.IDLE)return;const i=s[t.level];(!i.details||i.details.live&&this.levelLastLoaded!==i||this.waitForCdnTuneIn(i.details))&&(this.state=w.WAITING_LEVEL)}onLevelLoaded(e,t){var s;const{levels:i}=this,n=t.level,o=t.details,a=o.totalduration;if(!i){this.warn(`Levels were reset while loading level ${n}`);return}this.log(`Level ${n} loaded [${o.startSN},${o.endSN}]${o.lastPartSn?`[part-${o.lastPartSn}-${o.lastPartIndex}]`:""}, cc [${o.startCC}, ${o.endCC}] duration:${a}`);const l=i[n],c=this.fragCurrent;c&&(this.state===w.FRAG_LOADING||this.state===w.FRAG_LOADING_WAITING_RETRY)&&c.level!==t.level&&c.loader&&this.abortCurrentFrag();let u=0;if(o.live||(s=l.details)!=null&&s.live){var h;if(this.checkLiveUpdate(o),o.deltaUpdateFailed)return;u=this.alignPlaylists(o,l.details,(h=this.levelLastLoaded)==null?void 0:h.details)}if(l.details=o,this.levelLastLoaded=l,this.hls.trigger(y.LEVEL_UPDATED,{details:o,level:n}),this.state===w.WAITING_LEVEL){if(this.waitForCdnTuneIn(o))return;this.state=w.IDLE}this.startFragRequested?o.live&&this.synchronizeToLiveEdge(o):this.setStartPosition(o,u),this.tick()}_handleFragmentLoadProgress(e){var t;const s=e.frag,{part:i,payload:n}=e,{levels:o}=this;if(!o){this.warn(`Levels were reset while fragment load was in progress. Fragment ${s.sn} of level ${s.level} will not be buffered`);return}const a=o[s.level],l=a.details;if(!l){this.warn(`Dropping fragment ${s.sn} of level ${s.level} after level details were reset`),this.fragmentTracker.removeFragment(s);return}const c=a.videoCodec,u=l.PTSKnown||!l.live,h=(t=s.initSegment)==null?void 0:t.data,d=this._getAudioCodec(a),g=this.transmuxer=this.transmuxer||new Yo(this.hls,H.MAIN,this._handleTransmuxComplete.bind(this),this._handleTransmuxerFlush.bind(this)),f=i?i.index:-1,m=f!==-1,p=new tr(s.level,s.sn,s.stats.chunkCount,n.byteLength,f,m),E=this.initPTS[s.cc];g.push(n,h,d,c,s,i,l.totalduration,u,p,E)}onAudioTrackSwitching(e,t){const s=this.altAudio;if(!!!t.url){if(this.mediaBuffer!==this.media){this.log("Switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;const o=this.fragCurrent;o&&(this.log("Switching to main audio track, cancel main fragment load"),o.abortRequests(),this.fragmentTracker.removeFragment(o)),this.resetTransmuxer(),this.resetLoadingState()}else this.audioOnly&&this.resetTransmuxer();const n=this.hls;s&&(n.trigger(y.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:null}),this.fragmentTracker.removeAllFragments()),n.trigger(y.AUDIO_TRACK_SWITCHED,t)}}onAudioTrackSwitched(e,t){const s=t.id,i=!!this.hls.audioTracks[s].url;if(i){const n=this.videoBuffer;n&&this.mediaBuffer!==n&&(this.log("Switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=n)}this.altAudio=i,this.tick()}onBufferCreated(e,t){const s=t.tracks;let i,n,o=!1;for(const a in s){const l=s[a];if(l.id==="main"){if(n=a,i=l,a==="video"){const c=s[a];c&&(this.videoBuffer=c.buffer)}}else o=!0}o&&i?(this.log(`Alternate track found, use ${n}.buffered to schedule main fragment loading`),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media}onFragBuffered(e,t){const{frag:s,part:i}=t;if(s&&s.type!==H.MAIN)return;if(this.fragContextChanged(s)){this.warn(`Fragment ${s.sn}${i?" p: "+i.index:""} of level ${s.level} finished buffering, but was aborted. state: ${this.state}`),this.state===w.PARSED&&(this.state=w.IDLE);return}const n=i?i.stats:s.stats;this.fragLastKbps=Math.round(8*n.total/(n.buffering.end-n.loading.first)),s.sn!=="initSegment"&&(this.fragPrevious=s),this.fragBufferedComplete(s,i)}onError(e,t){var s;if(t.fatal){this.state=w.ERROR;return}switch(t.details){case D.FRAG_GAP:case D.FRAG_PARSING_ERROR:case D.FRAG_DECRYPT_ERROR:case D.FRAG_LOAD_ERROR:case D.FRAG_LOAD_TIMEOUT:case D.KEY_LOAD_ERROR:case D.KEY_LOAD_TIMEOUT:this.onFragmentOrKeyLoadError(H.MAIN,t);break;case D.LEVEL_LOAD_ERROR:case D.LEVEL_LOAD_TIMEOUT:case D.LEVEL_PARSING_ERROR:!t.levelRetry&&this.state===w.WAITING_LEVEL&&((s=t.context)==null?void 0:s.type)===re.LEVEL&&(this.state=w.IDLE);break;case D.BUFFER_APPEND_ERROR:case D.BUFFER_FULL_ERROR:if(!t.parent||t.parent!=="main")return;if(t.details===D.BUFFER_APPEND_ERROR){this.resetLoadingState();return}this.reduceLengthAndFlushBuffer(t)&&this.flushMainBuffer(0,Number.POSITIVE_INFINITY);break;case D.INTERNAL_EXCEPTION:this.recoverWorkerError(t);break}}checkBuffer(){const{media:e,gapController:t}=this;if(!(!e||!t||!e.readyState)){if(this.loadedmetadata||!ue.getBuffered(e).length){const s=this.state,i=s!==w.IDLE?this.fragCurrent:null,n=this.getLevelDetails();t.poll(this.lastCurrentTime,i,n,s)}this.lastCurrentTime=e.currentTime}}onFragLoadEmergencyAborted(){this.state=w.IDLE,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.lastCurrentTime),this.tickImmediate()}onBufferFlushed(e,{type:t}){if(t!==ce.AUDIO||this.audioOnly&&!this.altAudio){const s=(t===ce.VIDEO?this.videoBuffer:this.mediaBuffer)||this.media;this.afterBufferFlushed(s,t,H.MAIN),this.tick()}}onLevelsUpdated(e,t){this.level>-1&&this.fragCurrent&&(this.level=this.fragCurrent.level),this.levels=t.levels}swapAudioCodec(){this.audioCodecSwap=!this.audioCodecSwap}seekToStartPos(){const{media:e}=this;if(!e)return;const t=e.currentTime;let s=this.startPosition;if(s>=0&&t<s){if(e.seeking){this.log(`could not seek to ${s}, already seeking at ${t}`);return}const i=ue.getBuffered(e),o=(i.length?i.start(0):0)-s;o>0&&(o<this.config.maxBufferHole||o<this.config.maxFragLookUpTolerance)&&(this.log(`adjusting start position by ${o} to match buffer start`),s+=o,this.startPosition=s),this.log(`seek to target start position ${s} from current time ${t}`),e.currentTime=s}}_getAudioCodec(e){let t=this.config.defaultAudioCodec||e.audioCodec;return this.audioCodecSwap&&t&&(this.log("Swapping audio codec"),t.indexOf("mp4a.40.5")!==-1?t="mp4a.40.2":t="mp4a.40.5"),t}_loadBitrateTestFrag(e,t){e.bitrateTest=!0,this._doFragLoad(e,t).then(s=>{const{hls:i}=this;if(!s||this.fragContextChanged(e))return;t.fragmentError=0,this.state=w.IDLE,this.startFragRequested=!1,this.bitrateTest=!1;const n=e.stats;n.parsing.start=n.parsing.end=n.buffering.start=n.buffering.end=self.performance.now(),i.trigger(y.FRAG_LOADED,s),e.bitrateTest=!1})}_handleTransmuxComplete(e){var t;const s=this.playlistType,{hls:i}=this,{remuxResult:n,chunkMeta:o}=e,a=this.getCurrentContext(o);if(!a){this.resetWhenMissingContext(o);return}const{frag:l,part:c,level:u}=a,{video:h,text:d,id3:g,initSegment:f}=n,{details:m}=u,p=this.altAudio?void 0:n.audio;if(this.fragContextChanged(l)){this.fragmentTracker.removeFragment(l);return}if(this.state=w.PARSING,f){if(f!=null&&f.tracks){const T=l.initSegment||l;this._bufferInitSegment(u,f.tracks,T,o),i.trigger(y.FRAG_PARSING_INIT_SEGMENT,{frag:T,id:s,tracks:f.tracks})}const E=f.initPTS,x=f.timescale;V(E)&&(this.initPTS[l.cc]={baseTime:E,timescale:x},i.trigger(y.INIT_PTS_FOUND,{frag:l,id:s,initPTS:E,timescale:x}))}if(h&&m){const E=m.fragments[l.sn-1-m.startSN],x=l.sn===m.startSN,T=!E||l.cc>E.cc;if(n.independent!==!1){const{startPTS:_,endPTS:A,startDTS:C,endDTS:L}=h;if(c)c.elementaryStreams[h.type]={startPTS:_,endPTS:A,startDTS:C,endDTS:L};else if(h.firstKeyFrame&&h.independent&&o.id===1&&!T&&(this.couldBacktrack=!0),h.dropped&&h.independent){const v=this.getMainFwdBufferInfo(),I=(v?v.end:this.getLoadPosition())+this.config.maxBufferHole,R=h.firstKeyFramePTS?h.firstKeyFramePTS:_;if(!x&&I<R-this.config.maxBufferHole&&!T){this.backtrack(l);return}else T&&(l.gap=!0);l.setElementaryStreamInfo(h.type,l.start,A,l.start,L,!0)}else x&&_>bs&&(l.gap=!0);l.setElementaryStreamInfo(h.type,_,A,C,L),this.backtrackFragment&&(this.backtrackFragment=l),this.bufferFragmentData(h,l,c,o,x||T)}else if(x||T)l.gap=!0;else{this.backtrack(l);return}}if(p){const{startPTS:E,endPTS:x,startDTS:T,endDTS:_}=p;c&&(c.elementaryStreams[ce.AUDIO]={startPTS:E,endPTS:x,startDTS:T,endDTS:_}),l.setElementaryStreamInfo(ce.AUDIO,E,x,T,_),this.bufferFragmentData(p,l,c,o)}if(m&&g!=null&&(t=g.samples)!=null&&t.length){const E={id:s,frag:l,details:m,samples:g.samples};i.trigger(y.FRAG_PARSING_METADATA,E)}if(m&&d){const E={id:s,frag:l,details:m,samples:d.samples};i.trigger(y.FRAG_PARSING_USERDATA,E)}}_bufferInitSegment(e,t,s,i){if(this.state!==w.PARSING)return;this.audioOnly=!!t.audio&&!t.video,this.altAudio&&!this.audioOnly&&delete t.audio;const{audio:n,video:o,audiovideo:a}=t;if(n){let c=e.audioCodec;const u=navigator.userAgent.toLowerCase();if(this.audioCodecSwitch){c&&(c.indexOf("mp4a.40.5")!==-1?c="mp4a.40.2":c="mp4a.40.5");const h=n.metadata;h&&"channelCount"in h&&(h.channelCount||1)!==1&&u.indexOf("firefox")===-1&&(c="mp4a.40.5")}c&&c.indexOf("mp4a.40.5")!==-1&&u.indexOf("android")!==-1&&n.container!=="audio/mpeg"&&(c="mp4a.40.2",this.log(`Android: force audio codec to ${c}`)),e.audioCodec&&e.audioCodec!==c&&this.log(`Swapping manifest audio codec "${e.audioCodec}" for "${c}"`),n.levelCodec=c,n.id="main",this.log(`Init audio buffer, container:${n.container}, codecs[selected/level/parsed]=[${c||""}/${e.audioCodec||""}/${n.codec}]`),delete t.audiovideo}o&&(o.levelCodec=e.videoCodec,o.id="main",this.log(`Init video buffer, container:${o.container}, codecs[level/parsed]=[${e.videoCodec||""}/${o.codec}]`),delete t.audiovideo),a&&(this.log(`Init audiovideo buffer, container:${a.container}, codecs[level/parsed]=[${e.codecs}/${a.codec}]`),delete t.video,delete t.audio);const l=Object.keys(t);l.length&&(this.hls.trigger(y.BUFFER_CODECS,t),l.forEach(c=>{const h=t[c].initSegment;h!=null&&h.byteLength&&this.hls.trigger(y.BUFFER_APPENDING,{type:c,data:h,frag:s,part:null,chunkMeta:i,parent:s.type})})),this.tickImmediate()}getMainFwdBufferInfo(){return this.getFwdBufferInfo(this.mediaBuffer?this.mediaBuffer:this.media,H.MAIN)}get maxBufferLength(){const{levels:e,level:t}=this,s=e==null?void 0:e[t];return s?this.getMaxBufferLength(s.maxBitrate):this.config.maxBufferLength}backtrack(e){this.couldBacktrack=!0,this.backtrackFragment=e,this.resetTransmuxer(),this.flushBufferGap(e),this.fragmentTracker.removeFragment(e),this.fragPrevious=null,this.nextLoadPosition=e.start,this.state=w.IDLE}checkFragmentChanged(){const e=this.media;let t=null;if(e&&e.readyState>1&&e.seeking===!1){const s=e.currentTime;if(ue.isBuffered(e,s)?t=this.getAppendedFrag(s):ue.isBuffered(e,s+.1)&&(t=this.getAppendedFrag(s+.1)),t){this.backtrackFragment=null;const i=this.fragPlaying,n=t.level;(!i||t.sn!==i.sn||i.level!==n)&&(this.fragPlaying=t,this.hls.trigger(y.FRAG_CHANGED,{frag:t}),(!i||i.level!==n)&&this.hls.trigger(y.LEVEL_SWITCHED,{level:n}))}}}get nextLevel(){const e=this.nextBufferedFrag;return e?e.level:-1}get currentFrag(){var e;if(this.fragPlaying)return this.fragPlaying;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;return V(t)?this.getAppendedFrag(t):null}get currentProgramDateTime(){var e;const t=((e=this.media)==null?void 0:e.currentTime)||this.lastCurrentTime;if(V(t)){const s=this.getLevelDetails(),i=this.currentFrag||(s?es(null,s.fragments,t):null);if(i){const n=i.programDateTime;if(n!==null){const o=n+(t-i.start)*1e3;return new Date(o)}}}return null}get currentLevel(){const e=this.currentFrag;return e?e.level:-1}get nextBufferedFrag(){const e=this.currentFrag;return e?this.followingBufferedFrag(e):null}get forceStartLoad(){return this._forceStartLoad}}class gt{static get version(){return ts}static isMSESupported(){return ha()}static isSupported(){return gd()}static getMediaSource(){return pt()}static get Events(){return y}static get ErrorTypes(){return Y}static get ErrorDetails(){return D}static get DefaultConfig(){return gt.defaultConfig?gt.defaultConfig:ca}static set DefaultConfig(e){gt.defaultConfig=e}constructor(e={}){this.config=void 0,this.userConfig=void 0,this.logger=void 0,this.coreComponents=void 0,this.networkControllers=void 0,this._emitter=new cr,this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.abrController=void 0,this.bufferController=void 0,this.capLevelController=void 0,this.latencyController=void 0,this.levelController=void 0,this.streamController=void 0,this.audioTrackController=void 0,this.subtitleTrackController=void 0,this.emeController=void 0,this.cmcdController=void 0,this._media=null,this._url=null,this.triggeringException=void 0;const t=this.logger=tl(e.debug||!1,"Hls instance"),s=this.config=ud(gt.DefaultConfig,e,t);this.userConfig=e,s.progressive&&hd(s,t);const{abrController:i,bufferController:n,capLevelController:o,errorController:a,fpsController:l}=s,c=new a(this),u=this.abrController=new i(this),h=new Nc(this),d=this.bufferController=new n(this,h),g=this.capLevelController=new o(this),f=new l(this),m=new Kl(this),p=new lc(this),E=s.contentSteeringController,x=E?new E(this):null,T=this.levelController=new dd(this,x),_=new fd(this.config),A=this.streamController=new Sd(this,h,_);g.setStreamController(A),f.setStreamController(A);const C=[m,T,A];x&&C.splice(1,0,x),this.networkControllers=C;const L=[u,d,g,f,p,h];this.audioTrackController=this.createController(s.audioTrackController,C);const v=s.audioStreamController;v&&C.push(new v(this,h,_)),this.subtitleTrackController=this.createController(s.subtitleTrackController,C);const I=s.subtitleStreamController;I&&C.push(new I(this,h,_)),this.createController(s.timelineController,L),_.emeController=this.emeController=this.createController(s.emeController,L),this.cmcdController=this.createController(s.cmcdController,L),this.latencyController=this.createController(cc,L),this.coreComponents=L,C.push(c);const R=c.onErrorOut;typeof R=="function"&&this.on(y.ERROR,R,c)}createController(e,t){if(e){const s=new e(this);return t&&t.push(s),s}return null}on(e,t,s=this){this._emitter.on(e,t,s)}once(e,t,s=this){this._emitter.once(e,t,s)}removeAllListeners(e){this._emitter.removeAllListeners(e)}off(e,t,s=this,i){this._emitter.off(e,t,s,i)}listeners(e){return this._emitter.listeners(e)}emit(e,t,s){return this._emitter.emit(e,t,s)}trigger(e,t){if(this.config.debug)return this.emit(e,e,t);try{return this.emit(e,e,t)}catch(s){if(this.logger.error("An internal error happened while handling event "+e+'. Error message: "'+s.message+'". Here is a stacktrace:',s),!this.triggeringException){this.triggeringException=!0;const i=e===y.ERROR;this.trigger(y.ERROR,{type:Y.OTHER_ERROR,details:D.INTERNAL_EXCEPTION,fatal:i,event:e,error:s}),this.triggeringException=!1}}return!1}listenerCount(e){return this._emitter.listenerCount(e)}destroy(){this.logger.log("destroy"),this.trigger(y.DESTROYING,void 0),this.detachMedia(),this.removeAllListeners(),this._autoLevelCapping=-1,this._url=null,this.networkControllers.forEach(t=>t.destroy()),this.networkControllers.length=0,this.coreComponents.forEach(t=>t.destroy()),this.coreComponents.length=0;const e=this.config;e.xhrSetup=e.fetchSetup=void 0,this.userConfig=null}attachMedia(e){if(!e){const t=new Error(`attachMedia failed: media argument is ${e}`);this.trigger(y.ERROR,{type:Y.OTHER_ERROR,details:D.ATTACH_MEDIA_ERROR,fatal:!0,error:t});return}this.logger.log("attachMedia"),this._media=e,this.trigger(y.MEDIA_ATTACHING,{media:e})}detachMedia(){this.logger.log("detachMedia"),this.trigger(y.MEDIA_DETACHING,void 0),this._media=null}loadSource(e){this.stopLoad();const t=this.media,s=this._url,i=this._url=qi.buildAbsoluteURL(self.location.href,e,{alwaysNormalize:!0});this._autoLevelCapping=-1,this._maxHdcpLevel=null,this.logger.log(`loadSource:${i}`),t&&s&&(s!==i||this.bufferController.hasSourceTypes())&&(this.detachMedia(),this.attachMedia(t)),this.trigger(y.MANIFEST_LOADING,{url:e})}get url(){return this._url}startLoad(e=-1){this.logger.log(`startLoad(${e})`),this.networkControllers.forEach(t=>{t.startLoad(e)})}stopLoad(){this.logger.log("stopLoad"),this.networkControllers.forEach(e=>{e.stopLoad()})}resumeBuffering(){this.networkControllers.forEach(e=>{e.resumeBuffering&&e.resumeBuffering()})}pauseBuffering(){this.networkControllers.forEach(e=>{e.pauseBuffering&&e.pauseBuffering()})}swapAudioCodec(){this.logger.log("swapAudioCodec"),this.streamController.swapAudioCodec()}recoverMediaError(){this.logger.log("recoverMediaError");const e=this._media;this.detachMedia(),e&&this.attachMedia(e)}removeLevel(e){this.levelController.removeLevel(e)}get levels(){const e=this.levelController.levels;return e||[]}get currentLevel(){return this.streamController.currentLevel}set currentLevel(e){this.logger.log(`set currentLevel:${e}`),this.levelController.manualLevel=e,this.streamController.immediateLevelSwitch()}get nextLevel(){return this.streamController.nextLevel}set nextLevel(e){this.logger.log(`set nextLevel:${e}`),this.levelController.manualLevel=e,this.streamController.nextLevelSwitch()}get loadLevel(){return this.levelController.level}set loadLevel(e){this.logger.log(`set loadLevel:${e}`),this.levelController.manualLevel=e}get nextLoadLevel(){return this.levelController.nextLoadLevel}set nextLoadLevel(e){this.levelController.nextLoadLevel=e}get firstLevel(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)}set firstLevel(e){this.logger.log(`set firstLevel:${e}`),this.levelController.firstLevel=e}get startLevel(){const e=this.levelController.startLevel;return e===-1&&this.abrController.forcedAutoLevel>-1?this.abrController.forcedAutoLevel:e}set startLevel(e){this.logger.log(`set startLevel:${e}`),e!==-1&&(e=Math.max(e,this.minAutoLevel)),this.levelController.startLevel=e}get capLevelToPlayerSize(){return this.config.capLevelToPlayerSize}set capLevelToPlayerSize(e){const t=!!e;t!==this.config.capLevelToPlayerSize&&(t?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=t)}get autoLevelCapping(){return this._autoLevelCapping}get bandwidthEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimate():NaN}set bandwidthEstimate(e){this.abrController.resetEstimator(e)}get ttfbEstimate(){const{bwEstimator:e}=this.abrController;return e?e.getEstimateTTFB():NaN}set autoLevelCapping(e){this._autoLevelCapping!==e&&(this.logger.log(`set autoLevelCapping:${e}`),this._autoLevelCapping=e,this.levelController.checkMaxAutoUpdated())}get maxHdcpLevel(){return this._maxHdcpLevel}set maxHdcpLevel(e){uc(e)&&this._maxHdcpLevel!==e&&(this._maxHdcpLevel=e,this.levelController.checkMaxAutoUpdated())}get autoLevelEnabled(){return this.levelController.manualLevel===-1}get manualLevel(){return this.levelController.manualLevel}get minAutoLevel(){const{levels:e,config:{minAutoBitrate:t}}=this;if(!e)return 0;const s=e.length;for(let i=0;i<s;i++)if(e[i].maxBitrate>=t)return i;return 0}get maxAutoLevel(){const{levels:e,autoLevelCapping:t,maxHdcpLevel:s}=this;let i;if(t===-1&&e!=null&&e.length?i=e.length-1:i=t,s)for(let n=i;n--;){const o=e[n].attrs["HDCP-LEVEL"];if(o&&o<=s)return n}return i}get firstAutoLevel(){return this.abrController.firstAutoLevel}get nextAutoLevel(){return this.abrController.nextAutoLevel}set nextAutoLevel(e){this.abrController.nextAutoLevel=e}get playingDate(){return this.streamController.currentProgramDateTime}get mainForwardBufferInfo(){return this.streamController.getMainFwdBufferInfo()}get maxBufferLength(){return this.streamController.maxBufferLength}setAudioOption(e){var t;return((t=this.audioTrackController)==null?void 0:t.setAudioOption(e))||null}setSubtitleOption(e){var t;return((t=this.subtitleTrackController)==null?void 0:t.setSubtitleOption(e))||null}get allAudioTracks(){const e=this.audioTrackController;return e?e.allAudioTracks:[]}get audioTracks(){const e=this.audioTrackController;return e?e.audioTracks:[]}get audioTrack(){const e=this.audioTrackController;return e?e.audioTrack:-1}set audioTrack(e){const t=this.audioTrackController;t&&(t.audioTrack=e)}get allSubtitleTracks(){const e=this.subtitleTrackController;return e?e.allSubtitleTracks:[]}get subtitleTracks(){const e=this.subtitleTrackController;return e?e.subtitleTracks:[]}get subtitleTrack(){const e=this.subtitleTrackController;return e?e.subtitleTrack:-1}get media(){return this._media}set subtitleTrack(e){const t=this.subtitleTrackController;t&&(t.subtitleTrack=e)}get subtitleDisplay(){const e=this.subtitleTrackController;return e?e.subtitleDisplay:!1}set subtitleDisplay(e){const t=this.subtitleTrackController;t&&(t.subtitleDisplay=e)}get lowLatencyMode(){return this.config.lowLatencyMode}set lowLatencyMode(e){this.config.lowLatencyMode=e}get liveSyncPosition(){return this.latencyController.liveSyncPosition}get latency(){return this.latencyController.latency}get maxLatency(){return this.latencyController.maxLatency}get targetLatency(){return this.latencyController.targetLatency}set targetLatency(e){this.latencyController.targetLatency=e}get drift(){return this.latencyController.drift}get forceStartLoad(){return this.streamController.forceStartLoad}get pathwayPriority(){return this.levelController.pathwayPriority}set pathwayPriority(e){this.levelController.pathwayPriority=e}}gt.defaultConfig=void 0;function vd(r){let e,t,s,i;return{c(){e=fe("svg"),t=fe("circle"),s=fe("circle"),i=fe("path"),S(t,"cx","28"),S(t,"cy","28"),S(t,"r","28"),S(t,"transform","rotate(90 28 28)"),S(t,"fill","white"),S(t,"fill-opacity","0.45"),S(s,"cx","28"),S(s,"cy","28"),S(s,"r","27.5"),S(s,"transform","rotate(90 28 28)"),S(s,"stroke","black"),S(s,"stroke-opacity","0.1"),S(i,"d","M41.0074 32.6844L39.6767 33.9581L28 21.7584L16.3232 33.9581L14.9925 32.6844L28 19.0945L41.0074 32.6844Z"),S(i,"fill","black"),S(e,"width","56"),S(e,"height","56"),S(e,"viewBox","0 0 56 56"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg")},m(n,o){ie(n,e,o),$(e,t),$(e,s),$(e,i)},p:oe,i:oe,o:oe,d(n){n&&J(e)}}}class Cn extends Pe{constructor(e){super(),ke(this,e,null,vd,Ce,{})}}function Ld(r){const e=r-1;return e*e*e+1}function Je(r,{delay:e=0,duration:t=400,easing:s=Vs}={}){const i=+getComputedStyle(r).opacity;return{delay:e,duration:t,easing:s,css:n=>`opacity: ${n*i}`}}function Bi(r,{delay:e=0,duration:t=400,easing:s=Ld,axis:i="y"}={}){const n=getComputedStyle(r),o=+n.opacity,a=i==="y"?"height":"width",l=parseFloat(n[a]),c=i==="y"?["top","bottom"]:["left","right"],u=c.map(E=>`${E[0].toUpperCase()}${E.slice(1)}`),h=parseFloat(n[`padding${u[0]}`]),d=parseFloat(n[`padding${u[1]}`]),g=parseFloat(n[`margin${u[0]}`]),f=parseFloat(n[`margin${u[1]}`]),m=parseFloat(n[`border${u[0]}Width`]),p=parseFloat(n[`border${u[1]}Width`]);return{delay:e,duration:t,easing:s,css:E=>`overflow: hidden;opacity: ${Math.min(E*20,1)*o};${a}: ${E*l}px;padding-${c[0]}: ${E*h}px;padding-${c[1]}: ${E*d}px;margin-${c[0]}: ${E*g}px;margin-${c[1]}: ${E*f}px;border-${c[0]}-width: ${E*m}px;border-${c[1]}-width: ${E*p}px;`}}function Ad(r){let e,t,s,i;return{c(){e=fe("svg"),t=fe("circle"),s=fe("path"),i=fe("path"),S(t,"cx","31"),S(t,"cy","31"),S(t,"r","28"),S(t,"fill","black"),S(t,"fill-opacity","0.45"),S(s,"d","M32.58 22.04C32.58 21.73 32.4 21.65 32.18 21.88L26.32 27.79C26.1 28.01 25.67 28.19 25.35 28.19H20.32C20.01 28.19 19.75 28.45 19.75 28.76V34.82C19.75 35.13 20.01 35.39 20.32 35.39H25.36C25.67 35.39 26.11 35.57 26.33 35.79L32.18 41.7C32.4 41.92 32.58 41.85 32.58 41.54V22.04Z"),S(s,"fill","white"),S(i,"fill-rule","evenodd"),S(i,"clip-rule","evenodd"),S(i,"d","M38.9635 32.8193L35.7828 36L34.7221 34.9393L37.9028 31.7586L34.9876 28.8434L36.0483 27.7827L38.9635 30.698L41.8787 27.7827L42.9394 28.8434L40.0241 31.7586L43.2048 34.9393L42.1442 36L38.9635 32.8193Z"),S(i,"fill","white"),S(e,"width","100%"),S(e,"height","100%"),S(e,"viewBox","0 0 63 63"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg")},m(n,o){ie(n,e,o),$(e,t),$(e,s),$(e,i)},p:oe,i:oe,o:oe,d(n){n&&J(e)}}}class bd extends Pe{constructor(e){super(),ke(this,e,null,Ad,Ce,{})}}function _d(r){let e,t,s;return{c(){e=fe("svg"),t=fe("circle"),s=fe("path"),S(t,"cx","31"),S(t,"cy","31"),S(t,"r","28"),S(t,"fill","black"),S(t,"fill-opacity","0.45"),S(s,"fill-rule","evenodd"),S(s,"clip-rule","evenodd"),S(s,"d","M32.58 22.04C32.58 21.73 32.4 21.65 32.18 21.88L26.32 27.79C26.1 28.01 25.67 28.19 25.35 28.19H20.32C20.01 28.19 19.75 28.45 19.75 28.76V34.82C19.75 35.13 20.01 35.39 20.32 35.39H25.36C25.67 35.39 26.11 35.57 26.33 35.79L32.18 41.7C32.4 41.92 32.58 41.85 32.58 41.54V22.04ZM34.825 36.5148C37.5912 33.9013 37.5926 29.669 34.824 27.0443L35.856 25.9557C39.2475 29.171 39.2489 34.3987 35.8551 37.6052L34.825 36.5148ZM37.5302 24.29C41.9996 28.4329 42.0006 35.1369 37.5296 39.2905L38.5505 40.3895C43.6595 35.6431 43.6604 27.9271 38.5499 23.1899L37.5302 24.29Z"),S(s,"fill","white"),S(e,"width","100%"),S(e,"height","100%"),S(e,"viewBox","0 0 63 63"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg")},m(i,n){ie(i,e,n),$(e,t),$(e,s)},p:oe,i:oe,o:oe,d(i){i&&J(e)}}}class Rd extends Pe{constructor(e){super(),ke(this,e,null,_d,Ce,{})}}function Id(r){let e,t;return{c(){e=fe("svg"),t=fe("path"),S(t,"d","M25.0727 3.82264L26.1776 4.92749L16.1049 14.9997L26.177 25.0719L25.0721 26.1767L14.9999 16.1047L4.92758 26.1775L3.82273 25.0726L13.8953 14.9997L3.82245 4.92737L4.92729 3.82251L14.9999 13.895L25.0727 3.82264Z"),S(t,"fill","white"),S(t,"stroke","white"),S(e,"width","100%"),S(e,"height","100%"),S(e,"viewBox","0 0 30 30"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg")},m(s,i){ie(s,e,i),$(e,t)},p:oe,i:oe,o:oe,d(s){s&&J(e)}}}class da extends Pe{constructor(e){super(),ke(this,e,null,Id,Ce,{})}}function Dd(r){let e,t,s,i,n,o,a,l,c;return{c(){e=z("div"),t=z("div"),s=de(),i=z("div"),S(t,"class","seek-bar-progress svelte-15q4xgo"),Ue(t,"transition",r[5]?"none":""),Ue(t,"transform",`scaleX(${r[0]/r[1]*100}%)`),S(i,"class","hover svelte-15q4xgo"),Ue(i,"transition",r[5]?"none":""),Ue(i,"transform",`scaleX(${r[3]*100}%)`),S(e,"class","seek-bar svelte-15q4xgo"),S(e,"tabindex","0"),S(e,"role","slider"),S(e,"aria-valuemin","0"),S(e,"aria-valuemax",r[1]),S(e,"aria-valuenow",n=Math.round(r[0]))},m(u,h){ie(u,e,h),$(e,t),$(e,s),$(e,i),r[7](e),a=!0,l||(c=[le(e,"click",r[6]),le(e,"keydown",Cd),le(e,"mouseleave",r[8]),le(e,"touchend",r[9])],l=!0)},p(u,[h]){h&32&&Ue(t,"transition",u[5]?"none":""),h&3&&Ue(t,"transform",`scaleX(${u[0]/u[1]*100}%)`),h&32&&Ue(i,"transition",u[5]?"none":""),h&8&&Ue(i,"transform",`scaleX(${u[3]*100}%)`),(!a||h&2)&&S(e,"aria-valuemax",u[1]),(!a||h&1&&n!==(n=Math.round(u[0])))&&S(e,"aria-valuenow",n)},i(u){a||(u&&Fe(()=>{a&&(o||(o=Qe(e,Bi,{duration:300,delay:300},!0)),o.run(1))}),a=!0)},o(u){u&&(o||(o=Qe(e,Bi,{duration:300,delay:300},!1)),o.run(0)),a=!1},d(u){u&&J(e),r[7](null),u&&o&&o.end(),l=!1,Me(c)}}}const Cd=()=>{};function wd(r,e,t){let{currentTime:s}=e,{duration:i}=e,{seekTo:n}=e,o=0,a,l=!1;const c=()=>"ontouchstart"in window||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0;Hi(()=>{c?a.addEventListener("touchmove",f=>{f.preventDefault();const{clientX:m}=f.touches[0],{left:p,width:E}=a.getBoundingClientRect();t(3,o=(m-p)/E)}):a.addEventListener("mousemove",f=>{const{clientX:m}=f,{left:p,width:E}=a.getBoundingClientRect();t(3,o=(m-p)/E)})});const u=f=>(t(5,l=!0),setTimeout(()=>{t(5,l=!1)},250),n(f));function h(f){et[f?"unshift":"push"](()=>{a=f,t(4,a)})}const d=()=>{t(3,o=0)},g=f=>(t(3,o=0),console.log(f),n(f));return r.$$set=f=>{"currentTime"in f&&t(0,s=f.currentTime),"duration"in f&&t(1,i=f.duration),"seekTo"in f&&t(2,n=f.seekTo)},[s,i,n,o,a,l,u,h,d,g]}class kd extends Pe{constructor(e){super(),ke(this,e,wd,Dd,Ce,{currentTime:0,duration:1,seekTo:2})}}function Pd(r){let e,t,s;return{c(){e=fe("svg"),t=fe("path"),s=fe("path"),S(t,"d","M12.099 22.2214H4.22891C3.7635 22.2218 3.37916 21.8579 3.35419 21.3932V5.36743C3.35328 4.90164 3.71754 4.51685 4.18267 4.49223H7.88232L7.87729 4.19107C7.84485 2.14335 9.47633 0.455918 11.524 0.419312H11.5927C13.5904 0.419567 15.2294 2.00092 15.3013 3.99725L15.3032 4.07416L15.3094 4.49223H19.009C19.4755 4.49057 19.8612 4.85535 19.8854 5.32119V9.8589H18.6875V5.69015H15.3319L15.3544 6.95227C15.9055 7.19101 16.2702 7.72537 16.2917 8.32556V8.38115C16.2921 9.16515 15.7096 9.82719 14.9319 9.92661C14.1542 10.026 13.4239 9.53182 13.227 8.77294C13.0301 8.01406 13.4281 7.22715 14.156 6.93598L14.1335 5.69015H9.10227L9.12623 6.95155C9.67602 7.19208 10.0398 7.72589 10.0625 8.32556V8.43649C10.0348 9.21252 9.43963 9.84956 8.66727 9.92986C7.8949 10.0102 7.18141 9.50919 6.99464 8.75546C6.80788 8.00172 7.20494 7.22558 7.92544 6.93598L7.90364 5.69015H4.55211V21.0235H12.099V22.2214ZM14.7344 7.78171C14.4036 7.78171 14.1354 8.04987 14.1354 8.38067C14.1354 8.71146 14.4036 8.97962 14.7344 8.97962C15.0652 8.97962 15.3334 8.71146 15.3334 8.38067C15.3334 8.04987 15.0652 7.78171 14.7344 7.78171ZM8.50523 7.78171C8.17991 7.78246 7.91467 8.04275 7.90779 8.368C7.90092 8.69325 8.15492 8.96452 8.47992 8.97903C8.80491 8.99353 9.08207 8.74597 9.10419 8.4214V8.34161C9.08266 8.02664 8.82095 7.78185 8.50523 7.78171ZM11.5908 1.61723H11.5446C10.1846 1.64175 9.09045 2.74281 9.07448 4.10291V4.17095L9.08023 4.49223H14.1115L14.1045 4.09356C14.0831 2.72033 12.9642 1.61811 11.5908 1.61723Z"),S(t,"fill","white"),S(s,"d","M3.35778 21.4384V21.4331C3.35539 21.4199 3.35419 21.4065 3.35419 21.3931V5.3674C3.35328 4.90161 3.71754 4.51682 4.18267 4.49219H19.009C19.4576 4.49057 19.8347 4.8286 19.8818 5.27468V5.27971C19.8831 5.29313 19.8842 5.3067 19.885 5.32044V21.3462C19.8859 21.8118 19.5219 22.1965 19.057 22.2214H4.22723C3.77979 22.2214 3.40461 21.8834 3.35778 21.4384ZM18.6875 21.0234V5.69012H4.55211V21.0234H18.6875Z"),S(s,"fill","white"),S(e,"width","23"),S(e,"height","23"),S(e,"viewBox","0 0 23 23"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg")},m(i,n){ie(i,e,n),$(e,t),$(e,s)},p:oe,i:oe,o:oe,d(i){i&&J(e)}}}class fa extends Pe{constructor(e){super(),ke(this,e,null,Pd,Ce,{})}}const wt=[];function Fd(r,e=oe){let t;const s=new Set;function i(a){if(Ce(r,a)&&(r=a,t)){const l=!wt.length;for(const c of s)c[1](),wt.push(c,r);if(l){for(let c=0;c<wt.length;c+=2)wt[c][0](wt[c+1]);wt.length=0}}}function n(a){i(a(r))}function o(a,l=oe){const c=[a,l];return s.add(c),s.size===1&&(t=e(i,n)||oe),a(r),()=>{s.delete(c),s.size===0&&t&&(t(),t=null)}}return{set:i,update:n,subscribe:o}}function Od(r){let e,t,s,i,n,o,a,l,c,u,h,d,g,f,m,p,E,x,T,_,A,C,L,v,I,R,k,U,K,O,G,P,F,Z,N;return o=new da({}),g=new fa({}),{c(){e=z("div"),t=z("div"),s=z("div"),i=de(),n=z("div"),De(o.$$.fragment),a=de(),l=z("div"),c=z("div"),u=z("p"),u.textContent="In this video",h=de(),d=z("a"),De(g.$$.fragment),f=de(),m=z("div"),p=z("div"),E=z("img"),_=de(),A=z("div"),C=z("div"),L=z("h5"),v=rt(r[2]),I=de(),R=z("p"),k=rt(r[4]),U=de(),K=z("a"),O=rt("Visit site"),S(s,"class","drag-pill svelte-v6s7b2"),S(n,"class","close-shorts-overlay svelte-v6s7b2"),S(n,"role","button"),S(n,"tabindex","0"),S(u,"class","svelte-v6s7b2"),S(d,"href",r[3]),S(d,"target","_blank"),S(d,"rel","noopener noreferrer"),S(c,"class","shop-content-top svelte-v6s7b2"),mi(E.src,x=r[1])||S(E,"src",x),S(E,"alt",T=`${r[2]} image`),S(E,"class","svelte-v6s7b2"),S(p,"class","shop-content-image-container svelte-v6s7b2"),S(L,"class","svelte-v6s7b2"),S(R,"class","svelte-v6s7b2"),S(C,"class","shop-content-product-copy"),S(K,"href",r[3]),S(K,"target","_blank"),S(K,"rel","noopener noreferrer"),S(K,"class","svelte-v6s7b2"),S(A,"class","shop-content-product-description svelte-v6s7b2"),S(m,"class","shop-content-product svelte-v6s7b2"),S(l,"class","shorts-shop-content svelte-v6s7b2"),S(t,"class","shorts-shop-popup svelte-v6s7b2"),S(t,"role","dialog"),S(e,"class","shorts-overlay svelte-v6s7b2")},m(M,q){ie(M,e,q),$(e,t),$(t,s),$(t,i),$(t,n),Ae(o,n,null),$(t,a),$(t,l),$(l,c),$(c,u),$(c,h),$(c,d),Ae(g,d,null),$(l,f),$(l,m),$(m,p),$(p,E),$(m,_),$(m,A),$(A,C),$(C,L),$(L,v),$(C,I),$(C,R),$(R,k),$(A,U),$(A,K),$(K,O),r[11](t),F=!0,Z||(N=[le(n,"click",function(){We(r[0])&&r[0].apply(this,arguments)}),le(n,"keydown",r[10]),le(t,"mousedown",r[6]),le(t,"touchstart",r[6]),le(t,"touchmove",r[8]),le(t,"touchend",r[7],{passive:!0})],Z=!0)},p(M,[q]){r=M,(!F||q&8)&&S(d,"href",r[3]),(!F||q&2&&!mi(E.src,x=r[1]))&&S(E,"src",x),(!F||q&4&&T!==(T=`${r[2]} image`))&&S(E,"alt",T),(!F||q&4)&&_s(v,r[2]),(!F||q&16)&&_s(k,r[4]),(!F||q&8)&&S(K,"href",r[3])},i(M){F||(X(o.$$.fragment,M),X(g.$$.fragment,M),M&&Fe(()=>{F&&(P&&P.end(1),G=Jn(t,Bi,{duration:500}),G.start())}),F=!0)},o(M){se(o.$$.fragment,M),se(g.$$.fragment,M),G&&G.invalidate(),P=eo(t,Nd,{duration:300}),F=!1},d(M){M&&J(e),be(o),be(g),r[11](null),M&&P&&P.end(),Z=!1,Me(N)}}}function Md(r){return 1+Math.tanh(r/100)/5}function Nd(r,{duration:e}){const{bottom:t,height:s}=getComputedStyle(r);return{duration:e,css:(i,n)=>`bottom: ${parseInt(t)-parseInt(s)*n}px`}}function Bd(r,e,t){let{closer:s}=e,{productImage:i}=e,{productTitle:n}=e,{productHref:o}=e,{productPrice:a}=e,l,c,u,h=0;function d(E){if(!l)return;let x,T;if(!["a","svg"].includes(E.target.tagName.toLowerCase())){if(E.touches){E.preventDefault();let _=l.getBoundingClientRect();x=E.touches[0].clientY-_.top,T=E.touches[0].clientY}else x=E.layerY,T=E.clientY;x<100&&window.innerWidth<768&&(t(9,c=!0),u=T)}}function g(){t(9,c=!1),h<-100&&s(),t(5,l.style.transform="",l),t(5,l.style.bottom="",l)}function f(E){c||window.removeEventListener("mousemove",f);let x=1,T=0,_=E.touches?E.touches[0].clientY:E.clientY;if(console.log(_,u),_-u>0)T=u-_;else{let A=u-_;x=Md(A)}h=T,t(5,l.style.transform=`scaleY(${x})`,l),t(5,l.style.bottom=`${T}px`,l)}const m=E=>{(E.key==="Enter"||E.key===" ")&&s()};function p(E){et[E?"unshift":"push"](()=>{l=E,t(5,l)})}return r.$$set=E=>{"closer"in E&&t(0,s=E.closer),"productImage"in E&&t(1,i=E.productImage),"productTitle"in E&&t(2,n=E.productTitle),"productHref"in E&&t(3,o=E.productHref),"productPrice"in E&&t(4,a=E.productPrice)},r.$$.update=()=>{r.$$.dirty&512&&(c?(window.addEventListener("mouseup",g),window.addEventListener("mousemove",f)):(window.removeEventListener("mouseup",g),window.removeEventListener("mousemove",f)))},[s,i,n,o,a,l,d,g,f,c,m,p]}class Ud extends Pe{constructor(e){super(),ke(this,e,Bd,Od,Ce,{closer:0,productImage:1,productTitle:2,productHref:3,productPrice:4})}}function gi(r){let e,t,s,i,n,o;const a=r[4].default,l=La(a,r,r[3],null);let c=[{ref:r[1]},{class:"svelte-en0di3"}],u={};for(let h=0;h<c.length;h+=1)u=Wn(u,c[h]);return{c(){e=z(r[0]),l&&l.c(),t=rt(" | "),s=z("a"),i=rt("#Shorts"),n=rt(" | Samsung UK"),S(s,"href",r[2]),S(s,"rel","noopener noreferrer"),S(s,"target","_blank"),S(s,"class","svelte-en0di3"),Sr(r[0])(e,u)},m(h,d){ie(h,e,d),l&&l.m(e,null),$(e,t),$(e,s),$(s,i),$(e,n),o=!0},p(h,d){l&&l.p&&(!o||d&8)&&ba(l,a,h,h[3],o?Aa(a,h[3],d,null):_a(h[3]),null),(!o||d&4)&&S(s,"href",h[2]),Sr(h[0])(e,u=Ha(c,[(!o||d&2)&&{ref:h[1]},{class:"svelte-en0di3"}]))},i(h){o||(X(l,h),o=!0)},o(h){se(l,h),o=!1},d(h){h&&J(e),l&&l.d(h)}}}function Gd(r){let e=r[0],t,s,i=r[0]&&gi(r);return{c(){i&&i.c(),t=Vi()},m(n,o){i&&i.m(n,o),ie(n,t,o),s=!0},p(n,[o]){n[0]?e?Ce(e,n[0])?(i.d(1),i=gi(n),e=n[0],i.c(),i.m(t.parentNode,t)):i.p(n,o):(i=gi(n),e=n[0],i.c(),i.m(t.parentNode,t)):e&&(i.d(1),i=null,e=n[0])},i(n){s||(X(i,n),s=!0)},o(n){se(i,n),s=!1},d(n){n&&J(t),i&&i.d(n)}}}function $d(r,e,t){let{$$slots:s={},$$scope:i}=e,{tag:n="span"}=e,{ref:o=null}=e,{link:a="https://www.tiktok.com/@samsunguk?lang=en;"}=e;return r.$$set=l=>{"tag"in l&&t(0,n=l.tag),"ref"in l&&t(1,o=l.ref),"link"in l&&t(2,a=l.link),"$$scope"in l&&t(3,i=l.$$scope)},[n,o,a,i,s]}class Vd extends Pe{constructor(e){super(),ke(this,e,$d,Gd,Ce,{tag:0,ref:1,link:2})}}const Kd=(r,e)=>{let t=null;return(...s)=>{t||(r(...s),t=setTimeout(()=>{t=null},e))}},Hd=(r,e)=>{let t=null;return(...s)=>{clearTimeout(t),t=setTimeout(()=>{r(...s)},e)}},wn=r=>e=>{(e.key==="Enter"||e.key===" ")&&r()};function Wd(r){let e,t,s;return{c(){e=fe("svg"),t=fe("circle"),s=fe("path"),S(t,"cx","31"),S(t,"cy","31"),S(t,"r","28"),S(t,"fill","black"),S(t,"fill-opacity","0.45"),S(s,"d","M39.6708 30.1559C40.2893 30.5487 40.2893 31.4513 39.6708 31.8441L27.5361 39.5507C26.8703 39.9735 26 39.4953 26 38.7066L26 23.2934C26 22.5048 26.8703 22.0265 27.5361 22.4493L39.6708 30.1559Z"),S(s,"fill","white"),S(e,"id","play-btn"),S(e,"width","63"),S(e,"height","63"),S(e,"viewBox","0 0 63 63"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","svelte-1aulsri")},m(i,n){ie(i,e,n),$(e,t),$(e,s)},d(i){i&&J(e)}}}function Yd(r){let e,t,s;return{c(){e=fe("svg"),t=fe("circle"),s=fe("path"),S(t,"cx","31"),S(t,"cy","31"),S(t,"r","28"),S(t,"fill","black"),S(t,"fill-opacity","0.45"),S(s,"d","M28.6393 21.2787C29.1289 21.2787 29.5298 21.6633 29.556 22.1464L29.5574 22.1967V41.082C29.5574 41.5715 29.1727 41.9725 28.6897 41.9986L28.6393 42H23.918C23.4285 42 23.0275 41.6154 23.0014 41.1323L23 41.082V22.1967C23 21.7072 23.3846 21.3062 23.8677 21.28L23.918 21.2787H28.6393ZM38.082 21.2787C38.5715 21.2787 38.9725 21.6633 38.9986 22.1464L39 22.1967V41.082C39 41.5715 38.6154 41.9725 38.1323 41.9986L38.082 42H33.3607C32.8711 42 32.4702 41.6154 32.444 41.1323L32.4426 41.082V22.1967C32.4426 21.7072 32.8273 21.3062 33.3103 21.28L33.3607 21.2787H38.082Z"),S(s,"fill","white"),S(e,"id","paused-btn"),S(e,"width","63"),S(e,"height","63"),S(e,"viewBox","0 0 63 63"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","svelte-1aulsri")},m(i,n){ie(i,e,n),$(e,t),$(e,s)},d(i){i&&J(e)}}}function qd(r){let e;function t(n,o){return n[0]?Yd:Wd}let s=t(r),i=s(r);return{c(){e=z("div"),i.c(),S(e,"class","play-pause-container svelte-1aulsri"),S(e,"key",r[0])},m(n,o){ie(n,e,o),i.m(e,null)},p(n,[o]){s!==(s=t(n))&&(i.d(1),i=s(n),i&&(i.c(),i.m(e,null))),o&1&&S(e,"key",n[0])},i:oe,o:oe,d(n){n&&J(e),i.d()}}}function jd(r,e,t){let{isPaused:s=!1}=e;return r.$$set=i=>{"isPaused"in i&&t(0,s=i.isPaused)},[s]}class zd extends Pe{constructor(e){super(),ke(this,e,jd,qd,Ce,{isPaused:0})}}function kn(r){let e,t,s,i,n,o,a,l,c,u,h,d,g,f,m,p,E,x,T,_,A,C,L,v,I;s=new Cn({}),o=new Cn({});const R=[Qd,Xd],k=[];function U(P,F){return P[18]?0:1}u=U(r),h=k[u]=R[u](r),m=new da({}),x=new kd({props:{currentTime:r[12],duration:r[13],seekTo:r[35]}});let K=r[15]&&Pn(r),O=!r[10]&&Fn(r),G=r[10]&&!!r[5]&&Mn(r);return{c(){e=z("div"),t=z("div"),De(s.$$.fragment),i=de(),n=z("div"),De(o.$$.fragment),l=de(),c=z("div"),h.c(),g=de(),f=z("div"),De(m.$$.fragment),E=de(),De(x.$$.fragment),T=de(),K&&K.c(),_=de(),O&&O.c(),A=de(),G&&G.c(),C=Vi(),S(t,"class","shorts-arrow arrow-first svelte-1bjq20e"),S(t,"role","button"),S(t,"tabindex","0"),ns(t,"hide",r[4]==="first"),S(n,"class","shorts-arrow arrow-second svelte-1bjq20e"),S(n,"role","button"),S(n,"tabindex","0"),ns(n,"hide",r[4]==="last"),S(e,"class","arrows svelte-1bjq20e"),S(c,"class","shorts-mute-btn svelte-1bjq20e"),S(c,"role","button"),S(c,"tabindex","0"),S(f,"class","shorts-close-btn svelte-1bjq20e"),S(f,"role","button"),S(f,"tabindex","0")},m(P,F){ie(P,e,F),$(e,t),Ae(s,t,null),$(e,i),$(e,n),Ae(o,n,null),ie(P,l,F),ie(P,c,F),k[u].m(c,null),ie(P,g,F),ie(P,f,F),Ae(m,f,null),ie(P,E,F),Ae(x,P,F),ie(P,T,F),K&&K.m(P,F),ie(P,_,F),O&&O.m(P,F),ie(P,A,F),G&&G.m(P,F),ie(P,C,F),L=!0,v||(I=[le(t,"keydown",r[31]),le(t,"click",function(){We(r[3](-1))&&r[3](-1).apply(this,arguments)}),le(n,"keydown",r[32]),le(n,"click",function(){We(r[3](1))&&r[3](1).apply(this,arguments)}),le(c,"click",Ei(yi(r[33]))),le(c,"keydown",r[34]),le(f,"click",Ei(yi(function(){We(r[6])&&r[6].apply(this,arguments)}))),le(f,"keydown",ef)],v=!0)},p(P,F){r=P,(!L||F[0]&16)&&ns(t,"hide",r[4]==="first"),(!L||F[0]&16)&&ns(n,"hide",r[4]==="last");let Z=u;u=U(r),u!==Z&&(ct(),se(k[Z],1,1,()=>{k[Z]=null}),ut(),h=k[u],h||(h=k[u]=R[u](r),h.c()),X(h,1),h.m(c,null));const N={};F[0]&4096&&(N.currentTime=r[12]),F[0]&8192&&(N.duration=r[13]),F[0]&10240&&(N.seekTo=r[35]),x.$set(N),r[15]?K?(K.p(r,F),F[0]&32768&&X(K,1)):(K=Pn(r),K.c(),X(K,1),K.m(_.parentNode,_)):K&&(ct(),se(K,1,1,()=>{K=null}),ut()),r[10]?O&&(ct(),se(O,1,1,()=>{O=null}),ut()):O?(O.p(r,F),F[0]&1024&&X(O,1)):(O=Fn(r),O.c(),X(O,1),O.m(A.parentNode,A)),r[10]&&r[5]?G?(G.p(r,F),F[0]&1056&&X(G,1)):(G=Mn(r),G.c(),X(G,1),G.m(C.parentNode,C)):G&&(ct(),se(G,1,1,()=>{G=null}),ut())},i(P){L||(X(s.$$.fragment,P),X(o.$$.fragment,P),P&&Fe(()=>{L&&(a||(a=Qe(e,Je,{duration:300},!0)),a.run(1))}),X(h),P&&Fe(()=>{L&&(d||(d=Qe(c,Je,{duration:300},!0)),d.run(1))}),X(m.$$.fragment,P),P&&Fe(()=>{L&&(p||(p=Qe(f,Je,{duration:300},!0)),p.run(1))}),X(x.$$.fragment,P),X(K),X(O),X(G),L=!0)},o(P){se(s.$$.fragment,P),se(o.$$.fragment,P),P&&(a||(a=Qe(e,Je,{duration:300},!1)),a.run(0)),se(h),P&&(d||(d=Qe(c,Je,{duration:300},!1)),d.run(0)),se(m.$$.fragment,P),P&&(p||(p=Qe(f,Je,{duration:300},!1)),p.run(0)),se(x.$$.fragment,P),se(K),se(O),se(G),L=!1},d(P){P&&(J(e),J(l),J(c),J(g),J(f),J(E),J(T),J(_),J(A),J(C)),be(s),be(o),P&&a&&a.end(),k[u].d(),P&&d&&d.end(),be(m),P&&p&&p.end(),be(x,P),K&&K.d(P),O&&O.d(P),G&&G.d(P),v=!1,Me(I)}}}function Xd(r){let e,t;return e=new Rd({}),{c(){De(e.$$.fragment)},m(s,i){Ae(e,s,i),t=!0},i(s){t||(X(e.$$.fragment,s),t=!0)},o(s){se(e.$$.fragment,s),t=!1},d(s){be(e,s)}}}function Qd(r){let e,t;return e=new bd({}),{c(){De(e.$$.fragment)},m(s,i){Ae(e,s,i),t=!0},i(s){t||(X(e.$$.fragment,s),t=!0)},o(s){se(e.$$.fragment,s),t=!1},d(s){be(e,s)}}}function Pn(r){let e,t;return e=new zd({props:{isPaused:r[14]}}),{c(){De(e.$$.fragment)},m(s,i){Ae(e,s,i),t=!0},p(s,i){const n={};i[0]&16384&&(n.isPaused=s[14]),e.$set(n)},i(s){t||(X(e.$$.fragment,s),t=!0)},o(s){se(e.$$.fragment,s),t=!1},d(s){be(e,s)}}}function Fn(r){let e,t,s,i,n,o,a,l,c,u=r[5]&&On(r);return s=new Vd({props:{tag:"p",ref:"sst",link:r[7],$$slots:{default:[Zd]},$$scope:{ctx:r}}}),{c(){e=z("div"),u&&u.c(),t=de(),De(s.$$.fragment),o=de(),a=z("div"),S(e,"class","shorts-info-content svelte-1bjq20e"),S(a,"class","fade-out-video svelte-1bjq20e")},m(h,d){ie(h,e,d),u&&u.m(e,null),$(e,t),Ae(s,e,null),ie(h,o,d),ie(h,a,d),c=!0},p(h,d){h[5]?u?(u.p(h,d),d[0]&32&&X(u,1)):(u=On(h),u.c(),X(u,1),u.m(e,t)):u&&(ct(),se(u,1,1,()=>{u=null}),ut());const g={};d[0]&128&&(g.link=h[7]),d[0]&2|d[1]&256&&(g.$$scope={dirty:d,ctx:h}),s.$set(g)},i(h){c||(X(u),X(s.$$.fragment,h),Fe(()=>{c&&(n&&n.end(1),i=Jn(e,Je,{duration:300,delay:300}),i.start())}),Fe(()=>{c&&(l||(l=Qe(a,Je,{duration:300},!0)),l.run(1))}),c=!0)},o(h){se(u),se(s.$$.fragment,h),i&&i.invalidate(),n=eo(e,r[17],{duration:300}),l||(l=Qe(a,Je,{duration:300},!1)),l.run(0),c=!1},d(h){h&&(J(e),J(o),J(a)),u&&u.d(),be(s),h&&n&&n.end(),h&&l&&l.end()}}}function On(r){let e,t,s,i,n,o,a;return t=new fa({}),{c(){e=z("div"),De(t.$$.fragment),s=de(),i=z("span"),i.textContent="Shop now",S(i,"class","svelte-1bjq20e"),S(e,"class","shop-btn svelte-1bjq20e"),S(e,"tabindex","0"),S(e,"role","button")},m(l,c){ie(l,e,c),Ae(t,e,null),$(e,s),$(e,i),n=!0,o||(a=[le(e,"click",r[36]),le(e,"keydown",function(){We(wn(r[37]))&&wn(r[37]).apply(this,arguments)})],o=!0)},p(l,c){r=l},i(l){n||(X(t.$$.fragment,l),n=!0)},o(l){se(t.$$.fragment,l),n=!1},d(l){l&&J(e),be(t),o=!1,Me(a)}}}function Zd(r){let e;return{c(){e=rt(r[1])},m(t,s){ie(t,e,s)},p(t,s){s[0]&2&&_s(e,t[1])},d(t){t&&J(e)}}}function Mn(r){let e,t;return e=new Ud({props:{closer:r[38],productTitle:r[5].title,productHref:r[5].href,productImage:r[5].image,productPrice:r[16]}}),{c(){De(e.$$.fragment)},m(s,i){Ae(e,s,i),t=!0},p(s,i){const n={};i[0]&1024&&(n.closer=s[38]),i[0]&32&&(n.productTitle=s[5].title),i[0]&32&&(n.productHref=s[5].href),i[0]&32&&(n.productImage=s[5].image),i[0]&65536&&(n.productPrice=s[16]),e.$set(n)},i(s){t||(X(e.$$.fragment,s),t=!0)},o(s){se(e.$$.fragment,s),t=!1},d(s){be(e,s)}}}function Jd(r){let e,t,s,i,n,o=!0,a,l,c,u,h=r[2]&&kn(r);return{c(){e=z("div"),t=z("video"),s=z("track"),a=de(),h&&h.c(),S(s,"kind","captions"),mi(s.src,i="https://samsung-shorts.s3.eu-west-2.amazonaws.com/music.vtt")||S(s,"src",i),S(s,"srclang","en"),S(s,"label","English"),t.playsInline=!0,t.loop=!0,t.autoplay=!0,t.muted=r[18],S(t,"crossorigin","anonymous"),S(t,"tabindex",n=r[2]?0:-1),S(t,"class","svelte-1bjq20e"),S(e,"class","thumbnail svelte-1bjq20e"),Ue(e,"background-image",`url(${r[0]})`)},m(d,g){ie(d,e,g),$(e,t),$(t,s),r[25](t),$(e,a),h&&h.m(e,null),l=!0,c||(u=[le(t,"click",Ei(yi(function(){We(r[2]&&(r[11].paused?r[8]:r[9]))&&(r[2]&&(r[11].paused?r[8]:r[9])).apply(this,arguments)}))),le(t,"loadedmetadata",r[26]),le(t,"timeupdate",r[27]),le(t,"volumechange",r[28]),le(t,"pause",r[29]),le(t,"play",r[30]),le(t,"pause",r[30])],c=!0)},p(d,g){r=d,(!l||g[0]&262144)&&(t.muted=r[18]),(!l||g[0]&4&&n!==(n=r[2]?0:-1))&&S(t,"tabindex",n),g[0]&16384&&o!==(o=r[14])&&t[o?"pause":"play"](),r[2]?h?(h.p(r,g),g[0]&4&&X(h,1)):(h=kn(r),h.c(),X(h,1),h.m(e,null)):h&&(ct(),se(h,1,1,()=>{h=null}),ut()),g[0]&1&&Ue(e,"background-image",`url(${r[0]})`)},i(d){l||(X(h),l=!0)},o(d){se(h),l=!1},d(d){d&&J(e),r[25](null),h&&h.d(),c=!1,Me(u)}}}const ef=r=>null;function tf(r,e,t){let s,i,{img:n}=e,{title:o}=e,{playlistSrc:a}=e,{isVisible:l}=e,{scrollBy:c}=e,{isFirstOrLast:u}=e,{product:h}=e,{closer:d}=e,{url:g}=e;const f=Qn("isMuted");va(r,f,B=>t(18,i=B));let m,p,E,x=!1,T,_=!1;const A=()=>{if(m)if(t(11,m.src=a,m),gt.isSupported()){let B=new gt({maxBufferLength:4});B.loadSource(a),B.attachMedia(m)}else m.canPlayType("application/vnd.apple.mpegurl")&&t(11,m.src=a,m)},C=()=>{m&&m.play()},L=()=>{m&&m.pause()},v=()=>{m&&(t(11,m.currentTime=0,m),m.pause(),t(15,_=!1),t(10,x=!1))},I=()=>{m&&(m.paused?C():L())},R=()=>{f.update(B=>!B)};let k="";Hi(()=>{if(t(15,_=!1),h)try{console.assert(!!h.sku),fetch(`https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/products/?productCodes=${h.sku}&fields=price,promotionPrice`).then(B=>B.json()).then(B=>{B[0].promotionPrice?t(16,k=B[0].promotionPrice.formattedValue):t(16,k=B[0].price.formattedValue)})}catch(B){console.log(B)}});function U(B){et[B?"unshift":"push"](()=>{m=B,t(11,m)})}const K=()=>{t(13,E=m.duration)},O=()=>{t(12,p=m.currentTime)},G=()=>{f.set(m.muted)},P=()=>{t(15,_=!0)};function F(){T=this.paused,t(14,T)}const Z=B=>{(B.key==="Enter"||B.key===" ")&&c(-1)},N=B=>{(B.key==="Enter"||B.key===" ")&&c(1)},M=()=>{R()},q=B=>{B.key==="Enter"&&R()},j=B=>{let ye=B.target.getBoundingClientRect(),xe;B.touches&&B.touches.length?xe=B.touches[0].clientX-ye.left:B.changedTouches?xe=B.changedTouches[0].clientX-ye.left:xe=B.clientX-ye.left;let Ye=xe/ye.width;t(11,m.currentTime=Ye*E,m)},ee=()=>{t(10,x=!0)},ae=()=>{t(10,x=!0)},he=()=>{t(10,x=!1)};return r.$$set=B=>{"img"in B&&t(0,n=B.img),"title"in B&&t(1,o=B.title),"playlistSrc"in B&&t(21,a=B.playlistSrc),"isVisible"in B&&t(2,l=B.isVisible),"scrollBy"in B&&t(3,c=B.scrollBy),"isFirstOrLast"in B&&t(4,u=B.isFirstOrLast),"product"in B&&t(5,h=B.product),"closer"in B&&t(6,d=B.closer),"url"in B&&t(7,g=B.url)},r.$$.update=()=>{r.$$.dirty[0]&1024&&t(17,s=x?()=>{}:Je)},[n,o,l,c,u,h,d,g,C,L,x,m,p,E,T,_,k,s,i,f,R,a,A,v,I,U,K,O,G,P,F,Z,N,M,q,j,ee,ae,he]}class sf extends Pe{constructor(e){super(),ke(this,e,tf,Jd,Ce,{img:0,title:1,playlistSrc:21,isVisible:2,scrollBy:3,isFirstOrLast:4,product:5,closer:6,url:7,preloadVideo:22,playVideo:8,pauseVideo:9,resetVideo:23,togglePause:24},null,[-1,-1])}get preloadVideo(){return this.$$.ctx[22]}get playVideo(){return this.$$.ctx[8]}get pauseVideo(){return this.$$.ctx[9]}get resetVideo(){return this.$$.ctx[23]}get togglePause(){return this.$$.ctx[24]}}const{document:Nn}=Ra;function Bn(r,e,t){const s=r.slice();return s[21]=e[t],s[22]=e,s[23]=t,s}function Un(r){let e,t,s,i,n,o;function a(d){r[8](d,r[21])}function l(d){r[9](d,r[21])}function c(d){r[10](d,r[21])}function u(d){r[11](d,r[21])}let h={img:r[21].posterImg,playlistSrc:r[21].playlist,isVisible:r[23]===r[3],isFirstOrLast:r[23]===0?"first":r[23]===r[1].length-1?"last":"",scrollBy:r[5],product:r[21].product,closer:r[0],title:r[21].title,url:r[21].url};return r[2][r[21].id].preloader!==void 0&&(h.preloadVideo=r[2][r[21].id].preloader),r[2][r[21].id].reset!==void 0&&(h.resetVideo=r[2][r[21].id].reset),r[2][r[21].id].play!==void 0&&(h.playVideo=r[2][r[21].id].play),r[2][r[21].id].pauseToggle!==void 0&&(h.togglePause=r[2][r[21].id].pauseToggle),e=new sf({props:h}),et.push(()=>as(e,"preloadVideo",a)),et.push(()=>as(e,"resetVideo",l)),et.push(()=>as(e,"playVideo",c)),et.push(()=>as(e,"togglePause",u)),{c(){De(e.$$.fragment)},m(d,g){Ae(e,d,g),o=!0},p(d,g){r=d;const f={};g&2&&(f.img=r[21].posterImg),g&2&&(f.playlistSrc=r[21].playlist),g&8&&(f.isVisible=r[23]===r[3]),g&2&&(f.isFirstOrLast=r[23]===0?"first":r[23]===r[1].length-1?"last":""),g&2&&(f.product=r[21].product),g&1&&(f.closer=r[0]),g&2&&(f.title=r[21].title),g&2&&(f.url=r[21].url),!t&&g&6&&(t=!0,f.preloadVideo=r[2][r[21].id].preloader,os(()=>t=!1)),!s&&g&6&&(s=!0,f.resetVideo=r[2][r[21].id].reset,os(()=>s=!1)),!i&&g&6&&(i=!0,f.playVideo=r[2][r[21].id].play,os(()=>i=!1)),!n&&g&6&&(n=!0,f.togglePause=r[2][r[21].id].pauseToggle,os(()=>n=!1)),e.$set(f)},i(d){o||(X(e.$$.fragment,d),o=!0)},o(d){se(e.$$.fragment,d),o=!1},d(d){be(e,d)}}}function rf(r){let e,t,s,i,n,o,a,l,c=Pt(r[1]),u=[];for(let d=0;d<c.length;d+=1)u[d]=Un(Bn(r,c,d));const h=d=>se(u[d],1,1,()=>{u[d]=null});return{c(){e=z("meta"),t=de(),s=de(),i=z("div"),n=z("div");for(let d=0;d<u.length;d+=1)u[d].c();S(e,"name","viewport"),S(e,"content","width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"),S(n,"class","shorts-carousel svelte-1gvmdpp"),S(i,"class","shorts-bg svelte-1gvmdpp")},m(d,g){$(Nn.head,e),ie(d,t,g),ie(d,s,g),ie(d,i,g),$(i,n);for(let f=0;f<u.length;f+=1)u[f]&&u[f].m(n,null);r[12](n),o=!0,a||(l=le(Nn.body,"keydown",r[6]),a=!0)},p(d,[g]){if(g&47){c=Pt(d[1]);let f;for(f=0;f<c.length;f+=1){const m=Bn(d,c,f);u[f]?(u[f].p(m,g),X(u[f],1)):(u[f]=Un(m),u[f].c(),X(u[f],1),u[f].m(n,null))}for(ct(),f=c.length;f<u.length;f+=1)h(f);ut()}},i(d){if(!o){for(let g=0;g<c.length;g+=1)X(u[g]);o=!0}},o(d){u=u.filter(Boolean);for(let g=0;g<u.length;g+=1)se(u[g]);o=!1},d(d){d&&(J(t),J(s),J(i)),J(e),pi(u,d),r[12](null),a=!1,l()}}}function nf(r){const e=r.getBoundingClientRect();return console.log("rect.top",e.top,e.top>=0,"rect.left",e.left,e.left>=0,"rect.bottom",e.bottom,e.bottom<=(window.innerHeight||document.documentElement.clientHeight),"rect.right",e.right,e.right<=(window.innerWidth||document.documentElement.clientWidth),"window.innerHeight",window.innerHeight,"document.documentElement.clientHeight",document.documentElement.clientHeight,"window.innerWidth",window.innerWidth),e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&(window.innerHeight<768||e.right<=(window.innerWidth||document.documentElement.clientWidth))}function of(r,e,t){let{closer:s}=e,{videos:i}=e,{openIndex:n}=e,o=i.reduce((v,I)=>({...v,[I.id]:{}}),{});Ua("isMuted",Fd(!0));const a="netscape"in window&&/ rv:/.test(navigator.userAgent)||typeof InstallTrigger<"u";let l,c;function u(){l&&t(4,l.style.scrollSnapType="initial",l)}function h(){l&&t(4,l.style.scrollSnapType="x mandatory",l)}function d(v,I=!1){var U;if(!l)return;const k=Array.from(l.children)[c+v];k&&(console.log(k,c,v),a?(u(),setTimeout(()=>{k.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},100),setTimeout(h,300)):(console.log("not firefox"),k.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})),I&&((U=k.querySelector("video"))==null||U.focus({focusVisible:!1,preventScroll:!0})))}function g(){if(!l)return;Array.from(l.children).find((I,R)=>{if(console.log(I,R),nf(I))return t(3,c=R),console.log("El visible:",c),!0})}const f=Kd(d,1e3),m=Hd(g,50);function p(v){l&&(window.innerWidth<767||(v.deltaY>10&&Math.abs(v.deltaY)>Math.abs(v.deltaX)?(f(1),v.preventDefault()):v.deltaY<-10&&Math.abs(v.deltaY)>Math.abs(v.deltaX)&&(f(-1),v.preventDefault())))}Hi(()=>{const v=Array.from(l.children);if(n!==null){console.log("openIndex",n);const I=v[n];console.log("openIndex El",I),I&&I.scrollIntoView({inline:"center"})}else console.log("no openIndex");return g(),l.addEventListener("wheel",p),l.addEventListener("scroll",m),()=>{l.removeEventListener("wheel",p),l.removeEventListener("scroll",m)}});const E=Qn("isMuted");function x(v){switch(v.key){case"Enter":case" ":i[c]&&o[i[c].id]&&o[i[c].id].pauseToggle&&o[i[c].id].pauseToggle();break;case"ArrowRight":d(1,!0);break;case"ArrowLeft":d(-1,!0);break;case"m":E.update(I=>!I);break;case"Escape":s();break}}function T(v,I){r.$$.not_equal(o[I.id].preloader,v)&&(o[I.id].preloader=v,t(2,o),t(1,i),t(3,c))}function _(v,I){r.$$.not_equal(o[I.id].reset,v)&&(o[I.id].reset=v,t(2,o),t(1,i),t(3,c))}function A(v,I){r.$$.not_equal(o[I.id].play,v)&&(o[I.id].play=v,t(2,o),t(1,i),t(3,c))}function C(v,I){r.$$.not_equal(o[I.id].pauseToggle,v)&&(o[I.id].pauseToggle=v,t(2,o),t(1,i),t(3,c))}function L(v){et[v?"unshift":"push"](()=>{l=v,t(4,l)})}return r.$$set=v=>{"closer"in v&&t(0,s=v.closer),"videos"in v&&t(1,i=v.videos),"openIndex"in v&&t(7,n=v.openIndex)},r.$$.update=()=>{r.$$.dirty&8&&console.log(c),r.$$.dirty&14&&(i[c]&&[-1,0,1].forEach(v=>{const I=i[c+v];I&&I&&o&&o[I.id]&&!o[I.id].isPreloaded&&(o[I.id].preloader(),t(2,o[I.id].isPreloaded=!0,o))}),i.forEach(async(v,I)=>{if(!(!o[v.id].hasOwnProperty("play")||!o[v.id].hasOwnProperty("reset")))if(I===c)try{await o[v.id].play()}catch(R){console.error(R)}else o[v.id].reset()}))},[s,i,o,c,l,d,x,n,T,_,A,C,L]}class af extends Pe{constructor(e){super(),ke(this,e,of,rf,Ce,{closer:0,videos:1,openIndex:7})}}function lf(r){let e,t,s;return{c(){e=fe("svg"),t=fe("circle"),s=fe("path"),S(t,"cx","20.6667"),S(t,"cy","20.6667"),S(t,"r","17.9167"),S(t,"stroke","white"),S(t,"stroke-width","1.5"),S(s,"d","M28.0347 19.8269C28.644 20.2209 28.644 21.1124 28.0347 21.5064L18.3763 27.7518C17.7109 28.1821 16.8333 27.7044 16.8333 26.9121L16.8333 14.4212C16.8333 13.6289 17.7109 13.1513 18.3763 13.5815L28.0347 19.8269Z"),S(s,"fill","white"),S(e,"width","42"),S(e,"height","34"),S(e,"viewBox","0 0 42 42"),S(e,"fill","none"),S(e,"xmlns","http://www.w3.org/2000/svg"),S(e,"class","svelte-l7r38q")},m(i,n){ie(i,e,n),$(e,t),$(e,s)},p:oe,i:oe,o:oe,d(i){i&&J(e)}}}class cf extends Pe{constructor(e){super(),ke(this,e,null,lf,Ce,{})}}function uf(r){let e,t,s,i,n,o,a,l,c;return s=new cf({}),{c(){e=z("div"),t=z("div"),De(s.$$.fragment),i=de(),n=z("h4"),o=rt(r[2]),S(n,"class","svelte-15zqe5d"),S(t,"class","thumbnail-content svelte-15zqe5d"),S(e,"class","thumbnail svelte-15zqe5d"),S(e,"tabindex","0"),S(e,"role","button"),Ue(e,"background-image",`url(${window.innerWidth>767?r[0]:r[1]})`)},m(u,h){ie(u,e,h),$(e,t),Ae(s,t,null),$(t,i),$(t,n),$(n,o),a=!0,l||(c=[le(e,"click",r[4]),le(e,"keydown",r[5])],l=!0)},p(u,[h]){(!a||h&4)&&_s(o,u[2]),h&3&&Ue(e,"background-image",`url(${window.innerWidth>767?u[0]:u[1]})`)},i(u){a||(X(s.$$.fragment,u),a=!0)},o(u){se(s.$$.fragment,u),a=!1},d(u){u&&J(e),be(s),l=!1,Me(c)}}}function hf(r,e,t){let{img:s}=e,{imgMo:i}=e,{title:n}=e,{link:o}=e;function a(c){vr.call(this,r,c)}function l(c){vr.call(this,r,c)}return r.$$set=c=>{"img"in c&&t(0,s=c.img),"imgMo"in c&&t(1,i=c.imgMo),"title"in c&&t(2,n=c.title),"link"in c&&t(3,o=c.link)},[s,i,n,o,a,l]}class df extends Pe{constructor(e){super(),ke(this,e,hf,uf,Ce,{img:0,imgMo:1,title:2,link:3})}}function Gn(r,e,t){const s=r.slice();return s[6]=e[t],s[8]=t,s}function $n(r,e,t){const s=r.slice();return s[6]=e[t],s}function Vn(r){let e;return{c(){e=z("link"),S(e,"rel","preload"),S(e,"href",r[6].posterImg),S(e,"as","image")},m(t,s){ie(t,e,s)},p:oe,d(t){t&&J(e)}}}function Kn(r){let e,t;function s(...n){return r[3](r[8],...n)}function i(...n){return r[4](r[8],...n)}return e=new df({props:{img:r[6].thumbnail,imgMo:r[6].thumbnailMo,title:r[6].microTitle||r[6].title,link:r[6].url}}),e.$on("click",s),e.$on("keydown",i),{c(){De(e.$$.fragment)},m(n,o){Ae(e,n,o),t=!0},p(n,o){r=n},i(n){t||(X(e.$$.fragment,n),t=!0)},o(n){se(e.$$.fragment,n),t=!1},d(n){be(e,n)}}}function Hn(r){let e,t;return e=new af({props:{videos:r[2],openIndex:r[1],closer:r[5]}}),{c(){De(e.$$.fragment)},m(s,i){Ae(e,s,i),t=!0},p(s,i){const n={};i&2&&(n.openIndex=s[1]),i&1&&(n.closer=s[5]),e.$set(n)},i(s){t||(X(e.$$.fragment,s),t=!0)},o(s){se(e.$$.fragment,s),t=!1},d(s){be(e,s)}}}function ff(r){let e,t,s,i,n,o,a,l,c=Pt(r[2]),u=[];for(let m=0;m<c.length;m+=1)u[m]=Vn($n(r,c,m));let h=Pt(r[2]),d=[];for(let m=0;m<h.length;m+=1)d[m]=Kn(Gn(r,h,m));const g=m=>se(d[m],1,1,()=>{d[m]=null});let f=r[0]&&Hn(r);return{c(){for(let m=0;m<u.length;m+=1)u[m].c();e=Vi(),t=de(),s=z("div"),i=z("h3"),i.textContent="Explore the Galaxy Book4",n=de(),o=z("div");for(let m=0;m<d.length;m+=1)d[m].c();a=de(),f&&f.c(),S(i,"class","svelte-1ngxxea"),S(o,"class","thumbnail-container svelte-1ngxxea"),S(s,"class","cheil-samsung-shorts svelte-1ngxxea")},m(m,p){for(let E=0;E<u.length;E+=1)u[E]&&u[E].m(document.head,null);$(document.head,e),ie(m,t,p),ie(m,s,p),$(s,i),$(s,n),$(s,o);for(let E=0;E<d.length;E+=1)d[E]&&d[E].m(o,null);$(s,a),f&&f.m(s,null),l=!0},p(m,[p]){if(p&4){c=Pt(m[2]);let E;for(E=0;E<c.length;E+=1){const x=$n(m,c,E);u[E]?u[E].p(x,p):(u[E]=Vn(x),u[E].c(),u[E].m(e.parentNode,e))}for(;E<u.length;E+=1)u[E].d(1);u.length=c.length}if(p&7){h=Pt(m[2]);let E;for(E=0;E<h.length;E+=1){const x=Gn(m,h,E);d[E]?(d[E].p(x,p),X(d[E],1)):(d[E]=Kn(x),d[E].c(),X(d[E],1),d[E].m(o,null))}for(ct(),E=h.length;E<d.length;E+=1)g(E);ut()}m[0]?f?(f.p(m,p),p&1&&X(f,1)):(f=Hn(m),f.c(),X(f,1),f.m(s,null)):f&&(ct(),se(f,1,1,()=>{f=null}),ut())},i(m){if(!l){for(let p=0;p<h.length;p+=1)X(d[p]);X(f),l=!0}},o(m){d=d.filter(Boolean);for(let p=0;p<d.length;p+=1)se(d[p]);se(f),l=!1},d(m){m&&(J(t),J(s)),pi(u,m),J(e),pi(d,m),f&&f.d()}}}const Ee="https://images.samsung.com/is/image/samsung/assets/uk/smartphones/samsung-shorts/";function gf(r,e,t){let s=!1;const i=[{id:"coding",url:"https://www.youtube.com/shorts/KUzf-dZNIUE",posterImg:Ee+"coding-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/Coding.m3u8",thumbnail:Ee+"Thumb_Desktop_Coding.png",thumbnailMo:Ee+"Thumb_Mobile_Coding.png",title:"Best Samsung Laptop For Coding & Programming | Galaxy Book4 360",microTitle:"Best Samsung Laptop For Coding & Programming",product:{title:"Galaxy Book4 360",sku:"NP750QGK-KG3UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP750QGK-KG3UK",image:Ee+"book460.png"}},{id:"editing",url:"https://www.youtube.com/shorts/0hK9UEi0UMY",posterImg:Ee+"editing-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/Editing.m3u8",thumbnail:Ee+"Thumb_Desktop_Editing.png",thumbnailMo:Ee+"Thumb_Mobile_Editing.png",title:"Best Samsung Laptop For Video Editing | Galaxy Book 4 Ultra",microTitle:"Best Samsung Laptop For Video Editing",product:{title:"Galaxy Book4 Ultra",sku:"NP960XGL-XG2UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG2UK",image:"https://images.samsung.com/is/image/samsung/p6pim/uk/np960xgl-xg2uk/gallery/uk-galaxy-book4-ultra-16-inch-np960-495490-np960xgl-xg2uk-539836168?$400_N_PNG$"}},{id:"personalisation",url:"https://www.youtube.com/shorts/n1SsrGV4PLY",posterImg:Ee+"personalisation-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/Personalisation.m3u8",thumbnail:Ee+"Thumb_Desktop_Personalisation.png",thumbnailMo:Ee+"Thumb_Mobile_Personalisation.png",title:"Samsung Galaxy Book 4 Laptop Range Personalised Wallpaper",microTitle:"Personalise your Galaxy Book4",product:{title:"Galaxy Book4",sku:"NP750XGK-KG4UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP750XGK-KG4UK",image:"https://images.samsung.com/is/image/samsung/p6pim/uk/np750xgl-xg1uk/gallery/uk-galaxy-book-np750xgl-xg1uk-top-l-perspective-gray-539965546?$400_N_PNG$"}},{id:"unboxing",url:"https://www.tiktok.com/@samsunguk/video/7369878488817339680?lang=en",posterImg:Ee+"unboxing-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/Unboxing.m3u8",thumbnail:Ee+"Thumb_Desktop_Unboxing.png",thumbnailMo:Ee+"Thumb_Mobile_Unboxing.png",title:"Samsung Galaxy Book4 Pro Laptop Unboxing",product:{title:"Galaxy Book4 Pro",sku:"NP944XGK-KG2UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP944XGK-KG2UK",image:"https://images.samsung.com/is/image/samsung/p6pim/uk/np944xgk-kg1uk/gallery/uk-galaxy-book4-pro-14-inch-np940-497600-np944xgk-kg1uk-540062109?$400_N_PNG$"}},{id:"student",url:"https://www.youtube.com/shorts/NGFc8AjImAA",posterImg:Ee+"student-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/Student.m3u8",thumbnail:Ee+"Thumb_Desktop_Student.png",thumbnailMo:Ee+"Thumb_Mobile_Student.png",title:"Best Samsung Laptop For Students | Galaxy Book4 360",microTitle:"Best Samsung Laptop For Students",product:{title:"Galaxy Book4 360",sku:"NP750QGK-KG3UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP750QGK-KG3UK",image:Ee+"book460.png"}},{id:"wfh",url:"https://www.youtube.com/shorts/B1V11xJ5VRE",posterImg:Ee+"wfh-video-thumb_webp.png",playlist:"https://samsung-shorts.s3.eu-west-2.amazonaws.com/WFH.m3u8",thumbnail:Ee+"Thumb_Desktop_WFH.png",thumbnailMo:Ee+"Thumb_Mobile_WFH.png",title:"Best Samsung Laptop for Work | Galaxy Book 4 Pro 360",microTitle:"Best Samsung Laptop for Work",product:{title:"Galaxy Book4 Pro 360",sku:"NP960QGK-KG2UK",href:"https://www.samsung.com/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP960QGK-KG2UK",image:"https://images.samsung.com/is/image/samsung/p6pim/uk/np750qgk-kg3uk/gallery/uk-galaxy-book4-360-156-inch-np750-495724-np750qgk-kg3uk-539866700?$400_250_PNG$"}}];let n=0;return[s,n,i,(c,u)=>{u.target.tagName!=="A"&&(t(1,n=c),t(0,s=!0))},(c,u)=>{(u.key==="Enter"||u.key===" ")&&(t(1,n=c),t(0,s=!0))},()=>{t(0,s=!1)}]}class mf extends Pe{constructor(e){super(),ke(this,e,gf,ff,Ce,{})}}const ga=(r=50)=>{if(r===0){console.error("Could not find #samsung-shorts-app");return}if(!document.getElementById("samsung-shorts-app"))setTimeout(()=>ga(r-1),500);else{const t=new mf({target:document.getElementById("samsung-shorts-app")});window.shortsApp=t}};ga(); })(); }); </script> </div> <div class="static-content aem-GridColumn aem-GridColumn--default--12"> <style scoped="scoped"> #cheil-static, #cheil-static-computing-pcd * { box-sizing: border-box; } .noScrollBars { -webkitscrollbar-width: 0; } .noScrollBars::-webkit-scrollbar { display: none; } .visible-in-aem { display: none; } .aem-AuthorLayer-Edit .visible-in-aem { display: block; } #rtbBanner { padding: min(120px, 8.33vw) 0; } #comparisonTable_Desktop td, #comparisonTable_Desktop th { text-align: center; padding: 1.2em 0; } #comparisonTable_Desktop tr { width: 100%; } @media only screen and (min-width: 768px) { #rtbBanner .feature-column-carousel__content { margin-top: -20px; align-items: center; justify-content: center; } #rtbBanner .feature-column-carousel__button { margin-top: 0; margin-bottom: 12px; } #rtbBanner .feature-column-carousel__sub-title { padding-bottom: 4px; } } @media only screen and (max-width: 767px) { #rtbBanner { padding: 16.66vw 0; } #rtbBanner .feature-column-carousel__feature { flex-wrap: nowrap; align-items: stretch; width: 100%; } #rtbBanner .feature-column-carousel__figure { width: 40%; } #rtbBanner .feature-column-carousel__content { margin-top: 0; text-align: left; width: 60%; } #rtbBanner .feature-column-carousel__sub-title { padding-bottom: 6px; } #rtbBanner .title { font-size: 17px !important; } #rtbBanner .feature-column-carousel__text { padding-bottom: 0; } #rtbBanner .feature-column-carousel__text:last-child { padding-bottom: 5.55555556vw; } #rtbBanner .subTitle { font-size: 14px !important; } #rtbBanner .feature-column-carousel__button { margin-top: 0; margin-bottom: 0; } #rtbBanner .feature-column-carousel__inner:first-child { padding-top: 10px !important; } th { width: 30%; } th:first-of-type { width: 20%; } } #spr-live-chat-app { opacity: 0 !important; pointer-events: none !important; } #meet-our-laptops > div:nth-child(5) > div:nth-child(2) { display:none; } </style> <style> * { line-height:1.4; } button {cursor:pointer;} /* Hide scrollbar for Chrome, Safari and Opera */ #slider::-webkit-scrollbar { display: none; } #slider-two::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ #slider, #slider-two{ -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } .hasDivider::after { content: ""; height: 0.85em; width: 1px; border-left: 1px solid white; right: 0; position: absolute; top: 0.15em; } .configurator_container { background-image: radial-gradient( circle at 100% 100%, transparent 20px, #363636 20px, #363636 21px, transparent 21px ), linear-gradient(to right, #363636, #363636), radial-gradient( circle at 0% 100%, transparent 20px, #363636 20px, #363636 21px, transparent 21px ), linear-gradient(to bottom, #363636, #000000), radial-gradient( circle at 0% 0%, transparent 20px, #000000 20px, #000000 21px, transparent 21px ), linear-gradient(to left, #000000, #000000), radial-gradient( circle at 100% 0%, transparent 20px, #000000 20px, #000000 21px, transparent 21px ), linear-gradient(to top, #000000, #363636) !important; background-size: 21px 21px, calc(100% - 42px) 1px, 21px 21px, 1px calc(100% - 42px) !important; background-position: top left, top center, top right, center right, bottom right, bottom center, bottom left, center left !important; background-repeat: no-repeat !important; } .noScrollBars::-webkit-scrollbar { display: none; } .noScrollBars { -ms-overflow-style: none; scrollbar-width: none; } model-viewer#interaction { --poster-color: transparent; } .ieOnly { display: none; } .Internet-Explorer .ieOnly { background: black; color: white; display: flex; flex-direction: column; justify-content: center; padding: 2em; margin: 0 auto; text-align: center; height: 100%; } .Internet-Explorer .ieOnly h2 { font-family: "SamsungSharpSans"; font-size: 3em; margin-bottom: 0.75em; } .Internet-Explorer .ieOnly p { font-size: 1.5em; margin: 0.75em auto; } /* Fallback stuff */ progress[value] { appearance: none; /* Needed for Safari */ border: none; /* Needed for Firefox */ color: #fff; /* Fallback to a solid color */ } /* WebKit styles */ progress[value]::-webkit-progress-value { background-image: linear-gradient( to right, #FFF, #FFF ); transition: width 0.3s linear; } /* Firefox styles */ progress[value]::-moz-progress-bar { background-image: -moz-linear-gradient( right, #FFF, #FFF ); } progress::-webkit-progress-bar { background: #1E1E1E; } progress { display: block; z-index: 14; height: 2px; z-index: 10; position: absolute; bottom: 20px; width: 100%; } .youtube-shorts-slider div:last-of-type { padding-right:20px; } /* Hide scrollbar for Chrome, Safari and Opera */ .youtube-shorts-slider::-webkit-scrollbar { display: none; } /* Hide scrollbar for IE, Edge and Firefox */ .youtube-shorts-slider { -ms-overflow-style: none; /* IE and Edge */ scrollbar-width: none; /* Firefox */ } </style> <noscript>You need to enable JavaScript to run this app.</noscript> <div id="cheil-static-computing-pcd" style="overflow-x:hidden"></div> <div class="ieOnly"> <h2>Internet Explorer is no longer supported.</h2> <p> Please use alternative web browsers like Chrome, Firefox or Edge to access this page. </p> <p> To proceed, we recommend copying and pasting the URL from the address bar to Chrome, Edge or Firefox. </p> </div> <script> ;(function(win,doc,callback){'use strict';callback=callback||function(){};function detach(){if(doc.addEventListener){doc.removeEventListener('DOMContentLoaded',completed);}else{doc.detachEvent('onreadystatechange',completed);}}function completed(){if(doc.addEventListener||event.type==='load'||doc.readyState==='complete'){detach();callback(window,window.jQuery);}}function init(){if (doc.addEventListener){doc.addEventListener('DOMContentLoaded',completed);}else{doc.attachEvent('onreadystatechange',completed);}}init();})(window,document,function(win,$){ /*! For license information please see main.1ce31aa1.js.LICENSE.txt */ !function(){var e={4861:function(e,t,n){var r,o=n(621).default;var i=n(3978),a=n(184),s=n(2791),l=n(9587),u=n(4155);function c(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var d=c(i),f={colors:{black:"#000000",offBlack:"#363636",outOfStock:"#6E6A69",grey:"#bebebe",lightGrey:"#f8f8f8",white:"#ffffff",offWhite:"#F2F2F2",primary:"#2189ff",accent:"#2189ff",secondary:"#0274C2",red:"#FF4337",green:"#0f0"},fonts:{primary:"SamsungOne, sans-serif",secondary:"SamsungSharpSans, sans-serif",tertiary:"sssM, SamsungSharpSans, sans-serif",quaternary:"sssR, SamsungSharpSans, sans-serif",baseSize:16,sizes:{terms:8,xs:10,button:12,s:14,sm:16,m:18,l:24,xl:30,xxl:40,massive:75,brow:17,title:38,header:34,body:19,video:12}},breakpoints:{desktop:1440,tablet:900,smallMobile:400,mobile:768}},p=i.createGlobalStyle(r||(r=o([" \n\n [hidden] {\n display: none;\n }\n\n font-family: 'SamsungOne, sans-serif';\n\t\n\tmargin: auto;\n\tbackground: white;\n\tcolor: black;\n\n\t> div,\n\t.maxwidth-limit {\n\t\tmax-width: 1440px;\n\t\tmargin: 0 auto;\n\t}\n\n\t.disclaimer {\n\t\twidth: 80%;\n\t\t@media screen and (min-width: 768px) {\n\t\t\twidth: 60%;\n\t\t}\n\t}\n\n\t.terms {\n\t\tmargin: 0vw 5.55556vw;\n\n\t\t@media screen and (min-width: 768px) {\n\t\t\tmargin: 0vw 8.19444vw;\n\t\t}\n\t\t@media screen and (min-width: 1440px) {\n\t\t\tmargin: 0 120px;\n\t\t}\n\t}\n\n @font-face {\n font-family: 'SamsungSharpSans';\n src: url('https://d199c2lmsg7yuw.cloudfront.net/SamsungSharpSans-Regular.otf') format('opentype');\n font-style: normal;\n font-weight: 400;\n }\n\n @font-face {\n font-family: 'SamsungSharpSans';\n src: url('https://d199c2lmsg7yuw.cloudfront.net/SamsungSharpSans-Medium.otf') format('opentype');\n font-style: normal;\n font-weight: 500;\n }\n\n @font-face {\n font-family: 'SamsungSharpSans';\n src: url('https://d199c2lmsg7yuw.cloudfront.net/SamsungSharpSans-Bold.otf') format('opentype');\n font-style: normal;\n font-weight: 700;\n }\n\n \n .cheil-static-ecom *, .cheil-static-ecom *:after, .cheil-static-ecom *:before {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n scroll-behavior: smooth;\n \n }\n\n .cheil-static-ecom {\n overflow: hidden;\n }\n \n #content > div.par.parsys > div.cl-g-sticky-navigation-text.section {\n display: none;\n }\n \n .visibleNav {\n display: block !important;\n }\n \n .pointer {\n cursor: pointer;\n }\n\n .addeventatc-selected {\n top: -175px!important;\n }\n\n #addeventatc2-drop {\n top: 0px!important;\n left: -55%!important;\n }\n\n .addevent {\n color: #fff!important;\n display: flex!important;\n\n justify-content: center;\n align-items: center;\n }\n\n .addevent:hover {\n color: #000!important;\n background: rgba(0,0,0,0)!important;\n }\n\n .addevent:hover svg #calendar-icon > * {\n stroke: #000!important;\n }\n\n .addeventatc_dropdown {\n width: 186px;\n }\n\n .addeventatc_dropdown span {\n background: none!important;\n padding: 14px 10px 14px 18px!important;\n }\n\n .divider {\n position: relative;\n width: 2px;\n\n &:after {\n content: \"\";\n position: absolute;\n border-left: 2px solid black;\n height: 125%;\n border-radius: 2px;\n top: -0.2em;\n @media screen and (max-width: 768px) {\n border-left: 1px solid black;\n }\n }\n }\n\n .noWrap {\n white-space: nowrap;\n }\n\n .copyx {\n display: none!important;\n }\n\n .addeventatc {\n @media screen and (max-width: 768px){\n margin: 3em auto;\n }\n span {\n display: none;\n }\n }\n\n .addeventatc .addeventatc_icon { \n\n display: none;\n\n }\n\n .ReactModal__Overlay {\n background: rgba(0, 0, 0, 0.5)!important;\n }\n\n .slick-slider {\n display: flex;\n }\n\n .slick-track {\n display: flex!important;\n align-items: center!important;;\n }\n \n img {\n &:focus {\n outline: none;\n }\n }\n\n #MinimalForm {\n display: none;\n }\n\n .formIframe {\n border: 0;\n }\n\n .CompareArrowLeft {\n position: absolute;\n top: -40%;\n right: 15%;\n }\n\n .CompareArrowRight {\n position: absolute;\n top: -40%;\n left: 15%;\n }\n\n .flex-end {\n align-self: flex-end;\n }\n\n .flex-start {\n align-self: flex-start;\n }\n\n .wider {\n letter-spacing: 0.1em;\n }\n\n .slick-slide {\n /* height: 50vh; */\n max-width: 95vw !important;\n /* width: 75vw !important; */\n overflow: hidden;\n }\n .slick-slide:focus {\n outline: none;\n }\n\n .slick-slider {\n max-width: 1440px;\n width: 95vw;\n \n }\n\n .slick-track {\n \n width: 95vw;\n }\n\n #apps {\n .slick-slider{\n width: 100%;\n overflow: visible;\n margin: 0 auto;\n }\n\n .slick-arrow {\n display: none !important;\n }\n\n .slick-list {\n width: 100%;\n }\n }\n\n #cheil-id-root__financeModule{\n margin: 25px auto !important;\n }\n\n .ReactModal__Body--open, .ReactModal__Html--open {\n overflow: hidden;\n}\n\n.ReactModal__Content {\n opacity: 0;\n max-width:1440px;\n transition: opacity 300ms ease-in-out;\n}\n\n.ReactModal__Content--after-open {\n opacity: 1;\n}\n\n.ReactModal__Content--before-close {\n opacity: 0;\n}\n\n.animatedSvg {\n\tstroke-dasharray: 100;\n\tstroke-dashoffset: 100;\n &_concierge {\n animation: dash 3s ease-in-out 1s forwards;\n }\n &_chat {\n animation: dashAlt 3s ease-in-out 2s forwards;\n }\n &_appointment {\n animation: dash 3s ease-in-out 3s forwards;\n }\n &_people {\n animation: dash 3s ease-in-out 4s forwards;\n }\n\t\n}\n\n@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {\n .animatedSvg {\n stroke-width: 0;\n stroke-dashoffset: 0;\n stroke-dasharray: 0;\n &_concierge {\n animation: none;\n }\n &_chat {\n animation:none;\n }\n &_appointment {\n animation: none;\n }\n &_people {\n animation: none;\n }\n }\n}\n\n_:-ms-lang(x), _:-webkit-full-screen, .animatedSvg{ \n stroke-width: 0;\n stroke-dashoffset: 0;\n stroke-dasharray: 0;\n &_concierge {\n animation: none;\n }\n &_chat {\n animation:none;\n }\n &_appointment {\n animation: none;\n }\n &_people {\n animation: none;\n }\n}\n\n@keyframes dash {\n 0% {\n stroke-dashoffset: 100;\n \n \n }\n\t\n 100% {\n stroke-dashoffset: 0;\n stroke-width: 0\n \n }\n\n \n}\n\n@keyframes dashAlt {\n 0% {\n stroke-dashoffset: 100;\n \n \n }\n\t\n 100% {\n stroke-dashoffset: 0;\n \n \n }\n\n \n}\n\n\n"]))),h=function(e,t){var n=f.breakpoints.mobile,r=f.breakpoints.desktop,o=e*(1/1.8),i=e;return"\n ".concat(t,": ").concat(o,"px;\n \n @media screen and (max-width: ").concat(r,"px) {\n ").concat(t,": ").concat(100*e/r,"vw;\n }\n @media screen and (max-width: ").concat(n,"px) {\n ").concat(t,": ").concat(.15*e,"vmin;\n }\n @media screen and (min-width: ").concat(r,"px) {\n ").concat(t,": ").concat(i,"px;\n }\n ")},m=function(e){return h(e,"font-size")},v=function(){return v=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},v.apply(this,arguments)};function g(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var y,b,x=d.default((function(e){var t=e.className,n=e.children,r=e.ref,o=e.onClick,i=e.style,s=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["className","children","ref","onClick","style"]);return a.jsx("div",v({className:t,onClick:o,ref:r,style:v({},i)},s,{children:n}),void 0)}))(y||(y=g(["\n display: flex;\n max-width: 1440px;\n position: ",";\n flex-direction: ",";\n width: ",";\n height: ",";\n justify-content: ",";\n align-items: ",";\n flex-wrap: ",";\n margin: ",";\n padding: ",";\n background: ",";\n opacity: ",";\n ","\n"],["\n display: flex;\n max-width: 1440px;\n position: ",";\n flex-direction: ",";\n width: ",";\n height: ",";\n justify-content: ",";\n align-items: ",";\n flex-wrap: ",";\n margin: ",";\n padding: ",";\n background: ",";\n opacity: ",";\n ","\n"])),(function(e){return e.position?e.position:"relative"}),(function(e){return e.row?"row":"column"}),(function(e){return e.width||"auto"}),(function(e){return e.height||"auto"}),(function(e){return e.align||"center"}),(function(e){return e.alignItems||"center"}),(function(e){return e.wrap||(e.row?"initial":e.wrap)}),(function(e){return e.margin||"0 auto"}),(function(e){return e.padding||"1.2em"}),(function(e){return e.background||"initial"}),(function(e){return e.opacity||"1"}),(function(e){return"absolute"===e.position?"\n top: "+(e.top||"auto")+";\n bottom: "+(e.bottom||"auto")+";\n left:"+(e.left||"auto")+";\n right: "+(e.right||"auto")+";\n ":""})),w=d.default((function(e){var t=e.tag,n=void 0===t?"p":t,r=e.className,o=e.children,i=e.style;return s.createElement(n,{className:r,style:i},o)}))(b||(b=g(["\n font-family: ",";\n font-weight: ",";\n text-align: ",";\n margin: ",";\n text-decoration: ",";\n color: ",";\n white-space: ",";\n ","\n ","\n"],["\n font-family: ",";\n font-weight: ",";\n text-align: ",";\n margin: ",";\n text-decoration: ",";\n color: ",";\n white-space: ",";\n ","\n ","\n"])),(function(e){return e.font?e.theme.fonts[e.font]:e.theme.fonts.primary}),(function(e){return e.weight||"normal"}),(function(e){return e.align||"left"}),(function(e){return e.margin||"0"}),(function(e){return e.underline?"underline":"none"}),(function(e){return e.color?e.theme.colors[e.color]:e.theme.color}),(function(e){return e.wrap?e.wrap:"initial"}),(function(e){return m(e.size?"number"===typeof e.size?e.size:e.theme.fonts.sizes[e.size]:e.theme.fonts.baseSize)}),(function(e){return e.mobileSize&&("number"===typeof e.mobileSize?"@media screen and (max-width: "+e.theme.breakpoints.mobile+"px) {\n font-size: "+100*e.mobileSize/720+"vw;\n }":"@media screen and (max-width: "+e.theme.breakpoints.mobile+"px) {\n font-size: "+e.theme.fonts.sizes[e.mobileSize]+"px;\n }")}));function k(e){var t=s.useState(!1),n=t[0],r=t[1];return s.useEffect((function(){"undefined"===typeof window&&s.startTransition((function(){r(!1)})),r((null===window||void 0===window?void 0:window.innerWidth)<=e);var t=function(){s.startTransition((function(){r((null===window||void 0===window?void 0:window.innerWidth)<=e)}))};return null===window||void 0===window||window.addEventListener("resize",t),function(){null===window||void 0===window||window.removeEventListener("resize",t)}}),[]),n}function S(){return k(f.breakpoints.mobile)}var _=function(e){var t=e.src,n=e.mobileSrc,r=e.width,o=e.height,i=e.margin,l=e.loader,u=e.alt,c=e.className,d=e.align,f=e.style,p=a.jsx("div",{style:{width:r,height:o}},void 0),h=S();return a.jsx(s.Suspense,v({fallback:l||p},{children:a.jsx("img",{className:c,alt:u,src:h?n:t,draggable:"false",style:v({width:r,height:o,margin:i,alignSelf:d||"center"},f),onMouseDown:function(e){e.preventDefault()}},void 0)}),void 0)},E="computing-pcd-buying-guide",C={shouldForwardProp:function(e,t){return["ga-la","ga-ac","ga-ca","data-omni","data-omni-type"].includes(e)||t(e)}};function P(e,t){var n=t||"microsite";return{"data-omni-type":n,"data-omni":"uk:"+E+":"+e,"ga-ca":n,"ga-ac":""+E,"ga-la":E+":"+e}}var A,T,j,R,O,F,M,D=d.default.button.withConfig(C).attrs((function(e){return{backgroundColor:e.backgroundColor||e.theme.colors.black,borderColor:e.borderColor||e.theme.colors.black,size:e.size||e.theme.fonts.sizes.sm}}))(A||(A=g(["\n\tbackground: ",";\n\tcolor: ",";\n\t/* font-size: 0.97222vw; */\n\tborder-radius: 45px;\n\t","\n\tpadding: 0.8571em 2.712em;\n\ttransition: all 0.3s ease-in-out;\n\tborder-color: ",";\n\tborder-width: 1px;\n\tborder-style: solid;\n\tfont-weight: bold;\n\tline-height: 1;\n\ttext-transform: uppercase;\n\ttext-shadow: none;\n\t/* letter-spacing: 0.15em; */\n\tdisplay: inline-block;\n\t&:hover,\n\t&:focus {\n\t\tcolor: ",";\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\tborder-width: 1px;\n\t\tborder-style: solid;\n\t\ttransition: all 0.3s ease-in-out;\n\t}\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t@media screen and (min-width: ","px) {\n\t\tmax-width: 408px;\n\t}\n\n\t&:disabled {\n\t\tcolor: ",";\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t}\n"],["\n\tbackground: ",";\n\tcolor: ",";\n\t/* font-size: 0.97222vw; */\n\tborder-radius: 45px;\n\t","\n\tpadding: 0.8571em 2.712em;\n\ttransition: all 0.3s ease-in-out;\n\tborder-color: ",";\n\tborder-width: 1px;\n\tborder-style: solid;\n\tfont-weight: bold;\n\tline-height: 1;\n\ttext-transform: uppercase;\n\ttext-shadow: none;\n\t/* letter-spacing: 0.15em; */\n\tdisplay: inline-block;\n\t&:hover,\n\t&:focus {\n\t\tcolor: ",";\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t\tborder-width: 1px;\n\t\tborder-style: solid;\n\t\ttransition: all 0.3s ease-in-out;\n\t}\n\t&:focus {\n\t\toutline: none;\n\t}\n\n\t@media screen and (min-width: ","px) {\n\t\tmax-width: 408px;\n\t}\n\n\t&:disabled {\n\t\tcolor: ",";\n\t\tbackground: ",";\n\t\tborder-color: ",";\n\t}\n"])),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return m(e.size)}),(function(e){return e.borderColor}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.borderColor}),(function(e){return e.theme.breakpoints.desktop}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.grey}),(function(e){return e.theme.colors.grey})),L=d.default(D)(T||(T=g(["\n letter-spacing: initial;\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"],["\n letter-spacing: initial;\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"])),(function(e){return e.theme.colors.primary}),(function(e){return e.theme.colors.primary}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white})),B=d.default(D)(j||(j=g(["\n letter-spacing: initial;\n color: ",";\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"],["\n letter-spacing: initial;\n color: ",";\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"])),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black})),I=d.default(D)(R||(R=g(["\n letter-spacing: initial;\n color: ",";\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"],["\n letter-spacing: initial;\n color: ",";\n background: ",";\n border-color: ",";\n text-transform: none;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white})),V=d.default.a.attrs((function(e){return{color:e.color||e.theme.colors.black,size:e.size||e.theme.fonts.sizes.m,arrow:e.arrow||!1}}))(O||(O=g(["\n text-decoration: underline;\n display: inline-block;\n position: relative;\n cursor: pointer;\n color: ",";\n ","\n\n ",";\n"],["\n text-decoration: underline;\n display: inline-block;\n position: relative;\n cursor: pointer;\n color: ",";\n ","\n\n ",";\n"])),(function(e){return e.color}),(function(e){return m(e.size)}),(function(e){return e.arrow&&"&::after {\n\t\tcontent: '';\n\t\tposition: absolute;\n\t\tborder-width: 2px 2px 0px 0px;\n\t\tborder-color: "+e.color+";\n\t\tborder-style: solid;\n\t\twidth: 0.6em;\n\t\theight: 0.6em;\n\t\ttop: 45%;\n\t\tright: -10%;\n\t\ttransform: rotate(45deg) translate3d(0%, -40%, 0);\n\t\ttransition: all 0.3s ease-in-out;\n\t}\n\n\t&:hover {\n\t\t&::after {\n\t\t\tright: -15%;\n\t\t\ttransition: all 0.3s ease-in-out;\n\t\t}\n\t}\n"})),N=d.default((function(e){var t=e.children,n=e.className,r=e.onClick;return a.jsx("button",v({className:n,onClick:r},{children:a.jsx("span",v({className:"buttonCopy"},{children:t}),void 0)}),void 0)})).attrs((function(e){return{inverted:e.inverted||!1}}))(F||(F=g(["\n border: 1px solid\n ",";\n position: relative;\n border-radius: 8px;\n padding: 1em 2em 1em 2em;\n //\theight: 50px;\n box-sizing: border-box;\n vertical-align: top;\n transition: all 0.25s;\n color: ",';\n font-weight: bold;\n font-size: 0.8em;\n text-transform: uppercase;\n position: relative;\n /* min-width: 270px; */\n //padding: 30px 22px;\n text-align: left;\n justify-content: left;\n display: inline-flex;\n overflow: hidden;\n\n &::before {\n z-index: 1;\n transition: all 0.25s ease-in-out;\n position: absolute;\n content: "";\n left: 0%;\n top: 0;\n width: 0%;\n height: 150%;\n background: ',';\n }\n\n .buttonCopy {\n font-size: 1em;\n letter-spacing: 0.16em;\n\n display: inline-flex;\n //\talign-items: center;\n z-index: 3;\n }\n\n .buttonArrows {\n position: absolute;\n top: 0.5em;\n bottom: 0.5em;\n right: 0;\n width: 4em;\n z-index: 2;\n\n &::before {\n position: absolute;\n top: 50%;\n width: 2em;\n height: 1px;\n content: "";\n border-color: ',";\n border-width: 1px 0 0 0;\n border-style: solid;\n transition: all 0.25s ease-in-out;\n transform: translate3d(0%, -50%, 0);\n }\n\n &::after {\n transition: all 0.25s ease-in-out;\n position: absolute;\n top: 50%;\n\n width: 0.6em;\n height: 0.6em;\n border-color: ",';\n border-width: 1px 1px 0 0;\n border-style: solid;\n transform: translate3d(2em, -50%, 0) translate3d(-8px, 0%, 0)\n rotate(45deg);\n content: "";\n }\n }\n &.active,\n &:hover,\n &:focus {\n &::before {\n left: 0%;\n width: 100%;\n transition: all 0.25s ease-in-out;\n }\n\n color: ',";\n\n transition: all 0.25s ease-in-out;\n outline: none;\n\n .buttonArrows {\n &::before {\n transition: all 0.25s ease-in-out;\n //transition-delay: 0.1s;\n width: 2.5em;\n border-color: ",";\n }\n &::after {\n transition-delay: 0.1s;\n transform: translate3d(2.5em, -50%, 0) translate3d(-8px, 0%, 0)\n rotate(45deg);\n transition: all 0.25s ease-in-out;\n border-color: ",";\n }\n }\n }\n"],["\n border: 1px solid\n ",";\n position: relative;\n border-radius: 8px;\n padding: 1em 2em 1em 2em;\n //\theight: 50px;\n box-sizing: border-box;\n vertical-align: top;\n transition: all 0.25s;\n color: ",';\n font-weight: bold;\n font-size: 0.8em;\n text-transform: uppercase;\n position: relative;\n /* min-width: 270px; */\n //padding: 30px 22px;\n text-align: left;\n justify-content: left;\n display: inline-flex;\n overflow: hidden;\n\n &::before {\n z-index: 1;\n transition: all 0.25s ease-in-out;\n position: absolute;\n content: "";\n left: 0%;\n top: 0;\n width: 0%;\n height: 150%;\n background: ',';\n }\n\n .buttonCopy {\n font-size: 1em;\n letter-spacing: 0.16em;\n\n display: inline-flex;\n //\talign-items: center;\n z-index: 3;\n }\n\n .buttonArrows {\n position: absolute;\n top: 0.5em;\n bottom: 0.5em;\n right: 0;\n width: 4em;\n z-index: 2;\n\n &::before {\n position: absolute;\n top: 50%;\n width: 2em;\n height: 1px;\n content: "";\n border-color: ',";\n border-width: 1px 0 0 0;\n border-style: solid;\n transition: all 0.25s ease-in-out;\n transform: translate3d(0%, -50%, 0);\n }\n\n &::after {\n transition: all 0.25s ease-in-out;\n position: absolute;\n top: 50%;\n\n width: 0.6em;\n height: 0.6em;\n border-color: ",';\n border-width: 1px 1px 0 0;\n border-style: solid;\n transform: translate3d(2em, -50%, 0) translate3d(-8px, 0%, 0)\n rotate(45deg);\n content: "";\n }\n }\n &.active,\n &:hover,\n &:focus {\n &::before {\n left: 0%;\n width: 100%;\n transition: all 0.25s ease-in-out;\n }\n\n color: ',";\n\n transition: all 0.25s ease-in-out;\n outline: none;\n\n .buttonArrows {\n &::before {\n transition: all 0.25s ease-in-out;\n //transition-delay: 0.1s;\n width: 2.5em;\n border-color: ",";\n }\n &::after {\n transition-delay: 0.1s;\n transform: translate3d(2.5em, -50%, 0) translate3d(-8px, 0%, 0)\n rotate(45deg);\n transition: all 0.25s ease-in-out;\n border-color: ",";\n }\n }\n }\n"])),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black})),z=d.default((function(e){var t=e.children,n=e.className,r=e.href;return a.jsxs("a",v({className:n,href:r,target:"_blank",rel:"noopener noreferrer"},{children:[a.jsx("span",v({className:"buttonCopy"},{children:t}),void 0),a.jsx("span",{className:"buttonArrows"},void 0)]}),void 0)})).attrs((function(e){return{inverted:e.inverted||!1}}))(M||(M=g(["\n border: 1px solid\n ",";\n position: relative;\n border-radius: 8px;\n padding: 1em 6em 1em 2em;\n //\theight: 50px;\n box-sizing: border-box;\n vertical-align: top;\n transition: all 0.25s;\n color: ",";\n font-family: ",';\n font-weight: bold;\n font-size: 0.7em;\n text-transform: uppercase;\n position: relative;\n /* min-width: 270px; */\n //padding: 30px 22px;\n text-align: left;\n justify-content: left;\n display: inline-flex;\n overflow: hidden;\n\n &::before {\n z-index: 1;\n transition: all 0.25s ease-in-out;\n position: absolute;\n content: "";\n left: 0%;\n top: 0;\n width: 0%;\n height: 150%;\n background: ',';\n }\n\n .buttonCopy {\n font-weight: 700 !important;\n font-size: 1em;\n letter-spacing: 0.16em;\n\n display: inline-flex;\n //\talign-items: center;\n z-index: 2;\n }\n\n .buttonArrows {\n position: absolute;\n top: 0.5em;\n bottom: 0.5em;\n right: 0;\n width: 4em;\n z-index: 2;\n\n &::before {\n position: absolute;\n top: 50%;\n width: 2em;\n height: 1px;\n content: "";\n border-color: ',";\n border-width: 1px 0 0 0;\n border-style: solid;\n transition: all 0.25s ease-in-out;\n transform: translate3d(0%, -50%, 0);\n }\n\n &::after {\n transition: all 0.25s ease-in-out;\n position: absolute;\n top: 50%;\n\n width: 0.6em;\n height: 0.6em;\n border-color: ",';\n border-width: 1px 1px 0 0;\n border-style: solid;\n transform: translate3d(2em, -50%, 0) translate3d(-8.5px, -0.25px, 0)\n rotate(45deg);\n content: "";\n }\n }\n &:hover,\n &:focus {\n &::before {\n left: 0%;\n width: 100%;\n transition: all 0.25s ease-in-out;\n }\n color: ',";\n transition: all 0.25s ease-in-out;\n outline: none;\n\n .buttonArrows {\n &::before {\n transition: all 0.25s ease-in-out;\n //transition-delay: 0.1s;\n width: 2.5em;\n border-color: ",";\n }\n &::after {\n transition-delay: 0.1s;\n transform: translate3d(2.5em, -50%, 0) translate3d(-8.5px, -0.25px, 0)\n rotate(45deg);\n transition: all 0.25s ease-in-out;\n border-color: ",";\n }\n }\n }\n"],["\n border: 1px solid\n ",";\n position: relative;\n border-radius: 8px;\n padding: 1em 6em 1em 2em;\n //\theight: 50px;\n box-sizing: border-box;\n vertical-align: top;\n transition: all 0.25s;\n color: ",";\n font-family: ",';\n font-weight: bold;\n font-size: 0.7em;\n text-transform: uppercase;\n position: relative;\n /* min-width: 270px; */\n //padding: 30px 22px;\n text-align: left;\n justify-content: left;\n display: inline-flex;\n overflow: hidden;\n\n &::before {\n z-index: 1;\n transition: all 0.25s ease-in-out;\n position: absolute;\n content: "";\n left: 0%;\n top: 0;\n width: 0%;\n height: 150%;\n background: ',';\n }\n\n .buttonCopy {\n font-weight: 700 !important;\n font-size: 1em;\n letter-spacing: 0.16em;\n\n display: inline-flex;\n //\talign-items: center;\n z-index: 2;\n }\n\n .buttonArrows {\n position: absolute;\n top: 0.5em;\n bottom: 0.5em;\n right: 0;\n width: 4em;\n z-index: 2;\n\n &::before {\n position: absolute;\n top: 50%;\n width: 2em;\n height: 1px;\n content: "";\n border-color: ',";\n border-width: 1px 0 0 0;\n border-style: solid;\n transition: all 0.25s ease-in-out;\n transform: translate3d(0%, -50%, 0);\n }\n\n &::after {\n transition: all 0.25s ease-in-out;\n position: absolute;\n top: 50%;\n\n width: 0.6em;\n height: 0.6em;\n border-color: ",';\n border-width: 1px 1px 0 0;\n border-style: solid;\n transform: translate3d(2em, -50%, 0) translate3d(-8.5px, -0.25px, 0)\n rotate(45deg);\n content: "";\n }\n }\n &:hover,\n &:focus {\n &::before {\n left: 0%;\n width: 100%;\n transition: all 0.25s ease-in-out;\n }\n color: ',";\n transition: all 0.25s ease-in-out;\n outline: none;\n\n .buttonArrows {\n &::before {\n transition: all 0.25s ease-in-out;\n //transition-delay: 0.1s;\n width: 2.5em;\n border-color: ",";\n }\n &::after {\n transition-delay: 0.1s;\n transform: translate3d(2.5em, -50%, 0) translate3d(-8.5px, -0.25px, 0)\n rotate(45deg);\n transition: all 0.25s ease-in-out;\n border-color: ",";\n }\n }\n }\n"])),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.theme.fonts.primary}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.black:e.theme.colors.white}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black}),(function(e){return e.inverted?e.theme.colors.white:e.theme.colors.black})),U={duration:1,ease:"easeOut",delay:.3},G={hidden:{opacity:0,translateX:"-10%"},visible:{opacity:1,translateX:"0%",transition:U}},W={hidden:{opacity:0,translateX:"10%"},visible:{opacity:1,translateX:"0%",transition:U}},Z={hidden:{opacity:0,translateY:"10%"},visible:{opacity:1,translateY:"0%",transition:U}};t.W2=x,t.ZL=p,t.rU=V,t.ns=L,t.Wg=I,t.xv=w,t.rE=P,t.rS=f,t.dD=S,t.Av=function(){return k(f.breakpoints.tablet)}},3727:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,o=function(e){var t={};return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return r.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91}))},4155:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5971),o=n(4128),i=n(5646),a=n(607),s=n(7196),l=n(4035),u=n(5043);function c(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}function d(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var f=d(o),p=c(o),h=c(l),m=function(e){return{isEnabled:function(t){return e.some((function(e){return!!t[e]}))}}},v={measureLayout:m(["layout","layoutId","drag"]),animation:m(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:m(["exit"]),drag:m(["drag","dragControls"]),focus:m(["whileFocus"]),hover:m(["whileHover","onHoverStart","onHoverEnd"]),tap:m(["whileTap","onTap","onTapStart","onTapCancel"]),pan:m(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:m(["whileInView","onViewportEnter","onViewportLeave"])};function g(e){for(var t in e)null!==e[t]&&("projectionNodeConstructor"===t?v.projectionNodeConstructor=e[t]:v[t].Component=e[t])}var y=o.createContext({strict:!1}),b=Object.keys(v),x=b.length;var w=o.createContext({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),k=o.createContext({});function S(){return o.useContext(k).visualElement}var _=o.createContext(null),E="undefined"!==typeof document,C=E?o.useLayoutEffect:o.useEffect,P={current:null},A=!1;function T(){return!A&&function(){if(A=!0,E)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return P.current=e.matches};e.addListener(t),t()}else P.current=!1}(),r.__read(o.useState(P.current),1)[0]}function j(){var e=T(),t=o.useContext(w).reducedMotion;return"never"!==t&&("always"===t||e)}function R(e){return"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function O(e){return Array.isArray(e)}function F(e){return"string"===typeof e||O(e)}function M(e,t,n,r,o){var i;return void 0===r&&(r={}),void 0===o&&(o={}),"function"===typeof t&&(t=t(null!==n&&void 0!==n?n:e.custom,r,o)),"string"===typeof t&&(t=null===(i=e.variants)||void 0===i?void 0:i[t]),"function"===typeof t&&(t=t(null!==n&&void 0!==n?n:e.custom,r,o)),t}function D(e,t,n){var r=e.getProps();return M(r,t,null!==n&&void 0!==n?n:r.custom,function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.get()})),t}(e),function(e){var t={};return e.forEachValue((function(e,n){return t[n]=e.getVelocity()})),t}(e))}function L(e){var t;return"function"===typeof(null===(t=e.animate)||void 0===t?void 0:t.start)||F(e.initial)||F(e.animate)||F(e.whileHover)||F(e.whileDrag)||F(e.whileTap)||F(e.whileFocus)||F(e.exit)}function B(e){return Boolean(L(e)||e.variants)}function I(e){var t=function(e,t){if(L(e)){var n=e.initial,r=e.animate;return{initial:!1===n||F(n)?n:void 0,animate:F(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,o.useContext(k)),n=t.initial,r=t.animate;return o.useMemo((function(){return{initial:n,animate:r}}),[V(n),V(r)])}function V(e){return Array.isArray(e)?e.join(" "):e}function N(e){var t=o.useRef(null);return null===t.current&&(t.current=e()),t.current}var z={hasAnimatedSinceResize:!0,hasEverUpdated:!1},U=1;var G=o.createContext({}),W=o.createContext({});var Z=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.getSnapshotBeforeUpdate=function(){return this.updateProps(),null},t.prototype.componentDidUpdate=function(){},t.prototype.updateProps=function(){var e=this.props,t=e.visualElement,n=e.props;t&&t.setProps(n)},t.prototype.render=function(){return this.props.children},t}(p.default.Component);function H(e){var t=e.preloadedFeatures,n=e.createVisualElement,i=e.projectionNodeConstructor,a=e.useRender,s=e.useVisualState,l=e.Component;return t&&g(t),o.forwardRef((function(e,t){var u=function(e){var t,n=e.layoutId,r=null===(t=o.useContext(G))||void 0===t?void 0:t.id;return r&&void 0!==n?r+"-"+n:n}(e);e=r.__assign(r.__assign({},e),{layoutId:u});var c=o.useContext(w),d=null,p=I(e),h=c.isStatic?void 0:N((function(){if(z.hasEverUpdated)return U++})),m=s(e,c.isStatic);return!c.isStatic&&E&&(p.visualElement=function(e,t,n,r){var i=o.useContext(y),a=S(),s=o.useContext(_),l=j(),u=o.useRef(void 0);r||(r=i.renderer),!u.current&&r&&(u.current=r(e,{visualState:t,parent:a,props:n,presenceId:null===s||void 0===s?void 0:s.id,blockInitialAnimation:!1===(null===s||void 0===s?void 0:s.initial),shouldReduceMotion:l}));var c=u.current;return C((function(){null===c||void 0===c||c.syncRender()})),o.useEffect((function(){var e;null===(e=null===c||void 0===c?void 0:c.animationState)||void 0===e||e.animateChanges()})),C((function(){return function(){return null===c||void 0===c?void 0:c.notifyUnmount()}}),[]),c}(l,m,r.__assign(r.__assign({},c),e),n),function(e,t,n,r){var i,a=t.layoutId,s=t.layout,l=t.drag,u=t.dragConstraints,c=t.layoutScroll,d=o.useContext(W);r&&n&&!(null===n||void 0===n?void 0:n.projection)&&(n.projection=new r(e,n.getLatestValues(),null===(i=n.parent)||void 0===i?void 0:i.projection),n.projection.setOptions({layoutId:a,layout:s,alwaysMeasureLayout:Boolean(l)||u&&R(u),visualElement:n,scheduleRender:function(){return n.scheduleRender()},animationType:"string"===typeof s?s:"both",initialPromotionConfig:d,layoutScroll:c}))}(h,e,p.visualElement,i||v.projectionNodeConstructor),d=function(e,t,n){var i=[];if(o.useContext(y),!t)return null;for(var a=0;a<x;a++){var s=b[a],l=v[s],u=l.isEnabled,c=l.Component;u(e)&&c&&i.push(f.createElement(c,r.__assign({key:s},e,{visualElement:t})))}return i}(e,p.visualElement)),f.createElement(Z,{visualElement:p.visualElement,props:r.__assign(r.__assign({},c),e)},d,f.createElement(k.Provider,{value:p},a(l,e,h,function(e,t,n){return o.useCallback((function(r){var o;r&&(null===(o=e.mount)||void 0===o||o.call(e,r)),t&&(r?t.mount(r):t.unmount()),n&&("function"===typeof n?n(r):R(n)&&(n.current=r))}),[t])}(m,p.visualElement,t),m,c.isStatic,p.visualElement)))}))}function $(e){function t(t,n){return void 0===n&&(n={}),H(e(t,n))}if("undefined"===typeof Proxy)return t;var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var K=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","svg","switch","symbol","text","tspan","use","view"];function X(e){return"string"===typeof e&&!e.includes("-")&&!!(K.indexOf(e)>-1||/[A-Z]/.test(e))}var Y={};function q(e){Object.assign(Y,e)}var Q=["","X","Y","Z"],J=["transformPerspective","x","y","z"];function ee(e,t){return J.indexOf(e)-J.indexOf(t)}["translate","scale","rotate","skew"].forEach((function(e){return Q.forEach((function(t){return J.push(e+t)}))}));var te=new Set(J);function ne(e){return te.has(e)}var re=new Set(["originX","originY","originZ"]);function oe(e){return re.has(e)}function ie(e,t){var n=t.layout,r=t.layoutId;return ne(e)||oe(e)||(n||void 0!==r)&&(!!Y[e]||"opacity"===e)}var ae=function(e){return Boolean(null!==e&&"object"===typeof e&&e.getVelocity)},se={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"};function le(e){return e.startsWith("--")}var ue=function(e,t){return t&&"number"===typeof e?t.transform(e):e},ce=r.__assign(r.__assign({},a.number),{transform:Math.round}),de={borderWidth:a.px,borderTopWidth:a.px,borderRightWidth:a.px,borderBottomWidth:a.px,borderLeftWidth:a.px,borderRadius:a.px,radius:a.px,borderTopLeftRadius:a.px,borderTopRightRadius:a.px,borderBottomRightRadius:a.px,borderBottomLeftRadius:a.px,width:a.px,maxWidth:a.px,height:a.px,maxHeight:a.px,size:a.px,top:a.px,right:a.px,bottom:a.px,left:a.px,padding:a.px,paddingTop:a.px,paddingRight:a.px,paddingBottom:a.px,paddingLeft:a.px,margin:a.px,marginTop:a.px,marginRight:a.px,marginBottom:a.px,marginLeft:a.px,rotate:a.degrees,rotateX:a.degrees,rotateY:a.degrees,rotateZ:a.degrees,scale:a.scale,scaleX:a.scale,scaleY:a.scale,scaleZ:a.scale,skew:a.degrees,skewX:a.degrees,skewY:a.degrees,distance:a.px,translateX:a.px,translateY:a.px,translateZ:a.px,x:a.px,y:a.px,z:a.px,perspective:a.px,transformPerspective:a.px,opacity:a.alpha,originX:a.progressPercentage,originY:a.progressPercentage,originZ:a.px,zIndex:ce,fillOpacity:a.alpha,strokeOpacity:a.alpha,numOctaves:ce};function fe(e,t,n,r){var o,i=e.style,a=e.vars,s=e.transform,l=e.transformKeys,u=e.transformOrigin;l.length=0;var c=!1,d=!1,f=!0;for(var p in t){var h=t[p];if(le(p))a[p]=h;else{var m=de[p],v=ue(h,m);if(ne(p)){if(c=!0,s[p]=v,l.push(p),!f)continue;h!==(null!==(o=m.default)&&void 0!==o?o:0)&&(f=!1)}else oe(p)?(u[p]=v,d=!0):i[p]=v}}c?i.transform=function(e,t,n,r){var o=e.transform,i=e.transformKeys,a=t.enableHardwareAcceleration,s=void 0===a||a,l=t.allowTransformNone,u=void 0===l||l,c="";i.sort(ee);for(var d=!1,f=i.length,p=0;p<f;p++){var h=i[p];c+="".concat(se[h]||h,"(").concat(o[h],") "),"z"===h&&(d=!0)}return!d&&s?c+="translateZ(0)":c=c.trim(),r?c=r(o,n?"":c):u&&n&&(c="none"),c}(e,n,f,r):r?i.transform=r({},""):!t.transform&&i.transform&&(i.transform="none"),d&&(i.transformOrigin=function(e){var t=e.originX,n=void 0===t?"50%":t,r=e.originY,o=void 0===r?"50%":r,i=e.originZ,a=void 0===i?0:i;return"".concat(n," ").concat(o," ").concat(a)}(u))}var pe=function(){return{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}};function he(e,t,n){for(var r in t)ae(t[r])||ie(r,n)||(e[r]=t[r])}function me(e,t,n){var i={};return he(i,e.style||{},e),Object.assign(i,function(e,t,n){var i=e.transformTemplate;return o.useMemo((function(){var e={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};fe(e,t,{enableHardwareAcceleration:!n},i);var o=e.vars,a=e.style;return r.__assign(r.__assign({},o),a)}),[t])}(e,t,n)),e.transformValues&&(i=e.transformValues(i)),i}function ve(e,t,n){var r={},o=me(e,t,n);return Boolean(e.drag)&&!1!==e.dragListener&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),r.style=o,r}var ge=new Set(["initial","animate","exit","style","variants","transition","transformTemplate","transformValues","custom","inherit","layout","layoutId","layoutDependency","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","drag","dragControls","dragListener","dragConstraints","dragDirectionLock","dragSnapToOrigin","_dragX","_dragY","dragElastic","dragMomentum","dragPropagation","dragTransition","whileDrag","onPan","onPanStart","onPanEnd","onPanSessionStart","onTap","onTapStart","onTapCancel","onHoverStart","onHoverEnd","whileFocus","whileTap","whileHover","whileInView","onViewportEnter","onViewportLeave","viewport","layoutScroll"]);function ye(e){return ge.has(e)}var be=function(e){return!ye(e)};function xe(e){e&&(be=function(t){return t.startsWith("on")?!ye(t):e(t)})}try{xe(n(3727).Z)}catch(Pi){}function we(e,t,n){var r={};for(var o in e)(be(o)||!0===n&&ye(o)||!t&&!ye(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function ke(e,t,n){return"string"===typeof e?e:a.px.transform(t+n*e)}var Se={offset:"stroke-dashoffset",array:"stroke-dasharray"},_e={offset:"strokeDashoffset",array:"strokeDasharray"};function Ee(e,t,n,o){var i=t.attrX,s=t.attrY,l=t.originX,u=t.originY,c=t.pathLength,d=t.pathSpacing,f=void 0===d?1:d,p=t.pathOffset,h=void 0===p?0:p;fe(e,r.__rest(t,["attrX","attrY","originX","originY","pathLength","pathSpacing","pathOffset"]),n,o),e.attrs=e.style,e.style={};var m=e.attrs,v=e.style,g=e.dimensions;m.transform&&(g&&(v.transform=m.transform),delete m.transform),g&&(void 0!==l||void 0!==u||v.transform)&&(v.transformOrigin=function(e,t,n){var r=ke(t,e.x,e.width),o=ke(n,e.y,e.height);return"".concat(r," ").concat(o)}(g,void 0!==l?l:.5,void 0!==u?u:.5)),void 0!==i&&(m.x=i),void 0!==s&&(m.y=s),void 0!==c&&function(e,t,n,r,o){void 0===n&&(n=1),void 0===r&&(r=0),void 0===o&&(o=!0),e.pathLength=1;var i=o?Se:_e;e[i.offset]=a.px.transform(-r);var s=a.px.transform(t),l=a.px.transform(n);e[i.array]="".concat(s," ").concat(l)}(m,c,f,h,!1)}var Ce=function(){return r.__assign(r.__assign({},{style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}}),{attrs:{}})};function Pe(e,t){var n=o.useMemo((function(){var n=Ce();return Ee(n,t,{enableHardwareAcceleration:!1},e.transformTemplate),r.__assign(r.__assign({},n.attrs),{style:r.__assign({},n.style)})}),[t]);if(e.style){var i={};he(i,e.style,e),n.style=r.__assign(r.__assign({},i),n.style)}return n}function Ae(e){void 0===e&&(e=!1);return function(t,n,i,a,s,l){var u=s.latestValues,c=(X(t)?Pe:ve)(n,u,l),d=we(n,"string"===typeof t,e),f=r.__assign(r.__assign(r.__assign({},d),c),{ref:a});return i&&(f["data-projection-id"]=i),o.createElement(t,f)}}var Te=/([a-z])([A-Z])/g,je=function(e){return e.replace(Te,"$1-$2").toLowerCase()};function Re(e,t,n,r){var o=t.style,i=t.vars;for(var a in Object.assign(e.style,o,r&&r.getProjectionStyles(n)),i)e.style.setProperty(a,i[a])}var Oe=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength"]);function Fe(e,t,n,r){for(var o in Re(e,t,void 0,r),t.attrs)e.setAttribute(Oe.has(o)?o:je(o),t.attrs[o])}function Me(e){var t=e.style,n={};for(var r in t)(ae(t[r])||ie(r,e))&&(n[r]=t[r]);return n}function De(e){var t=Me(e);for(var n in e){if(ae(e[n]))t["x"===n||"y"===n?"attr"+n.toUpperCase():n]=e[n]}return t}function Le(e){return"object"===typeof e&&"function"===typeof e.start}var Be=function(e){return Array.isArray(e)},Ie=function(e){return Be(e)?e[e.length-1]||0:e};function Ve(e){var t,n=ae(e)?e.get():e;return t=n,Boolean(t&&"object"===typeof t&&t.mix&&t.toValue)?n.toValue():n}function Ne(e,t,n,r){var o=e.scrapeMotionValuesFromProps,i=e.createRenderState,a=e.onMount,s={latestValues:Ue(t,n,r,o),renderState:i()};return a&&(s.mount=function(e){return a(t,e,s)}),s}var ze=function(e){return function(t,n){var r=o.useContext(k),i=o.useContext(_);return n?Ne(e,t,r,i):N((function(){return Ne(e,t,r,i)}))}};function Ue(e,t,n,o){var i={},a=!1===(null===n||void 0===n?void 0:n.initial),s=o(e);for(var l in s)i[l]=Ve(s[l]);var u=e.initial,c=e.animate,d=L(e),f=B(e);t&&f&&!d&&!1!==e.inherit&&(null!==u&&void 0!==u||(u=t.initial),null!==c&&void 0!==c||(c=t.animate));var p=a||!1===u,h=p?c:u;h&&"boolean"!==typeof h&&!Le(h)&&(Array.isArray(h)?h:[h]).forEach((function(t){var n=M(e,t);if(n){var o=n.transitionEnd;n.transition;var a=r.__rest(n,["transitionEnd","transition"]);for(var s in a){var l=a[s];if(Array.isArray(l))l=l[p?l.length-1:0];null!==l&&(i[s]=l)}for(var s in o)i[s]=o[s]}}));return i}var Ge,We={useVisualState:ze({scrapeMotionValuesFromProps:De,createRenderState:Ce,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;try{r.dimensions="function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(i){r.dimensions={x:0,y:0,width:0,height:0}}Ee(r,o,{enableHardwareAcceleration:!1},e.transformTemplate),Fe(t,r)}})},Ze={useVisualState:ze({scrapeMotionValuesFromProps:Me,createRenderState:pe})};function He(e,t,n,o,i){var a=t.forwardMotionProps,s=void 0!==a&&a,l=X(e)?We:Ze;return r.__assign(r.__assign({},l),{preloadedFeatures:n,useRender:Ae(s),createVisualElement:o,projectionNodeConstructor:i,Component:e})}function $e(e,t,n,r){return void 0===r&&(r={passive:!0}),e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}function Ke(e,t,n,r){o.useEffect((function(){var o=e.current;if(n&&o)return $e(o,t,n,r)}),[e,t,n,r])}function Xe(e){return"undefined"!==typeof PointerEvent&&e instanceof PointerEvent?!("mouse"!==e.pointerType):e instanceof MouseEvent}function Ye(e){return!!e.touches}t.AnimationType=void 0,(Ge=t.AnimationType||(t.AnimationType={})).Animate="animate",Ge.Hover="whileHover",Ge.Tap="whileTap",Ge.Drag="whileDrag",Ge.Focus="whileFocus",Ge.InView="whileInView",Ge.Exit="exit";var qe={pageX:0,pageY:0};function Qe(e,t){void 0===t&&(t="page");var n=e.touches[0]||e.changedTouches[0]||qe;return{x:n[t+"X"],y:n[t+"Y"]}}function Je(e,t){return void 0===t&&(t="page"),{x:e[t+"X"],y:e[t+"Y"]}}function et(e,t){return void 0===t&&(t="page"),{point:Ye(e)?Qe(e,t):Je(e,t)}}var tt=function(e,t){void 0===t&&(t=!1);var n,r=function(t){return e(t,et(t))};return t?(n=r,function(e){var t=e instanceof MouseEvent;(!t||t&&0===e.button)&&n(e)}):r},nt={pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointercancel:"mousecancel",pointerover:"mouseover",pointerout:"mouseout",pointerenter:"mouseenter",pointerleave:"mouseleave"},rt={pointerdown:"touchstart",pointermove:"touchmove",pointerup:"touchend",pointercancel:"touchcancel"};function ot(e){return E&&null===window.onpointerdown?e:E&&null===window.ontouchstart?rt[e]:E&&null===window.onmousedown?nt[e]:e}function it(e,t,n,r){return $e(e,ot(t),tt(n,"pointerdown"===t),r)}function at(e,t,n,r){return Ke(e,ot(t),n&&tt(n,"pointerdown"===t),r)}function st(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var lt=st("dragHorizontal"),ut=st("dragVertical");function ct(e){var t=!1;if("y"===e)t=ut();else if("x"===e)t=lt();else{var n=lt(),r=ut();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function dt(){var e=ct(!0);return!e||(e(),!1)}function ft(e,n,r){return function(o,i){var a;Xe(o)&&!dt()&&(null===(a=e.animationState)||void 0===a||a.setActive(t.AnimationType.Hover,n),null===r||void 0===r||r(o,i))}}var pt=function e(t,n){return!!n&&(t===n||e(t,n.parentElement))};function ht(e){return o.useEffect((function(){return function(){return e()}}),[])}var mt=new Set;function vt(e,t,n){e||mt.has(t)||(console.warn(t),n&&console.warn(n),mt.add(t))}var gt=new WeakMap,yt=new WeakMap,bt=function(e){var t;null===(t=gt.get(e.target))||void 0===t||t(e)},xt=function(e){e.forEach(bt)};function wt(e,t,n){var o=function(e){var t=e.root,n=r.__rest(e,["root"]),o=t||document;yt.has(o)||yt.set(o,{});var i=yt.get(o),a=JSON.stringify(n);return i[a]||(i[a]=new IntersectionObserver(xt,r.__assign({root:t},n))),i[a]}(t);return gt.set(e,n),o.observe(e),function(){gt.delete(e),o.unobserve(e)}}var kt={some:0,all:1};function St(e,n,r,i){var a=i.root,s=i.margin,l=i.amount,u=void 0===l?"some":l,c=i.once;o.useEffect((function(){if(e){var o={root:null===a||void 0===a?void 0:a.current,rootMargin:s,threshold:"number"===typeof u?u:kt[u]};return wt(r.getInstance(),o,(function(e){var o,i=e.isIntersecting;if(n.isInView!==i&&(n.isInView=i,!c||i||!n.hasEnteredView)){i&&(n.hasEnteredView=!0),null===(o=r.animationState)||void 0===o||o.setActive(t.AnimationType.InView,i);var a=r.getProps(),s=i?a.onViewportEnter:a.onViewportLeave;null===s||void 0===s||s(e)}}))}}),[e,a,s,u])}function _t(e,n,r,i){var a=i.fallback,s=void 0===a||a;o.useEffect((function(){e&&s&&requestAnimationFrame((function(){var e;n.hasEnteredView=!0;var o=r.getProps().onViewportEnter;null===o||void 0===o||o(null),null===(e=r.animationState)||void 0===e||e.setActive(t.AnimationType.InView,!0)}))}),[e])}var Et=function(e){return function(t){return e(t),null}},Ct={inView:Et((function(e){var t=e.visualElement,n=e.whileInView,r=e.onViewportEnter,i=e.onViewportLeave,a=e.viewport,s=void 0===a?{}:a,l=o.useRef({hasEnteredView:!1,isInView:!1}),u=Boolean(n||r||i);s.once&&l.current.hasEnteredView&&(u=!1),("undefined"===typeof IntersectionObserver?_t:St)(u,l.current,t,s)})),tap:Et((function(e){var n=e.onTap,r=e.onTapStart,i=e.onTapCancel,a=e.whileTap,l=e.visualElement,u=n||r||i||a,c=o.useRef(!1),d=o.useRef(null),f={passive:!(r||n||i||g)};function p(){var e;null===(e=d.current)||void 0===e||e.call(d),d.current=null}function h(){var e;return p(),c.current=!1,null===(e=l.animationState)||void 0===e||e.setActive(t.AnimationType.Tap,!1),!dt()}function m(e,t){h()&&(pt(l.getInstance(),e.target)?null===n||void 0===n||n(e,t):null===i||void 0===i||i(e,t))}function v(e,t){h()&&(null===i||void 0===i||i(e,t))}function g(e,n){var o;p(),c.current||(c.current=!0,d.current=s.pipe(it(window,"pointerup",m,f),it(window,"pointercancel",v,f)),null===(o=l.animationState)||void 0===o||o.setActive(t.AnimationType.Tap,!0),null===r||void 0===r||r(e,n))}at(l,"pointerdown",u?g:void 0,f),ht(p)})),focus:Et((function(e){var n=e.whileFocus,r=e.visualElement;Ke(r,"focus",n?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(t.AnimationType.Focus,!0)}:void 0),Ke(r,"blur",n?function(){var e;null===(e=r.animationState)||void 0===e||e.setActive(t.AnimationType.Focus,!1)}:void 0)})),hover:Et((function(e){var t=e.onHoverStart,n=e.onHoverEnd,r=e.whileHover,o=e.visualElement;at(o,"pointerenter",t||r?ft(o,!0,t):void 0,{passive:!t}),at(o,"pointerleave",n||r?ft(o,!1,n):void 0,{passive:!n})}))},Pt=0,At=function(){return Pt++},Tt=function(){return N(At)};function jt(){var e=o.useContext(_);if(null===e)return[!0,null];var t=e.isPresent,n=e.onExitComplete,r=e.register,i=Tt();o.useEffect((function(){return r(i)}),[]);return!t&&n?[!1,function(){return null===n||void 0===n?void 0:n(i)}]:[!0]}function Rt(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}var Ot=function(e){return 1e3*e},Ft={linear:s.linear,easeIn:s.easeIn,easeInOut:s.easeInOut,easeOut:s.easeOut,circIn:s.circIn,circInOut:s.circInOut,circOut:s.circOut,backIn:s.backIn,backInOut:s.backInOut,backOut:s.backOut,anticipate:s.anticipate,bounceIn:s.bounceIn,bounceInOut:s.bounceInOut,bounceOut:s.bounceOut},Mt=function(e){if(Array.isArray(e)){i.invariant(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=r.__read(e,4),n=t[0],o=t[1],a=t[2],l=t[3];return s.cubicBezier(n,o,a,l)}return"string"===typeof e?(i.invariant(void 0!==Ft[e],"Invalid easing type '".concat(e,"'")),Ft[e]):e},Dt=function(e,t){return"zIndex"!==e&&(!("number"!==typeof t&&!Array.isArray(t))||!("string"!==typeof t||!a.complex.test(t)||t.startsWith("url(")))},Lt=function(){return{type:"spring",stiffness:500,damping:25,restSpeed:10}},Bt=function(e){return{type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}},It=function(){return{type:"keyframes",ease:"linear",duration:.3}},Vt=function(e){return{type:"keyframes",duration:.8,values:e}},Nt={x:Lt,y:Lt,z:Lt,rotate:Lt,rotateX:Lt,rotateY:Lt,rotateZ:Lt,scaleX:Bt,scaleY:Bt,scale:Bt,opacity:It,backgroundColor:It,color:It,default:Bt},zt=r.__assign(r.__assign({},de),{color:a.color,backgroundColor:a.color,outlineColor:a.color,fill:a.color,stroke:a.color,borderColor:a.color,borderTopColor:a.color,borderRightColor:a.color,borderBottomColor:a.color,borderLeftColor:a.color,filter:a.filter,WebkitFilter:a.filter}),Ut=function(e){return zt[e]};function Gt(e,t){var n,r=Ut(e);return r!==a.filter&&(r=a.complex),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}var Wt={current:!1};var Zt=!1;function Ht(e){var t=e.ease,n=e.times,o=e.yoyo,a=e.flip,s=e.loop,l=r.__rest(e,["ease","times","yoyo","flip","loop"]),u=r.__assign({},l);return n&&(u.offset=n),l.duration&&(u.duration=Ot(l.duration)),l.repeatDelay&&(u.repeatDelay=Ot(l.repeatDelay)),t&&(u.ease=function(e){return Array.isArray(e)&&"number"!==typeof e[0]}(t)?t.map(Mt):Mt(t)),"tween"===l.type&&(u.type="keyframes"),(o||s||a)&&(i.warning(!Zt,"yoyo, loop and flip have been removed from the API. Replace with repeat and repeatType options."),Zt=!0,o?u.repeatType="reverse":s?u.repeatType="loop":a&&(u.repeatType="mirror"),u.repeat=s||o||a||l.repeat),"spring"!==l.type&&(u.type="keyframes"),u}function $t(e,t,n){var o;return Array.isArray(t.to)&&(null!==(o=e.duration)&&void 0!==o||(e.duration=.8)),function(e){Array.isArray(e.to)&&null===e.to[0]&&(e.to=r.__spreadArray([],r.__read(e.to),!1),e.to[0]=e.from)}(t),function(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from;var t=r.__rest(e,["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from"]);return!!Object.keys(t).length}(e)||(e=r.__assign(r.__assign({},e),function(e,t){var n;return n=Be(t)?Vt:Nt[e]||Nt.default,r.__assign({to:t},n(t))}(n,t.to))),r.__assign(r.__assign({},t),Ht(e))}function Kt(e){return 0===e||"string"===typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function Xt(e){return"number"===typeof e?0:Gt("",e)}function Yt(e,t){return e[t]||e.default||e}function qt(e,t,n,o){return void 0===o&&(o={}),Wt.current&&(o={type:!1}),t.start((function(a){var l,u,c=function(e,t,n,o,a){var l,u=Yt(o,e),c=null!==(l=u.from)&&void 0!==l?l:t.get(),d=Dt(e,n);"none"===c&&d&&"string"===typeof n?c=Gt(e,n):Kt(c)&&"string"===typeof n?c=Xt(n):!Array.isArray(n)&&Kt(n)&&"string"===typeof c&&(n=Xt(c));var f=Dt(e,c);return i.warning(f===d,"You are trying to animate ".concat(e,' from "').concat(c,'" to "').concat(n,'". ').concat(c," is not an animatable value - to enable this animation set ").concat(c," to a value animatable to ").concat(n," via the `style` property.")),f&&d&&!1!==u.type?function(){var o={from:c,to:n,velocity:t.getVelocity(),onComplete:a,onUpdate:function(e){return t.set(e)}};return"inertia"===u.type||"decay"===u.type?s.inertia(r.__assign(r.__assign({},o),u)):s.animate(r.__assign(r.__assign({},$t(u,o,e)),{onUpdate:function(e){var t;o.onUpdate(e),null===(t=u.onUpdate)||void 0===t||t.call(u,e)},onComplete:function(){var e;o.onComplete(),null===(e=u.onComplete)||void 0===e||e.call(u)}}))}:function(){var e,r,o=Ie(n);return t.set(o),a(),null===(e=null===u||void 0===u?void 0:u.onUpdate)||void 0===e||e.call(u,o),null===(r=null===u||void 0===u?void 0:u.onComplete)||void 0===r||r.call(u),{stop:function(){}}}}(e,t,n,o,a),d=function(e,t){var n,r;return null!==(r=null!==(n=(Yt(e,t)||{}).delay)&&void 0!==n?n:e.delay)&&void 0!==r?r:0}(o,e),f=function(){return u=c()};return d?l=window.setTimeout(f,Ot(d)):f(),function(){clearTimeout(l),null===u||void 0===u||u.stop()}}))}var Qt=function(e){return/^0[^.\s]+$/.test(e)};function Jt(e,t){-1===e.indexOf(t)&&e.push(t)}function en(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var tn=function(){function e(){this.subscriptions=[]}return e.prototype.add=function(e){var t=this;return Jt(this.subscriptions,e),function(){return en(t.subscriptions,e)}},e.prototype.notify=function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}},e.prototype.getSize=function(){return this.subscriptions.length},e.prototype.clear=function(){this.subscriptions.length=0},e}(),nn=function(){function e(e){var t,n=this;this.version="6.5.1",this.timeDelta=0,this.lastUpdated=0,this.updateSubscribers=new tn,this.velocityUpdateSubscribers=new tn,this.renderSubscribers=new tn,this.canTrackVelocity=!1,this.updateAndNotify=function(e,t){void 0===t&&(t=!0),n.prev=n.current,n.current=e;var r=l.getFrameData(),o=r.delta,i=r.timestamp;n.lastUpdated!==i&&(n.timeDelta=o,n.lastUpdated=i,h.default.postRender(n.scheduleVelocityCheck)),n.prev!==n.current&&n.updateSubscribers.notify(n.current),n.velocityUpdateSubscribers.getSize()&&n.velocityUpdateSubscribers.notify(n.getVelocity()),t&&n.renderSubscribers.notify(n.current)},this.scheduleVelocityCheck=function(){return h.default.postRender(n.velocityCheck)},this.velocityCheck=function(e){e.timestamp!==n.lastUpdated&&(n.prev=n.current,n.velocityUpdateSubscribers.notify(n.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t)))}return e.prototype.onChange=function(e){return this.updateSubscribers.add(e)},e.prototype.clearListeners=function(){this.updateSubscribers.clear()},e.prototype.onRenderRequest=function(e){return e(this.get()),this.renderSubscribers.add(e)},e.prototype.attach=function(e){this.passiveEffect=e},e.prototype.set=function(e,t){void 0===t&&(t=!0),t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)},e.prototype.get=function(){return this.current},e.prototype.getPrevious=function(){return this.prev},e.prototype.getVelocity=function(){return this.canTrackVelocity?s.velocityPerSecond(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0},e.prototype.start=function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.stopAnimation=e(n)})).then((function(){return t.clearAnimation()}))},e.prototype.stop=function(){this.stopAnimation&&this.stopAnimation(),this.clearAnimation()},e.prototype.isAnimating=function(){return!!this.stopAnimation},e.prototype.clearAnimation=function(){this.stopAnimation=null},e.prototype.destroy=function(){this.updateSubscribers.clear(),this.renderSubscribers.clear(),this.stop()},e}();function rn(e){return new nn(e)}var on=function(e){return function(t){return t.test(e)}},an=[a.number,a.px,a.percent,a.degrees,a.vw,a.vh,{test:function(e){return"auto"===e},parse:function(e){return e}}],sn=function(e){return an.find(on(e))},ln=r.__spreadArray(r.__spreadArray([],r.__read(an),!1),[a.color,a.complex],!1),un=function(e){return ln.find(on(e))};function cn(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,rn(n))}function dn(e,t){var n=D(e,t),o=n?e.makeTargetAnimatable(n,!1):{},i=o.transitionEnd,a=void 0===i?{}:i;o.transition;var s=r.__rest(o,["transitionEnd","transition"]);for(var l in s=r.__assign(r.__assign({},s),a)){cn(e,l,Ie(s[l]))}}function fn(e,t){r.__spreadArray([],r.__read(t),!1).reverse().forEach((function(n){var r,o=e.getVariant(n);o&&dn(e,o),null===(r=e.variantChildren)||void 0===r||r.forEach((function(e){fn(e,t)}))}))}function pn(e,t,n){var r,o,i,s,l=Object.keys(t).filter((function(t){return!e.hasValue(t)})),u=l.length;if(u)for(var c=0;c<u;c++){var d=l[c],f=t[d],p=null;Array.isArray(f)&&(p=f[0]),null===p&&(p=null!==(o=null!==(r=n[d])&&void 0!==r?r:e.readValue(d))&&void 0!==o?o:t[d]),void 0!==p&&null!==p&&("string"===typeof p&&(/^\-?\d*\.?\d+$/.test(p)||Qt(p))?p=parseFloat(p):!un(p)&&a.complex.test(f)&&(p=Gt(d,f)),e.addValue(d,rn(p)),null!==(i=(s=n)[d])&&void 0!==i||(s[d]=p),e.setBaseTarget(d,p))}}function hn(e,t){if(t)return(t[e]||t.default||t).from}function mn(e,t,n){var r,o,i={};for(var a in e)i[a]=null!==(r=hn(a,t))&&void 0!==r?r:null===(o=n.getValue(a))||void 0===o?void 0:o.get();return i}function vn(e,t,n){var r;if(void 0===n&&(n={}),e.notifyAnimationStart(t),Array.isArray(t)){var o=t.map((function(t){return gn(e,t,n)}));r=Promise.all(o)}else if("string"===typeof t)r=gn(e,t,n);else{var i="function"===typeof t?D(e,t,n.custom):t;r=yn(e,i,n)}return r.then((function(){return e.notifyAnimationComplete(t)}))}function gn(e,t,n){var o;void 0===n&&(n={});var i=D(e,t,n.custom),a=(i||{}).transition,s=void 0===a?e.getDefaultTransition()||{}:a;n.transitionOverride&&(s=n.transitionOverride);var l=i?function(){return yn(e,i,n)}:function(){return Promise.resolve()},u=(null===(o=e.variantChildren)||void 0===o?void 0:o.size)?function(o){void 0===o&&(o=0);var i=s.delayChildren,a=void 0===i?0:i,l=s.staggerChildren,u=s.staggerDirection;return function(e,t,n,o,i,a){void 0===n&&(n=0);void 0===o&&(o=0);void 0===i&&(i=1);var s=[],l=(e.variantChildren.size-1)*o,u=1===i?function(e){return void 0===e&&(e=0),e*o}:function(e){return void 0===e&&(e=0),l-e*o};return Array.from(e.variantChildren).sort(bn).forEach((function(e,o){s.push(gn(e,t,r.__assign(r.__assign({},a),{delay:n+u(o)})).then((function(){return e.notifyAnimationComplete(t)})))})),Promise.all(s)}(e,t,a+o,l,u,n)}:function(){return Promise.resolve()},c=s.when;if(c){var d=r.__read("beforeChildren"===c?[l,u]:[u,l],2),f=d[0],p=d[1];return f().then(p)}return Promise.all([l(),u(n.delay)])}function yn(e,t,n){var o,i=void 0===n?{}:n,a=i.delay,s=void 0===a?0:a,l=i.transitionOverride,u=i.type,c=e.makeTargetAnimatable(t),d=c.transition,f=void 0===d?e.getDefaultTransition():d,p=c.transitionEnd,h=r.__rest(c,["transition","transitionEnd"]);l&&(f=l);var m=[],v=u&&(null===(o=e.animationState)||void 0===o?void 0:o.getState()[u]);for(var g in h){var y=e.getValue(g),b=h[g];if(!(!y||void 0===b||v&&xn(v,g))){var x=r.__assign({delay:s},f);e.shouldReduceMotion&&ne(g)&&(x=r.__assign(r.__assign({},x),{type:!1,delay:0}));var w=qt(g,y,b,x);m.push(w)}}return Promise.all(m).then((function(){p&&dn(e,p)}))}function bn(e,t){return e.sortNodePosition(t)}function xn(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}var wn=[t.AnimationType.Animate,t.AnimationType.InView,t.AnimationType.Focus,t.AnimationType.Hover,t.AnimationType.Tap,t.AnimationType.Drag,t.AnimationType.Exit],kn=r.__spreadArray([],r.__read(wn),!1).reverse(),Sn=wn.length;function _n(e){var n=function(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return vn(e,n,r)})))}}(e),o=function(){var e;return(e={})[t.AnimationType.Animate]=En(!0),e[t.AnimationType.InView]=En(),e[t.AnimationType.Hover]=En(),e[t.AnimationType.Tap]=En(),e[t.AnimationType.Drag]=En(),e[t.AnimationType.Focus]=En(),e[t.AnimationType.Exit]=En(),e}(),i={},a=!0,s=function(t,n){var o=D(e,n);if(o){o.transition;var i=o.transitionEnd,a=r.__rest(o,["transition","transitionEnd"]);t=r.__assign(r.__assign(r.__assign({},t),a),i)}return t};function l(t,l){for(var u,c=e.getProps(),d=e.getVariantContext(!0)||{},f=[],p=new Set,h={},m=1/0,v=function(n){var i=kn[n],v=o[i],g=null!==(u=c[i])&&void 0!==u?u:d[i],y=F(g),b=i===l?v.isActive:null;!1===b&&(m=n);var x=g===d[i]&&g!==c[i]&&y;if(x&&a&&e.manuallyAnimateOnMount&&(x=!1),v.protectedKeys=r.__assign({},h),!v.isActive&&null===b||!g&&!v.prevProp||Le(g)||"boolean"===typeof g)return"continue";var w=function(e,t){if("string"===typeof t)return t!==e;if(O(t))return!Rt(t,e);return!1}(v.prevProp,g),k=w||i===l&&v.isActive&&!x&&y||n>m&&y,S=Array.isArray(g)?g:[g],_=S.reduce(s,{});!1===b&&(_={});var E=v.prevResolvedValues,C=void 0===E?{}:E,P=r.__assign(r.__assign({},C),_),A=function(e){k=!0,p.delete(e),v.needsAnimating[e]=!0};for(var T in P){var j=_[T],R=C[T];h.hasOwnProperty(T)||(j!==R?Be(j)&&Be(R)?!Rt(j,R)||w?A(T):v.protectedKeys[T]=!0:void 0!==j?A(T):p.add(T):void 0!==j&&p.has(T)?A(T):v.protectedKeys[T]=!0)}v.prevProp=g,v.prevResolvedValues=_,v.isActive&&(h=r.__assign(r.__assign({},h),_)),a&&e.blockInitialAnimation&&(k=!1),k&&!x&&f.push.apply(f,r.__spreadArray([],r.__read(S.map((function(e){return{animation:e,options:r.__assign({type:i},t)}}))),!1))},g=0;g<Sn;g++)v(g);if(i=r.__assign({},h),p.size){var y={};p.forEach((function(t){var n=e.getBaseTarget(t);void 0!==n&&(y[t]=n)})),f.push({animation:y})}var b=Boolean(f.length);return a&&!1===c.initial&&!e.manuallyAnimateOnMount&&(b=!1),a=!1,b?n(f):Promise.resolve()}return{isAnimated:function(e){return void 0!==i[e]},animateChanges:l,setActive:function(t,n,r){var i;if(o[t].isActive===n)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var r;return null===(r=e.animationState)||void 0===r?void 0:r.setActive(t,n)})),o[t].isActive=n;var a=l(r,t);for(var s in o)o[s].protectedKeys={};return a},setAnimateFunction:function(t){n=t(e)},getState:function(){return o}}}function En(e){return void 0===e&&(e=!1),{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}var Cn={animation:Et((function(e){var t=e.visualElement,n=e.animate;t.animationState||(t.animationState=_n(t)),Le(n)&&o.useEffect((function(){return n.subscribe(t)}),[n])})),exit:Et((function(e){var n=e.custom,i=e.visualElement,a=r.__read(jt(),2),s=a[0],l=a[1],u=o.useContext(_);o.useEffect((function(){var e,r;i.isPresent=s;var o=null===(e=i.animationState)||void 0===e?void 0:e.setActive(t.AnimationType.Exit,!s,{custom:null!==(r=null===u||void 0===u?void 0:u.custom)&&void 0!==r?r:n});!s&&(null===o||void 0===o||o.then(l))}),[s])}))},Pn=function(){function e(e,t,n){var o=this,i=(void 0===n?{}:n).transformPagePoint;if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=function(){if(o.lastMoveEvent&&o.lastMoveEventInfo){var e=jn(o.lastMoveEventInfo,o.history),t=null!==o.startEvent,n=s.distance(e.offset,{x:0,y:0})>=3;if(t||n){var i=e.point,a=l.getFrameData().timestamp;o.history.push(r.__assign(r.__assign({},i),{timestamp:a}));var u=o.handlers,c=u.onStart,d=u.onMove;t||(c&&c(o.lastMoveEvent,e),o.startEvent=o.lastMoveEvent),d&&d(o.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){o.lastMoveEvent=e,o.lastMoveEventInfo=An(t,o.transformPagePoint),Xe(e)&&0===e.buttons?o.handlePointerUp(e,t):h.default.update(o.updatePoint,!0)},this.handlePointerUp=function(e,t){o.end();var n=o.handlers,r=n.onEnd,i=n.onSessionEnd,a=jn(An(t,o.transformPagePoint),o.history);o.startEvent&&r&&r(e,a),i&&i(e,a)},!(Ye(e)&&e.touches.length>1)){this.handlers=t,this.transformPagePoint=i;var a=An(et(e),this.transformPagePoint),u=a.point,c=l.getFrameData().timestamp;this.history=[r.__assign(r.__assign({},u),{timestamp:c})];var d=t.onSessionStart;d&&d(e,jn(a,this.history)),this.removeListeners=s.pipe(it(window,"pointermove",this.handlePointerMove),it(window,"pointerup",this.handlePointerUp),it(window,"pointercancel",this.handlePointerUp))}}return e.prototype.updateHandlers=function(e){this.handlers=e},e.prototype.end=function(){this.removeListeners&&this.removeListeners(),l.cancelSync.update(this.updatePoint)},e}();function An(e,t){return t?{point:t(e.point)}:e}function Tn(e,t){return{x:e.x-t.x,y:e.y-t.y}}function jn(e,t){var n=e.point;return{point:n,delta:Tn(n,On(t)),offset:Tn(n,Rn(t)),velocity:Fn(t,.1)}}function Rn(e){return e[0]}function On(e){return e[e.length-1]}function Fn(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=On(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ot(t)));)n--;if(!r)return{x:0,y:0};var i=(o.timestamp-r.timestamp)/1e3;if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Mn(e){return e.max-e.min}function Dn(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=.01),s.distance(e,t)<n}function Ln(e,t,n,r){void 0===r&&(r=.5),e.origin=r,e.originPoint=s.mix(t.min,t.max,e.origin),e.scale=Mn(n)/Mn(t),(Dn(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=s.mix(n.min,n.max,e.origin)-e.originPoint,(Dn(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Bn(e,t,n,r){Ln(e.x,t.x,n.x,null===r||void 0===r?void 0:r.originX),Ln(e.y,t.y,n.y,null===r||void 0===r?void 0:r.originY)}function In(e,t,n){e.min=n.min+t.min,e.max=e.min+Mn(t)}function Vn(e,t,n){e.min=t.min-n.min,e.max=e.min+Mn(t)}function Nn(e,t,n){Vn(e.x,t.x,n.x),Vn(e.y,t.y,n.y)}function zn(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Un(e,t){var n,o=t.min-e.min,i=t.max-e.max;return t.max-t.min<e.max-e.min&&(o=(n=r.__read([i,o],2))[0],i=n[1]),{min:o,max:i}}var Gn=.35;function Wn(e,t,n){return{min:Zn(e,t),max:Zn(e,n)}}function Zn(e,t){var n;return"number"===typeof e?e:null!==(n=e[t])&&void 0!==n?n:0}var Hn=function(){return{x:{min:0,max:0},y:{min:0,max:0}}};function $n(e){return[e("x"),e("y")]}function Kn(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function Xn(e){return void 0===e||1===e}function Yn(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!Xn(t)||!Xn(n)||!Xn(r)}function qn(e){return Yn(e)||Qn(e.x)||Qn(e.y)||e.z||e.rotate||e.rotateX||e.rotateY}function Qn(e){return e&&"0%"!==e}function Jn(e,t,n){return n+t*(e-n)}function er(e,t,n,r,o){return void 0!==o&&(e=Jn(e,o,r)),Jn(e,n,r)+t}function tr(e,t,n,r,o){void 0===t&&(t=0),void 0===n&&(n=1),e.min=er(e.min,t,n,r,o),e.max=er(e.max,t,n,r,o)}function nr(e,t){var n=t.x,r=t.y;tr(e.x,n.translate,n.scale,n.originPoint),tr(e.y,r.translate,r.scale,r.originPoint)}function rr(e,t){e.min=e.min+t,e.max=e.max+t}function or(e,t,n){var o=r.__read(n,3),i=o[0],a=o[1],l=o[2],u=void 0!==t[l]?t[l]:.5,c=s.mix(e.min,e.max,u);tr(e,t[i],t[a],c,t.scale)}var ir=["x","scaleX","originX"],ar=["y","scaleY","originY"];function sr(e,t){or(e.x,t,ir),or(e.y,t,ar)}function lr(e,t){return Kn(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var ur=new WeakMap,cr=function(){function e(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}return e.prototype.start=function(e,n){var r=this,o=(void 0===n?{}:n).snapToCursor,i=void 0!==o&&o;if(!1!==this.visualElement.isPresent){this.panSession=new Pn(e,{onSessionStart:function(e){r.stopAnimation(),i&&r.snapToCursor(et(e,"page").point)},onStart:function(e,n){var o,i=r.getProps(),s=i.drag,l=i.dragPropagation,u=i.onDragStart;(!s||l||(r.openGlobalLock&&r.openGlobalLock(),r.openGlobalLock=ct(s),r.openGlobalLock))&&(r.isDragging=!0,r.currentDirection=null,r.resolveConstraints(),r.visualElement.projection&&(r.visualElement.projection.isAnimationBlocked=!0,r.visualElement.projection.target=void 0),$n((function(e){var t,n,o=r.getAxisMotionValue(e).get()||0;if(a.percent.test(o)){var i=null===(n=null===(t=r.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.actual[e];if(i)o=Mn(i)*(parseFloat(o)/100)}r.originPoint[e]=o})),null===u||void 0===u||u(e,n),null===(o=r.visualElement.animationState)||void 0===o||o.setActive(t.AnimationType.Drag,!0))},onMove:function(e,t){var n=r.getProps(),o=n.dragPropagation,i=n.dragDirectionLock,a=n.onDirectionLock,s=n.onDrag;if(o||r.openGlobalLock){var l=t.offset;if(i&&null===r.currentDirection)return r.currentDirection=function(e,t){void 0===t&&(t=10);var n=null;Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x");return n}(l),void(null!==r.currentDirection&&(null===a||void 0===a||a(r.currentDirection)));r.updateAxis("x",t.point,l),r.updateAxis("y",t.point,l),r.visualElement.syncRender(),null===s||void 0===s||s(e,t)}},onSessionEnd:function(e,t){return r.stop(e,t)}},{transformPagePoint:this.visualElement.getTransformPagePoint()})}},e.prototype.stop=function(e,t){var n=this.isDragging;if(this.cancel(),n){var r=t.velocity;this.startAnimation(r);var o=this.getProps().onDragEnd;null===o||void 0===o||o(e,t)}},e.prototype.cancel=function(){var e,n;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(t.AnimationType.Drag,!1)},e.prototype.updateAxis=function(e,t,n){var r=this.getProps().drag;if(n&&dr(e,r,this.currentDirection)){var o=this.getAxisMotionValue(e),i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?s.mix(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?s.mix(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}},e.prototype.resolveConstraints=function(){var e=this,t=this.getProps(),n=t.dragConstraints,r=t.dragElastic,o=(this.visualElement.projection||{}).layout,i=this.constraints;n&&R(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!n||!o)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:zn(e.x,r,i),y:zn(e.y,n,o)}}(o.actual,n),this.elastic=function(e){return void 0===e&&(e=Gn),!1===e?e=0:!0===e&&(e=Gn),{x:Wn(e,"left","right"),y:Wn(e,"top","bottom")}}(r),i!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&$n((function(t){e.getAxisMotionValue(t)&&(e.constraints[t]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(o.actual[t],e.constraints[t]))}))},e.prototype.resolveRefConstraints=function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!R(t))return!1;var r=t.current;i.invariant(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var a=function(e,t,n){var r=lr(e,n),o=t.scroll;return o&&(rr(r.x,o.x),rr(r.y,o.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),s=function(e,t){return{x:Un(e.x,t.x),y:Un(e.y,t.y)}}(o.layout.actual,a);if(n){var l=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(s));this.hasMutatedConstraints=!!l,l&&(s=Kn(l))}return s},e.prototype.startAnimation=function(e){var t=this,n=this.getProps(),o=n.drag,i=n.dragMomentum,a=n.dragElastic,s=n.dragTransition,l=n.dragSnapToOrigin,u=n.onDragTransitionEnd,c=this.constraints||{},d=$n((function(n){var u;if(dr(n,o,t.currentDirection)){var d=null!==(u=null===c||void 0===c?void 0:c[n])&&void 0!==u?u:{};l&&(d={min:0,max:0});var f=a?200:1e6,p=a?40:1e7,h=r.__assign(r.__assign({type:"inertia",velocity:i?e[n]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10},s),d);return t.startAxisValueAnimation(n,h)}}));return Promise.all(d).then(u)},e.prototype.startAxisValueAnimation=function(e,t){return qt(e,this.getAxisMotionValue(e),0,t)},e.prototype.stopAnimation=function(){var e=this;$n((function(t){return e.getAxisMotionValue(t).stop()}))},e.prototype.getAxisMotionValue=function(e){var t,n,r="_drag"+e.toUpperCase(),o=this.visualElement.getProps()[r];return o||this.visualElement.getValue(e,null!==(n=null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])&&void 0!==n?n:0)},e.prototype.snapToCursor=function(e){var t=this;$n((function(n){if(dr(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.actual[n],a=i.min,l=i.max;o.set(e[n]-s.mix(a,l,.5))}}}))},e.prototype.scalePositionWithinConstraints=function(){var e,t=this,n=this.getProps(),r=n.drag,o=n.dragConstraints,i=this.visualElement.projection;if(R(o)&&i&&this.constraints){this.stopAnimation();var a={x:0,y:0};$n((function(e){var n=t.getAxisMotionValue(e);if(n){var r=n.get();a[e]=function(e,t){var n=.5,r=Mn(e),o=Mn(t);return o>r?n=s.progress(t.min,t.max-r,e.min):r>o&&(n=s.progress(e.min,e.max-o,t.min)),s.clamp(0,1,n)}({min:r,max:r},t.constraints[e])}}));var l=this.visualElement.getProps().transformTemplate;this.visualElement.getInstance().style.transform=l?l({},""):"none",null===(e=i.root)||void 0===e||e.updateScroll(),i.updateLayout(),this.resolveConstraints(),$n((function(e){if(dr(e,r,null)){var n=t.getAxisMotionValue(e),o=t.constraints[e],i=o.min,l=o.max;n.set(s.mix(i,l,a[e]))}}))}},e.prototype.addListeners=function(){var e,t=this;ur.set(this.visualElement,this);var n=it(this.visualElement.getInstance(),"pointerdown",(function(e){var n=t.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&t.start(e)})),r=function(){R(t.getProps().dragConstraints)&&(t.constraints=t.resolveRefConstraints())},o=this.visualElement.projection,i=o.addEventListener("measure",r);o&&!o.layout&&(null===(e=o.root)||void 0===e||e.updateScroll(),o.updateLayout()),r();var a=$e(window,"resize",(function(){return t.scalePositionWithinConstraints()}));return o.addEventListener("didUpdate",(function(e){var n=e.delta,r=e.hasLayoutChanged;t.isDragging&&r&&($n((function(e){var r=t.getAxisMotionValue(e);r&&(t.originPoint[e]+=n[e].translate,r.set(r.get()+n[e].translate))})),t.visualElement.syncRender())})),function(){a(),n(),i()}},e.prototype.getProps=function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,o=e.dragDirectionLock,i=void 0!==o&&o,a=e.dragPropagation,s=void 0!==a&&a,l=e.dragConstraints,u=void 0!==l&&l,c=e.dragElastic,d=void 0===c?Gn:c,f=e.dragMomentum,p=void 0===f||f;return r.__assign(r.__assign({},e),{drag:n,dragDirectionLock:i,dragPropagation:s,dragConstraints:u,dragElastic:d,dragMomentum:p})},e}();function dr(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}var fr={pan:Et((function(e){var t=e.onPan,n=e.onPanStart,r=e.onPanEnd,i=e.onPanSessionStart,a=e.visualElement,s=t||n||r||i,l=o.useRef(null),u=o.useContext(w).transformPagePoint,c={onSessionStart:i,onStart:n,onMove:t,onEnd:function(e,t){l.current=null,r&&r(e,t)}};o.useEffect((function(){null!==l.current&&l.current.updateHandlers(c)})),at(a,"pointerdown",s&&function(e){l.current=new Pn(e,c,{transformPagePoint:u})}),ht((function(){return l.current&&l.current.end()}))})),drag:Et((function(e){var t=e.dragControls,n=e.visualElement,r=N((function(){return new cr(n)}));o.useEffect((function(){return t&&t.subscribe(r)}),[r,t]),o.useEffect((function(){return r.addListeners()}),[r])}))},pr=["LayoutMeasure","BeforeLayoutMeasure","LayoutUpdate","ViewportBoxUpdate","Update","Render","AnimationComplete","LayoutAnimationComplete","AnimationStart","LayoutAnimationStart","SetAxisTarget","Unmount"];var hr=function(e){var t=e.treeType,n=void 0===t?"":t,o=e.build,i=e.getBaseTarget,a=e.makeTargetAnimatable,s=e.measureViewportBox,u=e.render,c=e.readValueFromInstance,d=e.removeValueFromRenderState,f=e.sortNodePosition,p=e.scrapeMotionValuesFromProps;return function(e,t){var m=e.parent,v=e.props,g=e.presenceId,y=e.blockInitialAnimation,b=e.visualState,x=e.shouldReduceMotion;void 0===t&&(t={});var w,k,S=!1,_=b.latestValues,E=b.renderState,C=function(){var e=pr.map((function(){return new tn})),t={},n={clearAllListeners:function(){return e.forEach((function(e){return e.clear()}))},updatePropListeners:function(e){pr.forEach((function(r){var o,i="on"+r,a=e[i];null===(o=t[r])||void 0===o||o.call(t),a&&(t[r]=n[i](a))}))}};return e.forEach((function(e,t){n["on"+pr[t]]=function(t){return e.add(t)},n["notify"+pr[t]]=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return e.notify.apply(e,r.__spreadArray([],r.__read(t),!1))}})),n}(),P=new Map,A=new Map,T={},j=r.__assign({},_);function R(){w&&S&&(O(),u(w,E,v.style,G.projection))}function O(){o(G,E,_,t,v)}function M(){C.notifyUpdate(_)}function D(e,t){var n=t.onChange((function(t){_[e]=t,v.onUpdate&&h.default.update(M,!1,!0)})),r=t.onRenderRequest(G.scheduleRender);A.set(e,(function(){n(),r()}))}var I=p(v);for(var V in I){var N=I[V];void 0!==_[V]&&ae(N)&&N.set(_[V],!1)}var z=L(v),U=B(v),G=r.__assign(r.__assign({treeType:n,current:null,depth:m?m.depth+1:0,parent:m,children:new Set,presenceId:g,shouldReduceMotion:x,variantChildren:U?new Set:void 0,isVisible:void 0,manuallyAnimateOnMount:Boolean(null===m||void 0===m?void 0:m.isMounted()),blockInitialAnimation:y,isMounted:function(){return Boolean(w)},mount:function(e){S=!0,w=G.current=e,G.projection&&G.projection.mount(e),U&&m&&!z&&(k=null===m||void 0===m?void 0:m.addVariantChild(G)),P.forEach((function(e,t){return D(t,e)})),null===m||void 0===m||m.children.add(G),G.setProps(v)},unmount:function(){var e;null===(e=G.projection)||void 0===e||e.unmount(),l.cancelSync.update(M),l.cancelSync.render(R),A.forEach((function(e){return e()})),null===k||void 0===k||k(),null===m||void 0===m||m.children.delete(G),C.clearAllListeners(),w=void 0,S=!1},addVariantChild:function(e){var t,n=G.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),function(){return n.variantChildren.delete(e)}},sortNodePosition:function(e){return f&&n===e.treeType?f(G.getInstance(),e.getInstance()):0},getClosestVariantNode:function(){return U?G:null===m||void 0===m?void 0:m.getClosestVariantNode()},getLayoutId:function(){return v.layoutId},getInstance:function(){return w},getStaticValue:function(e){return _[e]},setStaticValue:function(e,t){return _[e]=t},getLatestValues:function(){return _},setVisibility:function(e){G.isVisible!==e&&(G.isVisible=e,G.scheduleRender())},makeTargetAnimatable:function(e,t){return void 0===t&&(t=!0),a(G,e,v,t)},measureViewportBox:function(){return s(w,v)},addValue:function(e,t){G.hasValue(e)&&G.removeValue(e),P.set(e,t),_[e]=t.get(),D(e,t)},removeValue:function(e){var t;P.delete(e),null===(t=A.get(e))||void 0===t||t(),A.delete(e),delete _[e],d(e,E)},hasValue:function(e){return P.has(e)},getValue:function(e,t){var n=P.get(e);return void 0===n&&void 0!==t&&(n=rn(t),G.addValue(e,n)),n},forEachValue:function(e){return P.forEach(e)},readValue:function(e){var n;return null!==(n=_[e])&&void 0!==n?n:c(w,e,t)},setBaseTarget:function(e,t){j[e]=t},getBaseTarget:function(e){if(i){var t=i(v,e);if(void 0!==t&&!ae(t))return t}return j[e]}},C),{build:function(){return O(),E},scheduleRender:function(){h.default.render(R,!1,!0)},syncRender:R,setProps:function(e){(e.transformTemplate||v.transformTemplate)&&G.scheduleRender(),v=e,C.updatePropListeners(e),T=function(e,t,n){var r;for(var o in t){var i=t[o],a=n[o];if(ae(i))e.addValue(o,i);else if(ae(a))e.addValue(o,rn(i));else if(a!==i)if(e.hasValue(o)){var s=e.getValue(o);!s.hasAnimated&&s.set(i)}else e.addValue(o,rn(null!==(r=e.getStaticValue(o))&&void 0!==r?r:i))}for(var o in n)void 0===t[o]&&e.removeValue(o);return t}(G,p(v),T)},getProps:function(){return v},getVariant:function(e){var t;return null===(t=v.variants)||void 0===t?void 0:t[e]},getDefaultTransition:function(){return v.transition},getTransformPagePoint:function(){return v.transformPagePoint},getVariantContext:function(e){if(void 0===e&&(e=!1),e)return null===m||void 0===m?void 0:m.getVariantContext();if(!z){var t=(null===m||void 0===m?void 0:m.getVariantContext())||{};return void 0!==v.initial&&(t.initial=v.initial),t}for(var n={},r=0;r<vr;r++){var o=mr[r],i=v[o];(F(i)||!1===i)&&(n[o]=i)}return n}});return G}},mr=r.__spreadArray(["initial"],r.__read(wn),!1),vr=mr.length;function gr(e){return"string"===typeof e&&e.startsWith("var(--")}var yr=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function br(e,t,n){void 0===n&&(n=1),i.invariant(n<=4,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var o=r.__read(function(e){var t=yr.exec(e);if(!t)return[,];var n=r.__read(t,3);return[n[1],n[2]]}(e),2),a=o[0],s=o[1];if(a){var l=window.getComputedStyle(t).getPropertyValue(a);return l?l.trim():gr(s)?br(s,t,n+1):s}}var xr,wr=new Set(["width","height","top","left","right","bottom","x","y"]),kr=function(e){return wr.has(e)},Sr=function(e,t){e.set(t,!1),e.set(t)},_r=function(e){return e===a.number||e===a.px};!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(xr||(xr={}));var Er=function(e,t){return parseFloat(e.split(", ")[t])},Cr=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\((.+)\)$/);if(i)return Er(i[1],t);var a=o.match(/^matrix\((.+)\)$/);return a?Er(a[1],e):0}},Pr=new Set(["x","y","z"]),Ar=J.filter((function(e){return!Pr.has(e)}));var Tr={width:function(e,t){var n=e.x,r=t.paddingLeft,o=void 0===r?"0":r,i=t.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(e,t){var n=e.y,r=t.paddingTop,o=void 0===r?"0":r,i=t.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Cr(4,13),y:Cr(5,14)},jr=function(e,t,n,o){void 0===n&&(n={}),void 0===o&&(o={}),t=r.__assign({},t),o=r.__assign({},o);var s=Object.keys(t).filter(kr),l=[],u=!1,c=[];if(s.forEach((function(r){var s=e.getValue(r);if(e.hasValue(r)){var d,f=n[r],p=sn(f),h=t[r];if(Be(h)){var m=h.length,v=null===h[0]?1:0;f=h[v],p=sn(f);for(var g=v;g<m;g++)d?i.invariant(sn(h[g])===d,"All keyframes must be of the same type"):(d=sn(h[g]),i.invariant(d===p||_r(p)&&_r(d),"Keyframes must be of the same dimension as the current value"))}else d=sn(h);if(p!==d)if(_r(p)&&_r(d)){var y=s.get();"string"===typeof y&&s.set(parseFloat(y)),"string"===typeof h?t[r]=parseFloat(h):Array.isArray(h)&&d===a.px&&(t[r]=h.map(parseFloat))}else(null===p||void 0===p?void 0:p.transform)&&(null===d||void 0===d?void 0:d.transform)&&(0===f||0===h)?0===f?s.set(d.transform(f)):t[r]=p.transform(h):(u||(l=function(e){var t=[];return Ar.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.syncRender(),t}(e),u=!0),c.push(r),o[r]=void 0!==o[r]?o[r]:t[r],Sr(s,h))}})),c.length){var d=c.indexOf("height")>=0?window.pageYOffset:null,f=function(e,t,n){var r=t.measureViewportBox(),o=t.getInstance(),i=getComputedStyle(o),a=i.display,s={};"none"===a&&t.setStaticValue("display",e.display||"block"),n.forEach((function(e){s[e]=Tr[e](r,i)})),t.syncRender();var l=t.measureViewportBox();return n.forEach((function(n){var r=t.getValue(n);Sr(r,s[n]),e[n]=Tr[n](l,i)})),e}(t,e,c);return l.length&&l.forEach((function(t){var n=r.__read(t,2),o=n[0],i=n[1];e.getValue(o).set(i)})),e.syncRender(),null!==d&&window.scrollTo({top:d}),{target:f,transitionEnd:o}}return{target:t,transitionEnd:o}};function Rr(e,t,n,r){return function(e){return Object.keys(e).some(kr)}(t)?jr(e,t,n,r):{target:t,transitionEnd:r}}var Or=function(e,t,n,o){var i=function(e,t,n){var o,i=r.__rest(t,[]),a=e.getInstance();if(!(a instanceof Element))return{target:i,transitionEnd:n};for(var s in n&&(n=r.__assign({},n)),e.forEachValue((function(e){var t=e.get();if(gr(t)){var n=br(t,a);n&&e.set(n)}})),i){var l=i[s];if(gr(l)){var u=br(l,a);u&&(i[s]=u,n&&(null!==(o=n[s])&&void 0!==o||(n[s]=l)))}}return{target:i,transitionEnd:n}}(e,t,o);return Rr(e,t=i.target,n,o=i.transitionEnd)};var Fr={treeType:"dom",readValueFromInstance:function(e,t){if(ne(t)){var n=Ut(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r));return(le(t)?o.getPropertyValue(t):o[t])||0},sortNodePosition:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1},getBaseTarget:function(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]},measureViewportBox:function(e,t){return lr(e,t.transformPagePoint)},resetTransform:function(e,t,n){var r=n.transformTemplate;t.style.transform=r?r({},""):"none",e.scheduleRender()},restoreTransform:function(e,t){e.style.transform=t.style.transform},removeValueFromRenderState:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]},makeTargetAnimatable:function(e,t,n,o){var i=n.transformValues;void 0===o&&(o=!0);var a=t.transition,s=t.transitionEnd,l=r.__rest(t,["transition","transitionEnd"]),u=mn(l,a||{},e);if(i&&(s&&(s=i(s)),l&&(l=i(l)),u&&(u=i(u))),o){pn(e,l,u);var c=Or(e,l,u,s);s=c.transitionEnd,l=c.target}return r.__assign({transition:a,transitionEnd:s},l)},scrapeMotionValuesFromProps:Me,build:function(e,t,n,r,o){void 0!==e.isVisible&&(t.style.visibility=e.isVisible?"visible":"hidden"),fe(t,n,r,o.transformTemplate)},render:Re},Mr=hr(Fr),Dr=hr(r.__assign(r.__assign({},Fr),{getBaseTarget:function(e,t){return e[t]},readValueFromInstance:function(e,t){var n;return ne(t)?(null===(n=Ut(t))||void 0===n?void 0:n.default)||0:(t=Oe.has(t)?t:je(t),e.getAttribute(t))},scrapeMotionValuesFromProps:De,build:function(e,t,n,r,o){Ee(t,n,r,o.transformTemplate)},render:Fe})),Lr=function(e,t){return X(e)?Dr(t,{enableHardwareAcceleration:!1}):Mr(t,{enableHardwareAcceleration:!0})};function Br(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var Ir={correct:function(e,t){if(!t.target)return e;if("string"===typeof e){if(!a.px.test(e))return e;e=parseFloat(e)}var n=Br(e,t.target.x),r=Br(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},Vr="_$css",Nr={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,o=e,i=e.includes("var("),l=[];i&&(e=e.replace(yr,(function(e){return l.push(e),Vr})));var u=a.complex.parse(e);if(u.length>5)return o;var c=a.complex.createTransformer(e),d="number"!==typeof u[0]?1:0,f=r.x.scale*n.x,p=r.y.scale*n.y;u[0+d]/=f,u[1+d]/=p;var h=s.mix(f,p,.5);"number"===typeof u[2+d]&&(u[2+d]/=h),"number"===typeof u[3+d]&&(u[3+d]/=h);var m=c(u);if(i){var v=0;m=m.replace(Vr,(function(){var e=l[v];return v++,e}))}return m}},zr=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return r.__extends(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props,n=t.visualElement,o=t.layoutGroup,i=t.switchLayoutGroup,a=t.layoutId,s=n.projection;q(Ur),s&&((null===o||void 0===o?void 0:o.group)&&o.group.add(s),(null===i||void 0===i?void 0:i.register)&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){e.safeToRemove()})),s.setOptions(r.__assign(r.__assign({},s.options),{onExitComplete:function(){return e.safeToRemove()}}))),z.hasEverUpdated=!0},t.prototype.getSnapshotBeforeUpdate=function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||h.default.postRender((function(){var e;(null===(e=s.getStack())||void 0===e?void 0:e.members.length)||t.safeToRemove()}))),null):null},t.prototype.componentDidUpdate=function(){var e=this.props.visualElement.projection;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),(null===n||void 0===n?void 0:n.group)&&n.group.remove(o),(null===r||void 0===r?void 0:r.deregister)&&r.deregister(o))},t.prototype.safeToRemove=function(){var e=this.props.safeToRemove;null===e||void 0===e||e()},t.prototype.render=function(){return null},t}(p.default.Component);var Ur={borderRadius:r.__assign(r.__assign({},Ir),{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:Ir,borderTopRightRadius:Ir,borderBottomLeftRadius:Ir,borderBottomRightRadius:Ir,boxShadow:Nr},Gr={measureLayout:function(e){var t=r.__read(jt(),2),n=t[0],i=t[1],a=o.useContext(G);return p.default.createElement(zr,r.__assign({},e,{layoutGroup:a,switchLayoutGroup:o.useContext(W),isPresent:n,safeToRemove:i}))}};function Wr(e,t,n){void 0===n&&(n={});var r=ae(e)?e:rn(e);return qt("",r,t,n),{stop:function(){return r.stop()},isAnimating:function(){return r.isAnimating()}}}var Zr=["TopLeft","TopRight","BottomLeft","BottomRight"],Hr=Zr.length,$r=function(e){return"string"===typeof e?parseFloat(e):e},Kr=function(e){return"number"===typeof e||a.px.test(e)};function Xr(e,t){var n;return null!==(n=e[t])&&void 0!==n?n:e.borderRadius}var Yr=Qr(0,.5,s.circOut),qr=Qr(.5,.95,s.linear);function Qr(e,t,n){return function(r){return r<e?0:r>t?1:n(s.progress(e,t,r))}}function Jr(e,t){e.min=t.min,e.max=t.max}function eo(e,t){Jr(e.x,t.x),Jr(e.y,t.y)}function to(e,t,n,r,o){return e=Jn(e-=t,1/n,r),void 0!==o&&(e=Jn(e,1/o,r)),e}function no(e,t,n,o,i){var l=r.__read(n,3),u=l[0],c=l[1],d=l[2];!function(e,t,n,r,o,i,l){if(void 0===t&&(t=0),void 0===n&&(n=1),void 0===r&&(r=.5),void 0===i&&(i=e),void 0===l&&(l=e),a.percent.test(t)&&(t=parseFloat(t),t=s.mix(l.min,l.max,t/100)-l.min),"number"===typeof t){var u=s.mix(i.min,i.max,r);e===i&&(u-=t),e.min=to(e.min,t,n,u,o),e.max=to(e.max,t,n,u,o)}}(e,t[u],t[c],t[d],t.scale,o,i)}var ro=["x","scaleX","originX"],oo=["y","scaleY","originY"];function io(e,t,n,r){no(e.x,t,ro,null===n||void 0===n?void 0:n.x,null===r||void 0===r?void 0:r.x),no(e.y,t,oo,null===n||void 0===n?void 0:n.y,null===r||void 0===r?void 0:r.y)}function ao(e){return 0===e.translate&&1===e.scale}function so(e){return ao(e.x)&&ao(e.y)}function lo(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}var uo=function(){function e(){this.members=[]}return e.prototype.add=function(e){Jt(this.members,e),e.scheduleRender()},e.prototype.remove=function(e){if(en(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}},e.prototype.relegate=function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)},e.prototype.promote=function(e,t){var n,r=this.lead;e!==r&&(this.prevLead=r,this.lead=e,e.show(),r&&(r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues,e.snapshot.isShared=!0),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&r.hide()))},e.prototype.exitAnimationComplete=function(){this.members.forEach((function(e){var t,n,r,o,i;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(i=null===(r=e.resumingFrom)||void 0===r?void 0:(o=r.options).onExitComplete)||void 0===i||i.call(o)}))},e.prototype.scheduleRender=function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))},e.prototype.removeLeadSnapshot=function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)},e}();function co(e,t,n){var r=e.x.translate/t.x,o=e.y.translate/t.y,i="translate3d(".concat(r,"px, ").concat(o,"px, 0) ");if(i+="scale(".concat(1/t.x,", ").concat(1/t.y,") "),n){var a=n.rotate,s=n.rotateX,l=n.rotateY;a&&(i+="rotate(".concat(a,"deg) ")),s&&(i+="rotateX(".concat(s,"deg) ")),l&&(i+="rotateY(".concat(l,"deg) "))}var u=e.x.scale*t.x,c=e.y.scale*t.y;return"translate3d(0px, 0px, 0) scale(1, 1) scale(1, 1)"===(i+="scale(".concat(u,", ").concat(c,")"))?"none":i}var fo=function(e,t){return e.depth-t.depth},po=function(){function e(){this.children=[],this.isDirty=!1}return e.prototype.add=function(e){Jt(this.children,e),this.isDirty=!0},e.prototype.remove=function(e){en(this.children,e),this.isDirty=!0},e.prototype.forEach=function(e){this.isDirty&&this.children.sort(fo),this.isDirty=!1,this.children.forEach(e)},e}();function ho(e){var t=e.attachResizeListener,n=e.defaultParent,o=e.measureScroll,i=e.checkIsScrollRoot,u=e.resetTransform;return function(){function e(e,t,o){var i=this;void 0===t&&(t={}),void 0===o&&(o=null===n||void 0===n?void 0:n()),this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=function(){i.isUpdating&&(i.isUpdating=!1,i.clearAllSnapshots())},this.updateProjection=function(){i.nodes.forEach(wo),i.nodes.forEach(ko)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.id=e,this.latestValues=t,this.root=o?o.root||o:this,this.path=o?r.__spreadArray(r.__spreadArray([],r.__read(o.path),!1),[o],!1):[],this.parent=o,this.depth=o?o.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(var a=0;a<this.path.length;a++)this.path[a].shouldResetTransform=!0;this.root===this&&(this.nodes=new po)}return e.prototype.addEventListener=function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new tn),this.eventHandlers.get(e).add(t)},e.prototype.notifyListeners=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var o=this.eventHandlers.get(e);null===o||void 0===o||o.notify.apply(o,r.__spreadArray([],r.__read(t),!1))},e.prototype.hasListeners=function(e){return this.eventHandlers.has(e)},e.prototype.registerPotentialNode=function(e,t){this.potentialNodes.set(e,t)},e.prototype.mount=function(e,n){var o,i=this;if(void 0===n&&(n=!1),!this.instance){this.isSVG=e instanceof SVGElement&&"svg"!==e.tagName,this.instance=e;var a=this.options,s=a.layoutId,l=a.layout,u=a.visualElement;if(u&&!u.getInstance()&&u.mount(e),this.root.nodes.add(this),null===(o=this.parent)||void 0===o||o.children.add(this),this.id&&this.root.potentialNodes.delete(this.id),n&&(l||s)&&(this.isLayoutDirty=!0),t){var c,d=function(){return i.root.updateBlockedByResize=!1};t(e,(function(){i.root.updateBlockedByResize=!0,clearTimeout(c),c=window.setTimeout(d,250),z.hasAnimatedSinceResize&&(z.hasAnimatedSinceResize=!1,i.nodes.forEach(xo))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&u&&(s||l)&&this.addEventListener("didUpdate",(function(e){var t,n,o,a,s,l=e.delta,c=e.hasLayoutChanged,d=e.hasRelativeTargetChanged,f=e.layout;if(i.isTreeAnimationBlocked())return i.target=void 0,void(i.relativeTarget=void 0);var p=null!==(n=null!==(t=i.options.transition)&&void 0!==t?t:u.getDefaultTransition())&&void 0!==n?n:Ao,h=u.getProps(),m=h.onLayoutAnimationStart,v=h.onLayoutAnimationComplete,g=!i.targetLayout||!lo(i.targetLayout,f)||d,y=!c&&d;if((null===(o=i.resumeFrom)||void 0===o?void 0:o.instance)||y||c&&(g||!i.currentAnimation)){i.resumeFrom&&(i.resumingFrom=i.resumeFrom,i.resumingFrom.resumingFrom=void 0),i.setAnimationOrigin(l,y);var b=r.__assign(r.__assign({},Yt(p,"layout")),{onPlay:m,onComplete:v});u.shouldReduceMotion&&(b.delay=0,b.type=!1),i.startAnimation(b)}else c||0!==i.animationProgress||i.finishAnimation(),i.isLead()&&(null===(s=(a=i.options).onExitComplete)||void 0===s||s.call(a));i.targetLayout=f}))}},e.prototype.unmount=function(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,l.cancelSync.preRender(this.updateProjection)},e.prototype.blockUpdate=function(){this.updateManuallyBlocked=!0},e.prototype.unblockUpdate=function(){this.updateManuallyBlocked=!1},e.prototype.isUpdateBlocked=function(){return this.updateManuallyBlocked||this.updateBlockedByResize},e.prototype.isTreeAnimationBlocked=function(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1},e.prototype.startUpdate=function(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(So))},e.prototype.willUpdate=function(e){var t,n,r;if(void 0===e&&(e=!0),this.root.isUpdateBlocked())null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t);else if(!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var o=0;o<this.path.length;o++){var i=this.path[o];i.shouldResetTransform=!0,i.updateScroll()}var a=this.options,s=a.layoutId,l=a.layout;if(void 0!==s||l){var u=null===(r=this.options.visualElement)||void 0===r?void 0:r.getProps().transformTemplate;this.prevTransformTemplateValue=null===u||void 0===u?void 0:u(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}}},e.prototype.didUpdate=function(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(yo);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(To),this.potentialNodes.clear()),this.nodes.forEach(bo),this.nodes.forEach(mo),this.nodes.forEach(vo),this.clearAllSnapshots(),l.flushSync.update(),l.flushSync.preRender(),l.flushSync.render())},e.prototype.clearAllSnapshots=function(){this.nodes.forEach(go),this.sharedNodes.forEach(_o)},e.prototype.scheduleUpdateProjection=function(){h.default.preRender(this.updateProjection,!1,!0)},e.prototype.scheduleCheckAfterUnmount=function(){var e=this;h.default.postRender((function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()}))},e.prototype.updateSnapshot=function(){if(!this.snapshot&&this.instance){var e=this.measure(),t=this.removeTransform(this.removeElementScroll(e));Ro(t),this.snapshot={measured:e,layout:t,latestValues:{}}}},e.prototype.updateLayout=function(){var e;if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var t=0;t<this.path.length;t++){this.path[t].updateScroll()}var n=this.measure();Ro(n);var r=this.layout;this.layout={measured:n,actual:this.removeElementScroll(n)},this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.actual),null===(e=this.options.visualElement)||void 0===e||e.notifyLayoutMeasure(this.layout.actual,null===r||void 0===r?void 0:r.actual)}},e.prototype.updateScroll=function(){this.options.layoutScroll&&this.instance&&(this.isScrollRoot=i(this.instance),this.scroll=o(this.instance))},e.prototype.resetTransform=function(){var e;if(u){var t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!so(this.projectionDelta),r=null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate,o=null===r||void 0===r?void 0:r(this.latestValues,""),i=o!==this.prevTransformTemplateValue;t&&(n||qn(this.latestValues)||i)&&(u(this.instance,o),this.shouldResetTransform=!1,this.scheduleRender())}},e.prototype.measure=function(){var e=this.options.visualElement;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};var t=e.measureViewportBox(),n=this.root.scroll;return n&&(rr(t.x,n.x),rr(t.y,n.y)),t},e.prototype.removeElementScroll=function(e){var t={x:{min:0,max:0},y:{min:0,max:0}};eo(t,e);for(var n=0;n<this.path.length;n++){var r=this.path[n],o=r.scroll,i=r.options,a=r.isScrollRoot;if(r!==this.root&&o&&i.layoutScroll){if(a){eo(t,e);var s=this.root.scroll;s&&(rr(t.x,-s.x),rr(t.y,-s.y))}rr(t.x,o.x),rr(t.y,o.y)}}return t},e.prototype.applyTransform=function(e,t){void 0===t&&(t=!1);var n={x:{min:0,max:0},y:{min:0,max:0}};eo(n,e);for(var r=0;r<this.path.length;r++){var o=this.path[r];!t&&o.options.layoutScroll&&o.scroll&&o!==o.root&&sr(n,{x:-o.scroll.x,y:-o.scroll.y}),qn(o.latestValues)&&sr(n,o.latestValues)}return qn(this.latestValues)&&sr(n,this.latestValues),n},e.prototype.removeTransform=function(e){var t,n={x:{min:0,max:0},y:{min:0,max:0}};eo(n,e);for(var r=0;r<this.path.length;r++){var o=this.path[r];if(o.instance&&qn(o.latestValues)){Yn(o.latestValues)&&o.updateSnapshot();var i={x:{min:0,max:0},y:{min:0,max:0}};eo(i,o.measure()),io(n,o.latestValues,null===(t=o.snapshot)||void 0===t?void 0:t.layout,i)}}return qn(this.latestValues)&&io(n,this.latestValues),n},e.prototype.setTargetDelta=function(e){this.targetDelta=e,this.root.scheduleUpdateProjection()},e.prototype.setOptions=function(e){var t;this.options=r.__assign(r.__assign(r.__assign({},this.options),e),{crossfade:null===(t=e.crossfade)||void 0===t||t})},e.prototype.clearMeasurements=function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1},e.prototype.resolveTargetDelta=function(){var e,t,n,r,o=this.options,i=o.layout,a=o.layoutId;this.layout&&(i||a)&&(this.targetDelta||this.relativeTarget||(this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&this.relativeParent.layout&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Nn(this.relativeTargetOrigin,this.layout.actual,this.relativeParent.layout.actual),eo(this.relativeTarget,this.relativeTargetOrigin))),(this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target)?(t=this.target,n=this.relativeTarget,r=this.relativeParent.target,In(t.x,n.x,r.x),In(t.y,n.y,r.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.actual):eo(this.target,this.layout.actual),nr(this.target,this.targetDelta)):eo(this.target,this.layout.actual),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.relativeParent=this.getClosestProjectingParent(),this.relativeParent&&Boolean(this.relativeParent.resumingFrom)===Boolean(this.resumingFrom)&&!this.relativeParent.options.layoutScroll&&this.relativeParent.target&&(this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Nn(this.relativeTargetOrigin,this.target,this.relativeParent.target),eo(this.relativeTarget,this.relativeTargetOrigin)))))},e.prototype.getClosestProjectingParent=function(){if(this.parent&&!qn(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()},e.prototype.calcProjection=function(){var e,t=this.options,n=t.layout,r=t.layoutId;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(n||r)){var o=this.getLead();eo(this.layoutCorrected,this.layout.actual),function(e,t,n,r){var o,i;void 0===r&&(r=!1);var a=n.length;if(a){var s,l;t.x=t.y=1;for(var u=0;u<a;u++)l=(s=n[u]).projectionDelta,"contents"!==(null===(i=null===(o=s.instance)||void 0===o?void 0:o.style)||void 0===i?void 0:i.display)&&(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&sr(e,{x:-s.scroll.x,y:-s.scroll.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,nr(e,l)),r&&qn(s.latestValues)&&sr(e,s.latestValues))}}(this.layoutCorrected,this.treeScale,this.path,Boolean(this.resumingFrom)||this!==o);var i=o.target;if(i){this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});var a=this.treeScale.x,s=this.treeScale.y,l=this.projectionTransform;Bn(this.projectionDelta,this.layoutCorrected,i,this.latestValues),this.projectionTransform=co(this.projectionDelta,this.treeScale),this.projectionTransform===l&&this.treeScale.x===a&&this.treeScale.y===s||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",i))}}},e.prototype.hide=function(){this.isVisible=!1},e.prototype.show=function(){this.isVisible=!0},e.prototype.scheduleRender=function(e){var t,n,r;void 0===e&&(e=!0),null===(n=(t=this.options).scheduleRender)||void 0===n||n.call(t),e&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)},e.prototype.setAnimationOrigin=function(e,t){var n,o=this;void 0===t&&(t=!1);var i=this.snapshot,l=(null===i||void 0===i?void 0:i.latestValues)||{},u=r.__assign({},this.latestValues),c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeTarget=this.relativeTargetOrigin=void 0,this.attemptToResolveRelativeTarget=!t;var d={x:{min:0,max:0},y:{min:0,max:0}},f=null===i||void 0===i?void 0:i.isShared,p=((null===(n=this.getStack())||void 0===n?void 0:n.members.length)||0)<=1,h=Boolean(f&&!p&&!0===this.options.crossfade&&!this.path.some(Po));this.animationProgress=0,this.mixTargetDelta=function(t){var n,r,i,m,v,g=t/1e3;Eo(c.x,e.x,g),Eo(c.y,e.y,g),o.setTargetDelta(c),o.relativeTarget&&o.relativeTargetOrigin&&o.layout&&(null===(n=o.relativeParent)||void 0===n?void 0:n.layout)&&(Nn(d,o.layout.actual,o.relativeParent.layout.actual),r=o.relativeTarget,i=o.relativeTargetOrigin,m=d,v=g,Co(r.x,i.x,m.x,v),Co(r.y,i.y,m.y,v)),f&&(o.animationValues=u,function(e,t,n,r,o,i){var l,u,c,d;o?(e.opacity=s.mix(0,null!==(l=n.opacity)&&void 0!==l?l:1,Yr(r)),e.opacityExit=s.mix(null!==(u=t.opacity)&&void 0!==u?u:1,0,qr(r))):i&&(e.opacity=s.mix(null!==(c=t.opacity)&&void 0!==c?c:1,null!==(d=n.opacity)&&void 0!==d?d:1,r));for(var f=0;f<Hr;f++){var p="border".concat(Zr[f],"Radius"),h=Xr(t,p),m=Xr(n,p);void 0===h&&void 0===m||(h||(h=0),m||(m=0),0===h||0===m||Kr(h)===Kr(m)?(e[p]=Math.max(s.mix($r(h),$r(m),r),0),(a.percent.test(m)||a.percent.test(h))&&(e[p]+="%")):e[p]=m)}(t.rotate||n.rotate)&&(e.rotate=s.mix(t.rotate||0,n.rotate||0,r))}(u,l,o.latestValues,g,h,p)),o.root.scheduleUpdateProjection(),o.scheduleRender(),o.animationProgress=g},this.mixTargetDelta(0)},e.prototype.startAnimation=function(e){var t,n,o=this;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(l.cancelSync.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=h.default.update((function(){z.hasAnimatedSinceResize=!0,o.currentAnimation=Wr(0,1e3,r.__assign(r.__assign({},e),{onUpdate:function(t){var n;o.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:function(){var t;null===(t=e.onComplete)||void 0===t||t.call(e),o.completeAnimation()}})),o.resumingFrom&&(o.resumingFrom.currentAnimation=o.currentAnimation),o.pendingAnimation=void 0}))},e.prototype.completeAnimation=function(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")},e.prototype.finishAnimation=function(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()},e.prototype.applyTransformsToTarget=function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,o=e.latestValues;t&&n&&r&&(eo(t,n),sr(t,o),Bn(this.projectionDeltaWithTransform,this.layoutCorrected,t,o))},e.prototype.registerSharedNode=function(e,t){var n,r,o;this.sharedNodes.has(e)||this.sharedNodes.set(e,new uo),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(o=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===o?void 0:o.call(r,t)})},e.prototype.isLead=function(){var e=this.getStack();return!e||e.lead===this},e.prototype.getLead=function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this},e.prototype.getPrevLead=function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0},e.prototype.getStack=function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)},e.prototype.promote=function(e){var t=void 0===e?{}:e,n=t.needsReset,r=t.transition,o=t.preserveFollowOpacity,i=this.getStack();i&&i.promote(this,o),n&&(this.projectionDelta=void 0,this.needsReset=!0),r&&this.setOptions({transition:r})},e.prototype.relegate=function(){var e=this.getStack();return!!e&&e.relegate(this)},e.prototype.resetRotation=function(){var e=this.options.visualElement;if(e){for(var t=!1,n={},r=0;r<Q.length;r++){var o="rotate"+Q[r];e.getStaticValue(o)&&(t=!0,n[o]=e.getStaticValue(o),e.setStaticValue(o,0))}if(t){for(var o in null===e||void 0===e||e.syncRender(),n)e.setStaticValue(o,n[o]);e.scheduleRender()}}},e.prototype.getProjectionStyles=function(e){var t,n,r,o,i,a;void 0===e&&(e={});var s={};if(!this.instance||this.isSVG)return s;if(!this.isVisible)return{visibility:"hidden"};s.visibility="";var l=null===(t=this.options.visualElement)||void 0===t?void 0:t.getProps().transformTemplate;if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=Ve(e.pointerEvents)||"",s.transform=l?l(this.latestValues,""):"none",s;var u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){var c={};return this.options.layoutId&&(c.opacity=null!==(n=this.latestValues.opacity)&&void 0!==n?n:1,c.pointerEvents=Ve(e.pointerEvents)||""),this.hasProjected&&!qn(this.latestValues)&&(c.transform=l?l({},""):"none",this.hasProjected=!1),c}var d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),s.transform=co(this.projectionDeltaWithTransform,this.treeScale,d),l&&(s.transform=l(d,s.transform));var f=this.projectionDelta,p=f.x,h=f.y;for(var m in s.transformOrigin="".concat(100*p.origin,"% ").concat(100*h.origin,"% 0"),u.animationValues?s.opacity=u===this?null!==(o=null!==(r=d.opacity)&&void 0!==r?r:this.latestValues.opacity)&&void 0!==o?o:1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:s.opacity=u===this?null!==(i=d.opacity)&&void 0!==i?i:"":null!==(a=d.opacityExit)&&void 0!==a?a:0,Y)if(void 0!==d[m]){var v=Y[m],g=v.correct,y=v.applyTo,b=g(d[m],u);if(y)for(var x=y.length,w=0;w<x;w++)s[y[w]]=b;else s[m]=b}return this.options.layoutId&&(s.pointerEvents=u===this?Ve(e.pointerEvents)||"":"none"),s},e.prototype.clearSnapshot=function(){this.resumeFrom=this.snapshot=void 0},e.prototype.resetTree=function(){this.root.nodes.forEach((function(e){var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(yo),this.root.sharedNodes.clear()},e}()}function mo(e){e.updateLayout()}function vo(e){var t,n,r,o,i=null!==(n=null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)&&void 0!==n?n:e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){var a=e.layout,s=a.actual,l=a.measured;"size"===e.options.animationType?$n((function(e){var t=i.isShared?i.measured[e]:i.layout[e],n=Mn(t);t.min=s[e].min,t.max=t.min+n})):"position"===e.options.animationType&&$n((function(e){var t=i.isShared?i.measured[e]:i.layout[e],n=Mn(s[e]);t.max=t.min+n}));var u={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Bn(u,s,i.layout);var c={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};i.isShared?Bn(c,e.applyTransform(l,!0),i.measured):Bn(c,s,i.layout);var d=!so(u),f=!1;if(!e.resumeFrom&&(e.relativeParent=e.getClosestProjectingParent(),e.relativeParent&&!e.relativeParent.resumeFrom)){var p=e.relativeParent,h=p.snapshot,m=p.layout;if(h&&m){var v={x:{min:0,max:0},y:{min:0,max:0}};Nn(v,i.layout,h.layout);var g={x:{min:0,max:0},y:{min:0,max:0}};Nn(g,s,m.actual),lo(v,g)||(f=!0)}}e.notifyListeners("didUpdate",{layout:s,snapshot:i,delta:c,layoutDelta:u,hasLayoutChanged:d,hasRelativeTargetChanged:f})}else e.isLead()&&(null===(o=(r=e.options).onExitComplete)||void 0===o||o.call(r));e.options.transition=void 0}function go(e){e.clearSnapshot()}function yo(e){e.clearMeasurements()}function bo(e){var t=e.options.visualElement;(null===t||void 0===t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notifyBeforeLayoutMeasure(),e.resetTransform()}function xo(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function wo(e){e.resolveTargetDelta()}function ko(e){e.calcProjection()}function So(e){e.resetRotation()}function _o(e){e.removeLeadSnapshot()}function Eo(e,t,n){e.translate=s.mix(t.translate,0,n),e.scale=s.mix(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Co(e,t,n,r){e.min=s.mix(t.min,n.min,r),e.max=s.mix(t.max,n.max,r)}function Po(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var Ao={duration:.45,ease:[.4,0,.1,1]};function To(e,t){for(var n=e.root,r=e.path.length-1;r>=0;r--)if(Boolean(e.path[r].instance)){n=e.path[r];break}var o=(n&&n!==e.root?n.instance:document).querySelector('[data-projection-id="'.concat(t,'"]'));o&&e.mount(o,!0)}function jo(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Ro(e){jo(e.x),jo(e.y)}var Oo=ho({attachResizeListener:function(e,t){return $e(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),Fo={current:void 0},Mo=ho({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!Fo.current){var e=new Oo(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Fo.current=e}return Fo.current},resetTransform:function(e,t){e.style.transform=null!==t&&void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),Do=r.__assign(r.__assign(r.__assign(r.__assign({},Cn),Ct),fr),Gr),Lo=$((function(e,t){return He(e,t,Do,Lr,Mo)}));var Bo=$(He);function Io(){var e=o.useRef(!1);return C((function(){return e.current=!0,function(){e.current=!1}}),[]),e}function Vo(){var e=Io(),t=r.__read(o.useState(0),2),n=t[0],i=t[1],a=o.useCallback((function(){e.current&&i(n+1)}),[n]);return[o.useCallback((function(){return h.default.postRender(a)}),[a]),n]}var No=function(e){var t=e.children,n=e.initial,i=e.isPresent,a=e.onExitComplete,s=e.custom,l=e.presenceAffectsLayout,u=N(zo),c=Tt(),d=o.useMemo((function(){return{id:c,initial:n,isPresent:i,custom:s,onExitComplete:function(e){var t,n;u.set(e,!0);try{for(var o=r.__values(u.values()),i=o.next();!i.done;i=o.next()){if(!i.value)return}}catch(s){t={error:s}}finally{try{i&&!i.done&&(n=o.return)&&n.call(o)}finally{if(t)throw t.error}}null===a||void 0===a||a()},register:function(e){return u.set(e,!1),function(){return u.delete(e)}}}}),l?void 0:[i]);return o.useMemo((function(){u.forEach((function(e,t){return u.set(t,!1)}))}),[i]),f.useEffect((function(){!i&&!u.size&&(null===a||void 0===a||a())}),[i]),f.createElement(_.Provider,{value:d},t)};function zo(){return new Map}var Uo=function(e){return e.key||""};var Go=o.createContext(null),Wo=function(e){return!e.isLayoutDirty&&e.willUpdate(!1)};function Zo(){var e=new Set,t=new WeakMap,n=function(){return e.forEach(Wo)};return{add:function(r){e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:function(r){var o;e.delete(r),null===(o=t.get(r))||void 0===o||o(),t.delete(r),n()},dirty:n}}var Ho=function(e){return!0===e},$o=function(e){var t,n,i=e.children,a=e.id,s=e.inheritId,l=e.inherit,u=void 0===l||l;void 0!==s&&(u=s);var c=o.useContext(G),d=o.useContext(Go),p=r.__read(Vo(),2),h=p[0],m=p[1],v=o.useRef(null),g=null!==(t=c.id)&&void 0!==t?t:d;null===v.current&&(function(e){return Ho(!0===e)||"id"===e}(u)&&g&&(a=a?g+"-"+a:g),v.current={id:a,group:Ho(u)&&null!==(n=null===c||void 0===c?void 0:c.group)&&void 0!==n?n:Zo()});var y=o.useMemo((function(){return r.__assign(r.__assign({},v.current),{forceRender:h})}),[m]);return f.createElement(G.Provider,{value:y},i)},Ko=0;function Xo(e){return"function"===typeof e}var Yo=o.createContext(null);function qo(e,t,n,o){if(!o)return e;var i=e.findIndex((function(e){return e.value===t}));if(-1===i)return e;var a=o>0?1:-1,l=e[i+a];if(!l)return e;var u=e[i],c=l.layout,d=s.mix(c.min,c.max,.5);return 1===a&&u.layout.max+n>d||-1===a&&u.layout.min+n<d?function(e,t,n){var o=r.__read(e).slice(0),i=t<0?o.length+t:t;if(i>=0&&i<o.length){var a=n<0?o.length+n:n,s=r.__read(o.splice(t,1),1)[0];o.splice(a,0,s)}return o}(e,i,i+a):e}var Qo=o.forwardRef((function(e,t){var n=e.children,a=e.as,s=void 0===a?"ul":a,l=e.axis,u=void 0===l?"y":l,c=e.onReorder,d=e.values,p=r.__rest(e,["children","as","axis","onReorder","values"]),h=N((function(){return Lo(s)})),m=[],v=o.useRef(!1);i.invariant(Boolean(d),"Reorder.Group must be provided a values prop");var g={axis:u,registerItem:function(e,t){t&&-1===m.findIndex((function(t){return e===t.value}))&&(m.push({value:e,layout:t[u]}),m.sort(ei))},updateOrder:function(e,t,n){if(!v.current){var r=qo(m,e,t,n);m!==r&&(v.current=!0,c(r.map(Jo).filter((function(e){return-1!==d.indexOf(e)}))))}}};return o.useEffect((function(){v.current=!1})),f.createElement(h,r.__assign({},p,{ref:t}),f.createElement(Yo.Provider,{value:g},n))}));function Jo(e){return e.value}function ei(e,t){return e.layout.min-t.layout.min}function ti(e){var t=N((function(){return rn(e)}));if(o.useContext(w).isStatic){var n=r.__read(o.useState(e),2)[1];o.useEffect((function(){return t.onChange(n)}),[])}return t}var ni=function(e){return function(e){return"object"===typeof e&&e.mix}(e)?e.mix:void 0};function ri(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=!Array.isArray(e[0]),o=n?0:-1,i=e[0+o],a=e[1+o],l=e[2+o],u=e[3+o],c=s.interpolate(a,l,r.__assign({mixer:ni(l[0])},u));return n?c(i):c}function oi(e,t){var n=ti(t()),r=function(){return n.set(t())};return r(),function(e,t){C((function(){var n=e.map((function(e){return e.onChange(t)}));return function(){return n.forEach((function(e){return e()}))}}))}(e,(function(){return h.default.update(r,!1,!0)})),n}function ii(e,t,n,o){var i="function"===typeof t?t:ri(t,n,o);return Array.isArray(e)?ai(e,i):ai([e],(function(e){var t=r.__read(e,1)[0];return i(t)}))}function ai(e,t){var n=N((function(){return[]}));return oi(e,(function(){n.length=0;for(var r=e.length,o=0;o<r;o++)n[o]=e[o].get();return t(n)}))}function si(e,t){return void 0===t&&(t=0),ae(e)?e:ti(t)}var li={Group:Qo,Item:o.forwardRef((function(e,t){var n=e.children,a=e.style,s=e.value,l=e.as,u=void 0===l?"li":l,c=e.onDrag,d=e.layout,p=void 0===d||d,h=r.__rest(e,["children","style","value","as","onDrag","layout"]),m=N((function(){return Lo(u)})),v=o.useContext(Yo),g={x:si(null===a||void 0===a?void 0:a.x),y:si(null===a||void 0===a?void 0:a.y)},y=ii([g.x,g.y],(function(e){var t=r.__read(e,2),n=t[0],o=t[1];return n||o?1:"unset"})),b=o.useRef(null);i.invariant(Boolean(v),"Reorder.Item must be a child of Reorder.Group");var x=v,w=x.axis,k=x.registerItem,S=x.updateOrder;return o.useEffect((function(){k(s,b.current)}),[v]),f.createElement(m,r.__assign({drag:w},h,{dragSnapToOrigin:!0,style:r.__assign(r.__assign({},a),{x:g.x,y:g.y,zIndex:y}),layout:p,onDrag:function(e,t){var n=t.velocity;n[w]&&S(s,g[w].get(),n[w]),null===c||void 0===c||c(e,t)},onLayoutMeasure:function(e){b.current=e},ref:t}),n)}))},ui=r.__assign(r.__assign({renderer:Lr},Cn),Ct),ci=r.__assign(r.__assign(r.__assign(r.__assign({},ui),fr),Gr),{projectionNodeConstructor:Mo});var di=function(){return{scrollX:rn(0),scrollY:rn(0),scrollXProgress:rn(0),scrollYProgress:rn(0)}};function fi(e){void 0===e&&(e={});var t=e.container,n=e.target,o=r.__rest(e,["container","target"]),i=N(di);return C((function(){return u.scroll((function(e){var t=e.x,n=e.y;i.scrollX.set(t.current),i.scrollXProgress.set(t.progress),i.scrollY.set(n.current),i.scrollYProgress.set(n.progress)}),r.__assign(r.__assign({},o),{container:(null===t||void 0===t?void 0:t.current)||void 0,target:(null===n||void 0===n?void 0:n.current)||void 0}))}),[]),i}var pi="undefined"!==typeof performance?function(){return performance.now()}:function(){return Date.now()};function hi(e){var t=N(pi),n=o.useContext(w).isStatic;o.useEffect((function(){if(!n){var r=function(n){var r=n.timestamp;e(r-t)};return h.default.update(r,!0),function(){return l.cancelSync.update(r)}}}),[e])}function mi(){var e=!1,t=[],n=new Set,o={subscribe:function(e){return n.add(e),function(){n.delete(e)}},start:function(r,o){if(e){var i=[];return n.forEach((function(e){i.push(vn(e,r,{transitionOverride:o}))})),Promise.all(i)}return new Promise((function(e){t.push({animation:[r,o],resolve:e})}))},set:function(t){return i.invariant(e,"controls.set() should only be called after a component has mounted. Consider calling within a useEffect hook."),n.forEach((function(e){!function(e,t){Array.isArray(t)?fn(e,t):"string"===typeof t?fn(e,[t]):dn(e,t)}(e,t)}))},stop:function(){n.forEach((function(e){!function(e){e.forEachValue((function(e){return e.stop()}))}(e)}))},mount:function(){return e=!0,t.forEach((function(e){var t=e.animation,n=e.resolve;o.start.apply(o,r.__spreadArray([],r.__read(t),!1)).then(n)})),function(){e=!1,o.stop()}}};return o}function vi(){var e=N(mi);return o.useEffect(e.mount,[]),e}var gi=vi;var yi=function(){function e(){this.componentControls=new Set}return e.prototype.subscribe=function(e){var t=this;return this.componentControls.add(e),function(){return t.componentControls.delete(e)}},e.prototype.start=function(e,t){this.componentControls.forEach((function(n){n.start(e.nativeEvent||e,t)}))},e}(),bi=function(){return new yi};function xi(){return wi}function wi(e){Fo.current&&(Fo.current.isUpdating=!1,Fo.current.blockUpdate(),null===e||void 0===e||e())}var ki=function(){return{}},Si=hr({build:function(){},measureViewportBox:Hn,resetTransform:function(){},restoreTransform:function(){},removeValueFromRenderState:function(){},render:function(){},scrapeMotionValuesFromProps:ki,readValueFromInstance:function(e,t,n){return n.initialState[t]||0},makeTargetAnimatable:function(e,t){var n=t.transition,o=t.transitionEnd,i=r.__rest(t,["transition","transitionEnd"]);return pn(e,i,mn(i,n||{},e)),r.__assign({transition:n,transitionEnd:o},i)}}),_i=ze({scrapeMotionValuesFromProps:ki,createRenderState:ki});var Ei=function(e){return e>.001?1/e:1e5},Ci=!1;t.AnimatePresence=function(e){var t=e.children,n=e.custom,i=e.initial,a=void 0===i||i,s=e.onExitComplete,l=e.exitBeforeEnter,u=e.presenceAffectsLayout,c=void 0===u||u,d=r.__read(Vo(),1)[0],p=o.useContext(G).forceRender;p&&(d=p);var h=Io(),m=function(e){var t=[];return o.Children.forEach(e,(function(e){o.isValidElement(e)&&t.push(e)})),t}(t),v=m,g=new Set,y=o.useRef(v),b=o.useRef(new Map).current,x=o.useRef(!0);if(C((function(){x.current=!1,function(e,t){e.forEach((function(e){var n=Uo(e);t.set(n,e)}))}(m,b),y.current=v})),ht((function(){x.current=!0,b.clear(),g.clear()})),x.current)return f.createElement(f.Fragment,null,v.map((function(e){return f.createElement(No,{key:Uo(e),isPresent:!0,initial:!!a&&void 0,presenceAffectsLayout:c},e)})));v=r.__spreadArray([],r.__read(v),!1);for(var w=y.current.map(Uo),k=m.map(Uo),S=w.length,_=0;_<S;_++){var E=w[_];-1===k.indexOf(E)&&g.add(E)}return l&&g.size&&(v=[]),g.forEach((function(e){if(-1===k.indexOf(e)){var t=b.get(e);if(t){var r=w.indexOf(e);v.splice(r,0,f.createElement(No,{key:Uo(t),isPresent:!1,onExitComplete:function(){b.delete(e),g.delete(e);var t=y.current.findIndex((function(t){return t.key===e}));if(y.current.splice(t,1),!g.size){if(y.current=m,!1===h.current)return;d(),s&&s()}},custom:n,presenceAffectsLayout:c},t))}}})),v=v.map((function(e){var t=e.key;return g.has(t)?e:f.createElement(No,{key:Uo(e),isPresent:!0,presenceAffectsLayout:c},e)})),f.createElement(f.Fragment,null,g.size?v:v.map((function(e){return o.cloneElement(e)})))},t.AnimateSharedLayout=function(e){var t=e.children;return f.useEffect((function(){i.warning(!1,"AnimateSharedLayout is deprecated: https://www.framer.com/docs/guide-upgrade/##shared-layout-animations")}),[]),f.createElement($o,{id:N((function(){return"asl-".concat(Ko++)}))},t)},t.DeprecatedLayoutGroupContext=Go,t.DragControls=yi,t.FlatTree=po,t.LayoutGroup=$o,t.LayoutGroupContext=G,t.LazyMotion=function(e){var t=e.children,n=e.features,i=e.strict,a=void 0!==i&&i,s=r.__read(o.useState(!Xo(n)),2)[1],l=o.useRef(void 0);if(!Xo(n)){var u=n.renderer,c=r.__rest(n,["renderer"]);l.current=u,g(c)}return o.useEffect((function(){Xo(n)&&n().then((function(e){var t=e.renderer;g(r.__rest(e,["renderer"])),l.current=t,s(!0)}))}),[]),f.createElement(y.Provider,{value:{renderer:l.current,strict:a}},t)},t.MotionConfig=function(e){var t=e.children,n=e.isValidProp,i=r.__rest(e,["children","isValidProp"]);n&&xe(n),(i=r.__assign(r.__assign({},o.useContext(w)),i)).isStatic=N((function(){return i.isStatic}));var a=o.useMemo((function(){return i}),[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return f.createElement(w.Provider,{value:a},t)},t.MotionConfigContext=w,t.MotionContext=k,t.MotionValue=nn,t.PresenceContext=_,t.Reorder=li,t.SwitchLayoutGroupContext=W,t.addPointerEvent=it,t.addScaleCorrector=q,t.animate=Wr,t.animateVisualElement=vn,t.animationControls=mi,t.animations=Cn,t.calcLength=Mn,t.checkTargetForNewValues=pn,t.createBox=Hn,t.createDomMotionComponent=function(e){return H(He(e,{forwardMotionProps:!1},Do,Lr,Mo))},t.createMotionComponent=H,t.domAnimation=ui,t.domMax=ci,t.filterProps=we,t.isBrowser=E,t.isDragActive=dt,t.isMotionValue=ae,t.isValidMotionProp=ye,t.m=Bo,t.makeUseVisualState=ze,t.motion=Lo,t.motionValue=rn,t.resolveMotionValue=Ve,t.transform=ri,t.useAnimation=gi,t.useAnimationControls=vi,t.useAnimationFrame=hi,t.useCycle=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=o.useRef(0),i=r.__read(o.useState(e[n.current]),2),a=i[0],l=i[1],u=o.useCallback((function(t){n.current="number"!==typeof t?s.wrap(0,e.length,n.current+1):t,l(e[n.current])}),r.__spreadArray([e.length],r.__read(e),!1));return[a,u]},t.useDeprecatedAnimatedState=function(e){var t=r.__read(o.useState(e),2),n=t[0],i=t[1],a=_i({},!1),s=N((function(){return Si({props:{},visualState:a},{initialState:e})}));return o.useEffect((function(){return s.mount({}),s.unmount}),[s]),o.useEffect((function(){s.setProps({onUpdate:function(e){i(r.__assign({},e))}})}),[i,s]),[n,N((function(){return function(e){return vn(s,e)}}))]},t.useDeprecatedInvertedScale=function(e){var t=ti(1),n=ti(1),r=S();return i.invariant(!(!e&&!r),"If no scale values are provided, useInvertedScale must be used within a child of another motion component."),i.warning(Ci,"useInvertedScale is deprecated and will be removed in 3.0. Use the layout prop instead."),Ci=!0,e?(t=e.scaleX||t,n=e.scaleY||n):r&&(t=r.getValue("scaleX",1),n=r.getValue("scaleY",1)),{scaleX:ii(t,Ei),scaleY:ii(n,Ei)}},t.useDomEvent=Ke,t.useDragControls=function(){return N(bi)},t.useElementScroll=function(e){return vt(!1,"useElementScroll is deprecated. Convert to useScroll({ container: ref })."),fi({container:e})},t.useForceUpdate=Vo,t.useInView=function(e,t){var n=void 0===t?{}:t,i=n.root,a=n.margin,s=n.amount,l=n.once,c=void 0!==l&&l,d=r.__read(o.useState(!1),2),f=d[0],p=d[1];return o.useEffect((function(){var t;if(!(!e.current||c&&f)){var n={root:null!==(t=null===i||void 0===i?void 0:i.current)&&void 0!==t?t:void 0,margin:a,amount:"some"===s?"any":s};return u.inView(e.current,(function(){return p(!0),c?void 0:function(){return p(!1)}}),n)}}),[i,e,a,c]),f},t.useInstantLayoutTransition=xi,t.useInstantTransition=function(){var e=r.__read(Vo(),2),t=e[0],n=e[1],i=xi();return o.useEffect((function(){h.default.postRender((function(){return h.default.postRender((function(){return Wt.current=!1}))}))}),[n]),function(e){i((function(){Wt.current=!0,t(),e()}))}},t.useIsPresent=function(){return null===(e=o.useContext(_))||e.isPresent;var e},t.useIsomorphicLayoutEffect=C,t.useMotionTemplate=function(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=e.length;function o(){for(var n="",o=0;o<r;o++){n+=e[o],t[o]&&(n+=t[o].get())}return n}return oi(t,o)},t.useMotionValue=ti,t.usePresence=jt,t.useReducedMotion=T,t.useReducedMotionConfig=j,t.useResetProjection=function(){return f.useCallback((function(){var e=Fo.current;e&&e.resetTree()}),[])},t.useScroll=fi,t.useSpring=function(e,t){void 0===t&&(t={});var n=o.useContext(w).isStatic,i=o.useRef(null),a=ti(ae(e)?e.get():e);return o.useMemo((function(){return a.attach((function(e,o){return n?o(e):(i.current&&i.current.stop(),i.current=s.animate(r.__assign(r.__assign({from:a.get(),to:e,velocity:a.getVelocity()},t),{onUpdate:o})),a.get())}))}),[JSON.stringify(t)]),function(e,t){C((function(){if(ae(e))return e.onChange(t)}),[t])}(e,(function(e){return a.set(parseFloat(e))})),a},t.useTime=function(){var e=ti(0);return hi((function(t){return e.set(t)})),e},t.useTransform=ii,t.useUnmountEffect=ht,t.useVelocity=function(e){var t=ti(e.getVelocity());return o.useEffect((function(){return e.velocityUpdateSubscribers.add((function(e){t.set(e)}))}),[e]),t},t.useViewportScroll=function(){return vt(!1,"useViewportScroll is deprecated. Convert to useScroll()."),fi()},t.useVisualElementContext=S,t.visualElement=hr,t.wrapHandler=tt},1032:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),h=Symbol.for("react.default_value"),m=Symbol.iterator;var v={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,y={};function b(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}function x(){}function w(e,t,n){this.props=e,this.context=t,this.refs=y,this.updater=n||v}b.prototype.isReactComponent={},b.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},b.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},x.prototype=b.prototype;var k=w.prototype=new x;k.constructor=w,g(k,b.prototype),k.isPureReactComponent=!0;var S=Array.isArray,_=Object.prototype.hasOwnProperty,E={current:null},C={key:!0,ref:!0,__self:!0,__source:!0};function P(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)_.call(t,o)&&!C.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:E.current}}function A(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function j(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===i?"."+j(l,0):i,S(a)?(o="",null!=e&&(o=e.replace(T,"$&/")+"/"),R(a,t,o,"",(function(e){return e}))):null!=a&&(A(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",S(e))for(var u=0;u<e.length;u++){var c=i+j(s=e[u],u);l+=R(s,t,o,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=m&&e[m]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=R(s=s.value,t,o,c=i+j(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function O(e,t,n){if(null==e)return e;var r=[],o=0;return R(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function F(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var M={current:null};function D(){return new WeakMap}var L={current:null},B={transition:null},I={ReactCurrentDispatcher:L,ReactCurrentCache:M,ReactCurrentBatchConfig:B,ReactCurrentOwner:E,ContextRegistry:{}},V=I.ContextRegistry;t.Children={map:O,forEach:function(e,t,n){O(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return O(e,(function(){t++})),t},toArray:function(e){return O(e,(function(e){return e}))||[]},only:function(e){if(!A(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=b,t.Fragment=o,t.Profiler=a,t.PureComponent=w,t.StrictMode=i,t.Suspense=d,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cache=function(e){return function(){var t=M.current;if(!t)return e.apply(null,arguments);var n=t.getCacheForType(D);void 0===(t=n.get(e))&&(t={s:0,v:void 0,o:null,p:null},n.set(e,t)),n=0;for(var r=arguments.length;n<r;n++){var o=arguments[n];if("function"===typeof o||"object"===typeof o&&null!==o){var i=t.o;null===i&&(t.o=i=new WeakMap),void 0===(t=i.get(o))&&(t={s:0,v:void 0,o:null,p:null},i.set(o,t))}else null===(i=t.p)&&(t.p=i=new Map),void 0===(t=i.get(o))&&(t={s:0,v:void 0,o:null,p:null},i.set(o,t))}if(1===t.s)return t.v;if(2===t.s)throw t.v;try{var a=e.apply(null,arguments);return(n=t).s=1,n.v=a}catch(s){throw(a=t).s=2,a.v=s,s}}},t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=g({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=E.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)_.call(t,u)&&!C.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=P,t.createFactory=function(e){var t=P.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.createServerContext=function(e,t){var n=!0;if(!V[e]){n=!1;var r={$$typeof:u,_currentValue:t,_currentValue2:t,_defaultValue:t,_threadCount:0,Provider:null,Consumer:null,_globalName:e};r.Provider={$$typeof:s,_context:r},V[e]=r}if((r=V[e])._defaultValue===h)r._defaultValue=t,r._currentValue===h&&(r._currentValue=t),r._currentValue2===h&&(r._currentValue2=t);else if(n)throw Error("ServerContext: "+e+" already defined");return r},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=A,t.lazy=function(e){return{$$typeof:p,_payload:{_status:-1,_result:e},_init:F}},t.memo=function(e,t){return{$$typeof:f,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=B.transition;B.transition={};try{e()}finally{B.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.unstable_useCacheRefresh=function(){return L.current.useCacheRefresh()},t.use=function(e){return L.current.use(e)},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.3.0-next-fecc288b7-20221025"},4128:function(e,t,n){"use strict";e.exports=n(1032)},5043:function(e,t,n){"use strict";n.r(t),n.d(t,{ScrollOffset:function(){return ft},animate:function(){return Ce},animateStyle:function(){return ve},createMotionState:function(){return Wt},createStyleString:function(){return Kt},createStyles:function(){return Zt},getAnimationData:function(){return l},getStyleName:function(){return fe},glide:function(){return Ye},inView:function(){return Qe},mountedStates:function(){return Gt},resize:function(){return st},scroll:function(){return Ct},spring:function(){return Xe},stagger:function(){return Se},style:function(){return pe},timeline:function(){return Fe},withControls:function(){return xe}});var r=n(6222),o=n(7853),i=n(4531),a=function(){function e(){(0,o.Z)(this,e)}return(0,i.Z)(e,[{key:"setAnimation",value:function(e){var t=this;this.animation=e,null===e||void 0===e||e.finished.then((function(){return t.clearAnimation()})).catch((function(){}))}},{key:"clearAnimation",value:function(){this.animation=this.generator=void 0}}]),e}(),s=new WeakMap;function l(e){return s.has(e)||s.set(e,{transforms:[],values:new Map}),s.get(e)}function u(e,t){return e.has(t)||e.set(t,new a),e.get(t)}var c=function(){},d=function(e){return e};function f(e,t){-1===e.indexOf(t)&&e.push(t)}function p(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var h=["","X","Y","Z"],m={x:"translateX",y:"translateY",z:"translateZ"},v={syntax:"<angle>",initialValue:"0deg",toDefaultUnit:function(e){return e+"deg"}},g={translate:{syntax:"<length-percentage>",initialValue:"0px",toDefaultUnit:function(e){return e+"px"}},rotate:v,scale:{syntax:"<number>",initialValue:1,toDefaultUnit:d},skew:v},y=new Map,b=function(e){return"--motion-".concat(e)},x=["x","y","z"];["translate","scale","rotate","skew"].forEach((function(e){h.forEach((function(t){x.push(e+t),y.set(b(e+t),g[e])}))}));var w=function(e,t){return x.indexOf(e)-x.indexOf(t)},k=new Set(x),S=function(e){return k.has(e)},_=function(e,t){m[t]&&(t=m[t]);var n=l(e).transforms;f(n,t),e.style.transform=E(n)},E=function(e){return e.sort(w).reduce(C,"").trim()},C=function(e,t){return"".concat(e," ").concat(t,"(var(").concat(b(t),"))")},P=function(e){return e.startsWith("--")},A=new Set;function T(e){if(!A.has(e)){A.add(e);try{var t=y.has(e)?y.get(e):{},n=t.syntax,r=t.initialValue;CSS.registerProperty({name:e,inherits:!1,syntax:n,initialValue:r})}catch(o){}}}var j=.3,R=0,O=0,F=0,M="ease",D=function(e){return"object"===typeof e&&Boolean(e.createAnimation)},L=function(e){return"number"===typeof e},B=function(e){return Array.isArray(e)&&!L(e[0])},I=function(e,t,n){return-n*e+n*t+e},V=function(e,t,n){return t-e===0?1:(n-e)/(t-e)};function N(e,t){for(var n=e[e.length-1],r=1;r<=t;r++){var o=V(0,t,r);e.push(I(n,1,o))}}function z(e){var t=[0];return N(t,e-1),t}function U(e,t){return B(e)?e[function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e}(0,e.length,t)]:e}var G=function(e,t,n){return Math.min(Math.max(n,e),t)};function W(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:z(e.length),n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:d,r=e.length,o=r-t.length;return o>0&&N(t,o),function(o){for(var i=0;i<r-2&&!(o<t[i+1]);i++);var a=G(0,1,V(t[i],t[i+1],o));return a=U(n,i)(a),I(e[i],e[i+1],a)}}var Z=n(5531),H=function(e,t,n){return(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e};function $(e,t,n,r){if(e===t&&n===r)return d;var o=function(t){return function(e,t,n,r,o){var i,a,s=0;do{(i=H(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n)};return function(e){return 0===e||1===e?e:H(o(e),t,r)}}var K=function(e){return Array.isArray(e)&&L(e[0])},X={ease:$(.25,.1,.25,1),"ease-in":$(.42,0,1,1),"ease-in-out":$(.42,0,.58,1),"ease-out":$(0,0,.58,1)},Y=/\((.*?)\)/;function q(e){if("function"===typeof e)return e;if(K(e))return $.apply(void 0,(0,Z.Z)(e));var t=X[e];if(t)return t;if(e.startsWith("steps")){var n=Y.exec(e);if(n){var r=n[1].split(",");return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return function(n){var r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,o="end"===t?Math.floor(r):Math.ceil(r);return G(0,1,o/e)}}(parseFloat(r[0]),r[1].trim())}}return d}var Q=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[0,1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=i.easing,s=i.duration,l=void 0===s?j:s,u=i.delay,c=void 0===u?R:u,f=i.endDelay,p=void 0===f?O:f,h=i.repeat,m=void 0===h?F:h,v=i.offset,g=i.direction,y=void 0===g?"normal":g,b=i.autoplay,x=void 0===b||b;if((0,o.Z)(this,e),this.startTime=null,this.rate=1,this.t=0,this.cancelTimestamp=null,this.easing=d,this.duration=0,this.totalDuration=0,this.repeat=0,this.playState="idle",this.finished=new Promise((function(e,t){n.resolve=e,n.reject=t})),D(a=a||M)){var w=a.createAnimation(r);a=w.easing,r=w.keyframes||r,l=w.duration||l}this.repeat=m,this.easing=B(a)?d:q(a),this.updateDuration(l);var k=W(r,v,B(a)?a.map(q):d);this.tick=function(e){var r,o=0;o=void 0!==n.pauseTime?n.pauseTime:(e-n.startTime)*n.rate,n.t=o,o/=1e3,o=Math.max(o-c,0),"finished"===n.playState&&void 0===n.pauseTime&&(o=n.totalDuration);var i=o/n.duration,a=Math.floor(i),s=i%1;!s&&i>=1&&(s=1),1===s&&a--;var l=a%2;("reverse"===y||"alternate"===y&&l||"alternate-reverse"===y&&!l)&&(s=1-s);var u=o>=n.totalDuration?1:Math.min(s,1),d=k(n.easing(u));t(d),void 0===n.pauseTime&&("finished"===n.playState||o>=n.totalDuration+p)?(n.playState="finished",null===(r=n.resolve)||void 0===r||r.call(n,d)):"idle"!==n.playState&&(n.frameRequestId=requestAnimationFrame(n.tick))},x&&this.play()}return(0,i.Z)(e,[{key:"play",value:function(){var e=performance.now();this.playState="running",void 0!==this.pauseTime?this.startTime=e-this.pauseTime:this.startTime||(this.startTime=e),this.cancelTimestamp=this.startTime,this.pauseTime=void 0,this.frameRequestId=requestAnimationFrame(this.tick)}},{key:"pause",value:function(){this.playState="paused",this.pauseTime=this.t}},{key:"finish",value:function(){this.playState="finished",this.tick(0)}},{key:"stop",value:function(){var e;this.playState="idle",void 0!==this.frameRequestId&&cancelAnimationFrame(this.frameRequestId),null===(e=this.reject)||void 0===e||e.call(this,!1)}},{key:"cancel",value:function(){this.stop(),this.tick(this.cancelTimestamp)}},{key:"reverse",value:function(){this.rate*=-1}},{key:"commitStyles",value:function(){}},{key:"updateDuration",value:function(e){this.duration=e,this.totalDuration=e*(this.repeat+1)}},{key:"currentTime",get:function(){return this.t},set:function(e){void 0!==this.pauseTime||0===this.rate?this.pauseTime=e:this.startTime=performance.now()-e/this.rate}},{key:"playbackRate",get:function(){return this.rate},set:function(e){this.rate=e}}]),e}(),J=function(e){return 1e3*e},ee=function(e){return e/1e3},te=n(3430),ne=function(e){return K(e)?re(e):e},re=function(e){var t=(0,te.Z)(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return"cubic-bezier(".concat(n,", ").concat(r,", ").concat(o,", ").concat(i,")")},oe=function(e){return document.createElement("div").animate(e,{duration:.001})},ie={cssRegisterProperty:function(){return"undefined"!==typeof CSS&&Object.hasOwnProperty.call(CSS,"registerProperty")},waapi:function(){return Object.hasOwnProperty.call(Element.prototype,"animate")},partialKeyframes:function(){try{oe({opacity:[1]})}catch(e){return!1}return!0},finished:function(){return Boolean(oe({opacity:[0,1]}).finished)}},ae={},se={},le=function(e){se[e]=function(){return void 0===ae[e]&&(ae[e]=ie[e]()),ae[e]}};for(var ue in ie)le(ue);function ce(e,t){for(var n=0;n<e.length;n++)null===e[n]&&(e[n]=n?e[n-1]:t());return e}var de=function(e){return Array.isArray(e)?e:[e]};function fe(e){return m[e]&&(e=m[e]),S(e)?b(e):e}var pe={get:function(e,t){t=fe(t);var n=P(t)?e.style.getPropertyValue(t):getComputedStyle(e)[t];if(!n&&0!==n){var r=y.get(t);r&&(n=r.initialValue)}return n},set:function(e,t,n){t=fe(t),P(t)?e.style.setProperty(t,n):e.style[t]=n}};function he(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];if(e&&"finished"!==e.playState)try{e.stop?e.stop():(t&&e.commitStyles(),e.cancel())}catch(n){}}function me(){return window.__MOTION_DEV_TOOLS_RECORD}function ve(e,t,n){var o,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=me(),s=!1!==i.record&&a,d=i.duration,f=void 0===d?j:d,p=i.delay,h=void 0===p?R:p,m=i.endDelay,v=void 0===m?O:m,g=i.repeat,b=void 0===g?F:g,x=i.easing,w=void 0===x?M:x,k=i.direction,E=i.offset,C=i.allowWebkitAcceleration,A=void 0!==C&&C,I=l(e),V=se.waapi(),N=S(t);N&&_(e,t);var z=fe(t),U=u(I.values,z),G=y.get(z);return he(U.animation,!(D(w)&&U.generator)&&!1!==i.record),function(){var l=function(){var t,n;return null!==(n=null!==(t=pe.get(e,z))&&void 0!==t?t:null===G||void 0===G?void 0:G.initialValue)&&void 0!==n?n:0},u=ce(de(n),l);if(D(w)){var d=w.createAnimation(u,l,N,z,U);w=d.easing,void 0!==d.keyframes&&(u=d.keyframes),void 0!==d.duration&&(f=d.duration)}if(P(z)&&(se.cssRegisterProperty()?T(z):V=!1),V){var p;G&&(u=u.map((function(e){return L(e)?G.toDefaultUnit(e):e}))),1!==u.length||se.partialKeyframes()&&!s||u.unshift(l());var m={delay:J(h),duration:J(f),endDelay:J(v),easing:B(w)?void 0:ne(w),direction:k,iterations:b+1,fill:"both"};(o=e.animate((p={},(0,r.Z)(p,z,u),(0,r.Z)(p,"offset",E),(0,r.Z)(p,"easing",B(w)?w.map(ne):void 0),p),m)).finished||(o.finished=new Promise((function(e,t){o.onfinish=e,o.oncancel=t})));var g=u[u.length-1];o.finished.then((function(){pe.set(e,z,g),o.cancel()})).catch(c),A||(o.playbackRate=1.000001)}else if(N){1===(u=u.map((function(e){return"string"===typeof e?parseFloat(e):e}))).length&&u.unshift(parseFloat(l()));o=new Q((function(t){G&&(t=G.toDefaultUnit(t)),pe.set(e,z,t)}),u,Object.assign(Object.assign({},i),{duration:f,easing:w}))}else{var y=u[u.length-1];pe.set(e,z,G&&L(y)?G.toDefaultUnit(y):y)}return s&&a(e,t,u,{duration:f,delay:h,easing:w,repeat:b,offset:E},"motion-one"),U.setAnimation(o),o}}var ge=function(e,t){return e[t]?Object.assign(Object.assign({},e),e[t]):Object.assign({},e)};function ye(e,t){var n;return"string"===typeof e?t?(null!==(n=t[e])&&void 0!==n||(t[e]=document.querySelectorAll(e)),e=t[e]):e=document.querySelectorAll(e):e instanceof Element&&(e=[e]),Array.from(e||[])}var be=function(e){return e()},xe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:j;return new Proxy({animations:e.map(be).filter(Boolean),duration:n,options:t},we)},we={get:function(e,t){var n=e.animations[0];switch(t){case"duration":return e.duration;case"currentTime":return ee((null===n||void 0===n?void 0:n[t])||0);case"playbackRate":case"playState":return null===n||void 0===n?void 0:n[t];case"finished":return e.finished||(e.finished=Promise.all(e.animations.map(ke)).catch(c)),e.finished;case"stop":return function(){e.animations.forEach((function(e){return he(e)}))};case"forEachNative":return function(t){e.animations.forEach((function(n){return t(n,e)}))};default:return"undefined"===typeof(null===n||void 0===n?void 0:n[t])?void 0:function(){return e.animations.forEach((function(e){return e[t]()}))}}},set:function(e,t,n){switch(t){case"currentTime":n=J(n);case"currentTime":case"playbackRate":for(var r=0;r<e.animations.length;r++)e.animations[r][t]=n;return!0}return!1}},ke=function(e){return e.finished};function Se(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.start,r=void 0===n?0:n,o=t.from,i=void 0===o?0:o,a=t.easing;return function(t,n){var o=L(i)?i:_e(i,n),s=Math.abs(o-t),l=e*s;if(a){var u=n*e;l=q(a)(l/u)*u}return r+l}}function _e(e,t){if("first"===e)return 0;var n=t-1;return"last"===e?n:n/2}function Ee(e,t,n){return"function"===typeof e?e(t,n):e}function Ce(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=(e=ye(e)).length,o=[],i=0;i<r;i++){var a=e[i];for(var s in t){var l=ge(n,s);l.delay=Ee(l.delay,i,r);var u=ve(a,s,t[s],l);o.push(u)}}return xe(o,n,n.duration)}var Pe=n(5971),Ae=n(5646),Te=function(e){return"string"===typeof e};function je(e,t,n,r){var o;return L(t)?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):"<"===t?n:null!==(o=r.get(t))&&void 0!==o?o:e}function Re(e,t,n,r,o,i){!function(e,t,n){for(var r=0;r<e.length;r++){var o=e[r];o.at>t&&o.at<n&&(p(e,o),r--)}}(e,o,i);for(var a=0;a<t.length;a++)e.push({value:t[a],at:I(o,i,r[a]),easing:U(n,a)})}function Oe(e,t){return e.at===t.at?null===e.value?1:-1:e.at-t.at}function Fe(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Me(e,n),o=r.map((function(e){return ve.apply(void 0,(0,Z.Z)(e))})).filter(Boolean);return xe(o,n,null===(t=r[0])||void 0===t?void 0:t[3].duration)}function Me(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.defaultOptions,r=void 0===n?{}:n,o=(0,Pe.__rest)(t,["defaultOptions"]),i=[],a=new Map,s={},l=new Map,u=0,c=0,d=0,f=0;f<e.length;f++){var p=e[f];if(Te(p))l.set(p,c);else if(Array.isArray(p)){var h=(0,te.Z)(p,3),m=h[0],v=h[1],g=h[2],y=void 0===g?{}:g;void 0!==y.at&&(c=je(c,y.at,u,l));for(var b=0,x=ye(m,s),w=x.length,k=0;k<w;k++){var _=x[k],E=De(_,a);for(var C in v){var P=Le(C,E),A=de(v[C]),T=ge(y,C),R=T.duration,O=void 0===R?r.duration||j:R,F=T.easing,L=void 0===F?r.easing||M:F;if(D(L)){var B=S(C);(0,Ae.invariant)(2===A.length||!B,"spring must be provided 2 keyframes within timeline");var I=L.createAnimation(A,(function(){return"0"}),B);L=I.easing,void 0!==I.keyframes&&(A=I.keyframes),void 0!==I.duration&&(O=I.duration)}var U=Ee(y.delay,k,w)||0,G=c+U,W=G+O,Z=T.offset,H=void 0===Z?z(A.length):Z;1===H.length&&0===H[0]&&(H[1]=1);var $=length-A.length;$>0&&N(H,$),1===A.length&&A.unshift(null),Re(P,A,L,H,G,W),b=Math.max(U+O,b),d=Math.max(W,d)}}u=c,c+=b}else l.set(p.name,je(c,p.at,u,l))}return a.forEach((function(e,t){for(var n in e){var a=e[n];a.sort(Oe);for(var s=[],l=[],u=[],c=0;c<a.length;c++){var f=a[c],p=f.at,h=f.value,m=f.easing;s.push(h),l.push(V(0,d,p)),u.push(m||M)}0!==l[0]&&(l.unshift(0),s.unshift(s[0]),u.unshift("linear")),1!==l[l.length-1]&&(l.push(1),s.push(null)),i.push([t,n,s,Object.assign(Object.assign(Object.assign({},r),{duration:d,easing:u,offset:l}),o)])}})),i}function De(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Le(e,t){return t[e]||(t[e]=[]),t[e]}var Be=100,Ie=10,Ve=1,Ne=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Be,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ie,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Ve;return t/(2*Math.sqrt(e*n))};function ze(e,t,n){return e<t&&n>=t||e>t&&n<=t}function Ue(e,t){return t?e*(1e3/t):0}function Ge(e,t,n){var r=Math.max(t-5,0);return Ue(n-e(r),t-r)}var We=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.stiffness,n=void 0===t?Be:t,r=e.damping,o=void 0===r?Ie:r,i=e.mass,a=void 0===i?Ve:i,s=e.from,l=void 0===s?0:s,u=e.to,c=void 0===u?1:u,d=e.velocity,f=void 0===d?0:d,p=e.restSpeed,h=e.restDistance;f=f?ee(f):0;var m,v={done:!1,hasReachedTarget:!1,current:l,target:c},g=c-l,y=Math.sqrt(n/a)/1e3,b=Ne(n,o,a),x=Math.abs(g)<5;if(p||(p=x?.01:2),h||(h=x?.005:.5),b<1){var w=y*Math.sqrt(1-b*b);m=function(e){return c-Math.exp(-b*y*e)*((b*y*g-f)/w*Math.sin(w*e)+g*Math.cos(w*e))}}else m=function(e){return c-Math.exp(-y*e)*(g+(y*g-f)*e)};return function(e){v.current=m(e);var t=0===e?f:Ge(m,e,v.current),n=Math.abs(t)<=p,r=Math.abs(c-v.current)<=h;return v.done=n&&r,v.hasReachedTarget=ze(l,c,v.current),v}},Ze=10;function He(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,n=void 0,r=Ze,o=e(0),i=[t(o.current)];!o.done&&r<1e4;)o=e(r),i.push(t(o.done?o.target:o.current)),void 0===n&&o.hasReachedTarget&&(n=r),r+=Ze;var a=r-Ze;return 1===i.length&&i.push(o.current),{keyframes:i,duration:a/1e3,overshootDuration:(null!==n&&void 0!==n?n:a)/1e3}}function $e(e){var t=new WeakMap;return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=new Map,o=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s="".concat(t,"-").concat(o,"-").concat(i,"-").concat(a);return r.has(s)||r.set(s,e(Object.assign({from:t,to:o,velocity:i,restSpeed:a?.05:2,restDistance:a?.01:.5},n))),r.get(s)},i=function(e){return t.has(e)||t.set(e,He(e)),t.get(e)};return{createAnimation:function(e,t,n,r,a){var s,l,u,c=e.length;if(n&&c<=2&&e.every(Ke)){var d=e[c-1],f=1===c?null:e[0],p=0,h=0,m=null===a||void 0===a?void 0:a.generator;if(m){var v=a.animation,g=a.generatorStartTime,y=(null===v||void 0===v?void 0:v.startTime)||g||0,b=(null===v||void 0===v?void 0:v.currentTime)||performance.now()-y,x=m(b).current;h=null!==(s=f)&&void 0!==s?s:x,(1===c||2===c&&null===e[0])&&(p=Ge((function(e){return m(e).current}),b,x))}else h=null!==(l=f)&&void 0!==l?l:parseFloat(t());var w=o(h,d,p,null===r||void 0===r?void 0:r.includes("scale")),k=i(w);u=Object.assign(Object.assign({},k),{easing:"linear"}),a&&(a.generator=w,a.generatorStartTime=performance.now())}else{u={easing:"ease",duration:i(o(0,100)).overshootDuration}}return u}}}}var Ke=function(e){return"string"!==typeof e},Xe=$e(We),Ye=$e((function(e){var t=e.from,n=void 0===t?0:t,r=e.velocity,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.decay,l=void 0===s?.325:s,u=e.bounceDamping,c=e.bounceStiffness,d=e.changeTarget,f=e.min,p=e.max,h=e.restDistance,m=void 0===h?.5:h,v=e.restSpeed;l=J(l);var g={hasReachedTarget:!1,done:!1,current:n,target:n},y=function(e){return void 0===f?p:void 0===p||Math.abs(f-e)<Math.abs(p-e)?f:p},b=a*o,x=n+b,w=void 0===d?x:d(x);g.target=w,w!==x&&(b=w-n);var k,S,_=function(e){return-b*Math.exp(-e/l)},E=function(e){return w+_(e)},C=function(e){var t=_(e),n=E(e);g.done=Math.abs(t)<=m,g.current=g.done?w:n},P=function(e){var t;(t=g.current,void 0!==f&&t<f||void 0!==p&&t>p)&&(k=e,S=We({from:g.current,to:y(g.current),velocity:Ge(E,e,g.current),damping:u,stiffness:c,restDistance:m,restSpeed:v}))};return P(0),function(e){var t=!1;return S||void 0!==k||(t=!0,C(e),P(e)),void 0!==k&&e>k?(g.hasReachedTarget=!0,S(e-k)):(g.hasReachedTarget=!1,!t&&C(e),g)}})),qe={any:0,all:1};function Qe(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.root,o=n.margin,i=n.amount,a=void 0===i?"any":i;if("undefined"===typeof IntersectionObserver)return function(){};var s=ye(e),l=new WeakMap,u=function(e){e.forEach((function(e){var n=l.get(e.target);if(e.isIntersecting!==Boolean(n))if(e.isIntersecting){var r=t(e);"function"===typeof r?l.set(e.target,r):c.unobserve(e.target)}else n&&(n(e),l.delete(e.target))}))},c=new IntersectionObserver(u,{root:r,rootMargin:o,threshold:"number"===typeof a?a:qe[a]});return s.forEach((function(e){return c.observe(e)})),function(){return c.disconnect()}}var Je,et=new WeakMap;function tt(e){var t,n=e.target,r=e.contentRect,o=e.borderBoxSize;null===(t=et.get(n))||void 0===t||t.forEach((function(e){e({target:n,contentSize:r,get size(){return function(e,t){if(t){var n=t[0];return{width:n.inlineSize,height:n.blockSize}}return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}(n,o)}})}))}function nt(e){e.forEach(tt)}function rt(e,t){Je||"undefined"!==typeof ResizeObserver&&(Je=new ResizeObserver(nt));var n=ye(e);return n.forEach((function(e){var n=et.get(e);n||(n=new Set,et.set(e,n)),n.add(t),null===Je||void 0===Je||Je.observe(e)})),function(){n.forEach((function(e){var n=et.get(e);null===n||void 0===n||n.delete(t),(null===n||void 0===n?void 0:n.size)||null===Je||void 0===Je||Je.unobserve(e)}))}}var ot,it=new Set;function at(e){return it.add(e),ot||(ot=function(){var e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};it.forEach((function(e){return e(t)}))},window.addEventListener("resize",ot)),function(){it.delete(e),!it.size&&ot&&(ot=void 0)}}function st(e,t){return"function"===typeof e?at(e):rt(e,t)}var lt=n(9472),ut={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function ct(e,t,n,r){var o=n[t],i=ut[t],a=i.length,s=i.position,l=o.current,u=n.time;o.current=e["scroll"+s],o.scrollLength=e["scroll"+a]-e["client"+a],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=V(0,o.scrollLength,o.current);var c=r-u;o.velocity=c>50?0:Ue(o.current-l,c)}function dt(e,t,n){ct(e,"x",t,n),ct(e,"y",t,n),t.time=n}var ft={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},pt={start:0,center:.5,end:1};function ht(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(void 0!==pt[e]&&(e=pt[e]),Te(e)){var o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return L(e)&&(r=t*e),n+r}var mt=[0,0];function vt(e,t,n,r){var o=Array.isArray(e)?e:mt;return L(e)?o=[e,e]:Te(e)&&(o=(e=e.trim()).includes(" ")?e.split(" "):[e,pt[e]?e:"0"]),ht(o[0],n,r)-ht(o[1],t)}var gt={x:0,y:0};function yt(e,t,n){var r=n.offset,o=void 0===r?ft.All:r,i=n.target,a=void 0===i?e:i,s=n.axis,l=void 0===s?"y":s,u="y"===l?"height":"width",c=a!==e?function(e,t){for(var n={x:0,y:0},r=e;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r instanceof SVGGraphicsElement&&"getBBox"in r){var o=r.getBBox(),i=o.top,a=o.left;for(n.x+=a,n.y+=i;r&&"svg"!==r.tagName;)r=r.parentNode}return n}(a,e):gt,d=a===e?{width:e.scrollWidth,height:e.scrollHeight}:{width:a.clientWidth,height:a.clientHeight},f={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;for(var p=!t[l].interpolate,h=o.length,m=0;m<h;m++){var v=vt(o[m],f[u],d[u],c[l]);p||v===t[l].interpolatorOffsets[m]||(p=!0),t[l].offset[m]=v}p&&(t[l].interpolate=W(z(h),t[l].offset),t[l].interpolatorOffsets=(0,Z.Z)(t[l].offset)),t[l].progress=t[l].interpolate(t[l].current)}function bt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=arguments.length>2?arguments[2]:void 0;if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e)for(var r=t;r&&r!=e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent;n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight}function xt(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.axis||"y";return{measure:function(){return bt(e,r.target,n)},update:function(t){dt(e,n,t),(r.offset||r.target)&&yt(e,n,r)},notify:"function"===typeof t?function(){return t(n)}:wt(t,n[o])}}function wt(e,t){return e.pause(),e.forEachNative((function(e,t){var n,r,o=t.easing;if(e.updateDuration)o||(e.easing=d),e.updateDuration(1);else{var i={duration:1e3};o||(i.easing="linear"),null===(r=null===(n=e.effect)||void 0===n?void 0:n.updateTiming)||void 0===r||r.call(n,i)}})),function(){e.currentTime=t.progress}}var kt=new WeakMap,St=new WeakMap,_t=new WeakMap,Et=function(e){return e===document.documentElement?window:e};function Ct(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.container,r=void 0===n?document.documentElement:n,o=(0,Pe.__rest)(t,["container"]),i=_t.get(r);i||(i=new Set,_t.set(r,i));var a={time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},s=xt(r,e,a,o);if(i.add(s),!kt.has(r)){var l=function(){var e,t=performance.now(),n=(0,lt.Z)(i);try{for(n.s();!(e=n.n()).done;){e.value.measure()}}catch(l){n.e(l)}finally{n.f()}var r,o=(0,lt.Z)(i);try{for(o.s();!(r=o.n()).done;){r.value.update(t)}}catch(l){o.e(l)}finally{o.f()}var a,s=(0,lt.Z)(i);try{for(s.s();!(a=s.n()).done;){a.value.notify()}}catch(l){s.e(l)}finally{s.f()}};kt.set(r,l);var u=Et(r);window.addEventListener("resize",l,{passive:!0}),r!==document.documentElement&&St.set(r,st(r,l)),u.addEventListener("scroll",l,{passive:!0})}var c=kt.get(r),d=requestAnimationFrame(c);return function(){var t;"function"!==typeof e&&e.stop(),cancelAnimationFrame(d);var n=_t.get(r);if(n&&(n.delete(s),!n.size)){var o=kt.get(r);kt.delete(r),o&&(Et(r).removeEventListener("scroll",o),null===(t=St.get(r))||void 0===t||t(),window.removeEventListener("resize",o))}}}var Pt=n(7166);function At(e,t){return typeof e!==typeof t||(Array.isArray(e)&&Array.isArray(t)?!function(e,t){var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}(e,t):e!==t)}function Tt(e,t){return function(e){return"object"===typeof e}(e)?e:e&&t?t[e]:void 0}var jt=void 0;function Rt(){if(jt){var e=jt.sort(Mt).map(Dt);e.forEach(Lt),e.forEach(Lt),jt=void 0}}function Ot(e){jt?f(jt,e):(jt=[e],requestAnimationFrame(Rt))}function Ft(e){jt&&p(jt,e)}var Mt=function(e,t){return e.getDepth()-t.getDepth()},Dt=function(e){return e.animateUpdates()},Lt=function(e){return e.next()},Bt=function(e,t){return new CustomEvent(e,{detail:{target:t}})};function It(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEvent:n}}))}function Vt(e,t,n){e.dispatchEvent(new CustomEvent(t,{detail:{originalEntry:n}}))}var Nt=function(e,t,n){return function(r){r.pointerType&&"mouse"!==r.pointerType||(n(),It(e,t,r))}},zt={inView:{isActive:function(e){return Boolean(e.inView)},subscribe:function(e,t,n){var r=t.enable,o=t.disable,i=n.inViewOptions,a=void 0===i?{}:i,s=a.once,l=(0,Pe.__rest)(a,["once"]);return Qe(e,(function(t){if(r(),Vt(e,"viewenter",t),!s)return function(t){o(),Vt(e,"viewleave",t)}}),l)}},hover:{isActive:function(e){return Boolean(e.hover)},subscribe:function(e,t){var n=t.enable,r=t.disable,o=Nt(e,"hoverstart",n),i=Nt(e,"hoverend",r);return e.addEventListener("pointerenter",o),e.addEventListener("pointerleave",i),function(){e.removeEventListener("pointerenter",o),e.removeEventListener("pointerleave",i)}}},press:{isActive:function(e){return Boolean(e.press)},subscribe:function(e,t){var n=t.enable,r=t.disable,o=function t(n){r(),It(e,"pressend",n),window.removeEventListener("pointerup",t)},i=function(t){n(),It(e,"pressstart",t),window.addEventListener("pointerup",o)};return e.addEventListener("pointerdown",i),function(){e.removeEventListener("pointerdown",i),window.removeEventListener("pointerup",o)}}}},Ut=["initial","animate"].concat((0,Z.Z)(Object.keys(zt)),["exit"]),Gt=new WeakMap;function Wt(){var e,t,n=(0,Pt.Z)().mark(v),r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1?arguments[1]:void 0,i=o?o.getDepth()+1:0,a={initial:!0,animate:!0},s={},l={},u=(0,lt.Z)(Ut);try{for(u.s();!(t=u.n()).done;){var d=t.value;l[d]="string"===typeof r[d]?r[d]:null===o||void 0===o?void 0:o.getContext()[d]}}catch(x){u.e(x)}finally{u.f()}var f=!1===r.initial?"animate":"initial",p=Tt(r[f]||l[f],r.variants)||{},h=(0,Pe.__rest)(p,["transition"]),m=Object.assign({},h);function v(){var t,o,i,s,l,u,d,f,p,v,g,y,b;return(0,Pt.Z)().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:i=h,h={},s={},l=(0,lt.Z)(Ut),n.prev=4,l.s();case 6:if((u=l.n()).done){n.next=24;break}if(d=u.value,a[d]){n.next=10;break}return n.abrupt("continue",22);case 10:if(f=Tt(r[d])){n.next=13;break}return n.abrupt("continue",22);case 13:n.t0=(0,Pt.Z)().keys(f);case 14:if((n.t1=n.t0()).done){n.next=22;break}if("transition"!==(p=n.t1.value)){n.next=18;break}return n.abrupt("continue",14);case 18:h[p]=f[p],s[p]=ge(null!==(o=null!==(t=f.transition)&&void 0!==t?t:r.transition)&&void 0!==o?o:{},p),n.next=14;break;case 22:n.next=6;break;case 24:n.next=29;break;case 26:n.prev=26,n.t2=n.catch(4),l.e(n.t2);case 29:return n.prev=29,l.f(),n.finish(29);case 32:return v=new Set([].concat((0,Z.Z)(Object.keys(h)),(0,Z.Z)(Object.keys(i)))),g=[],v.forEach((function(t){var n;void 0===h[t]&&(h[t]=m[t]),At(i[t],h[t])&&(null!==(n=m[t])&&void 0!==n||(m[t]=pe.get(e,t)),g.push(ve(e,t,h[t],s[t])))})),void(n.next=37);case 37:if((y=g.map((function(e){return e()})).filter(Boolean)).length){n.next=40;break}return n.abrupt("return");case 40:b=h,e.dispatchEvent(Bt("motionstart",b)),Promise.all(y.map((function(e){return e.finished}))).then((function(){e.dispatchEvent(Bt("motioncomplete",b))})).catch(c);case 43:case"end":return n.stop()}}),n,null,[[4,26,29,32]])}var g=function(e,t){return function(){a[e]=t,Ot(b)}},y=function(){for(var t in zt){var n=zt[t].isActive(r),o=s[t];n&&!o?s[t]=zt[t].subscribe(e,{enable:g(t,!0),disable:g(t,!1)},r):!n&&o&&(o(),delete s[t])}},b={update:function(t){e&&(r=t,y(),Ot(b))},setActive:function(t,n){e&&(a[t]=n,Ot(b))},animateUpdates:v,getDepth:function(){return i},getTarget:function(){return h},getOptions:function(){return r},getContext:function(){return l},mount:function(t){return(0,Ae.invariant)(Boolean(t),"Animation state must be mounted with valid Element"),e=t,Gt.set(e,b),y(),function(){for(var t in Gt.delete(e),Ft(b),s)s[t]()}},isMounted:function(){return Boolean(e)}};return b}function Zt(e){var t={},n=[];for(var r in e){var o=e[r];S(r)&&(m[r]&&(r=m[r]),n.push(r),r=b(r));var i=Array.isArray(o)?o[0]:o,a=y.get(r);a&&(i=L(o)?a.toDefaultUnit(o):o),t[r]=i}return n.length&&(t.transform=E(n)),t}var Ht=function(e){return"-".concat(e.toLowerCase())},$t=function(e){return e.replace(/[A-Z]/g,Ht)};function Kt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Zt(e),n="";for(var r in t)n+=r.startsWith("--")?r:$t(r),n+=": ".concat(t[r],"; ");return n}},4035:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=1/60*1e3,r="undefined"!==typeof performance?function(){return performance.now()}:function(){return Date.now()},o="undefined"!==typeof window?function(e){return window.requestAnimationFrame(e)}:function(e){return setTimeout((function(){return e(r())}),n)};var i=!0,a=!1,s=!1,l={delta:0,timestamp:0},u=["read","update","preRender","render","postRender"],c=u.reduce((function(e,t){return e[t]=function(e){var t=[],n=[],r=0,o=!1,i=!1,a=new WeakSet,s={schedule:function(e){var i=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&o,s=i?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&a.add(e),-1===s.indexOf(e)&&(s.push(e),i&&o&&(r=t.length)),e},cancel:function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1),a.delete(e)},process:function(l){if(o)i=!0;else{o=!0;var u=[n,t];if(t=u[0],(n=u[1]).length=0,r=t.length)for(var c=0;c<r;c++){var d=t[c];d(l),a.has(d)&&(s.schedule(d),e())}o=!1,i&&(i=!1,s.process(l))}}};return s}((function(){return a=!0})),e}),{}),d=u.reduce((function(e,t){var n=c[t];return e[t]=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return a||v(),n.schedule(e,t,r)},e}),{}),f=u.reduce((function(e,t){return e[t]=c[t].cancel,e}),{}),p=u.reduce((function(e,t){return e[t]=function(){return c[t].process(l)},e}),{}),h=function(e){return c[e].process(l)},m=function e(t){a=!1,l.delta=i?n:Math.max(Math.min(t-l.timestamp,40),1),l.timestamp=t,s=!0,u.forEach(h),s=!1,a&&(i=!1,o(e))},v=function(){a=!0,i=!0,s||o(m)};t.cancelSync=f,t.default=d,t.flushSync=p,t.getFrameData=function(){return l}},5646:function(e,t,n){"use strict";n.r(t),n.d(t,{invariant:function(){return o},warning:function(){return r}});var r=function(){},o=function(){}},2110:function(e,t,n){"use strict";var r=n(8309),o={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};function l(e){return r.isMemo(e)?a:s[e.$$typeof]||o}s[r.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},s[r.Memo]=a;var u=Object.defineProperty,c=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,h=Object.prototype;e.exports=function e(t,n,r){if("string"!==typeof n){if(h){var o=p(n);o&&o!==h&&e(t,o,r)}var a=c(n);d&&(a=a.concat(d(n)));for(var s=l(t),m=l(n),v=0;v<a.length;++v){var g=a[v];if(!i[g]&&(!r||!r[g])&&(!m||!m[g])&&(!s||!s[g])){var y=f(n,g);try{u(t,g,y)}catch(b){}}}}return t}},746:function(e,t){"use strict";var n="function"===typeof Symbol&&Symbol.for,r=n?Symbol.for("react.element"):60103,o=n?Symbol.for("react.portal"):60106,i=n?Symbol.for("react.fragment"):60107,a=n?Symbol.for("react.strict_mode"):60108,s=n?Symbol.for("react.profiler"):60114,l=n?Symbol.for("react.provider"):60109,u=n?Symbol.for("react.context"):60110,c=n?Symbol.for("react.async_mode"):60111,d=n?Symbol.for("react.concurrent_mode"):60111,f=n?Symbol.for("react.forward_ref"):60112,p=n?Symbol.for("react.suspense"):60113,h=n?Symbol.for("react.suspense_list"):60120,m=n?Symbol.for("react.memo"):60115,v=n?Symbol.for("react.lazy"):60116,g=n?Symbol.for("react.block"):60121,y=n?Symbol.for("react.fundamental"):60117,b=n?Symbol.for("react.responder"):60118,x=n?Symbol.for("react.scope"):60119;function w(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case c:case d:case i:case s:case a:case p:return e;default:switch(e=e&&e.$$typeof){case u:case f:case v:case m:case l:return e;default:return t}}case o:return t}}}function k(e){return w(e)===d}t.AsyncMode=c,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=l,t.Element=r,t.ForwardRef=f,t.Fragment=i,t.Lazy=v,t.Memo=m,t.Portal=o,t.Profiler=s,t.StrictMode=a,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||w(e)===c},t.isConcurrentMode=k,t.isContextConsumer=function(e){return w(e)===u},t.isContextProvider=function(e){return w(e)===l},t.isElement=function(e){return"object"===typeof e&&null!==e&&e.$$typeof===r},t.isForwardRef=function(e){return w(e)===f},t.isFragment=function(e){return w(e)===i},t.isLazy=function(e){return w(e)===v},t.isMemo=function(e){return w(e)===m},t.isPortal=function(e){return w(e)===o},t.isProfiler=function(e){return w(e)===s},t.isStrictMode=function(e){return w(e)===a},t.isSuspense=function(e){return w(e)===p},t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===d||e===s||e===a||e===p||e===h||"object"===typeof e&&null!==e&&(e.$$typeof===v||e.$$typeof===m||e.$$typeof===l||e.$$typeof===u||e.$$typeof===f||e.$$typeof===y||e.$$typeof===b||e.$$typeof===x||e.$$typeof===g)},t.typeOf=w},8309:function(e,t,n){"use strict";e.exports=n(746)},7196:function(e,t,n){"use strict";var r=n(4534).default,o=n(8485).default;Object.defineProperty(t,"__esModule",{value:!0});var i=n(5971),a=n(5646),s=n(607),l=n(4035);function u(e){return e&&"object"===typeof e&&"default"in e?e:{default:e}}var c=u(l),d=function(e,t,n){return Math.min(Math.max(n,e),t)},f=.001;function p(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,s=void 0===i?.25:i,l=e.velocity,u=void 0===l?0:l,c=e.mass,p=void 0===c?1:c;a.warning(o<=1e4,"Spring duration must be 10 seconds or less");var m=1-s;m=d(.05,1,m),o=d(.01,10,o/1e3),m<1?(t=function(e){var t=e*m,n=t*o,r=t-u,i=h(e,m),a=Math.exp(-n);return f-r/i*a},n=function(e){var n=e*m*o,r=n*u+u,i=Math.pow(m,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=h(Math.pow(e,2),m);return(-t(e)+f>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-u)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(u-e))});var v=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o*=1e3,isNaN(v))return{stiffness:100,damping:10,duration:o};var g=Math.pow(v,2)*p;return{stiffness:g,damping:2*m*Math.sqrt(p*g),duration:o}}function h(e,t){return e*Math.sqrt(1-t*t)}var m=["duration","bounce"],v=["stiffness","damping","mass"];function g(e,t){return t.some((function(t){return void 0!==e[t]}))}function y(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,a=e.restSpeed,s=void 0===a?2:a,l=e.restDelta,u=i.__rest(e,["from","to","restSpeed","restDelta"]),c={done:!1,value:n},d=function(e){var t=Object.assign({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!g(e,v)&&g(e,m)){var n=p(e);(t=Object.assign(Object.assign(Object.assign({},t),n),{velocity:0,mass:1})).isResolvedFromDuration=!0}return t}(u),f=d.stiffness,y=d.damping,x=d.mass,w=d.velocity,k=d.duration,S=d.isResolvedFromDuration,_=b,E=b;function C(){var e=w?-w/1e3:0,t=o-n,r=y/(2*Math.sqrt(f*x)),i=Math.sqrt(f/x)/1e3;if(void 0===l&&(l=Math.min(Math.abs(o-n)/100,.4)),r<1){var a=h(i,r);_=function(n){var s=Math.exp(-r*i*n);return o-s*((e+r*i*t)/a*Math.sin(a*n)+t*Math.cos(a*n))},E=function(n){var o=Math.exp(-r*i*n);return r*i*o*(Math.sin(a*n)*(e+r*i*t)/a+t*Math.cos(a*n))-o*(Math.cos(a*n)*(e+r*i*t)-a*t*Math.sin(a*n))}}else if(1===r)_=function(n){return o-Math.exp(-i*n)*(t+(e+i*t)*n)};else{var s=i*Math.sqrt(r*r-1);_=function(n){var a=Math.exp(-r*i*n),l=Math.min(s*n,300);return o-a*((e+r*i*t)*Math.sinh(l)+s*t*Math.cosh(l))/s}}}return C(),{next:function(e){var t=_(e);if(S)c.done=e>=k;else{var n=1e3*E(e),r=Math.abs(n)<=s,i=Math.abs(o-t)<=l;c.done=r&&i}return c.value=c.done?o:t,c},flipTarget:function(){w=-w;var e=[o,n];n=e[0],o=e[1],C()}}}y.needsInterpolation=function(e,t){return"string"===typeof e||"string"===typeof t};var b=function(e){return 0},x=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},w=function(e,t,n){return-n*e+n*t+e};function k(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function S(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;t/=360,r/=100;var i=0,a=0,s=0;if(n/=100){var l=r<.5?r*(1+n):r+n-r*n,u=2*r-l;i=k(u,l,t+1/3),a=k(u,l,t),s=k(u,l,t-1/3)}else i=a=s=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*s),alpha:o}}var _=function(e,t,n){var r=e*e,o=t*t;return Math.sqrt(Math.max(0,n*(o-r)+r))},E=[s.hex,s.rgba,s.hsla],C=function(e){return E.find((function(t){return t.test(e)}))},P=function(e){return"'".concat(e,"' is not an animatable color. Use the equivalent color code instead.")},A=function(e,t){var n=C(e),r=C(t);a.invariant(!!n,P(e)),a.invariant(!!r,P(t));var o=n.parse(e),i=r.parse(t);n===s.hsla&&(o=S(o),n=s.rgba),r===s.hsla&&(i=S(i),r=s.rgba);var l=Object.assign({},o);return function(e){for(var t in l)"alpha"!==t&&(l[t]=_(o[t],i[t],e));return l.alpha=w(o.alpha,i.alpha,e),n.transform(l)}},T={x:0,y:0,z:0},j=function(e){return"number"===typeof e},R=function(e,t){return function(n){return t(e(n))}},O=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(R)};function F(e,t){return j(e)?function(n){return w(e,t,n)}:s.color.test(e)?A(e,t):B(e,t)}var M=function(e,t){var n=o(e),r=n.length,i=e.map((function(e,n){return F(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=i[t](e);return n}},D=function(e,t){var n=Object.assign(Object.assign({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=F(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}};function L(e){for(var t=s.complex.parse(e),n=t.length,r=0,o=0,i=0,a=0;a<n;a++)r||"number"===typeof t[a]?r++:void 0!==t[a].hue?i++:o++;return{parsed:t,numNumbers:r,numRGB:o,numHSL:i}}var B=function(e,t){var n=s.complex.createTransformer(t),r=L(e),o=L(t);return r.numHSL===o.numHSL&&r.numRGB===o.numRGB&&r.numNumbers>=o.numNumbers?O(M(r.parsed,o.parsed),n):(a.warning(!0,"Complex values '".concat(e,"' and '").concat(t,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.")),function(n){return"".concat(n>0?t:e)})},I=function(e,t){return function(n){return w(e,t,n)}};function V(e,t,n){for(var r,o=[],i=n||("number"===typeof(r=e[0])?I:"string"===typeof r?s.color.test(r)?A:B:Array.isArray(r)?M:"object"===typeof r?D:void 0),a=e.length-1,l=0;l<a;l++){var u=i(e[l],e[l+1]);if(t){var c=Array.isArray(t)?t[l]:t;u=O(c,u)}o.push(u)}return o}function N(e,t){var n=r(e,2),o=n[0],i=n[1],a=r(t,1)[0];return function(e){return a(x(o,i,e))}}function z(e,t){var n=e.length,r=n-1;return function(o){var i=0,a=!1;if(o<=e[0]?a=!0:o>=e[r]&&(i=r-1,a=!0),!a){for(var s=1;s<n&&!(e[s]>o||s===r);s++);i=s-1}var l=x(e[i],e[i+1],o);return t[i](l)}}function U(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.clamp,o=void 0===r||r,i=n.ease,s=n.mixer,l=e.length;a.invariant(l===t.length,"Both input and output ranges must be the same length"),a.invariant(!i||!Array.isArray(i)||i.length===l-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),e[0]>e[l-1]&&(e=[].concat(e),t=[].concat(t),e.reverse(),t.reverse());var u=V(t,i,s),c=2===l?N(e,u):z(e,u);return o?function(t){return c(d(e[0],e[l-1],t))}:c}var G=function(e){return function(t){return 1-e(1-t)}},W=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Z=function(e){return function(t){return Math.pow(t,e)}},H=function(e){return function(t){return t*t*((e+1)*t-e)}},$=function(e){var t=H(e);return function(e){return(e*=2)<1?.5*t(e):.5*(2-Math.pow(2,-10*(e-1)))}},K=function(e){return e},X=Z(2),Y=G(X),q=W(X),Q=function(e){return 1-Math.sin(Math.acos(e))},J=G(Q),ee=W(J),te=H(1.525),ne=G(te),re=W(te),oe=$(1.525),ie=function(e){if(1===e||0===e)return e;var t=e*e;return e<.36363636363636365?7.5625*t:e<.7272727272727273?9.075*t-9.9*e+3.4:e<.9?12.066481994459833*t-19.63545706371191*e+8.898060941828255:10.8*e*e-20.52*e+10.72},ae=G(ie);function se(e,t){return e.map((function(){return t||q})).splice(0,e.length-1)}function le(e){var t=e.from,n=void 0===t?0:t,r=e.to,o=void 0===r?1:r,i=e.ease,a=e.offset,s=e.duration,l=void 0===s?300:s,u={done:!1,value:n},c=Array.isArray(o)?o:[n,o],d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===c.length?a:function(e){var t=e.length;return e.map((function(e,n){return 0!==n?n/(t-1):0}))}(c),l);function f(){return U(d,c,{ease:Array.isArray(i)?i:se(c,i)})}var p=f();return{next:function(e){return u.value=p(e),u.done=e>=l,u},flipTarget:function(){c.reverse(),p=f()}}}function ue(e){var t=e.velocity,n=void 0===t?0:t,r=e.from,o=void 0===r?0:r,i=e.power,a=void 0===i?.8:i,s=e.timeConstant,l=void 0===s?350:s,u=e.restDelta,c=void 0===u?.5:u,d=e.modifyTarget,f={done:!1,value:o},p=a*n,h=o+p,m=void 0===d?h:d(h);return m!==h&&(p=m-o),{next:function(e){var t=-p*Math.exp(-e/l);return f.done=!(t>c||t<-c),f.value=f.done?m:m+t,f},flipTarget:function(){}}}var ce={keyframes:le,spring:y,decay:ue};function de(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return e-t-n}var fe=function(e){var t=function(t){var n=t.delta;return e(n)};return{start:function(){return c.default.update(t,!0)},stop:function(){return l.cancelSync.update(t)}}};function pe(e){var t,n,r,o,a,s=e.from,l=e.autoplay,u=void 0===l||l,c=e.driver,d=void 0===c?fe:c,f=e.elapsed,p=void 0===f?0:f,h=e.repeat,m=void 0===h?0:h,v=e.repeatType,g=void 0===v?"loop":v,b=e.repeatDelay,x=void 0===b?0:b,w=e.onPlay,k=e.onStop,S=e.onComplete,_=e.onRepeat,E=e.onUpdate,C=i.__rest(e,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),P=C.to,A=0,T=C.duration,j=!1,R=!0,O=function(e){if(Array.isArray(e.to))return le;if(ce[e.type])return ce[e.type];var t=new Set(Object.keys(e));return t.has("ease")||t.has("duration")&&!t.has("dampingRatio")?le:t.has("dampingRatio")||t.has("stiffness")||t.has("mass")||t.has("damping")||t.has("restSpeed")||t.has("restDelta")?y:le}(C);(null===(n=(t=O).needsInterpolation)||void 0===n?void 0:n.call(t,s,P))&&(a=U([0,100],[s,P],{clamp:!1}),s=0,P=100);var F=O(Object.assign(Object.assign({},C),{from:s,to:P}));function M(){A++,"reverse"===g?p=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return arguments.length>3&&void 0!==arguments[3]&&!arguments[3]?t-(e-t)+n:de(t+-e,t,n)}(p,T,x,R=A%2===0):(p=de(p,T,x),"mirror"===g&&F.flipTarget()),j=!1,_&&_()}function D(e){if(R||(e=-e),p+=e,!j){var t=F.next(Math.max(0,p));o=t.value,a&&(o=a(o)),j=R?t.done:p<=0}null===E||void 0===E||E(o),j&&(0===A&&(null!==T&&void 0!==T||(T=p)),A<m?function(e,t,n,r){return r?e>=t+n:e<=-n}(p,T,x,R)&&M():(r.stop(),S&&S()))}return u&&(null===w||void 0===w||w(),(r=d(D)).start()),{stop:function(){null===k||void 0===k||k(),r.stop()}}}function he(e,t){return t?e*(1e3/t):0}var me=function(e){return 180*e/Math.PI},ve=function(e){return e},ge=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ve;return function(t,n,r){var o=n-r,i=-(0-t+1)*(0-e(Math.abs(o)));return o<=0?n+i:n-i}},ye=ge(),be=ge(Math.sqrt),xe=function(e){return e*Math.PI/180},we=function(e){return e.hasOwnProperty("x")&&e.hasOwnProperty("y")},ke=function(e){return we(e)&&e.hasOwnProperty("z")},Se=function(e,t){return Math.abs(e-t)};var _e=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return t=Math.pow(10,t),Math.round(e*t)/t},Ee=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0;return _e(e+n*(t-e)/Math.max(r,n))};var Ce=function(e,t){return 1-3*t+3*e},Pe=function(e,t){return 3*t-6*e},Ae=function(e){return 3*e},Te=function(e,t,n){return((Ce(t,n)*e+Pe(t,n))*e+Ae(t))*e},je=function(e,t,n){return 3*Ce(t,n)*e*e+2*Pe(t,n)*e+Ae(t)};var Re=.1;t.angle=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:T;return me(Math.atan2(t.y-e.y,t.x-e.x))},t.animate=pe,t.anticipate=oe,t.applyOffset=function(e,t){var n=!0;return void 0===t&&(t=e,n=!1),function(r){return n?r-e+t:(e=r,n=!0,t)}},t.attract=ye,t.attractExpo=be,t.backIn=te,t.backInOut=re,t.backOut=ne,t.bounceIn=ae,t.bounceInOut=function(e){return e<.5?.5*(1-ie(1-2*e)):.5*ie(2*e-1)+.5},t.bounceOut=ie,t.circIn=Q,t.circInOut=ee,t.circOut=J,t.clamp=d,t.createAnticipate=$,t.createAttractor=ge,t.createBackIn=H,t.createExpoIn=Z,t.cubicBezier=function(e,t,n,r){if(e===t&&n===r)return K;for(var o=new Float32Array(11),i=0;i<11;++i)o[i]=Te(i*Re,e,n);function a(t){for(var r=0,i=1;10!==i&&o[i]<=t;++i)r+=Re;--i;var a=r+(t-o[i])/(o[i+1]-o[i])*Re,s=je(a,e,n);return s>=.001?function(e,t,n,r){for(var o=0;o<8;++o){var i=je(t,n,r);if(0===i)return t;t-=(Te(t,n,r)-e)/i}return t}(t,a,e,n):0===s?a:function(e,t,n,r,o){var i,a,s=0;do{(i=Te(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<10);return a}(t,r,r+Re,e,n)}return function(e){return 0===e||1===e?e:Te(a(e),t,r)}},t.decay=ue,t.degreesToRadians=xe,t.distance=function(e,t){if(j(e)&&j(t))return Se(e,t);if(we(e)&&we(t)){var n=Se(e.x,t.x),r=Se(e.y,t.y),o=ke(e)&&ke(t)?Se(e.z,t.z):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2)+Math.pow(o,2))}},t.easeIn=X,t.easeInOut=q,t.easeOut=Y,t.inertia=function(e){var t,n=e.from,r=void 0===n?0:n,o=e.velocity,i=void 0===o?0:o,a=e.min,s=e.max,u=e.power,c=void 0===u?.8:u,d=e.timeConstant,f=void 0===d?750:d,p=e.bounceStiffness,h=void 0===p?500:p,m=e.bounceDamping,v=void 0===m?10:m,g=e.restDelta,y=void 0===g?1:g,b=e.modifyTarget,x=e.driver,w=e.onUpdate,k=e.onComplete,S=e.onStop;function _(e){return void 0!==a&&e<a||void 0!==s&&e>s}function E(e){return void 0===a?s:void 0===s||Math.abs(a-e)<Math.abs(s-e)?a:s}function C(e){null===t||void 0===t||t.stop(),t=pe(Object.assign(Object.assign({},e),{driver:x,onUpdate:function(t){var n;null===w||void 0===w||w(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:k,onStop:S}))}function P(e){C(Object.assign({type:"spring",stiffness:h,damping:v,restDelta:y},e))}if(_(r))P({from:r,velocity:i,to:E(r)});else{var A=c*i+r;"undefined"!==typeof b&&(A=b(A));var T,j,R=E(A),O=R===a?-1:1;C({type:"decay",from:r,velocity:i,timeConstant:f,power:c,restDelta:y,modifyTarget:b,onUpdate:_(A)?function(e){T=j,j=e,i=he(e-T,l.getFrameData().delta),(1===O&&e>R||-1===O&&e<R)&&P({from:e,to:R,velocity:i})}:void 0})}return{stop:function(){return null===t||void 0===t?void 0:t.stop()}}},t.interpolate=U,t.isPoint=we,t.isPoint3D=ke,t.keyframes=le,t.linear=K,t.mirrorEasing=W,t.mix=w,t.mixColor=A,t.mixComplex=B,t.pipe=O,t.pointFromVector=function(e,t,n){return t=xe(t),{x:n*Math.cos(t)+e.x,y:n*Math.sin(t)+e.y}},t.progress=x,t.radiansToDegrees=me,t.reverseEasing=G,t.smooth=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:50,t=0,n=0;return function(r){var o=l.getFrameData().timestamp,i=o!==n?o-n:0,a=i?Ee(t,r,i,e):t;return n=o,t=a,a}},t.smoothFrame=Ee,t.snap=function(e){if("number"===typeof e)return function(t){return Math.round(t/e)*e};var t=0,n=e.length;return function(r){var o=Math.abs(e[0]-r);for(t=1;t<n;t++){var i=e[t],a=Math.abs(i-r);if(0===a)return i;if(a>o)return e[t-1];if(t===n-1)return i;o=a}}},t.spring=y,t.steps=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"end";return function(n){var r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e,o="end"===t?Math.floor(r):Math.ceil(r);return d(0,1,o/e)}},t.toDecimal=_e,t.velocityPerFrame=function(e,t){return e/(1e3/t)},t.velocityPerSecond=he,t.wrap=function(e,t,n){var r=t-e;return((n-e)%r+r)%r+e}},4463:function(e,t,n){"use strict";var r=n(2791),o=n(5296);function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var c=!("undefined"===typeof window||"undefined"===typeof window.document||"undefined"===typeof window.document.createElement),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},h={};function m(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var g=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var o=v.hasOwnProperty(t)?v[t]:null;(null!==o?0!==o.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null===t||"undefined"===typeof t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,o,r)&&(n=null),r||null===o?function(e){return!!d.call(h,e)||!d.call(p,e)&&(f.test(e)?h[e]=!0:(p[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):o.mustUseProperty?e[o.propertyName]=null===n?3!==o.type&&"":n:(t=o.attributeName,r=o.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(o=o.type)||4===o&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(g,y);v[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var x=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,w=Symbol.for("react.element"),k=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),P=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),j=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),O=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var F=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var M=Symbol.iterator;function D(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=M&&e[M]||e["@@iterator"])?e:null}var L,B=Object.assign;function I(e){if(void 0===L)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);L=t&&t[1]||""}return"\n"+L+e}var V=!1;function N(e,t){if(!e||V)return"";V=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"===typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var r=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){r=u}e.call(t.prototype)}else{try{throw Error()}catch(u){r=u}e()}}catch(u){if(u&&r&&"string"===typeof u.stack){for(var o=u.stack.split("\n"),i=r.stack.split("\n"),a=o.length-1,s=i.length-1;1<=a&&0<=s&&o[a]!==i[s];)s--;for(;1<=a&&0<=s;a--,s--)if(o[a]!==i[s]){if(1!==a||1!==s)do{if(a--,0>--s||o[a]!==i[s]){var l="\n"+o[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{V=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function z(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=N(e.type,!1);case 11:return e=N(e.type.render,!1);case 1:return e=N(e.type,!0);default:return""}}function U(e){if(null==e)return null;if("function"===typeof e)return e.displayName||e.name||null;if("string"===typeof e)return e;switch(e){case S:return"Fragment";case k:return"Portal";case E:return"Profiler";case _:return"StrictMode";case T:return"Suspense";case j:return"SuspenseList"}if("object"===typeof e)switch(e.$$typeof){case P:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case A:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:U(e.type)||"Memo";case O:t=e._payload,e=e._init;try{return U(e(t))}catch(n){}}return null}function G(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return U(t);case 8:return t===_?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof t)return t.displayName||t.name||null;if("string"===typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function Z(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function H(e){e._valueTracker||(e._valueTracker=function(e){var t=Z(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&"undefined"!==typeof n&&"function"===typeof n.get&&"function"===typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function $(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Z(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if("undefined"===typeof(e=e||("undefined"!==typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function X(e,t){var n=t.checked;return B({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){q(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function J(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,o=0;o<e.length;o++){if(e[o].value===n)return e[o].selected=!0,void(r&&(e[o].defaultSelected=!0));null!==t||e[o].disabled||(t=e[o])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(i(91));return B({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function oe(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(i(92));if(te(n)){if(1<n.length)throw Error(i(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ie(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function ae(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,de=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!==typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function fe(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var pe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},he=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"===typeof t||""===t?"":n||"number"!==typeof t||0===t||pe.hasOwnProperty(e)&&pe[e]?(""+t).trim():t+"px"}function ve(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}Object.keys(pe).forEach((function(e){he.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ge=B({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(i(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(i(60));if("object"!==typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(null!=t.style&&"object"!==typeof t.style)throw Error(i(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"===typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var xe=null;function we(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var ke=null,Se=null,_e=null;function Ee(e){if(e=xo(e)){if("function"!==typeof ke)throw Error(i(280));var t=e.stateNode;t&&(t=ko(t),ke(e.stateNode,e.type,t))}}function Ce(e){Se?_e?_e.push(e):_e=[e]:Se=e}function Pe(){if(Se){var e=Se,t=_e;if(_e=Se=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ae(e,t){return e(t)}function Te(){}var je=!1;function Re(e,t,n){if(je)return e(t,n);je=!0;try{return Ae(e,t,n)}finally{je=!1,(null!==Se||null!==_e)&&(Te(),Pe())}}function Oe(e,t){var n=e.stateNode;if(null===n)return null;var r=ko(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!==typeof n)throw Error(i(231,t,typeof n));return n}var Fe=!1;if(c)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Fe=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(ce){Fe=!1}function De(e,t,n,r,o,i,a,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(c){this.onError(c)}}var Le=!1,Be=null,Ie=!1,Ve=null,Ne={onError:function(e){Le=!0,Be=e}};function ze(e,t,n,r,o,i,a,s,l){Le=!1,Be=null,De.apply(Ne,arguments)}function Ue(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!==(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ge(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function We(e){if(Ue(e)!==e)throw Error(i(188))}function Ze(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ue(e)))throw Error(i(188));return t!==e?null:e}for(var n=e,r=t;;){var o=n.return;if(null===o)break;var a=o.alternate;if(null===a){if(null!==(r=o.return)){n=r;continue}break}if(o.child===a.child){for(a=o.child;a;){if(a===n)return We(o),e;if(a===r)return We(o),t;a=a.sibling}throw Error(i(188))}if(n.return!==r.return)n=o,r=a;else{for(var s=!1,l=o.child;l;){if(l===n){s=!0,n=o,r=a;break}if(l===r){s=!0,r=o,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=o;break}if(l===r){s=!0,r=a,n=o;break}l=l.sibling}if(!s)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(3!==n.tag)throw Error(i(188));return n.stateNode.current===n?e:t}(e))?He(e):null}function He(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=He(e);if(null!==t)return t;e=e.sibling}return null}var $e=o.unstable_scheduleCallback,Ke=o.unstable_cancelCallback,Xe=o.unstable_shouldYield,Ye=o.unstable_requestPaint,qe=o.unstable_now,Qe=o.unstable_getCurrentPriorityLevel,Je=o.unstable_ImmediatePriority,et=o.unstable_UserBlockingPriority,tt=o.unstable_NormalPriority,nt=o.unstable_LowPriority,rt=o.unstable_IdlePriority,ot=null,it=null;var at=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2;var ut=64,ct=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ft(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,o=e.suspendedLanes,i=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~o;0!==s?r=dt(s):0!==(i&=a)&&(r=dt(i))}else 0!==(a=n&~o)?r=dt(a):0!==i&&(r=dt(i));if(0===r)return 0;if(0!==t&&t!==r&&0===(t&o)&&((o=r&-r)>=(i=t&-t)||16===o&&0!==(4194240&i)))return t;if(0!==(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)o=1<<(n=31-at(t)),r|=e[n],t&=~o;return r}function pt(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function ht(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0===(4194240&(ut<<=1))&&(ut=64),e}function vt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function gt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-at(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-at(n),o=1<<r;o&t|e[r]&t&&(e[r]|=t),n&=~o}}var bt=0;function xt(e){return 1<(e&=-e)?4<e?0!==(268435455&e)?16:536870912:4:1}var wt,kt,St,_t,Et,Ct=!1,Pt=[],At=null,Tt=null,jt=null,Rt=new Map,Ot=new Map,Ft=[],Mt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":At=null;break;case"dragenter":case"dragleave":Tt=null;break;case"mouseover":case"mouseout":jt=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ot.delete(t.pointerId)}}function Lt(e,t,n,r,o,i){return null===e||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:i,targetContainers:[o]},null!==t&&(null!==(t=xo(t))&&kt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==o&&-1===t.indexOf(o)&&t.push(o),e)}function Bt(e){var t=bo(e.target);if(null!==t){var n=Ue(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ge(n)))return e.blockedOn=t,void Et(e.priority,(function(){St(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function It(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xo(n))&&kt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);xe=r,n.target.dispatchEvent(r),xe=null,t.shift()}return!0}function Vt(e,t,n){It(e)&&n.delete(t)}function Nt(){Ct=!1,null!==At&&It(At)&&(At=null),null!==Tt&&It(Tt)&&(Tt=null),null!==jt&&It(jt)&&(jt=null),Rt.forEach(Vt),Ot.forEach(Vt)}function zt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,o.unstable_scheduleCallback(o.unstable_NormalPriority,Nt)))}function Ut(e){function t(t){return zt(t,e)}if(0<Pt.length){zt(Pt[0],e);for(var n=1;n<Pt.length;n++){var r=Pt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==At&&zt(At,e),null!==Tt&&zt(Tt,e),null!==jt&&zt(jt,e),Rt.forEach(t),Ot.forEach(t),n=0;n<Ft.length;n++)(r=Ft[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Ft.length&&null===(n=Ft[0]).blockedOn;)Bt(n),null===n.blockedOn&&Ft.shift()}var Gt=x.ReactCurrentBatchConfig,Wt=!0;function Zt(e,t,n,r){var o=bt,i=Gt.transition;Gt.transition=null;try{bt=1,$t(e,t,n,r)}finally{bt=o,Gt.transition=i}}function Ht(e,t,n,r){var o=bt,i=Gt.transition;Gt.transition=null;try{bt=4,$t(e,t,n,r)}finally{bt=o,Gt.transition=i}}function $t(e,t,n,r){if(Wt){var o=Xt(e,t,n,r);if(null===o)Wr(e,t,r,Kt,n),Dt(e,r);else if(function(e,t,n,r,o){switch(t){case"focusin":return At=Lt(At,e,t,n,r,o),!0;case"dragenter":return Tt=Lt(Tt,e,t,n,r,o),!0;case"mouseover":return jt=Lt(jt,e,t,n,r,o),!0;case"pointerover":var i=o.pointerId;return Rt.set(i,Lt(Rt.get(i)||null,e,t,n,r,o)),!0;case"gotpointercapture":return i=o.pointerId,Ot.set(i,Lt(Ot.get(i)||null,e,t,n,r,o)),!0}return!1}(o,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Mt.indexOf(e)){for(;null!==o;){var i=xo(o);if(null!==i&&wt(i),null===(i=Xt(e,t,n,r))&&Wr(e,t,r,Kt,n),i===o)break;o=i}null!==o&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Kt=null;function Xt(e,t,n,r){if(Kt=null,null!==(e=bo(e=we(r))))if(null===(t=Ue(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ge(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Je:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var qt=null,Qt=null,Jt=null;function en(){if(Jt)return Jt;var e,t,n=Qt,r=n.length,o="value"in qt?qt.value:qt.textContent,i=o.length;for(e=0;e<r&&n[e]===o[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===o[i-t];t++);return Jt=o.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function on(e){function t(t,n,r,o,i){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=o,this.target=i,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(o):o[a]);return this.isDefaultPrevented=(null!=o.defaultPrevented?o.defaultPrevented:!1===o.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return B(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!==typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!==typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var an,sn,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=on(un),dn=B({},un,{view:0,detail:0}),fn=on(dn),pn=B({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(an=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=an=0,ln=e),an)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),hn=on(pn),mn=on(B({},pn,{dataTransfer:0})),vn=on(B({},dn,{relatedTarget:0})),gn=on(B({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=B({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),bn=on(yn),xn=on(B({},un,{data:0})),wn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},kn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Sn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _n(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Sn[e])&&!!t[e]}function En(){return _n}var Cn=B({},dn,{key:function(e){if(e.key){var t=wn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?kn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),Pn=on(Cn),An=on(B({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Tn=on(B({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),jn=on(B({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=B({},pn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),On=on(Rn),Fn=[9,13,27,32],Mn=c&&"CompositionEvent"in window,Dn=null;c&&"documentMode"in document&&(Dn=document.documentMode);var Ln=c&&"TextEvent"in window&&!Dn,Bn=c&&(!Mn||Dn&&8<Dn&&11>=Dn),In=String.fromCharCode(32),Vn=!1;function Nn(e,t){switch(e){case"keyup":return-1!==Fn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zn(e){return"object"===typeof(e=e.detail)&&"data"in e?e.data:null}var Un=!1;var Gn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Gn[e.type]:"textarea"===t}function Zn(e,t,n,r){Ce(r),0<(t=Hr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Hn=null,$n=null;function Kn(e){Ir(e,0)}function Xn(e){if($(wo(e)))return e}function Yn(e,t){if("change"===e)return t}var qn=!1;if(c){var Qn;if(c){var Jn="oninput"in document;if(!Jn){var er=document.createElement("div");er.setAttribute("oninput","return;"),Jn="function"===typeof er.oninput}Qn=Jn}else Qn=!1;qn=Qn&&(!document.documentMode||9<document.documentMode)}function tr(){Hn&&(Hn.detachEvent("onpropertychange",nr),$n=Hn=null)}function nr(e){if("value"===e.propertyName&&Xn($n)){var t=[];Zn(t,$n,e,we(e)),Re(Kn,t)}}function rr(e,t,n){"focusin"===e?(tr(),$n=n,(Hn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function or(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Xn($n)}function ir(e,t){if("click"===e)return Xn(t)}function ar(e,t){if("input"===e||"change"===e)return Xn(t)}var sr="function"===typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e===1/t)||e!==e&&t!==t};function lr(e,t){if(sr(e,t))return!0;if("object"!==typeof e||null===e||"object"!==typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var o=n[r];if(!d.call(t,o)||!sr(e[o],t[o]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function dr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?dr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function fr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"===typeof t.contentWindow.location.href}catch(r){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function pr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function hr(e){var t=fr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&dr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var o=n.textContent.length,i=Math.min(r.start,o);r=void 0===r.end?i:Math.min(r.end,o),!e.extend&&i>r&&(o=r,r=i,i=o),o=cr(n,i);var a=cr(n,r);o&&a&&(1!==e.rangeCount||e.anchorNode!==o.node||e.anchorOffset!==o.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(o.node,o.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"===typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=c&&"documentMode"in document&&11>=document.documentMode,vr=null,gr=null,yr=null,br=!1;function xr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;br||null==vr||vr!==K(r)||("selectionStart"in(r=vr)&&pr(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Hr(gr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=vr)))}function wr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kr={animationend:wr("Animation","AnimationEnd"),animationiteration:wr("Animation","AnimationIteration"),animationstart:wr("Animation","AnimationStart"),transitionend:wr("Transition","TransitionEnd")},Sr={},_r={};function Er(e){if(Sr[e])return Sr[e];if(!kr[e])return e;var t,n=kr[e];for(t in n)if(n.hasOwnProperty(t)&&t in _r)return Sr[e]=n[t];return e}c&&(_r=document.createElement("div").style,"AnimationEvent"in window||(delete kr.animationend.animation,delete kr.animationiteration.animation,delete kr.animationstart.animation),"TransitionEvent"in window||delete kr.transitionend.transition);var Cr=Er("animationend"),Pr=Er("animationiteration"),Ar=Er("animationstart"),Tr=Er("transitionend"),jr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Or(e,t){jr.set(e,t),l(t,[e])}for(var Fr=0;Fr<Rr.length;Fr++){var Mr=Rr[Fr];Or(Mr.toLowerCase(),"on"+(Mr[0].toUpperCase()+Mr.slice(1)))}Or(Cr,"onAnimationEnd"),Or(Pr,"onAnimationIteration"),Or(Ar,"onAnimationStart"),Or("dblclick","onDoubleClick"),Or("focusin","onFocus"),Or("focusout","onBlur"),Or(Tr,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Dr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Lr=new Set("cancel close invalid load scroll toggle".split(" ").concat(Dr));function Br(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,o,a,s,l,u){if(ze.apply(this,arguments),Le){if(!Le)throw Error(i(198));var c=Be;Le=!1,Be=null,Ie||(Ie=!0,Ve=c)}}(r,t,void 0,e),e.currentTarget=null}function Ir(e,t){t=0!==(4&t);for(var n=0;n<e.length;n++){var r=e[n],o=r.event;r=r.listeners;e:{var i=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==i&&o.isPropagationStopped())break e;Br(o,s,u),i=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,u=s.currentTarget,s=s.listener,l!==i&&o.isPropagationStopped())break e;Br(o,s,u),i=l}}}if(Ie)throw e=Ve,Ie=!1,Ve=null,e}function Vr(e,t){var n=t[vo];void 0===n&&(n=t[vo]=new Set);var r=e+"__bubble";n.has(r)||(Gr(t,e,2,!1),n.add(r))}function Nr(e,t,n){var r=0;t&&(r|=4),Gr(n,e,r,t)}var zr="_reactListening"+Math.random().toString(36).slice(2);function Ur(e){if(!e[zr]){e[zr]=!0,a.forEach((function(t){"selectionchange"!==t&&(Lr.has(t)||Nr(t,!1,e),Nr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[zr]||(t[zr]=!0,Nr("selectionchange",!1,t))}}function Gr(e,t,n,r){switch(Yt(t)){case 1:var o=Zt;break;case 4:o=Ht;break;default:o=$t}n=o.bind(null,t,n,e),o=void 0,!Fe||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(o=!0),r?void 0!==o?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):void 0!==o?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,o){var i=r;if(0===(1&t)&&0===(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===o||8===s.nodeType&&s.parentNode===o)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===o||8===l.nodeType&&l.parentNode===o))return;a=a.return}for(;null!==s;){if(null===(a=bo(s)))return;if(5===(l=a.tag)||6===l){r=i=a;continue e}s=s.parentNode}}r=r.return}Re((function(){var r=i,o=we(n),a=[];e:{var s=jr.get(e);if(void 0!==s){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Pn;break;case"focusin":u="focus",l=vn;break;case"focusout":u="blur",l=vn;break;case"beforeblur":case"afterblur":l=vn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=hn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Tn;break;case Cr:case Pr:case Ar:l=gn;break;case Tr:l=jn;break;case"scroll":l=fn;break;case"wheel":l=On;break;case"copy":case"cut":case"paste":l=bn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=An}var c=0!==(4&t),d=!c&&"scroll"===e,f=c?null!==s?s+"Capture":null:s;c=[];for(var p,h=r;null!==h;){var m=(p=h).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==f&&(null!=(m=Oe(h,f))&&c.push(Zr(h,m,p)))),d)break;h=h.return}0<c.length&&(s=new l(s,u,null,n,o),a.push({event:s,listeners:c}))}}if(0===(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===xe||!(u=n.relatedTarget||n.fromElement)||!bo(u)&&!u[mo])&&(l||s)&&(s=o.window===o?o:(s=o.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?bo(u):null)&&(u!==(d=Ue(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=hn,m="onMouseLeave",f="onMouseEnter",h="mouse","pointerout"!==e&&"pointerover"!==e||(c=An,m="onPointerLeave",f="onPointerEnter",h="pointer"),d=null==l?s:wo(l),p=null==u?s:wo(u),(s=new c(m,h+"leave",l,n,o)).target=d,s.relatedTarget=p,m=null,bo(o)===r&&((c=new c(f,h+"enter",u,n,o)).target=p,c.relatedTarget=d,m=c),d=m,l&&u)e:{for(f=u,h=0,p=c=l;p;p=$r(p))h++;for(p=0,m=f;m;m=$r(m))p++;for(;0<h-p;)c=$r(c),h--;for(;0<p-h;)f=$r(f),p--;for(;h--;){if(c===f||null!==f&&c===f.alternate)break e;c=$r(c),f=$r(f)}c=null}else c=null;null!==l&&Kr(a,s,l,c,!1),null!==u&&null!==d&&Kr(a,d,u,c,!0)}if("select"===(l=(s=r?wo(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Yn;else if(Wn(s))if(qn)v=ar;else{v=or;var g=rr}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=ir);switch(v&&(v=v(e,r))?Zn(a,v,n,o):(g&&g(e,s,r),"focusout"===e&&(g=s._wrapperState)&&g.controlled&&"number"===s.type&&ee(s,"number",s.value)),g=r?wo(r):window,e){case"focusin":(Wn(g)||"true"===g.contentEditable)&&(vr=g,gr=r,yr=null);break;case"focusout":yr=gr=vr=null;break;case"mousedown":br=!0;break;case"contextmenu":case"mouseup":case"dragend":br=!1,xr(a,n,o);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":xr(a,n,o)}var y;if(Mn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Un?Nn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Bn&&"ko"!==n.locale&&(Un||"onCompositionStart"!==b?"onCompositionEnd"===b&&Un&&(y=en()):(Qt="value"in(qt=o)?qt.value:qt.textContent,Un=!0)),0<(g=Hr(r,b)).length&&(b=new xn(b,e,null,n,o),a.push({event:b,listeners:g}),y?b.data=y:null!==(y=zn(n))&&(b.data=y))),(y=Ln?function(e,t){switch(e){case"compositionend":return zn(t);case"keypress":return 32!==t.which?null:(Vn=!0,In);case"textInput":return(e=t.data)===In&&Vn?null:e;default:return null}}(e,n):function(e,t){if(Un)return"compositionend"===e||!Mn&&Nn(e,t)?(e=en(),Jt=Qt=qt=null,Un=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Bn&&"ko"!==t.locale?null:t.data}}(e,n))&&(0<(r=Hr(r,"onBeforeInput")).length&&(o=new xn("onBeforeInput","beforeinput",null,n,o),a.push({event:o,listeners:r}),o.data=y))}Ir(a,t)}))}function Zr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Hr(e,t){for(var n=t+"Capture",r=[];null!==e;){var o=e,i=o.stateNode;5===o.tag&&null!==i&&(o=i,null!=(i=Oe(e,n))&&r.unshift(Zr(e,i,o)),null!=(i=Oe(e,t))&&r.push(Zr(e,i,o))),e=e.return}return r}function $r(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Kr(e,t,n,r,o){for(var i=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,u=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==u&&(s=u,o?null!=(l=Oe(n,i))&&a.unshift(Zr(n,l,s)):o||null!=(l=Oe(n,i))&&a.push(Zr(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Xr=/\r\n?/g,Yr=/\u0000|\uFFFD/g;function qr(e){return("string"===typeof e?e:""+e).replace(Xr,"\n").replace(Yr,"")}function Qr(e,t,n){if(t=qr(t),qr(e)!==t&&n)throw Error(i(425))}function Jr(){}var eo=null,to=null;function no(e,t){return"textarea"===e||"noscript"===e||"string"===typeof t.children||"number"===typeof t.children||"object"===typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ro="function"===typeof setTimeout?setTimeout:void 0,oo="function"===typeof clearTimeout?clearTimeout:void 0,io="function"===typeof Promise?Promise:void 0,ao="function"===typeof queueMicrotask?queueMicrotask:"undefined"!==typeof io?function(e){return io.resolve(null).then(e).catch(so)}:ro;function so(e){setTimeout((function(){throw e}))}function lo(e,t){var n=t,r=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&8===o.nodeType)if("/$"===(n=o.data)){if(0===r)return e.removeChild(o),void Ut(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=o}while(n);Ut(t)}function uo(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function co(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var fo=Math.random().toString(36).slice(2),po="__reactFiber$"+fo,ho="__reactProps$"+fo,mo="__reactContainer$"+fo,vo="__reactEvents$"+fo,go="__reactListeners$"+fo,yo="__reactHandles$"+fo;function bo(e){var t=e[po];if(t)return t;for(var n=e.parentNode;n;){if(t=n[mo]||n[po]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=co(e);null!==e;){if(n=e[po])return n;e=co(e)}return t}n=(e=n).parentNode}return null}function xo(e){return!(e=e[po]||e[mo])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function wo(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(i(33))}function ko(e){return e[ho]||null}var So=[],_o=-1;function Eo(e){return{current:e}}function Co(e){0>_o||(e.current=So[_o],So[_o]=null,_o--)}function Po(e,t){_o++,So[_o]=e.current,e.current=t}var Ao={},To=Eo(Ao),jo=Eo(!1),Ro=Ao;function Oo(e,t){var n=e.type.contextTypes;if(!n)return Ao;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Fo(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Mo(){Co(jo),Co(To)}function Do(e,t,n){if(To.current!==Ao)throw Error(i(168));Po(To,t),Po(jo,n)}function Lo(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!==typeof r.getChildContext)return n;for(var o in r=r.getChildContext())if(!(o in t))throw Error(i(108,G(e)||"Unknown",o));return B({},n,r)}function Bo(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ao,Ro=To.current,Po(To,e),Po(jo,jo.current),!0}function Io(e,t,n){var r=e.stateNode;if(!r)throw Error(i(169));n?(e=Lo(e,t,Ro),r.__reactInternalMemoizedMergedChildContext=e,Co(jo),Co(To),Po(To,e)):Co(jo),Po(jo,n)}var Vo=null,No=!1,zo=!1;function Uo(e){null===Vo?Vo=[e]:Vo.push(e)}function Go(){if(!zo&&null!==Vo){zo=!0;var e=0,t=bt;try{var n=Vo;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Vo=null,No=!1}catch(o){throw null!==Vo&&(Vo=Vo.slice(e+1)),$e(Je,Go),o}finally{bt=t,zo=!1}}return null}var Wo=x.ReactCurrentBatchConfig;function Zo(e,t){if(e&&e.defaultProps){for(var n in t=B({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var Ho=Eo(null),$o=null,Ko=null,Xo=null;function Yo(){Xo=Ko=$o=null}function qo(e){var t=Ho.current;Co(Ho),e._currentValue=t}function Qo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Jo(e,t){$o=e,Xo=Ko=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!==(e.lanes&t)&&(ws=!0),e.firstContext=null)}function ei(e){var t=e._currentValue;if(Xo!==e)if(e={context:e,memoizedValue:t,next:null},null===Ko){if(null===$o)throw Error(i(308));Ko=e,$o.dependencies={lanes:0,firstContext:e}}else Ko=Ko.next=e;return t}var ti=null,ni=!1;function ri(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function oi(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function ii(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function ai(e,t){var n=e.updateQueue;null!==n&&(n=n.shared,tu(e)?(null===(e=n.interleaved)?(t.next=t,null===ti?ti=[n]:ti.push(n)):(t.next=e.next,e.next=t),n.interleaved=t):(null===(e=n.pending)?t.next=t:(t.next=e.next,e.next=t),n.pending=t))}function si(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!==(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function li(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var o=null,i=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===i?o=i=a:i=i.next=a,n=n.next}while(null!==n);null===i?o=i=t:i=i.next=t}else o=i=t;return n={baseState:r.baseState,firstBaseUpdate:o,lastBaseUpdate:i,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function ui(e,t,n,r){var o=e.updateQueue;ni=!1;var i=o.firstBaseUpdate,a=o.lastBaseUpdate,s=o.shared.pending;if(null!==s){o.shared.pending=null;var l=s,u=l.next;l.next=null,null===a?i=u:a.next=u,a=l;var c=e.alternate;null!==c&&((s=(c=c.updateQueue).lastBaseUpdate)!==a&&(null===s?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=l))}if(null!==i){var d=o.baseState;for(a=0,c=u=l=null,s=i;;){var f=s.lane,p=s.eventTime;if((r&f)===f){null!==c&&(c=c.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var h=e,m=s;switch(f=t,p=n,m.tag){case 1:if("function"===typeof(h=m.payload)){d=h.call(p,d,f);break e}d=h;break e;case 3:h.flags=-65537&h.flags|128;case 0:if(null===(f="function"===typeof(h=m.payload)?h.call(p,d,f):h)||void 0===f)break e;d=B({},d,f);break e;case 2:ni=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(f=o.effects)?o.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===c?(u=c=p,l=d):c=c.next=p,a|=f;if(null===(s=s.next)){if(null===(s=o.shared.pending))break;s=(f=s).next,f.next=null,o.lastBaseUpdate=f,o.shared.pending=null}}if(null===c&&(l=d),o.baseState=l,o.firstBaseUpdate=u,o.lastBaseUpdate=c,null!==(t=o.shared.interleaved)){o=t;do{a|=o.lane,o=o.next}while(o!==t)}else null===i&&(o.shared.lanes=0);Fl|=a,e.lanes=a,e.memoizedState=d}}function ci(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],o=r.callback;if(null!==o){if(r.callback=null,r=n,"function"!==typeof o)throw Error(i(191,o));o.call(r)}}}var di=(new r.Component).refs;function fi(e,t,n,r){n=null===(n=n(r,t=e.memoizedState))||void 0===n?t:B({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var pi={isMounted:function(e){return!!(e=e._reactInternals)&&Ue(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ql(),o=Ql(e),i=ii(r,o);i.payload=t,void 0!==n&&null!==n&&(i.callback=n),ai(e,i),null!==(t=Jl(e,o,r))&&si(t,e,o)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ql(),o=Ql(e),i=ii(r,o);i.tag=1,i.payload=t,void 0!==n&&null!==n&&(i.callback=n),ai(e,i),null!==(t=Jl(e,o,r))&&si(t,e,o)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ql(),r=Ql(e),o=ii(n,r);o.tag=2,void 0!==t&&null!==t&&(o.callback=t),ai(e,o),null!==(t=Jl(e,r,n))&&si(t,e,r)}};function hi(e,t,n,r,o,i,a){return"function"===typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,i,a):!t.prototype||!t.prototype.isPureReactComponent||(!lr(n,r)||!lr(o,i))}function mi(e,t,n){var r=!1,o=Ao,i=t.contextType;return"object"===typeof i&&null!==i?i=ei(i):(o=Fo(t)?Ro:To.current,i=(r=null!==(r=t.contextTypes)&&void 0!==r)?Oo(e,o):Ao),t=new t(n,i),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=pi,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=o,e.__reactInternalMemoizedMaskedChildContext=i),t}function vi(e,t,n,r){e=t.state,"function"===typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"===typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&pi.enqueueReplaceState(t,t.state,null)}function gi(e,t,n,r){var o=e.stateNode;o.props=n,o.state=e.memoizedState,o.refs=di,ri(e);var i=t.contextType;"object"===typeof i&&null!==i?o.context=ei(i):(i=Fo(t)?Ro:To.current,o.context=Oo(e,i)),o.state=e.memoizedState,"function"===typeof(i=t.getDerivedStateFromProps)&&(fi(e,t,i,n),o.state=e.memoizedState),"function"===typeof t.getDerivedStateFromProps||"function"===typeof o.getSnapshotBeforeUpdate||"function"!==typeof o.UNSAFE_componentWillMount&&"function"!==typeof o.componentWillMount||(t=o.state,"function"===typeof o.componentWillMount&&o.componentWillMount(),"function"===typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount(),t!==o.state&&pi.enqueueReplaceState(o,o.state,null),ui(e,n,o,r),o.state=e.memoizedState),"function"===typeof o.componentDidMount&&(e.flags|=4194308)}var yi=[],bi=0,xi=null,wi=0,ki=[],Si=0,_i=null,Ei=1,Ci="";function Pi(e,t){yi[bi++]=wi,yi[bi++]=xi,xi=e,wi=t}function Ai(e,t,n){ki[Si++]=Ei,ki[Si++]=Ci,ki[Si++]=_i,_i=e;var r=Ei;e=Ci;var o=32-at(r)-1;r&=~(1<<o),n+=1;var i=32-at(t)+o;if(30<i){var a=o-o%5;i=(r&(1<<a)-1).toString(32),r>>=a,o-=a,Ei=1<<32-at(t)+o|n<<o|r,Ci=i+e}else Ei=1<<i|n<<o|r,Ci=e}function Ti(e){null!==e.return&&(Pi(e,1),Ai(e,1,0))}function ji(e){for(;e===xi;)xi=yi[--bi],yi[bi]=null,wi=yi[--bi],yi[bi]=null;for(;e===_i;)_i=ki[--Si],ki[Si]=null,Ci=ki[--Si],ki[Si]=null,Ei=ki[--Si],ki[Si]=null}var Ri=null,Oi=null,Fi=!1,Mi=null;function Di(e,t){var n=ju(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Li(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Ri=e,Oi=uo(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Ri=e,Oi=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==_i?{id:Ei,overflow:Ci}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=ju(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Ri=e,Oi=null,!0);default:return!1}}function Bi(e){return 0!==(1&e.mode)&&0===(128&e.flags)}function Ii(e){if(Fi){var t=Oi;if(t){var n=t;if(!Li(e,t)){if(Bi(e))throw Error(i(418));t=uo(n.nextSibling);var r=Ri;t&&Li(e,t)?Di(r,n):(e.flags=-4097&e.flags|2,Fi=!1,Ri=e)}}else{if(Bi(e))throw Error(i(418));e.flags=-4097&e.flags|2,Fi=!1,Ri=e}}}function Vi(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Ri=e}function Ni(e){if(e!==Ri)return!1;if(!Fi)return Vi(e),Fi=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!no(e.type,e.memoizedProps)),t&&(t=Oi)){if(Bi(e)){for(e=Oi;e;)e=uo(e.nextSibling);throw Error(i(418))}for(;t;)Di(e,t),t=uo(t.nextSibling)}if(Vi(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(i(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Oi=uo(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Oi=null}}else Oi=Ri?uo(e.stateNode.nextSibling):null;return!0}function zi(){Oi=Ri=null,Fi=!1}function Ui(e){null===Mi?Mi=[e]:Mi.push(e)}function Gi(e,t,n){if(null!==(e=n.ref)&&"function"!==typeof e&&"object"!==typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(i(309));var r=n.stateNode}if(!r)throw Error(i(147,e));var o=r,a=""+e;return null!==t&&null!==t.ref&&"function"===typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=o.refs;t===di&&(t=o.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!==typeof e)throw Error(i(284));if(!n._owner)throw Error(i(290,e))}return e}function Wi(e,t){throw e=Object.prototype.toString.call(t),Error(i(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Zi(e){return(0,e._init)(e._payload)}function Hi(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function o(e,t){return(e=Ou(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Lu(n,e.mode,r)).return=e,t):((t=o(t,n)).return=e,t)}function u(e,t,n,r){var i=n.type;return i===S?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===i||"object"===typeof i&&null!==i&&i.$$typeof===O&&Zi(i)===t.type)?((r=o(t,n.props)).ref=Gi(e,t,n),r.return=e,r):((r=Fu(n.type,n.key,n.props,null,e.mode,r)).ref=Gi(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Bu(n,e.mode,r)).return=e,t):((t=o(t,n.children||[])).return=e,t)}function d(e,t,n,r,i){return null===t||7!==t.tag?((t=Mu(n,e.mode,r,i)).return=e,t):((t=o(t,n)).return=e,t)}function f(e,t,n){if("string"===typeof t&&""!==t||"number"===typeof t)return(t=Lu(""+t,e.mode,n)).return=e,t;if("object"===typeof t&&null!==t){switch(t.$$typeof){case w:return(n=Fu(t.type,t.key,t.props,null,e.mode,n)).ref=Gi(e,null,t),n.return=e,n;case k:return(t=Bu(t,e.mode,n)).return=e,t;case O:return f(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=Mu(t,e.mode,n,null)).return=e,t;Wi(e,t)}return null}function p(e,t,n,r){var o=null!==t?t.key:null;if("string"===typeof n&&""!==n||"number"===typeof n)return null!==o?null:l(e,t,""+n,r);if("object"===typeof n&&null!==n){switch(n.$$typeof){case w:return n.key===o?u(e,t,n,r):null;case k:return n.key===o?c(e,t,n,r):null;case O:return p(e,t,(o=n._init)(n._payload),r)}if(te(n)||D(n))return null!==o?null:d(e,t,n,r,null);Wi(e,n)}return null}function h(e,t,n,r,o){if("string"===typeof r&&""!==r||"number"===typeof r)return l(t,e=e.get(n)||null,""+r,o);if("object"===typeof r&&null!==r){switch(r.$$typeof){case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,o);case k:return c(t,e=e.get(null===r.key?n:r.key)||null,r,o);case O:return h(e,t,n,(0,r._init)(r._payload),o)}if(te(r)||D(r))return d(t,e=e.get(n)||null,r,o,null);Wi(t,r)}return null}function m(o,i,s,l){for(var u=null,c=null,d=i,m=i=0,v=null;null!==d&&m<s.length;m++){d.index>m?(v=d,d=null):v=d.sibling;var g=p(o,d,s[m],l);if(null===g){null===d&&(d=v);break}e&&d&&null===g.alternate&&t(o,d),i=a(g,i,m),null===c?u=g:c.sibling=g,c=g,d=v}if(m===s.length)return n(o,d),Fi&&Pi(o,m),u;if(null===d){for(;m<s.length;m++)null!==(d=f(o,s[m],l))&&(i=a(d,i,m),null===c?u=d:c.sibling=d,c=d);return Fi&&Pi(o,m),u}for(d=r(o,d);m<s.length;m++)null!==(v=h(d,o,m,s[m],l))&&(e&&null!==v.alternate&&d.delete(null===v.key?m:v.key),i=a(v,i,m),null===c?u=v:c.sibling=v,c=v);return e&&d.forEach((function(e){return t(o,e)})),Fi&&Pi(o,m),u}function v(o,s,l,u){var c=D(l);if("function"!==typeof c)throw Error(i(150));if(null==(l=c.call(l)))throw Error(i(151));for(var d=c=null,m=s,v=s=0,g=null,y=l.next();null!==m&&!y.done;v++,y=l.next()){m.index>v?(g=m,m=null):g=m.sibling;var b=p(o,m,y.value,u);if(null===b){null===m&&(m=g);break}e&&m&&null===b.alternate&&t(o,m),s=a(b,s,v),null===d?c=b:d.sibling=b,d=b,m=g}if(y.done)return n(o,m),Fi&&Pi(o,v),c;if(null===m){for(;!y.done;v++,y=l.next())null!==(y=f(o,y.value,u))&&(s=a(y,s,v),null===d?c=y:d.sibling=y,d=y);return Fi&&Pi(o,v),c}for(m=r(o,m);!y.done;v++,y=l.next())null!==(y=h(m,o,v,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?v:y.key),s=a(y,s,v),null===d?c=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(o,e)})),Fi&&Pi(o,v),c}return function e(r,i,a,l){if("object"===typeof a&&null!==a&&a.type===S&&null===a.key&&(a=a.props.children),"object"===typeof a&&null!==a){switch(a.$$typeof){case w:e:{for(var u=a.key,c=i;null!==c;){if(c.key===u){if((u=a.type)===S){if(7===c.tag){n(r,c.sibling),(i=o(c,a.props.children)).return=r,r=i;break e}}else if(c.elementType===u||"object"===typeof u&&null!==u&&u.$$typeof===O&&Zi(u)===c.type){n(r,c.sibling),(i=o(c,a.props)).ref=Gi(r,c,a),i.return=r,r=i;break e}n(r,c);break}t(r,c),c=c.sibling}a.type===S?((i=Mu(a.props.children,r.mode,l,a.key)).return=r,r=i):((l=Fu(a.type,a.key,a.props,null,r.mode,l)).ref=Gi(r,i,a),l.return=r,r=l)}return s(r);case k:e:{for(c=a.key;null!==i;){if(i.key===c){if(4===i.tag&&i.stateNode.containerInfo===a.containerInfo&&i.stateNode.implementation===a.implementation){n(r,i.sibling),(i=o(i,a.children||[])).return=r,r=i;break e}n(r,i);break}t(r,i),i=i.sibling}(i=Bu(a,r.mode,l)).return=r,r=i}return s(r);case O:return e(r,i,(c=a._init)(a._payload),l)}if(te(a))return m(r,i,a,l);if(D(a))return v(r,i,a,l);Wi(r,a)}return"string"===typeof a&&""!==a||"number"===typeof a?(a=""+a,null!==i&&6===i.tag?(n(r,i.sibling),(i=o(i,a)).return=r,r=i):(n(r,i),(i=Lu(a,r.mode,l)).return=r,r=i),s(r)):n(r,i)}}var $i=Hi(!0),Ki=Hi(!1),Xi={},Yi=Eo(Xi),qi=Eo(Xi),Qi=Eo(Xi);function Ji(e){if(e===Xi)throw Error(i(174));return e}function ea(e,t){switch(Po(Qi,t),Po(qi,e),Po(Yi,Xi),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Co(Yi),Po(Yi,t)}function ta(){Co(Yi),Co(qi),Co(Qi)}function na(e){Ji(Qi.current);var t=Ji(Yi.current),n=le(t,e.type);t!==n&&(Po(qi,e),Po(Yi,n))}function ra(e){qi.current===e&&(Co(Yi),Co(qi))}var oa=Eo(0);function ia(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!==(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var aa=[];function sa(){for(var e=0;e<aa.length;e++)aa[e]._workInProgressVersionPrimary=null;aa.length=0}var la=x.ReactCurrentDispatcher,ua=x.ReactCurrentBatchConfig,ca=0,da=null,fa=null,pa=null,ha=!1,ma=!1,va=0,ga=0;function ya(){throw Error(i(321))}function ba(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sr(e[n],t[n]))return!1;return!0}function xa(e,t,n,r,o,a){if(ca=a,da=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,la.current=null===e||null===e.memoizedState?rs:os,e=n(r,o),ma){a=0;do{if(ma=!1,va=0,25<=a)throw Error(i(301));a+=1,pa=fa=null,t.updateQueue=null,la.current=is,e=n(r,o)}while(ma)}if(la.current=ns,t=null!==fa&&null!==fa.next,ca=0,pa=fa=da=null,ha=!1,t)throw Error(i(300));return e}function wa(){var e=0!==va;return va=0,e}function ka(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===pa?da.memoizedState=pa=e:pa=pa.next=e,pa}function Sa(){if(null===fa){var e=da.alternate;e=null!==e?e.memoizedState:null}else e=fa.next;var t=null===pa?da.memoizedState:pa.next;if(null!==t)pa=t,fa=e;else{if(null===e)throw Error(i(310));e={memoizedState:(fa=e).memoizedState,baseState:fa.baseState,baseQueue:fa.baseQueue,queue:fa.queue,next:null},null===pa?da.memoizedState=pa=e:pa=pa.next=e}return pa}function _a(e,t){return"function"===typeof t?t(e):t}function Ea(e){var t=Sa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=fa,o=r.baseQueue,a=n.pending;if(null!==a){if(null!==o){var s=o.next;o.next=a.next,a.next=s}r.baseQueue=o=a,n.pending=null}if(null!==o){a=o.next,r=r.baseState;var l=s=null,u=null,c=a;do{var d=c.lane;if((ca&d)===d)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var f={lane:d,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=f,s=r):u=u.next=f,da.lanes|=d,Fl|=d}c=c.next}while(null!==c&&c!==a);null===u?s=r:u.next=l,sr(r,t.memoizedState)||(ws=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){o=e;do{a=o.lane,da.lanes|=a,Fl|=a,o=o.next}while(o!==e)}else null===o&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Ca(e){var t=Sa(),n=t.queue;if(null===n)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,o=n.pending,a=t.memoizedState;if(null!==o){n.pending=null;var s=o=o.next;do{a=e(a,s.action),s=s.next}while(s!==o);sr(a,t.memoizedState)||(ws=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Pa(){}function Aa(e,t){var n=da,r=Sa(),o=t(),a=!sr(r.memoizedState,o);if(a&&(r.memoizedState=o,ws=!0),r=r.queue,Va(Ra.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==pa&&1&pa.memoizedState.tag){if(n.flags|=2048,Ma(9,ja.bind(null,n,r,o,t),void 0,null),null===Cl)throw Error(i(349));0!==(30&ca)||Ta(n,t,o)}return o}function Ta(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=da.updateQueue)?(t={lastEffect:null,stores:null},da.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function ja(e,t,n,r){t.value=n,t.getSnapshot=r,Oa(t)&&Jl(e,1,-1)}function Ra(e,t,n){return n((function(){Oa(t)&&Jl(e,1,-1)}))}function Oa(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sr(e,n)}catch(r){return!0}}function Fa(e){var t=ka();return"function"===typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:_a,lastRenderedState:e},t.queue=e,e=e.dispatch=qa.bind(null,da,e),[t.memoizedState,e]}function Ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=da.updateQueue)?(t={lastEffect:null,stores:null},da.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return Sa().memoizedState}function La(e,t,n,r){var o=ka();da.flags|=e,o.memoizedState=Ma(1|t,n,void 0,void 0===r?null:r)}function Ba(e,t,n,r){var o=Sa();r=void 0===r?null:r;var i=void 0;if(null!==fa){var a=fa.memoizedState;if(i=a.destroy,null!==r&&ba(r,a.deps))return void(o.memoizedState=Ma(t,n,i,r))}da.flags|=e,o.memoizedState=Ma(1|t,n,i,r)}function Ia(e,t){return La(8390656,8,e,t)}function Va(e,t){return Ba(2048,8,e,t)}function Na(e,t){return Ba(4,2,e,t)}function za(e,t){return Ba(4,4,e,t)}function Ua(e,t){return"function"===typeof t?(e=e(),t(e),function(){t(null)}):null!==t&&void 0!==t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ga(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,Ba(4,4,Ua.bind(null,t,e),n)}function Wa(){}function Za(e,t){var n=Sa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ba(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ha(e,t){var n=Sa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ba(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $a(e,t,n){return 0===(21&ca)?(e.baseState&&(e.baseState=!1,ws=!0),e.memoizedState=n):(sr(n,t)||(n=mt(),da.lanes|=n,Fl|=n,e.baseState=!0),t)}function Ka(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=ua.transition;ua.transition={};try{e(!1),t()}finally{bt=n,ua.transition=r}}function Xa(){return Sa().memoizedState}function Ya(e,t,n){var r=Ql(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Qa(e)?Ja(t,n):(es(e,t,n),null!==(e=Jl(e,r,n=ql()))&&ts(e,t,r))}function qa(e,t,n){var r=Ql(e),o={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Qa(e))Ja(t,o);else{es(e,t,o);var i=e.alternate;if(0===e.lanes&&(null===i||0===i.lanes)&&null!==(i=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=i(a,n);if(o.hasEagerState=!0,o.eagerState=s,sr(s,a))return}catch(l){}null!==(e=Jl(e,r,n=ql()))&&ts(e,t,r)}}function Qa(e){var t=e.alternate;return e===da||null!==t&&t===da}function Ja(e,t){ma=ha=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function es(e,t,n){tu(e)?(null===(e=t.interleaved)?(n.next=n,null===ti?ti=[t]:ti.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function ts(e,t,n){if(0!==(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var ns={readContext:ei,useCallback:ya,useContext:ya,useEffect:ya,useImperativeHandle:ya,useInsertionEffect:ya,useLayoutEffect:ya,useMemo:ya,useReducer:ya,useRef:ya,useState:ya,useDebugValue:ya,useDeferredValue:ya,useTransition:ya,useMutableSource:ya,useSyncExternalStore:ya,useId:ya,unstable_isNewReconciler:!1},rs={readContext:ei,useCallback:function(e,t){return ka().memoizedState=[e,void 0===t?null:t],e},useContext:ei,useEffect:Ia,useImperativeHandle:function(e,t,n){return n=null!==n&&void 0!==n?n.concat([e]):null,La(4194308,4,Ua.bind(null,t,e),n)},useLayoutEffect:function(e,t){return La(4194308,4,e,t)},useInsertionEffect:function(e,t){return La(4,2,e,t)},useMemo:function(e,t){var n=ka();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ka();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ya.bind(null,da,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ka().memoizedState=e},useState:Fa,useDebugValue:Wa,useDeferredValue:function(e){return ka().memoizedState=e},useTransition:function(){var e=Fa(!1),t=e[0];return e=Ka.bind(null,e[1]),ka().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=da,o=ka();if(Fi){if(void 0===n)throw Error(i(407));n=n()}else{if(n=t(),null===Cl)throw Error(i(349));0!==(30&ca)||Ta(r,t,n)}o.memoizedState=n;var a={value:n,getSnapshot:t};return o.queue=a,Ia(Ra.bind(null,r,a,e),[e]),r.flags|=2048,Ma(9,ja.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ka(),t=Cl.identifierPrefix;if(Fi){var n=Ci;t=":"+t+"R"+(n=(Ei&~(1<<32-at(Ei)-1)).toString(32)+n),0<(n=va++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=ga++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},os={readContext:ei,useCallback:Za,useContext:ei,useEffect:Va,useImperativeHandle:Ga,useInsertionEffect:Na,useLayoutEffect:za,useMemo:Ha,useReducer:Ea,useRef:Da,useState:function(){return Ea(_a)},useDebugValue:Wa,useDeferredValue:function(e){return $a(Sa(),fa.memoizedState,e)},useTransition:function(){return[Ea(_a)[0],Sa().memoizedState]},useMutableSource:Pa,useSyncExternalStore:Aa,useId:Xa,unstable_isNewReconciler:!1},is={readContext:ei,useCallback:Za,useContext:ei,useEffect:Va,useImperativeHandle:Ga,useInsertionEffect:Na,useLayoutEffect:za,useMemo:Ha,useReducer:Ca,useRef:Da,useState:function(){return Ca(_a)},useDebugValue:Wa,useDeferredValue:function(e){var t=Sa();return null===fa?t.memoizedState=e:$a(t,fa.memoizedState,e)},useTransition:function(){return[Ca(_a)[0],Sa().memoizedState]},useMutableSource:Pa,useSyncExternalStore:Aa,useId:Xa,unstable_isNewReconciler:!1};function as(e,t){try{var n="",r=t;do{n+=z(r),r=r.return}while(r);var o=n}catch(i){o="\nError generating stack: "+i.message+"\n"+i.stack}return{value:e,source:t,stack:o}}function ss(e,t){try{console.error(t.value)}catch(n){setTimeout((function(){throw n}))}}var ls,us,cs,ds="function"===typeof WeakMap?WeakMap:Map;function fs(e,t,n){(n=ii(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){zl||(zl=!0,Ul=r),ss(0,t)},n}function ps(e,t,n){(n=ii(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"===typeof r){var o=t.value;n.payload=function(){return r(o)},n.callback=function(){ss(0,t)}}var i=e.stateNode;return null!==i&&"function"===typeof i.componentDidCatch&&(n.callback=function(){ss(0,t),"function"!==typeof r&&(null===Gl?Gl=new Set([this]):Gl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function hs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new ds;var o=new Set;r.set(t,o)}else void 0===(o=r.get(t))&&(o=new Set,r.set(t,o));o.has(n)||(o.add(n),e=_u.bind(null,e,t,n),t.then(e,e))}function ms(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function vs(e,t,n,r,o){return 0===(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=ii(-1,1)).tag=2,ai(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=o,e)}function gs(e,t){if(!Fi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ys(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=14680064&o.subtreeFlags,r|=14680064&o.flags,o.return=e,o=o.sibling;else for(o=e.child;null!==o;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function bs(e,t,n){var r=t.pendingProps;switch(ji(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ys(t),null;case 1:case 17:return Fo(t.type)&&Mo(),ys(t),null;case 3:return r=t.stateNode,ta(),Co(jo),Co(To),sa(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Ni(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0===(256&t.flags)||(t.flags|=1024,null!==Mi&&(iu(Mi),Mi=null))),ys(t),null;case 5:ra(t);var o=Ji(Qi.current);if(n=t.type,null!==e&&null!=t.stateNode)us(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(i(166));return ys(t),null}if(e=Ji(Yi.current),Ni(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[po]=t,r[ho]=a,e=0!==(1&t.mode),n){case"dialog":Vr("cancel",r),Vr("close",r);break;case"iframe":case"object":case"embed":Vr("load",r);break;case"video":case"audio":for(o=0;o<Dr.length;o++)Vr(Dr[o],r);break;case"source":Vr("error",r);break;case"img":case"image":case"link":Vr("error",r),Vr("load",r);break;case"details":Vr("toggle",r);break;case"input":Y(r,a),Vr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Vr("invalid",r);break;case"textarea":oe(r,a),Vr("invalid",r)}for(var l in ye(n,a),o=null,a)if(a.hasOwnProperty(l)){var u=a[l];"children"===l?"string"===typeof u?r.textContent!==u&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,u,e),o=["children",u]):"number"===typeof u&&r.textContent!==""+u&&(!0!==a.suppressHydrationWarning&&Qr(r.textContent,u,e),o=["children",""+u]):s.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&Vr("scroll",r)}switch(n){case"input":H(r),J(r,a,!0);break;case"textarea":H(r),ae(r);break;case"select":case"option":break;default:"function"===typeof a.onClick&&(r.onclick=Jr)}r=o,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===o.nodeType?o:o.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"===typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[po]=t,e[ho]=r,ls(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Vr("cancel",e),Vr("close",e),o=r;break;case"iframe":case"object":case"embed":Vr("load",e),o=r;break;case"video":case"audio":for(o=0;o<Dr.length;o++)Vr(Dr[o],e);o=r;break;case"source":Vr("error",e),o=r;break;case"img":case"image":case"link":Vr("error",e),Vr("load",e),o=r;break;case"details":Vr("toggle",e),o=r;break;case"input":Y(e,r),o=X(e,r),Vr("invalid",e);break;case"option":default:o=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},o=B({},r,{value:void 0}),Vr("invalid",e);break;case"textarea":oe(e,r),o=re(e,r),Vr("invalid",e)}for(a in ye(n,o),u=o)if(u.hasOwnProperty(a)){var c=u[a];"style"===a?ve(e,c):"dangerouslySetInnerHTML"===a?null!=(c=c?c.__html:void 0)&&de(e,c):"children"===a?"string"===typeof c?("textarea"!==n||""!==c)&&fe(e,c):"number"===typeof c&&fe(e,""+c):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=c&&"onScroll"===a&&Vr("scroll",e):null!=c&&b(e,a,c,l))}switch(n){case"input":H(e),J(e,r,!1);break;case"textarea":H(e),ae(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?ne(e,!!r.multiple,a,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"===typeof o.onClick&&(e.onclick=Jr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return ys(t),null;case 6:if(e&&null!=t.stateNode)cs(0,t,e.memoizedProps,r);else{if("string"!==typeof r&&null===t.stateNode)throw Error(i(166));if(n=Ji(Qi.current),Ji(Yi.current),Ni(t)){if(r=t.stateNode,n=t.memoizedProps,r[po]=t,(a=r.nodeValue!==n)&&null!==(e=Ri))switch(e.tag){case 3:Qr(r.nodeValue,n,0!==(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Qr(r.nodeValue,n,0!==(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[po]=t,t.stateNode=r}return ys(t),null;case 13:if(Co(oa),r=t.memoizedState,Fi&&null!==Oi&&0!==(1&t.mode)&&0===(128&t.flags)){for(r=Oi;r;)r=uo(r.nextSibling);return zi(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Ni(t),null===e){if(!r)throw Error(i(318));if(!(r=null!==(r=t.memoizedState)?r.dehydrated:null))throw Error(i(317));r[po]=t}else zi(),0===(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return ys(t),null}return null!==Mi&&(iu(Mi),Mi=null),0!==(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Ni(t):n=null!==e.memoizedState,r!==n&&r&&(t.child.flags|=8192,0!==(1&t.mode)&&(null===e||0!==(1&oa.current)?0===Rl&&(Rl=3):hu())),null!==t.updateQueue&&(t.flags|=4),ys(t),null);case 4:return ta(),null===e&&Ur(t.stateNode.containerInfo),ys(t),null;case 10:return qo(t.type._context),ys(t),null;case 19:if(Co(oa),null===(a=t.memoizedState))return ys(t),null;if(r=0!==(128&t.flags),null===(l=a.rendering))if(r)gs(a,!1);else{if(0!==Rl||null!==e&&0!==(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ia(e))){for(t.flags|=128,gs(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Po(oa,1&oa.current|2),t.child}e=e.sibling}null!==a.tail&&qe()>Vl&&(t.flags|=128,r=!0,gs(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ia(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),gs(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!Fi)return ys(t),null}else 2*qe()-a.renderingStartTime>Vl&&1073741824!==n&&(t.flags|=128,r=!0,gs(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=qe(),t.sibling=null,n=oa.current,Po(oa,r?1&n|2:1&n),t):(ys(t),null);case 22:case 23:return cu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!==(1&t.mode)?0!==(1073741824&Tl)&&(ys(t),6&t.subtreeFlags&&(t.flags|=8192)):ys(t),null;case 24:case 25:return null}throw Error(i(156,t.tag))}ls=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},us=function(e,t,n,r){var o=e.memoizedProps;if(o!==r){e=t.stateNode,Ji(Yi.current);var i,a=null;switch(n){case"input":o=X(e,o),r=X(e,r),a=[];break;case"select":o=B({},o,{value:void 0}),r=B({},r,{value:void 0}),a=[];break;case"textarea":o=re(e,o),r=re(e,r),a=[];break;default:"function"!==typeof o.onClick&&"function"===typeof r.onClick&&(e.onclick=Jr)}for(c in ye(n,r),n=null,o)if(!r.hasOwnProperty(c)&&o.hasOwnProperty(c)&&null!=o[c])if("style"===c){var l=o[c];for(i in l)l.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(s.hasOwnProperty(c)?a||(a=[]):(a=a||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=o?o[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(i in l)!l.hasOwnProperty(i)||u&&u.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in u)u.hasOwnProperty(i)&&l[i]!==u[i]&&(n||(n={}),n[i]=u[i])}else n||(a||(a=[]),a.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(a=a||[]).push(c,u)):"children"===c?"string"!==typeof u&&"number"!==typeof u||(a=a||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(s.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&Vr("scroll",e),a||l===u||(a=[])):(a=a||[]).push(c,u))}n&&(a=a||[]).push("style",n);var c=a;(t.updateQueue=c)&&(t.flags|=4)}},cs=function(e,t,n,r){n!==r&&(t.flags|=4)};var xs=x.ReactCurrentOwner,ws=!1;function ks(e,t,n,r){t.child=null===e?Ki(t,null,n,r):$i(t,e.child,n,r)}function Ss(e,t,n,r,o){n=n.render;var i=t.ref;return Jo(t,o),r=xa(e,t,n,r,i,o),n=wa(),null===e||ws?(Fi&&n&&Ti(t),t.flags|=1,ks(e,t,r,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function _s(e,t,n,r,o){if(null===e){var i=n.type;return"function"!==typeof i||Ru(i)||void 0!==i.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Fu(n.type,null,r,t,t.mode,o)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=i,Es(e,t,i,r,o))}if(i=e.child,0===(e.lanes&o)){var a=i.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(a,r)&&e.ref===t.ref)return Ws(e,t,o)}return t.flags|=1,(e=Ou(i,r)).ref=t.ref,e.return=t,t.child=e}function Es(e,t,n,r,o){if(null!==e){var i=e.memoizedProps;if(lr(i,r)&&e.ref===t.ref){if(ws=!1,t.pendingProps=r=i,0===(e.lanes&o))return t.lanes=e.lanes,Ws(e,t,o);0!==(131072&e.flags)&&(ws=!0)}}return As(e,t,n,r,o)}function Cs(e,t,n){var r=t.pendingProps,o=r.children,i=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0===(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Po(jl,Tl),Tl|=n;else{if(0===(1073741824&n))return e=null!==i?i.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Po(jl,Tl),Tl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==i?i.baseLanes:n,Po(jl,Tl),Tl|=r}else null!==i?(r=i.baseLanes|n,t.memoizedState=null):r=n,Po(jl,Tl),Tl|=r;return ks(e,t,o,n),t.child}function Ps(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function As(e,t,n,r,o){var i=Fo(n)?Ro:To.current;return i=Oo(t,i),Jo(t,o),n=xa(e,t,n,r,i,o),r=wa(),null===e||ws?(Fi&&r&&Ti(t),t.flags|=1,ks(e,t,n,o),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~o,Ws(e,t,o))}function Ts(e,t,n,r,o){if(Fo(n)){var i=!0;Bo(t)}else i=!1;if(Jo(t,o),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),mi(t,n,r),gi(t,n,r,o),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,u=n.contextType;"object"===typeof u&&null!==u?u=ei(u):u=Oo(t,u=Fo(n)?Ro:To.current);var c=n.getDerivedStateFromProps,d="function"===typeof c||"function"===typeof a.getSnapshotBeforeUpdate;d||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==r||l!==u)&&vi(t,a,r,u),ni=!1;var f=t.memoizedState;a.state=f,ui(t,r,a,o),l=t.memoizedState,s!==r||f!==l||jo.current||ni?("function"===typeof c&&(fi(t,n,c,r),l=t.memoizedState),(s=ni||hi(t,n,s,r,f,l,u))?(d||"function"!==typeof a.UNSAFE_componentWillMount&&"function"!==typeof a.componentWillMount||("function"===typeof a.componentWillMount&&a.componentWillMount(),"function"===typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"===typeof a.componentDidMount&&(t.flags|=4194308)):("function"===typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=u,r=s):("function"===typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,oi(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Zo(t.type,s),a.props=u,d=t.pendingProps,f=a.context,"object"===typeof(l=n.contextType)&&null!==l?l=ei(l):l=Oo(t,l=Fo(n)?Ro:To.current);var p=n.getDerivedStateFromProps;(c="function"===typeof p||"function"===typeof a.getSnapshotBeforeUpdate)||"function"!==typeof a.UNSAFE_componentWillReceiveProps&&"function"!==typeof a.componentWillReceiveProps||(s!==d||f!==l)&&vi(t,a,r,l),ni=!1,f=t.memoizedState,a.state=f,ui(t,r,a,o);var h=t.memoizedState;s!==d||f!==h||jo.current||ni?("function"===typeof p&&(fi(t,n,p,r),h=t.memoizedState),(u=ni||hi(t,n,u,r,f,h,l)||!1)?(c||"function"!==typeof a.UNSAFE_componentWillUpdate&&"function"!==typeof a.componentWillUpdate||("function"===typeof a.componentWillUpdate&&a.componentWillUpdate(r,h,l),"function"===typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,h,l)),"function"===typeof a.componentDidUpdate&&(t.flags|=4),"function"===typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=h),a.props=r,a.state=h,a.context=l,r=u):("function"!==typeof a.componentDidUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),"function"!==typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return js(e,t,n,r,i,o)}function js(e,t,n,r,o,i){Ps(e,t);var a=0!==(128&t.flags);if(!r&&!a)return o&&Io(t,n,!1),Ws(e,t,i);r=t.stateNode,xs.current=t;var s=a&&"function"!==typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=$i(t,e.child,null,i),t.child=$i(t,null,s,i)):ks(e,t,s,i),t.memoizedState=r.state,o&&Io(t,n,!0),t.child}function Rs(e){var t=e.stateNode;t.pendingContext?Do(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Do(0,t.context,!1),ea(e,t.containerInfo)}function Os(e,t,n,r,o){return zi(),Ui(o),t.flags|=256,ks(e,t,n,r),t.child}var Fs={dehydrated:null,treeContext:null,retryLane:0};function Ms(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ds(e,t){return{baseLanes:e.baseLanes|t,cachePool:null,transitions:e.transitions}}function Ls(e,t,n){var r,o=t.pendingProps,a=oa.current,s=!1,l=0!==(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!==(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),Po(oa,1&a),null===e)return Ii(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0===(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(a=o.children,e=o.fallback,s?(o=t.mode,s=t.child,a={mode:"hidden",children:a},0===(1&o)&&null!==s?(s.childLanes=0,s.pendingProps=a):s=Du(a,o,0,null),e=Mu(e,o,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Ms(n),t.memoizedState=Fs,e):Bs(t,a));if(null!==(a=e.memoizedState)){if(null!==(r=a.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,Ns(e,t,n,Error(i(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=o.fallback,a=t.mode,o=Du({mode:"visible",children:o.children},a,0,null),(s=Mu(s,a,n,null)).flags|=2,o.return=t,s.return=t,o.sibling=s,t.child=o,0!==(1&t.mode)&&$i(t,e.child,null,n),t.child.memoizedState=Ms(n),t.memoizedState=Fs,s);if(0===(1&t.mode))t=Ns(e,t,n,null);else if("$!"===r.data)t=Ns(e,t,n,Error(i(419)));else if(o=0!==(n&e.childLanes),ws||o){if(null!==(o=Cl)){switch(n&-n){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(o=0!==(s&(o.suspendedLanes|n))?0:s)&&o!==a.retryLane&&(a.retryLane=o,Jl(e,o,-1))}hu(),t=Ns(e,t,n,Error(i(421)))}else"$?"===r.data?(t.flags|=128,t.child=e.child,t=Cu.bind(null,e),r._reactRetry=t,t=null):(n=a.treeContext,Oi=uo(r.nextSibling),Ri=t,Fi=!0,Mi=null,null!==n&&(ki[Si++]=Ei,ki[Si++]=Ci,ki[Si++]=_i,Ei=n.id,Ci=n.overflow,_i=t),(t=Bs(t,t.pendingProps.children)).flags|=4096);return t}return s?(o=Vs(e,t,o.children,o.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?Ms(n):Ds(a,n),s.childLanes=e.childLanes&~n,t.memoizedState=Fs,o):(n=Is(e,t,o.children,n),t.memoizedState=null,n)}return s?(o=Vs(e,t,o.children,o.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?Ms(n):Ds(a,n),s.childLanes=e.childLanes&~n,t.memoizedState=Fs,o):(n=Is(e,t,o.children,n),t.memoizedState=null,n)}function Bs(e,t){return(t=Du({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Is(e,t,n,r){var o=e.child;return e=o.sibling,n=Ou(o,{mode:"visible",children:n}),0===(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Vs(e,t,n,r,o){var i=t.mode,a=(e=e.child).sibling,s={mode:"hidden",children:n};return 0===(1&i)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=s,t.deletions=null):(n=Ou(e,s)).subtreeFlags=14680064&e.subtreeFlags,null!==a?r=Ou(a,r):(r=Mu(r,i,o,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function Ns(e,t,n,r){return null!==r&&Ui(r),$i(t,e.child,null,n),(e=Bs(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Qo(e.return,t,n)}function Us(e,t,n,r,o){var i=e.memoizedState;null===i?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:o}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=r,i.tail=n,i.tailMode=o)}function Gs(e,t,n){var r=t.pendingProps,o=r.revealOrder,i=r.tail;if(ks(e,t,r.children,n),0!==(2&(r=oa.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!==(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&zs(e,n,t);else if(19===e.tag)zs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Po(oa,r),0===(1&t.mode))t.memoizedState=null;else switch(o){case"forwards":for(n=t.child,o=null;null!==n;)null!==(e=n.alternate)&&null===ia(e)&&(o=n),n=n.sibling;null===(n=o)?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),Us(t,!1,o,n,i);break;case"backwards":for(n=null,o=t.child,t.child=null;null!==o;){if(null!==(e=o.alternate)&&null===ia(e)){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}Us(t,!0,n,null,i);break;case"together":Us(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Ws(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fl|=t.lanes,0===(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(i(153));if(null!==t.child){for(n=Ou(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ou(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Zs(e,t){switch(ji(t),t.tag){case 1:return Fo(t.type)&&Mo(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return ta(),Co(jo),Co(To),sa(),0!==(65536&(e=t.flags))&&0===(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ra(t),null;case 13:if(Co(oa),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(i(340));zi()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Co(oa),null;case 4:return ta(),null;case 10:return qo(t.type._context),null;case 22:case 23:return cu(),null;default:return null}}var Hs=!1,$s=!1,Ks="function"===typeof WeakSet?WeakSet:Set,Xs=null;function Ys(e,t){var n=e.ref;if(null!==n)if("function"===typeof n)try{n(null)}catch(r){Su(e,t,r)}else n.current=null}function qs(e,t,n){try{n()}catch(r){Su(e,t,r)}}var Qs=!1;function Js(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var o=r=r.next;do{if((o.tag&e)===e){var i=o.destroy;o.destroy=void 0,void 0!==i&&qs(t,n,i)}o=o.next}while(o!==r)}}function el(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"===typeof t?t(e):t.current=e}}function nl(e){var t=e.alternate;null!==t&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[po],delete t[ho],delete t[vo],delete t[go],delete t[yo])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rl(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function il(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=Jr));else if(4!==r&&null!==(e=e.child))for(il(e,t,n),e=e.sibling;null!==e;)il(e,t,n),e=e.sibling}function al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(al(e,t,n),e=e.sibling;null!==e;)al(e,t,n),e=e.sibling}var sl=null,ll=!1;function ul(e,t,n){for(n=n.child;null!==n;)cl(e,t,n),n=n.sibling}function cl(e,t,n){if(it&&"function"===typeof it.onCommitFiberUnmount)try{it.onCommitFiberUnmount(ot,n)}catch(s){}switch(n.tag){case 5:$s||Ys(n,t);case 6:var r=sl,o=ll;sl=null,ul(e,t,n),ll=o,null!==(sl=r)&&(ll?(e=sl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):sl.removeChild(n.stateNode));break;case 18:null!==sl&&(ll?(e=sl,n=n.stateNode,8===e.nodeType?lo(e.parentNode,n):1===e.nodeType&&lo(e,n),Ut(e)):lo(sl,n.stateNode));break;case 4:r=sl,o=ll,sl=n.stateNode.containerInfo,ll=!0,ul(e,t,n),sl=r,ll=o;break;case 0:case 11:case 14:case 15:if(!$s&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){o=r=r.next;do{var i=o,a=i.destroy;i=i.tag,void 0!==a&&(0!==(2&i)||0!==(4&i))&&qs(n,t,a),o=o.next}while(o!==r)}ul(e,t,n);break;case 1:if(!$s&&(Ys(n,t),"function"===typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(s){Su(n,t,s)}ul(e,t,n);break;case 21:ul(e,t,n);break;case 22:1&n.mode?($s=(r=$s)||null!==n.memoizedState,ul(e,t,n),$s=r):ul(e,t,n);break;default:ul(e,t,n)}}function dl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ks),t.forEach((function(t){var r=Pu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function fl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var o=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:sl=l.stateNode,ll=!1;break e;case 3:case 4:sl=l.stateNode.containerInfo,ll=!0;break e}l=l.return}if(null===sl)throw Error(i(160));cl(a,s,o),sl=null,ll=!1;var u=o.alternate;null!==u&&(u.return=null),o.return=null}catch(c){Su(o,t,c)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)pl(t,e),t=t.sibling}function pl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(fl(t,e),hl(e),4&r){try{Js(3,e,e.return),el(3,e)}catch(m){Su(e,e.return,m)}try{Js(5,e,e.return)}catch(m){Su(e,e.return,m)}}break;case 1:fl(t,e),hl(e),512&r&&null!==n&&Ys(n,n.return);break;case 5:if(fl(t,e),hl(e),512&r&&null!==n&&Ys(n,n.return),32&e.flags){var o=e.stateNode;try{fe(o,"")}catch(m){Su(e,e.return,m)}}if(4&r&&null!=(o=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===a.type&&null!=a.name&&q(o,a),be(l,s);var c=be(l,a);for(s=0;s<u.length;s+=2){var d=u[s],f=u[s+1];"style"===d?ve(o,f):"dangerouslySetInnerHTML"===d?de(o,f):"children"===d?fe(o,f):b(o,d,f,c)}switch(l){case"input":Q(o,a);break;case"textarea":ie(o,a);break;case"select":var p=o._wrapperState.wasMultiple;o._wrapperState.wasMultiple=!!a.multiple;var h=a.value;null!=h?ne(o,!!a.multiple,h,!1):p!==!!a.multiple&&(null!=a.defaultValue?ne(o,!!a.multiple,a.defaultValue,!0):ne(o,!!a.multiple,a.multiple?[]:"",!1))}o[ho]=a}catch(m){Su(e,e.return,m)}}break;case 6:if(fl(t,e),hl(e),4&r){if(null===e.stateNode)throw Error(i(162));c=e.stateNode,d=e.memoizedProps;try{c.nodeValue=d}catch(m){Su(e,e.return,m)}}break;case 3:if(fl(t,e),hl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ut(t.containerInfo)}catch(m){Su(e,e.return,m)}break;case 4:default:fl(t,e),hl(e);break;case 13:fl(t,e),hl(e),8192&(c=e.child).flags&&null!==c.memoizedState&&(null===c.alternate||null===c.alternate.memoizedState)&&(Il=qe()),4&r&&dl(e);break;case 22:if(c=null!==n&&null!==n.memoizedState,1&e.mode?($s=(d=$s)||c,fl(t,e),$s=d):fl(t,e),hl(e),8192&r){d=null!==e.memoizedState;e:for(f=null,p=e;;){if(5===p.tag){if(null===f){f=p;try{o=p.stateNode,d?"function"===typeof(a=o.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=p.stateNode,s=void 0!==(u=p.memoizedProps.style)&&null!==u&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",s))}catch(m){Su(e,e.return,m)}}}else if(6===p.tag){if(null===f)try{p.stateNode.nodeValue=d?"":p.memoizedProps}catch(m){Su(e,e.return,m)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===e)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===e)break e;for(;null===p.sibling;){if(null===p.return||p.return===e)break e;f===p&&(f=null),p=p.return}f===p&&(f=null),p.sibling.return=p.return,p=p.sibling}if(d&&!c&&0!==(1&e.mode))for(Xs=e,e=e.child;null!==e;){for(c=Xs=e;null!==Xs;){switch(f=(d=Xs).child,d.tag){case 0:case 11:case 14:case 15:Js(4,d,d.return);break;case 1:if(Ys(d,d.return),"function"===typeof(a=d.stateNode).componentWillUnmount){p=d,h=d.return;try{o=p,a.props=o.memoizedProps,a.state=o.memoizedState,a.componentWillUnmount()}catch(m){Su(p,h,m)}}break;case 5:Ys(d,d.return);break;case 22:if(null!==d.memoizedState){yl(c);continue}}null!==f?(f.return=d,Xs=f):yl(c)}e=e.sibling}}break;case 19:fl(t,e),hl(e),4&r&&dl(e);case 21:}}function hl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(rl(n)){var r=n;break e}n=n.return}throw Error(i(160))}switch(r.tag){case 5:var o=r.stateNode;32&r.flags&&(fe(o,""),r.flags&=-33),al(e,ol(e),o);break;case 3:case 4:var a=r.stateNode.containerInfo;il(e,ol(e),a);break;default:throw Error(i(161))}}catch(s){Su(e,e.return,s)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ml(e,t,n){Xs=e,vl(e,t,n)}function vl(e,t,n){for(var r=0!==(1&e.mode);null!==Xs;){var o=Xs,i=o.child;if(22===o.tag&&r){var a=null!==o.memoizedState||Hs;if(!a){var s=o.alternate,l=null!==s&&null!==s.memoizedState||$s;s=Hs;var u=$s;if(Hs=a,($s=l)&&!u)for(Xs=o;null!==Xs;)l=(a=Xs).child,22===a.tag&&null!==a.memoizedState?bl(o):null!==l?(l.return=a,Xs=l):bl(o);for(;null!==i;)Xs=i,vl(i,t,n),i=i.sibling;Xs=o,Hs=s,$s=u}gl(e)}else 0!==(8772&o.subtreeFlags)&&null!==i?(i.return=o,Xs=i):gl(e)}}function gl(e){for(;null!==Xs;){var t=Xs;if(0!==(8772&t.flags)){var n=t.alternate;try{if(0!==(8772&t.flags))switch(t.tag){case 0:case 11:case 15:$s||el(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!$s)if(null===n)r.componentDidMount();else{var o=t.elementType===t.type?n.memoizedProps:Zo(t.type,n.memoizedProps);r.componentDidUpdate(o,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&ci(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}ci(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var d=c.memoizedState;if(null!==d){var f=d.dehydrated;null!==f&&Ut(f)}}}break;default:throw Error(i(163))}$s||512&t.flags&&tl(t)}catch(p){Su(t,t.return,p)}}if(t===e){Xs=null;break}if(null!==(n=t.sibling)){n.return=t.return,Xs=n;break}Xs=t.return}}function yl(e){for(;null!==Xs;){var t=Xs;if(t===e){Xs=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Xs=n;break}Xs=t.return}}function bl(e){for(;null!==Xs;){var t=Xs;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{el(4,t)}catch(l){Su(t,n,l)}break;case 1:var r=t.stateNode;if("function"===typeof r.componentDidMount){var o=t.return;try{r.componentDidMount()}catch(l){Su(t,o,l)}}var i=t.return;try{tl(t)}catch(l){Su(t,i,l)}break;case 5:var a=t.return;try{tl(t)}catch(l){Su(t,a,l)}}}catch(l){Su(t,t.return,l)}if(t===e){Xs=null;break}var s=t.sibling;if(null!==s){s.return=t.return,Xs=s;break}Xs=t.return}}var xl,wl=Math.ceil,kl=x.ReactCurrentDispatcher,Sl=x.ReactCurrentOwner,_l=x.ReactCurrentBatchConfig,El=0,Cl=null,Pl=null,Al=0,Tl=0,jl=Eo(0),Rl=0,Ol=null,Fl=0,Ml=0,Dl=0,Ll=null,Bl=null,Il=0,Vl=1/0,Nl=null,zl=!1,Ul=null,Gl=null,Wl=!1,Zl=null,Hl=0,$l=0,Kl=null,Xl=-1,Yl=0;function ql(){return 0!==(6&El)?qe():-1!==Xl?Xl:Xl=qe()}function Ql(e){return 0===(1&e.mode)?1:0!==(2&El)&&0!==Al?Al&-Al:null!==Wo.transition?(0===Yl&&(Yl=mt()),Yl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function Jl(e,t,n){if(50<$l)throw $l=0,Kl=null,Error(i(185));var r=eu(e,t);return null===r?null:(gt(r,t,n),0!==(2&El)&&r===Cl||(r===Cl&&(0===(2&El)&&(Ml|=t),4===Rl&&au(r,Al)),nu(r,n),1===t&&0===El&&0===(1&e.mode)&&(Vl=qe()+500,No&&Go())),r)}function eu(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function tu(e){return(null!==Cl||null!==ti)&&0!==(1&e.mode)&&0===(2&El)}function nu(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,o=e.expirationTimes,i=e.pendingLanes;0<i;){var a=31-at(i),s=1<<a,l=o[a];-1===l?0!==(s&n)&&0===(s&r)||(o[a]=pt(s,t)):l<=t&&(e.expiredLanes|=s),i&=~s}}(e,t);var r=ft(e,e===Cl?Al:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){No=!0,Uo(e)}(su.bind(null,e)):Uo(su.bind(null,e)),ao((function(){0===El&&Go()})),n=null;else{switch(xt(r)){case 1:n=Je;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Au(n,ru.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ru(e,t){if(Xl=-1,Yl=0,0!==(6&El))throw Error(i(327));var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=ft(e,e===Cl?Al:0);if(0===r)return null;if(0!==(30&r)||0!==(r&e.expiredLanes)||t)t=mu(e,r);else{t=r;var o=El;El|=2;var a=pu();for(Cl===e&&Al===t||(Nl=null,Vl=qe()+500,du(e,t));;)try{gu();break}catch(l){fu(e,l)}Yo(),kl.current=a,El=o,null!==Pl?t=0:(Cl=null,Al=0,t=Rl)}if(0!==t){if(2===t&&(0!==(o=ht(e))&&(r=o,t=ou(e,o))),1===t)throw n=Ol,du(e,0),au(e,r),nu(e,qe()),n;if(6===t)au(e,r);else{if(o=e.current.alternate,0===(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var o=n[r],i=o.getSnapshot;o=o.value;try{if(!sr(i(),o))return!1}catch(s){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(o)&&(2===(t=mu(e,r))&&(0!==(a=ht(e))&&(r=a,t=ou(e,a))),1===t))throw n=Ol,du(e,0),au(e,r),nu(e,qe()),n;switch(e.finishedWork=o,e.finishedLanes=r,t){case 0:case 1:throw Error(i(345));case 2:case 5:xu(e,Bl,Nl);break;case 3:if(au(e,r),(130023424&r)===r&&10<(t=Il+500-qe())){if(0!==ft(e,0))break;if(((o=e.suspendedLanes)&r)!==r){ql(),e.pingedLanes|=e.suspendedLanes&o;break}e.timeoutHandle=ro(xu.bind(null,e,Bl,Nl),t);break}xu(e,Bl,Nl);break;case 4:if(au(e,r),(4194240&r)===r)break;for(t=e.eventTimes,o=-1;0<r;){var s=31-at(r);a=1<<s,(s=t[s])>o&&(o=s),r&=~a}if(r=o,10<(r=(120>(r=qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*wl(r/1960))-r)){e.timeoutHandle=ro(xu.bind(null,e,Bl,Nl),r);break}xu(e,Bl,Nl);break;default:throw Error(i(329))}}}return nu(e,qe()),e.callbackNode===n?ru.bind(null,e):null}function ou(e,t){var n=Ll;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=mu(e,t))&&(t=Bl,Bl=n,null!==t&&iu(t)),e}function iu(e){null===Bl?Bl=e:Bl.push.apply(Bl,e)}function au(e,t){for(t&=~Dl,t&=~Ml,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-at(t),r=1<<n;e[n]=-1,t&=~r}}function su(e){if(0!==(6&El))throw Error(i(327));wu();var t=ft(e,0);if(0===(1&t))return nu(e,qe()),null;var n=mu(e,t);if(0!==e.tag&&2===n){var r=ht(e);0!==r&&(t=r,n=ou(e,r))}if(1===n)throw n=Ol,du(e,0),au(e,t),nu(e,qe()),n;if(6===n)throw Error(i(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,xu(e,Bl,Nl),nu(e,qe()),null}function lu(e,t){var n=El;El|=1;try{return e(t)}finally{0===(El=n)&&(Vl=qe()+500,No&&Go())}}function uu(e){null!==Zl&&0===Zl.tag&&0===(6&El)&&wu();var t=El;El|=1;var n=_l.transition,r=bt;try{if(_l.transition=null,bt=1,e)return e()}finally{bt=r,_l.transition=n,0===(6&(El=t))&&Go()}}function cu(){Tl=jl.current,Co(jl)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,oo(n)),null!==Pl)for(n=Pl.return;null!==n;){var r=n;switch(ji(r),r.tag){case 1:null!==(r=r.type.childContextTypes)&&void 0!==r&&Mo();break;case 3:ta(),Co(jo),Co(To),sa();break;case 5:ra(r);break;case 4:ta();break;case 13:case 19:Co(oa);break;case 10:qo(r.type._context);break;case 22:case 23:cu()}n=n.return}if(Cl=e,Pl=e=Ou(e.current,null),Al=Tl=t,Rl=0,Ol=null,Dl=Ml=Fl=0,Bl=Ll=null,null!==ti){for(t=0;t<ti.length;t++)if(null!==(r=(n=ti[t]).interleaved)){n.interleaved=null;var o=r.next,i=n.pending;if(null!==i){var a=i.next;i.next=o,r.next=a}n.pending=r}ti=null}return e}function fu(e,t){for(;;){var n=Pl;try{if(Yo(),la.current=ns,ha){for(var r=da.memoizedState;null!==r;){var o=r.queue;null!==o&&(o.pending=null),r=r.next}ha=!1}if(ca=0,pa=fa=da=null,ma=!1,va=0,Sl.current=null,null===n||null===n.return){Rl=1,Ol=t,Pl=null;break}e:{var a=e,s=n.return,l=n,u=t;if(t=Al,l.flags|=32768,null!==u&&"object"===typeof u&&"function"===typeof u.then){var c=u,d=l,f=d.tag;if(0===(1&d.mode)&&(0===f||11===f||15===f)){var p=d.alternate;p?(d.updateQueue=p.updateQueue,d.memoizedState=p.memoizedState,d.lanes=p.lanes):(d.updateQueue=null,d.memoizedState=null)}var h=ms(s);if(null!==h){h.flags&=-257,vs(h,s,l,0,t),1&h.mode&&hs(a,c,t),u=c;var m=(t=h).updateQueue;if(null===m){var v=new Set;v.add(u),t.updateQueue=v}else m.add(u);break e}if(0===(1&t)){hs(a,c,t),hu();break e}u=Error(i(426))}else if(Fi&&1&l.mode){var g=ms(s);if(null!==g){0===(65536&g.flags)&&(g.flags|=256),vs(g,s,l,0,t),Ui(u);break e}}a=u,4!==Rl&&(Rl=2),null===Ll?Ll=[a]:Ll.push(a),u=as(u,l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t,li(l,fs(0,u,t));break e;case 1:a=u;var y=l.type,b=l.stateNode;if(0===(128&l.flags)&&("function"===typeof y.getDerivedStateFromError||null!==b&&"function"===typeof b.componentDidCatch&&(null===Gl||!Gl.has(b)))){l.flags|=65536,t&=-t,l.lanes|=t,li(l,ps(l,a,t));break e}}l=l.return}while(null!==l)}bu(n)}catch(x){t=x,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function pu(){var e=kl.current;return kl.current=ns,null===e?ns:e}function hu(){0!==Rl&&3!==Rl&&2!==Rl||(Rl=4),null===Cl||0===(268435455&Fl)&&0===(268435455&Ml)||au(Cl,Al)}function mu(e,t){var n=El;El|=2;var r=pu();for(Cl===e&&Al===t||(Nl=null,du(e,t));;)try{vu();break}catch(o){fu(e,o)}if(Yo(),El=n,kl.current=r,null!==Pl)throw Error(i(261));return Cl=null,Al=0,Rl}function vu(){for(;null!==Pl;)yu(Pl)}function gu(){for(;null!==Pl&&!Xe();)yu(Pl)}function yu(e){var t=xl(e.alternate,e,Tl);e.memoizedProps=e.pendingProps,null===t?bu(e):Pl=t,Sl.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,0===(32768&t.flags)){if(null!==(n=bs(n,t,Tl)))return void(Pl=n)}else{if(null!==(n=Zs(n,t)))return n.flags&=32767,void(Pl=n);if(null===e)return Rl=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===Rl&&(Rl=5)}function xu(e,t,n){var r=bt,o=_l.transition;try{_l.transition=null,bt=1,function(e,t,n,r){do{wu()}while(null!==Zl);if(0!==(6&El))throw Error(i(327));n=e.finishedWork;var o=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(i(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var o=31-at(n),i=1<<o;t[o]=0,r[o]=-1,e[o]=-1,n&=~i}}(e,a),e===Cl&&(Pl=Cl=null,Al=0),0===(2064&n.subtreeFlags)&&0===(2064&n.flags)||Wl||(Wl=!0,Au(tt,(function(){return wu(),null}))),a=0!==(15990&n.flags),0!==(15990&n.subtreeFlags)||a){a=_l.transition,_l.transition=null;var s=bt;bt=1;var l=El;El|=4,Sl.current=null,function(e,t){if(eo=Wt,pr(e=fr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var o=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(k){n=null;break e}var s=0,l=-1,u=-1,c=0,d=0,f=e,p=null;t:for(;;){for(var h;f!==n||0!==o&&3!==f.nodeType||(l=s+o),f!==a||0!==r&&3!==f.nodeType||(u=s+r),3===f.nodeType&&(s+=f.nodeValue.length),null!==(h=f.firstChild);)p=f,f=h;for(;;){if(f===e)break t;if(p===n&&++c===o&&(l=s),p===a&&++d===r&&(u=s),null!==(h=f.nextSibling))break;p=(f=p).parentNode}f=h}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(to={focusedElem:e,selectionRange:n},Wt=!1,Xs=t;null!==Xs;)if(e=(t=Xs).child,0!==(1028&t.subtreeFlags)&&null!==e)e.return=t,Xs=e;else for(;null!==Xs;){t=Xs;try{var m=t.alternate;if(0!==(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var v=m.memoizedProps,g=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:Zo(t.type,v),g);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var x=t.stateNode.containerInfo;if(1===x.nodeType)x.textContent="";else if(9===x.nodeType){var w=x.body;null!=w&&(w.textContent="")}break;default:throw Error(i(163))}}catch(k){Su(t,t.return,k)}if(null!==(e=t.sibling)){e.return=t.return,Xs=e;break}Xs=t.return}m=Qs,Qs=!1}(e,n),pl(n,e),hr(to),Wt=!!eo,to=eo=null,e.current=n,ml(n,e,o),Ye(),El=l,bt=s,_l.transition=a}else e.current=n;if(Wl&&(Wl=!1,Zl=e,Hl=o),0===(a=e.pendingLanes)&&(Gl=null),function(e){if(it&&"function"===typeof it.onCommitFiberRoot)try{it.onCommitFiberRoot(ot,e,void 0,128===(128&e.current.flags))}catch(t){}}(n.stateNode),nu(e,qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r(t[n]);if(zl)throw zl=!1,e=Ul,Ul=null,e;0!==(1&Hl)&&0!==e.tag&&wu(),0!==(1&(a=e.pendingLanes))?e===Kl?$l++:($l=0,Kl=e):$l=0,Go()}(e,t,n,r)}finally{_l.transition=o,bt=r}return null}function wu(){if(null!==Zl){var e=xt(Hl),t=_l.transition,n=bt;try{if(_l.transition=null,bt=16>e?16:e,null===Zl)var r=!1;else{if(e=Zl,Zl=null,Hl=0,0!==(6&El))throw Error(i(331));var o=El;for(El|=4,Xs=e.current;null!==Xs;){var a=Xs,s=a.child;if(0!==(16&Xs.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Xs=c;null!==Xs;){var d=Xs;switch(d.tag){case 0:case 11:case 15:Js(8,d,a)}var f=d.child;if(null!==f)f.return=d,Xs=f;else for(;null!==Xs;){var p=(d=Xs).sibling,h=d.return;if(nl(d),d===c){Xs=null;break}if(null!==p){p.return=h,Xs=p;break}Xs=h}}}var m=a.alternate;if(null!==m){var v=m.child;if(null!==v){m.child=null;do{var g=v.sibling;v.sibling=null,v=g}while(null!==v)}}Xs=a}}if(0!==(2064&a.subtreeFlags)&&null!==s)s.return=a,Xs=s;else e:for(;null!==Xs;){if(0!==(2048&(a=Xs).flags))switch(a.tag){case 0:case 11:case 15:Js(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,Xs=y;break e}Xs=a.return}}var b=e.current;for(Xs=b;null!==Xs;){var x=(s=Xs).child;if(0!==(2064&s.subtreeFlags)&&null!==x)x.return=s,Xs=x;else e:for(s=b;null!==Xs;){if(0!==(2048&(l=Xs).flags))try{switch(l.tag){case 0:case 11:case 15:el(9,l)}}catch(k){Su(l,l.return,k)}if(l===s){Xs=null;break e}var w=l.sibling;if(null!==w){w.return=l.return,Xs=w;break e}Xs=l.return}}if(El=o,Go(),it&&"function"===typeof it.onPostCommitFiberRoot)try{it.onPostCommitFiberRoot(ot,e)}catch(k){}r=!0}return r}finally{bt=n,_l.transition=t}}return!1}function ku(e,t,n){ai(e,t=fs(0,t=as(n,t),1)),t=ql(),null!==(e=eu(e,1))&&(gt(e,1,t),nu(e,t))}function Su(e,t,n){if(3===e.tag)ku(e,e,n);else for(;null!==t;){if(3===t.tag){ku(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"===typeof t.type.getDerivedStateFromError||"function"===typeof r.componentDidCatch&&(null===Gl||!Gl.has(r))){ai(t,e=ps(t,e=as(n,e),1)),e=ql(),null!==(t=eu(t,1))&&(gt(t,1,e),nu(t,e));break}}t=t.return}}function _u(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ql(),e.pingedLanes|=e.suspendedLanes&n,Cl===e&&(Al&n)===n&&(4===Rl||3===Rl&&(130023424&Al)===Al&&500>qe()-Il?du(e,0):Dl|=n),nu(e,t)}function Eu(e,t){0===t&&(0===(1&e.mode)?t=1:(t=ct,0===(130023424&(ct<<=1))&&(ct=4194304)));var n=ql();null!==(e=eu(e,t))&&(gt(e,t,n),nu(e,n))}function Cu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Eu(e,n)}function Pu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,o=e.memoizedState;null!==o&&(n=o.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(i(314))}null!==r&&r.delete(t),Eu(e,n)}function Au(e,t){return $e(e,t)}function Tu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ju(e,t,n,r){return new Tu(e,t,n,r)}function Ru(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ou(e,t){var n=e.alternate;return null===n?((n=ju(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Fu(e,t,n,r,o,a){var s=2;if(r=e,"function"===typeof e)Ru(e)&&(s=1);else if("string"===typeof e)s=5;else e:switch(e){case S:return Mu(n.children,o,a,t);case _:s=8,o|=8;break;case E:return(e=ju(12,n,t,2|o)).elementType=E,e.lanes=a,e;case T:return(e=ju(13,n,t,o)).elementType=T,e.lanes=a,e;case j:return(e=ju(19,n,t,o)).elementType=j,e.lanes=a,e;case F:return Du(n,o,a,t);default:if("object"===typeof e&&null!==e)switch(e.$$typeof){case C:s=10;break e;case P:s=9;break e;case A:s=11;break e;case R:s=14;break e;case O:s=16,r=null;break e}throw Error(i(130,null==e?e:typeof e,""))}return(t=ju(s,n,t,o)).elementType=e,t.type=r,t.lanes=a,t}function Mu(e,t,n,r){return(e=ju(7,e,r,t)).lanes=n,e}function Du(e,t,n,r){return(e=ju(22,e,r,t)).elementType=F,e.lanes=n,e.stateNode={},e}function Lu(e,t,n){return(e=ju(6,e,null,t)).lanes=n,e}function Bu(e,t,n){return(t=ju(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Iu(e,t,n,r,o){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=vt(0),this.expirationTimes=vt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vt(0),this.identifierPrefix=r,this.onRecoverableError=o,this.mutableSourceEagerHydrationData=null}function Vu(e,t,n,r,o,i,a,s,l){return e=new Iu(e,t,n,s,l),1===t?(t=1,!0===i&&(t|=8)):t=0,i=ju(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},ri(i),e}function Nu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:k,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function zu(e){if(!e)return Ao;e:{if(Ue(e=e._reactInternals)!==e||1!==e.tag)throw Error(i(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Fo(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(i(171))}if(1===e.tag){var n=e.type;if(Fo(n))return Lo(e,n,t)}return t}function Uu(e,t,n,r,o,i,a,s,l){return(e=Vu(n,r,!0,e,0,i,0,s,l)).context=zu(null),n=e.current,(i=ii(r=ql(),o=Ql(n))).callback=void 0!==t&&null!==t?t:null,ai(n,i),e.current.lanes=o,gt(e,o,r),nu(e,r),e}function Gu(e,t,n,r){var o=t.current,i=ql(),a=Ql(o);return n=zu(n),null===t.context?t.context=n:t.pendingContext=n,(t=ii(i,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),ai(o,t),null!==(e=Jl(o,a,i))&&si(e,o,a),a}function Wu(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Zu(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Hu(e,t){Zu(e,t),(e=e.alternate)&&Zu(e,t)}xl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||jo.current)ws=!0;else{if(0===(e.lanes&n)&&0===(128&t.flags))return ws=!1,function(e,t,n){switch(t.tag){case 3:Rs(t),zi();break;case 5:na(t);break;case 1:Fo(t.type)&&Bo(t);break;case 4:ea(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,o=t.memoizedProps.value;Po(Ho,r._currentValue),r._currentValue=o;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Po(oa,1&oa.current),t.flags|=128,null):0!==(n&t.child.childLanes)?Ls(e,t,n):(Po(oa,1&oa.current),null!==(e=Ws(e,t,n))?e.sibling:null);Po(oa,1&oa.current);break;case 19:if(r=0!==(n&t.childLanes),0!==(128&e.flags)){if(r)return Gs(e,t,n);t.flags|=128}if(null!==(o=t.memoizedState)&&(o.rendering=null,o.tail=null,o.lastEffect=null),Po(oa,oa.current),r)break;return null;case 22:case 23:return t.lanes=0,Cs(e,t,n)}return Ws(e,t,n)}(e,t,n);ws=0!==(131072&e.flags)}else ws=!1,Fi&&0!==(1048576&t.flags)&&Ai(t,wi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps;var o=Oo(t,To.current);Jo(t,n),o=xa(null,t,r,e,o,n);var a=wa();return t.flags|=1,"object"===typeof o&&null!==o&&"function"===typeof o.render&&void 0===o.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Fo(r)?(a=!0,Bo(t)):a=!1,t.memoizedState=null!==o.state&&void 0!==o.state?o.state:null,ri(t),o.updater=pi,t.stateNode=o,o._reactInternals=t,gi(t,r,e,n),t=js(null,t,r,!0,a,n)):(t.tag=0,Fi&&a&&Ti(t),ks(null,t,o,n),t=t.child),t;case 16:r=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=(o=r._init)(r._payload),t.type=r,o=t.tag=function(e){if("function"===typeof e)return Ru(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===A)return 11;if(e===R)return 14}return 2}(r),e=Zo(r,e),o){case 0:t=As(null,t,r,e,n);break e;case 1:t=Ts(null,t,r,e,n);break e;case 11:t=Ss(null,t,r,e,n);break e;case 14:t=_s(null,t,r,Zo(r.type,e),n);break e}throw Error(i(306,r,""))}return t;case 0:return r=t.type,o=t.pendingProps,As(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 1:return r=t.type,o=t.pendingProps,Ts(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 3:e:{if(Rs(t),null===e)throw Error(i(387));r=t.pendingProps,o=(a=t.memoizedState).element,oi(e,t),ui(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Os(e,t,r,n,o=Error(i(423)));break e}if(r!==o){t=Os(e,t,r,n,o=Error(i(424)));break e}for(Oi=uo(t.stateNode.containerInfo.firstChild),Ri=t,Fi=!0,Mi=null,n=Ki(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(zi(),r===o){t=Ws(e,t,n);break e}ks(e,t,r,n)}t=t.child}return t;case 5:return na(t),null===e&&Ii(t),r=t.type,o=t.pendingProps,a=null!==e?e.memoizedProps:null,s=o.children,no(r,o)?s=null:null!==a&&no(r,a)&&(t.flags|=32),Ps(e,t),ks(e,t,s,n),t.child;case 6:return null===e&&Ii(t),null;case 13:return Ls(e,t,n);case 4:return ea(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=$i(t,null,r,n):ks(e,t,r,n),t.child;case 11:return r=t.type,o=t.pendingProps,Ss(e,t,r,o=t.elementType===r?o:Zo(r,o),n);case 7:return ks(e,t,t.pendingProps,n),t.child;case 8:case 12:return ks(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,o=t.pendingProps,a=t.memoizedProps,s=o.value,Po(Ho,r._currentValue),r._currentValue=s,null!==a)if(sr(a.value,s)){if(a.children===o.children&&!jo.current){t=Ws(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=ii(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var d=(c=c.shared).pending;null===d?u.next=u:(u.next=d.next,d.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),Qo(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(i(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),Qo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ks(e,t,o.children,n),t=t.child}return t;case 9:return o=t.type,r=t.pendingProps.children,Jo(t,n),r=r(o=ei(o)),t.flags|=1,ks(e,t,r,n),t.child;case 14:return o=Zo(r=t.type,t.pendingProps),_s(e,t,r,o=Zo(r.type,o),n);case 15:return Es(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,o=t.pendingProps,o=t.elementType===r?o:Zo(r,o),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,Fo(r)?(e=!0,Bo(t)):e=!1,Jo(t,n),mi(t,r,o),gi(t,r,o,n),js(null,t,r,!0,e,n);case 19:return Gs(e,t,n);case 22:return Cs(e,t,n)}throw Error(i(156,t.tag))};var $u="function"===typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function Xu(e){this._internalRoot=e}function Yu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Qu(){}function Ju(e,t,n,r,o){var i=n._reactRootContainer;if(i){var a=i;if("function"===typeof o){var s=o;o=function(){var e=Wu(a);s.call(e)}}Gu(t,a,e,o)}else a=function(e,t,n,r,o){if(o){if("function"===typeof r){var i=r;r=function(){var e=Wu(a);i.call(e)}}var a=Uu(t,r,e,0,null,!1,0,"",Qu);return e._reactRootContainer=a,e[mo]=a.current,Ur(8===e.nodeType?e.parentNode:e),uu(),a}for(;o=e.lastChild;)e.removeChild(o);if("function"===typeof r){var s=r;r=function(){var e=Wu(l);s.call(e)}}var l=Vu(e,0,!1,null,0,!1,0,"",Qu);return e._reactRootContainer=l,e[mo]=l.current,Ur(8===e.nodeType?e.parentNode:e),uu((function(){Gu(t,l,n,r)})),l}(n,t,e,o,r);return Wu(a)}Xu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(i(409));Gu(e,t,null,null)},Xu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uu((function(){Gu(null,e,null,null)})),t[mo]=null}},Xu.prototype.unstable_scheduleHydration=function(e){if(e){var t=_t();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ft.length&&0!==t&&t<Ft[n].priority;n++);Ft.splice(n,0,e),0===n&&Bt(e)}},wt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),nu(t,qe()),0===(6&El)&&(Vl=qe()+500,Go()))}break;case 13:var r=ql();uu((function(){return Jl(e,1,r)})),Hu(e,1)}},kt=function(e){13===e.tag&&(Jl(e,134217728,ql()),Hu(e,134217728))},St=function(e){if(13===e.tag){var t=ql(),n=Ql(e);Jl(e,n,t),Hu(e,n)}},_t=function(){return bt},Et=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},ke=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var o=ko(r);if(!o)throw Error(i(90));$(r),Q(r,o)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ae=lu,Te=uu;var ec={usingClientEntryPoint:!1,Events:[xo,wo,ko,Ce,Pe,lu]},tc={findFiberByHostInstance:bo,bundleType:0,version:"18.1.0",rendererPackageName:"react-dom"},nc={bundleType:tc.bundleType,version:tc.version,rendererPackageName:tc.rendererPackageName,rendererConfig:tc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:x.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=Ze(e))?null:e.stateNode},findFiberByHostInstance:tc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.1.0-next-22edb9f77-20220426"};if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var rc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!rc.isDisabled&&rc.supportsFiber)try{ot=rc.inject(nc),it=rc}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ec,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Yu(t))throw Error(i(200));return Nu(e,t,null,n)},t.createRoot=function(e,t){if(!Yu(e))throw Error(i(299));var n=!1,r="",o=$u;return null!==t&&void 0!==t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(o=t.onRecoverableError)),t=Vu(e,1,!1,null,0,n,0,r,o),e[mo]=t.current,Ur(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"===typeof e.render)throw Error(i(188));throw e=Object.keys(e).join(","),Error(i(268,e))}return e=null===(e=Ze(t))?null:e.stateNode},t.flushSync=function(e){return uu(e)},t.hydrate=function(e,t,n){if(!qu(t))throw Error(i(200));return Ju(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Yu(e))throw Error(i(405));var r=null!=n&&n.hydratedSources||null,o=!1,a="",s=$u;if(null!==n&&void 0!==n&&(!0===n.unstable_strictMode&&(o=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Uu(t,null,e,1,null!=n?n:null,o,0,a,s),e[mo]=t.current,Ur(e),r)for(e=0;e<r.length;e++)o=(o=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,o]:t.mutableSourceEagerHydrationData.push(n,o);return new Xu(t)},t.render=function(e,t,n){if(!qu(t))throw Error(i(200));return Ju(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!qu(e))throw Error(i(40));return!!e._reactRootContainer&&(uu((function(){Ju(null,null,e,!1,(function(){e._reactRootContainer=null,e[mo]=null}))})),!0)},t.unstable_batchedUpdates=lu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!qu(n))throw Error(i(200));if(null==e||void 0===e._reactInternals)throw Error(i(38));return Ju(e,t,n,!1,r)},t.version="18.1.0-next-22edb9f77-20220426"},1250:function(e,t,n){"use strict";var r=n(4164);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},4164:function(e,t,n){"use strict";!function e(){if("undefined"!==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"===typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}(),e.exports=n(4463)},9587:function(e,t,n){function r(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,t}var o=r(n(2791));function i(){return i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function a(e,t){return a=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},a(e,t)}var s=new Map,l=new WeakMap,u=0,c=void 0;function d(e){return Object.keys(e).sort().filter((function(t){return void 0!==e[t]})).map((function(t){return t+"_"+("root"===t?(n=e.root)?(l.has(n)||(u+=1,l.set(n,u.toString())),l.get(n)):"0":e[t]);var n})).toString()}function f(e,t,n,r){if(void 0===n&&(n={}),void 0===r&&(r=c),"undefined"===typeof window.IntersectionObserver&&void 0!==r){var o=e.getBoundingClientRect();return t(r,{isIntersecting:r,target:e,intersectionRatio:"number"===typeof n.threshold?n.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),function(){}}var i=function(e){var t=d(e),n=s.get(t);if(!n){var r,o=new Map,i=new IntersectionObserver((function(t){t.forEach((function(t){var n,i=t.isIntersecting&&r.some((function(e){return t.intersectionRatio>=e}));e.trackVisibility&&"undefined"===typeof t.isVisible&&(t.isVisible=i),null==(n=o.get(t.target))||n.forEach((function(e){e(i,t)}))}))}),e);r=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),n={id:t,observer:i,elements:o},s.set(t,n)}return n}(n),a=i.id,l=i.observer,u=i.elements,f=u.get(e)||[];return u.has(e)||u.set(e,f),f.push(t),l.observe(e),function(){f.splice(f.indexOf(t),1),0===f.length&&(u.delete(e),l.unobserve(e)),0===u.size&&(l.disconnect(),s.delete(a))}}var p=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function h(e){return"function"!==typeof e.children}var m=function(e){var t,n;function r(t){var n;return(n=e.call(this,t)||this).node=null,n._unobserveCb=null,n.handleNode=function(e){n.node&&(n.unobserve(),e||n.props.triggerOnce||n.props.skip||n.setState({inView:!!n.props.initialInView,entry:void 0})),n.node=e||null,n.observeNode()},n.handleChange=function(e,t){e&&n.props.triggerOnce&&n.unobserve(),h(n.props)||n.setState({inView:e,entry:t}),n.props.onChange&&n.props.onChange(e,t)},n.state={inView:!!t.initialInView,entry:void 0},n}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,a(t,n);var s=r.prototype;return s.componentDidUpdate=function(e){e.rootMargin===this.props.rootMargin&&e.root===this.props.root&&e.threshold===this.props.threshold&&e.skip===this.props.skip&&e.trackVisibility===this.props.trackVisibility&&e.delay===this.props.delay||(this.unobserve(),this.observeNode())},s.componentWillUnmount=function(){this.unobserve(),this.node=null},s.observeNode=function(){if(this.node&&!this.props.skip){var e=this.props,t=e.threshold,n=e.root,r=e.rootMargin,o=e.trackVisibility,i=e.delay,a=e.fallbackInView;this._unobserveCb=f(this.node,this.handleChange,{threshold:t,root:n,rootMargin:r,trackVisibility:o,delay:i},a)}},s.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},s.render=function(){if(!h(this.props)){var e=this.state,t=e.inView,n=e.entry;return this.props.children({inView:t,entry:n,ref:this.handleNode})}var r=this.props,a=r.children,s=r.as,l=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(r,p);return o.createElement(s||"div",i({ref:this.handleNode},l),a)},r}(o.Component);t.InView=m,t.defaultFallbackInView=function(e){c=e},t.observe=f,t.useInView=function(e){var t=void 0===e?{}:e,n=t.threshold,r=t.delay,i=t.trackVisibility,a=t.rootMargin,s=t.root,l=t.triggerOnce,u=t.skip,c=t.initialInView,d=t.fallbackInView,p=t.onChange,h=o.useRef(),m=o.useRef(),v=o.useState({inView:!!c}),g=v[0],y=v[1];m.current=p;var b=o.useCallback((function(e){void 0!==h.current&&(h.current(),h.current=void 0),u||e&&(h.current=f(e,(function(e,t){y({inView:e,entry:t}),m.current&&m.current(e,t),t.isIntersecting&&l&&h.current&&(h.current(),h.current=void 0)}),{root:s,rootMargin:a,threshold:n,trackVisibility:i,delay:r},d))}),[Array.isArray(n)?n.toString():n,s,a,l,u,i,d,r]);o.useEffect((function(){h.current||!g.entry||l||u||y({inView:!!c})}));var x=[b,g.inView,g.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}},1372:function(e,t){"use strict";var n,r=Symbol.for("react.element"),o=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.server_context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),v=Symbol.for("react.offscreen");function g(e){if("object"===typeof e&&null!==e){var t=e.$$typeof;switch(t){case r:switch(e=e.type){case i:case s:case a:case f:case p:return e;default:switch(e=e&&e.$$typeof){case c:case u:case d:case m:case h:case l:return e;default:return t}}case o:return t}}}n=Symbol.for("react.module.reference"),t.isValidElementType=function(e){return"string"===typeof e||"function"===typeof e||e===i||e===s||e===a||e===f||e===p||e===v||"object"===typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===h||e.$$typeof===l||e.$$typeof===u||e.$$typeof===d||e.$$typeof===n||void 0!==e.getModuleId)},t.typeOf=g},7441:function(e,t,n){"use strict";e.exports=n(1372)},6374:function(e,t,n){"use strict";var r=n(2791),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function u(e,t,n){var r,i={},u=null,c=null;for(r in void 0!==n&&(u=""+n),void 0!==t.key&&(u=""+t.key),void 0!==t.ref&&(c=t.ref),t)a.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:u,ref:c,props:i,_owner:s.current}}t.Fragment=i,t.jsx=u,t.jsxs=u},9117:function(e,t){"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),f=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,v={};function g(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||h}g.prototype.isReactComponent={},g.prototype.setState=function(e,t){if("object"!==typeof e&&"function"!==typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},g.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=g.prototype;var x=b.prototype=new y;x.constructor=b,m(x,g.prototype),x.isPureReactComponent=!0;var w=Array.isArray,k=Object.prototype.hasOwnProperty,S={current:null},_={key:!0,ref:!0,__self:!0,__source:!0};function E(e,t,r){var o,i={},a=null,s=null;if(null!=t)for(o in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,o)&&!_.hasOwnProperty(o)&&(i[o]=t[o]);var l=arguments.length-2;if(1===l)i.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];i.children=u}if(e&&e.defaultProps)for(o in l=e.defaultProps)void 0===i[o]&&(i[o]=l[o]);return{$$typeof:n,type:e,key:a,ref:s,props:i,_owner:S.current}}function C(e){return"object"===typeof e&&null!==e&&e.$$typeof===n}var P=/\/+/g;function A(e,t){return"object"===typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,o,i,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return a=a(l=e),e=""===i?"."+A(l,0):i,w(a)?(o="",null!=e&&(o=e.replace(P,"$&/")+"/"),T(a,t,o,"",(function(e){return e}))):null!=a&&(C(a)&&(a=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,o+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),t.push(a)),1;if(l=0,i=""===i?".":i+":",w(e))for(var u=0;u<e.length;u++){var c=i+A(s=e[u],u);l+=T(s,t,o,c,a)}else if(c=function(e){return null===e||"object"!==typeof e?null:"function"===typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"===typeof c)for(e=c.call(e),u=0;!(s=e.next()).done;)l+=T(s=s.value,t,o,c=i+A(s,u++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function j(e,t,n){if(null==e)return e;var r=[],o=0;return T(e,r,"","",(function(e){return t.call(n,e,o++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var O={current:null},F={transition:null},M={ReactCurrentDispatcher:O,ReactCurrentBatchConfig:F,ReactCurrentOwner:S};t.Children={map:j,forEach:function(e,t,n){j(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return j(e,(function(){t++})),t},toArray:function(e){return j(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=g,t.Fragment=o,t.Profiler=a,t.PureComponent=b,t.StrictMode=i,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=M,t.cloneElement=function(e,t,r){if(null===e||void 0===e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=m({},e.props),i=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=S.current),void 0!==t.key&&(i=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)k.call(t,u)&&!_.hasOwnProperty(u)&&(o[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)o.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];o.children=l}return{$$typeof:n,type:e.type,key:i,ref:a,props:o,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=E,t.createFactory=function(e){var t=E.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:f,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=F.transition;F.transition={};try{e()}finally{F.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return O.current.useCallback(e,t)},t.useContext=function(e){return O.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return O.current.useDeferredValue(e)},t.useEffect=function(e,t){return O.current.useEffect(e,t)},t.useId=function(){return O.current.useId()},t.useImperativeHandle=function(e,t,n){return O.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return O.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return O.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return O.current.useMemo(e,t)},t.useReducer=function(e,t,n){return O.current.useReducer(e,t,n)},t.useRef=function(e){return O.current.useRef(e)},t.useState=function(e){return O.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return O.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return O.current.useTransition()},t.version="18.1.0"},2791:function(e,t,n){"use strict";e.exports=n(9117)},184:function(e,t,n){"use strict";e.exports=n(6374)},6813:function(e,t){"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,o=e[r];if(!(0<i(o,t)))break e;e[r]=t,e[n]=o,n=r}}function r(e){return 0===e.length?null:e[0]}function o(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,o=e.length,a=o>>>1;r<a;){var s=2*(r+1)-1,l=e[s],u=s+1,c=e[u];if(0>i(l,n))u<o&&0>i(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[s]=n,r=s);else{if(!(u<o&&0>i(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"===typeof performance&&"function"===typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var u=[],c=[],d=1,f=null,p=3,h=!1,m=!1,v=!1,g="function"===typeof setTimeout?setTimeout:null,y="function"===typeof clearTimeout?clearTimeout:null,b="undefined"!==typeof setImmediate?setImmediate:null;function x(e){for(var t=r(c);null!==t;){if(null===t.callback)o(c);else{if(!(t.startTime<=e))break;o(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function w(e){if(v=!1,x(e),!m)if(null!==r(u))m=!0,F(k);else{var t=r(c);null!==t&&M(w,t.startTime-e)}}function k(e,n){m=!1,v&&(v=!1,y(C),C=-1),h=!0;var i=p;try{for(x(n),f=r(u);null!==f&&(!(f.expirationTime>n)||e&&!T());){var a=f.callback;if("function"===typeof a){f.callback=null,p=f.priorityLevel;var s=a(f.expirationTime<=n);n=t.unstable_now(),"function"===typeof s?f.callback=s:f===r(u)&&o(u),x(n)}else o(u);f=r(u)}if(null!==f)var l=!0;else{var d=r(c);null!==d&&M(w,d.startTime-n),l=!1}return l}finally{f=null,p=i,h=!1}}"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var S,_=!1,E=null,C=-1,P=5,A=-1;function T(){return!(t.unstable_now()-A<P)}function j(){if(null!==E){var e=t.unstable_now();A=e;var n=!0;try{n=E(!0,e)}finally{n?S():(_=!1,E=null)}}else _=!1}if("function"===typeof b)S=function(){b(j)};else if("undefined"!==typeof MessageChannel){var R=new MessageChannel,O=R.port2;R.port1.onmessage=j,S=function(){O.postMessage(null)}}else S=function(){g(j,0)};function F(e){E=e,_||(_=!0,S())}function M(e,n){C=g((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||h||(m=!0,F(k))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):P=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=p;p=e;try{return t()}finally{p=n}},t.unstable_scheduleCallback=function(e,o,i){var a=t.unstable_now();switch("object"===typeof i&&null!==i?i="number"===typeof(i=i.delay)&&0<i?a+i:a:i=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:o,priorityLevel:e,startTime:i,expirationTime:s=i+s,sortIndex:-1},i>a?(e.sortIndex=i,n(c,e),null===r(u)&&e===r(c)&&(v?(y(C),C=-1):v=!0,M(w,i-a))):(e.sortIndex=s,n(u,e),m||h||(m=!0,F(k))),e},t.unstable_shouldYield=T,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},5296:function(e,t,n){"use strict";e.exports=n(6813)},9613:function(e){e.exports=function(e,t,n,r){var o=n?n.call(r,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;if("object"!==typeof e||!e||"object"!==typeof t||!t)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var u=i[l];if(!s(u))return!1;var c=e[u],d=t[u];if(!1===(o=n?n.call(r,c,d,u):void 0)||void 0===o&&c!==d)return!1}return!0}},1454:function(e){!function(){"use strict";e.exports={polyfill:function(){var e=window,t=document;if(!("scrollBehavior"in t.documentElement.style)||!0===e.__forceSmoothScrollPolyfill__){var n,r=e.HTMLElement||e.Element,o={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||s,scrollIntoView:r.prototype.scrollIntoView},i=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now,a=(n=e.navigator.userAgent,new RegExp(["MSIE ","Trident/","Edge/"].join("|")).test(n)?1:0);e.scroll=e.scrollTo=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?h.call(e,t.body,void 0!==arguments[0].left?~~arguments[0].left:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?~~arguments[0].top:e.scrollY||e.pageYOffset):o.scroll.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:e.scrollX||e.pageXOffset,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:e.scrollY||e.pageYOffset))},e.scrollBy=function(){void 0!==arguments[0]&&(l(arguments[0])?o.scrollBy.call(e,void 0!==arguments[0].left?arguments[0].left:"object"!==typeof arguments[0]?arguments[0]:0,void 0!==arguments[0].top?arguments[0].top:void 0!==arguments[1]?arguments[1]:0):h.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset)))},r.prototype.scroll=r.prototype.scrollTo=function(){if(void 0!==arguments[0])if(!0!==l(arguments[0])){var e=arguments[0].left,t=arguments[0].top;h.call(this,this,"undefined"===typeof e?this.scrollLeft:~~e,"undefined"===typeof t?this.scrollTop:~~t)}else{if("number"===typeof arguments[0]&&void 0===arguments[1])throw new SyntaxError("Value could not be converted");o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left:"object"!==typeof arguments[0]?~~arguments[0]:this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top:void 0!==arguments[1]?~~arguments[1]:this.scrollTop)}},r.prototype.scrollBy=function(){void 0!==arguments[0]&&(!0!==l(arguments[0])?this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior}):o.elementScroll.call(this,void 0!==arguments[0].left?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,void 0!==arguments[0].top?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop))},r.prototype.scrollIntoView=function(){if(!0!==l(arguments[0])){var n=f(this),r=n.getBoundingClientRect(),i=this.getBoundingClientRect();n!==t.body?(h.call(this,n,n.scrollLeft+i.left-r.left,n.scrollTop+i.top-r.top),"fixed"!==e.getComputedStyle(n).position&&e.scrollBy({left:r.left,top:r.top,behavior:"smooth"})):e.scrollBy({left:i.left,top:i.top,behavior:"smooth"})}else o.scrollIntoView.call(this,void 0===arguments[0]||arguments[0])}}function s(e,t){this.scrollLeft=e,this.scrollTop=t}function l(e){if(null===e||"object"!==typeof e||void 0===e.behavior||"auto"===e.behavior||"instant"===e.behavior)return!0;if("object"===typeof e&&"smooth"===e.behavior)return!1;throw new TypeError("behavior member of ScrollOptions "+e.behavior+" is not a valid value for enumeration ScrollBehavior.")}function u(e,t){return"Y"===t?e.clientHeight+a<e.scrollHeight:"X"===t?e.clientWidth+a<e.scrollWidth:void 0}function c(t,n){var r=e.getComputedStyle(t,null)["overflow"+n];return"auto"===r||"scroll"===r}function d(e){var t=u(e,"Y")&&c(e,"Y"),n=u(e,"X")&&c(e,"X");return t||n}function f(e){for(;e!==t.body&&!1===d(e);)e=e.parentNode||e.host;return e}function p(t){var n,r,o,a,s=(i()-t.startTime)/468;a=s=s>1?1:s,n=.5*(1-Math.cos(Math.PI*a)),r=t.startX+(t.x-t.startX)*n,o=t.startY+(t.y-t.startY)*n,t.method.call(t.scrollable,r,o),r===t.x&&o===t.y||e.requestAnimationFrame(p.bind(e,t))}function h(n,r,a){var l,u,c,d,f=i();n===t.body?(l=e,u=e.scrollX||e.pageXOffset,c=e.scrollY||e.pageYOffset,d=o.scroll):(l=n,u=n.scrollLeft,c=n.scrollTop,d=s),p({scrollable:l,method:d,startTime:f,startX:u,startY:c,x:r,y:a})}}}}()},607:function(e,t,n){"use strict";var r=n(8485).default,o=n(8181).default,i=n(4534).default;Object.defineProperty(t,"__esModule",{value:!0});var a=function(e,t){return function(n){return Math.max(Math.min(n,t),e)}},s=function(e){return e%1?Number(e.toFixed(5)):e},l=/(-)?([\d]*\.?[\d])+/g,u=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,c=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function d(e){return"string"===typeof e}var f={test:function(e){return"number"===typeof e},parse:parseFloat,transform:function(e){return e}},p=Object.assign(Object.assign({},f),{transform:a(0,1)}),h=Object.assign(Object.assign({},f),{default:1}),m=function(e){return{test:function(t){return d(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return"".concat(t).concat(e)}}},v=m("deg"),g=m("%"),y=m("px"),b=m("vh"),x=m("vw"),w=Object.assign(Object.assign({},g),{parse:function(e){return g.parse(e)/100},transform:function(e){return g.transform(100*e)}}),k=function(e,t){return function(n){return Boolean(d(n)&&c.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t))}},S=function(e,t,n){return function(r){var a;if(!d(r))return r;var s=r.match(l),u=i(s,4),c=u[0],f=u[1],p=u[2],h=u[3];return o(a={},e,parseFloat(c)),o(a,t,parseFloat(f)),o(a,n,parseFloat(p)),o(a,"alpha",void 0!==h?parseFloat(h):1),a}},_={test:k("hsl","hue"),parse:S("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+g.transform(s(n))+", "+g.transform(s(r))+", "+s(p.transform(i))+")"}},E=a(0,255),C=Object.assign(Object.assign({},f),{transform:function(e){return Math.round(E(e))}}),P={test:k("rgb","red"),parse:S("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+C.transform(t)+", "+C.transform(n)+", "+C.transform(r)+", "+s(p.transform(i))+")"}};var A={test:k("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substr(1,2),n=e.substr(3,2),r=e.substr(5,2),o=e.substr(7,2)):(t=e.substr(1,1),n=e.substr(2,1),r=e.substr(3,1),o=e.substr(4,1),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:P.transform},T={test:function(e){return P.test(e)||A.test(e)||_.test(e)},parse:function(e){return P.test(e)?P.parse(e):_.test(e)?_.parse(e):A.parse(e)},transform:function(e){return d(e)?e:e.hasOwnProperty("red")?P.transform(e):_.transform(e)}},j="${c}",R="${n}";function O(e){"number"===typeof e&&(e="".concat(e));var t=[],n=0,o=e.match(u);o&&(n=o.length,e=e.replace(u,j),t.push.apply(t,r(o.map(T.parse))));var i=e.match(l);return i&&(e=e.replace(l,R),t.push.apply(t,r(i.map(f.parse)))),{values:t,numColors:n,tokenised:e}}function F(e){return O(e).values}function M(e){var t=O(e),n=t.values,r=t.numColors,o=t.tokenised,i=n.length;return function(e){for(var t=o,n=0;n<i;n++)t=t.replace(n<r?j:R,n<r?T.transform(e[n]):s(e[n]));return t}}var D=function(e){return"number"===typeof e?0:e};var L={test:function(e){var t,n,r,o;return isNaN(e)&&d(e)&&(null!==(n=null===(t=e.match(l))||void 0===t?void 0:t.length)&&void 0!==n?n:0)+(null!==(o=null===(r=e.match(u))||void 0===r?void 0:r.length)&&void 0!==o?o:0)>0},parse:F,createTransformer:M,getAnimatableNone:function(e){var t=F(e);return M(e)(t.map(D))}},B=new Set(["brightness","contrast","saturate","opacity"]);function I(e){var t=e.slice(0,-1).split("("),n=i(t,2),r=n[0],o=n[1];if("drop-shadow"===r)return e;var a=o.match(l)||[],s=i(a,1)[0];if(!s)return e;var u=o.replace(s,""),c=B.has(r)?1:0;return s!==o&&(c*=100),r+"("+c+u+")"}var V=/([a-z-]*)\(.*?\)/g,N=Object.assign(Object.assign({},L),{getAnimatableNone:function(e){var t=e.match(V);return t?t.map(I).join(" "):e}});t.alpha=p,t.color=T,t.complex=L,t.degrees=v,t.filter=N,t.hex=A,t.hsla=_,t.number=f,t.percent=g,t.progressPercentage=w,t.px=y,t.rgbUnit=C,t.rgba=P,t.scale=h,t.vh=b,t.vw=x},3978:function(e,t,n){"use strict";n.r(t),n.d(t,{ServerStyleSheet:function(){return Ne},StyleSheetConsumer:function(){return oe},StyleSheetContext:function(){return re},StyleSheetManager:function(){return ce},ThemeConsumer:function(){return Oe},ThemeContext:function(){return Re},ThemeProvider:function(){return Fe},__PRIVATE__:function(){return Ge},createGlobalStyle:function(){return Ie},css:function(){return xe},default:function(){return We},isStyledComponent:function(){return x},keyframes:function(){return Ve},useTheme:function(){return Ue},version:function(){return k},withTheme:function(){return ze}});var r=n(7441),o=n(2791),i=n(9613),a=n.n(i);var s=function(e){function t(e,r,l,u,f){for(var p,h,m,v,x,k=0,S=0,_=0,E=0,C=0,O=0,M=m=p=0,L=0,B=0,I=0,V=0,N=l.length,z=N-1,U="",G="",W="",Z="";L<N;){if(h=l.charCodeAt(L),L===z&&0!==S+E+_+k&&(0!==S&&(h=47===S?10:47),E=_=k=0,N++,z++),0===S+E+_+k){if(L===z&&(0<B&&(U=U.replace(d,"")),0<U.trim().length)){switch(h){case 32:case 9:case 59:case 13:case 10:break;default:U+=l.charAt(L)}h=59}switch(h){case 123:for(p=(U=U.trim()).charCodeAt(0),m=1,V=++L;L<N;){switch(h=l.charCodeAt(L)){case 123:m++;break;case 125:m--;break;case 47:switch(h=l.charCodeAt(L+1)){case 42:case 47:e:{for(M=L+1;M<z;++M)switch(l.charCodeAt(M)){case 47:if(42===h&&42===l.charCodeAt(M-1)&&L+2!==M){L=M+1;break e}break;case 10:if(47===h){L=M+1;break e}}L=M}}break;case 91:h++;case 40:h++;case 34:case 39:for(;L++<z&&l.charCodeAt(L)!==h;);}if(0===m)break;L++}if(m=l.substring(V,L),0===p&&(p=(U=U.replace(c,"").trim()).charCodeAt(0)),64===p){switch(0<B&&(U=U.replace(d,"")),h=U.charCodeAt(1)){case 100:case 109:case 115:case 45:B=r;break;default:B=R}if(V=(m=t(r,B,m,h,f+1)).length,0<F&&(x=s(3,m,B=n(R,U,I),r,A,P,V,h,f,u),U=B.join(""),void 0!==x&&0===(V=(m=x.trim()).length)&&(h=0,m="")),0<V)switch(h){case 115:U=U.replace(w,a);case 100:case 109:case 45:m=U+"{"+m+"}";break;case 107:m=(U=U.replace(g,"$1 $2"))+"{"+m+"}",m=1===j||2===j&&i("@"+m,3)?"@-webkit-"+m+"@"+m:"@"+m;break;default:m=U+m,112===u&&(G+=m,m="")}else m=""}else m=t(r,n(r,U,I),m,u,f+1);W+=m,m=I=B=M=p=0,U="",h=l.charCodeAt(++L);break;case 125:case 59:if(1<(V=(U=(0<B?U.replace(d,""):U).trim()).length))switch(0===M&&(p=U.charCodeAt(0),45===p||96<p&&123>p)&&(V=(U=U.replace(" ",":")).length),0<F&&void 0!==(x=s(1,U,r,e,A,P,G.length,u,f,u))&&0===(V=(U=x.trim()).length)&&(U="\0\0"),p=U.charCodeAt(0),h=U.charCodeAt(1),p){case 0:break;case 64:if(105===h||99===h){Z+=U+l.charAt(L);break}default:58!==U.charCodeAt(V-1)&&(G+=o(U,p,h,U.charCodeAt(2)))}I=B=M=p=0,U="",h=l.charCodeAt(++L)}}switch(h){case 13:case 10:47===S?S=0:0===1+p&&107!==u&&0<U.length&&(B=1,U+="\0"),0<F*D&&s(0,U,r,e,A,P,G.length,u,f,u),P=1,A++;break;case 59:case 125:if(0===S+E+_+k){P++;break}default:switch(P++,v=l.charAt(L),h){case 9:case 32:if(0===E+k+S)switch(C){case 44:case 58:case 9:case 32:v="";break;default:32!==h&&(v=" ")}break;case 0:v="\\0";break;case 12:v="\\f";break;case 11:v="\\v";break;case 38:0===E+S+k&&(B=I=1,v="\f"+v);break;case 108:if(0===E+S+k+T&&0<M)switch(L-M){case 2:112===C&&58===l.charCodeAt(L-3)&&(T=C);case 8:111===O&&(T=O)}break;case 58:0===E+S+k&&(M=L);break;case 44:0===S+_+E+k&&(B=1,v+="\r");break;case 34:case 39:0===S&&(E=E===h?0:0===E?h:E);break;case 91:0===E+S+_&&k++;break;case 93:0===E+S+_&&k--;break;case 41:0===E+S+k&&_--;break;case 40:if(0===E+S+k){if(0===p)if(2*C+3*O===533);else p=1;_++}break;case 64:0===S+_+E+k+M+m&&(m=1);break;case 42:case 47:if(!(0<E+k+_))switch(S){case 0:switch(2*h+3*l.charCodeAt(L+1)){case 235:S=47;break;case 220:V=L,S=42}break;case 42:47===h&&42===C&&V+2!==L&&(33===l.charCodeAt(V+2)&&(G+=l.substring(V,L+1)),v="",S=0)}}0===S&&(U+=v)}O=C,C=h,L++}if(0<(V=G.length)){if(B=r,0<F&&(void 0!==(x=s(2,G,B,e,A,P,V,u,f,u))&&0===(G=x).length))return Z+G+W;if(G=B.join(",")+"{"+G+"}",0!==j*T){switch(2!==j||i(G,2)||(T=0),T){case 111:G=G.replace(b,":-moz-$1")+G;break;case 112:G=G.replace(y,"::-webkit-input-$1")+G.replace(y,"::-moz-$1")+G.replace(y,":-ms-input-$1")+G}T=0}}return Z+G+W}function n(e,t,n){var o=t.trim().split(m);t=o;var i=o.length,a=e.length;switch(a){case 0:case 1:var s=0;for(e=0===a?"":e[0]+" ";s<i;++s)t[s]=r(e,t[s],n).trim();break;default:var l=s=0;for(t=[];s<i;++s)for(var u=0;u<a;++u)t[l++]=r(e[u]+" ",o[s],n).trim()}return t}function r(e,t,n){var r=t.charCodeAt(0);switch(33>r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(v,"$1"+e.trim());case 58:return e.trim()+t.replace(v,"$1"+e.trim());default:if(0<1*n&&0<t.indexOf("\f"))return t.replace(v,(58===e.charCodeAt(0)?"":"$1")+e.trim())}return e+t}function o(e,t,n,r){var a=e+";",s=2*t+3*n+4*r;if(944===s){e=a.indexOf(":",9)+1;var l=a.substring(e,a.length-1).trim();return l=a.substring(0,e).trim()+l+";",1===j||2===j&&i(l,1)?"-webkit-"+l+l:l}if(0===j||2===j&&!i(a,1))return a;switch(s){case 1015:return 97===a.charCodeAt(10)?"-webkit-"+a+a:a;case 951:return 116===a.charCodeAt(3)?"-webkit-"+a+a:a;case 963:return 110===a.charCodeAt(5)?"-webkit-"+a+a:a;case 1009:if(100!==a.charCodeAt(4))break;case 969:case 942:return"-webkit-"+a+a;case 978:return"-webkit-"+a+"-moz-"+a+a;case 1019:case 983:return"-webkit-"+a+"-moz-"+a+"-ms-"+a+a;case 883:if(45===a.charCodeAt(8))return"-webkit-"+a+a;if(0<a.indexOf("image-set(",11))return a.replace(C,"$1-webkit-$2")+a;break;case 932:if(45===a.charCodeAt(4))switch(a.charCodeAt(5)){case 103:return"-webkit-box-"+a.replace("-grow","")+"-webkit-"+a+"-ms-"+a.replace("grow","positive")+a;case 115:return"-webkit-"+a+"-ms-"+a.replace("shrink","negative")+a;case 98:return"-webkit-"+a+"-ms-"+a.replace("basis","preferred-size")+a}return"-webkit-"+a+"-ms-"+a+a;case 964:return"-webkit-"+a+"-ms-flex-"+a+a;case 1023:if(99!==a.charCodeAt(8))break;return"-webkit-box-pack"+(l=a.substring(a.indexOf(":",15)).replace("flex-","").replace("space-between","justify"))+"-webkit-"+a+"-ms-flex-pack"+l+a;case 1005:return p.test(a)?a.replace(f,":-webkit-")+a.replace(f,":-moz-")+a:a;case 1e3:switch(t=(l=a.substring(13).trim()).indexOf("-")+1,l.charCodeAt(0)+l.charCodeAt(t)){case 226:l=a.replace(x,"tb");break;case 232:l=a.replace(x,"tb-rl");break;case 220:l=a.replace(x,"lr");break;default:return a}return"-webkit-"+a+"-ms-"+l+a;case 1017:if(-1===a.indexOf("sticky",9))break;case 975:switch(t=(a=e).length-10,s=(l=(33===a.charCodeAt(t)?a.substring(0,t):a).substring(e.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|l.charCodeAt(7))){case 203:if(111>l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102<s?"inline-":"")+"box")+";"+a.replace(l,"-webkit-"+l)+";"+a.replace(l,"-ms-"+l+"box")+";"+a}return a+";";case 938:if(45===a.charCodeAt(5))switch(a.charCodeAt(6)){case 105:return l=a.replace("-items",""),"-webkit-"+a+"-webkit-box-"+l+"-ms-flex-"+l+a;case 115:return"-webkit-"+a+"-ms-flex-item-"+a.replace(S,"")+a;default:return"-webkit-"+a+"-ms-flex-line-pack"+a.replace("align-content","").replace(S,"")+a}break;case 973:case 989:if(45!==a.charCodeAt(3)||122===a.charCodeAt(4))break;case 931:case 953:if(!0===E.test(e))return 115===(l=e.substring(e.indexOf(":")+1)).charCodeAt(0)?o(e.replace("stretch","fill-available"),t,n,r).replace(":fill-available",":stretch"):a.replace(l,"-webkit-"+l)+a.replace(l,"-moz-"+l.replace("fill-",""))+a;break;case 962:if(a="-webkit-"+a+(102===a.charCodeAt(5)?"-ms-"+a:"")+a,211===n+r&&105===a.charCodeAt(13)&&0<a.indexOf("transform",10))return a.substring(0,a.indexOf(";",27)+1).replace(h,"$1-webkit-$2")+a}return a}function i(e,t){var n=e.indexOf(1===t?":":"{"),r=e.substring(0,3!==t?n:10);return n=e.substring(n+1,e.length-1),M(2!==t?r:r.replace(_,"$1"),n,t)}function a(e,t){var n=o(t,t.charCodeAt(0),t.charCodeAt(1),t.charCodeAt(2));return n!==t+";"?n.replace(k," or ($1)").substring(4):"("+t+")"}function s(e,t,n,r,o,i,a,s,l,c){for(var d,f=0,p=t;f<F;++f)switch(d=O[f].call(u,e,p,n,r,o,i,a,s,l,c)){case void 0:case!1:case!0:case null:break;default:p=d}if(p!==t)return p}function l(e){return void 0!==(e=e.prefix)&&(M=null,e?"function"!==typeof e?j=1:(j=2,M=e):j=0),l}function u(e,n){var r=e;if(33>r.charCodeAt(0)&&(r=r.trim()),r=[r],0<F){var o=s(-1,n,r,r,A,P,0,0,0,0);void 0!==o&&"string"===typeof o&&(n=o)}var i=t(R,r,n,0,0);return 0<F&&(void 0!==(o=s(-2,i,r,r,A,P,i.length,0,0,0))&&(i=o)),"",T=0,P=A=1,i}var c=/^\0+/g,d=/[\0\r\f]/g,f=/: */g,p=/zoo|gra/,h=/([,: ])(transform)/g,m=/,\r+?/g,v=/([\t\r\n ])*\f?&/g,g=/@(k\w+)\s*(\S*)\s*/,y=/::(place)/g,b=/:(read-only)/g,x=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,k=/([\s\S]*?);/g,S=/-self|flex-/g,_=/[^]*?(:[rp][el]a[\w-]+)[^]*/,E=/stretch|:\s*\w+\-(?:conte|avail)/,C=/([^-])(image-set\()/,P=1,A=1,T=0,j=1,R=[],O=[],F=0,M=null,D=0;return u.use=function e(t){switch(t){case void 0:case null:F=O.length=0;break;default:if("function"===typeof t)O[F++]=t;else if("object"===typeof t)for(var n=0,r=t.length;n<r;++n)e(t[n]);else D=0|!!t}return e},u.set=l,void 0!==e&&l(e),u},l={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};var u=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,c=function(e){var t=Object.create(null);return function(n){return void 0===t[n]&&(t[n]=e(n)),t[n]}}((function(e){return u.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),d=n(2110),f=n.n(d);function p(){return(p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var h=function(e,t){for(var n=[e[0]],r=0,o=t.length;r<o;r+=1)n.push(t[r],e[r+1]);return n},m=function(e){return null!==e&&"object"==typeof e&&"[object Object]"===(e.toString?e.toString():Object.prototype.toString.call(e))&&!(0,r.typeOf)(e)},v=Object.freeze([]),g=Object.freeze({});function y(e){return"function"==typeof e}function b(e){return e.displayName||e.name||"Component"}function x(e){return e&&"string"==typeof e.styledComponentId}var w="undefined"!=typeof process&&({NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.REACT_APP_SC_ATTR||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.SC_ATTR)||"data-styled",k="5.3.5",S="undefined"!=typeof window&&"HTMLElement"in window,_=Boolean("boolean"==typeof SC_DISABLE_SPEEDY?SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.REACT_APP_SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.REACT_APP_SC_DISABLE_SPEEDY?"false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.REACT_APP_SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.REACT_APP_SC_DISABLE_SPEEDY:"undefined"!=typeof process&&void 0!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.SC_DISABLE_SPEEDY&&""!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.SC_DISABLE_SPEEDY&&("false"!=={NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.SC_DISABLE_SPEEDY&&{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_PAGENAME:"computing-pcd-buying-guide",REACT_APP_SITECODE:"uk",REACT_APP_DEVICE:"fold",REACT_APP_ASSET_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/computing/",REACT_APP_ASSET_PATH_NEW:"https://images.samsung.com/is/image/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_COMPARISON_PATH:"https://images.samsung.com/is/image/samsung/assets/uk/2208/pf/local/uk/purchase",REACT_APP_CONTENT_PATH:"https://images.samsung.com/is/content/samsung/assets/uk/smartphones/galaxy-z/foldables-pf",REACT_APP_3D_ASSET_PATH:"https://d1vp9jkpfdwr15.cloudfront.net/ecom",REACT_APP_TARGET:"cheil-static-ecom",REACT_APP_DEFAULT:"bass"}.SC_DISABLE_SPEEDY)),E={};function C(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];throw new Error("An error occurred. See https://git.io/JUIaE#"+e+" for more information."+(n.length>0?" Args: "+n.join(", "):""))}var P=function(){function e(e){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=e}var t=e.prototype;return t.indexOfGroup=function(e){for(var t=0,n=0;n<e;n++)t+=this.groupSizes[n];return t},t.insertRules=function(e,t){if(e>=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&C(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i<o;i++)this.groupSizes[i]=0}for(var a=this.indexOfGroup(e+1),s=0,l=t.length;s<l;s++)this.tag.insertRule(a,t[s])&&(this.groupSizes[e]++,a++)},t.clearGroup=function(e){if(e<this.length){var t=this.groupSizes[e],n=this.indexOfGroup(e),r=n+t;this.groupSizes[e]=0;for(var o=n;o<r;o++)this.tag.deleteRule(n)}},t.getGroup=function(e){var t="";if(e>=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i<o;i++)t+=this.tag.getRule(i)+"/*!sc*/\n";return t},e}(),A=new Map,T=new Map,j=1,R=function(e){if(A.has(e))return A.get(e);for(;T.has(j);)j++;var t=j++;return A.set(e,t),T.set(t,e),t},O=function(e){return T.get(e)},F=function(e,t){t>=j&&(j=t+1),A.set(e,t),T.set(t,e)},M="style["+w+'][data-styled-version="5.3.5"]',D=new RegExp("^"+w+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i<a;i++)(r=o[i])&&e.registerName(t,r)},B=function(e,t){for(var n=(t.textContent||"").split("/*!sc*/\n"),r=[],o=0,i=n.length;o<i;o++){var a=n[o].trim();if(a){var s=a.match(D);if(s){var l=0|parseInt(s[1],10),u=s[2];0!==l&&(F(u,l),L(e,u,s[3]),e.getTag().insertRules(l,r)),r.length=0}else r.push(a)}}},I=function(){return"undefined"!=typeof window&&void 0!==window.__webpack_nonce__?window.__webpack_nonce__:null},V=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(w))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(w,"active"),r.setAttribute("data-styled-version","5.3.5");var a=I();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},N=function(){function e(e){var t=this.element=V(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n<r;n++){var o=t[n];if(o.ownerNode===e)return o}C(17)}(t),this.length=0}var t=e.prototype;return t.insertRule=function(e,t){try{return this.sheet.insertRule(t,e),this.length++,!0}catch(e){return!1}},t.deleteRule=function(e){this.sheet.deleteRule(e),this.length--},t.getRule=function(e){var t=this.sheet.cssRules[e];return void 0!==t&&"string"==typeof t.cssText?t.cssText:""},e}(),z=function(){function e(e){var t=this.element=V(e);this.nodes=t.childNodes,this.length=0}var t=e.prototype;return t.insertRule=function(e,t){if(e<=this.length&&e>=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e<this.length?this.nodes[e].textContent:""},e}(),U=function(){function e(e){this.rules=[],this.length=0}var t=e.prototype;return t.insertRule=function(e,t){return e<=this.length&&(this.rules.splice(e,0,t),this.length++,!0)},t.deleteRule=function(e){this.rules.splice(e,1),this.length--},t.getRule=function(e){return e<this.length?this.rules[e]:""},e}(),G=S,W={isServer:!S,useCSSOMInjection:!_},Z=function(){function e(e,t,n){void 0===e&&(e=g),void 0===t&&(t={}),this.options=p({},W,{},e),this.gs=t,this.names=new Map(n),this.server=!!e.isServer,!this.server&&S&&G&&(G=!1,function(e){for(var t=document.querySelectorAll(M),n=0,r=t.length;n<r;n++){var o=t[n];o&&"active"!==o.getAttribute(w)&&(B(e,o),o.parentNode&&o.parentNode.removeChild(o))}}(this))}e.registerId=function(e){return R(e)};var t=e.prototype;return t.reconstructWithOptions=function(t,n){return void 0===n&&(n=!0),new e(p({},this.options,{},t),this.gs,n&&this.names||void 0)},t.allocateGSInstance=function(e){return this.gs[e]=(this.gs[e]||0)+1},t.getTag=function(){return this.tag||(this.tag=(n=(t=this.options).isServer,r=t.useCSSOMInjection,o=t.target,e=n?new U(o):r?new N(o):new z(o),new P(e)));var e,t,n,r,o},t.hasNameForId=function(e,t){return this.names.has(e)&&this.names.get(e).has(t)},t.registerName=function(e,t){if(R(e),this.names.has(e))this.names.get(e).add(t);else{var n=new Set;n.add(t),this.names.set(e,n)}},t.insertRules=function(e,t,n){this.registerName(e,t),this.getTag().insertRules(R(e),n)},t.clearNames=function(e){this.names.has(e)&&this.names.get(e).clear()},t.clearRules=function(e){this.getTag().clearGroup(R(e)),this.clearNames(e)},t.clearTag=function(){this.tag=void 0},t.toString=function(){return function(e){for(var t=e.getTag(),n=t.length,r="",o=0;o<n;o++){var i=O(o);if(void 0!==i){var a=e.names.get(i),s=t.getGroup(o);if(a&&s&&a.size){var l=w+".g"+o+'[id="'+i+'"]',u="";void 0!==a&&a.forEach((function(e){e.length>0&&(u+=e+",")})),r+=""+s+l+'{content:"'+u+'"}/*!sc*/\n'}}}return r}(this)},e}(),H=/(a)(d)/gi,$=function(e){return String.fromCharCode(e+(e>25?39:97))};function K(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=$(t%52)+n;return($(t%52)+n).replace(H,"$1-$2")}var X=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},Y=function(e){return X(5381,e)};function q(e){for(var t=0;t<e.length;t+=1){var n=e[t];if(y(n)&&!x(n))return!1}return!0}var Q=Y("5.3.5"),J=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&q(e),this.componentId=t,this.baseHash=X(Q,t),this.baseStyle=n,Z.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=ye(this.rules,e,t,n).join(""),a=K(X(this.baseHash,i)>>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,u=X(this.baseHash,n.hash),c="",d=0;d<l;d++){var f=this.rules[d];if("string"==typeof f)c+=f;else if(f){var p=ye(f,e,t,n),h=Array.isArray(p)?p.join(""):p;u=X(u,h+d),c+=h}}if(c){var m=K(u>>>0);if(!t.hasNameForId(r,m)){var v=n(c,"."+m,void 0,r);t.insertRules(r,m,v)}o.push(m)}}return o.join(" ")},e}(),ee=/^\s*\/\/.*$/gm,te=[":","[",".","#"];function ne(e){var t,n,r,o,i=void 0===e?g:e,a=i.options,l=void 0===a?g:a,u=i.plugins,c=void 0===u?v:u,d=new s(l),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,l,u,c,d){switch(n){case 1:if(0===c&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===u)return r+"/*|*/";break;case 3:switch(u){case 102:case 112:return e(o[0]+r),"";default:return r+(0===d?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),h=function(e,r,i){return 0===r&&-1!==te.indexOf(i[n.length])||i.match(o)?e:"."+t};function m(e,i,a,s){void 0===s&&(s="&");var l=e.replace(ee,""),u=i&&a?a+" "+i+" { "+l+" }":l;return t=s,n=i,r=new RegExp("\\"+n+"\\b","g"),o=new RegExp("(\\"+n+"\\b){2,}"),d(a||!i?"":i,u)}return d.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,h))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=c.length?c.reduce((function(e,t){return t.name||C(15),X(e,t.name)}),5381).toString():"",m}var re=o.createContext(),oe=re.Consumer,ie=o.createContext(),ae=(ie.Consumer,new Z),se=ne();function le(){return(0,o.useContext)(re)||ae}function ue(){return(0,o.useContext)(ie)||se}function ce(e){var t=(0,o.useState)(e.stylisPlugins),n=t[0],r=t[1],i=le(),s=(0,o.useMemo)((function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t}),[e.disableCSSOMInjection,e.sheet,e.target]),l=(0,o.useMemo)((function(){return ne({options:{prefix:!e.disableVendorPrefixes},plugins:n})}),[e.disableVendorPrefixes,n]);return(0,o.useEffect)((function(){a()(n,e.stylisPlugins)||r(e.stylisPlugins)}),[e.stylisPlugins]),o.createElement(re.Provider,{value:s},o.createElement(ie.Provider,{value:l},e.children))}var de=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=se);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return C(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=se),this.name+e.hash},e}(),fe=/([A-Z])/,pe=/([A-Z])/g,he=/^ms-/,me=function(e){return"-"+e.toLowerCase()};function ve(e){return fe.test(e)?e.replace(pe,me).replace(he,"-ms-"):e}var ge=function(e){return null==e||!1===e||""===e};function ye(e,t,n,r){if(Array.isArray(e)){for(var o,i=[],a=0,s=e.length;a<s;a+=1)""!==(o=ye(e[a],t,n,r))&&(Array.isArray(o)?i.push.apply(i,o):i.push(o));return i}return ge(e)?"":x(e)?"."+e.styledComponentId:y(e)?"function"!=typeof(u=e)||u.prototype&&u.prototype.isReactComponent||!t?e:ye(e(t),t,n,r):e instanceof de?n?(e.inject(n,r),e.getName(r)):e:m(e)?function e(t,n){var r,o,i=[];for(var a in t)t.hasOwnProperty(a)&&!ge(t[a])&&(Array.isArray(t[a])&&t[a].isCss||y(t[a])?i.push(ve(a)+":",t[a],";"):m(t[a])?i.push.apply(i,e(t[a],a)):i.push(ve(a)+": "+(r=a,(null==(o=t[a])||"boolean"==typeof o||""===o?"":"number"!=typeof o||0===o||r in l?String(o).trim():o+"px")+";")));return n?[n+" {"].concat(i,["}"]):i}(e):e.toString();var u}var be=function(e){return Array.isArray(e)&&(e.isCss=!0),e};function xe(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return y(e)||m(e)?be(ye(h(v,[e].concat(n)))):0===n.length&&1===e.length&&"string"==typeof e[0]?e:be(ye(h(e,n)))}new Set;var we=function(e,t,n){return void 0===n&&(n=g),e.theme!==n.theme&&e.theme||t||n.theme},ke=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Se=/(^-|-$)/g;function _e(e){return e.replace(ke,"-").replace(Se,"")}var Ee=function(e){return K(Y(e)>>>0)};function Ce(e){return"string"==typeof e&&!0}var Pe=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Ae=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e};function Te(e,t,n){var r=e[n];Pe(t)&&Pe(r)?je(r,t):e[n]=t}function je(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var o=0,i=n;o<i.length;o++){var a=i[o];if(Pe(a))for(var s in a)Ae(s)&&Te(e,a[s],s)}return e}var Re=o.createContext(),Oe=Re.Consumer;function Fe(e){var t=(0,o.useContext)(Re),n=(0,o.useMemo)((function(){return function(e,t){return e?y(e)?e(t):Array.isArray(e)||"object"!=typeof e?C(8):t?p({},t,{},e):e:C(14)}(e.theme,t)}),[e.theme,t]);return e.children?o.createElement(Re.Provider,{value:n},e.children):null}var Me={};function De(e,t,n){var r=x(e),i=!Ce(e),a=t.attrs,s=void 0===a?v:a,l=t.componentId,u=void 0===l?function(e,t){var n="string"!=typeof e?"sc":_e(e);Me[n]=(Me[n]||0)+1;var r=n+"-"+Ee("5.3.5"+n+Me[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,d=t.displayName,h=void 0===d?function(e){return Ce(e)?"styled."+e:"Styled("+b(e)+")"}(e):d,m=t.displayName&&t.componentId?_e(t.displayName)+"-"+t.componentId:t.componentId||u,w=r&&e.attrs?Array.prototype.concat(e.attrs,s).filter(Boolean):s,k=t.shouldForwardProp;r&&e.shouldForwardProp&&(k=t.shouldForwardProp?function(n,r,o){return e.shouldForwardProp(n,r,o)&&t.shouldForwardProp(n,r,o)}:e.shouldForwardProp);var S,_=new J(n,m,r?e.componentStyle:void 0),E=_.isStatic&&0===s.length,C=function(e,t){return function(e,t,n,r){var i=e.attrs,a=e.componentStyle,s=e.defaultProps,l=e.foldedComponentIds,u=e.shouldForwardProp,d=e.styledComponentId,f=e.target,h=function(e,t,n){void 0===e&&(e=g);var r=p({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in y(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(we(t,(0,o.useContext)(Re),s)||g,t,i),m=h[0],v=h[1],b=function(e,t,n,r){var o=le(),i=ue();return t?e.generateAndInjectStyles(g,o,i):e.generateAndInjectStyles(n,o,i)}(a,r,m),x=n,w=v.$as||t.$as||v.as||t.as||f,k=Ce(w),S=v!==t?p({},t,{},v):t,_={};for(var E in S)"$"!==E[0]&&"as"!==E&&("forwardedAs"===E?_.as=S[E]:(u?u(E,c,w):!k||c(E))&&(_[E]=S[E]));return t.style&&v.style!==t.style&&(_.style=p({},t.style,{},v.style)),_.className=Array.prototype.concat(l,d,b!==d?b:null,t.className,v.className).filter(Boolean).join(" "),_.ref=x,(0,o.createElement)(w,_)}(S,e,t,E)};return C.displayName=h,(S=o.forwardRef(C)).attrs=w,S.componentStyle=_,S.displayName=h,S.shouldForwardProp=k,S.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):v,S.styledComponentId=m,S.target=r?e.target:e,S.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(Ce(e)?e:_e(b(e)));return De(e,p({},o,{attrs:w,componentId:i}),n)},Object.defineProperty(S,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?je({},e.defaultProps,t):t}}),S.toString=function(){return"."+S.styledComponentId},i&&f()(S,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),S}var Le=function(e){return function e(t,n,o){if(void 0===o&&(o=g),!(0,r.isValidElementType)(n))return C(1,String(n));var i=function(){return t(n,o,xe.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,p({},o,{},r))},i.attrs=function(r){return e(t,n,p({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(De,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach((function(e){Le[e]=Le(e)}));var Be=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=q(e),Z.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(ye(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&Z.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}();function Ie(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=xe.apply(void 0,[e].concat(n)),a="sc-global-"+Ee(JSON.stringify(i)),s=new Be(i,a);function l(e){var t=le(),n=ue(),r=(0,o.useContext)(Re),i=(0,o.useRef)(t.allocateGSInstance(a)).current;return t.server&&u(i,e,t,r,n),(0,o.useLayoutEffect)((function(){if(!t.server)return u(i,e,t,r,n),function(){return s.removeStyles(i,t)}}),[i,e,t,r,n]),null}function u(e,t,n,r,o){if(s.isStatic)s.renderStyles(e,E,n,o);else{var i=p({},t,{theme:we(t,r,l.defaultProps)});s.renderStyles(e,i,n,o)}}return o.memo(l)}function Ve(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=xe.apply(void 0,[e].concat(n)).join(""),i=Ee(o);return new de(i,o)}var Ne=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString();if(!t)return"";var n=I();return"<style "+[n&&'nonce="'+n+'"',w+'="true"','data-styled-version="5.3.5"'].filter(Boolean).join(" ")+">"+t+"</style>"},this.getStyleTags=function(){return e.sealed?C(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return C(2);var n=((t={})[w]="",t["data-styled-version"]="5.3.5",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),r=I();return r&&(n.nonce=r),[o.createElement("style",p({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new Z({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?C(2):o.createElement(ce,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return C(3)},e}(),ze=function(e){var t=o.forwardRef((function(t,n){var r=(0,o.useContext)(Re),i=e.defaultProps,a=we(t,r,i);return o.createElement(e,p({},t,{theme:a,ref:n}))}));return f()(t,e),t.displayName="WithTheme("+b(e)+")",t},Ue=function(){return(0,o.useContext)(Re)},Ge={StyleSheet:Z,masterSheet:ae},We=Le},5314:function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports.default=e.exports},807:function(e){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},4011:function(e,t,n){var r=n(5314);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports.default=e.exports},8181:function(e){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},5962:function(e){e.exports=function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},1581:function(e){e.exports=function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},6258:function(e){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},4815:function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},4534:function(e,t,n){var r=n(807),o=n(1581),i=n(5816),a=n(6258);e.exports=function(e,t){return r(e)||o(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},621:function(e){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports.default=e.exports},8485:function(e,t,n){var r=n(4011),o=n(5962),i=n(5816),a=n(4815);e.exports=function(e){return r(e)||o(e)||i(e)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},5816:function(e,t,n){var r=n(5314);e.exports=function(e,t){if(e){if("string"===typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},5971:function(e,t,n){"use strict";n.r(t),n.d(t,{__addDisposableResource:function(){return M},__assign:function(){return i},__asyncDelegator:function(){return E},__asyncGenerator:function(){return _},__asyncValues:function(){return C},__await:function(){return S},__awaiter:function(){return h},__classPrivateFieldGet:function(){return R},__classPrivateFieldIn:function(){return F},__classPrivateFieldSet:function(){return O},__createBinding:function(){return v},__decorate:function(){return s},__disposeResources:function(){return L},__esDecorate:function(){return u},__exportStar:function(){return g},__extends:function(){return o},__generator:function(){return m},__importDefault:function(){return j},__importStar:function(){return T},__makeTemplateObject:function(){return P},__metadata:function(){return p},__param:function(){return l},__propKey:function(){return d},__read:function(){return b},__rest:function(){return a},__runInitializers:function(){return c},__setFunctionName:function(){return f},__spread:function(){return x},__spreadArray:function(){return k},__spreadArrays:function(){return w},__values:function(){return y}});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},r(e,t)};function o(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}var i=function(){return i=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},i.apply(this,arguments)};function a(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}function s(e,t,n,r){var o,i=arguments.length,a=i<3?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(i<3?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a}function l(e,t){return function(n,r){t(n,r,e)}}function u(e,t,n,r,o,i){function a(e){if(void 0!==e&&"function"!==typeof e)throw new TypeError("Function expected");return e}for(var s,l=r.kind,u="getter"===l?"get":"setter"===l?"set":"value",c=!t&&e?r.static?e:e.prototype:null,d=t||(c?Object.getOwnPropertyDescriptor(c,r.name):{}),f=!1,p=n.length-1;p>=0;p--){var h={};for(var m in r)h[m]="access"===m?{}:r[m];for(var m in r.access)h.access[m]=r.access[m];h.addInitializer=function(e){if(f)throw new TypeError("Cannot add initializers after decoration has completed");i.push(a(e||null))};var v=(0,n[p])("accessor"===l?{get:d.get,set:d.set}:d[u],h);if("accessor"===l){if(void 0===v)continue;if(null===v||"object"!==typeof v)throw new TypeError("Object expected");(s=a(v.get))&&(d.get=s),(s=a(v.set))&&(d.set=s),(s=a(v.init))&&o.unshift(s)}else(s=a(v))&&("field"===l?o.unshift(s):d[u]=s)}c&&Object.defineProperty(c,r.name,d),f=!0}function c(e,t,n){for(var r=arguments.length>2,o=0;o<t.length;o++)n=r?t[o].call(e,n):t[o].call(e);return r?n:void 0}function d(e){return"symbol"===typeof e?e:"".concat(e)}function f(e,t,n){return"symbol"===typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:n?"".concat(n," ",t):t})}function p(e,t){if("object"===typeof Reflect&&"function"===typeof Reflect.metadata)return Reflect.metadata(e,t)}function h(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{l(r.next(e))}catch(t){i(t)}}function s(e){try{l(r.throw(e))}catch(t){i(t)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}function m(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"===typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,s[0]&&(a=0)),a;)try{if(n=1,r&&(o=2&s[0]?r.return:s[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,s[1])).done)return o;switch(r=0,o&&(s=[2&s[0],o.value]),s[0]){case 0:case 1:o=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,r=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(o=(o=a.trys).length>0&&o[o.length-1])&&(6===s[0]||2===s[0])){a=0;continue}if(3===s[0]&&(!o||s[1]>o[0]&&s[1]<o[3])){a.label=s[1];break}if(6===s[0]&&a.label<o[1]){a.label=o[1],o=s;break}if(o&&a.label<o[2]){a.label=o[2],a.ops.push(s);break}o[2]&&a.ops.pop(),a.trys.pop();continue}s=t.call(e,a)}catch(l){s=[6,l],r=0}finally{n=o=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}var v=Object.create?function(e,t,n,r){void 0===r&&(r=n);var o=Object.getOwnPropertyDescriptor(t,n);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,o)}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]};function g(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||v(t,e,n)}function y(e){var t="function"===typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"===typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function b(e,t){var n="function"===typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(s){o={error:s}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function x(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(b(arguments[t]));return e}function w(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;t<n;t++)for(var i=arguments[t],a=0,s=i.length;a<s;a++,o++)r[o]=i[a];return r}function k(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;o<i;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))}function S(e){return this instanceof S?(this.v=e,this):new S(e)}function _(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),i=[];return r={},a("next"),a("throw"),a("return",(function(e){return function(t){return Promise.resolve(t).then(e,u)}})),r[Symbol.asyncIterator]=function(){return this},r;function a(e,t){o[e]&&(r[e]=function(t){return new Promise((function(n,r){i.push([e,t,n,r])>1||s(e,t)}))},t&&(r[e]=t(r[e])))}function s(e,t){try{(n=o[e](t)).value instanceof S?Promise.resolve(n.value.v).then(l,u):c(i[0][2],n)}catch(r){c(i[0][3],r)}var n}function l(e){s("next",e)}function u(e){s("throw",e)}function c(e,t){e(t),i.shift(),i.length&&s(i[0][0],i[0][1])}}function E(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:S(e[r](t)),done:!1}:o?o(t):t}:o}}function C(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=y(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){(function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)})(r,o,(t=e[n](t)).done,t.value)}))}}}function P(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var A=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function T(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&v(t,e,n);return A(t,e),t}function j(e){return e&&e.__esModule?e:{default:e}}function R(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"===typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)}function O(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"===typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}function F(e,t){if(null===t||"object"!==typeof t&&"function"!==typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"===typeof e?t===e:e.has(t)}function M(e,t,n){if(null!==t&&void 0!==t){if("object"!==typeof t&&"function"!==typeof t)throw new TypeError("Object expected.");var r,o;if(n){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");r=t[Symbol.asyncDispose]}if(void 0===r){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");r=t[Symbol.dispose],n&&(o=r)}if("function"!==typeof r)throw new TypeError("Object not disposable.");o&&(r=function(){try{o.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:r,async:n})}else n&&e.stack.push({async:!0});return t}var D="function"===typeof SuppressedError?SuppressedError:function(e,t,n){var r=new Error(n);return r.name="SuppressedError",r.error=e,r.suppressed=t,r};function L(e){function t(t){e.error=e.hasError?new D(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}return function n(){for(;e.stack.length;){var r=e.stack.pop();try{var o=r.dispose&&r.dispose.call(r.value);if(r.async)return Promise.resolve(o).then(n,(function(e){return t(e),n()}))}catch(i){t(i)}}if(e.hasError)throw e.error}()}t.default={__extends:o,__assign:i,__rest:a,__decorate:s,__param:l,__metadata:p,__awaiter:h,__generator:m,__createBinding:v,__exportStar:g,__values:y,__read:b,__spread:x,__spreadArrays:w,__spreadArray:k,__await:S,__asyncGenerator:_,__asyncDelegator:E,__asyncValues:C,__makeTemplateObject:P,__importStar:T,__importDefault:j,__classPrivateFieldGet:R,__classPrivateFieldSet:O,__classPrivateFieldIn:F,__addDisposableResource:M,__disposeResources:L}},4400:function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:function(){return r}})},7853:function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,{Z:function(){return r}})},4531:function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function o(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,{Z:function(){return o}})},9472:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2327);function o(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=(0,r.Z)(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var o=0,i=function(){};return{s:i,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){l=!0,a=e},f:function(){try{s||null==n.return||n.return()}finally{if(l)throw a}}}}},6222:function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,{Z:function(){return r}})},7166:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(9675);function o(){o=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",l=i.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(A){u=function(e,t,n){return e[t]=n}}function c(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,i=Object.create(o.prototype),a=new E(r||[]);return i._invoke=function(e,t,n){var r="suspendedStart";return function(o,i){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw i;return P()}for(n.method=o,n.arg=i;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===f)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=d(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===f)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),i}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(A){return{type:"throw",arg:A}}}e.wrap=c;var f={};function p(){}function h(){}function m(){}var v={};u(v,a,(function(){return this}));var g=Object.getPrototypeOf,y=g&&g(g(C([])));y&&y!==t&&n.call(y,a)&&(v=y);var b=m.prototype=p.prototype=Object.create(v);function x(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){function o(i,a,s,l){var u=d(e[i],e,a);if("throw"!==u.type){var c=u.arg,f=c.value;return f&&"object"==(0,r.Z)(f)&&n.call(f,"__await")?t.resolve(f.__await).then((function(e){o("next",e,s,l)}),(function(e){o("throw",e,s,l)})):t.resolve(f).then((function(e){c.value=e,s(c)}),(function(e){return o("throw",e,s,l)}))}l(u.arg)}var i;this._invoke=function(e,n){function r(){return new t((function(t,r){o(e,n,t,r)}))}return i=i?i.then(r,r):r()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return f;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return f}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function E(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function C(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,o=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:P}}function P(){return{value:void 0,done:!0}}return h.prototype=m,u(b,"constructor",m),u(m,"constructor",h),h.displayName=u(m,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,m):(e.__proto__=m,u(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},x(w.prototype),u(w.prototype,s,(function(){return this})),e.AsyncIterator=w,e.async=function(t,n,r,o,i){void 0===i&&(i=Promise);var a=new w(c(t,n,r,o),i);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},x(b),u(b,l,"Generator"),u(b,a,(function(){return this})),u(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=C,E.prototype={constructor:E,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(_),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],a=i.completion;if("root"===i.tryLoc)return r("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return r(i.catchLoc,!0);if(this.prev<i.finallyLoc)return r(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return r(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return r(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,f):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;_(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}},3430:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(2327);function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,o,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(l){s=!0,o=l}finally{try{a||null==n.return||n.return()}finally{if(s)throw o}}return i}}(e,t)||(0,r.Z)(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},5531:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(4400);var o=n(2327);function i(e){return function(e){if(Array.isArray(e))return(0,r.Z)(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||(0,o.Z)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},9675:function(e,t,n){"use strict";function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}n.d(t,{Z:function(){return r}})},2327:function(e,t,n){"use strict";n.d(t,{Z:function(){return o}});var r=n(4400);function o(e,t){if(e){if("string"===typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}}},t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}n.m=e,n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.f={},n.e=function(e){return Promise.all(Object.keys(n.f).reduce((function(t,r){return n.f[r](e,t),t}),[]))},n.u=function(e){return"static/js/"+e+".8b9ce601.chunk.js"},n.miniCssF=function(e){},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},function(){var e={},t="Computing-pcd-buying-guide:";n.l=function(r,o,i,a){if(e[r])e[r].push(o);else{var s,l;if(void 0!==i)for(var u=document.getElementsByTagName("script"),c=0;c<u.length;c++){var d=u[c];if(d.getAttribute("src")==r||d.getAttribute("data-webpack")==t+i){s=d;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,n.nc&&s.setAttribute("nonce",n.nc),s.setAttribute("data-webpack",t+i),s.src=r),e[r]=[o];var f=function(t,n){s.onerror=s.onload=null,clearTimeout(p);var o=e[r];if(delete e[r],s.parentNode&&s.parentNode.removeChild(s),o&&o.forEach((function(e){return e(n)})),t)return t(n)},p=setTimeout(f.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=f.bind(null,s.onerror),s.onload=f.bind(null,s.onload),l&&document.head.appendChild(s)}}}(),n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.p="/",function(){var e={179:0};n.f.j=function(t,r){var o=n.o(e,t)?e[t]:void 0;if(0!==o)if(o)r.push(o[2]);else{var i=new Promise((function(n,r){o=e[t]=[n,r]}));r.push(o[2]=i);var a=n.p+n.u(t),s=new Error;n.l(a,(function(r){if(n.o(e,t)&&(0!==(o=e[t])&&(e[t]=void 0),o)){var i=r&&("load"===r.type?"missing":r.type),a=r&&r.target&&r.target.src;s.message="Loading chunk "+t+" failed.\n("+i+": "+a+")",s.name="ChunkLoadError",s.type=i,s.request=a,o[1](s)}}),"chunk-"+t,t)}};var t=function(t,r){var o,i,a=r[0],s=r[1],l=r[2],u=0;if(a.some((function(t){return 0!==e[t]}))){for(o in s)n.o(s,o)&&(n.m[o]=s[o]);if(l)l(n)}for(t&&t(r);u<a.length;u++)i=a[u],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0},r=self.webpackChunkComputing_pcd_buying_guide=self.webpackChunkComputing_pcd_buying_guide||[];r.forEach(t.bind(null,0)),r.push=t.bind(null,r.push.bind(r))}(),function(){"use strict";var e,t=n(2791),r=n(1250),o=n(4861),i=n(3978);function a(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var s,l,u,c,d,f,p,h,m,v,g,y,b,x,w,k={colors:{black:"#000000",offBlack:"#363636",grey:"#E8E8E8",lightGrey:"#F4F4F4",white:"#ffffff",offWhite:"#F2F2F2",primary:"#006FF2",accent:"#4497F4",secondary:"#0274C2",red:"#FF4337",green:"#0f0",orange:"#E56F2C",blue:"#3A84F7",priceBlue:"#2289FB",newBlue:"#5288fc"},transition:{default:"0.3s"},fonts:{primary:"SamsungOne, sans-serif",secondary:"SamsungSharpSans, sans-serif",tertiary:"sssM, SamsungSharpSans, sans-serif",quaternary:"sssR, SamsungSharpSans, sans-serif",baseSize:[14,16],sizes:{terms:8,xs:10,button:12,s:[10,12],sm:[12,14],m:[14,16],l:[14,18],lm:[16,20],xl:[18,24],title:[24,30],xsl:[26,40],xxl:[28,45],massive:[36,55],brow:15,body:[14,16],video:12}},breakpoints:{desktop:1440,tablet:900,mobile:767}},S=(0,i.createGlobalStyle)(e||(e=a(["\n @font-face {\n font-family: sssM;\n src: url('https://www.samsung.com/etc/designs/smg/global/fonts/samsungsharpsans-medium_v2.woff2');\n }\n\n .cheil-static *, .cheil-static *:after, .cheil-static *:before {\n box-sizing: border-box;\n -moz-box-sizing: border-box;\n -webkit-box-sizing: border-box;\n scroll-behavior: smooth;\n\n }\n\n .cheil-static {\n scroll-behavior: smooth;\n }\n\n body {\n margin: 0;\n }\n\n"]))),_=function(e){return function(e,t){var n=Object.keys(k.breakpoints).map((function(e){return k.breakpoints[e]})).sort((function(e,t){return e-t}));if(Array.isArray(e)&&e.length>1){var r=e.map((function(e,r){return 0===r?"".concat(t,": ").concat(e,"px;"):"\n @media screen and (min-width: ".concat(n[r-1],"px) {\n ").concat(t,": ").concat(e,"px;\n }\n\n ")}));return r.push(r.shift()),r.join("")}var o=e;return"\n ".concat(t,": ").concat(o,"px;\n ")}(e,"font-size")},E=n(184),C=(0,t.memo)((0,i.default)((function(e){var t=e.className,n=e.children,r=(e.sanitize,e.style);return(0,E.jsx)("p",{className:t,style:r,children:n})}))(s||(s=a(["\n font-family: ",";\n font-weight: ",";\n text-align: ",";\n margin: ",";\n margin-top:",";\n border-radius: ",";\n border: ",";\n padding: ",";\n width: ",";\n white-space: ",";\n text-underline-offset: ",";\n text-decoration: ",";\n line-height:1.4!important;\n color: ",";\n ","\n"])),(function(e){return e.font?e.theme.fonts[e.font]:e.theme.fonts.primary}),(function(e){return e.weight||"normal"}),(function(e){return e.align||"left"}),(function(e){return e.margin||"15px 0"}),(function(e){return e.margin||"0"}),(function(e){return e.borderRadius||"0"}),(function(e){return e.border||"none"}),(function(e){return e.padding||"0"}),(function(e){return e.width||"auto"}),(function(e){return e.whiteSpace||"normal"}),(function(e){return e.textUnderlineOffset||"auto"}),(function(e){return e.underline?"underline":"none"}),(function(e){return e.color?e.theme.colors[e.color]:e.theme.color}),(function(e){return _(e.size?e.theme.fonts.sizes[e.size]||e.size:e.theme.fonts.baseSize)}))),P=n(3430),A=(0,t.memo)((0,i.default)((function(e){var t=e.className,n=e.children,r=e.ref,o=e.id,i=e.onClick,a=e.style;return(0,E.jsx)("div",{id:o,className:t,onClick:i,ref:r,style:a,children:n})}))(l||(l=a(["\n display: ",";\n position: ",";\n background-size: ",";\n background-repeat: no-repeat;\n background-color: ",";\n border-bottom-left-radius: ",";\n border-top-right-radius: ",";\n border-bottom-right-radius: ",";\n border-top-left-radius: ",";\n flex-direction: ",";\n flex-grow: ",";\n width: ",";\n height: ",";\n justify-content: ",";\n align-items: ",";\n flex-wrap: ",";\n margin: ",";\n padding: ",";\n background: ",";\n opacity: ",";\n ","\n &.feature {\n border-right: 2px solid #eaeaea;\n }\n &.feature:last-child {\n border-right: none;\n }\n"])),(function(e){return e.display?e.display:"flex"}),(function(e){return e.position?e.position:"relative"}),(function(e){return e.backgroundSize||""}),(function(e){return e.backgroundColor||""}),(function(e){return e.borderBottomLeftRadius||"0"}),(function(e){return e.borderTopRightRadius||"0"}),(function(e){return e.borderBottomRightRadius||"0"}),(function(e){return e.borderTopLeftRadius||"0"}),(function(e){return e.row?"row":"column"}),(function(e){return e.grow||"unset"}),(function(e){return e.width||"auto"}),(function(e){return e.height||"auto"}),(function(e){return e.align||"center"}),(function(e){return e.alignItems||"center"}),(function(e){return e.wrap||(e.row?"initial":e.wrap)}),(function(e){return e.margin||"0 auto"}),(function(e){return e.padding||"10px"}),(function(e){return e.background||"initial"}),(function(e){return e.opacity||"1"}),(function(e){return"absolute"===e.position?"\n top: ".concat(e.top||"auto",";\n bottom: ").concat(e.bottom||"auto",";\n left:").concat(e.left||"auto",";\n right: ").concat(e.right||"auto",";\n "):""}))),T=A,j=(0,i.default)(T)(u||(u=a(["\n position: absolute;\n width: 100%;\n height: 100%;\n background-color: #f5f5f563;\n"]))),R=function(e){var n=e.title,r=e.setSelectedTab,i=e.index,a=e.isActive,s=e.image,l=e.imageAlt,u=(0,o.dD)(),c=(0,t.useCallback)((function(){r(i)}),[r,i]);return(0,E.jsx)(T,{width:u?"100%":"25%",style:{zIndex:2,background:"rgba(39,62,84,0.82);",margin:"0"},padding:"0",children:(0,E.jsx)(T,{style:{padding:"4px",width:"100%",cursor:"pointer",backgroundColor:a?"#fff":"transparent",borderTopLeftRadius:"7px",borderTopRightRadius:"7px"},className:"".concat(a?"active":""),onClick:c,children:(0,E.jsxs)(T,{background:a?"#fff":"#e3e3e340",borderRadius:a?"7px":"0px",width:"100%",children:[(0,E.jsx)(C,{weight:"bold",align:"center",style:{margin:"8px 0"},font:"secondary",children:n}),a?null:(0,E.jsx)(j,{}),(0,E.jsx)("img",{style:{width:u?"100%":"50%"},src:s||"",alt:l||""}),(0,E.jsx)(T,{padding:"0",position:"absolute",right:u?"-10px":"15px",bottom:"-15px",width:u?"50px":"auto"})]})})})},O=function(e){var n=e.children,r=e.preSelectedTabIndex,i=((0,o.dD)(),(0,t.useState)(r||0)),a=(0,P.Z)(i,2),s=a[0],l=a[1];return(0,E.jsxs)(T,{width:"95%",padding:"0px 0px",children:[(0,E.jsx)(T,{width:"100%",padding:"0",style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center"},children:n.map((function(e,t){return(0,E.jsx)(R,{title:e.props.title,image:e.props.image,imageAlt:e.props.imageAlt,index:t,isActive:t===s,setSelectedTab:l},e.props.title)}))}),n[s]]})},F=function(e){var t=e.children;return(0,E.jsx)(o.W2,{width:"100%",padding:"0",children:t})},M=function(e){var t=e.href,n=e.target,r=e.rel,o=e.className,i=(e.textDecoration,e.children);return(0,E.jsx)("a",{className:o,href:t,target:n,rel:r,children:i})},D=i.default.a.withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(c||(c=a(["\n padding: ",";\n font-family: ",";\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: inherit;\n letter-spacing: inherit;\n font-size: ",";\n color: ",";\n background: ",";\n border-color: ",";\n border-radius: 40px;\n margin: 5px 3px;\n border-width: 1px;\n text-decoration: none;\n font-weight: bold;\n cursor: ",";\n pointer-events: ",";\n opacity: ",";\n @media screen and (min-width: ","px) {\n padding: ",";\n }\n &:hover,\n &:focus {\n color: ",";\n background: transparent;\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.padding?e.theme.padding:"15px 10px"}),(function(e){return e.theme.fonts.primary}),(function(e){return e.theme.fontSize?e.theme.fontSize:"16px"}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"none":"all"}),(function(e){return e.disabled?"0.3":"1"}),(function(e){return e.theme.breakpoints.desktop}),(function(e){return e.theme.padding?e.theme.padding:"10px 20px"}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black})),L=(i.default.button.withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(d||(d=a(["\n padding: 10px 24px 10px 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: inherit;\n letter-spacing: inherit;\n font-size: 16px;\n font-weight: 700;\n color: ",";\n background: ",";\n border-color: ",";\n border-radius: 40px;\n margin: 0;\n border-width: 1px;\n border-style: solid;\n cursor: ",";\n pointer-events: ",";\n @media screen and (min-width: ","px) {\n padding: 14px 48px;\n }\n &:hover,\n &:focus {\n color: ",";\n background: transparent;\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"none":"all"}),(function(e){return e.theme.breakpoints.desktop}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black})),(0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(f||(f=a(["\n background: ",";\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n font-weight: bold;\n\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white})),i.default.button.withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(p||(p=a(["\n padding: 10px 24px 10px 24px;\n display: flex;\n justify-content: center;\n align-items: center;\n text-transform: inherit;\n letter-spacing: inherit;\n font-size: 16px;\n font-weight: 700;\n background: ",";\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n border-color: ",";\n border-radius: 40px;\n margin: 0;\n border-width: 1px;\n border-style: solid;\n cursor: ",";\n pointer-events: ",";\n @media screen and (min-width: ","px) {\n padding: 14px 48px;\n }\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n border-color: #767676 !important;\n background-color: #767676 !important;\n color: #fff !important;\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.disabled?"default":"pointer"}),(function(e){return e.disabled?"none":"all"}),(function(e){return e.theme.breakpoints.desktop}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white})),(0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(h||(h=a(["\n background: transparent;\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n font-weight: bold;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white})),(0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(m||(m=a(["\n background: transparent;\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n font-weight: bold;\n &:hover,\n &:focus {\n color: ",";\n background: ",";\n border-color: ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.black}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white})),(0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(v||(v=a(["\n background: ",";\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n padding: 10px 25px;\n border-color: transparent;\n font-weight: bold;\n //border-color: ",";\n border-width: 1px;\n border-style: solid;\n &:hover,\n &:focus {\n color: ",";\n background: transparent;\n //border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.blue}))),B=((0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(g||(g=a(["\n background: ",";\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n padding: 10px 25px;\n border-color: transparent;\n font-weight: bold;\n border:1px solid white\n &:hover,\n &:focus {\n color: ",";\n background: transparent;\n border: 1px solid ",";\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.blue})),(0,i.default)(D).withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(y||(y=a(["\n background: ",";\n color: ",";\n text-transform: none;\n letter-spacing: normal;\n border-color: transparent;\n padding: 10px 55px 10px 55px;\n font-weight: bold;\n &:hover,\n &:focus {\n color: ",";\n background: transparent;\n border-color: ",";\n border-width: 1px;\n border-style: solid;\n transition: all 0.3s ease-in-out;\n }\n &:disabled {\n opacity: 0.3;\n }\n"])),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.blue}),(function(e){return e.theme.colors.blue})),(0,i.default)(M)(b||(b=a(["\n background: transparent;\n font-family: ",";\n color: ",";\n font-size: 16px;\n font-weight: 700;\n text-decoration: ",';\n border: none;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n position: relative;\n &:after {\n content: "";\n position: absolute;\n bottom: -2px;\n left: 50%;\n transform: translateX(-50%);\n width: 100%;\n height: 2px;\n background: ',";\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n &:hover,\n &:focus {\n &:after {\n width: 0;\n }\n }\n"])),(function(e){return e.font?e.theme.fonts[e.font]:e.theme.fonts.primary}),(function(e){return e.theme.colors.black}),(function(e){return e.textDecoration||"none"}),(function(e){return e.theme.colors.black}))),I=((0,i.default)(M)(x||(x=a(["\n background: transparent;\n font-family: ",";\n color: ",";\n font-size: 16px;\n font-weight: 700;\n text-decoration: ",';\n border: none;\n border-radius: 0;\n padding: 0;\n cursor: pointer;\n position: relative;\n &:after {\n content: "";\n position: absolute;\n bottom: -2px;\n left: 50%;\n transform: translateX(-50%);\n width: 100%;\n height: 2px;\n background: ',";\n transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);\n pointer-events: none;\n }\n &:hover,\n &:focus {\n &:after {\n width: 0;\n }\n }\n"])),(function(e){return e.font?e.theme.fonts[e.font]:e.theme.fonts.primary}),(function(e){return e.theme.colors.white}),(function(e){return e.textDecoration||"none"}),(function(e){return e.theme.colors.white})),i.default.button.withConfig({shouldForwardProp:function(e,t){return!["hidden"].includes(e)}})(w||(w=a(["\n background: transparent;\n color: ",";\n font-weight: bold;\n border: none;\n border-radius: 0;\n border-bottom: 2px solid ",";\n padding: 0;\n cursor: pointer;\n"])),(function(e){return e.theme.colors.white}),(function(e){return e.theme.colors.white})),JSON.parse('{"o":[{"title":"Galaxy Book4 Ultra","modelCode":"NP960XGL-XG2UK","icons":[{"title":"Next-level Intel\xae Core\u2122 Ultra 7 processor 155H","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/chip.svg?$64_64_PNG$"},{"title":"High res, vibrant Dynamic AMOLED 2X touchscreen","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/uk-feature-go-where-inspiration-strikes-534931614.png?$64_64_PNG$"},{"title":"NVIDIA\xae GeForce RTX\u2122 4070 for gaming & creativity","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/uk-galaxy-book2-pro-15inch-np950xeda-416488-531767122.png?$64_64_PNG$"},{"title":"Best for Gaming","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/Layer_1_1.png?$64_64_PNG$"}],"colors":[{"title":["Graphite"],"color":["#494d53"]}],"link":"/uk/computers/galaxy-book/galaxy-book4-ultra-16-inch-i7-16gb-1tb-np960xgl-xg2uk","chooseModelLink":"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG2UK","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/lifestyle-book-ultra4_ultra.png?$N_344_PNG$"},{"title":"Galaxy Book4 Pro 360","modelCode":"NP960QGK-KG2UK","icons":[{"title":"2-in-1 design for work and play","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/two-in-one.svg?$64_64_PNG$"},{"title":"S Pen for additional creativity","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/415529/uk-galaxy-book2-pro-360-13inch-np930qeda-531765098.svg?$64_64_PNG$"},{"title":"Exceptional Intel\xae Core\u2122 Ultra 7 processor 155H","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/chip.svg?$64_64_PNG$"},{"title":"Best for creativity","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/Layer_1_1.png?$64_64_PNG$"}],"colors":[{"title":["Graphite","Beige"],"color":["#494d53","#bdb290"]}],"link":"/uk/computers/galaxy-book/galaxy-book4-pro-360-16-inch-i7-16gb-512gb-grey-np960qgk-kg2uk","chooseModelLink":"/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP960QGK-KG2UK","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/lifestyle-book4_pro360.png?$N_344_PNG$"},{"title":"Galaxy Book4 Pro","modelCode":"NP940XGK-KG2UK","icons":[{"title":"Lightweight for working anywhere","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/lightweight.svg?$64_64_PNG$"},{"title":"Intel\xae Core\u2122 Ultra 7 processor 155H for exceptional performance","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/chip.svg?$64_64_PNG$"},{"title":"Intuitive AMOLED 2X touchscreen","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/touchscreen-tap.svg?$64_64_PNG$"},{"title":"Best for working anywhere","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/Layer_1_1.png?$64_64_PNG$"}],"colors":[{"title":["Graphite"],"color":["#494d53"]}],"link":"/uk/computers/galaxy-book/galaxy-book4-pro-14-inch-i7-16gb-512gb-np940xgk-kg2uk","chooseModelLink":"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP940XGK-KG2UK","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/lifestyle-book4_pro.png?$N_344_PNG$"},{"title":"Galaxy Book4 360","modelCode":"NP750QGK-KG3UK","icons":[{"title":"Portable, convertible 2-in-1 design","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/two-in-one.svg?$64_64_PNG$"},{"title":"Powerful Intel\xae Core\u2122 7 processor 150U","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/chip.svg?$64_64_PNG$"},{"title":"High resolution Intel\xaeGraphics card","icon":"https://images.samsung.com/is/content/samsung/assets/uk/computing/touchscreen-tap.svg?$64_64_PNG$"},{"title":"Best for content streaming","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/Layer_1_1.png?$64_64_PNG$"}],"colors":[{"title":["Graphite"],"color":["#494d53"]}],"link":"/uk/computers/galaxy-book/galaxy-book4-360-15-6-inch-i5-8gb-256gb-np750qgk-kg3uk","chooseModelLink":"/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP750QGK-KG3UK","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/lifestyle-book4_360.png?$N_344_PNG$"}]}')),V=n(7166);function N(e,t,n,r,o,i,a){try{var s=e[i](a),l=s.value}catch(u){return void n(u)}s.done?t(l):Promise.resolve(l).then(r,o)}var z,U,G,W,Z=n(7853),H=n(4531),$=function(){function e(t){var n;((0,Z.Z)(this,e),this._code=void 0,this._interestRate=void 0,this._minAmount=void 0,this._period=void 0,this._periodLabel=void 0,this._periodicValue=void 0,this._purchaseCost=void 0,this._totalCost=void 0,this._totalInterest=void 0,this._periodLabelTrunc=void 0,t)?(this._code=t.code,this._interestRate=parseFloat(t.interestRate.replace("\xa3","").replace(",","")),this._minAmount=parseFloat(t.minAmount.replace("\xa3","").replace(",","")),this._period=t.period,this._periodicValue=parseFloat(t.periodicValue.replace("\xa3","").replace(",","")),this._periodLabel=(null===(n=t.periodLabel)||void 0===n?void 0:n.toLowerCase())||"months",this._purchaseCost=parseFloat(t.purchaseCost.replace("\xa3","").replace(",","")),this._totalCost=parseFloat(t.totalCost.replace("\xa3","").replace(",","")),this._totalInterest=parseFloat(t.totalInterest.replace("\xa3","").replace(",","")),this._periodLabelTrunc=this._periodLabel.toLowerCase().slice(0,2)):(this._code="X",this._interestRate=0,this._minAmount=0,this._period="0",this._periodLabel="months",this._periodLabelTrunc="mo",this._periodicValue=1,this._purchaseCost=1,this._totalCost=1,this._totalInterest=0)}return(0,H.Z)(e,[{key:"code",get:function(){return this._code}},{key:"interestRate",get:function(){return this._interestRate}},{key:"minAmount",get:function(){return this._minAmount}},{key:"period",get:function(){return this._period}},{key:"periodLabel",get:function(){return this._periodLabel}},{key:"periodicValue",get:function(){return this._periodicValue}},{key:"purchaseCost",get:function(){return this._purchaseCost}},{key:"totalCost",get:function(){return this._totalCost}},{key:"totalInterest",get:function(){return this._totalInterest}},{key:"periodLabelTrunc",get:function(){return this._periodLabelTrunc}},{key:"toString",value:function(){return"From ".concat(K(this._periodicValue),"/").concat(this._periodLabelTrunc," for ").concat(this._code," ").concat(this._periodLabel," or ").concat(K(this._totalCost),"*")}}]),e}(),K=function(e){return Intl.NumberFormat("en-GB",{style:"currency",currency:"GBP"}).format(e)},X=function(e,t){return t.periodicValue<e.periodicValue||t.periodicValue===e.periodicValue&&t.interestRate<=e.interestRate?t:e},Y=function(e){var n=(0,t.useState)({overall:new $}),r=(0,P.Z)(n,2),o=r[0],i=r[1],a=(0,t.useState)(),s=(0,P.Z)(a,2),l=s[0];s[1];return(0,t.useEffect)((function(){var t;window.financeData||(window.financeData={}),null!==(t=window.financeData)&&void 0!==t&&t.hasOwnProperty(e)?i(window.financeData[e]):fetch("https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/products/".concat(e,"/calculateInstallment?")).then((function(t){if(400!==t.status){if(!t.ok)throw Error(t.statusText);return t.json()}console.warn("Finance data not available for SKU:",e)})).then((function(t){var n,r,o,a;t&&(t.values&&(t.values.map((function(e){e.code&&"string"===typeof e.code&&(-1!==e.code.toLowerCase().indexOf("klarna")?e.values&&e.values.length>0&&(e.values=e.values.map((function(e){return new $(e)})),n=e.values.reduce(X)):-1!==e.code.toLowerCase().indexOf("paypal")?e.values&&e.values.length>0&&(e.values=e.values.map((function(e){return new $(e)})),r=e.values.reduce(X)):-1!==e.code.toLowerCase().indexOf("glow")&&e.values&&e.values.length>0&&(e.values=e.values.map((function(e){return new $(e)})),o=e.values.reduce(X)))})),n&&(a=r?X(n,r):n),o&&(a=X(r,o)),r&&(a=X(a,r)),i({klarna:n,paypal:r,samsungFinance:o,overall:a}),window.financeData[e]={klarna:n,paypal:r,samsungFinance:o,overall:a}),console.log("For SKU",e,"Finance Data",t),console.log("Klarna",n),console.log("Paypal",r),console.log("Samsung Finance",o),console.log("Overall",a))}))}),[e]),[o,l]},q=function(e){var n=(0,t.useState)(null),r=(0,P.Z)(n,2),o=r[0],i=r[1],a=Y(e),s=(0,P.Z)(a,2),l=s[0];s[1];return(0,t.useEffect)((function(){var t=function(){var t,n=(t=(0,V.Z)().mark((function t(){var n;return(0,V.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(window.priceData=window.priceData||{},!window.priceData[e]){t.next=4;break}return i(window.priceData[e]),t.abrupt("return");case 4:return t.next=6,fetch("https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/products/?fields=priceRange&productCodes=".concat(e)).then((function(e){return e.json()}));case 6:if(void 0!==(n=t.sent)[0].priceRange){t.next=12;break}return i(null),t.abrupt("return");case 12:window.priceData[e]=n[0].priceRange.minPrice,i(n[0].priceRange.minPrice);case 14:case"end":return t.stop()}}),t)})),function(){var e=this,n=arguments;return new Promise((function(r,o){var i=t.apply(e,n);function a(e){N(i,r,o,a,s,"next",e)}function s(e){N(i,r,o,a,s,"throw",e)}a(void 0)}))});return function(){return n.apply(this,arguments)}}();t()}),[e]),{price:o,finance:l}},Q=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=new Intl.NumberFormat("en-UK",{style:"currency",currency:"GBP"}).format(e);return t?n.replace(".00",""):n},J=function(e){var t=.1*e;return t.toFixed(2),new Intl.NumberFormat("en-UK",{style:"currency",currency:"GBP"}).format(t)},ee=function(e){var t=.1*e;t.toFixed(2);var n=e-t;return new Intl.NumberFormat("en-UK",{style:"currency",currency:"GBP"}).format(n)},te=I.o,ne=I.o.slice(0,2),re=I.o.slice(2),oe=(0,i.default)(D)(z||(z=a(["\n background-color: #fff;\n border: none;\n color: #000;\n text-transform: none;\n"]))),ie=function(){var e=q(I.o[0].modelCode),t=q(I.o[1].modelCode),n=q(I.o[2].modelCode),r=q(I.o[3].modelCode),i=[e,t,n,r],a=[n,r],s=(0,o.dD)();return(0,E.jsxs)(o.W2,{style:{backgroundColor:"#f5f5f5",padding:0},children:[(0,E.jsx)("div",{id:"galaxy-book4-range"}),(0,E.jsxs)("div",{style:{display:"flex",flexDirection:"row",justifyContent:"center",alignItems:"center",gap:"15px",position:s?"relative":"unset"},children:[(0,E.jsx)(C,{style:{padding:0,margin:0},size:"xxl",align:"center",weight:"bold",font:"secondary",children:"Galaxy Book4 range"}),(0,E.jsx)("span",{style:{backgroundImage:"url(https://images.samsung.com/is/image/samsung/assets/uk/computing/wobbly.png)",width:"63px",height:"29px",backgroundSize:"contain",backgroundRepeat:"no-repeat",display:"flex",justifyContent:"center",alignItems:"center",position:s?"absolute":"unset",right:"calc(50vw - 86px)",top:"-47px"},children:(0,E.jsx)(C,{font:"primary",weight:"bold",padding:"0",margin:"0",style:{color:"white",fontSize:"13px",textAlign:"center"},children:"New"})})]}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),s?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(O,{children:ne.map((function(e,t){var n,r,a,l,u,c,d,f,p,h,m,v,g,y,b,x;return(0,E.jsxs)(F,{title:e.title,image:e.image,children:[(0,E.jsxs)(o.W2,{width:"100%",style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start"},children:[(0,E.jsx)("img",{style:{width:"40%",borderRadius:"10px",display:s?"none":"block"},src:e.panelImage,alt:""}),(0,E.jsxs)(o.W2,{width:"100%",children:[(0,E.jsxs)(o.W2,{padding:"0",row:!s,width:"100%",style:{justifyContent:"space-between"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(C,{size:"xl",font:"secondary",weight:"bold",align:s?"center":"left",children:e.title})}),(0,E.jsx)("div",{style:{width:s?"100%":"40%",display:"flex",justifyContent:s?"center":"flex-end"},children:void 0===(null===(n=i[t])||void 0===n||null===(r=n.price)||void 0===r?void 0:r.formattedValue)||void 0===i[t]?(0,E.jsx)(C,{margin:"auto 15px",align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{style:{color:"#006ff2",fontWeight:"bold",textAlign:"center",fontSize:s?"15px":"18px"},children:["From"," ",Q(null===(a=i[t])||void 0===a?void 0:a.finance.overall.periodicValue),"/mo for ",null===(l=i[t])||void 0===l?void 0:l.finance.overall.code," ",null===(u=i[t])||void 0===u?void 0:u.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(c=i[t])||void 0===c||null===(d=c.price)||void 0===d?void 0:d.formattedValue]})}),(0,E.jsxs)(C,{size:"s",align:"center",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(f=i[t])||void 0===f||null===(p=f.price)||void 0===p?void 0:p.formattedValue," Pay upfront:"," ",J((null===(h=i[t])||void 0===h||null===(m=h.price)||void 0===m?void 0:m.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(v=i[t])||void 0===v||null===(g=v.price)||void 0===g?void 0:g.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(y=i[t])||void 0===y?void 0:y.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(b=i[t])||void 0===b||null===(x=b.price)||void 0===x?void 0:x.formattedValue]})]}),(0,E.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:e.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 40px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"55%",marginBottom:"15px"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{size:"s",align:"center",children:e.title})]},t)}))}),(0,E.jsxs)(o.W2,{row:!s,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{style:{padding:"10px 20px"},href:e.chooseModelLink,children:"Choose your spec"}),(0,E.jsx)(oe,{href:e.link,children:e.linkCopy})]})]})]}),(0,E.jsx)(o.W2,{background:"#fff",padding:"0px",style:{borderRadius:"0 0 10px 10px"}})]},t)}))}),(0,E.jsx)(O,{children:re.map((function(e,t){var n,r,l,u,c,d,f,p,h,m,v,g,y,b,x,w;return(0,E.jsxs)(F,{title:e.title,image:e.image,children:[(0,E.jsxs)(o.W2,{width:"100%",style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start"},children:[(0,E.jsx)("img",{style:{width:"40%",borderRadius:"10px",display:s?"none":"block"},src:e.panelImage,alt:""}),(0,E.jsxs)(o.W2,{width:"100%",children:[(0,E.jsxs)(o.W2,{padding:"0",row:!s,width:"100%",style:{justifyContent:"space-between"},children:[(0,E.jsx)("div",{children:(0,E.jsxs)(C,{font:"secondary",size:"xl",weight:"bold",align:s?"center":"left",children:[e.title,(0,E.jsx)(C,{size:"m",align:s?"center":"left",children:e.subTitle})]})}),(0,E.jsx)("div",{style:{width:s?"100%":"40%",display:"flex",justifyContent:s?"center":"flex-end"},children:void 0===(null===(n=a[t])||void 0===n||null===(r=n.price)||void 0===r?void 0:r.formattedValue)||void 0===a[t]?(0,E.jsx)(C,{margin:"auto 15px",align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{style:{color:"#006ff2",fontWeight:"bold",textAlign:"center",fontSize:s?"15px":"18px"},children:["From"," ",Q(null===(l=a[t])||void 0===l?void 0:l.finance.overall.periodicValue),"/mo for"," ",null===(u=a[t])||void 0===u?void 0:u.finance.overall.code," ",null===(c=a[t])||void 0===c?void 0:c.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(d=a[t])||void 0===d||null===(f=d.price)||void 0===f?void 0:f.formattedValue]})}),(0,E.jsxs)(C,{size:"s",align:"center",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(p=i[t])||void 0===p||null===(h=p.price)||void 0===h?void 0:h.formattedValue," Pay upfront:"," ",J((null===(m=i[t])||void 0===m||null===(v=m.price)||void 0===v?void 0:v.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(g=i[t])||void 0===g||null===(y=g.price)||void 0===y?void 0:y.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(b=i[t])||void 0===b?void 0:b.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(x=i[t])||void 0===x||null===(w=x.price)||void 0===w?void 0:w.formattedValue]})]}),(0,E.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:e.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 40px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"55%",marginBottom:"15px"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{size:"s",align:"center",children:e.title})]},t)}))}),(0,E.jsxs)(o.W2,{row:!s,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{href:e.chooseModelLink,children:"Choose your spec"}),(0,E.jsx)(oe,{href:e.link,children:e.linkCopy})]})]})]}),(0,E.jsx)(o.W2,{background:"#fff",padding:"0px",style:{borderRadius:"0 0 10px 10px"}})]},t)}))})]}):(0,E.jsx)(O,{children:te.map((function(e,t){var n,r,a,l,u,c,d,f,p,h,m,v,g,y,b,x,w,k,S,_;return(0,E.jsx)(F,{title:e.title,children:(0,E.jsx)(o.W2,{style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start",borderRadius:"0px 0px 10px 10px",width:"100%"},children:(0,E.jsx)(o.W2,{children:(0,E.jsxs)(o.W2,{row:!0,width:"100%",children:[(0,E.jsx)("img",{style:{width:"38%",borderRadius:"10px",margin:"0 25px",display:s?"none":"block",flexShrink:0},src:e.panelImage,alt:""}),(0,E.jsxs)("div",{style:{padding:"20px",textAlign:"left"},children:[(0,E.jsx)(C,{size:"xl",font:"secondary",style:{fontWeight:"bold",marginBottom:"10px"},children:e.title}),(0,E.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",width:"100%"},children:void 0===(null===(n=i[t])||void 0===n||null===(r=n.price)||void 0===r?void 0:r.formattedValue)||void 0===i[t]?(0,E.jsx)(C,{align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{size:"l",style:{color:"#006ff2",textAlign:"left"},children:["X"!==(null===(a=i[t])||void 0===a?void 0:a.finance.overall.code)&&(0,E.jsxs)(E.Fragment,{children:["From"," ",Q(null===(l=i[t])||void 0===l?void 0:l.finance.overall.periodicValue),"/mo for ",null===(u=i[t])||void 0===u?void 0:u.finance.overall.code," ",null===(c=i[t])||void 0===c?void 0:c.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(d=i[t])||void 0===d||null===(f=d.price)||void 0===f?void 0:f.formattedValue]}),"X"===(null===(p=i[t])||void 0===p?void 0:p.finance.overall.code)&&(0,E.jsxs)(E.Fragment,{children:["From ",null===(h=i[t])||void 0===h||null===(m=h.price)||void 0===m?void 0:m.formattedValue]})]})}),(0,E.jsxs)(C,{size:"s",align:"left",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(v=i[t])||void 0===v||null===(g=v.price)||void 0===g?void 0:g.formattedValue," Pay upfront:"," ",J((null===(y=i[t])||void 0===y||null===(b=y.price)||void 0===b?void 0:b.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(x=i[t])||void 0===x||null===(w=x.price)||void 0===w?void 0:w.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(k=i[t])||void 0===k?void 0:k.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(S=i[t])||void 0===S||null===(_=S.price)||void 0===_?void 0:_.formattedValue]}),(0,E.jsxs)(o.W2,{padding:"0",row:!0,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{href:e.chooseModelLink,children:"Choose your spec"}),(0,E.jsxs)(oe,{href:e.link,children:[e.linkCopy," >"]})]})]}),(0,E.jsx)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:e.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",margin:"5px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"2.5em",marginBottom:"10px"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{align:"center",size:"s",children:e.title})]},t)}))})]})})})},t)}))})]})},ae=JSON.parse('{"l":[{"title":"Galaxy Chromebook 2 360","modelCode":"XE525QEA-KB1UK","imageAlt":"Galaxy Chromebook 2 360 LTE","icons":[{"title":"2-in-1 convertible","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/164016280/uk-feature-2-in-1-design-for-optimized-learning-and-creativity-532011017.svg?$64_64_PNG$"},{"title":"Solidity","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/164016279/uk-feature-built-rugged-for-tough-environments-532011011.svg?$64_64_PNG$"},{"title":"4G","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/164016281/uk-feature-connection-for-anywhere-you-go-532011021.svg?$64_64_PNG$"}],"colors":[{"title":["Silver","Graphite"],"color":["#c4c4c4","#494d53"]}],"link":"/uk/computers/chromebook/galaxy-chromebook-2-360-lte-12inch-celeron-4gb-128gb-xe525qea-kb1uk/","chooseModelLink":"/uk/computers/chromebook/galaxy-chromebook-2-360-lte-12inch-celeron-4gb-128gb-xe525qea-kb1uk/buy/","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/LifestyleFeature_Chromebook2Pro_2234x1256_8Bit_01.png?$N_344_PNG$"},{"title":"Galaxy Chromebook Go LTE","modelCode":"XE345XDA-KA2UK","imageAlt":"Galaxy Book2 360","icons":[{"title":"Slim-bodied","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/163860505/uk-feature-take-it-wherever-learning-takes-you-530315684.svg?$64_64_PNG$"},{"title":"Solidity","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/163860500/uk-feature-tough-enough-to-take-knocks--drops--and-spills-530315702.svg?$64_64_PNG$"},{"title":"Battery","icon":"https://images.samsung.com/is/content/samsung/p6pim/uk/feature/163860501/uk-feature-power-through-study--play--and-everything-in-between-530315690.svg?$64_64_PNG$"}],"colors":[{"title":["Silver"],"color":["#c4c4c4"]}],"link":"/uk/computers/chromebook/galaxy-chromebook-go-lte-14inch-celeron-8gb-64gb-xe340xda-ka3uk/","chooseModelLink":"/uk/computers/chromebook/galaxy-chromebook-go-lte-14inch-celeron-8gb-64gb-xe340xda-ka3uk/buy/","linkCopy":"Learn more","panelImage":"https://images.samsung.com/is/image/samsung/assets/uk/computing/chromebook-go.png?$N_344_PNG$"}]}'),se=ae.l,le=ae.l.slice(0,2),ue=ae.l.slice(2),ce=(0,i.default)(D)(U||(U=a(["\n background-color: #fff;\n border: none;\n text-decoration: underline;\n color: #000;\n text-transform: none;\n"]))),de=function(){var e=[q(se[0].modelCode),q(se[1].modelCode)],t=(0,o.dD)();return(0,E.jsxs)(o.W2,{style:{padding:"0",backgroundColor:"#f5f5f5",paddingTop:"6em"},children:[(0,E.jsx)("div",{id:"galaxy-chromebook-range"}),(0,E.jsx)(C,{size:"xxl",align:"center",weight:"bold",font:"secondary",style:{paddingRight:"30px",paddingLeft:"30px"},children:"Galaxy Chromebook range"}),(0,E.jsx)("br",{}),(0,E.jsx)("br",{}),t?(0,E.jsxs)(E.Fragment,{children:[(0,E.jsx)(O,{children:le.map((function(n,r){var i,a,s,l,u,c,d,f,p,h,m,v,g,y,b,x;return(0,E.jsx)(F,{title:n.title,image:n.image,children:(0,E.jsxs)(o.W2,{width:"100%",style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start"},children:[(0,E.jsx)("img",{style:{width:"40%",display:t?"none":"block"},src:n.panelImage,alt:""}),(0,E.jsxs)(o.W2,{width:"100%",children:[(0,E.jsxs)(o.W2,{padding:"0",row:!t,width:"100%",style:{justifyContent:"space-between"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(C,{size:"xl",font:"secondary",weight:"bold",align:t?"center":"left",children:n.title})}),(0,E.jsx)("div",{style:{width:t?"100%":"40%",display:"flex",justifyContent:t?"center":"flex-end"},children:void 0===(null===(i=e[r])||void 0===i||null===(a=i.price)||void 0===a?void 0:a.formattedValue)||void 0===e[r]?(0,E.jsx)(C,{margin:"auto 15px",align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{style:{color:"#006ff2",fontWeight:"bold",textAlign:"center",fontSize:t?"15px":"18px"},children:["From"," ",Q(null===(s=e[r])||void 0===s?void 0:s.finance.overall.periodicValue),"/mo for ",null===(l=e[r])||void 0===l?void 0:l.finance.overall.code," ",null===(u=e[r])||void 0===u?void 0:u.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(c=e[r])||void 0===c||null===(d=c.price)||void 0===d?void 0:d.formattedValue]})}),(0,E.jsxs)(C,{size:"s",align:"center",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(f=e[r])||void 0===f||null===(p=f.price)||void 0===p?void 0:p.formattedValue," Pay upfront:"," ",J((null===(h=e[r])||void 0===h||null===(m=h.price)||void 0===m?void 0:m.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(v=e[r])||void 0===v||null===(g=v.price)||void 0===g?void 0:g.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(y=e[r])||void 0===y?void 0:y.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(b=e[r])||void 0===b||null===(x=b.price)||void 0===x?void 0:x.formattedValue]})]}),(0,E.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:[n.colors.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 50px",width:"100%"},children:[(0,E.jsx)(o.W2,{padding:"0",row:!0,children:e.color.map((function(e,t){return(0,E.jsx)("svg",{width:"7vw",height:"50",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,E.jsx)("circle",{cx:"16",cy:"15",r:"12",fill:e})})}))}),(0,E.jsx)(C,{size:"s",children:"Colours"})]},t)})),n.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 40px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"55%",marginBottom:"15px"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{size:"s",align:"center",children:e.title})]},t)}))]}),(0,E.jsxs)(o.W2,{row:!t,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{style:{padding:"10px 20px"},href:n.chooseModelLink,children:"Choose your spec"}),(0,E.jsx)(ce,{href:n.link,children:n.linkCopy})]})]})]})},r)}))}),(0,E.jsx)(O,{children:ue.map((function(n,r){var i,a,s,l,u,c,d,f,p,h,m,v,g,y,b,x;return(0,E.jsx)(F,{title:n.title,image:n.image,children:(0,E.jsxs)(o.W2,{width:"100%",style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start"},children:[(0,E.jsx)("img",{style:{width:"40%",display:t?"none":"block"},src:n.panelImage,alt:""}),(0,E.jsxs)(o.W2,{width:"100%",children:[(0,E.jsxs)(o.W2,{padding:"0",row:!t,width:"100%",style:{justifyContent:"space-between"},children:[(0,E.jsx)("div",{children:(0,E.jsx)(C,{size:"xl",font:"secondary",weight:"bold",align:t?"center":"left",children:n.title})}),(0,E.jsx)("div",{style:{width:t?"100%":"40%",display:"flex",justifyContent:t?"center":"flex-end"},children:void 0===(null===(i=e[r])||void 0===i||null===(a=i.price)||void 0===a?void 0:a.formattedValue)||void 0===e[r]?(0,E.jsx)(C,{margin:"auto 15px",align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{size:"xl",style:{color:"#006ff2",fontWeight:"bold",textAlign:"center"},children:["From"," ",Q(null===(s=e[r])||void 0===s?void 0:s.finance.overall.periodicValue),"/mo for ",null===(l=e[r])||void 0===l?void 0:l.finance.overall.code," ",null===(u=e[r])||void 0===u?void 0:u.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(c=e[r])||void 0===c||null===(d=c.price)||void 0===d?void 0:d.formattedValue]})}),(0,E.jsxs)(C,{size:"s",align:"center",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(f=e[r])||void 0===f||null===(p=f.price)||void 0===p?void 0:p.formattedValue," Pay upfront:"," ",J((null===(h=e[r])||void 0===h||null===(m=h.price)||void 0===m?void 0:m.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(v=e[r])||void 0===v||null===(g=v.price)||void 0===g?void 0:g.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(y=e[r])||void 0===y?void 0:y.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(b=e[r])||void 0===b||null===(x=b.price)||void 0===x?void 0:x.formattedValue]})]}),(0,E.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:[n.colors.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 50px",width:"100%"},children:[(0,E.jsx)(o.W2,{padding:"0",row:!0,children:e.color.map((function(e,t){return(0,E.jsx)("svg",{width:"7vw",height:"50",viewBox:"0 0 30 30",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,E.jsx)("circle",{cx:"16",cy:"15",r:"12",fill:e})})}))}),(0,E.jsx)(C,{size:"s",children:"Colours"})]},t)})),n.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",padding:"5.5vw",flex:"1 1 40px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"55%"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{size:"s",align:"center",children:e.title})]},t)}))]}),(0,E.jsxs)(o.W2,{row:!t,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{style:{padding:"10px 20px"},href:n.chooseModelLink,children:"Choose your spec"}),(0,E.jsx)(ce,{href:n.link,children:n.linkCopy})]})]})]})},r)}))})]}):(0,E.jsx)(O,{children:se.map((function(n,r){var i,a,s,l,u,c,d,f,p,h,m,v,g,y,b,x;return(0,E.jsx)(F,{title:n.title,children:(0,E.jsx)(o.W2,{style:{backgroundColor:"#fff",flexDirection:"row",justifyContent:"flex-start",borderRadius:"0px 0px 10px 10px",width:"100%"},children:(0,E.jsx)(o.W2,{children:(0,E.jsxs)(o.W2,{row:!0,width:"100%",children:[(0,E.jsx)("img",{style:{width:"38%",margin:"0 25px",display:t?"none":"block",flexShrink:0},src:n.panelImage,alt:""}),(0,E.jsxs)("div",{style:{padding:"20px",textAlign:"left"},children:[(0,E.jsx)(C,{size:"xl",font:"secondary",style:{fontWeight:"bold",marginBottom:"10px"},children:n.title}),(0,E.jsx)("div",{style:{display:"flex",justifyContent:"flex-start",width:"100%"},children:void 0===(null===(i=e[r])||void 0===i||null===(a=i.price)||void 0===a?void 0:a.formattedValue)||void 0===e[r]?(0,E.jsx)(C,{align:"left",children:(0,E.jsx)("span",{style:{color:"#006ff2",fontWeight:"bold",fontSize:"1.2rem"},children:"Product Unavailable"})}):(0,E.jsxs)(C,{style:{color:"#006ff2",textAlign:"left",fontSize:t?"15px":"18px"},children:["From"," ",Q(null===(s=e[r])||void 0===s?void 0:s.finance.overall.periodicValue),"/mo for ",null===(l=e[r])||void 0===l?void 0:l.finance.overall.code," ",null===(u=e[r])||void 0===u?void 0:u.finance.overall.periodLabel,(0,E.jsx)("br",{}),"Or ",null===(c=e[r])||void 0===c||null===(d=c.price)||void 0===d?void 0:d.formattedValue]})}),(0,E.jsxs)(C,{size:"s",align:"left",children:["Representative example: 0.0% APR representative (fixed). Cash price:"," ",null===(f=e[r])||void 0===f||null===(p=f.price)||void 0===p?void 0:p.formattedValue," Pay upfront:"," ",J((null===(h=e[r])||void 0===h||null===(m=h.price)||void 0===m?void 0:m.value)||1)," Based on an assumed total amount of credit of"," ",ee((null===(v=e[r])||void 0===v||null===(g=v.price)||void 0===g?void 0:g.value)||1)," over 36 months at an interest rate of 0% p.a. (fixed). Monthly repayment"," ",Q(null===(y=e[r])||void 0===y?void 0:y.finance.overall.periodicValue),". Cost of credit: \xa30.00. Total amount payable"," ",null===(b=e[r])||void 0===b||null===(x=b.price)||void 0===x?void 0:x.formattedValue]}),(0,E.jsxs)(o.W2,{padding:"0",row:!0,width:"100%",style:{justifyContent:"flex-start"},children:[(0,E.jsx)(L,{href:n.chooseModelLink,children:"Choose your spec"}),(0,E.jsxs)(ce,{href:n.link,children:[n.linkCopy," >"]})]})]}),(0,E.jsxs)("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"1rem",width:"100%",justifyContent:"space-between"},children:[n.colors.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",margin:"5px",padding:"1rem",width:"100%"},children:[(0,E.jsx)(o.W2,{padding:"0",row:!0,children:e.color.map((function(e,t){return(0,E.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"30",height:"35.999",viewBox:"0 0 36 35.999",style:{padding:"3px"},children:(0,E.jsxs)("g",{transform:"translate(-18.001 9)",children:[(0,E.jsx)("rect",{width:"36",height:"35.999",transform:"translate(18.001 -9)",fill:"none"}),(0,E.jsx)("path",{d:"M18,0A18,18,0,1,1,0,18,18,18,0,0,1,18,0Z",transform:"translate(18.001 -9)",fill:e}),(0,E.jsx)("path",{d:"M18,1A17,17,0,0,0,5.979,30.019,17,17,0,1,0,30.02,5.979,16.889,16.889,0,0,0,18,1m0-1A18,18,0,1,1,0,18,18,18,0,0,1,18,0Z",transform:"translate(18.001 -9)",fill:"rgba(0,0,0,0.5)"})]})})}))}),(0,E.jsx)(C,{size:"s",children:"Colours"})]},t)})),n.icons.map((function(e,t){return(0,E.jsxs)(o.W2,{style:{border:"1px solid #EBEBEB",borderRadius:"20px",margin:"5px",width:"100%"},children:[(0,E.jsx)("img",{style:{width:"2.5em",marginBottom:"10px"},src:e.icon||"",alt:""}),(0,E.jsx)(C,{align:"center",size:"s",children:e.title})]},t)}))]})]})})})},r)}))})]})},fe=function(){var e=(0,o.dD)();return(0,E.jsxs)("div",{id:"meet-our-laptops",style:{backgroundColor:"#fff"},children:[(0,E.jsx)(C,{size:"s",style:{textTransform:"uppercase",fontWeight:700,color:"#000",textAlign:"center"},children:"our range"}),(0,E.jsx)(C,{size:"xxl",align:"center",weight:"bold",font:"secondary",children:"Meet our Laptops"}),(0,E.jsxs)(C,{align:"center",children:["Whether you want to work, study or watch your favourite content, we\u2019ve got a laptop just for you."," "]}),(0,E.jsx)("div",{style:{width:"100%",backgroundColor:"white",padding:"40px 0px"}}),(0,E.jsxs)("div",{style:{background:"#f5f5f5",padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:[(0,E.jsx)(ie,{}),(0,E.jsx)(de,{})]})]})},pe=n(6222),he=n(1454),me=n.n(he);me().polyfill();var ve=i.default.button(G||(G=a(["\n &:hover,\n &:focus {\n outline: 1px solid green;\n }\n"])));var ge=function(){var e=(0,t.useState)(0),n=(0,P.Z)(e,2),r=n[0],s=n[1],l=(0,t.useState)(0),u=(0,P.Z)(l,2),c=(u[0],u[1]),d=(0,o.dD)(),f=((0,o.Av)(),window.innerWidth),p=[{width:"620px",brow:"DUAL DESIGN",title:"The ultimate premium feel",copy:"Light and sleek, with crisp displays and seamless motions, these laptops are made to look good and work harder",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Premiumfeel_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/ultimatepremium_DT.png",color:"black"},{width:"620px",brow:"NEXT-LEVEL PERFORMANCE",title:"Power at the core",tag:"New",copy:"Made with the latest 13th Gen Intel\xae Core\u2122 processor, delivering super fast and reliable performance for extreme productivity.",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Intelcore_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/intel13_DT.png"},{width:"565px",brow:"A WHOLE ECOSYSTEM",title:"Galaxy at your fingertips",copy:"Designed to work seamlessly with each other, you can flip between Galaxy devices to continue to work wherever you are.",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Ecosystem_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/ecosystem_DT.png",color:"black"},{width:"521px",brow:"DYNAMIC AMOLED 2X",title:"True-to-life, true-to-touch",copy:"Immerse yourself in true, crisp resolution that lets you see everything in bold colour and sharp detail",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Display_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/screen_DT.png",color:"black"},{width:"565px",brow:"THE S PEN",title:"Write for days on end",copy:"Jot down thoughts and sketch out ideas without worrying about the power of your pen.",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Spen_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/spen_DT.png",color:"black"},{width:"565px",brow:"BUILT FOR SECURITY",title:"Your brilliant ideas stay yours",copy:"Keep security fears at bay with Enterprise-level security. Built to defend against security risks, your laptop is in safe hands.",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/Security_MO.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/security_DT.png",color:"black"},{width:"420px",brow:"SMART SWITCH",title:"Switching made easier",copy:"Learn more",background:d&&f<700?"https://images.samsung.com/is/image/samsung/assets/uk/computing/ss-mo.png":"https://images.samsung.com/is/image/samsung/assets/uk/computing/smartswitch_DT.png",link:"/uk/apps/smart-switch/",color:"white"}],h=(0,t.useRef)(null);(0,t.useEffect)((function(){c(h.current.offsetWidth)}),[]);var m=(0,i.default)(o.rU)(W||(W=a(["\n &:after {\n top:42%;\n right:-18%;\n }\n\n &:hover {\n &:after {\n right:-23%;\n }\n }\n"])));return(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)("div",{className:"carousel",ref:h,style:{position:"relative"},children:[(0,E.jsx)(ve,{onClick:function(){s(r-1),document.getElementById("slider").scrollBy({left:0===r?-420:-620,top:0,behavior:"smooth"})},disabled:0===r,style:{display:0===r||d?"none":"block",backgroundImage:"url('https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png')",width:"80px",height:"80px",backgroundSize:"contain",backgroundRepeat:"no-repeat",transform:"rotate(180deg)",outline:"none",border:"none",backgroundColor:"unset",position:"absolute",top:"calc(50% - 40px)",left:"40px",cursor:"pointer"}}),(0,E.jsx)("button",{onClick:function(){s(r+1),console.log("clicked"),document.getElementById("slider").scrollBy({left:0===r?620:420,top:0,behavior:"smooth"})},disabled:r===p.length-1,style:{display:r===p.length-1||d?"none":"block",backgroundImage:"url('https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png')",width:"80px",height:"80px",backgroundSize:"contain",backgroundRepeat:"no-repeat",outline:"none",border:"none",backgroundColor:"unset",position:"absolute",top:"calc(50% - 40px)",right:"40px",cursor:"pointer"}}),(0,E.jsx)("div",{id:"slider",className:"slides",style:{display:"flex",overflowX:"scroll",transition:"transform 0.5s",width:d?"100vw":"calc(100vw - 240px)",marginLeft:d?"":"240px",paddingLeft:d?"56px":"",paddingRight:d?"56px":"",gap:"24px",background:"white",scrollSnapType:d?"":"x mandatory"},children:p.map((function(e,t){var n;return(0,E.jsx)("div",{style:(n={width:d&&f<700?"60vw":e.width,flexShrink:"0",background:"url("+e.background+")",backgroundRepeat:"no-repeat",backgroundSize:"contain",height:d&&f<700?"450px":"518px"},(0,pe.Z)(n,"backgroundSize","contain"),(0,pe.Z)(n,"scrollSnapAlign",d?"":"start"),n),className:"slide",children:(0,E.jsxs)("div",{style:{padding:d?"25px":"40px",position:"relative"},children:[e.tag&&(0,E.jsx)("span",{style:{backgroundImage:"url(https://images.samsung.com/is/image/samsung/assets/uk/computing/circle.png)",width:"61px",height:"34px",backgroundSize:"contain",backgroundRepeat:"no-repeat",transform:"rotate(6deg)",backgroundPosition:"center center",display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"14px",right:"14px"},children:(0,E.jsx)(o.xv,{size:13,weight:"bold",font:"primary",color:"white",style:{transform:"rotate(-6deg)"},children:"New"})}),(0,E.jsx)(o.xv,{color:"black"===e.color?"black":"white",font:"primary",weight:"bold",size:d?16:11,children:e.brow}),(0,E.jsx)(o.xv,{color:"black"===e.color?"black":"white",font:"secondary",weight:"bold",size:24,style:{marginTop:"10px"},children:e.title}),"SMART SWITCH"!=e.brow&&(0,E.jsx)(o.xv,{color:"black"===e.color?"black":"white",size:d?19:16,style:{marginTop:"10px"},children:e.copy}),"SMART SWITCH"==e.brow&&(0,E.jsx)(m,{color:"black"===e.color?"black":"white",href:e.link,arrow:!0,style:{fontFamily:"SamsungOne",textDecoration:"none",marginTop:"10px"},font:"primary",size:d?18:13,children:"Learn more"})]})},t)}))})]})})};function ye(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(n),!0).forEach((function(t){(0,pe.Z)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ye(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xe,we,ke,Se,_e,Ee,Ce,Pe,Ae={delta:10,preventScrollOnSwipe:!1,rotationAngle:0,trackMouse:!1,trackTouch:!0,swipeDuration:1/0,touchEventOptions:{passive:!0}},Te={first:!0,initial:[0,0],start:0,swiping:!1,xy:[0,0]},je="mousemove",Re="mouseup";function Oe(e,t){if(0===t)return e;var n=Math.PI/180*t;return[e[0]*Math.cos(n)+e[1]*Math.sin(n),e[1]*Math.cos(n)-e[0]*Math.sin(n)]}function Fe(e){var n,r=e.trackMouse,o=t.useRef(Object.assign({},Te)),i=t.useRef(Object.assign({},Ae)),a=t.useRef(Object.assign({},i.current));for(n in a.current=Object.assign({},i.current),i.current=Object.assign(Object.assign({},Ae),e),Ae)void 0===i.current[n]&&(i.current[n]=Ae[n]);var s=t.useMemo((function(){return function(e,t){var n=function(t){var n="touches"in t;n&&t.touches.length>1||e((function(e,o){o.trackMouse&&!n&&(document.addEventListener(je,r),document.addEventListener(Re,a));var i=n?t.touches[0]:t,s=Oe([i.clientX,i.clientY],o.rotationAngle);return o.onTouchStartOrOnMouseDown&&o.onTouchStartOrOnMouseDown({event:t}),Object.assign(Object.assign(Object.assign({},e),Te),{initial:s.slice(),xy:s,start:t.timeStamp||0})}))},r=function(t){e((function(e,n){var r="touches"in t;if(r&&t.touches.length>1)return e;if(t.timeStamp-e.start>n.swipeDuration)return e.swiping?Object.assign(Object.assign({},e),{swiping:!1}):e;var o=r?t.touches[0]:t,i=Oe([o.clientX,o.clientY],n.rotationAngle),a=(0,P.Z)(i,2),s=a[0],l=a[1],u=s-e.xy[0],c=l-e.xy[1],d=Math.abs(u),f=Math.abs(c),p=(t.timeStamp||0)-e.start,h=Math.sqrt(d*d+f*f)/(p||1),m=[u/(p||1),c/(p||1)],v=function(e,t,n,r){return e>t?n>0?"Right":"Left":r>0?"Down":"Up"}(d,f,u,c),g="number"===typeof n.delta?n.delta:n.delta[v.toLowerCase()]||Ae.delta;if(d<g&&f<g&&!e.swiping)return e;var y={absX:d,absY:f,deltaX:u,deltaY:c,dir:v,event:t,first:e.first,initial:e.initial,velocity:h,vxvy:m};y.first&&n.onSwipeStart&&n.onSwipeStart(y),n.onSwiping&&n.onSwiping(y);var b=!1;return(n.onSwiping||n.onSwiped||n["onSwiped".concat(v)])&&(b=!0),b&&n.preventScrollOnSwipe&&n.trackTouch&&t.cancelable&&t.preventDefault(),Object.assign(Object.assign({},e),{first:!1,eventData:y,swiping:!0})}))},o=function(t){e((function(e,n){var r;if(e.swiping&&e.eventData){if(t.timeStamp-e.start<n.swipeDuration){r=Object.assign(Object.assign({},e.eventData),{event:t}),n.onSwiped&&n.onSwiped(r);var o=n["onSwiped".concat(r.dir)];o&&o(r)}}else n.onTap&&n.onTap({event:t});return n.onTouchEndOrOnMouseUp&&n.onTouchEndOrOnMouseUp({event:t}),Object.assign(Object.assign(Object.assign({},e),Te),{eventData:r})}))},i=function(){document.removeEventListener(je,r),document.removeEventListener(Re,a)},a=function(e){i(),o(e)},s=function(e,t){var i=function(){};if(e&&e.addEventListener){var a=Object.assign(Object.assign({},Ae.touchEventOptions),t.touchEventOptions),s=[["touchstart",n,a],["touchmove",r,Object.assign(Object.assign({},a),t.preventScrollOnSwipe?{passive:!1}:{})],["touchend",o,a]];s.forEach((function(t){var n=(0,P.Z)(t,3),r=n[0],o=n[1],i=n[2];return e.addEventListener(r,o,i)})),i=function(){return s.forEach((function(t){var n=(0,P.Z)(t,2),r=n[0],o=n[1];return e.removeEventListener(r,o)}))}}return i},l={ref:function(t){null!==t&&e((function(e,n){if(e.el===t)return e;var r={};return e.el&&e.el!==t&&e.cleanUpTouch&&(e.cleanUpTouch(),r.cleanUpTouch=void 0),n.trackTouch&&t&&(r.cleanUpTouch=s(t,n)),Object.assign(Object.assign(Object.assign({},e),{el:t}),r)}))}};return t.trackMouse&&(l.onMouseDown=n),[l,s]}((function(e){return o.current=e(o.current,i.current)}),{trackMouse:r})}),[r]),l=(0,P.Z)(s,2),u=l[0],c=l[1];return o.current=function(e,t,n,r){return t.trackTouch&&e.el?e.cleanUpTouch?t.preventScrollOnSwipe!==n.preventScrollOnSwipe||t.touchEventOptions.passive!==n.touchEventOptions.passive?(e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)})):e:Object.assign(Object.assign({},e),{cleanUpTouch:r(e.el,t)}):(e.cleanUpTouch&&e.cleanUpTouch(),Object.assign(Object.assign({},e),{cleanUpTouch:void 0}))}(o.current,i.current,a.current,c),u}var Me,De,Le,Be,Ie,Ve,Ne,ze=i.default.div(xe||(xe=a(["\n overflow-x: scroll;\n scroll-snap-type: x mandatory;\n width: 100%;\n"]))),Ue=i.default.div(we||(we=a(["\n display: flex;\n flex-direction: row;\n"]))),Ge=i.default.div(ke||(ke=a(["\n display: flex;\n align-items: center;\n justify-content: center;\n color: #000;\n scroll-snap-align: start;\n border-radius: 10px;\n"]))),We=i.default.div(Se||(Se=a(["\n display: flex;\n position: absolute;\n justify-content: space-between;\n margin-top: 20px;\n width: 95%;\n"]))),Ze=i.default.div(_e||(_e=a(['\n background-image: url("https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png");\n width: 80px;\n height: 80px;\n background-size: contain;\n background-repeat: no-repeat;\n outline: none;\n border: none;\n background-color: unset;\n position: absolute;\n top: calc(50% - 40px);\n right: 40px;\n cursor: pointer;\n']))),He=i.default.div(Ee||(Ee=a(['\n background-image: url("https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png");\n width: 80px;\n height: 80px;\n background-size: contain;\n background-repeat: no-repeat;\n transform: rotate(180deg);\n outline: none;\n border: none;\n background-color: unset;\n position: absolute;\n top: calc(50% - 40px);\n left: 40px;\n cursor: pointer;\n']))),$e=i.default.div(Ce||(Ce=a(["\n display: none;\n padding: 5px;\n justify-content: center;\n align-items: center;\n border: 1px solid #dedede;\n flex-direction: row;\n border-radius: 10px;\n margin: 0 10px;\n"]))),Ke=i.default.div(Pe||(Pe=a(["\n width: 10px;\n height: 10px;\n border-radius: 50%;\n background-color: #000;\n margin: 0 5px;\n cursor: pointer;\n border: 0.1px solid #fff;\n"]))),Xe=function(e){var t=e.children,n=e.width,r=e.height,o=e.minHeight;return(0,E.jsx)(Ge,{style:{width:n,height:r,minHeight:o},children:t})},Ye=function(e){var n=e.children,r=(e.translateNum,e.height),i=e.minHeight,a=e.slidesToShow,s=(0,t.useState)(0),l=(0,P.Z)(s,2),u=l[0],c=l[1],d=function(e){e<0?e=t.Children.count(n)-1:e>=t.Children.count(n)&&(e=0),c(e)},f=Fe({trackTouch:!0,onSwipedLeft:function(){return d(u-1)},onSwipedRight:function(){return d(u+1)}}),p=t.useRef(null),h=(0,o.dD)();return(0,E.jsxs)(E.Fragment,{children:[" ",(0,E.jsx)(ze,be(be({},f),{},{ref:p,className:"noScrollBars",onScroll:function(e){var r=e.currentTarget,o=r.scrollLeft/(r.scrollWidth-r.clientWidth),i=Math.floor(o*t.Children.count(n));c(Math.min(i,t.Children.count(n)-1))},children:(0,E.jsx)(Ue,{style:{height:r,minHeight:i,width:"".concat(t.Children.count(n)/(a||1)*80,"%")},children:t.Children.map(n,(function(e,n){return t.cloneElement(e,{width:e.props.width,height:"100%"})}))})})),(0,E.jsxs)(We,{children:[(0,E.jsx)(Ze,{style:{display:h?"none":"block"},onClick:function(){if(p.current){var e=p.current,r=e.scrollLeft,o=e.scrollWidth,i=(e.clientWidth,(u+1)*(o/t.Children.count(n)));p.current.scrollBy({left:i-r,behavior:"smooth"})}}}),(0,E.jsx)($e,{children:t.Children.map(n,(function(e,r){var o=e.props.dotsOuterColor?e.props.dotsOuterColor:"grey";return(0,E.jsx)(Ke,{onClick:function(){if(p.current){var e=p.current,o=e.scrollLeft,i=e.scrollWidth,a=(e.clientWidth,r*(i/t.Children.count(n)));p.current.scrollBy({left:a-o,behavior:"smooth"})}},style:{backgroundColor:u===r?e.props.dotsColor:o}})}))}),(0,E.jsx)(He,{style:{display:h?"none":"block"},onClick:function(){if(p.current){var e=p.current,r=(e.scrollLeft,e.scrollWidth,e.clientWidth),o=(u-1)*(r/t.Children.count(n));p.current.scrollBy({left:o-r,behavior:"smooth"})}}})]})]})},qe=((0,i.default)(D)(Me||(Me=a(["\n background-color: #006ff2;\n border: none;\n font-weight: normal;\n padding: ",";\n margin: ",";\n"])),(function(e){return e.theme.padding||"10px 20px"}),(function(e){return e.theme.margin||"15px 0"})),(0,i.default)(C)(De||(De=a([" //react doesn't support inline !important, and we have 1.4 !important in the css\n line-height: 1.1 !important;\n"])))),Qe=[{title:"Galaxy Book4",fromPrice:"\xa3699",tag:"New",description:"Open up to a new way to work and play with Galaxy Book4.",image:"https://images.samsung.com/is/image/samsung/assets/uk/computing/book4_bookrange.png",imageAlt:"Galaxy Book4 Range",link:"#galaxy-book4-range",linkCopy:"Shop all",sku:"NP960XGK-KG1UK"},{title:"Galaxy Chromebook",fromPrice:"\xa3299",description:"Made for mobility, this range is great for learning, working and playing. ",image:"https://images.samsung.com/is/image/samsung/assets/uk/computing/chromebook.png",imageAlt:"Galaxy Chromebook Range",link:"https://www.samsung.com/uk/computers/chromebook/",linkCopy:"Shop all",sku:"XE310XBA-KA1UK"},{title:"Galaxy Gifts",fromPrice:"\xa3299",description:"Know someone who\u2019d love a laptop? Find their perfect laptop gift today.",image:"https://images.samsung.com/is/image/samsung/assets/uk/laptop-buying-guide/galaxy-book-3-range-explained/347x207_Gifting.png",imageAlt:"Galaxy products on the table",link:"https://www.samsung.com/uk/mobile/galaxygifts/",linkCopy:"Shop Now",sku:"XE310XBA-KA1UK"}],Je=function(){var e=(0,o.dD)(),t=(0,o.Av)();q(Qe[0].sku),q(Qe[1].sku);return console.log(t),e?(0,E.jsxs)(o.W2,{background:"#000",padding:"0px 10px",children:[(0,E.jsx)(C,{size:"xxl",font:"secondary",style:{textAlign:"center",fontWeight:"bold",color:"white"},children:"Explore the Galaxy Book range"}),(0,E.jsx)("br",{}),(0,E.jsx)(Ye,{slidesToShow:1,children:Qe.map((function(e,t){return(0,E.jsx)(Xe,{width:"100%",children:(0,E.jsxs)(o.W2,{style:{backgroundColor:"white",width:"100%",height:"50%",justifyContent:"center",alignItems:"center",borderRadius:"20px",margin:"10px",position:"relative",padding:"3em 1.2em"},children:[e.tag&&(0,E.jsx)("span",{style:{backgroundImage:"url(https://images.samsung.com/is/image/samsung/assets/uk/computing/wobbly.png)",width:"63px",height:"29px",backgroundSize:"contain",backgroundRepeat:"no-repeat",display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"11px",left:"11px"},children:(0,E.jsx)(C,{font:"primary",weight:"bold",padding:"0",margin:"0",style:{color:"white",fontSize:"13px",textAlign:"center"},children:e.tag})}),(0,E.jsx)(C,{size:"xl",weight:"bold",style:{fontFamily:"SamsungSharpSans",minHeight:"30px",textAlign:"center"},children:e.title}),(0,E.jsx)(C,{style:{fontSize:"14px",textAlign:"center",margin:"20px",minHeight:"58px"},children:e.description}),(0,E.jsx)("img",{style:{width:"100%",borderRadius:"20px"},src:e.image,alt:e.imageAlt}),(0,E.jsx)(D,be(be({style:{padding:"10px 30px",marginTop:"24px"}},(0,o.rE)("".concat(e.linkCopy,"-cta"))),{},{target:e.link.startsWith("http")?"_blank":"",href:e.link,children:e.linkCopy}))]})},t)}))})]}):(0,E.jsxs)(o.W2,{padding:"0",background:"#000",children:[(0,E.jsx)(C,{size:"xxl",font:"secondary",style:{textAlign:"center",fontWeight:"bold",color:"white"},children:"Explore the Galaxy Book range"}),(0,E.jsx)("br",{}),(0,E.jsx)(o.W2,{row:!0,style:{textAlign:"center",width:"90%",gap:"3%",padding:0},children:Qe.map((function(t,n){return(0,E.jsxs)(o.W2,{style:{backgroundColor:"white",width:"100%",height:"100%",padding:"46px 10px",borderRadius:"20px",position:"relative"},children:[t.tag&&(0,E.jsx)("span",{style:{backgroundImage:"url(https://images.samsung.com/is/image/samsung/assets/uk/computing/wobbly.png)",width:"63px",height:"29px",backgroundSize:"contain",backgroundRepeat:"no-repeat",display:"flex",justifyContent:"center",alignItems:"center",position:"absolute",top:"11px",left:"11px"},children:(0,E.jsx)(C,{font:"primary",weight:"bold",padding:"0",margin:"0",style:{color:"white",fontSize:"13px",textAlign:"center"},children:t.tag})}),(0,E.jsx)(qe,{font:"secondary",style:{fontSize:"min(26px, 2.8vw)",fontWeight:"bold",textAlign:"center",height:"1.5em",paddingTop:"0.3em"},children:t.title}),(0,E.jsx)(C,{style:{fontSize:"max(12px, min(16px, 1.7vw))",textAlign:"center",margin:"10px",minHeight:"".concat(e?"120px":"80px")},children:t.description}),(0,E.jsx)("img",{src:t.image,style:{width:"100%",borderRadius:"20px"},alt:t.imageAlt}),(0,E.jsx)(D,be(be({style:{padding:"10px 30px",marginTop:"24px"},target:t.link.startsWith("http")?"_blank":""},(0,o.rE)("".concat(t.linkCopy,"-cta"))),{},{href:t.link,children:t.linkCopy}))]},n)}))})]})},et=JSON.parse('{"d":[{"id":1,"title":"Laptop or Tablet: Which should you buy?","link":"https://www.samsung.com/uk/laptop-buying-guide/laptop-vs-tablet/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/whySamsung.png","imageAlt":"Laptop or Tablet: Which should you buy?"},{"id":2,"title":"What is the best Samsung laptop?","link":"https://www.samsung.com/uk/laptop-buying-guide/samsung-laptop-series-explained/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/storageLaptop.png","imageAlt":"What is the best Samsung laptop?"},{"id":3,"title":"What is the best Samsung laptop for students?","link":"https://www.samsung.com/uk/laptop-buying-guide/best-laptop-for-students/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/built_in_appsLaptop2.png?$320_N_PNG$","imageAlt":"The best storage for my laptop needs"},{"id":4,"title":"What to look for when buying a laptop","link":"https://www.samsung.com/uk/laptop-buying-guide/how-to-choose-a-laptop/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/screensizeLaptop2.png?$320_N_PNG$","imageAlt":"What to look for when buying a laptop"},{"id":5,"title":"What is a 2-in-1 laptop?","link":"https://www.samsung.com/uk/laptop-buying-guide/what-is-a-2-in-1-laptop/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/camaraLaptop.png","imageAlt":"What is a 2-in-1 laptop?"},{"id":6,"title":"What Laptop Accessories Do I Need?","link":"https://www.samsung.com/uk/laptop-buying-guide/best-laptop-accessories/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/accessories2.png","imageAlt":"What Laptop Accessories Do I Need?"},{"id":7,"title":"Which Galaxy Book3 is Best for You","link":"https://www.samsung.com/uk/laptop-buying-guide/galaxy-book-3-range-explained/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/whichbook3.png","imageAlt":"Which Galaxy Book3 is Best for You"},{"id":8,"title":"Best Samsung Gaming Laptop","link":"https://www.samsung.com/uk/laptop-buying-guide/best-gaming-laptop/","image":"https://images.samsung.com/is/image/samsung/assets/uk/computing/bestgaminglaptop_v2.png","imageAlt":"Best Samsung Gaming Laptop"}]}').d,tt=(0,i.default)(o.W2)(Le||(Le=a(["\n display: flex;\n flex-direction: column-reverse;\n justify-content: space-between;\n align-items: center;\n width: 100%;\n"]))),nt=function(){var e=(0,o.dD)(),t=et.slice(0,4),n=et.slice(4,8);return e?(0,E.jsxs)(o.W2,{padding:"0",width:"100%",children:[(0,E.jsx)(C,{size:e?22:24,style:{paddingLeft:"30px",paddingRight:"30px"},font:"secondary",weight:"bold",align:"center",children:"We're here to help you find the right laptop for you"}),(0,E.jsx)(o.W2,{width:"100%",padding:"10px 0px",children:(0,E.jsx)(Ye,{translateNum:100,children:t.map((function(e,t){return(0,E.jsx)(Xe,{width:"100%",children:(0,E.jsxs)(tt,{children:[(0,E.jsx)(D,be(be({},(0,o.rE)("read-more-cta")),{},{type:"link",href:e.link,rel:"noopener noreferrer",color:"black",style:{backgroundColor:"unset",color:"black",padding:"3px 30px",fontSize:"16px",margin:"10px 0"},children:"Read more >"})),(0,E.jsx)("div",{style:{margin:"0 auto",width:"100%"},children:(0,E.jsx)(C,{type:"h3",color:"black",font:"secondary",weight:"bold",align:"center",size:"xl",children:e.title})}),(0,E.jsx)("img",{style:{margin:"15px"},width:"100%",height:"auto",src:e.image,alt:e.imageAlt})]})},t)}))})}),(0,E.jsx)(o.W2,{width:"100%",padding:"10px 0px",children:(0,E.jsx)(Ye,{translateNum:100,children:n.map((function(e,t){return(0,E.jsx)(Xe,{width:"100%",children:(0,E.jsxs)(tt,{children:[(0,E.jsx)(D,be(be({},(0,o.rE)("read-more-cta")),{},{type:"link",href:e.link,rel:"noopener noreferrer",color:"black",style:{backgroundColor:"unset",color:"black",padding:"3px 30px",fontSize:"16px",margin:"10px 0"},children:"Read more >"})),(0,E.jsx)("div",{style:{margin:"0 auto",width:"100%"},children:(0,E.jsx)(C,{type:"h3",color:"black",font:"secondary",weight:"bold",align:"center",size:"xl",children:e.title})}),(0,E.jsx)("img",{style:{margin:"15px"},width:"100%",height:"auto",src:e.image,alt:e.imageAlt})]})},t)}))})})]}):(0,E.jsxs)(E.Fragment,{children:[" ",(0,E.jsx)(o.W2,{padding:"0",row:!0,children:(0,E.jsx)(C,{size:"xxl",font:"secondary",weight:"bold",children:"We're here to help you find the right laptop for you"})}),(0,E.jsx)(o.W2,{row:!0,alignItems:"end",children:et.map((function(e,t){if(t<4)return(0,E.jsxs)(tt,{children:[(0,E.jsx)(D,be(be({},(0,o.rE)("read-more-cta")),{},{type:"link",href:e.link,rel:"noopener noreferrer",color:"black",style:{backgroundColor:"unset",color:"black",padding:"7px 30px",fontSize:"16px",margin:"10px 0"},children:"Read more >"})),(0,E.jsx)("div",{style:{margin:"0 auto",width:"80%"},children:(0,E.jsx)(C,{type:"h3",color:"black",font:"secondary",weight:"bold",align:"center",size:"l",children:e.title})}),(0,E.jsx)("img",{style:{margin:"15px"},width:"100%",height:"auto",src:e.image,alt:e.imageAlt})]})}))}),(0,E.jsx)(o.W2,{row:!0,alignItems:"end",style:{flexWrap:"wrap"},children:et.map((function(e,t){if(t>3)return(0,E.jsxs)(tt,{style:{flex:"0 0 25%"},children:[(0,E.jsx)(D,be(be({},(0,o.rE)("read-more-cta")),{},{type:"link",href:e.link,rel:"noopener noreferrer",color:"black",style:{backgroundColor:"unset",color:"black",padding:"7px 30px",fontSize:"16px",margin:"10px 0"},children:"Read more >"})),(0,E.jsx)("div",{style:{margin:"0 auto",width:t>5?"60%":"100%"},children:(0,E.jsx)(C,{type:"h3",color:"black",font:"secondary",weight:"bold",align:"center",size:"l",style:{minHeight:"50px"},children:e.title})}),(0,E.jsx)("img",{style:{margin:"15px"},width:"100%",height:"auto",src:e.image,alt:e.imageAlt})]})}))})]})};function rt(){var e=(0,o.dD)();return(0,E.jsx)("div",{style:{padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:(0,E.jsxs)(o.W2,{style:{padding:"0px"},children:[(0,E.jsx)(C,{size:"xxl",align:"center",weight:"bold",font:"secondary",children:"Be smart at switching"}),(0,E.jsxs)(o.W2,{row:!e,style:{borderRadius:"10px",backgroundColor:"#F4F6F8",maxWidth:"1070px"},children:[(0,E.jsx)("div",{style:{width:"100%"},children:(0,E.jsx)("img",{src:"https://images.samsung.com/is/image/samsung/assets/uk/computing/gb3ss.png",alt:"smart switch",style:{width:"100%",height:"auto",objectFit:"cover",position:"relative"}})}),(0,E.jsxs)(o.W2,{alignItems:e?"center":"flex-start",children:[(0,E.jsx)(C,{size:"xl",font:"secondary",weight:"bold",children:"Galaxy Book Smart Switch"}),(0,E.jsx)(C,{size:"m",align:e?"center":"flex-start",width:"80%",children:"Here is a simple guide that will take you through transferring everything you need, so you can get up and running on your new device quickly."}),(0,E.jsx)(D,be(be({},(0,o.rE)("Learn-more-cta")),{},{href:"https://www.samsung.com/uk/support/computing/use-smart-switch-to-transfer-your-data-to-your-new-galaxy-book/",style:{width:"fit-content",padding:"10px 15px"},children:"Learn more"}))]})]})]})})}function ot(){var e=(0,o.dD)();return(0,E.jsxs)("div",{style:{padding:"0",background:"#fff",color:"#fff",display:"flex",flexDirection:e?"column-reverse":"column",position:"relative"},children:[(0,E.jsx)(o.W2,{width:"100%",alignItems:"flex-end",style:{display:e?"none":"flex",zIndex:2},children:(0,E.jsx)(D,be(be({style:{background:"none",color:"#000",borderBottom:"1px solid #000",borderRadius:"0",padding:"0"}},(0,o.rE)("business-cta")),{},{href:"/uk/business/galaxy-book/",children:"Here for business? >"}))}),(0,E.jsxs)(o.W2,{children:[(0,E.jsx)(C,{style:{color:"#000",textTransform:"uppercase",fontWeight:700,fontSize:e?"11px":""},children:"Discover the galaxy book"}),(0,E.jsx)(C,{size:"xxl",align:"center",weight:"bold",font:"secondary",color:"black",children:"Open up a universe of possibilities"}),(0,E.jsx)(C,{size:"m",align:"center",color:"black",children:"Let us introduce you to our laptops. Ready to work and play as hard as you do, it\u2019s time to open up a different experience."}),(0,E.jsx)(o.W2,{style:{flexDirection:e?"column":"row"},children:(0,E.jsx)(L,be(be({style:{background:"linear-gradient(32deg, rgb(0, 0, 0) 0%, rgb(7, 31, 83) 100%)"}},(0,o.rE)("meet-our-laptops-cta")),{},{href:"/uk/computers/all-computers/",children:"Shop all"}))}),(0,E.jsx)("img",{src:"https://images.samsung.com/is/image/samsung/assets/uk/computing/GB4Series_KV_v2.png",alt:"Galaxy Book3 series displayed next to each other.",style:{width:e?"100%":"85%",height:"auto"}})]})]})}var it=window.innerWidth,at={OneUI:{content:{position:"center",brow:"",header:"Student Finance",text:"Need a helping hand to get everything you need to learn? Check out our student finance options and get up to 25% off. Class.",link:{src:"/uk/students-offers/",copy:"Learn more"}},image:{desktop:{src:"studentfinance-01.png",alt:"Student finance"}},colWidth:1},LifeWithGalaxy:{content:{position:"center",brow:"",header:"See it. Love it. Spread the cost",color:"black",text:"Choose how much you pay upfront (with a minimum 10%). Then pay the remainder over a term of your choosing - anything from 12 to 36 months, with an interest rate of 0% APR representative*",link:{src:"/uk/samsung-finance/",copy:"Learn more"}},image:{desktop:{src:"spread-the-cost-01.png",alt:"Finance"}},colWidth:1}},st=i.default.div(Be||(Be=a(["\n padding: min(33px, 2.3vw);\n border-radius: min(10px, 0.76vw);\n //box-shadow: 2px 2px 15px 0px #00000066;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n display: flex;\n flex-direction: column;\n\n // &:hover {\n // box-shadow: 10px 10px 15px 0px #00000066;\n // transform: scale(1.005);\n // }\n @media screen and (max-width: 768px) {\n padding: 6.17vw;\n border-radius: 1.44vw;\n }\n"]))),lt=(0,i.default)(st)(Ie||(Ie=a(["\n width: calc(50% - min(25px, 1.736vw));\n aspect-ratio: 1 / 1;\n\n @supports not (aspect-ratio: 1 / 1) {\n height: 489px;\n }\n\n @media screen and (max-width: 768px) {\n width: 100%;\n\n @supports not (aspect-ratio: 1 / 1) {\n height: 410px;\n }\n }\n"]))),ut=(0,i.default)(st)(Ve||(Ve=a(["\n width: 100%;\n aspect-ratio: 1029/ 358;\n\n @supports not (aspect-ratio: 1 / 1) {\n height: 360px;\n }\n\n @media screen and (max-width: 768px) {\n aspect-ratio: 1/1;\n @supports not (aspect-ratio: 1 / 1) {\n height: 410px;\n }\n }\n"]))),ct=(0,i.default)(o.rU)(Ne||(Ne=a(["\n &:after {\n width: 0.4em;\n height: 0.4em;\n }\n"]))),dt=function(e,t){var n=e.brow,r=e.header,i=e.text,a=e.color,s=e.link;return(0,E.jsxs)("div",{style:{textAlign:"left"},children:[(0,E.jsx)(o.xv,{size:t?18:14,color:"black"===a?"black":"white",weight:"bold",align:"left",children:n}),(0,E.jsx)(o.xv,{size:t?30:24,color:"black"===a?"black":"white",weight:"bold",font:"secondary",align:"left",style:{margin:"0.35em 0"},children:r}),(0,E.jsx)(o.xv,{size:t?18:16,color:"black"===a?"black":"white",font:"primary",align:"left",style:{margin:"0.35em 0"},children:i}),s&&(0,E.jsx)(ct,{arrow:!0,href:s.src,color:"black"===a?"black":"white",size:t?24:14,style:{textDecoration:"none",fontWeight:"bold",fontFamily:o.rS.fonts.primary,textAlign:"left",display:"inline-block"},children:s.copy})]})},ft=function(){var e=(0,o.dD)();return(0,E.jsxs)(o.W2,{style:{padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:[(0,E.jsx)(o.xv,{weight:"bold",size:e?18:16,color:"white",children:"A GALAXY FOR EVERYONE"}),(0,E.jsx)(o.xv,{font:"secondary",weight:"bold",size:38,style:{margin:"0.5em auto 2em"},color:"white",children:"Explore finance options"}),(0,E.jsx)("div",{style:{width:e?"85.3vw":"min(1029px, 71.5vw)",display:"flex",gap:"min(50px, 3.47vw)",flexWrap:"wrap",marginBottom:"20px"},children:Object.entries(at).map((function(t){var n,r=(0,P.Z)(t,2),o=(r[0],r[1]);return 1===o.colWidth||e?(0,E.jsx)(lt,{style:{backgroundImage:"url(".concat("https://images.samsung.com/is/image/samsung/assets/uk/computing/").concat(null===(n=o.image[e&&o.image.mobile?"mobile":"desktop"])||void 0===n?void 0:n.src,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",alignItems:"center",justifyContent:"flex-start",minHeight:e?"420px":"600px",height:it<800&&it>700?"768px":""},children:(0,E.jsx)("div",{style:{alignSelf:"center",textAlign:"center"},children:dt(o.content,e)})}):(0,E.jsx)(ut,{style:{backgroundImage:"url(".concat("https://images.samsung.com/is/image/samsung/assets/uk/computing/").concat(o.image.desktop.src,")"),backgroundSize:"cover",backgroundRepeat:"no-repeat",backgroundPosition:"center center",alignItems:o.content.position,justifyContent:"center"},children:(0,E.jsx)("div",{style:{textAlign:"center",marginBottom:"5%",marginLeft:"5%"},children:dt(o.content,e)})})}))})]})},pt=n(5531);var ht="#000000",mt="#464646",vt="#121212",gt="#b7b7b7",yt="#ffffff",bt="#f4f4f4",xt="#ff9922",wt="#2189ff",kt="#6E6A69",St="#0274C2",_t={black:ht,grey:mt,darkGrey:vt,lightGrey:gt,white:yt,offWhite:bt,flag:xt,primary:wt,outOfStock:kt,secondary:St},Et=(0,t.createContext)({transformPagePoint:function(e){return e},isStatic:!1,reducedMotion:"never"}),Ct=(0,t.createContext)({}),Pt=(0,t.createContext)(null),At="undefined"!==typeof window,Tt=At?t.useLayoutEffect:t.useEffect,jt=(0,t.createContext)({strict:!1}),Rt=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},Ot="data-"+Rt("framerAppearId"),Ft=!1,Mt=!1;var Dt=["read","resolveKeyframes","update","preRender","render","postRender"];function Lt(e,t){var n=!1,r=!0,o={delta:0,timestamp:0,isProcessing:!1},i=function(){return n=!0},a=Dt.reduce((function(e,t){return e[t]=function(e){var t=new Set,n=new Set,r=!1,o=!1,i=new WeakSet,a={delta:0,timestamp:0,isProcessing:!1};function s(t){i.has(t)&&(l.schedule(t),e()),t(a)}var l={schedule:function(e){var o=arguments.length>2&&void 0!==arguments[2]&&arguments[2]&&r?t:n;return arguments.length>1&&void 0!==arguments[1]&&arguments[1]&&i.add(e),o.has(e)||o.add(e),e},cancel:function(e){n.delete(e),i.delete(e)},process:function(e){if(a=e,r)o=!0;else{r=!0;var i=[n,t];t=i[0],(n=i[1]).clear(),t.forEach(s),r=!1,o&&(o=!1,l.process(e))}}};return l}(i),e}),{}),s=a.read,l=a.resolveKeyframes,u=a.update,c=a.preRender,d=a.render,f=a.postRender,p=function i(){var a=Mt?o.timestamp:performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(a-o.timestamp,40),1),o.timestamp=a,o.isProcessing=!0,s.process(o),l.process(o),u.process(o),c.process(o),d.process(o),f.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(i))},h=function(){n=!0,r=!0,o.isProcessing||e(p)},m=Dt.reduce((function(e,t){var r=a[t];return e[t]=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return n||h(),r.schedule(e,t,o)},e}),{});return{schedule:m,cancel:function(e){for(var t=0;t<Dt.length;t++)a[Dt[t]].cancel(e)},state:o,steps:a}}var Bt=Lt(queueMicrotask,!1),It=Bt.schedule;Bt.cancel;function Vt(e){return e&&"object"===typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}var Nt=(0,t.createContext)({}),zt=!1;function Ut(e,n,r,o,i){var a,s=(0,t.useContext)(Ct).visualElement,l=(0,t.useContext)(jt),u=(0,t.useContext)(Pt),c=(0,t.useContext)(Et).reducedMotion,d=(0,t.useRef)();o=o||l.renderer,!d.current&&o&&(d.current=o(e,{visualState:n,parent:s,props:r,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:c}));var f=d.current,p=(0,t.useContext)(Nt);!f||f.projection||!i||"html"!==f.type&&"svg"!==f.type||function(e,t,n,r){var o=t.layoutId,i=t.layout,a=t.drag,s=t.dragConstraints,l=t.layoutScroll,u=t.layoutRoot;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Wt(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(a)||s&&Vt(s),visualElement:e,animationType:"string"===typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:u})}(d.current,r,i,p),(0,t.useInsertionEffect)((function(){f&&f.update(r,u)}));var h=r[Ot],m=(0,t.useRef)(Boolean(h)&&!window.MotionHandoffIsComplete&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,h)));return Tt((function(){f&&(f.updateFeatures(),It.render(f.render),m.current&&f.animationState&&f.animationState.animateChanges())})),(0,t.useEffect)((function(){f&&(!m.current&&f.animationState&&f.animationState.animateChanges(),m.current=!1,zt||(zt=!0,queueMicrotask(Gt)))})),f}function Gt(){window.MotionHandoffIsComplete=!0}function Wt(e){if(e)return!1!==e.options.allowProjection?e.projection:Wt(e.parent)}function Zt(e,n,r){return(0,t.useCallback)((function(t){t&&e.mount&&e.mount(t),n&&(t?n.mount(t):n.unmount()),r&&("function"===typeof r?r(t):Vt(r)&&(r.current=t))}),[n])}function Ht(e){return"string"===typeof e||Array.isArray(e)}function $t(e){return null!==e&&"object"===typeof e&&"function"===typeof e.start}var Kt=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Xt=["initial"].concat(Kt);function Yt(e){return $t(e.animate)||Xt.some((function(t){return Ht(e[t])}))}function qt(e){return Boolean(Yt(e)||e.variants)}function Qt(e){var n=function(e,t){if(Yt(e)){var n=e.initial,r=e.animate;return{initial:!1===n||Ht(n)?n:void 0,animate:Ht(r)?r:void 0}}return!1!==e.inherit?t:{}}(e,(0,t.useContext)(Ct)),r=n.initial,o=n.animate;return(0,t.useMemo)((function(){return{initial:r,animate:o}}),[Jt(r),Jt(o)])}function Jt(e){return Array.isArray(e)?e.join(" "):e}var en={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tn={},nn=function(e){tn[e]={isEnabled:function(t){return en[e].some((function(e){return!!t[e]}))}}};for(var rn in en)nn(rn);var on=(0,t.createContext)({}),an=Symbol.for("motionComponentSymbol");function sn(e){var n=e.preloadedFeatures,r=e.createVisualElement,o=e.useRender,i=e.useVisualState,a=e.Component;n&&function(e){for(var t in e)tn[t]=be(be({},tn[t]),e[t])}(n);var s=(0,t.forwardRef)((function(e,n){var s,l=be(be(be({},(0,t.useContext)(Et)),e),{},{layoutId:ln(e)}),u=l.isStatic,c=Qt(e),d=i(e,u);if(!u&&At){!function(e,n){(0,t.useContext)(jt).strict;0}();var f=function(e){var t=tn.drag,n=tn.layout;if(!t&&!n)return{};var r=be(be({},t),n);return{MeasureLayout:(null===t||void 0===t?void 0:t.isEnabled(e))||(null===n||void 0===n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(l);s=f.MeasureLayout,c.visualElement=Ut(a,d,l,r,f.ProjectionNode)}return(0,E.jsxs)(Ct.Provider,{value:c,children:[s&&c.visualElement?(0,E.jsx)(s,be({visualElement:c.visualElement},l)):null,o(a,e,Zt(d,c.visualElement,n),d,u,c.visualElement)]})}));return s[an]=a,s}function ln(e){var n=e.layoutId,r=(0,t.useContext)(on).id;return r&&void 0!==n?r+"-"+n:n}function un(e){function t(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return sn(e(t,n))}if("undefined"===typeof Proxy)return t;var n=new Map;return new Proxy(t,{get:function(e,r){return n.has(r)||n.set(r,t(r)),n.get(r)}})}var cn=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dn(e){return"string"===typeof e&&!e.includes("-")&&!!(cn.indexOf(e)>-1||/[A-Z]/.test(e))}var fn={};var pn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],hn=new Set(pn);function mn(e,t){var n=t.layout,r=t.layoutId;return hn.has(e)||e.startsWith("origin")||(n||void 0!==r)&&(!!fn[e]||"opacity"===e)}var vn=function(e){return Boolean(e&&e.getVelocity)},gn=function(e,t){return t&&"number"===typeof e?t.transform(e):e},yn=function(e,t,n){return n>t?t:n<e?e:n},bn={test:function(e){return"number"===typeof e},parse:parseFloat,transform:function(e){return e}},xn=be(be({},bn),{},{transform:function(e){return yn(0,1,e)}}),wn=be(be({},bn),{},{default:1}),kn=function(e){return Math.round(1e5*e)/1e5},Sn=/\x2D?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)/g,_n=/(?:#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:\x2D?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}\x2D?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\))/gi,En=/^(?:#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:\x2D?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}\x2D?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\))$/i;function Cn(e){return"string"===typeof e}var Pn=function(e){return{test:function(t){return Cn(t)&&t.endsWith(e)&&1===t.split(" ").length},parse:parseFloat,transform:function(t){return"".concat(t).concat(e)}}},An=Pn("deg"),Tn=Pn("%"),jn=Pn("px"),Rn=Pn("vh"),On=Pn("vw"),Fn=be(be({},Tn),{},{parse:function(e){return Tn.parse(e)/100},transform:function(e){return Tn.transform(100*e)}}),Mn=be(be({},bn),{},{transform:Math.round}),Dn={borderWidth:jn,borderTopWidth:jn,borderRightWidth:jn,borderBottomWidth:jn,borderLeftWidth:jn,borderRadius:jn,radius:jn,borderTopLeftRadius:jn,borderTopRightRadius:jn,borderBottomRightRadius:jn,borderBottomLeftRadius:jn,width:jn,maxWidth:jn,height:jn,maxHeight:jn,size:jn,top:jn,right:jn,bottom:jn,left:jn,padding:jn,paddingTop:jn,paddingRight:jn,paddingBottom:jn,paddingLeft:jn,margin:jn,marginTop:jn,marginRight:jn,marginBottom:jn,marginLeft:jn,rotate:An,rotateX:An,rotateY:An,rotateZ:An,scale:wn,scaleX:wn,scaleY:wn,scaleZ:wn,skew:An,skewX:An,skewY:An,distance:jn,translateX:jn,translateY:jn,translateZ:jn,x:jn,y:jn,z:jn,perspective:jn,transformPerspective:jn,opacity:xn,originX:Fn,originY:Fn,originZ:jn,zIndex:Mn,backgroundPositionX:jn,backgroundPositionY:jn,fillOpacity:xn,strokeOpacity:xn,numOctaves:Mn},Ln={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Bn=pn.length;var In=function(e){return function(t){return"string"===typeof t&&t.startsWith(e)}},Vn=In("--"),Nn=In("var(--"),zn=function(e){return!!Nn(e)&&Un.test(e.split("/*")[0].trim())},Un=/var\(\x2D\x2D(?:[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*|[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,(?:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:(?![\t-\r \(\)\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\((?:(?:(?![\(\)])[\s\S])|\((?:(?![\(\)])[\s\S])*\))*\))+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)\)$/i;function Gn(e,t,n){var r=e.style,o=e.vars,i=e.transformOrigin,a=!1,s=!1;for(var l in t){var u=t[l];if(hn.has(l))a=!0;else if(Vn(l))o[l]=u;else{var c=gn(u,Dn[l]);l.startsWith("origin")?(s=!0,i[l]=c):r[l]=c}}if(t.transform||(a||n?r.transform=function(e,t,n){for(var r="",o=!0,i=0;i<Bn;i++){var a=pn[i],s=e[a];if(void 0!==s){var l=!0;if(!(l="number"===typeof s?s===(a.startsWith("scale")?1:0):0===parseFloat(s))||n){var u=gn(s,Dn[a]);l||(o=!1,r+="".concat(Ln[a]||a,"(").concat(u,") ")),n&&(t[a]=u)}}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),s){var d=i.originX,f=void 0===d?"50%":d,p=i.originY,h=void 0===p?"50%":p,m=i.originZ,v=void 0===m?0:m;r.transformOrigin="".concat(f," ").concat(h," ").concat(v)}}var Wn=function(){return{style:{},transform:{},transformOrigin:{},vars:{}}};function Zn(e,t,n){for(var r in t)vn(t[r])||mn(r,n)||(e[r]=t[r])}function Hn(e,n){var r={};return Zn(r,e.style||{},e),Object.assign(r,function(e,n){var r=e.transformTemplate;return(0,t.useMemo)((function(){var e={style:{},transform:{},transformOrigin:{},vars:{}};return Gn(e,n,r),Object.assign({},e.vars,e.style)}),[n])}(e,n)),r}function $n(e,t){var n={},r=Hn(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=!0===e.drag?"none":"pan-".concat("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}var Kn=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Xn(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||Kn.has(e)}var Yn,qn=function(e){return!Xn(e)};try{(Yn=require("@emotion/is-prop-valid").default)&&(qn=function(e){return e.startsWith("on")?!Xn(e):Yn(e)})}catch(Ic){}function Qn(e,t,n){var r={};for(var o in e)"values"===o&&"object"===typeof e.values||(qn(o)||!0===n&&Xn(o)||!t&&!Xn(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}function Jn(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function er(e,t,n){return"string"===typeof e?e:jn.transform(t+n*e)}var tr={offset:"stroke-dashoffset",array:"stroke-dasharray"},nr={offset:"strokeDashoffset",array:"strokeDasharray"};var rr=["attrX","attrY","attrScale","originX","originY","pathLength","pathSpacing","pathOffset"];function or(e,t,n,r){var o=t.attrX,i=t.attrY,a=t.attrScale,s=t.originX,l=t.originY,u=t.pathLength,c=t.pathSpacing,d=void 0===c?1:c,f=t.pathOffset,p=void 0===f?0:f;if(Gn(e,Jn(t,rr),r),n)e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);else{e.attrs=e.style,e.style={};var h=e.attrs,m=e.style,v=e.dimensions;h.transform&&(v&&(m.transform=h.transform),delete h.transform),v&&(void 0!==s||void 0!==l||m.transform)&&(m.transformOrigin=function(e,t,n){var r=er(t,e.x,e.width),o=er(n,e.y,e.height);return"".concat(r," ").concat(o)}(v,void 0!==s?s:.5,void 0!==l?l:.5)),void 0!==o&&(h.x=o),void 0!==i&&(h.y=i),void 0!==a&&(h.scale=a),void 0!==u&&function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];e.pathLength=1;var i=o?tr:nr;e[i.offset]=jn.transform(-r);var a=jn.transform(t),s=jn.transform(n);e[i.array]="".concat(a," ").concat(s)}(h,u,d,p,!1)}}var ir=function(){return be(be({},{style:{},transform:{},transformOrigin:{},vars:{}}),{},{attrs:{}})},ar=function(e){return"string"===typeof e&&"svg"===e.toLowerCase()};function sr(e,n,r,o){var i=(0,t.useMemo)((function(){var t=ir();return or(t,n,ar(o),e.transformTemplate),be(be({},t.attrs),{},{style:be({},t.style)})}),[n]);if(e.style){var a={};Zn(a,e.style,e),i.style=be(be({},a),i.style)}return i}function lr(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=function(n,r,o,i,a){var s=i.latestValues,l=(dn(n)?sr:$n)(r,s,a,n),u=Qn(r,"string"===typeof n,e),c=n!==t.Fragment?be(be(be({},u),l),{},{ref:o}):{},d=r.children,f=(0,t.useMemo)((function(){return vn(d)?d.get():d}),[d]);return(0,t.createElement)(n,be(be({},c),{},{children:f}))};return n}function ur(e,t,n,r){var o=t.style,i=t.vars;for(var a in Object.assign(e.style,o,r&&r.getProjectionStyles(n)),i)e.style.setProperty(a,i[a])}var cr=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function dr(e,t,n,r){for(var o in ur(e,t,void 0,r),t.attrs)e.setAttribute(cr.has(o)?o:Rt(o),t.attrs[o])}function fr(e,t,n){var r,o=e.style,i={};for(var a in o)(vn(o[a])||t.style&&vn(t.style[a])||mn(a,e)||void 0!==(null===(r=null===n||void 0===n?void 0:n.getValue(a))||void 0===r?void 0:r.liveStyle))&&(i[a]=o[a]);return n&&o&&"string"===typeof o.willChange&&(n.applyWillChange=!1),i}function pr(e,t,n){var r=fr(e,t,n);for(var o in e){if(vn(e[o])||vn(t[o]))r[-1!==pn.indexOf(o)?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o]=e[o]}return r}function hr(e){var t=[{},{}];return null===e||void 0===e||e.values.forEach((function(e,n){t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function mr(e,t,n,r){if("function"===typeof t){var o=hr(r),i=(0,P.Z)(o,2),a=i[0],s=i[1];t=t(void 0!==n?n:e.custom,a,s)}if("string"===typeof t&&(t=e.variants&&e.variants[t]),"function"===typeof t){var l=hr(r),u=(0,P.Z)(l,2),c=u[0],d=u[1];t=t(void 0!==n?n:e.custom,c,d)}return t}var vr=function(e){return Array.isArray(e)};function gr(e){var t,n=vn(e)?e.get():e;return t=n,Boolean(t&&"object"===typeof t&&t.mix&&t.toValue)?n.toValue():n}var yr=new Set(["opacity","clipPath","filter","transform"]);function br(e){return hn.has(e)?"transform":yr.has(e)?Rt(e):void 0}function xr(e,t){-1===e.indexOf(t)&&e.push(t)}function wr(e,t){var n=e.indexOf(t);n>-1&&e.splice(n,1)}var kr=["transitionEnd","transition"];var Sr=function(e){return function(n,r){var o=(0,t.useContext)(Ct),i=(0,t.useContext)(Pt),a=function(){return function(e,t,n,r,o){var i=e.applyWillChange,a=void 0!==i&&i,s=e.scrapeMotionValuesFromProps,l=e.createRenderState,u=e.onMount,c={latestValues:Cr(t,n,r,!o&&a,s),renderState:l()};return u&&(c.mount=function(e){return u(t,e,c)}),c}(e,n,o,i,r)};return r?a():function(e){var n=(0,t.useRef)(null);return null===n.current&&(n.current=e()),n.current}(a)}};function _r(e,t){var n=br(t);n&&xr(e,n)}function Er(e,t,n){for(var r=Array.isArray(t)?t:[t],o=0;o<r.length;o++){var i=mr(e,r[o]);if(i){var a=i.transitionEnd;i.transition;n(Jn(i,kr),a)}}}function Cr(e,t,n,r,o){var i,a={},s=[],l=r&&void 0===(null===(i=e.style)||void 0===i?void 0:i.willChange),u=o(e,{});for(var c in u)a[c]=gr(u[c]);var d=e.initial,f=e.animate,p=Yt(e),h=qt(e);t&&h&&!p&&!1!==e.inherit&&(void 0===d&&(d=t.initial),void 0===f&&(f=t.animate));var m=!!n&&!1===n.initial,v=(m=m||!1===d)?f:d;return v&&"boolean"!==typeof v&&!$t(v)&&Er(e,v,(function(e,t){for(var n in e){var r=e[n];if(Array.isArray(r))r=r[m?r.length-1:0];null!==r&&(a[n]=r)}for(var o in t)a[o]=t[o]})),l&&(f&&!1!==d&&!$t(f)&&Er(e,f,(function(e){for(var t in e)_r(s,t)})),s.length&&(a.willChange=s.join(","))),a}var Pr=function(e){return e},Ar=Lt("undefined"!==typeof requestAnimationFrame?requestAnimationFrame:Pr,!0),Tr=Ar.schedule,jr=Ar.cancel,Rr=Ar.state,Or=Ar.steps,Fr={useVisualState:Sr({scrapeMotionValuesFromProps:pr,createRenderState:ir,onMount:function(e,t,n){var r=n.renderState,o=n.latestValues;Tr.read((function(){try{r.dimensions="function"===typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){r.dimensions={x:0,y:0,width:0,height:0}}})),Tr.render((function(){or(r,o,ar(t.tagName),e.transformTemplate),dr(t,r)}))}})},Mr={useVisualState:Sr({applyWillChange:!0,scrapeMotionValuesFromProps:fr,createRenderState:Wn})};function Dr(e,t){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Dr(e,t)}function Lr(e,t){if("function"!==typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dr(e,t)}function Br(e){return Br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Br(e)}var Ir=n(9675);function Vr(e,t){if(t&&("object"===(0,Ir.Z)(t)||"function"===typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Nr(e){var t=function(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Br(e);if(t){var o=Br(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Vr(this,n)}}function zr(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{passive:!0};return e.addEventListener(t,n,r),function(){return e.removeEventListener(t,n)}}var Ur=function(e){return"mouse"===e.pointerType?"number"!==typeof e.button||e.button<=0:!1!==e.isPrimary};function Gr(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"page";return{point:{x:e["".concat(t,"X")],y:e["".concat(t,"Y")]}}}function Wr(e,t,n,r){return zr(e,t,function(e){return function(t){return Ur(t)&&e(t,Gr(t))}}(n),r)}var Zr=function(e,t){return function(n){return t(e(n))}},Hr=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return t.reduce(Zr)};function $r(e){var t=null;return function(){return null===t&&(t=e,function(){t=null})}}var Kr=$r("dragHorizontal"),Xr=$r("dragVertical");function Yr(e){var t=!1;if("y"===e)t=Xr();else if("x"===e)t=Kr();else{var n=Kr(),r=Xr();n&&r?t=function(){n(),r()}:(n&&n(),r&&r())}return t}function qr(){var e=Yr(!0);return!e||(e(),!1)}var Qr=function(){function e(t){(0,Z.Z)(this,e),this.isMounted=!1,this.node=t}return(0,H.Z)(e,[{key:"update",value:function(){}}]),e}();function Jr(e,t){var n=t?"pointerenter":"pointerleave",r=t?"onHoverStart":"onHoverEnd";return Wr(e.current,n,(function(n,o){if("touch"!==n.pointerType&&!qr()){var i=e.getProps();e.animationState&&i.whileHover&&e.animationState.setActive("whileHover",t);var a=i[r];a&&Tr.postRender((function(){return a(n,o)}))}}),{passive:!e.getProps()[r]})}var eo=function(e){Lr(n,e);var t=Nr(n);function n(){return(0,Z.Z)(this,n),t.apply(this,arguments)}return(0,H.Z)(n,[{key:"mount",value:function(){this.unmount=Hr(Jr(this.node,!0),Jr(this.node,!1))}},{key:"unmount",value:function(){}}]),n}(Qr),to=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).isActive=!1,e}return(0,H.Z)(n,[{key:"onFocus",value:function(){var e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}},{key:"onBlur",value:function(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}},{key:"mount",value:function(){var e=this;this.unmount=Hr(zr(this.node.current,"focus",(function(){return e.onFocus()})),zr(this.node.current,"blur",(function(){return e.onBlur()})))}},{key:"unmount",value:function(){}}]),n}(Qr),no=function e(t,n){return!!n&&(t===n||e(t,n.parentElement))};function ro(e,t){if(t){var n=new PointerEvent("pointer"+e);t(n,Gr(n))}}var oo=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).removeStartListeners=Pr,e.removeEndListeners=Pr,e.removeAccessibleListeners=Pr,e.startPointerPress=function(t,n){if(!e.isPressing){e.removeEndListeners();var r=e.node.getProps(),o=Wr(window,"pointerup",(function(t,n){if(e.checkPressEnd()){var r=e.node.getProps(),o=r.onTap,i=r.onTapCancel,a=r.globalTapTarget||no(e.node.current,t.target)?o:i;a&&Tr.update((function(){return a(t,n)}))}}),{passive:!(r.onTap||r.onPointerUp)}),i=Wr(window,"pointercancel",(function(t,n){return e.cancelPress(t,n)}),{passive:!(r.onTapCancel||r.onPointerCancel)});e.removeEndListeners=Hr(o,i),e.startPress(t,n)}},e.startAccessiblePress=function(){var t=zr(e.node.current,"keydown",(function(t){if("Enter"===t.key&&!e.isPressing){e.removeEndListeners(),e.removeEndListeners=zr(e.node.current,"keyup",(function(t){"Enter"===t.key&&e.checkPressEnd()&&ro("up",(function(t,n){var r=e.node.getProps().onTap;r&&Tr.postRender((function(){return r(t,n)}))}))})),ro("down",(function(t,n){e.startPress(t,n)}))}})),n=zr(e.node.current,"blur",(function(){e.isPressing&&ro("cancel",(function(t,n){return e.cancelPress(t,n)}))}));e.removeAccessibleListeners=Hr(t,n)},e}return(0,H.Z)(n,[{key:"startPress",value:function(e,t){this.isPressing=!0;var n=this.node.getProps(),r=n.onTapStart;n.whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),r&&Tr.postRender((function(){return r(e,t)}))}},{key:"checkPressEnd",value:function(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!qr()}},{key:"cancelPress",value:function(e,t){if(this.checkPressEnd()){var n=this.node.getProps().onTapCancel;n&&Tr.postRender((function(){return n(e,t)}))}}},{key:"mount",value:function(){var e=this.node.getProps(),t=Wr(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=zr(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Hr(t,n)}},{key:"unmount",value:function(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}]),n}(Qr),io=["root"],ao=new WeakMap,so=new WeakMap,lo=function(e){var t=ao.get(e.target);t&&t(e)},uo=function(e){e.forEach(lo)};function co(e,t,n){var r=function(e){var t=e.root,n=Jn(e,io),r=t||document;so.has(r)||so.set(r,{});var o=so.get(r),i=JSON.stringify(n);return o[i]||(o[i]=new IntersectionObserver(uo,be({root:t},n))),o[i]}(t);return ao.set(e,n),r.observe(e),function(){ao.delete(e),r.unobserve(e)}}var fo={some:0,all:1},po=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).hasEnteredView=!1,e.isInView=!1,e}return(0,H.Z)(n,[{key:"startObserver",value:function(){var e=this;this.unmount();var t=this.node.getProps().viewport,n=void 0===t?{}:t,r=n.root,o=n.margin,i=n.amount,a=void 0===i?"some":i,s=n.once,l={root:r?r.current:void 0,rootMargin:o,threshold:"number"===typeof a?a:fo[a]};return co(this.node.current,l,(function(t){var n=t.isIntersecting;if(e.isInView!==n&&(e.isInView=n,!s||n||!e.hasEnteredView)){n&&(e.hasEnteredView=!0),e.node.animationState&&e.node.animationState.setActive("whileInView",n);var r=e.node.getProps(),o=r.onViewportEnter,i=r.onViewportLeave,a=n?o:i;a&&a(t)}}))}},{key:"mount",value:function(){this.startObserver()}},{key:"update",value:function(){if("undefined"!==typeof IntersectionObserver){var e=this.node,t=e.props,n=e.prevProps,r=["amount","margin","root"].some(function(e){var t=e.viewport,n=void 0===t?{}:t,r=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).viewport,o=void 0===r?{}:r;return function(e){return n[e]!==o[e]}}(t,n));r&&this.startObserver()}}},{key:"unmount",value:function(){}}]),n}(Qr);var ho={inView:{Feature:po},tap:{Feature:oo},focus:{Feature:to},hover:{Feature:eo}};function mo(e,t){if(!Array.isArray(t))return!1;var n=t.length;if(n!==e.length)return!1;for(var r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function vo(e,t,n){var r=e.getProps();return mr(r,t,void 0!==n?n:r.custom,e)}var go=function(e){return 1e3*e},yo=function(e){return e/1e3},bo={type:"spring",stiffness:500,damping:25,restSpeed:10},xo={type:"keyframes",duration:.8},wo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ko=function(e,t){var n=t.keyframes;return n.length>2?xo:hn.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===n[1]?2*Math.sqrt(550):30,restSpeed:10}:bo:wo},So=["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"];function _o(e){e.when,e.delay,e.delayChildren,e.staggerChildren,e.staggerDirection,e.repeat,e.repeatType,e.repeatDelay,e.from,e.elapsed;var t=Jn(e,So);return!!Object.keys(t).length}function Eo(e,t){return e[t]||e.default||e}var Co,Po=!1,Ao=function(e){return null!==e};function To(e,t,n){var r=t.repeat,o=t.repeatType,i=void 0===o?"loop":o,a=e.filter(Ao),s=r&&"loop"!==i&&r%2===1?0:a.length-1;return s&&void 0!==n?n:a[s]}function jo(){Co=void 0}var Ro={now:function(){return void 0===Co&&Ro.set(Rr.isProcessing||Mt?Rr.timestamp:performance.now()),Co},set:function(e){Co=e,queueMicrotask(jo)}};function Oo(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Br(e)););return e}function Fo(){return Fo="undefined"!==typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=Oo(e,t);if(r){var o=Object.getOwnPropertyDescriptor(r,t);return o.get?o.get.call(arguments.length<3?e:n):o.value}},Fo.apply(this,arguments)}var Mo=function(e){return/^0(?:(?![\t-\r \.\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])+$/.test(e)};var Do=Pr,Lo=Pr;var Bo=function(e){return/^\x2D?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)$/.test(e)},Io=/^var\(\x2D\x2D(?:([\x2D0-9A-Z_a-z]+)|([\x2D0-9A-Z_a-z]+), ?([ #%\(\),-\.0-9A-Za-z]+))\)/;function Vo(e){var t=Io.exec(e);if(!t)return[,];var n=(0,P.Z)(t,4),r=n[1],o=n[2],i=n[3];return["--".concat(null!==r&&void 0!==r?r:o),i]}function No(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;Lo(n<=4,'Max CSS variable fallback depth detected in property "'.concat(e,'". This may indicate a circular fallback dependency.'));var r=Vo(e),o=(0,P.Z)(r,2),i=o[0],a=o[1];if(i){var s=window.getComputedStyle(t).getPropertyValue(i);if(s){var l=s.trim();return Bo(l)?parseFloat(l):l}return zn(a)?No(a,t,n+1):a}}var zo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Uo=function(e){return e===bn||e===jn},Go=function(e,t){return parseFloat(e.split(", ")[t])},Wo=function(e,t){return function(n,r){var o=r.transform;if("none"===o||!o)return 0;var i=o.match(/^matrix3d\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)\)$/);if(i)return Go(i[1],t);var a=o.match(/^matrix\(((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])+)\)$/);return a?Go(a[1],e):0}},Zo=new Set(["x","y","z"]),Ho=pn.filter((function(e){return!Zo.has(e)}));var $o={width:function(e,t){var n=e.x,r=t.paddingLeft,o=void 0===r?"0":r,i=t.paddingRight,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},height:function(e,t){var n=e.y,r=t.paddingTop,o=void 0===r?"0":r,i=t.paddingBottom,a=void 0===i?"0":i;return n.max-n.min-parseFloat(o)-parseFloat(a)},top:function(e,t){var n=t.top;return parseFloat(n)},left:function(e,t){var n=t.left;return parseFloat(n)},bottom:function(e,t){var n=e.y,r=t.top;return parseFloat(r)+(n.max-n.min)},right:function(e,t){var n=e.x,r=t.left;return parseFloat(r)+(n.max-n.min)},x:Wo(4,13),y:Wo(5,14)};$o.translateX=$o.x,$o.translateY=$o.y;var Ko=function(e){return function(t){return t.test(e)}},Xo=[bn,jn,Tn,An,On,Rn,{test:function(e){return"auto"===e},parse:function(e){return e}}],Yo=function(e){return Xo.find(Ko(e))},qo=new Set,Qo=!1,Jo=!1;function ei(){if(Jo){var e=Array.from(qo).filter((function(e){return e.needsMeasurement})),t=new Set(e.map((function(e){return e.element}))),n=new Map;t.forEach((function(e){var t=function(e){var t=[];return Ho.forEach((function(n){var r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((function(e){return e.measureInitialState()})),t.forEach((function(e){e.render();var t=n.get(e);t&&t.forEach((function(t){var n,r=(0,P.Z)(t,2),o=r[0],i=r[1];null===(n=e.getValue(o))||void 0===n||n.set(i)}))})),e.forEach((function(e){return e.measureEndState()})),e.forEach((function(e){void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Jo=!1,Qo=!1,qo.forEach((function(e){return e.complete()})),qo.clear()}function ti(){qo.forEach((function(e){e.readKeyframes(),e.needsMeasurement&&(Jo=!0)}))}var ni=function(){function e(t,n,r,o,i){var a=arguments.length>5&&void 0!==arguments[5]&&arguments[5];(0,Z.Z)(this,e),this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=(0,pt.Z)(t),this.onComplete=n,this.name=r,this.motionValue=o,this.element=i,this.isAsync=a}return(0,H.Z)(e,[{key:"scheduleResolve",value:function(){this.isScheduled=!0,this.isAsync?(qo.add(this),Qo||(Qo=!0,Tr.read(ti),Tr.resolveKeyframes(ei))):(this.readKeyframes(),this.complete())}},{key:"readKeyframes",value:function(){for(var e=this.unresolvedKeyframes,t=this.name,n=this.element,r=this.motionValue,o=0;o<e.length;o++)if(null===e[o])if(0===o){var i=null===r||void 0===r?void 0:r.get(),a=e[e.length-1];if(void 0!==i)e[0]=i;else if(n&&t){var s=n.readValue(t,a);void 0!==s&&null!==s&&(e[0]=s)}void 0===e[0]&&(e[0]=a),r&&void 0===i&&r.set(e[0])}else e[o]=e[o-1]}},{key:"setFinalKeyframe",value:function(){}},{key:"measureInitialState",value:function(){}},{key:"renderEndStyles",value:function(){}},{key:"measureEndState",value:function(){}},{key:"complete",value:function(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),qo.delete(this)}},{key:"cancel",value:function(){this.isComplete||(this.isScheduled=!1,qo.delete(this))}},{key:"resume",value:function(){this.isComplete||this.scheduleResolve()}}]),e}(),ri=n(9472),oi=function(e,t){return function(n){return Boolean(Cn(n)&&En.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t))}},ii=function(e,t,n){return function(r){var o;if(!Cn(r))return r;var i=r.match(Sn),a=(0,P.Z)(i,4),s=a[0],l=a[1],u=a[2],c=a[3];return o={},(0,pe.Z)(o,e,parseFloat(s)),(0,pe.Z)(o,t,parseFloat(l)),(0,pe.Z)(o,n,parseFloat(u)),(0,pe.Z)(o,"alpha",void 0!==c?parseFloat(c):1),o}},ai=be(be({},bn),{},{transform:function(e){return Math.round(function(e){return yn(0,255,e)}(e))}}),si={test:oi("rgb","red"),parse:ii("red","green","blue"),transform:function(e){var t=e.red,n=e.green,r=e.blue,o=e.alpha,i=void 0===o?1:o;return"rgba("+ai.transform(t)+", "+ai.transform(n)+", "+ai.transform(r)+", "+kn(xn.transform(i))+")"}};var li={test:oi("#"),parse:function(e){var t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}},transform:si.transform},ui={test:oi("hsl","hue"),parse:ii("hue","saturation","lightness"),transform:function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha,i=void 0===o?1:o;return"hsla("+Math.round(t)+", "+Tn.transform(kn(n))+", "+Tn.transform(kn(r))+", "+kn(xn.transform(i))+")"}},ci={test:function(e){return si.test(e)||li.test(e)||ui.test(e)},parse:function(e){return si.test(e)?si.parse(e):ui.test(e)?ui.parse(e):li.parse(e)},transform:function(e){return Cn(e)?e:e.hasOwnProperty("red")?si.transform(e):ui.transform(e)}};var di="number",fi="color",pi=/var[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\([\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\x2D\x2D(?:[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*|[\x2D0-9A-Z_a-z\u017F\u212A]+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*,(?:[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:(?![\t-\r \(\)\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF])[\s\S])|[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*\((?:(?:(?![\(\)])[\s\S])|\((?:(?![\(\)])[\s\S])*\))*\))+[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)\)|#[0-9a-f]{3,8}|(?:rgb|h[s\u017F]l)a?\((?:\x2D?[\.0-9]+%?[\t-\r ,\xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]+){2}\x2D?[\.0-9]+%?[\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*(?:[,\/][\t-\r \xA0\u1680\u2000-\u200A\u2028\u2029\u202F\u205F\u3000\uFEFF]*)?(?:\b[0-9]+(?:\.[0-9]+)?|\.[0-9]+)?%?\)|\x2D?(?:[0-9]+(?:\.[0-9]+)?|\.[0-9]+)/gi;function hi(e){var t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[],i=0,a=t.replace(pi,(function(e){return ci.test(e)?(r.color.push(i),o.push(fi),n.push(ci.parse(e))):e.startsWith("var(")?(r.var.push(i),o.push("var"),n.push(e)):(r.number.push(i),o.push(di),n.push(parseFloat(e))),++i,"${}"})).split("${}");return{values:n,split:a,indexes:r,types:o}}function mi(e){return hi(e).values}function vi(e){var t=hi(e),n=t.split,r=t.types,o=n.length;return function(e){for(var t="",i=0;i<o;i++)if(t+=n[i],void 0!==e[i]){var a=r[i];t+=a===di?kn(e[i]):a===fi?ci.transform(e[i]):e[i]}return t}}var gi=function(e){return"number"===typeof e?0:e};var yi={test:function(e){var t,n;return isNaN(e)&&Cn(e)&&((null===(t=e.match(Sn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(_n))||void 0===n?void 0:n.length)||0)>0},parse:mi,createTransformer:vi,getAnimatableNone:function(e){var t=mi(e);return vi(e)(t.map(gi))}},bi=new Set(["brightness","contrast","saturate","opacity"]);function xi(e){var t=e.slice(0,-1).split("("),n=(0,P.Z)(t,2),r=n[0],o=n[1];if("drop-shadow"===r)return e;var i=o.match(Sn)||[],a=(0,P.Z)(i,1)[0];if(!a)return e;var s=o.replace(a,""),l=bi.has(r)?1:0;return a!==o&&(l*=100),r+"("+l+s+")"}var wi=/\b([\x2Da-z]*)\((?:[\0-\t\x0B\f\x0E-\u2027\u202A-\uD7FF\uE000-\uFFFF]|[\uD800-\uDBFF][\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])*?\)/g,ki=be(be({},yi),{},{getAnimatableNone:function(e){var t=e.match(wi);return t?t.map(xi).join(" "):e}}),Si=be(be({},Dn),{},{color:ci,backgroundColor:ci,outlineColor:ci,fill:ci,stroke:ci,borderColor:ci,borderTopColor:ci,borderRightColor:ci,borderBottomColor:ci,borderLeftColor:ci,filter:ki,WebkitFilter:ki}),_i=function(e){return Si[e]};function Ei(e,t){var n=_i(e);return n!==ki&&(n=yi),n.getAnimatableNone?n.getAnimatableNone(t):void 0}var Ci=new Set(["auto","none","0"]);var Pi=function(e){Lr(n,e);var t=Nr(n);function n(e,r,o,i){return(0,Z.Z)(this,n),t.call(this,e,r,o,i,null===i||void 0===i?void 0:i.owner,!0)}return(0,H.Z)(n,[{key:"readKeyframes",value:function(){var e=this.unresolvedKeyframes,t=this.element,r=this.name;if(t.current){Fo(Br(n.prototype),"readKeyframes",this).call(this);for(var o=0;o<e.length;o++){var i=e[o];if("string"===typeof i&&(i=i.trim(),zn(i))){var a=No(i,t.current);void 0!==a&&(e[o]=a),o===e.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),zo.has(r)&&2===e.length){var s=(0,P.Z)(e,2),l=s[0],u=s[1],c=Yo(l),d=Yo(u);if(c!==d)if(Uo(c)&&Uo(d))for(o=0;o<e.length;o++){var f=e[o];"string"===typeof f&&(e[o]=parseFloat(f))}else this.needsMeasurement=!0}}}},{key:"resolveNoneKeyframes",value:function(){for(var e,t=this.unresolvedKeyframes,n=this.name,r=[],o=0;o<t.length;o++)("number"===typeof(e=t[o])?0===e:null===e||"none"===e||"0"===e||Mo(e))&&r.push(o);r.length&&function(e,t,n){for(var r=0,o=void 0;r<e.length&&!o;){var i=e[r];"string"===typeof i&&!Ci.has(i)&&hi(i).values.length&&(o=e[r]),r++}if(o&&n){var a,s=(0,ri.Z)(t);try{for(s.s();!(a=s.n()).done;)e[a.value]=Ei(n,o)}catch(l){s.e(l)}finally{s.f()}}}(t,r,n)}},{key:"measureInitialState",value:function(){var e=this.element,t=this.unresolvedKeyframes,n=this.name;if(e.current){"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$o[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;var r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}}},{key:"measureEndState",value:function(){var e,t=this.element,n=this.name,r=this.unresolvedKeyframes;if(t.current){var o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);var i=r.length-1,a=r[i];r[i]=$o[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==a&&void 0===this.finalKeyframe&&(this.finalKeyframe=a),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((function(e){var n=(0,P.Z)(e,2),r=n[0],o=n[1];t.getValue(r).set(o)})),this.resolveNoneKeyframes()}}}]),n}(ni);function Ai(e){var t;return function(){return void 0===t&&(t=e()),t}}var Ti=function(e,t){return"zIndex"!==t&&(!("number"!==typeof e&&!Array.isArray(e))||!("string"!==typeof e||!yi.test(e)&&"0"!==e||e.startsWith("url(")))};var ji=["autoplay","delay","type","repeat","repeatDelay","repeatType"],Ri=function(){function e(t){var n=t.autoplay,r=void 0===n||n,o=t.delay,i=void 0===o?0:o,a=t.type,s=void 0===a?"keyframes":a,l=t.repeat,u=void 0===l?0:l,c=t.repeatDelay,d=void 0===c?0:c,f=t.repeatType,p=void 0===f?"loop":f,h=Jn(t,ji);(0,Z.Z)(this,e),this.isStopped=!1,this.hasAttemptedResolve=!1,this.options=be({autoplay:r,delay:i,type:s,repeat:u,repeatDelay:d,repeatType:p},h),this.updateFinishedPromise()}return(0,H.Z)(e,[{key:"resolved",get:function(){return this._resolved||this.hasAttemptedResolve||(ti(),ei()),this._resolved}},{key:"onKeyframesResolved",value:function(e,t){this.hasAttemptedResolve=!0;var n=this.options,r=n.name,o=n.type,i=n.velocity,a=n.delay,s=n.onComplete,l=n.onUpdate;if(!n.isGenerator&&!function(e,t,n,r){var o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;var i=e[e.length-1],a=Ti(o,t),s=Ti(i,t);return Do(a===s,"You are trying to animate ".concat(t,' from "').concat(o,'" to "').concat(i,'". ').concat(o," is not an animatable value - to enable this animation set ").concat(o," to a value animatable to ").concat(i," via the `style` property.")),!(!a||!s)&&(function(e){var t=e[0];if(1===e.length)return!0;for(var n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||"spring"===n&&r)}(e,r,o,i)){if(Po||!a)return null===l||void 0===l||l(To(e,this.options,t)),null===s||void 0===s||s(),void this.resolveFinishedPromise();this.options.duration=0}var u=this.initPlayback(e,t);!1!==u&&(this._resolved=be({keyframes:e,finalKeyframe:t},u),this.onPostResolved())}},{key:"onPostResolved",value:function(){}},{key:"then",value:function(e,t){return this.currentFinishedPromise.then(e,t)}},{key:"updateFinishedPromise",value:function(){var e=this;this.currentFinishedPromise=new Promise((function(t){e.resolveFinishedPromise=t}))}}]),e}();function Oi(e,t){return t?e*(1e3/t):0}function Fi(e,t,n){var r=Math.max(t-5,0);return Oi(n-e(r),t-r)}var Mi=.001;function Di(e){var t,n,r=e.duration,o=void 0===r?800:r,i=e.bounce,a=void 0===i?.25:i,s=e.velocity,l=void 0===s?0:s,u=e.mass,c=void 0===u?1:u;Do(o<=go(10),"Spring duration must be 10 seconds or less");var d=1-a;d=yn(.05,1,d),o=yn(.01,10,yo(o)),d<1?(t=function(e){var t=e*d,n=t*o,r=t-l,i=Li(e,d),a=Math.exp(-n);return Mi-r/i*a},n=function(e){var n=e*d*o,r=n*l+l,i=Math.pow(d,2)*Math.pow(e,2)*o,a=Math.exp(-n),s=Li(Math.pow(e,2),d);return(-t(e)+Mi>0?-1:1)*((r-i)*a)/s}):(t=function(e){return Math.exp(-e*o)*((e-l)*o+1)-.001},n=function(e){return Math.exp(-e*o)*(o*o*(l-e))});var f=function(e,t,n){for(var r=n,o=1;o<12;o++)r-=e(r)/t(r);return r}(t,n,5/o);if(o=go(o),isNaN(f))return{stiffness:100,damping:10,duration:o};var p=Math.pow(f,2)*c;return{stiffness:p,damping:2*d*Math.sqrt(c*p),duration:o}}function Li(e,t){return e*Math.sqrt(1-t*t)}var Bi=["keyframes","restDelta","restSpeed"],Ii=["duration","bounce"],Vi=["stiffness","damping","mass"];function Ni(e,t){return t.some((function(t){return void 0!==e[t]}))}function zi(e){var t,n=e.keyframes,r=e.restDelta,o=e.restSpeed,i=Jn(e,Bi),a=n[0],s=n[n.length-1],l={done:!1,value:a},u=function(e){var t=be({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},e);if(!Ni(e,Vi)&&Ni(e,Ii)){var n=Di(e);(t=be(be(be({},t),n),{},{mass:1})).isResolvedFromDuration=!0}return t}(be(be({},i),{},{velocity:-yo(i.velocity||0)})),c=u.stiffness,d=u.damping,f=u.mass,p=u.duration,h=u.velocity,m=u.isResolvedFromDuration,v=h||0,g=d/(2*Math.sqrt(c*f)),y=s-a,b=yo(Math.sqrt(c/f)),x=Math.abs(y)<5;if(o||(o=x?.01:2),r||(r=x?.005:.5),g<1){var w=Li(b,g);t=function(e){var t=Math.exp(-g*b*e);return s-t*((v+g*b*y)/w*Math.sin(w*e)+y*Math.cos(w*e))}}else if(1===g)t=function(e){return s-Math.exp(-b*e)*(y+(v+b*y)*e)};else{var k=b*Math.sqrt(g*g-1);t=function(e){var t=Math.exp(-g*b*e),n=Math.min(k*e,300);return s-t*((v+g*b*y)*Math.sinh(n)+k*y*Math.cosh(n))/k}}return{calculatedDuration:m&&p||null,next:function(e){var n=t(e);if(m)l.done=e>=p;else{var i=0;g<1&&(i=0===e?go(v):Fi(t,e,n));var a=Math.abs(i)<=o,u=Math.abs(s-n)<=r;l.done=a&&u}return l.value=l.done?s:n,l}}}function Ui(e){var t=e.keyframes,n=e.velocity,r=void 0===n?0:n,o=e.power,i=void 0===o?.8:o,a=e.timeConstant,s=void 0===a?325:a,l=e.bounceDamping,u=void 0===l?10:l,c=e.bounceStiffness,d=void 0===c?500:c,f=e.modifyTarget,p=e.min,h=e.max,m=e.restDelta,v=void 0===m?.5:m,g=e.restSpeed,y=t[0],b={done:!1,value:y},x=function(e){return void 0===p?h:void 0===h||Math.abs(p-e)<Math.abs(h-e)?p:h},w=i*r,k=y+w,S=void 0===f?k:f(k);S!==k&&(w=S-y);var _,E,C=function(e){return-w*Math.exp(-e/s)},P=function(e){return S+C(e)},A=function(e){var t=C(e),n=P(e);b.done=Math.abs(t)<=v,b.value=b.done?S:n},T=function(e){var t;(t=b.value,void 0!==p&&t<p||void 0!==h&&t>h)&&(_=e,E=zi({keyframes:[b.value,x(b.value)],velocity:Fi(P,e,b.value),damping:u,stiffness:d,restDelta:v,restSpeed:g}))};return T(0),{calculatedDuration:null,next:function(e){var t=!1;return E||void 0!==_||(t=!0,A(e),T(e)),void 0!==_&&e>=_?E.next(e-_):(!t&&A(e),b)}}}var Gi=function(e,t,n){return(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e};function Wi(e,t,n,r){if(e===t&&n===r)return Pr;var o=function(t){return function(e,t,n,r,o){var i,a,s=0;do{(i=Gi(a=t+(n-t)/2,r,o)-e)>0?n=a:t=a}while(Math.abs(i)>1e-7&&++s<12);return a}(t,0,1,e,n)};return function(e){return 0===e||1===e?e:Gi(o(e),t,r)}}var Zi=Wi(.42,0,1,1),Hi=Wi(0,0,.58,1),$i=Wi(.42,0,.58,1),Ki=function(e){return function(t){return t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2}},Xi=function(e){return function(t){return 1-e(1-t)}},Yi=function(e){return 1-Math.sin(Math.acos(e))},qi=Xi(Yi),Qi=Ki(Yi),Ji=Wi(.33,1.53,.69,.99),ea=Xi(Ji),ta=Ki(ea),na={linear:Pr,easeIn:Zi,easeInOut:$i,easeOut:Hi,circIn:Yi,circInOut:Qi,circOut:qi,backIn:ea,backInOut:ta,backOut:Ji,anticipate:function(e){return(e*=2)<1?.5*ea(e):.5*(2-Math.pow(2,-10*(e-1)))}},ra=function(e){if(Array.isArray(e)){Lo(4===e.length,"Cubic bezier arrays must contain four numerical values.");var t=(0,P.Z)(e,4);return Wi(t[0],t[1],t[2],t[3])}return"string"===typeof e?(Lo(void 0!==na[e],"Invalid easing type '".concat(e,"'")),na[e]):e},oa=function(e,t,n){var r=t-e;return 0===r?1:(n-e)/r},ia=function(e,t,n){return e+(t-e)*n};function aa(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sa(e,t){return function(n){return n>0?t:e}}var la=function(e,t,n){var r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},ua=[li,si,ui];function ca(e){var t,n=(t=e,ua.find((function(e){return e.test(t)})));if(Do(Boolean(n),"'".concat(e,"' is not an animatable color. Use the equivalent color code instead.")),!Boolean(n))return!1;var r=n.parse(e);return n===ui&&(r=function(e){var t=e.hue,n=e.saturation,r=e.lightness,o=e.alpha;t/=360,r/=100;var i=0,a=0,s=0;if(n/=100){var l=r<.5?r*(1+n):r+n-r*n,u=2*r-l;i=aa(u,l,t+1/3),a=aa(u,l,t),s=aa(u,l,t-1/3)}else i=a=s=r;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*s),alpha:o}}(r)),r}var da=function(e,t){var n=ca(e),r=ca(t);if(!n||!r)return sa(e,t);var o=be({},n);return function(e){return o.red=la(n.red,r.red,e),o.green=la(n.green,r.green,e),o.blue=la(n.blue,r.blue,e),o.alpha=ia(n.alpha,r.alpha,e),si.transform(o)}},fa=new Set(["none","hidden"]);function pa(e,t){return function(n){return ia(e,t,n)}}function ha(e){return"number"===typeof e?pa:"string"===typeof e?zn(e)?sa:ci.test(e)?da:ga:Array.isArray(e)?ma:"object"===typeof e?ci.test(e)?da:va:sa}function ma(e,t){var n=(0,pt.Z)(e),r=n.length,o=e.map((function(e,n){return ha(e)(e,t[n])}));return function(e){for(var t=0;t<r;t++)n[t]=o[t](e);return n}}function va(e,t){var n=be(be({},e),t),r={};for(var o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=ha(e[o])(e[o],t[o]));return function(e){for(var t in r)n[t]=r[t](e);return n}}var ga=function(e,t){var n=yi.createTransformer(t),r=hi(e),o=hi(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?fa.has(e)&&!o.values.length||fa.has(t)&&!r.values.length?function(e,t){return fa.has(e)?function(n){return n<=0?e:t}:function(n){return n>=1?t:e}}(e,t):Hr(ma(function(e,t){for(var n,r=[],o={color:0,var:0,number:0},i=0;i<t.values.length;i++){var a=t.types[i],s=e.indexes[a][o[a]],l=null!==(n=e.values[s])&&void 0!==n?n:0;r[i]=l,o[a]++}return r}(r,o),o.values),n):(Do(!0,"Complex values '".concat(e,"' and '").concat(t,"' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.")),sa(e,t))};function ya(e,t,n){return"number"===typeof e&&"number"===typeof t&&"number"===typeof n?ia(e,t,n):ha(e)(e,t)}function ba(e,t,n){for(var r=[],o=n||ya,i=e.length-1,a=0;a<i;a++){var s=o(e[a],e[a+1]);if(t){var l=Array.isArray(t)?t[a]||Pr:t;s=Hr(l,s)}r.push(s)}return r}function xa(e){var t=[0];return function(e,t){for(var n=e[e.length-1],r=1;r<=t;r++){var o=oa(0,t,r);e.push(ia(n,1,o))}}(t,e.length-1),t}function wa(e){var t,n,r=e.duration,o=void 0===r?300:r,i=e.keyframes,a=e.times,s=e.ease,l=void 0===s?"easeInOut":s,u=function(e){return Array.isArray(e)&&"number"!==typeof e[0]}(l)?l.map(ra):ra(l),c={done:!1,value:i[0]},d=function(e,t){return e.map((function(e){return e*t}))}(a&&a.length===i.length?a:xa(i),o),f=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.clamp,o=void 0===r||r,i=n.ease,a=n.mixer,s=e.length;if(Lo(s===t.length,"Both input and output ranges must be the same length"),1===s)return function(){return t[0]};if(2===s&&e[0]===e[1])return function(){return t[1]};e[0]>e[s-1]&&(e=(0,pt.Z)(e).reverse(),t=(0,pt.Z)(t).reverse());var l=ba(t,i,a),u=l.length,c=function(t){var n=0;if(u>1)for(;n<e.length-2&&!(t<e[n+1]);n++);var r=oa(e[n],e[n+1],t);return l[n](r)};return o?function(t){return c(yn(e[0],e[s-1],t))}:c}(d,i,{ease:Array.isArray(u)?u:(t=i,n=u,t.map((function(){return n||$i})).splice(0,t.length-1))});return{calculatedDuration:o,next:function(e){return c.value=f(e),c.done=e>=o,c}}}var ka=function(e){var t=function(t){var n=t.timestamp;return e(n)};return{start:function(){return Tr.update(t,!0)},stop:function(){return jr(t)},now:function(){return Rr.isProcessing?Rr.timestamp:Ro.now()}}},Sa=["KeyframeResolver"],_a={decay:Ui,inertia:Ui,tween:wa,keyframes:wa,spring:zi},Ea=function(e){return e/100},Ca=function(e){Lr(n,e);var t=Nr(n);function n(e){var r,o=e.KeyframeResolver,i=void 0===o?ni:o,a=Jn(e,Sa);(0,Z.Z)(this,n),(r=t.call(this,a)).holdTime=null,r.startTime=null,r.cancelTime=null,r.currentTime=0,r.playbackSpeed=1,r.pendingPlayState="running",r.state="idle",r.stop=function(){if(r.resolver.cancel(),r.isStopped=!0,"idle"!==r.state){r.teardown();var e=r.options.onStop;e&&e()}};var s=r.options,l=s.name,u=s.motionValue,c=s.keyframes,d=function(e,t){return r.onKeyframesResolved(e,t)};return l&&u&&u.owner?r.resolver=u.owner.resolveKeyframes(c,d,l,u):r.resolver=new i(c,d,l,u),r.resolver.scheduleResolve(),r}return(0,H.Z)(n,[{key:"initPlayback",value:function(e){var t,n,r=this.options,o=r.type,i=void 0===o?"keyframes":o,a=r.repeat,s=void 0===a?0:a,l=r.repeatDelay,u=void 0===l?0:l,c=r.repeatType,d=r.velocity,f=void 0===d?0:d,p=_a[i]||wa;p!==wa&&"number"!==typeof e[0]&&(t=Hr(Ea,ya(e[0],e[1])),e=[0,100]);var h=p(be(be({},this.options),{},{keyframes:e}));"mirror"===c&&(n=p(be(be({},this.options),{},{keyframes:(0,pt.Z)(e).reverse(),velocity:-f}))),null===h.calculatedDuration&&(h.calculatedDuration=function(e){for(var t=0,n=e.next(t);!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}(h));var m=h.calculatedDuration,v=m+u;return{generator:h,mirroredGenerator:n,mapPercentToKeyframes:t,calculatedDuration:m,resolvedDuration:v,totalDuration:v*(s+1)-u}}},{key:"onPostResolved",value:function(){var e=this.options.autoplay,t=void 0===e||e;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}},{key:"tick",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.resolved;if(!n){var r=this.options.keyframes;return{done:!0,value:r[r.length-1]}}var o=n.finalKeyframe,i=n.generator,a=n.mirroredGenerator,s=n.mapPercentToKeyframes,l=n.keyframes,u=n.calculatedDuration,c=n.totalDuration,d=n.resolvedDuration;if(null===this.startTime)return i.next(0);var f=this.options,p=f.delay,h=f.repeat,m=f.repeatType,v=f.repeatDelay,g=f.onUpdate;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;var y=this.currentTime-p*(this.speed>=0?1:-1),b=this.speed>=0?y<0:y>c;this.currentTime=Math.max(y,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);var x=this.currentTime,w=i;if(h){var k=Math.min(this.currentTime,c)/d,S=Math.floor(k),_=k%1;!_&&k>=1&&(_=1),1===_&&S--,S=Math.min(S,h+1);var E=Boolean(S%2);E&&("reverse"===m?(_=1-_,v&&(_-=v/d)):"mirror"===m&&(w=a)),x=yn(0,1,_)*d}var C=b?{done:!1,value:l[0]}:w.next(x);s&&(C.value=s(C.value));var P=C.done;b||null===u||(P=this.speed>=0?this.currentTime>=c:this.currentTime<=0);var A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return A&&void 0!==o&&(C.value=To(l,this.options,o)),g&&g(C.value),A&&this.finish(),C}},{key:"duration",get:function(){var e=this.resolved;return e?yo(e.calculatedDuration):0}},{key:"time",get:function(){return yo(this.currentTime)},set:function(e){e=go(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}},{key:"speed",get:function(){return this.playbackSpeed},set:function(e){var t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=yo(this.currentTime))}},{key:"play",value:function(){var e=this;if(this.resolver.isScheduled||this.resolver.resume(),this._resolved){if(!this.isStopped){var t=this.options,n=t.driver,r=void 0===n?ka:n,o=t.onPlay;this.driver||(this.driver=r((function(t){return e.tick(t)}))),o&&o();var i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime&&"finished"!==this.state||(this.startTime=i),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}}else this.pendingPlayState="running"}},{key:"pause",value:function(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}},{key:"complete",value:function(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}},{key:"finish",value:function(){this.teardown(),this.state="finished";var e=this.options.onComplete;e&&e()}},{key:"cancel",value:function(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}},{key:"teardown",value:function(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}},{key:"stopDriver",value:function(){this.driver&&(this.driver.stop(),this.driver=void 0)}},{key:"sample",value:function(e){return this.startTime=0,this.tick(e,!0)}}]),n}(Ri);var Pa=function(e){return Array.isArray(e)&&"number"===typeof e[0]};function Aa(e){return Boolean(!e||"string"===typeof e&&e in ja||Pa(e)||Array.isArray(e)&&e.every(Aa))}var Ta=function(e){var t=(0,P.Z)(e,4),n=t[0],r=t[1],o=t[2],i=t[3];return"cubic-bezier(".concat(n,", ").concat(r,", ").concat(o,", ").concat(i,")")},ja={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ta([0,.65,.55,1]),circOut:Ta([.55,0,1,.45]),backIn:Ta([.31,.01,.66,-.59]),backOut:Ta([.33,1.53,.69,.99])};function Ra(e){return Oa(e)||ja.easeOut}function Oa(e){return e?Pa(e)?Ta(e):Array.isArray(e)?e.map(Ra):ja[e]:void 0}var Fa=["onComplete","onUpdate","motionValue"],Ma=["motionValue","onUpdate","onComplete"],Da=Ai((function(){return Object.hasOwnProperty.call(Element.prototype,"animate")}));var La=function(e){Lr(n,e);var t=Nr(n);function n(e){var r;(0,Z.Z)(this,n);var o=(r=t.call(this,e)).options,i=o.name,a=o.motionValue,s=o.keyframes;return r.resolver=new Pi(s,(function(e,t){return r.onKeyframesResolved(e,t)}),i,a),r.resolver.scheduleResolve(),r}return(0,H.Z)(n,[{key:"initPlayback",value:function(e,t){var n,r=this,o=this.options,i=o.duration,a=void 0===i?300:i,s=o.times,l=o.ease,u=o.type,c=o.motionValue,d=o.name;if(!(null===(n=c.owner)||void 0===n?void 0:n.current))return!1;if(function(e){return"spring"===e.type||!Aa(e.ease)}(this.options)){var f=this.options,p=(f.onComplete,f.onUpdate,f.motionValue,Jn(f,Fa)),h=function(e,t){for(var n=new Ca(be(be({},t),{},{keyframes:e,repeat:0,delay:0,isGenerator:!0})),r={done:!1,value:e[0]},o=[],i=0;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,p);1===(e=h.keyframes).length&&(e[1]=e[0]),a=h.duration,s=h.times,l=h.ease,u="keyframes"}var m=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=r.delay,i=void 0===o?0:o,a=r.duration,s=void 0===a?300:a,l=r.repeat,u=void 0===l?0:l,c=r.repeatType,d=void 0===c?"loop":c,f=r.ease,p=r.times,h=(0,pe.Z)({},t,n);p&&(h.offset=p);var m=Oa(f);return Array.isArray(m)&&(h.easing=m),e.animate(h,{delay:i,duration:s,easing:Array.isArray(m)?"linear":m,fill:"both",iterations:u+1,direction:"reverse"===d?"alternate":"normal"})}(c.owner.current,d,e,be(be({},this.options),{},{duration:a,times:s,ease:l}));return m.startTime=Ro.now(),this.pendingTimeline?(m.timeline=this.pendingTimeline,this.pendingTimeline=void 0):m.onfinish=function(){var n=r.options.onComplete;c.set(To(e,r.options,t)),n&&n(),r.cancel(),r.resolveFinishedPromise()},{animation:m,duration:a,times:s,type:u,ease:l,keyframes:e}}},{key:"duration",get:function(){var e=this.resolved;if(!e)return 0;var t=e.duration;return yo(t)}},{key:"time",get:function(){var e=this.resolved;if(!e)return 0;var t=e.animation;return yo(t.currentTime||0)},set:function(e){var t=this.resolved;t&&(t.animation.currentTime=go(e))}},{key:"speed",get:function(){var e=this.resolved;return e?e.animation.playbackRate:1},set:function(e){var t=this.resolved;t&&(t.animation.playbackRate=e)}},{key:"state",get:function(){var e=this.resolved;return e?e.animation.playState:"idle"}},{key:"attachTimeline",value:function(e){if(this._resolved){var t=this.resolved;if(!t)return Pr;var n=t.animation;n.timeline=e,n.onfinish=null}else this.pendingTimeline=e;return Pr}},{key:"play",value:function(){if(!this.isStopped){var e=this.resolved;if(e){var t=e.animation;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}}}},{key:"pause",value:function(){var e=this.resolved;e&&e.animation.pause()}},{key:"stop",value:function(){if(this.resolver.cancel(),this.isStopped=!0,"idle"!==this.state){this.resolveFinishedPromise(),this.updateFinishedPromise();var e=this.resolved;if(e){var t=e.animation,n=e.keyframes,r=e.duration,o=e.type,i=e.ease,a=e.times;if("idle"!==t.playState&&"finished"!==t.playState){if(this.time){var s=this.options,l=s.motionValue,u=(s.onUpdate,s.onComplete,Jn(s,Ma)),c=new Ca(be(be({},u),{},{keyframes:n,duration:r,type:o,ease:i,times:a,isGenerator:!0})),d=go(this.time);l.setWithVelocity(c.sample(d-10).value,c.sample(d).value,10)}var f=this.options.onStop;f&&f(),this.cancel()}}}}},{key:"complete",value:function(){var e=this.resolved;e&&e.animation.finish()}},{key:"cancel",value:function(){var e=this.resolved;e&&e.animation.cancel()}}],[{key:"supports",value:function(e){var t=e.motionValue,n=e.name,r=e.repeatDelay,o=e.repeatType,i=e.damping,a=e.type;return Da()&&n&&yr.has(n)&&t&&t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate&&!r&&"mirror"!==o&&0!==i&&"inertia"!==a}}]),n}(Ri);var Ba=Ai((function(){return void 0!==window.ScrollTimeline})),Ia=function(){function e(t){var n=this;(0,Z.Z)(this,e),this.stop=function(){return n.runAll("stop")},this.animations=t.filter(Boolean)}return(0,H.Z)(e,[{key:"then",value:function(e,t){return Promise.all(this.animations).then(e).catch(t)}},{key:"getAll",value:function(e){return this.animations[0][e]}},{key:"setAll",value:function(e,t){for(var n=0;n<this.animations.length;n++)this.animations[n][e]=t}},{key:"attachTimeline",value:function(e){var t=this,n=this.animations.map((function(t){if(!Ba()||!t.attachTimeline)return t.pause(),function(e,t){var n,r=function(){var r=t.currentTime,o=(null===r?0:r.value)/100;n!==o&&e(o),n=o};return Tr.update(r,!0),function(){return jr(r)}}((function(e){t.time=t.duration*e}),e);t.attachTimeline(e)}));return function(){n.forEach((function(e,n){e&&e(),t.animations[n].stop()}))}}},{key:"time",get:function(){return this.getAll("time")},set:function(e){this.setAll("time",e)}},{key:"speed",get:function(){return this.getAll("speed")},set:function(e){this.setAll("speed",e)}},{key:"duration",get:function(){for(var e=0,t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}},{key:"runAll",value:function(e){this.animations.forEach((function(t){return t[e]()}))}},{key:"play",value:function(){this.runAll("play")}},{key:"pause",value:function(){this.runAll("pause")}},{key:"cancel",value:function(){this.runAll("cancel")}},{key:"complete",value:function(){this.runAll("complete")}}]),e}(),Va=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;return function(s){var l=Eo(r,e)||{},u=l.delay||r.delay||0,c=r.elapsed,d=void 0===c?0:c;d-=go(u);var f=be(be({keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity()},l),{},{delay:-d,onUpdate:function(e){t.set(e),l.onUpdate&&l.onUpdate(e)},onComplete:function(){s(),l.onComplete&&l.onComplete(),a&&a()},onStop:a,name:e,motionValue:t,element:i?void 0:o});_o(l)||(f=be(be({},f),ko(e,f))),f.duration&&(f.duration=go(f.duration)),f.repeatDelay&&(f.repeatDelay=go(f.repeatDelay)),void 0!==f.from&&(f.keyframes[0]=f.from);var p=!1;if((!1===f.type||0===f.duration&&!f.repeatDelay)&&(f.duration=0,0===f.delay&&(p=!0)),(Po||Ft)&&(p=!0,f.duration=0,f.delay=0),p&&!i&&void 0!==t.get()){var h=To(f.keyframes,l);if(void 0!==h)return Tr.update((function(){f.onUpdate(h),f.onComplete()})),new Ia([])}return!i&&La.supports(f)?new La(f):new Ca(f)}},Na=function(){function e(){(0,Z.Z)(this,e),this.subscriptions=[]}return(0,H.Z)(e,[{key:"add",value:function(e){var t=this;return xr(this.subscriptions,e),function(){return wr(t.subscriptions,e)}}},{key:"notify",value:function(e,t,n){var r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(var o=0;o<r;o++){var i=this.subscriptions[o];i&&i(e,t,n)}}},{key:"getSize",value:function(){return this.subscriptions.length}},{key:"clear",value:function(){this.subscriptions.length=0}}]),e}(),za={current:void 0},Ua=function(){function e(t){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Z.Z)(this,e),this.version="11.3.24",this.canTrackVelocity=null,this.events={},this.updateAndNotify=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=Ro.now();n.updatedAt!==r&&n.setPrevFrameValue(),n.prev=n.current,n.setCurrent(e),n.current!==n.prev&&n.events.change&&n.events.change.notify(n.current),t&&n.events.renderRequest&&n.events.renderRequest.notify(n.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}return(0,H.Z)(e,[{key:"setCurrent",value:function(e){var t;this.current=e,this.updatedAt=Ro.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}},{key:"setPrevFrameValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.current;this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}},{key:"onChange",value:function(e){return this.on("change",e)}},{key:"on",value:function(e,t){var n=this;this.events[e]||(this.events[e]=new Na);var r=this.events[e].add(t);return"change"===e?function(){r(),Tr.read((function(){n.events.change.getSize()||n.stop()}))}:r}},{key:"clearListeners",value:function(){for(var e in this.events)this.events[e].clear()}},{key:"attach",value:function(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}},{key:"set",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}},{key:"setWithVelocity",value:function(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}},{key:"jump",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}},{key:"get",value:function(){return za.current&&za.current.push(this),this.current}},{key:"getPrevious",value:function(){return this.prev}},{key:"getVelocity",value:function(){var e=Ro.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;var t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Oi(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}},{key:"start",value:function(e){var t=this;return this.stop(),new Promise((function(n){t.hasAnimated=!0,t.animation=e(n),t.events.animationStart&&t.events.animationStart.notify()})).then((function(){t.events.animationComplete&&t.events.animationComplete.notify(),t.clearAnimation()}))}},{key:"stop",value:function(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}},{key:"isAnimating",value:function(){return!!this.animation}},{key:"clearAnimation",value:function(){delete this.animation}},{key:"destroy",value:function(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}]),e}();function Ga(e,t){return new Ua(e,t)}var Wa=["transitionEnd","transition"];function Za(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ga(n))}function Ha(e,t){var n,r=vo(e,t)||{},o=r.transitionEnd,i=void 0===o?{}:o,a=(r.transition,Jn(r,Wa));for(var s in a=be(be({},a),i)){Za(e,s,(n=a[s],vr(n)?n[n.length-1]||0:n))}}function $a(e){return e.getProps()[Ot]}var Ka=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).output=[],e.counts=new Map,e}return(0,H.Z)(n,[{key:"add",value:function(e){var t=this,n=br(e);if(n){var r=this.counts.get(n)||0;this.counts.set(n,r+1),0===r&&(this.output.push(n),this.update());var o=!1;return function(){if(!o){o=!0;var e=t.counts.get(n)-1;t.counts.set(n,e),0===e&&(wr(t.output,n),t.update())}}}}},{key:"update",value:function(){this.set(this.output.length?this.output.join(", "):"auto")}}]),n}(Ua);function Xa(e,t){var n;if(e.applyWillChange){var r,o=e.getValue("willChange");return o||(null===(n=e.props.style)||void 0===n?void 0:n.willChange)||(o=new Ka("auto"),e.addValue("willChange",o)),r=o,Boolean(vn(r)&&r.add)?o.add(t):void 0}}var Ya=["transition","transitionEnd"];function qa(e,t){var n=e.protectedKeys,r=e.needsAnimating,o=n.hasOwnProperty(t)&&!0!==r[t];return r[t]=!1,o}function Qa(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=r.delay,i=void 0===o?0:o,a=r.transitionOverride,s=r.type,l=t.transition,u=void 0===l?e.getDefaultTransition():l,c=t.transitionEnd,d=Jn(t,Ya);a&&(u=a);var f=[],p=s&&e.animationState&&e.animationState.getState()[s];for(var h in d){var m=e.getValue(h,null!==(n=e.latestValues[h])&&void 0!==n?n:null),v=d[h];if(!(void 0===v||p&&qa(p,h))){var g=be({delay:i,elapsed:0},Eo(u||{},h)),y=!1;if(window.MotionHandoffAnimation){var b=$a(e);if(b){var x=window.MotionHandoffAnimation(b,h,Tr);null!==x&&(g.elapsed=x,y=!0)}}m.start(Va(h,m,v,e.shouldReduceMotion&&hn.has(h)?{type:!1}:g,e,y,Xa(e,h)));var w=m.animation;w&&f.push(w)}}return c&&Promise.all(f).then((function(){Tr.update((function(){c&&Ha(e,c)}))})),f}function Ja(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=vo(e,t,"exit"===r.type?null===(n=e.presenceContext)||void 0===n?void 0:n.custom:void 0),i=o||{},a=i.transition,s=void 0===a?e.getDefaultTransition()||{}:a;r.transitionOverride&&(s=r.transitionOverride);var l=o?function(){return Promise.all(Qa(e,o,r))}:function(){return Promise.resolve()},u=e.variantChildren&&e.variantChildren.size?function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,o=s,i=o.delayChildren,a=void 0===i?0:i,l=o.staggerChildren,u=o.staggerDirection;return es(e,t,a+n,l,u,r)}:function(){return Promise.resolve()},c=s,d=c.when;if(d){var f="beforeChildren"===d?[l,u]:[u,l],p=(0,P.Z)(f,2),h=p[0],m=p[1];return h().then((function(){return m()}))}return Promise.all([l(),u(r.delay)])}function es(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,i=arguments.length>5?arguments[5]:void 0,a=[],s=(e.variantChildren.size-1)*r,l=1===o?function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e*r}:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return s-e*r};return Array.from(e.variantChildren).sort(ts).forEach((function(e,r){e.notify("AnimationStart",t),a.push(Ja(e,t,be(be({},i),{},{delay:n+l(r)})).then((function(){return e.notify("AnimationComplete",t)})))})),Promise.all(a)}function ts(e,t){return e.sortNodePosition(t)}var ns=["transition","transitionEnd"],rs=(0,pt.Z)(Kt).reverse(),os=Kt.length;function is(e){return function(t){return Promise.all(t.map((function(t){var n=t.animation,r=t.options;return function(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.notify("AnimationStart",t),Array.isArray(t)){var o=t.map((function(t){return Ja(e,t,r)}));n=Promise.all(o)}else if("string"===typeof t)n=Ja(e,t,r);else{var i="function"===typeof t?vo(e,t,r.custom):t;n=Promise.all(Qa(e,i,r))}return n.then((function(){e.notify("AnimationComplete",t)}))}(e,n,r)})))}}function as(e){var t=is(e),n=ls(),r=!0;function o(o){for(var i=e.getProps(),a=e.getVariantContext(!0)||{},s=[],l=new Set,u={},c=1/0,d=function(t){var d=rs[t],f=n[d],p=void 0!==i[d]?i[d]:a[d],h=Ht(p),m=d===o?f.isActive:null;!1===m&&(c=t);var v=p===a[d]&&p!==i[d]&&h;if(v&&r&&e.manuallyAnimateOnMount&&(v=!1),f.protectedKeys=be({},u),!f.isActive&&null===m||!p&&!f.prevProp||$t(p)||"boolean"===typeof p)return"continue";var g=function(e,t){if("string"===typeof t)return t!==e;if(Array.isArray(t))return!mo(t,e);return!1}(f.prevProp,p),y=g||d===o&&f.isActive&&!v&&h||t>c&&h,b=!1,x=Array.isArray(p)?p:[p],w=x.reduce(function(t){return function(n,r){var o,i=vo(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){i.transition;var a=i.transitionEnd,s=Jn(i,ns);n=be(be(be({},n),s),a)}return n}}(d),{});!1===m&&(w={});var k=f.prevResolvedValues,S=void 0===k?{}:k,_=be(be({},S),w),E=function(t){y=!0,l.has(t)&&(b=!0,l.delete(t)),f.needsAnimating[t]=!0;var n=e.getValue(t);n&&(n.liveStyle=!1)};for(var C in _){var P=w[C],A=S[C];if(!u.hasOwnProperty(C)){(vr(P)&&vr(A)?!mo(P,A):P!==A)?void 0!==P&&null!==P?E(C):l.add(C):void 0!==P&&l.has(C)?E(C):f.protectedKeys[C]=!0}}f.prevProp=p,f.prevResolvedValues=w,f.isActive&&(u=be(be({},u),w)),r&&e.blockInitialAnimation&&(y=!1),!y||v&&!b||s.push.apply(s,(0,pt.Z)(x.map((function(e){return{animation:e,options:{type:d}}}))))},f=0;f<os;f++)d(f);if(l.size){var p={};l.forEach((function(t){var n=e.getBaseTarget(t),r=e.getValue(t);r&&(r.liveStyle=!0),p[t]=null!==n&&void 0!==n?n:null})),s.push({animation:p})}var h=Boolean(s.length);return!r||!1!==i.initial&&i.initial!==i.animate||e.manuallyAnimateOnMount||(h=!1),r=!1,h?t(s):Promise.resolve()}return{animateChanges:o,setActive:function(t,r){var i;if(n[t].isActive===r)return Promise.resolve();null===(i=e.variantChildren)||void 0===i||i.forEach((function(e){var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;var a=o(t);for(var s in n)n[s].protectedKeys={};return a},setAnimateFunction:function(n){t=n(e)},getState:function(){return n},reset:function(){n=ls(),r=!0}}}function ss(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ls(){return{animate:ss(!0),whileInView:ss(),whileHover:ss(),whileTap:ss(),whileDrag:ss(),whileFocus:ss(),exit:ss()}}var us=function(e){Lr(n,e);var t=Nr(n);function n(e){var r;return(0,Z.Z)(this,n),r=t.call(this,e),e.animationState||(e.animationState=as(e)),r}return(0,H.Z)(n,[{key:"updateAnimationControlsSubscription",value:function(){var e=this.node.getProps().animate;$t(e)&&(this.unmountControls=e.subscribe(this.node))}},{key:"mount",value:function(){this.updateAnimationControlsSubscription()}},{key:"update",value:function(){this.node.getProps().animate!==(this.node.prevProps||{}).animate&&this.updateAnimationControlsSubscription()}},{key:"unmount",value:function(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}]),n}(Qr),cs=0,ds=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).id=cs++,e}return(0,H.Z)(n,[{key:"update",value:function(){var e=this;if(this.node.presenceContext){var t=this.node.presenceContext,n=t.isPresent,r=t.onExitComplete,o=(this.node.prevPresenceContext||{}).isPresent;if(this.node.animationState&&n!==o){var i=this.node.animationState.setActive("exit",!n);r&&!n&&i.then((function(){return r(e.id)}))}}}},{key:"mount",value:function(){var e=(this.node.presenceContext||{}).register;e&&(this.unmount=e(this.id))}},{key:"unmount",value:function(){}}]),n}(Qr),fs={animation:{Feature:us},exit:{Feature:ds}},ps=function(e,t){return Math.abs(e-t)};function hs(e,t){var n=ps(e.x,t.x),r=ps(e.y,t.y);return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}var ms=function(){function e(t,n){var r=this,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=o.transformPagePoint,a=o.contextWindow,s=o.dragSnapToOrigin,l=void 0!==s&&s;if((0,Z.Z)(this,e),this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=function(){if(r.lastMoveEvent&&r.lastMoveEventInfo){var e=ys(r.lastMoveEventInfo,r.history),t=null!==r.startEvent,n=hs(e.offset,{x:0,y:0})>=3;if(t||n){var o=e.point,i=Rr.timestamp;r.history.push(be(be({},o),{},{timestamp:i}));var a=r.handlers,s=a.onStart,l=a.onMove;t||(s&&s(r.lastMoveEvent,e),r.startEvent=r.lastMoveEvent),l&&l(r.lastMoveEvent,e)}}},this.handlePointerMove=function(e,t){r.lastMoveEvent=e,r.lastMoveEventInfo=vs(t,r.transformPagePoint),Tr.update(r.updatePoint,!0)},this.handlePointerUp=function(e,t){r.end();var n=r.handlers,o=n.onEnd,i=n.onSessionEnd,a=n.resumeAnimation;if(r.dragSnapToOrigin&&a&&a(),r.lastMoveEvent&&r.lastMoveEventInfo){var s=ys("pointercancel"===e.type?r.lastMoveEventInfo:vs(t,r.transformPagePoint),r.history);r.startEvent&&o&&o(e,s),i&&i(e,s)}},Ur(t)){this.dragSnapToOrigin=l,this.handlers=n,this.transformPagePoint=i,this.contextWindow=a||window;var u=Gr(t),c=vs(u,this.transformPagePoint),d=c.point,f=Rr.timestamp;this.history=[be(be({},d),{},{timestamp:f})];var p=n.onSessionStart;p&&p(t,ys(c,this.history)),this.removeListeners=Hr(Wr(this.contextWindow,"pointermove",this.handlePointerMove),Wr(this.contextWindow,"pointerup",this.handlePointerUp),Wr(this.contextWindow,"pointercancel",this.handlePointerUp))}}return(0,H.Z)(e,[{key:"updateHandlers",value:function(e){this.handlers=e}},{key:"end",value:function(){this.removeListeners&&this.removeListeners(),jr(this.updatePoint)}}]),e}();function vs(e,t){return t?{point:t(e.point)}:e}function gs(e,t){return{x:e.x-t.x,y:e.y-t.y}}function ys(e,t){var n=e.point;return{point:n,delta:gs(n,xs(t)),offset:gs(n,bs(t)),velocity:ws(t,.1)}}function bs(e){return e[0]}function xs(e){return e[e.length-1]}function ws(e,t){if(e.length<2)return{x:0,y:0};for(var n=e.length-1,r=null,o=xs(e);n>=0&&(r=e[n],!(o.timestamp-r.timestamp>go(t)));)n--;if(!r)return{x:0,y:0};var i=yo(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};var a={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}var ks=.9999,Ss=1.0001;function _s(e){return e.max-e.min}function Es(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5;e.origin=r,e.originPoint=ia(t.min,t.max,e.origin),e.scale=_s(n)/_s(t),e.translate=ia(n.min,n.max,e.origin)-e.originPoint,(e.scale>=ks&&e.scale<=Ss||isNaN(e.scale))&&(e.scale=1),(e.translate>=-.01&&e.translate<=.01||isNaN(e.translate))&&(e.translate=0)}function Cs(e,t,n,r){Es(e.x,t.x,n.x,r?r.originX:void 0),Es(e.y,t.y,n.y,r?r.originY:void 0)}function Ps(e,t,n){e.min=n.min+t.min,e.max=e.min+_s(t)}function As(e,t,n){Ps(e.x,t.x,n.x),Ps(e.y,t.y,n.y)}function Ts(e,t,n){e.min=t.min-n.min,e.max=e.min+_s(t)}function js(e,t,n){Ts(e.x,t.x,n.x),Ts(e.y,t.y,n.y)}function Rs(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Os(e,t){var n=t.min-e.min,r=t.max-e.max;if(t.max-t.min<e.max-e.min){var o=[r,n];n=o[0],r=o[1]}return{min:n,max:r}}var Fs=.35;function Ms(e,t,n){return{min:Ds(e,t),max:Ds(e,n)}}function Ds(e,t){return"number"===typeof e?e:e[t]||0}var Ls=function(){return{x:{min:0,max:0},y:{min:0,max:0}}};function Bs(e){return[e("x"),e("y")]}function Is(e){var t=e.top;return{x:{min:e.left,max:e.right},y:{min:t,max:e.bottom}}}function Vs(e){return void 0===e||1===e}function Ns(e){var t=e.scale,n=e.scaleX,r=e.scaleY;return!Vs(t)||!Vs(n)||!Vs(r)}function zs(e){return Ns(e)||Us(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Us(e){return Gs(e.x)||Gs(e.y)}function Gs(e){return e&&"0%"!==e}function Ws(e,t,n){return n+t*(e-n)}function Zs(e,t,n,r,o){return void 0!==o&&(e=Ws(e,o,r)),Ws(e,n,r)+t}function Hs(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;e.min=Zs(e.min,t,n,r,o),e.max=Zs(e.max,t,n,r,o)}function $s(e,t){var n=t.x,r=t.y;Hs(e.x,n.translate,n.scale,n.originPoint),Hs(e.y,r.translate,r.scale,r.originPoint)}var Ks=.999999999999,Xs=1.0000000000001;function Ys(e,t){e.min=e.min+t,e.max=e.max+t}function qs(e,t,n,r){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:.5,i=ia(e.min,e.max,o);Hs(e,t,n,i,r)}function Qs(e,t){qs(e.x,t.x,t.scaleX,t.scale,t.originX),qs(e.y,t.y,t.scaleY,t.scale,t.originY)}function Js(e,t){return Is(function(e,t){if(!t)return e;var n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}var el=function(e){var t=e.current;return t?t.ownerDocument.defaultView:null},tl=new WeakMap,nl=function(){function e(t){(0,Z.Z)(this,e),this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}return(0,H.Z)(e,[{key:"start",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.snapToCursor,o=void 0!==r&&r,i=this.visualElement.presenceContext;if(!i||!1!==i.isPresent){var a=function(e){t.getProps().dragSnapToOrigin?t.pauseAnimation():t.stopAnimation(),o&&t.snapToCursor(Gr(e,"page").point)},s=function(e,n){var r,o=t.getProps(),i=o.drag,a=o.dragPropagation,s=o.onDragStart;if(!i||a||(t.openGlobalLock&&t.openGlobalLock(),t.openGlobalLock=Yr(i),t.openGlobalLock)){t.isDragging=!0,t.currentDirection=null,t.resolveConstraints(),t.visualElement.projection&&(t.visualElement.projection.isAnimationBlocked=!0,t.visualElement.projection.target=void 0),Bs((function(e){var n=t.getAxisMotionValue(e).get()||0;if(Tn.test(n)){var r=t.visualElement.projection;if(r&&r.layout){var o=r.layout.layoutBox[e];if(o)n=_s(o)*(parseFloat(n)/100)}}t.originPoint[e]=n})),s&&Tr.postRender((function(){return s(e,n)})),null===(r=t.removeWillChange)||void 0===r||r.call(t),t.removeWillChange=Xa(t.visualElement,"transform");var l=t.visualElement.animationState;l&&l.setActive("whileDrag",!0)}},l=function(e,n){var r=t.getProps(),o=r.dragPropagation,i=r.dragDirectionLock,a=r.onDirectionLock,s=r.onDrag;if(o||t.openGlobalLock){var l=n.offset;if(i&&null===t.currentDirection)return t.currentDirection=ol(l),void(null!==t.currentDirection&&a&&a(t.currentDirection));t.updateAxis("x",n.point,l),t.updateAxis("y",n.point,l),t.visualElement.render(),s&&s(e,n)}},u=function(e,n){return t.stop(e,n)},c=function(){return Bs((function(e){var n;return"paused"===t.getAnimationState(e)&&(null===(n=t.getAxisMotionValue(e).animation)||void 0===n?void 0:n.play())}))},d=this.getProps(),f=d.dragSnapToOrigin;this.panSession=new ms(e,{onSessionStart:a,onStart:s,onMove:l,onSessionEnd:u,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:el(this.visualElement)})}}},{key:"stop",value:function(e,t){var n;null===(n=this.removeWillChange)||void 0===n||n.call(this);var r=this.isDragging;if(this.cancel(),r){var o=t.velocity;this.startAnimation(o);var i=this.getProps().onDragEnd;i&&Tr.postRender((function(){return i(e,t)}))}}},{key:"cancel",value:function(){this.isDragging=!1;var e=this.visualElement,t=e.projection,n=e.animationState;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0,!this.getProps().dragPropagation&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),n&&n.setActive("whileDrag",!1)}},{key:"updateAxis",value:function(e,t,n){var r=this.getProps().drag;if(n&&rl(e,r,this.currentDirection)){var o=this.getAxisMotionValue(e),i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,t,n){var r=t.min,o=t.max;return void 0!==r&&e<r?e=n?ia(r,e,n.min):Math.max(e,r):void 0!==o&&e>o&&(e=n?ia(o,e,n.max):Math.min(e,o)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}}},{key:"resolveConstraints",value:function(){var e,t=this,n=this.getProps(),r=n.dragConstraints,o=n.dragElastic,i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,a=this.constraints;r&&Vt(r)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!r||!i)&&function(e,t){var n=t.top,r=t.left,o=t.bottom,i=t.right;return{x:Rs(e.x,r,i),y:Rs(e.y,n,o)}}(i.layoutBox,r),this.elastic=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fs;return!1===e?e=0:!0===e&&(e=Fs),{x:Ms(e,"left","right"),y:Ms(e,"top","bottom")}}(o),a!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Bs((function(e){!1!==t.constraints&&t.getAxisMotionValue(e)&&(t.constraints[e]=function(e,t){var n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(i.layoutBox[e],t.constraints[e]))}))}},{key:"resolveRefConstraints",value:function(){var e=this.getProps(),t=e.dragConstraints,n=e.onMeasureDragConstraints;if(!t||!Vt(t))return!1;var r=t.current;Lo(null!==r,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");var o=this.visualElement.projection;if(!o||!o.layout)return!1;var i=function(e,t,n){var r=Js(e,n),o=t.scroll;return o&&(Ys(r.x,o.offset.x),Ys(r.y,o.offset.y)),r}(r,o.root,this.visualElement.getTransformPagePoint()),a=function(e,t){return{x:Os(e.x,t.x),y:Os(e.y,t.y)}}(o.layout.layoutBox,i);if(n){var s=n(function(e){var t=e.x,n=e.y;return{top:n.min,right:t.max,bottom:n.max,left:t.min}}(a));this.hasMutatedConstraints=!!s,s&&(a=Is(s))}return a}},{key:"startAnimation",value:function(e){var t=this,n=this.getProps(),r=n.drag,o=n.dragMomentum,i=n.dragElastic,a=n.dragTransition,s=n.dragSnapToOrigin,l=n.onDragTransitionEnd,u=this.constraints||{},c=Bs((function(n){if(rl(n,r,t.currentDirection)){var l=u&&u[n]||{};s&&(l={min:0,max:0});var c=i?200:1e6,d=i?40:1e7,f=be(be({type:"inertia",velocity:o?e[n]:0,bounceStiffness:c,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10},a),l);return t.startAxisValueAnimation(n,f)}}));return Promise.all(c).then(l)}},{key:"startAxisValueAnimation",value:function(e,t){var n=this.getAxisMotionValue(e);return n.start(Va(e,n,0,t,this.visualElement,!1,Xa(this.visualElement,e)))}},{key:"stopAnimation",value:function(){var e=this;Bs((function(t){return e.getAxisMotionValue(t).stop()}))}},{key:"pauseAnimation",value:function(){var e=this;Bs((function(t){var n;return null===(n=e.getAxisMotionValue(t).animation)||void 0===n?void 0:n.pause()}))}},{key:"getAnimationState",value:function(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}},{key:"getAxisMotionValue",value:function(e){var t="_drag".concat(e.toUpperCase()),n=this.visualElement.getProps(),r=n[t];return r||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}},{key:"snapToCursor",value:function(e){var t=this;Bs((function(n){if(rl(n,t.getProps().drag,t.currentDirection)){var r=t.visualElement.projection,o=t.getAxisMotionValue(n);if(r&&r.layout){var i=r.layout.layoutBox[n],a=i.min,s=i.max;o.set(e[n]-ia(a,s,.5))}}}))}},{key:"scalePositionWithinConstraints",value:function(){var e=this;if(this.visualElement.current){var t=this.getProps(),n=t.drag,r=t.dragConstraints,o=this.visualElement.projection;if(Vt(r)&&o&&this.constraints){this.stopAnimation();var i={x:0,y:0};Bs((function(t){var n=e.getAxisMotionValue(t);if(n&&!1!==e.constraints){var r=n.get();i[t]=function(e,t){var n=.5,r=_s(e),o=_s(t);return o>r?n=oa(t.min,t.max-r,e.min):r>o&&(n=oa(e.min,e.max-o,t.min)),yn(0,1,n)}({min:r,max:r},e.constraints[t])}}));var a=this.visualElement.getProps().transformTemplate;this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Bs((function(t){if(rl(t,n,null)){var r=e.getAxisMotionValue(t),o=e.constraints[t],a=o.min,s=o.max;r.set(ia(a,s,i[t]))}}))}}}},{key:"addListeners",value:function(){var e=this;if(this.visualElement.current){tl.set(this.visualElement,this);var t=Wr(this.visualElement.current,"pointerdown",(function(t){var n=e.getProps(),r=n.drag,o=n.dragListener;r&&(void 0===o||o)&&e.start(t)})),n=function(){var t=e.getProps().dragConstraints;Vt(t)&&t.current&&(e.constraints=e.resolveRefConstraints())},r=this.visualElement.projection,o=r.addEventListener("measure",n);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Tr.read(n);var i=zr(window,"resize",(function(){return e.scalePositionWithinConstraints()})),a=r.addEventListener("didUpdate",(function(t){var n=t.delta,r=t.hasLayoutChanged;e.isDragging&&r&&(Bs((function(t){var r=e.getAxisMotionValue(t);r&&(e.originPoint[t]+=n[t].translate,r.set(r.get()+n[t].translate))})),e.visualElement.render())}));return function(){i(),t(),o(),a&&a()}}}},{key:"getProps",value:function(){var e=this.visualElement.getProps(),t=e.drag,n=void 0!==t&&t,r=e.dragDirectionLock,o=void 0!==r&&r,i=e.dragPropagation,a=void 0!==i&&i,s=e.dragConstraints,l=void 0!==s&&s,u=e.dragElastic,c=void 0===u?Fs:u,d=e.dragMomentum,f=void 0===d||d;return be(be({},e),{},{drag:n,dragDirectionLock:o,dragPropagation:a,dragConstraints:l,dragElastic:c,dragMomentum:f})}}]),e}();function rl(e,t,n){return(!0===t||t===e)&&(null===n||n===e)}function ol(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}var il=function(e){Lr(n,e);var t=Nr(n);function n(e){var r;return(0,Z.Z)(this,n),(r=t.call(this,e)).removeGroupControls=Pr,r.removeListeners=Pr,r.controls=new nl(e),r}return(0,H.Z)(n,[{key:"mount",value:function(){var e=this.node.getProps().dragControls;e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Pr}},{key:"unmount",value:function(){this.removeGroupControls(),this.removeListeners()}}]),n}(Qr),al=function(e){return function(t,n){e&&Tr.postRender((function(){return e(t,n)}))}},sl=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).removePointerDownListener=Pr,e}return(0,H.Z)(n,[{key:"onPointerDown",value:function(e){this.session=new ms(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:el(this.node)})}},{key:"createPanHandlers",value:function(){var e=this,t=this.node.getProps(),n=t.onPanSessionStart,r=t.onPanStart,o=t.onPan,i=t.onPanEnd;return{onSessionStart:al(n),onStart:al(r),onMove:o,onEnd:function(t,n){delete e.session,i&&Tr.postRender((function(){return i(t,n)}))}}}},{key:"mount",value:function(){var e=this;this.removePointerDownListener=Wr(this.node.current,"pointerdown",(function(t){return e.onPointerDown(t)}))}},{key:"update",value:function(){this.session&&this.session.updateHandlers(this.createPanHandlers())}},{key:"unmount",value:function(){this.removePointerDownListener(),this.session&&this.session.end()}}]),n}(Qr);var ll={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function ul(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var cl={correct:function(e,t){if(!t.target)return e;if("string"===typeof e){if(!jn.test(e))return e;e=parseFloat(e)}var n=ul(e,t.target.x),r=ul(e,t.target.y);return"".concat(n,"% ").concat(r,"%")}},dl={correct:function(e,t){var n=t.treeScale,r=t.projectionDelta,o=e,i=yi.parse(e);if(i.length>5)return o;var a=yi.createTransformer(e),s="number"!==typeof i[0]?1:0,l=r.x.scale*n.x,u=r.y.scale*n.y;i[0+s]/=l,i[1+s]/=u;var c=ia(l,u,.5);return"number"===typeof i[2+s]&&(i[2+s]/=c),"number"===typeof i[3+s]&&(i[3+s]/=c),a(i)}},fl=function(e){Lr(n,e);var t=Nr(n);function n(){return(0,Z.Z)(this,n),t.apply(this,arguments)}return(0,H.Z)(n,[{key:"componentDidMount",value:function(){var e,t=this,n=this.props,r=n.visualElement,o=n.layoutGroup,i=n.switchLayoutGroup,a=n.layoutId,s=r.projection;e=hl,Object.assign(fn,e),s&&(o.group&&o.group.add(s),i&&i.register&&a&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",(function(){t.safeToRemove()})),s.setOptions(be(be({},s.options),{},{onExitComplete:function(){return t.safeToRemove()}}))),ll.hasEverUpdated=!0}},{key:"getSnapshotBeforeUpdate",value:function(e){var t=this,n=this.props,r=n.layoutDependency,o=n.visualElement,i=n.drag,a=n.isPresent,s=o.projection;return s?(s.isPresent=a,i||e.layoutDependency!==r||void 0===r?s.willUpdate():this.safeToRemove(),e.isPresent!==a&&(a?s.promote():s.relegate()||Tr.postRender((function(){var e=s.getStack();e&&e.members.length||t.safeToRemove()}))),null):null}},{key:"componentDidUpdate",value:function(){var e=this,t=this.props.visualElement.projection;t&&(t.root.didUpdate(),It.postRender((function(){!t.currentAnimation&&t.isLead()&&e.safeToRemove()})))}},{key:"componentWillUnmount",value:function(){var e=this.props,t=e.visualElement,n=e.layoutGroup,r=e.switchLayoutGroup,o=t.projection;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}},{key:"safeToRemove",value:function(){var e=this.props.safeToRemove;e&&e()}},{key:"render",value:function(){return null}}]),n}(t.Component);function pl(e){var n=function(){var e=(0,t.useContext)(Pt);if(null===e)return[!0,null];var n=e.isPresent,r=e.onExitComplete,o=e.register,i=(0,t.useId)();(0,t.useEffect)((function(){return o(i)}),[]);var a=(0,t.useCallback)((function(){return r&&r(i)}),[i,r]);return!n&&r?[!1,a]:[!0]}(),r=(0,P.Z)(n,2),o=r[0],i=r[1],a=(0,t.useContext)(on);return(0,E.jsx)(fl,be(be({},e),{},{layoutGroup:a,switchLayoutGroup:(0,t.useContext)(Nt),isPresent:o,safeToRemove:i}))}var hl={borderRadius:be(be({},cl),{},{applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]}),borderTopLeftRadius:cl,borderTopRightRadius:cl,borderBottomLeftRadius:cl,borderBottomRightRadius:cl,boxShadow:dl},ml=["TopLeft","TopRight","BottomLeft","BottomRight"],vl=ml.length,gl=function(e){return"string"===typeof e?parseFloat(e):e},yl=function(e){return"number"===typeof e||jn.test(e)};function bl(e,t,n,r,o,i){o?(e.opacity=ia(0,void 0!==n.opacity?n.opacity:1,wl(r)),e.opacityExit=ia(void 0!==t.opacity?t.opacity:1,0,kl(r))):i&&(e.opacity=ia(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(var a=0;a<vl;a++){var s="border".concat(ml[a],"Radius"),l=xl(t,s),u=xl(n,s);if(void 0!==l||void 0!==u)l||(l=0),u||(u=0),0===l||0===u||yl(l)===yl(u)?(e[s]=Math.max(ia(gl(l),gl(u),r),0),(Tn.test(u)||Tn.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||n.rotate)&&(e.rotate=ia(t.rotate||0,n.rotate||0,r))}function xl(e,t){return void 0!==e[t]?e[t]:e.borderRadius}var wl=Sl(0,.5,qi),kl=Sl(.5,.95,Pr);function Sl(e,t,n){return function(r){return r<e?0:r>t?1:n(oa(e,t,r))}}function _l(e,t){e.min=t.min,e.max=t.max}function El(e,t){_l(e.x,t.x),_l(e.y,t.y)}function Cl(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Pl(e,t,n,r,o){return e=Ws(e-=t,1/n,r),void 0!==o&&(e=Ws(e,1/o,r)),e}function Al(e,t,n,r,o){var i=(0,P.Z)(n,3),a=i[0],s=i[1],l=i[2];!function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:.5,o=arguments.length>4?arguments[4]:void 0,i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:e,a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:e;if(Tn.test(t)){t=parseFloat(t),t=ia(a.min,a.max,t/100)-a.min}if("number"===typeof t){var s=ia(i.min,i.max,r);e===i&&(s-=t),e.min=Pl(e.min,t,n,s,o),e.max=Pl(e.max,t,n,s,o)}}(e,t[a],t[s],t[l],t.scale,r,o)}var Tl=["x","scaleX","originX"],jl=["y","scaleY","originY"];function Rl(e,t,n,r){Al(e.x,t,Tl,n?n.x:void 0,r?r.x:void 0),Al(e.y,t,jl,n?n.y:void 0,r?r.y:void 0)}function Ol(e){return 0===e.translate&&1===e.scale}function Fl(e){return Ol(e.x)&&Ol(e.y)}function Ml(e,t){return e.min===t.min&&e.max===t.max}function Dl(e,t){return Ml(e.x,t.x)&&Ml(e.y,t.y)}function Ll(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Bl(e,t){return Ll(e.x,t.x)&&Ll(e.y,t.y)}function Il(e){return _s(e.x)/_s(e.y)}function Vl(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}var Nl=function(){function e(){(0,Z.Z)(this,e),this.members=[]}return(0,H.Z)(e,[{key:"add",value:function(e){xr(this.members,e),e.scheduleRender()}},{key:"remove",value:function(e){if(wr(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){var t=this.members[this.members.length-1];t&&this.promote(t)}}},{key:"relegate",value:function(e){var t,n=this.members.findIndex((function(t){return e===t}));if(0===n)return!1;for(var r=n;r>=0;r--){var o=this.members[r];if(!1!==o.isPresent){t=o;break}}return!!t&&(this.promote(t),!0)}},{key:"promote",value:function(e,t){var n=this.lead;e!==n&&(this.prevLead=n,this.lead=e,e.show(),n&&(n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0),!1===e.options.crossfade&&n.hide()))}},{key:"exitAnimationComplete",value:function(){this.members.forEach((function(e){var t=e.options,n=e.resumingFrom;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}},{key:"scheduleRender",value:function(){this.members.forEach((function(e){e.instance&&e.scheduleRender(!1)}))}},{key:"removeLeadSnapshot",value:function(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}]),e}();var zl=function(e,t){return e.depth-t.depth},Ul=function(){function e(){(0,Z.Z)(this,e),this.children=[],this.isDirty=!1}return(0,H.Z)(e,[{key:"add",value:function(e){xr(this.children,e),this.isDirty=!0}},{key:"remove",value:function(e){wr(this.children,e),this.isDirty=!0}},{key:"forEach",value:function(e){this.isDirty&&this.children.sort(zl),this.isDirty=!1,this.children.forEach(e)}}]),e}();function Gl(e,t){var n=Ro.now(),r=function r(o){var i=o.timestamp-n;i>=t&&(jr(r),e(i-t))};return Tr.read(r,!0),function(){return jr(r)}}function Wl(e){return e instanceof SVGElement&&"svg"!==e.tagName}var Zl={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Hl="undefined"!==typeof window&&void 0!==window.MotionDebug,$l=["","X","Y","Z"],Kl={visibility:"hidden"},Xl=0;function Yl(e,t,n,r){var o=t.latestValues;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function ql(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return!1;var t=e.options.visualElement;return!!t&&(!!window.MotionHasOptimisedTransformAnimation($a(t))||!(!e.parent||e.parent.hasCheckedOptimisedAppear)&&ql(e.parent))}function Ql(e){var t=e.attachResizeListener,n=e.defaultParent,r=e.measureScroll,o=e.checkIsScrollRoot,i=e.resetTransform;return function(){function e(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null===n||void 0===n?void 0:n();(0,Z.Z)(this,e),this.id=Xl++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=function(){return t.update()},this.projectionUpdateScheduled=!1,this.checkUpdateFailed=function(){t.isUpdating&&(t.isUpdating=!1,t.clearAllSnapshots())},this.updateProjection=function(){t.projectionUpdateScheduled=!1,Hl&&(Zl.totalNodes=Zl.resolvedTargetDeltas=Zl.recalculatedProjection=0),t.nodes.forEach(tu),t.nodes.forEach(lu),t.nodes.forEach(uu),t.nodes.forEach(nu),Hl&&window.MotionDebug.record(Zl)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=o?o.root||o:this,this.path=o?[].concat((0,pt.Z)(o.path),[o]):[],this.parent=o,this.depth=o?o.depth+1:0;for(var i=0;i<this.path.length;i++)this.path[i].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ul)}return(0,H.Z)(e,[{key:"addEventListener",value:function(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Na),this.eventHandlers.get(e).add(t)}},{key:"notifyListeners",value:function(e){for(var t=this.eventHandlers.get(e),n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];t&&t.notify.apply(t,r)}},{key:"hasListeners",value:function(e){return this.eventHandlers.has(e)}},{key:"mount",value:function(e){var n=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.root.hasTreeAnimated;if(!this.instance){this.isSVG=Wl(e),this.instance=e;var o=this.options,i=o.layoutId,a=o.layout,s=o.visualElement;if(s&&!s.current&&s.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),r&&(a||i)&&(this.isLayoutDirty=!0),t){var l,u=function(){return n.root.updateBlockedByResize=!1};t(e,(function(){n.root.updateBlockedByResize=!0,l&&l(),l=Gl(u,250),ll.hasAnimatedSinceResize&&(ll.hasAnimatedSinceResize=!1,n.nodes.forEach(su))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||a)&&this.addEventListener("didUpdate",(function(e){var t=e.delta,r=e.hasLayoutChanged,o=e.hasRelativeTargetChanged,i=e.layout;if(n.isTreeAnimationBlocked())return n.target=void 0,void(n.relativeTarget=void 0);var a=n.options.transition||s.getDefaultTransition()||vu,l=s.getProps(),u=l.onLayoutAnimationStart,c=l.onLayoutAnimationComplete,d=!n.targetLayout||!Bl(n.targetLayout,i)||o,f=!r&&o;if(n.options.layoutRoot||n.resumeFrom&&n.resumeFrom.instance||f||r&&(d||!n.currentAnimation)){n.resumeFrom&&(n.resumingFrom=n.resumeFrom,n.resumingFrom.resumingFrom=void 0),n.setAnimationOrigin(t,f);var p=be(be({},Eo(a,"layout")),{},{onPlay:u,onComplete:c});(s.shouldReduceMotion||n.options.layoutRoot)&&(p.delay=0,p.type=!1),n.startAnimation(p)}else r||su(n),n.isLead()&&n.options.onExitComplete&&n.options.onExitComplete();n.targetLayout=i}))}}},{key:"unmount",value:function(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);var e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,jr(this.updateProjection)}},{key:"blockUpdate",value:function(){this.updateManuallyBlocked=!0}},{key:"unblockUpdate",value:function(){this.updateManuallyBlocked=!1}},{key:"isUpdateBlocked",value:function(){return this.updateManuallyBlocked||this.updateBlockedByResize}},{key:"isTreeAnimationBlocked",value:function(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}},{key:"startUpdate",value:function(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(cu),this.animationId++)}},{key:"getTransformTemplate",value:function(){var e=this.options.visualElement;return e&&e.getProps().transformTemplate}},{key:"willUpdate",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())this.options.onExitComplete&&this.options.onExitComplete();else if(window.MotionHandoffCancelAll&&ql(this)&&window.MotionHandoffCancelAll(),!this.root.isUpdating&&this.root.startUpdate(),!this.isLayoutDirty){this.isLayoutDirty=!0;for(var t=0;t<this.path.length;t++){var n=this.path[t];n.shouldResetTransform=!0,n.updateScroll("snapshot"),n.options.layoutRoot&&n.willUpdate(!1)}var r=this.options,o=r.layoutId,i=r.layout;if(void 0!==o||i){var a=this.getTransformTemplate();this.prevTransformTemplateValue=a?a(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}}}},{key:"update",value:function(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(ou);this.isUpdating||this.nodes.forEach(iu),this.isUpdating=!1,this.nodes.forEach(au),this.nodes.forEach(Jl),this.nodes.forEach(eu),this.clearAllSnapshots();var e=Ro.now();Rr.delta=yn(0,1e3/60,e-Rr.timestamp),Rr.timestamp=e,Rr.isProcessing=!0,Or.update.process(Rr),Or.preRender.process(Rr),Or.render.process(Rr),Rr.isProcessing=!1}},{key:"didUpdate",value:function(){this.updateScheduled||(this.updateScheduled=!0,It.read(this.scheduleUpdate))}},{key:"clearAllSnapshots",value:function(){this.nodes.forEach(ru),this.sharedNodes.forEach(du)}},{key:"scheduleUpdateProjection",value:function(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Tr.preRender(this.updateProjection,!1,!0))}},{key:"scheduleCheckAfterUnmount",value:function(){var e=this;Tr.postRender((function(){e.isLayoutDirty?e.root.didUpdate():e.root.checkUpdateFailed()}))}},{key:"updateSnapshot",value:function(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}},{key:"updateLayout",value:function(){if(this.instance&&(this.updateScroll(),this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty)){if(this.resumeFrom&&!this.resumeFrom.instance)for(var e=0;e<this.path.length;e++){this.path[e].updateScroll()}var t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);var n=this.options.visualElement;n&&n.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}}},{key:"updateScroll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"measure",t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){var n=o(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:n,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:n}}}},{key:"resetTransform",value:function(){if(i){var e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!Fl(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,o=r!==this.prevTransformTemplateValue;e&&(t||zs(this.latestValues)||o)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}}},{key:"measure",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.measurePageBox(),n=this.removeElementScroll(t);return e&&(n=this.removeTransform(n)),xu(n),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}},{key:"measurePageBox",value:function(){var e,t=this.options.visualElement;if(!t)return{x:{min:0,max:0},y:{min:0,max:0}};var n=t.measureViewportBox();if(!((null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)||this.path.some(ku))){var r=this.root.scroll;r&&(Ys(n.x,r.offset.x),Ys(n.y,r.offset.y))}return n}},{key:"removeElementScroll",value:function(e){var t,n={x:{min:0,max:0},y:{min:0,max:0}};if(El(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(var r=0;r<this.path.length;r++){var o=this.path[r],i=o.scroll,a=o.options;o!==this.root&&i&&a.layoutScroll&&(i.wasRoot&&El(n,e),Ys(n.x,i.offset.x),Ys(n.y,i.offset.y))}return n}},{key:"applyTransform",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={x:{min:0,max:0},y:{min:0,max:0}};El(n,e);for(var r=0;r<this.path.length;r++){var o=this.path[r];!t&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Qs(n,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),zs(o.latestValues)&&Qs(n,o.latestValues)}return zs(this.latestValues)&&Qs(n,this.latestValues),n}},{key:"removeTransform",value:function(e){var t={x:{min:0,max:0},y:{min:0,max:0}};El(t,e);for(var n=0;n<this.path.length;n++){var r=this.path[n];if(r.instance&&zs(r.latestValues)){Ns(r.latestValues)&&r.updateSnapshot();var o={x:{min:0,max:0},y:{min:0,max:0}};El(o,r.measurePageBox()),Rl(t,r.latestValues,r.snapshot?r.snapshot.layoutBox:void 0,o)}}return zs(this.latestValues)&&Rl(t,this.latestValues),t}},{key:"setTargetDelta",value:function(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}},{key:"setOptions",value:function(e){this.options=be(be(be({},this.options),e),{},{crossfade:void 0===e.crossfade||e.crossfade})}},{key:"clearMeasurements",value:function(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}},{key:"forceRelativeParentToResolveTarget",value:function(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Rr.timestamp&&this.relativeParent.resolveTargetDelta(!0)}},{key:"resolveTargetDelta",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);var r=Boolean(this.resumingFrom)||this!==n,o=!(t||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize);if(!o){var i=this.options,a=i.layout,s=i.layoutId;if(this.layout&&(a||s)){if(this.resolvedRelativeTargetAt=Rr.timestamp,!this.targetDelta&&!this.relativeTarget){var l=this.getClosestProjectingParent();l&&l.layout&&1!==this.animationProgress?(this.relativeParent=l,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.layout.layoutBox,l.layout.layoutBox),El(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),As(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):El(this.target,this.layout.layoutBox),$s(this.target,this.targetDelta)):El(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;var u=this.getClosestProjectingParent();u&&Boolean(u.resumingFrom)===Boolean(this.resumingFrom)&&!u.options.layoutScroll&&u.target&&1!==this.animationProgress?(this.relativeParent=u,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},js(this.relativeTargetOrigin,this.target,u.target),El(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Hl&&Zl.resolvedTargetDeltas++}}}}},{key:"getClosestProjectingParent",value:function(){if(this.parent&&!Ns(this.parent.latestValues)&&!Us(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}},{key:"isProjecting",value:function(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}},{key:"calcProjection",value:function(){var e,t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t,r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Rr.timestamp&&(r=!1),!r){var o=this.options,i=o.layout,a=o.layoutId;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),this.layout&&(i||a)){El(this.layoutCorrected,this.layout.layoutBox);var s=this.treeScale.x,l=this.treeScale.y;!function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=n.length;if(o){var i,a;t.x=t.y=1;for(var s=0;s<o;s++){a=(i=n[s]).projectionDelta;var l=i.options.visualElement;l&&l.props.style&&"contents"===l.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Qs(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,$s(e,a)),r&&zs(i.latestValues)&&Qs(e,i.latestValues))}t.x<Xs&&t.x>Ks&&(t.x=1),t.y<Xs&&t.y>Ks&&(t.y=1)}}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});var u=t.target;u?(this.projectionDelta&&this.prevProjectionDelta?(Cl(this.prevProjectionDelta.x,this.projectionDelta.x),Cl(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Cs(this.projectionDelta,this.layoutCorrected,u,this.latestValues),this.treeScale.x===s&&this.treeScale.y===l&&Vl(this.projectionDelta.x,this.prevProjectionDelta.x)&&Vl(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",u)),Hl&&Zl.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}}}},{key:"hide",value:function(){this.isVisible=!1}},{key:"show",value:function(){this.isVisible=!0}},{key:"scheduleRender",value:function(){var e,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){var n=this.getStack();n&&n.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}},{key:"createProjectionDeltas",value:function(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}},{key:"setAnimationOrigin",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.snapshot,o=r?r.latestValues:{},i=be({},this.latestValues),a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!n;var s,l={x:{min:0,max:0},y:{min:0,max:0}},u=r?r.source:void 0,c=this.layout?this.layout.source:void 0,d=u!==c,f=this.getStack(),p=!f||f.members.length<=1,h=Boolean(d&&!p&&!0===this.options.crossfade&&!this.path.some(mu));this.animationProgress=0,this.mixTargetDelta=function(n){var r=n/1e3;fu(a.x,e.x,r),fu(a.y,e.y,r),t.setTargetDelta(a),t.relativeTarget&&t.relativeTargetOrigin&&t.layout&&t.relativeParent&&t.relativeParent.layout&&(js(l,t.layout.layoutBox,t.relativeParent.layout.layoutBox),hu(t.relativeTarget,t.relativeTargetOrigin,l,r),s&&Dl(t.relativeTarget,s)&&(t.isProjectionDirty=!1),s||(s={x:{min:0,max:0},y:{min:0,max:0}}),El(s,t.relativeTarget)),d&&(t.animationValues=i,bl(i,o,t.latestValues,r,h,p)),t.root.scheduleUpdateProjection(),t.scheduleRender(),t.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}},{key:"startAnimation",value:function(e){var t=this;this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Tr.update((function(){ll.hasAnimatedSinceResize=!0,t.currentAnimation=function(e,t,n){var r=vn(e)?e:Ga(e);return r.start(Va("",r,t,n)),r.animation}(0,1e3,be(be({},e),{},{onUpdate:function(n){t.mixTargetDelta(n),e.onUpdate&&e.onUpdate(n)},onComplete:function(){e.onComplete&&e.onComplete(),t.completeAnimation()}})),t.resumingFrom&&(t.resumingFrom.currentAnimation=t.currentAnimation),t.pendingAnimation=void 0}))}},{key:"completeAnimation",value:function(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);var e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}},{key:"finishAnimation",value:function(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}},{key:"applyTransformsToTarget",value:function(){var e=this.getLead(),t=e.targetWithTransforms,n=e.target,r=e.layout,o=e.latestValues;if(t&&n&&r){if(this!==e&&this.layout&&r&&wu(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};var i=_s(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+i;var a=_s(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+a}El(t,n),Qs(t,o),Cs(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}},{key:"registerSharedNode",value:function(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Nl),this.sharedNodes.get(e).add(t);var n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}},{key:"isLead",value:function(){var e=this.getStack();return!e||e.lead===this}},{key:"getLead",value:function(){var e;return this.options.layoutId&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}},{key:"getPrevLead",value:function(){var e;return this.options.layoutId?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}},{key:"getStack",value:function(){var e=this.options.layoutId;if(e)return this.root.sharedNodes.get(e)}},{key:"promote",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.needsReset,n=e.transition,r=e.preserveFollowOpacity,o=this.getStack();o&&o.promote(this,r),t&&(this.projectionDelta=void 0,this.needsReset=!0),n&&this.setOptions({transition:n})}},{key:"relegate",value:function(){var e=this.getStack();return!!e&&e.relegate(this)}},{key:"resetSkewAndRotation",value:function(){var e=this.options.visualElement;if(e){var t=!1,n=e.latestValues;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),t){var r={};n.z&&Yl("z",e,r,this.animationValues);for(var o=0;o<$l.length;o++)Yl("rotate".concat($l[o]),e,r,this.animationValues),Yl("skew".concat($l[o]),e,r,this.animationValues);for(var i in e.render(),r)e.setStaticValue(i,r[i]),this.animationValues&&(this.animationValues[i]=r[i]);e.scheduleRender()}}}},{key:"getProjectionStyles",value:function(e){var t,n;if(this.instance&&!this.isSVG){if(!this.isVisible)return Kl;var r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=gr(null===e||void 0===e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;var i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){var a={};return this.options.layoutId&&(a.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,a.pointerEvents=gr(null===e||void 0===e?void 0:e.pointerEvents)||""),this.hasProjected&&!zs(this.latestValues)&&(a.transform=o?o({},""):"none",this.hasProjected=!1),a}var s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){var r="",o=e.x.translate/t.x,i=e.y.translate/t.y,a=(null===n||void 0===n?void 0:n.z)||0;if((o||i||a)&&(r="translate3d(".concat(o,"px, ").concat(i,"px, ").concat(a,"px) ")),1===t.x&&1===t.y||(r+="scale(".concat(1/t.x,", ").concat(1/t.y,") ")),n){var s=n.transformPerspective,l=n.rotate,u=n.rotateX,c=n.rotateY,d=n.skewX,f=n.skewY;s&&(r="perspective(".concat(s,"px) ").concat(r)),l&&(r+="rotate(".concat(l,"deg) ")),u&&(r+="rotateX(".concat(u,"deg) ")),c&&(r+="rotateY(".concat(c,"deg) ")),d&&(r+="skewX(".concat(d,"deg) ")),f&&(r+="skewY(".concat(f,"deg) "))}var p=e.x.scale*t.x,h=e.y.scale*t.y;return 1===p&&1===h||(r+="scale(".concat(p,", ").concat(h,")")),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));var l=this.projectionDelta,u=l.x,c=l.y;for(var d in r.transformOrigin="".concat(100*u.origin,"% ").concat(100*c.origin,"% 0"),i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0,fn)if(void 0!==s[d]){var f=fn[d],p=f.correct,h=f.applyTo,m="none"===r.transform?s[d]:p(s[d],i);if(h)for(var v=h.length,g=0;g<v;g++)r[h[g]]=m;else r[d]=m}return this.options.layoutId&&(r.pointerEvents=i===this?gr(null===e||void 0===e?void 0:e.pointerEvents)||"":"none"),r}}},{key:"clearSnapshot",value:function(){this.resumeFrom=this.snapshot=void 0}},{key:"resetTree",value:function(){this.root.nodes.forEach((function(e){var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(ou),this.root.sharedNodes.clear()}}]),e}()}function Jl(e){e.updateLayout()}function eu(e){var t,n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){var r=e.layout,o=r.layoutBox,i=r.measuredBox,a=e.options.animationType,s=n.source!==e.layout.source;"size"===a?Bs((function(e){var t=s?n.measuredBox[e]:n.layoutBox[e],r=_s(t);t.min=o[e].min,t.max=t.min+r})):wu(a,n.layoutBox,o)&&Bs((function(t){var r=s?n.measuredBox[t]:n.layoutBox[t],i=_s(o[t]);r.max=r.min+i,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[t].max=e.relativeTarget[t].min+i)}));var l={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Cs(l,o,n.layoutBox);var u={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};s?Cs(u,e.applyTransform(i,!0),n.measuredBox):Cs(u,o,n.layoutBox);var c=!Fl(l),d=!1;if(!e.resumeFrom){var f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){var p=f.snapshot,h=f.layout;if(p&&h){var m={x:{min:0,max:0},y:{min:0,max:0}};js(m,n.layoutBox,p.layoutBox);var v={x:{min:0,max:0},y:{min:0,max:0}};js(v,o,h.layoutBox),Bl(m,v)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=v,e.relativeTargetOrigin=m,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:u,layoutDelta:l,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){var g=e.options.onExitComplete;g&&g()}e.options.transition=void 0}function tu(e){Hl&&Zl.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function nu(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function ru(e){e.clearSnapshot()}function ou(e){e.clearMeasurements()}function iu(e){e.isLayoutDirty=!1}function au(e){var t=e.options.visualElement;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function su(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function lu(e){e.resolveTargetDelta()}function uu(e){e.calcProjection()}function cu(e){e.resetSkewAndRotation()}function du(e){e.removeLeadSnapshot()}function fu(e,t,n){e.translate=ia(t.translate,0,n),e.scale=ia(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function pu(e,t,n,r){e.min=ia(t.min,n.min,r),e.max=ia(t.max,n.max,r)}function hu(e,t,n,r){pu(e.x,t.x,n.x,r),pu(e.y,t.y,n.y,r)}function mu(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}var vu={duration:.45,ease:[.4,0,.1,1]},gu=function(e){return"undefined"!==typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e)},yu=gu("applewebkit/")&&!gu("chrome/")?Math.round:Pr;function bu(e){e.min=yu(e.min),e.max=yu(e.max)}function xu(e){bu(e.x),bu(e.y)}function wu(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Il(t),o=Il(n),i=.2,!(Math.abs(r-o)<=i));var r,o,i}function ku(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}var Su=Ql({attachResizeListener:function(e,t){return zr(e,"resize",t)},measureScroll:function(){return{x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}},checkIsScrollRoot:function(){return!0}}),_u={current:void 0},Eu=Ql({measureScroll:function(e){return{x:e.scrollLeft,y:e.scrollTop}},defaultParent:function(){if(!_u.current){var e=new Su({});e.mount(window),e.setOptions({layoutScroll:!0}),_u.current=e}return _u.current},resetTransform:function(e,t){e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:function(e){return Boolean("fixed"===window.getComputedStyle(e).position)}}),Cu={pan:{Feature:sl},drag:{Feature:il,ProjectionNode:Eu,MeasureLayout:pl}},Pu={current:null},Au={current:!1};var Tu=new WeakMap,ju=[].concat((0,pt.Z)(Xo),[ci,yi]),Ru=["willChange"],Ou=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Fu=Xt.length,Mu=function(){function e(t){var n=this,r=t.parent,o=t.props,i=t.presenceContext,a=t.reducedMotionConfig,s=t.blockInitialAnimation,l=t.visualState,u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,Z.Z)(this,e),this.applyWillChange=!1,this.resolveKeyframes=function(e,t,r,o){return new n.KeyframeResolver(e,t,r,o,n)},this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ni,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=function(){return n.notify("Update",n.latestValues)},this.render=function(){n.isRenderScheduled=!1,n.current&&(n.triggerBuild(),n.renderInstance(n.current,n.renderState,n.props.style,n.projection))},this.isRenderScheduled=!1,this.scheduleRender=function(){n.isRenderScheduled||(n.isRenderScheduled=!0,Tr.render(n.render,!1,!0))};var c=l.latestValues,d=l.renderState;this.latestValues=c,this.baseTarget=be({},c),this.initialValues=o.initial?be({},c):{},this.renderState=d,this.parent=r,this.props=o,this.presenceContext=i,this.depth=r?r.depth+1:0,this.reducedMotionConfig=a,this.options=u,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=Yt(o),this.isVariantNode=qt(o),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(r&&r.current);var f=this.scrapeMotionValuesFromProps(o,{},this),p=(f.willChange,Jn(f,Ru));for(var h in p){var m=p[h];void 0!==c[h]&&vn(m)&&m.set(c[h],!1)}}return(0,H.Z)(e,[{key:"scrapeMotionValuesFromProps",value:function(e,t,n){return{}}},{key:"mount",value:function(e){var t=this;this.current=e,Tu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((function(e,n){return t.bindToMotionValue(n,e)})),Au.current||function(){if(Au.current=!0,At)if(window.matchMedia){var e=window.matchMedia("(prefers-reduced-motion)"),t=function(){return Pu.current=e.matches};e.addListener(t),t()}else Pu.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Pu.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}},{key:"unmount",value:function(){for(var e in Tu.delete(this.current),this.projection&&this.projection.unmount(),jr(this.notifyUpdate),jr(this.render),this.valueSubscriptions.forEach((function(e){return e()})),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this),this.events)this.events[e].clear();for(var t in this.features){var n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}},{key:"bindToMotionValue",value:function(e,t){var n=this,r=hn.has(e),o=t.on("change",(function(t){n.latestValues[e]=t,n.props.onUpdate&&Tr.preRender(n.notifyUpdate),r&&n.projection&&(n.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(function(){o(),i(),t.owner&&t.stop()}))}},{key:"sortNodePosition",value:function(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}},{key:"updateFeatures",value:function(){var e="animation";for(e in tn){var t=tn[e];if(t){var n=t.isEnabled,r=t.Feature;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){var o=this.features[e];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}}},{key:"triggerBuild",value:function(){this.build(this.renderState,this.latestValues,this.props)}},{key:"measureViewportBox",value:function(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}},{key:"getStaticValue",value:function(e){return this.latestValues[e]}},{key:"setStaticValue",value:function(e,t){this.latestValues[e]=t}},{key:"update",value:function(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(var n=0;n<Ou.length;n++){var r=Ou[n];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);var o=e["on"+r];o&&(this.propEventSubscriptions[r]=this.on(r,o))}this.prevMotionValues=function(e,t,n){for(var r in t){var o=t[r],i=n[r];if(vn(o))e.addValue(r,o);else if(vn(i))e.addValue(r,Ga(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){var a=e.getValue(r);!0===a.liveStyle?a.jump(o):a.hasAnimated||a.set(o)}else{var s=e.getStaticValue(r);e.addValue(r,Ga(void 0!==s?s:o,{owner:e}))}}for(var l in n)void 0===t[l]&&e.removeValue(l);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}},{key:"getProps",value:function(){return this.props}},{key:"getVariant",value:function(e){return this.props.variants?this.props.variants[e]:void 0}},{key:"getDefaultTransition",value:function(){return this.props.transition}},{key:"getTransformPagePoint",value:function(){return this.props.transformPagePoint}},{key:"getClosestVariantNode",value:function(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}},{key:"getVariantContext",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){var t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}for(var n={},r=0;r<Fu;r++){var o=Xt[r],i=this.props[o];(Ht(i)||!1===i)&&(n[o]=i)}return n}},{key:"addVariantChild",value:function(e){var t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),function(){return t.variantChildren.delete(e)}}},{key:"addValue",value:function(e,t){var n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}},{key:"removeValue",value:function(e){this.values.delete(e);var t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}},{key:"hasValue",value:function(e){return this.values.has(e)}},{key:"getValue",value:function(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];var n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Ga(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}},{key:"readValue",value:function(e,t){var n,r,o=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return void 0!==o&&null!==o&&("string"===typeof o&&(Bo(o)||Mo(o))?o=parseFloat(o):(r=o,!ju.find(Ko(r))&&yi.test(t)&&(o=Ei(e,t))),this.setBaseTarget(e,vn(o)?o.get():o)),vn(o)?o.get():o}},{key:"setBaseTarget",value:function(e,t){this.baseTarget[e]=t}},{key:"getBaseTarget",value:function(e){var t,n,r=this.props.initial;if("string"===typeof r||"object"===typeof r){var o=mr(this.props,r,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(n=o[e])}if(r&&void 0!==n)return n;var i=this.getBaseTargetFromProps(this.props,e);return void 0===i||vn(i)?void 0!==this.initialValues[e]&&void 0===n?void 0:this.baseTarget[e]:i}},{key:"on",value:function(e,t){return this.events[e]||(this.events[e]=new Na),this.events[e].add(t)}},{key:"notify",value:function(e){if(this.events[e]){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];(t=this.events[e]).notify.apply(t,r)}}}]),e}(),Du=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).KeyframeResolver=Pi,e}return(0,H.Z)(n,[{key:"sortInstanceNodePosition",value:function(e,t){return 2&e.compareDocumentPosition(t)?1:-1}},{key:"getBaseTargetFromProps",value:function(e,t){return e.style?e.style[t]:void 0}},{key:"removeValueFromRenderState",value:function(e,t){var n=t.vars,r=t.style;delete n[e],delete r[e]}}]),n}(Mu);var Lu=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).type="html",e.applyWillChange=!0,e.renderInstance=ur,e}return(0,H.Z)(n,[{key:"readValueFromInstance",value:function(e,t){if(hn.has(t)){var n=_i(t);return n&&n.default||0}var r,o=(r=e,window.getComputedStyle(r)),i=(Vn(t)?o.getPropertyValue(t):o[t])||0;return"string"===typeof i?i.trim():i}},{key:"measureInstanceViewportBox",value:function(e,t){return Js(e,t.transformPagePoint)}},{key:"build",value:function(e,t,n){Gn(e,t,n.transformTemplate)}},{key:"scrapeMotionValuesFromProps",value:function(e,t,n){return fr(e,t,n)}},{key:"handleChildMotionValue",value:function(){var e=this;this.childSubscription&&(this.childSubscription(),delete this.childSubscription);var t=this.props.children;vn(t)&&(this.childSubscription=t.on("change",(function(t){e.current&&(e.current.textContent="".concat(t))})))}}]),n}(Du),Bu=function(e){Lr(n,e);var t=Nr(n);function n(){var e;return(0,Z.Z)(this,n),(e=t.apply(this,arguments)).type="svg",e.isSVGTag=!1,e.measureInstanceViewportBox=Ls,e}return(0,H.Z)(n,[{key:"getBaseTargetFromProps",value:function(e,t){return e[t]}},{key:"readValueFromInstance",value:function(e,t){if(hn.has(t)){var n=_i(t);return n&&n.default||0}return t=cr.has(t)?t:Rt(t),e.getAttribute(t)}},{key:"scrapeMotionValuesFromProps",value:function(e,t,n){return pr(e,t,n)}},{key:"build",value:function(e,t,n){or(e,t,this.isSVGTag,n.transformTemplate)}},{key:"renderInstance",value:function(e,t,n,r){dr(e,t,0,r)}},{key:"mount",value:function(e){this.isSVGTag=ar(e.tagName),Fo(Br(n.prototype),"mount",this).call(this,e)}}]),n}(Du),Iu=function(e,n){return dn(e)?new Bu(n):new Lu(n,{allowProjection:e!==t.Fragment})},Vu={layout:{ProjectionNode:Eu,MeasureLayout:pl}},Nu=be(be(be(be({},fs),ho),Cu),Vu),zu=un((function(e,t){return function(e,t,n,r){var o=t.forwardMotionProps,i=void 0!==o&&o;return be(be({},dn(e)?Fr:Mr),{},{preloadedFeatures:n,useRender:lr(i),createVisualElement:r,Component:e})}(e,t,Nu,Iu)}));var Uu={all:"All tech specs",creativity:"Creativity",performance:"Performance",portability:"Portability",students:"Students",gaming:"Gaming",productivity:"Productivity",entertainment:"Entertainment",study:"Study"},Gu={display:{id:"display",name:"Display",categories:["all","creativity","portability","students"]},connectivity:{id:"connectivity",name:"Connectivity",categories:["all","portability"],sort:function(e,t){var n=e.split("/").map((function(e){return e.trim()})),r=t.split("/").map((function(e){return e.trim()})),o=n.length;return r.length-o}},touch:{id:"touch",name:"Touch Screen",categories:["all","creativity","portability","students"],sort:function(e,t){return"Yes"===e&&"No"===t?-1:"No"===e&&"Yes"===t?1:0}},graphics:{id:"graphics",name:"Graphics",categories:["all","creativity","performance"],sort:function(e,t){return e.includes("Iris Xe")&&t.includes("Iris Xe")?0:e.includes("Iris Xe")?-1:t.includes("Iris Xe")?1:0}},cpu:{id:"cpu",name:"CPU",categories:["all","creativity","performance"],sort:function(e,t){if("Intel Celeron"===e)return 1;if("Intel Celeron"===t)return-1;var n=e.replace("Intel 12th Gen","").split("/").map((function(e){return parseInt(e.trim().replace("i",""))})),r=t.replace("Intel 12th Gen","").split("/").map((function(e){return parseInt(e.trim().replace("i",""))})),o=n.reduce((function(e,t){return e>t?e:t}),0),i=r.reduce((function(e,t){return e>t?e:t}),0);return i-o}},memory:{id:"memory",name:"Memory",categories:["all","creativity","performance","students"],sort:function(e,t){var n=e.split("/").map((function(e){return parseInt(e)})),r=t.split("/").map((function(e){return parseInt(e)})),o=n.reduce((function(e,t){return e>t?e:t}),0),i=r.reduce((function(e,t){return e>t?e:t}),0);return i-o}},storage:{id:"storage",name:"Storage",categories:["all","creativity","performance","students"],sort:function(e,t){var n=e.split("/").map((function(e){return parseInt(e)})),r=t.split("/").map((function(e){return parseInt(e)})),o=n.reduce((function(e,t){return e>t?e:t}),0),i=r.reduce((function(e,t){return e>t?e:t}),0);return i-o}},os:{id:"os",name:"Operating System",categories:["all"]},color:{id:"color",name:"Colour",categories:["all"]},weight:{id:"weight",name:"Weight",categories:["all","portability","students"],sort:function(e,t){return parseFloat(e.split(" ")[0])-parseFloat(t.split(" ")[0])}},material:{id:"material",name:"Material",categories:["all"]},battery:{id:"battery",name:"Battery",categories:["all","portability","performance","students"],sort:function(e,t){var n=parseInt(e.split(" ")[0]);return parseInt(t.split(" ")[0])-n}},dimensions:{id:"dimensions",name:"Dimensions",categories:["all","portability"]}},Wu=(0,t.createContext)(null);function Zu(){var e=function(){var e=(0,t.useRef)(!1);return Tt((function(){return e.current=!0,function(){e.current=!1}}),[]),e}(),n=(0,t.useState)(0),r=(0,P.Z)(n,2),o=r[0],i=r[1],a=(0,t.useCallback)((function(){e.current&&i(o+1)}),[o]);return[(0,t.useCallback)((function(){return Tr.postRender(a)}),[a]),o]}var Hu=function(e){return!e.isLayoutDirty&&e.willUpdate(!1)};function $u(){var e=new Set,t=new WeakMap,n=function(){return e.forEach(Hu)};return{add:function(r){e.add(r),t.set(r,r.addEventListener("willUpdate",n))},remove:function(r){e.delete(r);var o=t.get(r);o&&(o(),t.delete(r)),n()},dirty:n}}var Ku,Xu,Yu=function(e){return!0===e},qu=function(e){var n=e.children,r=e.id,o=e.inherit,i=void 0===o||o,a=(0,t.useContext)(on),s=(0,t.useContext)(Wu),l=Zu(),u=(0,P.Z)(l,2),c=u[0],d=u[1],f=(0,t.useRef)(null),p=a.id||s;null===f.current&&(function(e){return Yu(!0===e)||"id"===e}(i)&&p&&(r=r?p+"-"+r:p),f.current={id:r,group:Yu(i)&&a.group||$u()});var h=(0,t.useMemo)((function(){return be(be({},f.current),{},{forceRender:c})}),[d]);return(0,E.jsx)(on.Provider,{value:h,children:n})},Qu=function(e){var t=e.device,n=e.sku,r=e.handleSelectSku,i=e.active,a=(e.i,e.field,e.style),s=(e.exclusiveFlag,e.theme,(0,o.dD)());return(0,E.jsx)("div",be(be({style:be({display:"flex",flexDirection:"column",position:"relative"},a),onClick:function(){r(n)}},(0,o.rE)("colorSelect:".concat(t.name,":").concat(t.color.colorName))),{},{children:(0,E.jsx)("div",{style:{width:s?"6vmin":"min(27px, 3vw)",height:s?"6vmin":"min(27px, 3vw)",borderRadius:"50%",borderColor:i?_t.primary:"#00000000",borderStyle:"solid",borderWidth:"2px",margin:0,position:"relative",cursor:"pointer"},children:(0,E.jsx)("div",{style:{width:"75%",height:"75%",borderRadius:"50%",position:"absolute",boxSizing:"border-box",top:"50%",left:"50%",backgroundColor:t.color.formattedColor,transition:"all 0.3s ease-in-out",transform:"translate3d(-50%,-50%,0)"}})})}),"".concat(t.color.htmlColor,"_").concat(t.name,"_").concat(s))},Ju=(i.default.div(Ku||(Ku=a(["\n border-radius: 20px;\n padding: 0.3em 0.6em;\n border: 1px "," solid;\n transition: all 0.2s ease-in-out;\n cursor: pointer;\n"])),(function(e){return e.active?"#000":"transparent"})),function(){function e(t){(0,Z.Z)(this,e),this.colorName=void 0,this.formattedColor=void 0,this.htmlColor=void 0,this.exclusive=!1,this.order=void 0,this.colorName="Light Pink"===t.colorName?"Pink":t.colorName,this.formattedColor=t.formattedColor,this.htmlColor=t.htmlColor,this.exclusive=t.exclusive||!1,this.order=t.order}return(0,H.Z)(e,[{key:"toString",value:function(){return this.colorName}},{key:"equals",value:function(e){return this.colorName===e.colorName&&(this.formattedColor===e.formattedColor&&this.htmlColor===e.htmlColor)}}]),e}()),ec={currencyIso:"GBP",formattedValue:"Loading...",value:"0"},tc={isValueRounded:!1,stockLevel:0},nc={altText:"Galaxy S22+",format:"TokoThumb",galleryIndex:0,imageType:"GALLERY",url:""},rc=(0,H.Z)((function e(t){(0,Z.Z)(this,e),this.currencyIso=void 0,this.formattedValue=void 0,this.priceType=void 0,this.value=void 0,this.currencyIso=t.currencyIso,this.formattedValue=t.formattedValue,this.priceType=t.priceType,this.value=parseFloat(t.value)})),oc=function(){function e(t){var n,r,o,i,a,s=this,l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"api";((0,Z.Z)(this,e),this._name=void 0,this._family=void 0,this._picture=void 0,this._price=void 0,this._color=void 0,this._sku=void 0,this._size=void 0,this._stock=void 0,this._tradeIn=!1,this._upgrade=!1,this._services=[],this._tag=void 0,this._link="",this._gallery=[],"init"===l)?(this._sku=t._sku,this._name=t._name,this._picture=nc,this._price=new rc(ec),this._color=new Ju(t._color),this._size=t._size,this._stock=tc,this._family=t._family,this._tag=t._tag):(this._sku=t.code||t.id||t.modelCode||t.sku,this._name=t.name||t.baseProductName,this._link=t.externalUrl,this._picture=t.picture||(null===t||void 0===t?void 0:t.galleryImagesV2)&&((null===t||void 0===t||null===(n=t.galleryImagesV2[0])||void 0===n||null===(r=n.images)||void 0===r?void 0:r.product)||(null===t||void 0===t||null===(o=t.galleryImagesV2[0])||void 0===o||null===(i=o.images[2])||void 0===i?void 0:i.value))||{},this._price=new rc(t.price||t.priceData),this._color=new Ju(t.color),this._size=t.size,this._stock=t.stock,this._family=null===(a=this._sku)||void 0===a?void 0:a.slice(0,7),this._gallery=t.gallery,t.addedServices&&t.addedServices.length>0&&t.addedServices.forEach((function(e){switch(e){case"UPGRADE_ENROLLMENT":s._upgrade=!0;break;case"TRADE_IN":s._tradeIn=!0}})))}return(0,H.Z)(e,[{key:"name",get:function(){return this._name}},{key:"family",get:function(){return this._family}},{key:"picture",get:function(){return this._picture},set:function(e){this._picture=e}},{key:"price",get:function(){return this._price},set:function(e){this._price=new rc(e)}},{key:"color",get:function(){return this._color}},{key:"sku",get:function(){return this._sku}},{key:"size",get:function(){return this._size},set:function(e){this._size=e}},{key:"stock",get:function(){return this._stock},set:function(e){this._stock=e}},{key:"tradeIn",get:function(){return this._tradeIn}},{key:"upgrade",get:function(){return this._upgrade}},{key:"services",get:function(){return this._services},set:function(e){this._services=e}},{key:"tag",get:function(){return this._tag}},{key:"link",get:function(){return this._link},set:function(e){this._link=e}},{key:"gallery",get:function(){return this._gallery},set:function(e){this._gallery=e}},{key:"diff",value:function(e){var t=0;return this.color.formattedColor!==e.color.formattedColor&&t++,t}},{key:"toJson",value:function(){return JSON.stringify(this)}}]),e}(),ic=oc,ac=JSON.parse('{"SM-F711BLVBEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Lavender","formattedColor":"#bfb1d2","htmlColor":"bfb1d2","order":3},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BLVBEUA","_size":"128 GB"},"SM-F711BLVFEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Lavender","formattedColor":"#bfb1d2","htmlColor":"bfb1d2","order":3},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BLVFEUA","_size":"256 GB"},"SM-F711BZEFEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Cream","formattedColor":"#e3deca","htmlColor":"e3deca","order":0},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZEFEUA","_size":"256 GB"},"SM-F711BZGBEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Green","formattedColor":"#424f50","htmlColor":"424f50","order":2},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZGBEUA","_size":"128 GB"},"SM-F711BZGFEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Green","formattedColor":"#424f50","htmlColor":"424f50","order":2},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZGFEUA","_size":"256 GB"},"SM-F711BZKBEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"2d2926","order":1},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZKBEUA","_size":"128 GB"},"SM-F711BZKFEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"2d2926","order":1},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZKFEUA","_size":"256 GB"},"SM-F711BZEBEUA":{"_name":"Galaxy Z Flip3 5G ","_color":{"colorName":"Cream","formattedColor":"#e3deca","htmlColor":"e3deca","order":0},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F711BZEBEUA","_size":"128 GB"}}'),sc=JSON.parse('{"SM-F721BLVGEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Bora Purple","formattedColor":"#b2a1cd","htmlColor":"#b2a1cd","order":1},"_sku":"SM-F721BLVGEUB","_size":"128 GB"},"SM-F721BLVHEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Bora Purple","formattedColor":"#b2a1cd","htmlColor":"#b2a1cd","order":1},"_sku":"SM-F721BLVHEUB","_size":"256 GB"},"SM-F721BZAGEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Graphite","formattedColor":"#404145","htmlColor":"#404145","order":1},"_sku":"SM-F721BZAGEUB","_size":"128 GB"},"SM-F721BZAHEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Graphite","formattedColor":"#404145","htmlColor":"#404145","order":1},"_sku":"SM-F721BZAHEUB","_size":"256 GB"},"SM-F721BZAPEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Graphite","formattedColor":"#404145","htmlColor":"#404145","order":1},"_sku":"SM-F721BZAPEUB","_size":"512 GB"},"SM-F721BLBGEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Blue","formattedColor":"#b6c0d6","htmlColor":"#b6c0d6","order":1},"_sku":"SM-F721BLBGEUB","_size":"128 GB"},"SM-F721BLBHEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Blue","formattedColor":"#b6c0d6","htmlColor":"#b6c0d6","order":1},"_sku":"SM-F721BLBHEUB","_size":"256 GB"},"SM-F721BZDGEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Pink Gold","formattedColor":"#e6d2c9","htmlColor":"#e6d2c9","order":1},"_sku":"SM-F721BZDGEUB","_size":"128 GB"},"SM-F721BZDHEUB":{"_name":"Galaxy Z Flip4","_pdp":"/uk/smartphones/galaxy-z-flip4/","_color":{"colorName":"Pink Gold","formattedColor":"#e6d2c9","htmlColor":"#e6d2c9","order":1},"_sku":"SM-F721BZDHEUB","_size":"256 GB"}}');JSON.parse('{"SM-F926BZKDEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"2d2926","order":0},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZKDEUA","_size":"256 GB"},"SM-F926BZGDEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Green","formattedColor":"#384a46","htmlColor":"384a46","order":1},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZGDEUA","_size":"256 GB"},"SM-F926BZGGEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Green","formattedColor":"#384a46","htmlColor":"384a46","order":1},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZGGEUA","_size":"512 GB"},"SM-F926BZKGEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"2d2926","order":0},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZKGEUA","_size":"512 GB"},"SM-F926BZSDEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Silver","formattedColor":"#cac6c4","htmlColor":"cac6c4","order":2},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZSDEUA","_size":"256 GB"},"SM-F926BZSGEUA":{"_name":"Galaxy Z Fold3 5G ","_color":{"colorName":"Phantom Silver","formattedColor":"#cac6c4","htmlColor":"cac6c4","order":2},"_tag":{"color":"#068590","tag":"Free Galaxy Buds Pro"},"_sku":"SM-F926BZSGEUA","_size":"512 GB"}}'),JSON.parse('{"SM-F936BZABEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Greygreen","formattedColor":"#4e5a61","htmlColor":"#4e5a61","order":1},"_sku":"SM-F936BZABEUB","_size":"256 GB"},"SM-F936BZACEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Greygreen","formattedColor":"#4e5a61","htmlColor":"#4e5a61","order":1},"_sku":"SM-F936BZACEUB","_size":"512 GB"},"SM-F936BZANEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Greygreen","formattedColor":"#4e5a61","htmlColor":"#4e5a61","order":1},"_sku":"SM-F936BZANEUB","_size":"1 TB"},"SM-F936BZKBEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"#2d2926","order":1},"_sku":"SM-F936BZKBEUB","_size":"256 GB"},"SM-F936BZKCEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"#2d2926","order":1},"_sku":"SM-F936BZKCEUB","_size":"512 GB"},"SM-F936BZKNEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Phantom Black","formattedColor":"#2d2926","htmlColor":"#2d2926","order":1},"_sku":"SM-F936BZKNEUB","_size":"1 TB"},"SM-F936BZEBEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Beige","formattedColor":"#d6cdc1","htmlColor":"#d6cdc1","order":1},"_sku":"SM-F936BZEBEUB","_size":"256 GB"},"SM-F936BZECEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Beige","formattedColor":"#d6cdc1","htmlColor":"#d6cdc1","order":1},"_sku":"SM-F936BZECEUB","_size":"512 GB"},"SM-F936BZENEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Beige","formattedColor":"#d6cdc1","htmlColor":"#d6cdc1","order":1},"_sku":"SM-F936BZENEUB","_size":"1 TB"},"SM-F936BDRBEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Burgundy","formattedColor":"#654d57","htmlColor":"#654d57","order":1,"exclusive":true},"_sku":"SM-F936BDRBEUB","_size":"256 GB"},"SM-F936BDRCEUB":{"_name":"Galaxy Z Fold4 ","_pdp":"/uk/smartphones/galaxy-z-fold4/","_color":{"colorName":"Burgundy","formattedColor":"#654d57","htmlColor":"#654d57","order":1,"exclusive":true},"_sku":"SM-F936BDRCEUB","_size":"512 GB"}}');!function(e){e.productInfo="https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/products/",e.offers="https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/products/",e.tradeIn="https://p1.ecom.samsung.com/v1/exchange/api/gbr/trade-in/sku-devices/uk/",e.addToCart="https://p1-smn2-api-cdn.shop.samsung.com/tokocommercewebservices/v2/uk/addToCart/multi/?fields=BASIC",e.cart="https://shop.samsung.com/uk/cart"}(Xu||(Xu={}));var lc=function(){return lc=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},lc.apply(this,arguments)};var uc=function(e){var n=e.animate,r=e.animateBegin,o=e.backgroundColor,i=e.backgroundOpacity,a=e.baseUrl,s=e.children,l=e.foregroundColor,u=e.foregroundOpacity,c=e.gradientRatio,d=e.gradientDirection,f=e.uniqueKey,p=e.interval,h=e.rtl,m=e.speed,v=e.style,g=e.title,y=e.beforeMask,b=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"===typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n}(e,["animate","animateBegin","backgroundColor","backgroundOpacity","baseUrl","children","foregroundColor","foregroundOpacity","gradientRatio","gradientDirection","uniqueKey","interval","rtl","speed","style","title","beforeMask"]),x=f||Math.random().toString(36).substring(6),w=x+"-diff",k=x+"-animated-diff",S=x+"-aria",_=h?{transform:"scaleX(-1)"}:null,E="0; "+p+"; 1",C=m+"s",P="top-bottom"===d?"rotate(90)":void 0;return(0,t.createElement)("svg",lc({"aria-labelledby":S,role:"img",style:lc(lc({},v),_)},b),g?(0,t.createElement)("title",{id:S},g):null,y&&(0,t.isValidElement)(y)?y:null,(0,t.createElement)("rect",{role:"presentation",x:"0",y:"0",width:"100%",height:"100%",clipPath:"url("+a+"#"+w+")",style:{fill:"url("+a+"#"+k+")"}}),(0,t.createElement)("defs",null,(0,t.createElement)("clipPath",{id:w},s),(0,t.createElement)("linearGradient",{id:k,gradientTransform:P},(0,t.createElement)("stop",{offset:"0%",stopColor:o,stopOpacity:i},n&&(0,t.createElement)("animate",{attributeName:"offset",values:-c+"; "+-c+"; 1",keyTimes:E,dur:C,repeatCount:"indefinite",begin:r})),(0,t.createElement)("stop",{offset:"50%",stopColor:l,stopOpacity:u},n&&(0,t.createElement)("animate",{attributeName:"offset",values:-c/2+"; "+-c/2+"; "+(1+c/2),keyTimes:E,dur:C,repeatCount:"indefinite",begin:r})),(0,t.createElement)("stop",{offset:"100%",stopColor:o,stopOpacity:i},n&&(0,t.createElement)("animate",{attributeName:"offset",values:"0; 0; "+(1+c),keyTimes:E,dur:C,repeatCount:"indefinite",begin:r})))))};uc.defaultProps={animate:!0,backgroundColor:"#f5f6f7",backgroundOpacity:1,baseUrl:"",foregroundColor:"#eee",foregroundOpacity:1,gradientRatio:2,gradientDirection:"left-right",id:null,interval:.25,rtl:!1,speed:1.2,style:{},title:"Loading...",beforeMask:null};var cc,dc,fc,pc,hc,mc,vc=function(e){return e.children?(0,t.createElement)(uc,lc({},e)):(0,t.createElement)(gc,lc({},e))},gc=function(e){return(0,t.createElement)(vc,lc({viewBox:"0 0 476 124"},e),(0,t.createElement)("rect",{x:"48",y:"8",width:"88",height:"6",rx:"3"}),(0,t.createElement)("rect",{x:"48",y:"26",width:"52",height:"6",rx:"3"}),(0,t.createElement)("rect",{x:"0",y:"56",width:"410",height:"6",rx:"3"}),(0,t.createElement)("rect",{x:"0",y:"72",width:"380",height:"6",rx:"3"}),(0,t.createElement)("rect",{x:"0",y:"88",width:"178",height:"6",rx:"3"}),(0,t.createElement)("circle",{cx:"20",cy:"20",r:"20"}))},yc=vc,bc=function(e){var n,r,i,a,s,l,u,c,d,f,p,h,m=e.skus,v=e.buyNow,g=e.learnMore,y=(e.defaultImage,function(e){var n=e[0],r=(0,t.useState)({}),o=(0,P.Z)(r,2),i=o[0],a=o[1],s=(0,t.useState)(),l=(0,P.Z)(s,2),u=l[0],c=(l[1],(0,t.useState)(!1)),d=(0,P.Z)(c,2),f=d[0],p=d[1];return(0,t.useEffect)((function(){p(!1),window.configuratorData||(window.configuratorData={}),window.configuratorData[n]?(a(window.configuratorData[n]),p(!0)):fetch("".concat(Xu.productInfo,"?fields=FULL&productCodes=").concat(e.join(","))).then((function(e){return e.json()})).then((function(e){var t={};e.forEach((function(e){if(e.allPrices){e.price=e.allPrices.filter((function(e){var t,n,r=e,o=Date.now(),i=null!==(t=null===r||void 0===r?void 0:r.startTime)&&void 0!==t?t:0,a=null!==(n=null===r||void 0===r?void 0:r.endTime)&&void 0!==n?n:Number.MAX_SAFE_INTEGER;return i<o&&a>o})).reduce((function(e,t){var n=e,r=t;return n.value<r.value?n:r}),{currencyIso:"GBP",formattedValue:"XX.XX",minQuantity:1,priceType:void 0,value:Number.MAX_SAFE_INTEGER}),t[e.code]=new ic(be(be({},e),{},{sku:e.code})),t[e.code].stock=e.stock,t[e.code].link=e.externalUrl;var n=e.variantOptions.find((function(t){return t.code===e.code})).galleryImagesV2,r=[];n&&n.forEach((function(e){r.push({url:e.images.TokoThumb.url,position:e.images.TokoThumb.galleryIndex})})),0!==r.length&&(r=r.sort((function(e,t){return e.position-t.position}))),t[e.code].gallery=r,t[e.code].picture=Object.entries(e.images).filter((function(e){var t=(0,P.Z)(e,2);return t[0],"TokoThumb"===t[1].format}))[0][1],t[e.code].size=""}})),Object.entries(t).forEach((function(e){var n=(0,P.Z)(e,2),r=n[0];0===n[1].price.value&&(t[r].stock.stockLevel=-1)})),a(t),p(!0),window.configuratorData[n]=t}))}),[n]),{data:i,error:u,finished:f}}(m)),b=y.data,x=(y.error,y.finished,(0,t.useState)(m[0])),w=(0,P.Z)(x,2),k=w[0],S=w[1],_=Y(k),C=(0,P.Z)(_,2),A=C[0].overall,T=(C[1],function(e){var n=e.devices,r=e.selectedSku,o=(0,t.useState)([]),i=(0,P.Z)(o,2),a=i[0],s=i[1],l=(0,t.useState)([]),u=(0,P.Z)(l,2),c=u[0],d=u[1],f=(0,t.useState)([]),p=(0,P.Z)(f,2),h=p[0],m=p[1];return(0,t.useEffect)((function(){if(n&&n[r]){var e=[],t=[];Object.entries(n).forEach((function(o){var i=(0,P.Z)(o,2),a=i[0],s=i[1];n[r].diff(s)<2&&(s.color.exclusive?e.push(a):t.push(a))})),m(t),d(e),s([].concat(t,e))}}),[n,r]),[a,c,h]}({devices:b,selectedSku:k})),j=(0,P.Z)(T,2),R=j[0],O=(j[1],(0,o.dD)()),F=function(e){var n=e.devices,r=e.selectedSku,o=e.availableSkus,i=e.field,a=e.handleSelectSku,s=e.element,l=e.style,u=e.isMobile,c=(e.exclusiveFlag,e.finished),d=e.theme,f=void 0===d?"light":d,p=(0,t.useState)([]),h=(0,P.Z)(p,2),m=h[0],v=h[1],g=s;return(0,t.useEffect)((function(){if(n&&n[r]){var e=o.filter((function(e){return!!n[e]&&(e===r||n[r][i]!==n[e][i]&&("color"!==i||!n[r].color.equals(n[e].color)))})).sort((function(e,t){if("size"===i){var r=parseInt(n[e].size.replace(/D*/g,"")),o=parseInt(n[t].size.replace(/D*/g,""));return n[e].size.includes("TB")&&(r*=1024),n[t].size.includes("TB")&&(o*=1024),r-o}return"color"===i?n[e].color.order-n[t].color.order:1})).map((function(e,t){var o;return(0,E.jsx)(g,{i:t,handleSelectSku:a,device:n[e],sku:e,active:e===r,field:i,style:l,isMobile:u,theme:f},"".concat(null===(o=n[e][i])||void 0===o?void 0:o.toString(),"_").concat(c?1:0))}));v(e)}}),[o,n]),m}({devices:b,selectedSku:k,availableSkus:R,field:"color",handleSelectSku:function(e){S(e)},element:Qu,theme:"light"}),M=(0,t.useState)(!1),D=(0,P.Z)(M,2),L=D[0],I=D[1],V=(0,t.useState)(0),N=(0,P.Z)(V,2),z=N[0],U=N[1];return(0,t.useEffect)((function(){var e;return L&&(e=window.setInterval((function(){var e;U((z+1)%((null===(e=b[k].gallery)||void 0===e?void 0:e.length)||1))}),700)),function(){e&&window.clearInterval(e)}}),[L,z]),(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(o.W2,{style:{margin:O?"0em 0":"0",height:"100%",position:"relative",padding:"0 0 0 0",width:"100%",justifyContent:"space-between"},children:[b&&(0,E.jsx)("div",{style:{maxHeight:"222px",width:O?"80%":"min(100%, 15.42vw)",aspectRatio:"1 / 1",backgroundImage:"url(".concat((null===(n=b[k])||void 0===n?void 0:n.picture.url.replace("$THUB_SHOP_S$","").replace("$ORIGIN_PNG$",""))+"$300_200_PNG$",")"),backgroundSize:"contain",backgroundPosition:"center",backgroundRepeat:"no-repeat",WebkitBackgroundSize:"contain",backgroundAttachment:"scroll",overflow:"visible"},onMouseEnter:function(){I(!0)},onMouseLeave:function(){I(!1),U(0)},children:!(null!==(r=b[k])&&void 0!==r&&r.picture.url)&&(0,E.jsx)(yc,{height:"222",width:"200",viewBox:"0 0 200 222",style:{maxWidth:"100%"},children:(0,E.jsx)("rect",{x:"0",y:"0",rx:"15",ry:"15",width:"200",height:"222"})})}),(0,E.jsxs)(o.W2,{style:{width:"100%",padding:"0",justifyContent:O?"flex-start":"space-between",flexGrow:1},children:[(0,E.jsxs)("div",{style:{width:"100%",padding:"0 min(0.34vw, 5px)",display:"flex",flexDirection:"column",justifyContent:"center",alignItems:"center"},children:[b&&(null===(i=b[k])||void 0===i||null===(a=i.price)||void 0===a?void 0:a.priceType)&&(0,E.jsx)(o.W2,{row:!0,style:{justifyContent:"center",alignItems:"center",width:"100%",maxWidth:"190px",padding:"0",margin:O?"3vw 0 5vw":"0 auto 0.5em",gap:"10px"},children:(0,E.jsxs)(o.xv,{children:[(0,E.jsx)("b",{children:"Colour"}),": ",null===(s=b[k])||void 0===s?void 0:s.color.colorName]})}),b&&(0,E.jsx)(o.W2,{row:!0,style:{justifyContent:"center",alignItems:"center",width:"100%",maxWidth:"190px",padding:"0",margin:O?"3vw 0 5vw":"0 0 min(1.11vw, 16px) 0",gap:"10px"},children:(0,E.jsx)(qu,{children:F})}),(0,E.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",height:O?"":"min(3.33vw, 48px)",margin:O?"":"1em auto ",paddingBottom:"1em",width:"100%",alignItems:"center"},children:[b&&(null===(l=b[k])||void 0===l||null===(u=l.price)||void 0===u?void 0:u.priceType)&&"Loading..."!==(null===(c=b[k])||void 0===c||null===(d=c.price)||void 0===d?void 0:d.formattedValue)&&(0,E.jsxs)(o.xv,{size:O?25:22,weight:"bold",align:"center",children:["From"," ",b[k]&&(null===(f=b[k].price)||void 0===f?void 0:f.formattedValue)]}),b&&b[k]&&A&&(0,E.jsxs)(o.xv,{size:O?24:15,align:"center",style:{marginTop:"0.5em"},children:["Or ",Q(A.periodicValue),"/",A.periodLabelTrunc,O&&(0,E.jsx)("br",{})," for ",A.code," ",A.periodLabel]}),b&&"outOfStock"===(null===(p=b[k])||void 0===p?void 0:p.stock.stockLevelStatus)&&(0,E.jsx)(o.xv,{style:{color:"#bdbdb"},size:O?22:16,weight:"bold",align:"center",children:"This device is currently out of stock"})]})]}),b&&!O&&(0,E.jsxs)(o.W2,{style:{justifyContent:"center",width:"100%",padding:"0",margin:"0 auto ",alignSelf:"center",gap:"1em"},row:!0,children:[b&&!(null!==(h=b[k])&&void 0!==h&&h.price.priceType)&&(0,E.jsx)(o.ns,{onClick:function(){},size:O?26:16,style:{margin:O?"1em 0":"0",padding:"0.8571em 1.5em",fontFamily:"SamsungOne",backgroundColor:"#f4f4f4",borderColor:"#f4f4f4",pointerEvents:"none",color:"#b5b5b5",textAlign:"center"},children:"Not for sale"}),b&&b[k]&&b[k].price.priceType&&b[k].stock&&"outOfStock"===b[k].stock.stockLevelStatus&&(0,E.jsx)(o.ns,{onClick:function(){},size:O?26:16,style:{margin:O?"1em 0":" 0",padding:"0.8571em 1.5em",fontFamily:"SamsungOne",backgroundColor:"#f4f4f4",borderColor:"#f4f4f4",pointerEvents:"none",color:"#b5b5b5",textAlign:"center"},children:"Out of stock"}),b&&b[k]&&b[k].stock&&b[k].price.priceType&&"outOfStock"!==b[k].stock.stockLevelStatus&&b[k]&&(0,E.jsx)("a",{href:v,children:(0,E.jsx)(o.ns,be(be({onClick:function(){window.location.href="".concat(b[k].link,"buy/?modelCode=").concat(k)},size:O?26:16,style:{margin:O?"1em 0":"0",padding:"0.8571em 1.5em",fontFamily:"SamsungOne",textAlign:"center",cursor:"pointer"}},(0,o.rE)("accessoryAdd:".concat(b[k].name))),{},{children:b[k].name.indexOf("3 Ultra")>-1?"Pre-order":"Buy now"}))}),(0,E.jsx)(B,{href:g,children:"Learn more"})]})]})]})})},xc=function(e){var t=e.style;return(0,E.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 11.561 7.216",style:t,children:(0,E.jsx)("g",{id:"arrow_open","data-name":"arrow open",transform:"translate(28.248 -22.1) rotate(90)",children:(0,E.jsx)("path",{id:"Path_24","data-name":"Path 24",d:"M22.8,17.923l.483-.523,5.309,5.068-5.309,5.068-.483-.523,4.746-4.545Z",transform:"translate(0 0)",fill:k.colors.primary,stroke:k.colors.primary,"stroke-width":"1"})})})},wc=function(e){var t=e.style;return(0,E.jsxs)("svg",{id:"Icon_Bold_Action_Star_rating_01","data-name":"Icon / Bold / Action / Star_rating_01",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 18 18",style:t,children:[(0,E.jsx)("rect",{id:"Container",width:"18",height:"18",fill:"none"}),(0,E.jsx)("path",{id:"_Icon_Bold_Action_Star_rating_01","data-name":"*Icon / Bold / Action / Star_rating_01",d:"M8.05.534A.81.81,0,0,1,9.559.5l.017.038L11.57,5.39l5.271.383a.808.808,0,0,1,.527,1.4L17.34,7.2l-.029.026L13.277,10.61l1.26,5.089a.809.809,0,0,1-1.167.936l-.032-.018-.032-.019L8.813,13.83,4.321,16.6a.809.809,0,0,1-1.248-.826l.007-.036.008-.037,1.26-5.089L.316,7.226A.808.808,0,0,1,.708,5.782l.039-.005.039,0L6.056,5.39Z",transform:"translate(0.187 0.634)"})]})},kc=function(e){var t=e.style;return(0,E.jsx)("svg",{id:"Layer_2","data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 499.26 371.84",style:t,children:(0,E.jsx)("g",{id:"Layer_1-2","data-name":"Layer 1",children:(0,E.jsx)("polyline",{style:{fill:"none",stroke:"#000",strokeMiterlimit:10,strokeWidth:"75px"},points:"483.13 15.69 167.71 339.88 15.84 189.38"})})})},Sc=function(e){var t=e.style;return(0,E.jsx)("svg",{id:"Layer_2","data-name":"Layer 2",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 367.9 363.5",style:t,children:(0,E.jsxs)("g",{id:"Layer_1-2","data-name":"Layer 1",children:[(0,E.jsx)("line",{x1:"15.92",y1:"15.9",x2:"347.37",y2:"347.59",style:{fill:"none",stroke:"#000",strokeMiterlimit:10,strokeWidth:"55px"}}),(0,E.jsx)("line",{x1:"352.11",y1:"16.46",x2:"18.2",y2:"345.68",style:{fill:"none",stroke:"#000",strokeMiterlimit:10,strokeWidth:"55px"}})]})})},_c=(0,i.default)(o.xv)(cc||(cc=a(["\n &:hover {\n background-color: #b7b7b744;\n }\n transition: all 0.15s ease-in-out;\n padding: 0.5em 0;\n"]))),Ec=function(e){var n=e.options,r=e.handleChange,i=e.value,a=e.style,s=e.isMobile,l=(0,t.useState)(!1),u=(0,P.Z)(l,2),c=u[0],d=u[1],f=((0,o.Av)(),(0,t.useRef)(null));return(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)(zu.div,{ref:f,style:be({display:"flex",border:"2px ".concat(k.colors.primary," solid"),borderRadius:"14px",cursor:"pointer",position:"relative",flexDirection:"column",transition:"border-bottom 0s"},a),onClick:function(){!c&&f.current&&f.current.focus(),d(!c)},onBlur:function(){return d(!1)},children:[(0,E.jsxs)("div",{style:{display:"flex",position:"relative",width:"100%",alignItems:"center",justifyContent:"space-between",padding:s?"1em 0.5em":"1em 2em",gap:s?"0.25em":"0.5em"},children:[(0,E.jsx)(o.xv,{font:"secondary",weight:"bold",style:{position:"relative",width:"100%",whiteSpace:"nowrap"},align:"center",size:20,children:i.displayName}),(0,E.jsx)(zu.div,{style:{width:"1em",alignSelf:"center",display:"inline-block",right:"1em"},animate:c?{rotate:180}:{rotate:0},children:(0,E.jsx)(xc,{style:{width:"100%"}})})]}),(0,E.jsx)(zu.div,{animate:c?{height:"14em",opacity:1}:{height:"0em",opacity:0,transition:{type:"tween",ease:"easeOut",duration:.1}},style:{position:"absolute",top:"calc(100% - 1em)",left:"-2px",maxHeight:"14em",overflowY:"scroll",width:"calc(100% + 4px)",zIndex:50,padding:"1em 2em",background:_t.white,border:" ".concat(k.colors.primary," solid"),borderWidth:"0 2px 2px 2px",borderRadius:"0 0 14px 14px"},children:n.map((function(e){return(0,E.jsx)("div",be(be({onClick:function(){r(e)}},(0,o.rE)("comparisonTableOption:".concat(e.value))),{},{children:(0,E.jsx)(_c,{font:"secondary",weight:"bold",children:e.displayName})}),"selector_option_".concat(e.value))}))})]})})},Cc=i.default.div(dc||(dc=a(["\n width: 30px;\n height: 2px;\n background-color: #dcdcdc;\n position: absolute;\n left: 50%;\n transform: translateX(-50%);\n top: 95%;\n"]))),Pc=i.default.div.attrs((function(e){return{active:e.active||!1}}))(fc||(fc=a(["\n padding: 0.75em 2em;\n cursor: pointer;\n border-radius: 2em;\n border: ",";\n display: flex;\n align-items: center;\n\n justify-content: center;\n min-width: 140px;\n box-sizing: border-box;\n transition: all 0.2s ease-in-out;\n &:hover {\n border: 2px solid #006ff2;\n }\n @media (max-width: 768px) {\n padding: 0.75em 2.5em;\n min-width: 160px;\n }\n p {\n white-space: nowrap;\n }\n"])),(function(e){return e.active?"2px solid #006FF2":"1px solid #DCDCDC"})),Ac={GalaxyBook4_360:{productName:'Galaxy Book4 360 15.6"',code:"GalaxyBook4_360",bestFor:["creativity"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-pro360/buy/?modelCode=NP750QGK-KG3UK",learnMore:"/uk/computers/galaxy-book/galaxy-book4-pro-360-16-inch-i7-16gb-512gb-grey-np960qgk-kg2uk/",specs:{connectivity:"WiFi Only",display:'15.6"',cpu:"Intel\xae Core\u2122 5 / Intel\xae Core\u2122 7",memory:"8GB / 16GB",storage:"256GB / 512GB / 1TB",os:"Windows 11 Home",color:"Grey",graphics:"Intel\xae Graphics",battery:"68 Wh",weight:"1.46 kg",material:"Aluminium",dimensions:"13.7mm"},devices:["NP750QGK-KG3UK"]},GalaxyBook4Pro360_16:{productName:'Galaxy Book4 Pro 360 16"',code:"GalaxyBook4Pro360_16",bestFor:["productivity"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-pro360/buy/",learnMore:"/uk/computers/galaxy-book/galaxy-book4-pro-360-16-inch-i7-16gb-512gb-grey-np960qgk-kg2uk/",specs:{connectivity:"WiFi Only",display:'16"',cpu:"Intel\xae Core\u2122 Ultra 7",memory:"16GB",storage:"512GB / 1TB",os:"Windows 11 Home",color:"Moonstone Grey",graphics:"Intel\xae ARC\u2122 Graphics",battery:"76 Wh",weight:"1.66 kg",material:"Aluminium",dimensions:"12.8mm"},devices:["NP960QGK-KS1UK"]},GalaxyBook4Ultra:{productName:'Galaxy Book4 Ultra 16"',code:"GalaxyBook4Ultra",bestFor:["gaming"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG3UK",learnMore:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG3UK",specs:{connectivity:"WiFi Only",display:'16"',cpu:"Intel\xae Core\u2122 Ultra 7 / Intel\xae Core\u2122 Ultra 9",memory:"16GB / 32GB",storage:"1TB / 2TB",os:"Windows 11 Home",color:"Moonstone Grey",graphics:"NVIDIA\xae GeForce RTX\u2122 4050 / NVIDIA\xae GeForce RTX\u2122 4070",battery:"76 Wh",weight:"1.86 kg",material:"Aluminium",dimensions:"16.5mm"},devices:["NP960XGL-XG3UK"]},GalaxyBook4Pro_16:{productName:'Galaxy Book4 Pro 16"',code:"GalaxyBook4Pro_16",bestFor:["portability"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG2UK",learnMore:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP960XGL-XG2UK",specs:{connectivity:"WiFi Only",display:'16"',cpu:"Intel\xae Core\u2122 Ultra 7",memory:"16GB",storage:"512GB / 1TB",os:"Windows 11 Home",color:"Moonstone Grey",graphics:"Intel\xae ARC\u2122 Graphics",battery:"76 Wh",weight:"1.56 kg",material:"Aluminium",dimensions:"12.5mm"},devices:["NP960XGK-KG2UK"]},GalaxyBook4Pro_14:{productName:'Galaxy Book4 Pro 14"',code:"GalaxyBook4Pro_14",bestFor:["portability"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP940XGK-KG2UK",learnMore:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP940XGK-KG2UK",specs:{connectivity:"WiFi Only",display:'14"',cpu:"Intel\xae Core\u2122 Ultra 7",memory:"16GB",storage:"512GB / 1TB",os:"Windows 11 Home",color:"Moonstone Grey",graphics:"Intel\xae ARC\u2122 Graphics",battery:"63 Wh",weight:"1.23 kg",material:"Aluminium",dimensions:"11.6mm"},devices:["NP940XGK-KG2UK"]},GalaxyBook4_15:{productName:'Galaxy Book4 (2024) 15.6"',code:"GalaxyBook4_15",bestFor:["study"],buyNow:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP750XGK-KG4UK",learnMore:"/uk/computers/galaxy-book/galaxy-book4-ultra/buy/?modelCode=NP750XGK-KG4UK",specs:{connectivity:"WiFi Only",display:'15.6"',cpu:"Intel\xae Core\u2122 3 processor 100U",memory:"8GB / 16GB",storage:"256GB / 512GB",os:"Windows 11 Home",color:"Grey",graphics:"Intel\xaeGraphics",battery:"54 Wh",weight:"1.57 kg",material:"Aluminium",dimensions:"15.4mm"},devices:["NP750XGK-KG4UK"]},GalaxyBook3360_13:{productName:'Galaxy Book3 360 13.3"',code:"GalaxyBook3360_13",bestFor:["entertainment"],buyNow:"/uk/computers/galaxy-book/galaxy-book3-pro/buy/?modelCode=NP950QED-KB1UK",learnMore:"/uk/computers/galaxy-book/galaxy-book3-360-13-3-inch-with-s-pen-i5-8gb-256gb-np730qfg-ka1uk/",specs:{connectivity:"WiFi Only",display:'13.3"',cpu:"Intel 13th Gen i5 / i7",memory:"8GB / 16GB",storage:"256GB / 512GB",os:"Windows 11 Home",color:"Graphite",graphics:"Intel\xae Iris\xae Xe",battery:"61.1 Wh",weight:"1.16 kg",material:"Aluminium",touch:"Yes",dimensions:"304.4 x 202.0 x 12.9 mm"},devices:["NP730QFG-KA1UK"]}},Tc=function(e){!function(e){if(null==e)throw new TypeError("Cannot destructure undefined")}(e);var n=(0,o.dD)(),r=n?2:3,i=(0,t.useState)([Ac.GalaxyBook4Ultra,Ac.GalaxyBook4Pro360_16,Ac.GalaxyBook4Pro_14]),a=(0,P.Z)(i,2),s=a[0],l=a[1],u=(0,t.useState)("all"),c=(0,P.Z)(u,2),d=c[0],f=c[1],p=s.slice(0,r),h=Object.keys(s[0].specs).filter((function(e){return Gu[e].categories.includes(d)}));return(0,E.jsxs)("div",{style:{margin:"3em auto"},children:[(0,E.jsx)(o.xv,{size:n?48:40,font:"secondary",weight:"bold",align:"center",children:"The laptop that suits your needs"}),(0,E.jsxs)(o.xv,{size:n?27:19,style:{margin:"1em auto"},align:"center",children:["Not sure where to begin?\xa0",(0,E.jsx)(o.rU,{href:"/uk/smarter-service",color:k.colors.primary,children:"Chat or Video call with a Samsung Expert >"})]}),(0,E.jsxs)("table",{style:{borderCollapse:"collapse",width:"100%",maxWidth:"1209px",margin:"5em auto",overflow:"hidden",padding:"0 4vw"},children:[(0,E.jsx)("tr",{children:p.map((function(e,t){var o;return(0,E.jsx)("th",{style:{width:"".concat(100/r,"%")},children:(0,E.jsx)(Ec,{style:{width:"95%",margin:"0 auto"},options:Object.entries(Ac).map((function(e){var t=(0,P.Z)(e,2);return{value:t[0],displayName:t[1].productName}})),handleChange:function(e){return function(e,t){var n=(0,pt.Z)(s);n[e]=Ac[t],l(n)}(t,e.value)},value:{displayName:(null===(o=p[t])||void 0===o?void 0:o.productName)||"Your device",value:""},isMobile:n},((null===e||void 0===e?void 0:e.productName)||"yourDevice")+"_selector_"+t)})}))}),(0,E.jsx)("tr",{children:p.map((function(e,t){return(0,E.jsxs)("td",{style:{textAlign:"center",padding:"0 0 3em",width:"".concat(100/r,"%")},children:[e.devices&&(0,E.jsx)(bc,{skus:e.devices,buyNow:e.buyNow,learnMore:e.learnMore},e.devices.join(",")),(0,E.jsxs)("div",{style:{width:"100%",maxWidth:"270px",display:"flex",alignItems:"center",justifyContent:"center",margin:"0 auto",gap:"10px",padding:"23px 0",borderTop:"2px solid #EAEAEA",borderBottom:"2px solid #EAEAEA",marginTop:"36px",visibility:void 0===e.bestFor?"hidden":"visible"},children:[(0,E.jsx)("img",{src:"//images.samsung.com/is/image/samsung/assets/uk/mobile-compare/best-icon.png",alt:"",style:{width:"36px",height:"auto"}}),(0,E.jsxs)(o.xv,{weight:"bold",size:18,children:["The best for ",(e.bestFor||" ").toLocaleString()]})]})]})}))}),(0,E.jsx)("tr",{children:(0,E.jsxs)("td",{colSpan:r,style:{width:"100%",position:"relative",height:"50px"},children:[(0,E.jsx)("div",{className:"noScrollBars",style:{display:"flex",gap:"30px",justifyContent:n?"flex-start":"center",alignItems:"center",maxWidth:"100vw",overflowX:"scroll",padding:"1em 30px"},children:Object.entries(Uu).map((function(e){var t=(0,P.Z)(e,2),r=t[0],i=t[1];if("entertainment"==r);else if("productivity"==r);else if("gaming"==r);else if("study"!=r)return function(e,t,n,r,i){return(0,E.jsx)(Pc,{style:{},onClick:function(){return n(e)},active:t===e,children:(0,E.jsx)(o.xv,{align:"center",weight:"bold",size:r?23:16,children:i})},e)}(r,d,f,n,i)}))}),n&&(0,E.jsx)("div",{style:{position:"absolute",top:"0",right:"0",width:"50px",height:"100%",background:"linear-gradient(270deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0) 100%)",zIndex:1}})]})}),h.map((function(e,t){var i=e;return(0,E.jsx)(E.Fragment,{children:(0,E.jsx)("tr",{children:p.map((function(e){var a=Gu[i].sort,s=-1;if(a){var l=p.map((function(e){return(null===e||void 0===e?void 0:e.specs[i])||""}));s=l.sort(a).indexOf((null===e||void 0===e?void 0:e.specs[i])||"")}return(0,E.jsxs)("td",{style:{verticalAlign:"top",width:"".concat(100/r,"%"),padding:"2em 0",position:"relative"},children:[(0,E.jsxs)("div",{style:{display:"flex",flexDirection:"column",justifyContent:"center",height:"100%",width:"100%"},children:[["Yes","No"].includes((null===e||void 0===e?void 0:e.specs[i])||"")?"Yes"===(null===e||void 0===e?void 0:e.specs[i])?(0,E.jsx)(kc,{style:{width:"1.5em",margin:"1em auto"}}):(0,E.jsx)(Sc,{style:{width:"1.5em",margin:"1em auto"}}):(0,E.jsxs)(o.xv,{align:"center",weight:"bold",size:n?24:21,margin:"0 auto",children:[0===s&&(0,E.jsx)(wc,{style:{width:"0.75em",marginRight:"0.25em"}})," ",null===e||void 0===e?void 0:e.specs[i]]})," "]}),(0,E.jsx)(o.xv,{align:"center",size:n?21:17,margin:"0.5em auto",children:Gu[i].name}),t<h.length-1&&(0,E.jsx)(Cc,{})]})}))})})}))]}),(0,E.jsxs)("div",{style:{margin:"3em auto",textAlign:"center"},children:[(0,E.jsx)(o.xv,{size:n?24:16,align:"center",weight:"bold",children:"We\u2019ve highlighted the differences so you don\u2019t have to dig through identical tech specs, unless you want to."}),(0,E.jsx)("a",{href:"/uk/galaxy-book/compare",style:{display:"block",textDecoration:"none",margin:"1.5em auto",cursor:"pointer"},children:(0,E.jsx)(o.Wg,{children:"Compare more"})})]})]})},jc=JSON.parse('{"Z":[{"id":5,"review":"A winning laptop from Samsung","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/techrader.com.png","rating":4.5,"comment":"Samsung gets all the basics right with the Book2 360. Its convertible design works well in both laptop and tablet modes, yet still manages to be highly portable, with impressive battery life and eye-catching AMOLED display.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"techradar.com","product_id":"Galaxy Book2 Pro"},{"id":1,"review":"Overall amazing laptop for students!","rating":5,"icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","comment":"Been a week or 2 and I\u2019m very happy with Samsung as usual, I have a lot of their products and owning one of their top tier laptops has made things easier such as using quick share to get files from family members etc! I am a student and do recommend others this laptop","created_at":"2016-03-01T00:00:00.000Z","updated_at":"2016-03-01T00:00:00.000Z","user_id":"Minal22","product_id":"Galaxy Book2 Pro 360 (13.3\u201d, i5, 8GB)"},{"id":2,"review":"Smitten with my laptop","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":5,"comment":"It is just stunning, what can I say? I upgraded from a surface pro which began to feel outdated and lag, but I\u2019m really smitten about the colour of my burgundy laptop; impressive bright screen and typing is really seamless. I was always nervous about spending money and buying a high-spec laptop, but I think I made the right choice and hope to keep it for many years.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"sf0109","product_id":"Galaxy Book2 Pro 360 (13.3\u201d, i7, 16GB)"},{"id":3,"review":"Excellent All-rounder Laptop","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":5,"comment":"Galaxy Book 2 Pro (15.6 inch, i5 model) is a fantastic all-rounder laptop. I bought this on Pre-order for under \xa3900 which included 2x free pre-order gifts. I was due an upgrade on my previous laptop & this came at the perfect time.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"Nafees","product_id":"Galaxy Book2 Pro (13.3\u201d, i5, 8GB)"},{"id":4,"review":"Beautifully designed but no 1440p resolution","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":4,"comment":" I absolutely love the premium design, the beautiful white smooth keyboard and how incredibly thin & lightweight it is; I just love everything about it physically. The laptop comes with built in Samsung apps for the ecosystem. Having all my synced apps, notes and seamless connections makes it very convenient for everyday use.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"SabinS","product_id":"Galaxy Book2 Pro (13.3\u201d, i5, 8GB)"},{"id":5,"review":"Outstanding Laptop","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":5,"comment":"the first impression - amazing. the screen is second to no-one. I use it mostly for web browsing, email and ms office and remote access to the servers (vnc, teamviewer). the sound is better than I expected from that small size, but not great. mine has 16gb of ram. as far as value goes, I bought it on a huge sale - for me value is 5. but otherwise, it is kind of expensive.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"svladb","product_id":"Galaxy Book2 360 (13.3\u201d, i5, 8GB)"},{"id":6,"review":"The light fantastic","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":5,"comment":"What\u2019s not to like about the Galaxy Book Pro? It\u2019s as light as a feather, so slender it almost vanishes when looked at side-on, has a superb display, a solid array of ports, a good keyboard, a massive trackpad, excellent performance and good battery life.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"expertreviews.co.uk","product_id":"Galaxy Book Pro 15.6"},{"id":7,"review":"Great Laptop.","icon":"https://images.samsung.com/is/image/samsung/assets/uk/computing/avatar.png","rating":5,"comment":"This laptop is super thin and fast, battery life is excellent. Sync\u2019s brilliant with Samsung eco system. Screen is crisp and bright and the overall design feels quality. Samsung have done it again make a great product. Highly recommended.","created_at":"2016 - 03 - 01T00: 00: 00.000Z","updated_at":"2016 - 03 - 01T00: 00: 00.000Z","user_id":"Will048","product_id":"Galaxy Book2 Pro 360 (15.6\u201d, i7, 16GB)"}]}'),Rc=i.default.div(pc||(pc=a(["\n background-image: url(https://images.samsung.com/is/image/samsung/assets/uk/computing/yellowstar.png);\n display: inline-block;\n background-size: cover;\n width: 20px;\n height: 20px;\n margin-right: 4px;\n"]))),Oc=i.default.div(hc||(hc=a(["\n background-image: url(https://images.samsung.com/is/image/samsung/assets/uk/computing/greystar.png);\n display: inline-block;\n background-size: cover;\n width: 20px;\n height: 20px;\n margin-right: 4px;\n"]))),Fc=function(e){for(var t=e.rating,n=Math.round(t),r=[],o=1;o<=5;o++)n>=o?r.push((0,E.jsx)(Rc,{})):r.push((0,E.jsx)(Oc,{}));return(0,E.jsx)(E.Fragment,{children:r})};me().polyfill();var Mc=function(){var e=(0,t.useState)(0),n=(0,P.Z)(e,2),r=n[0],s=n[1],l=(0,t.useState)(0),u=(0,P.Z)(l,2),c=(u[0],u[1]),d=jc.Z,f=(0,o.dD)(),p=(window.innerWidth,(0,t.useRef)(null));return(0,t.useEffect)((function(){c(p.current.offsetWidth)}),[]),(0,i.default)(o.rU)(mc||(mc=a(["\n &:after {\n top:42%;\n right:-18%;\n }\n\n &:hover {\n &:after {\n right:-23%;\n }\n }\n"]))),(0,E.jsx)(E.Fragment,{children:(0,E.jsxs)("div",{className:"carousel",ref:p,style:{position:"relative"},children:[(0,E.jsx)("button",{onClick:function(){s(r-1),document.getElementById("slider-two").scrollBy({left:-447,top:0,behavior:"smooth"})},disabled:0===r,style:{display:0===r||f?"none":"block",backgroundImage:"url('https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png')",width:"80px",height:"80px",backgroundSize:"contain",backgroundRepeat:"no-repeat",transform:"rotate(180deg)",outline:"none",border:"none",backgroundColor:"unset",position:"absolute",top:"calc(50% - 40px)",left:"40px",cursor:"pointer"}}),(0,E.jsx)("button",{onClick:function(){s(r+1),console.log("clicked"),document.getElementById("slider-two").scrollBy({left:447,top:0,behavior:"smooth"})},disabled:r===d.length-1,style:{display:r===d.length-1||f?"none":"block",backgroundImage:"url('https://images.samsung.com/is/image/samsung/assets/uk/unpacked/winter-2023/slide-arrow.png')",width:"80px",height:"80px",backgroundSize:"contain",backgroundRepeat:"no-repeat",outline:"none",border:"none",backgroundColor:"unset",position:"absolute",top:"calc(50% - 40px)",right:"40px",cursor:"pointer"}}),(0,E.jsx)("div",{id:"slider-two",className:"slides",style:{display:"flex",overflowX:"scroll",transition:"transform 0.5s",width:f?"100vw":"calc(100vw - 240px)",marginLeft:f?"":"240px",paddingLeft:f?"36px":"",paddingRight:f?"36px":"",gap:"24px",scrollSnapType:f?"":"x mandatory"},children:d.map((function(e,t){return(0,E.jsx)("div",{style:{flexShrink:"0",width:f?"calc(100vw - 72px)":"447px",backgroundSize:"contain",scrollSnapAlign:f?"":"start",background:"#2B2B2B",borderRadius:"10px"},className:"slide",children:(0,E.jsxs)("div",{style:{padding:f?"20px":"40px"},children:[(0,E.jsxs)("div",{style:{display:"flex",gap:"24px",justifyContent:"flex-start",alignItems:"center"},children:[(0,E.jsx)("img",{src:e.icon,style:{width:"90px"}}),(0,E.jsxs)("div",{children:[(0,E.jsx)(o.xv,{color:"white",size:f?24:20,font:"secondary",weight:"bold",children:e.review}),(0,E.jsxs)(o.xv,{color:"white",size:f?16:13,margin:"13px 0 0px 0",children:[e.user_id," \u2022 ",e.product_id]})]})]}),(0,E.jsx)("div",{style:{margin:"30px 0"},children:(0,E.jsx)(Fc,{rating:e.rating})}),(0,E.jsx)(o.xv,{size:f?20:15,padding:"0",margin:"0",color:"white",children:e.comment})]})},t)}))})]})})},Dc=t.memo((function(){return(0,E.jsx)("div",{id:"samsung-shorts-app"})}));var Lc=function(){var e=(0,o.dD)();return(0,E.jsxs)(i.ThemeProvider,{theme:k,children:[(0,E.jsx)(S,{}),(0,E.jsx)(ot,{}),(0,E.jsx)("div",{style:{background:"black",padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:(0,E.jsx)(Je,{})}),(0,E.jsx)(Dc,{}),(0,E.jsxs)(o.W2,{padding:e?"16.667vw 0":"min(120px, 8.3vw) 0",children:[(0,E.jsx)(o.xv,{size:e?18:15,weight:"bold",children:"DISCOVER THE GALAXY BOOK"}),(0,E.jsx)(o.xv,{size:38,font:"secondary",style:{textAlign:"center",fontWeight:"bold",marginTop:"15px",marginBottom:"43px",paddingLeft:"30px",paddingRight:"30px"},children:"Whatever you need, we've got you covered"}),(0,E.jsx)(ge,{})]}),(0,E.jsx)("div",{style:{background:"black"},children:(0,E.jsx)(o.W2,{width:"100%",padding:"0",background:"#000",children:(0,E.jsx)(ft,{})})}),(0,E.jsx)(rt,{}),(0,E.jsx)(fe,{}),(0,E.jsx)(Tc,{}),(0,E.jsx)("div",{style:{background:"#FAFAFA",padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:(0,E.jsx)(nt,{})}),(0,E.jsxs)("div",{style:{background:"#171717",padding:e?"16.667vw 0":"min(120px, 8.3vw) 0"},children:[(0,E.jsx)(o.xv,{size:38,font:"secondary",color:"white",style:{textAlign:"center",fontWeight:"bold",padding:"0 20px",maxWidth:"600px",margin:"0 auto",paddingBottom:"43px"},children:"Read what our customers and the experts have to say"}),(0,E.jsx)(Mc,{})]})]})},Bc=function(e){e&&e instanceof Function&&n.e(787).then(n.bind(n,787)).then((function(t){var n=t.getCLS,r=t.getFID,o=t.getFCP,i=t.getLCP,a=t.getTTFB;n(e),r(e),o(e),i(e),a(e)}))};r.createRoot(document.getElementById("cheil-static-computing-pcd")).render((0,E.jsx)(t.StrictMode,{children:(0,E.jsxs)(i.ThemeProvider,{theme:k,children:[(0,E.jsx)(o.ZL,{}),(0,E.jsx)(Lc,{})]})})),Bc()}()}(); //# sourceMappingURL=main.1ce31aa1.js.map "use strict";(self.webpackChunkComputing_pcd_buying_guide=self.webpackChunkComputing_pcd_buying_guide||[]).push([[787],{787:function(e,n,t){t.r(n),t.d(n,{getCLS:function(){return y},getFCP:function(){return g},getFID:function(){return F},getLCP:function(){return P},getTTFB:function(){return D}});var i,r,a,o,u=function(e,n){return{name:e,value:void 0===n?-1:n,delta:0,entries:[],id:"v2-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12)}},c=function(e,n){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){if("first-input"===e&&!("PerformanceEventTiming"in self))return;var t=new PerformanceObserver((function(e){return e.getEntries().map(n)}));return t.observe({type:e,buffered:!0}),t}}catch(e){}},f=function(e,n){var t=function t(i){"pagehide"!==i.type&&"hidden"!==document.visibilityState||(e(i),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},s=function(e){addEventListener("pageshow",(function(n){n.persisted&&e(n)}),!0)},m=function(e,n,t){var i;return function(r){n.value>=0&&(r||t)&&(n.delta=n.value-(i||0),(n.delta||void 0===i)&&(i=n.value,e(n)))}},v=-1,p=function(){return"hidden"===document.visibilityState?0:1/0},d=function(){f((function(e){var n=e.timeStamp;v=n}),!0)},l=function(){return v<0&&(v=p(),d(),s((function(){setTimeout((function(){v=p(),d()}),0)}))),{get firstHiddenTime(){return v}}},g=function(e,n){var t,i=l(),r=u("FCP"),a=function(e){"first-contentful-paint"===e.name&&(f&&f.disconnect(),e.startTime<i.firstHiddenTime&&(r.value=e.startTime,r.entries.push(e),t(!0)))},o=window.performance&&performance.getEntriesByName&&performance.getEntriesByName("first-contentful-paint")[0],f=o?null:c("paint",a);(o||f)&&(t=m(e,r,n),o&&a(o),s((function(i){r=u("FCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,t(!0)}))}))})))},h=!1,T=-1,y=function(e,n){h||(g((function(e){T=e.value})),h=!0);var t,i=function(n){T>-1&&e(n)},r=u("CLS",0),a=0,o=[],v=function(e){if(!e.hadRecentInput){var n=o[0],i=o[o.length-1];a&&e.startTime-i.startTime<1e3&&e.startTime-n.startTime<5e3?(a+=e.value,o.push(e)):(a=e.value,o=[e]),a>r.value&&(r.value=a,r.entries=o,t())}},p=c("layout-shift",v);p&&(t=m(i,r,n),f((function(){p.takeRecords().map(v),t(!0)})),s((function(){a=0,T=-1,r=u("CLS",0),t=m(i,r,n)})))},E={passive:!0,capture:!0},w=new Date,L=function(e,n){i||(i=n,r=e,a=new Date,C(removeEventListener),S())},S=function(){if(r>=0&&r<a-w){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+r};o.forEach((function(n){n(e)})),o=[]}},b=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){L(e,n),r()},i=function(){r()},r=function(){removeEventListener("pointerup",t,E),removeEventListener("pointercancel",i,E)};addEventListener("pointerup",t,E),addEventListener("pointercancel",i,E)}(n,e):L(n,e)}},C=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach((function(n){return e(n,b,E)}))},F=function(e,n){var t,a=l(),v=u("FID"),p=function(e){e.startTime<a.firstHiddenTime&&(v.value=e.processingStart-e.startTime,v.entries.push(e),t(!0))},d=c("first-input",p);t=m(e,v,n),d&&f((function(){d.takeRecords().map(p),d.disconnect()}),!0),d&&s((function(){var a;v=u("FID"),t=m(e,v,n),o=[],r=-1,i=null,C(addEventListener),a=p,o.push(a),S()}))},k={},P=function(e,n){var t,i=l(),r=u("LCP"),a=function(e){var n=e.startTime;n<i.firstHiddenTime&&(r.value=n,r.entries.push(e),t())},o=c("largest-contentful-paint",a);if(o){t=m(e,r,n);var v=function(){k[r.id]||(o.takeRecords().map(a),o.disconnect(),k[r.id]=!0,t(!0))};["keydown","click"].forEach((function(e){addEventListener(e,v,{once:!0,capture:!0})})),f(v,!0),s((function(i){r=u("LCP"),t=m(e,r,n),requestAnimationFrame((function(){requestAnimationFrame((function(){r.value=performance.now()-i.timeStamp,k[r.id]=!0,t(!0)}))}))}))}},D=function(e){var n,t=u("TTFB");n=function(){try{var n=performance.getEntriesByType("navigation")[0]||function(){var e=performance.timing,n={entryType:"navigation",startTime:0};for(var t in e)"navigationStart"!==t&&"toJSON"!==t&&(n[t]=Math.max(e[t]-e.navigationStart,0));return n}();if(t.value=t.delta=n.responseStart,t.value<0||t.value>performance.now())return;t.entries=[n],e(t)}catch(e){}},"complete"===document.readyState?setTimeout(n,0):addEventListener("load",(function(){return setTimeout(n,0)}))}}}]); //# sourceMappingURL=787.8b9ce601.chunk.js.map }); </script> </div> <div class="cm-g-text-block aem-GridColumn aem-GridColumn--default--12"> <div class="textblock bg-gray text-left text-mo-left container-width-medium"> <div class="textblock__body padding-top--48 padding-bottom--48"> <div class="textblock__disclaimer"> <ul class="textblock__disclaimer-list" role="list"> <li class="textblock__disclaimer-text" role="listitem">* All credit is subject to status and only available to UK residents over 18, with a UK Bank account and valid driver’s license, passport, or identity card. Credit duration is variable, and you could be offered credit at a higher rate than the representative APR set out above based on your personal financial circumstances and what you tell us. For smaller baskets of between £150 and £250 a minimum upfront payment of 20% is required and 12 months fixed monthly payments. By accepting our credit you consent to a credit check being completed which will appear on your credit file.</li> <li class="textblock__disclaimer-text" role="listitem">** Purchase from Samsung Shop Online. Lower priced item must meet all conditions, be identical and brand new and be sold online at selected retailers within 7 days of purchase. To claim, participants must visit <a href="https://www.samsungpromotions.claims/pricepromise">www.samsungpromotions.claims/pricepromise</a> within 7 days of purchase to complete the claim from and upload supporting evidence. Discount codes to lower the price paid for the Promotion Product are excluded, unless specifically state otherwise. Lower priced items due to loyalty schemes, promotions, bundle pricing, voucher codes or monthly/data contracts are excluded from this promotion. One cashback refund per model and a maximum of 4 per household. Ts&amp;Cs apply, for more details see <a href="https://www.samsungpromotions.claims/pricepromise">www.samsungpromotions.claims/pricepromise</a> </li> <li class="textblock__disclaimer-text" role="listitem">1. Only available at Samsung.com. Customers must apply Trade Up discount on product page, before checking out. Recycled products are non-returnable and have zero value. You must fully uninstall (including wiping all data) your laptop and make sure it is ready for collection at the same time we deliver your new product. We reserve the right to refuse the delivery if you fail to do so. You will be required to pay a surcharge equal to the amount of the discount you received, if you do not recycle or have your product ready for recycling. Offer cannot be combined with multi-buy promotions for Home Appliances. Each household may only recycle one of each type of product and will receive only one Trade Up discount for each product type recycled. The Trade Up discount is an incentive to recycle it is not a Trade In value for the recycled product.</li> </ul> </div> </div> </div> </div> <div class="nv-g-breadcrumb aem-GridColumn aem-GridColumn--default--12"> <nav class="breadcrumb" aria-label="Breadcrumb"> <div class="breadcrumb__inner"> <ul class="breadcrumb__path"> <li> <a aria-label="Home" an-tr="nv03_breadcrumb-microsite-text-breadcrumb" an-ca="navigation" an-ac="breadcrumb" an-la="breadcrumb:home" href="/uk/"> <span class="breadcrumb__text-desktop">Home</span> <span class="breadcrumb__text-mobile">Home</span> </a> <svg class="icon" focusable="false" aria-hidden="true"><use xlink:href="#next-bold" href="#next-bold"></use></svg> </li> <li> <strong class="breadcrumb__text-desktop" aria-current="page">Laptop Buying Guide</strong> <strong class="breadcrumb__text-mobile" aria-current="page">Laptop Buying Guide</strong> </li> </ul> </div> <script type="application/ld+json" data-type="seo" data-object-type="BreadcrumbList" data-id="c98fac48-988f-4c63-83d2-daaa6a888027">{"@context":"http://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","name":"Home","item":"https://www.samsung.com/uk","position":1},{"@type":"ListItem","name":"Laptop Buying Guide","item":"","position":2}]}</script> </nav></div> </div> </div> <div class="iparsys parsys aem-GridColumn aem-GridColumn--default--12"> <div class="newpar new section"> </div> <div class="par iparys_inherited"> </div> </div> <div class="responsivegrid aem-GridColumn aem-GridColumn--default--12"> <div class="aem-Grid aem-Grid--12 aem-Grid--default--12 "> </div> </div> </div> </div> </div> <footer class="footer"> <!--googleoff: all--> <div class="footer"> <div class="footer-column"> <h2 class="hidden">Footer Navigation</h2> <div class="footer-column__item"> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-0">Product &amp; Service</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-0" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="product and service"> <span class="hidden" data-i18n-open="Open" data-i18n-close="Close">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/smartphones/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:smartphones" aria-label="Smartphones Smartphones">Smartphones</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/tablets/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:tablets" aria-label="Tablets tablets">Tablets</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/audio-sound/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:audio sound" aria-label="Audio Sound audio sound">Audio Sound</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/watches/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:watches" aria-label="Watches watches">Watches</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/apps/smart-switch/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:smart switch" aria-label="Smart Switch Smart Switch">Smart Switch</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/mobile-accessories/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:mobile accessories" aria-label="Mobile Accessories Mobile Accessories">Mobile Accessories</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/tvs/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:tvs" aria-label="TVs tvs">TVs</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/lifestyle-tvs/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:lifestyle tvs" aria-label="Lifestyle TVs Lifestyle TVs">Lifestyle TVs</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/audio-devices/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:sound devices" aria-label="Sound Devices Sound Devices">Sound Devices</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/refrigerators/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:refrigerators" aria-label="Refrigerators refrigerators">Refrigerators</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/washers-and-dryers/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:laundry" aria-label="Laundry Laundry">Laundry</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/cooking-appliances/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:cooking appliances" aria-label="Cooking Appliances cooking appliances">Cooking Appliances</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/business/climate/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:air solutions" aria-label="Air Solutions Air Solutions">Air Solutions</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/monitors/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:monitors" aria-label="Monitors monitors">Monitors</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/memory-storage-devices/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="product and service:memory storage" aria-label="Memory Storage memory storage">Memory Storage</a> </li> </ul> </div> </div> </div> <div class="footer-column__item"> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-1">Shop</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-1" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="shop"> <span class="hidden" data-i18n-open="Open" data-i18n-close="Close">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/offer/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:all offers" aria-label="All Offers All Offers">All Offers</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/pay-monthly-contract/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:monthly network contracts" aria-label="Contract Phones Contract Phones">Contract Phones</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/trade-in/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:trade in deals" aria-label="Trade In Deals Trade In Deals">Trade In Deals</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/samsung-upgrade/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:samsung upgrade programme" aria-label="Samsung Upgrade Programme Samsung Upgrade Programme">Samsung Upgrade Programme</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/smarter-service/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:samsung experts buying advice" aria-label="Samsung Experts – Buying Advice Samsung Experts – Buying Advice">Samsung Experts – Buying Advice</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="https://shop.samsung.com/uk/mypage/orders" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:track your order" aria-label="Track Your Order track your order : Open in a new window"> Track Your Order <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/shop-faq/delivery-and-installations/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:delivery and returns" aria-label="Delivery and Returns Delivery and Returns">Delivery and Returns</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/shop-faq/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:online shop faqs" aria-label="Online Shop FAQs Online Shop FAQs">Online Shop FAQs</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/apps/samsung-shop-app/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:samsung shop app" aria-label="Samsung Shop App Samsung Shop App">Samsung Shop App</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/business/offers/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:business shop" aria-label="Business Shop Business Shop">Business Shop</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="https://www.samsung.com/uk/students-offers/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:student and youth offers" aria-label="Student &amp; Youth Offers Student &amp; Youth Offers">Student &amp; Youth Offers</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/key-worker-offers/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:key worker and teacher offers " aria-label="Key Worker &amp; Teacher Offers Key Worker &amp; Teacher Offers">Key Worker &amp; Teacher Offers </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/samsung-experience-store/locations/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:samsung eperience store" aria-label="Samsung Experience Store Samsung Experience Store">Samsung Experience Store</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/explore/kings-cross/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:samsung kx ldn" aria-label="Samsung KX LDN Samsung KX LDN">Samsung KX LDN</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/explore/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="shop:explore" aria-label="Explore Explore">Explore</a> </li> </ul> </div> </div> </div> <div class="footer-column__item"> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-2">Support</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-2" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="support"> <span class="hidden" data-i18n-open="Open" data-i18n-close="Close">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/#productsupport" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:solutions manuals and downloads" aria-label="Solutions, Manuals &amp; Downloads Solutions, Manuals &amp; Downloads">Solutions, Manuals &amp; Downloads</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/repair/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:book a repair" aria-label="Book a Repair Book a Repair">Book a Repair</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/repair/track-my-repair/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:track my repair" aria-label="Track my Repair Track my Repair">Track my Repair</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/contact/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:contact us" aria-label="Contact Us Contact Us">Contact Us</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/warranty/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:warranty information" aria-label="Warranty Information Warranty Information">Warranty Information</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/product-help/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:how to guides" aria-label="How to Guides How to Guides">How to Guides</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/contact/email-the-ceo/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:email ceo" aria-label="Email CEO Email CEO">Email CEO</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/warranty/register-your-samsung-product-warranty/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:product registration" aria-label="Product Registration Product Registration">Product Registration</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="https://samsungcustomerboard.fra1.qualtrics.com/jfe/form/SV_cBhgiZU742TgGma" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:rate your experience" aria-label="Rate your experience Rate your experience : Open in a new window"> Rate your experience <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/support/home-appliances/safety-notice-gas-hobs/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="support:safety notice" aria-label="Safety Notice Safety Notice">Safety Notice</a> </li> </ul> </div> </div> </div> <div class="footer-column__item"> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-3">Account &amp; Community</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-3" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="account and services"> <span class="hidden" data-i18n-open="Open" data-i18n-close="Close">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/mypage/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:my page" aria-label="My page My page">My page</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/mypage/myproducts/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:my products" aria-label="My products My products">My products</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="https://shop.samsung.com/uk/mypage/orders" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:orders" aria-label="Orders Orders : Open in a new window"> Orders <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="https://shop.samsung.com/uk/mypage/wishlist" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:wishlist" aria-label="Wishlist Wishlist : Open in a new window"> Wishlist <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/apps/samsung-members/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:members" aria-label="Members Members">Members</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="https://shop.samsung.com/uk/mypage/vouchers" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:vouchers" aria-label="Vouchers Vouchers">Vouchers</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="https://eu.community.samsung.com/?category.id=uk" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:community" aria-label="Community Community">Community</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/rewards/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="account and services:samsung rewards" aria-label="Samsung Rewards Samsung Rewards">Samsung Rewards</a> </li> </ul> </div> </div> </div> <div class="footer-column__item"> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-4">Sustainability</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-4" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="sustainability"> <span class="hidden" data-i18n-open="Open" data-i18n-close="Close">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/sustainability/environment/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:environment" aria-label="Environment Environment">Environment</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/sustainability/security-and-privacy/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:security and privacy" aria-label="Security &amp; Privacy">Security &amp; Privacy</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/sustainability/accessibility/overview/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:accessibility" aria-label="Accessibility Accessibility">Accessibility</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/sustainability/diversity-and-inclusion/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:diversity, equity, and inclusion" aria-label="Diversity · Equity · Inclusion Diversity, Equity, and Inclusion">Diversity · Equity · Inclusion</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//csr.samsung.com/en/main.do" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:corporate citizenship" aria-label="Corporate Citizenship Corporate Citizenship. Together for Tomorrow! Enabling People : Open in a new window"> Corporate Citizenship <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//www.samsung.com/global/sustainability/" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:corporate sustainability" aria-label="Corporate Sustainability Corporate Sustainability : Open in a new window"> Corporate Sustainability <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//images.samsung.com/is/content/samsung/assets/uk/home/SEUK_2023_Modern_Slavery_Statement_Final.pdf" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:modern slavery act statement " aria-label="Modern Slavery Act Statement Modern Slavery Act Statement : Open in a new window"> Modern Slavery Act Statement <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/samsung-gender-pay/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:gender pay gap reports" aria-label="Gender Pay Gap Reports Gender Pay Gap Reports">Gender Pay Gap Reports</a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/sustainability/online-safety/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="sustainability:online safety" aria-label="Online Safety Online Safety">Online Safety</a> </li> </ul> </div> </div> <div class="footer-category"> <h3 class="footer-category__title" id="footer-category-title-4-2">About Us</h3> <a class="footer-category__anchor" href="javascript:void(0);" role="button" aria-labelledby="footer-category-title-4-2" aria-expanded="false" an-tr="nv01_footer sitemap|menu1Depth" an-ca="navigation" an-ac="footer" an-la="about us"> <span class="hidden">Open</span> <svg class="icon" focusable="false"> <use xlink:href="#open-down-regular" href="#open-down-regular"></use> </svg> </a> <div class="footer-category__list-wrap"> <ul class="footer-category__list" role="list"> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/about-us/company-info/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:company info" aria-label="Company Info Company Info"> Company Info </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/about-us/business-area/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:business area" aria-label="Business Area Business Area"> Business Area </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/about-us/brand-identity/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:brand identity" aria-label="Brand Identity Brand Identity"> Brand Identity </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/about-us/careers/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:careers" aria-label="Careers Careers"> Careers </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//www.samsung.com/global/ir/" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:investor relations" aria-label="Investor Relations Investor Relations : Open in a new window"> Investor Relations <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//news.samsung.com/uk" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:newsroom" aria-label="Newsroom Newsroom : Open in a new window"> Newsroom <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="/uk/about-us/ethics/" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:ethics" aria-label="Ethics Ethics"> Ethics </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link new-window" href="//design.samsung.com/global/index.html" target="_blank" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:samsung design" aria-label="Samsung Design Samsung Design : Open in a new window"> Samsung Design <svg class="icon" focusable="false"> <use xlink:href="#outlink-bold" href="#outlink-bold"></use> </svg> </a> </li> <li class="footer-category__item" role="listitem"> <a class="footer-category__link" href="//images.samsung.com/is/content/samsung/assets/uk/banner-test/Tax-Strategy-signed-2024-SEUK-SSEL.pdf" an-tr="nv01_footer sitemap--cta-menu" an-ca="navigation" an-ac="footer" an-la="about us:tax strategy" aria-label="Tax strategy Tax strategy"> Tax strategy </a> </li> </ul> </div> </div> </div> </div> <div class="footer-bottom"> <div class="footer-copyright-wrap"> <div class="footer-copyright-align"> <p class="footer-copyright">Copyright© 1995-2024 Samsung. All rights reserved.</p> </div> <div class="footer-language"> <a class="footer-language__anchor" href="/uk/function/ipredirection/ipredirectionLocalList/" aria-label="Choose another country or region to see content specific to your location." an-tr="nv02_footer bottom--cta-locallist" an-ca="navigation" an-ac="footer" an-la="bottom:country selector:locallist">United Kingdom/English</a> </div> <div class="footer-local-logo"> <div class="footer-local-logo--wrap"> <div class="footer-local-logo__item"> <a class="footer-local-logo__link" href="#" an-tr="nv02_footer bottom--cta-logo" an-ca="navigation" an-ac="footer" an-la="bottom:local logo:icon for royal warrant of uk at the bottom of page"> <div class="image"> <img class="image__main lazy-load responsive-img" data-desktop-src="//images.samsung.com/is/image/samsung/assets/uk/homepage/WEB-royal-warrant_v02-01.png?$ORIGIN_PNG$" data-mobile-src="//images.samsung.com/is/image/samsung/assets/uk/homepage/WEB-royal-warrant_v02-01.png?$ORIGIN_PNG$" alt="Icon for Royal Warrant of UK at the bottom of page"/> </div> </a> </div> </div> </div> </div> <div class="footer-language-wrap" an-tr="nv02_footer bottom--text-scroll" an-ca="scroll" an-ac="scroll:100" an-la="scroll:100"> <div class="footer-language"> <a class="footer-language__anchor" href="/uk/function/ipredirection/ipredirectionLocalList/" aria-label="Choose another country or region to see content specific to your location." an-tr="nv02_footer bottom--cta-locallist" an-ca="navigation" an-ac="footer" an-la="bottom:country selector:locallist">United Kingdom/English</a> </div> <div class="footer-terms"> <ul class="footer-terms__list" role="list"> <li class="footer-terms__item" role="listitem"> <a id="accHelp" class="footer-terms__link" href="/uk/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu: "> </a> </li> <li class="footer-terms__item" role="listitem"> <a class="footer-terms__link" href="/uk/estore/static/link_terms_and_conditions_of_sale/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu:terms and conditions" aria-label="terms and conditions">Terms and Conditions</a> </li> <li class="footer-terms__item" role="listitem"> <a class="footer-terms__link" href="/uk/info/privacy/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu:privacy" aria-label="privacy">Privacy</a> </li> <li class="footer-terms__item" role="listitem"> <a class="footer-terms__link" href="/uk/info/privacy/cookie-policy/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu:cookies" aria-label="cookies">Cookies</a> </li> <li class="footer-terms__item" role="listitem"> <a class="footer-terms__link" href="/uk/info/legal/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu:legal" aria-label="legal">Legal</a> </li> <li class="footer-terms__item" role="listitem"> <a class="footer-terms__link" href="/uk/info/sitemap/" an-tr="nv02_footer bottom--cta-bottom" an-ca="navigation" an-ac="footer" an-la="bottom:legal menu:sitemap" aria-label="Sitemap">Sitemap</a> </li> </ul> </div> <div class="footer-sns"> <span class="footer-sns__title">STAY IN THE LOOP?</span> <ul class="footer-sns__list" role="list"> <li class="footer-sns__item" role="listitem"> <a class="footer-sns__link" href="https://www.facebook.com/SamsungUK" target="_blank" rel="noreferrer noopener" an-tr="nv02_footer bottom--cta-sns" an-ca="navigation" an-ac="footer" an-la="bottom:sns:facebook" aria-label="facebook : Open in a new window"> <svg class="icon" focusable="false"> <use xlink:href="#facebook-bold" href="#facebook-bold"></use> </svg> </a> </li> <li class="footer-sns__item" role="listitem"> <a class="footer-sns__link" href="https://twitter.com/samsunguk" target="_blank" rel="noreferrer noopener" an-tr="nv02_footer bottom--cta-sns" an-ca="navigation" an-ac="footer" an-la="bottom:sns:twitter" aria-label="twitter : Open in a new window"> <svg class="icon" focusable="false"> <use xlink:href="#twitter-bold" href="#twitter-bold"></use> </svg> </a> </li> <li class="footer-sns__item" role="listitem"> <a class="footer-sns__link" href="https://www.instagram.com/samsunguk/" target="_blank" rel="noreferrer noopener" an-tr="nv02_footer bottom--cta-sns" an-ca="navigation" an-ac="footer" an-la="bottom:sns:instagram" aria-label="instagram : Open in a new window"> <svg class="icon" focusable="false"> <use xlink:href="#instagram-bold" href="#instagram-bold"></use> </svg> </a> </li> <li class="footer-sns__item" role="listitem"> <a class="footer-sns__link" href="https://www.youtube.com/samsunguk" target="_blank" rel="noreferrer noopener" an-tr="nv02_footer bottom--cta-sns" an-ca="navigation" an-ac="footer" an-la="bottom:sns:youtube" aria-label="youtube : Open in a new window"> <svg class="icon" focusable="false"> <use xlink:href="#youtube-bold" href="#youtube-bold"></use> </svg> </a> </li> <li class="footer-sns__item" role="listitem"> <a class="footer-sns__link" href="https://www.linkedin.com/company/samsung-electronics" target="_blank" rel="noreferrer noopener" an-tr="nv02_footer bottom--cta-sns" an-ca="navigation" an-ac="footer" an-la="bottom:sns:linkedin" aria-label="linkedin : Open in a new window"> <svg class="icon" focusable="false"> <use xlink:href="#linked-in-bold" href="#linked-in-bold"></use> </svg> </a> </li> </ul> </div> </div> </div> </div> </footer> <button class="fab" an-tr="nv02_footer bottom--text-back to top" an-ca="indication" an-ac="back to top" an-la="back to top" title="Go to Top">Go to Top <svg class="fab__icon" focusable="false"> <use xlink:href="#up-highest-bold" href="#up-highest-bold"></use> </svg> </button> <!--googleon: all--> <script src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-dependencies.min.js"></script> <script src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-base-new-gnb.min.js"></script> <!-- <sly data-sly-test="false"> <script type="text/javascript" src='/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-site/resources/au/js/au.js'></script> </sly> --> <!--[if lt IE 9]> <script src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/ie9/html5.js"></script> <![endif]--> <!--[if lte IE 9]> <script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/jquery-ajaxtransport-xdomainrequest/1.0.3/jquery.xdomainrequest.min.js'></script> <![endif]--> <input type="hidden" name="isGpv2Flag" id="isGpv2Flag" value="N"/> <input type="hidden" name="isNewHybrisFlag" id="isNewHybrisFlag" value="Y"/> <section class="pd-get-stock-alert-popup" role="dialog" aria-modal="true" style="display: none"> <div class="pd-get-stock-alert-popup__dimmed"></div> <div class="pd-get-stock-alert-popup__contents"> <div class="scrollbar"> <div class="pd-get-stock-alert-popup__inner-wrap scrollbar__contents"> <div class="pd-get-stock-alert-popup__header"> <h2 class="text-title">Get stock alerts</h2> <p class="pd-get-stock-alert-popup__desc">Provide your email address below to be notified when this item is back in stock and available to buy.</p> </div> <div class="pd-get-stock-alert-popup__text-field-wrap"> <!-- <div class="text-field"> --> <!-- <label for="getStockAlertEmailInput">Enter Your Email</label> --> <!-- <input id="getStockAlertEmailInput" type="text" autocomplete="off"> --> <!-- <svg class="icon"> --> <!-- <use xlink:href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/svg-sprite.svg#delete-bold"></use> --> <!-- </svg> --> <!-- <sly data-sly-test="false"> --> <!-- <p class="error-message">Please make sure you have provided the correct address.</p> --> <!-- </sly> --> <!-- <sly data-sly-test="true"> --> <!-- <p class="error-message">Please double check your email address.</p> --> <!-- </sly> --> <!-- </div> --> <div class="text-field-v2"> <label class="text-field-v2__hint" for="getStockAlertEmailInput">Enter Your Email</label> <div class="text-field-v2__input-wrap"> <input class="text-field-v2__input" id="getStockAlertEmailInput" type="text" value="" autocomplete="email"/> <button class="text-field-v2__input-icon delete" aria-label="Delete" type="button"> <svg class="icon delete" focusable="false" aria-hidden="true"> <use xlink:href="#cancel-bold" href="#cancel-bold"></use> </svg> </button> <div class="text-field-v2__input-icon error"> <svg class="icon error" focusable="false" aria-hidden="true"> <use xlink:href="#information-error-bold" href="#information-error-bold"></use> </svg> </div> </div> <p class="text-field-v2__text error" id="getstock-popup-error-txt">Please double check your email address.</p> </div> </div> <div class="pd-get-stock-alert-popup__checkbox-container"> </div> <div class="pd-get-stock-alert-popup__disclaimer"> <p class="pd-get-stock-alert-popup__disclaimer-text"></p> </div> </div> </div> <div class="pd-get-stock-alert-popup__btn-wrap"> <button class="pd-get-stock-alert-popup__btn-close cta cta--outlined cta--black" an-tr="pd03_product finder:stock alert-microsite-cta-popup" an-ca="buy cta" an-ac="stock alert" an-la="stock alert:close">Close</button> <button class="pd-get-stock-alert-popup__btn-submit cta cta--contained cta--emphasis cta--disabled" disabled an-tr="pd03_product finder:stock alert-microsite-cta-popup" an-ca="buy cta" an-ac="stock alert" an-la="stock alert:submit">Submit</button> </div> <button class="pd-get-stock-alert-popup__close" an-tr="pd03_product finder:stock alert-microsite-cta-popup" an-ca="buy cta" an-ac="stock alert" an-la="stock alert:close"> <span class="hidden">Close popup</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> <div class="pd-get-stock-alert-popup__final-wrap"> <div class="pd-get-stock-alert-popup__final"> <p class="pd-get-stock-alert-popup__final-desc"> We will email you when inventory is added. <br/>Thank you. </p> <div class="pd-get-stock-alert-popup__final-btn-wrap"> <button class="pd-get-stock-alert-popup__final-btn-close cta cta--contained cta--emphasis">Submit</button> </div> <button class="pd-get-stock-alert-popup__close"> <span class="hidden">Close popup</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </section> <div class="confirm-popup" style="display: none" role="dialog" aria-modal="true"> <div class="confirm-popup__dimmed"></div> <div class="confirm-popup__content"> <div class="confirm-popup__content-inner"> <strong class="confirm-popup__title"></strong> <div class="confirm-popup__desc"></div> <div class="confirm-popup__disclaimer"></div> <div class="confirm-popup__cta-wrap"> <button class="cta cta--outlined cta--black"></button> <button class="cta cta--contained cta--emphasis"></button> </div> <button class="confirm-popup__close"> <svg class="icon"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> <span class="hidden">Close</span> </button> </div> </div> </div> <input type="hidden" value="/uk/web/my-wishlist/" id="WishlistPopupUrl"/> <div class="wishlist-popup"> <div class="layer-popup" id="wishlist-popup" role="dialog" style="display:block" aria-modal="true"> <div class="layer-popup__inner"> <div class="layer-popup__contents"> <h2 class="layer-popup__title"></h2> <div class="wishlist-popup__desc"></div> <div class="wishlist-popup__selectbox__wrap"> <div class="wishlist-popup__selectbox"> <div class="wishlist-popup__selectbox-inner"> <div class="menu filled"> <select class="menu__select" data-default-message="My Wishlist" tabindex="-1"> <option value="">My Wishlist 1</option> <option value="">My Wishlist 2</option> <option value="">My Wishlist 3</option> <option value="">My Wishlist 4</option> <option value="">My Wishlist 5</option> <option value="">My Wishlist 6</option> <option value="">My Wishlist 7</option> <option value="">My Wishlist 8</option> <option value="">My Wishlist 9</option> </select> <button class="menu__select-field" aria-haspopup="listbox" aria-expanded="false"> <span class="menu__select-field-text"></span> <svg class="menu__select-field-icon down" focusable="false" aria-hidden="true"> <use xlink:href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/svg-sprite.svg#open-down-bold"></use> </svg> <svg class="menu__select-field-icon up" focusable="false" aria-hidden="true"> <use xlink:href="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-common/resources/images/svg-sprite.svg#close-up-bold"></use> </svg> </button> </div> </div> </div> </div> </div> <div class="wishlist-popup__cta-wrap"> <div class="wishlist-popup__cta"> <a class="cta cta--outlined cta--black" href="#" role="button" aria-label="Link Title"></a> </div> <div class="wishlist-popup__cta"> <a class="cta cta--contained cta--emphasis" href="#" role="button"></a> </div> </div> <button type="button" class="layer-popup__close wishlist-popup__close"> <span class="hidden">Close popup</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </div> <style> #wtb-id-span { display: none; } .modal-container { position: relative; } .modal-window, .modal-overlay { display: none; } .modal-open { overflow: hidden; max-height: 100vh !important; margin: 0 !important; } .modal-open .modal-overlay { display: block; position: fixed; z-index: 10000; top: 0; left: 0; width: 100vw; height: 100%; opacity: 0.6; background: #000; } .modal-open .modal-window { display: block; position: fixed; z-index: 10001; top: 0; right: 0; bottom: 0; left: 0; overflow: hidden; overflow-x: hidden; overflow-y: auto; outline: 0; } .modal-open .internal-container { position: absolute; z-index: 5001; top: 5px; left: 50%; width: calc(100% - 10px); max-width: 1140px; min-height: 200px; max-height: calc(100vh - 10px); /* padding: 1.5625rem 1.25rem; */ overflow-y: auto; overflow-x: hidden; transform: translateX(-50%); background: #fff; } .modal-open .internal-container .tab{ height: auto; } @media screen and (min-width: 760px) { .modal-open .internal-container { width: calc(100% - 30px); max-height: calc(100vh - 30px); } .modal-open .internal-container .tab{ height: auto; } } .modal-open .close-button { display: flex; position: relative; justify-content: center; width: 20px; height: 20px; font-size: 26px; font-weight: bold; cursor: pointer; z-index: 1; } @media screen and (min-width: 760px) { .modal-open .close-button { position: sticky; top: 1rem; margin: 1rem 1rem auto auto; } _:-ms-fullscreen, :root .modal-open .close-button { position: absolute; right: 20px; } .modal-open .internal-container .tab{ height: auto; } } .modal-open .close-button img { width: 100%; z-index: -1; } .modal-open .close-button:hover { transition: color 0.3s; color: lighten(#000, 50%); } .modal-top-bar { display: flex; align-items: center; justify-content: flex-end; position: relative; padding: 15px 15px 5px 0; } .modal-title { margin: 0; margin-left: 0.4375rem; } .cciw-overlay { z-index: 5001 !important; } #ps-lightbox-background { z-index: 5001 !important; } .mfp-bg { z-index: 5001 !important; } .ps-container { z-index: 5002 !important; } .mfp-wrap { z-index: 5002 !important; } </style> <script defer src="//maps.googleapis.com/maps/api/js?region=kr&client=gme-samsungsds&libraries=places&callback=Function.prototype" type="text/javascript"></script> <div class="where-to-buy"></div> <input type="hidden" name="useNewWtb" id="useNewWtb" value="Y"/> <input type="hidden" name="searchApiDomain" id="searchApiDomain" value="//searchapi.samsung.com/v6"/> <input type="hidden" name="buyinstoreRedirectYN" id="buyinstoreRedirectYN" value="N"/> <input type="hidden" id="rtlValue"/> <input type="hidden" name="current_model_code" id="current_model_code"/> <input type="hidden" id="wtbCurrentPagePath" value="/content/samsung/uk/laptop-buying-guide"/> <section class="ftd18-register-product popup" role="dialog" aria-modal="true" data-comp-name="popup" data-auto-init="false" id="ftd18RegisterProduct"> <div class="popup__dimmed"></div> <div class="popup__contents-wrap"> <div class="popup__contents"> <div class="popup__inner-wrap"> <div class="popup__inner"> <div class="ftd18-register-product-popup" data-comp-name="registerProduct" data-auto-init="false"> <div class="ftd18-register-product__step-1 show"> <h2 class="ftd18-register-product__title">Product Registration</h2> <p class="ftd18-register-product__desc" data-js-action="RegisterDescription">Quick-and-easy product registration..<br/>Receive up-to-date personalised services and tips.</p> <div class="ftd18-register-product__step-1-inner"> <div class="ftd18-register-product__step-1__reg-list" role="list"> <div class="ftd18-register-product__step-1__reg" role="listitem"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#retention-registration-step01-serialnumber" href="#retention-registration-step01-serialnumber"></use> </svg> <div class="ftd18-register-product__step-1__reg__inner"> <strong class="ftd18-register-product__step-1__reg__title">Serial Number / IMEI</strong> <p class="ftd18-register-product__step-1__reg__desc">Enter your Serial Number/IMEI</p> <button class="cta cta--contained cta--black" data-js-action="serialnumberBtn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:product registration:enter serial number/imei"> Enter serial number/IMEI </button> </div> </div> <div class="ftd18-register-product__step-1__reg" role="listitem"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#retention-registration-step01-qr" href="#retention-registration-step01-qr"></use> </svg> <div class="ftd18-register-product__step-1__reg__inner"> <strong class="ftd18-register-product__step-1__reg__title">QR Scan</strong> <p class="ftd18-register-product__step-1__reg__desc">Scan the QR code on your products for easy registration.</p> <p class="ftd18-register-product__step-1__reg__sub-desc">* This feature can only be supported on Samsung Home Appliances and non-smart B2C monitors.</p> <button class="cta cta--contained cta--black" data-js-action="qrscanBtn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:product registration:scan qr"> Scan QR code </button> </div> </div> </div> </div> </div> <div class="ftd18-register-product__step-2"> <h2 class="ftd18-register-product__title">Enter your Serial Number/IMEI</h2> <p class="ftd18-register-product__desc myd16-register-description">Quick-and-easy product registration.</p> <div class="ftd18-register-product__step-2-inner"> <div class="text-field-v2" data-comp-name="textFieldv2" data-auto-init="false"> <label class="text-field-v2__hint" for="serial-imei">Serial Number / IMEI</label> <div class="text-field-v2__input-wrap"> <input class="text-field-v2__input" id="serial-imei" type="text" autocomplete="on"/> <button class="text-field-v2__input-icon delete" aria-label="Delete" type="button"> <svg class="icon delete" focusable="false" aria-hidden="true"> <use xlink:href="#cancel-bold" href="#cancel-bold"></use> </svg> </button> <div class="text-field-v2__input-icon error"> <svg class="icon error" focusable="false" aria-hidden="true"> <use xlink:href="#information-error-bold" href="#information-error-bold"></use> </svg> </div> </div> <p class="text-field-v2__text assistive" id="serial-imei-assistive" aria-hidden="true">Please enter the 11 or 15- digit number.</p> <p class="text-field-v2__text error" id="serial-imei-error" aria-hidden="true">This product is already registered. Make sure you entered the right serial number or IMEI.</p> </div> <div class="ftd18-register-product__step-2__how-to-find-model-code"> <button class="ftd18-register-product__step-2__how-to-find-model-code__cta" data-i18n-expand="Expand" data-i18n-collapse="Collapse" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:how to find serial number or imei"> How to find Serial Number or IMEI <span class="hidden">Expand</span> <svg class="icon down" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> <svg class="icon up" focusable="false" aria-hidden="true"> <use xlink:href="#close-up-bold" href="#close-up-bold"></use> </svg> </button> <div class="ftd18-register-product__step-2__how-to-find-model-code-inner"> <div class="ftd18-register-product__step-2__select-wrap"> <ul class="ftd18-register-product__step-2__select-list" role="list"> <li class="ftd18-register-product__step-2__select" role="listitem"> <div class="ftd18-register-product__step-2__select__menu"> <div class="menu menu--text-field" data-comp-name="menu" data-auto-init="false" data-type="textField" data-tagging-button> <select class="menu__select" aria-labelledby="type-hint" tabindex="-1" data-js-action="howToFindTypeSelect"> <option selected value="TV &amp; AV" an-tr="an-tr-tv-av" an-ca="an-ca-tv-av" an-ac="an-ac-tv-av" an-la="an-la-tv-av">TV &amp; AV</option> <option value="Mobile Device" an-tr="an-tr-mobile-device" an-ca="an-ca-mobile-device" an-ac="an-ac-mobile-device" an-la="an-la-mobile-device">Mobile Device</option> <option value="Home Appliance">Home Appliance</option> <option value="PC &amp; Office">PC &amp; Office</option> <option value="Camera &amp; Camcorder">Camera &amp; Camcorder</option> </select> <p id="type-hint" class="menu--text-field__hint">Type </p> <button class="menu__select-field" aria-haspopup="listbox" aria-expanded="false" aria-labelledby="type-hint type-text" type="button"> <span id="type-text" class="menu__select-field-text"></span> <svg class="menu__select-field-icon down" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> <svg class="menu__select-field-icon up" focusable="false" aria-hidden="true"> <use xlink:href="#close-up-bold" href="#close-up-bold"></use> </svg> </button> </div> </div> </li> <li class="ftd18-register-product__step-2__select" role="listitem"> <div class="ftd18-register-product__step-2__select__menu"> <div class="menu menu--text-field" data-comp-name="menu" data-auto-init="false" data-type="textField" data-tagging-button> <select class="menu__select" aria-labelledby="sub-type-hint" tabindex="-1"> <option selected value="Television">Television</option> <option value="Blu-ray">Blu-ray</option> <option value="Home cinema">Home cinema</option> <option value="MP3/MP4 Player">MP3/MP4 Player</option> </select> <p id="sub-type-hint" class="menu--text-field__hint">Sub Type</p> <button class="menu__select-field" aria-haspopup="listbox" aria-expanded="false" aria-labelledby="sub-type-hint sub-type-text" type="button"> <span id="sub-type-text" class="menu__select-field-text"></span> <svg class="menu__select-field-icon down" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> <svg class="menu__select-field-icon up" focusable="false" aria-hidden="true"> <use xlink:href="#close-up-bold" href="#close-up-bold"></use> </svg> </button> </div> </div> </li> <li class="ftd18-register-product__step-2__select" role="listitem"> <div class="ftd18-register-product__step-2__select__menu"> <div class="menu menu--text-field" data-comp-name="menu" data-auto-init="false" data-type="textField" data-tagging-button> <select class="menu__select" aria-labelledby="category-hint" tabindex="-1"> <option selected value="SUHD">SUHD</option> <option value="UHD">UHD</option> <option value="FHD">FHD</option> <option value="HD">HD</option> </select> <p id="category-hint" class="menu--text-field__hint">Category</p> <button class="menu__select-field" aria-haspopup="listbox" aria-expanded="false" aria-labelledby="category-hint category-text" type="button"> <span id="category-text" class="menu__select-field-text"></span> <svg class="menu__select-field-icon down" focusable="false" aria-hidden="true"> <use xlink:href="#open-down-bold" href="#open-down-bold"></use> </svg> <svg class="menu__select-field-icon up" focusable="false" aria-hidden="true"> <use xlink:href="#close-up-bold" href="#close-up-bold"></use> </svg> </button> </div> </div> </li> </ul> </div> <div class="ftd18-register-product__step-2__swiper-wrap"> <div class="ftd18-register-product__step-2__swiper swiper-container basic-swiper" data-swiper-option='{ &quot;slidesPerView&quot;: 1, &quot;keepWrapper&quot;: true, &quot;autoHeight&quot;: true, &quot;loop&quot;: false, &quot;pagination&quot;: true, &quot;componentEl&quot;: &quot;.ftd18-register-product-popup&quot;, &quot;followFinger&quot;: true }' data-comp-name="swiper" data-auto-init="false"> <div class="swiper-wrapper"> <div class="ftd18-register-product__step-2__swiper__slide swiper-slide" data-type-headline="How to find Serial Number or IMEI 1" role="tabpanel" id="slide-0"> <div class="ftd18-register-product__step-2__swiper__slide__image"> <div class="image"> <img class="image__preview lazy-load responsive-img" data-desktop-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" data-mobile-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" alt="" role="img" data-comp-name="image" data-auto-init="false"/> <img class="image__main lazy-load responsive-img" data-desktop-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" data-mobile-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" alt="" role="img" data-comp-name="image" data-auto-init="false"/> </div> </div> <div class="ftd18-register-product__step-2__swiper__slide__title">Back view</div> <div class="ftd18-register-product__step-2__swiper__slide__desc">The serial number and model name are printed on the label located on the lower left side of the device’s exterior, near the front. They are also on a second label, inside the refrigerator compartment on a side wall above the top shelf.</div> </div> <div class="ftd18-register-product__step-2__swiper__slide swiper-slide" data-type-headline="How to find Serial Number or IMEI 2" role="tabpanel" id="slide-1"> <div class="ftd18-register-product__step-2__swiper__slide__image"> <div class="image"> <img class="image__preview lazy-load responsive-img" data-desktop-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" data-mobile-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" alt="" role="img" data-comp-name="image" data-auto-init="false"/> <img class="image__main lazy-load responsive-img" data-desktop-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" data-mobile-src="//images.samsung.com/is/image/samsung/uk-111-105186828?$ORIGIN_PNG$" alt="" role="img" data-comp-name="image" data-auto-init="false"/> </div> </div> <div class="ftd18-register-product__step-2__swiper__slide__title">Back view</div> <div class="ftd18-register-product__step-2__swiper__slide__desc">The serial number and model name are printed on the label located on the lower left side of the device’s exterior, near the front. They are also on a second label, inside the refrigerator compartment on a side wall above the top shelf.</div> </div> </div> </div> <div class="indicator dot-indicator" data-indicator-data='{ &quot;type&quot;: &quot;dot-indicator&quot;, &quot;play&quot;: true, &quot;autoRolling&quot;: false, &quot;infiniteRolling&quot;: false }' data-comp-name="indicator" data-auto-init="false"> <div class="indicator-wrap"> <div class="indicator__list-wrap"> <div class="indicator__list" role="tablist"> <button class="indicator__item" role="tab"> <span class="indicator__dot-wrap"> <span class="indicator__dot"> <span class="indicator__dot-inner"></span> </span> <span class="hidden"></span> </span> </button> </div> </div> </div> </div> </div> </div> </div> </div> <div class="ftd18-register-product__btn-wrap"> <!-- /* button 이 disabled 경우 .cta--disabled 추가, disabled 속성 추가 */--> <button class="cta cta--outlined cta--black" data-action="back" data-js-action="backto1Btn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:back"> Back </button> <!-- /* button 이 disabled 경우 .cta--disabled 추가, disabled 속성 추가 */--> <button class="cta cta--contained cta--black" data-action="check" data-js-action="checkBtn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:check"> Check </button> </div> </div> <div class="ftd18-register-product__step-3"> <h2 class="ftd18-register-product__title">Product registration is almost complete!!</h2> <p class="ftd18-register-product__desc">You&#39;ve entered a valid S/N or IMEI. Now select the model of your product.</p> <div class="ftd18-register-product__step-3-inner"> <div class="ftd18-register-product__step-3__category-list" data-i18n-selected="selected" role="list"> </div> <div class="ftd18-register-product__step-3__search"> <div class="ftd18-register-product__step-3__search__input-container"> <button class="ftd18-register-product__step-3__search__input__back"> <span class="hidden">Back</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#backward-bold" href="#backward-bold"></use> </svg> </button> <div class="ftd18-register-product__step-3__search__input-wrap"> <label class="ftd18-register-product__step-3__search__input-label" for="model-code-search">Enter your Model Number</label> <bdi><input class="ftd18-register-product__step-3__search__input" type="text" id="model-code-search" autocomplete="on"/></bdi> <button class="ftd18-register-product__step-3__search__input-icon delete" aria-label="delete" type="button" an-tr="ftd18_register product popup-microsite-delete-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:delete model number"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#cancel-bold" href="#cancel-bold"></use> </svg> </button> <button class="ftd18-register-product__step-3__search__input-icon search" aria-label="search" type="submit" an-tr="ftd18_register product popup-microsite-delete-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:search model number"> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#search-bold" href="#search-bold"></use> </svg> </button> </div> </div> <h3 class="ftd18-register-product__step-3__search__result__title">Suggested searches</h3> <div class="ftd18-register-product__step-3__search__result-list-wrap scrollbar" data-auto-init="false" data-comp-name="scrollbar" data-auto-resize> <ul class="ftd18-register-product__step-3__search__result-list scrollbar__contents" role="list"> </ul> </div> <div class="ftd18-register-product__step-3__search__result__error" aria-live="polite">No result. Please try again.</div> </div> </div> <div class="ftd18-register-product__btn-wrap"> <button class="cta cta--outlined cta--black" data-action="back" data-js-action="backto2Btn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:back"> Back </button> <button class="cta cta--contained cta--black cta--disabled" disabled data-action="select" data-js-action="selectBtn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:select"> Select </button> </div> </div> </div> </div> </div> <button class="popup__close" an-tr="ftd18_register product popup-microsite-register popup-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </section> <section class="ftd18-register-product-completion popup popup--alert" role="dialog" aria-modal="true" data-comp-name="popup" data-auto-init="false" id="ftd18RegisterProductCompletion"> <div class="popup__dimmed"></div> <div class="popup__contents-wrap"> <div class="popup__contents"> <div class="popup__inner-wrap"> <div class="popup__inner"> <div class="image" data-js-action="ftd18RegisterProductImage"> <img class="image__main lazy-load-man" data-src="https://via.placeholder.com/120x120" alt="" data-comp-name="image" data-auto-init="false"/> </div> <h2 class="ftd18-register-product__title" data-js-action="ftd18RegisterProductTitle">Galaxy Book3 Ultra</h2> <p class="ftd18-register-product__desc" data-js-action="ftd18RegisterProductSku">SM-G996BZKGEUA</p> <p class="ftd18-register-product__desc" data-js-action="ftd18RegisterProductSerial">Serial Number: R3CR508WNAH</p> </div> </div> <div class="popup__btn-wrap"> <button class="cta cta--contained cta--black" data-js-action="confirmBtn" an-tr="ftd18_register product popup-microsite-cta-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:confirm"> Confirm </button> </div> <button class="popup__close" an-tr="ftd18_register product popup-microsite-register popup-content_click" an-ca="content click" an-ac="feature" an-la="registration popup:close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </section> <section class="ftd18-register-product-qr-scan-error popup popup--alert" role="dialog" aria-modal="true" data-comp-name="popup" data-auto-init="false" id="ftd18RegisterProductQRScanError"> <div class="popup__dimmed"></div> <div class="popup__contents-wrap"> <div class="popup__contents"> <div class="popup__inner-wrap"> <div class="popup__inner"> <h2 class="ftd18-register-product__title">The device you are currently using does not support the camera function.</h2> <p class="ftd18-register-product__desc">Please try again with a different device.</p> </div> </div> <div class="popup__btn-wrap"> <button class="cta cta--contained cta--black" data-js-action="alertBtn" data-action="confirm" an-tr="ftd18_register product popup-microsite-error pop up-content_click" an-ca="content click" an-ac="feature" an-la="error popup:confirm"> Confirm </button> </div> <button class="popup__close"> <span class="hidden">Close</span> <svg class="icon" focusable="false" aria-hidden="true"> <use xlink:href="#delete-bold" href="#delete-bold"></use> </svg> </button> </div> </div> </section> <script src="/etc.clientlibs/samsung/clientlibs/consumer/global/clientlib-templates/page-static-gnb/compact.min.js"></script> <script src="/etc.clientlibs/samsung/components/content/consumer/global/product-popup/pd-g-register-product-popup/clientlibs/site.min.js"></script> <script src="/etc.clientlibs/samsung/components/content/epp/common/ep-cm-g-barcode-scanner-popup/clientlibs/site.min.js"></script> <script src="/etc.clientlibs/samsung/components/content/consumer/global/common/cm-g-static-content/clientlibs/site.min.js" async></script> <script type="application/ld+json" data-type="seo" data-object-type="WebPage" data-id="80875ea0-15d1-4161-ab12-743fdae9c53a">{"@context":"http://schema.org","@type":"WebPage","name":"Laptop Buying Guide | Pick the Best Laptop | Samsung UK","url":"https://www.samsung.com/uk/laptop-buying-guide/"}</script> </div> </body> </html>

Pages: 1 2 3 4 5 6 7 8 9 10