@kystverket/styrbord 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.umd.cjs CHANGED
@@ -26,4 +26,4 @@ React keys must be passed directly to JSX without using spread:
26
26
  Released under the MIT License.
27
27
  */var f7=function(n,e){return f7=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,A){t.__proto__=A}||function(t,A){for(var i in A)Object.prototype.hasOwnProperty.call(A,i)&&(t[i]=A[i])},f7(n,e)};function v2(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");f7(r,n);function e(){this.constructor=r}r.prototype=n===null?Object.create(n):(e.prototype=n.prototype,new e)}var F=function(){return F=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++){t=arguments[A];for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},F.apply(this,arguments)};function t1(r,n,e){if(e||arguments.length===2)for(var t=0,A=n.length,i;t<A;t++)(i||!(t in n))&&(i||(i=Array.prototype.slice.call(n,0,t)),i[t]=n[t]);return r.concat(i||Array.prototype.slice.call(n))}typeof SuppressedError=="function"&&SuppressedError;var br=function(r){var n=r.showTimeSelectOnly,e=n===void 0?!1:n,t=r.showTime,A=t===void 0?!1:t,i=r.className,a=r.children,l=r.inline,c=e?"Choose Time":"Choose Date".concat(A?" and Time":"");return d.createElement("div",{className:i,"aria-label":c,role:l?void 0:"dialog","aria-modal":l?void 0:"true"},a)},Sr=function(r,n){var e=d.useRef(null),t=d.useRef(r);d.useEffect(function(){t.current=r},[r]);var A=d.useCallback(function(i){var a,l=i.composed&&i.composedPath&&i.composedPath().find(function(c){return c instanceof Node})||i.target;e.current&&!e.current.contains(l)&&(n&&l instanceof HTMLElement&&l.classList.contains(n)||(a=t.current)===null||a===void 0||a.call(t,i))},[n]);return d.useEffect(function(){return document.addEventListener("mousedown",A),function(){document.removeEventListener("mousedown",A)}},[A]),e},I3=function(r){var n=r.children,e=r.onClickOutside,t=r.className,A=r.containerRef,i=r.style,a=r.ignoreClass,l=Sr(e,a);return d.createElement("div",{className:t,style:i,ref:function(c){l.current=c,A&&(A.current=c)}},n)},S;(function(r){r.ArrowUp="ArrowUp",r.ArrowDown="ArrowDown",r.ArrowLeft="ArrowLeft",r.ArrowRight="ArrowRight",r.PageUp="PageUp",r.PageDown="PageDown",r.Home="Home",r.End="End",r.Enter="Enter",r.Space=" ",r.Tab="Tab",r.Escape="Escape",r.Backspace="Backspace",r.X="x"})(S||(S={}));function C7(){var r=typeof window<"u"?window:globalThis;return r}var Z0=12;function N(r){if(r==null)return new Date;var n=typeof r=="string"?H8(r):q(r);return q2(n)?n:new Date}function l0(r,n,e,t,A){A===void 0&&(A=N());for(var i=c0(e)||c0(u7()),a=Array.isArray(n)?n:[n],l=0,c=a;l<c.length;l++){var o=c[l],I=W8(r,o,A,{locale:i});if(q2(I)&&(!t||r===A2(I,o,e)))return I}return null}function q2(r,n){return X0(r)&&!D2(r,new Date("1/1/1800"))}function A2(r,n,e){if(e==="en")return B4(r,n,{useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0});var t=e?c0(e):void 0;return e&&!t&&console.warn('A locale object was not found for the provided string ["'.concat(e,'"].')),t=t||c0(u7()),B4(r,n,{locale:t,useAdditionalWeekYearTokens:!0,useAdditionalDayOfYearTokens:!0})}function x2(r,n){var e=n.dateFormat,t=n.locale,A=Array.isArray(e)&&e.length>0?e[0]:e;return r&&A2(r,A,t)||""}var a5=" - ";function Br(r,n,e){if(!r&&!n)return"";var t=r?x2(r,e):"",A=n?x2(n,e):"",i=e.rangeSeparator||a5;return"".concat(t).concat(i).concat(A)}function Ur(r,n){if(!(r!=null&&r.length))return"";var e=r[0]?x2(r[0],n):"";if(r.length===1)return e;if(r.length===2&&r[1]){var t=x2(r[1],n);return"".concat(e,", ").concat(t)}var A=r.length-1;return"".concat(e," (+").concat(A,")")}function E3(r,n){var e=n.hour,t=e===void 0?0:e,A=n.minute,i=A===void 0?0:A,a=n.second,l=a===void 0?0:a;return w0(L0(N0(r,l),i),t)}function Yr(r){return L3(r)}function kr(r,n){return A2(r,"ddd",n)}function R0(r){return B1(r)}function v1(r,n,e){var t=c0(n||u7());return l1(r,{locale:t,weekStartsOn:e})}function E1(r){return p4(r)}function b0(r){return H0(r)}function l5(r){return w3(r)}function c5(){return B1(N())}function o5(r){return M4(r)}function Kr(r){return wt(r)}function qr(r){return m4(r)}function n1(r,n){return r&&n?P8(r,n):!r&&!n}function Q2(r,n){return r&&n?X8(r,n):!r&&!n}function f3(r,n){return r&&n?G8(r,n):!r&&!n}function D(r,n){return r&&n?Ft(r,n):!r&&!n}function x1(r,n){return r&&n?J6(r,n):!r&&!n}function V1(r,n,e){var t,A=B1(n),i=M4(e);try{t=p0(r,{start:A,end:i})}catch{t=!1}return t}function I5(r,n){var e=C7();e.__localeData__||(e.__localeData__={}),e.__localeData__[r]=n}function u7(){var r=C7();return r.__localeId__}function c0(r){if(typeof r=="string"){var n=C7();return n.__localeData__?n.__localeData__[r]:void 0}else return r}function xr(r,n,e){return n(A2(r,"EEEE",e))}function Vr(r,n){return A2(r,"EEEEEE",n)}function jr(r,n){return A2(r,"EEE",n)}function s7(r,n){return A2(k2(N(),r),"LLLL",n)}function E5(r,n){return A2(k2(N(),r),"LLL",n)}function yr(r,n){return A2(e0(N(),r),"QQQ",n)}function j2(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.excludeDateIntervals,l=e.includeDates,c=e.includeDateIntervals,o=e.filterDate,I=e.disabled;return I?!0:S0(r,{minDate:t,maxDate:A})||i&&i.some(function(f){return f instanceof Date?D(r,f):D(r,f.date)})||a&&a.some(function(f){var u=f.start,s=f.end;return p0(r,{start:u,end:s})})||l&&!l.some(function(f){return D(r,f)})||c&&!c.some(function(f){var u=f.start,s=f.end;return p0(r,{start:u,end:s})})||o&&!o(N(r))||!1}function d7(r,n){var e=n===void 0?{}:n,t=e.excludeDates,A=e.excludeDateIntervals;return A&&A.length>0?A.some(function(i){var a=i.start,l=i.end;return p0(r,{start:a,end:l})}):t&&t.some(function(i){var a;return i instanceof Date?D(r,i):D(r,(a=i.date)!==null&&a!==void 0?a:new Date)})||!1}function f5(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate;return S0(r,{minDate:t?p4(t):void 0,maxDate:A?m4(A):void 0})||(i==null?void 0:i.some(function(c){return Q2(r,c instanceof Date?c:c.date)}))||a&&!a.some(function(c){return Q2(r,c)})||l&&!l(N(r))||!1}function C3(r,n,e,t){var A=H(r),i=R2(r),a=H(n),l=R2(n),c=H(t);return A===a&&A===c?i<=e&&e<=l:A<a?c===A&&i<=e||c===a&&l>=e||c<a&&c>A:!1}function Or(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates;return S0(r,{minDate:t,maxDate:A})||i&&i.some(function(l){return Q2(l instanceof Date?l:l.date,r)})||a&&!a.some(function(l){return Q2(l,r)})||!1}function u3(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate,c=e.disabled;return c?!0:S0(r,{minDate:t,maxDate:A})||(i==null?void 0:i.some(function(o){return f3(r,o instanceof Date?o:o.date)}))||a&&!a.some(function(o){return f3(r,o)})||l&&!l(N(r))||!1}function s3(r,n,e){if(!n||!e||!X0(n)||!X0(e))return!1;var t=H(n),A=H(e);return t<=r&&A>=r}function d3(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.maxDate,i=e.excludeDates,a=e.includeDates,l=e.filterDate,c=e.disabled;if(c)return!0;var o=new Date(r,0,1);return S0(o,{minDate:t?H0(t):void 0,maxDate:A?v4(A):void 0})||(i==null?void 0:i.some(function(I){return n1(o,I instanceof Date?I:I.date)}))||a&&!a.some(function(I){return n1(o,I)})||l&&!l(N(o))||!1}function M3(r,n,e,t){var A=H(r),i=s1(r),a=H(n),l=s1(n),c=H(t);return A===a&&A===c?i<=e&&e<=l:A<a?c===A&&i<=e||c===a&&l>=e||c<a&&c>A:!1}function S0(r,n){var e,t=n===void 0?{}:n,A=t.minDate,i=t.maxDate;return(e=A&&N1(r,A)<0||i&&N1(r,i)>0)!==null&&e!==void 0?e:!1}function C5(r,n){return n.some(function(e){return W2(e)===W2(r)&&T2(e)===T2(r)&&M1(e)===M1(r)})}function u5(r,n){var e=n===void 0?{}:n,t=e.excludeTimes,A=e.includeTimes,i=e.filterTime;return t&&C5(r,t)||A&&!C5(r,A)||i&&!i(r)||!1}function s5(r,n){var e=n.minTime,t=n.maxTime;if(!e||!t)throw new Error("Both minTime and maxTime props required");var A=N();A=w0(A,W2(r)),A=L0(A,T2(r)),A=N0(A,M1(r));var i=N();i=w0(i,W2(e)),i=L0(i,T2(e)),i=N0(i,M1(e));var a=N();a=w0(a,W2(t)),a=L0(a,T2(t)),a=N0(a,M1(t));var l;try{l=!p0(A,{start:i,end:a})}catch{l=!1}return l}function d5(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=Y1(r,1);return t&&G0(t,i)>0||A&&A.every(function(a){return G0(a,i)>0})||!1}function M5(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=O2(r,1);return t&&G0(i,t)>0||A&&A.every(function(a){return G0(i,a)>0})||!1}function Wr(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=H0(r),a=V4(i);return t&&P0(t,a)>0||A&&A.every(function(l){return P0(l,a)>0})||!1}function Tr(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=v4(r),a=D3(i,1);return t&&P0(a,t)>0||A&&A.every(function(l){return P0(a,l)>0})||!1}function m5(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.includeDates,i=t0(r,1);return t&&J0(t,i)>0||A&&A.every(function(a){return J0(a,i)>0})||!1}function Xr(r,n){var e=n===void 0?{}:n,t=e.minDate,A=e.yearItemNumber,i=A===void 0?Z0:A,a=b0(t0(r,i)),l=f1(a,i).endPeriod,c=t&&H(t);return c&&c>l||!1}function p5(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.includeDates,i=o1(r,1);return t&&J0(i,t)>0||A&&A.every(function(a){return J0(i,a)>0})||!1}function Gr(r,n){var e=n===void 0?{}:n,t=e.maxDate,A=e.yearItemNumber,i=A===void 0?Z0:A,a=o1(r,i),l=f1(a,i).startPeriod,c=t&&H(t);return c&&c<l||!1}function v5(r){var n=r.minDate,e=r.includeDates;if(e&&n){var t=e.filter(function(A){return N1(A,n)>=0});return s4(t)}else return e?s4(e):n}function h5(r){var n=r.maxDate,e=r.includeDates;if(e&&n){var t=e.filter(function(A){return N1(A,n)<=0});return u4(t)}else return e?u4(e):n}function z5(r,n){var e;r===void 0&&(r=[]),n===void 0&&(n="react-datepicker__day--highlighted");for(var t=new Map,A=0,i=r.length;A<i;A++){var a=r[A];if(I1(a)){var l=A2(a,"MM.dd.yyyy"),c=t.get(l)||[];c.includes(n)||(c.push(n),t.set(l,c))}else if(typeof a=="object"){var o=Object.keys(a),I=(e=o[0])!==null&&e!==void 0?e:"",f=a[I];if(typeof I=="string"&&Array.isArray(f))for(var u=0,s=f.length;u<s;u++){var m=f[u];if(m){var l=A2(m,"MM.dd.yyyy"),c=t.get(l)||[];c.includes(I)||(c.push(I),t.set(l,c))}}}}return t}function Pr(r,n){return r.length!==n.length?!1:r.every(function(e,t){return e===n[t]})}function Jr(r,n){r===void 0&&(r=[]),n===void 0&&(n="react-datepicker__day--holidays");var e=new Map;return r.forEach(function(t){var A=t.date,i=t.holidayName;if(I1(A)){var a=A2(A,"MM.dd.yyyy"),l=e.get(a)||{className:"",holidayNames:[]};if(!("className"in l&&l.className===n&&Pr(l.holidayNames,[i]))){l.className=n;var c=l.holidayNames;l.holidayNames=c?t1(t1([],c,!0),[i],!1):[i],e.set(a,l)}}}),e}function Hr(r,n,e,t,A){for(var i=A.length,a=[],l=0;l<i;l++){var c=r,o=A[l];o&&(c=Gt(c,W2(o)),c=m0(c,T2(o)),c=Ht(c,M1(o)));var I=m0(r,(e+1)*t);m1(c,n)&&D2(c,I)&&o!=null&&a.push(o)}return a}function g5(r){return r<10?"0".concat(r):"".concat(r)}function f1(r,n){n===void 0&&(n=Z0);var e=Math.ceil(H(r)/n)*n,t=e-(n-1);return{startPeriod:t,endPeriod:e}}function Fr(r){var n=new Date(r.getFullYear(),r.getMonth(),r.getDate()),e=new Date(r.getFullYear(),r.getMonth(),r.getDate(),24);return Math.round((+e-+n)/36e5)}function Q5(r){var n=r.getSeconds(),e=r.getMilliseconds();return q(r.getTime()-n*1e3-e)}function Z5(r,n){return Q5(r).getTime()===Q5(n).getTime()}function R5(r){if(!I1(r))throw new Error("Invalid date");var n=new Date(r);return n.setHours(0,0,0,0),n}function M7(r,n){if(!I1(r)||!I1(n))throw new Error("Invalid date received");var e=R5(r),t=R5(n);return D2(e,t)}function b5(r){return r.key===S.Space}var Dr=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.inputRef=d.createRef(),t.onTimeChange=function(A){var i,a;t.setState({time:A});var l=t.props.date,c=l instanceof Date&&!isNaN(+l),o=c?l:new Date;if(A!=null&&A.includes(":")){var I=A.split(":"),f=I[0],u=I[1];o.setHours(Number(f)),o.setMinutes(Number(u))}(a=(i=t.props).onChange)===null||a===void 0||a.call(i,o)},t.renderTimeInput=function(){var A=t.state.time,i=t.props,a=i.date,l=i.timeString,c=i.customTimeInput;return c?d.cloneElement(c,{date:a,value:A,onChange:t.onTimeChange}):d.createElement("input",{type:"time",className:"react-datepicker-time__input",placeholder:"Time",name:"time-input",ref:t.inputRef,onClick:function(){var o;(o=t.inputRef.current)===null||o===void 0||o.focus()},required:!0,value:A,onChange:function(o){t.onTimeChange(o.target.value||l)}})},t.state={time:t.props.timeString},t}return n.getDerivedStateFromProps=function(e,t){return e.timeString!==t.time?{time:e.timeString}:null},n.prototype.render=function(){return d.createElement("div",{className:"react-datepicker__input-time-container"},d.createElement("div",{className:"react-datepicker-time__caption"},this.props.timeInputLabel),d.createElement("div",{className:"react-datepicker-time__input-container"},d.createElement("div",{className:"react-datepicker-time__input"},this.renderTimeInput())))},n}(d.Component),wr=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.dayEl=d.createRef(),e.handleClick=function(t){!e.isDisabled()&&e.props.onClick&&e.props.onClick(t)},e.handleMouseEnter=function(t){!e.isDisabled()&&e.props.onMouseEnter&&e.props.onMouseEnter(t)},e.handleOnKeyDown=function(t){var A,i,a=t.key;a===S.Space&&(t.preventDefault(),t.key=S.Enter),(i=(A=e.props).handleOnKeyDown)===null||i===void 0||i.call(A,t)},e.isSameDay=function(t){return D(e.props.day,t)},e.isKeyboardSelected=function(){var t;if(e.props.disabledKeyboardNavigation)return!1;var A=e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(a){return e.isSameDayOrWeek(a)}):e.isSameDayOrWeek(e.props.selected),i=e.props.preSelection&&e.isDisabled(e.props.preSelection);return!A&&e.isSameDayOrWeek(e.props.preSelection)&&!i},e.isDisabled=function(t){return t===void 0&&(t=e.props.day),j2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate,disabled:e.props.disabled})},e.isExcluded=function(){return d7(e.props.day,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.isStartOfWeek=function(){return D(e.props.day,v1(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameWeek=function(t){return e.props.showWeekPicker&&D(t,v1(e.props.day,e.props.locale,e.props.calendarStartDay))},e.isSameDayOrWeek=function(t){return e.isSameDay(t)||e.isSameWeek(t)},e.getHighLightedClass=function(){var t=e.props,A=t.day,i=t.highlightDates;if(!i)return!1;var a=A2(A,"MM.dd.yyyy");return i.get(a)},e.getHolidaysClass=function(){var t,A=e.props,i=A.day,a=A.holidays;if(!a)return[void 0];var l=A2(i,"MM.dd.yyyy");return a.has(l)?[(t=a.get(l))===null||t===void 0?void 0:t.className]:[void 0]},e.isInRange=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:V1(A,i,a)},e.isInSelectingRange=function(){var t,A=e.props,i=A.day,a=A.selectsStart,l=A.selectsEnd,c=A.selectsRange,o=A.selectsDisabledDaysInRange,I=A.startDate,f=A.swapRange,u=A.endDate,s=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;if(!(a||l||c)||!s||!o&&e.isDisabled())return!1;if(a&&u&&(D2(s,u)||x1(s,u)))return V1(i,s,u);if(l&&I&&(m1(s,I)||x1(s,I)))return V1(i,I,s);if(c&&I&&!u){if(x1(s,I)||m1(s,I))return V1(i,I,s);if(f&&D2(s,I))return V1(i,s,I)}return!1},e.isSelectingRangeStart=function(){var t;if(!e.isInSelectingRange())return!1;var A=e.props,i=A.day,a=A.startDate,l=A.selectsStart,c=A.swapRange,o=A.selectsRange,I=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?D(i,I):o&&c&&a&&I?D(i,D2(I,a)?I:a):D(i,a)},e.isSelectingRangeEnd=function(){var t;if(!e.isInSelectingRange())return!1;var A=e.props,i=A.day,a=A.endDate,l=A.selectsEnd,c=A.selectsRange,o=A.swapRange,I=A.startDate,f=(t=e.props.selectingDate)!==null&&t!==void 0?t:e.props.preSelection;return l?D(i,f):c&&o&&I&&f?D(i,D2(f,I)?I:f):c?D(i,f):D(i,a)},e.isRangeStart=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:D(i,A)},e.isRangeEnd=function(){var t=e.props,A=t.day,i=t.startDate,a=t.endDate;return!i||!a?!1:D(a,A)},e.isWeekend=function(){var t=T6(e.props.day);return t===0||t===6},e.isAfterMonth=function(){return e.props.month!==void 0&&(e.props.month+1)%12===R2(e.props.day)},e.isBeforeMonth=function(){return e.props.month!==void 0&&(R2(e.props.day)+1)%12===e.props.month},e.isCurrentDay=function(){return e.isSameDay(N())},e.isSelected=function(){var t;return e.props.selectsMultiple?(t=e.props.selectedDates)===null||t===void 0?void 0:t.some(function(A){return e.isSameDayOrWeek(A)}):e.isSameDayOrWeek(e.props.selected)},e.getClassNames=function(t){var A=e.props.dayClassName?e.props.dayClassName(t):void 0;return p2("react-datepicker__day",A,"react-datepicker__day--"+kr(e.props.day),{"react-datepicker__day--disabled":e.isDisabled(),"react-datepicker__day--excluded":e.isExcluded(),"react-datepicker__day--selected":e.isSelected(),"react-datepicker__day--keyboard-selected":e.isKeyboardSelected(),"react-datepicker__day--range-start":e.isRangeStart(),"react-datepicker__day--range-end":e.isRangeEnd(),"react-datepicker__day--in-range":e.isInRange(),"react-datepicker__day--in-selecting-range":e.isInSelectingRange(),"react-datepicker__day--selecting-range-start":e.isSelectingRangeStart(),"react-datepicker__day--selecting-range-end":e.isSelectingRangeEnd(),"react-datepicker__day--today":e.isCurrentDay(),"react-datepicker__day--weekend":e.isWeekend(),"react-datepicker__day--outside-month":e.isAfterMonth()||e.isBeforeMonth()},e.getHighLightedClass(),e.getHolidaysClass())},e.getAriaLabel=function(){var t=e.props,A=t.day,i=t.ariaLabelPrefixWhenEnabled,a=i===void 0?"Choose":i,l=t.ariaLabelPrefixWhenDisabled,c=l===void 0?"Not available":l,o=e.isDisabled()||e.isExcluded()?c:a;return"".concat(o," ").concat(A2(A,"PPPP",e.props.locale))},e.getTitle=function(){var t=e.props,A=t.day,i=t.holidays,a=i===void 0?new Map:i,l=t.excludeDates,c=A2(A,"MM.dd.yyyy"),o=[];return a.has(c)&&o.push.apply(o,a.get(c).holidayNames),e.isExcluded()&&o.push(l==null?void 0:l.filter(function(I){return I instanceof Date?D(I,A):D(I==null?void 0:I.date,A)}).map(function(I){if(!(I instanceof Date))return I==null?void 0:I.message})),o.join(", ")},e.getTabIndex=function(){var t=e.props.selected,A=e.props.preSelection,i=!(e.props.showWeekPicker&&(e.props.showWeekNumber||!e.isStartOfWeek()))&&(e.isKeyboardSelected()||e.isSameDay(t)&&D(A,t))?0:-1;return i},e.handleFocusDay=function(){var t;e.shouldFocusDay()&&((t=e.dayEl.current)===null||t===void 0||t.focus({preventScroll:!0}))},e.renderDayContents=function(){return e.props.monthShowsDuplicateDaysEnd&&e.isAfterMonth()||e.props.monthShowsDuplicateDaysStart&&e.isBeforeMonth()?null:e.props.renderDayContents?e.props.renderDayContents(U4(e.props.day),e.props.day):U4(e.props.day)},e.render=function(){return d.createElement("div",{ref:e.dayEl,className:e.getClassNames(e.props.day),onKeyDown:e.handleOnKeyDown,onClick:e.handleClick,onMouseEnter:e.props.usePointerEvent?void 0:e.handleMouseEnter,onPointerEnter:e.props.usePointerEvent?e.handleMouseEnter:void 0,tabIndex:e.getTabIndex(),"aria-label":e.getAriaLabel(),role:"gridcell",title:e.getTitle(),"aria-disabled":e.isDisabled(),"aria-current":e.isCurrentDay()?"date":void 0,"aria-selected":e.isSelected()||e.isInRange()},e.renderDayContents(),e.getTitle()!==""&&d.createElement("span",{className:"overlay"},e.getTitle()))},e}return n.prototype.componentDidMount=function(){this.handleFocusDay()},n.prototype.componentDidUpdate=function(){this.handleFocusDay()},n.prototype.shouldFocusDay=function(){var e=!1;return this.getTabIndex()===0&&this.isSameDay(this.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(e=!0),this.props.inline&&!this.props.shouldFocusDayInline&&(e=!1),this.isDayActiveElement()&&(e=!0),this.isDuplicateDay()&&(e=!1)),e},n.prototype.isDayActiveElement=function(){var e,t,A;return((t=(e=this.props.containerRef)===null||e===void 0?void 0:e.current)===null||t===void 0?void 0:t.contains(document.activeElement))&&((A=document.activeElement)===null||A===void 0?void 0:A.classList.contains("react-datepicker__day"))},n.prototype.isDuplicateDay=function(){return this.props.monthShowsDuplicateDaysEnd&&this.isAfterMonth()||this.props.monthShowsDuplicateDaysStart&&this.isBeforeMonth()},n}(d.Component),Lr=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.weekNumberEl=d.createRef(),e.handleClick=function(t){e.props.onClick&&e.props.onClick(t)},e.handleOnKeyDown=function(t){var A,i,a=t.key;a===S.Space&&(t.preventDefault(),t.key=S.Enter),(i=(A=e.props).handleOnKeyDown)===null||i===void 0||i.call(A,t)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!D(e.props.date,e.props.selected)&&D(e.props.date,e.props.preSelection)},e.getTabIndex=function(){return e.props.showWeekPicker&&e.props.showWeekNumber&&(e.isKeyboardSelected()||D(e.props.date,e.props.selected)&&D(e.props.preSelection,e.props.selected))?0:-1},e.handleFocusWeekNumber=function(t){var A=!1;e.getTabIndex()===0&&!(t!=null&&t.isInputFocused)&&D(e.props.date,e.props.preSelection)&&((!document.activeElement||document.activeElement===document.body)&&(A=!0),e.props.inline&&!e.props.shouldFocusDayInline&&(A=!1),e.props.containerRef&&e.props.containerRef.current&&e.props.containerRef.current.contains(document.activeElement)&&document.activeElement&&document.activeElement.classList.contains("react-datepicker__week-number")&&(A=!0)),A&&e.weekNumberEl.current&&e.weekNumberEl.current.focus({preventScroll:!0})},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{ariaLabelPrefix:"week "}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.handleFocusWeekNumber()},n.prototype.componentDidUpdate=function(e){this.handleFocusWeekNumber(e)},n.prototype.render=function(){var e=this.props,t=e.weekNumber,A=e.isWeekDisabled,i=e.ariaLabelPrefix,a=i===void 0?n.defaultProps.ariaLabelPrefix:i,l=e.onClick,c={"react-datepicker__week-number":!0,"react-datepicker__week-number--clickable":!!l&&!A,"react-datepicker__week-number--selected":!!l&&D(this.props.date,this.props.selected)};return d.createElement("div",{ref:this.weekNumberEl,className:p2(c),"aria-label":"".concat(a," ").concat(this.props.weekNumber),onClick:this.handleClick,onKeyDown:this.handleOnKeyDown,tabIndex:this.getTabIndex(),role:"gridcell"},t)},n}(d.Component),Nr=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.isDisabled=function(t){return j2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate})},e.handleDayClick=function(t,A){e.props.onDayClick&&e.props.onDayClick(t,A)},e.handleDayMouseEnter=function(t){e.props.onDayMouseEnter&&e.props.onDayMouseEnter(t)},e.handleWeekClick=function(t,A,i){for(var a,l,c,o=new Date(t),I=0;I<7;I++){var f=new Date(t);f.setDate(f.getDate()+I);var u=!e.isDisabled(f);if(u){o=f;break}}typeof e.props.onWeekSelect=="function"&&e.props.onWeekSelect(o,A,i),e.props.showWeekPicker&&e.handleDayClick(o,i),((a=e.props.shouldCloseOnSelect)!==null&&a!==void 0?a:n.defaultProps.shouldCloseOnSelect)&&((c=(l=e.props).setOpen)===null||c===void 0||c.call(l,!1))},e.formatWeekNumber=function(t){return e.props.formatWeekNumber?e.props.formatWeekNumber(t):Yr(t)},e.isWeekDisabled=function(){for(var t=e.startOfWeek(),A=y2(t,6),i=new Date(t);i<=A;){if(!e.isDisabled(i))return!1;i=y2(i,1)}return!0},e.renderDays=function(){var t=e.startOfWeek(),A=[],i=e.formatWeekNumber(t);if(e.props.showWeekNumber){var a=e.props.onWeekSelect||e.props.showWeekPicker?e.handleWeekClick.bind(e,t,i):void 0;A.push(d.createElement(Lr,F({key:"W"},n.defaultProps,e.props,{weekNumber:i,isWeekDisabled:e.isWeekDisabled(),date:t,onClick:a})))}return A.concat([0,1,2,3,4,5,6].map(function(l){var c=y2(t,l);return d.createElement(wr,F({},n.defaultProps,e.props,{ariaLabelPrefixWhenEnabled:e.props.chooseDayAriaLabelPrefix,ariaLabelPrefixWhenDisabled:e.props.disabledDayAriaLabelPrefix,key:c.valueOf(),day:c,onClick:e.handleDayClick.bind(e,c),onMouseEnter:e.handleDayMouseEnter.bind(e,c)}))}))},e.startOfWeek=function(){return v1(e.props.day,e.props.locale,e.props.calendarStartDay)},e.isKeyboardSelected=function(){return!e.props.disabledKeyboardNavigation&&!D(e.startOfWeek(),e.props.selected)&&D(e.startOfWeek(),e.props.preSelection)},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{shouldCloseOnSelect:!0}},enumerable:!1,configurable:!0}),n.prototype.render=function(){var e={"react-datepicker__week":!0,"react-datepicker__week--selected":D(this.startOfWeek(),this.props.selected),"react-datepicker__week--keyboard-selected":this.isKeyboardSelected()},t=this.props.weekClassName?this.props.weekClassName(this.startOfWeek()):void 0;return d.createElement("div",{className:p2(e,t),role:"row"},this.renderDays())},n}(d.Component),B0,_r=6,o0={TWO_COLUMNS:"two_columns",THREE_COLUMNS:"three_columns",FOUR_COLUMNS:"four_columns"},m7=(B0={},B0[o0.TWO_COLUMNS]={grid:[[0,1],[2,3],[4,5],[6,7],[8,9],[10,11]],verticalNavigationOffset:2},B0[o0.THREE_COLUMNS]={grid:[[0,1,2],[3,4,5],[6,7,8],[9,10,11]],verticalNavigationOffset:3},B0[o0.FOUR_COLUMNS]={grid:[[0,1,2,3],[4,5,6,7],[8,9,10,11]],verticalNavigationOffset:4},B0),m3=1;function S5(r,n){return r?o0.FOUR_COLUMNS:n?o0.TWO_COLUMNS:o0.THREE_COLUMNS}var $r=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.MONTH_REFS=t1([],Array(12),!0).map(function(){return d.createRef()}),e.QUARTER_REFS=t1([],Array(4),!0).map(function(){return d.createRef()}),e.isDisabled=function(t){return j2(t,{minDate:e.props.minDate,maxDate:e.props.maxDate,excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals,includeDateIntervals:e.props.includeDateIntervals,includeDates:e.props.includeDates,filterDate:e.props.filterDate,disabled:e.props.disabled})},e.isExcluded=function(t){return d7(t,{excludeDates:e.props.excludeDates,excludeDateIntervals:e.props.excludeDateIntervals})},e.handleDayClick=function(t,A){var i,a;(a=(i=e.props).onDayClick)===null||a===void 0||a.call(i,t,A,e.props.orderInDisplay)},e.handleDayMouseEnter=function(t){var A,i;(i=(A=e.props).onDayMouseEnter)===null||i===void 0||i.call(A,t)},e.handleMouseLeave=function(){var t,A;(A=(t=e.props).onMouseLeave)===null||A===void 0||A.call(t)},e.isRangeStartMonth=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:Q2(k2(i,t),a)},e.isRangeStartQuarter=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:f3(e0(i,t),a)},e.isRangeEndMonth=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:Q2(k2(i,t),l)},e.isRangeEndQuarter=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate;return!a||!l?!1:f3(e0(i,t),l)},e.isInSelectingRangeMonth=function(t){var A,i=e.props,a=i.day,l=i.selectsStart,c=i.selectsEnd,o=i.selectsRange,I=i.startDate,f=i.endDate,u=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return!(l||c||o)||!u?!1:l&&f?C3(u,f,t,a):c&&I||o&&I&&!f?C3(I,u,t,a):!1},e.isSelectingMonthRangeStart=function(t){var A;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,a=i.day,l=i.startDate,c=i.selectsStart,o=k2(a,t),I=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return c?Q2(o,I):Q2(o,l)},e.isSelectingMonthRangeEnd=function(t){var A;if(!e.isInSelectingRangeMonth(t))return!1;var i=e.props,a=i.day,l=i.endDate,c=i.selectsEnd,o=i.selectsRange,I=k2(a,t),f=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return c||o?Q2(I,f):Q2(I,l)},e.isInSelectingRangeQuarter=function(t){var A,i=e.props,a=i.day,l=i.selectsStart,c=i.selectsEnd,o=i.selectsRange,I=i.startDate,f=i.endDate,u=(A=e.props.selectingDate)!==null&&A!==void 0?A:e.props.preSelection;return!(l||c||o)||!u?!1:l&&f?M3(u,f,t,a):c&&I||o&&I&&!f?M3(I,u,t,a):!1},e.isWeekInMonth=function(t){var A=e.props.day,i=y2(t,6);return Q2(t,A)||Q2(i,A)},e.isCurrentMonth=function(t,A){return H(t)===H(N())&&A===R2(N())},e.isCurrentQuarter=function(t,A){return H(t)===H(N())&&A===s1(N())},e.isSelectedMonth=function(t,A,i){return R2(i)===A&&H(t)===H(i)},e.isSelectMonthInList=function(t,A,i){return i.some(function(a){return e.isSelectedMonth(t,A,a)})},e.isSelectedQuarter=function(t,A,i){return s1(i)===A&&H(t)===H(i)},e.isSelectQuarterInList=function(t,A,i){return i.some(function(a){return e.isSelectedQuarter(t,A,a)})},e.isMonthSelected=function(){var t=e.props,A=t.day,i=t.selected,a=t.selectedDates,l=t.selectsMultiple,c=R2(A);return l?a==null?void 0:a.some(function(o){return e.isSelectedMonth(A,c,o)}):!!i&&e.isSelectedMonth(A,c,i)},e.isQuarterSelected=function(){var t=e.props,A=t.day,i=t.selected,a=t.selectedDates,l=t.selectsMultiple,c=s1(A);return l?a==null?void 0:a.some(function(o){return e.isSelectedQuarter(A,c,o)}):!!i&&e.isSelectedQuarter(A,c,i)},e.renderWeeks=function(){if(!q2(e.props.day))return[];for(var t=[],A=e.props.fixedHeight,i=0,a=!1,l=v1(E1(e.props.day),e.props.locale,e.props.calendarStartDay),c=function(m){return e.props.showWeekPicker?v1(m,e.props.locale,e.props.calendarStartDay):e.props.preSelection},o=function(m){return e.props.showWeekPicker?v1(m,e.props.locale,e.props.calendarStartDay):e.props.selected},I=e.props.selected?o(e.props.selected):void 0,f=e.props.preSelection?c(e.props.preSelection):void 0;t.push(d.createElement(Nr,F({},e.props,{ariaLabelPrefix:e.props.weekAriaLabelPrefix,key:i,day:l,month:R2(e.props.day),onDayClick:e.handleDayClick,onDayMouseEnter:e.handleDayMouseEnter,selected:I,preSelection:f,showWeekNumber:e.props.showWeekNumbers}))),!a;){i++,l=T0(l,1);var u=A&&i>=_r,s=!A&&!e.isWeekInMonth(l);if(u||s)if(e.props.peekNextMonth)a=!0;else break}return t},e.onMonthClick=function(t,A){var i=e.isMonthDisabledForLabelDate(A),a=i.isDisabled,l=i.labelDate;a||e.handleDayClick(E1(l),t)},e.onMonthMouseEnter=function(t){var A=e.isMonthDisabledForLabelDate(t),i=A.isDisabled,a=A.labelDate;i||e.handleDayMouseEnter(E1(a))},e.handleMonthNavigation=function(t,A){var i,a,l,c;(a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,A),(c=(l=e.MONTH_REFS[t])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus()},e.handleKeyboardNavigation=function(t,A,i){var a,l=e.props,c=l.selected,o=l.preSelection,I=l.setPreSelection,f=l.minDate,u=l.maxDate,s=l.showFourColumnMonthYearPicker,m=l.showTwoColumnMonthYearPicker;if(o){var h=S5(s,m),v=e.getVerticalOffset(h),z=(a=m7[h])===null||a===void 0?void 0:a.grid,Q=function(K,b,U){var O,P,V=b,G=U;switch(K){case S.ArrowRight:V=O2(b,m3),G=U===11?0:U+m3;break;case S.ArrowLeft:V=Y1(b,m3),G=U===0?11:U-m3;break;case S.ArrowUp:V=Y1(b,v),G=!((O=z==null?void 0:z[0])===null||O===void 0)&&O.includes(U)?U+12-v:U-v;break;case S.ArrowDown:V=O2(b,v),G=!((P=z==null?void 0:z[z.length-1])===null||P===void 0)&&P.includes(U)?U-12+v:U+v;break}return{newCalculatedDate:V,newCalculatedMonth:G}},R=function(K,b,U){for(var O=40,P=K,V=!1,G=0,W=Q(P,b,U),L=W.newCalculatedDate,w=W.newCalculatedMonth;!V;){if(G>=O){L=b,w=U;break}if(f&&L<f){P=S.ArrowRight;var Z=Q(P,L,w);L=Z.newCalculatedDate,w=Z.newCalculatedMonth}if(u&&L>u){P=S.ArrowLeft;var Z=Q(P,L,w);L=Z.newCalculatedDate,w=Z.newCalculatedMonth}if(Or(L,e.props)){var Z=Q(P,L,w);L=Z.newCalculatedDate,w=Z.newCalculatedMonth}else V=!0;G++}return{newCalculatedDate:L,newCalculatedMonth:w}};if(A===S.Enter){e.isMonthDisabled(i)||(e.onMonthClick(t,i),I==null||I(c));return}var k=R(A,o,i),x=k.newCalculatedDate,B=k.newCalculatedMonth;switch(A){case S.ArrowRight:case S.ArrowLeft:case S.ArrowUp:case S.ArrowDown:e.handleMonthNavigation(B,x);break}}},e.getVerticalOffset=function(t){var A,i;return(i=(A=m7[t])===null||A===void 0?void 0:A.verticalNavigationOffset)!==null&&i!==void 0?i:0},e.onMonthKeyDown=function(t,A){var i=e.props,a=i.disabledKeyboardNavigation,l=i.handleOnMonthKeyDown,c=t.key;c!==S.Tab&&t.preventDefault(),a||e.handleKeyboardNavigation(t,c,A),l&&l(t)},e.onQuarterClick=function(t,A){var i=e0(e.props.day,A);u3(i,e.props)||e.handleDayClick(l5(i),t)},e.onQuarterMouseEnter=function(t){var A=e0(e.props.day,t);u3(A,e.props)||e.handleDayMouseEnter(l5(A))},e.handleQuarterNavigation=function(t,A){var i,a,l,c;e.isDisabled(A)||e.isExcluded(A)||((a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,A),(c=(l=e.QUARTER_REFS[t-1])===null||l===void 0?void 0:l.current)===null||c===void 0||c.focus())},e.onQuarterKeyDown=function(t,A){var i,a,l=t.key;if(!e.props.disabledKeyboardNavigation)switch(l){case S.Enter:e.onQuarterClick(t,A),(a=(i=e.props).setPreSelection)===null||a===void 0||a.call(i,e.props.selected);break;case S.ArrowRight:if(!e.props.preSelection)break;e.handleQuarterNavigation(A===4?1:A+1,D3(e.props.preSelection,1));break;case S.ArrowLeft:if(!e.props.preSelection)break;e.handleQuarterNavigation(A===1?4:A-1,V4(e.props.preSelection));break}},e.isMonthDisabledForLabelDate=function(t){var A,i=e.props,a=i.day,l=i.disabled,c=i.minDate,o=i.maxDate,I=i.excludeDates,f=i.includeDates,u=k2(a,t);return l?{isDisabled:!0,labelDate:k2(a,t)}:{isDisabled:(A=(c||o||I||f)&&f5(u,e.props))!==null&&A!==void 0?A:!1,labelDate:u}},e.isMonthDisabled=function(t){var A=e.isMonthDisabledForLabelDate(t).isDisabled;return A},e.getMonthClassNames=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate,c=A.preSelection,o=A.monthClassName,I=o?o(k2(i,t)):void 0,f=e.getSelection();return p2("react-datepicker__month-text","react-datepicker__month-".concat(t),I,{"react-datepicker__month-text--disabled":e.isMonthDisabled(t),"react-datepicker__month-text--selected":f?e.isSelectMonthInList(i,t,f):void 0,"react-datepicker__month-text--keyboard-selected":!e.props.disabledKeyboardNavigation&&c&&e.isSelectedMonth(i,t,c)&&!e.isMonthSelected()&&!e.isMonthDisabled(t),"react-datepicker__month-text--in-selecting-range":e.isInSelectingRangeMonth(t),"react-datepicker__month-text--in-range":a&&l?C3(a,l,t,i):void 0,"react-datepicker__month-text--range-start":e.isRangeStartMonth(t),"react-datepicker__month-text--range-end":e.isRangeEndMonth(t),"react-datepicker__month-text--selecting-range-start":e.isSelectingMonthRangeStart(t),"react-datepicker__month-text--selecting-range-end":e.isSelectingMonthRangeEnd(t),"react-datepicker__month-text--today":e.isCurrentMonth(i,t)})},e.getTabIndex=function(t){if(e.props.preSelection==null)return"-1";var A=R2(e.props.preSelection),i=e.isMonthDisabledForLabelDate(A).isDisabled,a=t===A&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return a},e.getQuarterTabIndex=function(t){if(e.props.preSelection==null)return"-1";var A=s1(e.props.preSelection),i=u3(e.props.day,e.props),a=t===A&&!(i||e.props.disabledKeyboardNavigation)?"0":"-1";return a},e.getAriaLabel=function(t){var A=e.props,i=A.chooseDayAriaLabelPrefix,a=i===void 0?"Choose":i,l=A.disabledDayAriaLabelPrefix,c=l===void 0?"Not available":l,o=A.day,I=A.locale,f=k2(o,t),u=e.isDisabled(f)||e.isExcluded(f)?c:a;return"".concat(u," ").concat(A2(f,"MMMM yyyy",I))},e.getQuarterClassNames=function(t){var A=e.props,i=A.day,a=A.startDate,l=A.endDate,c=A.minDate,o=A.maxDate,I=A.excludeDates,f=A.includeDates,u=A.filterDate,s=A.preSelection,m=A.disabledKeyboardNavigation,h=A.disabled,v=(c||o||I||f||u||h)&&u3(e0(i,t),e.props),z=e.getSelection();return p2("react-datepicker__quarter-text","react-datepicker__quarter-".concat(t),{"react-datepicker__quarter-text--disabled":v,"react-datepicker__quarter-text--selected":z?e.isSelectQuarterInList(i,t,z):void 0,"react-datepicker__quarter-text--keyboard-selected":!m&&s&&e.isSelectedQuarter(i,t,s)&&!e.isQuarterSelected()&&!v,"react-datepicker__quarter-text--in-selecting-range":e.isInSelectingRangeQuarter(t),"react-datepicker__quarter-text--in-range":a&&l?M3(a,l,t,i):void 0,"react-datepicker__quarter-text--range-start":e.isRangeStartQuarter(t),"react-datepicker__quarter-text--range-end":e.isRangeEndQuarter(t),"react-datepicker__quarter-text--today":e.isCurrentQuarter(i,t)})},e.getMonthContent=function(t){var A=e.props,i=A.showFullMonthYearPicker,a=A.renderMonthContent,l=A.locale,c=A.day,o=E5(t,l),I=s7(t,l);return a?a(t,o,I,c):i?I:o},e.getQuarterContent=function(t){var A,i=e.props,a=i.renderQuarterContent,l=i.locale,c=yr(t,l);return(A=a==null?void 0:a(t,c))!==null&&A!==void 0?A:c},e.renderMonths=function(){var t,A=e.props,i=A.showTwoColumnMonthYearPicker,a=A.showFourColumnMonthYearPicker,l=A.day,c=A.selected,o=(t=m7[S5(a,i)])===null||t===void 0?void 0:t.grid;return o==null?void 0:o.map(function(I,f){return d.createElement("div",{className:"react-datepicker__month-wrapper",key:f},I.map(function(u,s){return d.createElement("div",{ref:e.MONTH_REFS[u],key:s,onClick:function(m){e.onMonthClick(m,u)},onKeyDown:function(m){b5(m)&&(m.preventDefault(),m.key=S.Enter),e.onMonthKeyDown(m,u)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onMonthMouseEnter(u)},onPointerEnter:e.props.usePointerEvent?function(){return e.onMonthMouseEnter(u)}:void 0,tabIndex:Number(e.getTabIndex(u)),className:e.getMonthClassNames(u),"aria-disabled":e.isMonthDisabled(u),role:"option","aria-label":e.getAriaLabel(u),"aria-current":e.isCurrentMonth(l,u)?"date":void 0,"aria-selected":c?e.isSelectedMonth(l,u,c):void 0},e.getMonthContent(u))}))})},e.renderQuarters=function(){var t=e.props,A=t.day,i=t.selected,a=[1,2,3,4];return d.createElement("div",{className:"react-datepicker__quarter-wrapper"},a.map(function(l,c){return d.createElement("div",{key:c,ref:e.QUARTER_REFS[c],role:"option",onClick:function(o){e.onQuarterClick(o,l)},onKeyDown:function(o){e.onQuarterKeyDown(o,l)},onMouseEnter:e.props.usePointerEvent?void 0:function(){return e.onQuarterMouseEnter(l)},onPointerEnter:e.props.usePointerEvent?function(){return e.onQuarterMouseEnter(l)}:void 0,className:e.getQuarterClassNames(l),"aria-selected":i?e.isSelectedQuarter(A,l,i):void 0,tabIndex:Number(e.getQuarterTabIndex(l)),"aria-current":e.isCurrentQuarter(A,l)?"date":void 0},e.getQuarterContent(l))}))},e.getClassNames=function(){var t=e.props,A=t.selectingDate,i=t.selectsStart,a=t.selectsEnd,l=t.showMonthYearPicker,c=t.showQuarterYearPicker,o=t.showWeekPicker;return p2("react-datepicker__month",{"react-datepicker__month--selecting-range":A&&(i||a)},{"react-datepicker__monthPicker":l},{"react-datepicker__quarterPicker":c},{"react-datepicker__weekPicker":o})},e}return n.prototype.getSelection=function(){var e=this.props,t=e.selected,A=e.selectedDates,i=e.selectsMultiple;if(i)return A;if(t)return[t]},n.prototype.render=function(){var e=this.props,t=e.showMonthYearPicker,A=e.showQuarterYearPicker,i=e.day,a=e.ariaLabelPrefix,l=a===void 0?"Month ":a,c=l?l.trim()+" ":"",o=q2(i)?"".concat(c).concat(A2(i,"MMMM, yyyy",this.props.locale)):"",I=t||A;return I?d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":o,role:"listbox"},t?this.renderMonths():this.renderQuarters()):d.createElement("div",{role:"table"},this.props.dayNamesHeader&&d.createElement("div",{role:"rowgroup"},this.props.dayNamesHeader),d.createElement("div",{className:this.getClassNames(),onMouseLeave:this.props.usePointerEvent?void 0:this.handleMouseLeave,onPointerLeave:this.props.usePointerEvent?this.handleMouseLeave:void 0,"aria-label":o,role:"rowgroup"},this.renderWeeks()))},n}(d.Component),eA=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.monthOptionButtonsRef={},e.isSelectedMonth=function(t){return e.props.month===t},e.handleOptionKeyDown=function(t,A){var i;switch(A.key){case"Enter":A.preventDefault(),e.onChange(t);break;case"Escape":A.preventDefault(),e.props.onCancel();break;case"ArrowUp":case"ArrowDown":{A.preventDefault();var a=(t+(A.key==="ArrowUp"?-1:1)+e.props.monthNames.length)%e.props.monthNames.length;(i=e.monthOptionButtonsRef[a])===null||i===void 0||i.focus();break}}},e.renderOptions=function(){return e.monthOptionButtonsRef={},e.props.monthNames.map(function(t,A){return d.createElement("div",{ref:function(i){e.monthOptionButtonsRef[A]=i,e.isSelectedMonth(A)&&(i==null||i.focus())},role:"button",tabIndex:0,className:e.isSelectedMonth(A)?"react-datepicker__month-option react-datepicker__month-option--selected_month":"react-datepicker__month-option",key:t,onClick:e.onChange.bind(e,A),onKeyDown:e.handleOptionKeyDown.bind(e,A),"aria-selected":e.isSelectedMonth(A)?"true":void 0},e.isSelectedMonth(A)?d.createElement("span",{className:"react-datepicker__month-option--selected"},"✓"):"",t)})},e.onChange=function(t){return e.props.onChange(t)},e.handleClickOutside=function(){return e.props.onCancel()},e}return n.prototype.render=function(){return d.createElement(I3,{className:"react-datepicker__month-dropdown",onClickOutside:this.handleClickOutside},this.renderOptions())},n}(d.Component),tA=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(t){return t.map(function(A,i){return d.createElement("option",{key:A,value:i},A)})},e.renderSelectMode=function(t){return d.createElement("select",{value:e.props.month,className:"react-datepicker__month-select",onChange:function(A){return e.onChange(parseInt(A.target.value))}},e.renderSelectOptions(t))},e.renderReadView=function(t,A){return d.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-read-view--selected-month"},A[e.props.month]))},e.renderDropdown=function(t){return d.createElement(eA,F({key:"dropdown"},e.props,{monthNames:t,onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(t){var A=e.state.dropdownVisible,i=[e.renderReadView(!A,t)];return A&&i.unshift(e.renderDropdown(t)),i},e.onChange=function(t){e.toggleDropdown(),t!==e.props.month&&e.props.onChange(t)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return n.prototype.render=function(){var e=this,t=[0,1,2,3,4,5,6,7,8,9,10,11].map(this.props.useShortMonthInDropdown?function(i){return E5(i,e.props.locale)}:function(i){return s7(i,e.props.locale)}),A;switch(this.props.dropdownMode){case"scroll":A=this.renderScrollMode(t);break;case"select":A=this.renderSelectMode(t);break}return d.createElement("div",{className:"react-datepicker__month-dropdown-container react-datepicker__month-dropdown-container--".concat(this.props.dropdownMode)},A)},n}(d.Component);function nA(r,n){for(var e=[],t=E1(r),A=E1(n);!m1(t,A);)e.push(N(t)),t=O2(t,1);return e}var rA=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.renderOptions=function(){return t.state.monthYearsList.map(function(A){var i=$3(A),a=n1(t.props.date,A)&&Q2(t.props.date,A);return d.createElement("div",{className:a?"react-datepicker__month-year-option--selected_month-year":"react-datepicker__month-year-option",key:i,onClick:t.onChange.bind(t,i),"aria-selected":a?"true":void 0},a?d.createElement("span",{className:"react-datepicker__month-year-option--selected"},"✓"):"",A2(A,t.props.dateFormat,t.props.locale))})},t.onChange=function(A){return t.props.onChange(A)},t.handleClickOutside=function(){t.props.onCancel()},t.state={monthYearsList:nA(t.props.minDate,t.props.maxDate)},t}return n.prototype.render=function(){var e=p2({"react-datepicker__month-year-dropdown":!0,"react-datepicker__month-year-dropdown--scrollable":this.props.scrollableMonthYearDropdown});return d.createElement(I3,{className:e,onClickOutside:this.handleClickOutside},this.renderOptions())},n}(d.Component),AA=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=E1(e.props.minDate),A=E1(e.props.maxDate),i=[];!m1(t,A);){var a=$3(t);i.push(d.createElement("option",{key:a,value:a},A2(t,e.props.dateFormat,e.props.locale))),t=O2(t,1)}return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:$3(E1(e.props.date)),className:"react-datepicker__month-year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){var A=A2(e.props.date,e.props.dateFormat,e.props.locale);return d.createElement("div",{key:"read",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__month-year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__month-year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__month-year-read-view--selected-month-year"},A))},e.renderDropdown=function(){return d.createElement(rA,F({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,A=[e.renderReadView(!t)];return t&&A.unshift(e.renderDropdown()),A},e.onChange=function(t){e.toggleDropdown();var A=N(t);n1(e.props.date,A)&&Q2(e.props.date,A)||e.props.onChange(A)},e.toggleDropdown=function(){return e.setState({dropdownVisible:!e.state.dropdownVisible})},e}return n.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__month-year-dropdown-container react-datepicker__month-year-dropdown-container--".concat(this.props.dropdownMode)},e)},n}(d.Component),iA=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={height:null},e.scrollToTheSelectedTime=function(){requestAnimationFrame(function(){var t,A,i;e.list&&(e.list.scrollTop=(i=e.centerLi&&n.calcCenterPosition(e.props.monthRef?e.props.monthRef.clientHeight-((A=(t=e.header)===null||t===void 0?void 0:t.clientHeight)!==null&&A!==void 0?A:0):e.list.clientHeight,e.centerLi))!==null&&i!==void 0?i:0)})},e.handleClick=function(t){var A,i;(e.props.minTime||e.props.maxTime)&&s5(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&u5(t,e.props)||(i=(A=e.props).onChange)===null||i===void 0||i.call(A,t)},e.isSelectedTime=function(t){return e.props.selected&&Z5(e.props.selected,t)},e.isDisabledTime=function(t){return(e.props.minTime||e.props.maxTime)&&s5(t,e.props)||(e.props.excludeTimes||e.props.includeTimes||e.props.filterTime)&&u5(t,e.props)},e.liClasses=function(t){var A,i=["react-datepicker__time-list-item",e.props.timeClassName?e.props.timeClassName(t):void 0];return e.isSelectedTime(t)&&i.push("react-datepicker__time-list-item--selected"),e.isDisabledTime(t)&&i.push("react-datepicker__time-list-item--disabled"),e.props.injectTimes&&(W2(t)*3600+T2(t)*60+M1(t))%(((A=e.props.intervals)!==null&&A!==void 0?A:n.defaultProps.intervals)*60)!==0&&i.push("react-datepicker__time-list-item--injected"),i.join(" ")},e.handleOnKeyDown=function(t,A){var i,a;t.key===S.Space&&(t.preventDefault(),t.key=S.Enter),(t.key===S.ArrowUp||t.key===S.ArrowLeft)&&t.target instanceof HTMLElement&&t.target.previousSibling&&(t.preventDefault(),t.target.previousSibling instanceof HTMLElement&&t.target.previousSibling.focus()),(t.key===S.ArrowDown||t.key===S.ArrowRight)&&t.target instanceof HTMLElement&&t.target.nextSibling&&(t.preventDefault(),t.target.nextSibling instanceof HTMLElement&&t.target.nextSibling.focus()),t.key===S.Enter&&e.handleClick(A),(a=(i=e.props).handleOnKeyDown)===null||a===void 0||a.call(i,t)},e.renderTimes=function(){for(var t,A=[],i=typeof e.props.format=="string"?e.props.format:"p",a=(t=e.props.intervals)!==null&&t!==void 0?t:n.defaultProps.intervals,l=e.props.selected||e.props.openToDate||N(),c=R0(l),o=e.props.injectTimes&&e.props.injectTimes.sort(function(v,z){return v.getTime()-z.getTime()}),I=60*Fr(l),f=I/a,u=0;u<f;u++){var s=m0(c,u*a);if(A.push(s),o){var m=Hr(c,s,u,a,o);A=A.concat(m)}}var h=A.reduce(function(v,z){return z.getTime()<=l.getTime()?z:v},A[0]);return A.map(function(v){return d.createElement("li",{key:v.valueOf(),onClick:e.handleClick.bind(e,v),className:e.liClasses(v),ref:function(z){v===h&&(e.centerLi=z)},onKeyDown:function(z){e.handleOnKeyDown(z,v)},tabIndex:v===h?0:-1,role:"option","aria-selected":e.isSelectedTime(v)?"true":void 0,"aria-disabled":e.isDisabledTime(v)?"true":void 0},A2(v,i,e.props.locale))})},e.renderTimeCaption=function(){return e.props.showTimeCaption===!1?d.createElement(d.Fragment,null):d.createElement("div",{className:"react-datepicker__header react-datepicker__header--time ".concat(e.props.showTimeSelectOnly?"react-datepicker__header--time--only":""),ref:function(t){e.header=t}},d.createElement("div",{className:"react-datepicker-time__header"},e.props.timeCaption))},e}return Object.defineProperty(n,"defaultProps",{get:function(){return{intervals:30,todayButton:null,timeCaption:"Time",showTimeCaption:!0}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){this.scrollToTheSelectedTime(),this.observeDatePickerHeightChanges()},n.prototype.componentWillUnmount=function(){var e;(e=this.resizeObserver)===null||e===void 0||e.disconnect()},n.prototype.observeDatePickerHeightChanges=function(){var e=this,t=this.props.monthRef;this.updateContainerHeight(),t&&(this.resizeObserver=new ResizeObserver(function(){e.updateContainerHeight()}),this.resizeObserver.observe(t))},n.prototype.updateContainerHeight=function(){this.props.monthRef&&this.header&&this.setState({height:this.props.monthRef.clientHeight-this.header.clientHeight})},n.prototype.render=function(){var e=this,t,A=this.state.height;return d.createElement("div",{className:"react-datepicker__time-container ".concat(((t=this.props.todayButton)!==null&&t!==void 0?t:n.defaultProps.todayButton)?"react-datepicker__time-container--with-today-button":"")},this.renderTimeCaption(),d.createElement("div",{className:"react-datepicker__time"},d.createElement("div",{className:"react-datepicker__time-box"},d.createElement("ul",{className:"react-datepicker__time-list",ref:function(i){e.list=i},style:A?{height:A}:{},role:"listbox","aria-label":this.props.timeCaption},this.renderTimes()))))},n.calcCenterPosition=function(e,t){return t.offsetTop-(e/2-t.clientHeight/2)},n}(d.Component),B5=3,aA=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.YEAR_REFS=t1([],Array(t.props.yearItemNumber),!0).map(function(){return d.createRef()}),t.isDisabled=function(A){return j2(A,{minDate:t.props.minDate,maxDate:t.props.maxDate,excludeDates:t.props.excludeDates,includeDates:t.props.includeDates,filterDate:t.props.filterDate})},t.isExcluded=function(A){return d7(A,{excludeDates:t.props.excludeDates})},t.selectingDate=function(){var A;return(A=t.props.selectingDate)!==null&&A!==void 0?A:t.props.preSelection},t.updateFocusOnPaginate=function(A){var i=function(){var a,l;(l=(a=t.YEAR_REFS[A])===null||a===void 0?void 0:a.current)===null||l===void 0||l.focus()};window.requestAnimationFrame(i)},t.handleYearClick=function(A,i){t.props.onDayClick&&t.props.onDayClick(A,i)},t.handleYearNavigation=function(A,i){var a,l,c,o,I=t.props,f=I.date,u=I.yearItemNumber;if(!(f===void 0||u===void 0)){var s=f1(f,u).startPeriod;t.isDisabled(i)||t.isExcluded(i)||((l=(a=t.props).setPreSelection)===null||l===void 0||l.call(a,i),A-s<0?t.updateFocusOnPaginate(u-(s-A)):A-s>=u?t.updateFocusOnPaginate(Math.abs(u-(A-s))):(o=(c=t.YEAR_REFS[A-s])===null||c===void 0?void 0:c.current)===null||o===void 0||o.focus())}},t.isSameDay=function(A,i){return D(A,i)},t.isCurrentYear=function(A){return A===H(N())},t.isRangeStart=function(A){return t.props.startDate&&t.props.endDate&&n1(N2(N(),A),t.props.startDate)},t.isRangeEnd=function(A){return t.props.startDate&&t.props.endDate&&n1(N2(N(),A),t.props.endDate)},t.isInRange=function(A){return s3(A,t.props.startDate,t.props.endDate)},t.isInSelectingRange=function(A){var i=t.props,a=i.selectsStart,l=i.selectsEnd,c=i.selectsRange,o=i.startDate,I=i.endDate;return!(a||l||c)||!t.selectingDate()?!1:a&&I?s3(A,t.selectingDate(),I):l&&o||c&&o&&!I?s3(A,o,t.selectingDate()):!1},t.isSelectingRangeStart=function(A){var i;if(!t.isInSelectingRange(A))return!1;var a=t.props,l=a.startDate,c=a.selectsStart,o=N2(N(),A);return c?n1(o,(i=t.selectingDate())!==null&&i!==void 0?i:null):n1(o,l??null)},t.isSelectingRangeEnd=function(A){var i;if(!t.isInSelectingRange(A))return!1;var a=t.props,l=a.endDate,c=a.selectsEnd,o=a.selectsRange,I=N2(N(),A);return c||o?n1(I,(i=t.selectingDate())!==null&&i!==void 0?i:null):n1(I,l??null)},t.isKeyboardSelected=function(A){if(!(t.props.disabledKeyboardNavigation||t.props.date===void 0||t.props.preSelection==null)){var i=t.props,a=i.minDate,l=i.maxDate,c=i.excludeDates,o=i.includeDates,I=i.filterDate,f=i.selected,u=b0(N2(t.props.date,A)),s=(a||l||c||o||I)&&d3(A,t.props),m=!!f&&D(u,b0(f)),h=D(u,b0(t.props.preSelection));return!t.props.inline&&!m&&h&&!s}},t.isSelectedYear=function(A){var i=t.props,a=i.selectsMultiple,l=i.selected,c=i.selectedDates;return a?c==null?void 0:c.some(function(o){return A===H(o)}):!!l&&A===H(l)},t.onYearClick=function(A,i){var a=t.props.date;a!==void 0&&t.handleYearClick(b0(N2(a,i)),A)},t.onYearKeyDown=function(A,i){var a,l,c=A.key,o=t.props,I=o.date,f=o.yearItemNumber,u=o.handleOnKeyDown;if(c!==S.Tab&&A.preventDefault(),!t.props.disabledKeyboardNavigation)switch(c){case S.Enter:if(t.props.selected==null)break;t.onYearClick(A,i),(l=(a=t.props).setPreSelection)===null||l===void 0||l.call(a,t.props.selected);break;case S.ArrowRight:if(t.props.preSelection==null)break;t.handleYearNavigation(i+1,o1(t.props.preSelection,1));break;case S.ArrowLeft:if(t.props.preSelection==null)break;t.handleYearNavigation(i-1,t0(t.props.preSelection,1));break;case S.ArrowUp:{if(I===void 0||f===void 0||t.props.preSelection==null)break;var s=f1(I,f).startPeriod,m=B5,h=i-m;if(h<s){var v=f%m;i>=s&&i<s+v?m=v:m+=v,h=i-m}t.handleYearNavigation(h,t0(t.props.preSelection,m));break}case S.ArrowDown:{if(I===void 0||f===void 0||t.props.preSelection==null)break;var z=f1(I,f).endPeriod,m=B5,h=i+m;if(h>z){var v=f%m;i<=z&&i>z-v?m=v:m+=v,h=i+m}t.handleYearNavigation(h,o1(t.props.preSelection,m));break}}u&&u(A)},t.getYearClassNames=function(A){var i=t.props,a=i.date,l=i.disabled,c=i.minDate,o=i.maxDate,I=i.excludeDates,f=i.includeDates,u=i.filterDate,s=i.yearClassName;return p2("react-datepicker__year-text","react-datepicker__year-".concat(A),a?s==null?void 0:s(N2(a,A)):void 0,{"react-datepicker__year-text--selected":t.isSelectedYear(A),"react-datepicker__year-text--disabled":(c||o||I||f||u||l)&&d3(A,t.props),"react-datepicker__year-text--keyboard-selected":t.isKeyboardSelected(A),"react-datepicker__year-text--range-start":t.isRangeStart(A),"react-datepicker__year-text--range-end":t.isRangeEnd(A),"react-datepicker__year-text--in-range":t.isInRange(A),"react-datepicker__year-text--in-selecting-range":t.isInSelectingRange(A),"react-datepicker__year-text--selecting-range-start":t.isSelectingRangeStart(A),"react-datepicker__year-text--selecting-range-end":t.isSelectingRangeEnd(A),"react-datepicker__year-text--today":t.isCurrentYear(A)})},t.getYearTabIndex=function(A){if(t.props.disabledKeyboardNavigation||t.props.preSelection==null)return"-1";var i=H(t.props.preSelection),a=d3(A,t.props);return A===i&&!a?"0":"-1"},t.getYearContent=function(A){return t.props.renderYearContent?t.props.renderYearContent(A):A},t}return n.prototype.render=function(){var e=this,t=[],A=this.props,i=A.date,a=A.yearItemNumber,l=A.onYearMouseEnter,c=A.onYearMouseLeave;if(i===void 0)return null;for(var o=f1(i,a),I=o.startPeriod,f=o.endPeriod,u=function(h){t.push(d.createElement("div",{ref:s.YEAR_REFS[h-I],onClick:function(v){e.onYearClick(v,h)},onKeyDown:function(v){b5(v)&&(v.preventDefault(),v.key=S.Enter),e.onYearKeyDown(v,h)},tabIndex:Number(s.getYearTabIndex(h)),className:s.getYearClassNames(h),onMouseEnter:s.props.usePointerEvent?void 0:function(v){return l(v,h)},onPointerEnter:s.props.usePointerEvent?function(v){return l(v,h)}:void 0,onMouseLeave:s.props.usePointerEvent?void 0:function(v){return c(v,h)},onPointerLeave:s.props.usePointerEvent?function(v){return c(v,h)}:void 0,key:h,"aria-current":s.isCurrentYear(h)?"date":void 0},s.getYearContent(h)))},s=this,m=I;m<=f;m++)u(m);return d.createElement("div",{className:"react-datepicker__year"},d.createElement("div",{className:"react-datepicker__year-wrapper",onMouseLeave:this.props.usePointerEvent?void 0:this.props.clearSelectingDate,onPointerLeave:this.props.usePointerEvent?this.props.clearSelectingDate:void 0},t))},n}(d.Component);function lA(r,n,e,t){for(var A=[],i=0;i<2*n+1;i++){var a=r+n-i,l=!0;e&&(l=H(e)<=a),t&&l&&(l=H(t)>=a),l&&A.push(a)}return A}var cA=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;t.yearOptionButtonsRef={},t.handleOptionKeyDown=function(l,c){var o;switch(c.key){case"Enter":c.preventDefault(),t.onChange(l);break;case"Escape":c.preventDefault(),t.props.onCancel();break;case"ArrowUp":case"ArrowDown":{c.preventDefault();var I=l+(c.key==="ArrowUp"?1:-1);t.yearOptionButtonsRef[I]&&((o=t.yearOptionButtonsRef[I])===null||o===void 0||o.focus());break}}},t.renderOptions=function(){t.yearOptionButtonsRef={};var l=t.props.year,c=t.state.yearsList.map(function(f){return d.createElement("div",{ref:function(u){t.yearOptionButtonsRef[f]=u,f===l&&(u==null||u.focus())},role:"button",tabIndex:0,className:l===f?"react-datepicker__year-option react-datepicker__year-option--selected_year":"react-datepicker__year-option",key:f,onClick:t.onChange.bind(t,f),onKeyDown:t.handleOptionKeyDown.bind(t,f),"aria-selected":l===f?"true":void 0},l===f?d.createElement("span",{className:"react-datepicker__year-option--selected"},"✓"):"",f)}),o=t.props.minDate?H(t.props.minDate):null,I=t.props.maxDate?H(t.props.maxDate):null;return(!I||!t.state.yearsList.find(function(f){return f===I}))&&c.unshift(d.createElement("div",{className:"react-datepicker__year-option",key:"upcoming",onClick:t.incrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-upcoming"}))),(!o||!t.state.yearsList.find(function(f){return f===o}))&&c.push(d.createElement("div",{className:"react-datepicker__year-option",key:"previous",onClick:t.decrementYears},d.createElement("a",{className:"react-datepicker__navigation react-datepicker__navigation--years react-datepicker__navigation--years-previous"}))),c},t.onChange=function(l){t.props.onChange(l)},t.handleClickOutside=function(){t.props.onCancel()},t.shiftYears=function(l){var c=t.state.yearsList.map(function(o){return o+l});t.setState({yearsList:c})},t.incrementYears=function(){return t.shiftYears(1)},t.decrementYears=function(){return t.shiftYears(-1)};var A=e.yearDropdownItemNumber,i=e.scrollableYearDropdown,a=A||(i?10:5);return t.state={yearsList:lA(t.props.year,a,t.props.minDate,t.props.maxDate)},t.dropdownRef=d.createRef(),t}return n.prototype.componentDidMount=function(){var e=this.dropdownRef.current;if(e){var t=e.children?Array.from(e.children):null,A=t?t.find(function(i){return i.ariaSelected}):null;e.scrollTop=A&&A instanceof HTMLElement?A.offsetTop+(A.clientHeight-e.clientHeight)/2:(e.scrollHeight-e.clientHeight)/2}},n.prototype.render=function(){var e=p2({"react-datepicker__year-dropdown":!0,"react-datepicker__year-dropdown--scrollable":this.props.scrollableYearDropdown});return d.createElement(I3,{className:e,containerRef:this.dropdownRef,onClickOutside:this.handleClickOutside},this.renderOptions())},n}(d.Component),oA=function(r){v2(n,r);function n(){var e=r!==null&&r.apply(this,arguments)||this;return e.state={dropdownVisible:!1},e.renderSelectOptions=function(){for(var t=e.props.minDate?H(e.props.minDate):1900,A=e.props.maxDate?H(e.props.maxDate):2100,i=[],a=t;a<=A;a++)i.push(d.createElement("option",{key:a,value:a},a));return i},e.onSelectChange=function(t){e.onChange(parseInt(t.target.value))},e.renderSelectMode=function(){return d.createElement("select",{value:e.props.year,className:"react-datepicker__year-select",onChange:e.onSelectChange},e.renderSelectOptions())},e.renderReadView=function(t){return d.createElement("button",{key:"read",type:"button",style:{visibility:t?"visible":"hidden"},className:"react-datepicker__year-read-view",onClick:e.toggleDropdown},d.createElement("span",{className:"react-datepicker__year-read-view--down-arrow"}),d.createElement("span",{className:"react-datepicker__year-read-view--selected-year"},e.props.year))},e.renderDropdown=function(){return d.createElement(cA,F({key:"dropdown"},e.props,{onChange:e.onChange,onCancel:e.toggleDropdown}))},e.renderScrollMode=function(){var t=e.state.dropdownVisible,A=[e.renderReadView(!t)];return t&&A.unshift(e.renderDropdown()),A},e.onChange=function(t){e.toggleDropdown(),t!==e.props.year&&e.props.onChange(t)},e.toggleDropdown=function(t){e.setState({dropdownVisible:!e.state.dropdownVisible},function(){e.props.adjustDateOnChange&&e.handleYearChange(e.props.date,t)})},e.handleYearChange=function(t,A){var i;(i=e.onSelect)===null||i===void 0||i.call(e,t,A),e.setOpen()},e.onSelect=function(t,A){var i,a;(a=(i=e.props).onSelect)===null||a===void 0||a.call(i,t,A)},e.setOpen=function(){var t,A;(A=(t=e.props).setOpen)===null||A===void 0||A.call(t,!0)},e}return n.prototype.render=function(){var e;switch(this.props.dropdownMode){case"scroll":e=this.renderScrollMode();break;case"select":e=this.renderSelectMode();break}return d.createElement("div",{className:"react-datepicker__year-dropdown-container react-datepicker__year-dropdown-container--".concat(this.props.dropdownMode)},e)},n}(d.Component),IA=["react-datepicker__year-select","react-datepicker__month-select","react-datepicker__month-year-select"],U5="react-datepicker-ignore-onclickoutside",EA=function(r){var n=(r.className||"").split(/\s+/);return IA.some(function(e){return n.indexOf(e)>=0})},fA=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.monthContainer=void 0,t.handleClickOutside=function(A){t.props.onClickOutside(A)},t.setClickOutsideRef=function(){return t.containerRef.current},t.handleDropdownFocus=function(A){var i,a;EA(A.target)&&((a=(i=t.props).onDropdownFocus)===null||a===void 0||a.call(i,A))},t.getDateInView=function(){var A=t.props,i=A.preSelection,a=A.selected,l=A.openToDate,c=v5(t.props),o=h5(t.props),I=N(),f=l||a||i;return f||(c&&D2(I,c)?c:o&&m1(I,o)?o:I)},t.increaseMonth=function(){t.setState(function(A){var i=A.date;return{date:O2(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.decreaseMonth=function(){t.setState(function(A){var i=A.date;return{date:Y1(i,1)}},function(){return t.handleMonthChange(t.state.date)})},t.handleDayClick=function(A,i,a){t.props.onSelect(A,i,a),t.props.setPreSelection&&t.props.setPreSelection(A)},t.handleDayMouseEnter=function(A){t.setState({selectingDate:A}),t.props.onDayMouseEnter&&t.props.onDayMouseEnter(A)},t.handleMonthMouseLeave=function(){t.setState({selectingDate:void 0}),t.props.onMonthMouseLeave&&t.props.onMonthMouseLeave()},t.handleYearMouseEnter=function(A,i){t.setState({selectingDate:N2(N(),i)}),t.props.onYearMouseEnter&&t.props.onYearMouseEnter(A,i)},t.handleYearMouseLeave=function(A,i){t.props.onYearMouseLeave&&t.props.onYearMouseLeave(A,i)},t.handleYearChange=function(A){var i,a,l,c;(a=(i=t.props).onYearChange)===null||a===void 0||a.call(i,A),t.setState({isRenderAriaLiveMessage:!0}),t.props.adjustDateOnChange&&(t.props.onSelect(A),(c=(l=t.props).setOpen)===null||c===void 0||c.call(l,!0)),t.props.setPreSelection&&t.props.setPreSelection(A)},t.getEnabledPreSelectionDateForMonth=function(A){if(!j2(A,t.props))return A;for(var i=E1(A),a=qr(A),l=Dt(a,i),c=null,o=0;o<=l;o++){var I=y2(i,o);if(!j2(I,t.props)){c=I;break}}return c},t.handleMonthChange=function(A){var i,a,l,c=(i=t.getEnabledPreSelectionDateForMonth(A))!==null&&i!==void 0?i:A;t.handleCustomMonthChange(c),t.props.adjustDateOnChange&&(t.props.onSelect(c),(l=(a=t.props).setOpen)===null||l===void 0||l.call(a,!0)),t.props.setPreSelection&&t.props.setPreSelection(c)},t.handleCustomMonthChange=function(A){var i,a;(a=(i=t.props).onMonthChange)===null||a===void 0||a.call(i,A),t.setState({isRenderAriaLiveMessage:!0})},t.handleMonthYearChange=function(A){t.handleYearChange(A),t.handleMonthChange(A)},t.changeYear=function(A){t.setState(function(i){var a=i.date;return{date:N2(a,Number(A))}},function(){return t.handleYearChange(t.state.date)})},t.changeMonth=function(A){t.setState(function(i){var a=i.date;return{date:k2(a,Number(A))}},function(){return t.handleMonthChange(t.state.date)})},t.changeMonthYear=function(A){t.setState(function(i){var a=i.date;return{date:N2(k2(a,R2(A)),H(A))}},function(){return t.handleMonthYearChange(t.state.date)})},t.header=function(A){if(A===void 0&&(A=t.state.date),!q2(A))return[];var i=t.props.disabled,a=v1(A,t.props.locale,t.props.calendarStartDay),l=[];return t.props.showWeekNumbers&&l.push(d.createElement("div",{key:"W",className:"react-datepicker__day-name ".concat(i?"react-datepicker__day-name--disabled":""),role:"columnheader"},d.createElement("span",{className:"react-datepicker__sr-only"},"Week number"),d.createElement("span",{"aria-hidden":"true"},t.props.weekLabel||"#"))),l.concat([0,1,2,3,4,5,6].map(function(c){var o=y2(a,c),I=t.formatWeekday(o,t.props.locale),f=t.props.weekDayClassName?t.props.weekDayClassName(o):void 0;return d.createElement("div",{key:c,role:"columnheader",className:p2("react-datepicker__day-name",f,i?"react-datepicker__day-name--disabled":"")},d.createElement("span",{className:"react-datepicker__sr-only"},A2(o,"EEEE",t.props.locale)),d.createElement("span",{"aria-hidden":"true"},I))}))},t.formatWeekday=function(A,i){return t.props.formatWeekDay?xr(A,t.props.formatWeekDay,i):t.props.useWeekdaysShort?jr(A,i):Vr(A,i)},t.decreaseYear=function(){t.setState(function(A){var i,a=A.date;return{date:t0(a,t.props.showYearPicker?(i=t.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.clearSelectingDate=function(){t.setState({selectingDate:void 0})},t.renderPreviousButton=function(){var A,i,a;if(!t.props.renderCustomHeader){var l=(A=t.props.monthsShown)!==null&&A!==void 0?A:n.defaultProps.monthsShown,c=t.props.showPreviousMonths?l-1:0,o=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:c,I=Y1(t.state.date,o),f;switch(!0){case t.props.disabled:f=!0;break;case t.props.showMonthYearPicker:f=m5(t.state.date,t.props);break;case t.props.showYearPicker:f=Xr(t.state.date,t.props);break;case t.props.showQuarterYearPicker:f=Wr(t.state.date,t.props);break;default:f=d5(I,t.props);break}if(!(!((a=t.props.forceShowMonthNavigation)!==null&&a!==void 0?a:n.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&f||t.props.showTimeSelectOnly)){var u=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--previous"],s=["react-datepicker__navigation","react-datepicker__navigation--previous"],m=t.decreaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(m=t.decreaseYear),f&&t.props.showDisabledMonthNavigation&&(s.push("react-datepicker__navigation--previous--disabled"),m=void 0);var h=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,v=t.props,z=v.previousMonthButtonLabel,Q=z===void 0?n.defaultProps.previousMonthButtonLabel:z,R=v.previousYearButtonLabel,k=R===void 0?n.defaultProps.previousYearButtonLabel:R,x=t.props,B=x.previousMonthAriaLabel,K=B===void 0?typeof Q=="string"?Q:"Previous Month":B,b=x.previousYearAriaLabel,U=b===void 0?typeof k=="string"?k:"Previous Year":b;return d.createElement("button",{type:"button",className:s.join(" "),onClick:m,onKeyDown:t.props.handleOnKeyDown,"aria-label":h?U:K},d.createElement("span",{className:u.join(" ")},h?k:Q))}}},t.increaseYear=function(){t.setState(function(A){var i,a=A.date;return{date:o1(a,t.props.showYearPicker?(i=t.props.yearItemNumber)!==null&&i!==void 0?i:n.defaultProps.yearItemNumber:1)}},function(){return t.handleYearChange(t.state.date)})},t.renderNextButton=function(){var A;if(!t.props.renderCustomHeader){var i;switch(!0){case t.props.disabled:i=!0;break;case t.props.showMonthYearPicker:i=p5(t.state.date,t.props);break;case t.props.showYearPicker:i=Gr(t.state.date,t.props);break;case t.props.showQuarterYearPicker:i=Tr(t.state.date,t.props);break;default:i=M5(t.state.date,t.props);break}if(!(!((A=t.props.forceShowMonthNavigation)!==null&&A!==void 0?A:n.defaultProps.forceShowMonthNavigation)&&!t.props.showDisabledMonthNavigation&&i||t.props.showTimeSelectOnly)){var a=["react-datepicker__navigation","react-datepicker__navigation--next"],l=["react-datepicker__navigation-icon","react-datepicker__navigation-icon--next"];t.props.showTimeSelect&&a.push("react-datepicker__navigation--next--with-time"),t.props.todayButton&&a.push("react-datepicker__navigation--next--with-today-button");var c=t.increaseMonth;(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker)&&(c=t.increaseYear),i&&t.props.showDisabledMonthNavigation&&(a.push("react-datepicker__navigation--next--disabled"),c=void 0);var o=t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker,I=t.props,f=I.nextMonthButtonLabel,u=f===void 0?n.defaultProps.nextMonthButtonLabel:f,s=I.nextYearButtonLabel,m=s===void 0?n.defaultProps.nextYearButtonLabel:s,h=t.props,v=h.nextMonthAriaLabel,z=v===void 0?typeof u=="string"?u:"Next Month":v,Q=h.nextYearAriaLabel,R=Q===void 0?typeof m=="string"?m:"Next Year":Q;return d.createElement("button",{type:"button",className:a.join(" "),onClick:c,onKeyDown:t.props.handleOnKeyDown,"aria-label":o?R:z},d.createElement("span",{className:l.join(" ")},o?m:u))}}},t.renderCurrentMonth=function(A){A===void 0&&(A=t.state.date);var i=["react-datepicker__current-month"];return t.props.showYearDropdown&&i.push("react-datepicker__current-month--hasYearDropdown"),t.props.showMonthDropdown&&i.push("react-datepicker__current-month--hasMonthDropdown"),t.props.showMonthYearDropdown&&i.push("react-datepicker__current-month--hasMonthYearDropdown"),d.createElement("h2",{className:i.join(" ")},q2(A)?A2(A,t.props.dateFormat,t.props.locale):"")},t.renderYearDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showYearDropdown||A))return d.createElement(oA,F({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeYear,year:H(t.state.date)}))},t.renderMonthDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showMonthDropdown||A))return d.createElement(tA,F({},n.defaultProps,t.props,{month:R2(t.state.date),onChange:t.changeMonth}))},t.renderMonthYearDropdown=function(A){if(A===void 0&&(A=!1),!(!t.props.showMonthYearDropdown||A))return d.createElement(AA,F({},n.defaultProps,t.props,{date:t.state.date,onChange:t.changeMonthYear}))},t.handleTodayButtonClick=function(A){t.props.onSelect(c5(),A),t.props.setPreSelection&&t.props.setPreSelection(c5())},t.renderTodayButton=function(){if(!(!t.props.todayButton||t.props.showTimeSelectOnly))return d.createElement("div",{className:"react-datepicker__today-button",onClick:t.handleTodayButtonClick},t.props.todayButton)},t.renderDayNamesHeader=function(A){return d.createElement("div",{className:"react-datepicker__day-names",role:"row"},t.header(A))},t.renderDefaultHeader=function(A){var i=A.monthDate,a=A.i;return d.createElement("div",{className:"react-datepicker__header ".concat(t.props.showTimeSelect?"react-datepicker__header--has-time-select":"")},t.renderCurrentMonth(i),d.createElement("div",{className:"react-datepicker__header__dropdown react-datepicker__header__dropdown--".concat(t.props.dropdownMode),onFocus:t.handleDropdownFocus},t.renderMonthDropdown(a!==0),t.renderMonthYearDropdown(a!==0),t.renderYearDropdown(a!==0)))},t.renderCustomHeader=function(A){var i,a,l=A.monthDate,c=A.i;if(t.props.showTimeSelect&&!t.state.monthContainer||t.props.showTimeSelectOnly)return null;var o=t.props,I=o.showYearPicker,f=o.yearItemNumber,u;if(I){var s=f1(l,f),m=s.startPeriod,h=s.endPeriod;u={startYear:m,endYear:h}}var v=d5(t.state.date,t.props),z=M5(t.state.date,t.props),Q=m5(t.state.date,t.props),R=p5(t.state.date,t.props);return d.createElement("div",{className:"react-datepicker__header react-datepicker__header--custom",onFocus:t.props.onDropdownFocus},(a=(i=t.props).renderCustomHeader)===null||a===void 0?void 0:a.call(i,F(F(F({},t.state),I&&{visibleYearsRange:u}),{customHeaderCount:c,monthDate:l,changeMonth:t.changeMonth,changeYear:t.changeYear,decreaseMonth:t.decreaseMonth,increaseMonth:t.increaseMonth,decreaseYear:t.decreaseYear,increaseYear:t.increaseYear,prevMonthButtonDisabled:v,nextMonthButtonDisabled:z,prevYearButtonDisabled:Q,nextYearButtonDisabled:R})))},t.renderYearHeader=function(A){var i=A.monthDate,a=t.props,l=a.showYearPicker,c=a.yearItemNumber,o=c===void 0?n.defaultProps.yearItemNumber:c,I=f1(i,o),f=I.startPeriod,u=I.endPeriod;return d.createElement("div",{className:"react-datepicker__header react-datepicker-year-header"},l?"".concat(f," - ").concat(u):H(i))},t.renderHeader=function(A){var i=A.monthDate,a=A.i,l=a===void 0?0:a,c={monthDate:i,i:l};switch(!0){case t.props.renderCustomHeader!==void 0:return t.renderCustomHeader(c);case(t.props.showMonthYearPicker||t.props.showQuarterYearPicker||t.props.showYearPicker):return t.renderYearHeader(c);default:return t.renderDefaultHeader(c)}},t.renderMonths=function(){var A,i;if(!(t.props.showTimeSelectOnly||t.props.showYearPicker)){for(var a=[],l=(A=t.props.monthsShown)!==null&&A!==void 0?A:n.defaultProps.monthsShown,c=t.props.showPreviousMonths?l-1:0,o=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?o1(t.state.date,c):Y1(t.state.date,c),I=(i=t.props.monthSelectedIn)!==null&&i!==void 0?i:c,f=0;f<l;++f){var u=f-I+c,s=t.props.showMonthYearPicker||t.props.showQuarterYearPicker?o1(o,u):O2(o,u),m="month-".concat(f),h=f<l-1,v=f>0;a.push(d.createElement("div",{key:m,ref:function(z){t.monthContainer=z??void 0},className:"react-datepicker__month-container"},t.renderHeader({monthDate:s,i:f}),d.createElement($r,F({},n.defaultProps,t.props,{containerRef:t.containerRef,ariaLabelPrefix:t.props.monthAriaLabelPrefix,day:s,onDayClick:t.handleDayClick,handleOnKeyDown:t.props.handleOnDayKeyDown,handleOnMonthKeyDown:t.props.handleOnKeyDown,onDayMouseEnter:t.handleDayMouseEnter,onMouseLeave:t.handleMonthMouseLeave,orderInDisplay:f,selectingDate:t.state.selectingDate,monthShowsDuplicateDaysEnd:h,monthShowsDuplicateDaysStart:v,dayNamesHeader:t.renderDayNamesHeader(s)}))))}return a}},t.renderYears=function(){if(!t.props.showTimeSelectOnly&&t.props.showYearPicker)return d.createElement("div",{className:"react-datepicker__year--container"},t.renderHeader({monthDate:t.state.date}),d.createElement(aA,F({},n.defaultProps,t.props,{selectingDate:t.state.selectingDate,date:t.state.date,onDayClick:t.handleDayClick,clearSelectingDate:t.clearSelectingDate,onYearMouseEnter:t.handleYearMouseEnter,onYearMouseLeave:t.handleYearMouseLeave})))},t.renderTimeSection=function(){if(t.props.showTimeSelect&&(t.state.monthContainer||t.props.showTimeSelectOnly))return d.createElement(iA,F({},n.defaultProps,t.props,{onChange:t.props.onTimeChange,format:t.props.timeFormat,intervals:t.props.timeIntervals,monthRef:t.state.monthContainer}))},t.renderInputTimeSection=function(){var A=t.props.selected?new Date(t.props.selected):void 0,i=A&&q2(A)&&!!t.props.selected,a=i?"".concat(g5(A.getHours()),":").concat(g5(A.getMinutes())):"";if(t.props.showTimeInput)return d.createElement(Dr,F({},n.defaultProps,t.props,{date:A,timeString:a,onChange:t.props.onTimeChange}))},t.renderAriaLiveRegion=function(){var A;if(!q2(t.state.date))return d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"});var i=f1(t.state.date,(A=t.props.yearItemNumber)!==null&&A!==void 0?A:n.defaultProps.yearItemNumber),a=i.startPeriod,l=i.endPeriod,c;return t.props.showYearPicker?c="".concat(a," - ").concat(l):t.props.showMonthYearPicker||t.props.showQuarterYearPicker?c=H(t.state.date):c="".concat(s7(R2(t.state.date),t.props.locale)," ").concat(H(t.state.date)),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},t.state.isRenderAriaLiveMessage&&c)},t.renderChildren=function(){if(t.props.children)return d.createElement("div",{className:"react-datepicker__children-container"},t.props.children)},t.containerRef=d.createRef(),t.state={date:t.getDateInView(),selectingDate:void 0,monthContainer:void 0,isRenderAriaLiveMessage:!1},t}return Object.defineProperty(n,"defaultProps",{get:function(){return{monthsShown:1,forceShowMonthNavigation:!1,outsideClickIgnoreClass:U5,timeCaption:"Time",previousYearButtonLabel:"Previous Year",nextYearButtonLabel:"Next Year",previousMonthButtonLabel:"Previous Month",nextMonthButtonLabel:"Next Month",yearItemNumber:Z0}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){var e=this;this.props.showTimeSelect&&(this.assignMonthContainer=function(){e.setState({monthContainer:e.monthContainer})}())},n.prototype.componentDidUpdate=function(e){var t=this;if(this.props.preSelection&&q2(this.props.preSelection)&&(!D(this.props.preSelection,e.preSelection)||this.props.monthSelectedIn!==e.monthSelectedIn)){var A=!Q2(this.state.date,this.props.preSelection);this.setState({date:this.props.preSelection},function(){return A&&t.handleCustomMonthChange(t.state.date)})}else this.props.openToDate&&!D(this.props.openToDate,e.openToDate)&&this.setState({date:this.props.openToDate})},n.prototype.render=function(){var e=this.props.container||br;return d.createElement(I3,{onClickOutside:this.handleClickOutside,style:{display:"contents"},ignoreClass:this.props.outsideClickIgnoreClass},d.createElement("div",{style:{display:"contents"},ref:this.containerRef},d.createElement(e,{className:p2("react-datepicker",this.props.className,{"react-datepicker--time-only":this.props.showTimeSelectOnly}),showTime:this.props.showTimeSelect||this.props.showTimeInput,showTimeSelectOnly:this.props.showTimeSelectOnly,inline:this.props.inline},this.renderAriaLiveRegion(),this.renderPreviousButton(),this.renderNextButton(),this.renderMonths(),this.renderYears(),this.renderTodayButton(),this.renderTimeSection(),this.renderInputTimeSection(),this.renderChildren())))},n}(d.Component),CA=function(r){var n=r.icon,e=r.className,t=e===void 0?"":e,A=r.onClick,i="react-datepicker__calendar-icon";if(typeof n=="string")return d.createElement("i",{className:"".concat(i," ").concat(n," ").concat(t),"aria-hidden":"true",onClick:A});if(d.isValidElement(n)){var a=n;return d.cloneElement(a,{className:"".concat(a.props.className||""," ").concat(i," ").concat(t),onClick:function(l){typeof a.props.onClick=="function"&&a.props.onClick(l),typeof A=="function"&&A(l)}})}return d.createElement("svg",{className:"".concat(i," ").concat(t),xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",onClick:A},d.createElement("path",{d:"M96 32V64H48C21.5 64 0 85.5 0 112v48H448V112c0-26.5-21.5-48-48-48H352V32c0-17.7-14.3-32-32-32s-32 14.3-32 32V64H160V32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192H0V464c0 26.5 21.5 48 48 48H400c26.5 0 48-21.5 48-48V192z"}))},Y5=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.portalRoot=null,t.el=document.createElement("div"),t}return n.prototype.componentDidMount=function(){this.portalRoot=(this.props.portalHost||document).getElementById(this.props.portalId),this.portalRoot||(this.portalRoot=document.createElement("div"),this.portalRoot.setAttribute("id",this.props.portalId),(this.props.portalHost||document.body).appendChild(this.portalRoot)),this.portalRoot.appendChild(this.el)},n.prototype.componentWillUnmount=function(){this.portalRoot&&this.portalRoot.removeChild(this.el)},n.prototype.render=function(){return D7.createPortal(this.props.children,this.el)},n}(d.Component),uA="[tabindex], a, button, input, select, textarea",sA=function(r){return(r instanceof HTMLAnchorElement||!r.disabled)&&r.tabIndex!==-1},k5=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.getTabChildren=function(){var A;return Array.prototype.slice.call((A=t.tabLoopRef.current)===null||A===void 0?void 0:A.querySelectorAll(uA),1,-1).filter(sA)},t.handleFocusStart=function(){var A=t.getTabChildren();A&&A.length>1&&A[A.length-1].focus()},t.handleFocusEnd=function(){var A=t.getTabChildren();A&&A.length>1&&A[0].focus()},t.tabLoopRef=d.createRef(),t}return n.prototype.render=function(){var e;return((e=this.props.enableTabLoop)!==null&&e!==void 0?e:n.defaultProps.enableTabLoop)?d.createElement("div",{className:"react-datepicker__tab-loop",ref:this.tabLoopRef},d.createElement("div",{className:"react-datepicker__tab-loop__start",tabIndex:0,onFocus:this.handleFocusStart}),this.props.children,d.createElement("div",{className:"react-datepicker__tab-loop__end",tabIndex:0,onFocus:this.handleFocusEnd})):this.props.children},n.defaultProps={enableTabLoop:!0},n}(d.Component);function dA(r){function n(e){var t,A=typeof e.hidePopper=="boolean"?e.hidePopper:!0,i=d.useRef(null),a=Rr(F({open:!A,whileElementsMounted:rr,placement:e.popperPlacement,middleware:t1([fr({padding:15}),Er(10),Cr({element:i})],(t=e.popperModifiers)!==null&&t!==void 0?t:[],!0)},e.popperProps)),l=F(F({},e),{hidePopper:A,popperProps:F(F({},a),{arrowRef:i})});return d.createElement(r,F({},l))}return n.displayName="withFloating(".concat(r.displayName||r.name||"Component",")"),n}var MA=function(r){var n=r.className,e=r.wrapperClassName,t=r.hidePopper,A=t===void 0?!0:t,i=r.popperComponent,a=r.targetComponent,l=r.enableTabLoop,c=r.popperOnKeyDown,o=r.portalId,I=r.portalHost,f=r.popperProps,u=r.showArrow,s=void 0;if(!A){var m=p2("react-datepicker-popper",n);s=d.createElement(k5,{enableTabLoop:l},d.createElement("div",{ref:f.refs.setFloating,style:f.floatingStyles,className:m,"data-placement":f.placement,onKeyDown:c},i,u&&d.createElement(pr,{ref:f.arrowRef,context:f.context,fill:"currentColor",strokeWidth:1,height:8,width:16,style:{transform:"translateY(-1px)"},className:"react-datepicker__triangle"})))}r.popperContainer&&(s=d.createElement(r.popperContainer,{},s)),o&&!A&&(s=d.createElement(Y5,{portalId:o,portalHost:I},s));var h=p2("react-datepicker-wrapper",e);return d.createElement(d.Fragment,null,d.createElement("div",{ref:f.refs.setReference,className:h},a),s)},mA=dA(MA);function pA(r,n){return r&&n?R2(r)!==R2(n)||H(r)!==H(n):r!==n}var p7="Date input not valid.",K5=function(r){v2(n,r);function n(e){var t=r.call(this,e)||this;return t.calendar=null,t.input=null,t.getPreSelection=function(){return t.props.openToDate?t.props.openToDate:t.props.selectsEnd&&t.props.startDate?t.props.startDate:t.props.selectsStart&&t.props.endDate?t.props.endDate:N()},t.modifyHolidays=function(){var A;return(A=t.props.holidays)===null||A===void 0?void 0:A.reduce(function(i,a){var l=new Date(a.date);return q2(l)?t1(t1([],i,!0),[F(F({},a),{date:l})],!1):i},[])},t.calcInitialState=function(){var A,i=t.getPreSelection(),a=v5(t.props),l=h5(t.props),c=a&&D2(i,R0(a))?a:l&&m1(i,o5(l))?l:i;return{open:t.props.startOpen||!1,preventFocus:!1,inputValue:null,preSelection:(A=t.props.selectsRange?t.props.startDate:t.props.selected)!==null&&A!==void 0?A:c,highlightDates:z5(t.props.highlightDates),focused:!1,shouldFocusDayInline:!1,isRenderAriaLiveMessage:!1,wasHidden:!1}},t.getInputValue=function(){var A,i=t.props,a=i.locale,l=i.startDate,c=i.endDate,o=i.rangeSeparator,I=i.selected,f=i.selectedDates,u=i.selectsMultiple,s=i.selectsRange,m=i.value,h=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,v=t.state.inputValue;return typeof m=="string"?m:typeof v=="string"?v:s?Br(l,c,{dateFormat:h,locale:a,rangeSeparator:o}):u?Ur(f??[],{dateFormat:h,locale:a}):x2(I,{dateFormat:h,locale:a})},t.resetHiddenStatus=function(){t.setState(F(F({},t.state),{wasHidden:!1}))},t.setHiddenStatus=function(){t.setState(F(F({},t.state),{wasHidden:!0}))},t.setHiddenStateOnVisibilityHidden=function(){document.visibilityState==="hidden"&&t.setHiddenStatus()},t.clearPreventFocusTimeout=function(){t.preventFocusTimeout&&clearTimeout(t.preventFocusTimeout)},t.setFocus=function(){var A,i;(i=(A=t.input)===null||A===void 0?void 0:A.focus)===null||i===void 0||i.call(A,{preventScroll:!0})},t.setBlur=function(){var A,i;(i=(A=t.input)===null||A===void 0?void 0:A.blur)===null||i===void 0||i.call(A),t.cancelFocusInput()},t.deferBlur=function(){requestAnimationFrame(function(){t.setBlur()})},t.setOpen=function(A,i){i===void 0&&(i=!1),t.setState({open:A,preSelection:A&&t.state.open?t.state.preSelection:t.calcInitialState().preSelection,lastPreSelectChange:v7},function(){A||t.setState(function(a){return{focused:i?a.focused:!1}},function(){!i&&t.deferBlur(),t.setState({inputValue:null})})})},t.inputOk=function(){return I1(t.state.preSelection)},t.isCalendarOpen=function(){return t.props.open===void 0?t.state.open&&!t.props.disabled&&!t.props.readOnly:t.props.open},t.handleFocus=function(A){var i,a,l=t.state.wasHidden,c=l?t.state.open:!0;l&&t.resetHiddenStatus(),t.state.preventFocus||((a=(i=t.props).onFocus)===null||a===void 0||a.call(i,A),c&&!t.props.preventOpenOnFocus&&!t.props.readOnly&&t.setOpen(!0)),t.setState({focused:!0})},t.sendFocusBackToInput=function(){t.preventFocusTimeout&&t.clearPreventFocusTimeout(),t.setState({preventFocus:!0},function(){t.preventFocusTimeout=setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})})},t.cancelFocusInput=function(){clearTimeout(t.inputFocusTimeout),t.inputFocusTimeout=void 0},t.deferFocusInput=function(){t.cancelFocusInput(),t.inputFocusTimeout=setTimeout(function(){return t.setFocus()},1)},t.handleDropdownFocus=function(){t.cancelFocusInput()},t.resetInputValue=function(){t.setState(F(F({},t.state),{inputValue:null}))},t.handleBlur=function(A){var i,a;(!t.state.open||t.props.withPortal||t.props.showTimeInput)&&((a=(i=t.props).onBlur)===null||a===void 0||a.call(i,A)),t.resetInputValue(),t.state.open&&t.props.open===!1&&t.setOpen(!1),t.setState({focused:!1})},t.handleCalendarClickOutside=function(A){var i,a;t.props.inline||t.setOpen(!1),(a=(i=t.props).onClickOutside)===null||a===void 0||a.call(i,A),t.props.withPortal&&A.preventDefault()},t.handleChange=function(){for(var A,i,a,l,c,o=[],I=0;I<arguments.length;I++)o[I]=arguments[I];var f=o[0];if(!(t.props.onChangeRaw&&(t.props.onChangeRaw.apply(t,o),!f||typeof f.isDefaultPrevented!="function"||f.isDefaultPrevented()))){t.setState({inputValue:(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:null,lastPreSelectChange:vA});var u=t.props,s=u.selectsRange,m=u.startDate,h=u.endDate,v=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,z=(i=t.props.strictParsing)!==null&&i!==void 0?i:n.defaultProps.strictParsing,Q=(f==null?void 0:f.target)instanceof HTMLInputElement?f.target.value:"";if(s){var R=t.props.rangeSeparator,k=R.trim(),x=Q.split(v.includes(k)?R:k,2).map(function(G){return G.trim()}),B=x[0],K=x[1],b=l0(B??"",v,t.props.locale,z),U=b?l0(K??"",v,t.props.locale,z):null,O=(m==null?void 0:m.getTime())!==(b==null?void 0:b.getTime()),P=(h==null?void 0:h.getTime())!==(U==null?void 0:U.getTime());if(!O&&!P||b&&j2(b,t.props)||U&&j2(U,t.props))return;(l=(a=t.props).onChange)===null||l===void 0||l.call(a,[b,U],f)}else{var V=l0(Q,v,t.props.locale,z,(c=t.props.selected)!==null&&c!==void 0?c:void 0);(V||!Q)&&t.setSelected(V,f,!0)}}},t.handleSelect=function(A,i,a){var l;if(!t.props.readOnly){var c=t.props,o=c.selectsRange,I=c.startDate,f=c.endDate,u=c.locale,s=c.swapRange,m=(l=t.props.dateFormat)!==null&&l!==void 0?l:n.defaultProps.dateFormat,h=!o||I&&!f&&(s||!M7(A,I));if(t.props.shouldCloseOnSelect&&!t.props.showTimeSelect&&h&&t.sendFocusBackToInput(),t.props.onChangeRaw){var v=x2(A,{dateFormat:m,locale:u});t.props.onChangeRaw(i,{date:A,formattedDate:v})}t.setSelected(A,i,!1,a),t.props.showDateSelect&&t.setState({isRenderAriaLiveMessage:!0}),!t.props.shouldCloseOnSelect||t.props.showTimeSelect?t.setPreSelection(A):h&&t.setOpen(!1)}},t.setSelected=function(A,i,a,l){var c,o,I=A;if(t.props.showYearPicker){if(I!==null&&d3(H(I),t.props))return}else if(t.props.showMonthYearPicker){if(I!==null&&f5(I,t.props))return}else if(I!==null&&j2(I,t.props))return;var f=t.props,u=f.onChange,s=f.selectsRange,m=f.startDate,h=f.endDate,v=f.selectsMultiple,z=f.selectedDates,Q=f.minTime,R=f.swapRange;if(!x1(t.props.selected,I)||t.props.allowSameDay||s||v)if(I!==null&&(t.props.selected&&(!a||!t.props.showTimeSelect&&!t.props.showTimeSelectOnly&&!t.props.showTimeInput)&&(I=E3(I,{hour:W2(t.props.selected),minute:T2(t.props.selected),second:M1(t.props.selected)})),!a&&(t.props.showTimeSelect||t.props.showTimeSelectOnly)&&Q&&(I=E3(I,{hour:Q.getHours(),minute:Q.getMinutes(),second:Q.getSeconds()})),t.props.inline||t.setState({preSelection:I}),t.props.focusSelectedMonth||t.setState({monthSelectedIn:l})),s){var k=!m&&!h,x=m&&!h,B=!m&&!!h,K=m&&h;k?u==null||u([I,null],i):x?I===null?u==null||u([null,null],i):M7(I,m)?R?u==null||u([I,m],i):u==null||u([I,null],i):u==null||u([m,I],i):B&&(I&&M7(I,h)?u==null||u([I,h],i):u==null||u([I,null],i)),K&&(u==null||u([I,null],i))}else if(v){if(I!==null)if(!(z!=null&&z.length))u==null||u([I],i);else{var b=z.some(function(O){return D(O,I)});if(b){var U=z.filter(function(O){return!D(O,I)});u==null||u(U,i)}else u==null||u(t1(t1([],z,!0),[I],!1),i)}}else u==null||u(I,i);a||((o=(c=t.props).onSelect)===null||o===void 0||o.call(c,I,i),t.setState({inputValue:null}))},t.setPreSelection=function(A){if(!t.props.readOnly){var i=I1(t.props.minDate),a=I1(t.props.maxDate),l=!0;if(A){var c=R0(A);if(i&&a)l=V1(A,t.props.minDate,t.props.maxDate);else if(i){var o=R0(t.props.minDate);l=m1(A,o)||x1(c,o)}else if(a){var I=o5(t.props.maxDate);l=D2(A,I)||x1(c,I)}}l&&t.setState({preSelection:A})}},t.toggleCalendar=function(){t.setOpen(!t.state.open)},t.handleTimeChange=function(A){var i,a;if(!(t.props.selectsRange||t.props.selectsMultiple)){var l=t.props.selected?t.props.selected:t.getPreSelection(),c=t.props.selected?A:E3(l,{hour:W2(A),minute:T2(A)});t.setState({preSelection:c}),(a=(i=t.props).onChange)===null||a===void 0||a.call(i,c),t.props.shouldCloseOnSelect&&!t.props.showTimeInput&&(t.sendFocusBackToInput(),t.setOpen(!1)),t.props.showTimeInput&&t.setOpen(!0),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),t.setState({inputValue:null})}},t.onInputClick=function(){var A,i;!t.props.disabled&&!t.props.readOnly&&t.setOpen(!0),(i=(A=t.props).onInputClick)===null||i===void 0||i.call(A)},t.handleTimeOnlyArrowKey=function(A){var i,a,l,c,o=t.props.selected||t.state.preSelection||N(),I=(i=t.props.timeIntervals)!==null&&i!==void 0?i:30,f=(a=t.props.dateFormat)!==null&&a!==void 0?a:n.defaultProps.dateFormat,u=Array.isArray(f)?f[0]:f,s=R0(o),m=W2(o)*60+T2(o),h=23*60+60-I,v;if(A===S.ArrowUp){var z=Math.max(0,m-I);v=m0(s,z)}else{var z=Math.min(h,m+I);v=m0(s,z)}var Q=A2(v,u||n.defaultProps.dateFormat,t.props.locale);if(t.setState({preSelection:v,inputValue:Q}),!(t.props.selectsRange||t.props.selectsMultiple)){var R=t.props.selected?t.props.selected:t.getPreSelection(),k=t.props.selected?v:E3(R,{hour:W2(v),minute:T2(v)});(c=(l=t.props).onChange)===null||c===void 0||c.call(l,k),(t.props.showTimeSelectOnly||t.props.showTimeSelect)&&t.setState({isRenderAriaLiveMessage:!0}),requestAnimationFrame(function(){t.scrollToTimeOption(v)})}},t.handleTimeOnlyEnterKey=function(A){var i,a,l,c,o=A.target,I=o.value,f=(i=t.props.dateFormat)!==null&&i!==void 0?i:n.defaultProps.dateFormat,u=t.props.timeFormat||"p",s=t.state.preSelection||t.props.selected||N(),m=l0(I,f,t.props.locale,(a=t.props.strictParsing)!==null&&a!==void 0?a:!1,s),h=s;if(m&&q2(m))h=m;else{var v=((l=t.calendar)===null||l===void 0?void 0:l.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(".react-datepicker__time-list-item[tabindex='0']");if(v instanceof HTMLElement){var z=(c=v.textContent)===null||c===void 0?void 0:c.trim();if(z){var Q=l0(z,u,t.props.locale,!1,s);Q&&q2(Q)&&(h=Q)}}}t.handleTimeChange(h),t.setOpen(!1),t.sendFocusBackToInput()},t.scrollToTimeOption=function(A){var i,a;if(!((i=t.calendar)===null||i===void 0)&&i.containerRef.current){for(var l=t.calendar.containerRef.current,c=Array.from(l.querySelectorAll(".react-datepicker__time-list-item")),o=null,I=1/0,f=t.props.timeFormat||"p",u=0,s=c;u<s.length;u++){var m=s[u],h=(a=m.textContent)===null||a===void 0?void 0:a.trim();if(h){var v=l0(h,f,t.props.locale,!1,A);if(v&&q2(v)){if(Z5(v,A)){o=m;break}var z=Math.abs(v.getTime()-A.getTime());z<I&&(I=z,o=m)}}}o&&(c.forEach(function(Q){Q.setAttribute("tabindex","-1")}),o.setAttribute("tabindex","0"),o.scrollIntoView({behavior:"smooth",block:"center"}))}},t.onInputKeyDown=function(A){var i,a,l,c,o,I;(a=(i=t.props).onKeyDown)===null||a===void 0||a.call(i,A);var f=A.key;if(!t.state.open&&!t.props.inline&&!t.props.preventOpenOnFocus){(f===S.ArrowDown||f===S.ArrowUp||f===S.Enter)&&((l=t.onInputClick)===null||l===void 0||l.call(t));return}if(t.state.open&&t.props.showTimeSelectOnly){if(f===S.ArrowDown||f===S.ArrowUp){A.preventDefault(),t.handleTimeOnlyArrowKey(f);return}if(f===S.Enter){A.preventDefault(),t.handleTimeOnlyEnterKey(A);return}}if(t.state.open){if(f===S.ArrowDown||f===S.ArrowUp){A.preventDefault();var u=t.props.showTimeSelectOnly?".react-datepicker__time-list-item[tabindex='0']":t.props.showWeekPicker&&t.props.showWeekNumbers?'.react-datepicker__week-number[tabindex="0"]':t.props.showFullMonthYearPicker||t.props.showMonthYearPicker?'.react-datepicker__month-text[tabindex="0"]':'.react-datepicker__day[tabindex="0"]',s=((c=t.calendar)===null||c===void 0?void 0:c.containerRef.current)instanceof Element&&t.calendar.containerRef.current.querySelector(u);s instanceof HTMLElement&&s.focus({preventScroll:!0});return}var m=N(t.state.preSelection);f===S.Enter?(A.preventDefault(),A.target.blur(),t.inputOk()&&t.state.lastPreSelectChange===v7?(t.handleSelect(m,A),!t.props.shouldCloseOnSelect&&t.setPreSelection(m)):t.setOpen(!1)):f===S.Escape?(A.preventDefault(),A.target.blur(),t.sendFocusBackToInput(),t.setOpen(!1)):f===S.Tab&&t.setOpen(!1),t.inputOk()||(I=(o=t.props).onInputError)===null||I===void 0||I.call(o,{code:1,msg:p7})}},t.onPortalKeyDown=function(A){var i=A.key;i===S.Escape&&(A.preventDefault(),t.setState({preventFocus:!0},function(){t.setOpen(!1),setTimeout(function(){t.setFocus(),t.setState({preventFocus:!1})})}))},t.onDayKeyDown=function(A){var i,a,l,c,o,I,f=t.props,u=f.minDate,s=f.maxDate,m=f.disabledKeyboardNavigation,h=f.showWeekPicker,v=f.shouldCloseOnSelect,z=f.locale,Q=f.calendarStartDay,R=f.adjustDateOnChange,k=f.inline;if((a=(i=t.props).onKeyDown)===null||a===void 0||a.call(i,A),!m){var x=A.key,B=A.shiftKey,K=N(t.state.preSelection),b=function(P,V){var G=V;switch(P){case S.ArrowRight:G=h?T0(V,1):y2(V,1);break;case S.ArrowLeft:G=h?j4(V):J8(V);break;case S.ArrowUp:G=j4(V);break;case S.ArrowDown:G=T0(V,1);break;case S.PageUp:G=B?t0(V,1):Y1(V,1);break;case S.PageDown:G=B?o1(V,1):O2(V,1);break;case S.Home:G=v1(V,z,Q);break;case S.End:G=Kr(V);break}return G},U=function(P,V){for(var G=40,W=P,L=!1,w=0,Z=b(P,V);!L;){if(w>=G){Z=V;break}u&&Z<u&&(W=S.ArrowRight,Z=j2(u,t.props)?b(W,Z):u),s&&Z>s&&(W=S.ArrowLeft,Z=j2(s,t.props)?b(W,Z):s),j2(Z,t.props)?((W===S.PageUp||W===S.Home)&&(W=S.ArrowRight),(W===S.PageDown||W===S.End)&&(W=S.ArrowLeft),Z=b(W,Z)):L=!0,w++}return Z};if(x===S.Enter){A.preventDefault(),t.handleSelect(K,A),!v&&t.setPreSelection(K);return}else if(x===S.Escape){A.preventDefault(),t.setOpen(!1),t.inputOk()||(c=(l=t.props).onInputError)===null||c===void 0||c.call(l,{code:1,msg:p7});return}var O=null;switch(x){case S.ArrowLeft:case S.ArrowRight:case S.ArrowUp:case S.ArrowDown:case S.PageUp:case S.PageDown:case S.Home:case S.End:O=U(x,K);break}if(!O){(I=(o=t.props).onInputError)===null||I===void 0||I.call(o,{code:1,msg:p7});return}A.preventDefault(),t.setState({lastPreSelectChange:v7}),R&&t.setSelected(O),t.setPreSelection(O),k&&t.setState({shouldFocusDayInline:!0})}},t.onPopperKeyDown=function(A){var i=A.key;i===S.Escape&&(A.preventDefault(),t.sendFocusBackToInput(),t.setOpen(!1))},t.onClearClick=function(A){A&&A.preventDefault&&A.preventDefault(),t.sendFocusBackToInput();var i=t.props,a=i.selectsRange,l=i.onChange;a?l==null||l([null,null],A):l==null||l(null,A),t.setState({inputValue:null})},t.clear=function(){t.onClearClick()},t.onScroll=function(A){typeof t.props.closeOnScroll=="boolean"&&t.props.closeOnScroll?(A.target===document||A.target===document.documentElement||A.target===document.body)&&t.setOpen(!1):typeof t.props.closeOnScroll=="function"&&t.props.closeOnScroll(A)&&t.setOpen(!1)},t.renderCalendar=function(){var A,i;return!t.props.inline&&!t.isCalendarOpen()?null:d.createElement(fA,F({showMonthYearDropdown:void 0,ref:function(a){t.calendar=a}},t.props,t.state,{setOpen:t.setOpen,dateFormat:(A=t.props.dateFormatCalendar)!==null&&A!==void 0?A:n.defaultProps.dateFormatCalendar,onSelect:t.handleSelect,onClickOutside:t.handleCalendarClickOutside,holidays:Jr(t.modifyHolidays()),outsideClickIgnoreClass:t.props.outsideClickIgnoreClass,onDropdownFocus:t.handleDropdownFocus,onTimeChange:t.handleTimeChange,className:t.props.calendarClassName,container:t.props.calendarContainer,handleOnKeyDown:t.props.onKeyDown,handleOnDayKeyDown:t.onDayKeyDown,setPreSelection:t.setPreSelection,dropdownMode:(i=t.props.dropdownMode)!==null&&i!==void 0?i:n.defaultProps.dropdownMode}),t.props.children)},t.renderAriaLiveRegion=function(){var A,i=t.props.locale,a=(A=t.props.dateFormat)!==null&&A!==void 0?A:n.defaultProps.dateFormat,l=t.props.showTimeInput||t.props.showTimeSelect,c=l?"PPPPp":"PPPP",o;return t.props.selectsRange?o="Selected start date: ".concat(x2(t.props.startDate,{dateFormat:c,locale:i}),". ").concat(t.props.endDate?"End date: "+x2(t.props.endDate,{dateFormat:c,locale:i}):""):t.props.showTimeSelectOnly?o="Selected time: ".concat(x2(t.props.selected,{dateFormat:a,locale:i})):t.props.showYearPicker?o="Selected year: ".concat(x2(t.props.selected,{dateFormat:"yyyy",locale:i})):t.props.showMonthYearPicker?o="Selected month: ".concat(x2(t.props.selected,{dateFormat:"MMMM yyyy",locale:i})):t.props.showQuarterYearPicker?o="Selected quarter: ".concat(x2(t.props.selected,{dateFormat:"yyyy, QQQ",locale:i})):o="Selected date: ".concat(x2(t.props.selected,{dateFormat:c,locale:i})),d.createElement("span",{role:"alert","aria-live":"polite",className:"react-datepicker__aria-live"},o)},t.renderDateInput=function(){var A,i,a,l,c,o,I=p2(t.props.className,(A={},A[t.props.outsideClickIgnoreClass||n.defaultProps.outsideClickIgnoreClass]=t.state.open,A)),f=t.props.customInput||d.createElement("input",{type:"text"}),u=t.props.customInputRef||"ref",s={},m=(a=t.props["aria-describedby"])!==null&&a!==void 0?a:t.props.ariaDescribedBy,h=(l=t.props["aria-invalid"])!==null&&l!==void 0?l:t.props.ariaInvalid,v=(c=t.props["aria-labelledby"])!==null&&c!==void 0?c:t.props.ariaLabelledBy,z=(o=t.props["aria-required"])!==null&&o!==void 0?o:t.props.ariaRequired;return m!=null&&(s["aria-describedby"]=m),h!=null&&(s["aria-invalid"]=h),v!=null&&(s["aria-labelledby"]=v),z!=null&&(s["aria-required"]=z),d.cloneElement(f,F((i={},i[u]=function(Q){t.input=Q},i.value=t.getInputValue(),i.onBlur=t.handleBlur,i.onChange=t.handleChange,i.onClick=t.onInputClick,i.onFocus=t.handleFocus,i.onKeyDown=t.onInputKeyDown,i.id=t.props.id,i.name=t.props.name,i.form=t.props.form,i.autoFocus=t.props.autoFocus,i.placeholder=t.props.placeholderText,i.disabled=t.props.disabled,i.autoComplete=t.props.autoComplete,i.className=p2(f.props.className,I),i.title=t.props.title,i.readOnly=t.props.readOnly,i.required=t.props.required,i.tabIndex=t.props.tabIndex,i),s))},t.renderClearButton=function(){var A=t.props,i=A.isClearable,a=A.disabled,l=A.selected,c=A.startDate,o=A.endDate,I=A.clearButtonTitle,f=A.clearButtonClassName,u=f===void 0?"":f,s=A.ariaLabelClose,m=s===void 0?"Close":s,h=A.selectedDates,v=A.readOnly;return i&&!v&&(l!=null||c!=null||o!=null||h!=null&&h.length)?d.createElement("button",{type:"button",className:p2("react-datepicker__close-icon",u,{"react-datepicker__close-icon--disabled":a}),disabled:a,"aria-label":m,onClick:t.onClearClick,title:I,tabIndex:-1}):null},t.state=t.calcInitialState(),t.preventFocusTimeout=void 0,t}return Object.defineProperty(n,"defaultProps",{get:function(){return{allowSameDay:!1,dateFormat:"MM/dd/yyyy",dateFormatCalendar:"LLLL yyyy",disabled:!1,disabledKeyboardNavigation:!1,dropdownMode:"scroll",preventOpenOnFocus:!1,monthsShown:1,outsideClickIgnoreClass:U5,readOnly:!1,rangeSeparator:a5,withPortal:!1,selectsDisabledDaysInRange:!1,shouldCloseOnSelect:!0,showTimeSelect:!1,showTimeInput:!1,showPreviousMonths:!1,showMonthYearPicker:!1,showFullMonthYearPicker:!1,showTwoColumnMonthYearPicker:!1,showFourColumnMonthYearPicker:!1,showYearPicker:!1,showQuarterYearPicker:!1,showWeekPicker:!1,strictParsing:!1,swapRange:!1,timeIntervals:30,timeCaption:"Time",previousMonthAriaLabel:"Previous Month",previousMonthButtonLabel:"Previous Month",nextMonthAriaLabel:"Next Month",nextMonthButtonLabel:"Next Month",previousYearAriaLabel:"Previous Year",previousYearButtonLabel:"Previous Year",nextYearAriaLabel:"Next Year",nextYearButtonLabel:"Next Year",timeInputLabel:"Time",enableTabLoop:!0,yearItemNumber:Z0,focusSelectedMonth:!1,showPopperArrow:!0,excludeScrollbar:!0,customTimeInput:null,calendarStartDay:void 0,toggleCalendarOnIconClick:!1,usePointerEvent:!1}},enumerable:!1,configurable:!0}),n.prototype.componentDidMount=function(){window.addEventListener("scroll",this.onScroll,!0),document.addEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.componentDidUpdate=function(e,t){var A,i,a,l;e.inline&&pA(e.selected,this.props.selected)&&this.setPreSelection(this.props.selected),this.state.monthSelectedIn!==void 0&&e.monthsShown!==this.props.monthsShown&&this.setState({monthSelectedIn:0}),this.props.selectsRange&&this.state.monthSelectedIn!==0&&this.setState({monthSelectedIn:0}),e.highlightDates!==this.props.highlightDates&&this.setState({highlightDates:z5(this.props.highlightDates)}),!t.focused&&!x1(e.selected,this.props.selected)&&this.setState({inputValue:null}),t.open!==this.state.open&&(t.open===!1&&this.state.open===!0&&((i=(A=this.props).onCalendarOpen)===null||i===void 0||i.call(A)),t.open===!0&&this.state.open===!1&&((l=(a=this.props).onCalendarClose)===null||l===void 0||l.call(a)))},n.prototype.componentWillUnmount=function(){this.clearPreventFocusTimeout(),window.removeEventListener("scroll",this.onScroll,!0),document.removeEventListener("visibilitychange",this.setHiddenStateOnVisibilityHidden)},n.prototype.renderInputContainer=function(){var e=this.props,t=e.showIcon,A=e.icon,i=e.calendarIconClassname,a=e.calendarIconClassName,l=e.toggleCalendarOnIconClick,c=this.state.open;return i&&console.warn("calendarIconClassname props is deprecated. should use calendarIconClassName props."),d.createElement("div",{className:"react-datepicker__input-container".concat(t?" react-datepicker__view-calendar-icon":"")},t&&d.createElement(CA,F({icon:A,className:p2(a,!a&&i,c&&"react-datepicker-ignore-onclickoutside")},l?{onClick:this.toggleCalendar}:null)),this.state.isRenderAriaLiveMessage&&this.renderAriaLiveRegion(),this.renderDateInput(),this.renderClearButton())},n.prototype.render=function(){var e=this.renderCalendar();if(this.props.inline)return e;if(this.props.withPortal){var t=this.state.open?d.createElement(k5,{enableTabLoop:this.props.enableTabLoop},d.createElement("div",{className:"react-datepicker__portal",tabIndex:-1,onKeyDown:this.onPortalKeyDown},e)):null;return this.state.open&&this.props.portalId&&(t=d.createElement(Y5,F({portalId:this.props.portalId},this.props),t)),d.createElement("div",null,this.renderInputContainer(),t)}return d.createElement(mA,F({},this.props,{className:this.props.popperClassName,hidePopper:!this.isCalendarOpen(),targetComponent:this.renderInputContainer(),popperComponent:e,popperOnKeyDown:this.onPopperKeyDown,showArrow:this.props.showPopperArrow}))},n}(d.Component),vA="input",v7="navigate";const q5={inputWrapper:"_inputWrapper_1pw38_1",inputIcon:"_inputIcon_1pw38_7"},hA={lessThanXSeconds:{one:"mindre enn ett sekund",other:"mindre enn {{count}} sekunder"},xSeconds:{one:"ett sekund",other:"{{count}} sekunder"},halfAMinute:"et halvt minutt",lessThanXMinutes:{one:"mindre enn ett minutt",other:"mindre enn {{count}} minutter"},xMinutes:{one:"ett minutt",other:"{{count}} minutter"},aboutXHours:{one:"omtrent en time",other:"omtrent {{count}} timer"},xHours:{one:"en time",other:"{{count}} timer"},xDays:{one:"en dag",other:"{{count}} dager"},aboutXWeeks:{one:"omtrent en uke",other:"omtrent {{count}} uker"},xWeeks:{one:"en uke",other:"{{count}} uker"},aboutXMonths:{one:"omtrent en måned",other:"omtrent {{count}} måneder"},xMonths:{one:"en måned",other:"{{count}} måneder"},aboutXYears:{one:"omtrent ett år",other:"omtrent {{count}} år"},xYears:{one:"ett år",other:"{{count}} år"},overXYears:{one:"over ett år",other:"over {{count}} år"},almostXYears:{one:"nesten ett år",other:"nesten {{count}} år"}},zA=(r,n,e)=>{let t;const A=hA[r];return typeof A=="string"?t=A:n===1?t=A.one:t=A.other.replace("{{count}}",String(n)),e!=null&&e.addSuffix?e.comparison&&e.comparison>0?"om "+t:t+" siden":t},gA={full:"EEEE d. MMMM y",long:"d. MMMM y",medium:"d. MMM y",short:"dd.MM.y"},QA={full:"'kl'. HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},ZA={full:"{{date}} 'kl.' {{time}}",long:"{{date}} 'kl.' {{time}}",medium:"{{date}} {{time}}",short:"{{date}} {{time}}"},RA={date:_1({formats:gA,defaultWidth:"full"}),time:_1({formats:QA,defaultWidth:"full"}),dateTime:_1({formats:ZA,defaultWidth:"full"})},bA={lastWeek:"'forrige' eeee 'kl.' p",yesterday:"'i går kl.' p",today:"'i dag kl.' p",tomorrow:"'i morgen kl.' p",nextWeek:"EEEE 'kl.' p",other:"P"},SA=(r,n,e,t)=>bA[r],BA={narrow:["f.Kr.","e.Kr."],abbreviated:["f.Kr.","e.Kr."],wide:["før Kristus","etter Kristus"]},UA={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1. kvartal","2. kvartal","3. kvartal","4. kvartal"]},YA={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["jan.","feb.","mars","apr.","mai","juni","juli","aug.","sep.","okt.","nov.","des."],wide:["januar","februar","mars","april","mai","juni","juli","august","september","oktober","november","desember"]},kA={narrow:["S","M","T","O","T","F","L"],short:["sø","ma","ti","on","to","fr","lø"],abbreviated:["søn","man","tir","ons","tor","fre","lør"],wide:["søndag","mandag","tirsdag","onsdag","torsdag","fredag","lørdag"]},KA={narrow:{am:"a",pm:"p",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},abbreviated:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morg.",afternoon:"på etterm.",evening:"på kvelden",night:"på natten"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnatt",noon:"middag",morning:"på morgenen",afternoon:"på ettermiddagen",evening:"på kvelden",night:"på natten"}},qA={ordinalNumber:(r,n)=>Number(r)+".",era:H2({values:BA,defaultWidth:"wide"}),quarter:H2({values:UA,defaultWidth:"wide",argumentCallback:r=>r-1}),month:H2({values:YA,defaultWidth:"wide"}),day:H2({values:kA,defaultWidth:"wide"}),dayPeriod:H2({values:KA,defaultWidth:"wide"})},xA=/^(\d+)\.?/i,VA=/\d+/i,jA={narrow:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,abbreviated:/^(f\.? ?Kr\.?|fvt\.?|e\.? ?Kr\.?|evt\.?)/i,wide:/^(før Kristus|før vår tid|etter Kristus|vår tid)/i},yA={any:[/^f/i,/^e/i]},OA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](\.)? kvartal/i},WA={any:[/1/i,/2/i,/3/i,/4/i]},TA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mars?|apr|mai|juni?|juli?|aug|sep|okt|nov|des)\.?/i,wide:/^(januar|februar|mars|april|mai|juni|juli|august|september|oktober|november|desember)/i},XA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^mai/i,/^jun/i,/^jul/i,/^aug/i,/^s/i,/^o/i,/^n/i,/^d/i]},GA={narrow:/^[smtofl]/i,short:/^(sø|ma|ti|on|to|fr|lø)/i,abbreviated:/^(søn|man|tir|ons|tor|fre|lør)/i,wide:/^(søndag|mandag|tirsdag|onsdag|torsdag|fredag|lørdag)/i},PA={any:[/^s/i,/^m/i,/^ti/i,/^o/i,/^to/i,/^f/i,/^l/i]},JA={narrow:/^(midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten)|[ap])/i,any:/^([ap]\.?\s?m\.?|midnatt|middag|(på) (morgenen|ettermiddagen|kvelden|natten))/i},HA={any:{am:/^a(\.?\s?m\.?)?$/i,pm:/^p(\.?\s?m\.?)?$/i,midnight:/^midn/i,noon:/^midd/i,morning:/morgen/i,afternoon:/ettermiddag/i,evening:/kveld/i,night:/natt/i}},FA={ordinalNumber:h4({matchPattern:xA,parsePattern:VA,valueCallback:r=>parseInt(r,10)}),era:F2({matchPatterns:jA,defaultMatchWidth:"wide",parsePatterns:yA,defaultParseWidth:"any"}),quarter:F2({matchPatterns:OA,defaultMatchWidth:"wide",parsePatterns:WA,defaultParseWidth:"any",valueCallback:r=>r+1}),month:F2({matchPatterns:TA,defaultMatchWidth:"wide",parsePatterns:XA,defaultParseWidth:"any"}),day:F2({matchPatterns:GA,defaultMatchWidth:"wide",parsePatterns:PA,defaultParseWidth:"any"}),dayPeriod:F2({matchPatterns:JA,defaultMatchWidth:"any",parsePatterns:HA,defaultParseWidth:"any"})},x5={code:"nb",formatDistance:zA,formatLong:RA,formatRelative:SA,localize:qA,match:FA,options:{weekStartsOn:1,firstWeekContainsDate:4}};I5("nb",x5);const DA=r=>{const{showCalendarIcon:n,...e}=r;return n?E.jsxs("div",{className:q5.inputWrapper,children:[E.jsx(M.Input,{...e,inputMode:"numeric",type:"text"}),E.jsx(i2,{className:q5.inputIcon,material:"calendar_month","aria-hidden":"true"})]}):E.jsx(M.Input,{...e,inputMode:"numeric",type:"text"})},wA=({value:r,onChange:n,dateFormat:e="dd.MM.yyyy",showCalendarIcon:t=!0,minDate:A,maxDate:i,...a})=>E.jsxs(M.Field,{children:[E.jsx(M.Label,{style:{display:"block",width:"fit-content"},children:E.jsx(P2,{text:a.label,required:a.required,optional:a.optional})}),a.description&&E.jsx(M.Field.Description,{children:a.description}),E.jsx(K5,{locale:"nb",selected:r,dateFormat:e,placeholderText:"dd.mm.åååå",onChange:l=>n==null?void 0:n(l??void 0),customInput:d.createElement(DA,{showCalendarIcon:t}),minDate:A,maxDate:i,onBlur:a.onBlur}),a.error&&E.jsx(M.ValidationMessage,{children:a.error})]}),h7={input:"_input_7ewse_2",inputWrapper:"_inputWrapper_7ewse_12",inputIcon:"_inputIcon_7ewse_18"};I5("nb",x5);const LA=r=>{const{showCalendarIcon:n,...e}=r;return n?E.jsxs("div",{className:h7.inputWrapper,children:[E.jsx(M.Input,{...e,inputMode:"numeric",type:"text"}),E.jsx(i2,{className:h7.inputIcon,material:"calendar_month","aria-hidden":"true"})]}):E.jsx(M.Input,{...e,inputMode:"numeric",type:"text"})},NA=({value:r,onChange:n,dateTimeFormat:e="dd.MM.yyyy, HH:mm",timeInputLabel:t="Time: ",showCalendarIcon:A=!0,minDate:i,maxDate:a,...l})=>E.jsxs(M.Field,{className:h7.input,children:[E.jsx(M.Label,{style:{display:"block",width:"fit-content"},children:E.jsx(P2,{text:l.label,required:l.required,optional:l.optional})}),l.description&&E.jsx(M.Field.Description,{children:l.description}),E.jsx(K5,{locale:"nb",selected:r,dateFormat:e,onChange:c=>n==null?void 0:n(c??void 0),customInput:d.createElement(LA,{showCalendarIcon:A}),showTimeInput:!0,placeholderText:"dd.mm.åååå, tt:mm",timeInputLabel:t,minDate:i,maxDate:a,onBlur:l.onBlur}),l.error&&E.jsx(M.ValidationMessage,{children:l.error})]}),b2={uploadButton:"_uploadButton_13mg3_2",uploadInformation:"_uploadInformation_13mg3_3",fileList:"_fileList_13mg3_22",fileItem:"_fileItem_13mg3_29",removeButton:"_removeButton_13mg3_42",existingFileItem:"_existingFileItem_13mg3_47",selected:"_selected_13mg3_65",checkbox:"_checkbox_13mg3_69",thumbnailContainer:"_thumbnailContainer_13mg3_77",fileIconContainer:"_fileIconContainer_13mg3_78"};var p3=typeof self<"u"?self:global;const U0=typeof navigator<"u",_A=U0&&typeof HTMLImageElement>"u",v3=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),h3=p3.Buffer,z3=p3.BigInt,g3=!!h3,$A=r=>r;function Q3(r,n=$A){if(v3)try{return typeof require=="function"?Promise.resolve(n(require(r))):import(r).then(n)}catch{console.warn(`Couldn't load ${r}`)}}let z7=p3.fetch;const ei=r=>z7=r;if(!p3.fetch){const r=Q3("http",t=>t),n=Q3("https",t=>t),e=(t,{headers:A}={})=>new Promise(async(i,a)=>{let{port:l,hostname:c,pathname:o,protocol:I,search:f}=new URL(t);const u={method:"GET",hostname:c,path:encodeURI(o)+f,headers:A};l!==""&&(u.port=Number(l));const s=(I==="https:"?await n:await r).request(u,m=>{if(m.statusCode===301||m.statusCode===302){let h=new URL(m.headers.location,t).toString();return e(h,{headers:A}).then(i).catch(a)}i({status:m.statusCode,arrayBuffer:()=>new Promise(h=>{let v=[];m.on("data",z=>v.push(z)),m.on("end",()=>h(Buffer.concat(v)))})})});s.on("error",a),s.end()});ei(e)}function y(r,n,e){return n in r?Object.defineProperty(r,n,{value:e,enumerable:!0,configurable:!0,writable:!0}):r[n]=e,r}const Z3=r=>V5(r)?void 0:r,ti=r=>r!==void 0;function V5(r){return r===void 0||(r instanceof Map?r.size===0:Object.values(r).filter(ti).length===0)}function C2(r){let n=new Error(r);throw delete n.stack,n}function j1(r){return(r=function(n){for(;n.endsWith("\0");)n=n.slice(0,-1);return n}(r).trim())===""?void 0:r}function g7(r){let n=function(e){let t=0;return e.ifd0.enabled&&(t+=1024),e.exif.enabled&&(t+=2048),e.makerNote&&(t+=2048),e.userComment&&(t+=1024),e.gps.enabled&&(t+=512),e.interop.enabled&&(t+=100),e.ifd1.enabled&&(t+=1024),t+2048}(r);return r.jfif.enabled&&(n+=50),r.xmp.enabled&&(n+=2e4),r.iptc.enabled&&(n+=14e3),r.icc.enabled&&(n+=6e3),n}const Q7=r=>String.fromCharCode.apply(null,r),j5=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function y5(r){return j5?j5.decode(r):g3?Buffer.from(r).toString("utf8"):decodeURIComponent(escape(Q7(r)))}class S2{static from(n,e){return n instanceof this&&n.le===e?n:new S2(n,void 0,void 0,e)}constructor(n,e=0,t,A){if(typeof A=="boolean"&&(this.le=A),Array.isArray(n)&&(n=new Uint8Array(n)),n===0)this.byteOffset=0,this.byteLength=0;else if(n instanceof ArrayBuffer){t===void 0&&(t=n.byteLength-e);let i=new DataView(n,e,t);this._swapDataView(i)}else if(n instanceof Uint8Array||n instanceof DataView||n instanceof S2){t===void 0&&(t=n.byteLength-e),(e+=n.byteOffset)+t>n.byteOffset+n.byteLength&&C2("Creating view outside of available memory in ArrayBuffer");let i=new DataView(n.buffer,e,t);this._swapDataView(i)}else if(typeof n=="number"){let i=new DataView(new ArrayBuffer(n));this._swapDataView(i)}else C2("Invalid input argument for BufferView: "+n)}_swapArrayBuffer(n){this._swapDataView(new DataView(n))}_swapBuffer(n){this._swapDataView(new DataView(n.buffer,n.byteOffset,n.byteLength))}_swapDataView(n){this.dataView=n,this.buffer=n.buffer,this.byteOffset=n.byteOffset,this.byteLength=n.byteLength}_lengthToEnd(n){return this.byteLength-n}set(n,e,t=S2){return n instanceof DataView||n instanceof S2?n=new Uint8Array(n.buffer,n.byteOffset,n.byteLength):n instanceof ArrayBuffer&&(n=new Uint8Array(n)),n instanceof Uint8Array||C2("BufferView.set(): Invalid data argument."),this.toUint8().set(n,e),new t(this,e,n.byteLength)}subarray(n,e){return e=e||this._lengthToEnd(n),new S2(this,n,e)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(n,e){return new Uint8Array(this.buffer,this.byteOffset+n,e)}getString(n=0,e=this.byteLength){return y5(this.getUint8Array(n,e))}getLatin1String(n=0,e=this.byteLength){let t=this.getUint8Array(n,e);return Q7(t)}getUnicodeString(n=0,e=this.byteLength){const t=[];for(let A=0;A<e&&n+A<this.byteLength;A+=2)t.push(this.getUint16(n+A));return Q7(t)}getInt8(n){return this.dataView.getInt8(n)}getUint8(n){return this.dataView.getUint8(n)}getInt16(n,e=this.le){return this.dataView.getInt16(n,e)}getInt32(n,e=this.le){return this.dataView.getInt32(n,e)}getUint16(n,e=this.le){return this.dataView.getUint16(n,e)}getUint32(n,e=this.le){return this.dataView.getUint32(n,e)}getFloat32(n,e=this.le){return this.dataView.getFloat32(n,e)}getFloat64(n,e=this.le){return this.dataView.getFloat64(n,e)}getFloat(n,e=this.le){return this.dataView.getFloat32(n,e)}getDouble(n,e=this.le){return this.dataView.getFloat64(n,e)}getUintBytes(n,e,t){switch(e){case 1:return this.getUint8(n,t);case 2:return this.getUint16(n,t);case 4:return this.getUint32(n,t);case 8:return this.getUint64&&this.getUint64(n,t)}}getUint(n,e,t){switch(e){case 8:return this.getUint8(n,t);case 16:return this.getUint16(n,t);case 32:return this.getUint32(n,t);case 64:return this.getUint64&&this.getUint64(n,t)}}toString(n){return this.dataView.toString(n,this.constructor.name)}ensureChunk(){}}function Z7(r,n){C2(`${r} '${n}' was not loaded, try using full build of exifr.`)}class R7 extends Map{constructor(n){super(),this.kind=n}get(n,e){return this.has(n)||Z7(this.kind,n),e&&(n in e||function(t,A){C2(`Unknown ${t} '${A}'.`)}(this.kind,n),e[n].enabled||Z7(this.kind,n)),super.get(n)}keyList(){return Array.from(this.keys())}}var r1=new R7("file parser"),u2=new R7("segment parser"),A1=new R7("file reader");function ni(r,n){return typeof r=="string"?O5(r,n):U0&&!_A&&r instanceof HTMLImageElement?O5(r.src,n):r instanceof Uint8Array||r instanceof ArrayBuffer||r instanceof DataView?new S2(r):U0&&r instanceof Blob?b7(r,n,"blob",O1):void C2("Invalid input argument")}function O5(r,n){return(e=r).startsWith("data:")||e.length>1e4?S7(r,n,"base64"):v3&&r.includes("://")?b7(r,n,"url",y1):v3?S7(r,n,"fs"):U0?b7(r,n,"url",y1):void C2("Invalid input argument");var e}async function b7(r,n,e,t){return A1.has(e)?S7(r,n,e):t?async function(A,i){let a=await i(A);return new S2(a)}(r,t):void C2(`Parser ${e} is not loaded`)}async function S7(r,n,e){let t=new(A1.get(e))(r,n);return await t.read(),t}const y1=r=>z7(r).then(n=>n.arrayBuffer()),O1=r=>new Promise((n,e)=>{let t=new FileReader;t.onloadend=()=>n(t.result||new ArrayBuffer),t.onerror=e,t.readAsArrayBuffer(r)});class ri extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function f2(r,n,e){let t=new ri;for(let[A,i]of e)t.set(A,i);if(Array.isArray(n))for(let A of n)r.set(A,t);else r.set(n,t);return t}function W1(r,n,e){let t,A=r.get(n);for(t of e)A.set(t[0],t[1])}const M2=new Map,X2=new Map,h1=new Map,z1=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],I0=["jfif","xmp","icc","iptc","ihdr"],T1=["tiff",...I0],c2=["ifd0","ifd1","exif","gps","interop"],g1=[...T1,...c2],Q1=["makerNote","userComment"],E0=["translateKeys","translateValues","reviveValues","multiSegment"],Z1=[...E0,"sanitize","mergeOutput","silentErrors"];class W5{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Y0 extends W5{get needed(){return this.enabled||this.deps.size>0}constructor(n,e,t,A){if(super(),y(this,"enabled",!1),y(this,"skip",new Set),y(this,"pick",new Set),y(this,"deps",new Set),y(this,"translateKeys",!1),y(this,"translateValues",!1),y(this,"reviveValues",!1),this.key=n,this.enabled=e,this.parse=this.enabled,this.applyInheritables(A),this.canBeFiltered=c2.includes(n),this.canBeFiltered&&(this.dict=M2.get(n)),t!==void 0)if(Array.isArray(t))this.parse=this.enabled=!0,this.canBeFiltered&&t.length>0&&this.translateTagSet(t,this.pick);else if(typeof t=="object"){if(this.enabled=!0,this.parse=t.parse!==!1,this.canBeFiltered){let{pick:i,skip:a}=t;i&&i.length>0&&this.translateTagSet(i,this.pick),a&&a.length>0&&this.translateTagSet(a,this.skip)}this.applyInheritables(t)}else t===!0||t===!1?this.parse=this.enabled=t:C2(`Invalid options argument: ${t}`)}applyInheritables(n){let e,t;for(e of E0)t=n[e],t!==void 0&&(this[e]=t)}translateTagSet(n,e){if(this.dict){let t,A,{tagKeys:i,tagValues:a}=this.dict;for(t of n)typeof t=="string"?(A=a.indexOf(t),A===-1&&(A=i.indexOf(Number(t))),A!==-1&&e.add(Number(i[A]))):e.add(t)}else for(let t of n)e.add(t)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,R3(this.pick,this.deps)):this.enabled&&this.pick.size>0&&R3(this.pick,this.deps)}}var Z2={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},T5=new Map;class X1 extends W5{static useCached(n){let e=T5.get(n);return e!==void 0||(e=new this(n),T5.set(n,e)),e}constructor(n){super(),n===!0?this.setupFromTrue():n===void 0?this.setupFromUndefined():Array.isArray(n)?this.setupFromArray(n):typeof n=="object"?this.setupFromObject(n):C2(`Invalid options argument ${n}`),this.firstChunkSize===void 0&&(this.firstChunkSize=U0?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let n;for(n of z1)this[n]=Z2[n];for(n of Z1)this[n]=Z2[n];for(n of Q1)this[n]=Z2[n];for(n of g1)this[n]=new Y0(n,Z2[n],void 0,this)}setupFromTrue(){let n;for(n of z1)this[n]=Z2[n];for(n of Z1)this[n]=Z2[n];for(n of Q1)this[n]=!0;for(n of g1)this[n]=new Y0(n,!0,void 0,this)}setupFromArray(n){let e;for(e of z1)this[e]=Z2[e];for(e of Z1)this[e]=Z2[e];for(e of Q1)this[e]=Z2[e];for(e of g1)this[e]=new Y0(e,!1,void 0,this);this.setupGlobalFilters(n,void 0,c2)}setupFromObject(n){let e;for(e of(c2.ifd0=c2.ifd0||c2.image,c2.ifd1=c2.ifd1||c2.thumbnail,Object.assign(this,n),z1))this[e]=B7(n[e],Z2[e]);for(e of Z1)this[e]=B7(n[e],Z2[e]);for(e of Q1)this[e]=B7(n[e],Z2[e]);for(e of T1)this[e]=new Y0(e,Z2[e],n[e],this);for(e of c2)this[e]=new Y0(e,Z2[e],n[e],this.tiff);this.setupGlobalFilters(n.pick,n.skip,c2,g1),n.tiff===!0?this.batchEnableWithBool(c2,!0):n.tiff===!1?this.batchEnableWithUserValue(c2,n):Array.isArray(n.tiff)?this.setupGlobalFilters(n.tiff,void 0,c2):typeof n.tiff=="object"&&this.setupGlobalFilters(n.tiff.pick,n.tiff.skip,c2)}batchEnableWithBool(n,e){for(let t of n)this[t].enabled=e}batchEnableWithUserValue(n,e){for(let t of n){let A=e[t];this[t].enabled=A!==!1&&A!==void 0}}setupGlobalFilters(n,e,t,A=t){if(n&&n.length){for(let a of A)this[a].enabled=!1;let i=X5(n,t);for(let[a,l]of i)R3(this[a].pick,l),this[a].enabled=!0}else if(e&&e.length){let i=X5(e,t);for(let[a,l]of i)R3(this[a].skip,l)}}filterNestedSegmentTags(){let{ifd0:n,exif:e,xmp:t,iptc:A,icc:i}=this;this.makerNote?e.deps.add(37500):e.skip.add(37500),this.userComment?e.deps.add(37510):e.skip.add(37510),t.enabled||n.skip.add(700),A.enabled||n.skip.add(33723),i.enabled||n.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:n,exif:e,gps:t,interop:A}=this;A.needed&&(e.deps.add(40965),n.deps.add(40965)),e.needed&&n.deps.add(34665),t.needed&&n.deps.add(34853),this.tiff.enabled=c2.some(i=>this[i].enabled===!0)||this.makerNote||this.userComment;for(let i of c2)this[i].finalizeFilters()}get onlyTiff(){return!I0.map(n=>this[n].enabled).some(n=>n===!0)&&this.tiff.enabled}checkLoadedPlugins(){for(let n of T1)this[n].enabled&&!u2.has(n)&&Z7("segment parser",n)}}function X5(r,n){let e,t,A,i,a=[];for(A of n){for(i of(e=M2.get(A),t=[],e))(r.includes(i[0])||r.includes(i[1]))&&t.push(i[0]);t.length&&a.push([A,t])}return a}function B7(r,n){return r!==void 0?r:n!==void 0?n:void 0}function R3(r,n){for(let e of n)r.add(e)}y(X1,"default",Z2);class R1{constructor(n){y(this,"parsers",{}),y(this,"output",{}),y(this,"errors",[]),y(this,"pushToErrors",e=>this.errors.push(e)),this.options=X1.useCached(n)}async read(n){this.file=await ni(n,this.options)}setup(){if(this.fileParser)return;let{file:n}=this,e=n.getUint16(0);for(let[t,A]of r1)if(A.canHandle(n,e))return this.fileParser=new A(this.options,this.file,this.parsers),n[t]=!0;this.file.close&&this.file.close(),C2("Unknown file format")}async parse(){let{output:n,errors:e}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),e.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&e.length>0&&(n.errors=e),Z3(n)}async executeParsers(){let{output:n}=this;await this.fileParser.parse();let e=Object.values(this.parsers).map(async t=>{let A=await t.parse();t.assignToOutput(n,A)});this.options.silentErrors&&(e=e.map(t=>t.catch(this.pushToErrors))),await Promise.all(e)}async extractThumbnail(){this.setup();let{options:n,file:e}=this,t=u2.get("tiff",n);var A;if(e.tiff?A={start:0,type:"tiff"}:e.jpeg&&(A=await this.fileParser.getOrFindSegment("tiff")),A===void 0)return;let i=await this.fileParser.ensureSegmentChunk(A),a=this.parsers.tiff=new t(i,n,e),l=await a.extractThumbnail();return e.close&&e.close(),l}}async function b3(r,n){let e=new R1(n);return await e.read(r),e.parse()}var Ai=Object.freeze({__proto__:null,parse:b3,Exifr:R1,fileParsers:r1,segmentParsers:u2,fileReaders:A1,tagKeys:M2,tagValues:X2,tagRevivers:h1,createDictionary:f2,extendDictionary:W1,fetchUrlAsArrayBuffer:y1,readBlobAsArrayBuffer:O1,chunkedProps:z1,otherSegments:I0,segments:T1,tiffBlocks:c2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E0,allFormatters:Z1,Options:X1});class S3{constructor(n,e,t){y(this,"errors",[]),y(this,"ensureSegmentChunk",async A=>{let i=A.start,a=A.size||65536;if(this.file.chunked)if(this.file.available(i,a))A.chunk=this.file.subarray(i,a);else try{A.chunk=await this.file.readChunk(i,a)}catch(l){C2(`Couldn't read segment: ${JSON.stringify(A)}. ${l.message}`)}else this.file.byteLength>i+a?A.chunk=this.file.subarray(i,a):A.size===void 0?A.chunk=this.file.subarray(i):C2("Segment unreachable: "+JSON.stringify(A));return A.chunk}),this.extendOptions&&this.extendOptions(n),this.options=n,this.file=e,this.parsers=t}injectSegment(n,e){this.options[n].enabled&&this.createParser(n,e)}createParser(n,e){let t=new(u2.get(n))(e,this.options,this.file);return this.parsers[n]=t}createParsers(n){for(let e of n){let{type:t,chunk:A}=e,i=this.options[t];if(i&&i.enabled){let a=this.parsers[t];a&&a.append||a||this.createParser(t,A)}}}async readSegments(n){let e=n.map(this.ensureSegmentChunk);await Promise.all(e)}}class G2{static findPosition(n,e){let t=n.getUint16(e+2)+2,A=typeof this.headerLength=="function"?this.headerLength(n,e,t):this.headerLength,i=e+A,a=t-A;return{offset:e,length:t,headerLength:A,start:i,size:a,end:i+a}}static parse(n,e={}){return new this(n,new X1({[this.type]:e}),n).parse()}normalizeInput(n){return n instanceof S2?n:new S2(n)}constructor(n,e={},t){y(this,"errors",[]),y(this,"raw",new Map),y(this,"handleError",A=>{if(!this.options.silentErrors)throw A;this.errors.push(A.message)}),this.chunk=this.normalizeInput(n),this.file=t,this.type=this.constructor.type,this.globalOptions=this.options=e,this.localOptions=e[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(n,e){let t=h1.get(e),A=X2.get(e),i=M2.get(e),a=this.options[e],l=a.reviveValues&&!!t,c=a.translateValues&&!!A,o=a.translateKeys&&!!i,I={};for(let[f,u]of n)l&&t.has(f)?u=t.get(f)(u):c&&A.has(f)&&(u=this.translateValue(u,A.get(f))),o&&i.has(f)&&(f=i.get(f)||f),I[f]=u;return I}translateValue(n,e){return e[n]||e.DEFAULT||n}assignToOutput(n,e){this.assignObjectToOutput(n,this.constructor.type,e)}assignObjectToOutput(n,e,t){if(this.globalOptions.mergeOutput)return Object.assign(n,t);n[e]?Object.assign(n[e],t):n[e]=t}}y(G2,"headerLength",4),y(G2,"type",void 0),y(G2,"multiSegment",!1),y(G2,"canHandle",()=>!1);function ii(r){return r===192||r===194||r===196||r===219||r===221||r===218||r===254}function ai(r){return r>=224&&r<=239}function li(r,n,e){for(let[t,A]of u2)if(A.canHandle(r,n,e))return t}class G5 extends S3{constructor(...n){super(...n),y(this,"appSegments",[]),y(this,"jpegSegments",[]),y(this,"unknownSegments",[])}static canHandle(n,e){return e===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(n){n===!0?(this.findAll=!0,this.wanted=new Set(u2.keyList())):(n=n===void 0?u2.keyList().filter(e=>this.options[e].enabled):n.filter(e=>this.options[e].enabled&&u2.has(e)),this.findAll=!1,this.remaining=new Set(n),this.wanted=new Set(n)),this.unfinishedMultiSegment=!1}async findAppSegments(n=0,e){this.setupSegmentFinderArgs(e);let{file:t,findAll:A,wanted:i,remaining:a}=this;if(!A&&this.file.chunked&&(A=Array.from(i).some(l=>{let c=u2.get(l),o=this.options[l];return c.multiSegment&&o.multiSegment}),A&&await this.file.readWhole()),n=this.findAppSegmentsInRange(n,t.byteLength),!this.options.onlyTiff&&t.chunked){let l=!1;for(;a.size>0&&!l&&(t.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:c}=t,o=this.appSegments.some(I=>!this.file.available(I.offset||I.start,I.length||I.size));if(l=n>c&&!o?!await t.readNextChunk(n):!await t.readNextChunk(c),(n=this.findAppSegmentsInRange(n,t.byteLength))===void 0)return}}}findAppSegmentsInRange(n,e){e-=2;let t,A,i,a,l,c,{file:o,findAll:I,wanted:f,remaining:u,options:s}=this;for(;n<e;n++)if(o.getUint8(n)===255){if(t=o.getUint8(n+1),ai(t)){if(A=o.getUint16(n+2),i=li(o,n,A),i&&f.has(i)&&(a=u2.get(i),l=a.findPosition(o,n),c=s[i],l.type=i,this.appSegments.push(l),!I&&(a.multiSegment&&c.multiSegment?(this.unfinishedMultiSegment=l.chunkNumber<l.chunkCount,this.unfinishedMultiSegment||u.delete(i)):u.delete(i),u.size===0)))break;s.recordUnknownSegments&&(l=G2.findPosition(o,n),l.marker=t,this.unknownSegments.push(l)),n+=A+1}else if(ii(t)){if(A=o.getUint16(n+2),t===218&&s.stopAfterSos!==!1)return;s.recordJpegSegments&&this.jpegSegments.push({offset:n,length:A,marker:t}),n+=A+1}}return n}mergeMultiSegments(){if(!this.appSegments.some(e=>e.multiSegment))return;let n=function(e,t){let A,i,a,l=new Map;for(let c=0;c<e.length;c++)A=e[c],i=A[t],l.has(i)?a=l.get(i):l.set(i,a=[]),a.push(A);return Array.from(l)}(this.appSegments,"type");this.mergedAppSegments=n.map(([e,t])=>{let A=u2.get(e,this.options);return A.handleMultiSegments?{type:e,chunk:A.handleMultiSegments(t)}:t[0]})}getSegment(n){return this.appSegments.find(e=>e.type===n)}async getOrFindSegment(n){let e=this.getSegment(n);return e===void 0&&(await this.findAppSegments(0,[n]),e=this.getSegment(n)),e}}y(G5,"type","jpeg"),r1.set("jpeg",G5);const ci=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class oi extends G2{parseHeader(){var n=this.chunk.getUint16();n===18761?this.le=!0:n===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(n,e,t=new Map){let{pick:A,skip:i}=this.options[e];A=new Set(A);let a=A.size>0,l=i.size===0,c=this.chunk.getUint16(n);n+=2;for(let o=0;o<c;o++){let I=this.chunk.getUint16(n);if(a){if(A.has(I)&&(t.set(I,this.parseTag(n,I,e)),A.delete(I),A.size===0))break}else!l&&i.has(I)||t.set(I,this.parseTag(n,I,e));n+=12}return t}parseTag(n,e,t){let{chunk:A}=this,i=A.getUint16(n+2),a=A.getUint32(n+4),l=ci[i];if(l*a<=4?n+=8:n=A.getUint32(n+8),(i<1||i>13)&&C2(`Invalid TIFF value type. block: ${t.toUpperCase()}, tag: ${e.toString(16)}, type: ${i}, offset ${n}`),n>A.byteLength&&C2(`Invalid TIFF value offset. block: ${t.toUpperCase()}, tag: ${e.toString(16)}, type: ${i}, offset ${n} is outside of chunk size ${A.byteLength}`),i===1)return A.getUint8Array(n,a);if(i===2)return j1(A.getString(n,a));if(i===7)return A.getUint8Array(n,a);if(a===1)return this.parseTagValue(i,n);{let c=new(function(I){switch(I){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}}(i))(a),o=l;for(let I=0;I<a;I++)c[I]=this.parseTagValue(i,n),n+=o;return c}}parseTagValue(n,e){let{chunk:t}=this;switch(n){case 1:return t.getUint8(e);case 3:return t.getUint16(e);case 4:return t.getUint32(e);case 5:return t.getUint32(e)/t.getUint32(e+4);case 6:return t.getInt8(e);case 8:return t.getInt16(e);case 9:return t.getInt32(e);case 10:return t.getInt32(e)/t.getInt32(e+4);case 11:return t.getFloat(e);case 12:return t.getDouble(e);case 13:return t.getUint32(e);default:C2(`Invalid tiff type ${n}`)}}}class U7 extends oi{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1165519206&&n.getUint16(e+8)===0}async parse(){this.parseHeader();let{options:n}=this;return n.ifd0.enabled&&await this.parseIfd0Block(),n.exif.enabled&&await this.safeParse("parseExifBlock"),n.gps.enabled&&await this.safeParse("parseGpsBlock"),n.interop.enabled&&await this.safeParse("parseInteropBlock"),n.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(n){let e=this[n]();return e.catch!==void 0&&(e=e.catch(this.handleError)),e}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let n=this.chunk.getUint16(this.ifd0Offset),e=this.ifd0Offset+2+12*n;this.ifd1Offset=this.chunk.getUint32(e)}}parseBlock(n,e){let t=new Map;return this[e]=t,this.parseTags(n,e,t),t}async parseIfd0Block(){if(this.ifd0)return;let{file:n}=this;this.findIfd0Offset(),this.ifd0Offset<8&&C2("Malformed EXIF data"),!n.chunked&&this.ifd0Offset>n.byteLength&&C2(`IFD0 offset points to outside of file.
28
28
  this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${n.byteLength}`),n.tiff&&await n.ensureChunk(this.ifd0Offset,g7(this.options));let e=this.parseBlock(this.ifd0Offset,"ifd0");return e.size!==0?(this.exifOffset=e.get(34665),this.interopOffset=e.get(40965),this.gpsOffset=e.get(34853),this.xmp=e.get(700),this.iptc=e.get(33723),this.icc=e.get(34675),this.options.sanitize&&(e.delete(34665),e.delete(40965),e.delete(34853),e.delete(700),e.delete(33723),e.delete(34675)),e):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,g7(this.options));let n=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=n.get(40965)),this.makerNote=n.get(37500),this.userComment=n.get(37510),this.options.sanitize&&(n.delete(40965),n.delete(37500),n.delete(37510)),this.unpack(n,41728),this.unpack(n,41729),n}unpack(n,e){let t=n.get(e);t&&t.length===1&&n.set(e,t[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let n=this.parseBlock(this.gpsOffset,"gps");return n&&n.has(2)&&n.has(4)&&(n.set("latitude",P5(...n.get(2),n.get(1))),n.set("longitude",P5(...n.get(4),n.get(3)))),n}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(n=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||n))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let n=this.ifd1.get(513),e=this.ifd1.get(514);return this.chunk.getUint8Array(n,e)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let n,e,t,A={};for(e of c2)if(n=this[e],!V5(n))if(t=this.canTranslate?this.translateBlock(n,e):Object.fromEntries(n),this.options.mergeOutput){if(e==="ifd1")continue;Object.assign(A,t)}else A[e]=t;return this.makerNote&&(A.makerNote=this.makerNote),this.userComment&&(A.userComment=this.userComment),A}assignToOutput(n,e){if(this.globalOptions.mergeOutput)Object.assign(n,e);else for(let[t,A]of Object.entries(e))this.assignObjectToOutput(n,t,A)}}function P5(r,n,e,t){var A=r+n/60+e/3600;return t!=="S"&&t!=="W"||(A*=-1),A}y(U7,"type","tiff"),y(U7,"headerLength",10),u2.set("tiff",U7);var Ii=Object.freeze({__proto__:null,default:Ai,Exifr:R1,fileParsers:r1,segmentParsers:u2,fileReaders:A1,tagKeys:M2,tagValues:X2,tagRevivers:h1,createDictionary:f2,extendDictionary:W1,fetchUrlAsArrayBuffer:y1,readBlobAsArrayBuffer:O1,chunkedProps:z1,otherSegments:I0,segments:T1,tiffBlocks:c2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E0,allFormatters:Z1,Options:X1,parse:b3});const Y7={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},k7=Object.assign({},Y7,{firstChunkSize:4e4,gps:[1,2,3,4]});async function J5(r){let n=new R1(k7);await n.read(r);let e=await n.parse();if(e&&e.gps){let{latitude:t,longitude:A}=e.gps;return{latitude:t,longitude:A}}}const K7=Object.assign({},Y7,{tiff:!1,ifd1:!0,mergeOutput:!1});async function H5(r){let n=new R1(K7);await n.read(r);let e=await n.extractThumbnail();return e&&g3?h3.from(e):e}async function F5(r){let n=await this.thumbnail(r);if(n!==void 0){let e=new Blob([n]);return URL.createObjectURL(e)}}const q7=Object.assign({},Y7,{firstChunkSize:4e4,ifd0:[274]});async function x7(r){let n=new R1(q7);await n.read(r);let e=await n.parse();if(e&&e.ifd0)return e.ifd0[274]}const V7=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let G1=!0,P1=!0;if(typeof navigator=="object"){let r=navigator.userAgent;if(r.includes("iPad")||r.includes("iPhone")){let n=r.match(/OS (\d+)_(\d+)/);if(n){let[,e,t]=n;G1=Number(e)+.1*Number(t)<13.4,P1=!1}}else if(r.includes("OS X 10")){let[,n]=r.match(/OS X 10[_.](\d+)/);G1=P1=Number(n)<15}if(r.includes("Chrome/")){let[,n]=r.match(/Chrome\/(\d+)/);G1=P1=Number(n)<81}else if(r.includes("Firefox/")){let[,n]=r.match(/Firefox\/(\d+)/);G1=P1=Number(n)<77}}async function D5(r){let n=await x7(r);return Object.assign({canvas:G1,css:P1},V7[n])}class Ei extends S2{constructor(...n){super(...n),y(this,"ranges",new fi),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(n,e,t){if(n===0&&this.byteLength===0&&t){let A=new DataView(t.buffer||t,t.byteOffset,t.byteLength);this._swapDataView(A)}else{let A=n+e;if(A>this.byteLength){let{dataView:i}=this._extend(A);this._swapDataView(i)}}}_extend(n){let e;e=g3?h3.allocUnsafe(n):new Uint8Array(n);let t=new DataView(e.buffer,e.byteOffset,e.byteLength);return e.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:e,dataView:t}}subarray(n,e,t=!1){return e=e||this._lengthToEnd(n),t&&this._tryExtend(n,e),this.ranges.add(n,e),super.subarray(n,e)}set(n,e,t=!1){t&&this._tryExtend(e,n.byteLength,n);let A=super.set(n,e);return this.ranges.add(e,A.byteLength),A}async ensureChunk(n,e){this.chunked&&(this.ranges.available(n,e)||await this.readChunk(n,e))}available(n,e){return this.ranges.available(n,e)}}class fi{constructor(){y(this,"list",[])}get length(){return this.list.length}add(n,e,t=0){let A=n+e,i=this.list.filter(a=>w5(n,a.offset,A)||w5(n,a.end,A));if(i.length>0){n=Math.min(n,...i.map(l=>l.offset)),A=Math.max(A,...i.map(l=>l.end)),e=A-n;let a=i.shift();a.offset=n,a.length=e,a.end=A,this.list=this.list.filter(l=>!i.includes(l))}else this.list.push({offset:n,length:e,end:A})}available(n,e){let t=n+e;return this.list.some(A=>A.offset<=n&&t<=A.end)}}function w5(r,n,e){return r<=n&&n<=e}class B3 extends Ei{constructor(n,e){super(0),y(this,"chunksRead",0),this.input=n,this.options=e}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(n=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let e=this.options.chunkSize,t=await this.readChunk(n,e);return!!t&&t.byteLength===e}async readChunk(n,e){if(this.chunksRead++,(e=this.safeWrapAddress(n,e))!==0)return this._readChunk(n,e)}safeWrapAddress(n,e){return this.size!==void 0&&n+e>this.size?Math.max(0,this.size-n):e}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}A1.set("blob",class extends B3{async readWhole(){this.chunked=!1;let r=await O1(this.input);this._swapArrayBuffer(r)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}async _readChunk(r,n){let e=n?r+n:void 0,t=this.input.slice(r,e),A=await O1(t);return this.set(A,r,!0)}});var Ci=Object.freeze({__proto__:null,default:Ii,Exifr:R1,fileParsers:r1,segmentParsers:u2,fileReaders:A1,tagKeys:M2,tagValues:X2,tagRevivers:h1,createDictionary:f2,extendDictionary:W1,fetchUrlAsArrayBuffer:y1,readBlobAsArrayBuffer:O1,chunkedProps:z1,otherSegments:I0,segments:T1,tiffBlocks:c2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E0,allFormatters:Z1,Options:X1,parse:b3,gpsOnlyOptions:k7,gps:J5,thumbnailOnlyOptions:K7,thumbnail:H5,thumbnailUrl:F5,orientationOnlyOptions:q7,orientation:x7,rotations:V7,get rotateCanvas(){return G1},get rotateCss(){return P1},rotation:D5});A1.set("url",class extends B3{async readWhole(){this.chunked=!1;let r=await y1(this.input);r instanceof ArrayBuffer?this._swapArrayBuffer(r):r instanceof Uint8Array&&this._swapBuffer(r)}async _readChunk(r,n){let e=n?r+n-1:void 0,t=this.options.httpHeaders||{};(r||e)&&(t.range=`bytes=${[r,e].join("-")}`);let A=await z7(this.input,{headers:t}),i=await A.arrayBuffer(),a=i.byteLength;if(A.status!==416)return a!==n&&(this.size=r+a),this.set(i,r,!0)}}),S2.prototype.getUint64=function(r){let n=this.getUint32(r),e=this.getUint32(r+4);return n<1048575?n<<32|e:typeof z3!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),z3(n)<<z3(32)|z3(e)):void C2("Trying to read 64b value but JS can only handle 53b numbers.")};class ui extends S3{parseBoxes(n=0){let e=[];for(;n<this.file.byteLength-4;){let t=this.parseBoxHead(n);if(e.push(t),t.length===0)break;n+=t.length}return e}parseSubBoxes(n){n.boxes=this.parseBoxes(n.start)}findBox(n,e){return n.boxes===void 0&&this.parseSubBoxes(n),n.boxes.find(t=>t.kind===e)}parseBoxHead(n){let e=this.file.getUint32(n),t=this.file.getString(n+4,4),A=n+8;return e===1&&(e=this.file.getUint64(n+8),A+=8),{offset:n,length:e,kind:t,start:A}}parseBoxFullHead(n){if(n.version!==void 0)return;let e=this.file.getUint32(n.start);n.version=e>>24,n.start+=4}}class L5 extends ui{static canHandle(n,e){if(e!==0)return!1;let t=n.getUint16(2);if(t>50)return!1;let A=16,i=[];for(;A<t;)i.push(n.getString(A,4)),A+=4;return i.includes(this.type)}async parse(){let n=this.file.getUint32(0),e=this.parseBoxHead(n);for(;e.kind!=="meta";)n+=e.length,await this.file.ensureChunk(n,16),e=this.parseBoxHead(n);await this.file.ensureChunk(e.offset,e.length),this.parseBoxFullHead(e),this.parseSubBoxes(e),this.options.icc.enabled&&await this.findIcc(e),this.options.tiff.enabled&&await this.findExif(e)}async registerSegment(n,e,t){await this.file.ensureChunk(e,t);let A=this.file.subarray(e,t);this.createParser(n,A)}async findIcc(n){let e=this.findBox(n,"iprp");if(e===void 0)return;let t=this.findBox(e,"ipco");if(t===void 0)return;let A=this.findBox(t,"colr");A!==void 0&&await this.registerSegment("icc",A.offset+12,A.length)}async findExif(n){let e=this.findBox(n,"iinf");if(e===void 0)return;let t=this.findBox(n,"iloc");if(t===void 0)return;let A=this.findExifLocIdInIinf(e),i=this.findExtentInIloc(t,A);if(i===void 0)return;let[a,l]=i;await this.file.ensureChunk(a,l);let c=4+this.file.getUint32(a);a+=c,l-=c,await this.registerSegment("tiff",a,l)}findExifLocIdInIinf(n){this.parseBoxFullHead(n);let e,t,A,i,a=n.start,l=this.file.getUint16(a);for(a+=2;l--;){if(e=this.parseBoxHead(a),this.parseBoxFullHead(e),t=e.start,e.version>=2&&(A=e.version===3?4:2,i=this.file.getString(t+A+2,4),i==="Exif"))return this.file.getUintBytes(t,A);a+=e.length}}get8bits(n){let e=this.file.getUint8(n);return[e>>4,15&e]}findExtentInIloc(n,e){this.parseBoxFullHead(n);let t=n.start,[A,i]=this.get8bits(t++),[a,l]=this.get8bits(t++),c=n.version===2?4:2,o=n.version===1||n.version===2?2:0,I=l+A+i,f=n.version===2?4:2,u=this.file.getUintBytes(t,f);for(t+=f;u--;){let s=this.file.getUintBytes(t,c);t+=c+o+2+a;let m=this.file.getUint16(t);if(t+=2,s===e)return m>1&&console.warn(`ILOC box has more than one extent but we're only processing one
29
- Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+l,A),this.file.getUintBytes(t+l+A,i)];t+=m*I}}}class N5 extends L5{}y(N5,"type","heic");class _5 extends L5{}y(_5,"type","avif"),r1.set("heic",N5),r1.set("avif",_5),f2(M2,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),f2(M2,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),f2(M2,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),f2(X2,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let k0=f2(X2,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const $5={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};k0.set(37392,$5),k0.set(41488,$5);const j7={0:"Normal",1:"Low",2:"High"};function e9(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function t9(r){let n=Array.from(r).slice(1);return n[1]>15&&(n=n.map(e=>String.fromCharCode(e))),n[2]!=="0"&&n[2]!==0||n.pop(),n.join(".")}function y7(r){if(typeof r=="string"){var[n,e,t,A,i,a]=r.trim().split(/[-: ]/g).map(Number),l=new Date(n,e-1,t);return Number.isNaN(A)||Number.isNaN(i)||Number.isNaN(a)||(l.setHours(A),l.setMinutes(i),l.setSeconds(a)),Number.isNaN(+l)?r:l}}function K0(r){if(typeof r=="string")return r;let n=[];if(r[1]===0&&r[r.length-1]===0)for(let e=0;e<r.length;e+=2)n.push(n9(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(n9(r[e],r[e+1]));return j1(String.fromCodePoint(...n))}function n9(r,n){return r<<8|n}k0.set(41992,j7),k0.set(41993,j7),k0.set(41994,j7),f2(h1,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?y5(r):r}],[306,y7],[40091,K0],[40092,K0],[40093,K0],[40094,K0],[40095,K0]]),f2(h1,"exif",[[40960,t9],[36864,t9],[36867,y7],[36868,y7],[40962,e9],[40963,e9]]),f2(h1,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class O7 extends G2{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1752462448&&n.getString(e+4,20)==="http://ns.adobe.com/"}static headerLength(n,e){return n.getString(e+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(n,e){let t=super.findPosition(n,e);return t.multiSegment=t.extended=t.headerLength===79,t.multiSegment?(t.chunkCount=n.getUint8(e+72),t.chunkNumber=n.getUint8(e+76),n.getUint8(e+77)!==0&&t.chunkNumber++):(t.chunkCount=1/0,t.chunkNumber=-1),t}static handleMultiSegments(n){return n.map(e=>e.chunk.getString()).join("")}normalizeInput(n){return typeof n=="string"?n:S2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=function(i){let a={},l={};for(let c of a9)a[c]=[],l[c]=0;return i.replace(mi,(c,o,I)=>{if(o==="<"){let f=++l[I];return a[I].push(f),`${c}#${f}`}return`${c}#${a[I].pop()}`})}(n);let e=f0.findAll(n,"rdf","Description");e.length===0&&e.push(new f0("rdf","Description",void 0,n));let t,A={};for(let i of e)for(let a of i.properties)t=Mi(a.ns,A),r9(a,t);return function(i){let a;for(let l in i)a=i[l]=Z3(i[l]),a===void 0&&delete i[l];return Z3(i)}(A)}assignToOutput(n,e){if(this.localOptions.parse)for(let[t,A]of Object.entries(e))switch(t){case"tiff":this.assignObjectToOutput(n,"ifd0",A);break;case"exif":this.assignObjectToOutput(n,"exif",A);break;case"xmlns":break;default:this.assignObjectToOutput(n,t,A)}else n.xmp=e}}y(O7,"type","xmp"),y(O7,"multiSegment",!0),u2.set("xmp",O7);class U3{static findAll(n){return A9(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(U3.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[3].slice(1,-1);return A=i9(A),new U3(e,t,A)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class f0{static findAll(n,e,t){if(e!==void 0||t!==void 0){e=e||"[\\w\\d-]+",t=t||"[\\w\\d-]+";var A=new RegExp(`<(${e}):(${t})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else A=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return A9(n,A).map(f0.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[4],i=n[8];return new f0(e,t,A,i)}constructor(n,e,t,A){this.ns=n,this.name=e,this.attrString=t,this.innerXml=A,this.attrs=U3.findAll(t),this.children=f0.findAll(A),this.value=this.children.length===0?i9(A):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:n,name:e}=this;return n==="rdf"&&(e==="Seq"||e==="Bag"||e==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return di(this.children.map(si));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)r9(e,n);return this.value!==void 0&&(n.value=this.value),Z3(n)}}function r9(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var si=r=>r.serialize(),di=r=>r.length===1?r[0]:r,Mi=(r,n)=>n[r]?n[r]:n[r]={};function A9(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function i9(r){if(function(t){return t==null||t==="null"||t==="undefined"||t===""||t.trim()===""}(r))return;let n=Number(r);if(!Number.isNaN(n))return n;let e=r.toLowerCase();return e==="true"||e!=="false"&&r.trim()}const a9=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],mi=new RegExp(`(<|\\/)(${a9.join("|")})`,"g");var pi=Object.freeze({__proto__:null,default:Ci,Exifr:R1,fileParsers:r1,segmentParsers:u2,fileReaders:A1,tagKeys:M2,tagValues:X2,tagRevivers:h1,createDictionary:f2,extendDictionary:W1,fetchUrlAsArrayBuffer:y1,readBlobAsArrayBuffer:O1,chunkedProps:z1,otherSegments:I0,segments:T1,tiffBlocks:c2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E0,allFormatters:Z1,Options:X1,parse:b3,gpsOnlyOptions:k7,gps:J5,thumbnailOnlyOptions:K7,thumbnail:H5,thumbnailUrl:F5,orientationOnlyOptions:q7,orientation:x7,rotations:V7,get rotateCanvas(){return G1},get rotateCss(){return P1},rotation:D5});let l9=Q3("fs",r=>r.promises);A1.set("fs",class extends B3{async readWhole(){this.chunked=!1,this.fs=await l9;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await l9,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(r,n){this.fh===void 0&&await this.open(),r+n>this.size&&(n=this.size-r);var e=this.subarray(r,n,!0);return await this.fh.read(e.dataView,0,n,r),e}async close(){if(this.fh){let r=this.fh;this.fh=void 0,await r.close()}}}),A1.set("base64",class extends B3{constructor(...r){super(...r),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(r,n){let e,t,A=this.input;r===void 0?(r=0,e=0,t=0):(e=4*Math.floor(r/3),t=r-e/4*3),n===void 0&&(n=this.size);let i=r+n,a=e+4*Math.ceil(i/3);A=A.slice(e,a);let l=Math.min(n,this.size-r);if(g3){let c=h3.from(A,"base64").slice(t,t+l);return this.set(c,r,!0)}{let c=this.subarray(r,l,!0),o=atob(A),I=c.toUint8();for(let f=0;f<l;f++)I[f]=o.charCodeAt(t+f);return c}}});class c9 extends S3{static canHandle(n,e){return e===18761||e===19789}extendOptions(n){let{ifd0:e,xmp:t,iptc:A,icc:i}=n;t.enabled&&e.deps.add(700),A.enabled&&e.deps.add(33723),i.enabled&&e.deps.add(34675),e.finalizeFilters()}async parse(){let{tiff:n,xmp:e,iptc:t,icc:A}=this.options;if(n.enabled||e.enabled||t.enabled||A.enabled){let i=Math.max(g7(this.options),this.options.chunkSize);await this.file.ensureChunk(0,i),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(n){if(this.parsers.tiff[n]){let e=this.parsers.tiff[n];this.injectSegment(n,e)}}}y(c9,"type","tiff"),r1.set("tiff",c9);let vi=Q3("zlib");const hi=["ihdr","iccp","text","itxt","exif"];class o9 extends S3{constructor(...n){super(...n),y(this,"catchError",e=>this.errors.push(e)),y(this,"metaChunks",[]),y(this,"unknownChunks",[])}static canHandle(n,e){return e===35152&&n.getUint32(0)===2303741511&&n.getUint32(4)===218765834}async parse(){let{file:n}=this;await this.findPngChunksInRange(8,n.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(n,e){let{file:t}=this;for(;n<e;){let A=t.getUint32(n),i=t.getUint32(n+4),a=t.getString(n+4,4).toLowerCase(),l=A+4+4+4,c={type:a,offset:n,length:l,start:n+4+4,size:A,marker:i};hi.includes(a)?this.metaChunks.push(c):this.unknownChunks.push(c),n+=l}}parseTextChunks(){let n=this.metaChunks.filter(e=>e.type==="text");for(let e of n){let[t,A]=this.file.getString(e.start,e.size).split("\0");this.injectKeyValToIhdr(t,A)}}injectKeyValToIhdr(n,e){let t=this.parsers.ihdr;t&&t.raw.set(n,e)}findIhdr(){let n=this.metaChunks.find(e=>e.type==="ihdr");n&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",n.chunk)}async findExif(){let n=this.metaChunks.find(e=>e.type==="exif");n&&this.injectSegment("tiff",n.chunk)}async findXmp(){let n=this.metaChunks.filter(e=>e.type==="itxt");for(let e of n)e.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",e.chunk)}async findIcc(){let n=this.metaChunks.find(l=>l.type==="iccp");if(!n)return;let{chunk:e}=n,t=e.getUint8Array(0,81),A=0;for(;A<80&&t[A]!==0;)A++;let i=A+2,a=e.getString(0,A);if(this.injectKeyValToIhdr("ProfileName",a),v3){let l=await vi,c=e.getUint8Array(i);c=l.inflateSync(c),this.injectSegment("icc",c)}}}y(o9,"type","png"),r1.set("png",o9),f2(M2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),W1(M2,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let I9=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];W1(M2,"ifd0",I9),W1(M2,"exif",I9),f2(X2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class W7 extends G2{static canHandle(n,e){return n.getUint8(e+1)===224&&n.getUint32(e+4)===1246120262&&n.getUint8(e+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}y(W7,"type","jfif"),y(W7,"headerLength",9),u2.set("jfif",W7),f2(M2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class E9 extends G2{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}y(E9,"type","ihdr"),u2.set("ihdr",E9),f2(M2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),f2(X2,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class Y3 extends G2{static canHandle(n,e){return n.getUint8(e+1)===226&&n.getUint32(e+4)===1229144927}static findPosition(n,e){let t=super.findPosition(n,e);return t.chunkNumber=n.getUint8(e+16),t.chunkCount=n.getUint8(e+17),t.multiSegment=t.chunkCount>1,t}static handleMultiSegments(n){return function(e){let t=function(A){let i=A[0].constructor,a=0;for(let o of A)a+=o.length;let l=new i(a),c=0;for(let o of A)l.set(o,c),c+=o.length;return l}(e.map(A=>A.chunk.toUint8()));return new S2(t)}(n)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:n}=this;this.chunk.byteLength<84&&C2("ICC header is too short");for(let[e,t]of Object.entries(zi)){e=parseInt(e,10);let A=t(this.chunk,e);A!=="\0\0\0\0"&&n.set(e,A)}}parseTags(){let n,e,t,A,i,{raw:a}=this,l=this.chunk.getUint32(128),c=132,o=this.chunk.byteLength;for(;l--;){if(n=this.chunk.getString(c,4),e=this.chunk.getUint32(c+4),t=this.chunk.getUint32(c+8),A=this.chunk.getString(e,4),e+t>o)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");i=this.parseTag(A,e,t),i!==void 0&&i!=="\0\0\0\0"&&a.set(n,i),c+=12}}parseTag(n,e,t){switch(n){case"desc":return this.parseDesc(e);case"mluc":return this.parseMluc(e);case"text":return this.parseText(e,t);case"sig ":return this.parseSig(e)}if(!(e+t>this.chunk.byteLength))return this.chunk.getUint8Array(e,t)}parseDesc(n){let e=this.chunk.getUint32(n+8)-1;return j1(this.chunk.getString(n+12,e))}parseText(n,e){return j1(this.chunk.getString(n+8,e-8))}parseSig(n){return j1(this.chunk.getString(n+8,4))}parseMluc(n){let{chunk:e}=this,t=e.getUint32(n+8),A=e.getUint32(n+12),i=n+16,a=[];for(let l=0;l<t;l++){let c=e.getString(i+0,2),o=e.getString(i+2,2),I=e.getUint32(i+4),f=e.getUint32(i+8)+n,u=j1(e.getUnicodeString(f,I));a.push({lang:c,country:o,text:u}),i+=A}return t===1?a[0].text:a}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}y(Y3,"type","icc"),y(Y3,"multiSegment",!0),y(Y3,"headerLength",18);const zi={4:C1,8:function(r,n){return[r.getUint8(n),r.getUint8(n+1)>>4,r.getUint8(n+1)%16].map(e=>e.toString(10)).join(".")},12:C1,16:C1,20:C1,24:function(r,n){const e=r.getUint16(n),t=r.getUint16(n+2)-1,A=r.getUint16(n+4),i=r.getUint16(n+6),a=r.getUint16(n+8),l=r.getUint16(n+10);return new Date(Date.UTC(e,t,A,i,a,l))},36:C1,40:C1,48:C1,52:C1,64:(r,n)=>r.getUint32(n),80:C1};function C1(r,n){return j1(r.getString(n,4))}u2.set("icc",Y3),f2(M2,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const k3={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},f9={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};f2(X2,"icc",[[4,k3],[12,f9],[40,Object.assign({},k3,f9)],[48,k3],[80,k3],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class K3 extends G2{static canHandle(n,e,t){return n.getUint8(e+1)===237&&n.getString(e+4,9)==="Photoshop"&&this.containsIptc8bim(n,e,t)!==void 0}static headerLength(n,e,t){let A,i=this.containsIptc8bim(n,e,t);if(i!==void 0)return A=n.getUint8(e+i+7),A%2!=0&&(A+=1),A===0&&(A=4),i+8+A}static containsIptc8bim(n,e,t){for(let A=0;A<t;A++)if(this.isIptcSegmentHead(n,e+A))return A}static isIptcSegmentHead(n,e){return n.getUint8(e)===56&&n.getUint32(e)===943868237&&n.getUint16(e+4)===1028}parse(){let{raw:n}=this,e=this.chunk.byteLength-1,t=!1;for(let A=0;A<e;A++)if(this.chunk.getUint8(A)===28&&this.chunk.getUint8(A+1)===2){t=!0;let i=this.chunk.getUint16(A+3),a=this.chunk.getUint8(A+2),l=this.chunk.getLatin1String(A+5,i);n.set(a,this.pluralizeValue(n.get(a),l)),A+=4+i}else if(t)break;return this.translate(),this.output}pluralizeValue(n,e){return n!==void 0?n instanceof Array?(n.push(e),n):[n,e]:e}}y(K3,"type","iptc"),y(K3,"translateValues",!1),y(K3,"reviveValues",!1),u2.set("iptc",K3),f2(M2,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),f2(X2,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const h2=[];for(let r=0;r<256;++r)h2.push((r+256).toString(16).slice(1));function gi(r,n=0){return(h2[r[n+0]]+h2[r[n+1]]+h2[r[n+2]]+h2[r[n+3]]+"-"+h2[r[n+4]]+h2[r[n+5]]+"-"+h2[r[n+6]]+h2[r[n+7]]+"-"+h2[r[n+8]]+h2[r[n+9]]+"-"+h2[r[n+10]]+h2[r[n+11]]+h2[r[n+12]]+h2[r[n+13]]+h2[r[n+14]]+h2[r[n+15]]).toLowerCase()}let T7;const Qi=new Uint8Array(16);function Zi(){if(!T7){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");T7=crypto.getRandomValues.bind(crypto)}return T7(Qi)}const C9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function X7(r,n,e){var A;if(C9.randomUUID&&!r)return C9.randomUUID();r=r||{};const t=r.random??((A=r.rng)==null?void 0:A.call(r))??Zi();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=t[6]&15|64,t[8]=t[8]&63|128,gi(t)}const Ri=async()=>new Promise(r=>{setTimeout(()=>{r(X7())},2500)}),bi=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),u9=d.createContext({uploadFile:Ri,deleteFile:bi}),Si=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},Bi=[".pdf",".jpg",".jpeg",".png"],Ui=({label:r,required:n,optional:e,buttonLabel:t,description:A="",error:i=null,multiple:a=!0,files:l=[],maxFiles:c,onChange:o,allowedFileTypes:I=Bi,translations:f,existingFilesProvider:u})=>{const{at:s}=F3(),m=s.bind(null,"fileUploader",f),h=d.useContext(u9),v=d.useRef(null),z=d.useRef(null),[Q,R]=d.useState([]),[k,x]=d.useState(!1),[B,K]=d.useState({}),b=Z=>{Promise.all(Z.map(async j=>{try{return{file:j,exif:Si(await pi.parse(j))}}catch(_){return console.log("Error when parsing exif data, assuming image does not have any",_),{file:j}}})).then(j=>{Yi(j,l,h.uploadFile,o)})},U=Z=>{o(l.filter(j=>j.contextId!==Z.contextId))},O=async()=>{var Z;u&&(x(!0),(async()=>{const j=await u();R(j),K(j.reduce((_,r2)=>(r2.storageId&&(_[r2.storageId]=!!l.find(g=>g.storageId===r2.storageId)),_),{})),x(!1)})(),(Z=z.current)==null||Z.showModal())},P=(Z,j)=>{K(_=>({..._,[Z]:j}))},V=()=>{var _;const Z=[...l.filter(r2=>r2.storageId&&B[r2.storageId]||!Q.find(g=>g.storageId===r2.storageId))],j=Q.filter(r2=>r2.storageId&&B[r2.storageId]&&!l.find(g=>g.storageId===r2.storageId));if(j.length>0){const r2=j.map(g=>({...g,contextId:X7(),status:"uploaded"}));Z.push(...r2)}o([...Z]),(_=z.current)==null||_.close()},G=()=>{var Z;(Z=z.current)==null||Z.close()},W=l.some(Z=>Z.status==="uploading"),L=!W&&c&&l.length>=c,w=!L&&!W;return E.jsxs(E.Fragment,{children:[E.jsxs(M.Field,{children:[E.jsx(M.Label,{style:{pointerEvents:"none"},children:E.jsx(P2,{text:r,required:n,optional:e})}),A&&E.jsx(M.Field.Description,{children:A}),E.jsx("input",{type:"file",style:{display:"none"},ref:v,id:"fileUploadButton",name:"fileUploadButton",accept:I.join(","),multiple:a,onChange:Z=>{const j=Z.target;j.files&&j.files.length>0&&(b(Array.from(j.files)),j.value="")}}),w&&E.jsxs(T,{gap:8,horizontal:!0,children:[u&&E.jsx("button",{className:b2.uploadButton,onClick:O,children:m("existingFiles.buttonOpen")}),E.jsx("button",{className:b2.uploadButton,onClick:()=>{var Z;return(Z=v.current)==null?void 0:Z.click()},children:t})]}),L&&E.jsxs("div",{className:b2.uploadInformation,children:[E.jsx(i2,{material:"info"}),E.jsx("span",{children:m("maxFilesReached")})]}),W&&E.jsxs("div",{className:b2.uploadInformation,children:[E.jsx(M.Spinner,{"aria-label":m("uploading"),"data-size":"2xs","data-color":"neutral"}),E.jsx("span",{children:m("uploadingPleaseWait")})]})," ",l&&l.length>0&&E.jsx("div",{className:b2.fileList,children:l.map(Z=>E.jsxs("div",{className:b2.fileItem,children:[E.jsxs(T,{children:[E.jsxs(T,{horizontal:!0,align:"center",gap:8,children:[E.jsx("span",{children:Z.fileName}),Z.status==="uploading"&&E.jsx(M.Spinner,{"aria-label":m("uploading"),"data-size":"2xs","data-color":"neutral"})]}),Z.status==="error"&&E.jsx(M.ValidationMessage,{children:Z.error})]}),E.jsx("button",{className:b2.removeButton,onClick:()=>{U(Z)},"aria-label":"Remove file",children:E.jsx(i2,{material:"close"})})]},Z.contextId))}),i&&E.jsx(M.ValidationMessage,{children:i})]}),E.jsx(M.Dialog,{ref:z,children:E.jsxs(T,{gap:16,children:[E.jsx(M.Heading,{level:2,"data-size":"sm",children:m("existingFiles.dialogTitle")}),k&&E.jsx(T,{horizontal:!0,align:"center",justify:"center",children:E.jsx(M.Spinner,{"aria-label":m("loading")})}),!k&&Q.length===0&&E.jsx(M.Paragraph,{children:m("existingFiles.noFilesAvailable")}),!k&&Q.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(T,{gap:12,my:16,children:Q.map(Z=>{var j,_,r2;return E.jsxs("div",{className:`${b2.existingFileItem} ${Z.storageId&&B[Z.storageId]?b2.selected:""}`,onClick:()=>{Z.storageId&&P(Z.storageId,!B[Z.storageId])},children:[E.jsx(M.Checkbox,{label:"",className:b2.checkbox,checked:Z.storageId&&B[Z.storageId]||!1,onChange:g=>{Z.storageId&&P(Z.storageId,g.target.checked)},onClick:g=>g.stopPropagation()}),E.jsx("div",{className:Z.thumbnailUri&&((j=Z.contentType)!=null&&j.startsWith("image/"))?b2.thumbnailContainer:b2.fileIconContainer,style:{"--thumbnail-uri":`url(${Z.thumbnailUri})`},children:Z.thumbnailUri&&((_=Z.contentType)!=null&&_.startsWith("image/"))?"":"📄"}),E.jsxs(T,{gap:8,horizontal:!0,align:"center",justify:"between",grow:!0,children:[E.jsx(M.Paragraph,{className:b2.fileName,children:Z.fileName||m("unknownFilename")}),Z.contentType&&E.jsx(C0,{className:b2.mimeType,children:(r2=Z.contentType)==null?void 0:r2.split("/").findLast(()=>!0)})]})]},Z.storageId)})}),E.jsxs(T,{horizontal:!0,gap:16,children:[E.jsx(M.Button,{onClick:V,variant:"primary",children:m("existingFiles.dialogConfirm")}),E.jsx(M.Button,{variant:"secondary",onClick:G,children:m("existingFiles.dialogCancel")})]})]})]})})]})},Yi=(r,n,e,t)=>{console.log("onFilesChanged",r,n);const A=[...n],i={};r.forEach(a=>{const l=X7();A.push({contextId:l,fileName:a.file.name,status:"uploading",contentType:a.file.type,exif:a.exif}),i[l]=a.file}),t(A),Object.keys(i).forEach(async a=>{try{const l=A.find(I=>I.contextId===a);if(!l)return;const c=new FormData;c.append("file",i[a],l.fileName);const o=await e(c);l.storageId=o,l.status="uploaded",delete l.error,t([...A])}catch(l){console.error("Error when uploading",l);const c=A.find(o=>o.contextId===a);if(!c)return;c.status="error",c.error="Failed to upload file",t([...A])}})},ki={icon:"_icon_1tg5o_1"},Ki=({icon:r,href:n,children:e,level:t=2,size:A="sm"})=>E.jsxs(T,{horizontal:!0,justify:"between",children:[n?E.jsx(M.Heading,{"data-size":A,level:t,children:E.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):E.jsx(M.Heading,{"data-size":A,level:t,children:e}),r&&E.jsx(i2,{material:r,className:ki.icon})]}),G7={href:"_href_1dstk_1",dashed:"_dashed_1dstk_5",subtle:"_subtle_1dstk_15"},i1=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:A=void 0,target:i="_blank",...a})=>{const l={...a};switch(r){case"filled":l.variant="primary";break;case"outline":l.variant="secondary";break;case"ghost":l.variant="tertiary";break;case"subtle":l.variant="primary",l.className=[l.className,G7.subtle].join(" ");break;case"dashed":l.variant="secondary",l.className=[l.className,G7.dashed].join(" ");break}return l["data-color"]=n,l["data-size"]=e,A&&(l.className=[l.className,G7.href].join(" ")),t&&A?(l.children=E.jsx("a",{href:A,target:i,rel:"noreferrer",children:t}),l.asChild=!0):t?l.children=t:A&&(l.children=E.jsx("a",{href:A,target:i,rel:"noreferrer",children:l.children}),l.asChild=!0),E.jsx(M.Button,{...l})},J1={sizeXxs:"_sizeXxs_18dzk_2",sizeXs:"_sizeXs_18dzk_7",sizeSm:"_sizeSm_18dzk_12",sizeMd:"_sizeMd_18dzk_16",sizeLg:"_sizeLg_18dzk_21",sizeFull:"_sizeFull_18dzk_26",sizeFit:"_sizeFit_18dzk_30"},P7=r=>{switch(r){case"2xs":return J1.sizeXxs;case"xs":return J1.sizeXs;case"sm":return J1.sizeSm;case"md":return J1.sizeMd;case"lg":return J1.sizeLg;case"full":return J1.sizeFull;case"fit":return J1.sizeFit}},qi=({autoComplete:r,size:n="full",type:e="text",className:t,...A})=>E.jsx(M.Textfield,{className:`${t} ${P7(n)}`,label:E.jsx(P2,{text:A.label,loading:A.loading,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,autoComplete:r,placeholder:A.placeholder,disabled:A.disabled,value:A.value??"",onBlur:A.onBlur,onChange:i=>{var a;(a=A.onChange)==null||a.call(A,i.target.value)},inputMode:A.inputMode,error:A.error,prefix:A.prefix,suffix:A.suffix,type:e}),xi={"align-right":"_align-right_dttaq_1"},Vi=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...A})=>{var l;const[i,a]=d.useState((l=A.value)==null?void 0:l.toString());return E.jsx(M.Textfield,{className:[e,P7(r),xi["align-"+t]].join(" "),label:E.jsx(P2,{text:A.label,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,placeholder:A.placeholder,disabled:A.disabled,value:i??"",onBlur:A.onBlur,onChange:c=>{var I;const o=c.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");[",","."].includes(o[o.length-1])?a(o):o.length>0?a(parseFloat(o).toString()):a(""),(I=A.onChange)==null||I.call(A,o?parseFloat(o):void 0)},inputMode:n,error:A.error,prefix:A.prefix,suffix:A.suffix,type:"text",min:A.min,max:A.max})},ji=({size:r="full",className:n,...e})=>E.jsx(M.Textfield,{className:`${n} ${P7(r)}`,label:E.jsx(P2,{text:e.label,required:e.required,optional:e.optional}),description:e.description,readOnly:e.readOnly,placeholder:e.placeholder,disabled:e.disabled,value:e.value??"",onBlur:e.onBlur,onChange:t=>{var A;(A=e.onChange)==null||A.call(e,t.target.value)},inputMode:e.inputMode,error:e.error,multiline:!0,counter:e.maxLength}),yi=({...r})=>{var i;const n=r.value?{value:r.value}:{defaultValue:""},[e,t]=d.useState(!1),A=[r.className,"override",e?"select-open":""].filter(Boolean).join(" ");return E.jsxs(M.Field,{children:[E.jsx(M.Label,{children:E.jsx(P2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&E.jsx(M.Field.Description,{children:r.description}),E.jsxs(M.Select,{className:A,width:"full",onChange:a=>{var l;(l=r.onChange)==null||l.call(r,a.target.value),t(!1)},onBlur:()=>{var a;(a=r.onBlur)==null||a.call(r),t(!1)},onMouseDown:()=>t(a=>!a),onKeyDown:a=>{a.key==="Enter"||a.key===" "||a.key==="ArrowDown"||a.key==="ArrowUp"?t(!0):a.key==="Escape"&&t(!1)},...n,children:[r.placeholder&&E.jsx(M.Select.Option,{disabled:!0,value:"",children:r.placeholder}),(i=r.options)==null?void 0:i.map(a=>E.jsx(M.Select.Option,{value:a.value,children:a.label??a.value},a.value))]}),r.error&&E.jsx(M.ValidationMessage,{children:r.error})]})},Oi={notUnderlined:"_notUnderlined_jhlgm_1"},q3=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(Oi.notUnderlined),E.jsx(M.Tabs,{className:t.join(""),...e})};q3.List=M.Tabs.List,q3.Tab=M.Tabs.Tab,q3.Panel=M.Tabs.Panel;const Wi={bordered:"_bordered_1n22g_2"},C0=({bordered:r=!1,className:n="",...e})=>{const t=[n];return r&&t.push(Wi.bordered),E.jsx(M.Tag,{className:t.join(" "),...e})},u0={"with-icon":"_with-icon_1cp54_2","link-icon":"_link-icon_1cp54_8","with-underline":"_with-underline_1cp54_12","link-icon-text":"_link-icon-text_1cp54_12","without-underline":"_without-underline_1cp54_16","without-icon":"_without-icon_1cp54_20"},J7=({underline:r,className:n,children:e,...t})=>{const A=[n];return r===void 0||r===!0?A.push(u0["with-underline"]):A.push(u0["without-underline"]),t.icon?(A.push(u0["with-icon"]),e=E.jsxs(E.Fragment,{children:[E.jsx(i2,{material:t.icon,size:"sm",className:u0["link-icon"]}),E.jsx("span",{className:u0["link-icon-text"],children:e})]})):A.push(u0["without-icon"]),E.jsx(M.Link,{className:A.join(" "),...t,children:e})},q0={opaqueHeader:"_opaqueHeader_yxlz3_1",table:"_table_yxlz3_6",white:"_white_yxlz3_10","cell-padding-md":"_cell-padding-md_yxlz3_50","radius-sm":"_radius-sm_yxlz3_55","radius-md":"_radius-md_yxlz3_59","radius-lg":"_radius-lg_yxlz3_63"},H1=({header:r="transparent",body:n="transparent",radius:e="none",className:t="","cell-padding":A="sm",...i})=>{i["data-color"]||(i["data-color"]="neutral");const a=[t,q0.table];return r&&r!=="transparent"&&a.push(q0.opaqueHeader),n&&n==="white"&&a.push(q0.white),e&&a.push(q0[`radius-${e}`]),A&&a.push(q0[`cell-padding-${A}`]),E.jsx(M.Table,{className:a.join(" "),...i})};H1.Cell=M.Table.Cell,H1.HeaderCell=M.Table.HeaderCell,H1.Head=M.Table.Head,H1.Body=M.Table.Body,H1.Row=M.Table.Row,H1.Foot=M.Table.Foot;const x3={size2xs:"_size2xs_1uyqe_1",size3xs:"_size3xs_1uyqe_8",surfaceTinted:"_surfaceTinted_1uyqe_15","border-solid":"_border-solid_1uyqe_92","border-dashed":"_border-dashed_1uyqe_96","border-dotted":"_border-dotted_1uyqe_100","border-double":"_border-double_1uyqe_104"},V3=({"data-size":r="md","data-color-variant":n="base",border:e,className:t,...A})=>{const i=[t];return r==="2xs"?i.push(x3.size2xs):r==="3xs"&&i.push(x3.size3xs),n==="surface-tinted"&&i.push(x3.surfaceTinted),e&&i.push(x3[`border-${e}`]),E.jsx(M.Avatar,{"data-size":r,className:i.join(" "),...A})};Object.defineProperty(p,"Badge",{enumerable:!0,get:()=>M.Badge}),Object.defineProperty(p,"BadgePosition",{enumerable:!0,get:()=>M.BadgePosition}),Object.defineProperty(p,"Breadcrumbs",{enumerable:!0,get:()=>M.Breadcrumbs}),Object.defineProperty(p,"BreadcrumbsItem",{enumerable:!0,get:()=>M.BreadcrumbsItem}),Object.defineProperty(p,"BreadcrumbsLink",{enumerable:!0,get:()=>M.BreadcrumbsLink}),Object.defineProperty(p,"BreadcrumbsList",{enumerable:!0,get:()=>M.BreadcrumbsList}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>M.Card}),Object.defineProperty(p,"CardBlock",{enumerable:!0,get:()=>M.CardBlock}),Object.defineProperty(p,"Checkbox",{enumerable:!0,get:()=>M.Checkbox}),Object.defineProperty(p,"Chip",{enumerable:!0,get:()=>M.Chip}),Object.defineProperty(p,"ChipButton",{enumerable:!0,get:()=>M.ChipButton}),Object.defineProperty(p,"ChipCheckbox",{enumerable:!0,get:()=>M.ChipCheckbox}),Object.defineProperty(p,"ChipRadio",{enumerable:!0,get:()=>M.ChipRadio}),Object.defineProperty(p,"ChipRemovable",{enumerable:!0,get:()=>M.ChipRemovable}),Object.defineProperty(p,"Combobox",{enumerable:!0,get:()=>M.Combobox}),Object.defineProperty(p,"ComboboxEmpty",{enumerable:!0,get:()=>M.ComboboxEmpty}),Object.defineProperty(p,"ComboboxOption",{enumerable:!0,get:()=>M.ComboboxOption}),Object.defineProperty(p,"Details",{enumerable:!0,get:()=>M.Details}),Object.defineProperty(p,"DetailsContent",{enumerable:!0,get:()=>M.DetailsContent}),Object.defineProperty(p,"DetailsSummary",{enumerable:!0,get:()=>M.DetailsSummary}),Object.defineProperty(p,"Dialog",{enumerable:!0,get:()=>M.Dialog}),Object.defineProperty(p,"DialogBlock",{enumerable:!0,get:()=>M.DialogBlock}),Object.defineProperty(p,"DialogTrigger",{enumerable:!0,get:()=>M.DialogTrigger}),Object.defineProperty(p,"DialogTriggerContext",{enumerable:!0,get:()=>M.DialogTriggerContext}),Object.defineProperty(p,"Divider",{enumerable:!0,get:()=>M.Divider}),Object.defineProperty(p,"Dropdown",{enumerable:!0,get:()=>M.Dropdown}),Object.defineProperty(p,"DropdownButton",{enumerable:!0,get:()=>M.DropdownButton}),Object.defineProperty(p,"DropdownHeading",{enumerable:!0,get:()=>M.DropdownHeading}),Object.defineProperty(p,"DropdownItem",{enumerable:!0,get:()=>M.DropdownItem}),Object.defineProperty(p,"DropdownList",{enumerable:!0,get:()=>M.DropdownList}),Object.defineProperty(p,"DropdownTrigger",{enumerable:!0,get:()=>M.DropdownTrigger}),Object.defineProperty(p,"DropdownTriggerContext",{enumerable:!0,get:()=>M.DropdownTriggerContext}),Object.defineProperty(p,"EXPERIMENTAL_Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionClear",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionClear}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionEmpty",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionEmpty}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionInput",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionInput}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionList",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionList}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionOption",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionOption}),Object.defineProperty(p,"ErrorSummary",{enumerable:!0,get:()=>M.ErrorSummary}),Object.defineProperty(p,"ErrorSummaryHeading",{enumerable:!0,get:()=>M.ErrorSummaryHeading}),Object.defineProperty(p,"ErrorSummaryItem",{enumerable:!0,get:()=>M.ErrorSummaryItem}),Object.defineProperty(p,"ErrorSummaryLink",{enumerable:!0,get:()=>M.ErrorSummaryLink}),Object.defineProperty(p,"ErrorSummaryList",{enumerable:!0,get:()=>M.ErrorSummaryList}),Object.defineProperty(p,"Field",{enumerable:!0,get:()=>M.Field}),Object.defineProperty(p,"FieldAffix",{enumerable:!0,get:()=>M.FieldAffix}),Object.defineProperty(p,"FieldAffixes",{enumerable:!0,get:()=>M.FieldAffixes}),Object.defineProperty(p,"FieldCounter",{enumerable:!0,get:()=>M.FieldCounter}),Object.defineProperty(p,"FieldDescription",{enumerable:!0,get:()=>M.FieldDescription}),Object.defineProperty(p,"Fieldset",{enumerable:!0,get:()=>M.Fieldset}),Object.defineProperty(p,"FieldsetDescription",{enumerable:!0,get:()=>M.FieldsetDescription}),Object.defineProperty(p,"FieldsetLegend",{enumerable:!0,get:()=>M.FieldsetLegend}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>M.Heading}),Object.defineProperty(p,"Input",{enumerable:!0,get:()=>M.Input}),Object.defineProperty(p,"Label",{enumerable:!0,get:()=>M.Label}),Object.defineProperty(p,"List",{enumerable:!0,get:()=>M.List}),Object.defineProperty(p,"ListItem",{enumerable:!0,get:()=>M.ListItem}),Object.defineProperty(p,"ListOrdered",{enumerable:!0,get:()=>M.ListOrdered}),Object.defineProperty(p,"ListUnordered",{enumerable:!0,get:()=>M.ListUnordered}),Object.defineProperty(p,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(p,"PaginationButton",{enumerable:!0,get:()=>M.PaginationButton}),Object.defineProperty(p,"PaginationItem",{enumerable:!0,get:()=>M.PaginationItem}),Object.defineProperty(p,"PaginationList",{enumerable:!0,get:()=>M.PaginationList}),Object.defineProperty(p,"Paragraph",{enumerable:!0,get:()=>M.Paragraph}),Object.defineProperty(p,"Popover",{enumerable:!0,get:()=>M.Popover}),Object.defineProperty(p,"PopoverTrigger",{enumerable:!0,get:()=>M.PopoverTrigger}),Object.defineProperty(p,"PopoverTriggerContext",{enumerable:!0,get:()=>M.PopoverTriggerContext}),Object.defineProperty(p,"Radio",{enumerable:!0,get:()=>M.Radio}),Object.defineProperty(p,"RovingFocusItem",{enumerable:!0,get:()=>M.RovingFocusItem}),Object.defineProperty(p,"RovingFocusRoot",{enumerable:!0,get:()=>M.RovingFocusRoot}),Object.defineProperty(p,"Search",{enumerable:!0,get:()=>M.Search}),Object.defineProperty(p,"SearchButton",{enumerable:!0,get:()=>M.SearchButton}),Object.defineProperty(p,"SearchClear",{enumerable:!0,get:()=>M.SearchClear}),Object.defineProperty(p,"SearchInput",{enumerable:!0,get:()=>M.SearchInput}),Object.defineProperty(p,"SelectOptgroup",{enumerable:!0,get:()=>M.SelectOptgroup}),Object.defineProperty(p,"Skeleton",{enumerable:!0,get:()=>M.Skeleton}),Object.defineProperty(p,"SkipLink",{enumerable:!0,get:()=>M.SkipLink}),Object.defineProperty(p,"Spinner",{enumerable:!0,get:()=>M.Spinner}),Object.defineProperty(p,"Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"Switch",{enumerable:!0,get:()=>M.Switch}),Object.defineProperty(p,"TableBody",{enumerable:!0,get:()=>M.TableBody}),Object.defineProperty(p,"TableCell",{enumerable:!0,get:()=>M.TableCell}),Object.defineProperty(p,"TableFoot",{enumerable:!0,get:()=>M.TableFoot}),Object.defineProperty(p,"TableHead",{enumerable:!0,get:()=>M.TableHead}),Object.defineProperty(p,"TableHeaderCell",{enumerable:!0,get:()=>M.TableHeaderCell}),Object.defineProperty(p,"TableRow",{enumerable:!0,get:()=>M.TableRow}),Object.defineProperty(p,"TabsList",{enumerable:!0,get:()=>M.TabsList}),Object.defineProperty(p,"TabsPanel",{enumerable:!0,get:()=>M.TabsPanel}),Object.defineProperty(p,"TabsTab",{enumerable:!0,get:()=>M.TabsTab}),Object.defineProperty(p,"Textarea",{enumerable:!0,get:()=>M.Textarea}),Object.defineProperty(p,"Textfield",{enumerable:!0,get:()=>M.Textfield}),Object.defineProperty(p,"ToggleGroup",{enumerable:!0,get:()=>M.ToggleGroup}),Object.defineProperty(p,"ToggleGroupItem",{enumerable:!0,get:()=>M.ToggleGroupItem}),Object.defineProperty(p,"Tooltip",{enumerable:!0,get:()=>M.Tooltip}),Object.defineProperty(p,"ValidationMessage",{enumerable:!0,get:()=>M.ValidationMessage}),Object.defineProperty(p,"omit",{enumerable:!0,get:()=>M.omit}),Object.defineProperty(p,"useCheckboxGroup",{enumerable:!0,get:()=>M.useCheckboxGroup}),Object.defineProperty(p,"useDebounceCallback",{enumerable:!0,get:()=>M.useDebounceCallback}),Object.defineProperty(p,"useIsomorphicLayoutEffect",{enumerable:!0,get:()=>M.useIsomorphicLayoutEffect}),Object.defineProperty(p,"useMediaQuery",{enumerable:!0,get:()=>M.useMediaQuery}),Object.defineProperty(p,"usePagination",{enumerable:!0,get:()=>M.usePagination}),Object.defineProperty(p,"useRadioGroup",{enumerable:!0,get:()=>M.useRadioGroup}),Object.defineProperty(p,"useSynchronizedAnimation",{enumerable:!0,get:()=>M.useSynchronizedAnimation}),p.Accent=P3,p.Alert=y9,p.Avatar=V3,p.Body=u1,p.BorderedRadioGroup=bt,p.BorderedToggleGroup=Rt,p.Box=T,p.Button=i1,p.CardTitle=Ki,p.DateTimePicker=NA,p.Datepicker=wA,p.DeprecatedCard=_7,p.DeprecatedDetails=v9,p.DeprecatedErrorLabel=m9,p.DeprecatedInputLabel=p9,p.FilePreviewer=T3,p.FileUploader=Ui,p.FileUploaderContext=u9,p.Footer=yt,p.Header=Wt,p.Icon=i2,p.ImageAisSat=qe,p.ImageArcticInfo=Ve,p.ImageAvgiftskalkulator=je,p.ImageBaatfartMarine=ye,p.ImageBestilleLos=Oe,p.ImageBoelgevarsel=We,p.ImageBwArcticinfo=zt,p.ImageBwBoelgevarsel=ht,p.ImageBwNais=pt,p.ImageBwOhoi=vt,p.ImageDatakatalog=xe,p.ImageDgps=Te,p.ImageDigitaleFyrbesoek=lt,p.ImageDigitaleReferanseruter=Xe,p.ImageEDialog=Ge,p.ImageFarledsbevis=Pe,p.ImageForespoerselSendt=mt,p.ImageHais=Ke,p.ImageHavbase=He,p.ImageHavnOgFarvannsloven=Fe,p.ImageIsmelding=we,p.ImageIstjeneste=De,p.ImageKikkert=Le,p.ImageKystdatahuset=Ne,p.ImageKystinfoKart=_e,p.ImageKystreise=Et,p.ImageKystvaer=Mt,p.ImageLavutslipp=$e,p.ImageLrit=et,p.ImageMarU=ot,p.ImageMegafon=ft,p.ImageNais=dt,p.ImageNasjonalHavneoversikt=tt,p.ImageNavarea=It,p.ImageNavigasjonsvarsler=nt,p.ImageOhoi=rt,p.ImageRegistrerteSeilaser=At,p.ImageSafeSeaNet=Ct,p.ImageSeLosbestilling=it,p.ImageSelvbetjening=ut,p.ImageSelvbetjeningRso=st,p.ImageSkipsrapportering=at,p.ImageSlukkedeFyrlys=ct,p.ImageSoeknadOmFarledsbevis=Je,p.KyvDivider=j9,p.LabelContent=P2,p.Link=J7,p.Logo=H3,p.NumberInput=Vi,p.Select=yi,p.Skillingsbuoye=Qt,p.Stepper=F9,p.StyrbordTranslationContext=c4,p.Summary=Kt,p.Table=H1,p.Tabs=q3,p.Tag=C0,p.TextArea=ji,p.TextInput=qi,p.Typography=Zt,p.svgImageColors=ke,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
29
+ Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(t+l,A),this.file.getUintBytes(t+l+A,i)];t+=m*I}}}class N5 extends L5{}y(N5,"type","heic");class _5 extends L5{}y(_5,"type","avif"),r1.set("heic",N5),r1.set("avif",_5),f2(M2,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),f2(M2,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[37380,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[42240,"Gamma"],[59932,"Padding"],[59933,"OffsetSchema"],[65e3,"OwnerName"],[65001,"SerialNumber"],[65002,"Lens"],[65100,"RawFile"],[65101,"Converter"],[65102,"WhiteBalance"],[65105,"Exposure"],[65106,"Shadows"],[65107,"Brightness"],[65108,"Contrast"],[65109,"Saturation"],[65110,"Sharpness"],[65111,"Smoothness"],[65112,"MoireFilter"],[40965,"InteropIFD"]]),f2(M2,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),f2(X2,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let k0=f2(X2,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const $5={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};k0.set(37392,$5),k0.set(41488,$5);const j7={0:"Normal",1:"Low",2:"High"};function e9(r){return typeof r=="object"&&r.length!==void 0?r[0]:r}function t9(r){let n=Array.from(r).slice(1);return n[1]>15&&(n=n.map(e=>String.fromCharCode(e))),n[2]!=="0"&&n[2]!==0||n.pop(),n.join(".")}function y7(r){if(typeof r=="string"){var[n,e,t,A,i,a]=r.trim().split(/[-: ]/g).map(Number),l=new Date(n,e-1,t);return Number.isNaN(A)||Number.isNaN(i)||Number.isNaN(a)||(l.setHours(A),l.setMinutes(i),l.setSeconds(a)),Number.isNaN(+l)?r:l}}function K0(r){if(typeof r=="string")return r;let n=[];if(r[1]===0&&r[r.length-1]===0)for(let e=0;e<r.length;e+=2)n.push(n9(r[e+1],r[e]));else for(let e=0;e<r.length;e+=2)n.push(n9(r[e],r[e+1]));return j1(String.fromCodePoint(...n))}function n9(r,n){return r<<8|n}k0.set(41992,j7),k0.set(41993,j7),k0.set(41994,j7),f2(h1,["ifd0","ifd1"],[[50827,function(r){return typeof r!="string"?y5(r):r}],[306,y7],[40091,K0],[40092,K0],[40093,K0],[40094,K0],[40095,K0]]),f2(h1,"exif",[[40960,t9],[36864,t9],[36867,y7],[36868,y7],[40962,e9],[40963,e9]]),f2(h1,"gps",[[0,r=>Array.from(r).join(".")],[7,r=>Array.from(r).join(":")]]);class O7 extends G2{static canHandle(n,e){return n.getUint8(e+1)===225&&n.getUint32(e+4)===1752462448&&n.getString(e+4,20)==="http://ns.adobe.com/"}static headerLength(n,e){return n.getString(e+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(n,e){let t=super.findPosition(n,e);return t.multiSegment=t.extended=t.headerLength===79,t.multiSegment?(t.chunkCount=n.getUint8(e+72),t.chunkNumber=n.getUint8(e+76),n.getUint8(e+77)!==0&&t.chunkNumber++):(t.chunkCount=1/0,t.chunkNumber=-1),t}static handleMultiSegments(n){return n.map(e=>e.chunk.getString()).join("")}normalizeInput(n){return typeof n=="string"?n:S2.from(n).getString()}parse(n=this.chunk){if(!this.localOptions.parse)return n;n=function(i){let a={},l={};for(let c of a9)a[c]=[],l[c]=0;return i.replace(mi,(c,o,I)=>{if(o==="<"){let f=++l[I];return a[I].push(f),`${c}#${f}`}return`${c}#${a[I].pop()}`})}(n);let e=f0.findAll(n,"rdf","Description");e.length===0&&e.push(new f0("rdf","Description",void 0,n));let t,A={};for(let i of e)for(let a of i.properties)t=Mi(a.ns,A),r9(a,t);return function(i){let a;for(let l in i)a=i[l]=Z3(i[l]),a===void 0&&delete i[l];return Z3(i)}(A)}assignToOutput(n,e){if(this.localOptions.parse)for(let[t,A]of Object.entries(e))switch(t){case"tiff":this.assignObjectToOutput(n,"ifd0",A);break;case"exif":this.assignObjectToOutput(n,"exif",A);break;case"xmlns":break;default:this.assignObjectToOutput(n,t,A)}else n.xmp=e}}y(O7,"type","xmp"),y(O7,"multiSegment",!0),u2.set("xmp",O7);class U3{static findAll(n){return A9(n,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(U3.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[3].slice(1,-1);return A=i9(A),new U3(e,t,A)}constructor(n,e,t){this.ns=n,this.name=e,this.value=t}serialize(){return this.value}}class f0{static findAll(n,e,t){if(e!==void 0||t!==void 0){e=e||"[\\w\\d-]+",t=t||"[\\w\\d-]+";var A=new RegExp(`<(${e}):(${t})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else A=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return A9(n,A).map(f0.unpackMatch)}static unpackMatch(n){let e=n[1],t=n[2],A=n[4],i=n[8];return new f0(e,t,A,i)}constructor(n,e,t,A){this.ns=n,this.name=e,this.attrString=t,this.innerXml=A,this.attrs=U3.findAll(t),this.children=f0.findAll(A),this.value=this.children.length===0?i9(A):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:n,name:e}=this;return n==="rdf"&&(e==="Seq"||e==="Bag"||e==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return di(this.children.map(si));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let n={};for(let e of this.properties)r9(e,n);return this.value!==void 0&&(n.value=this.value),Z3(n)}}function r9(r,n){let e=r.serialize();e!==void 0&&(n[r.name]=e)}var si=r=>r.serialize(),di=r=>r.length===1?r[0]:r,Mi=(r,n)=>n[r]?n[r]:n[r]={};function A9(r,n){let e,t=[];if(!r)return t;for(;(e=n.exec(r))!==null;)t.push(e);return t}function i9(r){if(function(t){return t==null||t==="null"||t==="undefined"||t===""||t.trim()===""}(r))return;let n=Number(r);if(!Number.isNaN(n))return n;let e=r.toLowerCase();return e==="true"||e!=="false"&&r.trim()}const a9=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],mi=new RegExp(`(<|\\/)(${a9.join("|")})`,"g");var pi=Object.freeze({__proto__:null,default:Ci,Exifr:R1,fileParsers:r1,segmentParsers:u2,fileReaders:A1,tagKeys:M2,tagValues:X2,tagRevivers:h1,createDictionary:f2,extendDictionary:W1,fetchUrlAsArrayBuffer:y1,readBlobAsArrayBuffer:O1,chunkedProps:z1,otherSegments:I0,segments:T1,tiffBlocks:c2,segmentsAndBlocks:g1,tiffExtractables:Q1,inheritables:E0,allFormatters:Z1,Options:X1,parse:b3,gpsOnlyOptions:k7,gps:J5,thumbnailOnlyOptions:K7,thumbnail:H5,thumbnailUrl:F5,orientationOnlyOptions:q7,orientation:x7,rotations:V7,get rotateCanvas(){return G1},get rotateCss(){return P1},rotation:D5});let l9=Q3("fs",r=>r.promises);A1.set("fs",class extends B3{async readWhole(){this.chunked=!1,this.fs=await l9;let r=await this.fs.readFile(this.input);this._swapBuffer(r)}async readChunked(){this.chunked=!0,this.fs=await l9,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}async _readChunk(r,n){this.fh===void 0&&await this.open(),r+n>this.size&&(n=this.size-r);var e=this.subarray(r,n,!0);return await this.fh.read(e.dataView,0,n,r),e}async close(){if(this.fh){let r=this.fh;this.fh=void 0,await r.close()}}}),A1.set("base64",class extends B3{constructor(...r){super(...r),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(r,n){let e,t,A=this.input;r===void 0?(r=0,e=0,t=0):(e=4*Math.floor(r/3),t=r-e/4*3),n===void 0&&(n=this.size);let i=r+n,a=e+4*Math.ceil(i/3);A=A.slice(e,a);let l=Math.min(n,this.size-r);if(g3){let c=h3.from(A,"base64").slice(t,t+l);return this.set(c,r,!0)}{let c=this.subarray(r,l,!0),o=atob(A),I=c.toUint8();for(let f=0;f<l;f++)I[f]=o.charCodeAt(t+f);return c}}});class c9 extends S3{static canHandle(n,e){return e===18761||e===19789}extendOptions(n){let{ifd0:e,xmp:t,iptc:A,icc:i}=n;t.enabled&&e.deps.add(700),A.enabled&&e.deps.add(33723),i.enabled&&e.deps.add(34675),e.finalizeFilters()}async parse(){let{tiff:n,xmp:e,iptc:t,icc:A}=this.options;if(n.enabled||e.enabled||t.enabled||A.enabled){let i=Math.max(g7(this.options),this.options.chunkSize);await this.file.ensureChunk(0,i),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(n){if(this.parsers.tiff[n]){let e=this.parsers.tiff[n];this.injectSegment(n,e)}}}y(c9,"type","tiff"),r1.set("tiff",c9);let vi=Q3("zlib");const hi=["ihdr","iccp","text","itxt","exif"];class o9 extends S3{constructor(...n){super(...n),y(this,"catchError",e=>this.errors.push(e)),y(this,"metaChunks",[]),y(this,"unknownChunks",[])}static canHandle(n,e){return e===35152&&n.getUint32(0)===2303741511&&n.getUint32(4)===218765834}async parse(){let{file:n}=this;await this.findPngChunksInRange(8,n.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(n,e){let{file:t}=this;for(;n<e;){let A=t.getUint32(n),i=t.getUint32(n+4),a=t.getString(n+4,4).toLowerCase(),l=A+4+4+4,c={type:a,offset:n,length:l,start:n+4+4,size:A,marker:i};hi.includes(a)?this.metaChunks.push(c):this.unknownChunks.push(c),n+=l}}parseTextChunks(){let n=this.metaChunks.filter(e=>e.type==="text");for(let e of n){let[t,A]=this.file.getString(e.start,e.size).split("\0");this.injectKeyValToIhdr(t,A)}}injectKeyValToIhdr(n,e){let t=this.parsers.ihdr;t&&t.raw.set(n,e)}findIhdr(){let n=this.metaChunks.find(e=>e.type==="ihdr");n&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",n.chunk)}async findExif(){let n=this.metaChunks.find(e=>e.type==="exif");n&&this.injectSegment("tiff",n.chunk)}async findXmp(){let n=this.metaChunks.filter(e=>e.type==="itxt");for(let e of n)e.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",e.chunk)}async findIcc(){let n=this.metaChunks.find(l=>l.type==="iccp");if(!n)return;let{chunk:e}=n,t=e.getUint8Array(0,81),A=0;for(;A<80&&t[A]!==0;)A++;let i=A+2,a=e.getString(0,A);if(this.injectKeyValToIhdr("ProfileName",a),v3){let l=await vi,c=e.getUint8Array(i);c=l.inflateSync(c),this.injectSegment("icc",c)}}}y(o9,"type","png"),r1.set("png",o9),f2(M2,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),W1(M2,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[50721,"ColorMatrix1"],[50722,"ColorMatrix2"],[50723,"CameraCalibration1"],[50724,"CameraCalibration2"],[50725,"ReductionMatrix1"],[50726,"ReductionMatrix2"],[50727,"AnalogBalance"],[50728,"AsShotNeutral"],[50729,"AsShotWhiteXY"],[50730,"BaselineExposure"],[50731,"BaselineNoise"],[50732,"BaselineSharpness"],[50734,"LinearResponseLimit"],[50735,"CameraSerialNumber"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[50781,"RawDataUniqueID"],[50827,"OriginalRawFileName"],[50828,"OriginalRawFileData"],[50831,"AsShotICCProfile"],[50832,"AsShotPreProfileMatrix"],[50833,"CurrentICCProfile"],[50834,"CurrentPreProfileMatrix"],[50879,"ColorimetricReference"],[50885,"SRawType"],[50898,"PanasonicTitle"],[50899,"PanasonicTitle2"],[50931,"CameraCalibrationSig"],[50932,"ProfileCalibrationSig"],[50933,"ProfileIFD"],[50934,"AsShotProfileName"],[50936,"ProfileName"],[50937,"ProfileHueSatMapDims"],[50938,"ProfileHueSatMapData1"],[50939,"ProfileHueSatMapData2"],[50940,"ProfileToneCurve"],[50941,"ProfileEmbedPolicy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[50971,"PreviewDateTime"],[50972,"RawImageDigest"],[50973,"OriginalRawFileDigest"],[50981,"ProfileLookTableDims"],[50982,"ProfileLookTableData"],[51043,"TimeCodes"],[51044,"FrameRate"],[51058,"TStop"],[51081,"ReelName"],[51089,"OriginalDefaultFinalSize"],[51090,"OriginalBestQualitySize"],[51091,"OriginalDefaultCropSize"],[51105,"CameraLabel"],[51107,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let I9=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"CIP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];W1(M2,"ifd0",I9),W1(M2,"exif",I9),f2(X2,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class W7 extends G2{static canHandle(n,e){return n.getUint8(e+1)===224&&n.getUint32(e+4)===1246120262&&n.getUint8(e+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}y(W7,"type","jfif"),y(W7,"headerLength",9),u2.set("jfif",W7),f2(M2,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class E9 extends G2{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}y(E9,"type","ihdr"),u2.set("ihdr",E9),f2(M2,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),f2(X2,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class Y3 extends G2{static canHandle(n,e){return n.getUint8(e+1)===226&&n.getUint32(e+4)===1229144927}static findPosition(n,e){let t=super.findPosition(n,e);return t.chunkNumber=n.getUint8(e+16),t.chunkCount=n.getUint8(e+17),t.multiSegment=t.chunkCount>1,t}static handleMultiSegments(n){return function(e){let t=function(A){let i=A[0].constructor,a=0;for(let o of A)a+=o.length;let l=new i(a),c=0;for(let o of A)l.set(o,c),c+=o.length;return l}(e.map(A=>A.chunk.toUint8()));return new S2(t)}(n)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:n}=this;this.chunk.byteLength<84&&C2("ICC header is too short");for(let[e,t]of Object.entries(zi)){e=parseInt(e,10);let A=t(this.chunk,e);A!=="\0\0\0\0"&&n.set(e,A)}}parseTags(){let n,e,t,A,i,{raw:a}=this,l=this.chunk.getUint32(128),c=132,o=this.chunk.byteLength;for(;l--;){if(n=this.chunk.getString(c,4),e=this.chunk.getUint32(c+4),t=this.chunk.getUint32(c+8),A=this.chunk.getString(e,4),e+t>o)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");i=this.parseTag(A,e,t),i!==void 0&&i!=="\0\0\0\0"&&a.set(n,i),c+=12}}parseTag(n,e,t){switch(n){case"desc":return this.parseDesc(e);case"mluc":return this.parseMluc(e);case"text":return this.parseText(e,t);case"sig ":return this.parseSig(e)}if(!(e+t>this.chunk.byteLength))return this.chunk.getUint8Array(e,t)}parseDesc(n){let e=this.chunk.getUint32(n+8)-1;return j1(this.chunk.getString(n+12,e))}parseText(n,e){return j1(this.chunk.getString(n+8,e-8))}parseSig(n){return j1(this.chunk.getString(n+8,4))}parseMluc(n){let{chunk:e}=this,t=e.getUint32(n+8),A=e.getUint32(n+12),i=n+16,a=[];for(let l=0;l<t;l++){let c=e.getString(i+0,2),o=e.getString(i+2,2),I=e.getUint32(i+4),f=e.getUint32(i+8)+n,u=j1(e.getUnicodeString(f,I));a.push({lang:c,country:o,text:u}),i+=A}return t===1?a[0].text:a}translateValue(n,e){return typeof n=="string"?e[n]||e[n.toLowerCase()]||n:e[n]||n}}y(Y3,"type","icc"),y(Y3,"multiSegment",!0),y(Y3,"headerLength",18);const zi={4:C1,8:function(r,n){return[r.getUint8(n),r.getUint8(n+1)>>4,r.getUint8(n+1)%16].map(e=>e.toString(10)).join(".")},12:C1,16:C1,20:C1,24:function(r,n){const e=r.getUint16(n),t=r.getUint16(n+2)-1,A=r.getUint16(n+4),i=r.getUint16(n+6),a=r.getUint16(n+8),l=r.getUint16(n+10);return new Date(Date.UTC(e,t,A,i,a,l))},36:C1,40:C1,48:C1,52:C1,64:(r,n)=>r.getUint32(n),80:C1};function C1(r,n){return j1(r.getString(n,4))}u2.set("icc",Y3),f2(M2,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const k3={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Display Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergdesign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},f9={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};f2(X2,"icc",[[4,k3],[12,f9],[40,Object.assign({},k3,f9)],[48,k3],[80,k3],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class K3 extends G2{static canHandle(n,e,t){return n.getUint8(e+1)===237&&n.getString(e+4,9)==="Photoshop"&&this.containsIptc8bim(n,e,t)!==void 0}static headerLength(n,e,t){let A,i=this.containsIptc8bim(n,e,t);if(i!==void 0)return A=n.getUint8(e+i+7),A%2!=0&&(A+=1),A===0&&(A=4),i+8+A}static containsIptc8bim(n,e,t){for(let A=0;A<t;A++)if(this.isIptcSegmentHead(n,e+A))return A}static isIptcSegmentHead(n,e){return n.getUint8(e)===56&&n.getUint32(e)===943868237&&n.getUint16(e+4)===1028}parse(){let{raw:n}=this,e=this.chunk.byteLength-1,t=!1;for(let A=0;A<e;A++)if(this.chunk.getUint8(A)===28&&this.chunk.getUint8(A+1)===2){t=!0;let i=this.chunk.getUint16(A+3),a=this.chunk.getUint8(A+2),l=this.chunk.getLatin1String(A+5,i);n.set(a,this.pluralizeValue(n.get(a),l)),A+=4+i}else if(t)break;return this.translate(),this.output}pluralizeValue(n,e){return n!==void 0?n instanceof Array?(n.push(e),n):[n,e]:e}}y(K3,"type","iptc"),y(K3,"translateValues",!1),y(K3,"reviveValues",!1),u2.set("iptc",K3),f2(M2,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),f2(X2,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);const h2=[];for(let r=0;r<256;++r)h2.push((r+256).toString(16).slice(1));function gi(r,n=0){return(h2[r[n+0]]+h2[r[n+1]]+h2[r[n+2]]+h2[r[n+3]]+"-"+h2[r[n+4]]+h2[r[n+5]]+"-"+h2[r[n+6]]+h2[r[n+7]]+"-"+h2[r[n+8]]+h2[r[n+9]]+"-"+h2[r[n+10]]+h2[r[n+11]]+h2[r[n+12]]+h2[r[n+13]]+h2[r[n+14]]+h2[r[n+15]]).toLowerCase()}let T7;const Qi=new Uint8Array(16);function Zi(){if(!T7){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");T7=crypto.getRandomValues.bind(crypto)}return T7(Qi)}const C9={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function X7(r,n,e){var A;if(C9.randomUUID&&!r)return C9.randomUUID();r=r||{};const t=r.random??((A=r.rng)==null?void 0:A.call(r))??Zi();if(t.length<16)throw new Error("Random bytes length must be >= 16");return t[6]=t[6]&15|64,t[8]=t[8]&63|128,gi(t)}const Ri=async()=>new Promise(r=>{setTimeout(()=>{r(X7())},2500)}),bi=async()=>new Promise(r=>{setTimeout(()=>{r()},2500)}),u9=d.createContext({uploadFile:Ri,deleteFile:bi}),Si=r=>{if(r)return{latitude:r.latitude,longitude:r.longitude}},Bi=[".pdf",".jpg",".jpeg",".png"],Ui=({label:r,required:n,optional:e,buttonLabel:t,description:A="",error:i=null,multiple:a=!0,files:l=[],maxFiles:c,onChange:o,allowedFileTypes:I=Bi,translations:f,existingFilesProvider:u})=>{const{at:s}=F3(),m=s.bind(null,"fileUploader",f),h=d.useContext(u9),v=d.useRef(null),z=d.useRef(null),[Q,R]=d.useState([]),[k,x]=d.useState(!1),[B,K]=d.useState({}),b=Z=>{Promise.all(Z.map(async j=>{try{return{file:j,exif:Si(await pi.parse(j))}}catch(_){return console.log("Error when parsing exif data, assuming image does not have any",_),{file:j}}})).then(j=>{Yi(j,l,h.uploadFile,o)})},U=Z=>{o(l.filter(j=>j.contextId!==Z.contextId))},O=async()=>{var Z;u&&(x(!0),(async()=>{const j=await u();R(j),K(j.reduce((_,r2)=>(r2.storageId&&(_[r2.storageId]=!!l.find(g=>g.storageId===r2.storageId)),_),{})),x(!1)})(),(Z=z.current)==null||Z.showModal())},P=(Z,j)=>{K(_=>({..._,[Z]:j}))},V=()=>{var _;const Z=[...l.filter(r2=>r2.storageId&&B[r2.storageId]||!Q.find(g=>g.storageId===r2.storageId))],j=Q.filter(r2=>r2.storageId&&B[r2.storageId]&&!l.find(g=>g.storageId===r2.storageId));if(j.length>0){const r2=j.map(g=>({...g,contextId:X7(),status:"uploaded"}));Z.push(...r2)}o([...Z]),(_=z.current)==null||_.close()},G=()=>{var Z;(Z=z.current)==null||Z.close()},W=l.some(Z=>Z.status==="uploading"),L=!W&&c&&l.length>=c,w=!L&&!W;return E.jsxs(E.Fragment,{children:[E.jsxs(M.Field,{children:[E.jsx(M.Label,{style:{pointerEvents:"none"},children:E.jsx(P2,{text:r,required:n,optional:e})}),A&&E.jsx(M.Field.Description,{children:A}),E.jsx("input",{type:"file",style:{display:"none"},ref:v,id:"fileUploadButton",name:"fileUploadButton",accept:I.join(","),multiple:a,onChange:Z=>{const j=Z.target;j.files&&j.files.length>0&&(b(Array.from(j.files)),j.value="")}}),w&&E.jsxs(T,{gap:8,horizontal:!0,children:[u&&E.jsx("button",{className:b2.uploadButton,onClick:O,children:m("existingFiles.buttonOpen")}),E.jsx("button",{className:b2.uploadButton,onClick:()=>{var Z;return(Z=v.current)==null?void 0:Z.click()},children:t})]}),L&&E.jsxs("div",{className:b2.uploadInformation,children:[E.jsx(i2,{material:"info"}),E.jsx("span",{children:m("maxFilesReached")})]}),W&&E.jsxs("div",{className:b2.uploadInformation,children:[E.jsx(M.Spinner,{"aria-label":m("uploading"),"data-size":"2xs","data-color":"neutral"}),E.jsx("span",{children:m("uploadingPleaseWait")})]})," ",l&&l.length>0&&E.jsx("div",{className:b2.fileList,children:l.map(Z=>E.jsxs("div",{className:b2.fileItem,children:[E.jsxs(T,{children:[E.jsxs(T,{horizontal:!0,align:"center",gap:8,children:[E.jsx("span",{children:Z.fileName}),Z.status==="uploading"&&E.jsx(M.Spinner,{"aria-label":m("uploading"),"data-size":"2xs","data-color":"neutral"})]}),Z.status==="error"&&E.jsx(M.ValidationMessage,{children:Z.error})]}),E.jsx("button",{className:b2.removeButton,onClick:()=>{U(Z)},"aria-label":"Remove file",children:E.jsx(i2,{material:"close"})})]},Z.contextId))}),i&&E.jsx(M.ValidationMessage,{children:i})]}),E.jsx(M.Dialog,{ref:z,children:E.jsxs(T,{gap:16,children:[E.jsx(M.Heading,{level:2,"data-size":"sm",children:m("existingFiles.dialogTitle")}),k&&E.jsx(T,{horizontal:!0,align:"center",justify:"center",children:E.jsx(M.Spinner,{"aria-label":m("loading")})}),!k&&Q.length===0&&E.jsx(M.Paragraph,{children:m("existingFiles.noFilesAvailable")}),!k&&Q.length>0&&E.jsxs(E.Fragment,{children:[E.jsx(T,{gap:12,my:16,children:Q.map(Z=>{var j,_,r2;return E.jsxs("div",{className:`${b2.existingFileItem} ${Z.storageId&&B[Z.storageId]?b2.selected:""}`,onClick:()=>{Z.storageId&&P(Z.storageId,!B[Z.storageId])},children:[E.jsx(M.Checkbox,{label:"",className:b2.checkbox,checked:Z.storageId&&B[Z.storageId]||!1,onChange:g=>{Z.storageId&&P(Z.storageId,g.target.checked)},onClick:g=>g.stopPropagation()}),E.jsx("div",{className:Z.thumbnailUri&&((j=Z.contentType)!=null&&j.startsWith("image/"))?b2.thumbnailContainer:b2.fileIconContainer,style:{"--thumbnail-uri":`url(${Z.thumbnailUri})`},children:Z.thumbnailUri&&((_=Z.contentType)!=null&&_.startsWith("image/"))?"":"📄"}),E.jsxs(T,{gap:8,horizontal:!0,align:"center",justify:"between",grow:!0,children:[E.jsx(M.Paragraph,{className:b2.fileName,children:Z.fileName||m("unknownFilename")}),Z.contentType&&E.jsx(C0,{className:b2.mimeType,children:(r2=Z.contentType)==null?void 0:r2.split("/").findLast(()=>!0)})]})]},Z.storageId)})}),E.jsxs(T,{horizontal:!0,gap:16,children:[E.jsx(M.Button,{onClick:V,variant:"primary",children:m("existingFiles.dialogConfirm")}),E.jsx(M.Button,{variant:"secondary",onClick:G,children:m("existingFiles.dialogCancel")})]})]})]})})]})},Yi=(r,n,e,t)=>{console.log("onFilesChanged",r,n);const A=[...n],i={};r.forEach(a=>{const l=X7();A.push({contextId:l,fileName:a.file.name,status:"uploading",contentType:a.file.type,exif:a.exif}),i[l]=a.file}),t(A),Object.keys(i).forEach(async a=>{try{const l=A.find(I=>I.contextId===a);if(!l)return;const c=new FormData;c.append("file",i[a],l.fileName);const o=await e(c);l.storageId=o,l.status="uploaded",delete l.error,t([...A])}catch(l){console.error("Error when uploading",l);const c=A.find(o=>o.contextId===a);if(!c)return;c.status="error",c.error="Failed to upload file",t([...A])}})},ki={icon:"_icon_1tg5o_1"},Ki=({icon:r,href:n,children:e,level:t=2,size:A="sm"})=>E.jsxs(T,{horizontal:!0,justify:"between",children:[n?E.jsx(M.Heading,{"data-size":A,level:t,children:E.jsx("a",{className:"styrbord-card-link",href:n,children:e})}):E.jsx(M.Heading,{"data-size":A,level:t,children:e}),r&&E.jsx(i2,{material:r,className:ki.icon})]}),G7={href:"_href_1dstk_1",dashed:"_dashed_1dstk_5",subtle:"_subtle_1dstk_15"},i1=({variant:r="outline",color:n=void 0,size:e="md",text:t=void 0,href:A=void 0,target:i="_blank",...a})=>{const l={...a};switch(r){case"filled":l.variant="primary";break;case"outline":l.variant="secondary";break;case"ghost":l.variant="tertiary";break;case"subtle":l.variant="primary",l.className=[l.className,G7.subtle].join(" ");break;case"dashed":l.variant="secondary",l.className=[l.className,G7.dashed].join(" ");break}return l["data-color"]=n,l["data-size"]=e,A&&(l.className=[l.className,G7.href].join(" ")),t&&A?(l.children=E.jsx("a",{href:A,target:i,rel:"noreferrer",children:t}),l.asChild=!0):t?l.children=t:A&&(l.children=E.jsx("a",{href:A,target:i,rel:"noreferrer",children:l.children}),l.asChild=!0),E.jsx(M.Button,{...l})},J1={sizeXxs:"_sizeXxs_18dzk_2",sizeXs:"_sizeXs_18dzk_7",sizeSm:"_sizeSm_18dzk_12",sizeMd:"_sizeMd_18dzk_16",sizeLg:"_sizeLg_18dzk_21",sizeFull:"_sizeFull_18dzk_26",sizeFit:"_sizeFit_18dzk_30"},P7=r=>{switch(r){case"2xs":return J1.sizeXxs;case"xs":return J1.sizeXs;case"sm":return J1.sizeSm;case"md":return J1.sizeMd;case"lg":return J1.sizeLg;case"full":return J1.sizeFull;case"fit":return J1.sizeFit}},qi=({autoComplete:r,size:n="full",type:e="text",className:t,...A})=>E.jsx(M.Textfield,{className:`${t} ${P7(n)}`,label:E.jsx(P2,{text:A.label,loading:A.loading,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,autoComplete:r,placeholder:A.placeholder,disabled:A.disabled,value:A.value??"",onBlur:A.onBlur,onChange:i=>{var a;(a=A.onChange)==null||a.call(A,i.target.value)},inputMode:A.inputMode,error:A.error,prefix:A.prefix,suffix:A.suffix,type:e}),xi={"align-right":"_align-right_dttaq_1"},Vi=({size:r="full",inputMode:n="numeric",className:e,align:t="left",...A})=>{var l,c;const[i,a]=d.useState((l=A.value)==null?void 0:l.toString());return String(A.value)!==String(i)&&a((c=A.value)==null?void 0:c.toString()),E.jsx(M.Textfield,{className:[e,P7(r),xi["align-"+t]].join(" "),label:E.jsx(P2,{text:A.label,required:A.required,optional:A.optional}),description:A.description,readOnly:A.readOnly,placeholder:A.placeholder,disabled:A.disabled,value:i??"",onBlur:A.onBlur,onChange:o=>{var f;const I=o.target.value.replace(",",".").replace(/[^0-9.,-]/g,"");[",","."].includes(I[I.length-1])?a(I):I.length>0?a(parseFloat(I).toString()):a(""),(f=A.onChange)==null||f.call(A,I?parseFloat(I):void 0)},inputMode:n,error:A.error,prefix:A.prefix,suffix:A.suffix,type:"text",min:A.min,max:A.max})},ji=({size:r="full",className:n,...e})=>E.jsx(M.Textfield,{className:`${n} ${P7(r)}`,label:E.jsx(P2,{text:e.label,required:e.required,optional:e.optional}),description:e.description,readOnly:e.readOnly,placeholder:e.placeholder,disabled:e.disabled,value:e.value??"",onBlur:e.onBlur,onChange:t=>{var A;(A=e.onChange)==null||A.call(e,t.target.value)},inputMode:e.inputMode,error:e.error,multiline:!0,counter:e.maxLength}),yi=({...r})=>{var i;const n=r.value?{value:r.value}:{defaultValue:""},[e,t]=d.useState(!1),A=[r.className,"override",e?"select-open":""].filter(Boolean).join(" ");return E.jsxs(M.Field,{children:[E.jsx(M.Label,{children:E.jsx(P2,{text:r.label,required:r.required,optional:r.optional})}),r.description&&E.jsx(M.Field.Description,{children:r.description}),E.jsxs(M.Select,{className:A,width:"full",onChange:a=>{var l;(l=r.onChange)==null||l.call(r,a.target.value),t(!1)},onBlur:()=>{var a;(a=r.onBlur)==null||a.call(r),t(!1)},onMouseDown:()=>t(a=>!a),onKeyDown:a=>{a.key==="Enter"||a.key===" "||a.key==="ArrowDown"||a.key==="ArrowUp"?t(!0):a.key==="Escape"&&t(!1)},...n,children:[r.placeholder&&E.jsx(M.Select.Option,{disabled:!0,value:"",children:r.placeholder}),(i=r.options)==null?void 0:i.map(a=>E.jsx(M.Select.Option,{value:a.value,children:a.label??a.value},a.value))]}),r.error&&E.jsx(M.ValidationMessage,{children:r.error})]})},Oi={notUnderlined:"_notUnderlined_jhlgm_1"},q3=({underlined:r=!0,className:n="",...e})=>{const t=[n];return r||t.push(Oi.notUnderlined),E.jsx(M.Tabs,{className:t.join(""),...e})};q3.List=M.Tabs.List,q3.Tab=M.Tabs.Tab,q3.Panel=M.Tabs.Panel;const Wi={bordered:"_bordered_1n22g_2"},C0=({bordered:r=!1,className:n="",...e})=>{const t=[n];return r&&t.push(Wi.bordered),E.jsx(M.Tag,{className:t.join(" "),...e})},u0={"with-icon":"_with-icon_1cp54_2","link-icon":"_link-icon_1cp54_8","with-underline":"_with-underline_1cp54_12","link-icon-text":"_link-icon-text_1cp54_12","without-underline":"_without-underline_1cp54_16","without-icon":"_without-icon_1cp54_20"},J7=({underline:r,className:n,children:e,...t})=>{const A=[n];return r===void 0||r===!0?A.push(u0["with-underline"]):A.push(u0["without-underline"]),t.icon?(A.push(u0["with-icon"]),e=E.jsxs(E.Fragment,{children:[E.jsx(i2,{material:t.icon,size:"sm",className:u0["link-icon"]}),E.jsx("span",{className:u0["link-icon-text"],children:e})]})):A.push(u0["without-icon"]),E.jsx(M.Link,{className:A.join(" "),...t,children:e})},q0={opaqueHeader:"_opaqueHeader_yxlz3_1",table:"_table_yxlz3_6",white:"_white_yxlz3_10","cell-padding-md":"_cell-padding-md_yxlz3_50","radius-sm":"_radius-sm_yxlz3_55","radius-md":"_radius-md_yxlz3_59","radius-lg":"_radius-lg_yxlz3_63"},H1=({header:r="transparent",body:n="transparent",radius:e="none",className:t="","cell-padding":A="sm",...i})=>{i["data-color"]||(i["data-color"]="neutral");const a=[t,q0.table];return r&&r!=="transparent"&&a.push(q0.opaqueHeader),n&&n==="white"&&a.push(q0.white),e&&a.push(q0[`radius-${e}`]),A&&a.push(q0[`cell-padding-${A}`]),E.jsx(M.Table,{className:a.join(" "),...i})};H1.Cell=M.Table.Cell,H1.HeaderCell=M.Table.HeaderCell,H1.Head=M.Table.Head,H1.Body=M.Table.Body,H1.Row=M.Table.Row,H1.Foot=M.Table.Foot;const x3={size2xs:"_size2xs_1uyqe_1",size3xs:"_size3xs_1uyqe_8",surfaceTinted:"_surfaceTinted_1uyqe_15","border-solid":"_border-solid_1uyqe_92","border-dashed":"_border-dashed_1uyqe_96","border-dotted":"_border-dotted_1uyqe_100","border-double":"_border-double_1uyqe_104"},V3=({"data-size":r="md","data-color-variant":n="base",border:e,className:t,...A})=>{const i=[t];return r==="2xs"?i.push(x3.size2xs):r==="3xs"&&i.push(x3.size3xs),n==="surface-tinted"&&i.push(x3.surfaceTinted),e&&i.push(x3[`border-${e}`]),E.jsx(M.Avatar,{"data-size":r,className:i.join(" "),...A})};Object.defineProperty(p,"Badge",{enumerable:!0,get:()=>M.Badge}),Object.defineProperty(p,"BadgePosition",{enumerable:!0,get:()=>M.BadgePosition}),Object.defineProperty(p,"Breadcrumbs",{enumerable:!0,get:()=>M.Breadcrumbs}),Object.defineProperty(p,"BreadcrumbsItem",{enumerable:!0,get:()=>M.BreadcrumbsItem}),Object.defineProperty(p,"BreadcrumbsLink",{enumerable:!0,get:()=>M.BreadcrumbsLink}),Object.defineProperty(p,"BreadcrumbsList",{enumerable:!0,get:()=>M.BreadcrumbsList}),Object.defineProperty(p,"Card",{enumerable:!0,get:()=>M.Card}),Object.defineProperty(p,"CardBlock",{enumerable:!0,get:()=>M.CardBlock}),Object.defineProperty(p,"Checkbox",{enumerable:!0,get:()=>M.Checkbox}),Object.defineProperty(p,"Chip",{enumerable:!0,get:()=>M.Chip}),Object.defineProperty(p,"ChipButton",{enumerable:!0,get:()=>M.ChipButton}),Object.defineProperty(p,"ChipCheckbox",{enumerable:!0,get:()=>M.ChipCheckbox}),Object.defineProperty(p,"ChipRadio",{enumerable:!0,get:()=>M.ChipRadio}),Object.defineProperty(p,"ChipRemovable",{enumerable:!0,get:()=>M.ChipRemovable}),Object.defineProperty(p,"Combobox",{enumerable:!0,get:()=>M.Combobox}),Object.defineProperty(p,"ComboboxEmpty",{enumerable:!0,get:()=>M.ComboboxEmpty}),Object.defineProperty(p,"ComboboxOption",{enumerable:!0,get:()=>M.ComboboxOption}),Object.defineProperty(p,"Details",{enumerable:!0,get:()=>M.Details}),Object.defineProperty(p,"DetailsContent",{enumerable:!0,get:()=>M.DetailsContent}),Object.defineProperty(p,"DetailsSummary",{enumerable:!0,get:()=>M.DetailsSummary}),Object.defineProperty(p,"Dialog",{enumerable:!0,get:()=>M.Dialog}),Object.defineProperty(p,"DialogBlock",{enumerable:!0,get:()=>M.DialogBlock}),Object.defineProperty(p,"DialogTrigger",{enumerable:!0,get:()=>M.DialogTrigger}),Object.defineProperty(p,"DialogTriggerContext",{enumerable:!0,get:()=>M.DialogTriggerContext}),Object.defineProperty(p,"Divider",{enumerable:!0,get:()=>M.Divider}),Object.defineProperty(p,"Dropdown",{enumerable:!0,get:()=>M.Dropdown}),Object.defineProperty(p,"DropdownButton",{enumerable:!0,get:()=>M.DropdownButton}),Object.defineProperty(p,"DropdownHeading",{enumerable:!0,get:()=>M.DropdownHeading}),Object.defineProperty(p,"DropdownItem",{enumerable:!0,get:()=>M.DropdownItem}),Object.defineProperty(p,"DropdownList",{enumerable:!0,get:()=>M.DropdownList}),Object.defineProperty(p,"DropdownTrigger",{enumerable:!0,get:()=>M.DropdownTrigger}),Object.defineProperty(p,"DropdownTriggerContext",{enumerable:!0,get:()=>M.DropdownTriggerContext}),Object.defineProperty(p,"EXPERIMENTAL_Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionClear",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionClear}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionEmpty",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionEmpty}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionInput",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionInput}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionList",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionList}),Object.defineProperty(p,"EXPERIMENTAL_SuggestionOption",{enumerable:!0,get:()=>M.EXPERIMENTAL_SuggestionOption}),Object.defineProperty(p,"ErrorSummary",{enumerable:!0,get:()=>M.ErrorSummary}),Object.defineProperty(p,"ErrorSummaryHeading",{enumerable:!0,get:()=>M.ErrorSummaryHeading}),Object.defineProperty(p,"ErrorSummaryItem",{enumerable:!0,get:()=>M.ErrorSummaryItem}),Object.defineProperty(p,"ErrorSummaryLink",{enumerable:!0,get:()=>M.ErrorSummaryLink}),Object.defineProperty(p,"ErrorSummaryList",{enumerable:!0,get:()=>M.ErrorSummaryList}),Object.defineProperty(p,"Field",{enumerable:!0,get:()=>M.Field}),Object.defineProperty(p,"FieldAffix",{enumerable:!0,get:()=>M.FieldAffix}),Object.defineProperty(p,"FieldAffixes",{enumerable:!0,get:()=>M.FieldAffixes}),Object.defineProperty(p,"FieldCounter",{enumerable:!0,get:()=>M.FieldCounter}),Object.defineProperty(p,"FieldDescription",{enumerable:!0,get:()=>M.FieldDescription}),Object.defineProperty(p,"Fieldset",{enumerable:!0,get:()=>M.Fieldset}),Object.defineProperty(p,"FieldsetDescription",{enumerable:!0,get:()=>M.FieldsetDescription}),Object.defineProperty(p,"FieldsetLegend",{enumerable:!0,get:()=>M.FieldsetLegend}),Object.defineProperty(p,"Heading",{enumerable:!0,get:()=>M.Heading}),Object.defineProperty(p,"Input",{enumerable:!0,get:()=>M.Input}),Object.defineProperty(p,"Label",{enumerable:!0,get:()=>M.Label}),Object.defineProperty(p,"List",{enumerable:!0,get:()=>M.List}),Object.defineProperty(p,"ListItem",{enumerable:!0,get:()=>M.ListItem}),Object.defineProperty(p,"ListOrdered",{enumerable:!0,get:()=>M.ListOrdered}),Object.defineProperty(p,"ListUnordered",{enumerable:!0,get:()=>M.ListUnordered}),Object.defineProperty(p,"Pagination",{enumerable:!0,get:()=>M.Pagination}),Object.defineProperty(p,"PaginationButton",{enumerable:!0,get:()=>M.PaginationButton}),Object.defineProperty(p,"PaginationItem",{enumerable:!0,get:()=>M.PaginationItem}),Object.defineProperty(p,"PaginationList",{enumerable:!0,get:()=>M.PaginationList}),Object.defineProperty(p,"Paragraph",{enumerable:!0,get:()=>M.Paragraph}),Object.defineProperty(p,"Popover",{enumerable:!0,get:()=>M.Popover}),Object.defineProperty(p,"PopoverTrigger",{enumerable:!0,get:()=>M.PopoverTrigger}),Object.defineProperty(p,"PopoverTriggerContext",{enumerable:!0,get:()=>M.PopoverTriggerContext}),Object.defineProperty(p,"Radio",{enumerable:!0,get:()=>M.Radio}),Object.defineProperty(p,"RovingFocusItem",{enumerable:!0,get:()=>M.RovingFocusItem}),Object.defineProperty(p,"RovingFocusRoot",{enumerable:!0,get:()=>M.RovingFocusRoot}),Object.defineProperty(p,"Search",{enumerable:!0,get:()=>M.Search}),Object.defineProperty(p,"SearchButton",{enumerable:!0,get:()=>M.SearchButton}),Object.defineProperty(p,"SearchClear",{enumerable:!0,get:()=>M.SearchClear}),Object.defineProperty(p,"SearchInput",{enumerable:!0,get:()=>M.SearchInput}),Object.defineProperty(p,"SelectOptgroup",{enumerable:!0,get:()=>M.SelectOptgroup}),Object.defineProperty(p,"Skeleton",{enumerable:!0,get:()=>M.Skeleton}),Object.defineProperty(p,"SkipLink",{enumerable:!0,get:()=>M.SkipLink}),Object.defineProperty(p,"Spinner",{enumerable:!0,get:()=>M.Spinner}),Object.defineProperty(p,"Suggestion",{enumerable:!0,get:()=>M.EXPERIMENTAL_Suggestion}),Object.defineProperty(p,"Switch",{enumerable:!0,get:()=>M.Switch}),Object.defineProperty(p,"TableBody",{enumerable:!0,get:()=>M.TableBody}),Object.defineProperty(p,"TableCell",{enumerable:!0,get:()=>M.TableCell}),Object.defineProperty(p,"TableFoot",{enumerable:!0,get:()=>M.TableFoot}),Object.defineProperty(p,"TableHead",{enumerable:!0,get:()=>M.TableHead}),Object.defineProperty(p,"TableHeaderCell",{enumerable:!0,get:()=>M.TableHeaderCell}),Object.defineProperty(p,"TableRow",{enumerable:!0,get:()=>M.TableRow}),Object.defineProperty(p,"TabsList",{enumerable:!0,get:()=>M.TabsList}),Object.defineProperty(p,"TabsPanel",{enumerable:!0,get:()=>M.TabsPanel}),Object.defineProperty(p,"TabsTab",{enumerable:!0,get:()=>M.TabsTab}),Object.defineProperty(p,"Textarea",{enumerable:!0,get:()=>M.Textarea}),Object.defineProperty(p,"Textfield",{enumerable:!0,get:()=>M.Textfield}),Object.defineProperty(p,"ToggleGroup",{enumerable:!0,get:()=>M.ToggleGroup}),Object.defineProperty(p,"ToggleGroupItem",{enumerable:!0,get:()=>M.ToggleGroupItem}),Object.defineProperty(p,"Tooltip",{enumerable:!0,get:()=>M.Tooltip}),Object.defineProperty(p,"ValidationMessage",{enumerable:!0,get:()=>M.ValidationMessage}),Object.defineProperty(p,"omit",{enumerable:!0,get:()=>M.omit}),Object.defineProperty(p,"useCheckboxGroup",{enumerable:!0,get:()=>M.useCheckboxGroup}),Object.defineProperty(p,"useDebounceCallback",{enumerable:!0,get:()=>M.useDebounceCallback}),Object.defineProperty(p,"useIsomorphicLayoutEffect",{enumerable:!0,get:()=>M.useIsomorphicLayoutEffect}),Object.defineProperty(p,"useMediaQuery",{enumerable:!0,get:()=>M.useMediaQuery}),Object.defineProperty(p,"usePagination",{enumerable:!0,get:()=>M.usePagination}),Object.defineProperty(p,"useRadioGroup",{enumerable:!0,get:()=>M.useRadioGroup}),Object.defineProperty(p,"useSynchronizedAnimation",{enumerable:!0,get:()=>M.useSynchronizedAnimation}),p.Accent=P3,p.Alert=y9,p.Avatar=V3,p.Body=u1,p.BorderedRadioGroup=bt,p.BorderedToggleGroup=Rt,p.Box=T,p.Button=i1,p.CardTitle=Ki,p.DateTimePicker=NA,p.Datepicker=wA,p.DeprecatedCard=_7,p.DeprecatedDetails=v9,p.DeprecatedErrorLabel=m9,p.DeprecatedInputLabel=p9,p.FilePreviewer=T3,p.FileUploader=Ui,p.FileUploaderContext=u9,p.Footer=yt,p.Header=Wt,p.Icon=i2,p.ImageAisSat=qe,p.ImageArcticInfo=Ve,p.ImageAvgiftskalkulator=je,p.ImageBaatfartMarine=ye,p.ImageBestilleLos=Oe,p.ImageBoelgevarsel=We,p.ImageBwArcticinfo=zt,p.ImageBwBoelgevarsel=ht,p.ImageBwNais=pt,p.ImageBwOhoi=vt,p.ImageDatakatalog=xe,p.ImageDgps=Te,p.ImageDigitaleFyrbesoek=lt,p.ImageDigitaleReferanseruter=Xe,p.ImageEDialog=Ge,p.ImageFarledsbevis=Pe,p.ImageForespoerselSendt=mt,p.ImageHais=Ke,p.ImageHavbase=He,p.ImageHavnOgFarvannsloven=Fe,p.ImageIsmelding=we,p.ImageIstjeneste=De,p.ImageKikkert=Le,p.ImageKystdatahuset=Ne,p.ImageKystinfoKart=_e,p.ImageKystreise=Et,p.ImageKystvaer=Mt,p.ImageLavutslipp=$e,p.ImageLrit=et,p.ImageMarU=ot,p.ImageMegafon=ft,p.ImageNais=dt,p.ImageNasjonalHavneoversikt=tt,p.ImageNavarea=It,p.ImageNavigasjonsvarsler=nt,p.ImageOhoi=rt,p.ImageRegistrerteSeilaser=At,p.ImageSafeSeaNet=Ct,p.ImageSeLosbestilling=it,p.ImageSelvbetjening=ut,p.ImageSelvbetjeningRso=st,p.ImageSkipsrapportering=at,p.ImageSlukkedeFyrlys=ct,p.ImageSoeknadOmFarledsbevis=Je,p.KyvDivider=j9,p.LabelContent=P2,p.Link=J7,p.Logo=H3,p.NumberInput=Vi,p.Select=yi,p.Skillingsbuoye=Qt,p.Stepper=F9,p.StyrbordTranslationContext=c4,p.Summary=Kt,p.Table=H1,p.Tabs=q3,p.Tag=C0,p.TextArea=ji,p.TextInput=qi,p.Typography=Zt,p.svgImageColors=ke,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});