import{a as A}from"./chunk-ZTZBDAWI.js";import{b as a}from"./chunk-SSQOOHM3.js";import{b as z}from"./chunk-QYLED4O6.js";import"./chunk-OM3FVU6X.js";import{a as b}from"./chunk-EXZU2T6R.js";import"./chunk-ODE5GCGZ.js";import"./chunk-HGZLNLER.js";import{d as V}from"./chunk-CBPOLVKJ.js";import{a as R}from"./chunk-F5QYAUDG.js";import{Cb as g,Ha as s,Hc as x,Lh as U,Pb as y,Qb as C,Sa as h,Ya as u,aa as n,eb as v,nb as l,ob as p,r as f,rd as I,vd as S}from"./chunk-QIQJDAPQ.js";import{i as c}from"./chunk-3HGMGVFC.js";function $(o,e){if(o&1&&(l(0,"my-alert",2),y(1),p()),o&2){let _=g();s(),C(_.error);}}var L=(()=>{let e=class e{route=n(I);router=n(S);search=n(a);error="";ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="\u7F3A\u5C11 URL \u53C2\u6570";return;}this.loadUrl(t);}loadUrl(t){f([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([r,i])=>{let m;if(r.data.length!==0){let d=r.data[0];m=V.buildWatchUrl(d);}else if(i.data.length!==0)m="/c/"+new R(i.data[0]).nameWithHost;else{this.error="\u65E0\u6CD5\u8BBF\u95EE\u8FDC\u7A0B\u8D44\u6E90";return;}this.router.navigateByUrl(m);});}};c(e,"\u0275fac",function(r){return new(r||e)();}),c(e,"\u0275cmp",h({type:e,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger",4,"ngIf"],["type","danger"]],template:function(r,i){r&1&&(l(0,"div",0),u(1,$,2,1,"my-alert",1),p()),r&2&&(s(),v("ngIf",i.error));},dependencies:[x,b],encapsulation:2}));let o=e;return o;})();var K=[{path:"",component:L,providers:[A,a,z],canActivate:[U],data:{meta:{title:"\u8FDC\u7AEF\u4EA4\u4E92"}}}];export{K as default};/**i18n:d946b30bd8b2b104e368c275b91cb34bb911fa22291c946a5e8c8a6facd9306d*///# sourceMappingURL=chunk-HYCTCC6S.js.map