Files
pgsql-jellyfin/publish_test4/wwwroot/44599.b42aefaa4c79d0e2b43b.chunk.js
2026-07-08 13:46:27 -04:00

1 line
24 KiB
JavaScript

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[35308,44599],{35308:function(e,t,n){n.r(t),n.d(t,{default:function(){return F},startMultiSelect:function(){return L},stopMultiSelect:function(){return E}}),n(24776),n(14382),n(76281),n(44962),n(86584),n(89336),n(78557),n(90076),n(99425),n(83994),n(23630),n(82367);var a,i=n(97339),r=n(34789),c=n(22622),s=n(8566),l=n(5898),o=n(67430),d=n(36300),u=n(41177),h=n(47602),p=n(23648),v=n(98320),f=[],y=[];function b(){var e=a;if(e){e.parentNode.removeChild(e),a=null,f=[],y=[];for(var t=document.querySelectorAll(".itemSelectionPanel"),n=0,i=t.length;n<i;n++){var r=t[n].parentNode;r.removeChild(t[n]),r.classList.remove("withMultiSelect")}}}function m(e,t){var n=d.Ay.parentWithAttribute(e,"data-id").getAttribute("data-id");if(t?f.filter((function(e){return e===n})).length||(f.push(n),y.push(e)):(f=f.filter((function(e){return e!==n})),y=y.filter((function(t){return t!==e}))),f.length){var a=document.querySelector(".itemSelectionCount");a&&(a.innerHTML=v.Ay.toLocaleString(f.length))}else b()}function k(){m(this,this.checked)}function S(e,t,n){var a=e.querySelector(".itemSelectionPanel");if(!a){(a=document.createElement("div")).classList.add("itemSelectionPanel");var i=e.querySelector(".cardBox")||e.querySelector(".cardContent");i.classList.add("withMultiSelect"),i.appendChild(a);var r="chkItemSelect";t&&n&&(r+=" checkedInitial");var c=t?" checked":"";a.innerHTML='<label class="checkboxContainer"><input type="checkbox" is="emby-checkbox" data-outlineclass="multiSelectCheckboxOutline" class="'.concat(r,'"').concat(c,"/><span></span></label>"),a.querySelector(".chkItemSelect").addEventListener("change",k)}}function g(e){var t=o.tF.currentApiClient();t.getCurrentUser().then((function(a){t.getItem(t.getCurrentUserId(),f[0]).then((function(r){var o=[];o.push({name:l.Ay.translate("SelectAll"),id:"selectall",icon:"select_all"}),o.push({name:l.Ay.translate("AddToCollection"),id:"addtocollection",icon:"add"}),o.push({name:l.Ay.translate("AddToPlaylist"),id:"playlist",icon:"playlist_add"}),a.Policy.EnableContentDeletion&&o.push({name:l.Ay.translate("Delete"),id:"delete",icon:"delete"}),a.Policy.EnableContentDownloading&&c.g.supports(i.Y.FileDownload),a.Policy.IsAdministrator&&o.push({name:l.Ay.translate("GroupVersions"),id:"groupvideos",icon:"call_merge"}),o.push({name:l.Ay.translate("MarkPlayed"),id:"markplayed",icon:"check_box"}),o.push({name:l.Ay.translate("MarkUnplayed"),id:"markunplayed",icon:"check_box_outline_blank"}),p.Ay.canRefreshMetadata(r,a)&&o.push({name:l.Ay.translate("RefreshMetadata"),id:"refresh",icon:"refresh"}),n.e(62882).then(n.bind(n,62882)).then((function(a){a.show({items:o,positionTo:e.target,callback:function(e){var a=f.slice(0),i=t.serverInfo().Id;switch(e){case"selectall":for(var r=document.querySelectorAll(".itemSelectionPanel"),c=0,o=r.length;c<o;c++){var d=r[c].querySelector(".chkItemSelect");!d||d.classList.contains("checkedInitial")||d.checked||0==d.getBoundingClientRect().width||(d.checked=!0,m(d,!0))}break;case"addtocollection":n.e(3380).then(n.bind(n,3380)).then((function(e){(new(0,e.default)).show({items:a,serverId:i})})),b(),x();break;case"playlist":Promise.all([n.e(45642),n.e(81949)]).then(n.bind(n,4330)).then((function(e){(new(0,e.default)).show({items:a,serverId:i}).catch((function(){}))})).catch((function(e){console.error("[AddToPlaylist] failed to load playlist editor",e)})),b(),x();break;case"delete":(function(e,t){return new Promise((function(n,a){var i=l.Ay.translate("ConfirmDeleteItem"),r=l.Ay.translate("HeaderDeleteItem");t.length>1&&(i=l.Ay.translate("ConfirmDeleteItems"),r=l.Ay.translate("HeaderDeleteItems")),(0,h.A)(i,r).then((function(){var i=t.map((function(t){return e.deleteItem(t)}));Promise.all(i).then(n,(function(){var e;(e=l.Ay.translate("ErrorDeletingItem"),new Promise((function(t){(0,u.A)(e).then(t,t)}))).then(a,a)}))}),a)}))})(t,a).then(x),b(),x();break;case"groupvideos":!function(e,t){t.length<2?(0,u.A)({text:l.Ay.translate("PleaseSelectTwoItems")}):(s.Ay.show(),e.ajax({type:"POST",url:e.getUrl("Videos/MergeVersions",{Ids:t.join(",")})}).then((function(){s.Ay.hide(),b(),x()})))}(t,a);break;case"markplayed":a.forEach((function(e){t.markPlayed(t.getCurrentUserId(),e)})),b(),x();break;case"markunplayed":a.forEach((function(e){t.markUnplayed(t.getCurrentUserId(),e)})),b(),x();break;case"refresh":n.e(77004).then(n.bind(n,77004)).then((function(e){new(0,e.default)({itemIds:a,serverId:i}).show()})),b(),x()}}})}))}))}))}function x(){var e=[];[].forEach.call(y,(function(t){var n=d.Ay.parentWithAttribute(t,"is","emby-itemscontainer");n&&!e.includes(n)&&e.push(n)}));for(var t=0,n=e.length;t<n;t++)e[t].notifyRefreshNeeded(!0)}function A(e,t){Promise.resolve().then(n.bind(n,77157)).then((function(){for(var n=document.querySelectorAll(".card"),i=0,r=n.length;i<r;i++)S(n[i],e===n[i],t);!function(){var e=a;if(!e){(e=document.createElement("div")).classList.add("selectionCommandsPanel"),document.body.appendChild(e),a=e;var t="";t+='<button is="paper-icon-button-light" class="btnCloseSelectionPanel autoSize"><span class="material-icons close" aria-hidden="true"></span></button>',t+='<h1 class="itemSelectionCount"></h1>',t+='<button is="paper-icon-button-light" class="btnSelectionPanelOptions autoSize"><span class="material-icons '.concat("more_vert",'" aria-hidden="true"></span></button>'),e.innerHTML=t,e.querySelector(".btnCloseSelectionPanel").addEventListener("click",b);var n=e.querySelector(".btnSelectionPanelOptions");d.Ay.addEventListener(n,"click",g,{passive:!0})}}(),m(e,!0)}))}function I(e){var t=e.target;if(f.length){var n=d.Ay.parentWithClass(t,"card");if(n){var a=n.querySelector(".itemSelectionPanel");if(a)return function(e,t){if(!d.Ay.parentWithClass(e.target,"chkItemSelect")){var n=t.querySelector(".chkItemSelect");if(n)if(n.classList.contains("checkedInitial"))n.classList.remove("checkedInitial");else{var a=!n.checked;n.checked=a,m(n,a)}}return e.preventDefault(),e.stopPropagation(),!1}(e,a)}return e.preventDefault(),e.stopPropagation(),!1}}function F(e){var t,n,a,i,c,s=e.container;function l(e){var t=d.Ay.parentWithClass(e.target,"card");return t&&A(t,!0),e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!1}function o(e){return e.changedTouches||e.targetTouches||e.touches}function u(e){var r=o(e)[0];if(t=null,a=0,i=0,r){a=r.clientX,i=r.clientY;var c=r.target;if(c){var s=d.Ay.parentWithClass(c,"card");s&&(n&&(clearTimeout(n),n=null),t=s,n=setTimeout(y,550))}}}function h(e){if(t){var n,r,c=o(e)[0];if(c){var s=c.clientX||0,l=c.clientY||0;n=Math.abs(s-(a||0)),r=Math.abs(l-(i||0))}else n=100,r=100;(n>=5||r>=5)&&f()}}function p(){f()}function v(e){n&&(clearTimeout(n),n=null),t=e.target,n=setTimeout(y,550)}function f(){n&&(clearTimeout(n),n=null),t=null}function y(){if(t){var e=d.Ay.parentWithClass(t,"card");t=null,e&&A(e,!0)}}c=s,r.A.touch&&!r.A.safari?c.addEventListener("contextmenu",l):(d.Ay.addEventListener(c,"touchstart",u,{passive:!0}),d.Ay.addEventListener(c,"touchmove",h,{passive:!0}),d.Ay.addEventListener(c,"touchend",p,{passive:!0}),d.Ay.addEventListener(c,"touchcancel",p,{passive:!0}),d.Ay.addEventListener(c,"mousedown",v,{passive:!0}),d.Ay.addEventListener(c,"mouseleave",f,{passive:!0}),d.Ay.addEventListener(c,"mouseup",f,{passive:!0})),!1!==e.bindOnClick&&s.addEventListener("click",I),this.onContainerClick=I,this.destroy=function(){s.removeEventListener("click",I),s.removeEventListener("contextmenu",l);var e=s;d.Ay.removeEventListener(e,"touchstart",u,{passive:!0}),d.Ay.removeEventListener(e,"touchmove",h,{passive:!0}),d.Ay.removeEventListener(e,"touchend",p,{passive:!0}),d.Ay.removeEventListener(e,"mousedown",v,{passive:!0}),d.Ay.removeEventListener(e,"mouseleave",f,{passive:!0}),d.Ay.removeEventListener(e,"mouseup",f,{passive:!0})}}document.addEventListener("viewbeforehide",b);var L=function(e){A(e,!1)},E=function(){b()}},44599:function(e,t,n){n.r(t),n.d(t,{default:function(){return k}}),n(29305),n(32733),n(84701),n(81678),n(24776),n(14382),n(69892),n(76281),n(44962),n(86584),n(89336),n(26448),n(4754),n(94),n(36947),n(78557),n(90076),n(95021),n(73687),n(99425),n(83994),n(93062),n(11810),n(82367);var a=n(36300),i=n(79754),r=n(5898),c=n(67430),s=n(58867),l=n(44797),o=(n(77157),n(81077),n(35308));function d(e){return d="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},d(e)}function u(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,h(a.key),a)}}function h(e){var t=function(e){if("object"!=d(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=d(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==d(t)?t:t+""}function p(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return v(e,t);var n={}.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)?v(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var a=0,i=function(){};return{s:i,n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},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 r,c=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){s=!0,r=e},f:function(){try{c||null==n.return||n.return()}finally{if(s)throw r}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,a=Array(t);n<t;n++)a[n]=e[n];return a}function f(e,t,n){return t?(0,s.A)(e,t.split(n)).sort():e}function y(e,t,n,a,i){var r=e.querySelector(t);a.length?r.classList.remove("hide"):r.classList.add("hide");var c="";c+='<div class="checkboxList">',c+=a.map((function(e){var t="",a=i(e)?"checked":"";return t+="<label>",t+='<input is="emby-checkbox" type="checkbox" '.concat(a,' data-filter="').concat(e,'" class="').concat(n,'"/>'),(t+="<span>".concat(e,"</span>"))+"</label>"})).join(""),c+="</div>",r.querySelector(".filterOptions").innerHTML=c}function b(e){(0,o.stopMultiSelect)(),l.A.trigger(e,"filterchange")}function m(e){return"movies"===e||"series"===e||"albums"===e||"albumartists"===e||"artists"===e||"songs"===e||"episodes"===e}var k=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=t},t=[{key:"onFavoriteChange",value:function(e){var t=this.options.query;t.StartIndex=0,t.IsFavorite=!!e.checked||null,b(this)}},{key:"onStandardFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.Filters||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.Filters=a,b(this)}},{key:"onVideoTypeFilterChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.VideoTypes||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.StartIndex=0,t.VideoTypes=a,b(this)}},{key:"onStatusChange",value:function(e){var t=this.options.query,n=e.getAttribute("data-filter"),a=t.SeriesStatus||"";a=",".concat(a).replace(",".concat(n),"").substring(1),e.checked&&(a=a?"".concat(a,",").concat(n):n),t.SeriesStatus=a,t.StartIndex=0,b(this)}},{key:"bindEvents",value:function(e){var t=this,n=this.options.query;if("livetvchannels"===this.options.mode){var i,r=p(e.querySelectorAll(".chkFavorite"));try{var c=function(){var e=i.value;e.addEventListener("change",(function(){return t.onFavoriteChange(e)}))};for(r.s();!(i=r.n()).done;)c()}catch(e){r.e(e)}finally{r.f()}}else{var s,l=p(e.querySelectorAll(".chkStandardFilter"));try{var o=function(){var e=s.value;e.addEventListener("change",(function(){return t.onStandardFilterChange(e)}))};for(l.s();!(s=l.n()).done;)o()}catch(e){l.e(e)}finally{l.f()}}var d,u=p(e.querySelectorAll(".chkVideoTypeFilter"));try{var h=function(){var e=d.value;e.addEventListener("change",(function(){return t.onVideoTypeFilterChange(e)}))};for(u.s();!(d=u.n()).done;)h()}catch(e){u.e(e)}finally{u.f()}var v=e.querySelector(".chk3DFilter");v.addEventListener("change",(function(){n.StartIndex=0,n.Is3D=!!v.checked||null,b(t)}));var f=e.querySelector(".chk4KFilter");f.addEventListener("change",(function(){n.StartIndex=0,n.Is4K=!!f.checked||null,b(t)}));var y=e.querySelector(".chkHDFilter"),m=e.querySelector(".chkSDFilter");y.addEventListener("change",(function(){n.StartIndex=0,y.checked?(m.checked=!1,n.IsHD=!0):n.IsHD=null,b(t)})),m.addEventListener("change",(function(){n.StartIndex=0,m.checked?(y.checked=!1,n.IsHD=!1):n.IsHD=null,b(t)}));var k,S=p(e.querySelectorAll(".chkStatus"));try{var g=function(){var e=k.value;e.addEventListener("change",(function(){return t.onStatusChange(e)}))};for(S.s();!(k=S.n()).done;)g()}catch(e){S.e(e)}finally{S.f()}var x=e.querySelector("#chkTrailer");x.addEventListener("change",(function(){n.StartIndex=0,n.HasTrailer=!!x.checked||null,b(t)}));var A=e.querySelector("#chkThemeSong");A.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeSong=!!A.checked||null,b(t)}));var I=e.querySelector("#chkSpecialFeature");I.addEventListener("change",(function(){n.StartIndex=0,n.HasSpecialFeature=!!I.checked||null,b(t)}));var F=e.querySelector("#chkThemeVideo");F.addEventListener("change",(function(){n.StartIndex=0,n.HasThemeVideo=!!F.checked||null,b(t)}));var L=e.querySelector("#chkMissingEpisode");L.addEventListener("change",(function(){n.StartIndex=0,n.IsMissing=!!L.checked,b(t)}));var E=e.querySelector("#chkSpecialEpisode");E.addEventListener("change",(function(){n.StartIndex=0,n.ParentIndexNumber=E.checked?0:null,b(t)}));var q=e.querySelector("#chkFutureEpisode");q.addEventListener("change",(function(){n.StartIndex=0,q.checked?(n.IsUnaired=!0,n.IsVirtualUnaired=null):(n.IsUnaired=null,n.IsVirtualUnaired=!1),b(t)}));var T=e.querySelector("#chkSubtitle");T.addEventListener("change",(function(){n.StartIndex=0,n.HasSubtitles=!!T.checked||null,b(t)})),e.addEventListener("change",(function(e){var i=a.Ay.parentWithClass(e.target,"chkGenreFilter");if(i){var r=i.getAttribute("data-filter"),c=n.Genres||"";return c=c.split("|").filter((function(e){return e!==r})).join("|"),i.checked&&(c=c?c+"|"+r:r),n.StartIndex=0,n.Genres=c,void b(t)}var s=a.Ay.parentWithClass(e.target,"chkTagFilter");if(s){var l=s.getAttribute("data-filter"),o=n.Tags||"";return o=o.split("|").filter((function(e){return e!==l})).join("|"),s.checked&&(o=o?o+"|"+l:l),n.StartIndex=0,n.Tags=o,void b(t)}var d=a.Ay.parentWithClass(e.target,"chkYearFilter");if(d){var u=d.getAttribute("data-filter"),h=n.Years||"";return h=h.split(",").filter((function(e){return e!==u})).join(","),d.checked&&(h=h?h+","+u:u),n.StartIndex=0,n.Years=h,void b(t)}var p=a.Ay.parentWithClass(e.target,"chkOfficialRatingFilter");if(p){var v=p.getAttribute("data-filter"),f=n.OfficialRatings||"";f=f.split("|").filter((function(e){return e!==v})).join("|"),p.checked&&(f=f?f+"|"+v:v),n.StartIndex=0,n.OfficialRatings=f,b(t)}}))}},{key:"show",value:function(){var e=this;return new Promise((function(t){var n,a,s=i.default.createDialog({removeOnClose:!0,modal:!1});if(s.classList.add("ui-body-a"),s.classList.add("background-theme-a"),s.classList.add("formDialog"),s.classList.add("filterDialog"),s.innerHTML=r.Ay.translateHtml('<div style="margin:0;padding:1.5em 2em" class="filterDialogContent"> <div is="emby-collapse" title="${Filters}"> <div class="collapseContent"> <div class="checkboxList"> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsPlayed"/> <span>${Played}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsUnPlayed"/> <span>${Unplayed}</span> </label> <label class="videoStandard"> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter" data-filter="IsResumable"/> <span>${OptionResumable}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStandardFilter chkFavorite" data-filter="IsFavorite"/> <span>${Favorites}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkSpecialEpisode"/> <span>${OptionSpecialEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkMissingEpisode"/> <span>${OptionMissingEpisode}</span> </label> <label class="episodeFilter hide"> <input type="checkbox" is="emby-checkbox" id="chkFutureEpisode"/> <span>${OptionUnairedEpisode}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderStatus}" class="seriesStatus hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Continuing"/> <span>${Continuing}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Ended"/> <span>${Ended}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkStatus" data-filter="Unreleased"/> <span>${Unreleased}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Features}" class="features hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSubtitle"/> <span>${Subtitles}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkTrailer"/> <span>${ButtonTrailer}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkSpecialFeature"/> <span>${SpecialFeatures}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeSong"/> <span>${OptionHasThemeSong}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkFeatureFilter" id="chkThemeVideo"/> <span>${OptionHasThemeVideo}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${Genres}" class="genreFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderParentalRatings}" class="officialRatingFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${Tags}" class="tagFilters hide"> <div class="collapseContent filterOptions"> </div> </div> <div is="emby-collapse" title="${HeaderVideoTypes}" class="videoTypeFilters hide"> <div class="collapseContent"> <div class="checkboxList"> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkBluray" data-filter="Bluray"/> <span>${OptionBluray}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkVideoTypeFilter chkDvd" data-filter="Dvd"/> <span>${OptionDvd}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkHDFilter IsHD"/> <span>${OptionIsHD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk4KFilter Is4K"/> <span>4K</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chkSDFilter IsHD"/> <span>${OptionIsSD}</span> </label> <label> <input type="checkbox" is="emby-checkbox" class="chk3DFilter chk3D"/> <span>${Option3D}</span> </label> </div> </div> </div> <div is="emby-collapse" title="${HeaderYears}" class="yearFilters hide"> <div class="collapseContent filterOptions"> </div> </div> </div> '),n=s,"livetvchannels"!==(a=e.options).mode&&"albums"!==a.mode&&"artists"!==a.mode&&"albumartists"!==a.mode&&"songs"!==a.mode||function(e){var t,n=p(e.querySelectorAll(".".concat("videoStandard")));try{for(n.s();!(t=n.n()).done;)t.value.classList.add("hide")}catch(e){n.e(e)}finally{n.f()}}(n),m(a.mode)&&(n.querySelector(".genreFilters").classList.remove("hide"),n.querySelector(".officialRatingFilters").classList.remove("hide"),n.querySelector(".tagFilters").classList.remove("hide"),n.querySelector(".yearFilters").classList.remove("hide")),"movies"!==a.mode&&"episodes"!==a.mode||n.querySelector(".videoTypeFilters").classList.remove("hide"),"movies"!==a.mode&&"series"!==a.mode&&"episodes"!==a.mode||n.querySelector(".features").classList.remove("hide"),"series"===a.mode&&n.querySelector(".seriesStatus").classList.remove("hide"),"episodes"===a.mode&&function(e){var t,n=p(e.querySelectorAll(".".concat("episodeFilter")));try{for(n.s();!(t=n.n()).done;)t.value.classList.remove("hide")}catch(e){n.e(e)}finally{n.f()}}(n),i.default.open(s),s.addEventListener("close",t),function(e,t){var n=t.query;if("livetvchannels"===t.mode)e.querySelector(".chkFavorite").checked=!0===n.IsFavorite;else{var a,i=p(e.querySelectorAll(".chkStandardFilter"));try{for(i.s();!(a=i.n()).done;){var r=a.value,c=",".concat(n.Filters||""),s=r.getAttribute("data-filter");r.checked=c.includes(",".concat(s))}}catch(e){i.e(e)}finally{i.f()}}var l,o=p(e.querySelectorAll(".chkVideoTypeFilter"));try{for(o.s();!(l=o.n()).done;){var d=l.value,u=",".concat(n.VideoTypes||""),h=d.getAttribute("data-filter");d.checked=u.includes(",".concat(h))}}catch(e){o.e(e)}finally{o.f()}e.querySelector(".chk3DFilter").checked=!0===n.Is3D,e.querySelector(".chkHDFilter").checked=!0===n.IsHD,e.querySelector(".chk4KFilter").checked=!0===n.Is4K,e.querySelector(".chkSDFilter").checked=!1===n.IsHD,e.querySelector("#chkSubtitle").checked=!0===n.HasSubtitles,e.querySelector("#chkTrailer").checked=!0===n.HasTrailer,e.querySelector("#chkThemeSong").checked=!0===n.HasThemeSong,e.querySelector("#chkThemeVideo").checked=!0===n.HasThemeVideo,e.querySelector("#chkSpecialFeature").checked=!0===n.HasSpecialFeature,e.querySelector("#chkSpecialEpisode").checked=0===n.ParentIndexNumber,e.querySelector("#chkMissingEpisode").checked=!0===n.IsMissing,e.querySelector("#chkFutureEpisode").checked=!0===n.IsUnaired;var v,f=p(e.querySelectorAll(".chkStatus"));try{for(f.s();!(v=f.n()).done;){var y=v.value,b=",".concat(n.SeriesStatus||""),m=y.getAttribute("data-filter");y.checked=b.includes(",".concat(m))}}catch(e){f.e(e)}finally{f.f()}}(s,e.options),e.bindEvents(s),m(e.options.mode)){s.classList.add("dynamicFilterDialog");var l=c.tF.getApiClient(e.options.serverId);!function(e,t,n,a){t.getJSON(t.getUrl("Items/Filters",{UserId:n,ParentId:a.ParentId,IncludeItemTypes:a.IncludeItemTypes})).then((function(t){!function(e,t,n){y(e,".genreFilters","chkGenreFilter",f(t.Genres,n.Genres,"|"),(function(e){var t="|";return(t+(n.Genres||"")+t).includes(t+e+t)})),y(e,".officialRatingFilters","chkOfficialRatingFilter",f(t.OfficialRatings,n.OfficialRatings,"|"),(function(e){var t="|";return(t+(n.OfficialRatings||"")+t).includes(t+e+t)})),y(e,".tagFilters","chkTagFilter",f(t.Tags,n.Tags,"|"),(function(e){var t="|";return(t+(n.Tags||"")+t).includes(t+e+t)})),y(e,".yearFilters","chkYearFilter",f(t.Years.map(String),n.Years,","),(function(e){var t=",";return(t+(n.Years||"")+t).includes(t+e+t)}))}(e,t,a)}))}(s,l,l.getCurrentUserId(),e.options.query)}}))}}],t&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}()},81077:function(e,t,n){n(69177),n(10353);var a=Object.create(HTMLDivElement.prototype);function i(){var e=this,t=e.parentNode.querySelector(".collapseContent");t.expanded?(t.expanded=!1,function(e,t){requestAnimationFrame((function(){t.style.height=t.offsetHeight+"px",t.offsetHeight,t.classList.remove("expanded"),t.style.height="0",setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide")}),300),e.querySelector(".material-icons").classList.remove("emby-collapse-expandIconExpanded")}))}(e,t)):(t.expanded=!0,function(e,t){requestAnimationFrame((function(){t.classList.remove("hide"),t.classList.add("expanded"),t.style.height="auto";var n=t.offsetHeight+"px";t.style.height="0",t.offsetHeight,t.style.height=n,setTimeout((function(){t.classList.contains("expanded")?t.classList.remove("hide"):t.classList.add("hide"),t.style.height="auto"}),300),e.querySelector(".material-icons").classList.add("emby-collapse-expandIconExpanded")}))}(e,t))}a.attachedCallback=function(){if(!this.classList.contains("emby-collapse")){this.classList.add("emby-collapse");var e=this.querySelector(".collapseContent");e&&e.classList.add("hide");var t=this.getAttribute("title"),n='<button is="emby-button" type="button" on-click="toggleExpand" id="expandButton" class="emby-collapsible-button iconRight"><h3 class="emby-collapsible-title" title="'+t+'">'+t+'</h3><span class="material-icons emby-collapse-expandIcon expand_more" aria-hidden="true"></span></button>';this.insertAdjacentHTML("afterbegin",n);var a=this.querySelector(".emby-collapsible-button");a.addEventListener("click",i),"true"===this.getAttribute("data-expanded")&&i.call(a)}},document.registerElement("emby-collapse",{prototype:a,extends:"div"})}}]);