import{Bc as zn,Fn as Oe,Hs as se,Wa as g,Wt as Jn,Yr as Vme,fr as S,ft as Fl,k as Ce,kc as xhe,kr as Tt,or as Rg,pc as vn,ro as he,tt as Er,y as Be}from"./chunk-B_pj7Jpm.js";import{n as f}from"./chunk-qQMrTuzm.js";import{t as H}from"./chunk-CagJEiiY.js";var D=class t{authHttp=g(zn);restExtractor=g(Jn);restService=g(Rg);videoService=g(H);static BASE_USER_VIDEOS_HISTORY_URL=se.apiUrl+`/api/v1/users/me/history/videos`;list(e,r){let i=this.restService.componentToRestPagination(e),o=new vn;return o=this.restService.addRestGetParams(o,i),r&&(o=o.append(`search`,r)),this.authHttp.get(t.BASE_USER_VIDEOS_HISTORY_URL,{params:o}).pipe(Be(s=>this.videoService.extractVideos(s)),he(s=>this.restExtractor.handleError(s)))}deleteElement(e){return this.authHttp.delete(t.BASE_USER_VIDEOS_HISTORY_URL+`/`+e.id).pipe(he(r=>this.restExtractor.handleError(r)))}clearAll(){return this.authHttp.post(t.BASE_USER_VIDEOS_HISTORY_URL+`/remove`,{}).pipe(he(e=>this.restExtractor.handleError(e)))}static ɵfac=function(r){return new(r||t)};static ɵprov=S({token:t,factory:t.ɵfac})};var L=class t{authHttp=g(zn);restExtractor=g(Jn);restService=g(Rg);static BASE_VIDEO_CHANNEL_URL=se.apiUrl+`/api/v1/video-channel-syncs`;listByAccount(e){let{pagination:r,sort:i,account:o,includeCollaborations:s}=e,c=new vn;c=this.restService.addRestGetParams(c,r,i),s&&(c=c.append(`includeCollaborations`,`true`));let H=f.BASE_ACCOUNT_URL+o.nameWithHost+`/video-channel-syncs`;return this.authHttp.get(H,{params:c}).pipe(he(T=>this.restExtractor.handleError(T)))}create(e){return this.authHttp.post(t.BASE_VIDEO_CHANNEL_URL,e).pipe(he(r=>this.restExtractor.handleError(r)))}delete(e){let r=`${t.BASE_VIDEO_CHANNEL_URL}/${e}`;return this.authHttp.delete(r).pipe(he(i=>this.restExtractor.handleError(i)))}static ɵfac=function(r){return new(r||t)};static ɵprov=S({token:t,factory:t.ɵfac,providedIn:`root`})};function J(t){return t.buttons===0||t.detail===0}function Q(t){let e=t.touches&&t.touches[0]||t.changedTouches&&t.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var v;try{v=typeof Intl<`u`&&Intl.v8BreakIterator}catch(t){v=!1}var it=(()=>{class t{_platformId=g(Fl);isBrowser=this._platformId?Vme(this._platformId):typeof document==`object`&&!!document;EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent);TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent);BLINK=this.isBrowser&&!!(window.chrome||v)&&typeof CSS<`u`&&!this.EDGE&&!this.TRIDENT;WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT;IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!(`MSStream`in window);FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent);ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT;SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT;static ɵfac=function(i){return new(i||t)};static ɵprov=Ce({token:t,factory:t.ɵfac})}return t})();var E=new WeakMap;var st=(()=>{class t{_appRef;_injector=g(Tt);_environmentInjector=g(Oe);load(r){let i=this._appRef=this._appRef||this._injector.get(Er),o=E.get(i);o||(o={loaders:new Set,refs:[]},E.set(i,o),i.onDestroy(()=>{E.get(i)?.refs.forEach(s=>s.destroy()),E.delete(i)})),o.loaders.has(r)||(o.loaders.add(r),o.refs.push(xhe(r,{environmentInjector:this._environmentInjector})))}static ɵfac=function(i){return new(i||t)};static ɵprov=Ce({token:t,factory:t.ɵfac})}return t})();function pt(t){return Array.isArray(t)?t:[t]}export{it as a,Q as i,J as n,pt as o,L as r,st as s,D as t};
//# debugId=d503baa1-d3cd-52e1-a727-269a7164797b
//# sourceMappingURL=chunk-vCrwNCc0.js.map