import{a as A}from"./chunk-ONXESYFZ.js";import{b as c}from"./chunk-AKYES5GO.js";import{b as z}from"./chunk-RZ76RA6V.js";import"./chunk-K6LRUFYU.js";import{a as j}from"./chunk-S3EOECWM.js";import"./chunk-IC23Q2I7.js";import"./chunk-DZZLGFRO.js";import"./chunk-VRWNGTON.js";import{a as b}from"./chunk-7ST2GVW3.js";import{a as V}from"./chunk-5QNRJ25A.js";import{Cb as y,Da as s,Db as I,Ea as a,Lb as C,Oa as u,Wa as v,ad as x,ba as h,db as l,dd as U,eb as p,r as f,sb as g,uc as S,vg as R}from"./chunk-QXV2GR6R.js";import{i}from"./chunk-JJ4RDTEF.js";function _(o,r){if(o&1&&(l(0,"my-alert",2),y(1),p()),o&2){let L=g();s(),I(L.error);}}var F=(()=>{let r=class r{constructor(e,t,n){i(this,"route");i(this,"router");i(this,"search");i(this,"error","");this.route=e,this.router=t,this.search=n;}ngOnInit(){let e=this.route.snapshot.queryParams.uri;if(!e){this.error="\u067E\u0627\u0631\u0627\u0645\u062A\u0631 URL \u062F\u0631 \u067E\u0627\u0631\u0627\u0645\u062A\u0631\u0647\u0627\u06CC URL \u06AF\u0645 \u0634\u062F\u0647 \u0627\u0633\u062A";return;}this.loadUrl(e);}loadUrl(e){f([this.search.searchVideos({search:e}),this.search.searchVideoChannels({search:e})]).subscribe(([t,n])=>{let m;if(t.data.length!==0){let d=t.data[0];m=b.buildWatchUrl(d);}else if(n.data.length!==0)m="/c/"+new V(n.data[0]).nameWithHost;else{this.error="\u0646\u0645\u06CC \u062A\u0648\u0627\u0646\u062F \u0628\u0647 \u0645\u0646\u0627\u0628\u0639 \u0627\u0632 \u0631\u0627\u0647 \u062F\u0648\u0631 \u062F\u0633\u062A\u0631\u0633\u06CC \u067E\u06CC\u062F\u0627 \u06A9\u0646\u062F";return;}this.router.navigateByUrl(m);});}};i(r,"\u0275fac",function(t){return new(t||r)(a(x),a(U),a(c));}),i(r,"\u0275cmp",h({type:r,selectors:[["my-remote-interaction"]],standalone:!0,features:[C],decls:2,vars:1,consts:[[1,"root"],["type","danger",4,"ngIf"],["type","danger"]],template:function(t,n){t&1&&(l(0,"div",0),u(1,_,2,1,"my-alert",1),p()),t&2&&(s(),v("ngIf",n.error));},dependencies:[S,j],encapsulation:2}));let o=r;return o;})();var O=[{path:"",component:F,providers:[A,c,z],canActivate:[R],data:{meta:{title:"\u062A\u0639\u0627\u0645\u0644 \u0627\u0632 \u0631\u0627\u0647 \u062F\u0648\u0631"}}}];export{O as default};/**i18n:224bcada6943fe8b17ea60808c2d370cec9507c3bd670ebe71692d099a3befa1*///# sourceMappingURL=chunk-PUUNX6UU.js.map