import {fJ as wHe}from'./main-BiUBeaMj.js';var t=class{startDate;endDate;originallyPublishedStartDate;originallyPublishedEndDate;categoryOneOf;licenceOneOf;languageOneOf;tagsOneOf;tagsAllOf;durationMin;durationMax;isLive;host;sort;searchTarget;resultType;excludeAlreadyWatched;constructor(e){e&&(this.startDate=e.startDate||void 0,this.endDate=e.endDate||void 0,this.originallyPublishedStartDate=e.originallyPublishedStartDate||void 0,this.originallyPublishedEndDate=e.originallyPublishedEndDate||void 0,this.isLive=e.isLive||void 0,this.categoryOneOf=e.categoryOneOf||void 0,this.licenceOneOf=e.licenceOneOf||void 0,this.languageOneOf=e.languageOneOf||void 0,this.tagsOneOf=wHe(e.tagsOneOf),this.tagsAllOf=wHe(e.tagsAllOf),this.durationMin=e.durationMin?parseInt(e.durationMin,10):void 0,this.durationMax=e.durationMax?parseInt(e.durationMax,10):void 0,this.host=e.host||void 0,this.searchTarget=e.searchTarget||void 0,this.resultType=e.resultType||void 0,this.excludeAlreadyWatched=e.excludeAlreadyWatched||void 0,!this.resultType&&this.hasVideoFilter()&&(this.resultType="videos"),isNaN(this.durationMin)&&(this.durationMin=void 0),isNaN(this.durationMax)&&(this.durationMax=void 0),this.sort=e.sort||"-match");}containsValues(){return this.size()!==0}reset(){this.startDate=void 0,this.endDate=void 0,this.originallyPublishedStartDate=void 0,this.originallyPublishedEndDate=void 0,this.categoryOneOf=void 0,this.licenceOneOf=void 0,this.languageOneOf=void 0,this.tagsOneOf=void 0,this.tagsAllOf=void 0,this.durationMin=void 0,this.durationMax=void 0,this.isLive=void 0,this.host=void 0,this.sort="-match";}toUrlObject(){return {startDate:this.startDate,endDate:this.endDate,originallyPublishedStartDate:this.originallyPublishedStartDate,originallyPublishedEndDate:this.originallyPublishedEndDate,categoryOneOf:this.categoryOneOf,licenceOneOf:this.licenceOneOf,languageOneOf:this.languageOneOf,tagsOneOf:this.tagsOneOf,tagsAllOf:this.tagsAllOf,durationMin:this.durationMin,durationMax:this.durationMax,isLive:this.isLive,host:this.host,sort:this.sort,searchTarget:this.searchTarget,resultType:this.resultType,excludeAlreadyWatched:this.excludeAlreadyWatched}}toVideosAPIObject(){let e;return this.isLive&&(e=this.isLive==="true"),{startDate:this.startDate,endDate:this.endDate,originallyPublishedStartDate:this.originallyPublishedStartDate,originallyPublishedEndDate:this.originallyPublishedEndDate,categoryOneOf:wHe(this.categoryOneOf),licenceOneOf:wHe(this.licenceOneOf),languageOneOf:wHe(this.languageOneOf),tagsOneOf:this.tagsOneOf,tagsAllOf:this.tagsAllOf,durationMin:this.durationMin,durationMax:this.durationMax,host:this.host,isLive:e,sort:this.sort,searchTarget:this.searchTarget,excludeAlreadyWatched:this.excludeAlreadyWatched}}toPlaylistAPIObject(){return {host:this.host,searchTarget:this.searchTarget}}toChannelAPIObject(){return {host:this.host,searchTarget:this.searchTarget}}size(){let e=0;return (this.isValidValue(this.startDate)||this.isValidValue(this.endDate))&&e++,(this.isValidValue(this.originallyPublishedStartDate)||this.isValidValue(this.originallyPublishedEndDate))&&e++,this.isValidValue(this.categoryOneOf)&&e++,this.isValidValue(this.licenceOneOf)&&e++,this.isValidValue(this.languageOneOf)&&e++,this.isValidValue(this.tagsOneOf)&&e++,this.isValidValue(this.tagsAllOf)&&e++,(this.isValidValue(this.durationMin)||this.isValidValue(this.durationMax))&&e++,this.isValidValue(this.isLive)&&e++,this.isValidValue(this.host)&&e++,this.isValidValue(this.resultType)&&e++,e}isValidValue(e){return !(e===void 0||e===""||Array.isArray(e)&&e.length===0)}hasVideoFilter(){return this.startDate!==void 0||this.endDate!==void 0||this.originallyPublishedStartDate!==void 0||this.originallyPublishedEndDate!==void 0||this.categoryOneOf!==void 0||this.licenceOneOf!==void 0||this.tagsOneOf!==void 0||this.tagsAllOf!==void 0||this.durationMin!==void 0||this.durationMax!==void 0||this.isLive!==void 0}};/**i18n:fad79908930cbb4c308e7550a5fe49bb3841dbb330066a6429aebaa006173605*/export{t};//# sourceMappingURL=chunk-B32E78Jb.js.map
