// ==UserScript== // @name YouTube Better Start Page (YTBSP) // @description Spotlights all subscriptions in an organized fashion on the start page of YouTube. // @version 3.2.9 // @author Crow08, dzre, Nemo64 // @namespace ytbsp // @include https://youtube.com/* // @include https://www.youtube.com/* // @downloadURL https://raw.githubusercontent.com/Crow08/YTBSP/master/dist/ytbsp.user.js // @updateURL https://raw.githubusercontent.com/Crow08/YTBSP/master/dist/ytbsp.meta.js // @grant none // @run-at document-start // @noframes // ==/UserScript== /* MIT License Copyright (c) 2024 Kevin Hertfelder Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*! * jQuery JavaScript Library v4.0.0+slim * https://jquery.com/ * * Copyright OpenJS Foundation and other contributors * Released under the MIT license * https://jquery.com/license/ * * Date: 2026-01-18T00:20Z */ /*! For license information please see main.js.LICENSE.txt */ (()=>{"use strict";var e={478(e,t,n){var i=n(601),o=n.n(i),r=n(314),s=n.n(r)()(o());s.push([e.id,'ytd-app[guide-persistent-and-visible] #YTBSP {\n margin-left: 240px;\n}\nytd-app[mini-guide-visible] #YTBSP {\n margin-left: var(--ytd-mini-guide-width);\n}\n#YTBSP {\n margin-top: 56px;\n min-height: 22px;\n display: block;\n}\n.ytbsp-chip-btn {\n background-color: var(--yt-spec-badge-chip-background);\n color: var(--yt-spec-text-primary);\n padding: 0 var(--ytd-margin-3x);\n transition: background-color 0.5s cubic-bezier(0.05, 0, 0, 1);\n line-height: 32px;\n border-radius: 8px;\n font-weight: 500;\n align-items: center;\n display: flex;\n}\n#ytbsp-fixedBar {\n position: fixed;\n top: 30px;\n left: 185px;\n align-items: center;\n display: flex;\n height: 22px;\n z-index: 3500;\n margin-left: -240px;\n padding-left: 255px;\n}\n#ytbsp-fixedChip {\n display: flex;\n}\n#ytbsp-subsWrapper {\n padding-left: 60px;\n padding-top: 50px;\n}\n#ytbsp-subsMenuStrip {\n white-space: nowrap;\n margin-top: -40px;\n position: fixed;\n z-index: 3000;\n}\n#ytbsp-subsList {\n overflow: visible;\n padding: 0px;\n list-style-type: none;\n margin: auto;\n}\n.ytbsp-subMenuStrip {\n height: 25px;\n margin: 4px 4px 3px;\n}\n.ytbsp-subscription {\n padding: 0 4px;\n margin-top: -1px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n border-top-style: solid;\n border-top-width: 1px;\n}\n.ytbsp-dark-theme .ytbsp-subscription {\n border-color: #2c2c2c;\n}\n.ytbsp-light-theme .ytbsp-subscription {\n border-color: #e2e2e2;\n}\n.ytbsp-subVideos {\n padding: 0px;\n margin: 10px 0;\n transition: height 5s;\n -webkit-transition: height 5s;\n -moz-transition: height 5s;\n -o-transition: height 5s;\n}\n.ytbsp-video-item {\n display: inline-block;\n width: 160px;\n height: 185px;\n padding: 0 4px;\n overflow: visible;\n vertical-align: top;\n}\n.ytbsp-video-item .ytbsp-title {\n display: block;\n padding-top: 5px;\n height: 3.2rem;\n overflow: hidden;\n text-decoration: none;\n font-size: 1.4rem;\n line-height: 1.6rem;\n font-weight: 500;\n position: relative;\n}\n.ytbsp-dark-theme .ytbsp-video-item .ytbsp-title {\n color: #e1e1e1;\n}\n.ytbsp-light-theme .ytbsp-video-item .ytbsp-title {\n color: #111111;\n}\n.ytbsp-video-item .ytbsp-title-large {\n position: relative;\n z-index: 4000;\n text-align: center;\n border-width: 0px 2px 2px 2px;\n border-style: solid;\n padding: 2px;\n}\n.ytbsp-dark-theme .ytbsp-video-item .ytbsp-title-large {\n background: #252525;\n}\n.ytbsp-light-theme .ytbsp-video-item .ytbsp-title-large {\n background: #f5f5f5;\n}\n.ytbsp-dark-theme .ytbsp-video-item .ytbsp-title-large {\n border-color: #737373;\n}\n.ytbsp-light-theme .ytbsp-video-item .ytbsp-title-large {\n border-color: #737373;\n}\n.ytbsp-subTitle a {\n padding-top: 6px;\n position: absolute;\n text-decoration: none;\n font-size: 1.6rem;\n font-weight: 500;\n}\n.ytbsp-dark-theme .ytbsp-subTitle a {\n color: #e1e1e1;\n}\n.ytbsp-light-theme .ytbsp-subTitle a {\n color: #111111;\n}\n.ytbsp-clip {\n position: relative;\n width: 160px;\n height: 90px;\n border: none;\n cursor: pointer;\n display: block;\n}\n.ytbsp-clip > img {\n max-height: 100%;\n}\n.ytbsp-clip-large {\n z-index: 4000;\n top: -45px;\n margin-bottom: -45px;\n border: none;\n}\n.ytbsp-x {\n position: absolute;\n z-index: 2000;\n top: 2%;\n right: 1%;\n opacity: 0;\n width: 17px;\n height: 17px;\n line-height: 16px;\n text-align: center;\n background-color: #000;\n color: #fff;\n font-size: 15px;\n font-weight: bold;\n border-radius: 3px;\n -moz-border-radius: 3px;\n display: block;\n cursor: pointer;\n}\n.ytbsp-video-item:hover .ytbsp-x {\n opacity: 0.6;\n}\n.ytbsp-video-item:hover .ytbsp-x:hover {\n opacity: 1;\n}\n.ytbsp-thumb {\n display: block;\n position: absolute;\n height: 90px;\n width: 160px;\n}\n.ytbsp-duration {\n position: absolute;\n z-index: 1;\n bottom: 2%;\n right: 1%;\n padding: 1px 4px;\n background-color: rgba(0, 0, 0, 0.8);\n color: #fff;\n font-size: 1.2rem;\n font-weight: 500;\n border-radius: 3px;\n -moz-border-radius: 3px;\n}\n.ytbsp-duration:empty {\n display: none;\n}\n.ytbsp-thumb-large {\n top: 1px;\n border-width: 2px;\n border-style: solid;\n}\n.ytbsp-dark-theme .ytbsp-thumb-large {\n border-color: #737373;\n}\n.ytbsp-light-theme .ytbsp-thumb-large {\n border-color: #737373;\n}\n.ytbsp-premiere {\n opacity: 25%;\n}\n.ytbsp-views,\n.ytbsp-uploaded {\n display: block;\n margin: 5px 0px 0px 0px;\n font-size: 1.2rem;\n}\n.ytbsp-dark-theme .ytbsp-views,\n.ytbsp-dark-theme .ytbsp-uploaded {\n color: #888888;\n}\n.ytbsp-light-theme .ytbsp-views,\n.ytbsp-light-theme .ytbsp-uploaded {\n color: #11111199;\n}\n.ytbsp-views:after {\n content: "•";\n margin: 0 4px;\n}\n.ytbsp-seenMarker {\n font-size: 1.2rem;\n background-color: transparent;\n padding: 1px 0px;\n margin: 5px 0px 0px 0px;\n text-align: center;\n opacity: 0.88;\n cursor: pointer;\n display: inline-block;\n line-height: 17px;\n}\n.ytbsp-dark-theme .ytbsp-seenMarker {\n color: #ffffffff;\n}\n.ytbsp-light-theme .ytbsp-seenMarker {\n color: #141414;\n}\n.ytbsp-seenMarker:hover {\n opacity: 1;\n}\n.ytbsp-seenMarker:active {\n opacity: 0.4;\n}\n.ytbsp-seenMarker.seen {\n opacity: 1;\n font-weight: 500;\n background-color: #474747;\n}\n.ytbsp-seenMarker.seen:hover {\n opacity: 0.6;\n}\n.ytbsp-spacer {\n color: white;\n font-size: 1.2rem;\n}\n.ytbsp-func {\n cursor: pointer;\n display: inline-block;\n border: none;\n z-index: 1000;\n opacity: 0.88;\n background-color: transparent;\n padding: 1px 10px;\n margin: 0px 2px;\n font-size: 1.4rem;\n font-weight: 400;\n font-family: Roboto, Noto, sans-serif;\n}\n.ytbsp-dark-theme .ytbsp-func {\n color: #ffffffff;\n}\n.ytbsp-light-theme .ytbsp-func {\n color: #141414;\n}\n.ytbsp-func:hover {\n opacity: 1;\n}\n.ytbsp-func:active {\n opacity: 0.6;\n}\nlabel.ytbsp-func {\n padding-top: 3px;\n}\n.ytbsp-func:focus {\n outline-style: none;\n}\n.ytbsp-func input {\n vertical-align: middle;\n margin: -2px 5px -1px 0px;\n}\n#ytbsp-subsList.ytbsp-sortMode > li > div > div > .ytbsp-func.ytbsp-sortBtn {\n display: inline-block;\n}\n.ytbsp-func.ytbsp-sortBtn {\n display: none;\n}\n.ytbsp-loaderDiv {\n float: left;\n width: 16px;\n height: 16px;\n margin-right: 5px;\n transition: width 0.2s;\n -webkit-transition: width 0.2s;\n -moz-transition: width 0.2s;\n -o-transition: width 0.2s;\n padding-top: 6px;\n}\n#ytbsp-loaderSpan {\n margin: 2px 0px -2px 1px;\n display: inline-block;\n}\n#ytbsp-loaderSpan > .ytbsp-loaderDiv {\n margin-top: -6px;\n}\n#ytbsp-refresh {\n display: none;\n padding: 1px 3px;\n}\n.ytbsp-loader {\n border: 3px solid #555;\n border-right-color: #bbb;\n border-left-color: #bbb;\n border-radius: 50%;\n width: 10px;\n height: 10px;\n animation: spin 1s linear infinite;\n transition: opacity 0.2s;\n -webkit-transition: opacity 0.2s;\n -moz-transition: opacity 0.2s;\n -o-transition: opacity 0.2s;\n}\n@keyframes spin {\n 0% {\n transform: rotate(0deg);\n }\n 100% {\n transform: rotate(360deg);\n }\n}\n.ytbsp-slider {\n display: flex;\n align-items: center;\n padding: 0px 10px;\n width: 30px;\n cursor: pointer;\n}\n.ytbsp-slider-rail {\n position: absolute;\n width: 26px;\n height: 10px;\n border-radius: 8px;\n opacity: 0.2;\n -webkit-transition: 0.1s;\n transition: 0.1s;\n background-color: #737373;\n}\n.ytbsp-slider-knob {\n position: relative;\n display: flex;\n align-items: center;\n left: -4px;\n height: 16px;\n width: 16px;\n border-radius: 50%;\n background-color: #fff;\n box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.6);\n -webkit-transition: 0.4s;\n transition: 0.4s;\n}\n.ytbsp-slider-cb:checked ~ .ytbsp-slider-knob {\n left: 12px;\n}\n.ytbsp-slider-cb:checked ~ .ytbsp-slider-rail {\n opacity: 0.9;\n -webkit-transition: 0.8s;\n transition: 0.8s;\n}\n.ytbsp-dark-theme .ytbsp-slider-cb:checked ~ .ytbsp-slider-rail {\n background-color: #e1e1e1;\n}\n.ytbsp-light-theme .ytbsp-slider-cb:checked ~ .ytbsp-slider-rail {\n background-color: #111111;\n}\n.ytbsp-slider-cb {\n display: none;\n}\n#ytbsp-modal {\n position: fixed;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n background-color: rgba(0, 0, 0, 0.4);\n z-index: 3000;\n transition: opacity 0.2s;\n -webkit-transition: opacity 0.2s;\n -moz-transition: opacity 0.2s;\n -o-transition: opacity 0.2s;\n opacity: 0;\n overflow: auto;\n display: none;\n}\n#ytbsp-modal-content {\n width: 600px;\n min-height: 20px;\n margin: 90px auto 0;\n padding: 10px;\n position: sticky;\n top: 60px;\n -moz-border-radius: 3px;\n border-radius: 3px;\n box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);\n}\n.ytbsp-dark-theme #ytbsp-modal-content {\n background: #252525;\n}\n.ytbsp-light-theme #ytbsp-modal-content {\n background: #f5f5f5;\n}\n#ytbsp-modal-content textarea {\n width: 595px;\n height: 400px;\n resize: none;\n margin: 20px 0;\n}\n#ytbsp-modal-content p,\n#ytbsp-modal-content h1,\n#ytbsp-modal-content h2 {\n font-weight: 400;\n}\n.ytbsp-dark-theme #ytbsp-modal-content p,\n.ytbsp-dark-theme #ytbsp-modal-content h1,\n.ytbsp-dark-theme #ytbsp-modal-content h2 {\n color: #e1e1e1;\n}\n.ytbsp-light-theme #ytbsp-modal-content p,\n.ytbsp-light-theme #ytbsp-modal-content h1,\n.ytbsp-light-theme #ytbsp-modal-content h2 {\n color: #111111;\n}\n#ytbsp-modal-content h2 {\n display: inline-block;\n}\n#ytbsp-modal-end-div {\n display: inline-block;\n width: 100%;\n}\n#ytbsp-modal-end-div input {\n float: right;\n}\n#ytbsp-settings-table {\n margin: 10px 0px;\n border-collapse: collapse;\n}\n.ytbsp-dark-theme #ytbsp-settings-table {\n color: #e1e1e1;\n}\n.ytbsp-light-theme #ytbsp-settings-table {\n color: #111111;\n}\n#ytbsp-settings-table tr {\n min-height: 45px;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n}\n.ytbsp-dark-theme #ytbsp-settings-table tr {\n border-color: #2c2c2c;\n}\n.ytbsp-light-theme #ytbsp-settings-table tr {\n border-color: #e2e2e2;\n}\n#ytbsp-settings-table td {\n font-size: 1.4rem;\n padding: 5px;\n min-width: 80px;\n}\n#ytbsp-settings-table td:nth-child(3) {\n font-size: 1rem;\n}\n#ytbsp-settings-table input[type="number"] {\n width: 50px;\n}\n#ytbsp-peekplayer-overlay {\n position: fixed;\n right: 20px;\n bottom: 20px;\n z-index: 11;\n}\n#ytbsp-peekplayer-overlay-player-control {\n position: absolute;\n left: 0px;\n bottom: 0px;\n z-index: 12;\n cursor: pointer;\n}\n#ytbsp-backup-content p {\n font-size: 14px;\n font-weight: lighter;\n line-height: 20px;\n padding: 10px;\n}\n#ytbsp-backupBtn {\n background: #fff3;\n border-radius: 2px;\n}\n.ytbsp-play-pause-icon {\n cursor: pointer;\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n margin: auto;\n width: 16px;\n height: 24px;\n}\n.ytbsp-play-pause-icon::before,\n.ytbsp-play-pause-icon::after {\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n}\n.ytbsp-play-pause-icon::before {\n content: "";\n left: 0;\n transition: all 0.2s linear;\n width: 0;\n height: 12px;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 8px solid #ccc;\n}\n.ytbsp-play-pause-icon::after {\n content: "";\n right: 0;\n transition: all 0.3s;\n width: 0;\n height: 0;\n border-top: 6px solid transparent;\n border-bottom: 6px solid transparent;\n border-left: 8px solid #ccc;\n}\n.ytbsp-play-pause-icon.ytbsp-pause::before {\n border-top-width: 0;\n border-bottom-width: 0;\n border-left-width: 5.3px;\n height: 100%;\n}\n.ytbsp-play-pause-icon.ytbsp-pause::after {\n border-top-width: 0;\n border-bottom-width: 0;\n border-left-width: 5.3px;\n height: 100%;\n}\n',""]);const a=s;n.d(t,["A",0,a])},314(e){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n="",i=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),i&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),i&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n}).join("")},t.i=function(e,n,i,o,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(i)for(var a=0;a0?" ".concat(p[5]):""," {").concat(p[1],"}")),p[5]=r),n&&(p[2]?(p[1]="@media ".concat(p[2]," {").concat(p[1],"}"),p[2]=n):p[2]=n),o&&(p[4]?(p[1]="@supports (".concat(p[4],") {").concat(p[1],"}"),p[4]=o):p[4]="".concat(o)),t.push(p))}},t}},601(e){e.exports=function(e){return e[1]}},72(e){var t=[];function n(e){for(var n=-1,i=0;i0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),t.styleTagTransform(i,e,t.options)}(t,e,n)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},113(e){e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}};const t={};function n(i){const o=t[i];if(void 0!==o)return o.exports;const r=t[i]={id:i,exports:{}};return e[i](r,r.exports,n),r.exports}n.n=e=>{const t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{if(Array.isArray(t))for(var i=0;iObject.prototype.hasOwnProperty.call(e,t),n.dn=e=>{(Object.getOwnPropertyDescriptor(e,"name")||{}).writable||Object.defineProperty(e,"name",{value:"default",configurable:!0})},n.nc=void 0;var i=function(e){if(void 0===e||!e.document)throw new Error("jQuery requires a window with a document");var t=[],n=Object.getPrototypeOf,i=t.slice,o=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},r=t.push,s=t.indexOf,a={},l=a.toString,d=a.hasOwnProperty,p=d.toString,c=p.call(Object),u={};function h(e){return null==e?e+"":"object"==typeof e?a[l.call(e)]||"object":typeof e}function f(e){return null!=e&&e===e.window}function m(e){var t=!!e&&e.length,n=h(e);return"function"!=typeof e&&!f(e)&&("array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e)}var g=e.document,y={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var i,o=(n=n||g).createElement("script");for(i in o.text=e,y)t&&t[i]&&(o[i]=t[i]);n.head.appendChild(o).parentNode&&o.parentNode.removeChild(o)}var v="4.0.0+slim",x=/HTML$/i,S=function(e,t){return new S.fn.init(e,t)};function w(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()}S.fn=S.prototype={jquery:v,constructor:S,length:0,toArray:function(){return i.call(this)},get:function(e){return null==e?i.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(e){return this.pushStack(S.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(i.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(n>=0&&n+~]|"+I+")"+I+"*"),V=new RegExp(I+"|>"),D=/[+~]/,O=g.documentElement,N=O.matches||O.msMatchesSelector;function A(){var e=[];return function t(n,i){return e.push(n+" ")>S.expr.cacheLength&&delete t[e.shift()],t[n+" "]=i}}function M(e){return e&&void 0!==e.getElementsByTagName&&e}var R="\\["+I+"*("+E+")(?:"+I+"*([*^$|!~]?=)"+I+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+E+"))|)"+I+"*\\]",B=":("+E+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+R+")*)|.*)\\)|)",j={ID:new RegExp("^#("+E+")"),CLASS:new RegExp("^\\.("+E+")"),TAG:new RegExp("^("+E+"|[*])"),ATTR:new RegExp("^"+R),PSEUDO:new RegExp("^"+B),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+I+"*(even|odd|(([+-]|)(\\d*)n|)"+I+"*(?:([+-]|)"+I+"*(\\d+)|))"+I+"*\\)|)","i")},F=new RegExp(B),_=new RegExp("\\\\[\\da-fA-F]{1,6}"+I+"?|\\\\([^\\r\\n\\f])","g"),$=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))};function H(e){return e.replace(_,$)}function U(e){S.error("Syntax error, unrecognized expression: "+e)}var z=new RegExp("^"+I+"*,"+I+"*"),Y=A();function Q(e,t){var n,i,o,r,s,a,l,d=Y[e+" "];if(d)return t?0:d.slice(0);for(s=e,a=[],l=S.expr.preFilter;s;){for(r in n&&!(i=z.exec(s))||(i&&(s=s.slice(i[0].length)||s),a.push(o=[])),n=!1,(i=L.exec(s))&&(n=i.shift(),o.push({value:n,type:i[0].replace(P," ")}),s=s.slice(n.length)),j)!(i=S.expr.match[r].exec(s))||l[r]&&!(i=l[r](i))||(n=i.shift(),o.push({value:n,type:r,matches:i}),s=s.slice(n.length));if(!n)break}return t?s.length:s?U(e):Y(e,a).slice(0)}var q={ATTR:function(e){return e[1]=H(e[1]),e[3]=H(e[3]||e[4]||e[5]||""),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||U(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&U(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return j.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&F.test(n)&&(t=Q(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}};function W(e){for(var t=0,n=e.length,i="";t1)},removeAttr:function(e){return this.each(function(){S.removeAttr(this,e)})}}),S.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return void 0===e.getAttribute?S.prop(e,t,n):(1===r&&S.isXMLDoc(e)||(o=S.attrHooks[t.toLowerCase()]),void 0!==n?null===n||!1===n&&0!==t.toLowerCase().indexOf("aria-")?void S.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=e.getAttribute(t))??void 0)},attrHooks:{},removeAttr:function(e,t){var n,i=0,o=t&&t.match(J);if(o&&1===e.nodeType)for(;n=o[i++];)e.removeAttribute(n)}}),k&&(S.attrHooks.type={set:function(e,t){if("radio"===t&&w(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}});var X=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function K(e,t){return t?"\0"===e?"�":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e}S.escapeSelector=function(e){return(e+"").replace(X,K)};var Z,ee=t.sort,te=t.splice;function ne(e,t){if(e===t)return Z=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)?e==g||e.ownerDocument==g&&S.contains(g,e)?-1:t==g||t.ownerDocument==g&&S.contains(g,t)?1:0:4&n?-1:1)}S.uniqueSort=function(e){var t,n=[],i=0,o=0;if(Z=!1,ee.call(e,ne),Z){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)te.call(e,n[i],1)}return e},S.fn.uniqueSort=function(){return this.pushStack(S.uniqueSort(i.apply(this)))};var ie,oe,re,se,ae,le=0,de=0,pe=A(),ce=A(),ue=A(),he=new RegExp(I+"+","g"),fe=new RegExp("^"+E+"$"),me=S.extend({needsContext:new RegExp("^"+I+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+I+"*((?:-\\d)?\\d*)"+I+"*\\)|)(?=[^-]|$)","i")},j),ge=/^(?:input|select|textarea|button)$/i,ye=/^h\d$/i,be=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=function(){Pe()},xe=Le(function(e){return!0===e.disabled&&w(e,"fieldset")},{dir:"parentNode",next:"legend"});function Se(e,t,n,i){var o,s,a,l,d,p,c,u=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!i&&(Pe(t),t=t||re,ae)){if(11!==h&&(d=be.exec(e)))if(o=d[1]){if(9===h)return(a=t.getElementById(o))&&r.call(n,a),n;if(u&&(a=u.getElementById(o))&&S.contains(t,a))return r.call(n,a),n}else{if(d[2])return r.apply(n,t.getElementsByTagName(e)),n;if((o=d[3])&&t.getElementsByClassName)return r.apply(n,t.getElementsByClassName(o)),n}if(!(ue[e+" "]||C&&C.test(e))){if(c=e,u=t,1===h&&(V.test(e)||L.test(e))){for(((u=D.test(e)&&M(t.parentNode)||t)!=t||k)&&((l=t.getAttribute("id"))?l=S.escapeSelector(l):t.setAttribute("id",l=S.expando)),s=(p=Q(e)).length;s--;)p[s]=(l?"#"+l:":scope")+" "+W(p[s]);c=p.join(",")}try{return r.apply(n,u.querySelectorAll(c)),n}catch(t){ue(e,!0)}finally{l===S.expando&&t.removeAttribute("id")}}}return Me(e.replace(P,"$1"),t,n,i)}function we(e){return e[S.expando]=!0,e}function Te(e){return function(t){return w(t,"input")&&t.type===e}}function Ie(e){return function(t){return(w(t,"input")||w(t,"button"))&&t.type===e}}function ke(e){return function(t){return"form"in t?t.parentNode&&!1===t.disabled?"label"in t?"label"in t.parentNode?t.parentNode.disabled===e:t.disabled===e:t.isDisabled===e||t.isDisabled!==!e&&xe(t)===e:t.disabled===e:"label"in t&&t.disabled===e}}function Ce(e){return we(function(t){return t=+t,we(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function Pe(e){var t,n=e?e.ownerDocument||e:g;n!=re&&9===n.nodeType&&(se=(re=n).documentElement,ae=!S.isXMLDoc(re),k&&g!=re&&(t=re.defaultView)&&t.top!==t&&t.addEventListener("unload",ve))}for(ie in Se.matches=function(e,t){return Se(e,null,null,t)},Se.matchesSelector=function(e,t){if(Pe(e),ae&&!ue[t+" "]&&(!C||!C.test(t)))try{return N.call(e,t)}catch(e){ue(t,!0)}return Se(t,re,null,[e]).length>0},S.expr={cacheLength:50,createPseudo:we,match:me,find:{ID:function(e,t){if(void 0!==t.getElementById&&ae){var n=t.getElementById(e);return n?[n]:[]}},TAG:function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):t.querySelectorAll(e)},CLASS:function(e,t){if(void 0!==t.getElementsByClassName&&ae)return t.getElementsByClassName(e)}},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:q,filter:{ID:function(e){var t=H(e);return function(e){return e.getAttribute("id")===t}},TAG:function(e){var t=H(e).toLowerCase();return"*"===e?function(){return!0}:function(e){return w(e,t)}},CLASS:function(e){var t=pe[e+" "];return t||(t=new RegExp("(^|"+I+")"+e+"("+I+"|$)"))&&pe(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(i){var o=S.attr(i,e);return null==o?"!="===t:!t||(o+="","="===t?o===n:"!="===t?o!==n:"^="===t?n&&0===o.indexOf(n):"*="===t?n&&o.indexOf(n)>-1:"$="===t?n&&o.slice(-n.length)===n:"~="===t?(" "+o.replace(he," ")+" ").indexOf(n)>-1:"|="===t&&(o===n||o.slice(0,n.length+1)===n+"-"))}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,l){var d,p,c,u,h,f=r!==s?"nextSibling":"previousSibling",m=t.parentNode,g=a&&t.nodeName.toLowerCase(),y=!l&&!a,b=!1;if(m){if(r){for(;f;){for(c=t;c=c[f];)if(a?w(c,g):1===c.nodeType)return!1;h=f="only"===e&&!h&&"nextSibling"}return!0}if(h=[s?m.firstChild:m.lastChild],s&&y){for(b=(u=(d=(p=m[S.expando]||(m[S.expando]={}))[e]||[])[0]===le&&d[1])&&d[2],c=u&&m.childNodes[u];c=++u&&c&&c[f]||(b=u=0)||h.pop();)if(1===c.nodeType&&++b&&c===t){p[e]=[le,u,b];break}}else if(y&&(b=u=(d=(p=t[S.expando]||(t[S.expando]={}))[e]||[])[0]===le&&d[1]),!1===b)for(;(c=++u&&c&&c[f]||(b=u=0)||h.pop())&&(!(a?w(c,g):1===c.nodeType)||!++b||(y&&((p=c[S.expando]||(c[S.expando]={}))[e]=[le,b]),c!==t)););return(b-=o)===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,t){var n=S.expr.pseudos[e]||S.expr.setFilters[e.toLowerCase()]||U("unsupported pseudo: "+e);return n[S.expando]?n(t):n}},pseudos:{not:we(function(e){var t=[],n=[],i=Ae(e.replace(P,"$1"));return i[S.expando]?we(function(e,t,n,o){for(var r,s=i(e,null,o,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,o,r){return t[0]=e,i(t,null,r,n),t[0]=null,!n.pop()}}),has:we(function(e){return function(t){return Se(e,t).length>0}}),contains:we(function(e){return e=H(e),function(t){return(t.textContent||S.text(t)).indexOf(e)>-1}}),lang:we(function(e){return fe.test(e||"")||U("unsupported lang: "+e),e=H(e).toLowerCase(),function(t){var n;do{if(n=ae?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return(n=n.toLowerCase())===e||0===n.indexOf(e+"-")}while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===se},focus:function(e){return e===re.activeElement&&re.hasFocus()&&!!(e.type||e.href||~e.tabIndex)},enabled:ke(!1),disabled:ke(!0),checked:function(e){return w(e,"input")&&!!e.checked||w(e,"option")&&!!e.selected},selected:function(e){return k&&e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!S.expr.pseudos.empty(e)},header:function(e){return ye.test(e.nodeName)},input:function(e){return ge.test(e.nodeName)},button:function(e){return w(e,"input")&&"button"===e.type||w(e,"button")},text:function(e){return w(e,"input")&&"text"===e.type},first:Ce(function(){return[0]}),last:Ce(function(e,t){return[t-1]}),eq:Ce(function(e,t,n){return[n<0?n+t:n]}),even:Ce(function(e,t){for(var n=0;nt?t:n;--i>=0;)e.push(i);return e}),gt:Ce(function(e,t,n){for(var i=n<0?n+t:n;++i1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function De(e,t,n,i,o){for(var r,s=[],a=0,l=e.length,d=null!=t;a-1&&(a[c]=!(l[c]=h))}}else f=De(f===l?f.splice(y,f.length):f),o?o(null,l,f,p):r.apply(l,f)})}function Ne(e){for(var t,n,i,o=e.length,r=S.expr.relative[e[0].type],a=r||S.expr.relative[" "],l=r?1:0,d=Le(function(e){return e===t},a,!0),p=Le(function(e){return s.call(t,e)>-1},a,!0),c=[function(e,n,i){var o=!r&&(i||n!=oe)||((t=n).nodeType?d(e,n,i):p(e,n,i));return t=null,o}];l1&&Ve(c),l>1&&W(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(P,"$1"),n,l0,i=e.length>0,o=function(o,s,a,l,d){var p,c,u,h=0,f="0",m=o&&[],g=[],y=oe,b=o||i&&S.expr.find.TAG("*",d),v=le+=null==y?1:Math.random()||.1;for(d&&(oe=s==re||s||d);null!=(p=b[f]);f++){if(i&&p){for(c=0,s||p.ownerDocument==re||(Pe(p),a=!ae);u=e[c++];)if(u(p,s||re,a)){r.call(l,p);break}d&&(le=v)}n&&((p=!u&&p)&&h--,o&&m.push(p))}if(h+=f,n&&f!==h){for(c=0;u=t[c++];)u(m,g,s,a);if(o){if(h>0)for(;f--;)m[f]||g[f]||(g[f]=T.call(l));g=De(g)}r.apply(l,g),d&&!o&&g.length>0&&h+t.length>1&&S.uniqueSort(l)}return d&&(le=v,oe=y),m};return n?we(o):o}(o,i)),s.selector=e}return s}function Me(e,t,n,i){var o,s,a,l,d,p="function"==typeof e&&e,c=!i&&Q(e=p.selector||e);if(n=n||[],1===c.length){if((s=c[0]=c[0].slice(0)).length>2&&"ID"===(a=s[0]).type&&9===t.nodeType&&ae&&S.expr.relative[s[1].type]){if(!(t=(S.expr.find.ID(H(a.matches[0]),t)||[])[0]))return n;p&&(t=t.parentNode),e=e.slice(s.shift().value.length)}for(o=me.needsContext.test(e)?0:s.length;o--&&(a=s[o],!S.expr.relative[l=a.type]);)if((d=S.expr.find[l])&&(i=d(H(a.matches[0]),D.test(s[0].type)&&M(t.parentNode)||t))){if(s.splice(o,1),!(e=i.length&&W(s)))return r.apply(n,i),n;break}}return(p||Ae(e,c))(i,t,!ae,n,!t||D.test(e)&&M(t.parentNode)||t),n}function Re(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&S(e).is(n))break;i.push(e)}return i}function Be(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}Ee.prototype=S.expr.pseudos,S.expr.setFilters=new Ee,Pe(),S.find=Se,Se.compile=Ae,Se.select=Me,Se.setDocument=Pe,Se.tokenize=Q;var je=S.expr.match.needsContext,Fe=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function _e(e){return"<"===e[0]&&">"===e[e.length-1]&&e.length>=3}function $e(e,t,n){return"function"==typeof t?S.grep(e,function(e,i){return!!t.call(e,i,e)!==n}):t.nodeType?S.grep(e,function(e){return e===t!==n}):"string"!=typeof t?S.grep(e,function(e){return s.call(t,e)>-1!==n}):S.filter(t,e,n)}S.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?S.find.matchesSelector(i,e)?[i]:[]:S.find.matches(e,S.grep(t,function(e){return 1===e.nodeType}))},S.fn.extend({find:function(e){var t,n,i=this.length,o=this;if("string"!=typeof e)return this.pushStack(S(e).filter(function(){for(t=0;t1?S.uniqueSort(n):n},filter:function(e){return this.pushStack($e(this,e||[],!1))},not:function(e){return this.pushStack($e(this,e||[],!0))},is:function(e){return!!$e(this,"string"==typeof e&&je.test(e)?S(e):e||[],!1).length}});var He,Ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t){var n,i;if(!e)return this;if(e.nodeType)return this[0]=e,this.length=1,this;if("function"==typeof e)return void 0!==He.ready?He.ready(e):e(S);if(_e(n=e+""))n=[null,e,null];else{if("string"!=typeof e)return S.makeArray(e,this);n=Ue.exec(e)}if(!n||!n[1]&&t)return!t||t.jquery?(t||He).find(e):this.constructor(t).find(e);if(n[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(n[1],t&&t.nodeType?t.ownerDocument||t:g,!0)),Fe.test(n[1])&&S.isPlainObject(t))for(n in t)"function"==typeof this[n]?this[n](t[n]):this.attr(n,t[n]);return this}return(i=g.getElementById(n[2]))&&(this[0]=i,this.length=1),this}).prototype=S.fn,He=S(g);var ze=/^(?:parents|prev(?:Until|All))/,Ye={children:!0,contents:!0,next:!0,prev:!0};function Qe(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e-1:1===n.nodeType&&S.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?S.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?s.call(S(e),this[0]):s.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(S.uniqueSort(S.merge(this.get(),S(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),S.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return Re(e,"parentNode")},parentsUntil:function(e,t,n){return Re(e,"parentNode",n)},next:function(e){return Qe(e,"nextSibling")},prev:function(e){return Qe(e,"previousSibling")},nextAll:function(e){return Re(e,"nextSibling")},prevAll:function(e){return Re(e,"previousSibling")},nextUntil:function(e,t,n){return Re(e,"nextSibling",n)},prevUntil:function(e,t,n){return Re(e,"previousSibling",n)},siblings:function(e){return Be((e.parentNode||{}).firstChild,e)},children:function(e){return Be(e.firstChild)},contents:function(e){return null!=e.contentDocument&&n(e.contentDocument)?e.contentDocument:(w(e,"template")&&(e=e.content||e),S.merge([],e.childNodes))}},function(e,t){S.fn[e]=function(n,i){var o=S.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=S.filter(i,o)),this.length>1&&(Ye[e]||S.uniqueSort(o),ze.test(e)&&o.reverse()),this.pushStack(o)}});var qe=/-([a-z])/g;function We(e,t){return t.toUpperCase()}function Ge(e){return e.replace(qe,We)}function Je(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType}function Xe(){this.expando=S.expando+Xe.uid++}Xe.uid=1,Xe.prototype={cache:function(e){var t=e[this.expando];return t||(t=Object.create(null),Je(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[Ge(t)]=n;else for(i in t)o[Ge(i)]=t[i];return n},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][Ge(t)]},access:function(e,t,n){return void 0===t||t&&"string"==typeof t&&void 0===n?this.get(e,t):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i=e[this.expando];if(void 0!==i){if(void 0!==t){n=(t=Array.isArray(t)?t.map(Ge):(t=Ge(t))in i?[t]:t.match(J)||[]).length;for(;n--;)delete i[t[n]]}(void 0===t||S.isEmptyObject(i))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!S.isEmptyObject(t)}};var Ke=new Xe,Ze=new Xe,et=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,tt=/[A-Z]/g;function nt(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(tt,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(i))){try{n=function(e){return"true"===e||"false"!==e&&("null"===e?null:e===+e+""?+e:et.test(e)?JSON.parse(e):e)}(n)}catch(e){}Ze.set(e,t,n)}else n=void 0;return n}S.extend({hasData:function(e){return Ze.hasData(e)||Ke.hasData(e)},data:function(e,t,n){return Ze.access(e,t,n)},removeData:function(e,t){Ze.remove(e,t)},_data:function(e,t,n){return Ke.access(e,t,n)},_removeData:function(e,t){Ke.remove(e,t)}}),S.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(o=Ze.get(r),1===r.nodeType&&!Ke.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&0===(i=s[n].name).indexOf("data-")&&(i=Ge(i.slice(5)),nt(r,i,o[i]));Ke.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Ze.set(this,e)}):G(this,function(t){var n;if(r&&void 0===t)return void 0!==(n=Ze.get(r,e))||void 0!==(n=nt(r,e))?n:void 0;this.each(function(){Ze.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ze.remove(this,e)})}});var it=/^(?:input|select|textarea|button)$/i,ot=/^(?:a|area)$/i;function rt(e){return(e.match(J)||[]).join(" ")}function st(e){return e.getAttribute&&e.getAttribute("class")||""}function at(e){return Array.isArray(e)?e:"string"==typeof e&&e.match(J)||[]}S.fn.extend({prop:function(e,t){return G(this,S.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[S.propFix[e]||e]})}}),S.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&S.isXMLDoc(e)||(t=S.propFix[t]||t,o=S.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=e.getAttribute("tabindex");return t?parseInt(t,10):it.test(e.nodeName)||ot.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),k&&(S.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),S.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){S.propFix[this.toLowerCase()]=this}),S.fn.extend({addClass:function(e){var t,n,i,o,r,s;return"function"==typeof e?this.each(function(t){S(this).addClass(e.call(this,t,st(this)))}):(t=at(e)).length?this.each(function(){if(i=st(this),n=1===this.nodeType&&" "+rt(i)+" "){for(r=0;r-1;)n=n.replace(" "+o+" "," ");s=rt(n),i!==s&&this.setAttribute("class",s)}}):this:this.attr("class","")},toggleClass:function(e,t){var n,i,o,r;return"function"==typeof e?this.each(function(n){S(this).toggleClass(e.call(this,n,st(this),t),t)}):"boolean"==typeof t?t?this.addClass(e):this.removeClass(e):(n=at(e)).length?this.each(function(){for(r=S(this),o=0;o-1)return!0;return!1}}),S.fn.extend({val:function(e){var t,n,i,o=this[0];return arguments.length?(i="function"==typeof e,this.each(function(n){var o;1===this.nodeType&&(null==(o=i?e.call(this,n,S(this).val()):e)?o="":"number"==typeof o?o+="":Array.isArray(o)&&(o=S.map(o,function(e){return null==e?"":e+""})),(t=S.valHooks[this.type]||S.valHooks[this.nodeName.toLowerCase()])&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))})):o?(t=S.valHooks[o.type]||S.valHooks[o.nodeName.toLowerCase()])&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value)??"":void 0}}),S.extend({valHooks:{select:{get:function(e){var t,n,i,o=e.options,r=e.selectedIndex,s="select-one"===e.type,a=s?null:[],l=s?r+1:o.length;for(i=r<0?l:s?r:0;i-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),k&&(S.valHooks.option={get:function(e){var t=e.getAttribute("value");return null!=t?t:rt(S.text(e))}}),S.each(["radio","checkbox"],function(){S.valHooks[this]={set:function(e,t){if(Array.isArray(t))return e.checked=S.inArray(S(e).val(),t)>-1}}});var lt=/^(?:checkbox|radio)$/i,dt=/^([^.]*)(?:\.(.+)|)/;function pt(){return!0}function ct(){return!1}function ut(e,t,n,i,o,r){var s,a;if("object"==typeof t){for(a in"string"!=typeof n&&(i=i||n,n=void 0),t)ut(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),!1===o)o=ct;else if(!o)return e;return 1===r&&(s=o,o=function(e){return S().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=S.guid++)),e.each(function(){S.event.add(this,t,o,i,n)})}function ht(e,t,n){n?(Ke.set(e,t,!1),S.event.add(e,t,{namespace:!1,handler:function(e){var n,o=Ke.get(this,t);if(1&e.isTrigger&&this[t]){if(o.length)(S.event.special[t]||{}).delegateType&&e.stopPropagation();else if(o=i.call(arguments),Ke.set(this,t,o),this[t](),n=Ke.get(this,t),Ke.set(this,t,!1),o!==n)return e.stopImmediatePropagation(),e.preventDefault(),n&&n.value}else o.length&&(Ke.set(this,t,{value:S.event.trigger(o[0],o.slice(1),this)}),e.stopPropagation(),e.isImmediatePropagationStopped=pt)}})):void 0===Ke.get(e,t)&&S.event.add(e,t,pt)}S.event={add:function(e,t,n,i,o){var r,s,a,l,d,p,c,u,h,f,m,g=Ke.get(e);if(Je(e))for(n.handler&&(n=(r=n).handler,o=r.selector),o&&S.find.matchesSelector(O,o),n.guid||(n.guid=S.guid++),(l=g.events)||(l=g.events=Object.create(null)),(s=g.handle)||(s=g.handle=function(t){return void 0!==S&&S.event.triggered!==t.type?S.event.dispatch.apply(e,arguments):void 0}),d=(t=(t||"").match(J)||[""]).length;d--;)h=m=(a=dt.exec(t[d])||[])[1],f=(a[2]||"").split(".").sort(),h&&(c=S.event.special[h]||{},h=(o?c.delegateType:c.bindType)||h,c=S.event.special[h]||{},p=S.extend({type:h,origType:m,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&S.expr.match.needsContext.test(o),namespace:f.join(".")},r),(u=l[h])||((u=l[h]=[]).delegateCount=0,c.setup&&!1!==c.setup.call(e,i,f,s)||e.addEventListener&&e.addEventListener(h,s)),c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=n.guid)),o?u.splice(u.delegateCount++,0,p):u.push(p))},remove:function(e,t,n,i,o){var r,s,a,l,d,p,c,u,h,f,m,g=Ke.hasData(e)&&Ke.get(e);if(g&&(l=g.events)){for(d=(t=(t||"").match(J)||[""]).length;d--;)if(h=m=(a=dt.exec(t[d])||[])[1],f=(a[2]||"").split(".").sort(),h){for(c=S.event.special[h]||{},u=l[h=(i?c.delegateType:c.bindType)||h]||[],a=a[2]&&new RegExp("(^|\\.)"+f.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=u.length;r--;)p=u[r],!o&&m!==p.origType||n&&n.guid!==p.guid||a&&!a.test(p.namespace)||i&&i!==p.selector&&("**"!==i||!p.selector)||(u.splice(r,1),p.selector&&u.delegateCount--,c.remove&&c.remove.call(e,p));s&&!u.length&&(c.teardown&&!1!==c.teardown.call(e,f,g.handle)||S.removeEvent(e,h,g.handle),delete l[h])}else for(h in l)S.event.remove(e,h+t[d],n,i,!0);S.isEmptyObject(l)&&Ke.remove(e,"handle events")}},dispatch:function(e){var t,n,i,o,r,s,a=new Array(arguments.length),l=S.event.fix(e),d=(Ke.get(this,"events")||Object.create(null))[l.type]||[],p=S.event.special[l.type]||{};for(a[0]=l,t=1;t=1))for(;d!==this;d=d.parentNode||this)if(1===d.nodeType&&("click"!==e.type||!0!==d.disabled)){for(r=[],s={},n=0;n-1:S.find(o,this,null,[d]).length),s[o]&&r.push(i);r.length&&a.push({elem:d,handlers:r})}return d=this,l-1&&(b=y.split("."),y=b.shift(),b.sort()),p=y.indexOf(":")<0&&"on"+y,(t=t[S.expando]?t:new S.Event(y,"object"==typeof t&&t)).isTrigger=o?2:3,t.namespace=b.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+b.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:S.makeArray(n,[t]),u=S.event.special[y]||{},o||!u.trigger||!1!==u.trigger.apply(i,n))){if(!o&&!u.noBubble&&!f(i)){for(l=u.delegateType||y,ft.test(l+y)||(s=s.parentNode);s;s=s.parentNode)m.push(s),a=s;a===(i.ownerDocument||g)&&m.push(a.defaultView||a.parentWindow||e)}for(r=0;(s=m[r++])&&!t.isPropagationStopped();)h=s,t.type=r>1?l:u.bindType||y,(c=(Ke.get(s,"events")||Object.create(null))[t.type]&&Ke.get(s,"handle"))&&c.apply(s,n),(c=p&&s[p])&&c.apply&&Je(s)&&(t.result=c.apply(s,n),!1===t.result&&t.preventDefault());return t.type=y,o||t.isDefaultPrevented()||u._default&&!1!==u._default.apply(m.pop(),n)||!Je(i)||p&&"function"==typeof i[y]&&!f(i)&&((a=i[p])&&(i[p]=null),S.event.triggered=y,t.isPropagationStopped()&&h.addEventListener(y,mt),i[y](),t.isPropagationStopped()&&h.removeEventListener(y,mt),S.event.triggered=void 0,a&&(i[p]=a)),t.result}},simulate:function(e,t,n){var i=S.extend(new S.Event,n,{type:e,isSimulated:!0});S.event.trigger(i,null,t)}}),S.fn.extend({trigger:function(e,t){return this.each(function(){S.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return S.event.trigger(e,t,n,!0)}});var gt=function(e){return S.contains(e.ownerDocument,e)||e.getRootNode(yt)===e.ownerDocument},yt={composed:!0};O.getRootNode||(gt=function(e){return S.contains(e.ownerDocument,e)});var bt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,vt={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr","tbody","table"]};function xt(e,n){var i;return i=void 0!==e.getElementsByTagName?t.slice.call(e.getElementsByTagName(n||"*")):void 0!==e.querySelectorAll?e.querySelectorAll(n||"*"):[],void 0===n||n&&w(e,n)?S.merge([e],i):i}vt.tbody=vt.tfoot=vt.colgroup=vt.caption=vt.thead,vt.th=vt.td;var St=/^$|^module$|\/(?:java|ecma)script/i;function wt(e,t){for(var n=0,i=e.length;n-1;)a=a.appendChild(n.createElement(d[c]));a.innerHTML=S.htmlPrefilter(s),S.merge(f,a.childNodes),(a=u.firstChild).textContent=""}else f.push(n.createTextNode(s));for(u.textContent="",g=0;s=f[g++];)if(o&&S.inArray(s,o)>-1)r&&r.push(s);else if(p=gt(s),a=xt(u.appendChild(s),"script"),p&&wt(a),i)for(c=0;s=a[c++];)St.test(s.type||"")&&i.push(s);return u}function kt(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function Ct(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Pt(e,t,n,i){t=o(t);var r,s,a,l,d,p,c=0,u=e.length,h=u-1,f=t[0];if("function"==typeof f)return e.each(function(o){var r=e.eq(o);t[0]=f.call(this,o,r.html()),Pt(r,t,n,i)});if(u&&(s=(r=It(t,e[0].ownerDocument,!1,e,i)).firstChild,1===r.childNodes.length&&(r=s),s||i)){for(l=(a=S.map(xt(r,"script"),kt)).length;cinput});return p.createHTML(e);},clone:function(e,t,n){var i,o,r,s,a=e.cloneNode(!0),l=gt(e);if(k&&(1===e.nodeType||11===e.nodeType)&&!S.isXMLDoc(e))for(s=xt(a),i=0,o=(r=xt(e)).length;i0&&wt(s,!l&&xt(e,"script")),a},cleanData:function(e){for(var t,n,i,o=S.event.special,r=0;void 0!==(n=e[r]);r++)if(Je(n)){if(t=n[Ke.expando]){if(t.events)for(i in t.events)o[i]?S.event.remove(n,i):S.removeEvent(n,i,t.handle);n[Ke.expando]=void 0}n[Ze.expando]&&(n[Ze.expando]=void 0)}}}),S.fn.extend({detach:function(e){return Dt(this,e,!0)},remove:function(e){return Dt(this,e)},text:function(e){return G(this,function(e){return void 0===e?S.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return Pt(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||Lt(this,e).appendChild(e)})},prepend:function(){return Pt(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return Pt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return Pt(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(S.cleanData(xt(e,!1)),e.textContent="");return this},clone:function(e,t){return e=e??!1,t=t??e,this.map(function(){return S.clone(this,e,t)})},html:function(e){return G(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Et.test(e)&&!vt[(bt.exec(e)||["",""])[1].toLowerCase()]){e=S.htmlPrefilter(e);try{for(;n=0&&(l+=Math.max(0,Math.ceil(e["offset"+t[0].toUpperCase()+t.slice(1)]-r-l-a-.5))||0),l+d}function tn(e,t,n){var i=Ht(e),o=(k||n)&&"border-box"===S.css(e,"boxSizing",!1,i),r=o,s=Ut(e,t,i),a="offset"+t[0].toUpperCase()+t.slice(1);if(At.test(s)){if(!n)return s;s="auto"}return("auto"===s||k&&o||!u.reliableColDimensions()&&w(e,"col")||!u.reliableTrDimensions()&&w(e,"tr"))&&e.getClientRects().length&&(o="border-box"===S.css(e,"boxSizing",!1,i),(r=a in e)&&(s=e[a])),(s=parseFloat(s)||0)+en(e,t,n||(o?"border":"content"),r,i,s)+"px"}function nn(e,t){return"none"===e.style.display||""===e.style.display&&"none"===S.css(e,"display")}S.extend({cssHooks:{},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=$t(t),l=Mt.test(t),d=e.style;if(l||(t=Qt(a)),s=S.cssHooks[t]||S.cssHooks[a],void 0===n)return s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:d[t];"string"==(r=typeof n)&&(o=Nt.exec(n))&&o[1]&&(n=function(e,t,n){var i,o,r=20,s=function(){return S.css(e,t,"")},a=s(),l=n&&n[3]||(Ft(t)?"px":""),d=e.nodeType&&(!Ft(t)||"px"!==l&&+a)&&Nt.exec(S.css(e,t));if(d&&d[3]!==l){for(a/=2,l=l||d[3],d=+a||1;r--;)S.style(e,t,d+l),(1-o)*(1-(o=s()/a||.5))<=0&&(r=0),d/=o;d*=2,S.style(e,t,d+l),n=n||[]}return n&&(d=+d||+a||0,i=n[1]?d+(n[1]+1)*n[2]:+n[2]),i}(e,t,o),r="number"),null!=n&&n==n&&("number"===r&&(n+=o&&o[3]||(Ft(a)?"px":"")),k&&""===n&&0===t.indexOf("background")&&(d[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(l?d.setProperty(t,n):d[t]=n))}},css:function(e,t,n,i){var o,r,s,a=$t(t);return Mt.test(t)||(t=Qt(a)),(s=S.cssHooks[t]||S.cssHooks[a])&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=Ut(e,t,i)),"normal"===o&&t in Kt&&(o=Kt[t]),""===n||n?(r=parseFloat(o),!0===n||isFinite(r)?r||0:o):o}}),S.each(["height","width"],function(e,t){S.cssHooks[t]={get:function(e,n,i){if(n)return"none"===S.css(e,"display")?function(e,t,n){var i,o,r={};for(o in t)r[o]=e.style[o],e.style[o]=t[o];for(o in i=n.call(e),t)e.style[o]=r[o];return i}(e,Xt,function(){return tn(e,t,i)}):tn(e,t,i)},set:function(e,n,i){var o,r=Ht(e),s=i&&"border-box"===S.css(e,"boxSizing",!1,r),a=i?en(e,t,i,s,r):0;return a&&(o=Nt.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=S.css(e,t)),Zt(0,n,a)}}}),S.each({margin:"",padding:"",border:"Width"},function(e,t){S.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];i<4;i++)o[e+Rt[i]+t]=r[i]||r[i-2]||r[0];return o}},"margin"!==e&&(S.cssHooks[e+t].set=Zt)}),S.fn.extend({css:function(e,t){return G(this,function(e,t,n){var i,o,r={},s=0;if(Array.isArray(t)){for(i=Ht(e),o=t.length;s1)}}),S.expr.pseudos.hidden=function(e){return!S.expr.pseudos.visible(e)},S.expr.pseudos.visible=function(e){return!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)};var on={};function rn(e){var t,n=e.ownerDocument,i=e.nodeName,o=on[i];return o||(t=n.body.appendChild(n.createElement(i)),o=S.css(t,"display"),t.parentNode.removeChild(t),"none"===o&&(o="block"),on[i]=o,o)}function sn(e,t){for(var n,i,o=[],r=0,s=e.length;r-1?(s=(i=p.position()).top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(l)||0),"function"==typeof t&&(t=t.call(e,n,S.extend({},a))),null!=t.top&&(c.top=t.top-a.top+s),null!=t.left&&(c.left=t.left-a.left+o),"using"in t?t.using.call(e,c):p.css(c)}},S.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){S.offset.setOffset(this,e,t)});var t,n,i=this[0];return i?i.getClientRects().length?(t=i.getBoundingClientRect(),n=i.ownerDocument.defaultView,{top:t.top+n.pageYOffset,left:t.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,i=this[0],o={top:0,left:0};if("fixed"===S.css(i,"position"))t=i.getBoundingClientRect();else{for(t=this.offset(),n=i.ownerDocument,e=i.offsetParent||n.documentElement;e&&e!==n.documentElement&&"static"===S.css(e,"position");)e=e.offsetParent||n.documentElement;e&&e!==i&&1===e.nodeType&&"static"!==S.css(e,"position")&&((o=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),o.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-o.top-S.css(i,"marginTop",!0),left:t.left-o.left-S.css(i,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===S.css(e,"position");)e=e.offsetParent;return e||O})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;S.fn[e]=function(i){return G(this,function(e,i,o){var r;if(f(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===o)return r?r[t]:e[i];r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o},e,i,arguments.length)}}),S.each({Height:"height",Width:"width"},function(e,t){S.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){S.fn[i]=function(o,r){var s=arguments.length&&(n||"boolean"!=typeof o),a=n||(!0===o||!0===r?"margin":"border");return G(this,function(t,n,o){var r;return f(t)?0===i.indexOf("outer")?t["inner"+e]:t.document.documentElement["client"+e]:9===t.nodeType?(r=t.documentElement,Math.max(t.body["scroll"+e],r["scroll"+e],t.body["offset"+e],r["offset"+e],r["client"+e])):void 0===o?S.css(t,n,a):S.style(t,n,o,a)},t,s?o:void 0,s)}})}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.on("mouseenter",e).on("mouseleave",t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,t){S.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),S.proxy=function(e,t){var n,o,r;if("string"==typeof t&&(n=e[t],t=e,e=n),"function"==typeof e)return o=i.call(arguments,2),r=function(){return e.apply(t||this,o.concat(i.call(arguments)))},r.guid=e.guid=e.guid||S.guid++,r},S.holdReady=function(e){e?S.readyWait++:S.ready(!0)},S.expr[":"]=S.expr.filters=S.expr.pseudos,"function"==typeof define&&define.amd&&define("jquery",[],function(){return S});var un=e.jQuery,hn=e.$;S.noConflict=function(t){return e.$===S&&(e.$=hn),t&&e.jQuery===S&&(e.jQuery=un),S};var fn=[],mn=function(e){fn.push(e)},gn=function(t){e.setTimeout(function(){t.call(g,S)})};function yn(){g.removeEventListener("DOMContentLoaded",yn),e.removeEventListener("load",yn),S.ready()}return S.fn.ready=function(e){return mn(e),this},S.extend({isReady:!1,readyWait:1,ready:function(e){(!0===e?--S.readyWait:S.isReady)||(S.isReady=!0,!0!==e&&--S.readyWait>0||(mn=function(e){for(fn.push(e);fn.length;)"function"==typeof(e=fn.shift())&&gn(e)})())}}),S.ready.then=S.fn.ready,"loading"!==g.readyState?e.setTimeout(S.ready):(g.addEventListener("DOMContentLoaded",yn),e.addEventListener("load",yn)),S}(window);const o=i;var r,s=n(72),a=n.n(s),l=n(825),d=n.n(l),p=n(659),c=n.n(p),u=n(56),h=n.n(u),f=n(540),m=n.n(f),g=n(113),y=n.n(g),b=n(478),v={};v.styleTagTransform=y(),v.setAttributes=h(),v.insert=c().bind(null,"head"),v.domAPI=d(),v.insertStyleElement=m(),a()(b.A,v),b.A&&b.A.locals&&b.A.locals,function(e){e.Ultra="highres",e.P2880="hd2880",e.P2160="hd2160",e.P1440="hd1440",e.P1080="hd1080",e.P720="hd720",e.P480="large",e.P360="medium",e.P240="small",e.P144="tiny"}(r||(r={}));class x{constructor(){this.maxSimSubLoad=10,this.maxVideosPerRow=9,this.maxVideosPerSub=36,this.enlargeDelay=500,this.enlargeFactor=2.8,this.enlargeFactorNative=2,this.timeToMarkAsSeen=10,this.screenThreshold=500,this.playerQuality=r.P1080,this.peekPlayerSizeFactor=1.5,this.autoPauseVideo=!1,this.hideSeenVideos=!1,this.hideEmptySubs=!0,this.hideOlderVideos=!1,this.videoDecomposeTime=30,this.hideShorts={}}updateConfiguration(e){Object.prototype.hasOwnProperty.call(e,"maxSimSubLoad")&&(this.maxSimSubLoad=e.maxSimSubLoad),Object.prototype.hasOwnProperty.call(e,"maxVideosPerRow")&&(this.maxVideosPerRow=e.maxVideosPerRow),Object.prototype.hasOwnProperty.call(e,"maxVideosPerSub")&&(this.maxVideosPerSub=e.maxVideosPerSub),Object.prototype.hasOwnProperty.call(e,"enlargeDelay")&&(this.enlargeDelay=e.enlargeDelay),Object.prototype.hasOwnProperty.call(e,"enlargeFactor")&&(this.enlargeFactor=e.enlargeFactor),Object.prototype.hasOwnProperty.call(e,"enlargeFactorNative")&&(this.enlargeFactorNative=e.enlargeFactorNative),Object.prototype.hasOwnProperty.call(e,"timeToMarkAsSeen")&&(this.timeToMarkAsSeen=e.timeToMarkAsSeen),Object.prototype.hasOwnProperty.call(e,"screenThreshold")&&(this.screenThreshold=e.screenThreshold),Object.prototype.hasOwnProperty.call(e,"playerQuality")&&(this.playerQuality=e.playerQuality),Object.prototype.hasOwnProperty.call(e,"peekPlayerSizeFactor")&&(this.peekPlayerSizeFactor=e.peekPlayerSizeFactor),Object.prototype.hasOwnProperty.call(e,"autoPauseVideo")&&(this.autoPauseVideo=e.autoPauseVideo),Object.prototype.hasOwnProperty.call(e,"hideSeenVideos")&&(this.hideSeenVideos=e.hideSeenVideos),Object.prototype.hasOwnProperty.call(e,"hideOlderVideos")&&(this.hideOlderVideos=e.hideOlderVideos),Object.prototype.hasOwnProperty.call(e,"hideEmptySubs")&&(this.hideEmptySubs=e.hideEmptySubs),Object.prototype.hasOwnProperty.call(e,"videoDecomposeTime")&&(this.videoDecomposeTime=e.videoDecomposeTime),Object.prototype.hasOwnProperty.call(e,"hideShorts")&&(this.hideShorts=e.hideShorts)}equals(e){return this.maxSimSubLoad===e.maxSimSubLoad&&this.maxVideosPerRow===e.maxVideosPerRow&&this.maxVideosPerSub===e.maxVideosPerSub&&this.enlargeDelay===e.enlargeDelay&&this.enlargeFactor===e.enlargeFactor&&this.enlargeFactorNative===e.enlargeFactorNative&&this.timeToMarkAsSeen===e.timeToMarkAsSeen&&this.screenThreshold===e.screenThreshold&&this.playerQuality===e.playerQuality&&this.peekPlayerSizeFactor===e.peekPlayerSizeFactor&&this.autoPauseVideo===e.autoPauseVideo&&this.hideSeenVideos===e.hideSeenVideos&&this.hideOlderVideos===e.hideOlderVideos&&this.videoDecomposeTime===e.videoDecomposeTime&&this.hideEmptySubs===e.hideEmptySubs&&this.hideShorts==e.hideShorts}}let S,w;class T{constructor(){this.videoSaveQueued=!1,this.configSaveQueued=!1,this.onSaveCallbackList=[]}static applyResolutionPropertyFromLocalStorage(e,t){const n=localStorage.getItem(`YTBSP_${t}`);if(null!==n){const o=(i=n,r[Object.keys(r).filter(e=>r[e].toString()===i)[0]]);void 0!==o&&(e[t]=o)}var i}static applyNumberPropertyFromLocalStorage(e,t){const n=localStorage.getItem(`YTBSP_${t}`);if(null!==n){const i=Number(n);isNaN(i)||(e[t]=Number(n))}}static applyBooleanPropertyFromLocalStorage(e,t){const n=localStorage.getItem(`YTBSP_${t}`);null!==n&&(e[t]="1"===n)}static applyObjectPropertyFromLocalStorage(e,t){const n=localStorage.getItem(`YTBSP_${t}`);null!==n&&(e[t]=JSON.parse(n))}loadConfig(){return this.loadLocalConfig()}saveConfig(e){var t;this.configSaveQueued||(this.configSaveQueued=!0),t=()=>{console.log("SAVE Config"),this.configSaveQueued=!1,this.saveLocalConfig(e).catch(console.error)},clearTimeout(w),w=setTimeout(function(){w=null,t()},2e3)}loadVideoInfo(){return this.loadLocalVideoInfo()}saveVideoInfo(e){var t;this.videoSaveQueued||(this.videoSaveQueued=!0,this.onNotifySave("start")),t=()=>{console.log("SAVE"),this.videoSaveQueued=!1,this.saveLocalVideoInfo(e()).then(()=>this.onNotifySave("end")).catch(e=>{console.error(e),this.onNotifySave("end")})},clearTimeout(S),S=setTimeout(function(){S=null,t()},2e3)}addSaveListener(e){this.onSaveCallbackList.push(e)}deleteUserData(){return new Promise(e=>{localStorage.removeItem("YTBSP_VideoInfo"),localStorage.removeItem("YTBSP_hideSeenVideos"),localStorage.removeItem("YTBSP_hideOlderVideos"),localStorage.removeItem("YTBSP_hideEmptySubs"),localStorage.removeItem("YTBSP_maxSimSubLoad"),localStorage.removeItem("YTBSP_maxVideosPerRow"),localStorage.removeItem("YTBSP_maxVideosPerSub"),localStorage.removeItem("YTBSP_enlargeDelay"),localStorage.removeItem("YTBSP_enlargeFactor"),localStorage.removeItem("YTBSP_enlargeFactorNative"),localStorage.removeItem("YTBSP_playerQuality"),localStorage.removeItem("YTBSP_timeToMarkAsSeen"),localStorage.removeItem("YTBSP_screenThreshold"),localStorage.removeItem("YTBSP_autoPauseVideo"),localStorage.removeItem("YTBSP_hideShorts"),e()})}loadLocalConfig(){return new Promise(e=>{const t=new x;T.applyBooleanPropertyFromLocalStorage(t,"hideSeenVideos"),T.applyBooleanPropertyFromLocalStorage(t,"hideOlderVideos"),T.applyBooleanPropertyFromLocalStorage(t,"hideEmptySubs"),T.applyNumberPropertyFromLocalStorage(t,"maxSimSubLoad"),T.applyNumberPropertyFromLocalStorage(t,"maxVideosPerRow"),T.applyNumberPropertyFromLocalStorage(t,"maxVideosPerSub"),T.applyNumberPropertyFromLocalStorage(t,"enlargeDelay"),T.applyNumberPropertyFromLocalStorage(t,"enlargeFactor"),T.applyNumberPropertyFromLocalStorage(t,"enlargeFactorNative"),T.applyResolutionPropertyFromLocalStorage(t,"playerQuality"),T.applyNumberPropertyFromLocalStorage(t,"timeToMarkAsSeen"),T.applyNumberPropertyFromLocalStorage(t,"screenThreshold"),T.applyBooleanPropertyFromLocalStorage(t,"autoPauseVideo"),T.applyObjectPropertyFromLocalStorage(t,"hideShorts"),T.applyNumberPropertyFromLocalStorage(t,"videoDecomposeTime"),e(t)})}saveLocalConfig(e){return new Promise(t=>{localStorage.setItem("YTBSP_hideSeenVideos",e.hideSeenVideos?"1":"0"),localStorage.setItem("YTBSP_hideOlderVideos",e.hideOlderVideos?"1":"0"),localStorage.setItem("YTBSP_hideEmptySubs",e.hideEmptySubs?"1":"0"),localStorage.setItem("YTBSP_maxSimSubLoad",e.maxSimSubLoad.toString()),localStorage.setItem("YTBSP_maxVideosPerRow",e.maxVideosPerRow.toString()),localStorage.setItem("YTBSP_maxVideosPerSub",e.maxVideosPerSub.toString()),localStorage.setItem("YTBSP_enlargeDelay",e.enlargeDelay.toString()),localStorage.setItem("YTBSP_enlargeFactor",e.enlargeFactor.toString()),localStorage.setItem("YTBSP_enlargeFactorNative",e.enlargeFactorNative.toString()),localStorage.setItem("YTBSP_playerQuality",e.playerQuality.toString()),localStorage.setItem("YTBSP_timeToMarkAsSeen",e.timeToMarkAsSeen.toString()),localStorage.setItem("YTBSP_screenThreshold",e.screenThreshold.toString()),localStorage.setItem("YTBSP_videoDecomposeTime",e.videoDecomposeTime.toString()),localStorage.setItem("YTBSP_autoPauseVideo",e.autoPauseVideo?"1":"0"),localStorage.setItem("YTBSP_hideShorts",JSON.stringify(e.hideShorts)),t()})}loadLocalVideoInfo(){return new Promise((e,t)=>{let n=[];const i=localStorage.getItem("YTBSP_VideoInfo");if(null!==i&&""!==i)try{n=JSON.parse(i)}catch{t("Error parsing cache!")}e(n)})}saveLocalVideoInfo(e){return new Promise(t=>{localStorage.setItem("YTBSP_VideoInfo",e),t()})}onNotifySave(e){this.onSaveCallbackList.forEach(t=>{t(e)})}}const I=new T,k=new class{constructor(){this.onChangeCallbackList=[],this.configuration=new x}getConfig(){return this.configuration}setConfig(e){e.equals(this.configuration)||(this.configuration=e,this.onConfigUpdated())}addChangeListener(e){this.onChangeCallbackList.push(e)}updateConfig(e){const t=Object.assign({},this.configuration);this.configuration.updateConfiguration(e),this.configuration.equals(t)||this.onConfigUpdated()}onConfigUpdated(){this.onChangeCallbackList.forEach(e=>{e(this.configuration)}),I.saveConfig(this.configuration)}},C="ytd-app",P="#page-manager.ytd-app, #page-manager.ytd-app.style-scope",E="#content",L="#guide",V=`${P} { background: transparent; display:none; }`,D=`${P} { margin-top: 0px; background: transparent; }\n ${L} { z-index: 3000 !important; }\n #frosted-glass.with-chipbar.ytd-app.style-scope { z-index: 2000; }\n ytd-app[frosted-glass-exp] tp-yt-app-drawer.ytd-app[persistent], ytd-mini-guide-renderer.ytd-app { top: calc(var(--ytd-masthead-height, var(--ytd-toolbar-height)) + 22px); }`,O=`${P} { background: transparent; margin-top: 0px; }\n ${L} { z-index: 3000 !important; width: var(--app-drawer-width, 256px); }`,N=`${P} { background: transparent; margin-top: -20px; }\n ${L} { z-index: 3000; !important;}`,A=`${P} { background: transparent; margin-top: -30px;}\n ${L} { z-index: 3000; !important;}`,M=`${P} { background: transparent; margin-top: -60px; }\n ${L} { z-index: 3000; !important;}\n ${P} ytd-playlist-sidebar-renderer {padding-top: 54px;}`;var R;!function(e){e[e.DEFAULT=0]="DEFAULT",e[e.LOADING=1]="LOADING",e[e.START_PAGE=2]="START_PAGE",e[e.VIDEO=3]="VIDEO",e[e.SEARCH=4]="SEARCH",e[e.PLAYLIST=5]="PLAYLIST"}(R||(R={}));const B=()=>/^(\/?|((\/feed\/)(trending|subscriptions|history)\/?))?$/iu.test(location.pathname)?R.START_PAGE:/^\/?watch$/u.test(location.pathname)?R.VIDEO:/^\/?results$/u.test(location.pathname)?R.SEARCH:/^\/?playlist$/u.test(location.pathname)?R.PLAYLIST:R.DEFAULT,j=new class{constructor(){this.isDocumentReady=!1,this.navigateInterval=null,this.onPageChangeCallbackList=[],this.onToggleFullscreenCallbackList=[],this.onDocumentReadyCallbackList=[],this.inViewObserver=null,this.inViewCallbacks=new Map,this.oldHref=document.location.href,o(document).ready(()=>{this.isDocumentReady=!0,this.onDocumentReadyCallbackList.forEach(e=>{e()}),this.onDocumentReadyCallbackList=[],this.installDummyPopup()})}startPageObserver(){window.addEventListener("yt-navigate-finish",()=>this.handlePageChange()),window.addEventListener("popstate",()=>this.handlePageChange()),document.addEventListener("fullscreenchange",()=>this.handleFullscreenChange())}injectYTBSP(e){0!==o(E).length?o(E).prepend(e.component):setTimeout(()=>this.injectYTBSP(e),100)}addPageChangeListener(e){this.onPageChangeCallbackList.push(e)}addToggleFullscreenListener(e){this.onToggleFullscreenCallbackList.push(e)}addDocumentReadyListener(e){this.isDocumentReady?e():this.onDocumentReadyCallbackList.push(e)}observeInView(e,t){this.inViewCallbacks.set(e,t),this.getInViewObserver().observe(e)}unobserveInView(e){this.inViewObserver&&this.inViewObserver.unobserve(e),this.inViewCallbacks.delete(e)}updateNativeStyleRuleModifications(e){o("#ytbsp-yt-css").remove();const t=document.createElement("style");t.id="ytbsp-yt-css",document.head.appendChild(t),o("#ytbsp-yt-css").html((e=>{switch(e){case R.LOADING:return V;case R.START_PAGE:return D;case R.VIDEO:return O;case R.SEARCH:return N;case R.PLAYLIST:return M;default:return A}})(e||B()))}updateHideNativeStyle(e){if(o("#ytbsp-hideNative-css").remove(),e){const e=document.createElement("style");e.id="ytbsp-hideNative-css",document.head.appendChild(e),o("#ytbsp-hideNative-css").html(P+"{display: none!important;}#home-page-skeleton{display: none!important;}")}setTimeout(()=>{window.dispatchEvent(new Event("resize"))},200)}addThumbnailEnlargeCss(){const e=k.getConfig().enlargeFactorNative;if(1>=e)return;const t=(this.isDarkModeEnabled(),"#737373"),n=k.getConfig().enlargeDelay;o("#ytbsp-css-thumb").remove();const i=document.createElement("style");i.id="ytbsp-css-thumb",document.head.appendChild(i),o("#ytbsp-css-thumb").html(`ytd-thumbnail.ytd-grid-video-renderer:hover,\n ytd-thumbnail.ytd-compact-video-renderer:hover {\n transform: scale(${e});\n border: solid ${e/2}px ${t};\n padding: 0px; z-index: 2;\n transition-delay: ${n}ms;\n }\n ytd-thumbnail { padding: ${e/2}px }\n #video-title { width: 200px; }\n #scroll-container.yt-horizontal-list-renderer { overflow: visible; }`)}isDarkModeEnabled(){const e=getComputedStyle(document.documentElement).backgroundColor.match(/\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)/gu);return null!==document.documentElement.getAttribute("dark")||e&&384>parseInt(e[1],10)+parseInt(e[2],10)+parseInt(e[3],10)}showNative(){this.updateHideNativeStyle(!1)}hideNative(){this.updateHideNativeStyle(!0)}toggleGuide(){document.querySelector(C).fire("yt-guide-toggle",{}),setTimeout(()=>{o("body").attr("style","overflow: auto")},200)}addToQueue(e){const t=document.querySelector(C),n={commandMetadata:{webCommandMetadata:{url:"/service_ajax",sendPost:!0}},signalServiceEndpoint:{signal:"CLIENT_SIGNAL",actions:[{addToPlaylistCommand:{openMiniplayer:!0,videoId:e,listType:"PLAYLIST_EDIT_LIST_TYPE_QUEUE",onCreateListCommand:{commandMetadata:{webCommandMetadata:{url:"/service_ajax",sendPost:!0,apiUrl:"/youtubei/v1/playlist/create"}},createPlaylistServiceEndpoint:{videoIds:[e],params:"CAQ%3D"}},videoIds:[e]}}]}},i={args:[document.querySelector("ytd-menu-service-item-renderer.style-scope.ytd-menu-popup-renderer"),n],actionName:"yt-service-request",disableBroadcast:!1,optionalAction:!1,returnValue:[]};t.fire("yt-action",i)}navigateToVideo(e){const t=this.getHotkeyManager()[0];t&&t.isMiniplayerActive()&&t.toggleMiniplayer();const n={commandMetadata:{webCommandMetadata:{url:`/watch?v=${e}`,webPageType:"WEB_PAGE_TYPE_WATCH",rootVe:3832}},watchEndpoint:{videoId:e,nofollow:!0}};this.navigateInterval&&clearInterval(this.navigateInterval),this.navigateInterval=setInterval(()=>{const t=/v=([^&]{11})/u.exec(location.href);(t?t[1]:null)!=e?o(C)[0].handleNavigate({command:n,type:0}):this.navigateInterval&&(clearInterval(this.navigateInterval),this.navigateInterval=null)},500)}getHotkeyManager(){return o("ytd-app > yt-hotkey-manager")}getChannelId(){let e=this.getChannelIdFromLink("#top-row > ytd-video-owner-renderer > #upload-info > #channel-name > #container > #text-container > #text > a");return null==e&&(e=this.getChannelIdFromLink("#movie_player > div.ytp-ce-element.ytp-ce-channel.ytp-ce-channel-this.ytp-ce-bottom-right-quad.ytp-ce-size-640 > div.ytp-ce-expanding-overlay > div.ytp-ce-expanding-overlay-content > div > div > a")),e}installDummyPopup(){const e=document.createElement("div");e.style.display="none",e.id="ytbsp-popup-menu-dummy",document.body.appendChild(e),o("#ytbsp-popup-menu-dummy").html('\n \n ')}getChannelIdFromLink(e){if(0!==o(e).length){const t=/\/channel\/([^&]*)/u.exec(o(e).attr("href"));return null!=t?t[1]:void 0}}getInViewObserver(){return this.inViewObserver||(this.inViewObserver=new IntersectionObserver(e=>{e.forEach(e=>{if(e.isIntersecting){const t=this.inViewCallbacks.get(e.target);t&&t()}})},{rootMargin:`${k.getConfig().screenThreshold}px 0px`})),this.inViewObserver}handlePageChange(){const e=document.location.href;this.oldHref!==e&&(this.oldHref=e,this.onPageChangeCallbackList.forEach(e=>{e()}))}handleFullscreenChange(){const e=null!==document.fullscreenElement;e!==this.isFullscreen&&(this.isFullscreen=e,this.onToggleFullscreenCallbackList.forEach(e=>{e(this.isFullscreen)}))}},F=HTMLMediaElement.prototype.play;let _,$=!1;const H=function(e){if($)return;const t=e.closest("#movie_player");if(!t||"function"!=typeof t.setPlaybackQualityRange)return;let n=k.getConfig().playerQuality;if("function"==typeof t.getAvailableQualityLevels){const e=t.getAvailableQualityLevels();if(0e.includes(t))||e[0]}}t.setPlaybackQualityRange(n,n),$=!0},U=new class{constructor(){HTMLMediaElement.prototype.play=function(){return function(e){if(j.isDocumentReady){if(H(e),_){const t=e.parentElement.parentElement;return void(t&&(_=!1,t.pauseVideo(),console.log(`prevented playback for: ${t.getVideoUrl()}`)))}F.call(e)}}(this)},this.resetAutoplay(),j.addPageChangeListener(()=>{this.resetAutoplay(),$=!1});let e=k.getConfig().playerQuality;k.addChangeListener(t=>{if(t.playerQuality===e)return;e=t.playerQuality,$=!1;const n=document.querySelector("#movie_player video");n&&H(n)})}togglePictureInPicturePlayer(e){const t=j.getHotkeyManager()[0];t.isMiniplayerActive()!==e&&t.toggleMiniplayer()}resetAutoplay(){_=!/.*watch\?.+list=.+/u.test(document.location.pathname)&&k.getConfig().autoPauseVideo}};class z{constructor(e){this.component=e}}class Y extends z{constructor(e,t,n){super(o("