"use strict";(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[48834],{547944:(e,t,s)=>{s.d(t,{SessionInfo:()=>o.SessionInfo,getPeriodsBetweenDates:()=>E,newBarBuilder:()=>p});var n=s(988124),r=s(223699),i=s(678515),o=s(995310),a=s(987571);class _ extends o.BarBuilderBase{constructor(e,t){super(),this._sessionStartMs=-Number.MAX_VALUE,this._sessionEndMs=-Number.MAX_VALUE,this._periodSec=e,this._session=t}alignTimeIfPossible(e){const t=this.alignTime(e);return isNaN(t)?e:t}indexOfBar(e){return e=this._sessionEndMs?a.SessionStage.POST_SESSION:(0,i.toInt)(n.time_seconds_diff(e,this._sessionStartMs)/this._periodSec)}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){const e=n.get_cal_from_unix_timestamp_ms(this._session.timezone,this._sessionStartMs-1),t=this._session.spec.alignToNearestSessionEnd(e,-1);return n.cal_to_utc(this._session.timezone,t)}if(e===a.SessionStage.POST_SESSION)return this._sessionEndMs;if(e<0)throw new Error("Negative offset is not supported");return this._sessionStartMs+n.time_seconds(this._periodSec*e)}endOfBar(e){if(e<0)throw new Error("Index cannot be negative");const t=this.startOfBar(e)+1e3*this._periodSec;return t>this._sessionEndMs?this._sessionEndMs:t}isLastBar(e,t){return t>=this._sessionStartMs+n.time_seconds(this._periodSec*(e+1)-1)}moveTo(e){const t=this._session.timezone,s=n.utc_to_cal(t,e),r=this._session.spec.alignToSessionStart(s);this._sessionStartMs=n.cal_to_utc(t,s),n.add_minutes(s,r),this._sessionEndMs=n.cal_to_utc(t,s)}indexOfLastBarInSession(){return(0,i.toInt)((this._sessionEndMs-1-this._sessionStartMs)/1e3/this._periodSec)}moveNext(){this.moveTo(this._sessionEndMs)}}var h=s(476172);function d(e,t){const s=n.clone(t),r=e.businessDaysToCalendarDays(s,1);r>1&&n.add_date(s,r-1);const i=e.leftBorderOfDailyBar(s);if(null===i)throw new Error("Cannot calculate left border of daily bar");return n.cal_to_utc(n.get_timezone(e.timezone()),i)}class c extends o.BarBuilderBase{constructor(e,t,s,n,r=!1){super(),this._periodStart=-Number.MAX_VALUE,this._periodEnd=-Number.MAX_VALUE,this._periodLastBarStart=-Number.MAX_VALUE,this._periodStartDay=new h.BusinessDay(0,0,0),this._periodEndDay=new h.BusinessDay(0,0,0),this._period=s,this._sessionTgt=e,this._builder=n,this._useBusinessDays=r,this._sessionSrc=r?new o.SessionInfo("Etc/UTC","24x7"):t||e}builder(){return this._builder}alignTimeIfPossible(e){return this.tradingDayToSessionStart(e)}tradingDayToSessionStart(e){return this.moveTo(e),this.startOfBar(0)}indexOfBar(e){if(this._useBusinessDays){const t=h.BusinessDay.fromCalendar(n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e));return t.before(this._periodStartDay)?a.SessionStage.PRE_SESSION:this._periodEndDay.before(t)?a.SessionStage.POST_SESSION:0}return e=this._periodEnd?a.SessionStage.POST_SESSION:0}startOfBar(e){if(e===a.SessionStage.PRE_SESSION){ const e=n.get_cal_from_unix_timestamp_ms(this._sessionTgt.timezone,this._periodStart-1),t=this._sessionTgt.spec.alignToNearestSessionEnd(e,-1);return n.cal_to_utc(this._sessionTgt.timezone,t)-1}return e===a.SessionStage.POST_SESSION||e>0?this._periodEnd:e===a.SessionStage.LASTBAR_SESSION?this._periodLastBarStart:this._periodStart}moveTo(e){const t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e);this._sessionSrc.spec.correctTradingDay(t);const s=n.get_year(t),r=this._indexOfPeriodInYear(t),i=r+this._period,o=this._sessionTgt.spec,a=this._sessionTgt.timezone,_=this._builder.startOfPeriod(a,r,s);this._periodStart=d(o,_);const c=n.clone(_),l=o.businessDaysToCalendarDays(c,1);l>1&&n.add_date(c,l-1),this._periodStartDay=h.BusinessDay.fromCalendar(c);const u=this._builder.startOfPeriod(a,i,s);this._periodEnd=d(o,u);const f=n.clone(u);for(n.add_date(f,-1);o.isCalWeekEnd(f);)n.add_date(f,-1);this._periodEndDay=h.BusinessDay.fromCalendar(f),n.add_date(u,-1),function(e,t){for(;e.isCalWeekEnd(t);)n.add_date(t,-1)}(this._sessionTgt.spec,u),this._periodLastBarStart=d(o,u),(this._periodLastBarStart=this._periodLastBarStart}currentRange(){return{from:this._periodStartDay,to:this._periodEndDay}}indexOfBarInYear(e){const t=n.get_cal_from_unix_timestamp_ms(this._sessionSrc.timezone,e),s=n.get_year(t),r=this._builder.indexOfPeriod(t),o=this._sessionTgt.timezone;let a=this._builder.startOfPeriod(o,r,s),_=d(this._sessionTgt.spec,a);return a=n.get_cal_from_unix_timestamp_ms(n.get_timezone("Etc/UTC"),_),s=0&&(r-=7),(0,i.toInt)((r+s)/7))}class f{indexOfPeriod(e){return n.get_day_of_year(e)-1}startOfPeriod(e,t,s){const r=n.days_per_year(s);return n.get_cal(n.get_timezone("Etc/UTC"),s,n.JANUARY,1+Math.min(t,r))}}class g extends f{constructor(e){super(),this._sessionsSpec=e}indexOfPeriod(e){return super.indexOfPeriod(e)-function(e,t){const s=u(e,t),r=n.get_cal(n.get_timezone("Etc/UTC"),n.get_year(t),n.JANUARY,1);n.add_date(r,7*s);const i=s*e.weekEndsCount()+e.holidaysFromYearStart(r),o=n.get_day_of_year(t)-n.get_day_of_year(r);return i+o-e.calendarDaysToBusinessDays(r,o)}(this._sessionsSpec,e)}startOfPeriod(e,t,s){const r=7-this._sessionsSpec.weekEndsCount(),o=Math.max(0,(0, i.toInt)(t/r)-1),a=n.get_cal(n.get_timezone("Etc/UTC"),s,n.JANUARY,1),_=n.get_days_per_year(a);if(n.add_date(a,7*o),(t-=r*o-this._sessionsSpec.holidaysFromYearStart(a))>0){const e=this._sessionsSpec.businessDaysToCalendarDays(a,t);n.add_date(a,e)}let h=n.get_day_of_year(a)-1;return sn.get_days_per_year(r)?this.startOfPeriod(e,0,s+1):(n.add_date(r,a),r)}}class m{indexOfPeriod(e){return n.get_month(e)}startOfPeriod(e,t,s){if(t<0){const e=(0,i.toInt)((11-t)/12);s-=e,t+=12*e}else t>n.DECEMBER&&(s++,t=n.JANUARY);return n.get_cal(n.get_timezone("Etc/UTC"),s,t,1)}}function p(e,t,s,n=!1){const i=r.Interval.parse(e),o=i.multiplier();return i.isMinutes()?new _(60*o,t):i.isSeconds()?new _(o,t):i.isTicks()?new _(1,t):i.isRange()?new _(60*o,t):new c(t,s,o,function(e,t){switch(e){case r.ResolutionKind.Days:return new y(t);case r.ResolutionKind.Weeks:return new S(t);case r.ResolutionKind.Months:return new m}throw new Error(`Unknown dwm resolution: ${e}`)}(i.kind(),t),n)}function E(e,t,s,n,i,a,_){const h=r.Interval.parse(i+n);if(h.isMonths()){const e=new Date(a),t=new Date(_);let s=12*(t.getUTCFullYear()-e.getUTCFullYear());return s+=t.getUTCMonth()-e.getUTCMonth(),Math.ceil(s/h.multiplier())}const d=new o.SessionInfo("Etc/UTC",e,t,s),c=h.inMilliseconds();let l;l=h.isDWM()?864e5:60*d.spec.maxTradingDayLength()*1e3;let u=0;u=h.isWeeks()?7:7-d.spec.weekEndsCount();const f=_-a,g=l/c,y=u*g;let S=f/864e5*g;S>=y&&(S=f/6048e5*y);return S%1<=Number.EPSILON*Math.ceil(S)?Math.round(S):Math.ceil(S)}},476172:(e,t,s)=>{s.d(t,{BusinessDay:()=>r});var n=s(988124);class r{constructor(e,t,s){this.year=e,this.month=t,this.day=s}toString(){return`${this.year}-${this.month}-${this.day}`}compareTo(e){return this.year>e.year||this.year===e.year&&this.month>e.month||this.year===e.year&&this.month===e.month&&this.day>e.day?1:this.year===e.year&&this.month===e.month&&this.day===e.day?0:-1}before(e){return-1===this.compareTo(e)}toCalendar(e){return n.get_cal(n.get_timezone("Etc/UTC"),this.year,this.month-1,this.day)}addDays(e){const t=this.toCalendar(n.get_timezone("Etc/UTC"));return n.add_date(t,e),r.fromCalendar(t)} static fromCalendar(e){return new r(n.get_year(e),n.get_month(e)+1,n.get_day_of_month(e))}}},44031:(e,t,s)=>{s.d(t,{SessionSpec:()=>m});var n=s(988124),r=s(674981),i=s(476172);function o(e,t){return e.compareTo(t)}class a{constructor(e,t,s){this._dayOfWeek=e,this._start=t,this._length=s}start(){return this._start+n.minutesPerDay*this.sessionStartDaysOffset()}startOffset(){return this._start}sessionStartDaysOffset(){return this._start>=0?0:this._start%n.minutesPerDay==0?-Math.ceil(this._start/n.minutesPerDay):-Math.floor(this._start/n.minutesPerDay)}sessionEndDaysOffset(){const e=this._start+this._length;return e>=0?0:e%n.minutesPerDay==0?-Math.ceil(e/n.minutesPerDay):-Math.floor(e/n.minutesPerDay)}isOvernight(){return this._start<0}dayOfWeek(){return this._dayOfWeek}sessionStartDayOfWeek(){let e=this._dayOfWeek-this.sessionStartDaysOffset();return en.SATURDAY&&(e=1),e}length(){return this._length}weight(){return this._dayOfWeek*n.minutesPerDay+this._start}compareTo(e){const t=this.weight(),s=t+this._length,n=e.weight(),r=n+e._length;return t<=n&&nn?1:-1}contains(e){const t=60*n.get_hours(e)+n.get_minutes(e);let s=n.get_day_of_week(e)-this._dayOfWeek;s>0&&(s-=7);const r=s*n.minutesPerDay+t;return r>=this._start&&r=48&&e<=57}class f{constructor(){this.entries=[],this.firstDayOfWeek=n.MONDAY,this.weekEndsCount=-1,this.maxTradingDayLength=0}parseSessions(e,t){var s;let n=!1;this._clear(),this.timezone=e;const{hasErrors:r,spec:i}=this._parseFirstDayOfWeek(t);if("24x7"===i.toLowerCase())for(const e of c)this.entries.push(f._createSessionEntry(e,0,0,0,0));else{let e=!1;const t=new Map;for(const s of i.split("|")){const r=s.split(":");if(1!==r.length&&2!==r.length){n=!0,l.logError(`Bad session section: ${s}`);continue}const i=1===r.length;if(i){if(e){n=!0,l.logError(`Duplicated default section: ${s}`);continue}e=!0}const o=i?d:f._parseWorkingDays(r[1]);for(const e of o)i&&t.has(e)||t.set(e,r[0])}for(const e of c){const s=t.get(e);if(void 0!==s)for(const t of s.split(",")){const{hasErrors:s,sessionEntry:r}=f._parseSessionEntry(e,t);s&&(n=s),this.entries.push(r)}}}this.entries.sort(o);const a=new Map;for(const e of this.entries){const t=e.dayOfWeek();a.set(t,e.length()+(null!==(s=a.get(t))&&void 0!==s?s:0))}return this.maxTradingDayLength=0,a.forEach((e=>{this.maxTradingDayLength=Math.max(this.maxTradingDayLength,e)})),this.weekEndsCount=7-a.size,n||r}static parseHolidaysAndCorrections(e,t,s){const r=new Map,i=new Map,o=e=>{const t=this._parseDay(e),s=t.toString(),n=i.get(s);return void 0!==n?n:(i.set(s,t),t)};if(""!==t){const e=[] ;for(const s of t.split(",")){if(8!==s.length)throw new Error(`bad holiday date: ${s}`);const t=o(s);r.set(t,e)}}if(""===s)return r;const _=n.get_timezone("Etc/UTC");for(const e of s.split(";")){const t=e.split(":");if(2!==t.length)throw new Error(`bad correction section: ${e}`);const s=[];if("dayoff"!==t[0])for(const e of t[0].split(","))s.push(this._parseSessionEntry(1,e).sessionEntry);for(const e of t[1].split(",")){if(8!==e.length)throw new Error(`bad correction date: ${e}`);const t=o(e),i=n.get_day_of_week(n.get_cal(_,t.year,t.month-1,t.day)),h=[];for(const e of s)h.push(new a(i,e.startOffset(),e.length()));r.set(t,h)}}return r}_clear(){this.entries=[],this.timezone="",this.firstDayOfWeek=n.MONDAY,this.weekEndsCount=-1}_parseFirstDayOfWeek(e){const t=e.split(";");if(t.length>2)return l.logError(`Only one \`first day\` specification expected @ session ${e}`),{hasErrors:!0,spec:e};if(1===t.length)return{hasErrors:!1,spec:e};let s=1;let r=t[0].indexOf("-")>=0?NaN:parseInt(t[0]);return isNaN(r)&&(s=0,r=parseInt(t[1])),rn.SATURDAY?(l.logError(`Unexpected day index @ session: ${e}; day index ${r}`),{hasErrors:!0,spec:e}):(this.firstDayOfWeek=r,{hasErrors:!1,spec:t[s]})}static _parseDay(e){const t=parseInt(e.substring(0,4)),s=parseInt(e.substring(4,6)),n=parseInt(e.substring(6,8));return new i.BusinessDay(t,s,n)}static _parseSessionEntry(e,t){let s=!1,n=t.split("-");2!==n.length&&(s=!0,l.logError(`Bad sessions entry: ${t}`),n=["0000","0000"]);let r=0,i=n[0];if(i.includes("F")){const e=i.split("F");i=e[0],r=""!==e[1]?parseInt(e[1]):1}let o=0,a=n[1];if(a.includes("F")){const e=a.split("F");a=e[0],o=""!==e[1]?parseInt(e[1]):1}if(!this._isCorrectSession(i)||!this._isCorrectSession(a))throw new Error(`Incorrect entry syntax: ${t}`);const _=i,h=a;return{hasErrors:s,sessionEntry:this._createSessionEntry(e,f._minutesFromHHMM(_),f._minutesFromHHMM(h),r,o)}}static _isCorrectSession(e){return 4===e.length&&u(e.charCodeAt(0))&&u(e.charCodeAt(1))&&u(e.charCodeAt(2))&&u(e.charCodeAt(3))}static _parseWorkingDays(e){const t=[];for(let s=0;s0&&(t-=r*n.minutesPerDay),i>0&&(s-=i*n.minutesPerDay);return new a(e,t,s-t)}}function g(e,t){return e.compareTo(t)<0}function y(e,t){const s=(0,r.lowerbound)(e,t,((e,t)=>-1===e.day.compareTo(t)));return s===e.length?null:e[s]}const S=621672192e5;class m{constructor(e="Etc/UTC",t="0000-0000",s="",r=""){this._entries=[],this._firstDayOfWeek=n.MONDAY,this._entriesHash=new Map,this._holidayAndCorrectionMap=new Map,this._holidaySessions=[],t=function(e){const t=e.lastIndexOf("/");return-1===t?e:e.slice(t+1)}(t);const i=new f;i.parseSessions(e,t),this._entries=i.entries,this._timezone=i.timezone,this._spec=t,this._firstDayOfWeek=i.firstDayOfWeek,this._weekEndsCount=i.weekEndsCount,this._maxTradingDayLength=i.maxTradingDayLength ;const o=f.parseHolidaysAndCorrections(e,s,r),a=n.get_timezone(e);this._isThereCorrections=""!==s||""!==r,o.forEach(((e,t)=>{this._holidayAndCorrectionMap.set(t.toString(),e),this._holidaySessions.push({day:t,sessions:e});const s=this.getWeekIndex(t.toCalendar(a));this._entriesHash.set(s,null)})),this._holidaySessions.sort(((e,t)=>e.day.compareTo(t.day)))}entries(){return this._entries}timezone(){return this._timezone}spec(){return this._spec}firstDayOfWeek(){return this._firstDayOfWeek}addSessionEntry(e,t,s,r,i){0===s&&(s=n.minutesPerDay),r===i&&s<=t&&(r+=1),r>0&&(t-=r*n.minutesPerDay),i>0&&(s-=i*n.minutesPerDay);const o=s-t;this._entries.push(new a(e,t,o))}longestSessionLength(){let e=0,t=0;for(const t of this._holidaySessions)t.sessions.forEach((t=>{e=Math.max(e,t.length())}));return this._entries.forEach((e=>{t=Math.max(t,e.length())})),Math.max(e,t)}isWeekEnd(e){const t=(0,r.lowerbound)(this._entries,new a(e,0,0),((e,t)=>e.dayOfWeek()this._entries.length-1||this._entries[t].dayOfWeek()!==e}isCalWeekEnd(e){const t=n.get_day_of_week(e);if(!this._isThereCorrections)return this.isWeekEnd(t);const s=i.BusinessDay.fromCalendar(e),r=this._holidayAndCorrectionMap.get(s.toString());return void 0===r?this.isWeekEnd(t):0===r.length}hasWeekEnds(){return this.weekEndsCount()>0}weekEndsCount(){return this._weekEndsCount}maxTradingDayLength(){return this._maxTradingDayLength}holidaysFromYearStart(e){if(!this._isThereCorrections)return 0;const t=n.get_timezone(this._timezone),s=new i.BusinessDay(n.get_year(e),n.JANUARY,1),r=i.BusinessDay.fromCalendar(e);let o=0;const a=this._selectHolidays(s,r);for(let e=0;et.start()%e==0&&t.length()%e==0))}indexOfSession(e,t,s){const i=this._getEntriesForWeek(e);let o=(0,r.lowerbound)(i,new a(t,s,0),g);if(o!==i.length)return new _(e,o,i);let h=e;const d=7-t+this._firstDayOfWeek-1;for(s=-(n.minutesPerDay-s+d*n.minutesPerDay);;){h++;const e=this._getEntriesForWeek(h);if(0!==e.length)return o=(0,r.lowerbound)(e,new a(this._firstDayOfWeek,s,0),g),new _(h,o,e)}}findSession(e,t,s,n=0){const r=this.indexOfSession(e,t,s),i=r.entries;let o=r.entryIndex;if(0!==n){const e=i[o].dayOfWeek(),t=n>0?1:-1;for(;;){const s=o+t;if(s<0||s>=i.length||i[s].dayOfWeek()!==e)break;o=s}}return new _(r.weekIndex,o,i)}getWeekIndex(e){if(!this._isThereCorrections)return 0;const t=n.get_day_of_week(e)-n.SUNDAY,s=n.get_timezone("Etc/UTC"),r=n.get_cal(s,n.get_year(e),n.get_month(e),n.get_day_of_month(e)-t);return Math.floor((r.getTime()+S)/1e3/86400/7)}correctTradingDay(e){const t=n.get_day_of_week(e),s=60*n.get_hours(e)+n.get_minutes(e),r=this.getWeekIndex(e),i=this.findSession(r,t,s,0),o=i.getEntry().dayOfWeek()-t+7*(i.weekIndex-r);return 0!==o&&n.add_date(e,o),e}alignToSessionStart(e,t=0){ const s=n.get_day_of_week(e),r=60*n.get_hours(e)+n.get_minutes(e),i=this.getWeekIndex(e),o=this.findSession(i,s,r,t),a=o.getEntry(),_=a.dayOfWeek()-s+7*(o.weekIndex-i);0!==_&&n.add_date(e,_);const h=a.startOffset();return n.set_hms(e,h/60,h%60,0,0,n.get_timezone(this._timezone)),a.length()}businessDaysToCalendarDays(e,t){let s=this.getWeekIndex(e),r=n.get_day_of_week(e),i=0,o=0;for(;os);)e[a].dayOfWeek()=t)return i}s++,r=n.SUNDAY}return i}calendarDaysToBusinessDays(e,t){let s=this.getWeekIndex(e),r=n.get_day_of_week(e),i=0,o=0;for(;is);)e[a].dayOfWeek()=t)return o}s++,r=n.SUNDAY}return o}alignToNearestSessionStart(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionStart.bind(this))}alignToNearestSessionEnd(e,t){return this._alignToNearestSessionValue(e,t,this._entrySessionEnd.bind(this))}leftBorderOfDailyBar(e){const t=this._getEntriesForDay(e);return 0===t.length?null:(t.sort(o),this._getLeftEntryBorder(e,t[0]))}bordersOfDailyBar(e){const t=this._getEntriesForDay(e);if(0===t.length)return null;t.sort(o);const s=this._getLeftEntryBorder(e,t[0]),r=t[t.length-1],i=n.clone(e);let a=60*(r.startOffset()+r.length())-1;const _=Math.floor(a/3600);return a-=3600*_,n.set_hms(i,_,a/60,a%60,0,n.get_timezone(this._timezone)),{from:s,to:i}}getEntriesForWeekByCalendar(e){const t=this.getWeekIndex(e);return this._getEntriesForWeek(t)}_getEntriesForWeek(e){let t=this._entriesHash.get(e);if(void 0===t)return this._entries;if(null!==t)return t;const s=n.get_timezone(this._timezone);t=this._entries.slice();const r=this._weekIndexToCalendar(e),a=this._weekIndexToCalendar(e+1),_=i.BusinessDay.fromCalendar(r),h=i.BusinessDay.fromCalendar(a),d=this._selectHolidays(_,h);for(const e of d){const r=e.day.toCalendar(s),i=n.get_day_of_week(r);t=t.filter((e=>e.dayOfWeek()!==i)),t=t.concat(e.sessions)}return t.sort(o),this._entriesHash.set(e,t),t}_selectHolidays(e,t){const s=[];let n=e;for(;;){const e=y(this._holidaySessions,n);if(null===e)return s;if(!e.day.before(t))return s;s.push(e),n=e.day.addDays(1)}}_weekIndexToCalendar(e){const t=1e3*(86400*e*7+86400)-S,s=n.get_cal_from_unix_timestamp_ms(n.get_timezone("Etc/UTC"),t),r=n.get_timezone("Etc/UTC");return n.get_cal(r,n.get_year(s),n.get_month(s),n.get_day_of_month(s))}_alignToNearestSessionValue(e,t,s){const r=n.get_day_of_week(e),i=60*n.get_hours(e)+n.get_minutes(e),o=this.getWeekIndex(e);let a=this.findSession(o,r,i);if(a.getEntry().contains(e)&&o===a.weekIndex||1===t)return s(a,n.clone(e),t);const h=a.getEntry(),d=h.contains(e),c=o===a.weekIndex,l=h.sessionStartDaysOffset()-h.dayOfWeek()>=0;if(d&&(c||l))return s(a,n.clone(e),t);let u=a.entryIndex-1;if(u<0){let e=a.weekIndex,t=a.entries;for(;u<0;)e--,t=this._getEntriesForWeek(e),u+=t.length;a=new _(e,u,t) }else a=new _(a.weekIndex,u,a.entries);return s(a,n.clone(e),t)}_entrySessionStart(e,t,s){return this._entrySessionValue(e,t,s,(e=>60*e.start()))}_entrySessionEnd(e,t,s){return this._entrySessionValue(e,t,s,(e=>60*(e.start()+e.length())-1))}_entrySessionValue(e,t,s,r){let i=n.get_day_of_week(t);const o=e.getEntry();let a=o.dayOfWeek()-o.sessionStartDaysOffset();const _=this.getWeekIndex(t);let h=e.weekIndex-_,d=!1;if(a0&&s>=0||h<0&&s<0)&&n.add_date(t,7*h),!o.contains(t)){let e=a-i;d&&s<0&&(e=-(7-a+i)),n.add_date(t,e),i=n.get_day_of_week(t)}o.isOvernight()&&i===o.dayOfWeek()&&n.add_date(t,-o.sessionStartDaysOffset());let c=r(o);const l=Math.floor(c/3600);return c-=3600*l,n.set_hms(t,l,c/60,c%60,0,n.get_timezone(this._timezone)),t}_getEntriesForDay(e){const t=n.get_day_of_week(e);return this._getEntriesForWeek(this.getWeekIndex(e)).filter((e=>e.dayOfWeek()===t))}_getLeftEntryBorder(e,t){const s=n.clone(e),r=t.startOffset();return n.set_hms(s,r/60,r%60,0,0,n.get_timezone(this._timezone)),s}}}}]);