"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var s=require("../../dateUtils.js");function f(e){return e===0?11:e-1}function g(e){return e===11?0:e+1}function l(e,t){return e===0?t-1:t}function d(e,t){return e===11?t+1:t}function a(e,t){return t==="sunday"?e:e===0?6:e-1}function P(e,t,n,i){const r=f(e),o=l(e,t),u=a(n,i);return u!==0?s.getDays(r,o).slice(-u):[]}function h(e,t,n){const i=g(e),r=d(e,t);return s.getDays(i,r).slice(0,n!==7?n:0)}function v(e,t,n,i){const r=s.getDays(t,n),o=P(t,n,e,i),u=7-(o.length+r.length)%7,c=h(t,n,u);return i==="monday"?[...o,...r,...c]:e>0?[...o,...r,...c]:[...r,...c]}function y(e,t,n){if(n==="single-date"||e==="none")return 0;switch(e){case"monday":return t===0?7:t;case"sunday":default:return t>0?t+1:t}}function x(e,t,n){return!!(t&&e<t||n&&e>n)}function N(e,t){return t&&t.end?s.getIsSameDay(e,t.end):!1}function D(e){if(e&&e.current){const t=e.current.getBoundingClientRect().width-32;if(t/7<40)return t/7}return 40}function M(e,t){if(t.current){const n=window.getComputedStyle(t.current).gridColumnStart.split(" ").length-1||0,i=7,r=Math.floor((e+n)/i),o=(e+n)%i;return{row:r,col:o}}}function w(e){return e.row*7+e.col}exports.getAllDays=v;exports.getDayWidth=D;exports.getGridPosition=M;exports.getIndexFromGridPosition=w;exports.getNextDays=h;exports.getNextMonth=g;exports.getNextYear=d;exports.getPrevDays=P;exports.getPrevMonth=f;exports.getPrevYear=l;exports.getSliceNum=a;exports.getStartColumn=y;exports.hasEndRange=N;exports.isDisabled=x;
