import{a as b}from"./chunk-F5I4TM3F.js";import{b as a}from"./chunk-2RHTC6RJ.js";import"./chunk-4GTRO4FM.js";import"./chunk-S3CDSDDX.js";import{a as V}from"./chunk-VO6JGAHP.js";import"./chunk-J4BAYPJ2.js";import"./chunk-OTSILD44.js";import{a as I,b as R}from"./chunk-3ZNDWVB3.js";import{$a as v,Aa as s,Bb as C,Cd as S,Ka as h,Qb as g,Rb as y,Wh as U,_a as u,aa as n,fb as l,gb as d,r as f,yd as x}from"./chunk-AVPM423Z.js";import{i as m}from"./chunk-W5TMGCPH.js";function L(o,e){if(o&1&&(l(0,"my-alert",1),g(1),d()),o&2){let A=C();s(),y(A.error);}}var z=(()=>{let e=class e{route=n(x);router=n(S);search=n(a);error="";ngOnInit(){let t=this.route.snapshot.queryParams.uri;if(!t){this.error="URL\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u5185\u306B\u3001\u6709\u52B9\u306AURL\u30D1\u30E9\u30E1\u30FC\u30BF\u30FC\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093";return;}this.loadUrl(t);}loadUrl(t){f([this.search.searchVideos({search:t}),this.search.searchVideoChannels({search:t})]).subscribe(([r,i])=>{let c;if(r.data.length!==0){let p=r.data[0];c=I.buildWatchUrl(p);}else if(i.data.length!==0)c="/c/"+new R(i.data[0]).nameWithHost;else{this.error="\u5916\u90E8\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u306E\u30B3\u30F3\u30C6\u30F3\u30C4\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093";return;}this.router.navigateByUrl(c);});}};m(e,"\u0275fac",function(r){return new(r||e)();}),m(e,"\u0275cmp",h({type:e,selectors:[["my-remote-interaction"]],decls:2,vars:1,consts:[[1,"root"],["type","danger"]],template:function(r,i){r&1&&(l(0,"div",0),u(1,L,2,1,"my-alert",1),d()),r&2&&(s(),v(i.error?1:-1));},dependencies:[V],encapsulation:2}));let o=e;return o;})();var J=[{path:"",component:z,providers:[b,a],canActivate:[U],data:{meta:{title:"\u5916\u90E8\u30A4\u30F3\u30B9\u30BF\u30F3\u30B9\u3068\u306E\u30A4\u30F3\u30BF\u30E9\u30AF\u30B7\u30E7\u30F3"}}}];export{J as default};/**i18n:ceac57349051bcddcb40dd2878e0abcb86556d5ceb9d6109d22ac3f1ae3cc7b1*///# sourceMappingURL=chunk-KC6GOMBL.js.map