PageSourceSearch

https://exode.me/client/en-US/chunk-DMGJHKPT.js

js exode.me collected 2026-10-04 16:17:28 UTC 35,979 bytes, 1 lines download raw bytes

1import{b as xt}from"./chunk-ZEJP5NXX.js";import{a as $t}from"./chunk-35AIQB7E.js";import{a as U,b}from"./chunk-MJ7YGT2J.js";import{a as Ft}from"./chunk-FGO7IWQW.js";import{h as Nt}from"./chunk-O5IYCHZC.js";import{a as ne}from"./chunk-LYSJ47UW.js";import"./chunk-ARBLAW36.js";import{a as It}from"./chunk-G3L6OW7K.js";import{a as Lt}from"./chunk-4GM7L6JB.js";import{b as At,f as bt,g as Ot}from"./chunk-QMQZZIR5.js";import"./chunk-XGC7JZAU.js";import"./chunk-MBPSVMMT.js";import"./chunk-AGD5WKED.js";import"./chunk-J3EEEQXE.js";import"./chunk-62ATBB34.js";import{a as Pt}from"./chunk-PVOHGV2Y.js";import"./chunk-LQVRZI54.js";import"./chunk-WOBKXJK4.js";import"./chunk-BWH75TCH.js";import"./chunk-SSETSBQT.js";import"./chunk-SGZLU3PA.js";import"./chunk-EO7FPGTW.js";import"./chunk-GDFO7X2G.js";import"./chunk-Q6I3NOHV.js";import{a as vt}from"./chunk-KIVJRE4O.js";import"./chunk-L7C23KC7.js";import"./chunk-YLZ34D6D.js";import"./chunk-QXVUYXIG.js";import"./chunk-OR7MKCZD.js";import{a as Tt}from"./chunk-OTKVWBE5.js";import"./chunk-KEEUBRDB.js";import"./chunk-GGNTEXQL.js";import{a as yt}from"./chunk-KLT2ZASF.js";import{a as te,b as Mt}from"./chunk-V3JZPFOE.js";import"./chunk-PG4F5PSG.js";import"./chunk-CIVVPYF3.js";import"./chunk-FZFWY5Y6.js";import"./chunk-EGEBNI4V.js";import{A as ut,E as St,c as it,g as at,h as rt,m as ot,o as lt,p as st,r as dt,y as _t,z as ct}from"./chunk-EBOVR5NW.js";import{d as pt}from"./chunk-UME7L37K.js";import{a as Rt}from"./chunk-R76LZEZS.js";import{Ab as Ue,Bb as Be,Ca as s,Cb as _,Cc as Qe,Db as K,Dc as Ze,Eb as Q,Fb as Ye,Fd as tt,Gb as p,Ib as d,Jd as L,Kd as nt,Ma as q,Mh as Et,Oh as ft,Rg as Ct,Sb as oe,Sf as Z,Ta as J,Xb as v,Xf as gt,Y as D,Yb as P,Zc as et,aa as m,bb as Xe,bc as f,cc as R,d as Ve,dc as T,fa as C,fb as u,ga as h,gb as S,hh as ht,ib as O,jb as N,kb as F,lb as g,lc as je,mb as l,n as De,nb as r,ob as k,r as Ge,ra as G,sb as ze,sc as qe,tb as We,tc as Je,th as ee,ub as re,wc as Ke,yb as E,yh as mt,za as ke,zf as le}from"./chunk-HVCWS4IF.js";import{i as we,j as M}from"./chunk-KJ7W2O2B.js";function wt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("sort","-match"));}),_(1,21),r();}}function Vt(a,e){if(a&1){let n=E();l(0,"div",42)(1,"input",82),T("ngModelChange",function(i){C(n);let o=d();return R(o.advancedSearch().sort,i)||(o.advancedSearch().sort=i),h(i);}),r(),l(2,"label",83),v(3),r()();}if(a&2){let n=e.$implicit,t=d();s(),g("id",n.id)("value",n.id),f("ngModel",t.advancedSearch().sort),s(),g("for",n.id),s(),P(n.label);}}function Dt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("isLive"));}),_(1,22),r();}}function Gt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetLocalField("publishedDateRange"));}),_(1,23),r();}}function kt(a,e){if(a&1){let n=E();l(0,"div",42)(1,"input",84),p("change",function(){C(n);let i=d();return h(i.onDurationOrPublishedUpdated());}),T("ngModelChange",function(i){C(n);let o=d();return R(o.publishedDateRange,i)||(o.publishedDateRange=i),h(i);}),r(),l(2,"label",83),v(3),r()();}if(a&2){let n=e.$implicit,t=d();s(),g("id",n.id)("value",n.id),f("ngModel",t.publishedDateRange),s(),g("for",n.id),s(),P(n.label);}}function Xt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetOriginalPublicationYears());}),_(1,24),r();}}function zt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetLocalField("durationRange"));}),_(1,25),r();}}function Wt(a,e){if(a&1){let n=E();l(0,"div",42)(1,"input",85),p("change",function(){C(n);let i=d();return h(i.onDurationOrPublishedUpdated());}),T("ngModelChange",function(i){C(n);let o=d();return R(o.durationRange,i)||(o.durationRange=i),h(i);}),r(),l(2,"label",83),v(3),r()();}if(a&2){let n=e.$implicit,t=d();s(),g("id",n.id)("value",n.id),f("ngModel",t.durationRange),s(),g("for",n.id),s(),P(n.label);}}function Ut(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("categoryOneOf"));}),_(1,26),r();}}function Bt(a,e){if(a&1&&(l(0,"option",60),v(1),r()),a&2){let n=e.$implicit;g("value",n.id),s(),P(n.label);}}function Yt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("licenceOneOf"));}),_(1,27),r();}}
1function jt(a,e){if(a&1&&(l(0,"option",60),v(1),r()),a&2){let n=e.$implicit;g("value",n.id),s(),P(n.label);}}function qt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("languageOneOf"));}),_(1,28),r();}}function Jt(a,e){if(a&1&&(l(0,"option",60),v(1),r()),a&2){let n=e.$implicit;g("value",n.id),s(),P(n.label);}}function Kt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("tagsAllOf"));}),_(1,29),r();}}function Qt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("tagsOneOf"));}),_(1,30),r();}}function Zt(a,e){if(a&1){let n=E();l(0,"button",81),p("click",function(){C(n);let i=d();return h(i.resetField("resultType"));}),_(1,31),r();}}function en(a,e){if(a&1){let n=E();l(0,"div",38)(1,"div",39)(2,"label",86),_(3,32),r()(),l(4,"div",42)(5,"input",87),T("ngModelChange",function(i){C(n);let o=d();return R(o.advancedSearch().searchTarget,i)||(o.advancedSearch().searchTarget=i),h(i);}),r(),l(6,"label",88),_(7,33),r()(),l(8,"div",42)(9,"input",89),T("ngModelChange",function(i){C(n);let o=d();return R(o.advancedSearch().searchTarget,i)||(o.advancedSearch().searchTarget=i),h(i);}),r(),l(10,"label",90),_(11,34),r()()();}if(a&2){let n=d();s(5),f("ngModel",n.advancedSearch().searchTarget),s(4),f("ngModel",n.advancedSearch().searchTarget);}}function tn(a,e){if(a&1){let n=E();l(0,"button",91),p("click",function(){C(n);let i=d();return h(i.reset());}),_(1,35),r();}}var X=class X{serverService=m(ee);advancedSearch=Ze(new U());filtered=Qe();videoCategories=[];videoLicences=[];videoLanguages=[];publishedDateRanges=[];sorts=[];durationRanges=[];publishedDateRange;durationRange;originallyPublishedStartYear;originallyPublishedEndYear;serverConfig;constructor(){this.publishedDateRanges=[{id:"today",label:"Today"},{id:"last_7days",label:"Last 7 days"},{id:"last_30days",label:"Last 30 days"},{id:"last_365days",label:"Last 365 days"}],this.durationRanges=[{id:"short",label:"Short (< 4 min)"},{id:"medium",label:"Medium (4-10 min)"},{id:"long",label:"Long (> 10 min)"}],this.sorts=[{id:"-match",label:"Relevance"},{id:"-publishedAt",label:"Publish date"},{id:"-views",label:"Views"}];}ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.serverService.getVideoCategories().subscribe(e=>this.videoCategories=e),this.serverService.getVideoLicences().subscribe(e=>this.videoLicences=e),this.serverService.getVideoLanguages().subscribe(e=>this.videoLanguages=e),this.loadFromDurationRange(),this.loadFromPublishedRange(),this.loadOriginallyPublishedAtYears();}onDurationOrPublishedUpdated(){this.updateModelFromDurationRange(),this.updateModelFromPublishedRange(),this.updateModelFromOriginallyPublishedAtYears();}formUpdated(){this.onDurationOrPublishedUpdated(),this.filtered.emit(this.advancedSearch());}reset(){this.advancedSearch().reset(),this.resetOriginalPublicationYears(),this.durationRange=void 0,this.publishedDateRange=void 0,this.onDurationOrPublishedUpdated();}resetField(e,n){this.advancedSearch()[e]=n;}resetLocalField(e,n){this[e]=n,this.onDurationOrPublishedUpdated();}resetOriginalPublicationYears(){this.originallyPublishedStartYear=void 0,this.originallyPublishedEndYear=void 0;}isSearchTargetEnabled(){return this.serverConfig.search.searchIndex.enabled&&this.serverConfig.search.searchIndex.disableLocalSearch!==!0;}loadOriginallyPublishedAtYears(){let e=this.advancedSearch();this.originallyPublishedStartYear=e.originallyPublishedStartDate?new Date(e.originallyPublishedStartDate).getFullYear().toString():void 0;let n=this.advancedSearch();this.originallyPublishedEndYear=n.originallyPublishedEndDate?new Date(n.originallyPublishedEndDate).getFullYear().toString():void 0;}loadFromDurationRange(){let e=this.advancedSearch();(e.durationMin||e.durationMax)&&(e.durationMin===240&&e.durationMax===600?this.durationRange="medium":e.durationMax===240?this.durationRange="short":e.durationMin===600&&(this.durationRange="long"));}loadFromPublishedRange(){let e=this.advancedSearch();if(e.startDate){let n=new Date(e.startDate),t=new Date(),i=Math.abs(n.getTime()-t.getTime()),o=1e3*3600*24,y=i/o;y>=365?this.publishedDateRange="last_365days":y>=30?this.publishedDateRange="last_30days":y>=7?this.publishedDateRange="last_7days":y>=0&&(this.publishedDateRange="today");}}updateModelFromOriginallyPublishedAtYears(){let e=new Date();e.setHours(0,0,0,0),e.setMonth(0,1);let n=this.advancedSearch();if(this.originallyPublishedStartYear){let t=parseInt(this.originallyPublishedStartYear,10),i=new Date(e);i.setFullYear(t),n.originallyPublishedStartDate=i.toISOString();}else n.originallyPublishedStartDate=void 0;if(this.originallyPublishedEndYear){let t=parseInt(this.originallyPublishedEndYear,10),i=new Date(e);i.setFullYear(t),n.originallyPublishedEndDate=i.toISOString();}else n.originallyPublishedEndDate=void 0;}updateModelFromDurationRange(){if(!this.durationRange){let y=this.advancedSearch();y.durationMin=void 0,y.durationMax=void 0;return;}let e=240,n=600,t=this.advancedSearch(),i=this.advancedSearch(),o=this.advancedSearch();switch(this.durationRange){case"short":t.durationMin=void 0,t.durationMax=e;break;case"medium":i.durationMin=e,i.durationMax=n;break;case"long":o.durationMin=n,o.durationMax=void 0;break;}}updateModelFromPublishedRange(){if(!this.publishedDateRange)return;let e=new Date();switch(e.setHours(0,0,0,0),this.publishedDateRange){case"last_7days":e.setDate(e.getDate()-7);break;case"last_30days":e.setDate(e.getDate()-30);break;case"last_365days":e.setDate(e.getDate()-365);break;}this.advancedSearch().startDate=e.toISOString();}};M(X,"\u0275fac",function(n){return new(n||X)();}),M(X,"\u0275cmp",q({type:X,selectors:[["my-search-filters"]],inputs:{advancedSearch:[1,"advancedSearch"]},outputs:{filtered:"filtered"},decls:115,vars:29,consts:()=>{let e;e="After...";let n;n="Before...";let t;t="Sort";let i;i="Display only";let o;o="Live videos";let y;y="VOD videos";let z;z="Published date";let W;W="Original publication year";let A;A="Duration";let se;se="Category";let de;de="Display all categories";let _e;_e="Licence";let ce;ce="Display all licenses";let ue;ue="Language";let Se;Se="Display all languages";let ge;ge="All of these tags";let pe;pe="One of these tags";let Ce;Ce="PeerTube instance host";let he;
1he="Result types";let me;me="Videos";let Ee;Ee="Channels";let fe;fe="Playlists";let Re;Re="Filter";let Te;Te="Reset";let Me;Me="Reset";let ye;ye="Reset";let ve;ve="Reset";let Pe;Pe="Reset";let Ae;Ae="Reset";let be;be="Reset";let Oe;Oe="Reset";let Ne;Ne="Reset";let Fe;Fe="Reset";let Le;Le="Reset";let Ie;Ie="Search target";let $e;$e="Instance";let xe;xe="Vidiverse";let He;return He="Reset",[t,i,o,y,z,W,A,se,de,_e,ce,ue,Se,ge,pe,Ce,he,me,Ee,fe,Re,Te,Me,ye,ve,Pe,Ae,be,Oe,Ne,Fe,Le,Ie,$e,xe,He,[1,"row"],[1,"col-lg-4","col-md-6","col-xs-12"],["role","radiogroup",1,"form-group"],[1,"radio-label","label-container"],["for","sort"],["type","button",1,"reset-button","reset-button-small"],[1,"peertube-radio-container"],["for","isLive"],["type","radio","name","isLive","id","isLiveTrue","value","true",3,"ngModelChange","ngModel"],["for","isLiveTrue",1,"radio"],["type","radio","name","isLive","id","isLiveFalse","value","false",3,"ngModelChange","ngModel"],["for","isLiveFalse",1,"radio"],[1,"form-group"],["for","publishedDateRange"],[1,"label-container"],["for","original-publication-after"],[1,"col-sm-6"],["type","text","id","original-publication-after","name","original-publication-after","placeholder",e,1,"form-control",3,"change","keydown.enter","ngModelChange","ngModel"],["type","text","id","original-publication-before","name","original-publication-before","placeholder",n,1,"form-control",3,"change","keydown.enter","ngModelChange","ngModel"],["for","durationRange"],["for","category"],[1,"peertube-select-container"],["id","category","name","category",1,"form-control",3,"ngModelChange","ngModel"],[3,"ngValue"],[3,"value"],["for","licence"],["id","licence","name","licence",1,"form-control",3,"ngModelChange","ngModel"],["for","language"],["id","language","name","language",1,"form-control",3,"ngModelChange","ngModel"],["for","tagsAllOf"],["name","tagsAllOf","inputId","tagsAllOf",3,"ngModelChange","ngModel"],["for","tagsOneOf"],["name","tagsOneOf","inputId","tagsOneOf",3,"ngModelChange","ngModel"],["for","host"],["type","text","id","host","name","host","placeholder","example.com",1,"form-control",3,"change","keydown.enter","ngModelChange","ngModel"],["for","resultType"],["type","radio","name","resultType","id","resultTypeVideos","value","videos",3,"ngModelChange","ngModel"],["for","resultTypeVideos",1,"radio"],["type","radio","name","resultType","id","resultTypeChannels","value","channels",3,"ngModelChange","ngModel"],["for","resultTypeChannels",1,"radio"],["type","radio","name","resultType","id","resultTypePlaylists","value","playlists",3,"ngModelChange","ngModel"],["for","resultTypePlaylists",1,"radio"],[1,"submit-button"],["type","button",1,"reset-button","me-3"],["type","button","aria-label","Filter the results and automatically close the filters panel",1,"peertube-button","primary-button",3,"click"],["type","button",1,"reset-button","reset-button-small",3,"click"],["type","radio","name","sort",3,"ngModelChange","id","value","ngModel"],[1,"radio",3,"for"],["type","radio","name","publishedDateRange",3,"change","ngModelChange","id","value","ngModel"],["type","radio","name","durationRange",3,"change","ngModelChange","id","value","ngModel"],["for","searchTarget"],["type","radio","name","searchTarget","id","searchTargetLocal","value","local",3,"ngModelChange","ngModel"],["for","searchTargetLocal",1,"radio"],["type","radio","name","searchTarget","id","searchTargetSearchIndex","value","search-index",3,"ngModelChange","ngModel"],["for","searchTargetSearchIndex",1,"radio"],["type","button",1,"reset-button","me-3",3,"click"]];},template:function(n,t){n&1&&(l(0,"form")(1,"div",36)(2,"div",37)(3,"fieldset",38)(4,"div",39)(5,"label",40),_(6,0),r(),u(7,wt,2,0,"button",41),r(),N(8,Vt,4,5,"div",42,O),r(),l(10,"div",38)(11,"div",39)(12,"label",43),_(13,1),r(),u(14,Dt,2,0,"button",41),r(),l(15,"div",42)(16,"input",44),T("ngModelChange",function(o){return R(t.advancedSearch().isLive,o)||(t.advancedSearch().isLive=o),o;}),r(),l(17,"label",45),_(18,2),r()(),l(19,"div",42)(20,"input",46),T("ngModelChange",function(o){return R(t.advancedSearch().isLive,o)||(t.advancedSearch().isLive=o),o;}),r(),l(21,"label",47),_(22,3),r()()(),l(23,"div",48)(24,"div",39)(25,"label",49),_(26,4),r(),u(27,Gt,2,0,"button",41),r(),N(28,kt,4,5,"div",42,O),r(),l(30,"div",48)(31,"div",50)(32,"label",51),_(33,5),r(),u(34,Xt,2,0,"button",41),r(),l(35,"div",36)(36,"div",52)(37,"input",53),p("change",function(){return t.onDurationOrPublishedUpdated();})("keydown.enter",function(o){return o.preventDefault();}),T("ngModelChange",function(o){return R(t.originallyPublishedStartYear,o)||(t.originallyPublishedStartYear=o),o;}),r()(),l(38,"div",52)(39,"input",54),p("change",function(){return t.onDurationOrPublishedUpdated();})("keydown.enter",function(o){return o.preventDefault();}),T("ngModelChange",function(o){return R(t.originallyPublishedEndYear,o)||(t.originallyPublishedEndYear=o),o;}),r()()()()(),l(40,"div",37)(41,"div",38)(42,"div",39)(43,"label",55),_(44,6),r(),u(45,zt,2,0,"button",41),r(),N(46,Wt,4,5,"div",42,O),r(),l(48,"div",48)(49,"label",56),_(50,7),r(),u(51,Ut,2,0,"button",41),l(52,"div",57)(53,"select",58),T("ngModelChange",function(o){return R(t.advancedSearch().categoryOneOf,o)||(t.advancedSearch().categoryOneOf=o),o;}),l(54,"option",59),_(55,8),r(),N(56,Bt,2,2,"option",60,O),r()()(),l(58,"div",48)(59,"label",61),_(60,9),r(),u(61,Yt,2,0,"button",41),l(62,"div",57)(63,"select",62),T("ngModelChange",function(o){return R(t.advancedSearch().licenceOneOf,o)||(t.advancedSearch().licenceOneOf=o),o;}),l(64,"option",59),_(65,10),r(),N(66,jt,2,2,"option",60,O),r()()(),l(68,"div",48)(69,"label",63),_(70,11),r(),u(71,qt,2,0,"button",41),l(72,"div",57)(73,"select",64),T("ngModelChange",function(o){return R(t.advancedSearch().languageOneOf,o)||(t.advancedSearch().languageOneOf=o),o;}),l(74,"option",59),_(75,12),r(),N(76,Jt,2,2,"option",60,O),r()()()(),l(78,"div",37)(79,"div",48)(80,"label",65),_(81,13),r(),u(82,Kt,2,0,"button",41),l(83,"my-select-tags",66),T("ngModelChange",function(o){return R(t.advancedSearch().tagsAllOf,o)||(t.advancedSearch().tagsAllOf=o),o;}),r()(),l(84,"div",48)(85,"label",67),_(86,14),r(),u(87,Qt,2,0,"button",41),l(88,"my-select-tags",68),T("ngModelChange",function(o){return R(t.advancedSearch().tagsOneOf,o)||(t.advancedSearch().tagsOneOf=o),o;}),r()(),l(89,"div",48)(90,"label",69),_(91,15),r(),l(92,"input",70),p("change",function(){return t.onDurationOrPublishedUpdated();})("keydown.enter",function(o){return o.preventDefault();}),T("ngModelChange",function(o){return R(t.advancedSearch().host,o)||(t.advancedSearch().host=o),o;}),r()(),l(93,"div",38)(94,"div",39)(95,"label",71),_(96,16),r(),u(97,Zt,2,0,"button",41),r(),l(98,"div",42)(99,"input",72),T("ngModelChange",function(o){return R(t.advancedSearch().resultType,o)||(t.advancedSearch().resultType=o),o;}),r(),l(100,"label",73),_(101,17),r()(),l(102,"div",42)(103,"input",74),T("ngModelChange",function(o){return R(t.advancedSearch().resultType,o)||(t.advancedSearch().resultType=o),o;}),r(),l(104,"label",75),_(105,18),r()(),l(106,"div",42)(107,"input",76),T("ngModelChange",function(o){return R(t.advancedSearch().resultType,o)||(t.advancedSearch().resultType=o),o;}),r(),l(108,"label",77),_(109,19),r()()(),u(110,en,12,2,"div",38),r()(),l(111,"div",78),u(112,tn,2,0,"button",79),l(113,"button",8
10),p("click",function(){return t.formUpdated();}),_(114,20),r()()()),n&2&&(s(7),S(t.advancedSearch().sort!=="-match"?7:-1),s(),F(t.sorts),s(6),S(t.advancedSearch().isLive!==void 0?14:-1),s(2),f("ngModel",t.advancedSearch().isLive),s(4),f("ngModel",t.advancedSearch().isLive),s(7),S(t.publishedDateRange!==void 0?27:-1),s(),F(t.publishedDateRanges),s(6),S(t.originallyPublishedStartYear||t.originallyPublishedEndYear?34:-1),s(3),f("ngModel",t.originallyPublishedStartYear),s(2),f("ngModel",t.originallyPublishedEndYear),s(6),S(t.durationRange!==void 0?45:-1),s(),F(t.durationRanges),s(5),S(t.advancedSearch().categoryOneOf!==void 0?51:-1),s(2),f("ngModel",t.advancedSearch().categoryOneOf),s(),g("ngValue",void 0),s(2),F(t.videoCategories),s(5),S(t.advancedSearch().licenceOneOf!==void 0?61:-1),s(2),f("ngModel",t.advancedSearch().licenceOneOf),s(),g("ngValue",void 0),s(2),F(t.videoLicences),s(5),S(t.advancedSearch().languageOneOf!==void 0?71:-1),s(2),f("ngModel",t.advancedSearch().languageOneOf),s(),g("ngValue",void 0),s(2),F(t.videoLanguages),s(6),S(t.advancedSearch().tagsAllOf?82:-1),s(),f("ngModel",t.advancedSearch().tagsAllOf),s(4),S(t.advancedSearch().tagsOneOf?87:-1),s(),f("ngModel",t.advancedSearch().tagsOneOf),s(4),f("ngModel",t.advancedSearch().host),s(5),S(t.advancedSearch().resultType!==void 0?97:-1),s(2),f("ngModel",t.advancedSearch().resultType),s(4),f("ngModel",t.advancedSearch().resultType),s(4),f("ngModel",t.advancedSearch().resultType),s(3),S(t.isSearchTargetEnabled()?110:-1),s(2),S(t.advancedSearch().size()?112:-1));},dependencies:[St,st,ct,ut,it,_t,dt,at,rt,lt,ot,Lt],styles:["form[_ngcontent-%COMP%]{margin-top:40px}.radio-label[_ngcontent-%COMP%]{font-weight:700}.peertube-radio-container[_ngcontent-%COMP%]{display:inline-block;margin-inline-end:calc(1.3125rem + .75vw)}@media(min-width:1200px){.peertube-radio-container[_ngcontent-%COMP%]{margin-inline-end:1.875rem}}.peertube-select-container[_ngcontent-%COMP%]{margin-bottom:1rem}input[type=text][_ngcontent-%COMP%]{font-size:16px;padding:var(--input-y-padding) var(--input-x-padding);width:100%;max-width:100%;color:var(--input-fg);background-color:var(--input-bg);border:var(--input-border-width) solid var(--input-border-color);border-radius:var(--input-border-radius);line-height:24px}input[type=text][_ngcontent-%COMP%]::placeholder{color:var(--input-placeholder-color);font-size:var(--input-placeholder-font-size)}input[type=text][readonly][_ngcontent-%COMP%]{color:var(--fg-300)}input[type=text][_ngcontent-%COMP%]:focus, input[type=text][_ngcontent-%COMP%]:focus-visible{box-shadow:0 0 0 .2rem var(--fg-100);outline:0}input[type=text][disabled][_ngcontent-%COMP%]{color:var(--fg-300);opacity:.8}@media screen and (max-width: calc(100% + 40px)){input[type=text][_ngcontent-%COMP%]{width:100%}}.submit-button[_ngcontent-%COMP%]{text-align:end}"]}));var ie=X;var nn=a=>[a];function an(a,e){a&1&&(l(0,"span",19),_(1,3),r());}function rn(a,e){a&1&&(l(0,"span",19),_(1,4),r());}function on(a,e){if(a&1&&(l(0,"span"),Ue(1,5),k(2,"span",20),Be(),r()),a&2){let n=d(2);s(2),K(n.currentSearch),Q(1);}}function ln(a,e){if(a&1&&(l(0,"div",11)(1,"span",19),_(2,2),qe(3,"myNumberFormatter"),r(),u(4,an,2,0,"span",19),u(5,rn,2,0,"span",19),u(6,on,3,1,"span"),r()),a&2){let n=d();s(3),K(Je(3,5,n.pagination.totalItems))(n.pagination.totalItems),Q(2),s(),S(n.advancedSearch.searchTarget==="local"?4:-1),s(),S(n.advancedSearch.searchTarget==="search-index"?5:-1),s(),S(n.currentSearch?6:-1);}}function sn(a,e){if(a&1&&(l(0,"span",14),v(1),r()),a&2){let n=d();s(),P(n.numberOfFilters());}}function dn(a,e){if(a&1&&(l(0,"my-alert",17),v(1),r()),a&2){let n=d();s(),P(n.error);}}function _n(a,e){a&1&&(l(0,"div",18),_(1,6),r());}function cn(a,e){a&1&&re(0);}function un(a,e){if(a&1&&(l(0,"a",26),J(1,cn,1,0,"ng-container",30),r()),a&2){d();let n=oe(6),t=d().$implicit,i=d();g("routerLink",i.getInternalChannelUrl(t)),s(),g("ngTemplateOutlet",n);}}function Sn(a,e){a&1&&re(0);}function gn(a,e){if(a&1&&(l(0,"a",27),J(1,Sn,1,0,"ng-container",30),r()),a&2){d();let n=oe(6),t=d().$implicit,i=d();g("href",i.getExternalChannelUrl(t),ke),s(),g("ngTemplateOutlet",n);}}function pn(a,e){if(a&1&&(l(0,"div",31),v(1),r(),l(2,"div",32),v(3),r()),a&2){let n=d(2).$implicit;s(),P(n.displayName),s(2),P(n.nameWithHost);}}function Cn(a,e){if(a&1&&k(0,"my-subscribe-button",29),a&2){let n=d(2).$implicit;g("videoChannels",je(1,nn,n));}}function hn(a,e){if(a&1&&(l(0,"div",21),k(1,"my-actor-avatar",24),l(2,"div",25),u(3,un,2,2,"a",26)(4,gn,2,2,"a",27),J(5,pn,4,2,"ng-template",null,0,Ke),l(7,"div",28),_(8,7),r()(),u(9,Cn,1,3,"my-subscribe-button",29),r()),a&2){let n=d().$implicit,t=d();s(),g("actor",n)("internalHref",t.getInternalChannelUrl(n))("href",t.getExternalChannelUrl(n)),s(2),S(t.isExternalChannelUrl()?4:3),s(5),K(n.followersCount),Q(8),s(),S(t.hideActions()?-1:9);}}function mn(a,e){if(a&1){let n=E();l(0,"div",22)(1,"my-video-miniature",33),p("videoBlocked",function(){C(n);let i=d().$implicit,o=d();return h(o.removeVideoFromArray(i));})("videoRemoved",function(){C(n);let i=d().$implicit,o=d();return h(o.removeVideoFromArray(i));}),r()();}if(a&2){let n=d().$implicit,t=d();s(),g("video",n)("user",t.userMiniature)("displayAsRow",!0)("displayVideoActions",!t.hideActions())("displayOptions",t.videoDisplayOptions)("videoLinkType",t.getLinkType());}}function En(a,e){if(a&1&&(l(0,"div",23),k(1,"my-video-playlist-miniature",34),r()),a&2){let n=d().$implicit,t=d();s(),g("playlist",n)("linkType",t.getLinkType());}}function fn(a,e){if(a&1&&(u(0,hn,10,6,"div",21),u(1,mn,2,6,"div",22),u(2,En,2,2,"div",23)),a&2){let n=e.$implicit,t=d();
1S(t.isVideoChannel(n)?0:-1),s(),S(t.isVideo(n)?1:-1),s(),S(t.isPlaylist(n)?2:-1);}}var w=class w{route=m(tt);router=m(L);metaService=m(mt);notifier=m(Ct);searchService=m(b);authService=m(ht);userService=m(ft);hooks=m(Et);serverService=m(ee);error;results=[];pagination={currentPage:1,totalItems:null};deletedVideos=0;advancedSearch=new U();isSearchFilterCollapsed=!0;currentSearch;videoDisplayOptions={date:!0,views:!0,by:!0,avatar:!0,privacyLabel:!1};errorMessage;userMiniature;onSearchDataSubject=new Ve();subActivatedRoute;isInitialLoad=!1;hasMoreResults=!0;isSearching=!1;lastSearchTarget;serverConfig;ngOnInit(){this.serverConfig=this.serverService.getHTMLConfig(),this.subActivatedRoute=this.route.queryParams.subscribe({next:e=>{let n=e.search,t=e.searchTarget;(this.currentSearch!==n||t!==this.advancedSearch.searchTarget)&&(this.resetPagination(),this.advancedSearch.reset(),this.currentSearch=n||void 0,this.updateTitle()),this.advancedSearch=new U(e),this.advancedSearch.searchTarget||(this.advancedSearch.searchTarget=this.getDefaultSearchTarget()),this.error=this.checkFieldsAndGetError(),this.isSearchFilterCollapsed=!this.error&&(this.isInitialLoad===!1||!this.advancedSearch.containsValues()),this.isInitialLoad=!1,this.search();},error:e=>this.notifier.handleError(e)}),this.userService.getAnonymousOrLoggedUser().subscribe(e=>this.userMiniature=e),this.hooks.runAction("action:search.init","search");}ngOnDestroy(){this.subActivatedRoute&&this.subActivatedRoute.unsubscribe();}isVideoChannel(e){return e instanceof Mt;}isVideo(e){return e instanceof te;}isPlaylist(e){return e instanceof ne;}isUserLoggedIn(){return this.authService.isLoggedIn();}search(){this.error=this.checkFieldsAndGetError(),!this.error&&(this.isSearching=!0,Ge([this.getVideoChannelObs(),this.getVideoPlaylistObs(),this.getVideosObs()]).subscribe({next:e=>{for(let n of e)this.results=this.results.concat(n.data);this.pagination.totalItems=e.reduce((n,t)=>n+=t.total,0),this.lastSearchTarget=this.advancedSearch.searchTarget,this.hasMoreResults=this.results.length<this.pagination.totalItems,this.onSearchDataSubject.next(e);},error:e=>{if(this.advancedSearch.searchTarget!=="search-index"){this.notifier.error(e.message);return;}this.notifier.error("Search index is unavailable. Retrying with local platform results instead.","Search error"),this.advancedSearch.searchTarget="local",this.search();},complete:()=>{this.isSearching=!1;}}));}onNearOfBottom(){!this.hasMoreResults||this.isSearching||(this.pagination.currentPage+=1,this.search());}onFiltered(){this.resetPagination(),this.updateUrlFromAdvancedSearch();}numberOfFilters(){return this.advancedSearch.size();}removeVideoFromArray(e){let n=this.results;this.results=this.results.filter(t=>!this.isVideo(t)||t.id!==e.id),n.length!==this.results.length&&this.deletedVideos++;}getLinkType(){if(this.advancedSearch.searchTarget==="search-index"){let e=this.serverConfig.search.remoteUri;return!this.isUserLoggedIn()&&!e.anonymous||!e.users?"external":"lazy-load";}return"internal";}isExternalChannelUrl(){return this.getLinkType()==="external";}getExternalChannelUrl(e){if(this.getLinkType()==="external")return e.url;}getInternalChannelUrl(e){let n=this.getLinkType();if(n==="internal")return["/c",e.nameWithHost];if(n==="lazy-load")return["/search/lazy-load-channel",{url:e.url}];}hideActions(){return this.lastSearchTarget==="search-index";}getFilterButtonTitle(){return""+this.numberOfFilters()+" active filters, open the filters panel";}resetPagination(){this.pagination.currentPage=1,this.pagination.totalItems=null,this.deletedVideos=0,this.results=[];}updateTitle(){let e=this.currentSearch?"Search "+this.currentSearch+"":"Search";this.metaService.setTitle(e);}updateUrlFromAdvancedSearch(){let e=this.currentSearch||void 0;this.router.navigate([],{relativeTo:this.route,queryParams:Object.assign({},this.advancedSearch.toUrlObject(),{search:e})});}getVideosObs(){let e={search:this.currentSearch,componentPagination:Z(this.pagination,{itemsPerPage:10,itemsRemoved:this.deletedVideos}),advancedSearch:this.advancedSearch};return this.hooks.wrapObsFun(this.searchService.searchVideos.bind(this.searchService),e,"search","filter:api.search.videos.list.params","filter:api.search.videos.list.result");}getVideoChannelObs(){let e={search:this.currentSearch,componentPagination:Z(this.pagination,{itemsPerPage:this.buildChannelsPerPage()}),advancedSearch:this.advancedSearch};return this.hooks.wrapObsFun(this.searchService.searchVideoChannels.bind(this.searchService),e,"search","filter:api.search.video-channels.list.params","filter:api.search.video-channels.list.result");}getVideoPlaylistObs(){let e={search:this.currentSearch,componentPagination:Z(this.pagination,{itemsPerPage:this.buildPlaylistsPerPage()}),advancedSearch:this.advancedSearch};return this.hooks.wrapObsFun(this.searchService.searchVideoPlaylists.bind(this.searchService),e,"search","filter:api.search.video-playlists.list.params","filter:api.search.video-playlists.list.result");}getDefaultSearchTarget(){let e=this.serverConfig.search.searchIndex;return e.enabled&&(e.isDefaultSearch||e.disableLocalSearch)?"search-index":"local";}checkFieldsAndGetError(){if(this.advancedSearch.host&&!It(this.advancedSearch.host))return"Host filter is invali
1d";}buildChannelsPerPage(){return this.advancedSearch.resultType==="channels"?10:2;}buildPlaylistsPerPage(){return this.advancedSearch.resultType==="playlists"?10:2;}};M(w,"\u0275fac",function(n){return new(n||w)();}),M(w,"\u0275cmp",q({type:w,selectors:[["my-search"]],decls:15,vars:10,consts:()=>{let e;e="Filters";let n;n="{VAR_PLURAL, plural, =1 {result} other {results}}",n=Ye(n,{VAR_PLURAL:"\uFFFD1\uFFFD"});let t;t=""+"\uFFFD0\uFFFD"+" "+n+"";let i;i="on this instance";let o;o="on the vidiverse";let y;y="for "+"\uFFFD#2\uFFFD"+""+"\uFFFD0\uFFFD"+""+"\uFFFD/#2\uFFFD"+"";let z;z="No results found";let W;return W=""+"\uFFFD0\uFFFD"+" subscribers",[["aContent",""],e,t,i,o,y,z,W,["myInfiniteScroller","",1,"search-result",3,"nearOfBottom","dataObservable"],[1,"results-header"],[1,"first-line"],[1,"results-counter"],["aria-controls","search-results-filter",1,"filter-button","peertube-button","tertiary-button","ms-auto",3,"click","title"],["iconName","filter"],[1,"pt-badge","badge-secondary"],["id","search-results-filter",1,"results-filter",3,"ngbCollapse","animation"],[3,"filtered","advancedSearch"],["type","danger"],[1,"no-results"],[1,"me-1"],[1,"search-value"],[1,"entry","video-channel"],[1,"entry","video"],[1,"entry","video-playlist"],["actorType","channel","responseSize","true","size","120",3,"actor","internalHref","href"],[1,"video-channel-info"],[1,"video-channel-names",3,"routerLink"],["target","_blank",1,"video-channel-names",3,"href"],[1,"video-channel-followers"],[3,"videoChannels"],[4,"ngTemplateOutlet"],[1,"video-channel-display-name","me-2"],[1,"video-channel-name"],[3,"videoBlocked","videoRemoved","video","user","displayAsRow","displayVideoActions","displayOptions","videoLinkType"],["displayAsRow","true","displayChannel","true","toManage","false",3,"playlist","linkType"]];},template:function(n,t){n&1&&(l(0,"div",8),p("nearOfBottom",function(){return t.onNearOfBottom();}),l(1,"div",9)(2,"div",10),u(3,ln,7,7,"div",11),l(4,"button",12),p("click",function(){return t.isSearchFilterCollapsed=!t.isSearchFilterCollapsed;}),k(5,"my-global-icon",13),ze(6),_(7,1),We(),u(8,sn,2,1,"span",14),r()(),l(9,"div",15)(10,"my-search-filters",16),p("filtered",function(){return t.onFiltered();}),r(),u(11,dn,2,1,"my-alert",17),r()(),u(12,_n,2,0,"div",18),N(13,fn,3,3,null,null,O),r()),n&2&&(g("dataObservable",t.onSearchDataSubject.asObservable()),s(3),S(t.pagination.totalItems?3:-1),s(),g("title",t.getFilterButtonTitle()),Xe("aria-expanded",!t.isSearchFilterCollapsed),s(4),S(t.numberOfFilters()>0?8:-1),s(),g("ngbCollapse",t.isSearchFilterCollapsed)("animation",!0),s(),g("advancedSearch",t.advancedSearch),s(),S(t.error?11:-1),s(),S(t.pagination.totalItems===0&&t.results.length===0?12:-1),s(),F(t.results));},dependencies:[Tt,pt,ie,yt,nt,et,xt,Nt,Ft,vt,Rt,Pt],styles:[".search-result[_ngcontent-%COMP%]{padding:40px}.alert-danger[_ngcontent-%COMP%]{margin-top:10px}.results-header[_ngcontent-%COMP%]{padding-bottom:20px;margin-bottom:30px;border-bottom:1px solid #dadada}.results-header[_ngcontent-%COMP%]   .first-line[_ngcontent-%COMP%]{display:flex;flex-direction:row}.results-header[_ngcontent-%COMP%]   .first-line[_ngcontent-%COMP%]   .results-counter[_ngcontent-%COMP%]{flex-grow:1}.results-header[_ngcontent-%COMP%]   .first-line[_ngcontent-%COMP%]   .results-counter[_ngcontent-%COMP%]   .search-value[_ngcontent-%COMP%]{font-weight:600}.filter-button[_ngcontent-%COMP%]   my-global-icon[_ngcontent-%COMP%]{display:inline-block;width:20px;height:20px;line-height:20px;margin-inline-end:.5rem}.entry[_ngcontent-%COMP%]{display:flex;margin-bottom:40px;max-width:800px}.video-channel[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{width:120px;height:120px;min-height:120px;min-width:120px;margin:0 calc(80px + 1rem) 0 80px}.video-channel-info[_ngcontent-%COMP%]{flex-grow:1;width:fit-content;margin-inline-end:.5rem}.video-channel-names[_ngcontent-%COMP%]{display:flex;align-items:baseline;color:var(--fg);width:fit-content;flex-wrap:wrap}.video-channel-names[_ngcontent-%COMP%], .video-channel-names[_ngcontent-%COMP%]:hover, .video-channel-names[_ngcontent-%COMP%]:focus, .video-channel-names[_ngcontent-%COMP%]:active{text-decoration:none}.video-channel-names[_ngcontent-%COMP%]:focus:not(:focus-visible){outline:none}
1.video-channel-display-name[_ngcontent-%COMP%]{font-weight:600}.video-channel-name[_ngcontent-%COMP%]{color:var(--fg-300)}@media screen and (max-width:800px){.video-channel[_ngcontent-%COMP%]{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto}.video-channel[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{grid-column:1;grid-row:1/-1;width:120px;height:120px;min-height:120px;min-width:120px;margin:0 calc(40.5px + 1rem) 0 40.5px}.video-channel-info[_ngcontent-%COMP%]{grid-column:2;grid-row:1}my-subscribe-button[_ngcontent-%COMP%]{grid-column:2;grid-row:2;align-self:end}}@media screen and (max-width:500px){.video-channel[_ngcontent-%COMP%]   my-actor-avatar[_ngcontent-%COMP%]{width:120px;height:120px;min-height:120px;min-width:120px;margin:0 calc(2.5px + 1rem) 0 2.5px}}@media screen and (max-width:500px){.search-result[_ngcontent-%COMP%]{padding:20px 10px}.search-result[_ngcontent-%COMP%]   .results-header[_ngcontent-%COMP%]{font-size:15px!important}.video-channel-display-name[_ngcontent-%COMP%]{font-size:1rem}.video-channel-name[_ngcontent-%COMP%]{font-size:.875rem}}"]})),we([gt()],w.prototype,"getInternalChannelUrl",1);var V=w;var I=class{router;resolve(e){let n=e.params.url;return n?this.finder(n).pipe(De(t=>{if(t.data.length!==1)return le.error("Cannot find result for this URL"),this.router.navigateByUrl("/404");let i=this.buildUrl(t.data[0]);return this.router.navigateByUrl(i);})):(le.error("Could not find url param.",{params:e.params}),this.router.navigateByUrl("/404"));}};var $=class $ extends I{router=m(L);searchService=m(b);finder(e){return this.searchService.searchVideoChannels({search:e});}buildUrl(e){return"/video-channels/"+e.nameWithHost;}};M($,"\u0275fac",(()=>{let e;return function(t){return(e||(e=G($)))(t||$);};})()),M($,"\u0275prov",D({token:$,factory:$.ɵfac}));var B=$;var x=class x extends I{router=m(L);searchService=m(b);finder(e){return this.searchService.searchVideoPlaylists({search:e});}buildUrl(e){return ne.buildWatchUrl(e);}};M(x,"\u0275fac",(()=>{let e;return function(t){return(e||(e=G(x)))(t||x);};})()),M(x,"\u0275prov",D({token:x,factory:x.ɵfac}));var Y=x;var H=class H extends I{router=m(L);searchService=m(b);finder(e){return this.searchService.searchVideos({search:e});}buildUrl(e){return te.buildWatchUrl(e);}};M(H,"\u0275fac",(()=>{let e;return function(t){return(e||(e=G(H)))(t||H);};})()),M(H,"\u0275prov",D({token:H,factory:H.ɵfac}));var j=H;var Ui=[{path:"",component:V,data:{meta:{title:"Search"}},providers:[b,$t,At,Ot,bt,j,B,Y],children:[{path:"lazy-load-video",component:V,resolve:{data:j}},{path:"lazy-load-channel",component:V,resolve:{data:B}},{path:"lazy-load-playlist",component:V,resolve:{data:Y}}]}];export{Ui as default};/**i18n:347eeb695970c32bc275618edc2e751c67145d9fc3012e70543c114a99b9e016*/

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.