@openmrs/esm-form-engine-app 12.3.5-pre.12475 → 12.3.5-pre.12490

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/3785.js CHANGED
@@ -1,4 +1,4 @@
1
- (globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["3785"],{5602(e){e.exports=function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},4397(e){e.exports=function(e,t,n){var r=t.prototype,a=function(e){var t=e.date,a=e.utc,o={};if(!(null===t||t instanceof Date||t instanceof Array||r.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=a?n.utc():n();Object.keys(t).forEach(function(e){var n;o["date"===(n=r.$utils().p(e))?"day":n]=t[e]});var s=o.day||(o.year||o.month>=0?1:i.date()),l=o.year||i.year(),u=o.month>=0?o.month:o.year||o.day?0:i.month(),c=o.hour||0,d=o.minute||0,m=o.second||0,p=o.millisecond||0;return a?new Date(Date.UTC(l,u,s,c,d,m,p)):new Date(l,u,s,c,d,m,p)}return t},o=r.parse;r.parse=function(e){e.date=a.bind(this)(e),o.bind(this)(e)};var i=r.set,s=r.add,l=r.subtract,u=function(e,t,n,r){void 0===r&&(r=1);var a=Object.keys(t),o=this;return a.forEach(function(n){o=e.bind(o)(t[n]*r,n)}),o};r.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},r.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},r.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},7657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new a(t)},i.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],o=a[0],i=60*a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r)))return this;var i=16>=Math.abs(r)?60*r:r,s=this;if(a)return s.$offset=i,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var m=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return m.call(this,e,t,n);var r=this.local(),a=o(e).local();return m.call(r,a,t,n)}}}()},5570(e,t,n){!function(t){"use strict";var r=n(9109);function a(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=new Date().toString()),n||(n={}),e.call(this,t,n)}}var o=e.exports={generate:a(function(e,t){return new r(e,t)})};t&&(t.fn.geopattern=a(function(e,n){return this.each(function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var a=o.generate(e,n);t(this).css("background-image",a.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},1812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,n,r=e.r,a=e.g,o=e.b,i=Math.max(r/=255,a/=255,o/=255),s=Math.min(r,a,o),l=(i+s)/2;if(i===s)t=n=0;else{var u=i-s;switch(n=l>.5?u/(2-i-s):u/(i+s),i){case r:t=(a-o)/u+6*(a<o);break;case a:t=(o-r)/u+2;break;case o:t=(r-a)/u+4}t/=6}return{h:t,s:n,l:l}},hsl2rgb:function(e){function t(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,a,o=e.h,i=e.s,s=e.l;if(0===i)n=r=a=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;n=t(u,l,o+1/3),r=t(u,l,o),a=t(u,l,o-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*a)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},9109(e,t,n){"use strict";var r=n(4751),a=n(1812),o=n(2742),i=n(3153),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,n){return parseInt(e.substr(t,n||1),16)}function d(e,t,n,r,a){return(parseFloat(e)-t)*(a-r)/(n-t)+r}function m(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var f=e.exports=function(e,t){return this.opts=r({},s,t),this.hash=t.hash||o(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,n,r,a){var o=g(r),i=p(a[0]),s=m(a[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(o,l).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(a[1]),fill:s=m(a[1])},e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(o,l).transform({translate:[t+r,n],scale:[1,1]})}function v(e,t,n,r,a){var o=p(a),i=m(a),s=g(r),l={stroke:u,"stroke-opacity":.02,"fill-opacity":o,fill:i};e.polyline(s,l).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,1]})}f.prototype.toSvg=function(){return this.svg.toString()},f.prototype.toString=function(){return this.toSvg()},f.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},f.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},f.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},f.prototype.generateBackground=function(){var e,t,n,r;this.opts.color?n=a.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),r=c(this.hash,17),(e=a.rgb2hsl(a.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,r%2==0?e.s=Math.min(1,(100*e.s+r)/100):e.s=Math.max(0,(100*e.s-r)/100),n=a.hsl2rgb(e)),this.color=a.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:a.rgb2rgbString(n)})},f.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},f.prototype.geoHexagons=function(){var e,t,n,r,a,o,i,s,l,f=d(c(this.hash,0),0,15,8,60),h=f*Math.sqrt(3),g=2*f,y=(s=f/2,[0,l=Math.sin(60*Math.PI/180)*f,s,0,s+f,0,2*f,l,s+f,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*f),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(o=0;o<6;o++)a=c(this.hash,t),e=o%2==0?i*h:i*h+h/2,n=p(a),r={fill:m(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]}),0===o&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,e-h/2]}),0===i&&(e=o%2==0?6*h:6*h+h/2,this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]})),0===o&&0===i&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,5*h+h/2]}),t++},f.prototype.geoSineWaves=function(){var e,t,n,r,a,o,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)n=p(o=c(this.hash,t)),e=m(o),i=s/4*.7,a={fill:"none",stroke:e,opacity:n,"stroke-width":""+u+"px"},r="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l+36*u]})},f.prototype.geoChevrons=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),f=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),r={stroke:u,"stroke-opacity":.02,fill:m(a),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[o*s,i*l*.66-l/2]}).polyline(f).end(),0===i&&this.svg.group(r).transform({translate:[o*s,6*l*.66-l/2]}).polyline(f).end(),t+=1},f.prototype.geoPlusSigns=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,10,25),f=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),n=0,s=0;s<6;s++)for(i=0;i<6;i++)r=p(o=c(this.hash,n)),t=m(o),e=+(s%2!=0),a={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===i&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===s&&this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),n++},f.prototype.geoXes=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),e=o%2==0?i*u-.5*u:i*u-.5*u+u/4,r={fill:m(a),opacity:n},this.svg.group(r).transform({translate:[o*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=o%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(r).transform({translate:[o*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(r).transform({translate:[o*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&0===i&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},f.prototype.geoOverlappingCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:m(r),opacity:t},this.svg.circle(a*i,o*i,i,n),0===a&&this.svg.circle(6*i,o*i,i,n),0===o&&this.svg.circle(a*i,6*i,i,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i,n),e++},f.prototype.geoOctogons=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),n=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(a=c(this.hash,n)),t=m(a),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,i*s]}),n+=1},f.prototype.geoSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=p(r=c(this.hash,t)),e=m(r),this.svg.rect(a*i,o*i,i,i,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},f.prototype.geoConcentricCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=p(r=c(this.hash,t)),e=m(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:n,"stroke-width":s+"px"}),n=p(r=c(this.hash,39-t)),e=m(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/4,{fill:e,"fill-opacity":n}),t+=1},f.prototype.geoOverlappingRings=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":s+"px"},this.svg.circle(a*i,o*i,i-s/2,n),0===a&&this.svg.circle(6*i,o*i,i-s/2,n),0===o&&this.svg.circle(a*i,6*i,i-s/2,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i-s/2,n),e+=1},f.prototype.geoTriangles=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,15,80),f=l/2*Math.sqrt(3),h=[s=l/2,0,l,f,0,f,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*f),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(a=c(this.hash,e)),r={fill:m(a),"fill-opacity":t,stroke:u,"stroke-opacity":.02},n=i%2==0?180*(o%2==0):180*(o%2!=0),this.svg.polyline(h,r).transform({translate:[o*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),0===o&&this.svg.polyline(h,r).transform({translate:[6*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),e+=1},f.prototype.geoDiamonds=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),f=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),r={fill:m(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*i-l/2]}),0===o&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===i&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},f.prototype.geoNestedSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2,o*s+o*i*2+i/2,s,s,n),t=p(r=c(this.hash,39-e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2+2*i,o*s+o*i*2+i/2+2*i,3*i,3*i,n),e+=1},f.prototype.geoMosaicSquares=function(){var e,t,n,r=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)):y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):n%2==0?y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)),e+=1},f.prototype.geoPlaid=function(){var e,t,n,r,a,o,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,n=p(o=c(this.hash,t+1)),e=m(o),r=o+5,this.svg.rect(0,i,"100%",r,{opacity:n,fill:e}),i+=r,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,n=p(o=c(this.hash,t+1)),e=m(o),a=o+5,this.svg.rect(s,0,a,"100%",{opacity:n,fill:e}),s+=a,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},f.prototype.geoTessellation=function(){var e,t,n,r,a=d(c(this.hash,0),0,15,5,40),o=a*Math.sqrt(3),i=2*a,s=a/2*Math.sqrt(3),l=[0,0,s,a/2,0,a,0,0].join(","),f=3*a+2*s,h=2*o+2*a;for(this.svg.setWidth(f),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:m(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-a/2,-a/2,a,a,n),this.svg.rect(f-a/2,-a/2,a,a,n),this.svg.rect(-a/2,h-a/2,a,a,n),this.svg.rect(f-a/2,h-a/2,a,a,n);break;case 1:this.svg.rect(i/2+s,o/2,a,a,n);break;case 2:this.svg.rect(-a/2,h/2-a/2,a,a,n),this.svg.rect(f-a/2,h/2-a/2,a,a,n);break;case 3:this.svg.rect(i/2+s,1.5*o+a,a,a,n);break;case 4:this.svg.polyline(l,n).transform({translate:[a/2,-a/2],rotate:[0,a/2,s/2]}),this.svg.polyline(l,n).transform({translate:[a/2,h- -a/2],rotate:[0,a/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,n).transform({translate:[f-a/2,-a/2],rotate:[0,a/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[f-a/2,h+a/2],rotate:[0,a/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[f/2+a/2,o/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[f/2+a/2,h-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,h-o/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,n).transform({translate:[a/2,h/2-a/2]});break;case 11:this.svg.polyline(l,n).transform({translate:[f-a/2,h/2-a/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,a/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,a/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 15:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 16:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 17:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 18:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+a/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+a/2],rotate:[-30,0,0]})}}},2742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,n=0x98badcfe,r=0x10325476,a=0xc3d2e1f0,o=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=c<<1|c>>>31}var d=e,m=t,p=n,f=r,h=a;for(u=0;u<80;u++){u<20?(s=f^m&(p^f),l=0x5a827999):u<40?(s=m^p^f,l=0x6ed9eba1):u<60?(s=m&p|f&(m|p),l=0x8f1bbcdc):(s=m^p^f,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|o[u]);h=f,f=p,p=m<<30|m>>>2,m=d,d=g}for(u=0,e=e+d|0,t=t+m|0,n=n+p|0,r=r+f|0,a=a+h|0,i=0;u<16;u++)o[u]=0}function c(e){o[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var n=0;n<t;n++)c(e.charCodeAt(n));return}var r=e.length;l+=8*r;for(var a=0;a<r;a++)c(e[a])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var o=24;o>=0;o-=8)c(l>>o);return d(e)+d(t)+d(n)+d(r)+d(a)}}}e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},3153(e,t,n){"use strict";var r=n(4751),a=n(7338);function o(){return this.width=100,this.height=100,this.svg=a("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=o,o.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},o.prototype.end=function(){return this.context.pop(),this},o.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},o.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},o.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},o.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},o.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},o.prototype.toString=function(){return this.svg.toString()},o.prototype.rect=function(e,t,n,o,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=a("rect");return this.currentContext().appendChild(l),this.setAttributes(l,r({x:e,y:t,width:n,height:o},i)),this},o.prototype.circle=function(e,t,n,o){var i=a("circle");return this.currentContext().appendChild(i),this.setAttributes(i,r({cx:e,cy:t,r:n},o)),this},o.prototype.path=function(e,t){var n=a("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:e},t)),this},o.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach(function(e){n.polyline(e,t)}),this;var o=a("polyline");return this.currentContext().appendChild(o),this.setAttributes(o,r({points:e},t)),this},o.prototype.group=function(e){var t=a("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,r({},e)),this}},7338(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},4751(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(!e||"[object Object]"!==n.call(e)||e.nodeType||e.setInterval)return!1;var r,a=t.call(e,"constructor"),o=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)}e.exports=function e(){var t,n,a,o,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(n in t)a=l[n],l!==(o=t[n])&&(d&&o&&(r(o)||(i=Array.isArray(o)))?(i?(i=!1,s=a&&Array.isArray(a)?a:[]):s=a&&r(a)?a:{},l[n]=e(d,s,o)):void 0!==o&&(l[n]=o));return l}},2034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:m=!0}=t,p=[],f="",h=0;!function e(c){if(Array.isArray(c)){for(let t of c)e(t);return}let d="object"==typeof c?c:function(e,t={}){let{encodePath:o=n}=t,l=[...e],u=0;return new i(function t(n){let i=[],c="";function d(){c&&(i.push({type:"text",value:o(c)}),c="")}for(;u<l.length;){let o=l[u++];if(o===n)return d(),i;if("\\"===o){if(u===l.length)throw new s(`Unexpected end after \\ at index ${u}`,e);c+=l[u++];continue}if(":"===o||"*"===o){let t=":"===o?"param":"wildcard",n="";if(r.test(l[u]))do n+=l[u++];while(a.test(l[u]));else if('"'===l[u]){let t=u;for(;u<l.length;){if('"'===l[++u]){u++,t=0;break}"\\"===l[u]&&u++,n+=l[u]}if(t)throw new s(`Unterminated quote at index ${t}`,e)}if(!n)throw new s(`Missing parameter name at index ${u}`,e);d(),i.push({type:t,name:n});continue}if("{"===o){d(),i.push({type:"group",tokens:t("}")});continue}if("}"===o||"("===o||")"===o||"["===o||"]"===o||"+"===o||"?"===o||"!"===o)throw new s(`Unexpected ${o} at index ${u-1}`,e);c+=o}if(n)throw new s(`Unexpected end at index ${u}, expected ${n}`,e);return d(),i}(""),e)}(c,t);!function e(t,n,r,a){for(;n<t.length;){let o=t[n++];if("group"===o.type){let i=r.length;e(o.tokens,0,r,r=>e(t,n,r,a)),r.length=i;continue}r.push(o)}a(r)}(d.tokens,0,[],e=>{if(h>=256)throw new s("Too many path combinations",d.originalPath);h>0&&(f+="|"),f+=function(e,t,n,r){let a="",i="",u="",c=0,d=0,m=0;for(;m<e.length;){let p=e[m++];if("text"===p.type){a+=o(p.value),i+=p.value,2===c&&(u+=p.value),p.value.includes(t)&&(d=0);continue}if("param"===p.type||"wildcard"===p.type){if(c&&!i)throw new s(`Missing text before "${p.name}" ${p.type}`,r);"param"===p.type?(a+=2&d?`(${l(t,i)}+)`:!function(n,r){for(;n<e.length;){let a=e[n++];if(a.type===r)return!0;if("text"===a.type&&a.value.includes(t))break}return!1}(m,"wildcard")?1&d?`(${l(t,i)}+|${o(i)})`:`(${l(t,"")}+)`:`(${l(t,function(t){let n="";for(;t<e.length;){let r=e[t++];if("text"!==r.type)break;n+=r.value}return n}(m))}+)`,d|=c=1):(a+=2&d?`(${l(i,"")}+)`:u?`(${l(u,"")}+|${l(t,"")}+)`:"([^]+)",u="",d|=c=2),n.push(p),i="";continue}throw TypeError(`Unknown token type: ${p.type}`)}return a}(e,u,p,d.originalPath),h++})}(e);let g=`^(?:${f})`;return m&&(g+="(?:"+o(u)+"$)?"),{regexp:new RegExp(g+=c?"$":"(?="+o(u)+"|$)",d?"":"i"),keys:p}};let n=e=>e,r=/^[$_\p{ID_Start}]$/u,a=/^[$\u200c\u200d\p{ID_Continue}]$/u;function o(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let n=e;t&&(n+=`: ${t}`),super(n+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}function l(e,t){return t.length>e.length?l(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${o(e)}|${o(t)})[^])`:e.length>1?`(?:(?!${o(e)})[^${o(t)}])`:`[^${o(e+t)}]`}},5873(e,t,n){"use strict";var r=n(8439);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},2864(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,m,p;n.r(t),n.d(t,{GenderUnknownIcon:()=>c6,evaluateAsNumber:()=>iC,getImportMapOverrideMap:()=>oD,StockManagementPictogram:()=>Dp,ChemistryIcon:()=>cV,BabyIcon:()=>cR,DashboardExtension:()=>d5,openmrsComponentDecorator:()=>lW,tryRegisterExtension:()=>u5,pictogramIds:()=>xJ,ActivityIcon:()=>c_,compile:()=>iN,removeRouteMapOverride:()=>oX,TableBatchActions:()=>cp,getAsyncLifecycle:()=>lz,subscribeOpenmrsEvent:()=>ie,PasswordIcon:()=>dw,Assessment2Pictogram:()=>x1,CloseIcon:()=>cK,setupRouteMapOverrides:()=>o1,getWorkspaceGroupRegistration:()=>sJ,registerWorkspace:()=>sG,useFeatureFlag:()=>up,reset:()=>sL,LabOrderIcon:()=>di,VisitMode:()=>is,useLocations:()=>uM,getLifecycle:()=>lH,formatDatetime:()=>wa,getVisitsForPatient:()=>ig,formatPartialDate:()=>we,CustomOverflowMenu:()=>cw,LocationIcon:()=>dl,GroupIcon:()=>c9,createUseStore:()=>lp,VisitStatus:()=>il,getSessionLocation:()=>on,getCurrentImportMap:()=>oM,usePatient:()=>uV,useRenderableExtensions:()=>uW,getOpenedWindowIndexByWorkspace:()=>s1,setLeftNav:()=>sB,clearHistory:()=>az,clearConfigErrors:()=>np,formatTime:()=>wr,isDevEnabled:()=>oi,closeWorkspaceGroup2:()=>EE,getCurrentRouteMap:()=>oG,ConfigurableLink:()=>li,sessionStore:()=>a1,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>ot,GenderMaleIcon:()=>c2,getExtensionSlotConfigFromStore:()=>tT,evaluateAsNumberAsync:()=>iP,getImportMapDefaultMap:()=>ow,unregisterExtensionRendering:()=>sa,implementerToolsConfigStore:()=>tW,Type:()=>th,InPatientPictogram:()=>Dt,cleanupObsoleteFeatureFlags:()=>iQ,getAttachmentsUrl:()=>o6,showSnackbar:()=>DC,PatientBannerActionsMenu:()=>xH,PatientSearchPictogram:()=>Di,DocumentAttachmentIcon:()=>cq,Snackbar:()=>DD,CardiologyPictogram:()=>x2,ImageMedicalIcon:()=>de,ActionableNotificationComponent:()=>xu,DiagnosisTags:()=>wY,iconIds:()=>cE,PatientsPictogram:()=>Ds,interpolateUrl:()=>aI,setupHistory:()=>aU,subscribeToastShown:()=>_,detachAll:()=>s$,convertToLocaleCalendar:()=>wo,DocumentIcon:()=>cY,configInternalStore:()=>tE,ActionMenuButton2:()=>EF,setupDynamicOfflineDataHandler:()=>_e,makeUrl:()=>aX,oneOf:()=>nw,selectPreferredName:()=>xO,launchWorkspaceGroup:()=>function e(t,n){let r=sJ(t),{state:a,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:i,workspaceToLaunch:s}=n,l=function(){return DG}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?DA(r?.name,()=>{e(t,n)}):DJ(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:i}})),D4(t,a),o?.(),s&&DI(s.name,s.additionalProps??{})},MobileCheckIcon:()=>df,createErrorHandler:()=>P,parseDate:()=>b3,getAttachmentByUuid:()=>o2,LeftNavMenu:()=>w1,getExtensionRegistration:()=>sT,ShoppingCartAddItemIcon:()=>d2,ReferralOrderIcon:()=>dk,ReportIcon:()=>dP,dispatchToastShown:()=>x,getImportMapNextPageMap:()=>ox,registerExtension:()=>sR,setupOfflineSync:()=>E7,DownloadIcon:()=>cJ,useConnectivity:()=>_o,provide:()=>t4,ShoppingCartArrowDownIcon:()=>dA,featureFlagsStore:()=>iJ,promptBeforeClosing:()=>DB,jsep:()=>iv,GeriatricsPictogram:()=>x7,SearchIcon:()=>dN,reportError:()=>C,slugify:()=>oN,isOmrsDateToday:()=>b1,getExtensionStore:()=>so,BloodBankPictogram:()=>x4,TriagePictogram:()=>Dh,Workspace2:()=>E$,refetchCurrentUser:()=>a8,CheckmarkOutlineIcon:()=>cB,registerExtensionSlot:()=>sI,AllergiesIcon:()=>dQ,ArrowDownIcon:()=>ck,useOpenmrsInfinite:()=>uD,getExtensionConfigFromExtensionSlotStore:()=>t$,OpenmrsDatePicker:()=>wG,getExtensionConfigFromStore:()=>tO,getDynamicOfflineDataEntries:()=>_t,getLocaleDisplayName:()=>bw,messageOmrsServiceWorker:()=>_r,navigate:()=>aF,launchWorkspace2:()=>E_,getGroupByWindowName:()=>s0,CustomOverflowMenuItem:()=>cx,isUrl:()=>nb,CaretDownIcon:()=>c$,ArrowLeftIcon:()=>cC,FacilityPictogram:()=>x8,ViewOffIcon:()=>dq,updateInternalExtensionStore:()=>i8,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>oQ,formatDurationBetween:()=>wp,defaultVisitCustomRepresentation:()=>iu,getBreadcrumbsFor:()=>nT,useOpenmrsPagination:()=>uh,Pagination:()=>xC,CheckmarkFilledIcon:()=>cF,clearCurrentUser:()=>a7,showModal:()=>xo,ChevronUpIcon:()=>cz,saveVisit:()=>ip,useAttachments:()=>l8,Pictogram:()=>Dw,useExtensionSlot:()=>lb,ChevronDownIcon:()=>cU,OpenmrsDateRangePicker:()=>wZ,deleteAttachmentPermanently:()=>o9,getVisitTypes:()=>ii,OverflowMenuHorizontalIcon:()=>dv,EventScheduleIcon:()=>c0,getSessionStore:()=>a5,ActionMenu:()=>Eh,ProcedureOrderIcon:()=>d_,preloadImport:()=>o$,registerWorkspaceWindows2:()=>s2,useOnVisible:()=>uj,setSessionLocation:()=>or,userHasAccess:()=>oe,ChartAverageIcon:()=>cI,getFeatureFlag:()=>i0,UserAvatarIcon:()=>dK,renderExtension:()=>ln,useFhirInfinite:()=>uC,toVisitTypeObject:()=>ia,useSession:()=>uH,EmergencyDepartmentPictogram:()=>x9,Notification:()=>xs,dispatchSnackbarShown:()=>w,navigateAndLaunchWorkspace:()=>DL,formatDate:()=>wt,workspace2StoreActions:()=>EC,SwitcherIcon:()=>d$,esmStyleGuideSchema:()=>cc,getImportMapDisabledOverrides:()=>oE,useAssignedExtensionIds:()=>l5,CaretRightIcon:()=>cA,evaluateAsType:()=>iT,PageHeader:()=>xS,TranslateIcon:()=>dU,setUserProperties:()=>oa,MovementIcon:()=>dy,renderInlineNotifications:()=>xg,subscribePrecacheStaticDependencies:()=>_a,PaymentsDeskPictogram:()=>Dl,usePrimaryIdentifierCode:()=>uU,useLayoutType:()=>uT,getCurrentUser:()=>a6,XrayPictogram:()=>Dg,CaretUpIcon:()=>cj,renderActionableNotifications:()=>xv,OpenmrsAppContext:()=>l1,setupModals:()=>xa,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(E2(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;E2(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>W,recordConfigDerivationError:()=>tV,useAbortController:()=>l2,Extension:()=>ls,getFhirServerPaginationHandlers:()=>ub,useConnectedExtensions:()=>ur,registerApp:()=>u8,HospitalBedIcon:()=>c7,useExtensionInternalStore:()=>uc,configExtensionStore:()=>tS,getSynchronizationItems:()=>_n,getExtensionSlotsConfigStore:()=>tC,registerExtensionRendering:()=>sr,RenderIfValueIsTruthy:()=>l4,registerFeatureFlag:()=>iX,useFhirFetchAll:()=>uk,restBaseUrl:()=>aY,CalendarHeatMapIcon:()=>cN,getWorkspaceRegistration:()=>sq,isImportMapOverrideDisabled:()=>o_,resetConfigSystem:()=>nf,getExtensionInternalStore:()=>i5,registerGlobalStore:()=>V,evaluateAsBoolean:()=>iS,PatientBannerPatientInfo:()=>xU,addRouteMapOverride:()=>oJ,getDefaultCalendar:()=>b8,SettingsIcon:()=>dO,DrugOrderIcon:()=>cX,ProgramsIcon:()=>dS,useAssignedExtensions:()=>lv,CloseFilledIcon:()=>cG,canAccessStorage:()=>E4,registerDefaultCalendar:()=>b9,TreeViewAltIcon:()=>dH,OverflowMenuVerticalIcon:()=>db,clearConfigDerivationError:()=>tU,getConfigStore:()=>tk,registerWorkspaceGroup:()=>sZ,InformationSquareIcon:()=>dr,EmptyCard:()=>wX,ChevronLeftIcon:()=>cW,RadiologyIcon:()=>d4,useCandidateExtensions:()=>l9,renderToasts:()=>DO,isDesktop:()=>uR,integrateBreakpoints:()=>cr,RegistrationPictogram:()=>Dd,CardHeader:()=>cs,getExtensionRegistrationFrom:()=>sP,InformationIcon:()=>dt,TrashCanIcon:()=>dW,useShallowStableValue:()=>ll,useOpenmrsSWR:()=>uI,Assessment1Pictogram:()=>x0,finishRegisteringAllApps:()=>u7,importDynamic:()=>oO,useFhirPagination:()=>uv,useVisitContextStore:()=>uX,ArrowUpIcon:()=>cT,showActionableNotification:()=>xb,useForceUpdate:()=>uf,useVisit:()=>uQ,updateWorkspaceWindowState:()=>DY,PatientBannerPatientIdentifiers:()=>xL,WorkspaceNotification:()=>Eo,TransferPictogram:()=>Df,usePagination:()=>uL,Breakpoint:()=>ce,PatientBannerToggleContactDetailsButton:()=>EB,CloseOutlineIcon:()=>cZ,ObstetricsPictogram:()=>Do,parseDateInput:()=>ws,getConfig:()=>t3,attach:()=>sN,getLocale:()=>bx,ActionMenuButton:()=>D9,isUrlWithTemplateParameters:()=>nv,useEmrConfiguration:()=>ul,useLeftNav:()=>uN,ToolsIcon:()=>dV,ErrorState:()=>wQ,detach:()=>sO,setCurrentVisit:()=>im,ConditionsIcon:()=>d1,SaveIcon:()=>dR,useWorkspaces:()=>DX,resetWorkspaceStore:()=>D1,useConfig:()=>un,validator:()=>tg,CalendarIcon:()=>cO,getHistory:()=>aW,StickyNoteAddIcon:()=>dj,useWorkspace2Store:()=>EP,getPatientName:()=>xP,getVisitStore:()=>id,getCoreTranslation:()=>aj,registerModuleWithConfigSystem:()=>tX,registerModuleLoad:()=>tQ,getBreadcrumbs:()=>nk,extractVariableNames:()=>iZ,translateFrom:()=>aA,useStoreWithActions:()=>lm,EditIcon:()=>cQ,getCandidateExtensions:()=>sj,shallowEqual:()=>R,subscribeNotificationShown:()=>D,MaximizeIcon:()=>dc,promptForClosingWorkspaces:()=>Ek,WarningIcon:()=>dX,closeAllWorkspaces:()=>DJ,fhirBaseUrl:()=>aq,matchLocale:()=>E1,registerBreadcrumb:()=>n_,usePatientPhoto:()=>xG,EventsIcon:()=>c1,createGlobalStore:()=>B,workspaceStore:()=>DG,subscribeToFeatureFlag:()=>i1,useExtensionStore:()=>um,closeWorkspace:()=>DH,createAttachment:()=>o5,useLeftNavStore:()=>uO,TableIcon:()=>dF,Icon:()=>d6,InformationFilledIcon:()=>dn,getCurrentPageMap:()=>ob,LaboratoryPictogram:()=>Dn,temporaryConfigStore:()=>t_,getPromptBeforeClosingFcn:()=>DV,toDateObjectStrict:()=>b4,defineConfigSchema:()=>tJ,filterBreadcrumbs:()=>nP,invalidateImplementerToolsConfig:()=>tF,PatientBannerContactDetails:()=>EK,getAssignedExtensions:()=>sA,PatientPhoto:()=>xq,MaterialOrderIcon:()=>du,MicroscopeIcon:()=>dp,visitTypesUrl:()=>io,scheduleRecomputation:()=>sc,PharmacyPictogram:()=>Du,AttachmentIcon:()=>d0,MoneyIcon:()=>dh,getAttachments:()=>o3,getWorkspaceGroupStore:()=>D4,PageHeaderContent:()=>xk,MedicationIcon:()=>dd,PrinterIcon:()=>dE,PatientListsPictogram:()=>Dv,useAppContext:()=>l3,isOpenmrsRoutes:()=>oI,AppointmentsAltPictogram:()=>xQ,GenericOrderTypeIcon:()=>c5,batchExtensionUpdates:()=>sl,useExtensionSlotStore:()=>lg,ViewIcon:()=>dJ,formattedName:()=>xN,sessionEndpoint:()=>aJ,duration:()=>wd,resetImportMapOverrides:()=>oC,TableOfContentsIcon:()=>dL,CaretLeftIcon:()=>cM,getTranslationOverrides:()=>t6,isVersionSatisfied:()=>E5,EmptyCardIllustration:()=>wJ,PenIcon:()=>dD,getWorkspaceStore:()=>DZ,validators:()=>nx,setupImportMapOverrides:()=>oR,showToast:()=>D$,useDefineAppContext:()=>l0,getGlobalStore:()=>U,useOnClickOutside:()=>uA,getWindowByWorkspaceName:()=>sQ,ArrowRightIcon:()=>cP,loadLifeCycles:()=>u2,registerBreadcrumbs:()=>nS,MotherIcon:()=>dg,fetchCurrentPatient:()=>o8,Toast:()=>DP,MessageQueueIcon:()=>dm,TwoFactorAuthenticationIcon:()=>dz,Pharmacy2Pictogram:()=>Dc,goBackInHistory:()=>aH,GroupAccessIcon:()=>c8,getExtensionRenderingsStore:()=>i9,setImplementerToolsConfigRecomputer:()=>tL,getAsyncExtensionLifecycle:()=>lG,setupApiModule:()=>ol,renderLoadingSpinner:()=>EG,WorkspaceContainer:()=>Eg,showNotification:()=>xy,getModalRegistration:()=>sH,ListCheckedIcon:()=>ds,ResponsiveWrapper:()=>Dx,GynaecologyPictogram:()=>De,ShoppingCartIcon:()=>dM,getRouteMapNextPageMap:()=>oY,MetadataExportPictogram:()=>Da,updateVisit:()=>ih,backendDependencies:()=>os,MaybePictogram:()=>Db,createParcelMounter:()=>le,openmrsFetch:()=>aQ,useStore:()=>ld,isOpenmrsAppRoutes:()=>oj,HomePictogram:()=>Dy,DentistryPictogram:()=>x6,ServiceQueuesPictogram:()=>Dm,toLanguageTag:()=>bb,launchWorkspace:()=>DI,setFeatureFlag:()=>i4,DigitalTrustPictogram:()=>x5,NumericObservation:()=>xE,attachmentUrl:()=>o4,interpolateString:()=>aL,inRange:()=>ny,useExtensionSlotMeta:()=>ud,AppointmentsPictogram:()=>xX,renderSnackbars:()=>Dk,getRegisteredWorkspace2Names:()=>ER,toLocationObject:()=>it,ChartLineIcon:()=>cL,UserHasAccess:()=>uz,evaluateAsBooleanAsync:()=>ik,changeWorkspaceContext:()=>Dz,createDashboard:()=>d9,getLocations:()=>ir,useExtensionContext:()=>uu,canCloseWorkspaceWithoutPrompting:()=>DM,getExtensionsConfigStore:()=>tR,getRouteMapDefaultMap:()=>oZ,age:()=>xM,isOmrsDateStrict:()=>b0,registerWorkspaceGroups2:()=>s4,usePaginationInfo:()=>uF,evaluateAsync:()=>i_,useOpenmrsFetchAll:()=>u_,removeImportMapOverride:()=>ok,showWorkspacePrompts:()=>DQ,useVisitTypes:()=>u1,ageAsDuration:()=>x$,getExtensionNameFromId:()=>sC,renderParcel:()=>s7,useWorkspace2Context:()=>ET,ResetIcon:()=>dT,RenewIcon:()=>dC,subscribeActionableNotificationShown:()=>E,ErrorCard:()=>w0,GenderFemaleIcon:()=>c4,enableImportMapOverride:()=>oP,retry:()=>E9,ComponentContext:()=>lo,ExtensionSlot:()=>lx,unsetLeftNav:()=>sV,addImportMapOverride:()=>oS,MaybeIcon:()=>d3,useCustomOverflowMenu:()=>cb,PedestrianFamilyIcon:()=>dx,cancelPrompt:()=>DU,CtScanPictogram:()=>x3,dispatchNotificationShown:()=>v,leftNavStore:()=>sF,OpenmrsFetchError:()=>a0,UserFollowIcon:()=>dG,launchWorkspaceGroup2:()=>ED,ChevronRightIcon:()=>cH,UserXrayIcon:()=>dZ,GenderOtherIcon:()=>c3,formatDuration:()=>wi,toOmrsIsoString:()=>b2,Labs2Pictogram:()=>Dr,workspace2Store:()=>sX,setUserLanguage:()=>a9,useBodyScrollLock:()=>l7,getExtensionConfig:()=>tN,SyringeIcon:()=>dI,LocationPicker:()=>w4,useDebounce:()=>ua,TimeIcon:()=>dB,getExtensionSlotConfig:()=>tP,AddIcon:()=>cS,getRouteMapOverrideMap:()=>oq,processConfig:()=>t5,InventoryManagementIcon:()=>da,registerWorkspaces2:()=>s3,UserIcon:()=>dY,formatPatientName:()=>xR,fireOpenmrsEvent:()=>o7,registerModal:()=>sW,registerTranslationNamespace:()=>t0,displayName:()=>xT,evaluate:()=>iE,defineExtensionConfigSchema:()=>t1,renderWorkspaceWindowsAndMenu:()=>EQ,getSyncLifecycle:()=>lK,evaluateAsTypeAsync:()=>iR});let f="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function D(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function E(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function k(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function C(e){let t=T(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let n=T(t);n.stack+=`
1
+ (globalThis.webpackChunk_openmrs_esm_form_engine_app=globalThis.webpackChunk_openmrs_esm_form_engine_app||[]).push([["3785"],{5602(e){e.exports=function(e,t,n){t.prototype.isToday=function(){var e="YYYY-MM-DD",t=n();return this.format(e)===t.format(e)}}},4397(e){e.exports=function(e,t,n){var r=t.prototype,a=function(e){var t=e.date,a=e.utc,o={};if(!(null===t||t instanceof Date||t instanceof Array||r.$utils().u(t)||"Object"!==t.constructor.name)){if(!Object.keys(t).length)return new Date;var i=a?n.utc():n();Object.keys(t).forEach(function(e){var n;o["date"===(n=r.$utils().p(e))?"day":n]=t[e]});var s=o.day||(o.year||o.month>=0?1:i.date()),l=o.year||i.year(),u=o.month>=0?o.month:o.year||o.day?0:i.month(),c=o.hour||0,d=o.minute||0,m=o.second||0,p=o.millisecond||0;return a?new Date(Date.UTC(l,u,s,c,d,m,p)):new Date(l,u,s,c,d,m,p)}return t},o=r.parse;r.parse=function(e){e.date=a.bind(this)(e),o.bind(this)(e)};var i=r.set,s=r.add,l=r.subtract,u=function(e,t,n,r){void 0===r&&(r=1);var a=Object.keys(t),o=this;return a.forEach(function(n){o=e.bind(o)(t[n]*r,n)}),o};r.set=function(e,t){return t=void 0===t?e:t,"Object"===e.constructor.name?u.bind(this)(function(e,t){return i.bind(this)(t,e)},t,e):i.bind(this)(e,t)},r.add=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t):s.bind(this)(e,t)},r.subtract=function(e,t){return"Object"===e.constructor.name?u.bind(this)(s,e,t,-1):l.bind(this)(e,t)}}},7657(e){e.exports=function(){"use strict";var e="minute",t=/[+-]\d\d(?::?\d\d)?/g,n=/([+-]|\d\d)/g;return function(r,a,o){var i=a.prototype;o.utc=function(e){var t={date:e,utc:!0,args:arguments};return new a(t)},i.utc=function(t){var n=o(this.toDate(),{locale:this.$L,utc:!0});return t?n.add(this.utcOffset(),e):n},i.local=function(){return o(this.toDate(),{locale:this.$L,utc:!1})};var s=i.parse;i.parse=function(e){e.utc&&(this.$u=!0),this.$utils().u(e.$offset)||(this.$offset=e.$offset),s.call(this,e)};var l=i.init;i.init=function(){if(this.$u){var e=this.$d;this.$y=e.getUTCFullYear(),this.$M=e.getUTCMonth(),this.$D=e.getUTCDate(),this.$W=e.getUTCDay(),this.$H=e.getUTCHours(),this.$m=e.getUTCMinutes(),this.$s=e.getUTCSeconds(),this.$ms=e.getUTCMilliseconds()}else l.call(this)};var u=i.utcOffset;i.utcOffset=function(r,a){var o=this.$utils().u;if(o(r))return this.$u?0:o(this.$offset)?u.call(this):this.$offset;if("string"==typeof r&&null===(r=function(e){void 0===e&&(e="");var r=e.match(t);if(!r)return null;var a=(""+r[0]).match(n)||["-",0,0],o=a[0],i=60*a[1]+ +a[2];return 0===i?0:"+"===o?i:-i}(r)))return this;var i=16>=Math.abs(r)?60*r:r,s=this;if(a)return s.$offset=i,s.$u=0===r,s;if(0!==r){var l=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(s=this.local().add(i+l,e)).$offset=i,s.$x.$localOffset=l}else s=this.utc();return s};var c=i.format;i.format=function(e){var t=e||(this.$u?"YYYY-MM-DDTHH:mm:ss[Z]":"");return c.call(this,t)},i.valueOf=function(){var e=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*e},i.isUTC=function(){return!!this.$u},i.toISOString=function(){return this.toDate().toISOString()},i.toString=function(){return this.toDate().toUTCString()};var d=i.toDate;i.toDate=function(e){return"s"===e&&this.$offset?o(this.format("YYYY-MM-DD HH:mm:ss:SSS")).toDate():d.call(this)};var m=i.diff;i.diff=function(e,t,n){if(e&&this.$u===e.$u)return m.call(this,e,t,n);var r=this.local(),a=o(e).local();return m.call(r,a,t,n)}}}()},5570(e,t,n){!function(t){"use strict";var r=n(9109);function a(e){return function(t,n){return"object"==typeof t&&(n=t,t=null),null==t&&(t=new Date().toString()),n||(n={}),e.call(this,t,n)}}var o=e.exports={generate:a(function(e,t){return new r(e,t)})};t&&(t.fn.geopattern=a(function(e,n){return this.each(function(){var r=t(this).attr("data-title-sha");r&&(n=t.extend({hash:r},n));var a=o.generate(e,n);t(this).css("background-image",a.toDataUrl())})}))}("u">typeof jQuery?jQuery:null)},1812(e){"use strict";e.exports={hex2rgb:function(e){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,function(e,t,n,r){return t+t+n+n+r+r});var t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return t?{r:parseInt(t[1],16),g:parseInt(t[2],16),b:parseInt(t[3],16)}:null},rgb2hex:function(e){return"#"+["r","g","b"].map(function(t){return("0"+e[t].toString(16)).slice(-2)}).join("")},rgb2hsl:function(e){var t,n,r=e.r,a=e.g,o=e.b,i=Math.max(r/=255,a/=255,o/=255),s=Math.min(r,a,o),l=(i+s)/2;if(i===s)t=n=0;else{var u=i-s;switch(n=l>.5?u/(2-i-s):u/(i+s),i){case r:t=(a-o)/u+6*(a<o);break;case a:t=(o-r)/u+2;break;case o:t=(r-a)/u+4}t/=6}return{h:t,s:n,l:l}},hsl2rgb:function(e){function t(e,t,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?e+(t-e)*6*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}var n,r,a,o=e.h,i=e.s,s=e.l;if(0===i)n=r=a=s;else{var l=s<.5?s*(1+i):s+i-s*i,u=2*s-l;n=t(u,l,o+1/3),r=t(u,l,o),a=t(u,l,o-1/3)}return{r:Math.round(255*n),g:Math.round(255*r),b:Math.round(255*a)}},rgb2rgbString:function(e){return"rgb("+[e.r,e.g,e.b].join(",")+")"}}},9109(e,t,n){"use strict";var r=n(4751),a=n(1812),o=n(2742),i=n(3153),s={baseColor:"#933c3c"},l=["octogons","overlappingCircles","plusSigns","xes","sineWaves","hexagons","overlappingRings","plaid","triangles","squares","concentricCircles","diamonds","tessellation","nestedSquares","mosaicSquares","chevrons"],u="#000";function c(e,t,n){return parseInt(e.substr(t,n||1),16)}function d(e,t,n,r,a){return(parseFloat(e)-t)*(a-r)/(n-t)+r}function m(e){return e%2==0?"#ddd":"#222"}function p(e){return d(e,0,15,.02,.15)}var f=e.exports=function(e,t){return this.opts=r({},s,t),this.hash=t.hash||o(e),this.svg=new i,this.generateBackground(),this.generatePattern(),this};function h(e){return[[e,0,e,3*e],[0,e,3*e,e]]}function g(e){return[0,0,e,e,0,e,0,0].join(",")}function y(e,t,n,r,a){var o=g(r),i=p(a[0]),s=m(a[0]),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i,fill:s};e.polyline(o,l).transform({translate:[t+r,n],scale:[-1,1]}),e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[1,-1]}),l={stroke:u,"stroke-opacity":.02,"fill-opacity":i=p(a[1]),fill:s=m(a[1])},e.polyline(o,l).transform({translate:[t+r,n+2*r],scale:[-1,-1]}),e.polyline(o,l).transform({translate:[t+r,n],scale:[1,1]})}function v(e,t,n,r,a){var o=p(a),i=m(a),s=g(r),l={stroke:u,"stroke-opacity":.02,"fill-opacity":o,fill:i};e.polyline(s,l).transform({translate:[t,n+r],scale:[1,-1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,-1]}),e.polyline(s,l).transform({translate:[t,n+r],scale:[1,1]}),e.polyline(s,l).transform({translate:[t+2*r,n+r],scale:[-1,1]})}f.prototype.toSvg=function(){return this.svg.toString()},f.prototype.toString=function(){return this.toSvg()},f.prototype.toBase64=function(){var e=this.toSvg();return"u">typeof window&&"function"==typeof window.btoa?window.btoa(e):new Buffer(e).toString("base64")},f.prototype.toDataUri=function(){return"data:image/svg+xml;base64,"+this.toBase64()},f.prototype.toDataUrl=function(){return'url("'+this.toDataUri()+'")'},f.prototype.generateBackground=function(){var e,t,n,r;this.opts.color?n=a.hex2rgb(this.opts.color):(t=d(c(this.hash,14,3),0,4095,0,359),r=c(this.hash,17),(e=a.rgb2hsl(a.hex2rgb(this.opts.baseColor))).h=(360*e.h-t+360)%360/360,r%2==0?e.s=Math.min(1,(100*e.s+r)/100):e.s=Math.max(0,(100*e.s-r)/100),n=a.hsl2rgb(e)),this.color=a.rgb2hex(n),this.svg.rect(0,0,"100%","100%",{fill:a.rgb2rgbString(n)})},f.prototype.generatePattern=function(){var e=this.opts.generator;if(e){if(0>l.indexOf(e))throw Error("The generator "+e+" does not exist.")}else e=l[c(this.hash,20)];return this["geo"+e.slice(0,1).toUpperCase()+e.slice(1)]()},f.prototype.geoHexagons=function(){var e,t,n,r,a,o,i,s,l,f=d(c(this.hash,0),0,15,8,60),h=f*Math.sqrt(3),g=2*f,y=(s=f/2,[0,l=Math.sin(60*Math.PI/180)*f,s,0,s+f,0,2*f,l,s+f,2*l,s,2*l,0,l].join(","));for(this.svg.setWidth(3*g+3*f),this.svg.setHeight(6*h),t=0,i=0;i<6;i++)for(o=0;o<6;o++)a=c(this.hash,t),e=o%2==0?i*h:i*h+h/2,n=p(a),r={fill:m(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]}),0===o&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,e-h/2]}),0===i&&(e=o%2==0?6*h:6*h+h/2,this.svg.polyline(y,r).transform({translate:[o*f*1.5-g/2,e-h/2]})),0===o&&0===i&&this.svg.polyline(y,r).transform({translate:[6*f*1.5-g/2,5*h+h/2]}),t++},f.prototype.geoSineWaves=function(){var e,t,n,r,a,o,i,s=Math.floor(d(c(this.hash,0),0,15,100,400)),l=Math.floor(d(c(this.hash,1),0,15,30,100)),u=Math.floor(d(c(this.hash,2),0,15,3,30));for(this.svg.setWidth(s),this.svg.setHeight(36*u),t=0;t<36;t++)n=p(o=c(this.hash,t)),e=m(o),i=s/4*.7,a={fill:"none",stroke:e,opacity:n,"stroke-width":""+u+"px"},r="M0 "+l+" C "+i+" 0, "+(s/2-i)+" 0, "+s/2+" "+l+" S "+(s-i)+" "+2*l+", "+s+" "+l+" S "+(1.5*s-i)+" 0, "+1.5*s+", "+l,this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l]}),this.svg.path(r,a).transform({translate:[-s/4,u*t-1.5*l+36*u]})},f.prototype.geoChevrons=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,30,80),l=d(c(this.hash,0),0,15,30,80),f=(e=.66*l,[[0,0,s/2,l-e,s/2,l,0,e,0,0],[s/2,l-e,s,0,s,e,s/2,l,s/2,l-e]].map(function(e){return e.join(",")}));for(this.svg.setWidth(6*s),this.svg.setHeight(6*l*.66),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),r={stroke:u,"stroke-opacity":.02,fill:m(a),"fill-opacity":n,"stroke-width":1},this.svg.group(r).transform({translate:[o*s,i*l*.66-l/2]}).polyline(f).end(),0===i&&this.svg.group(r).transform({translate:[o*s,6*l*.66-l/2]}).polyline(f).end(),t+=1},f.prototype.geoPlusSigns=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,10,25),f=3*l,g=h(l);for(this.svg.setWidth(12*l),this.svg.setHeight(12*l),n=0,s=0;s<6;s++)for(i=0;i<6;i++)r=p(o=c(this.hash,n)),t=m(o),e=+(s%2!=0),a={fill:t,stroke:u,"stroke-opacity":.02,"fill-opacity":r},this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===i&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,s*f-s*l-f/2]}).rect(g).end(),0===s&&this.svg.group(a).transform({translate:[i*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),0===i&&0===s&&this.svg.group(a).transform({translate:[4*f-i*l+e*l-l,4*f-s*l-f/2]}).rect(g).end(),n++},f.prototype.geoXes=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,25),l=h(s),u=3*s*.943;for(this.svg.setWidth(3*u),this.svg.setHeight(3*u),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),e=o%2==0?i*u-.5*u:i*u-.5*u+u/4,r={fill:m(a),opacity:n},this.svg.group(r).transform({translate:[o*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-i*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===i&&(e=o%2==0?6*u-u/2:6*u-u/2+u/4,this.svg.group(r).transform({translate:[o*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end()),5===i&&this.svg.group(r).transform({translate:[o*u/2-u/2,e-11*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),0===o&&0===i&&this.svg.group(r).transform({translate:[6*u/2-u/2,e-6*u/2],rotate:[45,u/2,u/2]}).rect(l).end(),t++},f.prototype.geoOverlappingCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,25,200)/2;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:m(r),opacity:t},this.svg.circle(a*i,o*i,i,n),0===a&&this.svg.circle(6*i,o*i,i,n),0===o&&this.svg.circle(a*i,6*i,i,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i,n),e++},f.prototype.geoOctogons=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,60),l=[e=.33*s,0,s-e,0,s,e,s,s-e,s-e,s,e,s,0,s-e,0,e,e,0].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(6*s),n=0,i=0;i<6;i++)for(o=0;o<6;o++)r=p(a=c(this.hash,n)),t=m(a),this.svg.polyline(l,{fill:t,"fill-opacity":r,stroke:u,"stroke-opacity":.02}).transform({translate:[o*s,i*s]}),n+=1},f.prototype.geoSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60);for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=p(r=c(this.hash,t)),e=m(r),this.svg.rect(a*i,o*i,i,i,{fill:e,"fill-opacity":n,stroke:u,"stroke-opacity":.02}),t+=1},f.prototype.geoConcentricCircles=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/5;for(this.svg.setWidth((i+s)*6),this.svg.setHeight((i+s)*6),t=0,o=0;o<6;o++)for(a=0;a<6;a++)n=p(r=c(this.hash,t)),e=m(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/2,{fill:"none",stroke:e,opacity:n,"stroke-width":s+"px"}),n=p(r=c(this.hash,39-t)),e=m(r),this.svg.circle(a*i+a*s+(i+s)/2,o*i+o*s+(i+s)/2,i/4,{fill:e,"fill-opacity":n}),t+=1},f.prototype.geoOverlappingRings=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,10,60),s=i/4;for(this.svg.setWidth(6*i),this.svg.setHeight(6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":s+"px"},this.svg.circle(a*i,o*i,i-s/2,n),0===a&&this.svg.circle(6*i,o*i,i-s/2,n),0===o&&this.svg.circle(a*i,6*i,i-s/2,n),0===a&&0===o&&this.svg.circle(6*i,6*i,i-s/2,n),e+=1},f.prototype.geoTriangles=function(){var e,t,n,r,a,o,i,s,l=d(c(this.hash,0),0,15,15,80),f=l/2*Math.sqrt(3),h=[s=l/2,0,l,f,0,f,s,0].join(",");for(this.svg.setWidth(3*l),this.svg.setHeight(6*f),e=0,i=0;i<6;i++)for(o=0;o<6;o++)t=p(a=c(this.hash,e)),r={fill:m(a),"fill-opacity":t,stroke:u,"stroke-opacity":.02},n=i%2==0?180*(o%2==0):180*(o%2!=0),this.svg.polyline(h,r).transform({translate:[o*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),0===o&&this.svg.polyline(h,r).transform({translate:[6*l*.5-l/2,f*i],rotate:[n,l/2,f/2]}),e+=1},f.prototype.geoDiamonds=function(){var e,t,n,r,a,o,i,s=d(c(this.hash,0),0,15,10,50),l=d(c(this.hash,1),0,15,10,50),f=[s/2,0,s,l/2,s/2,l,0,l/2].join(",");for(this.svg.setWidth(6*s),this.svg.setHeight(3*l),t=0,i=0;i<6;i++)for(o=0;o<6;o++)n=p(a=c(this.hash,t)),r={fill:m(a),"fill-opacity":n,stroke:u,"stroke-opacity":.02},e=i%2==0?0:s/2,this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*i-l/2]}),0===o&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*i-l/2]}),0===i&&this.svg.polyline(f,r).transform({translate:[o*s-s/2+e,l/2*6-l/2]}),0===o&&0===i&&this.svg.polyline(f,r).transform({translate:[6*s-s/2+e,l/2*6-l/2]}),t+=1},f.prototype.geoNestedSquares=function(){var e,t,n,r,a,o,i=d(c(this.hash,0),0,15,4,12),s=7*i;for(this.svg.setWidth((s+i)*6+6*i),this.svg.setHeight((s+i)*6+6*i),e=0,o=0;o<6;o++)for(a=0;a<6;a++)t=p(r=c(this.hash,e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2,o*s+o*i*2+i/2,s,s,n),t=p(r=c(this.hash,39-e)),n={fill:"none",stroke:m(r),opacity:t,"stroke-width":i+"px"},this.svg.rect(a*s+a*i*2+i/2+2*i,o*s+o*i*2+i/2+2*i,3*i,3*i,n),e+=1},f.prototype.geoMosaicSquares=function(){var e,t,n,r=d(c(this.hash,0),0,15,15,50);for(this.svg.setWidth(8*r),this.svg.setHeight(8*r),e=0,n=0;n<4;n++)for(t=0;t<4;t++)t%2==0?n%2==0?v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)):y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):n%2==0?y(this.svg,t*r*2,n*r*2,r,[c(this.hash,e),c(this.hash,e+1)]):v(this.svg,t*r*2,n*r*2,r,c(this.hash,e)),e+=1},f.prototype.geoPlaid=function(){var e,t,n,r,a,o,i=0,s=0;for(t=0;t<36;)i+=c(this.hash,t)+5,n=p(o=c(this.hash,t+1)),e=m(o),r=o+5,this.svg.rect(0,i,"100%",r,{opacity:n,fill:e}),i+=r,t+=2;for(t=0;t<36;)s+=c(this.hash,t)+5,n=p(o=c(this.hash,t+1)),e=m(o),a=o+5,this.svg.rect(s,0,a,"100%",{opacity:n,fill:e}),s+=a,t+=2;this.svg.setWidth(s),this.svg.setHeight(i)},f.prototype.geoTessellation=function(){var e,t,n,r,a=d(c(this.hash,0),0,15,5,40),o=a*Math.sqrt(3),i=2*a,s=a/2*Math.sqrt(3),l=[0,0,s,a/2,0,a,0,0].join(","),f=3*a+2*s,h=2*o+2*a;for(this.svg.setWidth(f),this.svg.setHeight(h),e=0;e<20;e++)switch(t=p(r=c(this.hash,e)),n={stroke:u,"stroke-opacity":.02,fill:m(r),"fill-opacity":t,"stroke-width":1},e){case 0:this.svg.rect(-a/2,-a/2,a,a,n),this.svg.rect(f-a/2,-a/2,a,a,n),this.svg.rect(-a/2,h-a/2,a,a,n),this.svg.rect(f-a/2,h-a/2,a,a,n);break;case 1:this.svg.rect(i/2+s,o/2,a,a,n);break;case 2:this.svg.rect(-a/2,h/2-a/2,a,a,n),this.svg.rect(f-a/2,h/2-a/2,a,a,n);break;case 3:this.svg.rect(i/2+s,1.5*o+a,a,a,n);break;case 4:this.svg.polyline(l,n).transform({translate:[a/2,-a/2],rotate:[0,a/2,s/2]}),this.svg.polyline(l,n).transform({translate:[a/2,h- -a/2],rotate:[0,a/2,s/2],scale:[1,-1]});break;case 5:this.svg.polyline(l,n).transform({translate:[f-a/2,-a/2],rotate:[0,a/2,s/2],scale:[-1,1]}),this.svg.polyline(l,n).transform({translate:[f-a/2,h+a/2],rotate:[0,a/2,s/2],scale:[-1,-1]});break;case 6:this.svg.polyline(l,n).transform({translate:[f/2+a/2,o/2]});break;case 7:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,o/2],scale:[-1,1]});break;case 8:this.svg.polyline(l,n).transform({translate:[f/2+a/2,h-o/2],scale:[1,-1]});break;case 9:this.svg.polyline(l,n).transform({translate:[f-f/2-a/2,h-o/2],scale:[-1,-1]});break;case 10:this.svg.polyline(l,n).transform({translate:[a/2,h/2-a/2]});break;case 11:this.svg.polyline(l,n).transform({translate:[f-a/2,h/2-a/2],scale:[-1,1]});break;case 12:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,a/2],rotate:[-30,0,0]});break;case 13:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,a/2],rotate:[-30,0,0]});break;case 14:this.svg.rect(0,0,a,a,n).transform({translate:[a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 15:this.svg.rect(0,0,a,a,n).transform({scale:[-1,1],translate:[-f+a/2,h/2-a/2-a],rotate:[30,0,a]});break;case 16:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 17:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+h/2-a/2-a],rotate:[30,0,a]});break;case 18:this.svg.rect(0,0,a,a,n).transform({scale:[1,-1],translate:[a/2,-h+a/2],rotate:[-30,0,0]});break;case 19:this.svg.rect(0,0,a,a,n).transform({scale:[-1,-1],translate:[-f+a/2,-h+a/2],rotate:[-30,0,0]})}}},2742(e){"use strict";function t(){var e=0x67452301,t=0xefcdab89,n=0x98badcfe,r=0x10325476,a=0xc3d2e1f0,o=new Uint32Array(80),i=0,s=24,l=0;function u(){for(var s,l,u=16;u<80;u++){var c=o[u-3]^o[u-8]^o[u-14]^o[u-16];o[u]=c<<1|c>>>31}var d=e,m=t,p=n,f=r,h=a;for(u=0;u<80;u++){u<20?(s=f^m&(p^f),l=0x5a827999):u<40?(s=m^p^f,l=0x6ed9eba1):u<60?(s=m&p|f&(m|p),l=0x8f1bbcdc):(s=m^p^f,l=0xca62c1d6);var g=(d<<5|d>>>27)+s+h+l+(0|o[u]);h=f,f=p,p=m<<30|m>>>2,m=d,d=g}for(u=0,e=e+d|0,t=t+m|0,n=n+p|0,r=r+f|0,a=a+h|0,i=0;u<16;u++)o[u]=0}function c(e){o[i]|=(255&e)<<s,s?s-=8:(i++,s=24),16===i&&u()}function d(e){for(var t="",n=28;n>=0;n-=4)t+=(e>>n&15).toString(16);return t}return{update:function(e){if("string"==typeof e){var t=e.length;l+=8*t;for(var n=0;n<t;n++)c(e.charCodeAt(n));return}var r=e.length;l+=8*r;for(var a=0;a<r;a++)c(e[a])},digest:function(){c(128),(i>14||14===i&&s<24)&&u(),i=14,s=24,c(0),c(0),c(l>0xffffffffff?l/0x10000000000:0),c(l>0xffffffff?l/0x100000000:0);for(var o=24;o>=0;o-=8)c(l>>o);return d(e)+d(t)+d(n)+d(r)+d(a)}}}e.exports=function(e){if(void 0===e)return t();var n=t();return n.update(e),n.digest()}},3153(e,t,n){"use strict";var r=n(4751),a=n(7338);function o(){return this.width=100,this.height=100,this.svg=a("svg"),this.context=[],this.setAttributes(this.svg,{xmlns:"http://www.w3.org/2000/svg",width:this.width,height:this.height}),this}e.exports=o,o.prototype.currentContext=function(){return this.context[this.context.length-1]||this.svg},o.prototype.end=function(){return this.context.pop(),this},o.prototype.currentNode=function(){var e=this.currentContext();return e.lastChild||e},o.prototype.transform=function(e){return this.currentNode().setAttribute("transform",Object.keys(e).map(function(t){return t+"("+e[t].join(",")+")"}).join(" ")),this},o.prototype.setAttributes=function(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})},o.prototype.setWidth=function(e){this.svg.setAttribute("width",Math.floor(e))},o.prototype.setHeight=function(e){this.svg.setAttribute("height",Math.floor(e))},o.prototype.toString=function(){return this.svg.toString()},o.prototype.rect=function(e,t,n,o,i){var s=this;if(Array.isArray(e))return e.forEach(function(e){s.rect.apply(s,e.concat(i))}),this;var l=a("rect");return this.currentContext().appendChild(l),this.setAttributes(l,r({x:e,y:t,width:n,height:o},i)),this},o.prototype.circle=function(e,t,n,o){var i=a("circle");return this.currentContext().appendChild(i),this.setAttributes(i,r({cx:e,cy:t,r:n},o)),this},o.prototype.path=function(e,t){var n=a("path");return this.currentContext().appendChild(n),this.setAttributes(n,r({d:e},t)),this},o.prototype.polyline=function(e,t){var n=this;if(Array.isArray(e))return e.forEach(function(e){n.polyline(e,t)}),this;var o=a("polyline");return this.currentContext().appendChild(o),this.setAttributes(o,r({points:e},t)),this},o.prototype.group=function(e){var t=a("g");return this.currentContext().appendChild(t),this.context.push(t),this.setAttributes(t,r({},e)),this}},7338(e){"use strict";var t=e.exports=function(e){return this instanceof t?(this.tagName=e,this.attributes=Object.create(null),this.children=[],this.lastChild=null,this):new t(e)};t.prototype.appendChild=function(e){return this.children.push(e),this.lastChild=e,this},t.prototype.setAttribute=function(e,t){return this.attributes[e]=t,this},t.prototype.toString=function(){var e=this;return["<",e.tagName,Object.keys(e.attributes).map(function(t){return[" ",t,'="',e.attributes[t],'"'].join("")}).join(""),">",e.children.map(function(e){return e.toString()}).join(""),"</",e.tagName,">"].join("")}},4751(e){var t=Object.prototype.hasOwnProperty,n=Object.prototype.toString;function r(e){if(!e||"[object Object]"!==n.call(e)||e.nodeType||e.setInterval)return!1;var r,a=t.call(e,"constructor"),o=t.call(e.constructor.prototype,"isPrototypeOf");if(e.constructor&&!a&&!o)return!1;for(r in e);return void 0===r||t.call(e,r)}e.exports=function e(){var t,n,a,o,i,s,l=arguments[0]||{},u=1,c=arguments.length,d=!1;for("boolean"==typeof l&&(d=l,l=arguments[1]||{},u=2),"object"!=typeof l&&"function"!=typeof l&&(l={});u<c;u++)if(null!=(t=arguments[u]))for(n in t)a=l[n],l!==(o=t[n])&&(d&&o&&(r(o)||(i=Array.isArray(o)))?(i?(i=!1,s=a&&Array.isArray(a)?a:[]):s=a&&r(a)?a:{},l[n]=e(d,s,o)):void 0!==o&&(l[n]=o));return l}},2034(e,t){"use strict";t.pathToRegexp=function(e,t={}){let{delimiter:u="/",end:c=!0,sensitive:d=!1,trailing:m=!0}=t,p=[],f="",h=0;!function e(c){if(Array.isArray(c)){for(let t of c)e(t);return}let d="object"==typeof c?c:function(e,t={}){let{encodePath:o=n}=t,l=[...e],u=0;return new i(function t(n){let i=[],c="";function d(){c&&(i.push({type:"text",value:o(c)}),c="")}for(;u<l.length;){let o=l[u++];if(o===n)return d(),i;if("\\"===o){if(u===l.length)throw new s(`Unexpected end after \\ at index ${u}`,e);c+=l[u++];continue}if(":"===o||"*"===o){let t=":"===o?"param":"wildcard",n="";if(r.test(l[u]))do n+=l[u++];while(a.test(l[u]));else if('"'===l[u]){let t=u;for(;u<l.length;){if('"'===l[++u]){u++,t=0;break}"\\"===l[u]&&u++,n+=l[u]}if(t)throw new s(`Unterminated quote at index ${t}`,e)}if(!n)throw new s(`Missing parameter name at index ${u}`,e);d(),i.push({type:t,name:n});continue}if("{"===o){d(),i.push({type:"group",tokens:t("}")});continue}if("}"===o||"("===o||")"===o||"["===o||"]"===o||"+"===o||"?"===o||"!"===o)throw new s(`Unexpected ${o} at index ${u-1}`,e);c+=o}if(n)throw new s(`Unexpected end at index ${u}, expected ${n}`,e);return d(),i}(""),e)}(c,t);!function e(t,n,r,a){for(;n<t.length;){let o=t[n++];if("group"===o.type){let i=r.length;e(o.tokens,0,r,r=>e(t,n,r,a)),r.length=i;continue}r.push(o)}a(r)}(d.tokens,0,[],e=>{if(h>=256)throw new s("Too many path combinations",d.originalPath);h>0&&(f+="|"),f+=function(e,t,n,r){let a="",i="",u="",c=0,d=0,m=0;for(;m<e.length;){let p=e[m++];if("text"===p.type){a+=o(p.value),i+=p.value,2===c&&(u+=p.value),p.value.includes(t)&&(d=0);continue}if("param"===p.type||"wildcard"===p.type){if(c&&!i)throw new s(`Missing text before "${p.name}" ${p.type}`,r);"param"===p.type?(a+=2&d?`(${l(t,i)}+)`:!function(n,r){for(;n<e.length;){let a=e[n++];if(a.type===r)return!0;if("text"===a.type&&a.value.includes(t))break}return!1}(m,"wildcard")?1&d?`(${l(t,i)}+|${o(i)})`:`(${l(t,"")}+)`:`(${l(t,function(t){let n="";for(;t<e.length;){let r=e[t++];if("text"!==r.type)break;n+=r.value}return n}(m))}+)`,d|=c=1):(a+=2&d?`(${l(i,"")}+)`:u?`(${l(u,"")}+|${l(t,"")}+)`:"([^]+)",u="",d|=c=2),n.push(p),i="";continue}throw TypeError(`Unknown token type: ${p.type}`)}return a}(e,u,p,d.originalPath),h++})}(e);let g=`^(?:${f})`;return m&&(g+="(?:"+o(u)+"$)?"),{regexp:new RegExp(g+=c?"$":"(?="+o(u)+"|$)",d?"":"i"),keys:p}};let n=e=>e,r=/^[$_\p{ID_Start}]$/u,a=/^[$\u200c\u200d\p{ID_Continue}]$/u;function o(e){return e.replace(/[.+*?^${}()[\]|/\\]/g,"\\$&")}class i{constructor(e,t){this.tokens=e,this.originalPath=t}}class s extends TypeError{constructor(e,t){let n=e;t&&(n+=`: ${t}`),super(n+="; visit https://git.new/pathToRegexpError for info"),this.originalPath=t}}function l(e,t){return t.length>e.length?l(t,e):(e===t&&(t=""),t.length>1)?`(?:(?!${o(e)}|${o(t)})[^])`:e.length>1?`(?:(?!${o(e)})[^${o(t)}])`:`[^${o(e+t)}]`}},5873(e,t,n){"use strict";var r=n(8439);t.createRoot=r.createRoot,t.hydrateRoot=r.hydrateRoot},2864(e,t,n){"use strict";let r,a,o,i,s,l,u,c,d,m,p;n.r(t),n.d(t,{GenderUnknownIcon:()=>de,evaluateAsNumber:()=>iO,getImportMapOverrideMap:()=>oC,StockManagementPictogram:()=>Dv,ChemistryIcon:()=>cK,BabyIcon:()=>cA,DashboardExtension:()=>mt,openmrsComponentDecorator:()=>lZ,tryRegisterExtension:()=>ct,pictogramIds:()=>x4,ActivityIcon:()=>cT,compile:()=>ij,removeRouteMapOverride:()=>o2,TableBatchActions:()=>cv,getAsyncLifecycle:()=>lq,subscribeOpenmrsEvent:()=>ii,PasswordIcon:()=>dS,Assessment2Pictogram:()=>x5,CloseIcon:()=>cJ,setupRouteMapOverrides:()=>o5,getWorkspaceGroupRegistration:()=>s4,registerWorkspace:()=>sX,useFeatureFlag:()=>uv,reset:()=>sW,LabOrderIcon:()=>dd,VisitMode:()=>im,useLocations:()=>uF,getLifecycle:()=>lY,formatDatetime:()=>wu,getVisitsForPatient:()=>ix,formatPartialDate:()=>wo,CustomOverflowMenu:()=>cS,LocationIcon:()=>dp,GroupIcon:()=>dn,createUseStore:()=>lv,VisitStatus:()=>ip,getSessionLocation:()=>on,getCurrentImportMap:()=>oF,usePatient:()=>uK,useRenderableExtensions:()=>uZ,getOpenedWindowIndexByWorkspace:()=>s5,setLeftNav:()=>sz,clearHistory:()=>az,clearConfigErrors:()=>np,formatTime:()=>wl,isDevEnabled:()=>od,closeWorkspaceGroup2:()=>EP,getCurrentRouteMap:()=>oX,ConfigurableLink:()=>ld,sessionStore:()=>a1,setSessionLocale:()=>oa,subscribeSnackbarShown:()=>S,getLoggedInUser:()=>ot,GenderMaleIcon:()=>c8,getExtensionSlotConfigFromStore:()=>tT,evaluateAsNumberAsync:()=>i$,getImportMapDefaultMap:()=>oS,unregisterExtensionRendering:()=>su,implementerToolsConfigStore:()=>tW,Type:()=>th,InPatientPictogram:()=>Di,cleanupObsoleteFeatureFlags:()=>i3,getAttachmentsUrl:()=>ie,showSnackbar:()=>DO,PatientBannerActionsMenu:()=>xY,PatientSearchPictogram:()=>Dd,DocumentAttachmentIcon:()=>c1,Snackbar:()=>DC,CardiologyPictogram:()=>x8,ImageMedicalIcon:()=>di,ActionableNotificationComponent:()=>xf,DiagnosisTags:()=>w0,iconIds:()=>cP,PatientsPictogram:()=>Dm,interpolateUrl:()=>aI,setupHistory:()=>aU,subscribeToastShown:()=>_,detachAll:()=>sL,convertToLocaleCalendar:()=>wc,DocumentIcon:()=>c0,configInternalStore:()=>tE,ActionMenuButton2:()=>EH,setupDynamicOfflineDataHandler:()=>_o,makeUrl:()=>aX,oneOf:()=>nw,selectPreferredName:()=>xI,launchWorkspaceGroup:()=>function e(t,n){let r=s4(t),{state:a,onWorkspaceGroupLaunch:o,workspaceGroupCleanup:i,workspaceToLaunch:s}=n,l=function(){return DX}();if(l.getState().openWorkspaces.length){let r=l.getState().workspaceGroup;r?DB(r?.name,()=>{e(t,n)}):D4(()=>{e(t,n)})}else l.setState(e=>({...e,workspaceGroup:{name:t,members:r.members,cleanup:i}})),D9(t,a),o?.(),s&&DU(s.name,s.additionalProps??{})},MobileCheckIcon:()=>db,createErrorHandler:()=>P,parseDate:()=>b7,getAttachmentByUuid:()=>o8,LeftNavMenu:()=>w5,getExtensionRegistration:()=>sM,ShoppingCartAddItemIcon:()=>d8,ReferralOrderIcon:()=>dN,ReportIcon:()=>d$,dispatchToastShown:()=>x,getImportMapNextPageMap:()=>ok,registerExtension:()=>sA,setupOfflineSync:()=>_a,DownloadIcon:()=>c4,useConnectivity:()=>_c,provide:()=>t4,ShoppingCartArrowDownIcon:()=>dB,featureFlagsStore:()=>i4,promptBeforeClosing:()=>Dz,jsep:()=>iE,GeriatricsPictogram:()=>Da,SearchIcon:()=>dj,reportError:()=>C,slugify:()=>oj,isOmrsDateToday:()=>b5,getExtensionStore:()=>sc,BloodBankPictogram:()=>x9,TriagePictogram:()=>Dw,Workspace2:()=>EL,refetchCurrentUser:()=>a8,CheckmarkOutlineIcon:()=>cz,registerExtensionSlot:()=>sU,AllergiesIcon:()=>d3,ArrowDownIcon:()=>cN,useOpenmrsInfinite:()=>uC,getExtensionConfigFromExtensionSlotStore:()=>t$,OpenmrsDatePicker:()=>wX,getExtensionConfigFromStore:()=>tO,getDynamicOfflineDataEntries:()=>_i,getLocaleDisplayName:()=>bS,messageOmrsServiceWorker:()=>_l,navigate:()=>aF,launchWorkspace2:()=>ET,getGroupByWindowName:()=>s6,CustomOverflowMenuItem:()=>ck,isUrl:()=>nb,CaretDownIcon:()=>cL,ArrowLeftIcon:()=>cO,FacilityPictogram:()=>Dr,ViewOffIcon:()=>d1,updateInternalExtensionStore:()=>sr,dispatchActionableNotificationShown:()=>b,resetRouteMapOverrides:()=>o3,formatDurationBetween:()=>wv,defaultVisitCustomRepresentation:()=>ih,getBreadcrumbsFor:()=>nT,useOpenmrsPagination:()=>uw,Pagination:()=>xO,CheckmarkFilledIcon:()=>cH,clearCurrentUser:()=>a7,showModal:()=>xc,ChevronUpIcon:()=>cq,saveVisit:()=>ib,useAttachments:()=>ur,Pictogram:()=>DS,useExtensionSlot:()=>l_,ChevronDownIcon:()=>cG,OpenmrsDateRangePicker:()=>wQ,deleteAttachmentPermanently:()=>ir,getVisitTypes:()=>id,OverflowMenuHorizontalIcon:()=>dE,EventScheduleIcon:()=>c6,getSessionStore:()=>a5,ActionMenu:()=>Ew,ProcedureOrderIcon:()=>dT,preloadImport:()=>oL,registerWorkspaceWindows2:()=>s8,useOnVisible:()=>uV,setSessionLocation:()=>or,userHasAccess:()=>oe,ChartAverageIcon:()=>cU,getFeatureFlag:()=>i6,UserAvatarIcon:()=>dJ,renderExtension:()=>ls,useFhirInfinite:()=>uO,toVisitTypeObject:()=>iu,useSession:()=>uY,EmergencyDepartmentPictogram:()=>Dn,Notification:()=>xm,dispatchSnackbarShown:()=>w,navigateAndLaunchWorkspace:()=>DW,formatDate:()=>wi,workspace2StoreActions:()=>EO,SwitcherIcon:()=>dL,esmStyleGuideSchema:()=>ch,getImportMapDisabledOverrides:()=>oP,useAssignedExtensionIds:()=>ut,CaretRightIcon:()=>cB,evaluateAsType:()=>iM,PageHeader:()=>xR,TranslateIcon:()=>dG,setUserProperties:()=>oo,MovementIcon:()=>dD,renderInlineNotifications:()=>xx,subscribePrecacheStaticDependencies:()=>_u,PaymentsDeskPictogram:()=>Dp,usePrimaryIdentifierCode:()=>uG,useLayoutType:()=>uM,getCurrentUser:()=>a6,XrayPictogram:()=>Dx,CaretUpIcon:()=>cV,renderActionableNotifications:()=>xE,OpenmrsAppContext:()=>l5,setupModals:()=>xu,getDefaultsFromConfigSchema:()=>function e(t){let n={};for(let r of Object.keys(t))if(E8(t[r])&&t[r].hasOwnProperty("_default"))n[r]=t[r]._default;else{if(r.startsWith("_"))continue;E8(t[r])?n[r]=e(t[r]):n[r]=t[r]}return n},subscribeTo:()=>W,recordConfigDerivationError:()=>tV,useAbortController:()=>l8,Extension:()=>lm,getFhirServerPaginationHandlers:()=>u_,useConnectedExtensions:()=>ul,registerApp:()=>cr,HospitalBedIcon:()=>da,useExtensionInternalStore:()=>uh,configExtensionStore:()=>tS,getSynchronizationItems:()=>_s,getExtensionSlotsConfigStore:()=>tC,registerExtensionRendering:()=>sl,RenderIfValueIsTruthy:()=>l9,registerFeatureFlag:()=>i2,useFhirFetchAll:()=>uN,restBaseUrl:()=>aY,CalendarHeatMapIcon:()=>cj,getWorkspaceRegistration:()=>s1,isImportMapOverrideDisabled:()=>oT,resetConfigSystem:()=>nf,getExtensionInternalStore:()=>st,registerGlobalStore:()=>V,evaluateAsBoolean:()=>iR,PatientBannerPatientInfo:()=>xG,addRouteMapOverride:()=>o4,getDefaultCalendar:()=>wr,SettingsIcon:()=>dI,DrugOrderIcon:()=>c2,ProgramsIcon:()=>dR,useAssignedExtensions:()=>lE,CloseFilledIcon:()=>cX,canAccessStorage:()=>E9,registerDefaultCalendar:()=>wn,TreeViewAltIcon:()=>dY,OverflowMenuVerticalIcon:()=>d_,clearConfigDerivationError:()=>tU,getConfigStore:()=>tk,registerWorkspaceGroup:()=>sQ,InformationSquareIcon:()=>du,EmptyCard:()=>w2,ChevronLeftIcon:()=>cZ,RadiologyIcon:()=>d9,useCandidateExtensions:()=>un,renderToasts:()=>DI,isDesktop:()=>uA,integrateBreakpoints:()=>cl,RegistrationPictogram:()=>Dg,CardHeader:()=>cm,getExtensionRegistrationFrom:()=>s$,InformationIcon:()=>ds,TrashCanIcon:()=>dZ,useShallowStableValue:()=>lp,useOpenmrsSWR:()=>uU,Assessment1Pictogram:()=>x6,finishRegisteringAllApps:()=>ca,importDynamic:()=>oI,useFhirPagination:()=>uE,useVisitContextStore:()=>u2,ArrowUpIcon:()=>cM,showActionableNotification:()=>x_,useForceUpdate:()=>ub,useVisit:()=>u3,updateWorkspaceWindowState:()=>D0,PatientBannerPatientIdentifiers:()=>xW,WorkspaceNotification:()=>Ec,TransferPictogram:()=>Db,usePagination:()=>uW,Breakpoint:()=>co,PatientBannerToggleContactDetailsButton:()=>Ez,CloseOutlineIcon:()=>cQ,ObstetricsPictogram:()=>Dc,parseDateInput:()=>wm,getConfig:()=>t3,attach:()=>sj,getLocale:()=>bk,ActionMenuButton:()=>En,isUrlWithTemplateParameters:()=>nv,useEmrConfiguration:()=>up,useLeftNav:()=>uj,ToolsIcon:()=>dK,ErrorState:()=>w3,detach:()=>sI,setCurrentVisit:()=>iv,ConditionsIcon:()=>d5,SaveIcon:()=>dA,useWorkspaces:()=>D2,resetWorkspaceStore:()=>D5,useConfig:()=>us,validator:()=>tg,CalendarIcon:()=>cI,getHistory:()=>aW,StickyNoteAddIcon:()=>dV,useWorkspace2Store:()=>E$,getPatientName:()=>x$,getVisitStore:()=>iy,getCoreTranslation:()=>aj,registerModuleWithConfigSystem:()=>tX,registerModuleLoad:()=>tQ,getBreadcrumbs:()=>nk,extractVariableNames:()=>iQ,translateFrom:()=>aA,useStoreWithActions:()=>ly,EditIcon:()=>c3,getCandidateExtensions:()=>sV,shallowEqual:()=>R,subscribeNotificationShown:()=>D,MaximizeIcon:()=>dh,promptForClosingWorkspaces:()=>EN,WarningIcon:()=>d2,closeAllWorkspaces:()=>D4,fhirBaseUrl:()=>aq,matchLocale:()=>E5,registerBreadcrumb:()=>n_,usePatientPhoto:()=>xX,EventsIcon:()=>c5,createGlobalStore:()=>B,workspaceStore:()=>DX,subscribeToFeatureFlag:()=>i5,useExtensionStore:()=>uy,closeWorkspace:()=>DY,createAttachment:()=>it,useLeftNavStore:()=>uI,TableIcon:()=>dH,Icon:()=>me,InformationFilledIcon:()=>dl,getCurrentPageMap:()=>o_,LaboratoryPictogram:()=>Ds,temporaryConfigStore:()=>t_,getPromptBeforeClosingFcn:()=>DK,toDateObjectStrict:()=>b9,defineConfigSchema:()=>tJ,filterBreadcrumbs:()=>nP,invalidateImplementerToolsConfig:()=>tF,PatientBannerContactDetails:()=>EJ,getAssignedExtensions:()=>sB,PatientPhoto:()=>x1,MaterialOrderIcon:()=>df,MicroscopeIcon:()=>dv,visitTypesUrl:()=>ic,scheduleRecomputation:()=>sh,PharmacyPictogram:()=>Df,AttachmentIcon:()=>d6,MoneyIcon:()=>dw,getAttachments:()=>o7,getWorkspaceGroupStore:()=>D9,PageHeaderContent:()=>xN,MedicationIcon:()=>dg,PrinterIcon:()=>dP,PatientListsPictogram:()=>DE,useAppContext:()=>l7,isOpenmrsRoutes:()=>oU,AppointmentsAltPictogram:()=>x3,GenericOrderTypeIcon:()=>dt,batchExtensionUpdates:()=>sp,useExtensionSlotStore:()=>lx,ViewIcon:()=>d4,formattedName:()=>xj,sessionEndpoint:()=>aJ,duration:()=>wg,resetImportMapOverrides:()=>oO,TableOfContentsIcon:()=>dW,CaretLeftIcon:()=>cF,getTranslationOverrides:()=>t6,isVersionSatisfied:()=>_t,EmptyCardIllustration:()=>w4,PenIcon:()=>dC,getWorkspaceStore:()=>DQ,validators:()=>nx,setupImportMapOverrides:()=>oA,showToast:()=>DL,useDefineAppContext:()=>l6,verifyTotpCode:()=>oi,getGlobalStore:()=>U,useOnClickOutside:()=>uB,getWindowByWorkspaceName:()=>s3,ArrowRightIcon:()=>c$,loadLifeCycles:()=>u8,registerBreadcrumbs:()=>nS,MotherIcon:()=>dx,fetchCurrentPatient:()=>ia,Toast:()=>D$,MessageQueueIcon:()=>dy,TwoFactorAuthenticationIcon:()=>dq,Pharmacy2Pictogram:()=>Dh,goBackInHistory:()=>aH,GroupAccessIcon:()=>dr,getExtensionRenderingsStore:()=>sn,setImplementerToolsConfigRecomputer:()=>tL,getAsyncExtensionLifecycle:()=>lX,setupApiModule:()=>op,renderLoadingSpinner:()=>EX,WorkspaceContainer:()=>Ex,showNotification:()=>xD,getModalRegistration:()=>sY,ListCheckedIcon:()=>dm,ResponsiveWrapper:()=>Dk,GynaecologyPictogram:()=>Do,ShoppingCartIcon:()=>dF,getRouteMapNextPageMap:()=>o0,MetadataExportPictogram:()=>Du,updateVisit:()=>iw,backendDependencies:()=>om,MaybePictogram:()=>D_,createParcelMounter:()=>lo,openmrsFetch:()=>aQ,useStore:()=>lg,isOpenmrsAppRoutes:()=>oV,HomePictogram:()=>DD,DentistryPictogram:()=>De,ServiceQueuesPictogram:()=>Dy,toLanguageTag:()=>b_,launchWorkspace:()=>DU,setFeatureFlag:()=>i9,DigitalTrustPictogram:()=>Dt,NumericObservation:()=>xP,attachmentUrl:()=>o9,interpolateString:()=>aL,inRange:()=>ny,useExtensionSlotMeta:()=>ug,AppointmentsPictogram:()=>x2,renderSnackbars:()=>DN,getRegisteredWorkspace2Names:()=>EA,logout:()=>os,toLocationObject:()=>is,ChartLineIcon:()=>cW,UserHasAccess:()=>uq,evaluateAsBooleanAsync:()=>iN,changeWorkspaceContext:()=>Dq,createDashboard:()=>mn,getLocations:()=>il,useExtensionContext:()=>uf,canCloseWorkspaceWithoutPrompting:()=>DF,getExtensionsConfigStore:()=>tR,getRouteMapDefaultMap:()=>oQ,age:()=>xF,isOmrsDateStrict:()=>b6,registerWorkspaceGroups2:()=>s9,usePaginationInfo:()=>uH,evaluateAsync:()=>iT,useOpenmrsFetchAll:()=>uT,removeImportMapOverride:()=>oN,showWorkspacePrompts:()=>D3,useVisitTypes:()=>u5,ageAsDuration:()=>xL,getExtensionNameFromId:()=>sO,renderParcel:()=>la,useWorkspace2Context:()=>EM,ResetIcon:()=>dM,RenewIcon:()=>dO,subscribeActionableNotificationShown:()=>E,ErrorCard:()=>w6,GenderFemaleIcon:()=>c9,enableImportMapOverride:()=>o$,retry:()=>_n,ComponentContext:()=>lc,ExtensionSlot:()=>lk,unsetLeftNav:()=>sK,addImportMapOverride:()=>oR,MaybeIcon:()=>d7,useCustomOverflowMenu:()=>c_,PedestrianFamilyIcon:()=>dk,cancelPrompt:()=>DG,CtScanPictogram:()=>x7,dispatchNotificationShown:()=>v,leftNavStore:()=>sH,OpenmrsFetchError:()=>a0,UserFollowIcon:()=>dX,launchWorkspaceGroup2:()=>EC,ChevronRightIcon:()=>cY,UserXrayIcon:()=>dQ,GenderOtherIcon:()=>c7,formatDuration:()=>wd,toOmrsIsoString:()=>b8,Labs2Pictogram:()=>Dl,workspace2Store:()=>s2,setUserLanguage:()=>a9,useBodyScrollLock:()=>ua,getExtensionConfig:()=>tN,SyringeIcon:()=>dU,LocationPicker:()=>w9,useDebounce:()=>uu,TimeIcon:()=>dz,getExtensionSlotConfig:()=>tP,AddIcon:()=>cR,getRouteMapOverrideMap:()=>o1,processConfig:()=>t5,InventoryManagementIcon:()=>dc,registerWorkspaces2:()=>s7,UserIcon:()=>d0,formatPatientName:()=>xA,fireOpenmrsEvent:()=>io,registerModal:()=>sZ,registerTranslationNamespace:()=>t0,displayName:()=>xM,evaluate:()=>iP,defineExtensionConfigSchema:()=>t1,renderWorkspaceWindowsAndMenu:()=>E3,getSyncLifecycle:()=>lJ,evaluateAsTypeAsync:()=>iA});let f="openmrs:notification-shown",h="openmrs:actionable-notification-shown",g="openmrs:toast-shown",y="openmrs:snack-bar-shown";function v(e){window.dispatchEvent(new CustomEvent(f,{detail:e}))}function b(e){window.dispatchEvent(new CustomEvent(h,{detail:e}))}function w(e){window.dispatchEvent(new CustomEvent(y,{detail:e}))}function x(e){window.dispatchEvent(new CustomEvent(g,{detail:e}))}function D(e){let t=t=>e(t.detail);return window.addEventListener(f,t),()=>window.removeEventListener(f,t)}function E(e){let t=t=>e(t.detail);return window.addEventListener(h,t),()=>window.removeEventListener(h,t)}function _(e){let t=t=>e(t.detail);return window.addEventListener(g,t),()=>window.removeEventListener(g,t)}function S(e){let t=t=>e(t.detail);return window.addEventListener(y,t),()=>window.removeEventListener(y,t)}function k(e,t){return e instanceof Error?e.message||t:"string"==typeof e&&e.trim().length>0?e:t}function C(e){let t=T(e);setTimeout(()=>{throw t})}function P(){let e=Error();return t=>{let n=T(t);n.stack+=`
2
2
  Async stacktrace:
3
3
  ${e.stack}`,C(t)}}function T(e){let t;if(e instanceof Error)return e;if(null===e)return Error("'null' was thrown as an error");if("object"==typeof e){try{t=`Object thrown as error: ${JSON.stringify(e)}`}catch(n){t=`Object thrown as error with the following properties: ${Object.keys(e)}`}return Error(t)}if(void 0===e)return Error("'undefined' was thrown as an error");return Error(e.toString())}function R(e,t){if(e===t||Object.is(e,t))return!0;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}if(Array.isArray(t)||"object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;let n=Object.getOwnPropertyNames(e),r=Object.getOwnPropertyNames(t);return n.length===r.length&&n.every(n=>e[n]===t[n])}function N(e,t){let n;try{n=e()}catch(e){return}return{getItem:e=>{var r;let a=e=>null===e?null:JSON.parse(e,null==t?void 0:t.reviver),o=null!=(r=n.getItem(e))?r:null;return o instanceof Promise?o.then(a):a(o)},setItem:(e,r)=>n.setItem(e,JSON.stringify(r,null==t?void 0:t.replacer)),removeItem:e=>n.removeItem(e)}}window.onerror=function(e,t,n,r,a){return console.error("Unexpected error: ",a??e),x({description:k(a??e,"Oops! An unexpected error occurred."),kind:"error",title:"Error"}),!1},window.onunhandledrejection=function(e){console.error("Unhandled rejection: ",e.reason),x({description:k(e.reason,"Oops! An unhandled promise rejection occurred."),kind:"error",title:"Error"})};let O=e=>t=>{try{let n=e(t);if(n instanceof Promise)return n;return{then:e=>O(e)(n),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>O(t)(e)}}},$=e=>{let t,n=new Set,r=(e,r)=>{let a="function"==typeof e?e(t):e;if(!Object.is(a,t)){let e=t;t=(null!=r?r:"object"!=typeof a||null===a)?a:Object.assign({},t,a),n.forEach(n=>n(t,e))}},a=()=>t,o={setState:r,getState:a,getInitialState:()=>i,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},i=t=e(r,a,o);return o},M=e=>e?$(e):$;function A(){try{return"u">typeof process&&("true"===process.env.VITEST||void 0!==process.env.JEST_WORKER_ID)||"u">typeof globalThis&&("__vitest_worker__"in globalThis||"__jest__"in globalThis)}catch{return!1}}let j={},I=Symbol.for("openmrs.esm-state.instanceCount"),L=globalThis,F=(L[I]??0)+1;function B(e,t,n="none"){let r=j[e];if(r)return r.active?A()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):r.value.setState(t,!0),r.active=!0,r.value;{let r=H(e,t,n);return j[e]={value:r,active:!0},r}}function V(e,t){let n=j[e];return n?(n.active?A()||console.error(`Attempted to override the existing store ${e}. Make sure that stores are only created once.`):n.value=t,n.active=!0,n.value):(j[e]={value:t,active:!0},t)}function U(e,t,n="none"){let r=j[e];if(!r){let r=H(e,t??{},n);return j[e]={value:r,active:!1},r}return r.value}function W(...e){let[t,n,r]=e,a=void 0===r?n:r,o=void 0===r?e=>e:n,i=o(t.getState());return a(i),t.subscribe(e=>{let t=o(e);R(i,t)||(i=t,a(t))})}function H(e,t,n){return"sessionStorage"===n?M()(((e,t)=>{if("getStorage"in t||"serialize"in t||"deserialize"in t)return console.warn("[DEPRECATED] `getStorage`, `serialize` and `deserialize` options are deprecated. Use `storage` option instead."),(n,r,a)=>{let o,i,s={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},l=!1,u=new Set,c=new Set;try{o=s.getStorage()}catch(e){}if(!o)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),n(...e)},r,a);let d=O(s.serialize),m=()=>{let e,t=d({state:s.partialize({...r()}),version:s.version}).then(e=>o.setItem(s.name,e)).catch(t=>{e=t});if(e)throw e;return t},p=a.setState;a.setState=(e,t)=>{p(e,t),m()};let f=e((...e)=>{n(...e),m()},r,a),h=()=>{var e;if(!o)return;l=!1,u.forEach(e=>e(r()));let t=(null==(e=s.onRehydrateStorage)?void 0:e.call(s,r()))||void 0;return O(o.getItem.bind(o))(s.name).then(e=>{if(e)return s.deserialize(e)}).then(e=>{if(e)if("number"!=typeof e.version||e.version===s.version)return e.state;else{if(s.migrate)return s.migrate(e.state,e.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}}).then(e=>{var t;return n(i=s.merge(e,null!=(t=r())?t:f),!0),m()}).then(()=>{null==t||t(i,void 0),l=!0,c.forEach(e=>e(i))}).catch(e=>{null==t||t(void 0,e)})};return a.persist={setOptions:e=>{s={...s,...e},e.getStorage&&(o=e.getStorage())},clearStorage:()=>{null==o||o.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:e=>(u.add(e),()=>{u.delete(e)}),onFinishHydration:e=>(c.add(e),()=>{c.delete(e)})},h(),i||f};return(n,r,a)=>{let o,i={storage:N(()=>localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...t},s=!1,l=new Set,u=new Set,c=i.storage;if(!c)return e((...e)=>{console.warn(`[zustand persist middleware] Unable to update item '${i.name}', the given storage is currently unavailable.`),n(...e)},r,a);let d=()=>{let e=i.partialize({...r()});return c.setItem(i.name,{state:e,version:i.version})},m=a.setState;a.setState=(e,t)=>{m(e,t),d()};let p=e((...e)=>{n(...e),d()},r,a);a.getInitialState=()=>p;let f=()=>{var e,t;if(!c)return;s=!1,l.forEach(e=>{var t;return e(null!=(t=r())?t:p)});let a=(null==(t=i.onRehydrateStorage)?void 0:t.call(i,null!=(e=r())?e:p))||void 0;return O(c.getItem.bind(c))(i.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===i.version)return[!1,e.state];else{if(i.migrate)return[!0,i.migrate(e.state,e.version)];console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(e=>{var t;let[a,s]=e;if(n(o=i.merge(s,null!=(t=r())?t:p),!0),a)return d()}).then(()=>{null==a||a(o,void 0),o=r(),s=!0,u.forEach(e=>e(o))}).catch(e=>{null==a||a(void 0,e)})};return a.persist={setOptions:e=>{i={...i,...e},e.storage&&(c=e.storage)},clearStorage:()=>{null==c||c.removeItem(i.name)},getOptions:()=>i,rehydrate:()=>f(),hasHydrated:()=>s,onHydrate:e=>(l.add(e),()=>{l.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},i.skipHydration||f(),o||p}})(()=>t,{name:e,storage:N(()=>sessionStorage)})):M()(()=>t)}L[I]=F,F>1&&!A()&&console.error(`Detected ${F} copies of @openmrs/esm-framework running on this page. Each copy keeps its own store registry, so stores, configuration and extension state are not shared between them. This usually means a frontend module loaded its own bundled framework instead of the one the app shell provides.`),globalThis.setTimeout?.(()=>{"u">typeof window&&"development"===window.spaEnv&&(window.stores=j)},1e3);let z=function(e){return void 0===e};var K,G,Z,Y,q,J,X,Q,ee,et,en,er,ea=n(7361),eo=n(4878),ei=n(7313),es=Object.prototype,el=Function.prototype.toString,eu=es.hasOwnProperty,ec=el.call(Object);let ed=function(e){if(!(0,ei.A)(e)||"[object Object]"!=(0,ea.A)(e))return!1;var t=(0,eo.A)(e);if(null===t)return!0;var n=eu.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&el.call(n)==ec};var em=n(1050),ep=n(9271),ef=n(6979);let eh=function(e,t,n){(void 0===n||(0,ef.A)(e[t],n))&&(void 0!==n||t in e)||(0,ep.A)(e,t,n)},eg=function(e,t,n){for(var r=-1,a=Object(e),o=n(e),i=o.length;i--;){var s=o[++r];if(!1===t(a[s],s,a))break}return e};var ey=n(521),ev=n(5246),eb=n(84),ew=n(2458),ex=n(6770),eD=n(6956),eE=n(1475),e_=n(1917),eS=n(405),ek=n(7942),eC=n(480);let eP=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]};var eT=n(8078),eR=n(3513);let eN=function(e,t,n,r,a,o,i){var s=eP(e,n),l=eP(t,n),u=i.get(l);if(u)return void eh(e,n,u);var c=o?o(s,l,n+"",e,t,i):void 0,d=void 0===c;if(d){var m=(0,eD.A)(l),p=!m&&(0,e_.A)(l),f=!m&&!p&&(0,eC.A)(l);(c=l,m||p||f)?(0,eD.A)(s)?c=s:(0,ei.A)(s)&&(0,eE.A)(s)?c=(0,eb.A)(s):p?(d=!1,c=(0,ey.A)(l,!0)):f?(d=!1,c=(0,ev.A)(l,!0)):c=[]:ed(l)||(0,ex.A)(l)?(c=s,(0,ex.A)(s))?c=(0,eT.A)(s,(0,eR.A)(s)):(!(0,ek.A)(s)||(0,eS.A)(s))&&(c=(0,ew.A)(l)):d=!1}d&&(i.set(l,c),a(c,l,r,o,i),i.delete(l)),eh(e,n,c)},eO=function e(t,n,r,a,o){t!==n&&eg(n,function(i,s){if(o||(o=new em.A),(0,ek.A)(i))eN(t,n,s,r,e,a,o);else{var l=a?a(eP(t,s),i,s+"",t,n,o):void 0;void 0===l&&(l=i),eh(t,s,l)}},eR.A)},e$=function(e){return e},eM=function(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)};var eA=Math.max;let ej=function(e,t,n){return t=eA(void 0===t?e.length-1:t,0),function(){for(var r=arguments,a=-1,o=eA(r.length-t,0),i=Array(o);++a<o;)i[a]=r[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=r[a];return s[t]=n(i),eM(e,this,s)}};var eI=n(1758),eL=eI.A?function(e,t){return(0,eI.A)(e,"toString",{configurable:!0,enumerable:!1,value:function(){return t},writable:!0})}:e$,eF=Date.now,eB=(K=0,G=0,function(){var e=eF(),t=16-(e-G);if(G=e,t>0){if(++K>=800)return arguments[0]}else K=0;return eL.apply(void 0,arguments)}),eV=n(5378);let eU=function(e,t,n){if(!(0,ek.A)(n))return!1;var r=typeof t;return("number"==r?!!((0,eE.A)(n)&&(0,eV.A)(t,n.length)):"string"==r&&t in n)&&(0,ef.A)(n[t],e)},eW=function(e){var t;return eB(ej(t=function(t,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,i=a>2?n[2]:void 0;for(o=e.length>3&&"function"==typeof o?(a--,o):void 0,i&&eU(n[0],n[1],i)&&(o=a<3?void 0:o,a=1),t=Object(t);++r<a;){var s=n[r];s&&e(t,s,r,o)}return t},void 0,e$),t+"")};var eH=eW(function(e,t,n,r){eO(e,t,n,r)}),ez=n(7685);let eK=function(e,t){for(var n=-1,r=null==e?0:e.length,a=Array(r);++n<r;)a[n]=t(e[n],n,e);return a};var eG=n(1736),eZ=n(4089),eY=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,eq=/^\w*$/;let eJ=function(e,t){if((0,eD.A)(e))return!1;var n=typeof e;return!!("number"==n||"symbol"==n||"boolean"==n||null==e||(0,eZ.A)(e))||eq.test(e)||!eY.test(e)||null!=t&&e in Object(t)};var eX=n(257);function eQ(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw TypeError("Expected a function");var n=function(){var r=arguments,a=t?t.apply(this,r):r[0],o=n.cache;if(o.has(a))return o.get(a);var i=e.apply(this,r);return n.cache=o.set(a,i)||o,i};return n.cache=new(eQ.Cache||eX.A),n}eQ.Cache=eX.A;var e0=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e1=/\\(\\)?/g,e4=(Y=(Z=eQ(function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(e0,function(e,n,r,a){t.push(r?a.replace(e1,"$1"):n||e)}),t},function(e){return 500===Y.size&&Y.clear(),e})).cache,Z),e2=n(3516),e3=1/0,e6=e2.A?e2.A.prototype:void 0,e5=e6?e6.toString:void 0;let e9=function e(t){if("string"==typeof t)return t;if((0,eD.A)(t))return eK(t,e)+"";if((0,eZ.A)(t))return e5?e5.call(t):"";var n=t+"";return"0"==n&&1/t==-e3?"-0":n},e8=function(e){return null==e?"":e9(e)},e7=function(e,t){return(0,eD.A)(e)?e:eJ(e,t)?[e]:e4(e8(e))},te=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};var tt=1/0;let tn=function(e){if("string"==typeof e||(0,eZ.A)(e))return e;var t=e+"";return"0"==t&&1/e==-tt?"-0":t},tr=function(e,t){t=e7(t,e);for(var n=0,r=t.length;null!=e&&n<r;)e=e[tn(t[n++])];return n&&n==r?e:void 0},ta=function(e,t,n){var r=-1,a=e.length;t<0&&(t=-t>a?0:a+t),(n=n>a?a:n)<0&&(n+=a),a=t>n?0:n-t>>>0,t>>>=0;for(var o=Array(a);++r<a;)o[r]=e[r+t];return o};var to=Object.prototype.hasOwnProperty;let ti=function(e,t){t=e7(t,e);var n,r=-1,a=t.length;if(!a)return!0;for(;++r<a;){var o=tn(t[r]);if("__proto__"===o&&!to.call(e,"__proto__")||("constructor"===o||"prototype"===o)&&r<a-1)return!1}var i=(n=t).length<2?e:tr(e,ta(n,0,-1));return null==i||delete i[tn(te(t))]},ts=function(e){return ed(e)?void 0:e};var tl=n(3271),tu=e2.A?e2.A.isConcatSpreadable:void 0;let tc=function(e){return(0,eD.A)(e)||(0,ex.A)(e)||!!(tu&&e&&e[tu])},td=function e(t,n,r,a,o){var i=-1,s=t.length;for(r||(r=tc),o||(o=[]);++i<s;){var l=t[i];n>0&&r(l)?n>1?e(l,n-1,r,a,o):(0,tl.A)(o,l):a||(o[o.length]=l)}return o};var tm=n(7096),tp=eB(ej(q=function(e,t){var n={};if(null==e)return n;var r=!1;t=eK(t,function(t){return t=e7(t,e),r||(r=t.length>1),t}),(0,eT.A)(e,(0,tm.A)(e),n),r&&(n=(0,eG.A)(n,7,ts));for(var a=t.length;a--;)ti(n,t[a]);return n},void 0,function(e){return(null==e?0:e.length)?td(e,1):[]}),q+""),tf=n(3322),th=((J={}).Array="Array",J.Boolean="Boolean",J.ConceptUuid="ConceptUuid",J.Number="Number",J.Object="Object",J.String="String",J.UUID="UUID",J.PersonAttributeTypeUuid="PersonAttributeTypeUuid",J.PatientIdentifierTypeUuid="PatientIdentifierTypeUuid",J);function tg(e,t){return n=>{if(!e(n))if("function"==typeof t)return t(n);else return t}}let ty=tg(e=>Array.isArray(e),"must be an array"),tv=tg(e=>"boolean"==typeof e,"must be a boolean"),tb=tg(e=>"number"==typeof e,"must be a number"),tw=tg(e=>"string"==typeof e,"must be a string"),tx=tg(e=>"object"==typeof e&&!Array.isArray(e)&&null!==e,"must be an object (not an array or null)"),tD=tg(e=>/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(e)||/^[0-9a-f]{36}$/i.test(e),"must be a valid UUID or a 36-character hexadecimal string"),tE=B("config-internal",{providedConfigs:[],schemas:{},moduleLoaded:{}}),t_=B("temporary-config",{config:function(){try{return JSON.parse(localStorage.getItem("openmrs:temporaryConfig")||"{}")}catch(e){return{}}}()});t_.subscribe(e=>{var t=e.config;try{localStorage.setItem("openmrs:temporaryConfig",JSON.stringify(t))}catch(e){}});let tS=B("config-store-of-extension-state",{mountedExtensions:[]});function tk(e){return U(`config-module-${e}`,{config:null,loaded:!1,translationOverridesLoaded:!1})}function tC(){return U("config-extension-slots",{slots:{}})}function tP(e){return tT(tC().getState(),e)}function tT(e,t){return e.slots[t]??{loaded:!1,config:{}}}function tR(){return U("config-extensions",{configs:{}})}function tN(e,t){if("string"!=typeof e||"string"!=typeof t||"__proto__"===e||"__proto__"===t||"constructor"===e||"constructor"===t||"prototype"===e||"prototype"===t)throw Error("Attempted to call `getExtensionConfig()` with invalid argument");let n=tR(),r=n=>n.configs[e]?.[t];return{getInitialState:()=>r(n.getInitialState()),getState:()=>r(n.getState())??{loaded:!1,config:null},subscribe:e=>n.subscribe((t,n)=>{let a=r(t),o=r(n);R(a,o)||e(a,o)})}}function tO(e,t,n){return e.configs[t]?.[n]??{loaded:!1,config:null}}function t$(e,t,n){return e.configure?.[n]??null}let tM=M()(()=>({config:{}})),tA=0,tj=!0,tI=!1;function tL(e){r=e}function tF(){tj=!0,tA>0&&tB()}function tB(){if(tj&&r&&!tI){tI=!0,tj=!1;try{r()}catch(e){tj=!0,tV(e),console.error("Failed to derive the implementer tools config",e)}finally{tI=!1}}}function tV(e){tM.setState({derivationError:e instanceof Error?e.message:String(e)})}function tU(){tM.getState().derivationError&&tM.setState({derivationError:void 0})}let tW=V("config-implementer-tools",{...tM,getState:()=>(0===tA&&tB(),tM.getState()),setState:(...e)=>(tj=!1,tM.setState(...e)),subscribe(e){tA++,tB();let t=tM.subscribe(e),n=!1;return()=>{!n&&(n=!0,tA--),t()}}});function tH(e,t){if(Array.isArray(t))return t}function tz(e,t){return eH({},e,t,tH)}let tK=[];function tG(){let e=tE.getState(),t=t_.getState(),n=tS.getState();!function(e,t){for(let n of Object.keys(e.schemas)){let r,a=tk(n),o=e.schemas[n],i=!!e.moduleLoaded[n],s=tq.get(n);if(s&&s.schema===o&&s.moduleLoaded===i&&s.providedConfigs===e.providedConfigs&&s.temporaryConfig===t.config)r=s.state;else{let a=i?function(e,t,n){let r=t.schemas[e],a=nn(e,ne(t,n));na(r,a,e);let o=nl(r,a);return no(r,o,e),delete o.extensionSlots,o}(n,e,t):function(e,t,n){let r=nl(ng,nn(e,ne(t,n)));return no(ng,r,e),delete r.extensionSlots,r}(n,e,t);r={translationOverridesLoaded:!0,loaded:i,config:a},tq.set(n,{schema:o,moduleLoaded:i,providedConfigs:e.providedConfigs,temporaryConfig:t.config,state:r})}let l=a.getState();l.loaded===r.loaded&&l.translationOverridesLoaded===r.translationOverridesLoaded&&(0,ez.A)(l.config,r.config)||a.setState(r)}}(e,t);let r=function(e,t){let n=nr(ne(e,t)),r=Object.keys(n).reduce((e,t)=>(n[t]?.extensionSlots&&(e[t]=n[t]?.extensionSlots),e),{});var a=r;for(let[e,t]of Object.entries(a))for(let[n,r]of Object.entries(t))!function(e,t,n){let r=`${t}.extensionSlots.${n}`,a=`Extension slot config '${r}'`,o=Object.keys(e).filter(e=>!["add","remove","order","configure"].includes(e));o.length&&nm(r,a+`' contains invalid keys '${o.join("', '")}'`),!e.add||Array.isArray(e.add)&&e.add.every(e=>"string"==typeof e)||nm(r,a+".add' is invalid. Must be an array of strings (extension IDs)"),!e.remove||Array.isArray(e.remove)&&e.remove.every(e=>"string"==typeof e)||nm(r,a+".remove' is invalid. Must be an array of strings (extension IDs)"),!e.order||Array.isArray(e.order)&&e.order.every(e=>"string"==typeof e)||nm(r,a+".order' is invalid. Must be an array of strings (extension IDs)"),e.configure&&!nc(e.configure)&&nm(r,a+".configure' is invalid. Must be an object with extension IDs for keys")}(r,e,n);let o={},i={};for(let e of Object.values(r))for(let[t,n]of Object.entries(e))o[t]=n,n.configure&&(i[t]??(i[t]=[])).push(n.configure);for(let[e,t]of Object.entries(i)){let n=1===t.length?t[0]:nr(t);o[e].configure!==n&&(o[e]={...o[e],configure:n})}return o}(e,t);(function(e){let t=tC(),n=t.getState().slots,r={},a=!1;for(let[t,o]of Object.entries(e)){let e=n[t];e?.loaded&&(0,ez.A)(e.config,o)?r[t]=e:(r[t]={loaded:!0,config:o},a=!0)}(a||Object.keys(n).length!==Object.keys(r).length)&&t.setState({slots:r})})(r),function(e,t,n,r){let a=tR(),o=a.getState().configs,i={},s=!1,l=0;for(let a of t.mountedExtensions){let t=function(e,t,n,r,a,o,i){let s=function(e){let[t]=e.split("#");return t}(r),l=a.schemas[s],u=JSON.stringify([n,r,e,t]),c=t9.get(u);if(c&&c.extensionSchema===l&&c.extensionModuleSchema===a.schemas[t]&&c.providedConfigs===a.providedConfigs&&c.temporaryConfig===o.config)return c.config;let d=l?s:t,m=ne(a,o),p=i?.configure?.[r]??{},f=nn(e,m),h=f?.extensionSlots?.[n]?.configure?.[r]??{},g=nr([nn(d,m),p,h]),y=l??a.schemas[t];na(y,g,d);let v=nl(y,g);return no(y,v,d),delete v.extensionSlots,t9.set(u,{extensionSchema:l,extensionModuleSchema:a.schemas[t],providedConfigs:a.providedConfigs,temporaryConfig:o.config,config:v}),v}(a.slotModuleName,a.extensionModuleName,a.slotName,a.extensionId,e,n,r[a.slotName]),u=o[a.slotName]?.[a.extensionId],c=u?.loaded&&(0,ez.A)(u.config,t)?u:{config:t,loaded:!0};c!==u&&(s=!0),i[a.slotName]||(i[a.slotName]={}),i[a.slotName][a.extensionId]=c,l++}for(let[e,t]of Object.entries(i)){let n=o[e];n&&Object.keys(n).length===Object.keys(t).length&&Object.entries(t).every(([e,t])=>n[e]===t)&&(i[e]=n)}s||(s=Object.keys(o).length!==Object.keys(i).length||Object.values(o).reduce((e,t)=>e+Object.keys(t).length,0)!==l),s&&a.setState({configs:i})}(e,n,t,r),tF()}function tZ(){r=()=>{var e,t;let n,r;return e=tE.getState(),t=t_.getState(),n=tW.getState(),r={config:function(e,t){let n=function(e){let t={};for(let[n,r]of Object.entries(e)){let e=t7.get(n);if(e&&e.schema===r)t[n]=e.annotated;else{let e=function e(t){return t.hasOwnProperty("_default")?{...t,_value:t._default,_source:"default"}:nc(t)?Object.keys(t).reduce((n,r)=>(n[r]=e(t[r]),n),{}):{}}((0,tf.A)(r));t7.set(n,{schema:r,annotated:e}),t[n]=e}}return t}(e.schemas),r=[...e.providedConfigs.map(e=>[e.config,e.source]),[t.config,"temporary config"]],a=new Set(Object.keys(n));for(let[e]of r)for(let t of Object.keys(e))a.add(t);let o={};for(let e of a){let t=n[e],a=r.map(([t])=>t[e]),i=r.map(([,e])=>e),s=t8.get(e);if(s&&s.annotatedSchema===t&&s.configSlices.length===a.length&&s.configSlices.every((e,t)=>e===a[t])&&s.sources.every((e,t)=>e===i[t])){o[e]=s.result;continue}let l=t??{};r.forEach(([,e],t)=>{let n=a[t];void 0!==n&&(l=tz(l,function e(t,n){return nc(t)?Object.keys(t).reduce((r,a)=>(r[a]=e(t[a],n),r),{}):{_value:t,_source:n}}(n,e)))}),t8.set(e,{annotatedSchema:t,configSlices:a,sources:i,result:l}),o[e]=l}return o}(e,t)},void((0,ez.A)(n.config,r.config)||tW.setState(r))},tG(),tK.push(tE.subscribe(tY),t_.subscribe(tY),tS.subscribe(tY))}function tY(){tU();try{tG()}catch(e){tV(e),console.error("Failed to recompute the configuration",e)}}tZ();let tq=new Map;function tJ(e,t){nt(e,t);let n=tz(t,ng);tE.setState(t=>({...t,schemas:{...t.schemas,[e]:n},moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function tX(e){tE.setState(t=>({...t,schemas:{...t.schemas,[e]:ng}}))}function tQ(e){tE.setState(t=>({...t,moduleLoaded:{...t.moduleLoaded,[e]:!0}}))}function t0(e){tE.setState(t=>({...t,schemas:{...t.schemas,[e]:nh}}))}function t1(e,t){nt(e,t);let n=tz(t,ng);tE.getState().schemas[e]&&console.error(`Config schema for extension ${e} already exists. If there are multiple extensions with this same name, one will probably crash.`),tE.setState(t=>({...t,schemas:{...t.schemas,[e]:n}}))}function t4(e,t="provided"){tE.setState(n=>({...n,providedConfigs:[...n.providedConfigs,{source:t,config:e}]}))}function t2(e,t,n){return new Promise(r=>{let a,o=!1;function i(e){!o&&t(e)&&(o=!0,r(n(e)),a?.())}i(e.getState()),o||(a=e.subscribe(i))})}function t3(e){return t2(tk(e),e=>!!(e.loaded&&e.config),e=>tp(e.config,["Display conditions","Translation overrides"]))}function t6(e,t,n){let r=[t2(tk(e),e=>!!(e.translationOverridesLoaded&&e.config),e=>e.config["Translation overrides"]??{})];return t&&n&&r.push(t2(tN(t,n),e=>!!(e.loaded&&e.config),e=>e.config["Translation overrides"]??{})),Promise.all(r)}function t5(e,t,n){na(e,t,n);let r=nl(e,t);return no(e,r,n),r}let t9=new Map,t8=new Map,t7=new Map;function ne(e,t){return[...e.providedConfigs.map(e=>e.config),t.config]}function nt(e,t,n=""){let r="Please verify that you are running the latest version and, if so, alert the maintainer.";for(let a of Object.keys(t).filter(e=>!e.startsWith("_"))){let o=n+(n&&".")+a,i=t[a];if("Display conditions"===o&&console.error(`${e} declares a configuration option called "Display conditions"; the "Display conditions" option is a reserved name. ${r}`),"Translation overrides"===o&&console.error(`${e} declares a configuration option called "Translation overrides"; the "Translation overrides" option is a reserved name. ${r}`),!nc(i)){console.error(`${e} has bad config schema definition for key '${o}'. ${r}`);continue}i.hasOwnProperty("_default")||nt(e,i,o);let s=i._elements;if(nu(s)&&nt(e,s,o+"._elements"),i._validators)for(let t of i._validators)"function"!=typeof t&&console.error(`${e} has invalid validator for key '${o}' ${r}.
4
4
 
@@ -9,35 +9,35 @@ If you're the maintainer: the allowed types are ${Object.values(th).join(", ")}.
9
9
  If you're the maintainer: all config elements must have a default. Received ${JSON.stringify(i)}`),s&&l&&![th.Array,th.Object].includes(l)&&console.error(`${e} has bad config schema definition for key '${o}'. ${r}.
10
10
 
11
11
  If you're the maintainer: the 'elements' key only works with '_type' equal to 'Array' or 'Object'. Received ${JSON.stringify(l)}`)}}function nn(e,t){return nr(t.map(({[e]:t})=>t).filter(e=>!!e))}function nr(e){return e.reduce((e,t)=>eH(e,t,tH),{})}function na(e,t,n=""){for(let r of Object.keys(t)){let a=t[r],o=n+"."+r,i=e[r];if(!e.hasOwnProperty(r)){("extensionSlots"!==r||""===n)&&nm(o,`Unknown config key '${o}' provided. Ignoring.`);continue}(function e(t,n,r){ni(r,t._type,n),nc(n)?t._type===th.Object?function(t,n,r){if(t._elements)for(let a of Object.keys(n)){let o=n[a];e(t._elements,o,`${r}.${a}`)}}(t,n,r):t.hasOwnProperty("_default")||t.hasOwnProperty("_type")||na(t,n,r):t._type===th.Array&&function(t,n,r){if(ni(r,th.Array,n)){if(nu(t._elements))for(let a=0;a<n.length;a++)e(t._elements,n[a],`${r}[${a}]`);for(let e=0;e<n.length;e++)ni(`${r}[${e}]`,t._elements?._type,n[e])}}(t,n,r)})(i,a,o)}}function no(e,t,n=""){if(e){if(t!==e._default&&ns(n,e._validators,t),nc(t))for(let r of Object.keys(t)){let a=t[r],o=n+"."+r,i=e[r];e._type===th.Object&&e._elements?no(e._elements,a,o):no(i,a,o)}else if(Array.isArray(t)&&e._elements)for(let r=0;r<t.length;r++)no(e._elements,t[r],`${n}[${r}]`)}}function ni(e,t,n){return!t||ns(e,[{Array:ty,Boolean:tv,ConceptUuid:tD,Number:tb,Object:tx,String:tw,UUID:tD,PersonAttributeTypeUuid:tD,PatientIdentifierTypeUuid:tD}[t]],n)}function ns(e,t,n){let r=!0;if(t)try{for(let a of t){let t=a(n);if("string"==typeof t){let a="object"==typeof n?`Invalid configuration for ${e}: ${t}`:`Invalid configuration value ${n} for ${e}: ${t}`;nm(e,a),r=!1}}}catch(t){console.error(`Skipping invalid validator at "${e}". Encountered error
12
- ${t}`)}return r}let nl=(e,t)=>{let n=structuredClone(t);if(!e)return n;for(let t of Object.keys(e)){let r=n[t],a=e[t];if(a&&(a.hasOwnProperty("_type")||a.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=a._default);let e=a._elements;if(r&&nu(e)){if(a._type===th.Array&&Array.isArray(r)){let a=r.map(t=>nl(e,t));n[t]=a}else if(a._type===th.Object)for(let t of Object.keys(r))r[t]=nl(e,r[t])}}else if(nc(a)){let e=r??{};nc(e)&&(n[t]=nl(a,e))}}return n};function nu(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function nc(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let nd=new Set;function nm(e,t){let n=`${e}:::${t}`;nd||(nd=new Set),nd.has(n)||(console.error(t),nd.add(n))}function np(e){e?nd.forEach(t=>{t.startsWith(e)&&nd.delete(t)}):nd.clear()}function nf(){tK.forEach(e=>e()),tK.length=0,tq.clear(),t9.clear(),t7.clear(),t8.clear(),tZ()}let nh={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:th.Object,_default:{},_validators:[tg(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},ng={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:th.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:th.String,_default:void 0}},...nh},ny=(e,t)=>tg(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nv=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tg(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},nb=nv([]),nw=e=>tg(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nx={inRange:ny,isUrl:nb,isUrlWithTemplateParameters:nv,oneOf:nw};var nD=n(2034);let nE=B("breadcrumbs",[]);function n_(e){return nS([e])}function nS(e){let t=[...nk(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,nD.pathToRegexp)(e.matcher).regexp:(0,nD.pathToRegexp)(e.path).regexp,settings:e}))];nE.setState(t,!0)}function nk(){return nE.getState()}function nC(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=nC(e,n.join("/"));if(t)return t}}(e,t)}function nP(e,t){if(e.length>0){let n=nC(e,t);if(n){let t=[n],r=nC(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nC(e,r.settings.parent);return t.reverse()}}return[]}function nT(e){return nP(nk(),e)}var nR=Object.freeze({__proto__:null,get start(){return r0},get ensureJQuerySupport(){return rT},get setBootstrapMaxTime(){return rc},get setMountMaxTime(){return rd},get setUnmountMaxTime(){return rm},get setUnloadMaxTime(){return rp},get registerApplication(){return rB},get unregisterApplication(){return rU},get getMountedApps(){return rj},get getAppStatus(){return rL},get unloadApplication(){return rW},get checkActivityFunctions(){return rV},get getAppNames(){return rI},get pathToActiveWhen(){return rK},get navigateToUrl(){return rw},get patchHistoryApi(){return rk},get triggerAppChange(){return rq},get addErrorHandler(){return nA},get removeErrorHandler(){return nj},get mountRootParcel(){return ro},get NOT_LOADED(){return nF},get LOADING_SOURCE_CODE(){return nB},get NOT_BOOTSTRAPPED(){return nV},get BOOTSTRAPPING(){return nU},get NOT_MOUNTED(){return nW},get MOUNTING(){return nH},get UPDATING(){return nK},get LOAD_ERROR(){return nY},get MOUNTED(){return nz},get UNLOADING(){return nZ},get UNMOUNTING(){return nG},get SKIP_BECAUSE_BROKEN(){return nq}}),nN=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nO=!function(){try{var e=new nN("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:nN;let n$=[];function nM(e,t,n){let r=nL(e,t,n);n$.length?n$.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nA(e){if("function"!=typeof e)throw Error(nI(28,!1));n$.push(e)}function nj(e){if("function"!=typeof e)throw Error(nI(29,!1));let t=!1;return n$=n$.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nI(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function nL(e,t,n){let r,a=`${n1(t)} '${nQ(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(nI(30,!1,t.status,nQ(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=nQ(t),t.status=n,r}let nF="NOT_LOADED",nB="LOADING_SOURCE_CODE",nV="NOT_BOOTSTRAPPED",nU="BOOTSTRAPPING",nW="NOT_MOUNTED",nH="MOUNTING",nz="MOUNTED",nK="UPDATING",nG="UNMOUNTING",nZ="UNLOADING",nY="LOAD_ERROR",nq="SKIP_BECAUSE_BROKEN";function nJ(e){return e.status===nz}function nX(e){try{return e.activeWhen(window.location)}catch(t){return nM(t,e,nq),!1}}function nQ(e){return e.name}function n0(e){return!!e.unmountThisParcel}function n1(e){return n0(e)?"parcel":"application"}function n4(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function n2(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function n3(e){return e&&("function"==typeof e||Array.isArray(e)&&!n2(e,e=>"function"!=typeof e))}function n6(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=n1(e),a=nQ(e);return function(e){return n.reduce((n,o,i)=>n.then(()=>{let n=o(e);return n5(n)?n:Promise.reject(nI(15,!1,r,a,t,i))}),Promise.resolve())}}function n5(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let n9=[];function n8(e,t){return Promise.resolve().then(()=>e.status!==nV?e:(e.status=nU,e.bootstrap?rf(e,"bootstrap").then(n).catch(n=>{if(t)throw nL(n,e,nq);return nM(n,e,nq),e}):Promise.resolve().then(n)));function n(){return e.status=nW,e}}function n7(e,t){return Promise.resolve().then(()=>{if(e.status!==nz)return e;return e.status=nG,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,r=>n().then(()=>{let n=Error(r.message);if(t)throw nL(n,e,nq);nM(n,e,nq)})).then(()=>e);function n(){return rf(e,"unmount").then(()=>{e.status=nW},n=>{if(t)throw nL(n,e,nq);nM(n,e,nq)})}})}let re=!1,rt=!1;function rn(e,t){return Promise.resolve().then(()=>e.status!==nW?e:(re||(window.dispatchEvent(new nO("single-spa:before-first-mount")),re=!0),e.status=nH,rf(e,"mount").then(()=>(e.status=nz,rt||(window.dispatchEvent(new nO("single-spa:first-mount")),rt=!0),e)).catch(n=>{return e.status=nz,n7(e,!0).then(r,r);function r(){if(t)throw nL(n,e,nq);return nM(n,e,nq),e}})))}let rr=0,ra={parcels:{}};function ro(){return ri.apply(ra,arguments)}function ri(e,t){let n,r,a,o=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nI(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nI(3,!1,typeof e.name));let i=rr++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(nI(4,!1,s,typeof t));if(!t.domElement)throw Error(nI(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?nB:nV,customProps:t,parentName:nQ(o),unmountThisParcel:()=>p.then(()=>{if(c.status!==nz)throw Error(nI(6,!1,s,c.status));return n7(c,!0)}).then(e=>(c.parentName&&delete o.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=nq,a(e),e})};o.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nI(7,!1));let m=(d=d.then(e=>{if(!e)throw Error(nI(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!n3(e.bootstrap))throw Error(nI(9,!1,s));if(!n3(e.mount))throw Error(nI(10,!1,s));if(!n3(e.unmount))throw Error(nI(11,!1,s));if(e.update&&!n3(e.update))throw Error(nI(12,!1,s));let t=n6(e,"bootstrap"),r=n6(e,"mount"),a=n6(e,"unmount");c.status=nV,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=a,c.timeouts=rh(e.timeouts),e.update&&(c.update=n6(e,"update"),n.update=function(e){return c.customProps=e,rs(Promise.resolve().then(()=>{if(c.status!==nz)throw Error(nI(32,!1,nQ(c)));return c.status=nK,rf(c,"update").then(()=>(c.status=nz,c)).catch(e=>{throw nL(e,c,nq)})}))})})).then(()=>n8(c,!0)),p=m.then(()=>rn(c,!0)),f=new Promise((e,t)=>{r=e,a=t});return n={mount:()=>rs(Promise.resolve().then(()=>{if(c.status!==nW)throw Error(nI(13,!1,s,c.status));return o.parcels[i]=c,rn(c)})),unmount:()=>rs(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rs(d),bootstrapPromise:rs(m),mountPromise:rs(p),unmountPromise:rs(f)}}function rs(e){return e.then(()=>null)}function rl(e){let t=nQ(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nI(40,!1),t,n));let r=n4({},n,{name:t,mountParcel:ri.bind(e),singleSpa:nR});return n0(e)&&(r.unmountSelf=e.unmountThisParcel),r}let ru={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rc(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(16,!1));ru.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rd(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(17,!1));ru.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rm(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(18,!1));ru.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rp(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(19,!1));ru.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rf(e,t){let n=e.timeouts[t],r=n.warningMillis,a=n1(e);return new Promise((o,i)=>{let s=!1,l=!1;e[t](rl(e)).then(e=>{s=!0,o(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nI(31,!1,t,a,nQ(e),n.millis);function c(e){s||(!0===e?(l=!0,n.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*r+r<n.millis&&setTimeout(()=>c(e+1),r)))}})}function rh(e){let t={};for(let n in ru)t[n]=n4({},ru[n],e&&e[n]||{});return t}function rg(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nF&&e.status!==nY?e:(e.status=nB,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rl(e));if(!n5(r))throw n=!0,Error(nI(33,!1,nQ(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!n3(t.bootstrap)&&(r=35),n3(t.mount)||(r=36),n3(t.unmount)||(r=37);let a=n1(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nI(r,!1,a,nQ(e),n),t),nM(void 0,e,nq),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=n4({},e.devtools.overlays,t.devtools.overlays)),e.status=nV,e.bootstrap=n6(t,"bootstrap"),e.mount=n6(t,"mount"),e.unmount=n6(t,"unmount"),e.unload=n6(t,"unload"),e.timeouts=rh(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=nq:(r=nY,e.loadErrorTime=(new Date).getTime()),nM(t,e,r),e}))})}let ry="u">typeof window,rv={hashchange:[],popstate:[]},rb=["hashchange","popstate"];function rw(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(nI(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rC(window.location.href),r=rC(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function rx(e){if(e){let t=e[0].type;rb.indexOf(t)>=0&&rv[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rD(){rJ([],arguments)}function rE(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return a&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let r_=null,rS=!1;function rk(e){if(rS)throw Error(nI(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rS=!0,r_=window.history.replaceState,window.addEventListener("hashchange",rD),window.addEventListener("popstate",rD);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rb.indexOf(e)>=0)||n2(rv[e],e=>e===n))return t.apply(this,arguments);rv[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rb.indexOf(e)>=0&&(rv[e]=rv[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=rE(window.history.pushState,"pushState"),window.history.replaceState=rE(r_,"replaceState")}function rC(e){let t=document.createElement("a");return t.href=e,t}ry&&(window.singleSpaNavigate?console.warn(nI(41,!1)):window.singleSpaNavigate=rw);let rP=!1;function rT(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rP){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rR.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rR.call(this,n,window.removeEventListener,e,t,arguments)},rP=!0}}function rR(e,t,n,r,a){return"string"!=typeof n?e.apply(this,a):(n.split(/\s+/).forEach(e=>{rb.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,a))}let rN={};function rO(e){return Promise.resolve().then(()=>{let t=rN[nQ(e)];if(!t)return e;if(e.status===nF)return r$(e,t),e;if(e.status===nZ)return t.promise.then(()=>e);if(e.status!==nW&&e.status!==nY)return e;let n=e.status===nY?Promise.resolve():rf(e,"unload");return e.status=nZ,n.then(()=>(r$(e,t),e)).catch(n=>(delete rN[nQ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nM(n,e,nq),t.reject(n),e))})}function r$(e,t){delete rN[nQ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nF,t.resolve()}function rM(e,t,n,r){rN[nQ(e)]={app:e,resolve:n,reject:r},Object.defineProperty(rN[nQ(e)],"promise",{get:t})}let rA=[];function rj(){return rA.filter(nJ).map(nQ)}function rI(){return rA.map(nQ)}function rL(e){let t=n2(rA,t=>nQ(t)===e);return t?t.status:null}let rF=!1;function rB(e,t,n,r){var a,o;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(nI(39,!1));let t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(nI(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(nI(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(nI(24,!1));if(!rz(e.customProps))throw Error(nI(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(nI(20,!1));if(!t)throw Error(nI(23,!1));if("function"!=typeof n)throw Error(nI(24,!1));if(!rz(r))throw Error(nI(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(a=i.loadApp)?()=>Promise.resolve(a):a,i.customProps=i.customProps||{},s=(s=Array.isArray(o=i.activeWhen)?o:[o]).map(e=>"function"==typeof e?e:rK(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(rQ||rF||(rF=!0,setTimeout(()=>{rQ||console.warn(nI(1,!1))},5e3)),-1!==rI().indexOf(l.name))throw Error(nI(21,!1,l.name));rA.push(n4({loadErrorTime:null,status:nF,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),ry&&(rT(),rJ())}function rV(e=window.location){return rA.filter(t=>t.activeWhen(e)).map(nQ)}function rU(e){if(0===rA.filter(t=>nQ(t)===e).length)throw Error(nI(25,!1,e));return(ry?rW(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rA.map(nQ).indexOf(e);rA.splice(t,1)})}function rW(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nI(26,!1));let n=n2(rA,t=>nQ(t)===e);if(!n)throw Error(nI(27,!1,e));let r=rN[nQ(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rM(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,rH(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rM(n,()=>e,t,r),rH(n,t,r)}),e}}function rH(e,t,n){Promise.resolve().then(()=>{if(n2(rV(),t=>t===nQ(e)))return rq()}).then(()=>n7(e).then(rO).then(()=>{t(),setTimeout(()=>{rJ()})})).catch(n)}function rz(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function rK(e,t){let n=function(e,t){let n=0,r=!1,a="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],a=r&&"/"===n;(!r&&":"===n||a)&&o(t)}return o(e.length),RegExp(a,"i");function o(o){let i=e.slice(n,o).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(a+=r?"[^/]+/?":i,o===e.length)if(r)t&&(a+="$");else{let e=t?"":".*";a="/"===a.charAt(a.length-1)?`${a}${e}$`:`${a}(/${e})?(#.*)?$`}r=!r,n=o}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let rG=!1,rZ=[],rY=ry&&window.location.href;function rq(){return rJ()}function rJ(e=[],t,n=!1){let r,a,o,i,s;if(rG)return new Promise((e,n)=>{rZ.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],a=[],o=[],i=[],s=(new Date).getTime(),rA.forEach(e=>{let t=e.status!==nq&&nX(e);switch(e.status){case nY:t&&s-e.loadErrorTime>=200&&o.push(e);break;case nF:case nB:t&&o.push(e);break;case nV:case nW:!t&&rN[nQ(e)]?r.push(e):t&&i.push(e);break;case nz:t||a.push(e)}}),{appsToUnload:r,appsToUnmount:a,appsToLoad:o,appsToMount:i}),m,p=[],f=rY,h=rY=window.location.href;return rQ?(rG=!0,m=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===m.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(p).then(n=>{if(n.some(e=>e))return r_.call(window.history,history.state,"",f.substring(location.origin.length)),rY=location.href,rG=!1,rJ(e,t,!0);let r=l.map(rO),a=Promise.all(u.map(n7).map(e=>e.then(rO)).concat(r));a.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let o=c.map(e=>rg(e).then(e=>rX(e,a))),i=d.filter(e=>0>c.indexOf(e)).map(e=>rX(e,a));return a.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(o.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(m=c,Promise.resolve().then(()=>Promise.all(c.map(rg)).then(v).then(()=>[]).catch(e=>{throw v(),e}).finally(()=>{})));function g(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch(e=>(console.warn(Error(nI(42,!1))),console.warn(e),!1)))}function y(){let t=rj();e.forEach(e=>e.resolve(t));try{w(0===m.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(rG=!1,rZ.length>0){let e=rZ;rZ=[],rJ(e)}return t}function v(){n||(e.forEach(e=>{rx(e.eventArguments)}),rx(t))}function b(e=!1,n){let r={},a={[nz]:[],[nW]:[],[nF]:[],[nq]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,nz)}),l.forEach(e=>{i(e,nF)}),u.forEach(e=>{i(e,nW)})):m.forEach(e=>{i(e)});let o={detail:{newAppStatuses:r,appsByNewStatus:a,totalAppChanges:m.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:h}};return n&&n4(o.detail,n),o;function i(e,t){let n=nQ(e);t=t||rL(n),r[n]=t,(a[t]=a[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nO(`single-spa:${e}`,t))}}function rX(e,t){return nX(e)?n8(e).then(e=>t.then(()=>nX(e)?rn(e):e)):t.then(()=>e)}let rQ=!1;function r0(e){rQ=!0,ry&&(rk(e),rJ())}ry&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rA]},reroute:rJ,NOT_LOADED:nF,toLoadPromise:rg,toBootstrapPromise:n8,unregisterApplication:rU,getProfilerData:function(){return n9}});let r1={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},r4=e=>"string"==typeof e,r2=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},r3=e=>null==e?"":""+e,r6=/###/g,r5=e=>e&&e.indexOf("###")>-1?e.replace(r6,"."):e,r9=e=>!e||r4(e),r8=(e,t,n)=>{let r=r4(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(r9(e))return{};let t=r5(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return r9(e)?{}:{obj:e,k:r5(r[a])}},r7=(e,t,n)=>{let{obj:r,k:a}=r8(e,t,Object);if(void 0!==r||1===t.length){r[a]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),s=r8(e,i,Object);for(;void 0===s.obj&&i.length;)o=`${i[i.length-1]}.${o}`,s=r8(e,i=i.slice(0,i.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},ae=(e,t)=>{let{obj:n,k:r}=r8(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},at=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?r4(e[r])||e[r]instanceof String||r4(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):at(e[r],t[r],n):e[r]=t[r]);return e};var an={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let ar=e=>r4(e)?e.replace(/[&<>"'\/]/g,e=>an[e]):e,aa=[" ",",","?","!",";"],ao=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),ai=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),a=e;for(let e=0;e<r.length;){let t;if(!a||"object"!=typeof a)return;let o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],void 0!==(t=a[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},as=e=>e?.replace("_","-"),al={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class au{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||al,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(r4(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new au(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new au(this.logger,e)}}var ac=new au;class ad{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}class am extends ad{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let a,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):r4(n)&&o?a.push(...n.split(o)):a.push(n)));let s=ae(this.data,a);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&r4(n))?ai(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r,a={silent:!1}){let o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),r7(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(r4(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let s=ae(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?at(s,n,a):s={...s,...n},r7(this.data,i,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var ap={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};let af=Symbol("i18next/PATH_KEY");function ah(e,t){let n,r,a,{[af]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===af)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy));return o.join(t?.keySeparator??".")}let ag={},ay=e=>!r4(e)&&"boolean"!=typeof e&&"number"!=typeof e;class av extends ad{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=ac.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let a=ay(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=aa.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let a=ao.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!a.test(e);if(!o){let t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r);if(o&&!i){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r4(a)?[a]:a};let o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:r4(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ah(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?a?{res:`${l}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:i;let m=this.resolve(e,r),p=m?.res,f=m?.usedKey||i,h=m?.exactUsedKey||i,g=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!r4(r.count),b=av.hasDefaultValue(r),w=v?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",D=v&&!r.ordinal&&0===r.count,E=D&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue,_=p;y&&!p&&b&&(_=E);let S=ay(_),k=Object.prototype.toString.apply(_);if(y&&_&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(k)&&!(r4(g)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,_,{...r,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(m.res=e,m.usedParams=this.getUsedParamsDetails(r),m):e}if(o){let e=Array.isArray(_),t=e?[]:{},n=e?h:f;for(let e in _)if(Object.prototype.hasOwnProperty.call(_,e)){let a=`${n}${o}${e}`;b&&!p?t[e]=this.translate(a,{...r,defaultValue:ay(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(a,{...r,joinArrays:!1,ns:s}),t[e]===a&&(t[e]=_[e])}p=t}}else if(y&&r4(g)&&Array.isArray(p))(p=p.join(g))&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(p)&&b&&(t=!0,p=E),this.isValidLookup(p)||(a=!0,p=i);let s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:p,d=b&&E!==p&&this.options.updateMissing;if(a||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,i,d?E:p),o){let e=this.resolve(i,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let a=b&&n!==p?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,a,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,a,d,r),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);D&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||E)})}):n(e,i,E))}p=this.extendTranslation(p,e,r,m,n),a&&p===i&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${i}`:i,t?p:void 0,r))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(r),m):p}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let o;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let i=r4(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!r4(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,i=r4(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=ap.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return r4(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!r4(t.count),d=c&&!t.ordinal&&0===t.count,m=void 0!==t.context&&(r4(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(i=e,!ag[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(ag[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{let i;if(this.isValidLookup(n))return;o=r;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(a)&&s.push(l+e.replace(a,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),m){let r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),c&&(t.ordinal&&0===e.indexOf(a)&&s.push(r+e.replace(a,this.options.pluralSeparator)),s.push(r+e),d&&s.push(r+n))}}for(;i=s.pop();)this.isValidLookup(n)||(a=i,n=this.getResource(r,e,i,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!r4(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}class ab{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ac.create("languageUtils")}getScriptPartFromCode(e){if(!(e=as(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=as(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r4(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&(e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r4(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r4(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):r4(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&a(this.formatLanguageCode(e))}),r}}let aw={zero:0,one:1,two:2,few:3,many:4,other:5},ax={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class aD{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ac.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=as("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:a})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ax;if(!e.match(/-|_/))return ax;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>aw[e]-aw[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let aE=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=ae(e,n))?o:ae(t,n);return!i&&a&&r4(n)&&void 0===(i=ai(e,n,r))&&(i=ai(t,n,r)),i};class a_{constructor(e={}){this.logger=ac.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:ar,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):m||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let a,o,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let a=aE(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}let a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(aE(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp();let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(i=0;a=t.regex.exec(e);){let n=a[1].trim();if(void 0===(o=l(n)))if("function"==typeof u){let t=u(e,a,r);o=r4(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o="";else r4(o)||this.useRawValueToEscape||(o=r3(o));let s=t.safeValue(o);if(e=e.replace(a[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o,i=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),a=`{${r[1]}`;e=r[0];let i=(a=this.interpolate(a,o)).match(/'/g),s=a.match(/"/g);((i?.length??0)%2!=0||s)&&s.length%2==0||(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(o=(o={...n}).replace&&!r4(o.replace)?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),(a=t(i.call(this,r[1].trim(),o),o))&&r[0]===e&&!r4(a))return a;r4(a)||(a=r3(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),s.length&&(a=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}let aS=e=>{let t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});let i=r+JSON.stringify(o),s=t[i];return s||(s=e(as(r),a),t[i]=s),s(n)}},ak=e=>(t,n,r)=>e(as(n),r)(t);class aC{constructor(e={}){this.logger=ac.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?aS:ak;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=aS(t)}format(e,t,n,r={}){let a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&0>a[0].indexOf(")")&&a.find(e=>e.indexOf(")")>-1)){let e=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,e)].join(this.formatSeparator)}return a.reduce((e,t)=>{let{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let a=r[1].substring(0,r[1].length-1);"currency"===t&&0>a.indexOf(":")?n.currency||(n.currency=a.trim()):"relativetime"===t&&0>a.indexOf(":")?n.range||(n.range=a.trim()):a.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{let i=r?.formatParams?.[r.interpolationkey]||{},s=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,s,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e)}}class aP extends ad{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ac.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let a={},o={},i={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let i={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:a,k:o}=r8(e,t,Object);a[o]=a[o]||[],a[o].push(n)})(n.loaded,[a],o),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;let i=(i,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*a,o)},a):o(i,s)},s=this.backend[n].bind(this.backend);if(2===s.length){try{let n=s(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}return}return s(e,t,i)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();r4(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r4(t)&&(t=[t]);let a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=n&&""!==n){if(this.backend?.create){let s={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let a;(a=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else l(e,t,n,r,i,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let aT=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r4(e[1])&&(t.defaultValue=e[1]),r4(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),aR=e=>(r4(e.ns)&&(e.ns=[e.ns]),r4(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r4(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),aN=()=>{};class aO extends ad{constructor(e={},t){if(super(),this.options=aR(e),this.services={},this.logger=ac,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(r4(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=aT();this.options={...n,...this.options,...aR(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?ac.init(r(this.modules.logger),this.options):ac.init(null,this.options),e=this.modules.formatter?this.modules.formatter:aC;let t=new ab(this.options);this.store=new am(this.options.resources,this.options);let a=this.services;a.logger=ac,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new aD(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=r(e),a.formatter.init&&a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new a_(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new aP(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new av(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=aN),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=r2(),o=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=aN){let n=t,r=r4(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=r2();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=aN),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ap.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=r2();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let n=r4(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r4(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){let r=(e,t,...a)=>{let o,i;(o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t}).lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);let s=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?i=e.map(e=>("function"==typeof e&&(e=ah(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ah(e,{...this.options,...t})),i=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(i,o)};return r4(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(a,e)))}loadNamespaces(e,t){let n=r2();return this.options.ns?(r4(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=r2();r4(e)&&(e=[e]);let r=this.options.preload||[],a=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new ab(aT());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new aO(e,t)}cloneInstance(e={},t=aN){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new aO(r);return(void 0!==e.debug||void 0!==e.prefix)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new am(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),a.services.resourceStore=a.store),a.translator=new av(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let a$=aO.createInstance();a$.createInstance=aO.createInstance,a$.createInstance,a$.dir,a$.init,a$.loadResources,a$.reloadResources,a$.use,a$.changeLanguage,a$.getFixedT,a$.t,a$.exists,a$.setDefaultNamespace,a$.hasLoadedNamespace,a$.loadNamespaces,a$.loadLanguages;let aM=a$.default||a$;function aA(e,t,n,r){return aM.t(t,{ns:e,defaultValue:n,...r})}function aj(e,t,n){return r1[e]?aA("core",e,t??r1[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function aI(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aL(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function aL(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function aF({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aI(e,t).replace(window.location.origin,""),a=new URL(r,window.location.origin);if("http:"!=a.protocol&&"https:"!=a.protocol)throw console.error(`Received request to navigate to non-http URL: ${a.toString()}`),Error(aj("navigateNonHttp"));r.startsWith(n)?rw(r):window.location.assign(r)}aM.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let aB="openmrs:history";function aV(e){let t=JSON.parse(sessionStorage.getItem(aB)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(aB,JSON.stringify(t))}function aU(){0===JSON.parse(sessionStorage.getItem(aB)??"[]").length&&document.referrer&&aV(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=aW();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(aB,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?aH({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&aV(window.location.href)})}function aW(){return JSON.parse(sessionStorage.getItem(aB)??"[]")}function aH({toUrl:e}){let t=aW(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);aF({to:t[n]}),sessionStorage.setItem(aB,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function az(){sessionStorage.removeItem(aB)}let aK="${openmrsSpaBase}/login",aG={redirectAuthFailure:{enabled:{_type:th.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:th.String,_default:aK,_validators:[nx.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:th.Array,_default:[401],_elements:{_type:th.Number,_validators:[nx.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:th.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:th.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function aZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let aY="/ws/rest/v1",aq="/ws/fhir2/R4",aJ=`${aY}/session`;function aX(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function aQ(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=aX(e);t.headers||(t.headers={}),ed(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;let r=!1;try{let e=new URL(n,window.location.href),t=new URL(aX(aY),window.location.href),a=e.pathname.replace(/\/{2,}/g,"/"),o=t.pathname.replace(/\/{2,}/g,"/");r=e.origin===t.origin&&(a===o||a.startsWith(`${o}/`))}catch{}if(r){let e=!1;for(let[n,r]of Object.entries(t.headers))"disable-www-authenticate"===n.toLowerCase()&&(void 0===r?delete t.headers[n]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(aq)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let a=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:t,followRedirects:r}=await t3("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(r&&t&&(n===aX(aJ)||204===e.status)&&aF({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return n===aX(aJ)&&403===e.status||t.enabled&&t.errors.includes(e.status)?(az(),aF({to:t.url||e.headers.get("location")||aK}),t.resolvePromise?Promise.resolve():new Promise(()=>{})):e.clone().text().then(t=>{let r=t;try{r=JSON.parse(t)}catch(e){}throw new a0(n,e,r,a)},t=>{throw new a0(n,e,null,a)})})}class a0 extends Error{constructor(e,t,n,r){super(),aZ(this,"response",void 0),aZ(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
12
+ ${t}`)}return r}let nl=(e,t)=>{let n=structuredClone(t);if(!e)return n;for(let t of Object.keys(e)){let r=n[t],a=e[t];if(a&&(a.hasOwnProperty("_type")||a.hasOwnProperty("_default"))){n.hasOwnProperty(t)||(n[t]=a._default);let e=a._elements;if(r&&nu(e)){if(a._type===th.Array&&Array.isArray(r)){let a=r.map(t=>nl(e,t));n[t]=a}else if(a._type===th.Object)for(let t of Object.keys(r))r[t]=nl(e,r[t])}}else if(nc(a)){let e=r??{};nc(e)&&(n[t]=nl(a,e))}}return n};function nu(e){return!!e&&Object.keys(e).filter(e=>!["_default","_validators"].includes(e)).length>0}function nc(e){return"object"==typeof e&&!Array.isArray(e)&&null!==e}let nd=new Set;function nm(e,t){let n=`${e}:::${t}`;nd||(nd=new Set),nd.has(n)||(console.error(t),nd.add(n))}function np(e){e?nd.forEach(t=>{t.startsWith(e)&&nd.delete(t)}):nd.clear()}function nf(){tK.forEach(e=>e()),tK.length=0,tq.clear(),t9.clear(),t7.clear(),t8.clear(),tZ()}let nh={"Translation overrides":{_description:"Per-language overrides for frontend translations should be keyed by language code and each language dictionary contains the translation key and the display value",_type:th.Object,_default:{},_validators:[tg(e=>Object.keys(e).every(e=>/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e)),e=>{let t=Object.keys(e).filter(e=>!/^[a-z]{2,3}(-[A-Z]{2,3})?$/.test(e));return`The 'Translation overrides' object should have language codes for keys. Language codes must be in the form of a two-to-three letter language code optionally followed by a hyphen and a two-to-three letter country code. The following keys do not conform: ${t.join(", ")}.`})]}},ng={"Display conditions":{privileges:{_description:"The privilege(s) the user must have to use this extension",_type:th.Array,_default:[]},expression:{_description:"The expression that determines whether the extension is displayed",_type:th.String,_default:void 0}},...nh},ny=(e,t)=>tg(n=>e<=n&&n<=t,`must be between ${e} and ${t}`),nv=e=>{let t=e.concat(["openmrsBase","openmrsSpaBase"]);return tg(e=>{if(!e||"string"!=typeof e)return!1;let n=/\${(.*?)}/g,r=n.exec(e);for(;r;){if(!t.includes(r[1]))return!1;r=n.exec(e)}return!0},"Should be a URL or path. The allowed template parameters are "+t.map(e=>"${"+e+"}").join(", "))},nb=nv([]),nw=e=>tg(t=>e.includes(t),`Must be one of the following: '${e.join("', '")}'.`),nx={inRange:ny,isUrl:nb,isUrlWithTemplateParameters:nv,oneOf:nw};var nD=n(2034);let nE=B("breadcrumbs",[]);function n_(e){return nS([e])}function nS(e){let t=[...nk(),...e.map(e=>({matcher:e.matcher instanceof RegExp?e.matcher:"string"==typeof e.matcher?(0,nD.pathToRegexp)(e.matcher).regexp:(0,nD.pathToRegexp)(e.path).regexp,settings:e}))];nE.setState(t,!0)}function nk(){return nE.getState()}function nC(e,t){if(t)return function(e,t){let[n]=e.filter(e=>e.matcher.test(t));return n}(e,t)||function(e,t){let n=t.split("/");for(;n.length>1;){n.pop();let t=nC(e,n.join("/"));if(t)return t}}(e,t)}function nP(e,t){if(e.length>0){let n=nC(e,t);if(n){let t=[n],r=nC(e,n.settings.parent);for(;void 0!==r;)t.push(r),r=nC(e,r.settings.parent);return t.reverse()}}return[]}function nT(e){return nP(nk(),e)}var nR=Object.freeze({__proto__:null,get start(){return r0},get ensureJQuerySupport(){return rT},get setBootstrapMaxTime(){return rc},get setMountMaxTime(){return rd},get setUnmountMaxTime(){return rm},get setUnloadMaxTime(){return rp},get registerApplication(){return rB},get unregisterApplication(){return rU},get getMountedApps(){return rj},get getAppStatus(){return rL},get unloadApplication(){return rW},get checkActivityFunctions(){return rV},get getAppNames(){return rI},get pathToActiveWhen(){return rK},get navigateToUrl(){return rw},get patchHistoryApi(){return rk},get triggerAppChange(){return rq},get addErrorHandler(){return nA},get removeErrorHandler(){return nj},get mountRootParcel(){return ro},get NOT_LOADED(){return nF},get LOADING_SOURCE_CODE(){return nB},get NOT_BOOTSTRAPPED(){return nV},get BOOTSTRAPPING(){return nU},get NOT_MOUNTED(){return nW},get MOUNTING(){return nH},get UPDATING(){return nK},get LOAD_ERROR(){return nY},get MOUNTED(){return nz},get UNLOADING(){return nZ},get UNMOUNTING(){return nG},get SKIP_BECAUSE_BROKEN(){return nq}}),nN=("u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{}).CustomEvent,nO=!function(){try{var e=new nN("cat",{detail:{foo:"bar"}});return"cat"===e.type&&"bar"===e.detail.foo}catch(e){}return!1}()?"u">typeof document&&"function"==typeof document.createEvent?function(e,t){var n=document.createEvent("CustomEvent");return t?n.initCustomEvent(e,t.bubbles,t.cancelable,t.detail):n.initCustomEvent(e,!1,!1,void 0),n}:function(e,t){var n=document.createEventObject();return n.type=e,t?(n.bubbles=!!t.bubbles,n.cancelable=!!t.cancelable,n.detail=t.detail):(n.bubbles=!1,n.cancelable=!1,n.detail=void 0),n}:nN;let n$=[];function nM(e,t,n){let r=nL(e,t,n);n$.length?n$.forEach(e=>e(r)):setTimeout(()=>{throw r})}function nA(e){if("function"!=typeof e)throw Error(nI(28,!1));n$.push(e)}function nj(e){if("function"!=typeof e)throw Error(nI(29,!1));let t=!1;return n$=n$.filter(n=>{let r=n===e;return t=t||r,!r}),t}function nI(e,t,...n){return`single-spa minified message #${e}: ${t?t+" ":""}See https://single-spa.js.org/error/?code=${e}${n.length?`&arg=${n.join("&arg=")}`:""}`}function nL(e,t,n){let r,a=`${n1(t)} '${nQ(t)}' died in status ${t.status}: `;if(e instanceof Error){try{e.message=a+e.message}catch(e){}r=e}else{console.warn(nI(30,!1,t.status,nQ(t)));try{r=Error(a+JSON.stringify(e))}catch(t){r=e}}return r.appOrParcelName=nQ(t),t.status=n,r}let nF="NOT_LOADED",nB="LOADING_SOURCE_CODE",nV="NOT_BOOTSTRAPPED",nU="BOOTSTRAPPING",nW="NOT_MOUNTED",nH="MOUNTING",nz="MOUNTED",nK="UPDATING",nG="UNMOUNTING",nZ="UNLOADING",nY="LOAD_ERROR",nq="SKIP_BECAUSE_BROKEN";function nJ(e){return e.status===nz}function nX(e){try{return e.activeWhen(window.location)}catch(t){return nM(t,e,nq),!1}}function nQ(e){return e.name}function n0(e){return!!e.unmountThisParcel}function n1(e){return n0(e)?"parcel":"application"}function n4(){for(let e=arguments.length-1;e>0;e--)for(let t in arguments[e])"__proto__"!==t&&(arguments[e-1][t]=arguments[e][t]);return arguments[0]}function n2(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return e[n];return null}function n3(e){return e&&("function"==typeof e||Array.isArray(e)&&!n2(e,e=>"function"!=typeof e))}function n6(e,t){let n=e[t]||[];0===(n=Array.isArray(n)?n:[n]).length&&(n=[()=>Promise.resolve()]);let r=n1(e),a=nQ(e);return function(e){return n.reduce((n,o,i)=>n.then(()=>{let n=o(e);return n5(n)?n:Promise.reject(nI(15,!1,r,a,t,i))}),Promise.resolve())}}function n5(e){return e&&"function"==typeof e.then&&"function"==typeof e.catch}let n9=[];function n8(e,t){return Promise.resolve().then(()=>e.status!==nV?e:(e.status=nU,e.bootstrap?rf(e,"bootstrap").then(n).catch(n=>{if(t)throw nL(n,e,nq);return nM(n,e,nq),e}):Promise.resolve().then(n)));function n(){return e.status=nW,e}}function n7(e,t){return Promise.resolve().then(()=>{if(e.status!==nz)return e;return e.status=nG,Promise.all(Object.keys(e.parcels).map(t=>e.parcels[t].unmountThisParcel())).then(n,r=>n().then(()=>{let n=Error(r.message);if(t)throw nL(n,e,nq);nM(n,e,nq)})).then(()=>e);function n(){return rf(e,"unmount").then(()=>{e.status=nW},n=>{if(t)throw nL(n,e,nq);nM(n,e,nq)})}})}let re=!1,rt=!1;function rn(e,t){return Promise.resolve().then(()=>e.status!==nW?e:(re||(window.dispatchEvent(new nO("single-spa:before-first-mount")),re=!0),e.status=nH,rf(e,"mount").then(()=>(e.status=nz,rt||(window.dispatchEvent(new nO("single-spa:first-mount")),rt=!0),e)).catch(n=>{return e.status=nz,n7(e,!0).then(r,r);function r(){if(t)throw nL(n,e,nq);return nM(n,e,nq),e}})))}let rr=0,ra={parcels:{}};function ro(){return ri.apply(ra,arguments)}function ri(e,t){let n,r,a,o=this;if(!e||"object"!=typeof e&&"function"!=typeof e)throw Error(nI(2,!1));if(e.name&&"string"!=typeof e.name)throw Error(nI(3,!1,typeof e.name));let i=rr++,s=e.name||`parcel-${i}`;if("object"!=typeof t)throw Error(nI(4,!1,s,typeof t));if(!t.domElement)throw Error(nI(5,!1,s));let l="function"==typeof e,u=l?e:()=>Promise.resolve(e),c={id:i,parcels:{},status:l?nB:nV,customProps:t,parentName:nQ(o),unmountThisParcel:()=>p.then(()=>{if(c.status!==nz)throw Error(nI(6,!1,s,c.status));return n7(c,!0)}).then(e=>(c.parentName&&delete o.parcels[c.id],e)).then(e=>(r(e),e)).catch(e=>{throw c.status=nq,a(e),e})};o.parcels[i]=c;let d=u();if(!d||"function"!=typeof d.then)throw Error(nI(7,!1));let m=(d=d.then(e=>{if(!e)throw Error(nI(8,!1));if(s=e.name||`parcel-${i}`,Object.prototype.hasOwnProperty.call(e,"bootstrap")&&!n3(e.bootstrap))throw Error(nI(9,!1,s));if(!n3(e.mount))throw Error(nI(10,!1,s));if(!n3(e.unmount))throw Error(nI(11,!1,s));if(e.update&&!n3(e.update))throw Error(nI(12,!1,s));let t=n6(e,"bootstrap"),r=n6(e,"mount"),a=n6(e,"unmount");c.status=nV,c.name=s,c.bootstrap=t,c.mount=r,c.unmount=a,c.timeouts=rh(e.timeouts),e.update&&(c.update=n6(e,"update"),n.update=function(e){return c.customProps=e,rs(Promise.resolve().then(()=>{if(c.status!==nz)throw Error(nI(32,!1,nQ(c)));return c.status=nK,rf(c,"update").then(()=>(c.status=nz,c)).catch(e=>{throw nL(e,c,nq)})}))})})).then(()=>n8(c,!0)),p=m.then(()=>rn(c,!0)),f=new Promise((e,t)=>{r=e,a=t});return n={mount:()=>rs(Promise.resolve().then(()=>{if(c.status!==nW)throw Error(nI(13,!1,s,c.status));return o.parcels[i]=c,rn(c)})),unmount:()=>rs(c.unmountThisParcel()),getStatus:()=>c.status,loadPromise:rs(d),bootstrapPromise:rs(m),mountPromise:rs(p),unmountPromise:rs(f)}}function rs(e){return e.then(()=>null)}function rl(e){let t=nQ(e),n="function"==typeof e.customProps?e.customProps(t,window.location):e.customProps;("object"!=typeof n||null===n||Array.isArray(n))&&(n={},console.warn(nI(40,!1),t,n));let r=n4({},n,{name:t,mountParcel:ri.bind(e),singleSpa:nR});return n0(e)&&(r.unmountSelf=e.unmountThisParcel),r}let ru={bootstrap:{millis:4e3,dieOnTimeout:!1,warningMillis:1e3},mount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unmount:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},unload:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3},update:{millis:3e3,dieOnTimeout:!1,warningMillis:1e3}};function rc(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(16,!1));ru.bootstrap={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rd(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(17,!1));ru.mount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rm(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(18,!1));ru.unmount={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rp(e,t,n){if("number"!=typeof e||e<=0)throw Error(nI(19,!1));ru.unload={millis:e,dieOnTimeout:t,warningMillis:n||1e3}}function rf(e,t){let n=e.timeouts[t],r=n.warningMillis,a=n1(e);return new Promise((o,i)=>{let s=!1,l=!1;e[t](rl(e)).then(e=>{s=!0,o(e)}).catch(e=>{s=!0,i(e)}),setTimeout(()=>c(1),r),setTimeout(()=>c(!0),n.millis);let u=nI(31,!1,t,a,nQ(e),n.millis);function c(e){s||(!0===e?(l=!0,n.dieOnTimeout?i(Error(u)):console.error(u)):!l&&(console.warn(u),e*r+r<n.millis&&setTimeout(()=>c(e+1),r)))}})}function rh(e){let t={};for(let n in ru)t[n]=n4({},ru[n],e&&e[n]||{});return t}function rg(e){return Promise.resolve().then(()=>{let t,n;return e.loadPromise?e.loadPromise:e.status!==nF&&e.status!==nY?e:(e.status=nB,e.loadPromise=Promise.resolve().then(()=>{let r=e.loadApp(rl(e));if(!n5(r))throw n=!0,Error(nI(33,!1,nQ(e)));return r.then(n=>{let r;e.loadErrorTime=null,"object"!=typeof(t=n)&&(r=34),Object.prototype.hasOwnProperty.call(t,"bootstrap")&&!n3(t.bootstrap)&&(r=35),n3(t.mount)||(r=36),n3(t.unmount)||(r=37);let a=n1(t);if(r){let n;try{n=JSON.stringify(t)}catch(e){}return console.error(nI(r,!1,a,nQ(e),n),t),nM(void 0,e,nq),e}return t.devtools&&t.devtools.overlays&&(e.devtools.overlays=n4({},e.devtools.overlays,t.devtools.overlays)),e.status=nV,e.bootstrap=n6(t,"bootstrap"),e.mount=n6(t,"mount"),e.unmount=n6(t,"unmount"),e.unload=n6(t,"unload"),e.timeouts=rh(t.timeouts),delete e.loadPromise,e})}).catch(t=>{let r;return delete e.loadPromise,n?r=nq:(r=nY,e.loadErrorTime=(new Date).getTime()),nM(t,e,r),e}))})}let ry="u">typeof window,rv={hashchange:[],popstate:[]},rb=["hashchange","popstate"];function rw(e){let t;if("string"==typeof e)t=e;else if(this&&this.href)t=this.href;else{if(!(e&&e.currentTarget&&e.currentTarget.href&&e.preventDefault))throw Error(nI(14,!1));t=e.currentTarget.href,e.preventDefault()}let n=rC(window.location.href),r=rC(t);0===t.indexOf("#")?window.location.hash=r.hash:n.host!==r.host&&r.host?window.location.href=t:r.pathname===n.pathname&&r.search===n.search?window.location.hash=r.hash:window.history.pushState(null,null,t)}function rx(e){if(e){let t=e[0].type;rb.indexOf(t)>=0&&rv[t].forEach(t=>{try{t.apply(this,e)}catch(e){setTimeout(()=>{throw e})}})}}function rD(){rJ([],arguments)}function rE(e,t){return function(){let n=window.location.href,r=e.apply(this,arguments),o=window.location.href;return a&&n===o||window.dispatchEvent(function(e,t){let n;try{n=new PopStateEvent("popstate",{state:e})}catch(t){(n=document.createEvent("PopStateEvent")).initPopStateEvent("popstate",!1,!1,e)}return n.singleSpa=!0,n.singleSpaTrigger=t,n}(window.history.state,t)),r}}let r_=null,rS=!1;function rk(e){if(rS)throw Error(nI(43,!1));a=!e||!e.hasOwnProperty("urlRerouteOnly")||e.urlRerouteOnly,rS=!0,r_=window.history.replaceState,window.addEventListener("hashchange",rD),window.addEventListener("popstate",rD);let t=window.addEventListener,n=window.removeEventListener;window.addEventListener=function(e,n){if(!("function"==typeof n&&rb.indexOf(e)>=0)||n2(rv[e],e=>e===n))return t.apply(this,arguments);rv[e].push(n)},window.removeEventListener=function(e,t){return"function"==typeof t&&rb.indexOf(e)>=0&&(rv[e]=rv[e].filter(e=>e!==t)),n.apply(this,arguments)},window.history.pushState=rE(window.history.pushState,"pushState"),window.history.replaceState=rE(r_,"replaceState")}function rC(e){let t=document.createElement("a");return t.href=e,t}ry&&(window.singleSpaNavigate?console.warn(nI(41,!1)):window.singleSpaNavigate=rw);let rP=!1;function rT(e=window.jQuery){if(e||window.$&&window.$.fn&&window.$.fn.jquery&&(e=window.$),e&&!rP){let t=e.fn.on,n=e.fn.off;e.fn.on=function(e,n){return rR.call(this,t,window.addEventListener,e,n,arguments)},e.fn.off=function(e,t){return rR.call(this,n,window.removeEventListener,e,t,arguments)},rP=!0}}function rR(e,t,n,r,a){return"string"!=typeof n?e.apply(this,a):(n.split(/\s+/).forEach(e=>{rb.indexOf(e)>=0&&(t(e,r),n=n.replace(e,""))}),""===n.trim()?this:e.apply(this,a))}let rN={};function rO(e){return Promise.resolve().then(()=>{let t=rN[nQ(e)];if(!t)return e;if(e.status===nF)return r$(e,t),e;if(e.status===nZ)return t.promise.then(()=>e);if(e.status!==nW&&e.status!==nY)return e;let n=e.status===nY?Promise.resolve():rf(e,"unload");return e.status=nZ,n.then(()=>(r$(e,t),e)).catch(n=>(delete rN[nQ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,nM(n,e,nq),t.reject(n),e))})}function r$(e,t){delete rN[nQ(e)],delete e.bootstrap,delete e.mount,delete e.unmount,delete e.unload,e.status=nF,t.resolve()}function rM(e,t,n,r){rN[nQ(e)]={app:e,resolve:n,reject:r},Object.defineProperty(rN[nQ(e)],"promise",{get:t})}let rA=[];function rj(){return rA.filter(nJ).map(nQ)}function rI(){return rA.map(nQ)}function rL(e){let t=n2(rA,t=>nQ(t)===e);return t?t.status:null}let rF=!1;function rB(e,t,n,r){var a,o;let i,s,l=(i={name:null,loadApp:null,activeWhen:null,customProps:null},"object"==typeof e?(function(e){if(Array.isArray(e)||null===e)throw Error(nI(39,!1));let t=["name","app","activeWhen","customProps"],n=Object.keys(e).reduce((e,n)=>t.indexOf(n)>=0?e:e.concat(n),[]);if(0!==n.length)throw Error(nI(38,!1,t.join(", "),n.join(", ")));if("string"!=typeof e.name||0===e.name.length||"object"!=typeof e.app&&"function"!=typeof e.app)throw Error(nI(20,!1));let r=e=>"string"==typeof e||"function"==typeof e;if(!(r(e.activeWhen)||Array.isArray(e.activeWhen)&&e.activeWhen.every(r)))throw Error(nI(24,!1));if(!rz(e.customProps))throw Error(nI(22,!1))}(e),i.name=e.name,i.loadApp=e.app,i.activeWhen=e.activeWhen,i.customProps=e.customProps):(function(e,t,n,r){if("string"!=typeof e||0===e.length)throw Error(nI(20,!1));if(!t)throw Error(nI(23,!1));if("function"!=typeof n)throw Error(nI(24,!1));if(!rz(r))throw Error(nI(22,!1))}(e,t,n,r),i.name=e,i.loadApp=t,i.activeWhen=n,i.customProps=r),i.loadApp="function"!=typeof(a=i.loadApp)?()=>Promise.resolve(a):a,i.customProps=i.customProps||{},s=(s=Array.isArray(o=i.activeWhen)?o:[o]).map(e=>"function"==typeof e?e:rK(e)),i.activeWhen=e=>s.some(t=>t(e)),i);if(rQ||rF||(rF=!0,setTimeout(()=>{rQ||console.warn(nI(1,!1))},5e3)),-1!==rI().indexOf(l.name))throw Error(nI(21,!1,l.name));rA.push(n4({loadErrorTime:null,status:nF,parcels:{},devtools:{overlays:{options:{},selectors:[]}}},l)),ry&&(rT(),rJ())}function rV(e=window.location){return rA.filter(t=>t.activeWhen(e)).map(nQ)}function rU(e){if(0===rA.filter(t=>nQ(t)===e).length)throw Error(nI(25,!1,e));return(ry?rW(e,{waitForUnmount:!1}):Promise.resolve()).then(()=>{let t=rA.map(nQ).indexOf(e);rA.splice(t,1)})}function rW(e,t={waitForUnmount:!1}){if("string"!=typeof e)throw Error(nI(26,!1));let n=n2(rA,t=>nQ(t)===e);if(!n)throw Error(nI(27,!1,e));let r=rN[nQ(n)];if(t&&t.waitForUnmount){if(r)return r.promise;{let e=new Promise((t,r)=>{rM(n,()=>e,t,r)});return e}}{let e;return r?(e=r.promise,rH(n,r.resolve,r.reject)):e=new Promise((t,r)=>{rM(n,()=>e,t,r),rH(n,t,r)}),e}}function rH(e,t,n){Promise.resolve().then(()=>{if(n2(rV(),t=>t===nQ(e)))return rq()}).then(()=>n7(e).then(rO).then(()=>{t(),setTimeout(()=>{rJ()})})).catch(n)}function rz(e){return!e||"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)}function rK(e,t){let n=function(e,t){let n=0,r=!1,a="^";"/"!==e[0]&&(e="/"+e);for(let t=0;t<e.length;t++){let n=e[t],a=r&&"/"===n;(!r&&":"===n||a)&&o(t)}return o(e.length),RegExp(a,"i");function o(o){let i=e.slice(n,o).replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");if(a+=r?"[^/]+/?":i,o===e.length)if(r)t&&(a+="$");else{let e=t?"":".*";a="/"===a.charAt(a.length-1)?`${a}${e}$`:`${a}(/${e})?(#.*)?$`}r=!r,n=o}}(e,t);return e=>{let t=e.origin;t||(t=`${e.protocol}//${e.host}`);let r=e.href.replace(t,"").replace(e.search,"").split("?")[0];return n.test(r)}}let rG=!1,rZ=[],rY=ry&&window.location.href;function rq(){return rJ()}function rJ(e=[],t,n=!1){let r,a,o,i,s;if(rG)return new Promise((e,n)=>{rZ.push({resolve:e,reject:n,eventArguments:t})});let{appsToUnload:l,appsToUnmount:u,appsToLoad:c,appsToMount:d}=(r=[],a=[],o=[],i=[],s=(new Date).getTime(),rA.forEach(e=>{let t=e.status!==nq&&nX(e);switch(e.status){case nY:t&&s-e.loadErrorTime>=200&&o.push(e);break;case nF:case nB:t&&o.push(e);break;case nV:case nW:!t&&rN[nQ(e)]?r.push(e):t&&i.push(e);break;case nz:t||a.push(e)}}),{appsToUnload:r,appsToUnmount:a,appsToLoad:o,appsToMount:i}),m,p=[],f=rY,h=rY=window.location.href;return rQ?(rG=!0,m=l.concat(c,u,d),Promise.resolve().then(()=>(w(0===m.length?"before-no-app-change":"before-app-change",b(!0)),w("before-routing-event",b(!0,{cancelNavigation:g})),Promise.all(p).then(n=>{if(n.some(e=>e))return r_.call(window.history,history.state,"",f.substring(location.origin.length)),rY=location.href,rG=!1,rJ(e,t,!0);let r=l.map(rO),a=Promise.all(u.map(n7).map(e=>e.then(rO)).concat(r));a.then(()=>{w("before-mount-routing-event",b(!0))},e=>{throw e});let o=c.map(e=>rg(e).then(e=>rX(e,a))),i=d.filter(e=>0>c.indexOf(e)).map(e=>rX(e,a));return a.catch(e=>{throw v(),e}).then(()=>(v(),Promise.all(o.concat(i)).catch(t=>{throw e.forEach(e=>e.reject(t)),t}).then(y).then(()=>{},e=>{throw e})))})))):(m=c,Promise.resolve().then(()=>Promise.all(c.map(rg)).then(v).then(()=>[]).catch(e=>{throw v(),e}).finally(()=>{})));function g(e=!0){let t="function"==typeof(null==e?void 0:e.then)?e:Promise.resolve(e);p.push(t.catch(e=>(console.warn(Error(nI(42,!1))),console.warn(e),!1)))}function y(){let t=rj();e.forEach(e=>e.resolve(t));try{w(0===m.length?"no-app-change":"app-change",b()),w("routing-event",b())}catch(e){setTimeout(()=>{throw e})}if(rG=!1,rZ.length>0){let e=rZ;rZ=[],rJ(e)}return t}function v(){n||(e.forEach(e=>{rx(e.eventArguments)}),rx(t))}function b(e=!1,n){let r={},a={[nz]:[],[nW]:[],[nF]:[],[nq]:[]};e?(c.concat(d).forEach((e,t)=>{i(e,nz)}),l.forEach(e=>{i(e,nF)}),u.forEach(e=>{i(e,nW)})):m.forEach(e=>{i(e)});let o={detail:{newAppStatuses:r,appsByNewStatus:a,totalAppChanges:m.length,originalEvent:null==t?void 0:t[0],oldUrl:f,newUrl:h}};return n&&n4(o.detail,n),o;function i(e,t){let n=nQ(e);t=t||rL(n),r[n]=t,(a[t]=a[t]||[]).push(n)}}function w(e,t){n||window.dispatchEvent(new nO(`single-spa:${e}`,t))}}function rX(e,t){return nX(e)?n8(e).then(e=>t.then(()=>nX(e)?rn(e):e)):t.then(()=>e)}let rQ=!1;function r0(e){rQ=!0,ry&&(rk(e),rJ())}ry&&window.__SINGLE_SPA_DEVTOOLS__&&(window.__SINGLE_SPA_DEVTOOLS__.exposedMethods={getRawAppData:function(){return[...rA]},reroute:rJ,NOT_LOADED:nF,toLoadPromise:rg,toBootstrapPromise:n8,unregisterApplication:rU,getProfilerData:function(){return n9}});let r1={address1:"Address line 1",address2:"Address line 2",address3:"Address line 3",address4:"Address line 4",address5:"Address line 5",address6:"Address line 6",city:"City",cityVillage:"City",country:"Country",countyDistrict:"District",district:"District",postalCode:"Postal code",state:"State",stateProvince:"State",closeAllOpenedWorkspaces:"Discard changes in {{count}} workspaces",closingAllWorkspacesPromptBody:"There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",closingAllWorkspacesPromptTitle:"You have unsaved changes",discard:"Discard",hide:"Hide",maximize:"Maximize",minimize:"Minimize",openAnyway:"Open anyway",unsavedChangesInOpenedWorkspace:"You may have unsaved changes in the opened workspace. Do you want to discard these changes?",unsavedChangesInWorkspace:'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',unsavedChangesTitleText:"Unsaved changes",workspaceHeader:"Workspace header",discardUnsavedChangesPromptBodyMultiple:"{{count}} workspaces have unsaved changes. Closing them will discard the changes:",discardUnsavedChangesPromptBodySingle:"<strong>{{workspaceTitle}}</strong> has unsaved changes. Closing it will discard them.",discardUnsavedChangesPromptTitle:"Discard unsaved changes?",keepEditing:"Keep editing",abnormalValue:"Abnormal value",actions:"Actions",actionableNotification:"Actionable notification",address:"Address",age:"Age",batchActionItemSelected:"{{totalSelected}} item selected",batchActionsItemsSelected:"{{totalSelected}} items selected",cancel:"Cancel",change:"Change",Clinic:"Clinic",close:"Close",closesActionableNotification:"Close actionable notification",closeSnackbar:"Close snackbar",confirm:"Confirm",contactAdministratorIfIssuePersists:"Contact your system administrator if the problem persists.",contactDetails:"Contact details",delete:"Delete",discardChanges:"Discard changes",edit:"Edit",emptyStateText:"There are no {{displayText}} to display",error:"Error",errorCopy:"Sorry, there was a problem displaying this information. You can try to reload this page, or contact the site administrator and quote the error code above.",errorLoadingLoginLocations:"Unable to load login locations. Please try again or contact support if the problem persists.",female:"Female",leftNavigation:"Left navigation",loading:"Loading",localVersion:"Local Build",male:"Male",navigateNonHttp:"Could not navigate to the requested page as it is not a safe URL",noResultsToDisplay:"No results to display",notAvailable:"Not available",other:"Other",paginationItemsCount:"{{pageItemsCount}} / {{totalItems}} items",paginationOfPages:"of {{count}} pages",patientAvatarAlt:"Avatar for {{patientName}}",patientIdentifierSticker:"Patient identifier sticker",patientLists:"Patient lists",patientPhotoAlt:"Profile photo of {{patientName}}",patientPhotoPlaceholder:"Photo placeholder for {{patientName}}",prereleaseVersion:"Prerelease",print:"Print",printError:"Print error",printErrorExplainer:"An error occurred in {{errorLocation}}",printIdentifierSticker:"Print identifier sticker",printing:"Printing",recordNewEntry:"Record {{displayText}}",relationships:"Relationships",resetOverrides:"Reset overrides",save:"Save",scriptLoadingFailed:"Error: Script failed to load",scriptLoadingError:"Failed to load overridden script from {{url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",searchForLocation:"Search for a location",seeAll:"See all",seeMoreLists:"See {{count}} more lists",selectAll:"Select all",sex:"Sex",showLess:"Show less",showMore:"Show more",snackbarNotification:"Snackbar notification",toggleDevTools:"Toggle dev tools",unknown:"Unknown",yearAbbreviation:"yr",yearsAbbreviation:"yrs"},r4=e=>"string"==typeof e,r2=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},r3=e=>null==e?"":""+e,r6=/###/g,r5=e=>e&&e.indexOf("###")>-1?e.replace(r6,"."):e,r9=e=>!e||r4(e),r8=(e,t,n)=>{let r=r4(t)?t.split("."):t,a=0;for(;a<r.length-1;){if(r9(e))return{};let t=r5(r[a]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++a}return r9(e)?{}:{obj:e,k:r5(r[a])}},r7=(e,t,n)=>{let{obj:r,k:a}=r8(e,t,Object);if(void 0!==r||1===t.length){r[a]=n;return}let o=t[t.length-1],i=t.slice(0,t.length-1),s=r8(e,i,Object);for(;void 0===s.obj&&i.length;)o=`${i[i.length-1]}.${o}`,s=r8(e,i=i.slice(0,i.length-1),Object),s?.obj&&void 0!==s.obj[`${s.k}.${o}`]&&(s.obj=void 0);s.obj[`${s.k}.${o}`]=n},ae=(e,t)=>{let{obj:n,k:r}=r8(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},at=(e,t,n)=>{for(let r in t)"__proto__"!==r&&"constructor"!==r&&(r in e?r4(e[r])||e[r]instanceof String||r4(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):at(e[r],t[r],n):e[r]=t[r]);return e};var an={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};let ar=e=>r4(e)?e.replace(/[&<>"'\/]/g,e=>an[e]):e,aa=[" ",",","?","!",";"],ao=new class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(void 0!==t)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}}(20),ai=(e,t,n=".")=>{if(!e)return;if(e[t]){if(!Object.prototype.hasOwnProperty.call(e,t))return;return e[t]}let r=t.split(n),a=e;for(let e=0;e<r.length;){let t;if(!a||"object"!=typeof a)return;let o="";for(let i=e;i<r.length;++i)if(i!==e&&(o+=n),o+=r[i],void 0!==(t=a[o])){if(["string","number","boolean"].indexOf(typeof t)>-1&&i<r.length-1)continue;e+=i-e+1;break}a=t}return a},as=e=>e?.replace("_","-"),al={type:"logger",log(e){this.output("log",e)},warn(e){this.output("warn",e)},error(e){this.output("error",e)},output(e,t){console?.[e]?.apply?.(console,t)}};class au{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||"i18next:",this.logger=e||al,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,"log","",!0)}warn(...e){return this.forward(e,"warn","",!0)}error(...e){return this.forward(e,"error","")}deprecate(...e){return this.forward(e,"warn","WARNING DEPRECATED: ",!0)}forward(e,t,n,r){return r&&!this.debug?null:(r4(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(e){return new au(this.logger,{...{prefix:`${this.prefix}:${e}:`},...this.options})}clone(e){return(e=e||this.options).prefix=e.prefix||this.prefix,new au(this.logger,e)}}var ac=new au;class ad{constructor(){this.observers={}}on(e,t){return e.split(" ").forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t)return void delete this.observers[e];this.observers[e].delete(t)}}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([n,r])=>{for(let a=0;a<r;a++)n.apply(n,[e,...t])})}}class am extends ad{constructor(e,t={ns:["translation"],defaultNS:"translation"}){super(),this.data=e||{},this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),void 0===this.options.ignoreJSONStructure&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let a,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,i=void 0!==r.ignoreJSONStructure?r.ignoreJSONStructure:this.options.ignoreJSONStructure;e.indexOf(".")>-1?a=e.split("."):(a=[e,t],n&&(Array.isArray(n)?a.push(...n):r4(n)&&o?a.push(...n.split(o)):a.push(n)));let s=ae(this.data,a);return(!s&&!t&&!n&&e.indexOf(".")>-1&&(e=a[0],t=a[1],n=a.slice(2).join(".")),!s&&i&&r4(n))?ai(this.data?.[e]?.[t],n,o):s}addResource(e,t,n,r,a={silent:!1}){let o=void 0!==a.keySeparator?a.keySeparator:this.options.keySeparator,i=[e,t];n&&(i=i.concat(o?n.split(o):n)),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),r7(this.data,i,r),a.silent||this.emit("added",e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(r4(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit("added",e,t,n)}addResourceBundle(e,t,n,r,a,o={silent:!1,skipCopy:!1}){let i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);let s=ae(this.data,i)||{};o.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?at(s,n,a):s={...s,...n},r7(this.data,i,s),o.silent||this.emit("added",e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}hasResourceBundle(e,t){return void 0!==this.getResource(e,t)}getResourceBundle(e,t){return t||(t=this.options.defaultNS),this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}}var ap={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,a){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,a)??t}),t}};let af=Symbol("i18next/PATH_KEY");function ah(e,t){let n,r,a,{[af]:o}=e((r=[],(a=Object.create(null)).get=(e,t)=>(n?.revoke?.(),t===af)?r:(r.push(t),(n=Proxy.revocable(e,a)).proxy),Proxy.revocable(Object.create(null),a).proxy));return o.join(t?.keySeparator??".")}let ag={},ay=e=>!r4(e)&&"boolean"!=typeof e&&"number"!=typeof e;class av extends ad{constructor(e,t={}){super(),((e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})})(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],e,this),this.options=t,void 0===this.options.keySeparator&&(this.options.keySeparator="."),this.logger=ac.create("translator")}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(null==e)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let a=ay(r.res);return!1!==n.returnObjects||!a}extractFromKey(e,t){let n=void 0!==t.nsSeparator?t.nsSeparator:this.options.nsSeparator;void 0===n&&(n=":");let r=void 0!==t.keySeparator?t.keySeparator:this.options.keySeparator,a=t.ns||this.options.defaultNS||[],o=n&&e.indexOf(n)>-1,i=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!((e,t,n)=>{t=t||"",n=n||"";let r=aa.filter(e=>0>t.indexOf(e)&&0>n.indexOf(e));if(0===r.length)return!0;let a=ao.getRegExp(`(${r.map(e=>"?"===e?"\\?":e).join("|")})`),o=!a.test(e);if(!o){let t=e.indexOf(n);t>0&&!a.test(e.substring(0,t))&&(o=!0)}return o})(e,n,r);if(o&&!i){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:r4(a)?[a]:a};let o=e.split(n);(n!==r||n===r&&this.options.ns.indexOf(o[0])>-1)&&(a=o.shift()),e=o.join(r)}return{key:e,namespaces:r4(a)?[a]:a}}translate(e,t,n){let r="object"==typeof t?{...t}:t;if("object"!=typeof r&&this.options.overloadTranslationOptionHandler&&(r=this.options.overloadTranslationOptionHandler(arguments)),"object"==typeof r&&(r={...r}),r||(r={}),null==e)return"";"function"==typeof e&&(e=ah(e,{...this.options,...r})),Array.isArray(e)||(e=[String(e)]);let a=void 0!==r.returnDetails?r.returnDetails:this.options.returnDetails,o=void 0!==r.keySeparator?r.keySeparator:this.options.keySeparator,{key:i,namespaces:s}=this.extractFromKey(e[e.length-1],r),l=s[s.length-1],u=void 0!==r.nsSeparator?r.nsSeparator:this.options.nsSeparator;void 0===u&&(u=":");let c=r.lng||this.language,d=r.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(c?.toLowerCase()==="cimode")return d?a?{res:`${l}${u}${i}`,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:`${l}${u}${i}`:a?{res:i,usedKey:i,exactUsedKey:i,usedLng:c,usedNS:l,usedParams:this.getUsedParamsDetails(r)}:i;let m=this.resolve(e,r),p=m?.res,f=m?.usedKey||i,h=m?.exactUsedKey||i,g=void 0!==r.joinArrays?r.joinArrays:this.options.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,v=void 0!==r.count&&!r4(r.count),b=av.hasDefaultValue(r),w=v?this.pluralResolver.getSuffix(c,r.count,r):"",x=r.ordinal&&v?this.pluralResolver.getSuffix(c,r.count,{ordinal:!1}):"",D=v&&!r.ordinal&&0===r.count,E=D&&r[`defaultValue${this.options.pluralSeparator}zero`]||r[`defaultValue${w}`]||r[`defaultValue${x}`]||r.defaultValue,_=p;y&&!p&&b&&(_=E);let S=ay(_),k=Object.prototype.toString.apply(_);if(y&&_&&S&&0>["[object Number]","[object Function]","[object RegExp]"].indexOf(k)&&!(r4(g)&&Array.isArray(_))){if(!r.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(f,_,{...r,ns:s}):`key '${i} (${this.language})' returned an object instead of string.`;return a?(m.res=e,m.usedParams=this.getUsedParamsDetails(r),m):e}if(o){let e=Array.isArray(_),t=e?[]:{},n=e?h:f;for(let e in _)if(Object.prototype.hasOwnProperty.call(_,e)){let a=`${n}${o}${e}`;b&&!p?t[e]=this.translate(a,{...r,defaultValue:ay(E)?E[e]:void 0,...{joinArrays:!1,ns:s}}):t[e]=this.translate(a,{...r,joinArrays:!1,ns:s}),t[e]===a&&(t[e]=_[e])}p=t}}else if(y&&r4(g)&&Array.isArray(p))(p=p.join(g))&&(p=this.extendTranslation(p,e,r,n));else{let t=!1,a=!1;!this.isValidLookup(p)&&b&&(t=!0,p=E),this.isValidLookup(p)||(a=!0,p=i);let s=(r.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&a?void 0:p,d=b&&E!==p&&this.options.updateMissing;if(a||t||d){if(this.logger.log(d?"updateKey":"missingKey",c,l,i,d?E:p),o){let e=this.resolve(i,{...r,keySeparator:!1});e&&e.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,r.lng||this.language);if("fallback"===this.options.saveMissingTo&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else"all"===this.options.saveMissingTo?e=this.languageUtils.toResolveHierarchy(r.lng||this.language):e.push(r.lng||this.language);let n=(e,t,n)=>{let a=b&&n!==p?n:s;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,a,d,r):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,a,d,r),this.emit("missingKey",e,l,t,p)};this.options.saveMissing&&(this.options.saveMissingPlurals&&v?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,r);D&&r[`defaultValue${this.options.pluralSeparator}zero`]&&0>t.indexOf(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],i+t,r[`defaultValue${t}`]||E)})}):n(e,i,E))}p=this.extendTranslation(p,e,r,m,n),a&&p===i&&this.options.appendNamespaceToMissingKey&&(p=`${l}${u}${i}`),(a||t)&&this.options.parseMissingKeyHandler&&(p=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${i}`:i,t?p:void 0,r))}return a?(m.res=p,m.usedParams=this.getUsedParamsDetails(r),m):p}extendTranslation(e,t,n,r,a){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){let o;n.interpolation&&this.interpolator.init({...n,...{interpolation:{...this.options.interpolation,...n.interpolation}}});let i=r4(e)&&(n?.interpolation?.skipOnVariables!==void 0?n.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);if(i){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!r4(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),i){let t=e.match(this.interpolator.nestingRegexp);o<(t&&t.length)&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),!1!==n.nest&&(e=this.interpolator.nest(e,(...e)=>a?.[0]!==e[0]||n.context?this.translate(...e,t):(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null),n)),n.interpolation&&this.interpolator.reset()}let o=n.postProcess||this.options.postProcess,i=r4(o)?[o]:o;return null!=e&&i?.length&&!1!==n.applyPostProcessor&&(e=ap.handle(i,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,a,o,i;return r4(e)&&(e=[e]),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),l=s.key;r=l;let u=s.namespaces;this.options.fallbackNS&&(u=u.concat(this.options.fallbackNS));let c=void 0!==t.count&&!r4(t.count),d=c&&!t.ordinal&&0===t.count,m=void 0!==t.context&&(r4(t.context)||"number"==typeof t.context)&&""!==t.context,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);u.forEach(e=>{this.isValidLookup(n)||(i=e,!ag[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(i)&&(ag[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(", ")}" won't get resolved as namespace "${i}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),p.forEach(r=>{let i;if(this.isValidLookup(n))return;o=r;let s=[l];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(s,l,r,e,t);else{let e;c&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,a=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(c&&(t.ordinal&&0===e.indexOf(a)&&s.push(l+e.replace(a,this.options.pluralSeparator)),s.push(l+e),d&&s.push(l+n)),m){let r=`${l}${this.options.contextSeparator||"_"}${t.context}`;s.push(r),c&&(t.ordinal&&0===e.indexOf(a)&&s.push(r+e.replace(a,this.options.pluralSeparator)),s.push(r+e),d&&s.push(r+n))}}for(;i=s.pop();)this.isValidLookup(n)||(a=i,n=this.getResource(r,e,i,t))}))})}),{res:n,usedKey:r,exactUsedKey:a,usedLng:o,usedNS:i}}isValidLookup(e){return void 0!==e&&!(!this.options.returnNull&&null===e)&&!(!this.options.returnEmptyString&&""===e)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=e.replace&&!r4(e.replace),n=t?e.replace:e;if(t&&void 0!==e.count&&(n.count=e.count),this.options.interpolation.defaultVariables&&(n={...this.options.interpolation.defaultVariables,...n}),!t)for(let e of(n={...n},["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"]))delete n[e];return n}static hasDefaultValue(e){let t="defaultValue";for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t===n.substring(0,t.length)&&void 0!==e[n])return!0;return!1}}class ab{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=ac.create("languageUtils")}getScriptPartFromCode(e){if(!(e=as(e))||0>e.indexOf("-"))return null;let t=e.split("-");return 2===t.length||(t.pop(),"x"===t[t.length-1].toLowerCase())?null:this.formatLanguageCode(t.join("-"))}getLanguagePartFromCode(e){if(!(e=as(e))||0>e.indexOf("-"))return e;let t=e.split("-");return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(r4(e)&&e.indexOf("-")>-1){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch(e){}return(t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t)?t:this.options.lowerCaseLng?e.toLowerCase():e}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return("languageOnly"===this.options.load||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(e)>-1}getBestMatchFromCodes(e){let t;return e?(e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>{if(e===r||!(0>e.indexOf("-")&&0>r.indexOf("-"))&&(e.indexOf("-")>0&&0>r.indexOf("-")&&e.substring(0,e.indexOf("-"))===r||0===e.indexOf(r)&&r.length>1))return e})}),t||(t=this.getFallbackCodes(this.options.fallbackLng)[0]),t):null}getFallbackCodes(e,t){if(!e)return[];if("function"==typeof e&&(e=e(t)),r4(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||(n=e[this.getScriptPartFromCode(t)]),n||(n=e[this.formatLanguageCode(t)]),n||(n=e[this.getLanguagePartFromCode(t)]),n||(n=e.default),n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((!1===t?[]:t)||this.options.fallbackLng||[],e),r=[],a=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return r4(e)&&(e.indexOf("-")>-1||e.indexOf("_")>-1)?("languageOnly"!==this.options.load&&a(this.formatLanguageCode(e)),"languageOnly"!==this.options.load&&"currentOnly"!==this.options.load&&a(this.getScriptPartFromCode(e)),"currentOnly"!==this.options.load&&a(this.getLanguagePartFromCode(e))):r4(e)&&a(this.formatLanguageCode(e)),n.forEach(e=>{0>r.indexOf(e)&&a(this.formatLanguageCode(e))}),r}}let aw={zero:0,one:1,two:2,few:3,many:4,other:5},ax={select:e=>1===e?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class aD{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=ac.create("pluralResolver"),this.pluralRulesCache={}}addRule(e,t){this.rules[e]=t}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n,r=as("dev"===e?"en":e),a=t.ordinal?"ordinal":"cardinal",o=JSON.stringify({cleanedCode:r,type:a});if(o in this.pluralRulesCache)return this.pluralRulesCache[o];try{n=new Intl.PluralRules(r,{type:a})}catch(a){if(!Intl)return this.logger.error("No Intl support, please use an Intl polyfill!"),ax;if(!e.match(/-|_/))return ax;let r=this.languageUtils.getLanguagePartFromCode(e);n=this.getRule(r,t)}return this.pluralRulesCache[o]=n,n}needsPlural(e,t={}){let n=this.getRule(e,t);return n||(n=this.getRule("dev",t)),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return(n||(n=this.getRule("dev",t)),n)?n.resolvedOptions().pluralCategories.sort((e,t)=>aw[e]-aw[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:""}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:""}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix("dev",t,n))}}let aE=(e,t,n,r=".",a=!0)=>{let o,i=void 0!==(o=ae(e,n))?o:ae(t,n);return!i&&a&&r4(n)&&void 0===(i=ai(e,n,r))&&(i=ai(t,n,r)),i};class a_{constructor(e={}){this.logger=ac.create("interpolator"),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||(e.interpolation={escapeValue:!0});let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:a,prefixEscaped:o,suffix:i,suffixEscaped:s,formatSeparator:l,unescapeSuffix:u,unescapePrefix:c,nestingPrefix:d,nestingPrefixEscaped:m,nestingSuffix:p,nestingSuffixEscaped:f,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:y}=e.interpolation;this.escape=void 0!==t?t:ar,this.escapeValue=void 0===n||n,this.useRawValueToEscape=void 0!==r&&r,this.prefix=a?a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):o||"{{",this.suffix=i?i.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):s||"}}",this.formatSeparator=l||",",this.unescapePrefix=u?"":c||"-",this.unescapeSuffix=this.unescapePrefix?"":u||"",this.nestingPrefix=d?d.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):m||"$t(".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingSuffix=p?p.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"):f||")".replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),this.nestingOptionsSeparator=h||",",this.maxReplaces=g||1e3,this.alwaysFormat=void 0!==y&&y,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):RegExp(t,"g");this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let a,o,i,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},l=e=>{if(0>e.indexOf(this.formatSeparator)){let a=aE(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(a,void 0,n,{...r,...t,interpolationkey:e}):a}let a=e.split(this.formatSeparator),o=a.shift().trim(),i=a.join(this.formatSeparator).trim();return this.format(aE(t,s,o,this.options.keySeparator,this.options.ignoreJSONStructure),i,n,{...r,...t,interpolationkey:o})};this.resetRegExp();let u=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,c=r?.interpolation?.skipOnVariables!==void 0?r.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>e.replace(/\$/g,"$$$$")},{regex:this.regexp,safeValue:e=>this.escapeValue?this.escape(e).replace(/\$/g,"$$$$"):e.replace(/\$/g,"$$$$")}].forEach(t=>{for(i=0;a=t.regex.exec(e);){let n=a[1].trim();if(void 0===(o=l(n)))if("function"==typeof u){let t=u(e,a,r);o=r4(t)?t:""}else if(r&&Object.prototype.hasOwnProperty.call(r,n))o="";else if(c){o=a[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),o="";else r4(o)||this.useRawValueToEscape||(o=r3(o));let s=t.safeValue(o);if(e=e.replace(a[0],s),c?(t.regex.lastIndex+=o.length,t.regex.lastIndex-=a[0].length):t.regex.lastIndex=0,++i>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,a,o,i=(e,t)=>{let n=this.nestingOptionsSeparator;if(0>e.indexOf(n))return e;let r=e.split(RegExp(`${n}[ ]*{`)),a=`{${r[1]}`;e=r[0];let i=(a=this.interpolate(a,o)).match(/'/g),s=a.match(/"/g);((i?.length??0)%2!=0||s)&&s.length%2==0||(a=a.replace(/'/g,'"'));try{o=JSON.parse(a),t&&(o={...t,...o})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${a}`}return o.defaultValue&&o.defaultValue.indexOf(this.prefix)>-1&&delete o.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];(o=(o={...n}).replace&&!r4(o.replace)?o.replace:o).applyPostProcessor=!1,delete o.defaultValue;let l=/{.*}/.test(r[1])?r[1].lastIndexOf("}")+1:r[1].indexOf(this.formatSeparator);if(-1!==l&&(s=r[1].slice(l).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,l)),(a=t(i.call(this,r[1].trim(),o),o))&&r[0]===e&&!r4(a))return a;r4(a)||(a=r3(a)),a||(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),a=""),s.length&&(a=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),a.trim())),e=e.replace(r[0],a),this.regexp.lastIndex=0}return e}}let aS=e=>{let t={};return(n,r,a)=>{let o=a;a&&a.interpolationkey&&a.formatParams&&a.formatParams[a.interpolationkey]&&a[a.interpolationkey]&&(o={...o,[a.interpolationkey]:void 0});let i=r+JSON.stringify(o),s=t[i];return s||(s=e(as(r),a),t[i]=s),s(n)}},ak=e=>(t,n,r)=>e(as(n),r)(t);class aC{constructor(e={}){this.logger=ac.create("formatter"),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||",";let n=t.cacheInBuiltFormats?aS:ak;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:"currency"});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||"day")}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=aS(t)}format(e,t,n,r={}){let a=t.split(this.formatSeparator);if(a.length>1&&a[0].indexOf("(")>1&&0>a[0].indexOf(")")&&a.find(e=>e.indexOf(")")>-1)){let e=a.findIndex(e=>e.indexOf(")")>-1);a[0]=[a[0],...a.splice(1,e)].join(this.formatSeparator)}return a.reduce((e,t)=>{let{formatName:a,formatOptions:o}=(e=>{let t=e.toLowerCase().trim(),n={};if(e.indexOf("(")>-1){let r=e.split("(");t=r[0].toLowerCase().trim();let a=r[1].substring(0,r[1].length-1);"currency"===t&&0>a.indexOf(":")?n.currency||(n.currency=a.trim()):"relativetime"===t&&0>a.indexOf(":")?n.range||(n.range=a.trim()):a.split(";").forEach(e=>{if(e){let[t,...r]=e.split(":"),a=r.join(":").trim().replace(/^'+|'+$/g,""),o=t.trim();n[o]||(n[o]=a),"false"===a&&(n[o]=!1),"true"===a&&(n[o]=!0),isNaN(a)||(n[o]=parseInt(a,10))}})}return{formatName:t,formatOptions:n}})(t);if(this.formats[a]){let t=e;try{let i=r?.formatParams?.[r.interpolationkey]||{},s=i.locale||i.lng||r.locale||r.lng||n;t=this.formats[a](e,s,{...o,...r,...i})}catch(e){this.logger.warn(e)}return t}return this.logger.warn(`there was no format function for ${a}`),e},e)}}class aP extends ad{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=ac.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let a={},o={},i={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let i=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[i]=2:this.state[i]<0||(1===this.state[i]?void 0===o[i]&&(o[i]=!0):(this.state[i]=1,r=!1,void 0===o[i]&&(o[i]=!0),void 0===a[i]&&(a[i]=!0),void 0===s[t]&&(s[t]=!0)))}),r||(i[e]=!0)}),(Object.keys(a).length||Object.keys(o).length)&&this.queue.push({pending:o,pendingCount:Object.keys(o).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(a),pending:Object.keys(o),toLoadLanguages:Object.keys(i),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split("|"),a=r[0],o=r[1];t&&this.emit("failedLoading",a,o,t),!t&&n&&this.store.addResourceBundle(a,o,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let i={};this.queue.forEach(n=>{((e,t,n,r)=>{let{obj:a,k:o}=r8(e,t,Object);a[o]=a[o]||[],a[o].push(n)})(n.loaded,[a],o),void 0!==n.pending[e]&&(delete n.pending[e],n.pendingCount--),t&&n.errors.push(t),0!==n.pendingCount||n.done||(Object.keys(n.loaded).forEach(e=>{i[e]||(i[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{void 0===i[e][t]&&(i[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit("loaded",i),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,a=this.retryTimeout,o){if(!e.length)return o(null,{});if(this.readingCalls>=this.maxParallelReads)return void this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:a,callback:o});this.readingCalls++;let i=(i,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}i&&s&&r<this.maxRetries?setTimeout(()=>{this.read.call(this,e,t,n,r+1,2*a,o)},a):o(i,s)},s=this.backend[n].bind(this.backend);if(2===s.length){try{let n=s(e,t);n&&"function"==typeof n.then?n.then(e=>i(null,e)).catch(i):i(null,n)}catch(e){i(e)}return}return s(e,t,i)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),r&&r();r4(e)&&(e=this.languageUtils.toResolveHierarchy(e)),r4(t)&&(t=[t]);let a=this.queueLoad(e,t,n,r);if(!a.toLoad.length)return a.pending.length||r(),null;a.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=""){let n=e.split("|"),r=n[0],a=n[1];this.read(r,a,"read",void 0,void 0,(n,o)=>{n&&this.logger.warn(`${t}loading namespace ${a} for language ${r} failed`,n),!n&&o&&this.logger.log(`${t}loaded namespace ${a} for language ${r}`,o),this.loaded(e,n,o)})}saveMissing(e,t,n,r,a,o={},i=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t))return void this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");if(null!=n&&""!==n){if(this.backend?.create){let s={...o,isUpdate:a},l=this.backend.create.bind(this.backend);if(l.length<6)try{let a;(a=5===l.length?l(e,t,n,r,s):l(e,t,n,r))&&"function"==typeof a.then?a.then(e=>i(null,e)).catch(i):i(null,a)}catch(e){i(e)}else l(e,t,n,r,i,s)}e&&e[0]&&this.store.addResource(e[0],t,n,r)}}}let aT=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if("object"==typeof e[1]&&(t=e[1]),r4(e[1])&&(t.defaultValue=e[1]),r4(e[2])&&(t.tDescription=e[2]),"object"==typeof e[2]||"object"==typeof e[3]){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,format:e=>e,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),aR=e=>(r4(e.ns)&&(e.ns=[e.ns]),r4(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),r4(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs?.indexOf?.("cimode")<0&&(e.supportedLngs=e.supportedLngs.concat(["cimode"])),"boolean"==typeof e.initImmediate&&(e.initAsync=e.initImmediate),e),aN=()=>{};class aO extends ad{constructor(e={},t){if(super(),this.options=aR(e),this.services={},this.logger=ac,this.modules={external:[]},(e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{"function"==typeof e[t]&&(e[t]=e[t].bind(e))})})(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,"function"==typeof e&&(t=e,e={}),null==e.defaultNS&&e.ns&&(r4(e.ns)?e.defaultNS=e.ns:0>e.ns.indexOf("translation")&&(e.defaultNS=e.ns[0]));let n=aT();this.options={...n,...this.options,...aR(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},void 0!==e.keySeparator&&(this.options.userDefinedKeySeparator=e.keySeparator),void 0!==e.nsSeparator&&(this.options.userDefinedNsSeparator=e.nsSeparator);let r=e=>e?"function"==typeof e?new e:e:null;if(!this.options.isClone){let e;this.modules.logger?ac.init(r(this.modules.logger),this.options):ac.init(null,this.options),e=this.modules.formatter?this.modules.formatter:aC;let t=new ab(this.options);this.store=new am(this.options.resources,this.options);let a=this.services;a.logger=ac,a.resourceStore=this.store,a.languageUtils=t,a.pluralResolver=new aD(t,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==n.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),e&&(!this.options.interpolation.format||this.options.interpolation.format===n.interpolation.format)&&(a.formatter=r(e),a.formatter.init&&a.formatter.init(a,this.options),this.options.interpolation.format=a.formatter.format.bind(a.formatter)),a.interpolator=new a_(this.options),a.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},a.backendConnector=new aP(r(this.modules.backend),a.resourceStore,a,this.options),a.backendConnector.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(a.languageDetector=r(this.modules.languageDetector),a.languageDetector.init&&a.languageDetector.init(a,this.options.detection,this.options)),this.modules.i18nFormat&&(a.i18nFormat=r(this.modules.i18nFormat),a.i18nFormat.init&&a.i18nFormat.init(this)),this.translator=new av(this.services,this.options),this.translator.on("*",(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||(t=aN),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&"dev"!==e[0]&&(this.options.lng=e[0])}this.services.languageDetector||this.options.lng||this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let a=r2(),o=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),a.resolve(n),t(e,n)};if(this.languages&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?o():setTimeout(o,0),a}loadResources(e,t=aN){let n=t,r=r4(e)?e:this.language;if("function"==typeof e&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()==="cimode"&&(!this.options.preload||0===this.options.preload.length))return n();let e=[],t=t=>{t&&"cimode"!==t&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{"cimode"!==t&&0>e.indexOf(t)&&e.push(t)})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{e||this.resolvedLanguage||!this.language||this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=r2();return"function"==typeof e&&(n=e,e=void 0),"function"==typeof t&&(n=t,t=void 0),e||(e=this.languages),t||(t=this.options.ns),n||(n=aN),this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!e.type)throw Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return"backend"===e.type&&(this.modules.backend=e),("logger"===e.type||e.log&&e.warn&&e.error)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"i18nFormat"===e.type&&(this.modules.i18nFormat=e),"postProcessor"===e.type&&ap.addPostProcessor(e),"formatter"===e.type&&(this.modules.formatter=e),"3rdParty"===e.type&&this.modules.external.push(e),this}setResolvedLanguage(e){if(e&&this.languages&&!(["cimode","dev"].indexOf(e)>-1)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(!(["cimode","dev"].indexOf(t)>-1)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&0>this.languages.indexOf(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=r2();this.emit("languageChanging",e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},a=(a,o)=>{o?this.isLanguageChangingTo===e&&(r(o),this.translator.changeLanguage(o),this.isLanguageChangingTo=void 0,this.emit("languageChanged",o),this.logger.log("languageChanged",o)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(a,(...e)=>this.t(...e))},o=t=>{e||t||!this.services.languageDetector||(t=[]);let n=r4(t)?t:t&&t[0],o=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(r4(t)?[t]:t);o&&(this.language||r(o),this.translator.language||this.translator.changeLanguage(o),this.services.languageDetector?.cacheUserLanguage?.(o)),this.loadResources(o,e=>{a(e,o)})};return e||!this.services.languageDetector||this.services.languageDetector.async?!e&&this.services.languageDetector&&this.services.languageDetector.async?0===this.services.languageDetector.detect.length?this.services.languageDetector.detect().then(o):this.services.languageDetector.detect(o):o(e):o(this.services.languageDetector.detect()),n}getFixedT(e,t,n){let r=(e,t,...a)=>{let o,i;(o="object"!=typeof t?this.options.overloadTranslationOptionHandler([e,t].concat(a)):{...t}).lng=o.lng||r.lng,o.lngs=o.lngs||r.lngs,o.ns=o.ns||r.ns,""!==o.keyPrefix&&(o.keyPrefix=o.keyPrefix||n||r.keyPrefix);let s=this.options.keySeparator||".";return o.keyPrefix&&Array.isArray(e)?i=e.map(e=>("function"==typeof e&&(e=ah(e,{...this.options,...t})),`${o.keyPrefix}${s}${e}`)):("function"==typeof e&&(e=ah(e,{...this.options,...t})),i=o.keyPrefix?`${o.keyPrefix}${s}${e}`:e),this.t(i,o)};return r4(e)?r.lng=e:r.lngs=e,r.ns=t,r.keyPrefix=n,r}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=!!this.options&&this.options.fallbackLng,a=this.languages[this.languages.length-1];if("cimode"===n.toLowerCase())return!0;let o=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return -1===n||0===n||2===n};if(t.precheck){let e=t.precheck(this,o);if(void 0!==e)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||o(n,e)&&(!r||o(a,e)))}loadNamespaces(e,t){let n=r2();return this.options.ns?(r4(e)&&(e=[e]),e.forEach(e=>{0>this.options.ns.indexOf(e)&&this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=r2();r4(e)&&(e=[e]);let r=this.options.preload||[],a=e.filter(e=>0>r.indexOf(e)&&this.services.languageUtils.isSupportedCode(e));return a.length?(this.options.preload=r.concat(a),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||(e=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!e)return"rtl";try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch(e){}let t=this.services?.languageUtils||new ab(aT());return e.toLowerCase().indexOf("-latn")>1?"ltr":["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"].indexOf(t.getLanguagePartFromCode(e))>-1||e.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(e={},t){return new aO(e,t)}cloneInstance(e={},t=aN){let n=e.forkResourceStore;n&&delete e.forkResourceStore;let r={...this.options,...e,isClone:!0},a=new aO(r);return(void 0!==e.debug||void 0!==e.prefix)&&(a.logger=a.logger.clone(e)),["store","services","language"].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},n&&(a.store=new am(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),r),a.services.resourceStore=a.store),a.translator=new av(a.services,r),a.translator.on("*",(e,...t)=>{a.emit(e,...t)}),a.init(r,t),a.translator.options=r,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}let a$=aO.createInstance();a$.createInstance=aO.createInstance,a$.createInstance,a$.dir,a$.init,a$.loadResources,a$.reloadResources,a$.use,a$.changeLanguage,a$.getFixedT,a$.t,a$.exists,a$.setDefaultNamespace,a$.hasLoadedNamespace,a$.loadNamespaces,a$.loadLanguages;let aM=a$.default||a$;function aA(e,t,n,r){return aM.t(t,{ns:e,defaultValue:n,...r})}function aj(e,t,n){return r1[e]?aA("core",e,t??r1[e],n):(console.error(`O3 Core Translations does not provide key '${e}'. The key itself is being rendered as text.`),e)}function aI(e,t){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aL(e,{openmrsBase:window.openmrsBase,openmrsSpaBase:n,...t});return e.startsWith("//")?r:r.replace(/^\/\//,"/")}function aL(e,t){return Object.keys(t).reduce((e,n)=>e.split("${"+n+"}").join(t[n]),e)}function aF({to:e,templateParams:t}){let n=window.getOpenmrsSpaBase().replace(/\/$/,""),r=aI(e,t).replace(window.location.origin,""),a=new URL(r,window.location.origin);if("http:"!=a.protocol&&"https:"!=a.protocol)throw console.error(`Received request to navigate to non-http URL: ${a.toString()}`),Error(aj("navigateNonHttp"));r.startsWith(n)?rw(r):window.location.assign(r)}aM.on("initialized",function(){window.i18next.loadNamespaces(["core"])});let aB="openmrs:history";function aV(e){let t=JSON.parse(sessionStorage.getItem(aB)??"[]")||[];t.push(e),t.length>50&&(t=t.slice(-50)),sessionStorage.setItem(aB,JSON.stringify(t))}function aU(){0===JSON.parse(sessionStorage.getItem(aB)??"[]").length&&document.referrer&&aV(document.referrer),window.addEventListener("single-spa:routing-event",e=>{let t=aW();e.detail.originalEvent?.singleSpaTrigger=="replaceState"?(t[t.length-1]=window.location.href,sessionStorage.setItem(aB,JSON.stringify(t))):!e.detail.originalEvent?.singleSpa&&t.includes(window.location.href)?aH({toUrl:window.location.href}):t[t.length-1]!==window.location.href&&aV(window.location.href)})}function aW(){return JSON.parse(sessionStorage.getItem(aB)??"[]")}function aH({toUrl:e}){let t=aW(),n=t.lastIndexOf(e);if(-1!=n){let e=t.slice(0,n+1);aF({to:t[n]}),sessionStorage.setItem(aB,JSON.stringify(e))}else throw Error(`URL ${e} not found in history; cannot go back to it.`)}function az(){sessionStorage.removeItem(aB)}let aK="${openmrsSpaBase}/login",aG={redirectAuthFailure:{enabled:{_type:th.Boolean,_default:!0,_description:"Whether to redirect logged-out users to `redirectAuthFailure.url`"},url:{_type:th.String,_default:aK,_validators:[nx.isUrl],_description:"The url to which users will be redirected when they are logged out. If set to blank, the `location` header from the response will be used."},errors:{_type:th.Array,_default:[401],_elements:{_type:th.Number,_validators:[nx.inRange(100,600)]},_description:"The HTTP error codes for which users will be redirected"},resolvePromise:{_type:th.Boolean,_default:!1,_description:"Changes how requests that fail authentication are handled. Try messing with this if redirects to the login page aren't working correctly."}},followRedirects:{_type:th.Boolean,_default:!0,_description:"Whether openmrsFetch should support redirects returned from the backend"}};function aZ(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}let aY="/ws/rest/v1",aq="/ws/fhir2/R4",aJ=`${aY}/session`;function aX(e){return e&&e.startsWith("http")?e:("/"!==e[0]&&(e="/"+e),window.openmrsBase+e)}function aQ(e,t={}){if("string"!=typeof e)throw Error("The first argument to @openmrs/api's openmrsFetch function must be a url string");if("object"!=typeof t)throw Error("The second argument to @openmrs/api's openmrsFetch function must be a plain object.");if(!window.openmrsBase)throw Error("@openmrs/api is running in a browser that doesn't have window.openmrsBase, which is provided by openmrs-module-spa's HTML file.");let n=aX(e);t.headers||(t.headers={}),ed(t.body)&&(t.body=JSON.stringify(t.body)),void 0===t.headers.Accept&&(t.headers.Accept="application/json"),null===t.headers.Accept&&delete t.headers.Accept;let r=!1;try{let e=new URL(n,window.location.href),t=new URL(aX(aY),window.location.href),a=e.pathname.replace(/\/{2,}/g,"/"),o=t.pathname.replace(/\/{2,}/g,"/");r=e.origin===t.origin&&(a===o||a.startsWith(`${o}/`))}catch{}if(r){let e=!1;for(let[n,r]of Object.entries(t.headers))"disable-www-authenticate"===n.toLowerCase()&&(void 0===r?delete t.headers[n]:e=!0);e||(t.headers["Disable-WWW-Authenticate"]="true")}if(e.startsWith(aq)){let e=new URL(n,window.location.toString());e.searchParams.has("_summary")||(e.searchParams.set("_summary","data"),n=e.toString())}let a=Error();return window.fetch(n,t).then(async e=>{let{redirectAuthFailure:r,followRedirects:o}=await t3("@openmrs/esm-api");if(e.ok){let t=e.headers.get("location");return(o&&t&&(n===aX(aJ)||204===e.status)&&aF({to:t}),204===e.status)?(e.data=null,e):e.clone().text().then(t=>{try{t&&(e.data=JSON.parse(t))}catch(e){}return e})}return(n===aX(aJ)&&403===e.status||r.enabled&&r.errors.includes(e.status))&&(az(),aF({to:r.url||e.headers.get("location")||aK}),!0!==t.rejectAuthFailure)?r.resolvePromise?Promise.resolve():new Promise(()=>{}):e.clone().text().then(t=>{let r=t;try{r=JSON.parse(t)}catch(e){}throw new a0(n,e,r,a)},()=>{throw new a0(n,e,null,a)})})}class a0 extends Error{constructor(e,t,n,r){super(),aZ(this,"response",void 0),aZ(this,"responseBody",void 0),this.message=`Server responded with ${t.status} (${t.statusText}) for url ${e}. Check err.responseBody or network tab in dev tools for more info`,r.message=this.message,this.responseBody=n,this.response=t,this.stack=`Stacktrace for outgoing request:
13
13
  ${r.stack}
14
14
  Stacktrace for incoming response:
15
- ${this.stack}`}}let a1=B("session",{loaded:!1,session:null}),a4=0,a2=null;function a3(){return a2||(a1.getState().loaded&&a4>=Date.now()-6e4?null:a8())}function a6(e){let t=e?.includeAuthStatus??!0,n=e=>t?e:e.user;return a3()?new Promise(e=>{let t=a1.subscribe(r=>{r.loaded&&(t(),e(n(r.session)))})}):Promise.resolve(n(a1.getState().session))}function a5(){return a3(),a1}function a9(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function a8(e,t){a4=Date.now();let n={};e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let r=oo(aQ(aJ,{headers:n})),a=()=>{a2===r&&(a2=null)};return r.then(a,a),a2=r,r}function a7(){a1.setState({loaded:!0,session:{authenticated:!1,sessionId:""}})}function oe(e,t){var n,r;if(void 0===t)return!e;if(!e)return!0;return n=e,r=t,("string"==typeof n?!z(r.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!z(r.privileges.find(t=>e===t.display))):(z(n)||console.error(`Could not understand privileges "${n}"`),!0))||!z(t.roles.find(e=>"System Developer"===e.display))}function ot(){let e,t;return new Promise(n=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(a1.getState()),e||(t=a1.subscribe(r))})}async function on(){return(await a6()).sessionLocation}async function or(e,t){return oo(aQ(aJ,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},signal:t.signal}))}async function oa(e,t,n){return n||(n=new AbortController),await aQ(`${aY}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),a8()}function oo(e){return new Promise((t,n)=>{e.then(e=>{let r;"object"==typeof e?.data?(r={loaded:!0,session:e.data},a1.setState(r),t(r)):(r={loaded:!1,session:null},a1.setState(r),n(r))}).catch(e=>{C(`Failed to fetch new session information: ${e}`);let t={loaded:!1,session:null};a1.setState(t),n(t)})})}function oi(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}a1.subscribe(e=>{e.loaded&&e.session&&a9(e.session)});let os={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function ol(){tJ("@openmrs/esm-api",aG),a8()}let ou="import-map-override:",oc="import-map-overrides-disabled",od="import-map-overrides:change",om=!1,op=null,of=null;async function oh(){return of??(of=og().then(({map:e,complete:t})=>(t||(of=null),e))),of}async function og(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{if(a.src){let e=await fetch(a.src);if(!e.ok)throw Error(`Request for ${a.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else a.textContent&&t.push(JSON.parse(a.textContent))}catch(e){n=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${r}`,e)}}return{map:oy(t),complete:n}}function oy(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function ov(){let e={};try{let t=oE();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(ou)){let n=r.slice(ou.length);if(!t.includes(n)){let t=localStorage.getItem(r);t&&(e[n]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function ob(){let e=await oh();return om?oy([e,op??ov()]):e}async function ow(){return oh()}async function ox(){return om?oy([await oh(),ov()]):oh()}function oD(e){if(!om)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(ou)){let t=localStorage.getItem(n);t&&(e[n.slice(ou.length)]=t)}}return{imports:e}}return ov()}function oE(){if(!om)return[];try{let e=localStorage.getItem(oc);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function o_(e){return!!om&&oE().includes(e)}function oS(e,t){if(!om)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(ou+e,t),window.dispatchEvent(new CustomEvent(od))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function ok(e){if(!om)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(ou+e);let t=oE().filter(t=>t!==e);t.length>0?localStorage.setItem(oc,JSON.stringify(t)):localStorage.removeItem(oc),window.dispatchEvent(new CustomEvent(od))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oC(){if(!om)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(ou)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oc),window.dispatchEvent(new CustomEvent(od))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function oP(e){if(!om)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oE().filter(t=>t!==e);t.length>0?localStorage.setItem(oc,JSON.stringify(t)):localStorage.removeItem(oc),window.dispatchEvent(new CustomEvent(od))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oT=!1;function oR(){!oT&&(oT=!0,(om="development"===window.spaEnv)&&(op=ov()))}function oN(e){return e.replace(/[\/\-@]/g,"_")}async function oO(e,t="./start",r){var a;let o,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([o$(e,r?.importMap),new Promise((t,n)=>{o=setTimeout(()=>{var t;n(Error(`Could not resolve requested script, ${e}, within ${(t=i)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},i)})]),o&&clearTimeout(o);let s=oN(e),l=window[s];if(!("object"==typeof(a=l)&&null!==a&&"init"in a&&"function"==typeof a.init&&"get"in a&&"function"==typeof a.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(n.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function o$(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let n=oN(e);if(!window[n]){let n=t??await oM();if(!n.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let r=n.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let a=e in oD().imports;try{return await function(e){var t;let n=(t=window)[oA]??(t[oA]=new Map),r=n.get(e);if(r)return r;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let a=document.createElement("script");a.src=e,a.type="text/javascript",a.async=!0;let o=new Promise((t,r)=>{let o=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function i(){clearTimeout(o),a.removeEventListener("load",s),a.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),n.delete(e),a.remove();let o=`Failed to load script from ${e}`;console.error(o,t),r(t.message??o)}a.addEventListener("load",s),a.addEventListener("error",l),document.head.appendChild(a)});return n.set(e,o),o}(r)}catch(e){return a&&x({kind:"error",title:aj("scriptLoadingFailed","Error: Script failed to load"),description:aj("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:r}),actionButtonLabel:aj("resetOverrides","Reset overrides"),onActionButtonClick(){oC(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function oM(){return ob()}let oA=Symbol.for("__openmrs_script_loading");function oj(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function oI(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&oj(t))}let oL="openmrs-routes:",oF="openmrs-routes:change",oB=!1,oV=null,oU=null;async function oW(){return oU??(oU=oH().then(({map:e,complete:t})=>(t||(oU=null),e))),oU}async function oH(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{let e;if(a.src){let t=await fetch(a.src);if(!t.ok)throw Error(`Request for ${a.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else a.textContent&&(e=JSON.parse(a.textContent));e&&oI(e)&&t.push(e)}catch(e){n=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${r}`,e)}}return{map:oz(t),complete:n}}function oz(e){let t={routes:{}};for(let n of e)n&&"object"==typeof n&&!Array.isArray(n)&&(Object.assign(t.routes,n.routes),void 0===t.version&&void 0!==n.version&&(t.version=n.version));return t}async function oK(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n?.startsWith(oL)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(oL.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(oj(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(oj(r))return{moduleName:e,routes:r};throw Error(`${n} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===n.status?e.routes[n.value.moduleName]=n.value.routes:console.warn("[route-maps] Failed to load route override",n.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function oG(){let e=await oW();return oB?oz([e,oV??await oK()]):e}async function oZ(){return oW()}async function oY(){return oB?oz([await oW(),await oK()]):oW()}function oq(){if(!oB)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(oL)){let t=localStorage.getItem(n);t&&(e[n.slice(oL.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function oJ(e,t){if(!oB)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(oL+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!oj(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(oL+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(oL+e,JSON.stringify(t.toString()));else{if(!oj(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(oL+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(oF))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function oX(e){if(!oB)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(oL+e),window.dispatchEvent(new CustomEvent(oF))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function oQ(){if(!oB)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(oL)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(oF))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let o0=null;function o1(){return o0||(o0=(oB="development"===window.spaEnv)?oK().then(e=>{oV=e}):Promise.resolve())}let o4=`${aY}/attachment`;function o2(e,t){return aQ(`${o4}/${e}`,{signal:t.signal})}function o3(e,t,n,r){return aQ(o6(e,t,r),{signal:n.signal})}function o6(e,t,n){return n?`${o4}?patient=${e}&encounter=${n}`:`${o4}?patient=${e}&includeEncounterless=${t}`}async function o5(e,t,n){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),n&&r.append("encounter",n),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),aQ(`${o4}`,{method:"POST",body:r})}function o9(e,t){return aQ(`${o4}/${e}`,{method:"DELETE",signal:t.signal})}async function o8(e,t){return e?(await aQ(`${aq}/Patient/${e}`,t)).data:null}function o7(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function ie(e,t){let n=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}function it(e){return{uuid:e.uuid,display:e.display}}function ir(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return aQ(`${aY}/location${r?"?"+r:""}`).then(e=>e.data.results.map(it))}function ia(e){return{uuid:e.uuid,display:e.display,name:e.name}}let io=`${aY}/visittype`;function ii(e=io){return aQ(e).then(e=>e.data.results.map(ia))}var is=((X={}).NEWVISIT="startVisit",X.EDITVISIT="editVisit",X.LOADING="loadingVisit",X),il=((Q={}).NOTSTARTED="notStarted",Q.ONGOING="ongoing",Q);let iu="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",ic=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function id(){return U("visit",ic)}function im(e,t){id().setState({patientUuid:e,manuallySetVisitUuid:t})}function ip(e,t){return aQ(`${aY}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function ih(e,t,n){return aQ(`${aY}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function ig(e,t,n){return aQ(`${aY}/visit?patient=${e}&v=${n??iu}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}id().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class iy{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+iy.version}static addUnaryOp(e){return iy.max_unop_len=Math.max(e.length,iy.max_unop_len),iy.unary_ops[e]=1,iy}static addBinaryOp(e,t,n){return iy.max_binop_len=Math.max(e.length,iy.max_binop_len),iy.binary_ops[e]=t,n?iy.right_associative.add(e):iy.right_associative.delete(e),iy}static addIdentifierChar(e){return iy.additional_identifier_chars.add(e),iy}static addLiteral(e,t){return iy.literals[e]=t,iy}static removeUnaryOp(e){return delete iy.unary_ops[e],e.length===iy.max_unop_len&&(iy.max_unop_len=iy.getMaxKeyLen(iy.unary_ops)),iy}static removeAllUnaryOps(){return iy.unary_ops={},iy.max_unop_len=0,iy}static removeIdentifierChar(e){return iy.additional_identifier_chars.delete(e),iy}static removeBinaryOp(e){return delete iy.binary_ops[e],e.length===iy.max_binop_len&&(iy.max_binop_len=iy.getMaxKeyLen(iy.binary_ops)),iy.right_associative.delete(e),iy}static removeAllBinaryOps(){return iy.binary_ops={},iy.max_binop_len=0,iy}static removeLiteral(e){return delete iy.literals[e],iy}static removeAllLiterals(){return iy.literals={},iy}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new iy(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return iy.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!iy.binary_ops[String.fromCharCode(e)]||iy.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return iy.isIdentifierStart(e)||iy.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(iy.hooks[e]){let n={context:this,node:t};return iy.hooks.run(e,n),n.node}return t}searchHook(e){if(iy.hooks[e]){let t={context:this};return iy.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===iy.SPACE_CODE||e===iy.TAB_CODE||e===iy.LF_CODE||e===iy.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:iy.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===iy.SEMCOL_CODE||n===iy.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,iy.max_binop_len),t=e.length;for(;t>0;){if(iy.binary_ops.hasOwnProperty(e)&&(!iy.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!iy.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,a,o,i,s,l;if(!(o=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return o;for(a={value:t,prec:iy.binaryPrecedence(t),right_a:iy.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,i];t=this.gobbleBinaryOp();){if(0===(n=iy.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:iy.right_associative.has(t)},l=t;let s=e=>a.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&s(r[r.length-2]);)i=r.pop(),t=r.pop().value,o=r.pop(),e={type:iy.BINARY_EXP,operator:t,left:o,right:i},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(a,e)}for(s=r.length-1,e=r[s];s>1;)e={type:iy.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,iy.isDecimalDigit(e)||e===iy.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===iy.SQUOTE_CODE||e===iy.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===iy.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,iy.max_unop_len)).length;n>0;){if(iy.unary_ops.hasOwnProperty(t)&&(!iy.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!iy.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:iy.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}iy.isIdentifierStart(e)?(r=this.gobbleIdentifier(),iy.literals.hasOwnProperty(r.name)?r={type:iy.LITERAL,value:iy.literals[r.name],raw:r.name}:r.name===iy.this_str&&(r={type:iy.THIS_EXP})):e===iy.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===iy.PERIOD_CODE||t===iy.OBRACK_CODE||t===iy.OPAREN_CODE||t===iy.QUMARK_CODE;){let n;if(t===iy.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==iy.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===iy.OBRACK_CODE?((e={type:iy.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==iy.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===iy.OPAREN_CODE?e={type:iy.CALL_EXP,arguments:this.gobbleArguments(iy.CPAREN_CODE),callee:e}:(t===iy.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:iy.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;iy.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===iy.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);iy.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));iy.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);iy.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,iy.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===iy.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===iy.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:iy.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:iy.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(iy.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,iy.isIdentifierPart(e))this.index++;else break;return{type:iy.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let a=this.code;if(a===e){n=!0,this.index++,e===iy.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===iy.COMMA_CODE){if(this.index++,++r!==t.length){if(e===iy.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===iy.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==iy.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(iy.CPAREN_CODE);if(this.code===iy.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:iy.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:iy.ARRAY_EXP,elements:this.gobbleArguments(iy.CBRACK_CODE)}}}Object.assign(iy,{hooks:new class{add(e,t,n){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(iy),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),iy.max_unop_len=iy.getMaxKeyLen(iy.unary_ops),iy.max_binop_len=iy.getMaxKeyLen(iy.binary_ops);let iv=e=>new iy(e).parse(),ib=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(iy).filter(e=>!ib.includes(e)&&void 0===iv[e]).forEach(e=>{iv[e]=iy[e]}),iv.Jsep=iy,iv.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}});let iw="ArrowFunctionExpression",ix={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},iD={...ix,Promise};function iE(e,t={}){return iT(e,t,iO)}async function i_(e,t={}){return iR(e,t,iO)}function iS(e,t={}){return iT(e,t,i$)}function ik(e,t={}){return iR(e,t,i$)}function iC(e,t={}){return iT(e,t,iM)}function iP(e,t={}){return iR(e,t,iM)}function iT(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let r=iF(t,ix),a=iA("string"==typeof e?iv(e):e,r);if(n(a))return a;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function iR(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let r=iF(t,iD);return Promise.resolve(iA("string"==typeof e?iv(e):e,r)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function iN(e){return iv(e)}function iO(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function i$(e){return"boolean"==typeof e}function iM(e){return"number"==typeof e}function iA(e,t){switch(e.type){case"UnaryExpression":var n,r,a,o,i,s,l,u,c,d,m,p,f,h=e,g=t;let y=iA(h.argument,g);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,b=t;switch(v.operator){case"&&":return iA(v.left,b)&&iA(v.right,b);case"||":return iA(v.left,b)||iA(v.right,b);case"??":return iA(v.left,b)??iA(v.right,b)}let w=iA(v.left,b),x=iA(v.right,b);switch(v.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return n=e,r=t,iA(n.test,r)?iA(n.consequent,r):iA(n.alternate,r);case"CallExpression":return iU(iI(e,t));case"ArrowFunctionExpression":let D;return a=e,o=t,D=a.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<D.length)throw`Required argument(s) ${D.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(D.reduce((t,n,r)=>{let a=e[r];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(a)&&t.push([n,a]),t},[]));return iA(a.body,o.addVariables(t))}).bind(null);case"MemberExpression":return iU(iL(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(iW(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(iW(u)))[E.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(iW(S));switch(_.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${_.callee.name}`}}if(_.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(iH(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let k,C;return m=e,p=t,k=m.expressions?.map(iW(p))??[],(C=m.quasis?.map(iW(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+k.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function ij(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return ij(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function iI(e,t){let n=iV(e.callee,t);if(n===iB||e.optional&&null==n)return iB;let r=e.arguments?.map(iW(t));if(n){if("function"!=typeof n)throw`${iG(e.callee)} is not a function`}else throw`No function named ${iG(e.callee)} is defined in this context`;return n(...r)}function iL(e,t){let n=iV(e.object,t);if(n===iB||e.optional&&null==n)return iB;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${iK(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=ij(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${iK(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof n&&"function"!=typeof n&&"string"!=typeof n&&"number"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;let r=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(iA(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);iH(r),function(e,t){if(iz.has(String(t)))return;let n=Object(e);for(;null!==n;){if(Object.hasOwn(n,t)){if(n===Object.prototype||n===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}n=Object.getPrototypeOf(n)}}(n,r);let a=n[r];return"function"==typeof a?a.bind(n):a}function iF(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}iv.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:iw,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=iw,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),iv.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),iv.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(t){let n=this.index,r="",a=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};a(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),a());let o=this.char;("e"===o||"E"===o)&&(r+=this.expr.charAt(this.index++),("+"===(o=this.char)||"-"===o)&&(r+=this.expr.charAt(this.index++)),a(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(i===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:r},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var a,o,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;a=this.code,o=u,95===a||o.some(([e,t])=>a>=e&&a<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,n.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(c,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,r)})}}),iv.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,a=this.expr.slice(n,this.index),o="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)o+=this.char;else break}try{r=new RegExp(a,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),iv.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),iv.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},r="",a="",o=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:a,cooked:r},tail:o});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,o=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),a="",r="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(a+=i,i=this.expr.charAt(++this.index),a+=i,i){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=i}else r+=i,a+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),iv.addBinaryOp("in",7),iv.addBinaryOp("??",1);let iB=Symbol("optional chain short-circuited");function iV(e,t){switch(e.type){case"MemberExpression":return iL(e,t);case"CallExpression":return iI(e,t);default:return iA(e,t)}}function iU(e){return e===iB?void 0:e}function iW(e){return function(t){return null===t?null:iA(t,e)}}function iH(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let iz=new Set(["toString","valueOf","hasOwnProperty"]);function iK(e,t){try{return ij(e,t)}catch{return"<computed>"}}function iG(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function iZ(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...iD},isLocalExpression:!1,variables:new Set};return iY("string"==typeof e?iv(e):e,t),[...t.variables]}function iY(e,t){switch(e.type){case"UnaryExpression":return r=e,a=t,iY(r.argument,a);case"BinaryExpression":return o=e,i=t,[iY(o.left,i),iY(o.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[iY(s.consequent,l),iY(s.test,l),iY(s.alternate,l)].filter(Boolean);case"CallExpression":let n;return u=e,c=t,n=iY(u.callee,c),u.arguments?.map(iq(c)),n;case"ArrowFunctionExpression":var r,a,o,i,s,l,u,c,d,m,p,f,h,g,y,v,b=e,w=t;let x={...w};x.isLocalExpression=!0;let D=b.params?.map(iq(x))??[],E=iY(b.body,x)??[];if(E&&Array.isArray(E))for(let e of E)D.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(iY(_.object,S),_.computed)return void iY(_.property,S);let k={...S};k.isLocalExpression=!0,iY(_.property,k);return;case"ArrayExpression":return d=e,m=t,void d.elements?.map(iq(m));case"SequenceExpression":return p=e,f=t,void p.expressions?.map(iq(f));case"NewExpression":return h=e,g=t,void h.arguments?.map(iq(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,P=t;if(!(C.name in P.globals))if(P.isLocalExpression)return C.name;else P.variables.add(C.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(iq(v)),y.quasis?.map(iq(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function iq(e){return function(t){return null===t?null:iY(t,e)}}let iJ=U("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()});function iX(e,t,n){iJ.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function iQ(){let e=iJ.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function i0(e){return iJ.getState().flags[e].enabled}function i1(e,t){iJ.subscribe(n=>{t(n.flags[e].enabled)})}function i4(e,t){iJ.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}iJ.subscribe(e=>{for(let[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))});var i2=eW(function(e,t,n){eO(e,t,n)});let i3=B("extensionsInternal",{slots:{},extensions:{}}),i6=B("extensionRenderings",{renderings:new Map}),i5=()=>U("extensionsInternal",{slots:{},extensions:{}}),i9=()=>U("extensionRenderings",{renderings:new Map});function i8(e){let t=i3.getState(),n=e(t);n!==t&&i3.setState(n)}let i7=null,se=null;function st(){let e=i6.getState();return i7&&e===se||(i7=new Map(e.renderings),se=e,function(e){for(let t of(sd.clear(),e.values()))sp(t,1);sm=!0}(i7)),i7}function sn(e){se={renderings:e},i6.setState(se,!0)}function sr(e){let t=st();t.has(e.renderingId)||(t.set(e.renderingId,e),sp(e,1),sn(t))}function sa(e){let t=st(),n=t.get(e);n&&(t.delete(e),sp(n,-1),sn(t))}let so=()=>U("extensions",{slots:{}}),si=0,ss=new Set;function sl(e){si++;try{return e()}finally{if(0==--si&&ss.size>0){let e=Array.from(ss);for(let t of(ss.clear(),e))su(t)}}}function su(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function sc(e){si>0?ss.add(e):su(e)}let sd=new Map,sm=!1;function sp(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=sd.get(n);if(!r){if(t<0)return;sd.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),sm=!0;return}r.count+=t,r.count<1&&(sd.delete(n),sm=!0)}function sf(){var e,t;if(st(),!sm)return;sm=!1;let n=Array.from(sd.values(),({record:e})=>e);n.sort(sh),e=tS.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===sh(e,t[n]))||tS.setState({mountedExtensions:n})}function sh(e,t){return sg(e.slotName,t.slotName)||sg(e.extensionId,t.extensionId)||sg(e.slotModuleName,t.slotModuleName)||sg(e.extensionModuleName,t.extensionModuleName)}function sg(e,t){return e===t?0:e<t?-1:1}sf(),i6.subscribe(()=>sc(sf));let sy=i5(),sv=so(),sb=tC(),sw=tR(),sx=new Set,sD=!1;function sE(e){if(null===e)sx=null;else if(null!==sx)for(let t of e)sx.add(t);sc(s_)}function s_(){if(!sD){sD=!0;try{for(let e=1;;e++){let t=sx;if(null!==t&&0===t.size)return;sx=new Set;try{!function(e,t,n,r,a,o=null){let i=sv.getState().slots,s={},l=!1,u=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,c]of Object.entries(e.slots)){let d=i[r];if(d&&o&&!o.has(r)){s[r]=d;continue}let{config:m}=tT(t,c.name),p=function(e,t,n,r,a,o){let i=function(e,t){let n=e.add||[],r=e.remove||[],a=e.order||[],{extensions:o}=sy.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>sM(e,a,o[sC(e)]?.order,t)-sM(n,a,o[sC(n)]?.order,t))}(n,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=tO(r,e,l),u=t$(n,e,l),c=u?i2({},i,u):i,d=sC(l),m=t.extensions[d];if(m){let e=c?.["Display conditions"]?.privileges??m.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!o?.user||!oe(e,o.user))||m.featureFlag&&!a.includes(m.featureFlag))continue;s.push({id:l,name:d,moduleName:m.moduleName,config:c,featureFlag:m.featureFlag,meta:m.meta,displayConditionExpression:c?.["Display conditions"]?.expression||m.displayExpression})}}return s}(r,e,m,n,u,a.session);d&&d.moduleName===c.moduleName&&(0,ez.A)(d.candidateExtensions,p)?s[r]=d:(s[r]={moduleName:c.moduleName,candidateExtensions:p},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&sv.setState({slots:s})}(sy.getState(),sb.getState(),sw.getState(),iJ.getState(),a1.getState(),t)}catch(e){throw sx=null===t||null===sx?null:new Set([...t,...sx]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{sD=!1}}}function sS(e,t){let n=new Set;for(let r of Object.keys(e))e[r]!==t[r]&&n.add(r);for(let r of Object.keys(t))r in e||n.add(r);return n}function sk(e,t){return{moduleName:t,name:e,attachedIds:[]}}function sC(e){let[t]=e.split("#");return t}function sP(e,t){let n=sC(t);return e.extensions[n]}function sT(e){return sP(sy.getState(),e)}sy.subscribe((e,t)=>{sE(e.extensions!==t.extensions?null:sS(e.slots,t.slots))}),sb.subscribe((e,t)=>{sE(sS(e.slots,t.slots))}),sw.subscribe((e,t)=>{sE(sS(e.configs,t.configs))}),iJ.subscribe(()=>sE(null)),a1.subscribe(()=>sE(null)),sE(null);let sR=e=>i8(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function sN(e,t){i8(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...sk(e),attachedIds:[t]}}}})}function sO(e,t){i8(n=>{let r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function s$(e){i8(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function sM(e,t,n,r){let a=t.indexOf(e);if(-1!==a)return a;{if(void 0!==n)return 1e3+n;let t=r.indexOf(e);return -1!==t?2e3+t:3e3}}function sA(e,t){return function(e,t,n=null,r){let a;return e.filter(e=>{let o=e.displayConditionExpression;if("string"!=typeof o||0===o.trim().length)return!0;a??(a=t&&"object"==typeof t?{session:n,...t}:{session:n});try{return!!iS(o,a)}catch(t){return console.error(`Error while evaluating expression '${o}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(sj(e),t,a1.getState().session,e)}function sj(e){return sv.getState().slots[e]?.candidateExtensions??[]}let sI=(e,t)=>sy.setState(n=>{let r=n.slots[t]?.moduleName;if(r&&r!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let a=sk(t,e);return{...n,slots:{...n.slots,[t]:{...a}}}}),sL=()=>{sx=null,i8(()=>({slots:{},extensions:{}})),i9().setState({renderings:new Map}),sv.setState({slots:{}})},sF=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function sB({name:e,basePath:t,mode:n,componentContext:r,state:a}){sF.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:a})}function sV(e){sF.getState().slotName===e&&sF.setState(sF.getInitialState(),!0)}let sU=B("modalRegistry",{modals:{}});function sW(e){sU.setState(t=>(t.modals[e.name]=e,t))}function sH(e){let t=sU.getState().modals[e];if(!t){let n=sT(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),sW(t))}return t}let sz=B("workspaceRegistrations",{workspaces:{}}),sK=B("workspaceGroups",{workspaceGroups:{}});function sG(e){sz.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function sZ(e){sK.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let sY=new Set;function sq(e){let t=sz.getState().workspaces;if(t[e])return t[e];{let t=sT(e);if(t){var n;let r;return sY.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),sY.add(e)),{name:t.name,title:(n=t,"string"==typeof(r=n?.meta?.title)?r:r&&"object"==typeof r?aA(n.moduleName,r.key,r.default):n.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function sJ(e){let t=sK.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let sX=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function sQ(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=sX.getState(),r=t[e];if(r){let t=n[r.window];if(t)return t;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function s0(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=sX.getState(),r=n[e];if(r){let n=t[r.group];if(n)return n;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function s1(e){let{openedWindows:t}=sX.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function s4(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=sX.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}sX.setState({registeredGroupsByName:r})}function s2(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=sX.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace window ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}sX.setState({registeredWindowsByName:r})}function s3(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=sX.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}sX.setState({registeredWorkspacesByName:r})}let s6=0,s5=null,s9={bootstrap:15e3,mount:15e3,unmount:15e3};function s8(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(s9).filter(t=>e[t]).map(r=>{var a,o;let i,s;return[r,(a=e[r],o=s9[r],i=Array.isArray(a)?a:[a],s=e=>i.reduce((t,a,o)=>t.then(()=>{let t=a(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${r} at array index ${o} for parcel ${n} did not return a promise`))}),Promise.resolve(void 0)),e=>{let a,i=new Promise((e,t)=>{a=setTimeout(()=>t(Error(`Lifecycle function ${r} for parcel ${n} did not settle within ${o}ms`)),o)});return Promise.race([s(e),i]).finally(()=>clearTimeout(a)).then(e=>(t(r,!1),e),e=>{throw t(r,!0),e})})]}));return{...e,...r}}async function s7(e,t){var n,r;let a,o,i,s,l,u=await (s5??(s5=new Promise((e,t)=>{ro({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),ro))),s5),c={...t},d=(a=c,o=!1,{retarget:e=>a={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(a),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":o||(o=t);return;case"unmount":(t||o)&&i();return}}});return r=u((n=d.onSettled,"function"==typeof e?()=>e().then(e=>s8(e,n)):s8(e,n)),c),s=e=>t=>e.call(r,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===r.getStatus()&&d.release(),e}),l=r.update&&s(r.update),Object.defineProperty(r,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function le(){return lt}function lt(e,t){let n,r=s7(e,t).then(e=>n=e);return{mount:()=>r.then(e=>e.mount()),unmount:()=>r.then(e=>e.unmount()),update:e=>r.then(t=>t.update?.(e)),getStatus:()=>n?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return r.then(e=>e.loadPromise)},get bootstrapPromise(){return r.then(e=>e.bootstrapPromise)},get mountPromise(){return r.then(e=>e.mountPromise)},get unmountPromise(){return r.then(e=>e.unmountPromise)}}}async function ln(e,t,n,r,a=e=>e,o={}){let i=sC(r),s=sT(r),l=null;if(e){let u;if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${t}'`);let{meta:c,moduleName:d,load:m}=s,p=s6++,f=`${t}/${r}-${p}`;e.dataset.extensionRenderingId=f;let h=e=>{try{sa(f)}catch(t){console.error(e,t)}};try{sr({renderingId:f,extensionName:i,extensionModuleName:d,extensionId:r,slotName:t,slotModuleName:n})}catch(e){throw h(`Recomputing configuration after registering '${r}' failed also failed`),e}try{u=await m()}catch(e){throw h(`Recomputing configuration after '${r}' failed to load also failed`),e}try{l=await s7(a({...u,name:`${t}/${i}-${p}`}),{...o,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${r}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${r}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${r}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${r}' failed`),e=>{console.error(`Extension '${r}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${r}' failed to unmount also failed`)})}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return l}var lr=n(5399),la=n.n(lr);let lo=(0,lr.createContext)({moduleName:"",featureName:""});function li({to:e,templateParams:t,onBeforeNavigate:n,children:r,...a}){return(0,lr.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),la().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),aF({to:e,templateParams:t})),0===r.button&&(r.ctrlKey||r.metaKey)&&n?.(r),0===r.button&&r.shiftKey&&n?.(r),1===r.button&&n?.(r)},href:aI(e,t),...a},r)}let ls=({state:e,children:t,...n})=>{let{extension:r}=(0,lr.useContext)(lo),a=(0,lr.useRef)(null),o=(0,lr.useRef)(Promise.resolve()),i=(0,lr.useRef)(!1),s=(0,lr.useRef)(!1),l=(0,lr.useRef)(e),u=(0,lr.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":o.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,lr.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(o.current=Promise.all([e.mountPromise,o.current]).then(()=>{if(a.current?.getStatus()==="MOUNTED"&&a.current.update)return a.current.update({...t})}).catch(e=>{let t=a.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${r?.extensionId}' failed to update`,e)}))},[]),d=(0,lr.useCallback)(t=>{t&&!a.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,ln(t,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(t=>{(s.current=!1,a.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,lr.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(a.current)}),[]),(0,lr.useEffect)(()=>{l.current=e,a.current&&c(a.current,e)},[e]),r?la().createElement("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function ll(e){let t=(0,lr.useRef)(e);return R(t.current,e)||(t.current=e),t.current}function lu(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[r,a]of Object.entries(t)){let t=function(...t){e.setState(e=>a(e,...t))};n[r]=t}return n}let lc=e=>e;function ld(e,t=lc,n){let r=(0,lr.useCallback)(t=>e.subscribe(t),[e]),a=(0,lr.useCallback)(()=>t(e.getState()),[e,t]),o=(0,lr.useSyncExternalStore)(r,a,a),i=(0,lr.useMemo)(()=>n?lu(e,n):null,[e,n]);return(0,lr.useMemo)(()=>i?{...o,...i}:o,[o,i])}function lm(e,t){return ld(e,lc,t)}function lp(e){return function(t){let n=(0,lr.useCallback)(t=>e.subscribe(t),[]),r=(0,lr.useCallback)(()=>e.getState(),[]),a=(0,lr.useSyncExternalStore)(n,r,r),o=(0,lr.useMemo)(()=>t?lu(e,t):null,[t]);return(0,lr.useMemo)(()=>o?{...a,...o}:a,[a,o])}}let lf=[];Object.freeze(lf);let lh={candidateExtensions:lf};Object.freeze(lh);let lg=e=>{let t=(0,lr.useCallback)(t=>t.slots?.[e]??lh,[e]);return ld(so(),t)},ly=e=>e.session;function lv(e,t){let{candidateExtensions:n}=lg(e),r=ld(a1,ly),a=ll(t);return(0,lr.useMemo)(()=>sA(e,a),[e,a,r,n])}function lb(e,t){let{moduleName:n}=(0,lr.useContext)(lo);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,lr.useEffect)(()=>{sI(n,e)},[n,e]),{extensions:lv(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function lw(e){return e}function lx({name:e,extensionSlotName:t,select:n=lw,children:r,state:a,style:o,...i}){if(r&&a)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,lr.useRef)(null),{extensions:u,extensionSlotModuleName:c}=lb(s,a),d=(0,lr.useMemo)(()=>n(u),[n,u]),m=(0,lr.useMemo)(()=>{if("function"==typeof r&&!la().isValidElement(r))return d.map(e=>r(e,a))},[r,d]);return la().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...o,position:"relative"},...i},s&&d?.map((e,t)=>la().createElement(lo.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},m?.[t]??("function"!=typeof r?r:null)??la().createElement(ls,{state:a}))))}var lD=n(5873);function lE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function l_(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lE(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],a in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lE(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lS(e){return(lS="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lk(e){return(lk="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lC(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(lk(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(lk(e)));return e}}var lP=null;try{lP=require("react").createContext()}catch(e){}var lT={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function lR(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function lN(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var a,o=lA(e,t,function(){n(this)}),i=lC(e,t)(),s=function(e){var t=e.reactDom,n=e.renderType,r=e.elementToRender,a=e.domElement,o=t[n];if("function"!=typeof o)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(a);return i.render(r),i;case"hydrateRoot":return o(a,r);default:return o(r,a),null}}({elementToRender:o,domElement:i,reactDom:lM(e),renderType:"function"==typeof(a=e).renderType?a.renderType():a.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function lO(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():lM(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function l$(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=lA(e,t,null),a=e.renderResults[t.name];if(a&&a.render)a.render(r);else{var o=lC(e,t)();lM(e).render(r,o)}})}function lM(e){return e.ReactDOMClient||e.ReactDOM}function lA(e,t,n){var r=e.React.createElement(e.rootComponent,t),a=lP?e.React.createElement(lP.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),a=e.React.createElement(e.errorBoundaryClass,t,a)),a=e.React.createElement(e.SingleSpaRoot,l_(l_({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),a)}var lj=n(7807),lI=n(1619),lL=n.n(lI),lF=n(3432);let lB={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},lV=new Map;(0,lF.initCache)(lV);let lU={errorRetryCount:3,fetcher:aQ,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof a0){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>lV};function lW(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},lB,e),n={...lU,...t.swrConfig};return function(e){var r,a,o,i,s;return o=a=class extends(r=la().Component){componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return la().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=la().createElement(lr.Suspense,{fallback:null},la().createElement(lI.SWRConfig,{value:n},la().createElement(lo.Provider,{value:this.state.config},t.disableTranslations?la().createElement(e,this.props):la().createElement(lj.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},la().createElement(e,this.props)))));return t.strictMode&&la().StrictMode?la().createElement(la().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${t.featureName})`,i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,a}}function lH(e,t){return function(e){if("object"!==lS(e))throw Error("single-spa-react requires a configuration object");var t,n=l_(l_({},lT),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!lP&&n.React.createContext&&(lP=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:lR.bind(null,n),mount:lN.bind(null,n),unmount:lO.bind(null,n)};return n.parcelCanUpdate&&(r.update=l$.bind(null,n)),r}({React:la(),ReactDOMClient:lD,rootComponent:lW(t)(e)})}function lz(e,t){return()=>e().then(({default:e})=>lH(e,t))}function lK(e,t){return()=>Promise.resolve(lH(e,t))}let lG=lz,lZ=M()(()=>({}));V("openmrs-app-context",lZ);let lY={};function lq(e,t=e=>e){let n=lZ.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function lJ(e,t){lZ.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function lX(e){return null===e?null:Object.freeze(Object.assign({},e))}let lQ=new Map;function l0(e,t){let n=(0,lr.useRef)(t??{}),r=(0,lr.useRef)(t=>lJ(e,t)),a=(0,lr.useRef)(Symbol());return(0,lr.useEffect)(()=>{let n=t??{},r=a.current;return null===lq(e)?!function(e,t=lY){lZ.setState(n=>{if(e in n)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===lY?{}:t})})}(e,n):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),lJ(e,()=>n)),lQ.set(e,r),()=>{lQ.get(e)===r&&(lZ.setState(t=>(e in t&&delete t[e],t)),lQ.delete(e))}},[e]),(0,lr.useEffect)(()=>{let r=t??{};R(n.current,r)||(lJ(e,()=>r),n.current=r)},[t]),r.current}function l1({namespace:e,value:t}){return l0(e,t),null}let l4=({children:e,value:t,fallback:n})=>t?la().createElement(la().Fragment,null,e):n?la().createElement(la().Fragment,null,n):null;function l2(){let e=(0,lr.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,lr.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function l3(e,t=e=>e??{}){let[n,r]=(0,lr.useState)(()=>{if(l6(e))return;let n=lq(e);if(null!==n)return t?t(n):n});return(0,lr.useEffect)(()=>{if(l6(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,lr.useEffect)(()=>{var n;let a;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>R(e,n)?e:n)})(lX(a=lq(e))),lZ.subscribe(t=>{let r=e in t?t[e]:null;r!==a&&(a=r,n(lX(r)))})},[e,t]),n}function l6(e){return"string"!=typeof e||0===e.trim().length}function l5(e){let t=lv(e);return(0,lr.useMemo)(()=>t.map(e=>e.id),[t])}function l9(e){return lg(e).candidateExtensions}function l8(e,t,n){let{data:r,error:a,mutate:o,isLoading:i,isValidating:s}=lL()(e?o6(e,t,n):null,aQ);return(0,lr.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:a,mutate:o,isValidating:s}),[r,a,i,s,o])}function l7(e){(0,lr.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let ue={},ut=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
- Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function un(e){let{moduleName:t,extension:n}=(0,lr.useContext)(lo),r=e?.externalModuleName??t;if(!r&&!n)throw Error(ut);let a=function(e){let t=(0,lr.useMemo)(()=>tk(e),[e]),n=function(e){let[t,n]=(0,lr.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,lr.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw ue[e]||(ue[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),ue[e];return n}(r),o=function(e){let t=(0,lr.useMemo)(tR,[]),n=function(e,t){let[n,r]=(0,lr.useState)(t?()=>{let n=tO(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,lr.useEffect)(()=>{if(t)return e.subscribe(e=>{let a=tO(e,t.extensionSlotName,t.extensionId);a.loaded&&a.config&&!(0,ez.A)(a.config,n)&&r(a.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!ue[n]&&t&&(ue[n]=new Promise(n=>{let r=t.subscribe(t=>{let a=tO(t,e.extensionSlotName,e.extensionId);a.loaded&&a.config&&(n(a.config),r())})})),ue[n]}return n||{}}(n);return(0,lr.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...a}:{...a,...o},[r,e?.externalModuleName,a,o])}let ur=lv;function ua(e,t=300){let[n,r]=(0,lr.useState)(e);return(0,lr.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var uo=n(3660),ui=n.n(uo);let us=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function ul(){let e=`${aY}/emrapi/configuration?v=${us}`,t=ui()(e,aQ);return(0,lr.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function uu(){return(0,lr.useContext)(lo).extension}let uc=lp(i5());function ud(e){let t=lv(e);return(0,lr.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let um=lp(so());function up(e){let{flags:t}=ld(iJ);return t[e]?.enabled??!1}function uf(){let[,e]=(0,lr.useState)(0);return(0,lr.useCallback)(()=>{e(e=>e+1)},[])}function uh(e,t,n={}){return uy(e,t,ug,n)}let ug={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(aX(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function uy(e,t,n,r={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:i,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??aQ,[d,m]=(0,lr.useState)(1),p=(0,lr.useRef)(NaN),f=(0,lr.useRef)(NaN),h=(0,lr.useRef)(d),g=(0,lr.useRef)(!1),y=(0,lr.useRef)(!1),v=e?.toString()??"",[b,w]=(0,lr.useState)(v);v!==b&&(w(v),m(1),h.current=1,p.current=NaN,f.current=NaN,g.current=!1,y.current=!1);let x=(d-1)*t,D=(0,lr.useMemo)(()=>a(e,t,x),[e,t,x]),{data:E,..._}=(l?ui():lL())(D,c,u);E?.data&&(p.current=o(E?.data),f.current=i(E?.data),g.current=!0);let S=Math.ceil(p.current/t),k=(0,lr.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let n=Math.ceil(p.current/t);!g.current||Number.isNaN(n)||e<=n?(h.current=e,m(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,lr.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(p.current)){y.current||(y.current=!0,console.warn(`useServerPagination: ${v} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),h.current=e,m(e))},[d,t,v,E]);let C=(0,lr.useCallback)(()=>{k(h.current+1)},[k]),P=(0,lr.useCallback)(()=>{k(h.current-1)},[k]);return{data:s(E?.data),totalPages:S,totalCount:p.current,currentPage:d,currentPageSize:f.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:k,goToNext:C,goToPrevious:P,..._}}function uv(e,t,n={}){return uy(e,t,ub(),n)}function ub(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(aX(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var uw=n(682),ux=n.n(uw);function uD(e,t={}){return uE(e,ug,t)}function uE(e,t,n={}){let{swrInfiniteConfig:r,immutable:a}=n,{getNextUrl:o,getTotalCount:i,getData:s}=t,l=n.fetcher??aQ,u=(0,lr.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:m,...p}=ux()(u,l,{...r,...a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),f=o(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=f,loadMore:()=>{m((c?.length??0)+1)},nextUri:f,...p}}function u_(e,t={}){return uS(e,ug,t)}function uS(e,t,n={}){let r=uE(e,t,n),{hasMore:a,error:o,data:i,loadMore:s,isLoading:l,nextUri:u}=r;return((0,lr.useEffect)(()=>{a&&!o&&s()},[a,u]),n.partialData)?r:{...r,data:a||o?void 0:i,isLoading:l||a}}function uk(e,t={}){return uS(e,ub(),t)}function uC(e,t={}){return uE(e,ub(),t)}function uP(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function uT(){let[e,t]=(0,lr.useState)(uP);return(0,lr.useEffect)(()=>{let e=()=>{t(uP())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let uR=e=>"small-desktop"===e||"large-desktop"===e;function uN(e){let t=(0,lr.useContext)(lo);(0,lr.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),sB(e),()=>{sV(e.name)}),[t,e])}function uO(){return ld(sF)}let u$=[];function uM(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString(),{data:a}=u_(`${aY}/location${r?"?"+r:""}`,{immutable:!0});return a??u$}function uA(e,t=!0){let n=(0,lr.useRef)(null);return(0,lr.useEffect)(()=>{let r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}function uj(e){let t=(0,lr.useRef)();return(0,lr.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function uI(e,t={}){let{abortController:n,fetchInit:r,url:a,swrConfig:o}=t,i=l2(),s=(0,lr.useMemo)(()=>r?.signal??n?.signal??i.signal,[n?.signal,r?.signal,i.signal]),l=(0,lr.useCallback)(e=>aQ(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,a),{...r,signal:s}),[s,r,a]);return lL()(e,l,o)}function uL(e=[],t=10){let[n,r]=(0,lr.useState)(1),a=(0,lr.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);n>a&&r(a);let o=Math.min(Math.max(1,n),a),i=(0,lr.useMemo)(()=>{let n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)},[e,o,t]),s=(0,lr.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,lr.useCallback)(()=>{r(e=>e+1)},[]),u=(0,lr.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,lr.useMemo)(()=>({results:i,totalPages:a,currentPage:o,paginated:e.length>t,showNextButton:o<a,showPreviousButton:o>1,goTo:s,goToNext:l,goToPrevious:u}),[i,a,e.length,t,o,s,l,u])}function uF(e,t,n,r){return{pageSizes:(0,lr.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,lr.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function uB(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function uV(e){let[t,n]=(0,lr.useState)(e??uB()),{data:r,error:a,isValidating:o}=lL()(t?["patient",t]:null,()=>o8(t,{}));return(0,lr.useEffect)(()=>{let e=()=>{let e=uB();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,lr.useMemo)(()=>({isLoading:o&&!a&&!r,patient:r,patientUuid:t,error:a}),[o,a,r,t])}function uU(){let e=`${aY}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=lL()(e,aQ);return(0,lr.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function uW(e){let{extensions:t,extensionSlotModuleName:n}=lb(e);return e?t.map(t=>({state:r})=>la().createElement(lo.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n,extensionMeta:t.meta}}},la().createElement(ls,{state:r}))):[]}function uH(){let e=(0,lr.useRef)(),[t,n]=(0,lr.useState)(null),r=null;if(!t){if(o){let e=a5().getState();e.loaded&&(r=e.session)}else o=new Promise(t=>{let n=({loaded:n,session:a})=>{n&&(t(a),r=a,e.current&&(e.current(),e.current=void 0))};n(a5().getState()),r||(e.current=a5().subscribe(n))});if(r)n(r);else throw o}(0,lr.useEffect)(()=>(e.current||(e.current=a5().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let a=t||r;if(!a)if(o)throw console.warn("useSession is in an unexpected state. Attempting to recover."),o;else throw Error("useSession is in an invalid state.");return a}let uz=({privilege:e,fallback:t,children:n})=>{let[r,a]=(0,lr.useState)(null);return((0,lr.useEffect)(()=>{let e=a5(),t=e.subscribe(({loaded:e,session:t})=>{a(e?t?.user??null:null)}),{loaded:n,session:r}=e.getState();return n&&a(r?.user??null),t},[]),r&&oe(e,r))?la().createElement(la().Fragment,null,n):t?la().createElement(la().Fragment,null,t):null};var uK=n(222),uG=n.n(uK),uZ=n(5602);let uY=new Map;function uq(){for(let e of Array.from(uY.values()))e()}let uJ={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function uX(e){let t=(0,lr.useId)();return(0,lr.useEffect)(()=>{if(e)return uY.set(t,e),()=>{uY.delete(t)}},[t,e]),{...lm(id(),uJ),mutateVisit:uq}}function uQ(e,t=iu){let n=(0,lr.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:a,setVisitContext:o}=uX((0,lr.useCallback)(()=>n.current?.(),[])),i=e&&r==e?a:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:m}=lL()(e?`${aY}/visit${s}`:null,aQ),{data:p,error:f,mutate:h,isValidating:g}=lL()(e&&i?`${aY}/visit${l}`:null,aQ),y=(0,lr.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,lr.useMemo)(()=>i&&p?p.data:null,[p,i]),b=(0,lr.useRef)(null);(0,lr.useEffect)(()=>{!m&&y&&r===e&&null===a&&o(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&o(null),b.current=v)},[v,a,y,m,g,r]);let w=(0,lr.useCallback)(()=>{d(),h()},[d,h]);(0,lr.useEffect)(()=>{n.current=w},[w]);let x=!!(!u||i&&!p),D=!!(i?f:c);return{error:c||f,mutate:w,isValidating:m||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:x&&!D}}uG().extend(uZ);let u0=[];function u1(){let{data:e}=ui()(io,ii);return e??u0}let u4=new Map;async function u2(e,t){let n=t.indexOf("#"),r=n>=0,a=r?t.substring(0,n):e,o=r?t.substring(n+1):t,i=await oO(a);return i&&Object.hasOwn(i,o)&&"function"==typeof i[o]?u6(a,i).then(()=>i[o]()):(i?i&&Object.hasOwn(i,o)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${a} does not define a component called "${o}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${a} for ${t} defined in ${e}'s routes.json`),u3)}let u3={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function u6(e,t){if(e in u4)await u4[e];else{let n=t??await oO(e);await (u4[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let a=n.startupApp;if("function"==typeof a)return Promise.resolve(a()).then(()=>{tQ(e),t(null)}).catch(r)}tQ(e),t(null)}))}}function u5(e,t){let n=t.name;if(!n)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
15
+ ${this.stack}`}}let a1=B("session",{loaded:!1,session:null}),a4=0,a2=null;function a3(){return a2||(a1.getState().loaded&&a4>=Date.now()-6e4?null:a8())}function a6(e){let t=e?.includeAuthStatus??!0,n=e=>t?e:e.user,r=a3();return r?new Promise(e=>{let t=()=>{let t=a1.getState();t.loaded&&(a(),e(n(t.session)))},a=a1.subscribe(t);r.then(t,t)}):Promise.resolve(n(a1.getState().session))}function a5(){return a3(),a1}function a9(e){let t=e.locale??e.user?.userProperties?.defaultLocale;t&&t.includes("_")&&(t=t.replaceAll("_","-")),function(e){if(void 0===e||"string"!=typeof e)return!1;try{new Intl.Locale(e)}catch(e){return!1}return!0}(t)&&t!==document.documentElement.getAttribute("lang")&&document.documentElement.setAttribute("lang",t)}function a8(e,t){a4=Date.now();let n={};e&&t&&(n.Authorization=`Basic ${window.btoa(`${e}:${t}`)}`);let r=ol(aQ(aJ,{headers:n,rejectAuthFailure:!0})),a=()=>{a2===r&&(a2=null)};return r.then(a,a),a2=r,r}function a7(){a1.setState({loaded:!0,session:{authenticated:!1,sessionId:""}},!0)}function oe(e,t){var n,r;if(void 0===t)return!e;if(!e)return!0;return n=e,r=t,("string"==typeof n?!z(r.privileges.find(e=>n===e.display)):Array.isArray(n)?n.every(e=>!z(r.privileges.find(t=>e===t.display))):(z(n)||console.error(`Could not understand privileges "${n}"`),!0))||!z(t.roles.find(e=>"System Developer"===e.display))}function ot(){let e,t;return new Promise(n=>{let r=r=>{r.loaded&&r.session.user&&(e=r.session.user,n(r.session.user),t&&t())};r(a1.getState()),e||(t=a1.subscribe(r))})}async function on(){return(await a6()).sessionLocation}async function or(e,t){return ol(aQ(aJ,{method:"POST",body:{sessionLocation:e},headers:{"Content-Type":"application/json"},rejectAuthFailure:!0,signal:t?.signal}))}async function oa(e,t){return await aQ(aJ,{method:"POST",body:{locale:e},headers:{"Content-Type":"application/json"},signal:t?.signal}),a8()}async function oo(e,t,n){return n||(n=new AbortController),await aQ(`${aY}/user/${e}`,{method:"POST",body:{userProperties:t},headers:{"Content-Type":"application/json"},signal:n.signal}),a8()}async function oi(e,t=!1){let n=await aQ(t?`${aJ}?rememberMe=true`:aJ,{headers:{"X-Totp-Code":e}});return n.data?.authenticated?(await a8()).session:n.data}async function os(){try{await aQ(aJ,{method:"DELETE",rejectAuthFailure:!0})}catch(e){if(!ou(e))throw e}a7(),await a8().catch(()=>{})}function ol(e){return new Promise((t,n)=>{e.then(e=>{if("object"==typeof e?.data){let n={loaded:!0,session:e.data};a1.setState(n,!0),t(n)}else n(oc(Error("The session endpoint did not respond with a session")))}).catch(e=>{if(ou(e)){var r;"object"==typeof(r=e.responseBody)&&null!==r&&!1===r.authenticated?a1.setState({loaded:!0,session:e.responseBody},!0):a7(),t(a1.getState());return}C(`Failed to fetch new session information: ${e}`),n(oc(e))})})}function ou(e){return e instanceof a0&&(401===e.response.status||403===e.response.status)}function oc(e){return a1.getState().loaded||a1.setState({loaded:!1,session:null,error:e instanceof Error?e:Error(String(e))},!0),a1.getState()}function od(){return"development"===window.spaEnv||"true"===localStorage.getItem("openmrs:devtools")}a1.subscribe(e=>{e.loaded&&e.session&&a9(e.session)});let om={"webservices.rest":"2.24.0",fhir2:"1.0.0-SNAPSHOT"};function op(){tJ("@openmrs/esm-api",aG),a8()}let of="import-map-override:",oh="import-map-overrides-disabled",og="import-map-overrides:change",oy=!1,ov=null,ob=null;async function ow(){return ob??(ob=ox().then(({map:e,complete:t})=>(t||(ob=null),e))),ob}async function ox(){let e=document.querySelectorAll('script[type="systemjs-importmap"]'),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{if(a.src){let e=await fetch(a.src);if(!e.ok)throw Error(`Request for ${a.src} returned ${e.status} ${e.statusText}`);t.push(await e.json())}else a.textContent&&t.push(JSON.parse(a.textContent))}catch(e){n=!1,console.warn(`[import-maps] Failed to parse import map from script tag at index ${r}`,e)}}return{map:oD(t),complete:n}}function oD(e){let t={imports:{}};for(let n of e)n?.imports&&Object.assign(t.imports,n.imports);return t}function oE(){let e={};try{let t=oP();for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);if(r?.startsWith(of)){let n=r.slice(of.length);if(!t.includes(n)){let t=localStorage.getItem(r);t&&(e[n]=t)}}}}catch(e){console.warn("[import-maps] Failed to read import-map overrides from localStorage",e)}return{imports:e}}async function o_(){let e=await ow();return oy?oD([e,ov??oE()]):e}async function oS(){return ow()}async function ok(){return oy?oD([await ow(),oE()]):ow()}function oC(e){if(!oy)return{imports:{}};if(e){let e={};for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(of)){let t=localStorage.getItem(n);t&&(e[n.slice(of.length)]=t)}}return{imports:e}}return oE()}function oP(){if(!oy)return[];try{let e=localStorage.getItem(oh);if(e){let t=JSON.parse(e);if(Array.isArray(t))return t}}catch{}return[]}function oT(e){return!!oy&&oP().includes(e)}function oR(e,t){if(!oy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.setItem(of+e,t),window.dispatchEvent(new CustomEvent(og))}catch(e){console.warn("[import-maps] Failed to write import-map override to localStorage",e)}}function oN(e){if(!oy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{localStorage.removeItem(of+e);let t=oP().filter(t=>t!==e);t.length>0?localStorage.setItem(oh,JSON.stringify(t)):localStorage.removeItem(oh),window.dispatchEvent(new CustomEvent(og))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}function oO(){if(!oy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(of)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),localStorage.removeItem(oh),window.dispatchEvent(new CustomEvent(og))}catch(e){console.warn("[import-maps] Failed to clear import-map overrides from localStorage",e)}}function o$(e){if(!oy)return void console.warn("[Security] Import map overrides are disabled in production mode.");try{let t=oP().filter(t=>t!==e);t.length>0?localStorage.setItem(oh,JSON.stringify(t)):localStorage.removeItem(oh),window.dispatchEvent(new CustomEvent(og))}catch(e){console.warn("[import-maps] Failed to update import-map overrides in localStorage",e)}}let oM=!1;function oA(){!oM&&(oM=!0,(oy="development"===window.spaEnv)&&(ov=oE()))}function oj(e){return e.replace(/[\/\-@]/g,"_")}async function oI(e,t="./start",r){var a;let o,i=!r?.maxLoadingTime||r.maxLoadingTime<=0?6e5:r.maxLoadingTime;await Promise.race([oL(e,r?.importMap),new Promise((t,n)=>{o=setTimeout(()=>{var t;n(Error(`Could not resolve requested script, ${e}, within ${(t=i)<1e3?`${t} milliseconds`:t<6e4?`${Math.floor(t/1e3)} seconds`:t<36e5?`${Math.floor(t/6e4)} minutes`:t<864e5?`${Math.floor(t/36e5)} hours`:`${Math.floor(t/864e5)} days`}.`))},i)})]),o&&clearTimeout(o);let s=oj(e),l=window[s];if(!("object"==typeof(a=l)&&null!==a&&"init"in a&&"function"==typeof a.init&&"get"in a&&"function"==typeof a.get)){let e=`The global variable ${s} does not refer to a federated module`;throw console.error(e),Error(e)}l.init(n.S.default);let u=(await l.get(t))();if("object"!=typeof u||null===u){let t=`Container for ${e} did not return an ESM module as expected`;throw console.error(t),Error(t)}return u}async function oL(e,t){if("string"!=typeof e||0===e.trim().length){let e="Attempted to call importDynamic() without supplying a package to load";throw console.error(e),Error(e)}let n=oj(e);if(!window[n]){let n=t??await oF();if(!n.imports.hasOwnProperty(e)){let t=`Could not find the package ${e} defined in the current importmap`;throw console.error(t),Error(t)}let r=n.imports[e];r.startsWith("./")&&(r=window.spaBase+r.substring(1));let a=e in oC().imports;try{return await function(e){var t;let n=(t=window)[oB]??(t[oB]=new Map),r=n.get(e);if(r)return r;if(document.head.querySelector(`script[src="${e}"]`))return console.warn(`Script at ${e} already loaded. Not loading it again.`),Promise.resolve();let a=document.createElement("script");a.src=e,a.type="text/javascript",a.async=!0;let o=new Promise((t,r)=>{let o=setTimeout(()=>{console.error(`The script at ${e} did not load within 5 seconds. This may indicate an issue with the imports in the script's entry-point file or with the script's bundler configuration.`)},5e3);function i(){clearTimeout(o),a.removeEventListener("load",s),a.removeEventListener("error",l)}function s(){i(),t()}function l(t){i(),n.delete(e),a.remove();let o=`Failed to load script from ${e}`;console.error(o,t),r(t.message??o)}a.addEventListener("load",s),a.addEventListener("error",l),document.head.appendChild(a)});return n.set(e,o),o}(r)}catch(e){return a&&x({kind:"error",title:aj("scriptLoadingFailed","Error: Script failed to load"),description:aj("scriptLoadingError","Failed to load overridden script from {{- url}}. Please check that the bundled script is available at the expected URL. Click the button below to reset all import map overrides.",{url:r}),actionButtonLabel:aj("resetOverrides","Reset overrides"),onActionButtonClick(){oO(),window.location.reload()}}),Promise.reject(e)}}return Promise.resolve()}async function oF(){return o_()}let oB=Symbol.for("__openmrs_script_loading");function oV(e){return!!e&&"object"==typeof e&&!(Object.hasOwn(e,"pages")&&(!e.pages||!Array.isArray(e.pages))||Object.hasOwn(e,"extensions")&&(!e.extensions||!Array.isArray(e.extensions))||Object.hasOwn(e,"workspaces")&&(!e.workspaces||!Array.isArray(e.workspaces))||Object.hasOwn(e,"modals")&&(!e.modals||!Array.isArray(e.modals)))}function oU(e){return!!e&&"object"==typeof e&&"routes"in e&&!!e.routes&&"object"==typeof e.routes&&Object.entries(e.routes).every(([e,t])=>"string"==typeof e&&oV(t))}let oW="openmrs-routes:",oH="openmrs-routes:change",oz=!1,oK=null,oG=null;async function oZ(){return oG??(oG=oY().then(({map:e,complete:t})=>(t||(oG=null),e))),oG}async function oY(){let e=document.querySelectorAll("script[type='openmrs-routes']"),t=[],n=!0;for(let r=0;r<e.length;r++){let a=e[r];try{let e;if(a.src){let t=await fetch(a.src);if(!t.ok)throw Error(`Request for ${a.src} returned ${t.status} ${t.statusText}`);e=await t.json()}else a.textContent&&(e=JSON.parse(a.textContent));e&&oU(e)&&t.push(e)}catch(e){n=!1,console.warn(`[route-maps] Failed to parse routes from script tag at index ${r}`,e)}}return{map:oq(t),complete:n}}function oq(e){let t={routes:{}};for(let n of e)n&&"object"==typeof n&&!Array.isArray(n)&&(Object.assign(t.routes,n.routes),void 0===t.version&&void 0!==n.version&&(t.version=n.version));return t}async function oJ(){let e={version:void 0,routes:{}};try{let t=[];for(let e=0;e<localStorage.length;e++){let n=localStorage.key(e);if(n?.startsWith(oW)){let e=localStorage.getItem(n);e&&t.push({moduleName:n.slice(oW.length),raw:e})}}for(let n of(await Promise.allSettled(t.map(async({moduleName:e,raw:t})=>{let n=JSON.parse(t);if(oV(n))return{moduleName:e,routes:n};if("string"==typeof n&&n.startsWith("http")){let t=await fetch(n),r=await t.json();if(oV(r))return{moduleName:e,routes:r};throw Error(`${n} did not resolve to a valid OpenmrsAppRoutes object`)}throw Error(`Override for ${e} is neither a valid routes object nor a URL`)}))))"fulfilled"===n.status?e.routes[n.value.moduleName]=n.value.routes:console.warn("[route-maps] Failed to load route override",n.reason)}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}async function oX(){let e=await oZ();return oz?oq([e,oK??await oJ()]):e}async function oQ(){return oZ()}async function o0(){return oz?oq([await oZ(),await oJ()]):oZ()}function o1(){if(!oz)return{};let e={};try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);if(n?.startsWith(oW)){let t=localStorage.getItem(n);t&&(e[n.slice(oW.length)]=t)}}}catch(e){console.warn("[route-maps] Failed to read route overrides from localStorage",e)}return e}function o4(e,t){if(!oz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{if("string"==typeof t)if(t.startsWith("http"))localStorage.setItem(oW+e,JSON.stringify(t));else{let n=JSON.parse(t);if(!oV(n))return void console.error(`The supplied routes for ${e} is not a valid OpenmrsAppRoutes object`,t);localStorage.setItem(oW+e,JSON.stringify(n))}else if(t instanceof URL)localStorage.setItem(oW+e,JSON.stringify(t.toString()));else{if(!oV(t))return void console.error(`Override for ${e} is not in a valid format. Expected either a Javascript Object, a JSON string of a Javascript object, or a URL`,t);localStorage.setItem(oW+e,JSON.stringify(t))}window.dispatchEvent(new CustomEvent(oH))}catch(e){console.warn("[route-maps] Failed to write route override to localStorage",e)}}function o2(e){if(!oz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{localStorage.removeItem(oW+e),window.dispatchEvent(new CustomEvent(oH))}catch(e){console.warn("[route-maps] Failed to remove route override from localStorage",e)}}function o3(){if(!oz)return void console.warn("[Security] Route overrides are disabled outside development mode.");try{let e=[];for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t);n?.startsWith(oW)&&e.push(n)}e.forEach(e=>localStorage.removeItem(e)),window.dispatchEvent(new CustomEvent(oH))}catch(e){console.warn("[route-maps] Failed to clear route overrides from localStorage",e)}}let o6=null;function o5(){return o6||(o6=(oz="development"===window.spaEnv)?oJ().then(e=>{oK=e}):Promise.resolve())}let o9=`${aY}/attachment`;function o8(e,t){return aQ(`${o9}/${e}`,{signal:t.signal})}function o7(e,t,n,r){return aQ(ie(e,t,r),{signal:n.signal})}function ie(e,t,n){return n?`${o9}?patient=${e}&encounter=${n}`:`${o9}?patient=${e}&includeEncounterless=${t}`}async function it(e,t,n){let r=new FormData;return r.append("fileCaption",t.fileDescription),r.append("patient",e),n&&r.append("encounter",n),t.file?r.append("file",t.file,t.fileName):(r.append("file",new File([""],t.fileName),t.fileName),r.append("base64Content",t.base64Content)),aQ(`${o9}`,{method:"POST",body:r})}function ir(e,t){return aQ(`${o9}/${e}`,{method:"DELETE",signal:t.signal})}async function ia(e,t){return e?(await aQ(`${aq}/Patient/${e}`,t)).data:null}function io(e,t){let n=new CustomEvent(`openmrs:${e}`,{detail:t??void 0,cancelable:!0,bubbles:!0});return window.dispatchEvent(n)}function ii(e,t){let n=e=>{t("detail"in e&&null!==e.detail?e.detail:void 0)};return window.addEventListener(`openmrs:${e}`,n),()=>{window.removeEventListener(`openmrs:${e}`,n)}}function is(e){return{uuid:e.uuid,display:e.display}}function il(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString();return aQ(`${aY}/location${r?"?"+r:""}`).then(e=>e.data.results.map(is))}function iu(e){return{uuid:e.uuid,display:e.display,name:e.name}}let ic=`${aY}/visittype`;function id(e=ic){return aQ(e).then(e=>e.data.results.map(iu))}var im=((X={}).NEWVISIT="startVisit",X.EDITVISIT="editVisit",X.LOADING="loadingVisit",X),ip=((Q={}).NOTSTARTED="notStarted",Q.ONGOING="ongoing",Q);let ih="custom:(uuid,display,voided,indication,startDatetime,stopDatetime,encounters:(uuid,display,encounterDatetime,form:(uuid,name),location:ref,encounterType:ref,encounterProviders:(uuid,display,provider:(uuid,display))),patient:(uuid,display),visitType:(uuid,name,display),attributes:(uuid,display,attributeType:(name,datatypeClassname,uuid),value),location:(uuid,name,display))",ig=function(){try{return JSON.parse(sessionStorage.getItem("openmrs:visitStoreState")||"null")}catch(e){return null}}()||{patientUuid:null,manuallySetVisitUuid:null};function iy(){return U("visit",ig)}function iv(e,t){iy().setState({patientUuid:e,manuallySetVisitUuid:t})}function ib(e,t){return aQ(`${aY}/visit`,{signal:t.signal,method:"POST",headers:{"Content-type":"application/json"},body:e})}function iw(e,t,n){return aQ(`${aY}/visit/${e}`,{signal:n.signal,method:"POST",headers:{"Content-type":"application/json"},body:t})}function ix(e,t,n){return aQ(`${aY}/visit?patient=${e}&v=${n??ih}`,{signal:t.signal,method:"GET",headers:{"Content-type":"application/json"}})}iy().subscribe(e=>{var t;t=e,sessionStorage.setItem("openmrs:visitStoreState",JSON.stringify(t))});class iD{static get version(){return"1.4.0"}static toString(){return"JavaScript Expression Parser (JSEP) v"+iD.version}static addUnaryOp(e){return iD.max_unop_len=Math.max(e.length,iD.max_unop_len),iD.unary_ops[e]=1,iD}static addBinaryOp(e,t,n){return iD.max_binop_len=Math.max(e.length,iD.max_binop_len),iD.binary_ops[e]=t,n?iD.right_associative.add(e):iD.right_associative.delete(e),iD}static addIdentifierChar(e){return iD.additional_identifier_chars.add(e),iD}static addLiteral(e,t){return iD.literals[e]=t,iD}static removeUnaryOp(e){return delete iD.unary_ops[e],e.length===iD.max_unop_len&&(iD.max_unop_len=iD.getMaxKeyLen(iD.unary_ops)),iD}static removeAllUnaryOps(){return iD.unary_ops={},iD.max_unop_len=0,iD}static removeIdentifierChar(e){return iD.additional_identifier_chars.delete(e),iD}static removeBinaryOp(e){return delete iD.binary_ops[e],e.length===iD.max_binop_len&&(iD.max_binop_len=iD.getMaxKeyLen(iD.binary_ops)),iD.right_associative.delete(e),iD}static removeAllBinaryOps(){return iD.binary_ops={},iD.max_binop_len=0,iD}static removeLiteral(e){return delete iD.literals[e],iD}static removeAllLiterals(){return iD.literals={},iD}get char(){return this.expr.charAt(this.index)}get code(){return this.expr.charCodeAt(this.index)}constructor(e){this.expr=e,this.index=0}static parse(e){return new iD(e).parse()}static getMaxKeyLen(e){return Math.max(0,...Object.keys(e).map(e=>e.length))}static isDecimalDigit(e){return e>=48&&e<=57}static binaryPrecedence(e){return iD.binary_ops[e]||0}static isIdentifierStart(e){return e>=65&&e<=90||e>=97&&e<=122||e>=128&&!iD.binary_ops[String.fromCharCode(e)]||iD.additional_identifier_chars.has(String.fromCharCode(e))}static isIdentifierPart(e){return iD.isIdentifierStart(e)||iD.isDecimalDigit(e)}throwError(e){let t=Error(e+" at character "+this.index);throw t.index=this.index,t.description=e,t}runHook(e,t){if(iD.hooks[e]){let n={context:this,node:t};return iD.hooks.run(e,n),n.node}return t}searchHook(e){if(iD.hooks[e]){let t={context:this};return iD.hooks[e].find(function(e){return e.call(t.context,t),t.node}),t.node}}gobbleSpaces(){let e=this.code;for(;e===iD.SPACE_CODE||e===iD.TAB_CODE||e===iD.LF_CODE||e===iD.CR_CODE;)e=this.expr.charCodeAt(++this.index);this.runHook("gobble-spaces")}parse(){this.runHook("before-all");let e=this.gobbleExpressions(),t=1===e.length?e[0]:{type:iD.COMPOUND,body:e};return this.runHook("after-all",t)}gobbleExpressions(e){let t=[],n,r;for(;this.index<this.expr.length;)if((n=this.code)===iD.SEMCOL_CODE||n===iD.COMMA_CODE)this.index++;else if(r=this.gobbleExpression())t.push(r);else if(this.index<this.expr.length){if(n===e)break;this.throwError('Unexpected "'+this.char+'"')}return t}gobbleExpression(){let e=this.searchHook("gobble-expression")||this.gobbleBinaryExpression();return this.gobbleSpaces(),this.runHook("after-expression",e)}gobbleBinaryOp(){this.gobbleSpaces();let e=this.expr.substr(this.index,iD.max_binop_len),t=e.length;for(;t>0;){if(iD.binary_ops.hasOwnProperty(e)&&(!iD.isIdentifierStart(this.code)||this.index+e.length<this.expr.length&&!iD.isIdentifierPart(this.expr.charCodeAt(this.index+e.length))))return this.index+=t,e;e=e.substr(0,--t)}return!1}gobbleBinaryExpression(){let e,t,n,r,a,o,i,s,l;if(!(o=this.gobbleToken())||!(t=this.gobbleBinaryOp()))return o;for(a={value:t,prec:iD.binaryPrecedence(t),right_a:iD.right_associative.has(t)},(i=this.gobbleToken())||this.throwError("Expected expression after "+t),r=[o,a,i];t=this.gobbleBinaryOp();){if(0===(n=iD.binaryPrecedence(t))){this.index-=t.length;break}a={value:t,prec:n,right_a:iD.right_associative.has(t)},l=t;let s=e=>a.right_a&&e.right_a?n>e.prec:n<=e.prec;for(;r.length>2&&s(r[r.length-2]);)i=r.pop(),t=r.pop().value,o=r.pop(),e={type:iD.BINARY_EXP,operator:t,left:o,right:i},r.push(e);(e=this.gobbleToken())||this.throwError("Expected expression after "+l),r.push(a,e)}for(s=r.length-1,e=r[s];s>1;)e={type:iD.BINARY_EXP,operator:r[s-1].value,left:r[s-2],right:e},s-=2;return e}gobbleToken(){let e,t,n,r;if(this.gobbleSpaces(),r=this.searchHook("gobble-token"))return this.runHook("after-token",r);if(e=this.code,iD.isDecimalDigit(e)||e===iD.PERIOD_CODE)return this.gobbleNumericLiteral();if(e===iD.SQUOTE_CODE||e===iD.DQUOTE_CODE)r=this.gobbleStringLiteral();else if(e===iD.OBRACK_CODE)r=this.gobbleArray();else{for(n=(t=this.expr.substr(this.index,iD.max_unop_len)).length;n>0;){if(iD.unary_ops.hasOwnProperty(t)&&(!iD.isIdentifierStart(this.code)||this.index+t.length<this.expr.length&&!iD.isIdentifierPart(this.expr.charCodeAt(this.index+t.length)))){this.index+=n;let e=this.gobbleToken();return e||this.throwError("missing unaryOp argument"),this.runHook("after-token",{type:iD.UNARY_EXP,operator:t,argument:e,prefix:!0})}t=t.substr(0,--n)}iD.isIdentifierStart(e)?(r=this.gobbleIdentifier(),iD.literals.hasOwnProperty(r.name)?r={type:iD.LITERAL,value:iD.literals[r.name],raw:r.name}:r.name===iD.this_str&&(r={type:iD.THIS_EXP})):e===iD.OPAREN_CODE&&(r=this.gobbleGroup())}return r?(r=this.gobbleTokenProperty(r),this.runHook("after-token",r)):this.runHook("after-token",!1)}gobbleTokenProperty(e){this.gobbleSpaces();let t=this.code;for(;t===iD.PERIOD_CODE||t===iD.OBRACK_CODE||t===iD.OPAREN_CODE||t===iD.QUMARK_CODE;){let n;if(t===iD.QUMARK_CODE){if(this.expr.charCodeAt(this.index+1)!==iD.PERIOD_CODE)break;n=!0,this.index+=2,this.gobbleSpaces(),t=this.code}this.index++,t===iD.OBRACK_CODE?((e={type:iD.MEMBER_EXP,computed:!0,object:e,property:this.gobbleExpression()}).property||this.throwError('Unexpected "'+this.char+'"'),this.gobbleSpaces(),(t=this.code)!==iD.CBRACK_CODE&&this.throwError("Unclosed ["),this.index++):t===iD.OPAREN_CODE?e={type:iD.CALL_EXP,arguments:this.gobbleArguments(iD.CPAREN_CODE),callee:e}:(t===iD.PERIOD_CODE||n)&&(n&&this.index--,this.gobbleSpaces(),e={type:iD.MEMBER_EXP,computed:!1,object:e,property:this.gobbleIdentifier()}),n&&(e.optional=!0),this.gobbleSpaces(),t=this.code}return e}gobbleNumericLiteral(){let e="",t,n;for(;iD.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if(this.code===iD.PERIOD_CODE)for(e+=this.expr.charAt(this.index++);iD.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);if("e"===(t=this.char)||"E"===t){for(e+=this.expr.charAt(this.index++),("+"===(t=this.char)||"-"===t)&&(e+=this.expr.charAt(this.index++));iD.isDecimalDigit(this.code);)e+=this.expr.charAt(this.index++);iD.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+e+this.char+")")}return n=this.code,iD.isIdentifierStart(n)?this.throwError("Variable names cannot start with a number ("+e+this.char+")"):(n===iD.PERIOD_CODE||1===e.length&&e.charCodeAt(0)===iD.PERIOD_CODE)&&this.throwError("Unexpected period"),{type:iD.LITERAL,value:parseFloat(e),raw:e}}gobbleStringLiteral(){let e="",t=this.index,n=this.expr.charAt(this.index++),r=!1;for(;this.index<this.expr.length;){let t=this.expr.charAt(this.index++);if(t===n){r=!0;break}if("\\"===t)switch(t=this.expr.charAt(this.index++)){case"n":e+="\n";break;case"r":e+="\r";break;case"t":e+=" ";break;case"b":e+="\b";break;case"f":e+="\f";break;case"v":e+="\v";break;default:e+=t}else e+=t}return r||this.throwError('Unclosed quote after "'+e+'"'),{type:iD.LITERAL,value:e,raw:this.expr.substring(t,this.index)}}gobbleIdentifier(){let e=this.code,t=this.index;for(iD.isIdentifierStart(e)?this.index++:this.throwError("Unexpected "+this.char);this.index<this.expr.length;)if(e=this.code,iD.isIdentifierPart(e))this.index++;else break;return{type:iD.IDENTIFIER,name:this.expr.slice(t,this.index)}}gobbleArguments(e){let t=[],n=!1,r=0;for(;this.index<this.expr.length;){this.gobbleSpaces();let a=this.code;if(a===e){n=!0,this.index++,e===iD.CPAREN_CODE&&r&&r>=t.length&&this.throwError("Unexpected token "+String.fromCharCode(e));break}if(a===iD.COMMA_CODE){if(this.index++,++r!==t.length){if(e===iD.CPAREN_CODE)this.throwError("Unexpected token ,");else if(e===iD.CBRACK_CODE)for(let e=t.length;e<r;e++)t.push(null)}}else if(t.length!==r&&0!==r)this.throwError("Expected comma");else{let e=this.gobbleExpression();e&&e.type!==iD.COMPOUND||this.throwError("Expected comma"),t.push(e)}}return n||this.throwError("Expected "+String.fromCharCode(e)),t}gobbleGroup(){this.index++;let e=this.gobbleExpressions(iD.CPAREN_CODE);if(this.code===iD.CPAREN_CODE)return(this.index++,1===e.length)?e[0]:!!e.length&&{type:iD.SEQUENCE_EXP,expressions:e};this.throwError("Unclosed (")}gobbleArray(){return this.index++,{type:iD.ARRAY_EXP,elements:this.gobbleArguments(iD.CBRACK_CODE)}}}Object.assign(iD,{hooks:new class{add(e,t,n){if("string"!=typeof arguments[0])for(let e in arguments[0])this.add(e,arguments[0][e],arguments[1]);else(Array.isArray(e)?e:[e]).forEach(function(e){this[e]=this[e]||[],t&&this[e][n?"unshift":"push"](t)},this)}run(e,t){this[e]=this[e]||[],this[e].forEach(function(e){e.call(t&&t.context?t.context:t,t)})}},plugins:new class{constructor(e){this.jsep=e,this.registered={}}register(...e){e.forEach(e=>{if("object"!=typeof e||!e.name||!e.init)throw Error("Invalid JSEP plugin format");this.registered[e.name]||(e.init(this.jsep),this.registered[e.name]=e)})}}(iD),COMPOUND:"Compound",SEQUENCE_EXP:"SequenceExpression",IDENTIFIER:"Identifier",MEMBER_EXP:"MemberExpression",LITERAL:"Literal",THIS_EXP:"ThisExpression",CALL_EXP:"CallExpression",UNARY_EXP:"UnaryExpression",BINARY_EXP:"BinaryExpression",ARRAY_EXP:"ArrayExpression",TAB_CODE:9,LF_CODE:10,CR_CODE:13,SPACE_CODE:32,PERIOD_CODE:46,COMMA_CODE:44,SQUOTE_CODE:39,DQUOTE_CODE:34,OPAREN_CODE:40,CPAREN_CODE:41,OBRACK_CODE:91,CBRACK_CODE:93,QUMARK_CODE:63,SEMCOL_CODE:59,COLON_CODE:58,unary_ops:{"-":1,"!":1,"~":1,"+":1},binary_ops:{"||":1,"??":1,"&&":2,"|":3,"^":4,"&":5,"==":6,"!=":6,"===":6,"!==":6,"<":7,">":7,"<=":7,">=":7,"<<":8,">>":8,">>>":8,"+":9,"-":9,"*":10,"/":10,"%":10,"**":11},right_associative:new Set(["**"]),additional_identifier_chars:new Set(["$","_"]),literals:{true:!0,false:!1,null:null},this_str:"this"}),iD.max_unop_len=iD.getMaxKeyLen(iD.unary_ops),iD.max_binop_len=iD.getMaxKeyLen(iD.binary_ops);let iE=e=>new iD(e).parse(),i_=Object.getOwnPropertyNames(class{});Object.getOwnPropertyNames(iD).filter(e=>!i_.includes(e)&&void 0===iE[e]).forEach(e=>{iE[e]=iD[e]}),iE.Jsep=iD,iE.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}});let iS="ArrowFunctionExpression",ik={Array,Boolean,Symbol,Infinity,NaN,Math,Number,BigInt,String,RegExp,JSON,isFinite,isNaN,parseFloat,parseInt,decodeURI,encodeURI,encodeURIComponent,Object:{__proto__:void 0,assign:Object.assign.bind(null),fromEntries:Object.fromEntries.bind(null),hasOwn:Object.hasOwn.bind(null),keys:Object.keys.bind(null),is:Object.is.bind(null),values:Object.values.bind(null)}},iC={...ik,Promise};function iP(e,t={}){return iM(e,t,iI)}async function iT(e,t={}){return iA(e,t,iI)}function iR(e,t={}){return iM(e,t,iL)}function iN(e,t={}){return iA(e,t,iL)}function iO(e,t={}){return iM(e,t,iF)}function i$(e,t={}){return iA(e,t,iF)}function iM(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let r=iH(t,ik),a=iB("string"==typeof e?iE(e):e,r);if(n(a))return a;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}}async function iA(e,t={},n){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))return Promise.reject(`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`);if("string"==typeof e&&0===e.trim().length)throw{type:"Empty expression",message:"Expression cannot be an empty string"};null==t&&(t={});let r=iH(t,iC);return Promise.resolve(iB("string"==typeof e?iE(e):e,r)).then(t=>{if(n(t))return t;throw{type:"Invalid result",message:"string"==typeof e?`The expression ${e} did not produce a valid result`:"The expression did not produce a valid result"}})}function ij(e){return iE(e)}function iI(e){return"string"==typeof e||"number"==typeof e||"boolean"==typeof e||null==e||e instanceof Date}function iL(e){return"boolean"==typeof e}function iF(e){return"number"==typeof e}function iB(e,t){switch(e.type){case"UnaryExpression":var n,r,a,o,i,s,l,u,c,d,m,p,f,h=e,g=t;let y=iB(h.argument,g);switch(h.operator){case"+":return+y;case"-":return-y;case"~":return~y;case"!":return!y;default:throw`Expression evaluator does not support operator '${h.operator}''`}case"BinaryExpression":var v=e,b=t;switch(v.operator){case"&&":return iB(v.left,b)&&iB(v.right,b);case"||":return iB(v.left,b)||iB(v.right,b);case"??":return iB(v.left,b)??iB(v.right,b)}let w=iB(v.left,b),x=iB(v.right,b);switch(v.operator){case"+":return w+x;case"-":return w-x;case"*":return w*x;case"/":return w/x;case"%":return w%x;case"**":return w**x;case"==":return w==x;case"===":return w===x;case"!=":return w!=x;case"!==":return w!==x;case">":return w>x;case">=":return w>=x;case"<":return w<x;case"<=":return w<=x;case"in":return w in x;default:throw`Expression evaluator does not support operator '${v.operator}' operator`}case"ConditionalExpression":return n=e,r=t,iB(n.test,r)?iB(n.consequent,r):iB(n.alternate,r);case"CallExpression":return iG(iU(e,t));case"ArrowFunctionExpression":let D;return a=e,o=t,D=a.params?.map(e=>{if("Identifier"===e.type)return e.name;throw`Cannot handle parameter of type ${e.type}`})??[],(function(...e){if(e.length<D.length)throw`Required argument(s) ${D.slice(e.length,-1).join(", ")} were not provided`;let t=Object.fromEntries(D.reduce((t,n,r)=>{let a=e[r];return function e(t){if("string"==typeof t||"number"==typeof t||"boolean"==typeof t||"function"==typeof t||null===t||t instanceof RegExp)return!0;if("object"==typeof t){for(let n of Object.keys(t))if(!e(t[n]))return!1;return!0}if(Array.isArray(t)){for(let n of t)if(!e(n))break}return!1}(a)&&t.push([n,a]),t},[]));return iB(a.body,o.addVariables(t))}).bind(null);case"MemberExpression":return iG(iW(e,t));case"ArrayExpression":return i=e,s=t,i.elements?.map(iZ(s));case"SequenceExpression":let E;return l=e,u=t,(E=l.expressions.map(iZ(u)))[E.length-1];case"NewExpression":var _=e,S=t;if(_.callee&&"Identifier"===_.callee.type){let e=_.arguments?.map(iZ(S));switch(_.callee.name){case"Date":return new Date(...e);case"RegExp":return new RegExp(...e);default:throw`Cannot instantiate object of type ${_.callee.name}`}}if(_.callee)throw"new must be called with either Date or RegExp";throw'Could not handle "new" without a specified class';case"Literal":return e.value;case"Identifier":return c=e,d=t,(iY(c.name),d.variables&&Object.hasOwn(d.variables,c.name))?d.variables[c.name]:Object.hasOwn(d.globals,c.name)?d.globals[c.name]:void 0;case"TemplateLiteral":let k,C;return m=e,p=t,k=m.expressions?.map(iZ(p))??[],(C=m.quasis?.map(iZ(p))??[]).filter(e=>!e.tail).map(e=>e.value).join("")+k.join("")+C.filter(e=>e.tail).map(e=>e.value).join("");case"TemplateElement":return{value:(f=e).cooked,tail:f.tail};default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function iV(e,t){switch(e.type){case"Literal":return e.value;case"Identifier":return e.name;case"MemberExpression":return iV(e.property,t);default:throw`VisitExpressionName does not support expression of type '${e.type}'`}}function iU(e,t){let n=iK(e.callee,t);if(n===iz||e.optional&&null==n)return iz;let r=e.arguments?.map(iZ(t));if(n){if("function"!=typeof n)throw`${iX(e.callee)} is not a function`}else throw`No function named ${iX(e.callee)} is defined in this context`;return n(...r)}function iW(e,t){let n=iK(e.object,t);if(n===iz||e.optional&&null==n)return iz;if(null===n)throw TypeError(`TypeError: cannot read properties of null (reading '${iJ(e.property,t)}')`);if(void 0===n)switch(e.object.type){case"Identifier":{let n=iV(e.object,t);throw ReferenceError(`ReferenceError: ${n} is not defined`)}case"MemberExpression":throw TypeError(`TypeError: cannot read properties of undefined (reading '${iJ(e.property,t)}')`);default:throw`VisitMemberExpression does not support operator '${e.object.type}' type`}if("object"!=typeof n&&"function"!=typeof n&&"string"!=typeof n&&"number"!=typeof n)throw`VisitMemberExpression does not support member access on type ${typeof n}`;let r=e.computed?function(e){if(void 0===e)throw{type:"Illegal property access",message:"No property was supplied to the property access"};if("string"!=typeof e&&"number"!=typeof e)throw{type:"Illegal property access",message:`Cannot use a value of type ${null===e?"null":typeof e} as a property name`};return e}(iB(e.property,t)):function(e){if("Identifier"!==e.type)throw`VisitMemberExpression does not support a property of type '${e.type}'`;return e.name}(e.property);iY(r),function(e,t){if(iq.has(String(t)))return;let n=Object(e);for(;null!==n;){if(Object.hasOwn(n,t)){if(n===Object.prototype||n===Function.prototype)throw{type:"Illegal property access",message:`Cannot access the ${t} property of objects`};return}n=Object.getPrototypeOf(n)}}(n,r);let a=n[r];return"function"==typeof a?a.bind(n):a}function iH(e,t){let n={variables:{...e},globals:{...t},addVariables(e){return this.variables={...this.variables,...e},this}};return n.addVariables.bind(n),n}iE.plugins.register({name:"arrow",init(e){e.addBinaryOp("=>",.1,!0),e.hooks.add("gobble-expression",function(t){if(this.gobbleSpaces(),this.code===e.OPAREN_CODE){let n=this.index;if(this.index++,this.gobbleSpaces(),this.code===e.CPAREN_CODE){this.index++;let e=this.gobbleBinaryOp();if("=>"===e){let n=this.gobbleBinaryExpression();n||this.throwError("Expected expression after "+e),t.node={type:iS,params:null,body:n};return}}this.index=n}}),e.hooks.add("after-expression",function(t){!function t(n){n&&(Object.values(n).forEach(e=>{e&&"object"==typeof e&&t(e)}),"=>"===n.operator&&(n.type=iS,n.params=n.left?[n.left]:null,n.body=n.right,n.params&&n.params[0].type===e.SEQUENCE_EXP&&(n.params=n.params[0].expressions),delete n.left,delete n.right,delete n.operator))}(t.node)})}}),iE.plugins.register({name:"new",init(e){e.addUnaryOp("new"),e.hooks.add("after-token",function(t){let n=t.node;if(n&&"new"===n.operator){n.argument&&[e.CALL_EXP,e.MEMBER_EXP].includes(n.argument.type)||this.throwError("Expected new function()"),t.node=n.argument;let r=t.node;for(;r.type===e.MEMBER_EXP||r.type===e.CALL_EXP&&r.callee.type===e.MEMBER_EXP;)r=r.type===e.MEMBER_EXP?r.object:r.callee.object;r.type="NewExpression"}})}}),iE.plugins.register({name:"numbers",init(e){function t(e){return"x"===e||"X"===e?(this.index+=2,[[48,57],[65,70],[97,102]]):"b"===e||"B"===e?(this.index+=2,[[48,49]]):"o"===e||"O"===e||e>="0"&&e<="7"?(this.index+=e<="7"?1:2,[[48,55]]):null}function n(t){let n=this.index,r="",a=()=>{for(;e.isDecimalDigit(this.code)||95===this.code;)95===this.code?this.index++:r+=this.expr.charAt(this.index++)};a(),this.code===e.PERIOD_CODE&&(r+=this.expr.charAt(this.index++),a());let o=this.char;("e"===o||"E"===o)&&(r+=this.expr.charAt(this.index++),("+"===(o=this.char)||"-"===o)&&(r+=this.expr.charAt(this.index++)),a(),e.isDecimalDigit(this.expr.charCodeAt(this.index-1))||this.throwError("Expected exponent ("+r+this.char+")"));let i=this.code;if(e.isIdentifierStart(i))this.throwError("Variable names cannot start with a number ("+r+this.char+")");else if(i===e.PERIOD_CODE){r.length>1&&this.throwError(`Unexpected period ${JSON.stringify({chCode:i,number:r},null,2)}`),this.index=n;return}t.node={type:e.LITERAL,value:parseFloat(r),raw:this.expr.substring(n,this.index)}}e.hooks.add("gobble-token",function(r){if(48===this.code){var a,o,i;let s=this.index,l=this.expr.charAt(this.index+1),u=t.call(this,l);if(!u)return;let c="";for(;a=this.code,o=u,95===a||o.some(([e,t])=>a>=e&&a<=t);)95===this.code?this.index++:c+=this.expr.charAt(this.index++);if(e.isIdentifierPart(this.code)){if(e.isDecimalDigit(this.code)&&e.isDecimalDigit(l.charCodeAt(0))){this.index=s+1,n.call(this,r);return}this.throwError("unexpected char within number")}r.node={type:e.LITERAL,value:parseInt(c,"x"===(i=l)||"X"===i?16:"b"===i||"B"===i?2:8),raw:this.expr.substring(s,this.index)}}else(e.isDecimalDigit(this.code)||this.code===e.PERIOD_CODE)&&n.call(this,r)})}}),iE.plugins.register({name:"regex",init(e){e.hooks.add("gobble-token",function(t){if(47===this.code){let n=++this.index,r=!1;for(;this.index<this.expr.length;){if(47===this.code&&!r){let r,a=this.expr.slice(n,this.index),o="";for(;++this.index<this.expr.length;){let e=this.code;if(e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57)o+=this.char;else break}try{r=new RegExp(a,o)}catch(e){this.throwError(e.message)}return t.node={type:e.LITERAL,value:r,raw:this.expr.slice(n-1,this.index)},t.node=this.gobbleTokenProperty(t.node),t.node}this.code===e.OBRACK_CODE?r=!0:r&&this.code===e.CBRACK_CODE&&(r=!1),this.index+=92===this.code?2:1}this.throwError("Unclosed Regex")}})}}),iE.plugins.register({name:"ternary",init(e){e.hooks.add("after-expression",function(t){if(t.node&&this.code===e.QUMARK_CODE){this.index++;let n=t.node,r=this.gobbleExpression();if(r||this.throwError("Expected expression"),this.gobbleSpaces(),this.code===e.COLON_CODE){this.index++;let a=this.gobbleExpression();if(a||this.throwError("Expected expression"),t.node={type:"ConditionalExpression",test:n,consequent:r,alternate:a},n.operator&&e.binary_ops[n.operator]<=.9){let r=n;for(;r.right.operator&&e.binary_ops[r.right.operator]<=.9;)r=r.right;t.node.test=r.right,r.right=t.node,t.node=n}}else this.throwError("Expected :")}})}}),iE.plugins.register({name:"jsepTemplateLiteral",init(e){function t(e,n=!0){if(96===this.code){let t={type:"TemplateLiteral",quasis:[],expressions:[]},r="",a="",o=!1,i=this.expr.length,s=()=>t.quasis.push({type:"TemplateElement",value:{raw:a,cooked:r},tail:o});for(;this.index<i;){let i=this.expr.charAt(++this.index);if("`"===i)return this.index+=1,o=!0,s(),e.node=t,n&&(e.node=this.gobbleTokenProperty(e.node)),e.node;if("$"===i&&"{"===this.expr.charAt(this.index+1))this.index+=2,s(),a="",r="",t.expressions.push(...this.gobbleExpressions(125)),125!==this.code&&this.throwError("unclosed ${");else if("\\"===i)switch(a+=i,i=this.expr.charAt(++this.index),a+=i,i){case"n":r+="\n";break;case"r":r+="\r";break;case"t":r+=" ";break;case"b":r+="\b";break;case"f":r+="\f";break;case"v":r+="\v";break;default:r+=i}else r+=i,a+=i}this.throwError("Unclosed `")}}e.hooks.add("gobble-token",t),e.hooks.add("after-token",function(n){if((n.node.type===e.IDENTIFIER||n.node.type===e.MEMBER_EXP)&&96===this.code)return n.node={type:"TaggedTemplateExpression",tag:n.node,quasi:t.bind(this)(n,!1)},n.node=this.gobbleTokenProperty(n.node),n.node})}}),iE.addBinaryOp("in",7),iE.addBinaryOp("??",1);let iz=Symbol("optional chain short-circuited");function iK(e,t){switch(e.type){case"MemberExpression":return iW(e,t);case"CallExpression":return iU(e,t);default:return iB(e,t)}}function iG(e){return e===iz?void 0:e}function iZ(e){return function(t){return null===t?null:iB(t,e)}}function iY(e){if("__proto__"===e||"prototype"===e||"constructor"===e)throw{type:"Illegal property access",message:`Cannot access the ${e} property of objects`}}let iq=new Set(["toString","valueOf","hasOwnProperty"]);function iJ(e,t){try{return iV(e,t)}catch{return"<computed>"}}function iX(e){return e?"MemberExpression"===e.type?e.property?.name:e.name:null}function iQ(e){if("string"!=typeof e&&("object"!=typeof e||!e||!("type"in e)))throw`Unknown expression type ${e}. Expressions must either be a string or pre-compiled string.`;let t={globals:{...iC},isLocalExpression:!1,variables:new Set};return i0("string"==typeof e?iE(e):e,t),[...t.variables]}function i0(e,t){switch(e.type){case"UnaryExpression":return r=e,a=t,i0(r.argument,a);case"BinaryExpression":return o=e,i=t,[i0(o.left,i),i0(o.right,i)].filter(Boolean);case"ConditionalExpression":return s=e,l=t,[i0(s.consequent,l),i0(s.test,l),i0(s.alternate,l)].filter(Boolean);case"CallExpression":let n;return u=e,c=t,n=i0(u.callee,c),u.arguments?.map(i1(c)),n;case"ArrowFunctionExpression":var r,a,o,i,s,l,u,c,d,m,p,f,h,g,y,v,b=e,w=t;let x={...w};x.isLocalExpression=!0;let D=b.params?.map(i1(x))??[],E=i0(b.body,x)??[];if(E&&Array.isArray(E))for(let e of E)D.includes(e)||w.variables.add(e);return;case"MemberExpression":var _=e,S=t;if(i0(_.object,S),_.computed)return void i0(_.property,S);let k={...S};k.isLocalExpression=!0,i0(_.property,k);return;case"ArrayExpression":return d=e,m=t,void d.elements?.map(i1(m));case"SequenceExpression":return p=e,f=t,void p.expressions?.map(i1(f));case"NewExpression":return h=e,g=t,void h.arguments?.map(i1(g));case"Literal":case"TemplateElement":return;case"Identifier":var C=e,P=t;if(!(C.name in P.globals))if(P.isLocalExpression)return C.name;else P.variables.add(C.name);return;case"TemplateLiteral":return y=e,v=t,void(y.expressions?.map(i1(v)),y.quasis?.map(i1(v)));default:throw`Expression evaluator does not support expression of type '${e.type}'`}}function i1(e){return function(t){return null===t?null:i0(t,e)}}let i4=U("feature-flags",{flags:function(){let e={};for(let t of Object.keys(localStorage))if(t.startsWith("openmrs:feature-flag:")){let n=t.replace("openmrs:feature-flag:",""),r=JSON.parse(localStorage.getItem(`openmrs:feature-flag-meta:${n}`)||"{}");e[n]={enabled:"true"===localStorage.getItem(t),...r}}return e}()});function i2(e,t,n){i4.setState(r=>({flags:{...r.flags,[e]:{enabled:r.flags[e]?.enabled??!1,label:t,description:n}}}))}function i3(){let e=i4.getState().flags;Object.keys(localStorage).filter(e=>e.startsWith("openmrs:feature-flag:")).forEach(t=>{let n=t.replace("openmrs:feature-flag:","");e[n]||(localStorage.removeItem(t),localStorage.removeItem(`openmrs:feature-flag-meta:${n}`))})}function i6(e){return i4.getState().flags[e].enabled}function i5(e,t){i4.subscribe(n=>{t(n.flags[e].enabled)})}function i9(e,t){i4.setState(n=>({flags:{...n.flags,[e]:{...n.flags[e],enabled:t}}}))}i4.subscribe(e=>{for(let[t,n]of Object.entries(e.flags))localStorage.setItem(`openmrs:feature-flag:${t}`,n.enabled.toString()),localStorage.setItem(`openmrs:feature-flag-meta:${t}`,JSON.stringify({label:n.label,description:n.description}))});var i8=eW(function(e,t,n){eO(e,t,n)});let i7=B("extensionsInternal",{slots:{},extensions:{}}),se=B("extensionRenderings",{renderings:new Map}),st=()=>U("extensionsInternal",{slots:{},extensions:{}}),sn=()=>U("extensionRenderings",{renderings:new Map});function sr(e){let t=i7.getState(),n=e(t);n!==t&&i7.setState(n)}let sa=null,so=null;function si(){let e=se.getState();return sa&&e===so||(sa=new Map(e.renderings),so=e,function(e){for(let t of(sg.clear(),e.values()))sv(t,1);sy=!0}(sa)),sa}function ss(e){so={renderings:e},se.setState(so,!0)}function sl(e){let t=si();t.has(e.renderingId)||(t.set(e.renderingId,e),sv(e,1),ss(t))}function su(e){let t=si(),n=t.get(e);n&&(t.delete(e),sv(n,-1),ss(t))}let sc=()=>U("extensions",{slots:{}}),sd=0,sm=new Set;function sp(e){sd++;try{return e()}finally{if(0==--sd&&sm.size>0){let e=Array.from(sm);for(let t of(sm.clear(),e))sf(t)}}}function sf(e){try{e()}catch(t){console.error(`The extension system's '${e.name}' recomputation failed`,t)}}function sh(e){sd>0?sm.add(e):sf(e)}let sg=new Map,sy=!1;function sv(e,t){let n=JSON.stringify([e.slotName,e.extensionId,e.slotModuleName,e.extensionModuleName]),r=sg.get(n);if(!r){if(t<0)return;sg.set(n,{count:1,record:{slotModuleName:e.slotModuleName,extensionModuleName:e.extensionModuleName,slotName:e.slotName,extensionId:e.extensionId}}),sy=!0;return}r.count+=t,r.count<1&&(sg.delete(n),sy=!0)}function sb(){var e,t;if(si(),!sy)return;sy=!1;let n=Array.from(sg.values(),({record:e})=>e);n.sort(sw),e=tS.getState().mountedExtensions,t=n,e.length===t.length&&e.every((e,n)=>0===sw(e,t[n]))||tS.setState({mountedExtensions:n})}function sw(e,t){return sx(e.slotName,t.slotName)||sx(e.extensionId,t.extensionId)||sx(e.slotModuleName,t.slotModuleName)||sx(e.extensionModuleName,t.extensionModuleName)}function sx(e,t){return e===t?0:e<t?-1:1}sb(),se.subscribe(()=>sh(sb));let sD=st(),sE=sc(),s_=tC(),sS=tR(),sk=new Set,sC=!1;function sP(e){if(null===e)sk=null;else if(null!==sk)for(let t of e)sk.add(t);sh(sT)}function sT(){if(!sC){sC=!0;try{for(let e=1;;e++){let t=sk;if(null!==t&&0===t.size)return;sk=new Set;try{!function(e,t,n,r,a,o=null){let i=sE.getState().slots,s={},l=!1,u=Object.entries(r.flags).filter(([,{enabled:e}])=>e).map(([e])=>e);for(let[r,c]of Object.entries(e.slots)){let d=i[r];if(d&&o&&!o.has(r)){s[r]=d;continue}let{config:m}=tT(t,c.name),p=function(e,t,n,r,a,o){let i=function(e,t){let n=e.add||[],r=e.remove||[],a=e.order||[],{extensions:o}=sD.getState();return[...t,...n].filter(e=>!r.includes(e)).sort((e,n)=>sF(e,a,o[sO(e)]?.order,t)-sF(n,a,o[sO(n)]?.order,t))}(n,t.slots[e].attachedIds),s=[];for(let l of i){let{config:i}=tO(r,e,l),u=t$(n,e,l),c=u?i8({},i,u):i,d=sO(l),m=t.extensions[d];if(m){let e=c?.["Display conditions"]?.privileges??m.privileges??[];if(e&&("string"==typeof e||Array.isArray(e)&&e.length>0)&&(!o?.user||!oe(e,o.user))||m.featureFlag&&!a.includes(m.featureFlag))continue;s.push({id:l,name:d,moduleName:m.moduleName,config:c,featureFlag:m.featureFlag,meta:m.meta,displayConditionExpression:c?.["Display conditions"]?.expression||m.displayExpression})}}return s}(r,e,m,n,u,a.session);d&&d.moduleName===c.moduleName&&(0,ez.A)(d.candidateExtensions,p)?s[r]=d:(s[r]={moduleName:c.moduleName,candidateExtensions:p},l=!0)}(l||Object.keys(i).length!==Object.keys(s).length)&&sE.setState({slots:s})}(sD.getState(),s_.getState(),sS.getState(),i4.getState(),a1.getState(),t)}catch(e){throw sk=null===t||null===sk?null:new Set([...t,...sk]),e}if(e>=20)return void console.error("The extension system stopped recomputing after 20 passes because something keeps invalidating slots in response to the extension store being written. Some slots are left stale until the next write.")}}finally{sC=!1}}}function sR(e,t){let n=new Set;for(let r of Object.keys(e))e[r]!==t[r]&&n.add(r);for(let r of Object.keys(t))r in e||n.add(r);return n}function sN(e,t){return{moduleName:t,name:e,attachedIds:[]}}function sO(e){let[t]=e.split("#");return t}function s$(e,t){let n=sO(t);return e.extensions[n]}function sM(e){return s$(sD.getState(),e)}sD.subscribe((e,t)=>{sP(e.extensions!==t.extensions?null:sR(e.slots,t.slots))}),s_.subscribe((e,t)=>{sP(sR(e.slots,t.slots))}),sS.subscribe((e,t)=>{sP(sR(e.configs,t.configs))}),i4.subscribe(()=>sP(null)),a1.subscribe(()=>sP(null)),sP(null);let sA=e=>sr(t=>({...t,extensions:{...t.extensions,[e.name]:{...e}}}));function sj(e,t){sr(n=>{let r=n.slots[e];return r?{...n,slots:{...n.slots,[e]:{...r,attachedIds:[...r.attachedIds,t]}}}:{...n,slots:{...n.slots,[e]:{...sN(e),attachedIds:[t]}}}})}function sI(e,t){sr(n=>{let r=n.slots[e];return r&&r.attachedIds.includes(t)?{...n,slots:{...n.slots,[e]:{...r,attachedIds:r.attachedIds.filter(e=>e!==t)}}}:n})}function sL(e){sr(t=>{let n=t.slots[e];return n?{...t,slots:{...t.slots,[e]:{...n,attachedIds:[]}}}:t})}function sF(e,t,n,r){let a=t.indexOf(e);if(-1!==a)return a;{if(void 0!==n)return 1e3+n;let t=r.indexOf(e);return -1!==t?2e3+t:3e3}}function sB(e,t){return function(e,t,n=null,r){let a;return e.filter(e=>{let o=e.displayConditionExpression;if("string"!=typeof o||0===o.trim().length)return!0;a??(a=t&&"object"==typeof t?{session:n,...t}:{session:n});try{return!!iR(o,a)}catch(t){return console.error(`Error while evaluating expression '${o}' for ${e.id}`+(r?` in ${r}`:""),t),!1}})}(sV(e),t,a1.getState().session,e)}function sV(e){return sE.getState().slots[e]?.candidateExtensions??[]}let sU=(e,t)=>sD.setState(n=>{let r=n.slots[t]?.moduleName;if(r&&r!=e)return console.warn(`An extension slot with the name '${t}' already exists. Refusing to register the same slot name twice (in "registerExtensionSlot"). The existing one is from module ${r}.`),n;if(r&&r==e)return n;if(n.slots[t])return{...n,slots:{...n.slots,[t]:{...n.slots[t],moduleName:e}}};let a=sN(t,e);return{...n,slots:{...n.slots,[t]:{...a}}}}),sW=()=>{sk=null,sr(()=>({slots:{},extensions:{}})),sn().setState({renderings:new Map}),sE.setState({slots:{}})},sH=B("left-nav",{slotName:null,basePath:window.spaBase,mode:"normal"});function sz({name:e,basePath:t,mode:n,componentContext:r,state:a}){sH.setState({slotName:e,basePath:t,mode:n??"normal",componentContext:r,state:a})}function sK(e){sH.getState().slotName===e&&sH.setState(sH.getInitialState(),!0)}let sG=B("modalRegistry",{modals:{}});function sZ(e){sG.setState(t=>(t.modals[e.name]=e,t))}function sY(e){let t=sG.getState().modals[e];if(!t){let n=sM(e);n&&(t={name:e,load:n.load,moduleName:n.moduleName},console.warn(`Modal ${e} was registered as an extension. This is deprecated and will be removed in the future. Please register it in the "modals" section of routes.json instead of the "extensions" section.`),sZ(t))}return t}let sq=B("workspaceRegistrations",{workspaces:{}}),sJ=B("workspaceGroups",{workspaceGroups:{}});function sX(e){sq.setState(t=>({workspaces:{...t.workspaces,[e.name]:{...e,load:e.load,preferredWindowSize:e.preferredWindowSize??"normal",type:e.type??"form",canHide:e.canHide??!1,canMaximize:e.canMaximize??!1,width:e.width??"narrow",groups:e.groups??[]}}}))}function sQ(e){sJ.setState(t=>{let n=t.workspaceGroups[e.name];return n?{workspaceGroups:{...t.workspaceGroups,[e.name]:{...n,members:Array.from(new Set([...n.members,...e.members]))}}}:{workspaceGroups:{...t.workspaceGroups,[e.name]:{name:e.name,members:e.members}}}})}let s0=new Set;function s1(e){let t=sq.getState().workspaces;if(t[e])return t[e];{let t=sM(e);if(t){var n;let r;return s0.has(e)||(console.warn(`The workspace '${e}' is registered as an extension. This is deprecated. Please register it in the "workspaces" section of the routes.json file.`),s0.add(e)),{name:t.name,title:(n=t,"string"==typeof(r=n?.meta?.title)?r:r&&"object"==typeof r?aA(n.moduleName,r.key,r.default):n.name),moduleName:t.moduleName,preferredWindowSize:t.meta?.screenSize??"normal",load:t.load,type:t.meta?.type??"form",canHide:t.meta?.canHide??!1,canMaximize:t.meta?.canMaximize??!1,width:t.meta?.width??"narrow",groups:t.meta?.groups??[]}}throw Error(`No workspace named '${e}' has been registered.`)}}function s4(e){let t=sJ.getState().workspaceGroups;if(t[e])return t[e];throw Error(`No workspace group named '${e}' has been registered.`)}let s2=B("workspace2",{registeredGroupsByName:{},registeredWindowsByName:{},registeredWorkspacesByName:{},openedGroup:null,openedWindows:[],workspaceTitleByWorkspaceName:{},isMostRecentlyOpenedWindowHidden:!1});function s3(e){let{registeredWorkspacesByName:t,registeredWindowsByName:n}=s2.getState(),r=t[e];if(r){let t=n[r.window];if(t)return t;throw Error(`No workspace window found with name: ${r.window} for workspace: ${e}`)}throw Error(`No workspace found with name: ${e}`)}function s6(e){let{registeredGroupsByName:t,registeredWindowsByName:n}=s2.getState(),r=n[e];if(r){let n=t[r.group];if(n)return n;throw Error(`No workspace group found with name: ${r.group} for window: ${e}`)}throw Error(`No workspace window found with name: ${e}`)}function s5(e){let{openedWindows:t}=s2.getState();return t.findIndex(t=>t.openedWorkspaces.find(t=>t.workspaceName===e))}function s9(e,t){if(0==t.length)return;let{registeredGroupsByName:n}=s2.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace group ${n.name} more than once`);r[n.name]={...n,moduleName:e}}s2.setState({registeredGroupsByName:r})}function s8(e,t){if(0==t.length)return;let{registeredWindowsByName:n}=s2.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace window ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}s2.setState({registeredWindowsByName:r})}function s7(e,t){if(0==t.length)return;let{registeredWorkspacesByName:n}=s2.getState(),r={...n};for(let n of t){if(r[n.name])throw Error(`Cannot register workspace ${n.name} more than once`);let t={...n,moduleName:e};r[n.name]=t}s2.setState({registeredWorkspacesByName:r})}let le=0,lt=null,ln={bootstrap:15e3,mount:15e3,unmount:15e3};function lr(e,t){if(e.timeouts)return e;let n=e.name??"parcel",r=Object.fromEntries(Object.keys(ln).filter(t=>e[t]).map(r=>{var a,o;let i,s;return[r,(a=e[r],o=ln[r],i=Array.isArray(a)?a:[a],s=e=>i.reduce((t,a,o)=>t.then(()=>{let t=a(e);return"function"==typeof t?.then&&"function"==typeof t?.catch?t:Promise.reject(Error(`Lifecycle function ${r} at array index ${o} for parcel ${n} did not return a promise`))}),Promise.resolve(void 0)),e=>{let a,i=new Promise((e,t)=>{a=setTimeout(()=>t(Error(`Lifecycle function ${r} for parcel ${n} did not settle within ${o}ms`)),o)});return Promise.race([s(e),i]).finally(()=>clearTimeout(a)).then(e=>(t(r,!1),e),e=>{throw t(r,!0),e})})]}));return{...e,...r}}async function la(e,t){var n,r;let a,o,i,s,l,u=await (lt??(lt=new Promise((e,t)=>{ro({name:"openmrs-extension-host",bootstrap:()=>Promise.resolve(),mount:t=>(e(t.mountParcel),Promise.resolve()),unmount:()=>Promise.resolve()},{domElement:document.createElement("div")}).mountPromise.catch(t)}).catch(e=>(console.error("The host parcel used to mount extensions could not be mounted. Falling back to mounting extensions as root parcels, which leaks their DOM elements.",e),ro))),lt),c={...t},d=(a=c,o=!1,{retarget:e=>a={...e},release:i=()=>(function(e){for(let t of Object.keys(e))delete e[t]})(a),onSettled(e,t){switch(e){case"bootstrap":t&&i();return;case"mount":o||(o=t);return;case"unmount":(t||o)&&i();return}}});return r=u((n=d.onSettled,"function"==typeof e?()=>e().then(e=>lr(e,n)):lr(e,n)),c),s=e=>t=>e.call(r,d.retarget(t)).catch(e=>{throw"SKIP_BECAUSE_BROKEN"===r.getStatus()&&d.release(),e}),l=r.update&&s(r.update),Object.defineProperty(r,"update",{configurable:!0,enumerable:!0,get:()=>l,set:e=>{l=e&&s(e)}})}function lo(){return li}function li(e,t){let n,r=la(e,t).then(e=>n=e);return{mount:()=>r.then(e=>e.mount()),unmount:()=>r.then(e=>e.unmount()),update:e=>r.then(t=>t.update?.(e)),getStatus:()=>n?.getStatus()??"LOADING_SOURCE_CODE",get loadPromise(){return r.then(e=>e.loadPromise)},get bootstrapPromise(){return r.then(e=>e.bootstrapPromise)},get mountPromise(){return r.then(e=>e.mountPromise)},get unmountPromise(){return r.then(e=>e.unmountPromise)}}}async function ls(e,t,n,r,a=e=>e,o={}){let i=sO(r),s=sM(r),l=null;if(e){let u;if(!s)throw Error(`Couldn't find extension '${i}' to attach to '${t}'`);let{meta:c,moduleName:d,load:m}=s,p=le++,f=`${t}/${r}-${p}`;e.dataset.extensionRenderingId=f;let h=e=>{try{su(f)}catch(t){console.error(e,t)}};try{sl({renderingId:f,extensionName:i,extensionModuleName:d,extensionId:r,slotName:t,slotModuleName:n})}catch(e){throw h(`Recomputing configuration after registering '${r}' failed also failed`),e}try{u=await m()}catch(e){throw h(`Recomputing configuration after '${r}' failed to load also failed`),e}try{l=await la(a({...u,name:`${t}/${i}-${p}`}),{...o,_meta:c,_extensionContext:{extensionId:r,extensionSlotName:t,extensionSlotModuleName:n,extensionModuleName:d,extensionMeta:c},domElement:e})}catch(e){throw h(`Recomputing configuration after '${r}' failed to mount also failed`),e}l.mountPromise.then(void 0,e=>{console.error(`Extension '${r}' in slot '${t}' failed to mount`,e),h(`Recomputing configuration after '${r}' failed to mount also failed`)}),l.unmountPromise.then(()=>h(`Recomputing configuration after unmounting '${r}' failed`),e=>{console.error(`Extension '${r}' in slot '${t}' failed to unmount`,e),h(`Recomputing configuration after '${r}' failed to unmount also failed`)})}else console.warn(`Tried to render ${r} into ${t} but no DOM element was available.`);return l}var ll=n(5399),lu=n.n(ll);let lc=(0,ll.createContext)({moduleName:"",featureName:""});function ld({to:e,templateParams:t,onBeforeNavigate:n,children:r,...a}){return(0,ll.useEffect)(()=>{a.href&&console.warn(`ConfigurableLink does not support the href prop. Use the 'to' prop instead. The provided href value is '${a.href}'`),a.onClick&&console.warn(`ConfigurableLink does not support the onClick prop. Use the 'onBeforeNavigate' prop instead. The 'to' prop of the offending link is ${e}`)},[]),lu().createElement("a",{onClick:r=>{0===r.button&&!r.ctrlKey&&!r.shiftKey&&!r.altKey&&!r.metaKey&&(r.preventDefault(),n?.(r),aF({to:e,templateParams:t})),0===r.button&&(r.ctrlKey||r.metaKey)&&n?.(r),0===r.button&&r.shiftKey&&n?.(r),1===r.button&&n?.(r)},href:aI(e,t),...a},r)}let lm=({state:e,children:t,...n})=>{let{extension:r}=(0,ll.useContext)(lc),a=(0,ll.useRef)(null),o=(0,ll.useRef)(Promise.resolve()),i=(0,ll.useRef)(!1),s=(0,ll.useRef)(!1),l=(0,ll.useRef)(e),u=(0,ll.useCallback)(e=>{if(!e)return;let t=()=>{"MOUNTED"===e.getStatus()&&e.unmount()};switch(e.getStatus()){case"MOUNTED":e.unmount();break;case"UPDATING":o.current?.then(t,t);break;default:e.mountPromise.then(t,()=>{})}},[]),c=(0,ll.useCallback)((e,t)=>{e.update&&"UNMOUNTING"!==e.getStatus()&&(o.current=Promise.all([e.mountPromise,o.current]).then(()=>{if(a.current?.getStatus()==="MOUNTED"&&a.current.update)return a.current.update({...t})}).catch(e=>{let t=a.current?.getStatus();"UNMOUNTING"!==t&&"NOT_MOUNTED"!==t&&"UNLOADING"!==t&&console.error(`The extension '${r?.extensionId}' failed to update`,e)}))},[]),d=(0,ll.useCallback)(t=>{t&&!a.current&&!s.current&&r?.extensionSlotName&&r.extensionSlotModuleName&&(s.current=!0,ls(t,r.extensionSlotName,r.extensionSlotModuleName,r.extensionId,void 0,e).then(t=>{(s.current=!1,a.current=t,i.current)?u(t):t&&l.current!==e&&c(t,l.current)},()=>{s.current=!1}))},[]);return(0,ll.useEffect)(()=>(i.current=!1,()=>{i.current=!0,u(a.current)}),[]),(0,ll.useEffect)(()=>{l.current=e,a.current&&c(a.current,e)},[e]),r?lu().createElement("div",{ref:d,"data-extension-id":r?.extensionId,style:{position:"relative"},...n}):null};function lp(e){let t=(0,ll.useRef)(e);return R(t.current,e)||(t.current=e),t.current}function lf(e,t){"function"==typeof t&&(t=t(e));let n={};for(let[r,a]of Object.entries(t)){let t=function(...t){e.setState(e=>a(e,...t))};n[r]=t}return n}let lh=e=>e;function lg(e,t=lh,n){let r=(0,ll.useCallback)(t=>e.subscribe(t),[e]),a=(0,ll.useCallback)(()=>t(e.getState()),[e,t]),o=(0,ll.useSyncExternalStore)(r,a,a),i=(0,ll.useMemo)(()=>n?lf(e,n):null,[e,n]);return(0,ll.useMemo)(()=>i?{...o,...i}:o,[o,i])}function ly(e,t){return lg(e,lh,t)}function lv(e){return function(t){let n=(0,ll.useCallback)(t=>e.subscribe(t),[]),r=(0,ll.useCallback)(()=>e.getState(),[]),a=(0,ll.useSyncExternalStore)(n,r,r),o=(0,ll.useMemo)(()=>t?lf(e,t):null,[t]);return(0,ll.useMemo)(()=>o?{...a,...o}:a,[a,o])}}let lb=[];Object.freeze(lb);let lw={candidateExtensions:lb};Object.freeze(lw);let lx=e=>{let t=(0,ll.useCallback)(t=>t.slots?.[e]??lw,[e]);return lg(sc(),t)},lD=e=>e.session;function lE(e,t){let{candidateExtensions:n}=lx(e),r=lg(a1,lD),a=lp(t);return(0,ll.useMemo)(()=>sB(e,a),[e,a,r,n])}function l_(e,t){let{moduleName:n}=(0,ll.useContext)(lc);if(!n)throw Error("ComponentContext has not been provided. This should come from @openmrs/esm-react-utils.");return(0,ll.useEffect)(()=>{sU(n,e)},[n,e]),{extensions:lE(e,t),extensionSlotName:e,extensionSlotModuleName:n}}function lS(e){return e}function lk({name:e,extensionSlotName:t,select:n=lS,children:r,state:a,style:o,...i}){if(r&&a)throw Error("Both children and state have been provided. If children are provided, the state must be passed as a prop to the `Extension` component.");let s=e??t,l=(0,ll.useRef)(null),{extensions:u,extensionSlotModuleName:c}=l_(s,a),d=(0,ll.useMemo)(()=>n(u),[n,u]),m=(0,ll.useMemo)(()=>{if("function"==typeof r&&!lu().isValidElement(r))return d.map(e=>r(e,a))},[r,d]);return lu().createElement("div",{ref:l,"data-extension-slot-name":s,"data-extension-slot-module-name":c,style:{...o,position:"relative"},...i},s&&d?.map((e,t)=>lu().createElement(lc.Provider,{key:e.id,value:{moduleName:c,featureName:"",extension:{extensionId:e.id,extensionSlotName:s,extensionSlotModuleName:c,extensionMeta:e.meta}}},m?.[t]??("function"!=typeof r?r:null)??lu().createElement(lm,{state:a}))))}var lC=n(5873);function lP(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function lT(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?lP(Object(n),!0).forEach(function(t){var r,a,o;r=e,a=t,o=n[t],a in r?Object.defineProperty(r,a,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[a]=o}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):lP(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function lR(e){return(lR="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lN(e){return(lN="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function lO(e,t){var n;if("function"!=typeof(n=t.domElement?function(){return t.domElement}:t.domElementGetter?t.domElementGetter:e.domElementGetter?e.domElementGetter:function(e){var t=e.appName||e.name;if(!t)throw Error("single-spa's dom-element-getter-helpers was not given an application name as a prop, so it can't make a unique dom element container for the react application");var n="single-spa-application:".concat(t);return function(){var e=document.getElementById(n);return e||((e=document.createElement("div")).id=n,document.body.appendChild(e)),e}}(t)))throw Error("single-spa's dom-element-getter-helpers was given an invalid domElementGetter for application or parcel '".concat(t.name,"'. Expected a function, received ").concat(lN(n)));return function(){var e=n(t);if(!(e instanceof HTMLElement))throw Error("single-spa's dom-element-getter-helpers: domElementGetter returned an invalid dom element for application or parcel '".concat(t.name,"'. Expected HTMLElement, received ").concat(lN(e)));return e}}var l$=null;try{l$=require("react").createContext()}catch(e){}var lM={React:null,ReactDOM:null,ReactDOMClient:null,rootComponent:null,loadRootComponent:null,errorBoundary:null,errorBoundaryClass:null,domElementGetter:null,parcelCanUpdate:!0,suppressComponentDidCatchWarning:!1,domElements:{},renderResults:{},updateResolves:{},unmountResolves:{}};function lA(e,t){return e.rootComponent?Promise.resolve():e.loadRootComponent(t).then(function(t){e.rootComponent=t})}function lj(e,t){return new Promise(function(n,r){e.suppressComponentDidCatchWarning||!function(e){if(!(e&&"string"==typeof e.version&&e.version.indexOf(".")>=0))return!1;var t=e.version.slice(0,e.version.indexOf("."));try{return Number(t)>=16}catch(e){return!1}}(e.React)||e.errorBoundary||e.errorBoundaryClass||(e.rootComponent.prototype?e.rootComponent.prototype.componentDidCatch||console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent should implement componentDidCatch to avoid accidentally unmounting the entire single-spa application.")):console.warn("single-spa-react: ".concat(t.name||t.appName||t.childAppName,"'s rootComponent does not implement an error boundary. If using a functional component, consider providing an opts.errorBoundary to singleSpaReact(opts).")));var a,o=lB(e,t,function(){n(this)}),i=lO(e,t)(),s=function(e){var t=e.reactDom,n=e.renderType,r=e.elementToRender,a=e.domElement,o=t[n];if("function"!=typeof o)throw Error('renderType "'.concat(n,'" did not return a function.'));switch(n){case"createRoot":case"unstable_createRoot":case"createBlockingRoot":case"unstable_createBlockingRoot":var i=o(a);return i.render(r),i;case"hydrateRoot":return o(a,r);default:return o(r,a),null}}({elementToRender:o,domElement:i,reactDom:lF(e),renderType:"function"==typeof(a=e).renderType?a.renderType():a.renderType});e.domElements[t.name]=i,e.renderResults[t.name]=s})}function lI(e,t){return new Promise(function(n){e.unmountResolves[t.name]=n;var r=e.renderResults[t.name];r&&r.unmount?r.unmount():lF(e).unmountComponentAtNode(e.domElements[t.name]),delete e.domElements[t.name],delete e.renderResults[t.name]})}function lL(e,t){return new Promise(function(n){e.updateResolves[t.name]||(e.updateResolves[t.name]=[]),e.updateResolves[t.name].push(n);var r=lB(e,t,null),a=e.renderResults[t.name];if(a&&a.render)a.render(r);else{var o=lO(e,t)();lF(e).render(r,o)}})}function lF(e){return e.ReactDOMClient||e.ReactDOM}function lB(e,t,n){var r=e.React.createElement(e.rootComponent,t),a=l$?e.React.createElement(l$.Provider,{value:t},r):r;return(e.errorBoundary||t.errorBoundary||e.errorBoundaryClass||t.errorBoundaryClass)&&(e.errorBoundaryClass=e.errorBoundaryClass||t.errorBoundaryClass||function(e,t){function n(t){e.React.Component.apply(this,arguments),this.state={caughtError:null,caughtErrorInfo:null},n.displayName="SingleSpaReactErrorBoundary(".concat(t.name,")")}return n.prototype=Object.create(e.React.Component.prototype),n.prototype.render=function(){return this.state.caughtError?(e.errorBoundary||t.errorBoundary)(this.state.caughtError,this.state.caughtErrorInfo,this.props):this.props.children},n.prototype.componentDidCatch=function(e,t){this.setState({caughtError:e,caughtErrorInfo:t})},n}(e,t),a=e.React.createElement(e.errorBoundaryClass,t,a)),a=e.React.createElement(e.SingleSpaRoot,lT(lT({},t),{},{mountFinished:n,updateFinished:function(){e.updateResolves[t.name]&&(e.updateResolves[t.name].forEach(function(e){return e()}),delete e.updateResolves[t.name])},unmountFinished:function(){e.unmountResolves[t.name]&&(e.unmountResolves[t.name](),delete e.unmountResolves[t.name])}}),a)}var lV=n(7807),lU=n(1619),lW=n.n(lU),lH=n(3432);let lz={strictMode:!0,throwErrorsToConsole:!0,disableTranslations:!1},lK=new Map;(0,lH.initCache)(lK);let lG={errorRetryCount:3,fetcher:aQ,focusThrottleInterval:18e5,revalidateIfStale:!0,revalidateOnFocus:!1,revalidateOnReconnect:!1,refreshInterval:0,shouldRetryOnError:e=>{if(e instanceof a0){let t=e.response.status;return!!(t>=500)||401===t||403===t||429===t}return!0},provider:()=>lK};function lZ(e){if("object"!=typeof e||"string"!=typeof e.featureName||"string"!=typeof e.moduleName)throw Error("Invalid options");let t=Object.assign({},lz,e),n={...lG,...t.swrConfig};return function(e){var r,a,o,i,s;return o=a=class extends(r=lu().Component){componentDidCatch(e,n){n&&n.componentStack&&(e.extra=Object.assign(e.extra||{},{componentStack:n.componentStack})),t.throwErrorsToConsole&&setTimeout(()=>{throw e}),this.setState({caughtError:e,caughtErrorInfo:n})}render(){if(this.state.caughtError)return lu().createElement("div",null,"An error has occurred. Please try reloading the page.");{let r=lu().createElement(ll.Suspense,{fallback:null},lu().createElement(lU.SWRConfig,{value:n},lu().createElement(lc.Provider,{value:this.state.config},t.disableTranslations?lu().createElement(e,this.props):lu().createElement(lV.I18nextProvider,{i18n:window.i18next,defaultNS:this.state.config.extension?`${this.state.config.moduleName}___${this.state.config.extension.extensionSlotName}___${this.state.config.extension.extensionId}`:this.state.config.moduleName},lu().createElement(e,this.props)))));return t.strictMode&&lu().StrictMode?lu().createElement(lu().StrictMode,null,r):r}}constructor(e){super(e),this.state={caughtError:null,caughtErrorInfo:null,config:{moduleName:t.moduleName,featureName:t.featureName,extension:e._extensionContext}}}},i="displayName",s=`OpenmrsReactComponent(${t.featureName})`,i in o?Object.defineProperty(o,i,{value:s,enumerable:!0,configurable:!0,writable:!0}):o[i]=s,a}}function lY(e,t){return function(e){if("object"!==lR(e))throw Error("single-spa-react requires a configuration object");var t,n=lT(lT({},lM),e);if(!n.React)throw Error("single-spa-react must be passed opts.React");if(!n.ReactDOM&&!n.ReactDOMClient)throw Error("single-spa-react must be passed opts.ReactDOM or opts.ReactDOMClient");if(n.renderType||(null!=(t=n.ReactDOMClient)&&t.createRoot?n.renderType="createRoot":n.renderType="render"),!n.rootComponent&&!n.loadRootComponent)throw Error("single-spa-react must be passed opts.rootComponent or opts.loadRootComponent");if(n.errorBoundary&&"function"!=typeof n.errorBoundary)throw Error("The errorBoundary opt for single-spa-react must either be omitted or be a function that returns React elements");!l$&&n.React.createContext&&(l$=n.React.createContext()),n.SingleSpaRoot=function(e){function t(e){t.displayName="SingleSpaRoot(".concat(e.name,")")}return t.prototype=Object.create(e.React.Component.prototype),t.prototype.componentDidMount=function(){setTimeout(this.props.mountFinished)},t.prototype.componentWillUnmount=function(){setTimeout(this.props.unmountFinished)},t.prototype.render=function(){return setTimeout(this.props.updateFinished),this.props.children},t}(n);var r={bootstrap:lA.bind(null,n),mount:lj.bind(null,n),unmount:lI.bind(null,n)};return n.parcelCanUpdate&&(r.update=lL.bind(null,n)),r}({React:lu(),ReactDOMClient:lC,rootComponent:lZ(t)(e)})}function lq(e,t){return()=>e().then(({default:e})=>lY(e,t))}function lJ(e,t){return()=>Promise.resolve(lY(e,t))}let lX=lq,lQ=M()(()=>({}));V("openmrs-app-context",lQ);let l0={};function l1(e,t=e=>e){let n=lQ.getState();return e in n?Object.freeze(Object.assign({},t?t(n[e]):n[e])):null}function l4(e,t){lQ.setState(n=>(e in n||(n[e]={}),n[e]=t(n[e]),Object.assign({},n)))}function l2(e){return null===e?null:Object.freeze(Object.assign({},e))}let l3=new Map;function l6(e,t){let n=(0,ll.useRef)(t??{}),r=(0,ll.useRef)(t=>l4(e,t)),a=(0,ll.useRef)(Symbol());return(0,ll.useEffect)(()=>{let n=t??{},r=a.current;return null===l1(e)?!function(e,t=l0){lQ.setState(n=>{if(e in n)throw Error(`Attempted to re-register namespace ${e} in the app context. Each namespace must be unregistered before the name can be registered again.`);return Object.assign({},n,{[e]:t===l0?{}:t})})}(e,n):(console.warn(`Namespace ${e} is already registered in the app context. This is likely a race condition during navigation, but may indicate two components are trying to own the same namespace. Updating the existing context.`),l4(e,()=>n)),l3.set(e,r),()=>{l3.get(e)===r&&(lQ.setState(t=>(e in t&&delete t[e],t)),l3.delete(e))}},[e]),(0,ll.useEffect)(()=>{let r=t??{};R(n.current,r)||(l4(e,()=>r),n.current=r)},[t]),r.current}function l5({namespace:e,value:t}){return l6(e,t),null}let l9=({children:e,value:t,fallback:n})=>t?lu().createElement(lu().Fragment,null,e):n?lu().createElement(lu().Fragment,null,n):null;function l8(){let e=(0,ll.useRef)();return(!e.current||e.current.signal.aborted)&&(e.current=new AbortController),(0,ll.useEffect)(()=>{let t=e.current;return()=>t?.abort()},[]),e.current}function l7(e,t=e=>e??{}){let[n,r]=(0,ll.useState)(()=>{if(ue(e))return;let n=l1(e);if(null!==n)return t?t(n):n});return(0,ll.useEffect)(()=>{if(ue(e))throw Error(`The namespace supplied to useAppContext must be a non-empty string, but was "${e}".`)},[e]),(0,ll.useEffect)(()=>{var n;let a;return(n=e=>{if(null==e)return void r(void 0);let n=t?t(e):e;r(e=>R(e,n)?e:n)})(l2(a=l1(e))),lQ.subscribe(t=>{let r=e in t?t[e]:null;r!==a&&(a=r,n(l2(r)))})},[e,t]),n}function ue(e){return"string"!=typeof e||0===e.trim().length}function ut(e){let t=lE(e);return(0,ll.useMemo)(()=>t.map(e=>e.id),[t])}function un(e){return lx(e).candidateExtensions}function ur(e,t,n){let{data:r,error:a,mutate:o,isLoading:i,isValidating:s}=lW()(e?ie(e,t,n):null,aQ);return(0,ll.useMemo)(()=>({isLoading:i,data:r?.data.results??[],error:a,mutate:o,isValidating:s}),[r,a,i,s,o])}function ua(e){(0,ll.useEffect)(()=>{if(e){let e=window.getComputedStyle(document.body).overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}},[e])}let uo={},ui=`No ComponentContext has been provided. This should come from "openmrsComponentDecorator".
16
+ Usually this is already applied when using "getAsyncLifecycle" or "getSyncLifecycle".`;function us(e){let{moduleName:t,extension:n}=(0,ll.useContext)(lc),r=e?.externalModuleName??t;if(!r&&!n)throw Error(ui);let a=function(e){let t=(0,ll.useMemo)(()=>tk(e),[e]),n=function(e){let[t,n]=(0,ll.useState)(()=>{let t=e.getState();return t.loaded&&t.config?t.config:null});return(0,ll.useEffect)(()=>e?.subscribe(e=>{e.loaded&&e.config&&n(e.config)}),[e]),t}(t);if(!n)throw uo[e]||(uo[e]=new Promise(e=>{let n=t.subscribe(t=>{t.loaded&&t.config&&(e(t.config),n())})})),uo[e];return n}(r),o=function(e){let t=(0,ll.useMemo)(tR,[]),n=function(e,t){let[n,r]=(0,ll.useState)(t?()=>{let n=tO(e.getState(),t.extensionSlotName,t.extensionId);if(n.loaded&&n.config)return n.config}:null);return(0,ll.useEffect)(()=>{if(t)return e.subscribe(e=>{let a=tO(e,t.extensionSlotName,t.extensionId);a.loaded&&a.config&&!(0,ez.A)(a.config,n)&&r(a.config)})},[e,t,n]),n}(t,e);if(!n&&e){let n=`${e.extensionSlotName}-${e.extensionId}`;throw!uo[n]&&t&&(uo[n]=new Promise(n=>{let r=t.subscribe(t=>{let a=tO(t,e.extensionSlotName,e.extensionId);a.loaded&&a.config&&(n(a.config),r())})})),uo[n]}return n||{}}(n);return(0,ll.useMemo)(()=>e?.externalModuleName&&r===e.externalModuleName?{...a}:{...a,...o},[r,e?.externalModuleName,a,o])}let ul=lE;function uu(e,t=300){let[n,r]=(0,ll.useState)(e);return(0,ll.useEffect)(()=>{let n=setTimeout(()=>{r(e)},t);return()=>{clearTimeout(n)}},[e,t]),n}var uc=n(3660),ud=n.n(uc);let um=`custom:${[["admissionDecisionConcept","ref"],["admissionEncounterType","ref"],["admissionForm","ref"],["atFacilityVisitType","ref"],["bedAssignmentEncounterType","ref"],["cancelADTRequestEncounterType","ref"],["checkInClerkEncounterRole","ref"],["checkInEncounterType","ref"],["clinicianEncounterRole","ref"],["conceptSourcesForDiagnosisSearch","ref"],["consultEncounterType","ref"],["consultFreeTextCommentsConcept","ref"],["denyAdmissionConcept","ref"],["diagnosisMetadata","ref"],["diagnosisSets","ref"],["dischargeForm","ref"],["dispositionDescriptor","ref"],["dispositions","ref"],["emrApiConceptSource","ref"],["exitFromInpatientEncounterType","ref"],["extraPatientIdentifierTypes","ref"],["fullPrivilegeLevel","ref"],["highPrivilegeLevel","ref"],["identifierTypesToSearch","ref"],["inpatientNoteEncounterType","ref"],["lastViewedPatientSizeLimit","ref"],["metadataSourceName","ref"],["motherChildRelationshipType","ref"],["narrowerThanConceptMapType","ref"],["nonDiagnosisConceptSets","ref"],["orderingProviderEncounterRole","ref"],["patientDiedConcept","ref"],["personImageDirectory","ref"],["primaryIdentifierType","ref"],["sameAsConceptMapType","ref"],["suppressedDiagnosisConcepts","ref"],["supportsAdmissionLocationTag","(uuid,display,name,links)"],["supportsLoginLocationTag","(uuid,display,name,links)"],["supportsTransferLocationTag","(uuid,display,name,links)"],["supportsVisitsLocationTag","(uuid,display,name,links)"],["telephoneAttributeType","ref"],["testPatientPersonAttributeType","ref"],["transferForm","ref"],["transferRequestEncounterType","ref"],["transferWithinHospitalEncounterType","ref"],["unknownCauseOfDeathConcept","ref"],["unknownLocation","ref"],["unknownPatientPersonAttributeType","ref"],["unknownProvider","ref"],["visitAssignmentHandlerAdjustEncounterTimeOfDayIfNecessary","ref"],["visitExpireHours","ref"],["visitNoteEncounterType","ref"]].map(([e,t])=>`${e}:${t}`).join(",")}`;function up(){let e=`${aY}/emrapi/configuration?v=${um}`,t=ud()(e,aQ);return(0,ll.useMemo)(()=>({emrConfiguration:t.data?.data,isLoadingEmrConfiguration:t.isLoading,mutateEmrConfiguration:t.mutate,errorFetchingEmrConfiguration:t.error}),[t])}function uf(){return(0,ll.useContext)(lc).extension}let uh=lv(st());function ug(e){let t=lE(e);return(0,ll.useMemo)(()=>Object.fromEntries(t.map(e=>[e.name,e.meta])),[t])}let uy=lv(sc());function uv(e){let{flags:t}=lg(i4);return t[e]?.enabled??!1}function ub(){let[,e]=(0,ll.useState)(0);return(0,ll.useCallback)(()=>{e(e=>e+1)},[])}function uw(e,t,n={}){return uD(e,t,ux,n)}let ux={getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(aX(e.toString()),window.location.toString());return r.searchParams.set("limit",""+t),r.searchParams.set("startIndex",""+n),r.searchParams.set("totalCount","true"),r.toString()}},getNextUrl:e=>{let t=e?.links?.find(e=>"next"==e.rel)?.uri;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.totalCount??NaN,getCurrentPageSize:e=>e?.results?.length??NaN,getData:e=>e?.results};function uD(e,t,n,r={}){let{getPaginatedUrl:a,getTotalCount:o,getCurrentPageSize:i,getData:s}=n,{immutable:l,swrConfig:u}=r,c=r.fetcher??aQ,[d,m]=(0,ll.useState)(1),p=(0,ll.useRef)(NaN),f=(0,ll.useRef)(NaN),h=(0,ll.useRef)(d),g=(0,ll.useRef)(!1),y=(0,ll.useRef)(!1),v=e?.toString()??"",[b,w]=(0,ll.useState)(v);v!==b&&(w(v),m(1),h.current=1,p.current=NaN,f.current=NaN,g.current=!1,y.current=!1);let x=(d-1)*t,D=(0,ll.useMemo)(()=>a(e,t,x),[e,t,x]),{data:E,..._}=(l?ud():lW())(D,c,u);E?.data&&(p.current=o(E?.data),f.current=i(E?.data),g.current=!0);let S=Math.ceil(p.current/t),k=(0,ll.useCallback)(e=>{if(!Number.isInteger(e)||e<1)return void console.warn(`useServerPagination: ignoring goTo(${e}); page must be a positive integer.`);let n=Math.ceil(p.current/t);!g.current||Number.isNaN(n)||e<=n?(h.current=e,m(e)):console.warn("Invalid attempt to go to out of bounds page: "+e)},[t]);(0,ll.useEffect)(()=>{if(!g.current)return;if(Number.isNaN(p.current)){y.current||(y.current=!0,console.warn(`useServerPagination: ${v} returned no total count, so out-of-range pages cannot be detected.`));return}let e=Math.max(1,Math.ceil(p.current/t));d>e&&(console.warn(`Invalid attempt to go to out of bounds page: ${d}; returning to page ${e}.`),h.current=e,m(e))},[d,t,v,E]);let C=(0,ll.useCallback)(()=>{k(h.current+1)},[k]),P=(0,ll.useCallback)(()=>{k(h.current-1)},[k]);return{data:s(E?.data),totalPages:S,totalCount:p.current,currentPage:d,currentPageSize:f.current,paginated:S>1,showNextButton:d<S,showPreviousButton:d>1,goTo:k,goToNext:C,goToPrevious:P,..._}}function uE(e,t,n={}){return uD(e,t,u_(),n)}function u_(){return{getPaginatedUrl:(e,t,n)=>{if(!e)return null;{let r=new URL(aX(e.toString()),window.location.toString());return r.searchParams.set("_count",""+t),r.searchParams.set("_getpagesoffset",""+n),r.toString()}},getNextUrl:e=>{let t=e?.link?.find(e=>"next"==e.relation)?.url;if(!t)return null;{let e=new URL(t);return e.host=window.location.host,e.protocol=window.location.protocol,e.toString()}},getTotalCount:e=>e?.total??NaN,getCurrentPageSize:e=>e?.entry?.length??NaN,getData:e=>e?.entry?.map(e=>e.resource)}}var uS=n(682),uk=n.n(uS);function uC(e,t={}){return uP(e,ux,t)}function uP(e,t,n={}){let{swrInfiniteConfig:r,immutable:a}=n,{getNextUrl:o,getTotalCount:i,getData:s}=t,l=n.fetcher??aQ,u=(0,ll.useCallback)((n,r)=>0==n?e?.toString()??null:t.getNextUrl(r.data),[e]),{data:c,size:d,setSize:m,...p}=uk()(u,l,{...r,...a?{revalidateIfStale:!1,revalidateOnFocus:!1,revalidateOnReconnect:!1}:{}}),f=o(c?.[c.length-1].data),h=i(c?.[0]?.data);return{data:c?.flatMap(e=>s(e.data)),totalCount:h,hasMore:null!=f,loadMore:()=>{m((c?.length??0)+1)},nextUri:f,...p}}function uT(e,t={}){return uR(e,ux,t)}function uR(e,t,n={}){let r=uP(e,t,n),{hasMore:a,error:o,data:i,loadMore:s,isLoading:l,nextUri:u}=r;return((0,ll.useEffect)(()=>{a&&!o&&s()},[a,u]),n.partialData)?r:{...r,data:a||o?void 0:i,isLoading:l||a}}function uN(e,t={}){return uR(e,u_(),t)}function uO(e,t={}){return uP(e,u_(),t)}function u$(){let e="tablet";return document.body.classList.forEach(t=>{switch(t){case"omrs-breakpoint-lt-tablet":e="phone";break;case"omrs-breakpoint-gt-small-desktop":e="large-desktop";break;case"omrs-breakpoint-gt-tablet":e="small-desktop"}}),e}function uM(){let[e,t]=(0,ll.useState)(u$);return(0,ll.useEffect)(()=>{let e=()=>{t(u$())};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let uA=e=>"small-desktop"===e||"large-desktop"===e;function uj(e){let t=(0,ll.useContext)(lc);(0,ll.useEffect)(()=>(t&&t.moduleName&&(e.componentContext=t),sz(e),()=>{sK(e.name)}),[t,e])}function uI(){return lg(sH)}let uL=[];function uF(e=null,t=null){let n=new URLSearchParams;e&&n.set("tag",e),t&&n.set("q",t);let r=n.toString(),{data:a}=uT(`${aY}/location${r?"?"+r:""}`,{immutable:!0});return a??uL}function uB(e,t=!0){let n=(0,ll.useRef)(null);return(0,ll.useEffect)(()=>{let r=r=>{t&&n.current&&r.target&&r.target instanceof Node&&(n.current.contains(r.target)||e(r))};return window.addEventListener("mousedown",r),window.addEventListener("touchstart",r),()=>{window.removeEventListener("mousedown",r),window.removeEventListener("touchstart",r)}},[e,t]),n}function uV(e){let t=(0,ll.useRef)();return(0,ll.useEffect)(()=>{let n=new IntersectionObserver(t=>{for(let n of t)if(n.isIntersecting)return void e()},{threshold:1});return t.current&&n.observe(t.current),()=>{t.current&&n.unobserve(t.current)}},[t.current,e]),t}function uU(e,t={}){let{abortController:n,fetchInit:r,url:a,swrConfig:o}=t,i=l8(),s=(0,ll.useMemo)(()=>r?.signal??n?.signal??i.signal,[n?.signal,r?.signal,i.signal]),l=(0,ll.useCallback)(e=>aQ(function(e,t){if(t)return"function"==typeof t?t(e):t;if("string"==typeof e)return e;throw Error(`When using useOpenmrsSWR with a key that is not a string, you must provide a url() function that converts the key to a valid url. The key for this hook is ${e}.`)}(e,a),{...r,signal:s}),[s,r,a]);return lW()(e,l,o)}function uW(e=[],t=10){let[n,r]=(0,ll.useState)(1),a=(0,ll.useMemo)(()=>"number"==typeof t&&t>0?Math.max(1,Math.ceil(e.length/t)):1,[e.length,t]);n>a&&r(a);let o=Math.min(Math.max(1,n),a),i=(0,ll.useMemo)(()=>{let n=(o-1)*t,r=(o+0)*t;return e.slice(n,r)},[e,o,t]),s=(0,ll.useCallback)(e=>{!Number.isInteger(e)||e<1?console.warn(`usePagination: ignoring goTo(${e}); page must be a positive integer.`):r(e)},[]),l=(0,ll.useCallback)(()=>{r(e=>e+1)},[]),u=(0,ll.useCallback)(()=>{r(e=>Math.max(1,e-1))},[]);return(0,ll.useMemo)(()=>({results:i,totalPages:a,currentPage:o,paginated:e.length>t,showNextButton:o<a,showPreviousButton:o>1,goTo:s,goToNext:l,goToPrevious:u}),[i,a,e.length,t,o,s,l,u])}function uH(e,t,n,r){return{pageSizes:(0,ll.useMemo)(()=>{let n=Math.ceil(t/e);return isNaN(n)&&(n=0),[...Array(n).keys()].map(t=>(t+1)*e)},[e,t]),pageItemsCount:(0,ll.useMemo)(()=>e>t?t:e*n>t?e*(n-1)+r:e*n,[e,t,n,r])}}function uz(){let e=/\/patient\/([a-zA-Z0-9\-]+)\/?/.exec(location.pathname);return e&&e[1]}function uK(e){let[t,n]=(0,ll.useState)(e??uz()),{data:r,error:a,isValidating:o}=lW()(t?["patient",t]:null,()=>ia(t,{}));return(0,ll.useEffect)(()=>{let e=()=>{let e=uz();e!==t&&n(e)};return window.addEventListener("single-spa:routing-event",e),()=>window.removeEventListener("single-spa:routing-event",e)},[t]),(0,ll.useMemo)(()=>({isLoading:o&&!a&&!r,patient:r,patientUuid:t,error:a}),[o,a,r,t])}function uG(){let e=`${aY}/metadatamapping/termmapping?v=custom:(metadataUuid)&code=emr.primaryIdentifierType`,{data:t,error:n,isLoading:r}=lW()(e,aQ);return(0,ll.useMemo)(()=>({primaryIdentifierCode:t?.data?.results[0]?.metadataUuid,isLoading:r,error:n}),[t,n,r])}function uZ(e){let{extensions:t,extensionSlotModuleName:n}=l_(e);return e?t.map(t=>({state:r})=>lu().createElement(lc.Provider,{value:{moduleName:n,featureName:"",extension:{extensionId:t.id,extensionSlotName:e,extensionSlotModuleName:n,extensionMeta:t.meta}}},lu().createElement(lm,{state:r}))):[]}function uY(){let e=(0,ll.useRef)(),[t,n]=(0,ll.useState)(null),r=null;if(!t){if(o){let e=a5().getState();e.loaded&&(r=e.session)}else o=new Promise(t=>{let n=({loaded:n,session:a})=>{n&&(t(a),r=a,e.current&&(e.current(),e.current=void 0))};n(a5().getState()),r||(e.current=a5().subscribe(n))});if(r)n(r);else throw o}(0,ll.useEffect)(()=>(e.current||(e.current=a5().subscribe(({loaded:e,session:t})=>{e&&(r=t,n(t))})),()=>{e.current&&(e.current(),e.current=void 0)}),[]);let a=t||r;if(!a)if(o)throw console.warn("useSession is in an unexpected state. Attempting to recover."),o;else throw Error("useSession is in an invalid state.");return a}let uq=({privilege:e,fallback:t,children:n})=>{let[r,a]=(0,ll.useState)(null);return((0,ll.useEffect)(()=>{let e=a5(),t=e.subscribe(({loaded:e,session:t})=>{a(e?t?.user??null:null)}),{loaded:n,session:r}=e.getState();return n&&a(r?.user??null),t},[]),r&&oe(e,r))?lu().createElement(lu().Fragment,null,n):t?lu().createElement(lu().Fragment,null,t):null};var uJ=n(222),uX=n.n(uJ),uQ=n(5602);let u0=new Map;function u1(){for(let e of Array.from(u0.values()))e()}let u4={setVisitContext:(e,t)=>null==t?{manuallySetVisitUuid:null}:{manuallySetVisitUuid:t.uuid,patientUuid:t.patient?.uuid}};function u2(e){let t=(0,ll.useId)();return(0,ll.useEffect)(()=>{if(e)return u0.set(t,e),()=>{u0.delete(t)}},[t,e]),{...ly(iy(),u4),mutateVisit:u1}}function u3(e,t=ih){let n=(0,ll.useRef)(void 0),{patientUuid:r,manuallySetVisitUuid:a,setVisitContext:o}=u2((0,ll.useCallback)(()=>n.current?.(),[])),i=e&&r==e?a:null,s=`?patient=${e}&v=${t}&includeInactive=false`,l=`/${i}?v=${t}`,{data:u,error:c,mutate:d,isValidating:m}=lW()(e?`${aY}/visit${s}`:null,aQ),{data:p,error:f,mutate:h,isValidating:g}=lW()(e&&i?`${aY}/visit${l}`:null,aQ),y=(0,ll.useMemo)(()=>u?.data.results.find(e=>null===e.stopDatetime)??null,[u]),v=(0,ll.useMemo)(()=>i&&p?p.data:null,[p,i]),b=(0,ll.useRef)(null);(0,ll.useEffect)(()=>{!m&&y&&r===e&&null===a&&o(y),g||(b.current&&v&&b.current.uuid===v.uuid&&!b.current.stopDatetime&&v.stopDatetime&&o(null),b.current=v)},[v,a,y,m,g,r]);let w=(0,ll.useCallback)(()=>{d(),h()},[d,h]);(0,ll.useEffect)(()=>{n.current=w},[w]);let x=!!(!u||i&&!p),D=!!(i?f:c);return{error:c||f,mutate:w,isValidating:m||g,activeVisit:y,currentVisit:v,currentVisitIsRetrospective:!!i,isLoading:x&&!D}}uX().extend(uQ);let u6=[];function u5(){let{data:e}=ud()(ic,id);return e??u6}let u9=new Map;async function u8(e,t){let n=t.indexOf("#"),r=n>=0,a=r?t.substring(0,n):e,o=r?t.substring(n+1):t,i=await oI(a);return i&&Object.hasOwn(i,o)&&"function"==typeof i[o]?ce(a,i).then(()=>i[o]()):(i?i&&Object.hasOwn(i,o)?console.warn(`The export ${t}, defined in ${e}'s routes.json, is not a function`):console.warn(`${a} does not define a component called "${o}", referenced in ${e}'s routes.json. This cannot be loaded.`):console.warn(`Unknown app ${a} for ${t} defined in ${e}'s routes.json`),u7)}let u7={bootstrap:()=>Promise.resolve(),mount:()=>Promise.resolve(),unmount:()=>Promise.resolve()};async function ce(e,t){if(e in u9)await u9[e];else{let n=t??await oI(e);await (u9[e]=new Promise((t,r)=>{if(Object.hasOwn(n,"startupApp")){let a=n.startupApp;if("function"==typeof a)return Promise.resolve(a()).then(()=>{tQ(e),t(null)}).catch(r)}tQ(e),t(null)}))}}function ct(e,t){let n=t.name;if(!n)return void console.error(`An extension definition in ${e} is missing an name and thus cannot be
17
17
  registered. To fix this, ensure that you define the "name" field inside the
18
18
  extension definition.`,t);t.slots&&t.slot&&console.warn(`The extension ${n} from ${e} declares both a 'slots' property and
19
19
  a 'slot' property. Only the 'slots' property will be honored.`);let r=t.slots?t.slots:t.slot?[t.slot]:[];if(!t.component)return void console.error(`The extension ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
20
- To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let a of(sR({name:n,load:()=>u2(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))sN(a,n)}let u9=[];function u8(e,t){sl(()=>(function(e,t){if(e&&t&&"object"==typeof t){tX(e);let n=t.extensions??[],r=t.modals??[],a=t.workspaces??[],o=t.workspaceGroups??[],i=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?u9.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?u5(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let n;(n=t.name)?t.component?sW({name:n,moduleName:e,load:()=>u2(e,t.component)}):console.error(`The modal ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
20
+ To fix this, ensure that you define a 'component' field inside the extension definition.`,t);for(let a of(sA({name:n,load:()=>u8(e,t.component),meta:t.meta||{},order:t.order,moduleName:e,privileges:t.privileges,featureFlag:t.featureFlag,displayExpression:t.displayExpression}),r))sj(a,n)}let cn=[];function cr(e,t){sp(()=>(function(e,t){if(e&&t&&"object"==typeof t){tX(e);let n=t.extensions??[],r=t.modals??[],a=t.workspaces??[],o=t.workspaceGroups??[],i=t.featureFlags??[],s=t.workspaceGroups2??[],l=t.workspaceWindows2??[],u=t.workspaces2??[];t.pages?.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"component")&&(Object.hasOwn(t,"route")||Object.hasOwn(t,"routeRegex")||Object.hasOwn(t,"routes"))?cn.push({...t,appName:e}):console.warn(`A page for ${e} could not be registered as it does not appear to have the required properties`,t)}),n.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?ct(e,t):console.warn(`An extension for ${e} could not be registered as it does not appear to have the required properties`,t)}),r.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")){let n;(n=t.name)?t.component?sZ({name:n,moduleName:e,load:()=>u8(e,t.component)}):console.error(`The modal ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
21
21
  To fix this, ensure that you define a 'component' field inside the modal definition.`,t):console.error(`A modal definition in ${e} is missing an name and thus cannot be
22
22
  registered. To fix this, ensure that you define the "name" field inside the
23
23
  modal definition.`,t)}else console.warn(`A modal for ${e} could not be registered as it does not appear to have the required properties`,t)}),a.forEach(t=>{t&&"object"==typeof t&&Object.hasOwn(t,"name")&&Object.hasOwn(t,"component")?function(e,t){let n=t.name;if(!n)return console.error(`A workspace definition in ${e} is missing a name and thus cannot be registered.
24
24
  To fix this, ensure that you define the "name" field inside the workspace definition.`,t);let r=t.title;if(!r)return console.error(`A workspace definition in ${e} is missing a title and thus cannot be registered.
25
25
  To fix this, ensure that you define the "title" field inside the workspace definition.`,t);if(!t.component)return console.error(`The workspace ${n} from ${e} is missing a 'component' entry and thus cannot be registered.
26
- To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let a of(sG({name:n,title:r,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>u2(e,t.component)}),t.groups||[]))sZ({name:a,members:[n]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let n;(n=t.name)?sZ({name:n,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
- To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),s4(e,s);for(let t of(s2(e,l),l))t.icon&&u5(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});s3(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?iX(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
26
+ To fix this, ensure that you define a 'component' field inside the workspace definition.`,t);for(let a of(sX({name:n,title:r,component:t.component,moduleName:e,type:t.type,canHide:t.canHide,canMaximize:t.canMaximize,width:t.width,preferredWindowSize:t.preferredWindowSize,groups:t.groups,load:()=>u8(e,t.component)}),t.groups||[]))sQ({name:a,members:[n]})}(e,t):console.warn(`A workspace for ${e} could not be registered as it does not appear to have the required properties`,t)}),o.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"name")){let n;(n=t.name)?sQ({name:n,members:t.members??[]}):console.error(`A workspace group definition in ${e} is missing a name and thus cannot be registered.
27
+ To fix this, ensure that you define the "name" field inside the workspace definition.`,t)}else console.warn(`A workspace group for ${e} could not be registered as it does not appear to have the required properties`,t)}),s9(e,s);for(let t of(s8(e,l),l))t.icon&&ct(e,{name:t.name,component:t.icon,slot:t.group,order:t.order});s7(e,u),i.forEach(t=>{if(t&&"object"==typeof t&&Object.hasOwn(t,"flagName"))t.flagName?t.label?t.description?i2(t.flagName,t.label,t.description):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
28
28
  To fix this, ensure that you define the "description" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a description and thus cannot be registered.
29
29
  To fix this, ensure that you define the "label" field inside the feature flag definition.`,t):console.error(`A feature flag definition in ${e} is missing a name and thus cannot be registered.
30
- To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function u7(){u9.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of u9){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,a=t.containerDomId??"omrs-apps-container",o=document.getElementById(a),i=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=i,o?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${a}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
- To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rB(e,()=>u2(t.appName,t.component),function(e,{featureFlag:t}){return t?n=>!!i0(t)&&e(n):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?rK(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
- To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let ce={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function ct(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<ce.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>ce.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>ce.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<ce.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<ce.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<ce.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>ce.SMALL_DESKTOP_MAX)}let cn=!1;function cr(){cn||(window.addEventListener("resize",ct),ct(),cn=!0)}var ca=n(1085),co=n(3373),ci=n.n(co);function cs({title:e,children:t}){let n="tablet"===uT();return(0,ca.jsxs)("div",{className:ci()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,ca.jsx)("h4",{children:e}),t]})}let cl=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],cu={primaryColor:{_type:th.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nx.oneOf(cl)]},secondaryColor:{_type:th.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nx.oneOf(cl)]}},cc={"Brand color #1":{_default:"#005d5d",_type:th.String},"Brand color #2":{_default:"#004144",_type:th.String},"Brand color #3":{_default:"#007d79",_type:th.String},excludePatientIdentifierCodeTypes:{uuids:{_type:th.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:th.UUID}}},implementationName:{_type:th.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:th.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:th.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[nx.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:th.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:th.String}},diagnosisTags:cu};var cd=n(324);let cm={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},cp=e=>(0,ca.jsx)(cd.TableBatchActions,{translateWithId:(e,t)=>{let n=cm[e];return n?aj(n,e,t):e},...e}),cf="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",ch="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",cg="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",cy="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",cv=(0,lr.createContext)(null);function cb(){let e=(0,lr.useContext)(cv);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function cw({menuTitle:e,children:t}){let[n,r]=la().useState(!1),a=uA(()=>r(!1),n),o="tablet"===uT(),i=(0,lr.useCallback)(()=>r(e=>!e),[]),s=(0,lr.useRef)(null),l=(0,lr.useRef)(null),u=(0,lr.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,m=(0,lr.useCallback)(()=>{r(!1),s.current?.focus()},[]),p=(0,lr.useMemo)(()=>({closeMenu:m}),[m]),f=(0,lr.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),m())},[m,n]),h=lr.Children.toArray(t);(0,lr.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,lr.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,a=Array.from(n).indexOf(r);if(-1===a)return void n[t>0?0:n.length-1]?.focus();let o=a+t,i=o<0?n.length-1:o>=n.length?0:o;n[i]?.focus()},[]),y=h.map((e,t)=>(0,lr.isValidElement)(e)?(0,lr.cloneElement)(e,{closeMenu:m,handleOverflowMenuItemFocus:g,index:t}):e);return(0,ca.jsxs)("div",{"data-overflow-menu":!0,className:ci()("cds--overflow-menu",cf),ref:a,children:[(0,ca.jsx)("button",{className:ci()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},cy),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:f,ref:s,children:e}),(0,ca.jsxs)("div",{className:ci()("cds--overflow-menu-options","cds--overflow-menu--flip",ch,{[cg]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:f,ref:l,role:"menu",tabIndex:-1,children:[(0,ca.jsx)("ul",{className:ci()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":o}),children:(0,ca.jsx)(cv.Provider,{value:p,children:y})}),(0,ca.jsx)("span",{})]})]})}function cx(e){let t=(0,lr.useContext)(cv);return(0,ca.jsx)(cd.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var cD=n(5571);let cE=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],c_=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),cS=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-add",iconProps:e})})),ck=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),cC=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),cP=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),cT=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),cR=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),cN=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),cO=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),c$=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),cM=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),cA=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),cj=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),cI=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),cL=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),cF=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),cB=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),cV=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),cU=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),cW=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),cH=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),cz=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),cK=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-close",iconProps:e})})),cG=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),cZ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),cY=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-document",iconProps:e})})),cq=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),cJ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-download",iconProps:e})})),cX=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),cQ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),c0=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),c1=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-events",iconProps:e})})),c4=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),c2=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),c3=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),c6=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),c5=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),c9=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-group",iconProps:e})})),c8=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),c7=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),de=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),dt=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-information",iconProps:e})})),dn=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),dr=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),da=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),di=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),ds=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),dl=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-location",iconProps:e})})),du=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),dc=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),dd=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),dm=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),dp=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),df=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),dh=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-money",iconProps:e})})),dg=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),dy=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),dv=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),db=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dw=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-password",iconProps:e})})),dx=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),dD=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),dE=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),d_=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),dS=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),dk=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),dC=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),dP=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-report",iconProps:e})})),dT=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),dR=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-save",iconProps:e})})),dN=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-search",iconProps:e})})),dO=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),d$=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),dM=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),dA=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),dj=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),dI=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),dL=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),dF=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-table",iconProps:e})})),dB=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-time",iconProps:e})})),dV=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),dU=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),dW=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),dH=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),dz=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),dK=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),dG=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),dZ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),dY=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-user",iconProps:e})})),dq=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),dJ=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-view",iconProps:e})})),dX=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(d6,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),dQ=dX,d0=cq,d1=ds,d4=de,d2=dA,d3=(0,lr.memo)((0,lr.forwardRef)(function({icon:e,fallback:t,...n},r){let a=(0,lr.useRef)(e?document.getElementById(e):void 0);return(0,lr.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,ca.jsx)(l4,{value:a.current,fallback:t,children:(0,ca.jsx)(d6,{ref:r,icon:e,iconProps:n})})})),d6=(0,lr.memo)((0,lr.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,fill:a,size:o}=Object.assign({},{fill:"currentColor",size:20},t);(o<=0||o>72)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 20.`),o=20);let i=(0,lr.useRef)(null);return(0,lr.useImperativeHandle)(n,()=>i.current),(0,lr.useEffect)(()=>{i.current&&"currentColor"!==a&&i.current.style.setProperty("--omrs-icon-fill",a)},[]),(0,ca.jsx)("svg",{ref:i,className:ci()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:o,width:o,viewBox:"0 0 16 16",children:(0,ca.jsx)("use",{href:`#${e}`})})})),d5=({path:e,title:t,basePath:n,icon:r})=>{let{t:a}=(0,lj.useTranslation)(),o=(0,cD.useLocation)(),i=(0,lr.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(o.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[o.pathname,e]);return(0,ca.jsx)("div",{children:(0,ca.jsx)(li,{className:ci()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${n}/${encodeURIComponent(e)}`,children:(0,ca.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,ca.jsx)(d3,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,ca.jsx)("span",{children:a(t)})]})})},e)};function d9(e){return function({basePath:t}){return(0,ca.jsx)(cD.BrowserRouter,{children:(0,ca.jsx)(d5,{basePath:t,...e})})}}function d8(e){let t=(0,lr.useRef)(null),n=(0,lr.useRef)(void 0),r=(0,lr.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,lr.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function d7(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=me(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():me(e[n],null)})}}}function me(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mt(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let mn="u">typeof document?la().useLayoutEffect:()=>{},mr={prefix:String(Math.round(1e10*Math.random())),current:0},ma=la().createContext(mr),mo=la().createContext(!1),mi=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),ms="function"==typeof la().useId?function(e){let t=la().useId(),[n]=(0,lr.useState)(md()),r=n?"react-aria":`react-aria${mr.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,lr.useContext)(ma),n=function(e=!1){let t=(0,lr.useContext)(ma),n=(0,lr.useRef)(null);if(null===n.current&&!e){let e=la().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=mi.get(e);null==n?mi.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,mi.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function ml(){return!1}function mu(){return!0}function mc(e){return()=>{}}function md(){return"function"==typeof la().useSyncExternalStore?la().useSyncExternalStore(mc,ml,mu):(0,lr.useContext)(mo)}let mm=!!("u">typeof window&&window.document&&window.document.createElement),mp=new Map;function mf(e){let[t,n]=(0,lr.useState)(e),r=(0,lr.useRef)(null),a=ms(t),o=(0,lr.useRef)(null);if(i&&i.register(o,a),mm){let e=mp.get(a);e&&!e.includes(r)?e.push(r):mp.set(a,[r])}return mn(()=>()=>{i&&i.unregister(o),mp.delete(a)},[a]),(0,lr.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function mh(e=[]){let t=mf(),[n,r]=function(e){let[t,n]=(0,lr.useState)(e),r=(0,lr.useRef)(t),a=(0,lr.useRef)(null),o=(0,lr.useRef)(()=>{if(!a.current)return;let e=a.current.next();if(e.done){a.current=null;return}r.current===e.value?o.current():n(e.value)});return mn(()=>{r.current=t,a.current&&o.current()}),[t,(0,lr.useCallback)(e=>{a.current=e(r.current),o.current()},[o])]}(t),a=(0,lr.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return mn(a,[t,a,...e]),n}"u">typeof FinalizationRegistry&&(i=new FinalizationRegistry(e=>{mp.delete(e)}));let mg=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r};function my(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],a=r[e];"function"==typeof n&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mt(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=mg(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=mp.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mp.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):"ref"===e&&n&&a?t.ref=d7(n,a):t[e]=void 0!==a?a:n}}return t}let mv=Symbol("default");function mb({values:e,children:t}){for(let[n,r]of e)t=la().createElement(n.Provider,{value:r},t);return t}function mw(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,lr.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:l||i?{...i,...l}:void 0,children:null!=u?u:o,"data-rac":""}},[t,n,r,a,o,i,s])}function mx(e,t){let n=(0,lr.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||mv;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function mD(e,t,n){let{ref:r,...a}=mx(n,e.slot)||{},o=d8((0,lr.useMemo)(()=>d7(t,r),[t,r])),i=my(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function mE(e=!0){let[t,n]=(0,lr.useState)(e),r=(0,lr.useRef)(!1),a=(0,lr.useCallback)(e=>{r.current=!0,n(!!e)},[]);return mn(()=>{r.current||n(!1)},[]),[a,t]}function m_(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let mS=(0,lr.createContext)(null),mk=null;function mC(e,t="assertive",n=7e3){mk?mk.announce(e,t,n):(mk=new mP,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mk.announce(e,t,n):setTimeout(()=>{(null==mk?void 0:mk.isAttached())&&(null==mk||mk.announce(e,t,n))},100))}class mP{isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mT=new Set(["id"]),mR=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mN=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mO=new Set(["dir","lang","hidden","inert","translate"]),m$=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),mM=/^(data-.*)$/;function mA(e,t={}){let{labelable:n,isLink:r,global:a,events:o=a,propNames:i}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mT.has(t)||n&&mR.has(t)||r&&mN.has(t)||a&&mO.has(t)||o&&(m$.has(t)||t.endsWith("Capture")&&m$.has(t.slice(0,-7)))||i?.has(t)||mM.test(t))&&(s[t]=e[t]);return s}function mj(e){if(function(){if(null==mI){mI=!1;try{document.createElement("div").focus({get preventScroll(){return mI=!0,!0}})}catch{}}return mI}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let mI=null,mL=e=>e?.ownerDocument??document,mF=e=>e&&"window"in e&&e.window===e?e:mL(e).defaultView||window;function mB(e,t){return!!t&&!!e&&e.contains(t)}function mV(e){return e.target}function mU(e){if(!e)return!1;let t=e.getRootNode(),n=mF(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let mW="u">typeof Element&&"checkVisibility"in Element.prototype;function mH(e,t){return mW?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=mF(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a="none"!==n&&"hidden"!==r&&"collapse"!==r;if(a){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);a="none"!==n&&"hidden"!==r&&"collapse"!==r}return a}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||mH(e.parentElement,e))}let mz=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],mK=mz.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mz.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mG=mz.join(':not([hidden]):not([tabindex="-1"]),');function mZ(e,t){return e.matches(mK)&&!mq(e)&&(t?.skipVisibilityCheck||mH(e))}function mY(e){return e.matches(mG)&&mH(e)&&!mq(e)}function mq(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function mJ(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function mX(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function mQ(e){let t=(0,lr.useRef)({isFocused:!1,observer:null});return mn(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,lr.useCallback)(n=>{let r=mV(n);(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&(t.current.isFocused=!0,r.addEventListener("focusout",n=>{if(t.current.isFocused=!1,r.disabled){let t=mJ(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer?.disconnect();let e=r===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let m0=!1;function m1(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function m4(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function m2(e){let t=null;return()=>(null==t&&(t=e()),t)}let m3=m2(function(){return m4(/^Mac/i)}),m6=m2(function(){return m4(/^iPhone/i)}),m5=m2(function(){return m4(/^iPad/i)||m3()&&navigator.maxTouchPoints>1}),m9=m2(function(){return m6()||m5()});m2(function(){return m3()||m9()});let m8=m2(function(){return m1(/AppleWebKit/i)&&!m7()}),m7=m2(function(){return m1(/Chrome/i)}),pe=m2(function(){return m1(/Android/i)}),pt=m2(function(){return m1(/Firefox/i)});function pn(e){return""===e.pointerType&&!!e.isTrusted||(pe()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function pr(e,t,n=!0){let{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}=t;pt()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(m3()?r=!0:a=!0);let s=m8()&&m3()&&!m5()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}):new MouseEvent("click",{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i,detail:1,bubbles:!0,cancelable:!0});pr.isOpening=n,mj(e),e.dispatchEvent(s),pr.isOpening=!1}pr.isOpening=!1;let pa=null,po=new Set,pi=new Map,ps=!1,pl=!1,pu={Tab:!0,Escape:!0};function pc(e,t){for(let n of po)n(e,t)}function pd(e){ps=!0,pr.isOpening||e.metaKey||!m3()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(pa="keyboard",pc("keyboard",e))}function pm(e){pa="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(ps=!0,pc("pointer",e))}function pp(e){!pr.isOpening&&pn(e)&&(ps=!0,pa="virtual")}function pf(e){let t=mF(mV(e)),n=mL(mV(e));mV(e)!==t&&mV(e)!==n&&!m0&&e.isTrusted&&(ps||pl||(pa="virtual",pc("virtual",e)),ps=!1,pl=!1)}function ph(){m0||(ps=!1,pl=!0)}function pg(e){if("u"<typeof window||"u"<typeof document)return;let t=mF(e),n=mL(e);if(pi.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){ps=!0,r.apply(this,arguments)},n.addEventListener("keydown",pd,!0),n.addEventListener("keyup",pd,!0),n.addEventListener("click",pp,!0),t.addEventListener("focus",pf,!0),t.addEventListener("blur",ph,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",pm,!0),n.addEventListener("pointermove",pm,!0),n.addEventListener("pointerup",pm,!0)),t.addEventListener("beforeunload",()=>{py(e)},{once:!0}),pi.set(t,{focus:r})}let py=(e,t)=>{let n=mF(e),r=mL(e);t&&r.removeEventListener("DOMContentLoaded",t),pi.has(n)&&(n.HTMLElement.prototype.focus=pi.get(n).focus,r.removeEventListener("keydown",pd,!0),r.removeEventListener("keyup",pd,!0),r.removeEventListener("click",pp,!0),n.removeEventListener("focus",pf,!0),n.removeEventListener("blur",ph,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",pm,!0),r.removeEventListener("pointermove",pm,!0),r.removeEventListener("pointerup",pm,!0)),pi.delete(n))};function pv(){return"pointer"!==pa}"u">typeof document&&("loading"!==(d=mL(void 0)).readyState?pg(void 0):d.addEventListener("DOMContentLoaded",()=>{pg(void 0)}));let pb=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),pw=new Map,px=new Set;function pD(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=mV(n);if(!e(n)||!r)return;let a=pw.get(r);if(a&&(a.delete(n.propertyName),0===a.size&&(r.removeEventListener("transitioncancel",t),pw.delete(r)),0===pw.size)){for(let e of px)e();px.clear()}};document.body.addEventListener("transitionrun",n=>{let r=mV(n);if(!e(n)||!r)return;let a=pw.get(r);a||(a=new Set,pw.set(r,a),r.addEventListener("transitioncancel",t,{once:!0})),a.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function pE(e){requestAnimationFrame(()=>{for(let[e]of pw)"isConnected"in e&&!e.isConnected&&pw.delete(e);0===pw.size?e():px.add(e)})}function p_(e){if(!e.isConnected)return;let t=mL(e);if("virtual"===pa){let n=((e=document)=>e.activeElement)(t);pE(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&mj(e)})}else mj(e)}function pS(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e,o=(0,lr.useCallback)(e=>{if(mV(e)===e.currentTarget)return r&&r(e),a&&a(!1),!0},[r,a]),i=mQ(o),s=(0,lr.useCallback)(e=>{let t=mV(e),r=mL(t),o=r?((e=document)=>e.activeElement)(r):((e=document)=>e.activeElement)();t===e.currentTarget&&t===o&&(n&&n(e),a&&a(!0),i(e))},[a,n,i]);return{focusProps:{onFocus:!t&&(n||a||r)?s:void 0,onBlur:!t&&(r||a)?o:void 0}}}function pk(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}function pC(e,t){mn(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?pD():document.addEventListener("DOMContentLoaded",pD));let pP=la().createContext(null);function pT(e,t){let{focusProps:n}=pS(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:pk(e.onKeyDown),onKeyUp:pk(e.onKeyUp)}},a=my(n,r),o=function(e){let t=(0,lr.useContext)(pP)||{};pC(t,e);let{ref:n,...r}=t;return r}(t),i=e.isDisabled?{}:o,s=(0,lr.useRef)(e.autoFocus);(0,lr.useEffect)(()=>{s.current&&t.current&&p_(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:my({...a,tabIndex:l},i)}}la().forwardRef(function(e,t){let{children:n,...r}=e,a=d8(t),o={...r,ref:a};return la().createElement(pP.Provider,{value:o},n)});let pR="default",pN="",pO=new WeakMap;function p$(e){if(m9())"disabled"===pR&&(pR="restoring",setTimeout(()=>{pE(()=>{if("restoring"===pR){let t=mL(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=pN||""),pN="",pR="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&pO.has(e)){let t=pO.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),pO.delete(e)}}function pM(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let pA=new WeakMap;function pj(e){let t=e??("u">typeof document?document:void 0);if(!t)return pM(t);if(pA.has(t))return pA.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof mF(n).HTMLMetaElement&&(n.nonce||n.content)||pM(t)||void 0;return void 0!==r&&pA.set(t,r),r}let pI=la().createContext({register:()=>{}});pI.displayName="PressResponderContext";let pL=la().useInsertionEffect??mn;function pF(e){let t=(0,lr.useRef)(null);return pL(()=>{t.current=e},[e]),(0,lr.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function pB(){let e=(0,lr.useRef)(new Map),t=(0,lr.useCallback)((t,n,r,a)=>{let o=a?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:a}),t.addEventListener(n,o,a)},[]),n=(0,lr.useCallback)((t,n,r,a)=>{let o=e.current.get(r)?.fn||r;t.removeEventListener(n,o,a),e.current.delete(r)},[]),r=(0,lr.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,lr.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var pV=n(8439),pU=n.n(pV);class pW{#e;constructor(e,t,n,r){this.#e=!0;let a=r?.target??n.currentTarget;const o=a?.getBoundingClientRect();let i,s=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),o&&(null!=l&&null!=u?(i=l-o.left,s=u-o.top):(i=o.width/2,s=o.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=i,this.y=s,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let pH=Symbol("linkClicked"),pz="react-aria-pressable-style",pK="data-react-aria-pressable";function pG(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:m,...p}=function(e){let t=(0,lr.useContext)(pI);if(t){let{register:n,ref:r,...a}=t;e=my(a,e),n()}return pC(t,e.ref),e}(e),[f,h]=(0,lr.useState)(!1),g=(0,lr.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=pB(),b=(0,lr.useCallback)((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new pW("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,h(!0),o},[s,r,n]),w=(0,lr.useCallback)((e,r,o=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(a){let t=new pW("pressend",r,e);a(t),l=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&o&&!s){let n=new pW("press",r,e);t(n),l&&=n.shouldStopPropagation}return i.isTriggeringEvent=!1,l},[s,a,n,t]),x=pF(w),D=pF((0,lr.useCallback)((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new pW("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,o])),E=(0,lr.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(pq(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||p$(t.target),t.disposables))n();t.disposables=[]}},[d,v,w]),_=pF(E),S=(0,lr.useCallback)(e=>{c&&E(e)},[c,E]),k=(0,lr.useCallback)(e=>{s||i?.(e)},[s,i]),C=(0,lr.useCallback)((e,t)=>{if(!s&&i){let n=new MouseEvent("click",e);mX(n,t),i(mJ(n))}},[s,i]),P=(0,lr.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(pY(t.nativeEvent,t.currentTarget)&&mB(t.currentTarget,mV(t))){pJ(mV(t),t.key)&&t.preventDefault();let r=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=b(t,"keyboard"));let a=t.currentTarget;y(mL(t.currentTarget),"keyup",mt(t=>{pY(t,a)&&!t.repeat&&mB(a,mV(t))&&e.target&&D(pq(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&m3()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mB(t.currentTarget,mV(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!pr.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||pn(t.nativeEvent))){let e=b(t,"virtual"),r=D(t,"virtual"),a=x(t,"virtual");k(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",a=D(pq(t.currentTarget,t),r),o=x(pq(t.currentTarget,t),r,!0);n=a&&o,e.isOverTarget=!1,k(t),_(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&pY(t,e.target)){pJ(mV(t),t.key)&&t.preventDefault();let n=mV(t),r=mB(e.target,n);x(pq(e.target,t),"keyboard",r),r&&C(t,e.target),v(),"Enter"!==t.key&&pZ(e.target)&&mB(e.target,n)&&!t[pH]&&(t[pH]=!0,pr(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var a;if(0!==t.button||!mB(t.currentTarget,mV(t)))return;if(a=t.nativeEvent,!pe()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(m9()){if("default"===pR){let t=mL(e);pN=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}pR="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";pO.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=b(t,e.pointerType);let a=mV(t);"releasePointerCapture"in a&&("hasPointerCapture"in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),y(mL(t.currentTarget),"pointerup",n,!1),y(mL(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(mB(t.currentTarget,mV(t))&&0===t.button){if(u){let n=function(e){for(;e&&!mZ(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=mF(e),n=t.document.activeElement;if(!n||n===e)return;m0=!0;let r=!1,a=e=>{(mV(e)===n||r)&&e.stopImmediatePropagation()},o=t=>{(mV(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,mj(n),l()))},i=t=>{(mV(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(mV(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,mj(n),l()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m0=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{mB(t.currentTarget,mV(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||D(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(pq(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(pq(e.target,t),e.pointerType,!1),S(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(mB(e.target,mV(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?_(t):(mj(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else _(t);e.isOverTarget=!1}},r=e=>{_(e)};t.onDragStart=e=>{mB(e.currentTarget,mV(e))&&_(e)}}return t},[y,s,u,v,d,S,b,k,C]);return(0,lr.useEffect)(()=>{if(!m)return;let e=mL(m.current);if(!e||!e.head||e.getElementById(pz))return;let t=e.createElement("style");t.id=pz;let n=pj(e);n&&(t.nonce=n),t.textContent=`
30
+ To fix this, ensure that you define the "name" field inside the feature flag definition.`,t);else console.warn(`A feature flag for ${e} could not be registered as it does not appear to have the required properties`,t)})}})(e,t))}function ca(){cn.sort((e,t)=>e.appName.localeCompare(t.appName,"en"));let e=new Map;for(let t of cn){e.has(t.appName)?e.set(t.appName,e.get(t.appName)+1):e.set(t.appName,0);let n=e.get(t.appName),r=`${t.appName}-page-${n}`,a=t.containerDomId??"omrs-apps-container",o=document.getElementById(a),i=`single-spa-application:${r}`;if(o){let e=document.createElement("div");e.id=i,o?.appendChild(e)}else throw Error(`${t.appName} ${t.component} cannot be mounted to "${a}"; DOM element does not exist.`);!function(e,t){let n=void 0!==t.route?t.route:void 0!==t.routeRegex&&new RegExp(t.routeRegex);!1===n?console.warn(`A registered page definition is missing a route and thus cannot be registered.
31
+ To fix this, ensure that you define the "route" (or alternatively the "routeRegex") field inside the extension definition.`,e):t.component?rB(e,()=>u8(t.appName,t.component),function(e,{featureFlag:t}){return t?n=>!!i6(t)&&e(n):e}(function e(t){if(Array.isArray(t)){let n=t.map(e);return e=>n.some(t=>t(e))}return"string"==typeof t?rK(window.getOpenmrsSpaBase()+t):t instanceof RegExp?e=>t.test(e.pathname.replace(window.getOpenmrsSpaBase(),"")):()=>t}(n),t)):console.warn(`A registered page definition is missing a component and thus cannot be registered.
32
+ To fix this, ensure that you define the "component" field inside the page definition.`,e)}(r,t)}}let co={PHONE_MIN:0,PHONE_MAX:600,TABLET_MIN:601,TABLET_MAX:1023,SMALL_DESKTOP_MIN:1024,SMALL_DESKTOP_MAX:1439,LARGE_DESKTOP_MIN:1440,LARGE_DESKTOP_MAX:Number.MAX_SAFE_INTEGER};function ci(){document.body.classList.toggle("omrs-breakpoint-lt-tablet",window.innerWidth<co.TABLET_MIN),document.body.classList.toggle("omrs-breakpoint-gt-phone",window.innerWidth>co.PHONE_MAX),document.body.classList.toggle("omrs-breakpoint-gt-tablet",window.innerWidth>co.TABLET_MAX),document.body.classList.toggle("omrs-breakpoint-lt-desktop",window.innerWidth<co.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-small-desktop",window.innerWidth<co.SMALL_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-lt-large-desktop",window.innerWidth<co.LARGE_DESKTOP_MIN),document.body.classList.toggle("omrs-breakpoint-gt-small-desktop",window.innerWidth>co.SMALL_DESKTOP_MAX)}let cs=!1;function cl(){cs||(window.addEventListener("resize",ci),ci(),cs=!0)}var cu=n(1085),cc=n(3373),cd=n.n(cc);function cm({title:e,children:t}){let n="tablet"===uM();return(0,cu.jsxs)("div",{className:cd()({"-esm-form-engine__card-header-module__tabletHeader___xhRSy":n,"-esm-form-engine__card-header-module__desktopHeader___aPTXc":!n}),children:[(0,cu.jsx)("h4",{children:e}),t]})}let cp=["red","magenta","purple","blue","teal","cyan","gray","green","warm-gray","cool-gray","high-contrast","outline"],cf={primaryColor:{_type:th.String,_description:"The color for displaying primary diagnoses tags",_default:"red",_validators:[nx.oneOf(cp)]},secondaryColor:{_type:th.String,_description:"The color for displaying secondary diagnoses tags",_default:"blue",_validators:[nx.oneOf(cp)]}},ch={"Brand color #1":{_default:"#005d5d",_type:th.String},"Brand color #2":{_default:"#004144",_type:th.String},"Brand color #3":{_default:"#007d79",_type:th.String},excludePatientIdentifierCodeTypes:{uuids:{_type:th.Array,_description:"List of UUIDs of patient identifier types to exclude from rendering in the patient banner",_default:[],_elements:{_type:th.UUID}}},implementationName:{_type:th.String,_description:"A name of the place (or authority) where all possible locations a user can choose are located.",_default:"Clinic"},patientPhotoConceptUuid:{_type:th.ConceptUuid,_default:"736e8771-e501-4615-bfa7-570c03f4bef5",_description:"Used to look up the patient photo, which is stored as an attachment obs. Set to `null` in order to disable the feature and use only generated avatars. To remove the avatars entirely, use extension configuration's `remove` feature."},preferredCalendar:{_type:th.Object,_description:"Keys should be locale codes, and values should be the preferred calendar for that locale. For example, {'am': 'ethiopic'}.",_default:{am:"ethiopic"},_elements:{_validators:[nx.oneOf(["buddhist","chinese","coptic","dangi","ethioaa","ethiopic","gregory","hebrew","indian","islamic","islamic-umalqura","islamic-tbla","islamic-civil","islamic-rgsa","iso8601","japanese","persian","roc","islamicc"])]}},preferredDateLocale:{_type:th.Object,_description:"Allows setting the locale used for date formatting for any browser locale. Does not affect time formatting. Keys should be locale codes, and values should be the preferred locale for formatting dates. For example, {'en': 'en-US', 'fr-CA': 'en-CA'}.",_default:{en:"en-GB"},_elements:{_type:th.String}},diagnosisTags:cf};var cg=n(324);let cy={"carbon.table.batch.cancel":"cancel","carbon.table.batch.items.selected":"batchActionsItemsSelected","carbon.table.batch.item.selected":"batchActionItemSelected","carbon.table.batch.selectAll":"selectAll"},cv=e=>(0,cu.jsx)(cg.TableBatchActions,{translateWithId:(e,t)=>{let n=cy[e];return n?aj(n,e,t):e},...e}),cb="-esm-form-engine__custom-overflow-menu-module__container___QIBvW",cw="-esm-form-engine__custom-overflow-menu-module__menu___ZppPo",cx="-esm-form-engine__custom-overflow-menu-module__show___8rVUu",cD="-esm-form-engine__custom-overflow-menu-module__overflowMenuButton___0VKUu",cE=(0,ll.createContext)(null);function c_(){let e=(0,ll.useContext)(cE);if(!e)throw Error("useCustomOverflowMenu must be used within a CustomOverflowMenu");return e}function cS({menuTitle:e,children:t}){let[n,r]=lu().useState(!1),a=uB(()=>r(!1),n),o="tablet"===uM(),i=(0,ll.useCallback)(()=>r(e=>!e),[]),s=(0,ll.useRef)(null),l=(0,ll.useRef)(null),u=(0,ll.useId)(),c=`custom-overflow-menu-trigger-${u}`,d=`custom-overflow-menu-${u}`,m=(0,ll.useCallback)(()=>{r(!1),s.current?.focus()},[]),p=(0,ll.useMemo)(()=>({closeMenu:m}),[m]),f=(0,ll.useCallback)(e=>{"Escape"===e.key&&n&&(e.stopPropagation(),m())},[m,n]),h=ll.Children.toArray(t);(0,ll.useEffect)(()=>{if(n&&l.current){let e=l.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[n]);let g=(0,ll.useCallback)(({currentIndex:e,direction:t})=>{let n=l.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!n?.length)return;let r=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,a=Array.from(n).indexOf(r);if(-1===a)return void n[t>0?0:n.length-1]?.focus();let o=a+t,i=o<0?n.length-1:o>=n.length?0:o;n[i]?.focus()},[]),y=h.map((e,t)=>(0,ll.isValidElement)(e)?(0,ll.cloneElement)(e,{closeMenu:m,handleOverflowMenuItemFocus:g,index:t}):e);return(0,cu.jsxs)("div",{"data-overflow-menu":!0,className:cd()("cds--overflow-menu",cb),ref:a,children:[(0,cu.jsx)("button",{className:cd()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":n},cD),"aria-controls":d,"aria-expanded":n,"aria-haspopup":"true",id:c,onClick:i,onKeyDown:f,ref:s,children:e}),(0,cu.jsxs)("div",{className:cd()("cds--overflow-menu-options","cds--overflow-menu--flip",cw,{[cx]:n}),"aria-labelledby":c,"data-floating-menu-direction":"bottom",id:d,onKeyDown:f,ref:l,role:"menu",tabIndex:-1,children:[(0,cu.jsx)("ul",{className:cd()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":o}),children:(0,cu.jsx)(cE.Provider,{value:p,children:y})}),(0,cu.jsx)("span",{})]})]})}function ck(e){let t=(0,ll.useContext)(cE);return(0,cu.jsx)(cg.OverflowMenuItem,{...e,closeMenu:t?.closeMenu})}var cC=n(5571);let cP=["omrs-icon-activity","omrs-icon-add","omrs-icon-arrow-down","omrs-icon-arrow-left","omrs-icon-arrow-right","omrs-icon-arrow-up","omrs-icon-baby","omrs-icon-calendar-heat-map","omrs-icon-calendar","omrs-icon-caret-down","omrs-icon-caret-left","omrs-icon-caret-right","omrs-icon-caret-up","omrs-icon-chart-average","omrs-icon-chart-line","omrs-icon-checkmark-filled","omrs-icon-checkmark-outline","omrs-icon-chemistry","omrs-icon-chevron-down","omrs-icon-chevron-left","omrs-icon-chevron-right","omrs-icon-chevron-up","omrs-icon-close","omrs-icon-close-filled","omrs-icon-close-outline","omrs-icon-document","omrs-icon-document-attachment","omrs-icon-download","omrs-icon-drug-order","omrs-icon-edit","omrs-icon-event-schedule","omrs-icon-events","omrs-icon-gender-female","omrs-icon-gender-male","omrs-icon-gender-other","omrs-icon-gender-unknown","omrs-icon-generic-order-type","omrs-icon-group","omrs-icon-group-access","omrs-icon-hospital-bed","omrs-icon-image-medical","omrs-icon-information","omrs-icon-information-filled","omrs-icon-information-square","omrs-icon-inventory-management","omrs-icon-lab-order","omrs-icon-list-checked","omrs-icon-location","omrs-icon-material-order","omrs-icon-maximize","omrs-icon-medication","omrs-icon-message-queue","omrs-icon-microscope","omrs-icon-mobile-check","omrs-icon-money","omrs-icon-mother","omrs-icon-movement","omrs-icon-overflow-menu--horizontal","omrs-icon-overflow-menu--vertical","omrs-icon-password","omrs-icon-pedestrian-family","omrs-icon-pen","omrs-icon-printer","omrs-icon-procedure-order","omrs-icon-programs","omrs-icon-renew","omrs-icon-referral-order","omrs-icon-report","omrs-icon-reset","omrs-icon-save","omrs-icon-search","omrs-icon-settings","omrs-icon-shopping-cart","omrs-icon-shopping-cart--arrow-down","omrs-icon-sticky-note-add","omrs-icon-switcher","omrs-icon-syringe","omrs-icon-table-of-contents","omrs-icon-table","omrs-icon-time","omrs-icon-tools","omrs-icon-translate","omrs-icon-trash-can","omrs-icon-tree-view--alt","omrs-icon-two-factor-authentication","omrs-icon-user-avatar","omrs-icon-user-follow","omrs-icon-user-xray","omrs-icon-user","omrs-icon-view-off","omrs-icon-view","omrs-icon-warning"],cT=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-activity",iconProps:e})})),cR=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-add",iconProps:e})})),cN=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-arrow-down",iconProps:e})})),cO=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-arrow-left",iconProps:e})})),c$=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-arrow-right",iconProps:e})})),cM=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-arrow-up",iconProps:e})})),cA=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-baby",iconProps:e})})),cj=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-calendar-heat-map",iconProps:e})})),cI=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-calendar",iconProps:e})})),cL=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-caret-down",iconProps:e})})),cF=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-caret-left",iconProps:e})})),cB=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-caret-right",iconProps:e})})),cV=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-caret-up",iconProps:e})})),cU=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chart-average",iconProps:e})})),cW=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chart-line",iconProps:e})})),cH=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-checkmark-filled",iconProps:e})})),cz=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-checkmark-outline",iconProps:e})})),cK=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chemistry",iconProps:e})})),cG=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chevron-down",iconProps:e})})),cZ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chevron-left",iconProps:e})})),cY=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chevron-right",iconProps:e})})),cq=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-chevron-up",iconProps:e})})),cJ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-close",iconProps:e})})),cX=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-close-filled",iconProps:e})})),cQ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-close-outline",iconProps:e})})),c0=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-document",iconProps:e})})),c1=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-document-attachment",iconProps:e})})),c4=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-download",iconProps:e})})),c2=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-drug-order",iconProps:e})})),c3=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-edit",iconProps:e})})),c6=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-event-schedule",iconProps:e})})),c5=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-events",iconProps:e})})),c9=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-gender-female",iconProps:e})})),c8=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-gender-male",iconProps:e})})),c7=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-gender-other",iconProps:e})})),de=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-gender-unknown",iconProps:e})})),dt=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-generic-order-type",iconProps:e})})),dn=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-group",iconProps:e})})),dr=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-group-access",iconProps:e})})),da=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-hospital-bed",iconProps:e})})),di=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-image-medical",iconProps:e})})),ds=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-information",iconProps:e})})),dl=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-information-filled",iconProps:e})})),du=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-information-square",iconProps:e})})),dc=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-inventory-management",iconProps:e})})),dd=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-lab-order",iconProps:e})})),dm=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-list-checked",iconProps:e})})),dp=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-location",iconProps:e})})),df=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-material-order",iconProps:e})})),dh=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-maximize",iconProps:e})})),dg=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-medication",iconProps:e})})),dy=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-message-queue",iconProps:e})})),dv=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-microscope",iconProps:e})})),db=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-mobile-check",iconProps:e})})),dw=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-money",iconProps:e})})),dx=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-mother",iconProps:e})})),dD=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-movement",iconProps:e})})),dE=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),d_=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-overflow-menu--horizontal",iconProps:e})})),dS=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-password",iconProps:e})})),dk=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-pedestrian-family",iconProps:e})})),dC=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-pen",iconProps:e})})),dP=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-printer",iconProps:e})})),dT=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-procedure-order",iconProps:e})})),dR=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-programs",iconProps:e})})),dN=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-referral-order",iconProps:e})})),dO=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-renew",iconProps:e})})),d$=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-report",iconProps:e})})),dM=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-reset",iconProps:e})})),dA=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-save",iconProps:e})})),dj=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-search",iconProps:e})})),dI=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-settings",iconProps:e})})),dL=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-switcher",iconProps:e})})),dF=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-shopping-cart",iconProps:e})})),dB=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-shopping-cart--arrow-down",iconProps:e})})),dV=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-sticky-note-add",iconProps:e})})),dU=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-syringe",iconProps:e})})),dW=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-table-of-contents",iconProps:e})})),dH=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-table",iconProps:e})})),dz=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-time",iconProps:e})})),dK=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-tools",iconProps:e})})),dG=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-translate",iconProps:e})})),dZ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-trash-can",iconProps:e})})),dY=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-tree-view--alt",iconProps:e})})),dq=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-two-factor-authentication",iconProps:e})})),dJ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-user-avatar",iconProps:e})})),dX=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-user-follow",iconProps:e})})),dQ=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-user-xray",iconProps:e})})),d0=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-user",iconProps:e})})),d1=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-view-off",iconProps:e})})),d4=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-view",iconProps:e})})),d2=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(me,{ref:t,icon:"omrs-icon-warning",iconProps:e})})),d3=d2,d6=c1,d5=dm,d9=di,d8=dB,d7=(0,ll.memo)((0,ll.forwardRef)(function({icon:e,fallback:t,...n},r){let a=(0,ll.useRef)(e?document.getElementById(e):void 0);return(0,ll.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=e?document.getElementById(e):void 0)});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,cu.jsx)(l9,{value:a.current,fallback:t,children:(0,cu.jsx)(me,{ref:r,icon:e,iconProps:n})})})),me=(0,ll.memo)((0,ll.forwardRef)(function({icon:e,iconProps:t},n){let{className:r,fill:a,size:o}=Object.assign({},{fill:"currentColor",size:20},t);(o<=0||o>72)&&(console.error(`Invalid size '${o}' specified for ${e}. Defaulting to 20.`),o=20);let i=(0,ll.useRef)(null);return(0,ll.useImperativeHandle)(n,()=>i.current),(0,ll.useEffect)(()=>{i.current&&"currentColor"!==a&&i.current.style.setProperty("--omrs-icon-fill",a)},[]),(0,cu.jsx)("svg",{ref:i,className:cd()("omrs-icon","-esm-form-engine__icons-module__icon___uq4qr",r),height:o,width:o,viewBox:"0 0 16 16",children:(0,cu.jsx)("use",{href:`#${e}`})})})),mt=({path:e,title:t,basePath:n,icon:r})=>{let{t:a}=(0,lV.useTranslation)(),o=(0,cC.useLocation)(),i=(0,ll.useMemo)(()=>{if(!e)return!1;let t=e.startsWith("/")?e.slice(1):e;if(t.startsWith("http"))return t===window.location.href;let n=t.split("/").map(e=>decodeURIComponent(e)),r=(o.pathname??"").split("/").slice(1).map(e=>decodeURIComponent(e));return r.some((e,t)=>n.every((e,n)=>r[t+n]===e))},[o.pathname,e]);return(0,cu.jsx)("div",{children:(0,cu.jsx)(ld,{className:cd()("cds--side-nav__link",{"active-left-nav-link":i}),to:`${n}/${encodeURIComponent(e)}`,children:(0,cu.jsxs)("span",{className:"-esm-form-engine__dashboard-module__menu___WbY42",children:[(0,cu.jsx)(d7,{icon:r,className:"-esm-form-engine__dashboard-module__icon___L-hKL",size:16}),(0,cu.jsx)("span",{children:a(t)})]})})},e)};function mn(e){return function({basePath:t}){return(0,cu.jsx)(cC.BrowserRouter,{children:(0,cu.jsx)(mt,{basePath:t,...e})})}}function mr(e){let t=(0,ll.useRef)(null),n=(0,ll.useRef)(void 0),r=(0,ll.useCallback)(t=>{if("function"==typeof e){let n=e(t);return()=>{"function"==typeof n?n():e(null)}}if(e)return e.current=t,()=>{e.current=null}},[e]);return(0,ll.useMemo)(()=>({get current(){return t.current},set current(value){t.current=value,n.current&&(n.current(),n.current=void 0),null!=value&&(n.current=r(value))}}),[r])}function ma(...e){return 1===e.length&&e[0]?e[0]:t=>{let n=!1,r=e.map(e=>{let r=mo(e,t);return n||="function"==typeof r,r});if(n)return()=>{r.forEach((t,n)=>{"function"==typeof t?t():mo(e[n],null)})}}}function mo(e,t){if("function"==typeof e)return e(t);null!=e&&(e.current=t)}function mi(...e){return(...t)=>{for(let n of e)"function"==typeof n&&n(...t)}}let ms="u">typeof document?lu().useLayoutEffect:()=>{},ml={prefix:String(Math.round(1e10*Math.random())),current:0},mu=lu().createContext(ml),mc=lu().createContext(!1),md=("u">typeof window&&window.document&&window.document.createElement,new WeakMap),mm="function"==typeof lu().useId?function(e){let t=lu().useId(),[n]=(0,ll.useState)(mg()),r=n?"react-aria":`react-aria${ml.prefix}`;return e||`${r}-${t}`}:function(e){let t=(0,ll.useContext)(mu),n=function(e=!1){let t=(0,ll.useContext)(mu),n=(0,ll.useRef)(null);if(null===n.current&&!e){let e=lu().__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(e){let n=md.get(e);null==n?md.set(e,{id:t.current,state:e.memoizedState}):e.memoizedState!==n.state&&(t.current=n.id,md.delete(e))}n.current=++t.current}return n.current}(!!e),r=`react-aria${t.prefix}`;return e||`${r}-${n}`};function mp(){return!1}function mf(){return!0}function mh(e){return()=>{}}function mg(){return"function"==typeof lu().useSyncExternalStore?lu().useSyncExternalStore(mh,mp,mf):(0,ll.useContext)(mc)}let my=!!("u">typeof window&&window.document&&window.document.createElement),mv=new Map;function mb(e){let[t,n]=(0,ll.useState)(e),r=(0,ll.useRef)(null),a=mm(t),o=(0,ll.useRef)(null);if(i&&i.register(o,a),my){let e=mv.get(a);e&&!e.includes(r)?e.push(r):mv.set(a,[r])}return ms(()=>()=>{i&&i.unregister(o),mv.delete(a)},[a]),(0,ll.useEffect)(()=>{let e=r.current;return e&&n(e),()=>{e&&(r.current=null)}}),a}function mw(e=[]){let t=mb(),[n,r]=function(e){let[t,n]=(0,ll.useState)(e),r=(0,ll.useRef)(t),a=(0,ll.useRef)(null),o=(0,ll.useRef)(()=>{if(!a.current)return;let e=a.current.next();if(e.done){a.current=null;return}r.current===e.value?o.current():n(e.value)});return ms(()=>{r.current=t,a.current&&o.current()}),[t,(0,ll.useCallback)(e=>{a.current=e(r.current),o.current()},[o])]}(t),a=(0,ll.useCallback)(()=>{r(function*(){yield t,yield document.getElementById(t)?t:void 0})},[t,r]);return ms(a,[t,a,...e]),n}"u">typeof FinalizationRegistry&&(i=new FinalizationRegistry(e=>{mv.delete(e)}));let mx=function(){for(var e,t,n=0,r="",a=arguments.length;n<a;n++)(e=arguments[n])&&(t=function e(t){var n,r,a="";if("string"==typeof t||"number"==typeof t)a+=t;else if("object"==typeof t)if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(r=e(t[n]))&&(a&&(a+=" "),a+=r)}else for(r in t)t[r]&&(a&&(a+=" "),a+=r);return a}(e))&&(r&&(r+=" "),r+=t);return r};function mD(...e){let t={...e[0]};for(let n=1;n<e.length;n++){let r=e[n];for(let e in r){let n=t[e],a=r[e];"function"==typeof n&&"function"==typeof a&&"o"===e[0]&&"n"===e[1]&&e.charCodeAt(2)>=65&&90>=e.charCodeAt(2)?t[e]=mi(n,a):("className"===e||"UNSAFE_className"===e)&&"string"==typeof n&&"string"==typeof a?t[e]=mx(n,a):"id"===e&&n&&a?t.id=function(e,t){if(e===t)return e;let n=mv.get(e);if(n)return n.forEach(e=>e.current=t),t;let r=mv.get(t);return r?(r.forEach(t=>t.current=e),e):t}(n,a):"ref"===e&&n&&a?t.ref=ma(n,a):t[e]=void 0!==a?a:n}}return t}let mE=Symbol("default");function m_({values:e,children:t}){for(let[n,r]of e)t=lu().createElement(n.Provider,{value:r},t);return t}function mS(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,ll.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:null!=e?e:a,style:l||i?{...i,...l}:void 0,children:null!=u?u:o,"data-rac":""}},[t,n,r,a,o,i,s])}function mk(e,t){let n=(0,ll.useContext)(e);if(null===t)return null;if(n&&"object"==typeof n&&"slots"in n&&n.slots){let e=t||mE;if(!n.slots[e]){let e=new Intl.ListFormat().format(Object.keys(n.slots).map(e=>`"${e}"`)),r=t?`Invalid slot "${t}".`:"A slot prop is required.";throw Error(`${r} Valid slot names are ${e}.`)}return n.slots[e]}return n}function mC(e,t,n){let{ref:r,...a}=mk(n,e.slot)||{},o=mr((0,ll.useMemo)(()=>ma(t,r),[t,r])),i=mD(a,e);return"style"in a&&a.style&&"style"in e&&e.style&&("function"==typeof a.style||"function"==typeof e.style?i.style=t=>{let n="function"==typeof a.style?a.style(t):a.style,r={...t.defaultStyle,...n},o="function"==typeof e.style?e.style({...t,defaultStyle:r}):e.style;return{...r,...o}}:i.style={...a.style,...e.style}),[i,o]}function mP(e=!0){let[t,n]=(0,ll.useState)(e),r=(0,ll.useRef)(!1),a=(0,ll.useCallback)(e=>{r.current=!0,n(!!e)},[]);return ms(()=>{r.current||n(!1)},[]),[a,t]}function mT(e){let t=/^(data-.*)$/,n={};for(let r in e)t.test(r)||(n[r]=e[r]);return n}let mR=(0,ll.createContext)(null),mN=null;function mO(e,t="assertive",n=7e3){mN?mN.announce(e,t,n):(mN=new m$,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?mN.announce(e,t,n):setTimeout(()=>{(null==mN?void 0:mN.isAttached())&&(null==mN||mN.announce(e,t,n))},100))}class m${isAttached(){var e;return null==(e=this.node)?void 0:e.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){var r,a;if(!this.node)return;let o=document.createElement("div");"object"==typeof e?(o.setAttribute("role","img"),o.setAttribute("aria-labelledby",e["aria-labelledby"])):o.textContent=e,"assertive"===t?null==(r=this.assertiveLog)||r.appendChild(o):null==(a=this.politeLog)||a.appendChild(o),""!==e&&setTimeout(()=>{o.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}}let mM=new Set(["id"]),mA=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),mj=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),mI=new Set(["dir","lang","hidden","inert","translate"]),mL=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),mF=/^(data-.*)$/;function mB(e,t={}){let{labelable:n,isLink:r,global:a,events:o=a,propNames:i}=t,s={};for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(mM.has(t)||n&&mA.has(t)||r&&mj.has(t)||a&&mI.has(t)||o&&(mL.has(t)||t.endsWith("Capture")&&mL.has(t.slice(0,-7)))||i?.has(t)||mF.test(t))&&(s[t]=e[t]);return s}function mV(e){if(function(){if(null==mU){mU=!1;try{document.createElement("div").focus({get preventScroll(){return mU=!0,!0}})}catch{}}return mU}())e.focus({preventScroll:!0});else{let t=function(e){let t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;t instanceof HTMLElement&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push({element:t,scrollTop:t.scrollTop,scrollLeft:t.scrollLeft}),t=t.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}(e);e.focus(),function(e){for(let{element:t,scrollTop:n,scrollLeft:r}of e)t.scrollTop=n,t.scrollLeft=r}(t)}}let mU=null,mW=e=>e?.ownerDocument??document,mH=e=>e&&"window"in e&&e.window===e?e:mW(e).defaultView||window;function mz(e,t){return!!t&&!!e&&e.contains(t)}function mK(e){return e.target}function mG(e){if(!e)return!1;let t=e.getRootNode(),n=mH(e);if(!(t instanceof n.Document||t instanceof n.ShadowRoot))return!1;let r=t.activeElement;return null!=r&&e.contains(r)}let mZ="u">typeof Element&&"checkVisibility"in Element.prototype;function mY(e,t){return mZ?e.checkVisibility({visibilityProperty:!0})&&!e.closest("[data-react-aria-prevent-focus]"):"#comment"!==e.nodeName&&function(e){let t=mH(e);if(!(e instanceof t.HTMLElement)&&!(e instanceof t.SVGElement))return!1;let{display:n,visibility:r}=e.style,a="none"!==n&&"hidden"!==r&&"collapse"!==r;if(a){let{getComputedStyle:t}=e.ownerDocument.defaultView,{display:n,visibility:r}=t(e);a="none"!==n&&"hidden"!==r&&"collapse"!==r}return a}(e)&&!e.hasAttribute("hidden")&&!e.hasAttribute("data-react-aria-prevent-focus")&&("DETAILS"!==e.nodeName||!t||"SUMMARY"===t.nodeName||e.hasAttribute("open"))&&(!e.parentElement||mY(e.parentElement,e))}let mq=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],mJ=mq.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";mq.push('[tabindex]:not([tabindex="-1"]):not([disabled])');let mX=mq.join(':not([hidden]):not([tabindex="-1"]),');function mQ(e,t){return e.matches(mJ)&&!m1(e)&&(t?.skipVisibilityCheck||mY(e))}function m0(e){return e.matches(mX)&&mY(e)&&!m1(e)}function m1(e){let t=e;for(;null!=t;){if(t instanceof t.ownerDocument.defaultView.HTMLElement&&t.inert)return!0;t=t.parentElement}return!1}function m4(e){return e.nativeEvent=e,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function m2(e,t){Object.defineProperty(e,"target",{value:t}),Object.defineProperty(e,"currentTarget",{value:t})}function m3(e){let t=(0,ll.useRef)({isFocused:!1,observer:null});return ms(()=>{let e=t.current;return()=>{e.observer&&(e.observer.disconnect(),e.observer=null)}},[]),(0,ll.useCallback)(n=>{let r=mK(n);(r instanceof HTMLButtonElement||r instanceof HTMLInputElement||r instanceof HTMLTextAreaElement||r instanceof HTMLSelectElement)&&(t.current.isFocused=!0,r.addEventListener("focusout",n=>{if(t.current.isFocused=!1,r.disabled){let t=m4(n);e?.(t)}t.current.observer&&(t.current.observer.disconnect(),t.current.observer=null)},{once:!0}),t.current.observer=new MutationObserver(()=>{if(t.current.isFocused&&r.disabled){t.current.observer?.disconnect();let e=r===((e=document)=>e.activeElement)()?null:((e=document)=>e.activeElement)();r.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),r.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}}),t.current.observer.observe(r,{attributes:!0,attributeFilter:["disabled"]}))},[e])}let m6=!1;function m5(e){if("u"<typeof window||null==window.navigator)return!1;let t=window.navigator.userAgentData?.brands;return Array.isArray(t)&&t.some(t=>e.test(t.brand))||e.test(window.navigator.userAgent)}function m9(e){return"u">typeof window&&null!=window.navigator&&e.test(window.navigator.userAgentData?.platform||window.navigator.platform)}function m8(e){let t=null;return()=>(null==t&&(t=e()),t)}let m7=m8(function(){return m9(/^Mac/i)}),pe=m8(function(){return m9(/^iPhone/i)}),pt=m8(function(){return m9(/^iPad/i)||m7()&&navigator.maxTouchPoints>1}),pn=m8(function(){return pe()||pt()});m8(function(){return m7()||pn()});let pr=m8(function(){return m5(/AppleWebKit/i)&&!pa()}),pa=m8(function(){return m5(/Chrome/i)}),po=m8(function(){return m5(/Android/i)}),pi=m8(function(){return m5(/Firefox/i)});function ps(e){return""===e.pointerType&&!!e.isTrusted||(po()&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function pl(e,t,n=!0){let{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}=t;pi()&&window.event?.type?.startsWith("key")&&"_blank"===e.target&&(m7()?r=!0:a=!0);let s=pr()&&m7()&&!pt()&&1?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:r,ctrlKey:a,altKey:o,shiftKey:i}):new MouseEvent("click",{metaKey:r,ctrlKey:a,altKey:o,shiftKey:i,detail:1,bubbles:!0,cancelable:!0});pl.isOpening=n,mV(e),e.dispatchEvent(s),pl.isOpening=!1}pl.isOpening=!1;let pu=null,pc=new Set,pd=new Map,pm=!1,pp=!1,pf={Tab:!0,Escape:!0};function ph(e,t){for(let n of pc)n(e,t)}function pg(e){pm=!0,pl.isOpening||e.metaKey||!m7()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(pu="keyboard",ph("keyboard",e))}function py(e){pu="pointer","pointerType"in e&&e.pointerType,("mousedown"===e.type||"pointerdown"===e.type)&&(pm=!0,ph("pointer",e))}function pv(e){!pl.isOpening&&ps(e)&&(pm=!0,pu="virtual")}function pb(e){let t=mH(mK(e)),n=mW(mK(e));mK(e)!==t&&mK(e)!==n&&!m6&&e.isTrusted&&(pm||pp||(pu="virtual",ph("virtual",e)),pm=!1,pp=!1)}function pw(){m6||(pm=!1,pp=!0)}function px(e){if("u"<typeof window||"u"<typeof document)return;let t=mH(e),n=mW(e);if(pd.get(t))return;let r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){pm=!0,r.apply(this,arguments)},n.addEventListener("keydown",pg,!0),n.addEventListener("keyup",pg,!0),n.addEventListener("click",pv,!0),t.addEventListener("focus",pb,!0),t.addEventListener("blur",pw,!1),"u">typeof PointerEvent&&(n.addEventListener("pointerdown",py,!0),n.addEventListener("pointermove",py,!0),n.addEventListener("pointerup",py,!0)),t.addEventListener("beforeunload",()=>{pD(e)},{once:!0}),pd.set(t,{focus:r})}let pD=(e,t)=>{let n=mH(e),r=mW(e);t&&r.removeEventListener("DOMContentLoaded",t),pd.has(n)&&(n.HTMLElement.prototype.focus=pd.get(n).focus,r.removeEventListener("keydown",pg,!0),r.removeEventListener("keyup",pg,!0),r.removeEventListener("click",pv,!0),n.removeEventListener("focus",pb,!0),n.removeEventListener("blur",pw,!1),"u">typeof PointerEvent&&(r.removeEventListener("pointerdown",py,!0),r.removeEventListener("pointermove",py,!0),r.removeEventListener("pointerup",py,!0)),pd.delete(n))};function pE(){return"pointer"!==pu}"u">typeof document&&("loading"!==(d=mW(void 0)).readyState?px(void 0):d.addEventListener("DOMContentLoaded",()=>{px(void 0)}));let p_=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]),pS=new Map,pk=new Set;function pC(){if("u"<typeof window)return;function e(e){return"propertyName"in e}let t=n=>{let r=mK(n);if(!e(n)||!r)return;let a=pS.get(r);if(a&&(a.delete(n.propertyName),0===a.size&&(r.removeEventListener("transitioncancel",t),pS.delete(r)),0===pS.size)){for(let e of pk)e();pk.clear()}};document.body.addEventListener("transitionrun",n=>{let r=mK(n);if(!e(n)||!r)return;let a=pS.get(r);a||(a=new Set,pS.set(r,a),r.addEventListener("transitioncancel",t,{once:!0})),a.add(n.propertyName)}),document.body.addEventListener("transitionend",t)}function pP(e){requestAnimationFrame(()=>{for(let[e]of pS)"isConnected"in e&&!e.isConnected&&pS.delete(e);0===pS.size?e():pk.add(e)})}function pT(e){if(!e.isConnected)return;let t=mW(e);if("virtual"===pu){let n=((e=document)=>e.activeElement)(t);pP(()=>{let r=((e=document)=>e.activeElement)(t);(r===n||r===t.body)&&e.isConnected&&mV(e)})}else mV(e)}function pR(e){let{isDisabled:t,onFocus:n,onBlur:r,onFocusChange:a}=e,o=(0,ll.useCallback)(e=>{if(mK(e)===e.currentTarget)return r&&r(e),a&&a(!1),!0},[r,a]),i=m3(o),s=(0,ll.useCallback)(e=>{let t=mK(e),r=mW(t),o=r?((e=document)=>e.activeElement)(r):((e=document)=>e.activeElement)();t===e.currentTarget&&t===o&&(n&&n(e),a&&a(!0),i(e))},[a,n,i]);return{focusProps:{onFocus:!t&&(n||a||r)?s:void 0,onBlur:!t&&(r||a)?o:void 0}}}function pN(e){if(!e)return;let t=!0;return n=>{e({...n,preventDefault(){n.preventDefault()},isDefaultPrevented:()=>n.isDefaultPrevented(),stopPropagation(){t=!0},continuePropagation(){t=!1},isPropagationStopped:()=>t}),t&&n.stopPropagation()}}function pO(e,t){ms(()=>{if(e&&e.ref&&t)return e.ref.current=t.current,()=>{e.ref&&(e.ref.current=null)}})}"u">typeof document&&("loading"!==document.readyState?pC():document.addEventListener("DOMContentLoaded",pC));let p$=lu().createContext(null);function pM(e,t){let{focusProps:n}=pR(e),{keyboardProps:r}={keyboardProps:e.isDisabled?{}:{onKeyDown:pN(e.onKeyDown),onKeyUp:pN(e.onKeyUp)}},a=mD(n,r),o=function(e){let t=(0,ll.useContext)(p$)||{};pO(t,e);let{ref:n,...r}=t;return r}(t),i=e.isDisabled?{}:o,s=(0,ll.useRef)(e.autoFocus);(0,ll.useEffect)(()=>{s.current&&t.current&&pT(t.current),s.current=!1},[t]);let l=e.excludeFromTabOrder?-1:0;return e.isDisabled&&(l=void 0),{focusableProps:mD({...a,tabIndex:l},i)}}lu().forwardRef(function(e,t){let{children:n,...r}=e,a=mr(t),o={...r,ref:a};return lu().createElement(p$.Provider,{value:o},n)});let pA="default",pj="",pI=new WeakMap;function pL(e){if(pn())"disabled"===pA&&(pA="restoring",setTimeout(()=>{pP(()=>{if("restoring"===pA){let t=mW(e);"none"===t.documentElement.style.webkitUserSelect&&(t.documentElement.style.webkitUserSelect=pj||""),pj="",pA="default"}})},300));else if((e instanceof HTMLElement||e instanceof SVGElement)&&e&&pI.has(e)){let t=pI.get(e),n="userSelect"in e.style?"userSelect":"webkitUserSelect";"none"===e.style[n]&&(e.style[n]=t),""===e.getAttribute("style")&&e.removeAttribute("style"),pI.delete(e)}}function pF(e){let t=e?.defaultView;return t?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let pB=new WeakMap;function pV(e){let t=e??("u">typeof document?document:void 0);if(!t)return pF(t);if(pB.has(t))return pB.get(t);let n=t.querySelector('meta[property="csp-nonce"]'),r=n&&n instanceof mH(n).HTMLMetaElement&&(n.nonce||n.content)||pF(t)||void 0;return void 0!==r&&pB.set(t,r),r}let pU=lu().createContext({register:()=>{}});pU.displayName="PressResponderContext";let pW=lu().useInsertionEffect??ms;function pH(e){let t=(0,ll.useRef)(null);return pW(()=>{t.current=e},[e]),(0,ll.useCallback)((...e)=>{let n=t.current;return n?.(...e)},[])}function pz(){let e=(0,ll.useRef)(new Map),t=(0,ll.useCallback)((t,n,r,a)=>{let o=a?.once?(...t)=>{e.current.delete(r),r(...t)}:r;e.current.set(r,{type:n,eventTarget:t,fn:o,options:a}),t.addEventListener(n,o,a)},[]),n=(0,ll.useCallback)((t,n,r,a)=>{let o=e.current.get(r)?.fn||r;t.removeEventListener(n,o,a),e.current.delete(r)},[]),r=(0,ll.useCallback)(()=>{e.current.forEach((e,t)=>{n(e.eventTarget,e.type,t,e.options)})},[n]);return(0,ll.useEffect)(()=>r,[r]),{addGlobalListener:t,removeGlobalListener:n,removeAllGlobalListeners:r}}var pK=n(8439),pG=n.n(pK);class pZ{#e;constructor(e,t,n,r){this.#e=!0;let a=r?.target??n.currentTarget;const o=a?.getBoundingClientRect();let i,s=0,l,u=null;null!=n.clientX&&null!=n.clientY&&(l=n.clientX,u=n.clientY),o&&(null!=l&&null!=u?(i=l-o.left,s=u-o.top):(i=o.width/2,s=o.height/2)),this.type=e,this.pointerType=t,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=i,this.y=s,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}let pY=Symbol("linkClicked"),pq="react-aria-pressable-style",pJ="data-react-aria-pressable";function pX(e){let{onPress:t,onPressChange:n,onPressStart:r,onPressEnd:a,onPressUp:o,onClick:i,isDisabled:s,isPressed:l,preventFocusOnPress:u,shouldCancelOnPointerExit:c,allowTextSelectionOnPress:d,ref:m,...p}=function(e){let t=(0,ll.useContext)(pU);if(t){let{register:n,ref:r,...a}=t;e=mD(a,e),n()}return pO(t,e.ref),e}(e),[f,h]=(0,ll.useState)(!1),g=(0,ll.useRef)({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:y,removeAllGlobalListeners:v}=pz(),b=(0,ll.useCallback)((e,t)=>{let a=g.current;if(s||a.didFirePressStart)return!1;let o=!0;if(a.isTriggeringEvent=!0,r){let n=new pZ("pressstart",t,e);r(n),o=n.shouldStopPropagation}return n&&n(!0),a.isTriggeringEvent=!1,a.didFirePressStart=!0,h(!0),o},[s,r,n]),w=(0,ll.useCallback)((e,r,o=!0)=>{let i=g.current;if(!i.didFirePressStart)return!1;i.didFirePressStart=!1,i.isTriggeringEvent=!0;let l=!0;if(a){let t=new pZ("pressend",r,e);a(t),l=t.shouldStopPropagation}if(n&&n(!1),h(!1),t&&o&&!s){let n=new pZ("press",r,e);t(n),l&&=n.shouldStopPropagation}return i.isTriggeringEvent=!1,l},[s,a,n,t]),x=pH(w),D=pH((0,ll.useCallback)((e,t)=>{let n=g.current;if(s)return!1;if(o){n.isTriggeringEvent=!0;let r=new pZ("pressup",t,e);return o(r),n.isTriggeringEvent=!1,r.shouldStopPropagation}return!0},[s,o])),E=(0,ll.useCallback)(e=>{let t=g.current;if(t.isPressed&&t.target){for(let n of(t.didFirePressStart&&null!=t.pointerType&&w(p1(t.target,e),t.pointerType,!1),t.isPressed=!1,t.isOverTarget=!1,t.activePointerId=null,t.pointerType=null,v(),d||pL(t.target),t.disposables))n();t.disposables=[]}},[d,v,w]),_=pH(E),S=(0,ll.useCallback)(e=>{c&&E(e)},[c,E]),k=(0,ll.useCallback)(e=>{s||i?.(e)},[s,i]),C=(0,ll.useCallback)((e,t)=>{if(!s&&i){let n=new MouseEvent("click",e);m2(n,t),i(m4(n))}},[s,i]),P=(0,ll.useMemo)(()=>{let e=g.current,t={onKeyDown(t){if(p0(t.nativeEvent,t.currentTarget)&&mz(t.currentTarget,mK(t))){p4(mK(t),t.key)&&t.preventDefault();let r=!0;e.isPressed||t.repeat||(e.target=t.currentTarget,e.isPressed=!0,e.pointerType="keyboard",r=b(t,"keyboard"));let a=t.currentTarget;y(mW(t.currentTarget),"keyup",mi(t=>{p0(t,a)&&!t.repeat&&mz(a,mK(t))&&e.target&&D(p1(e.target,t),"keyboard")},n),!0),r&&t.stopPropagation(),t.metaKey&&m7()&&e.metaKeyEvents?.set(t.key,t.nativeEvent)}else"Meta"===t.key&&(e.metaKeyEvents=new Map)},onClick(t){if((!t||mz(t.currentTarget,mK(t)))&&t&&0===t.button&&!e.isTriggeringEvent&&!pl.isOpening){let n=!0;if(s&&t.preventDefault(),!e.ignoreEmulatedMouseEvents&&!e.isPressed&&("virtual"===e.pointerType||ps(t.nativeEvent))){let e=b(t,"virtual"),r=D(t,"virtual"),a=x(t,"virtual");k(t),n=e&&r&&a}else if(e.isPressed&&"keyboard"!==e.pointerType){let r=e.pointerType||t.nativeEvent.pointerType||"virtual",a=D(p1(t.currentTarget,t),r),o=x(p1(t.currentTarget,t),r,!0);n=a&&o,e.isOverTarget=!1,k(t),_(t)}e.ignoreEmulatedMouseEvents=!1,n&&t.stopPropagation()}}},n=t=>{if(e.isPressed&&e.target&&p0(t,e.target)){p4(mK(t),t.key)&&t.preventDefault();let n=mK(t),r=mz(e.target,n);x(p1(e.target,t),"keyboard",r),r&&C(t,e.target),v(),"Enter"!==t.key&&pQ(e.target)&&mz(e.target,n)&&!t[pY]&&(t[pY]=!0,pl(e.target,t,!1)),e.isPressed=!1,e.metaKeyEvents?.delete(t.key)}else if("Meta"===t.key&&e.metaKeyEvents?.size){let t=e.metaKeyEvents;for(let n of(e.metaKeyEvents=void 0,t.values()))e.target?.dispatchEvent(new KeyboardEvent("keyup",n))}};if("u">typeof PointerEvent){t.onPointerDown=t=>{var a;if(0!==t.button||!mz(t.currentTarget,mK(t)))return;if(a=t.nativeEvent,!po()&&0===a.width&&0===a.height||1===a.width&&1===a.height&&0===a.pressure&&0===a.detail&&"mouse"===a.pointerType){e.pointerType="virtual";return}e.pointerType=t.pointerType;let o=!0;if(!e.isPressed){e.isPressed=!0,e.isOverTarget=!0,e.activePointerId=t.pointerId,e.target=t.currentTarget,d||function(e){if(pn()){if("default"===pA){let t=mW(e);pj=t.documentElement.style.webkitUserSelect,t.documentElement.style.webkitUserSelect="none"}pA="disabled"}else if(e instanceof HTMLElement||e instanceof SVGElement){let t="userSelect"in e.style?"userSelect":"webkitUserSelect";pI.set(e,e.style[t]),e.style[t]="none"}}(e.target),o=b(t,e.pointerType);let a=mK(t);"releasePointerCapture"in a&&("hasPointerCapture"in a?a.hasPointerCapture(t.pointerId)&&a.releasePointerCapture(t.pointerId):a.releasePointerCapture(t.pointerId)),y(mW(t.currentTarget),"pointerup",n,!1),y(mW(t.currentTarget),"pointercancel",r,!1)}o&&t.stopPropagation()},t.onMouseDown=t=>{if(mz(t.currentTarget,mK(t))&&0===t.button){if(u){let n=function(e){for(;e&&!mQ(e,{skipVisibilityCheck:!0});)e=e.parentElement;let t=mH(e),n=t.document.activeElement;if(!n||n===e)return;m6=!0;let r=!1,a=e=>{(mK(e)===n||r)&&e.stopImmediatePropagation()},o=t=>{(mK(t)===n||r)&&(t.stopImmediatePropagation(),e||r||(r=!0,mV(n),l()))},i=t=>{(mK(t)===e||r)&&t.stopImmediatePropagation()},s=t=>{(mK(t)===e||r)&&(t.stopImmediatePropagation(),r||(r=!0,mV(n),l()))};t.addEventListener("blur",a,!0),t.addEventListener("focusout",o,!0),t.addEventListener("focusin",s,!0),t.addEventListener("focus",i,!0);let l=()=>{cancelAnimationFrame(u),t.removeEventListener("blur",a,!0),t.removeEventListener("focusout",o,!0),t.removeEventListener("focusin",s,!0),t.removeEventListener("focus",i,!0),m6=!1,r=!1},u=requestAnimationFrame(l);return l}(t.target);n&&e.disposables.push(n)}t.stopPropagation()}},t.onPointerUp=t=>{mz(t.currentTarget,mK(t))&&"virtual"!==e.pointerType&&(0!==t.button||e.isPressed||D(t,e.pointerType||t.pointerType))},t.onPointerEnter=t=>{t.pointerId===e.activePointerId&&e.target&&!e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!0,b(p1(e.target,t),e.pointerType))},t.onPointerLeave=t=>{t.pointerId===e.activePointerId&&e.target&&e.isOverTarget&&null!=e.pointerType&&(e.isOverTarget=!1,x(p1(e.target,t),e.pointerType,!1),S(t))};let n=t=>{if(t.pointerId===e.activePointerId&&e.isPressed&&0===t.button&&e.target){if(mz(e.target,mK(t))&&null!=e.pointerType){let n=!1,r=setTimeout(()=>{e.isPressed&&e.target instanceof HTMLElement&&(n?_(t):(mV(e.target),e.target.click()))},80);y(t.currentTarget,"click",()=>n=!0,!0),e.disposables.push(()=>clearTimeout(r))}else _(t);e.isOverTarget=!1}},r=e=>{_(e)};t.onDragStart=e=>{mz(e.currentTarget,mK(e))&&_(e)}}return t},[y,s,u,v,d,S,b,k,C]);return(0,ll.useEffect)(()=>{if(!m)return;let e=mW(m.current);if(!e||!e.head||e.getElementById(pq))return;let t=e.createElement("style");t.id=pq;let n=pV(e);n&&(t.nonce=n),t.textContent=`
33
33
  @layer {
34
- [${pK}] {
34
+ [${pJ}] {
35
35
  touch-action: pan-x pan-y pinch-zoom;
36
36
  }
37
37
  }
38
- `.trim(),e.head.prepend(t)},[m]),(0,lr.useEffect)(()=>{let e=g.current;return()=>{for(let t of(d||p$(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||f,pressProps:my(p,P,{[pK]:!0})}}function pZ(e){return"A"===e.tagName&&e.hasAttribute("href")}function pY(e,t){let{key:n,code:r}=e,a=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof mF(t).HTMLInputElement&&!pQ(t,n)||t instanceof mF(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===a||!a&&pZ(t))&&"Enter"!==n)}function pq(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function pJ(e,t){return e instanceof HTMLInputElement?!pQ(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!pZ(e))}let pX=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pQ(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:pX.has(e.type)}function p0(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,o=(0,lr.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=pB(),l=(0,lr.useCallback)(e=>{mB(e.currentTarget,mV(e))&&o.current.isFocusWithin&&!mB(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(e),a&&a(!1))},[n,a,o,s]),u=mQ(l),c=(0,lr.useCallback)(e=>{if(!mB(e.currentTarget,mV(e)))return;let t=mV(e),n=mL(t),s=((e=document)=>e.activeElement)(n);if(!o.current.isFocusWithin&&s===t){r&&r(e),a&&a(!0),o.current.isFocusWithin=!0,u(e);let t=e.currentTarget;i(n,"focus",e=>{let r=mV(e);if(o.current.isFocusWithin&&!mB(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});mX(e,t),l(mJ(e))}},{capture:!0})}},[r,a,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function p1(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:a}=e,o=(0,lr.useRef)({isFocused:!1,isFocusVisible:n||pv()}),[i,s]=(0,lr.useState)(!1),[l,u]=(0,lr.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),c=(0,lr.useCallback)(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,lr.useCallback)(e=>{o.current.isFocused=e,o.current.isFocusVisible=pv(),s(e),c()},[c]);t={enabled:i,isTextInput:r},pg(),(0,lr.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,n)=>{var r;let a,i,s,l,u,d,m,p;r=!!t?.isTextInput,i=mL(a=n?mV(n):void 0),l=void 0!==(s=mF(a))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,m=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(i),(r=r||p instanceof l&&!pb.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&n instanceof m&&!pu[n.key]||(e=>{o.current.isFocusVisible=e,c()})(pv())};return po.add(e),()=>{po.delete(e)}},[r,i]);let{focusProps:m}=pS({isDisabled:a,onFocusChange:d}),{focusWithinProps:p}=p0({isDisabled:!a,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:a?p:m}}let p4=!1,p2=0;function p3(e){"touch"===e.pointerType&&(p4=!0,setTimeout(()=>{p4=!1},500))}function p6(){let e=mL(null);if(void 0!==e)return 0===p2&&"u">typeof PointerEvent&&e.addEventListener("pointerup",p3),p2++,()=>{!(--p2>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",p3)}}function p5(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:a}=e,[o,i]=(0,lr.useState)(!1),s=(0,lr.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,lr.useEffect)(p6,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=pB(),{hoverProps:c,triggerHoverEnd:d}=(0,lr.useMemo)(()=>{let e=(e,t)=>{let a=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&a&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:a,pointerType:t}),n&&n(!1),i(!1))},o={};return"u">typeof PointerEvent&&(o.onPointerEnter=r=>{p4&&"mouse"===r.pointerType||((r,o)=>{if(s.pointerType=o,a||"touch"===o||s.isHovered||!mB(r.currentTarget,mV(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(mL(mV(r)),"pointerover",t=>{s.isHovered&&s.target&&!mB(s.target,mV(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:o}),n&&n(!0),i(!0)})(r,r.pointerType)},o.onPointerLeave=t=>{!a&&mB(t.currentTarget,mV(t))&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,n,r,a,s,l,u]);return(0,lr.useEffect)(()=>{a&&d({currentTarget:s.target},s.pointerType)},[a]),{hoverProps:c,isHovered:o}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let p9=(0,lr.createContext)(!1);function p8(e){let t=(t,n)=>(0,lr.useContext)(p9)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,lr.forwardRef)(t)}let p7=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),fe=(0,lr.createContext)({}),ft=p8(function(e,t){var n;[e,t]=mD(e,t,fe);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:a}=r,{buttonProps:o,isPressed:i}=function(e,t){let n,{elementType:r="button",isDisabled:a,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:m,href:p,target:f,rel:h,type:g="button"}=e;n="button"===r?{type:g,disabled:a,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==r||a?void 0:p,target:"a"===r?f:void 0,type:"input"===r?g:void 0,disabled:"input"===r?a:void 0,"aria-disabled":a&&"input"!==r?a:void 0,rel:"a"===r?h:void 0};let{pressProps:y,isPressed:v}=pG({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:o,onPressUp:l,onClick:m,isDisabled:a,preventFocusOnPress:c,ref:t}),{focusableProps:b}=pT(e,t);d&&(b.tabIndex=a?-1:b.tabIndex);let w=my(b,y,mA(e,{labelable:!0}));return{isPressed:v,buttonProps:my(n,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=p1(e),{hoverProps:c,isHovered:d}=p5({...e,isDisabled:e.isDisabled||a}),m={isHovered:d,isPressed:(r.isPressed||i)&&!a,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=a&&a},p=mw({...e,values:m,defaultClassName:"react-aria-Button"}),f=mf(o.id),h=mf(),g=o["aria-labelledby"];a&&(g?g=`${g} ${h}`:o["aria-label"]&&(g=`${f} ${h}`));let y=(0,lr.useRef)(a);return(0,lr.useEffect)(()=>{let e={"aria-labelledby":g||f};!y.current&&l&&a?mC(e,"assertive"):y.current&&l&&!a&&mC(e,"assertive"),y.current=a},[a,l,g,f]),la().createElement("button",{...mA(e,{propNames:p7}),...my(o,s,c),...p,type:"submit"===o.type&&a?"button":o.type,id:f,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":a?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":m.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":a||void 0,"data-focus-visible":u||void 0},la().createElement(mS.Provider,{value:{id:h}},p.children))});(0,lr.createContext)(null),(0,lr.createContext)(null),(0,lr.createContext)(null),(0,lr.createContext)(null),(0,lr.createContext)(null);let fn=(0,lr.createContext)({}),fr=(0,lr.createContext)({}),fa=(0,lr.forwardRef)(function(e,t){[e,t]=mD(e,t,fr);let{elementType:n="span",...r}=e;return la().createElement(n,{className:"react-aria-Text",...r,ref:t})}),fo=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),fi=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fs(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return fo.has(t.script)}let t=e.split("-")[0];return fi.has(t)}let fl=Symbol.for("react-aria.i18n.locale");function fu(){let e="u">typeof window&&window[fl]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:fs(e)?"rtl":"ltr"}}let fc=fu(),fd=new Set;function fm(){for(let e of(fc=fu(),fd))e(fc)}function fp(){let e=md(),[t,n]=(0,lr.useState)(fc);return((0,lr.useEffect)(()=>(0===fd.size&&window.addEventListener("languagechange",fm),fd.add(n),()=>{fd.delete(n),0===fd.size&&window.removeEventListener("languagechange",fm)}),[]),e)?{locale:"u">typeof window&&window[fl]||"en-US",direction:"ltr"}:t}let ff=la().createContext(null);function fh(e){let{locale:t,children:n}=e,r=la().useMemo(()=>({locale:t,direction:fs(t)?"rtl":"ltr"}),[t]);return la().createElement(ff.Provider,{value:r},n)}function fg(e){let{children:t}=e,n=fp();return la().createElement(ff.Provider,{value:n},t)}function fy(e){let{locale:t,children:n}=e;return t?la().createElement(fh,{locale:t,children:n}):la().createElement(fg,{children:n})}function fv(){let e=fp();return(0,lr.useContext)(ff)||e}let fb=null;function fw(e,t="assertive",n=7e3){fb?fb.announce(e,t,n):(fb=new fx,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?fb.announce(e,t,n):setTimeout(()=>{fb?.isAttached()&&fb?.announce(e,t,n)},100))}class fx{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(r):this.politeLog?.appendChild(r),""!==e&&setTimeout(()=>{r.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var fD={};function fE(e,t){let n=(0,lr.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}fD={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let f_=new Map;class fS{constructor(e,t={}){this.formatter=fC(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==fT&&(fT="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),fT&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=fC(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),a=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===a)return"h23";if(24===r&&23===a)return"h24";if(0===r&&11===a)return"h11";if(12===r&&11===a)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let fk={true:{ja:"h11"},false:{}};function fC(e,t={}){if("boolean"==typeof t.hour12&&(null==fP&&(fP="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),fP)){let n=fk[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(f_.has(n))return f_.get(n);let r=new Intl.DateTimeFormat(e,t);return f_.set(n,r),r}let fP=null,fT=null;function fR(e){e=fE(e??{},fN);let{locale:t}=fv();return(0,lr.useMemo)(()=>new fS(t,e),[t,e])}function fN(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}let fO=Symbol.for("react-aria.i18n.locale"),f$=Symbol.for("react-aria.i18n.strings");class fM{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let a=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[a])return t[a];for(let e in t)if(e.startsWith(a+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[fO];if(void 0===m){let e=window[f$];if(!e)return null;for(let n in m={},e)m[n]=new fM({[t]:e[n]},t)}let n=m?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}let fA=new Map,fj=new Map;class fI{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let a=this.locale+":"+n,o=fA.get(a);return o||(o=new Intl.PluralRules(this.locale,{type:n}),fA.set(a,o)),"function"==typeof(r=t[o.select(e)]||t.other)?r():r}number(e){let t=fj.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),fj.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let fL=new WeakMap;function fF(e,t){let n;return t&&fM.getGlobalDictionaryForPackage(t)||((n=fL.get(e))||(n=new fM(e),fL.set(e,n)),n)}function fB(e,t){let{locale:n}=fv(),r=fF(e,t);return(0,lr.useMemo)(()=>new fI(n,r),[n,r])}function fV(e,t){return e-t*Math.floor(e/t)}function fU(e,t,n,r){let a=(t=fH(e,t))-1,o=-2;return n<=2?o=0:fW(t)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*n-362)/12+o+r)}function fW(e){return e%4==0&&(e%100!=0||e%400==0)}function fH(e,t){return"BC"===e?1-t:t}function fz(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let fK={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class fG{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=fV(t,146097),a=Math.floor(r/36524),o=fV(r,36524),i=Math.floor(o/1461),s=Math.floor(fV(o,1461)/365),[l,u]=fz(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),c=e-fU(l,u,1,1),d=2;e<fU(l,u,3,1)?d=0:fW(u)&&(d=1);let m=Math.floor(((c+d)*12+373)/367),p=e-fU(l,u,m,1)+1;return new ha(l,u,m,p)}toJulianDay(e){return fU(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return fK[fW(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return fW(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function fZ(e,t){let n=e.copy(),r="hour"in n?f3(n,t):0;fY(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,fq(n),fJ(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,fq(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,fq(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let a=n.calendar.getYearsInEra(n);if(n.year>a){let e=n.calendar.isInverseEra?.(n);n.year=a,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function fY(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function fq(e){for(;e.month<1;)fY(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,fY(e,1)}function fJ(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function fX(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),fJ(e)}function fQ(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function f0(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),fX(n),n}function f1(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),f4(n),n}function f4(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function f2(e,t){let n=e%t;return n<0&&(n+=t),n}function f3(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=f2(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=f2(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=f2(e.minute,60),n=Math.floor(e.hour/24),e.hour=f2(e.hour,24),n}function f6(e,t){let n=e.copy();return f3(n,t),n}function f5(e,t,n,r){let a=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=f8(o,n,0,t.length-1,r?.round),a.era=t[o],fX(a);break}case"year":a.calendar.isInverseEra?.(a)&&(n=-n),a.year=f8(e.year,n,-1/0,9999,r?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=f8(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":a.day=f8(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),fX(a),a}function f9(e,t,n,r){let a=e.copy();switch(t){case"hour":{let t=e.hour,o=0,i=23;if(r?.hourCycle===12){let e=t>=12;o=12*!!e,i=e?23:11}a.hour=f8(t,n,o,i,r?.round);break}case"minute":a.minute=f8(e.minute,n,0,59,r?.round);break;case"second":a.second=f8(e.second,n,0,59,r?.round);break;case"millisecond":a.millisecond=f8(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return a}function f8(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function f7(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?hp(fZ(hy(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):hl(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),hv(hh(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function he(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function ht(e){let t,n=hv(e,new fG);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function hn(e){return`${ht(e)}T${he(e)}`}function hr(e){let t,n="object"==typeof e[0]?e.shift():new fG;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}class ha{#t;constructor(...e){let[t,n,r,a,o]=hr(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,fX(this)}copy(){return this.era?new ha(this.calendar,this.era,this.year,this.month,this.day):new ha(this.calendar,this.year,this.month,this.day)}add(e){return fZ(this,e)}subtract(e){return fZ(this,fQ(e))}set(e){return f0(this,e)}cycle(e,t,n){return f5(this,e,t,n)}toDate(e){return hf(this,e)}toString(){return ht(this)}compare(e){return hC(this,e)}}class ho{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,f4(this)}copy(){return new ho(this.hour,this.minute,this.second,this.millisecond)}add(e){return f6(this,e)}subtract(e){return f6(this,fQ(e))}set(e){return f1(this,e)}cycle(e,t,n){return f9(this,e,t,n)}toString(){return he(this)}compare(e){var t,n;return t=this,n=e,hP(t)-hP(n)}}class hi{#t;constructor(...e){let[t,n,r,a,o]=hr(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,fX(this)}copy(){return this.era?new hi(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hi(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return fZ(this,e)}subtract(e){return fZ(this,fQ(e))}set(e){return f0(f1(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return f5(this,e,t,n);default:return f9(this,e,t,n)}}toDate(e,t){return hf(this,e,t)}toString(){return hn(this)}compare(e){var t,n;let r=hC(this,e);return 0===r?(t=this,n=hy(e),hP(t)-hP(n)):r}}class hs{#t;constructor(...e){let[t,n,r,a,o]=hr(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,fX(this)}copy(){return this.era?new hs(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hs(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return f7(this,e)}subtract(e){return f7(this,fQ(e))}set(e,t){let n,r;return 0===(r=f1(f0(n=hy(this),e),e)).compare(n)?this:hv(hh(hp(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,a=23;if(r?.hourCycle===12){let n=e.hour>=12;t=12*!!n,a=n?23:11}let o=hy(e),i=hv(f1(o,{hour:t}),new fG),s=[hp(i,e.timeZone,"earlier"),hp(i,e.timeZone,"later")].filter(t=>hh(t,e.timeZone).day===i.day)[0],l=hv(f1(o,{hour:a}),new fG),u=[hp(l,e.timeZone,"earlier"),hp(l,e.timeZone,"later")].filter(t=>hh(t,e.timeZone).day===l.day).pop(),c=hl(e)-e.offset,d=Math.floor(c/36e5),m=c%36e5;return hv(hh(c=36e5*f8(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+m,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return f9(e,t,n,r);case"era":case"year":case"month":case"day":return hv(hh(hp(f5(hy(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(hl(e)-e.offset)}toString(){var e;let t,n,r,a,o;return`${hn(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`,0!==a&&(o+=`:${String(a).padStart(2,"0")}`),o}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof hs){var n,r;return e.timeZone===t?e:(n=e,r=t,hv(hh(hl(n)-n.offset,r),n.calendar))}return hh(hp(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function hl(e){return hu(fH((e=hv(e,new fG)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function hu(e,t,n,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,t-1,n),s.getTime()}function hc(e,t){if("UTC"===t)return 0;if(e>0&&t===hR())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=hm(e,t);return hu(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hd=new Map;function hm(e,t){let n=hd.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hd.set(t,n));let r=n.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function hp(e,t,n="compatible"){var r,a,o;let i=hy(e);if("UTC"===t)return hl(i);if(t===hR()&&"compatible"===n){i=hv(i,new fG);let e=new Date,t=fH(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=hl(i),l=hc(s-864e5,t),u=hc(s+864e5,t),c=(r=i,((a=s-l)==(o=s-u)?[a]:[a,o]).filter(e=>{var n;let a;return n=r,a=hm(e,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.second}));if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function hf(e,t,n="compatible"){return new Date(hp(e,t,n))}function hh(e,t){let n=hc(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new hs(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function hg(e){return new ha(e.calendar,e.era,e.year,e.month,e.day)}function hy(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new hi(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function hv(e,t){if(hD(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,fX(r),r}let hb={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function hw(e,t){return t=hv(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function hx(e,t){return hD(e.calendar,t.calendar)&&hw(e,t)}function hD(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let hE={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function h_(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?hE[n]:function(e){let t=hA.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return hA.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=hM.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&hM.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];t="mon"===n?{firstDay:1}:"tue"===n?{firstDay:2}:"wed"===n?{firstDay:3}:"thu"===n?{firstDay:4}:"fri"===n?{firstDay:5}:"sat"===n?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:n&&hb[n]||0};hA.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function hS(e){return hh(Date.now(),e)}function hk(e){return hg(hS(e))}function hC(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function hP(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let hT=null;function hR(){return null==hT&&(hT=new Intl.DateTimeFormat().resolvedOptions().timeZone),hT}function hN(e){return e.subtract({days:e.day-1})}function hO(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function h$(e,t,n){let r=h_(e,t,n);return e.subtract({days:r})}let hM=new Map,hA=new Map;function hj(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((h_(hN(e),t,n)+r)/7)}function hI(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function hL(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function hF(e){return e&&e.__esModule?e.default:e}let hB=new WeakMap;function hV(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function hU(e,t,n,r){let a=fB(hF(fD),"@react-aria/calendar"),o=hV(e)||hV(t),i=fR({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n}),s=fR({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n});return(0,lr.useMemo)(()=>{if(hw(e,hN(e))){let o=e,s=t;if(e.calendar.getFormattableMonth&&(o=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),hw(t,hO(e)))return i.format(o.toDate(n));if(hw(t,hO(t)))return r?hW(i,a,o,s,n):i.formatRange(o.toDate(n),s.toDate(n))}return r?hW(s,a,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,i,s,a,n,r])}function hW(e,t,n,r,a){let o=e.formatRangeToParts(n.toDate(a),r.toDate(a)),i=-1;for(let e=0;e<o.length;e++){let t=o[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<o.length;e++)e<i?s+=o[e].value:e>i&&(l+=o[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function hH(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=mf(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),r||a||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function hz(e,t){let n=(0,lr.useRef)(!0),r=(0,lr.useRef)(null),a=pF(e);(0,lr.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,lr.useEffect)(()=>{let e=r.current;n.current?n.current=!1:(!e||t.some((t,n)=>!Object.is(t,e[n])))&&a(),r.current=t},t)}function hK(e,t){var n;let r,a,o,i,s,l=fB((n=fD)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=mA(e),c=hU(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=hU(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);hz(()=>{t.isFocused||fw(d)},[d]);let m=(o=fB(hF(fD),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=t.value??void 0,i=fR({weekday:"long",month:"long",year:"numeric",day:"numeric",era:hV(r)||hV(a),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,lr.useMemo)(()=>{if(!s&&r&&a)if(hw(r,a)){let e=i.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=hW(i,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,s,t.timeZone,o,i]));hz(()=>{m&&fw(m,"polite",4e3)},[m]);let p=mh([!!e.errorMessage,e.isInvalid,e.validationState]);hB.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:m});let[f,h]=(0,lr.useState)(!1),g=e.isDisabled||t.isNextVisibleRangeInvalid();g&&f&&(h(!1),t.setFocused(!0));let[y,v]=(0,lr.useState)(!1),b=e.isDisabled||t.isPreviousVisibleRangeInvalid();return b&&y&&(v(!1),t.setFocused(!0)),{calendarProps:my(u,hH({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:g,onFocusChange:h},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:b,onFocusChange:v},errorMessageProps:{id:p},title:c}}let hG={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function hZ(e){let{children:t,elementType:n="div",isFocusable:r,style:a,...o}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:n}=e,[r,a]=(0,lr.useState)(!1),{focusWithinProps:o}=p0({isDisabled:!n,onFocusWithinChange:e=>a(e)}),i=(0,lr.useMemo)(()=>r?t:t?{...hG,...t}:hG,[r]);return{visuallyHiddenProps:{...o,style:i}}}(e);return la().createElement(n,my(o,i),t)}function hY(e,t,n,r){let a=pF(n),o=null==n;(0,lr.useEffect)(()=>{if(o||!e.current)return;let n=e.current;return n.addEventListener(t,a,r),()=>{n.removeEventListener(t,a,r)}},[e,t,r,o])}function hq(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,a=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&"hidden"!==n.overflow&&(a=!0),a&&t&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function hJ(e,t){let n=e;for(hq(n,t)&&(n=n.parentElement);n&&!hq(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function hX(e,t){let n=[],r=document.scrollingElement||document.documentElement;do hq(e,t)&&n.push(e),e=e.parentElement;while(e&&e!==r);return n}function hQ(e,t,n={}){let{block:r="nearest",inline:a="nearest"}=n;if(e===t)return;let o=e.scrollTop,i=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,m=e===d?0:l.top,p=e===d?e.clientHeight:l.bottom,f=e===d?0:l.left,h=e===d?e.clientWidth:l.right,g=parseInt(u.scrollMarginTop,10)||0,y=parseInt(u.scrollMarginBottom,10)||0,v=parseInt(u.scrollMarginLeft,10)||0,b=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,D=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,_=parseInt(c.borderTopWidth,10)||0,S=parseInt(c.borderBottomWidth,10)||0,k=parseInt(c.borderLeftWidth,10)||0,C=parseInt(c.borderRightWidth,10)||0,P=s.top-g,T=s.bottom+y,R=s.left-v,N=s.right+b,O=e===d?0:k+C,$=e===d?0:_+S,M=e.offsetWidth-e.clientWidth-O,A=e.offsetHeight-e.clientHeight-$,j=m+_+w,I=p-S-x-A,L=f+k+D,F=h-C-E;"rtl"!==c.direction||m9()?F-=M:L+=M;let B=P<j||T>I,V=R<L||N>F;if(B&&"start"===r)o+=P-j;else if(B&&"center"===r)o+=(P+T)/2-(j+I)/2;else if(B&&"end"===r)o+=T-I;else if(B&&"nearest"===r){let e=P-j,t=T-I;o+=Math.abs(e)<=Math.abs(t)?e:t}if(V&&"start"===a)i+=R-L;else if(V&&"center"===a)i+=(R+N)/2-(L+F)/2;else if(V&&"end"===a)i+=N-F;else if(V&&"nearest"===a){let e=R-L,t=N-F;i+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:i,top:o})}function h0(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:r}=e.getBoundingClientRect(),a=hX(e,!0);for(let t of a)hQ(t,e);let{left:o,top:i}=e.getBoundingClientRect();if(Math.abs(t-o)>1||Math.abs(r-i)>1)for(let e of a=n?hX(n,!0):[])hQ(e,n,{block:"center",inline:"center"})}else{let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:a,top:o}=e.getBoundingClientRect();(Math.abs(t-a)>1||Math.abs(r-o)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let h1=0,h4=new Map;function h2(e){let[t,n]=(0,lr.useState)();return mn(()=>{if(!e)return;let t=h4.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${h1++}`;n(r);let a=document.createElement("div");a.id=r,a.style.display="none",a.textContent=e,document.body.appendChild(a),t={refCount:0,element:a},h4.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),h4.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class h3 extends fG{fromJulianDay(e){let t=super.fromJulianDay(e);return new ha(this,fH(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(h6(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(h6(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function h6(e){let[t,n]=fz(e.year+-543);return new ha(t,n,e.month,e.day)}function h5(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function h9(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-h5(e,n,1,1))/30),a=t+1-h5(e,n,r,1);return[n,r,a]}function h8(e){return Math.floor(e%4/3)}function h7(e,t){return t%13!=0?30:h8(e)+5}class ge{fromJulianDay(e){let[t,n,r]=h9(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new ha(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),h5(1723856,t,e.month,e.day)}getDaysInMonth(e){return h7(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+h8(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class gt extends ge{fromJulianDay(e){let[t,n,r]=h9(1723856,e);return new ha(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class gn extends ge{fromJulianDay(e){let[t,n,r]=h9(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new ha(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),h5(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),h7(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let gr=765433;function ga(e){return 7>fV(7*e+1,19)}function go(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>fV(3*(n+1),7)&&(n+=1),n}function gi(e){let t,n;return go(e)+(t=go(e-1),n=go(e),go(e+1)-n==356?2:+(n-t==382))}function gs(e){return gi(e+1)-gi(e)}function gl(e,t){if(t>=6&&!ga(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=gs(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!ga(e):30}class gu{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/gr*19+234)/235)+1,r=gi(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=gi(--n)));let o=1,i=0;for(;i<a;)i+=gl(n,o),o++;let s=a-(i-=gl(n,--o));return new ha(this,n,o,s)}toJulianDay(e){let t=gi(e.year);for(let n=1;n<e.month;n++)t+=gl(e.year,n);return t+e.day+347997}getDaysInMonth(e){return gl(e.year,e.month)}getMonthsInYear(e){return ga(e.year)?13:12}getDaysInYear(e){return gs(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(ga(t.year)&&!ga(e.year)&&t.month>6?e.month--:!ga(t.year)&&ga(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class gc extends fG{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-fU(a.era,a.year,1,1);if(i<80?(o--,i+=(t=fW(a.year-1)?31:30)+155+90+10):(t=fW(a.year)?31:30,i-=80),i<t)n=1,r=i+1;else{let e=i-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new ha(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=fz(e.year+78);return(fW(a)?(t=31,n=fU(r,a,3,21)):(t=30,n=fU(r,a,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&fW(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function gd(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function gm(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+gd(t,r,1,1)))/29.5)+1),o=n-gd(t,r,a,1)+1;return new ha(e,r,a,o)}function gp(e){return(14+11*e)%30<11}class gf{fromJulianDay(e){return gm(this,1948440,e)}toJulianDay(e){return gd(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&gp(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return gp(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class gh extends gf{fromJulianDay(e){return gm(this,1948439,e)}toJulianDay(e){return gd(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function gg(e){return 460322+l[e-1300]}function gy(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function gv(e,t){let n=gg(e);for(let r=1;r<t;r++)n+=gy(e,r);return n}function gb(e){return l[e+1-1300]-l[e-1300]}class gw extends gf{constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let n=1;n<=12;n++)e+=gy(t,n)}}}fromJulianDay(e){let t=e-1948440,n=gg(1300),r=gg(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-gg(++e)+1;let a=gb(e);if(r===a){n=12;break}if(r<a){let t=gy(e,n);for(n=1;r>t;)r-=t,t=gy(e,++n);break}}return new ha(this,e,n,t-gv(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+gv(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):gy(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):gb(e.year)}}let gx=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],gD=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],gE=[1867,1911,1925,1988,2018],g_=["meiji","taisho","showa","heisei","reiwa"];function gS(e){let t=gx.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?gx.length-1:0===t?0:t-1}function gk(e){let t=gE[g_.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new ha(e.year+t,e.month,e.day)}class gC extends fG{fromJulianDay(e){let t=super.fromJulianDay(e),n=gS(t);return new ha(this,g_[n],t.year-gE[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(gk(e))}balanceDate(e){let t=gk(e),n=gS(t);g_[n]!==e.era&&(e.era=g_[n],e.year=t.year-gE[n]),this.constrainDate(e)}constrainDate(e){let t=g_.indexOf(e.era),n=gD[t];if(null!=n){let[r,a,o]=n,i=r-gE[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=gx[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return g_}getYearsInEra(e){let t=g_.indexOf(e.era),n=gx[t],r=gx[t+1];if(null==r)return 9999-n[0]+1;let a=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(gk(e))}getMinimumMonthInYear(e){let t=gP(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=gP(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function gP(e){if(1===e.year)return gx[g_.indexOf(e.era)]}let gT=[0,31,62,93,124,155,186,216,246,276,306,336];class gR{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-gT[a]+1;return new ha(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=gT[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>fV(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function gN(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function gO(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class g$ extends fG{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=gO(fH(t.era,t.year));return new ha(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gM(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=gO(gN(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(gM(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function gM(e){let[t,n]=fz(gN(e));return new ha(t,n,e.month,e.day)}function gA(e){switch(e){case"buddhist":return new h3;case"ethiopic":return new ge;case"ethioaa":return new gt;case"coptic":return new gn;case"hebrew":return new gu;case"indian":return new gc;case"islamic-civil":return new gf;case"islamic-tbla":return new gh;case"islamic-umalqura":return new gw;case"japanese":return new gC;case"persian":return new gR;case"roc":return new g$;default:return new fG}}function gj(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function gI(e,t,n,r,a){let o={};for(let e in t)o[e]=Math.floor(t[e]/2),o[e]>0&&t[e]%2==0&&o[e]--;let i=gL(e,t,n).subtract(o);return gB(e,i,t,n,r,a)}function gL(e,t,n,r,a){let o=e;if(t.years)o=hN(e.subtract({months:e.month-1}));else t.months?o=hN(e):t.weeks&&(o=h$(e,n));return gB(e,o,t,n,r,a)}function gF(e,t,n,r,a){let o={...t};o.days?o.days--:o.weeks?o.weeks--:o.months?o.months--:o.years&&o.years--;let i=gL(e,t,n).subtract(o);return gB(e,i,t,n,r,a)}function gB(e,t,n,r,a,o){if(a&&e.compare(a)>=0){let e=hL(t,gL(hg(a),n,r));e&&(t=e)}if(o&&0>=e.compare(o)){let e=hI(t,gF(hg(o),n,r));e&&(t=e)}return t}function gV(e,t,n){if(t){let n=hL(e,hg(t));n&&(e=n)}if(n){let t=hI(e,hg(n));t&&(e=t)}return e}function gU(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let gW="u">typeof document?la().useInsertionEffect??la().useLayoutEffect:()=>{};function gH(e,t,n){let[r,a]=(0,lr.useState)(e||t),o=(0,lr.useRef)(r),i=(0,lr.useRef)(void 0!==e),s=void 0!==e;(0,lr.useEffect)(()=>{i.current,i.current=s},[s]);let l=s?e:r;gW(()=>{o.current=l});let[,u]=(0,lr.useReducer)(()=>({}),{});return[l,(0,lr.useCallback)((e,...t)=>{let r="function"==typeof e?e(o.current):e;Object.is(o.current,r)||(o.current=r,a(r),u(),n?.(r,...t))},[n])]}function gz(e){let t=(0,lr.useMemo)(()=>new fS(e.locale),[e.locale]),n=(0,lr.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:a,visibleDuration:o={months:1},minValue:i,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,m=(0,lr.useMemo)(()=>a(n.calendar),[a,n.calendar]),[p,f]=gH(e.value,e.defaultValue??null,e.onChange),h=(0,lr.useMemo)(()=>p?hv(hg(p),m):null,[p,m]),g=(0,lr.useMemo)(()=>p&&"timeZone"in p?p.timeZone:n.timeZone,[p,n.timeZone]),[y,v]=gH((0,lr.useMemo)(()=>e.focusedValue?gV(hv(hg(e.focusedValue),m),i,s):void 0,[e.focusedValue,m,i,s]),(0,lr.useMemo)(()=>gV(e.defaultFocusedValue?hv(hg(e.defaultFocusedValue),m):h||hv(hk(g),m),i,s),[e.defaultFocusedValue,h,g,m,i,s]),e.onFocusChange),[b,w]=(0,lr.useState)(()=>{switch(l){case"start":return gL(y,o,r,i,s);case"end":return gF(y,o,r,i,s);default:return gI(y,o,r,i,s)}}),[x,D]=(0,lr.useState)(e.autoFocus||!1),E=(0,lr.useMemo)(()=>{let e={...o};return e.days?e.days--:e.days=-1,b.add(e)},[b,o]),[_,S]=(0,lr.useState)(m);if(!hD(m,_)){let e=hv(y,m);w(gI(e,o,r,i,s)),v(e),S(m)}function k(e){v(e=gV(e,i,s))}function C(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void f(null);(e=gU(e=gV(e,i,s),b,u))&&(e=hv(e,p?.calendar||new fG),p&&"hour"in p?f(p.set(e)):f(e))}}gj(y,i,s)?v(gV(y,i,s)):0>y.compare(b)?w(gF(y,o,r,i,s)):y.compare(E)>0&&w(gL(y,o,r,i,s));let P=(0,lr.useMemo)(()=>!!h&&(!!(u&&u(h))||gj(h,i,s)),[h,u,i,s]),T=e.isInvalid||"invalid"===e.validationState||P,R=(0,lr.useMemo)(()=>"visible"===c?o:gK(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:h,setValue:C,visibleRange:{start:b,end:E},minValue:i,maxValue:s,focusedDate:y,timeZone:g,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){k(e)},focusNextDay(){k(y.add({days:1}))},focusPreviousDay(){k(y.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&k(y.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&k(y.subtract({weeks:1}))},focusNextPage(){let e=b.add(R);v(gV(y.add(R),i,s)),w(gL(gB(y,e,R,r,i,s),R,r))},focusPreviousPage(){let e=b.subtract(R);v(gV(y.subtract(R),i,s)),w(gL(gB(y,e,R,r,i,s),R,r))},focusSectionStart(){o.days?k(b):o.weeks?k(h$(y,r)):(o.months||o.years)&&k(hN(y))},focusSectionEnd(){o.days?k(E):o.weeks?k(h$(y,r,void 0).add({days:6})):(o.months||o.years)&&k(hO(y))},focusNextSection(e){e||o.days?o.days?this.focusNextPage():o.weeks?k(y.add({months:1})):(o.months||o.years)&&k(y.add({years:1})):k(y.add(gK(o)))},focusPreviousSection(e){e||o.days?o.days?this.focusPreviousPage():o.weeks?k(y.subtract({months:1})):(o.months||o.years)&&k(y.subtract({years:1})):k(y.subtract(gK(o)))},selectFocusedDate(){u&&u(y)||C(y)},selectDate(e){C(e)},isFocused:x,setFocused:D,isInvalid:e=>gj(e,i,s),isSelected(e){return null!=h&&hw(e,h)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&y&&hw(e,y),isCellDisabled(t){return e.isDisabled||0>t.compare(b)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=b.subtract({days:1});return hw(e,b)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return hw(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=b){let n=t.add({weeks:e}),a=[],o=h_(n=h$(n,r,d),r,d);for(let e=0;e<o;e++)a.push(null);for(;a.length<7;){a.push(n);let e=n.add({days:1});if(hw(n,e))break;n=e}for(;a.length<7;)a.push(null);return a}}}function gK(e){let t={...e};for(let n in e)t[n]=1;return t}function gG(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:hg(e),end:hg(t)}):null}function gZ(e,t){return(e=hv(e,t?.calendar||new fG),t&&"hour"in t)?t.set(e):e}function gY(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let gq=(0,lr.createContext)(null),gJ=(0,lr.createContext)(null),gX=(0,lr.createContext)(null),gQ=(0,lr.createContext)(null),g0=(0,lr.forwardRef)(function(e,t){[e,t]=mD(e,t,gq);let{locale:n}=fv(),r=gz({...e,locale:n,createCalendar:gA}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=hK(e,r),u=mw({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return la().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},la().createElement(mb,{values:[[fe,{slots:{previous:o,next:i}}],[fn,{"aria-hidden":!0,level:2,children:l}],[gX,r],[gq,e],[fr,{slots:{errorMessage:s}}]]},la().createElement(hZ,null,la().createElement("h2",null,a["aria-label"])),u.children,la().createElement(hZ,null,la().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g1=(0,lr.forwardRef)(function(e,t){[e,t]=mD(e,t,gJ);let{locale:n}=fv(),r=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:a,locale:o,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=gH(t,n||null,r),[m,p]=(0,lr.useState)(null),f="center";if(c&&c.start&&c.end){let e=gI(hg(c.start),i,o,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(f="start")}let h=(0,lr.useRef)(null),[g,y]=(0,lr.useState)(null),v=(0,lr.useMemo)(()=>hL(s,g?.start),[s,g]),b=(0,lr.useMemo)(()=>hI(l,g?.end),[l,g]),w=gz({...u,value:c&&c.start,createCalendar:a,locale:o,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:e.selectionAlignment||f}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:gY(t,w,-1),end:gY(t,w,1)},y(h.current)):(h.current=null,y(null))},[D,E]=(0,lr.useState)(w.visibleRange);hx(w.visibleRange.start,D.start)&&hx(w.visibleRange.end,D.end)||(x(m),E(w.visibleRange));let _=e=>{e?(p(e),x(e)):(p(null),x(null))},S=m?gG(m,w.focusedDate):c&&gG(c.start,c.end),k=t=>{if(e.isReadOnly)return;let n=gU(gV(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(n)if(m){let e=gG(m,n);e&&d({start:gZ(e.start,c?.start),end:gZ(e.end,c?.end)}),_(null)}else _(n)},[C,P]=(0,lr.useState)(!1),{isDateUnavailable:T}=e,R=(0,lr.useMemo)(()=>!!c&&!m&&(!!(T&&(T(c.start)||T(c.end)))||gj(c.start,s,l)||gj(c.end,s,l)),[T,c,m,s,l]),N=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:m,setAnchorDate:_,highlightedRange:S,validationState:N?"invalid":null,isValueInvalid:N,selectFocusedDate(){k(w.focusedDate)},selectDate:k,highlightDate(e){m&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||gj(e,h.current?.start,h.current?.end),isDragging:C,setDragging:P,clearSelection(){_(null),d(null)}}}({...e,locale:n,createCalendar:gA}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...a}=e,o=hK(a,t),i=(0,lr.useRef)(!1),s=(0,lr.useRef)("u">typeof window?window:null);hY(s,"pointerdown",e=>{i.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return hY(s,"pointerup",e=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let a=e.target;n.current&&mU(n.current)&&(!mB(n.current,a)||!a.closest('button, [role="button"]'))&&l[r]()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&mB(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},hY(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o}(e,r,t),u=mw({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return la().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},la().createElement(mb,{values:[[fe,{slots:{previous:o,next:i}}],[fn,{"aria-hidden":!0,level:2,children:l}],[gQ,r],[gJ,e],[fr,{slots:{errorMessage:s}}]]},la().createElement(hZ,null,la().createElement("h2",null,a["aria-label"])),u.children,la().createElement(hZ,null,la().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g4=(0,lr.createContext)(null),g2=(0,lr.forwardRef)(function(e,t){var n,r;let a=(0,lr.useContext)(gX),o=(0,lr.useContext)(gQ),i=mx(gq),s=mx(gJ),l=null!=a?a:o,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(n=null==i?void 0:i.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:m,weekDays:p}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:o}=fv(),i=hU(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=hB.get(t),u=hH({"aria-label":[s,i].filter(Boolean).join(", "),"aria-labelledby":l}),c=fR({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=fv(),m=(0,lr.useMemo)(()=>{let e=h$(hk(t.timeZone),d,a);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return c.format(r)})},[d,t.timeZone,c,a]),p=hj(n,d,a);return{gridProps:my(u,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===o?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===o?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:m,weeksInMonth:p}}({startDate:u,endDate:hO(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return la().createElement(g4.Provider,{value:{headerProps:m,weekDays:p,startDate:u,firstDayOfWeek:c}},la().createElement("table",{...mA(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:la().createElement(la().Fragment,null,la().createElement(g3,null,e=>la().createElement(g6,null,e)),la().createElement(g5,null,e.children))))}),g3=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,{headerProps:o,weekDays:i}=(0,lr.useContext)(g4);return la().createElement("thead",{...mA(e),...o,ref:t,style:r,className:a||"react-aria-CalendarGridHeader"},la().createElement("tr",null,i.map((e,t)=>la().cloneElement(n(e),{key:t}))))}),g6=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e;return la().createElement("th",{...mA(e),ref:t,style:r,className:a||"react-aria-CalendarHeaderCell"},n)}),g5=(0,lr.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,o=(0,lr.useContext)(gX),i=(0,lr.useContext)(gQ),s=null!=o?o:i,{startDate:l,firstDayOfWeek:u}=(0,lr.useContext)(g4),{locale:c}=fv(),d=hj(l,c,u);return la().createElement("tbody",{...mA(e),ref:t,style:r,className:a||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>la().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?la().cloneElement(n(e),{key:t}):la().createElement("td",{key:t})))))}),g9=(0,lr.forwardRef)(function({date:e,...t},n){var r,a,o;let i=(0,lr.useContext)(gX),s=(0,lr.useContext)(gQ),l=null!=i?i:s,{startDate:u}=null!=(r=(0,lr.useContext)(g4))?r:{startDate:l.visibleRange.start},c=(0,lr.useRef)(null),{cellProps:d,buttonProps:m,...p}=function(e,t,n){var r;let a,{date:o,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=hB.get(t),u=fB((r=fD)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=fR({weekday:"long",day:"numeric",month:"long",year:"numeric",era:hV(o),timeZone:t.timeZone}),d=t.isSelected(o),m=t.isCellFocused(o)&&!e.isOutsideMonth;i=i||t.isCellDisabled(o);let p=t.isCellUnavailable(o),f=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&o.compare(t.highlightedRange.start)>=0&&0>=o.compare(t.highlightedRange.end):t.value&&hw(t.value,o));h&&(d=!0),o=fE(o,hx);let g=(0,lr.useMemo)(()=>o.toDate(t.timeZone),[o,t.timeZone]),y=hw(o,hk(t.timeZone)),v=(0,lr.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(hw(o,t.value.start)||hw(o,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&hw(o,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&hw(o,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,o,t,l]),b="";"anchorDate"in t&&m&&!t.isReadOnly&&f&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=h2(b),x=(0,lr.useRef)(!1),D=(0,lr.useRef)(!1),E=(0,lr.useRef)(void 0),{pressProps:_,isPressed:S}=pG({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(o),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(hw(o,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}else if(hw(o,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}}let n=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(n,200):n()}},onPressEnd(){D.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0)),"anchorDate"in t))if(D.current)t.setAnchorDate(o);else if(t.anchorDate&&!x.current)t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0));else{t.selectDate(o);let e=o.add({days:1});t.isInvalid(e)&&(e=o.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});i||(a=hw(o,t.focusedDate)?0:-1),(0,lr.useEffect)(()=>{m&&n.current&&(mj(n.current),"pointer"!==pa&&((e=document)=>e.activeElement)()===n.current&&h0(n.current,{containingElement:hJ(n.current)}))},[m,n]);let k=fR({day:"numeric",timeZone:t.timeZone,calendar:o.calendar.identifier}),C=(0,lr.useMemo)(()=>k.formatToParts(g).find(e=>"day"===e.type).value,[k,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:my(_,{onFocus(){i||(t.setFocusedDate(o),t.setFocused(!0))},tabIndex:a,role:"button","aria-disabled":!f||void 0,"aria-label":v,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&f&&t.highlightDate(o)},onPointerDown(e){let t=mV(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:m,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>o.compare(t.visibleRange.start)||o.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:C}}({date:e},l,c),{hoverProps:f,isHovered:h}=p5({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=p1();y&&(y=p.isFocused);let v=(a=u,o=hv(o=e,a.calendar),a=hN(a),o=hN(o),a.era!==o.era||a.year!==o.year||a.month!==o.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=hw(e,l.highlightedRange.start),w=hw(e,l.highlightedRange.end));let x=mw({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),D={"data-focused":p.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return la().createElement("td",{...d,ref:n},la().createElement("div",{...my(mA(t),m,g,f,D,x),ref:c}))}),g8=(0,lr.createContext)({}),g7=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mD(e,t,g8);let{isDisabled:a,isInvalid:o,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=p5({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:a}),{isFocused:m,isFocusVisible:p,focusProps:f}=p1({within:!0});null!=a||(a=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mw({...e,values:{isHovered:d,isFocusWithin:m,isFocusVisible:p,isDisabled:a,isInvalid:o},defaultClassName:"react-aria-Group"});return la().createElement("div",{...my(u,f,c),...h,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":m||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":a||void 0,"data-invalid":o||void 0},h.children)}),ye=(0,lr.createContext)({}),yt=p8(function(e,t){[e,t]=mD(e,t,ye);let{hoverProps:n,isHovered:r}=p5(e),{isFocused:a,isFocusVisible:o,focusProps:i}=p1({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mw({...e,values:{isHovered:r,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return la().createElement("input",{...my((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...a}=e;return a})(e),i,n),...l,ref:t,"data-focused":a||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":s||void 0})});function yn(e,t,n,r){return e.createTreeWalker(t,n,r)}let yr=la().createContext(null),ya="react-aria-focus-scope-restore",yo=null;function yi(e){var t,n,r,a,o,i,s,l,u,c;let d,m,p,f,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,lr.useRef)(null),w=(0,lr.useRef)(null),x=(0,lr.useRef)([]),{parentNode:D}=(0,lr.useContext)(yr)||{},E=(0,lr.useMemo)(()=>new yx({scopeRef:x}),[x]);mn(()=>{let e=D||yD.root;if(yD.getTreeNode(e.scopeRef)&&yo&&!yd(yo,e.scopeRef)){let t=yD.getTreeNode(yo);t&&(e=t)}e.addChild(E),yD.addNode(E)},[E,D]),mn(()=>{let e=yD.getTreeNode(x);e&&(e.contain=!!g)},[g]),mn(()=>{let e=b.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(ya,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(ya,n)}},[h]),mn(()=>{if(n||r)return;let e=t.current,a=mL(e?e[0]:void 0),o=e=>{let n=mV(e);yu(n,t.current)?yo=t:yc(n)||(yo=null)};return a.addEventListener("focusin",o,!1),e?.forEach(e=>e.addEventListener("focusin",o,!1)),()=>{a.removeEventListener("focusin",o,!1),e?.forEach(e=>e.removeEventListener("focusin",o,!1))}},[t=x,n=y,r=g]),a=x,o=g,d=(0,lr.useRef)(void 0),m=(0,lr.useRef)(void 0),mn(()=>{let e=a.current;if(!o){m.current&&(cancelAnimationFrame(m.current),m.current=void 0);return}let t=mL(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!yl(a)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=a.current;if(!r||!yu(n,r))return;let o=yy(ys(r),{tabbable:!0},r);if(!n)return;o.currentNode=n;let i=e.shiftKey?o.previousNode():o.nextNode();i||(o.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,i=e.shiftKey?o.previousNode():o.nextNode()),e.preventDefault(),i&&(ym(i,!0),i instanceof mF(i).HTMLInputElement&&i.select())},r=e=>{(!yo||yd(yo,a))&&yu(mV(e),a.current)?(yo=a,d.current=mV(e)):yl(a)&&!yc(mV(e),a)?d.current?d.current.focus():yo&&yo.current&&yf(yo.current):yl(a)&&(d.current=mV(e))},i=e=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>{let n=pa,r=("virtual"===n||null===n)&&pe()&&m7(),o=((e=document)=>e.activeElement)(t);if(!r&&o&&yl(a)&&!yc(o,a)){yo=a;let t=mV(e);t&&t.isConnected?(d.current=t,d.current?.focus()):yo.current&&yf(yo.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),e?.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1)),e?.forEach(e=>e.removeEventListener("focusout",i,!1))}},[a,o]),mn(()=>()=>{m.current&&cancelAnimationFrame(m.current)},[m]),i=x,s=y,l=g,p=(0,lr.useRef)("u">typeof document?((e=document)=>e.activeElement)(mL(i.current?i.current[0]:void 0)):null),mn(()=>{let e=i.current,t=mL(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!yo||yd(yo,i))&&yu(((e=document)=>e.activeElement)(t),i.current)&&(yo=i)};return t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1))}},[i,l]),mn(()=>{let e=mL(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!yl(i)||t.isComposing)return;let n=e.activeElement;if(!yc(n,i)||!yh(i))return;let r=yD.getTreeNode(i);if(!r)return;let a=r.nodeToRestore,o=yy(e.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if(a&&a.isConnected&&a!==e.body||(a=void 0,r.nodeToRestore=void 0),(!s||!yc(s,i))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(yc(s,i));(t.preventDefault(),t.stopPropagation(),s)?ym(s,!0):yc(a)?ym(a,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),mn(()=>{let e=mL(i.current?i.current[0]:void 0);if(!s)return;let t=yD.getTreeNode(i);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=yD.getTreeNode(i);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&yc(r,i)||r===e.body&&yh(i))){let t=yD.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(i);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void yg(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(i);e;){if(e.scopeRef&&e.scopeRef.current&&yD.getTreeNode(e.scopeRef))return void yg(yp(e.scopeRef.current,!0));e=e.parent}}})}}},[i,s]),u=x,c=v,f=la().useRef(c),(0,lr.useEffect)(()=>{f.current&&(yo=u,!yu(((e=document)=>e.activeElement)(mL(u.current?u.current[0]:void 0)),yo.current)&&u.current&&yf(u.current)),f.current=!1},[u]),(0,lr.useEffect)(()=>{let e=((e=document)=>e.activeElement)(mL(x.current?x.current[0]:void 0)),t=null;if(yu(e,x.current)){for(let n of yD.traverse())n.scopeRef&&yu(e,n.scopeRef.current)&&(t=n);t===yD.getTreeNode(x)&&(yo=t.scopeRef)}},[x]),mn(()=>()=>{let e=yD.getTreeNode(x)?.parent?.scopeRef??null;(x===yo||yd(x,yo))&&(!e||yD.getTreeNode(e))&&(yo=e),yD.removeTreeNode(x)},[x]);let _=(0,lr.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mL(n[0]??void 0)),l=n[0].previousElementSibling,u=yy(ys(n),{tabbable:a,accept:i},n);u.currentNode=yu(s,n)?s:l;let c=u.nextNode();return!c&&o&&(u.currentNode=l,c=u.nextNode()),c&&ym(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mL(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=yy(ys(n),{tabbable:a,accept:i},n);u.currentNode=yu(s,n)?s:l;let c=u.previousNode();return!c&&o&&(u.currentNode=l,c=u.previousNode()),c&&ym(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yy(ys(n),{tabbable:r,accept:a},n);o.currentNode=n[0].previousElementSibling;let i=o.nextNode();return i&&ym(i,!0),i},focusLast(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yy(ys(n),{tabbable:r,accept:a},n);o.currentNode=n[n.length-1].nextElementSibling;let i=o.previousNode();return i&&ym(i,!0),i}}},[]),S=(0,lr.useMemo)(()=>({focusManager:_,parentNode:E}),[E,_]);return la().createElement(yr.Provider,{value:S},la().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,la().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function ys(e){return e[0].parentElement}function yl(e){let t=yD.getTreeNode(yo);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function yu(e,t){return!!e&&!!t&&t.some(t=>mB(t,e))}function yc(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of yD.traverse(yD.getTreeNode(t)))if(n&&yu(e,n.current))return!0;return!1}function yd(e,t){let n=yD.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function ym(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{p_(e)}catch{}}function yp(e,t=!0){let n=e[0].previousElementSibling,r=ys(e),a=yy(r,{tabbable:t},e);a.currentNode=n;let o=a.nextNode();return t&&!o&&((a=yy(r=ys(e),{tabbable:!1},e)).currentNode=n,o=a.nextNode()),o}function yf(e,t=!0){ym(yp(e,t))}function yh(e){let t=yD.getTreeNode(yo);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function yg(e){e.dispatchEvent(new CustomEvent(ya,{bubbles:!0,cancelable:!0}))&&ym(e)}function yy(e,t,n){let r=t?.tabbable?mY:mZ,a=mL(e?.nodeType===Node.ELEMENT_NODE?e:null),o=yn(a,e||a,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mB(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(mL(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=mF(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===o.currentNode.tagName&&"radio"===o.currentNode.type&&o.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||yu(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(o.currentNode=t.from),o}function yv(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(mL(r)),u=yy(r,{tabbable:o,accept:s});mB(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=r,c=u.nextNode()),c&&ym(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(mL(r)),u=yy(r,{tabbable:o,accept:s});if(mB(r,l))u.currentNode=l;else{let e=yb(u);return e&&ym(e,!0),e??null}let c=u.previousNode();if(!c&&i){u.currentNode=r;let e=yb(u);if(!e)return null;c=e}return c&&ym(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=yy(r,{tabbable:a,accept:o}).nextNode();return i&&ym(i,!0),i},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=yb(yy(r,{tabbable:a,accept:o}));return i&&ym(i,!0),i??null}}}function yb(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class yw{constructor(){this.fastMap=new Map,this.root=new yx({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let a=new yx({scopeRef:e});r.addChild(a),a.parent=r,this.fastMap.set(e,a),n&&(a.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&yu(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new yw;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class yx{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let yD=new yw;var yE={};function y_(e,t,n){let{direction:r}=fv(),a=(0,lr.useMemo)(()=>yv(t),[t]),o=()=>{if(!t.current)return;let e=window.event?mV(window.event):null,n=yy(t.current,{tabbable:!0});if(e&&(n.currentNode=e,e=n.previousNode()),!e){let t;do(t=n.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=n.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:i}=pG({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&o()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&o()}});return my(i,{onKeyDown:o=>{if(mB(o.currentTarget,mV(o))&&(o.altKey&&("ArrowDown"===o.key||"ArrowUp"===o.key)&&"setOpen"in e&&(o.preventDefault(),o.stopPropagation(),e.setOpen(!0)),!n))switch(o.key){case"ArrowLeft":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=mV(o),n=yS(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else a.focusPrevious();break;case"ArrowRight":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=mV(o),n=yS(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else a.focusNext()}}})}function yS(e,t,n){let r=yy(e,{tabbable:!0}),a=r.nextNode(),o=null,i=1/0;for(;a;){let e=a.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<i&&(o=a,i=s),a=r.nextNode()}return o}function yk(e){let{description:t,errorMessage:n,isInvalid:r,validationState:a}=e,{labelProps:o,fieldProps:i}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":a,labelElementType:o="label"}=e;t=mf(t);let i=mf(),s={};return n&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===o?t:void 0}),{labelProps:s,fieldProps:hH({id:t,"aria-label":a,"aria-labelledby":r})}}(e),s=mh([!!t,!!n,r,a]),l=mh([!!t,!!n,r,a]);return{labelProps:o,fieldProps:i=my(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function yC(e,t,n){let r=pF(e=>{n&&!e.defaultPrevented&&n(t)});(0,lr.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",r),()=>{t?.removeEventListener("reset",r)}},[e])}function yP(e,t,n){let{validationBehavior:r,focus:a}=e;mn(()=>{if("native"===r&&n?.current&&!n.current.disabled){var e;let r,a=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(a),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let o=(0,lr.useRef)(!1),i=pF(()=>{o.current||t.resetValidation()}),s=pF(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}(r)===n.current&&(a?a():n.current?.focus(),pa="keyboard",pc("keyboard",null));e.preventDefault()}),l=pF(()=>{t.commitValidation()});(0,lr.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{o.current=!window.event||"message"===window.event.type&&mV(window.event)instanceof MessagePort,r?.call(t),o.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",i),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",i),t&&(t.reset=r)}},[n,r])}yE={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let yT=new WeakMap,yR="__reactAriaDateFieldRole",yN="__reactAriaDateFieldFocusManager";function yO(e,t,n){var r;let a,{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yk({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=(0,lr.useRef)(null),{focusWithinProps:p}=p0({...e,onFocusWithin(n){m.current=t.value,e.onFocus?.(n)},onBlurWithin:n=>{t.confirmPlaceholder(),t.value!==m.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),f=fB((r=yE)&&r.__esModule?r.default:r,"@react-aria/datepicker"),h="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",y=h2(t.value?f.format(h,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[yR]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,b=e[yN],w=(0,lr.useMemo)(()=>b||yv(n),[b,n]),x=y_(t,n,"presentation"===e[yR]);yT.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:w});let D=(0,lr.useRef)(e.autoFocus);a="presentation"===e[yR]?{role:"presentation"}:my(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,lr.useEffect)(()=>{D.current&&w.focusFirst(),D.current=!1},[w]),yC(e.inputRef,t.defaultValue,t.setValue),yP({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let _=mA(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:my(_,a,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:o,validationErrors:i,validationDetails:s}}var y$={};y$={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let yM={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},yA={...yM,customError:!0,valid:!1},yj={isInvalid:!1,validationDetails:yM,validationErrors:[]},yI=(0,lr.createContext)({}),yL="__reactAriaFormValidationState";function yF(e){if(e[yL]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}=e[yL];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}}return function(e){let{isInvalid:t,validationState:n,name:r,value:a,builtinValidation:o,validate:i,validationBehavior:s="aria"}=e;n&&(t||="invalid"===n);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:yA}:null,u=(0,lr.useMemo)(()=>i&&null!=a?yV(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return yB(n)}return[]}(i,a)):null,[i,a]);o?.validationDetails.valid&&(o=void 0);let c=(0,lr.useContext)(yI),d=(0,lr.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>yB(c[e])):yB(c[r]):[],[c,r]),[m,p]=(0,lr.useState)(c),[f,h]=(0,lr.useState)(!1);c!==m&&(p(c),h(!1));let g=(0,lr.useMemo)(()=>yV(f?[]:d),[f,d]),y=(0,lr.useRef)(yj),[v,b]=(0,lr.useState)(yj),w=(0,lr.useRef)(yj),[x,D]=(0,lr.useState)(!1);return(0,lr.useEffect)(()=>{if(!x)return;D(!1);let e=u||o||y.current;yU(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||o||yj,displayValidation:"native"===s?l||g||v:l||g||u||o||v,updateValidation(e){"aria"!==s||yU(v,e)?y.current=e:b(e)},resetValidation(){yU(yj,w.current)||(w.current=yj,b(yj)),"native"===s&&D(!1),h(!0)},commitValidation(){"native"===s&&D(!0),h(!0)}}}(e)}function yB(e){return e?Array.isArray(e)?e:[e]:[]}function yV(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:yA}:null}function yU(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function yW(...e){let t=new Set,n=!1,r={...yM};for(let a of e){for(let e of a.validationErrors)t.add(e);for(let e in n||=a.isInvalid,r)r[e]||=a.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let yH=new fM((ee=y$)&&ee.__esModule?ee.default:ee);function yz(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function yK(e,t,n,r,a){let o=null!=e&&null!=n&&e.compare(n)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&r?.(e)||!1,l=o||i||s,u=[];if(l){let e=yz(),r=new fI(e,fM.getGlobalDictionaryForPackage("@react-stately/datepicker")||yH),l=new fS(e,yY({},a)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),o&&null!=n&&u.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(c))})),s&&u.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:o,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let yG={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},yZ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function yY(e,t){e={...t.shouldForceLeadingZeros?yZ:yG,...e};let n=t.granularity||"minute",r=Object.keys(e),a=r.indexOf(t.maxGranularity??"year");a<0&&(a=0);let o=r.indexOf(n);if(o<0&&(o=2),a>o)throw Error("maxGranularity must be greater than granularity");let i=r.slice(a,o+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(i.hour12=12===t.hourCycle),i.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(i.timeZoneName="short"),t.showEra&&0===a&&(i.era="short"),i}function yq(e){return e&&"hour"in e?e:new ho}function yJ(e,t){return null===e?null:e?hv(e,t):void 0}function yX(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[a,o]=(0,lr.useState)([r,n]);return e&&(a[0]!==r||a[1]!==n)&&o([r,n]),t||(t=e?r:a[0]),[t,e?n:a[1]]}let yQ=new fM({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class y0{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,null!=this.hour){let[e,n]=y4(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new y0(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,n]=y4(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,n){let r=this.copy();return r[e]=t,"hour"===e&&null==r.dayPeriod&&"hour"in n&&(r.dayPeriod=y4(n.hour,this.hourCycle)[0]),"year"===e&&null==r.era&&(r.era=n.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let a=this.copy();if(null==a[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in n){let[e,t]=y4(n.hour,this.hourCycle);a.dayPeriod=e,a.hour=t}else a[e]=n[e];return"year"===e&&null==a.era&&(a.era=n.era),a}switch(e){case"era":{let e=this.calendar.getEras(),n=e.indexOf(a.era);n=y1(n,t,0,e.length-1),a.era=e[n];break}case"year":{let r=new ha(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);a.era=(r=r.cycle(e,t,{round:"year"===e})).era,a.year=r.year;break}case"month":a.month=y1(a.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":a.day=y1(a.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=r.some(e=>["year","month","day"].includes(e));if("timeZone"in n&&(!e||null!=a.year&&null!=a.month&&null!=a.day)){let e=this.toValue(n),[r,o]=y4((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);a.hour=o,a.dayPeriod=r,a.offset=e.offset}else{let e=a.hour??0,r=this.getSegmentLimits("hour");a.hour=y1(e,t,r.minValue,r.maxValue),null==a.dayPeriod&&"hour"in n&&(a.dayPeriod=y4(n.hour,this.hourCycle)[0])}break}case"dayPeriod":a.dayPeriod=y1(a.dayPeriod??0,t,0,1);break;case"minute":a.minute=y1(a.minute??0,t,0,59,!0);break;case"second":a.second=y1(a.second??0,t,0,59,!0)}return a}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,n){switch(n){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in n&&null!=this.offset&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function y1(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function y4(e,t){let n=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":n=null;break;case"h24":e+=1,n=null}return[n,e]}var y2=n(9264);let y3={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},y6={year:5,month:2,day:7,hour:2,minute:15,second:15},y5={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function y9(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:a=!1,isReadOnly:o=!1,isRequired:i=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,m]=yX(c,e.granularity),p=m||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[f,h]=(0,lr.useMemo)(()=>{let r=new fS(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[g,y]=gH(e.value,e.defaultValue??null,e.onChange),[v]=(0,lr.useState)(g),b=(0,lr.useMemo)(()=>yJ(g,f)??null,[g,f]),[w,x]=(0,lr.useState)(()=>new y0(f,h,b)),D="gregory"===f.identifier&&"BC"===w.era,E=(0,lr.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:m,hideTimeZone:r,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,m,r,D]),_=(0,lr.useMemo)(()=>yY({},E),[E]),S=(0,lr.useMemo)(()=>new fS(t,_),[t,_]),k=(0,lr.useMemo)(()=>S.resolvedOptions(),[S]),C=(0,lr.useMemo)(()=>(function(e,t,n,r){if(e)return yJ(e,n);let a=hv(hS(r??hR()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?hg(a):r?a:hy(a)})(e.placeholderValue,d,f,m),[e.placeholderValue,d,f,m]),P=(0,lr.useMemo)(()=>{let t="h11"===h||"h12"===h,n=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],r=n.indexOf(e.maxGranularity||"era"),a=n.indexOf("hour"===d&&t?"dayPeriod":d);return n.slice(r,a+1)},[e.maxGranularity,d,h]),[T,R]=(0,lr.useState)(b),[N,O]=(0,lr.useState)(f),[$,M]=(0,lr.useState)(h);b===T&&h===$&&hD(f,N)||(w=new y0(f,h,b),R(b),O(f),M(h),x(w));let A=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof y0&&t.isCleared(P))x(new y0(f,h,b)),y(null);else if(t instanceof y0){if(t.isComplete(P)){let e=t.toValue(b??C);if(t.validate(e,P)){let t=hv(e,c?.calendar||new fG);if(!g||0!==t.compare(g)){x(new y0(f,h,b)),y(t);return}}}x(t)}else t=hv(t,c?.calendar||new fG),x(new y0(f,h,b)),y(t)},j=(0,lr.useMemo)(()=>w.toValue(b??C).toDate(p),[w,p,b,C]),I=(0,lr.useMemo)(()=>(function(e,t,n,r,a,o,i){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,y2.K)(o,{useGrouping:!1}),c=new(0,y2.K)(o,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let n=t[e.type]??0;"2-digit"===r[e.type]?e.value=c.format(n):e.value=u.format(n)}let d=[];for(let e of l){var m;let n=y5[e.type]||e.type,r=y3[n];"era"===n&&1===a.getEras().length&&(r=!1);let l=y3[n]&&null==t[e.type],u=y3[n]?(m=e.value,"era"===n||"dayPeriod"===n?m:"year"===n||"month"===n||"day"===n?yQ.getStringForLocale(n,o):"––"):null,c={type:n,text:l?u:e.value,...t.getSegmentLimits(n),isPlaceholder:l,placeholder:u,isEditable:r};"hour"===n?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),n===i&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(n)&&n===i?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})(j,w,S,k,f,t,d),[j,S,k,w,f,t,d]),L=(e,t)=>{A(w.cycle(e,t,C,P))},F=(0,lr.useMemo)(()=>yK(g,s,l,u,E),[g,s,l,u,E]),B=yF({...e,value:g,builtinValidation:F}),V=B.displayValidation.isInvalid,U=e.validationState||(V?"invalid":null);return{...B,value:b,defaultValue:e.defaultValue??v,dateValue:j,calendar:f,setValue:A,segments:I,dateFormatter:S,validationState:U,isInvalid:V,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:a,isReadOnly:o,isRequired:i,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,y6[e]||1)},decrementPage(e){L(e,-(y6[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===h?11:w.getSegmentLimits(e).maxValue;A(w.set(e,t,C))},decrementToMin(e){let t="hour"===e&&"h12"===h?12:w.getSegmentLimits(e).minValue;A(w.set(e,t,C))},setSegment(e,t){A(w.set(e,t,C))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(P)){let e=hv(w.toValue(b??C),c?.calendar||new fG);g&&0===e.compare(g)||y(e),x(new y0(f,h,b))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),A(t)},formatValue:e=>b?new fS(t,yY(e,E)).format(j):"",getDateFormatter:(e,t)=>new fS(e,yY({},{...E,...t}))}}let y8=(0,lr.createContext)(null),y7=(0,lr.createContext)(null),ve=(0,lr.createContext)(null),vt=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(y7),r=(0,lr.useContext)(ve);return n||r?la().createElement(vr,{...e,ref:t}):la().createElement(vn,{...e,ref:t})}),vn=(0,lr.forwardRef)((e,t)=>{let[n,r]=mD({slot:e.slot},t,y8),{locale:a}=fv(),o=y9({...n,locale:a,createCalendar:gA}),i=(0,lr.useRef)(null),{fieldProps:s,inputProps:l}=yO({...n,inputRef:i},o,r);return la().createElement(mb,{values:[[y7,o],[ye,{...l,ref:i}],[g8,{...s,ref:r,isInvalid:o.isInvalid}]]},la().createElement(vr,e))}),vr=(0,lr.forwardRef)((e,t)=>{let{className:n,children:r}=e,a=(0,lr.useContext)(y7),o=(0,lr.useContext)(ve),i=null!=a?a:o;return la().createElement(la().Fragment,null,la().createElement(g7,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:i.isInvalid},i.segments.map((e,t)=>(0,lr.cloneElement)(r(e),{key:t}))),la().createElement(yt,null))});function va({children:e}){let t=(0,lr.useMemo)(()=>({register:()=>{}}),[]);return la().createElement(pI.Provider,{value:t},e)}la().forwardRef(({children:e,...t},n)=>{let r=(0,lr.useRef)(!1),a=(0,lr.useContext)(pI),o=my(a||{},{...t,register(){r.current=!0,a&&a.register()}});return o.ref=d8(n||a?.ref),pC(a,o.ref),(0,lr.useEffect)(()=>{r.current||(r.current=!0)},[]),la().createElement(pI.Provider,{value:o},e)});let vo=(0,lr.createContext)({}),vi=la().createContext(null);function vs(e){let t=md(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[a,o]=(0,lr.useState)(!1),i=(0,lr.useMemo)(()=>({contain:a,setContain:o}),[a,o]),{getContainer:s}=(0,lr.useContext)(vo)??{};if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=la().createElement(yi,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},l)),l=la().createElement(vi.Provider,{value:i},la().createElement(va,null,l)),pU().createPortal(l,n)}let vl=(0,lr.createContext)(null),vu=(0,lr.createContext)(null),vc=(0,lr.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=mD(e,t,vl);let{dialogProps:r,titleProps:a}=function(e,t){let n,r,{role:a="dialog"}=e,o=mh();o=e["aria-label"]?void 0:o;let i=(0,lr.useRef)(!1);return(0,lr.useEffect)(()=>{if(t.current&&!mU(t.current)){p_(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(i.current=!0,t.current&&(t.current.blur(),p_(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,lr.useContext)(vi),mn(()=>{r?.(!0)},[r=n?.setContain]),(0,lr.useRef)(!1),(0,lr.useEffect)(()=>{}),{dialogProps:{...mA(e,{labelable:!0}),role:a,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||o,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:o}}}({...e,"aria-labelledby":n},t),o=(0,lr.useContext)(vu);r["aria-label"]||r["aria-labelledby"]||(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let i=mw({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==o?void 0:o.close)||(()=>{})}});return la().createElement("section",{...mA(e),...r,...i,ref:t,slot:e.slot||void 0},la().createElement(mb,{values:[[fn,{slots:{[mv]:{},title:{...a,level:2}}}],[fe,{slots:{[mv]:{},close:{onPress:()=>null==o?void 0:o.close()}}}]]},i.children))}),vd=(0,lr.createContext)(null),vm=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(vd);return(null==n?void 0:n.isInvalid)?la().createElement(vp,{...e,ref:t}):null}),vp=(0,lr.forwardRef)((e,t)=>{let n=(0,lr.useContext)(vd),r=mA(e),a=mw({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==a.children?null:la().createElement(fa,{slot:"errorMessage",...r,...a,ref:t})}),vf=(0,lr.createContext)(null),vh=(0,lr.createContext)({}),vg=p8(function(e,t){[e,t]=mD(e,t,vh);let{elementType:n="label",...r}=e;return la().createElement(n,{className:"react-aria-Label",...r,ref:t})}),vy=(0,lr.createContext)({placement:"bottom"}),vv="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,vb=new WeakMap,vw=[];function vx(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function vD(e,t){let n=e,r=0,a=t.toString(),o=a.toLowerCase().indexOf("e-");if(o>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+o;else{let e=a.indexOf(".");e>=0&&(r=a.length-e)}if(r>0){let e=Math.pow(10,r);n=Math.round(n*e)/e}return n}function vE(e,t,n,r){t=Number(t),n=Number(n);let a=(e-(isNaN(t)?0:t))%r,o=vD(2*Math.abs(a)>=r?e+Math.sign(a)*(r-Math.abs(a)):e-a,r);return isNaN(t)?!isNaN(n)&&o>n&&(o=Math.floor(vD(n/r,r))*r):o<t?o=t:!isNaN(n)&&o>n&&(o=t+Math.floor(vD((n-t)/r,r))*r),o=vD(o,r)}let v_={top:"top",bottom:"top",left:"left",right:"left"},vS={top:"bottom",bottom:"top",left:"right",right:"left"},vk={top:"left",left:"top"},vC={top:"height",left:"width"},vP={width:"totalWidth",height:"totalHeight"},vT={};function vR(e,t){let n=0,r=0,a=0,o=0,i=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;a=u.clientWidth,o=u.clientHeight,n=t?.width??a,r=t?.height??o,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(i=t.offsetTop,s=t.offsetLeft)}else({width:n,height:r,top:i,left:s}=vj(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,a=n,o=r;return m8()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,i=t?.pageTop??0,s=t?.pageLeft??0),{width:n,height:r,totalWidth:a,totalHeight:o,scroll:l,top:i,left:s}}function vN(e,t,n,r,a,o,i){let s=a.scroll[e]??0,l=r[vC[e]],u=i[e]+r.scroll[v_[e]]+o,c=i[e]+r.scroll[v_[e]]+l-o,d=t-s+r.scroll[v_[e]]+i[e]-r[v_[e]],m=t-s+n+r.scroll[v_[e]]+i[e]-r[v_[e]];return d<u?u-d:m>c?Math.max(c-m,u-d):0}function vO(e){if(vT[e])return vT[e];let[t,n]=e.split(" "),r=v_[t]||"right",a=vk[r];v_[n]||(n="center");let o=vC[r],i=vC[a];return vT[e]={placement:t,crossPlacement:n,axis:r,crossAxis:a,size:o,crossSize:i},vT[e]}function v$(e,t,n,r,a,o,i,s,l,u,c){let{placement:d,crossPlacement:m,axis:p,crossAxis:f,size:h,crossSize:g}=r,y={};y[f]=e[f]??0,"center"===m?y[f]+=((e[g]??0)-(n[g]??0))/2:m!==f&&(y[f]+=(e[g]??0)-(n[g]??0)),y[f]+=o;let v=e[f]-n[g]+l+u,b=e[f]+e[g]-l-u;if(y[f]=vx(y[f],v,b),d===p){let t=s?c[h]:c[vP[h]];y[vS[p]]=Math.floor(t-e[p]+a)}else y[p]=Math.floor(e[p]+e[h]+a);return y}function vM(e,t,n,r,a,o,i,s){let{placement:l,axis:u,size:c}=o;return l===u?Math.max(0,n[u]-(i.scroll[u]??0)-(e[u]+(s?t[u]:0))-(r[u]??0)-r[vS[u]]-a):Math.max(0,e[c]+e[u]+(s?t[u]:0)-n[u]-n[c]+(i.scroll[u]??0)-(r[u]??0)-r[vS[u]]-a)}function vA(e,t){let{top:n,left:r,width:a,height:o}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(a=e.offsetWidth,o=e.offsetHeight),{top:n,left:r,width:a,height:o}}function vj(e,t){let{top:n,left:r,width:a,height:o}=vA(e,t),{scrollTop:i,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:n+i-l,left:r+s-u,width:a,height:o}}function vI(e,t,n){let r,a=window.getComputedStyle(e);if("fixed"===a.position)r=vA(e,n);else{r=vj(e,n);let a=vj(t,n),o=window.getComputedStyle(t);a.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,a.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=a.top,r.left-=a.left}return r.top-=parseInt(a.marginTop,10)||0,r.left-=parseInt(a.marginLeft,10)||0,r}function vL(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let vF=new WeakMap;function vB(e){let{ref:t,box:n,onResize:r}=e,a=pF(r);(0,lr.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&a()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[t,n])}let vV="u">typeof document?window.visualViewport:null;function vU(e,t){if(e.button>0)return!1;let n=mV(e);if(n){let e=n.ownerDocument;if(!e||!mB(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let vW=[],vH=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vz(e){return e instanceof HTMLInputElement&&!vH.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let vK="u">typeof document&&window.visualViewport,vG=0;function vZ(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function vY(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function vq(e,t){t||!vK?vJ(e):vK.addEventListener("resize",()=>vJ(e),{once:!0})}function vJ(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=hJ(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;vK&&(n=Math.min(n,vK.offsetTop+vK.height));let a=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+a)),behavior:"smooth"})}}n=e.parentElement}}var vX={};function vQ(e){var t;let{onDismiss:n,...r}=e,a=hH(r,fB((t=vX)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return la().createElement(hZ,null,la().createElement("button",{...a,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function v0(e,t,n){mn(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||(0,pV.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}vX={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let v1=null,v4=new Set,v2=new Map,v3=!1,v6=!1;function v5(e,t){for(let n of v4)n(e,t)}function v9(e){v3=!0,e.metaKey||!m3()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(v1="keyboard",v5("keyboard",e))}function v8(e){v1="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(v3=!0,v5("pointer",e))}function v7(e){pn(e)&&(v3=!0,v1="virtual")}function be(e){e.target!==window&&e.target!==document&&e.isTrusted&&(v3||v6||(v1="virtual",v5("virtual",e)),v3=!1,v6=!1)}function bt(){v3=!1,v6=!0}function bn(e){if("u"<typeof window||v2.get(mF(e)))return;let t=mF(e),n=mL(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){v3=!0,r.apply(this,arguments)},n.addEventListener("keydown",v9,!0),n.addEventListener("keyup",v9,!0),n.addEventListener("click",v7,!0),t.addEventListener("focus",be,!0),t.addEventListener("blur",bt,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",v8,!0),n.addEventListener("pointermove",v8,!0),n.addEventListener("pointerup",v8,!0)):(n.addEventListener("mousedown",v8,!0),n.addEventListener("mousemove",v8,!0),n.addEventListener("mouseup",v8,!0)),t.addEventListener("beforeunload",()=>{br(e)},{once:!0}),v2.set(t,{focus:r})}let br=(e,t)=>{let n=mF(e),r=mL(e);t&&r.removeEventListener("DOMContentLoaded",t),v2.has(n)&&(n.HTMLElement.prototype.focus=v2.get(n).focus,r.removeEventListener("keydown",v9,!0),r.removeEventListener("keyup",v9,!0),r.removeEventListener("click",v7,!0),n.removeEventListener("focus",be,!0),n.removeEventListener("blur",bt,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",v8,!0),r.removeEventListener("pointermove",v8,!0),r.removeEventListener("pointerup",v8,!0)):(r.removeEventListener("mousedown",v8,!0),r.removeEventListener("mousemove",v8,!0),r.removeEventListener("mouseup",v8,!0)),v2.delete(n))};function ba(e){let[t,n]=gH(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,lr.useCallback)(()=>{n(!0)},[n]),a=(0,lr.useCallback)(()=>{n(!1)},[n]),o=(0,lr.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:a,toggle:o}}"u">typeof document&&("loading"!==(p=mL(void 0)).readyState?bn(void 0):p.addEventListener("DOMContentLoaded",()=>{bn(void 0)}));let bo=(0,lr.createContext)(null),bi=(0,lr.createContext)(null),bs=(0,lr.forwardRef)(function(e,t){[e,t]=mD(e,t,bo);let n=(0,lr.useContext)(vu),r=ba(e),a=null==e.isOpen&&null==e.defaultOpen&&n?n:r,o=function(e,t){let[n,r]=(0,lr.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let a="exiting"===n;return v0(e,a,(0,lr.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),a}(t,a.isOpen)||e.isExiting||!1,i=(0,lr.useContext)(p9),{direction:s}=fv();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),la().createElement(la().Fragment,null,t)}return!a||a.isOpen||o?la().createElement(bl,{...e,triggerRef:e.triggerRef,state:a,popoverRef:t,isExiting:o,dir:s}):null});function bl({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var a,o;let i=(0,lr.useRef)(null),[s,l]=(0,lr.useState)(0),c=(0,lr.useRef)(null),d=(0,lr.useContext)(bi),m=d&&"SubmenuTrigger"===r.trigger;mn(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:f,arrowProps:h,placement:g}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:m}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:a,isDismissable:o=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e,l=(0,lr.useRef)(void 0);(0,lr.useEffect)(()=>{if(a&&!vW.includes(t))return vW.push(t),()=>{let e=vW.indexOf(t);e>=0&&vW.splice(e,1)}},[a,t]);let u=()=>{vW[vW.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:a}=e,o=(0,lr.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=pF(e=>{n&&vU(e,t)&&(a&&a(e),o.current.isPointerDown=!0)}),s=pF(e=>{n&&n(e)});(0,lr.useEffect)(()=>{let e=o.current;if(r)return;let n=mL(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&vU(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",i,!0),n.addEventListener("click",r,!0),()=>{n.removeEventListener("pointerdown",i,!0),n.removeEventListener("click",r,!0)}}},[t,r])}({ref:t,onInteractOutside:o&&a?e=>{(!s||s(mV(e)))&&(vW[vW.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=vW[vW.length-1];l.current=n,(!s||s(mV(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=p0({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||yc(e.relatedTarget,yo))&&(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??r),{overlayProps:p,arrowProps:f,placement:h,triggerAnchorPoint:g}=function(e){var t;let{direction:n}=fv(),{arrowSize:r,targetRef:a,overlayRef:o,arrowRef:i,scrollRef:s=o,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:m=0,crossOffset:p=0,shouldUpdatePosition:f=!0,isOpen:h=!0,onClose:g,maxHeight:y,arrowBoundaryOffset:v=0}=e,[b,w]=(0,lr.useState)(null),x=[f,l,o.current,a.current,i?.current,s.current,u,c,d,m,p,h,n,y,v,r],D=(0,lr.useRef)(vV?.scale);(0,lr.useEffect)(()=>{h&&(D.current=vV?.scale)},[h]);let E=(0,lr.useCallback)(()=>{var e;if(!1===f||!h||!o.current||!a.current||!d||vV?.scale!==D.current)return;let t=null;if(s.current&&mU(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),n=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-n.top}).offset>n.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-n.bottom)}let g=o.current;!y&&o.current&&(g.style.top="0px",g.style.bottom="",g.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let b=function(e){let t,n,{placement:r,targetNode:a,overlayNode:o,scrollNode:i,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:m,arrowSize:p=0,arrowBoundaryOffset:f=0}=e,h="u">typeof document?window.visualViewport:null,g=o instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!vL(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!vL(t);)t=t.parentElement;return t||document.documentElement}(o):document.documentElement,y=g===document.documentElement,v=window.getComputedStyle(g).position,b=y?vj(a,!1):vI(a,g,!1);if(!y){let{marginTop:e,marginLeft:t}=window.getComputedStyle(a);b.top+=parseInt(e,10)||0,b.left+=parseInt(t,10)||0}let w=vj(o,!0),x={top:parseInt((t=window.getComputedStyle(o)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),i.scrollTop,i.scrollLeft,i.scrollWidth,i.scrollHeight;let D=vR(u,h),E=vR(g,h);if("BODY"!==u.tagName&&"HTML"!==u.tagName||y)n=("BODY"===u.tagName||"HTML"===u.tagName)&&y?{top:0,left:0,width:0,height:0}:vI(u,g,!1);else{let e=vA(g,!1);n={top:-(e.top-D.top),left:-(e.left-D.left),width:0,height:0}}return function(e,t,n,r,a,o,i,s,l,u,c,d,m,p,f,h,g){var y,v,b;let w,x,D,E=vO(e),{size:_,crossAxis:S,crossSize:k,placement:C,crossPlacement:P}=E,T=v$(t,i,n,E,u,c,l,d,p,f,s),R=u,N=vM(i,l,t,r,a+u,E,s,h);if(o&&n[_]>N){let e=vO(`${vS[C]} ${P}`),o=v$(t,i,n,e,u,c,l,d,p,f,s);vM(i,l,t,r,a+u,e,s,h)>N&&(E=e,T=o,R=u)}let O="bottom";"top"===E.axis?"top"===E.placement?O="top":"bottom"===E.placement&&(O="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?O="bottom":"bottom"===E.crossPlacement&&(O="top"));let $=vN(S,T[S],n[k],i,s,a,l);T[S]+=$;let M=(y=T,v=n.height,b=O,w=(null!=y.top?y.top:s[vP.height]-(y.bottom??0)-v)-(s.scroll.top??0),x=h?l.top:0,D={top:Math.max(i.top+x,(g?.offsetTop??i.top)+x),bottom:Math.min(i.top+i.height+x,(g?.offsetTop??0)+(g?.height??0))},"top"!==b?Math.max(0,D.bottom-w-((r.top??0)+(r.bottom??0)+a)):Math.max(0,w+v-D.top-((r.top??0)+(r.bottom??0)+a)));m&&m<M&&(M=m),n.height=Math.min(n.height,M),$=vN(S,(T=v$(t,i,n,E,R,c,l,d,p,f,s))[S],n[k],i,s,a,l),T[S]+=$;let A={},j=t[S]-T[S]-r[v_[S]],I=j+.5*t[k],L=p/2+f,F="left"===v_[S]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),B=n[k]-F-p/2-f,V=vx(I,t[S]+p/2-(T[S]+r[v_[S]]),t[S]+t[k]-p/2-(T[S]+r[v_[S]]));A[S]=vx(V,L,B),({placement:C,crossPlacement:P}=E),p?j=A[S]:"right"===P?j+=t[k]:"center"===P&&(j+=t[k]/2);let U="left"===C||"top"===C?n[_]:0,W={x:"top"===C||"bottom"===C?j:U,y:"left"===C||"right"===C?j:U};return{position:T,maxHeight:M,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:C,triggerAnchorPoint:W}}(r,b,w,x,s,l,D,E,n,c,d,!!v&&"static"!==v,m,p,f,mB(u,g),h)}({placement:(e=l,"rtl"===n?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:o.current,targetNode:a.current,scrollNode:s.current||o.current,padding:u,shouldFlip:c,boundaryElement:d,offset:m,crossOffset:p,maxHeight:y,arrowSize:r??(i?.current?vA(i.current,!0).width:0),arrowBoundaryOffset:v});if(!b.position)return;g.style.top="",g.style.bottom="",g.style.left="",g.style.right="",Object.keys(b.position).forEach(e=>g.style[e]=b.position[e]+"px"),g.style.maxHeight=null!=b.maxHeight?b.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),n=s.current.getBoundingClientRect(),r=e[t.type]-n[t.type];s.current.scrollTop+=r-t.offset}w(b)},x);mn(E,x),mn(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),vB({ref:o,onResize:E}),vB({ref:a,onResize:E});let _=(0,lr.useRef)(!1);mn(()=>{let e,t=()=>{_.current=!0,clearTimeout(e),e=setTimeout(()=>{_.current=!1},500),E()},n=()=>{_.current&&t()};return vV?.addEventListener("resize",t),vV?.addEventListener("scroll",n),()=>{vV?.removeEventListener("resize",t),vV?.removeEventListener("scroll",n)}},[E]);let S=(0,lr.useCallback)(()=>{_.current||g?.()},[g,_]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,lr.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=mV(e);if(!t.current||n instanceof Node&&!mB(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let a=r||vF.get(t.current);a&&a()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:a,isOpen:h,onClose:g&&S}),{overlayProps:{style:{position:b?"absolute":"fixed",top:b?void 0:0,left:b?void 0:0,zIndex:1e5,...b?.position,maxHeight:b?.maxHeight??"100vh"}},placement:b?.placement??null,triggerAnchorPoint:b?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:b?.arrowOffsetLeft,top:b?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;mn(()=>{if(!t){let e,t,n,r,a,o,i,s;return 1==++vG&&(u=m9()?(t=vZ(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(a=pj())&&(r.nonce=a),r.textContent=`
38
+ `.trim(),e.head.prepend(t)},[m]),(0,ll.useEffect)(()=>{let e=g.current;return()=>{for(let t of(d||pL(e.target??void 0),e.disposables))t();e.disposables=[]}},[d]),{isPressed:l||f,pressProps:mD(p,P,{[pJ]:!0})}}function pQ(e){return"A"===e.tagName&&e.hasAttribute("href")}function p0(e,t){let{key:n,code:r}=e,a=t.getAttribute("role");return("Enter"===n||" "===n||"Spacebar"===n||"Space"===r)&&!(t instanceof mH(t).HTMLInputElement&&!p3(t,n)||t instanceof mH(t).HTMLTextAreaElement||t.isContentEditable)&&!(("link"===a||!a&&pQ(t))&&"Enter"!==n)}function p1(e,t){let n=t.clientX,r=t.clientY;return{currentTarget:e,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,altKey:t.altKey,clientX:n,clientY:r,key:t.key}}function p4(e,t){return e instanceof HTMLInputElement?!p3(e,t):!(e instanceof HTMLInputElement)&&(e instanceof HTMLButtonElement?"submit"!==e.type&&"reset"!==e.type:!pQ(e))}let p2=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function p3(e,t){return"checkbox"===e.type||"radio"===e.type?" "===t:p2.has(e.type)}function p6(e){let{isDisabled:t,onBlurWithin:n,onFocusWithin:r,onFocusWithinChange:a}=e,o=(0,ll.useRef)({isFocusWithin:!1}),{addGlobalListener:i,removeAllGlobalListeners:s}=pz(),l=(0,ll.useCallback)(e=>{mz(e.currentTarget,mK(e))&&o.current.isFocusWithin&&!mz(e.currentTarget,e.relatedTarget)&&(o.current.isFocusWithin=!1,s(),n&&n(e),a&&a(!1))},[n,a,o,s]),u=m3(l),c=(0,ll.useCallback)(e=>{if(!mz(e.currentTarget,mK(e)))return;let t=mK(e),n=mW(t),s=((e=document)=>e.activeElement)(n);if(!o.current.isFocusWithin&&s===t){r&&r(e),a&&a(!0),o.current.isFocusWithin=!0,u(e);let t=e.currentTarget;i(n,"focus",e=>{let r=mK(e);if(o.current.isFocusWithin&&!mz(t,r)){let e=new n.defaultView.FocusEvent("blur",{relatedTarget:r});m2(e,t),l(m4(e))}},{capture:!0})}},[r,a,u,i,l]);return t?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:c,onBlur:l}}}function p5(e={}){var t;let{autoFocus:n=!1,isTextInput:r,within:a}=e,o=(0,ll.useRef)({isFocused:!1,isFocusVisible:n||pE()}),[i,s]=(0,ll.useState)(!1),[l,u]=(0,ll.useState)(()=>o.current.isFocused&&o.current.isFocusVisible),c=(0,ll.useCallback)(()=>u(o.current.isFocused&&o.current.isFocusVisible),[]),d=(0,ll.useCallback)(e=>{o.current.isFocused=e,o.current.isFocusVisible=pE(),s(e),c()},[c]);t={enabled:i,isTextInput:r},px(),(0,ll.useEffect)(()=>{if(t?.enabled===!1)return;let e=(e,n)=>{var r;let a,i,s,l,u,d,m,p;r=!!t?.isTextInput,i=mW(a=n?mK(n):void 0),l=void 0!==(s=mH(a))?s.HTMLInputElement:HTMLInputElement,u=void 0!==s?s.HTMLTextAreaElement:HTMLTextAreaElement,d=void 0!==s?s.HTMLElement:HTMLElement,m=void 0!==s?s.KeyboardEvent:KeyboardEvent,p=((e=document)=>e.activeElement)(i),(r=r||p instanceof l&&!p_.has(p.type)||p instanceof u||p instanceof d&&p.isContentEditable)&&"keyboard"===e&&n instanceof m&&!pf[n.key]||(e=>{o.current.isFocusVisible=e,c()})(pE())};return pc.add(e),()=>{pc.delete(e)}},[r,i]);let{focusProps:m}=pR({isDisabled:a,onFocusChange:d}),{focusWithinProps:p}=p6({isDisabled:!a,onFocusWithinChange:d});return{isFocused:i,isFocusVisible:l,focusProps:a?p:m}}let p9=!1,p8=0;function p7(e){"touch"===e.pointerType&&(p9=!0,setTimeout(()=>{p9=!1},500))}function fe(){let e=mW(null);if(void 0!==e)return 0===p8&&"u">typeof PointerEvent&&e.addEventListener("pointerup",p7),p8++,()=>{!(--p8>0)&&"u">typeof PointerEvent&&e.removeEventListener("pointerup",p7)}}function ft(e){let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,isDisabled:a}=e,[o,i]=(0,ll.useState)(!1),s=(0,ll.useRef)({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;(0,ll.useEffect)(fe,[]);let{addGlobalListener:l,removeAllGlobalListeners:u}=pz(),{hoverProps:c,triggerHoverEnd:d}=(0,ll.useMemo)(()=>{let e=(e,t)=>{let a=s.target;s.pointerType="",s.target=null,"touch"!==t&&s.isHovered&&a&&(s.isHovered=!1,u(),r&&r({type:"hoverend",target:a,pointerType:t}),n&&n(!1),i(!1))},o={};return"u">typeof PointerEvent&&(o.onPointerEnter=r=>{p9&&"mouse"===r.pointerType||((r,o)=>{if(s.pointerType=o,a||"touch"===o||s.isHovered||!mz(r.currentTarget,mK(r)))return;s.isHovered=!0;let u=r.currentTarget;s.target=u,l(mW(mK(r)),"pointerover",t=>{s.isHovered&&s.target&&!mz(s.target,mK(t))&&e(t,t.pointerType)},{capture:!0}),t&&t({type:"hoverstart",target:u,pointerType:o}),n&&n(!0),i(!0)})(r,r.pointerType)},o.onPointerLeave=t=>{!a&&mz(t.currentTarget,mK(t))&&e(t,t.pointerType)}),{hoverProps:o,triggerHoverEnd:e}},[t,n,r,a,s,l,u]);return(0,ll.useEffect)(()=>{a&&d({currentTarget:s.target},s.pointerType)},[a]),{hoverProps:c,isHovered:o}}if("u">typeof HTMLTemplateElement){let e=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:e.call(this)}})}let fn=(0,ll.createContext)(!1);function fr(e){let t=(t,n)=>(0,ll.useContext)(fn)?null:e(t,n);return t.displayName=e.displayName||e.name,(0,ll.forwardRef)(t)}let fa=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),fo=(0,ll.createContext)({}),fi=fr(function(e,t){var n;[e,t]=mC(e,t,fo);let r=((n=e).isPending&&(n.onPress=void 0,n.onPressStart=void 0,n.onPressEnd=void 0,n.onPressChange=void 0,n.onPressUp=void 0,n.onKeyDown=void 0,n.onKeyUp=void 0,n.onClick=void 0,n.href=void 0),e=n),{isPending:a}=r,{buttonProps:o,isPressed:i}=function(e,t){let n,{elementType:r="button",isDisabled:a,onPress:o,onPressStart:i,onPressEnd:s,onPressUp:l,onPressChange:u,preventFocusOnPress:c,allowFocusWhenDisabled:d,onClick:m,href:p,target:f,rel:h,type:g="button"}=e;n="button"===r?{type:g,disabled:a,form:e.form,formAction:e.formAction,formEncType:e.formEncType,formMethod:e.formMethod,formNoValidate:e.formNoValidate,formTarget:e.formTarget,name:e.name,value:e.value}:{role:"button",href:"a"!==r||a?void 0:p,target:"a"===r?f:void 0,type:"input"===r?g:void 0,disabled:"input"===r?a:void 0,"aria-disabled":a&&"input"!==r?a:void 0,rel:"a"===r?h:void 0};let{pressProps:y,isPressed:v}=pX({onPressStart:i,onPressEnd:s,onPressChange:u,onPress:o,onPressUp:l,onClick:m,isDisabled:a,preventFocusOnPress:c,ref:t}),{focusableProps:b}=pM(e,t);d&&(b.tabIndex=a?-1:b.tabIndex);let w=mD(b,y,mB(e,{labelable:!0}));return{isPressed:v,buttonProps:mD(n,w,{"aria-haspopup":e["aria-haspopup"],"aria-expanded":e["aria-expanded"],"aria-controls":e["aria-controls"],"aria-pressed":e["aria-pressed"],"aria-current":e["aria-current"],"aria-disabled":e["aria-disabled"]})}}(e,t),{focusProps:s,isFocused:l,isFocusVisible:u}=p5(e),{hoverProps:c,isHovered:d}=ft({...e,isDisabled:e.isDisabled||a}),m={isHovered:d,isPressed:(r.isPressed||i)&&!a,isFocused:l,isFocusVisible:u,isDisabled:e.isDisabled||!1,isPending:null!=a&&a},p=mS({...e,values:m,defaultClassName:"react-aria-Button"}),f=mb(o.id),h=mb(),g=o["aria-labelledby"];a&&(g?g=`${g} ${h}`:o["aria-label"]&&(g=`${f} ${h}`));let y=(0,ll.useRef)(a);return(0,ll.useEffect)(()=>{let e={"aria-labelledby":g||f};!y.current&&l&&a?mO(e,"assertive"):y.current&&l&&!a&&mO(e,"assertive"),y.current=a},[a,l,g,f]),lu().createElement("button",{...mB(e,{propNames:fa}),...mD(o,s,c),...p,type:"submit"===o.type&&a?"button":o.type,id:f,ref:t,"aria-labelledby":g,slot:e.slot||void 0,"aria-disabled":a?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":m.isPressed||void 0,"data-hovered":d||void 0,"data-focused":l||void 0,"data-pending":a||void 0,"data-focus-visible":u||void 0},lu().createElement(mR.Provider,{value:{id:h}},p.children))});(0,ll.createContext)(null),(0,ll.createContext)(null),(0,ll.createContext)(null),(0,ll.createContext)(null),(0,ll.createContext)(null);let fs=(0,ll.createContext)({}),fl=(0,ll.createContext)({}),fu=(0,ll.forwardRef)(function(e,t){[e,t]=mC(e,t,fl);let{elementType:n="span",...r}=e;return lu().createElement(n,{className:"react-aria-Text",...r,ref:t})}),fc=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),fd=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function fm(e){if(Intl.Locale){let t=new Intl.Locale(e).maximize(),n="function"==typeof t.getTextInfo?t.getTextInfo():t.textInfo;if(n)return"rtl"===n.direction;if(t.script)return fc.has(t.script)}let t=e.split("-")[0];return fd.has(t)}let fp=Symbol.for("react-aria.i18n.locale");function ff(){let e="u">typeof window&&window[fp]||"u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return{locale:e,direction:fm(e)?"rtl":"ltr"}}let fh=ff(),fg=new Set;function fy(){for(let e of(fh=ff(),fg))e(fh)}function fv(){let e=mg(),[t,n]=(0,ll.useState)(fh);return((0,ll.useEffect)(()=>(0===fg.size&&window.addEventListener("languagechange",fy),fg.add(n),()=>{fg.delete(n),0===fg.size&&window.removeEventListener("languagechange",fy)}),[]),e)?{locale:"u">typeof window&&window[fp]||"en-US",direction:"ltr"}:t}let fb=lu().createContext(null);function fw(e){let{locale:t,children:n}=e,r=lu().useMemo(()=>({locale:t,direction:fm(t)?"rtl":"ltr"}),[t]);return lu().createElement(fb.Provider,{value:r},n)}function fx(e){let{children:t}=e,n=fv();return lu().createElement(fb.Provider,{value:n},t)}function fD(e){let{locale:t,children:n}=e;return t?lu().createElement(fw,{locale:t,children:n}):lu().createElement(fx,{children:n})}function fE(){let e=fv();return(0,ll.useContext)(fb)||e}let f_=null;function fS(e,t="assertive",n=7e3){f_?f_.announce(e,t,n):(f_=new fk,("boolean"==typeof IS_REACT_ACT_ENVIRONMENT?IS_REACT_ACT_ENVIRONMENT:"u">typeof jest)?f_.announce(e,t,n):setTimeout(()=>{f_?.isAttached()&&f_?.announce(e,t,n)},100))}class fk{constructor(){this.node=null,this.assertiveLog=null,this.politeLog=null,"u">typeof document&&(this.node=document.createElement("div"),this.node.dataset.liveAnnouncer="true",Object.assign(this.node.style,{border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"}),this.assertiveLog=this.createLog("assertive"),this.node.appendChild(this.assertiveLog),this.politeLog=this.createLog("polite"),this.node.appendChild(this.politeLog),document.body.prepend(this.node))}isAttached(){return this.node?.isConnected}createLog(e){let t=document.createElement("div");return t.setAttribute("role","log"),t.setAttribute("aria-live",e),t.setAttribute("aria-relevant","additions"),t}destroy(){this.node&&(document.body.removeChild(this.node),this.node=null)}announce(e,t="assertive",n=7e3){if(!this.node)return;let r=document.createElement("div");"object"==typeof e?(r.setAttribute("role","img"),r.setAttribute("aria-labelledby",e["aria-labelledby"])):r.textContent=e,"assertive"===t?this.assertiveLog?.appendChild(r):this.politeLog?.appendChild(r),""!==e&&setTimeout(()=>{r.remove()},n)}clear(e){this.node&&((!e||"assertive"===e)&&this.assertiveLog&&(this.assertiveLog.innerHTML=""),(!e||"polite"===e)&&this.politeLog&&(this.politeLog.innerHTML=""))}}var fC={};function fP(e,t){let n=(0,ll.useRef)(null);return e&&n.current&&t(e,n.current)&&(e=n.current),n.current=e,e}fC={"ar-AE":{dateRange:e=>`${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,dateSelected:e=>`${e.date} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}`,finishRangeSelectionPrompt:"انقر لإنهاء عملية تحديد نطاق التاريخ",maximumDate:"آخر تاريخ متاح",minimumDate:"أول تاريخ متاح",next:"التالي",previous:"السابق",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.dateRange}`,startRangeSelectionPrompt:"انقر لبدء عملية تحديد نطاق التاريخ",todayDate:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date}`,todayDateSelected:e=>`\u{627}\u{644}\u{64A}\u{648}\u{645}\u{60C} ${e.date} \u{645}\u{62D}\u{62F}\u{62F}`},"bg-BG":{dateRange:e=>`${e.startDate} \u{434}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{435} ${e.date}`,finishRangeSelectionPrompt:"Натиснете, за да довършите избора на времеви интервал",maximumDate:"Последна налична дата",minimumDate:"Първа налична дата",next:"Напред",previous:"Назад",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натиснете, за да пристъпите към избора на времеви интервал",todayDate:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date}`,todayDateSelected:e=>`\u{414}\u{43D}\u{435}\u{441}, ${e.date} \u{441}\u{430} \u{438}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{438}`},"cs-CZ":{dateRange:e=>`${e.startDate} a\u{17E} ${e.endDate}`,dateSelected:e=>`Vybr\xe1no ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdběr rozsahu dat",maximumDate:"Posledn\xed dostupn\xe9 datum",minimumDate:"Prvn\xed dostupn\xe9 datum",next:"Dalš\xed",previous:"Předchoz\xed",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm zah\xe1j\xedte v\xfdběr rozsahu dat",todayDate:e=>`Dnes, ${e.date}`,todayDateSelected:e=>`Dnes, vybr\xe1no ${e.date}`},"da-DK":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klik for at fuldf\xf8re valg af datoomr\xe5de",maximumDate:"Sidste ledige dato",minimumDate:"F\xf8rste ledige dato",next:"N\xe6ste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.dateRange}`,startRangeSelectionPrompt:"Klik for at starte valg af datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"de-DE":{dateRange:e=>`${e.startDate} bis ${e.endDate}`,dateSelected:e=>`${e.date} ausgew\xe4hlt`,finishRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beenden",maximumDate:"Letztes verf\xfcgbares Datum",minimumDate:"Erstes verf\xfcgbares Datum",next:"Weiter",previous:"Zur\xfcck",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.dateRange}`,startRangeSelectionPrompt:"Klicken, um die Auswahl des Datumsbereichs zu beginnen",todayDate:e=>`Heute, ${e.date}`,todayDateSelected:e=>`Heute, ${e.date} ausgew\xe4hlt`},"el-GR":{dateRange:e=>`${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,dateSelected:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3B8}\u{3B7}\u{3BA}\u{3B5} ${e.date}`,finishRangeSelectionPrompt:"Κάντε κλικ για να ολοκληρώσετε την επιλογή εύρους ημερομηνιών",maximumDate:"Τελευταία διαθέσιμη ημερομηνία",minimumDate:"Πρώτη διαθέσιμη ημερομηνία",next:"Επόμενο",previous:"Προηγούμενο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.dateRange}`,startRangeSelectionPrompt:"Κάντε κλικ για να ξεκινήσετε την επιλογή εύρους ημερομηνιών",todayDate:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, ${e.date}`,todayDateSelected:e=>`\u{3A3}\u{3AE}\u{3BC}\u{3B5}\u{3C1}\u{3B1}, \u{3B5}\u{3C0}\u{3B9}\u{3BB}\u{3AD}\u{3C7}\u{3C4}\u{3B7}\u{3BA}\u{3B5} ${e.date}`},"en-US":{previous:"Previous",next:"Next",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.dateRange}`,todayDate:e=>`Today, ${e.date}`,todayDateSelected:e=>`Today, ${e.date} selected`,dateSelected:e=>`${e.date} selected`,startRangeSelectionPrompt:"Click to start selecting date range",finishRangeSelectionPrompt:"Click to finish selecting date range",minimumDate:"First available date",maximumDate:"Last available date",dateRange:e=>`${e.startDate} to ${e.endDate}`},"es-ES":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} seleccionado`,finishRangeSelectionPrompt:"Haga clic para terminar de seleccionar rango de fechas",maximumDate:"\xdaltima fecha disponible",minimumDate:"Primera fecha disponible",next:"Siguiente",previous:"Anterior",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo seleccionado: ${e.dateRange}`,startRangeSelectionPrompt:"Haga clic para comenzar a seleccionar un rango de fechas",todayDate:e=>`Hoy, ${e.date}`,todayDateSelected:e=>`Hoy, ${e.date} seleccionado`},"et-EE":{dateRange:e=>`${e.startDate} kuni ${e.endDate}`,dateSelected:e=>`${e.date} valitud`,finishRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimise l\xf5petamiseks",maximumDate:"Viimane saadaolev kuup\xe4ev",minimumDate:"Esimene saadaolev kuup\xe4ev",next:"J\xe4rgmine",previous:"Eelmine",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.dateRange}`,startRangeSelectionPrompt:"Kl\xf5psake kuup\xe4evavahemiku valimiseks",todayDate:e=>`T\xe4na, ${e.date}`,todayDateSelected:e=>`T\xe4na, ${e.date} valitud`},"fi-FI":{dateRange:e=>`${e.startDate} \u{2013} ${e.endDate}`,dateSelected:e=>`${e.date} valittu`,finishRangeSelectionPrompt:"Lopeta p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",maximumDate:"Viimeinen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",minimumDate:"Ensimm\xe4inen varattavissa oleva p\xe4iv\xe4m\xe4\xe4r\xe4",next:"Seuraava",previous:"Edellinen",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.dateRange}`,startRangeSelectionPrompt:"Aloita p\xe4iv\xe4m\xe4\xe4r\xe4alueen valinta napsauttamalla t\xe4t\xe4.",todayDate:e=>`T\xe4n\xe4\xe4n, ${e.date}`,todayDateSelected:e=>`T\xe4n\xe4\xe4n, ${e.date} valittu`},"fr-FR":{dateRange:e=>`${e.startDate} \xe0 ${e.endDate}`,dateSelected:e=>`${e.date} s\xe9lectionn\xe9`,finishRangeSelectionPrompt:"Cliquer pour finir de s\xe9lectionner la plage de dates",maximumDate:"Derni\xe8re date disponible",minimumDate:"Premi\xe8re date disponible",next:"Suivant",previous:"Pr\xe9c\xe9dent",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.dateRange}`,startRangeSelectionPrompt:"Cliquer pour commencer \xe0 s\xe9lectionner la plage de dates",todayDate:e=>`Aujourd'hui, ${e.date}`,todayDateSelected:e=>`Aujourd\u{2019}hui, ${e.date} s\xe9lectionn\xe9`},"he-IL":{dateRange:e=>`${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,dateSelected:e=>`${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`,finishRangeSelectionPrompt:"חץ כדי לסיים את בחירת טווח התאריכים",maximumDate:"תאריך פנוי אחרון",minimumDate:"תאריך פנוי ראשון",next:"הבא",previous:"הקודם",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.dateRange}`,startRangeSelectionPrompt:"לחץ כדי להתחיל בבחירת טווח התאריכים",todayDate:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date}`,todayDateSelected:e=>`\u{5D4}\u{5D9}\u{5D5}\u{5DD}, ${e.date} \u{5E0}\u{5D1}\u{5D7}\u{5E8}`},"hr-HR":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} odabran`,finishRangeSelectionPrompt:"Kliknite da dovršite raspon odabranih datuma",maximumDate:"Posljednji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sljedeći",previous:"Prethodni",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete raspon odabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, odabran ${e.date}`},"hu-HU":{dateRange:e=>`${e.startDate}\u{2013}${e.endDate}`,dateSelected:e=>`${e.date} kiv\xe1lasztva`,finishRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek befejez\xe9s\xe9hez",maximumDate:"Utols\xf3 el\xe9rhető d\xe1tum",minimumDate:"Az első el\xe9rhető d\xe1tum",next:"K\xf6vetkező",previous:"Előző",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.dateRange}`,startRangeSelectionPrompt:"Kattintson a d\xe1tumtartom\xe1ny kijel\xf6l\xe9s\xe9nek ind\xedt\xe1s\xe1hoz",todayDate:e=>`Ma, ${e.date}`,todayDateSelected:e=>`Ma, ${e.date} kijel\xf6lve`},"it-IT":{dateRange:e=>`Da ${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selezionata`,finishRangeSelectionPrompt:"Fai clic per completare la selezione dell’intervallo di date",maximumDate:"Ultima data disponibile",minimumDate:"Prima data disponibile",next:"Successivo",previous:"Precedente",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: ${e.dateRange}`,startRangeSelectionPrompt:"Fai clic per selezionare l’intervallo di date",todayDate:e=>`Oggi, ${e.date}`,todayDateSelected:e=>`Oggi, ${e.date} selezionata`},"ja-JP":{dateRange:e=>`${e.startDate} \u{304B}\u{3089} ${e.endDate}`,dateSelected:e=>`${e.date} \u{3092}\u{9078}\u{629E}`,finishRangeSelectionPrompt:"クリックして日付範囲の選択を終了",maximumDate:"最終利用可能日",minimumDate:"最初の利用可能日",next:"次へ",previous:"前へ",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.dateRange}`,startRangeSelectionPrompt:"クリックして日付範囲の選択を開始",todayDate:e=>`\u{672C}\u{65E5}\u{3001}${e.date}`,todayDateSelected:e=>`\u{672C}\u{65E5}\u{3001}${e.date} \u{3092}\u{9078}\u{629E}`},"ko-KR":{dateRange:e=>`${e.startDate} ~ ${e.endDate}`,dateSelected:e=>`${e.date} \u{C120}\u{D0DD}\u{B428}`,finishRangeSelectionPrompt:"날짜 범위 선택을 완료하려면 클릭하십시오.",maximumDate:"마지막으로 사용 가능한 일자",minimumDate:"처음으로 사용 가능한 일자",next:"다음",previous:"이전",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.dateRange}`,startRangeSelectionPrompt:"날짜 범위 선택을 시작하려면 클릭하십시오.",todayDate:e=>`\u{C624}\u{B298}, ${e.date}`,todayDateSelected:e=>`\u{C624}\u{B298}, ${e.date} \u{C120}\u{D0DD}\u{B428}`},"lt-LT":{dateRange:e=>`Nuo ${e.startDate} iki ${e.endDate}`,dateSelected:e=>`Pasirinkta ${e.date}`,finishRangeSelectionPrompt:"Spustelėkite, kad baigtumėte pasirinkti datų intervalą",maximumDate:"Paskutinė galima data",minimumDate:"Pirmoji galima data",next:"Paskesnis",previous:"Ankstesnis",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: ${e.dateRange}`,startRangeSelectionPrompt:"Spustelėkite, kad pradėtumėte pasirinkti datų intervalą",todayDate:e=>`\u{160}iandien, ${e.date}`,todayDateSelected:e=>`\u{160}iandien, pasirinkta ${e.date}`},"lv-LV":{dateRange:e=>`No ${e.startDate} l\u{12B}dz ${e.endDate}`,dateSelected:e=>`Atlas\u{12B}ts: ${e.date}`,finishRangeSelectionPrompt:"Noklikšķiniet, lai pabeigtu datumu diapazona atlasi",maximumDate:"Pēdējais pieejamais datums",minimumDate:"Pirmais pieejamais datums",next:"Tālāk",previous:"Atpakaļ",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: ${e.dateRange}`,startRangeSelectionPrompt:"Noklikšķiniet, lai sāktu datumu diapazona atlasi",todayDate:e=>`\u{160}odien, ${e.date}`,todayDateSelected:e=>`Atlas\u{12B}ta \u{161}odiena, ${e.date}`},"nb-NO":{dateRange:e=>`${e.startDate} til ${e.endDate}`,dateSelected:e=>`${e.date} valgt`,finishRangeSelectionPrompt:"Klikk for \xe5 fullf\xf8re valg av datoomr\xe5de",maximumDate:"Siste tilgjengelige dato",minimumDate:"F\xf8rste tilgjengelige dato",next:"Neste",previous:"Forrige",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.dateRange}`,startRangeSelectionPrompt:"Klikk for \xe5 starte valg av datoomr\xe5de",todayDate:e=>`I dag, ${e.date}`,todayDateSelected:e=>`I dag, ${e.date} valgt`},"nl-NL":{dateRange:e=>`${e.startDate} tot ${e.endDate}`,dateSelected:e=>`${e.date} geselecteerd`,finishRangeSelectionPrompt:"Klik om de selectie van het datumbereik te voltooien",maximumDate:"Laatste beschikbare datum",minimumDate:"Eerste beschikbare datum",next:"Volgende",previous:"Vorige",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.dateRange}`,startRangeSelectionPrompt:"Klik om het datumbereik te selecteren",todayDate:e=>`Vandaag, ${e.date}`,todayDateSelected:e=>`Vandaag, ${e.date} geselecteerd`},"pl-PL":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`Wybrano ${e.date}`,finishRangeSelectionPrompt:"Kliknij, aby zakończyć wyb\xf3r zakresu dat",maximumDate:"Ostatnia dostępna data",minimumDate:"Pierwsza dostępna data",next:"Dalej",previous:"Wstecz",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknij, aby rozpocząć wyb\xf3r zakresu dat",todayDate:e=>`Dzisiaj, ${e.date}`,todayDateSelected:e=>`Dzisiaj wybrano ${e.date}`},"pt-BR":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para concluir a sele\xe7\xe3o do intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para iniciar a sele\xe7\xe3o do intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"pt-PT":{dateRange:e=>`${e.startDate} a ${e.endDate}`,dateSelected:e=>`${e.date} selecionado`,finishRangeSelectionPrompt:"Clique para terminar de selecionar o intervalo de datas",maximumDate:"\xdaltima data dispon\xedvel",minimumDate:"Primeira data dispon\xedvel",next:"Pr\xf3ximo",previous:"Anterior",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.dateRange}`,startRangeSelectionPrompt:"Clique para come\xe7ar a selecionar o intervalo de datas",todayDate:e=>`Hoje, ${e.date}`,todayDateSelected:e=>`Hoje, ${e.date} selecionado`},"ro-RO":{dateRange:e=>`De la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,dateSelected:e=>`${e.date} selectat\u{103}`,finishRangeSelectionPrompt:"Apăsaţi pentru a finaliza selecţia razei pentru dată",maximumDate:"Ultima dată disponibilă",minimumDate:"Prima dată disponibilă",next:"Următorul",previous:"\xcenainte",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: ${e.dateRange}`,startRangeSelectionPrompt:"Apăsaţi pentru a \xeencepe selecţia razei pentru dată",todayDate:e=>`Ast\u{103}zi, ${e.date}`,todayDateSelected:e=>`Azi, ${e.date} selectat\u{103}`},"ru-RU":{dateRange:e=>`\u{421} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,dateSelected:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Щелкните, чтобы завершить выбор диапазона дат",maximumDate:"Последняя доступная дата",minimumDate:"Первая доступная дата",next:"Далее",previous:"Назад",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Щелкните, чтобы начать выбор диапазона дат",todayDate:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{435}\u{433}\u{43E}\u{434}\u{43D}\u{44F}, \u{432}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"sk-SK":{dateRange:e=>`Od ${e.startDate} do ${e.endDate}`,dateSelected:e=>`Vybrat\xfd d\xe1tum ${e.date}`,finishRangeSelectionPrompt:"Kliknut\xedm dokonč\xedte v\xfdber rozsahu d\xe1tumov",maximumDate:"Posledn\xfd dostupn\xfd d\xe1tum",minimumDate:"Prv\xfd dostupn\xfd d\xe1tum",next:"Nasleduj\xface",previous:"Predch\xe1dzaj\xface",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknut\xedm spust\xedte v\xfdber rozsahu d\xe1tumov",todayDate:e=>`Dnes ${e.date}`,todayDateSelected:e=>`Vybrat\xfd dne\u{161}n\xfd d\xe1tum ${e.date}`},"sl-SI":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izbrano`,finishRangeSelectionPrompt:"Kliknite za dokončanje izbire datumskega obsega",maximumDate:"Zadnji razpoložljivi datum",minimumDate:"Prvi razpoložljivi datum",next:"Naprej",previous:"Nazaj",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite za začetek izbire datumskega obsega",todayDate:e=>`Danes, ${e.date}`,todayDateSelected:e=>`Danes, ${e.date} izbrano`},"sr-SP":{dateRange:e=>`${e.startDate} do ${e.endDate}`,dateSelected:e=>`${e.date} izabran`,finishRangeSelectionPrompt:"Kliknite da dovršite opseg izabranih datuma",maximumDate:"Zadnji raspoloživi datum",minimumDate:"Prvi raspoloživi datum",next:"Sledeći",previous:"Prethodni",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani period: ${e.dateRange}`,startRangeSelectionPrompt:"Kliknite da započnete opseg izabranih datuma",todayDate:e=>`Danas, ${e.date}`,todayDateSelected:e=>`Danas, izabran ${e.date}`},"sv-SE":{dateRange:e=>`${e.startDate} till ${e.endDate}`,dateSelected:e=>`${e.date} har valts`,finishRangeSelectionPrompt:"Klicka f\xf6r att avsluta val av datumintervall",maximumDate:"Sista tillg\xe4ngliga datum",minimumDate:"F\xf6rsta tillg\xe4ngliga datum",next:"N\xe4sta",previous:"F\xf6reg\xe5ende",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.dateRange}`,startRangeSelectionPrompt:"Klicka f\xf6r att v\xe4lja datumintervall",todayDate:e=>`Idag, ${e.date}`,todayDateSelected:e=>`Idag, ${e.date} har valts`},"tr-TR":{dateRange:e=>`${e.startDate} - ${e.endDate}`,dateSelected:e=>`${e.date} se\xe7ildi`,finishRangeSelectionPrompt:"Tarih aralığı se\xe7imini tamamlamak i\xe7in tıklayın",maximumDate:"Son m\xfcsait tarih",minimumDate:"İlk m\xfcsait tarih",next:"Sonraki",previous:"\xd6nceki",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.dateRange}`,startRangeSelectionPrompt:"Tarih aralığı se\xe7imini başlatmak i\xe7in tıklayın",todayDate:e=>`Bug\xfcn, ${e.date}`,todayDateSelected:e=>`Bug\xfcn, ${e.date} se\xe7ildi`},"uk-UA":{dateRange:e=>`${e.startDate} \u{2014} ${e.endDate}`,dateSelected:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`,finishRangeSelectionPrompt:"Натисніть, щоб завершити вибір діапазону дат",maximumDate:"Остання доступна дата",minimumDate:"Перша доступна дата",next:"Наступний",previous:"Попередній",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.dateRange}`,startRangeSelectionPrompt:"Натисніть, щоб почати вибір діапазону дат",todayDate:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, ${e.date}`,todayDateSelected:e=>`\u{421}\u{44C}\u{43E}\u{433}\u{43E}\u{434}\u{43D}\u{456}, \u{432}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{43E} ${e.date}`},"zh-CN":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9009}\u{62E9} ${e.date}`,finishRangeSelectionPrompt:"单击以完成选择日期范围",maximumDate:"最后一个可用日期",minimumDate:"第一个可用日期",next:"下一页",previous:"上一页",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"单击以开始选择日期范围",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9009}\u{62E9}\u{4ECA}\u{5929}\u{FF0C}\u{5373} ${e.date}`},"zh-TW":{dateRange:e=>`${e.startDate} \u{81F3} ${e.endDate}`,dateSelected:e=>`\u{5DF2}\u{9078}\u{53D6} ${e.date}`,finishRangeSelectionPrompt:"按一下以完成選取日期範圍",maximumDate:"最後一個可用日期",minimumDate:"第一個可用日期",next:"下一頁",previous:"上一頁",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.dateRange}`,startRangeSelectionPrompt:"按一下以開始選取日期範圍",todayDate:e=>`\u{4ECA}\u{5929}\u{FF0C}${e.date}`,todayDateSelected:e=>`\u{5DF2}\u{9078}\u{53D6}\u{4ECA}\u{5929}\u{FF0C}${e.date}`}};let fT=new Map;class fR{constructor(e,t={}){this.formatter=fO(e,t),this.options=t}format(e){return this.formatter.format(e)}formatToParts(e){return this.formatter.formatToParts(e)}formatRange(e,t){if("function"==typeof this.formatter.formatRange)return this.formatter.formatRange(e,t);if(t<e)throw RangeError("End date must be >= start date");return`${this.formatter.format(e)} \u{2013} ${this.formatter.format(t)}`}formatRangeToParts(e,t){if("function"==typeof this.formatter.formatRangeToParts)return this.formatter.formatRangeToParts(e,t);if(t<e)throw RangeError("End date must be >= start date");let n=this.formatter.formatToParts(e),r=this.formatter.formatToParts(t);return[...n.map(e=>({...e,source:"startRange"})),{type:"literal",value:" – ",source:"shared"},...r.map(e=>({...e,source:"endRange"}))]}resolvedOptions(){let e=this.formatter.resolvedOptions();return null==fM&&(fM="h12"===new Intl.DateTimeFormat("fr",{hour:"numeric",hour12:!1}).resolvedOptions().hourCycle),fM&&(this.resolvedHourCycle||(this.resolvedHourCycle=function(e,t){if(!t.timeStyle&&!t.hour)return;e=e.replace(/(-u-)?-nu-[a-zA-Z0-9]+/,"");let n=fO(e+=(e.includes("-u-")?"":"-u")+"-nu-latn",{...t,timeZone:void 0}),r=parseInt(n.formatToParts(new Date(2020,2,3,0)).find(e=>"hour"===e.type).value,10),a=parseInt(n.formatToParts(new Date(2020,2,3,23)).find(e=>"hour"===e.type).value,10);if(0===r&&23===a)return"h23";if(24===r&&23===a)return"h24";if(0===r&&11===a)return"h11";if(12===r&&11===a)return"h12";throw Error("Unexpected hour cycle result")}(e.locale,this.options)),e.hourCycle=this.resolvedHourCycle,e.hour12="h11"===this.resolvedHourCycle||"h12"===this.resolvedHourCycle),"ethiopic-amete-alem"===e.calendar&&(e.calendar="ethioaa"),e}}let fN={true:{ja:"h11"},false:{}};function fO(e,t={}){if("boolean"==typeof t.hour12&&(null==f$&&(f$="24"===new Intl.DateTimeFormat("en-US",{hour:"numeric",hour12:!1}).format(new Date(2020,2,3,0))),f$)){let n=fN[String((t={...t}).hour12)][e.split("-")[0]],r=t.hour12?"h12":"h23";t.hourCycle=n??r,delete t.hour12}let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(fT.has(n))return fT.get(n);let r=new Intl.DateTimeFormat(e,t);return fT.set(n,r),r}let f$=null,fM=null;function fA(e){e=fP(e??{},fj);let{locale:t}=fE();return(0,ll.useMemo)(()=>new fR(t,e),[t,e])}function fj(e,t){if(e===t)return!0;let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(t[r]!==e[r])return!1;return!0}let fI=Symbol.for("react-aria.i18n.locale"),fL=Symbol.for("react-aria.i18n.strings");class fF{constructor(e,t="en-US"){this.strings=Object.fromEntries(Object.entries(e).filter(([,e])=>e)),this.defaultLocale=t}getStringForLocale(e,t){let n=this.getStringsForLocale(t)[e];if(!n)throw Error(`Could not find intl message ${e} in ${t} locale`);return n}getStringsForLocale(e){let t=this.strings[e];return t||(t=function(e,t,n="en-US"){var r;if(t[e])return t[e];let a=(r=e,Intl.Locale?new Intl.Locale(r).language:r.split("-")[0]);if(t[a])return t[a];for(let e in t)if(e.startsWith(a+"-"))return t[e];return t[n]}(e,this.strings,this.defaultLocale),this.strings[e]=t),t}static getGlobalDictionaryForPackage(e){if("u"<typeof window)return null;let t=window[fI];if(void 0===m){let e=window[fL];if(!e)return null;for(let n in m={},e)m[n]=new fF({[t]:e[n]},t)}let n=m?.[e];if(!n)throw Error(`Strings for package "${e}" were not included by LocalizedStringProvider. Please add it to the list passed to createLocalizedStringDictionary.`);return n}}let fB=new Map,fV=new Map;class fU{constructor(e,t){this.locale=e,this.strings=t}format(e,t){let n=this.strings.getStringForLocale(e,this.locale);return"function"==typeof n?n(t,this):n}plural(e,t,n="cardinal"){let r=t["="+e];if(r)return"function"==typeof r?r():r;let a=this.locale+":"+n,o=fB.get(a);return o||(o=new Intl.PluralRules(this.locale,{type:n}),fB.set(a,o)),"function"==typeof(r=t[o.select(e)]||t.other)?r():r}number(e){let t=fV.get(this.locale);return t||(t=new Intl.NumberFormat(this.locale),fV.set(this.locale,t)),t.format(e)}select(e,t){let n=e[t]||e.other;return"function"==typeof n?n():n}}let fW=new WeakMap;function fH(e,t){let n;return t&&fF.getGlobalDictionaryForPackage(t)||((n=fW.get(e))||(n=new fF(e),fW.set(e,n)),n)}function fz(e,t){let{locale:n}=fE(),r=fH(e,t);return(0,ll.useMemo)(()=>new fU(n,r),[n,r])}function fK(e,t){return e-t*Math.floor(e/t)}function fG(e,t,n,r){let a=(t=fY(e,t))-1,o=-2;return n<=2?o=0:fZ(t)&&(o=-1),1721425+365*a+Math.floor(a/4)-Math.floor(a/100)+Math.floor(a/400)+Math.floor((367*n-362)/12+o+r)}function fZ(e){return e%4==0&&(e%100!=0||e%400==0)}function fY(e,t){return"BC"===e?1-t:t}function fq(e){let t="AD";return e<=0&&(t="BC",e=1-e),[t,e]}let fJ={standard:[31,28,31,30,31,30,31,31,30,31,30,31],leapyear:[31,29,31,30,31,30,31,31,30,31,30,31]};class fX{fromJulianDay(e){let t=e-1721426,n=Math.floor(t/146097),r=fK(t,146097),a=Math.floor(r/36524),o=fK(r,36524),i=Math.floor(o/1461),s=Math.floor(fK(o,1461)/365),[l,u]=fq(400*n+100*a+4*i+s+ +(4!==a&&4!==s)),c=e-fG(l,u,1,1),d=2;e<fG(l,u,3,1)?d=0:fZ(u)&&(d=1);let m=Math.floor(((c+d)*12+373)/367),p=e-fG(l,u,m,1)+1;return new hu(l,u,m,p)}toJulianDay(e){return fG(e.era,e.year,e.month,e.day)}getDaysInMonth(e){return fJ[fZ(e.year)?"leapyear":"standard"][e.month-1]}getMonthsInYear(e){return 12}getDaysInYear(e){return fZ(e.year)?366:365}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getYearsInEra(e){return 9999}getEras(){return["BC","AD"]}isInverseEra(e){return"BC"===e.era}balanceDate(e){e.year<=0&&(e.era="BC"===e.era?"AD":"BC",e.year=1-e.year)}constructor(){this.identifier="gregory"}}function fQ(e,t){let n=e.copy(),r="hour"in n?f7(n,t):0;f0(n,t.years||0),n.calendar.balanceYearMonth&&n.calendar.balanceYearMonth(n,e),n.month+=t.months||0,f1(n),f4(n),n.day+=7*(t.weeks||0),n.day+=t.days||0,n.day+=r,function(e){for(;e.day<1;)e.month--,f1(e),e.day+=e.calendar.getDaysInMonth(e);for(;e.day>e.calendar.getDaysInMonth(e);)e.day-=e.calendar.getDaysInMonth(e),e.month++,f1(e)}(n),n.calendar.balanceDate&&n.calendar.balanceDate(n),n.year<1&&(n.year=1,n.month=1,n.day=1);let a=n.calendar.getYearsInEra(n);if(n.year>a){let e=n.calendar.isInverseEra?.(n);n.year=a,n.month=e?1:n.calendar.getMonthsInYear(n),n.day=e?1:n.calendar.getDaysInMonth(n)}n.month<1&&(n.month=1,n.day=1);let o=n.calendar.getMonthsInYear(n);return n.month>o&&(n.month=o,n.day=n.calendar.getDaysInMonth(n)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day)),n}function f0(e,t){e.calendar.isInverseEra?.(e)&&(t=-t),e.year+=t}function f1(e){for(;e.month<1;)f0(e,-1),e.month+=e.calendar.getMonthsInYear(e);let t=0;for(;e.month>(t=e.calendar.getMonthsInYear(e));)e.month-=t,f0(e,1)}function f4(e){e.month=Math.max(1,Math.min(e.calendar.getMonthsInYear(e),e.month)),e.day=Math.max(1,Math.min(e.calendar.getDaysInMonth(e),e.day))}function f2(e){e.calendar.constrainDate&&e.calendar.constrainDate(e),e.year=Math.max(1,Math.min(e.calendar.getYearsInEra(e),e.year)),f4(e)}function f3(e){let t={};for(let n in e)"number"==typeof e[n]&&(t[n]=-e[n]);return t}function f6(e,t){let n=e.copy();return null!=t.era&&(n.era=t.era),null!=t.year&&(n.year=t.year),null!=t.month&&(n.month=t.month),null!=t.day&&(n.day=t.day),f2(n),n}function f5(e,t){let n=e.copy();return null!=t.hour&&(n.hour=t.hour),null!=t.minute&&(n.minute=t.minute),null!=t.second&&(n.second=t.second),null!=t.millisecond&&(n.millisecond=t.millisecond),f9(n),n}function f9(e){e.millisecond=Math.max(0,Math.min(e.millisecond,1e3)),e.second=Math.max(0,Math.min(e.second,59)),e.minute=Math.max(0,Math.min(e.minute,59)),e.hour=Math.max(0,Math.min(e.hour,23))}function f8(e,t){let n=e%t;return n<0&&(n+=t),n}function f7(e,t){let n;return e.hour+=t.hours||0,e.minute+=t.minutes||0,e.second+=t.seconds||0,e.millisecond+=t.milliseconds||0,e.second+=Math.floor(e.millisecond/1e3),e.millisecond=f8(e.millisecond,1e3),e.minute+=Math.floor(e.second/60),e.second=f8(e.second,60),e.hour+=Math.floor(e.minute/60),e.minute=f8(e.minute,60),n=Math.floor(e.hour/24),e.hour=f8(e.hour,24),n}function he(e,t){let n=e.copy();return f7(n,t),n}function ht(e,t,n,r){let a=e.copy();switch(t){case"era":{let t=e.calendar.getEras(),o=t.indexOf(e.era);if(o<0)throw Error("Invalid era: "+e.era);o=hr(o,n,0,t.length-1,r?.round),a.era=t[o],f2(a);break}case"year":a.calendar.isInverseEra?.(a)&&(n=-n),a.year=hr(e.year,n,-1/0,9999,r?.round),a.year===-1/0&&(a.year=1),a.calendar.balanceYearMonth&&a.calendar.balanceYearMonth(a,e);break;case"month":a.month=hr(e.month,n,1,e.calendar.getMonthsInYear(e),r?.round);break;case"day":a.day=hr(e.day,n,1,e.calendar.getDaysInMonth(e),r?.round);break;default:throw Error("Unsupported field "+t)}return e.calendar.balanceDate&&e.calendar.balanceDate(a),f2(a),a}function hn(e,t,n,r){let a=e.copy();switch(t){case"hour":{let t=e.hour,o=0,i=23;if(r?.hourCycle===12){let e=t>=12;o=12*!!e,i=e?23:11}a.hour=hr(t,n,o,i,r?.round);break}case"minute":a.minute=hr(e.minute,n,0,59,r?.round);break;case"second":a.second=hr(e.second,n,0,59,r?.round);break;case"millisecond":a.millisecond=hr(e.millisecond,n,0,999,r?.round);break;default:throw Error("Unsupported field "+t)}return a}function hr(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function ha(e,t){let n;return n=(null!=t.years&&0!==t.years||null!=t.months&&0!==t.months||null!=t.weeks&&0!==t.weeks||null!=t.days&&0!==t.days?hv(fQ(hD(e),{years:t.years,months:t.months,weeks:t.weeks,days:t.days}),e.timeZone):hp(e)-e.offset)+(t.milliseconds||0),n+=1e3*(t.seconds||0),n+=6e4*(t.minutes||0),hE(hw(n+=36e5*(t.hours||0),e.timeZone),e.calendar)}function ho(e){return`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}:${String(e.second).padStart(2,"0")}${e.millisecond?String(e.millisecond/1e3).slice(1):""}`}function hi(e){let t,n=hE(e,new fX);return t="BC"===n.era?1===n.year?"0000":"-"+String(Math.abs(1-n.year)).padStart(6,"00"):String(n.year).padStart(4,"0"),`${t}-${String(n.month).padStart(2,"0")}-${String(n.day).padStart(2,"0")}`}function hs(e){return`${hi(e)}T${ho(e)}`}function hl(e){let t,n="object"==typeof e[0]?e.shift():new fX;if("string"==typeof e[0])t=e.shift();else{let e=n.getEras();t=e[e.length-1]}return[n,t,e.shift(),e.shift(),e.shift()]}class hu{#t;constructor(...e){let[t,n,r,a,o]=hl(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,f2(this)}copy(){return this.era?new hu(this.calendar,this.era,this.year,this.month,this.day):new hu(this.calendar,this.year,this.month,this.day)}add(e){return fQ(this,e)}subtract(e){return fQ(this,f3(e))}set(e){return f6(this,e)}cycle(e,t,n){return ht(this,e,t,n)}toDate(e){return hb(this,e)}toString(){return hi(this)}compare(e){return hO(this,e)}}class hc{#t;constructor(e=0,t=0,n=0,r=0){this.hour=e,this.minute=t,this.second=n,this.millisecond=r,f9(this)}copy(){return new hc(this.hour,this.minute,this.second,this.millisecond)}add(e){return he(this,e)}subtract(e){return he(this,f3(e))}set(e){return f5(this,e)}cycle(e,t,n){return hn(this,e,t,n)}toString(){return ho(this)}compare(e){var t,n;return t=this,n=e,h$(t)-h$(n)}}class hd{#t;constructor(...e){let[t,n,r,a,o]=hl(e);this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,f2(this)}copy(){return this.era?new hd(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new hd(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(e){return fQ(this,e)}subtract(e){return fQ(this,f3(e))}set(e){return f6(f5(this,e),e)}cycle(e,t,n){switch(e){case"era":case"year":case"month":case"day":return ht(this,e,t,n);default:return hn(this,e,t,n)}}toDate(e,t){return hb(this,e,t)}toString(){return hs(this)}compare(e){var t,n;let r=hO(this,e);return 0===r?(t=this,n=hD(e),h$(t)-h$(n)):r}}class hm{#t;constructor(...e){let[t,n,r,a,o]=hl(e),i=e.shift(),s=e.shift();this.calendar=t,this.era=n,this.year=r,this.month=a,this.day=o,this.timeZone=i,this.offset=s,this.hour=e.shift()||0,this.minute=e.shift()||0,this.second=e.shift()||0,this.millisecond=e.shift()||0,f2(this)}copy(){return this.era?new hm(this.calendar,this.era,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond):new hm(this.calendar,this.year,this.month,this.day,this.timeZone,this.offset,this.hour,this.minute,this.second,this.millisecond)}add(e){return ha(this,e)}subtract(e){return ha(this,f3(e))}set(e,t){let n,r;return 0===(r=f5(f6(n=hD(this),e),e)).compare(n)?this:hE(hw(hv(r,this.timeZone,t),this.timeZone),this.calendar)}cycle(e,t,n){return function(e,t,n,r){switch(t){case"hour":{let t=0,a=23;if(r?.hourCycle===12){let n=e.hour>=12;t=12*!!n,a=n?23:11}let o=hD(e),i=hE(f5(o,{hour:t}),new fX),s=[hv(i,e.timeZone,"earlier"),hv(i,e.timeZone,"later")].filter(t=>hw(t,e.timeZone).day===i.day)[0],l=hE(f5(o,{hour:a}),new fX),u=[hv(l,e.timeZone,"earlier"),hv(l,e.timeZone,"later")].filter(t=>hw(t,e.timeZone).day===l.day).pop(),c=hp(e)-e.offset,d=Math.floor(c/36e5),m=c%36e5;return hE(hw(c=36e5*hr(d,n,Math.floor(s/36e5),Math.floor(u/36e5),r?.round)+m,e.timeZone),e.calendar)}case"minute":case"second":case"millisecond":return hn(e,t,n,r);case"era":case"year":case"month":case"day":return hE(hw(hv(ht(hD(e),t,n,r),e.timeZone),e.timeZone),e.calendar);default:throw Error("Unsupported field "+t)}}(this,e,t,n)}toDate(){var e;return e=this,new Date(hp(e)-e.offset)}toString(){var e;let t,n,r,a,o;return`${hs(this)}${t=0>Math.sign(e=this.offset)?"-":"+",n=Math.floor((e=Math.abs(e))/36e5),r=Math.floor(e%36e5/6e4),a=Math.floor(e%36e5%6e4/1e3),o=`${t}${String(n).padStart(2,"0")}:${String(r).padStart(2,"0")}`,0!==a&&(o+=`:${String(a).padStart(2,"0")}`),o}[${this.timeZone}]`}toAbsoluteString(){return this.toDate().toISOString()}compare(e){return this.toDate().getTime()-(function(e,t){if(e instanceof hm){var n,r;return e.timeZone===t?e:(n=e,r=t,hE(hw(hp(n)-n.offset,r),n.calendar))}return hw(hv(e,t,void 0),t)})(e,this.timeZone).toDate().getTime()}}function hp(e){return hf(fY((e=hE(e,new fX)).era,e.year),e.month,e.day,e.hour,e.minute,e.second,e.millisecond)}function hf(e,t,n,r,a,o,i){let s=new Date;return s.setUTCHours(r,a,o,i),s.setUTCFullYear(e,t-1,n),s.getTime()}function hh(e,t){if("UTC"===t)return 0;if(e>0&&t===hA())return -6e4*new Date(e).getTimezoneOffset();let{year:n,month:r,day:a,hour:o,minute:i,second:s}=hy(e,t);return hf(n,r,a,o,i,s,0)-1e3*Math.floor(e/1e3)}let hg=new Map;function hy(e,t){let n=hg.get(t);n||(n=new Intl.DateTimeFormat("en-US",{timeZone:t,hour12:!1,era:"short",year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}),hg.set(t,n));let r=n.formatToParts(new Date(e)),a={};for(let e of r)"literal"!==e.type&&(a[e.type]=e.value);return{year:"BC"===a.era||"B"===a.era?-a.year+1:+a.year,month:+a.month,day:+a.day,hour:"24"===a.hour?0:+a.hour,minute:+a.minute,second:+a.second}}function hv(e,t,n="compatible"){var r,a,o;let i=hD(e);if("UTC"===t)return hp(i);if(t===hA()&&"compatible"===n){i=hE(i,new fX);let e=new Date,t=fY(i.era,i.year);return e.setFullYear(t,i.month-1,i.day),e.setHours(i.hour,i.minute,i.second,i.millisecond),e.getTime()}let s=hp(i),l=hh(s-864e5,t),u=hh(s+864e5,t),c=(r=i,((a=s-l)==(o=s-u)?[a]:[a,o]).filter(e=>{var n;let a;return n=r,a=hy(e,t),n.year===a.year&&n.month===a.month&&n.day===a.day&&n.hour===a.hour&&n.minute===a.minute&&n.second===a.second}));if(1===c.length)return c[0];if(c.length>1)switch(n){case"compatible":case"earlier":return c[0];case"later":return c[c.length-1];case"reject":throw RangeError("Multiple possible absolute times found")}switch(n){case"earlier":return Math.min(s-l,s-u);case"compatible":case"later":return Math.max(s-l,s-u);case"reject":throw RangeError("No such absolute time found")}}function hb(e,t,n="compatible"){return new Date(hv(e,t,n))}function hw(e,t){let n=hh(e,t),r=new Date(e+n),a=r.getUTCFullYear();return new hm(a<1?"BC":"AD",a<1?-a+1:a,r.getUTCMonth()+1,r.getUTCDate(),t,n,r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.getUTCMilliseconds())}function hx(e){return new hu(e.calendar,e.era,e.year,e.month,e.day)}function hD(e,t){let n=0,r=0,a=0,o=0;if("timeZone"in e)({hour:n,minute:r,second:a,millisecond:o}=e);else if("hour"in e&&!t)return e;return t&&({hour:n,minute:r,second:a,millisecond:o}=t),new hd(e.calendar,e.era,e.year,e.month,e.day,n,r,a,o)}function hE(e,t){if(hC(e.calendar,t))return e;let n=t.fromJulianDay(e.calendar.toJulianDay(e)),r=e.copy();return r.calendar=t,r.era=n.era,r.year=n.year,r.month=n.month,r.day=n.day,f2(r),r}let h_={"001":1,AD:1,AE:6,AF:6,AI:1,AL:1,AM:1,AN:1,AR:1,AT:1,AU:1,AX:1,AZ:1,BA:1,BE:1,BG:1,BH:6,BM:1,BN:1,BY:1,CH:1,CL:1,CM:1,CN:1,CR:1,CY:1,CZ:1,DE:1,DJ:6,DK:1,DZ:6,EC:1,EE:1,EG:6,ES:1,FI:1,FJ:1,FO:1,FR:1,GB:1,GE:1,GF:1,GP:1,GR:1,HR:1,HU:1,IE:1,IQ:6,IR:6,IS:1,IT:1,JO:6,KG:1,KW:6,KZ:1,LB:1,LI:1,LK:1,LT:1,LU:1,LV:1,LY:6,MC:1,MD:1,ME:1,MK:1,MN:1,MQ:1,MV:5,MY:1,NL:1,NO:1,NZ:1,OM:6,PL:1,QA:6,RE:1,RO:1,RS:1,RU:1,SD:6,SE:1,SI:1,SK:1,SM:1,SY:6,TJ:1,TM:1,TR:1,UA:1,UY:1,UZ:1,VA:1,VN:1,XK:1};function hS(e,t){return t=hE(t,e.calendar),e.era===t.era&&e.year===t.year&&e.month===t.month&&e.day===t.day}function hk(e,t){return hC(e.calendar,t.calendar)&&hS(e,t)}function hC(e,t){return e.isEqual?.(t)??t.isEqual?.(e)??e.identifier===t.identifier}let hP={sun:0,mon:1,tue:2,wed:3,thu:4,fri:5,sat:6};function hT(e,t,n){let r=Math.ceil(e.calendar.toJulianDay(e)+1-(n?hP[n]:function(e){let t=hB.get(e);if(!t){if(Intl.Locale){let n=new Intl.Locale(e);if("getWeekInfo"in n&&(t=n.getWeekInfo()))return hB.set(e,t),t.firstDay}let n=function(e){if(Intl.Locale){let t=hF.get(e);return!t&&(t=new Intl.Locale(e).maximize().region)&&hF.set(e,t),t}let t=e.split("-")[1];return"u"===t?void 0:t}(e);if(e.includes("-fw-")){let n=e.split("-fw-")[1].split("-")[0];t="mon"===n?{firstDay:1}:"tue"===n?{firstDay:2}:"wed"===n?{firstDay:3}:"thu"===n?{firstDay:4}:"fri"===n?{firstDay:5}:"sat"===n?{firstDay:6}:{firstDay:0}}else t=e.includes("-ca-iso8601")?{firstDay:1}:{firstDay:n&&h_[n]||0};hB.set(e,t)}return t.firstDay}(t)))%7;return r<0&&(r+=7),r}function hR(e){return hw(Date.now(),e)}function hN(e){return hx(hR(e))}function hO(e,t){return e.calendar.toJulianDay(e)-t.calendar.toJulianDay(t)}function h$(e){return 36e5*e.hour+6e4*e.minute+1e3*e.second+e.millisecond}let hM=null;function hA(){return null==hM&&(hM=new Intl.DateTimeFormat().resolvedOptions().timeZone),hM}function hj(e){return e.subtract({days:e.day-1})}function hI(e){return e.add({days:e.calendar.getDaysInMonth(e)-e.day})}function hL(e,t,n){let r=hT(e,t,n);return e.subtract({days:r})}let hF=new Map,hB=new Map;function hV(e,t,n){let r=e.calendar.getDaysInMonth(e);return Math.ceil((hT(hj(e),t,n)+r)/7)}function hU(e,t){return e&&t?0>=e.compare(t)?e:t:e||t}function hW(e,t){return e&&t?e.compare(t)>=0?e:t:e||t}function hH(e){return e&&e.__esModule?e.default:e}let hz=new WeakMap;function hK(e){return e?.calendar.identifier==="gregory"&&"BC"===e.era?"short":void 0}function hG(e,t,n,r){let a=fz(hH(fC),"@react-aria/calendar"),o=hK(e)||hK(t),i=fA({month:"long",year:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n}),s=fA({month:"long",year:"numeric",day:"numeric",era:o,calendar:e.calendar.identifier,timeZone:n});return(0,ll.useMemo)(()=>{if(hS(e,hj(e))){let o=e,s=t;if(e.calendar.getFormattableMonth&&(o=e.calendar.getFormattableMonth(e)),t.calendar.getFormattableMonth&&(s=t.calendar.getFormattableMonth(t)),hS(t,hI(e)))return i.format(o.toDate(n));if(hS(t,hI(t)))return r?hZ(i,a,o,s,n):i.formatRange(o.toDate(n),s.toDate(n))}return r?hZ(s,a,e,t,n):s.formatRange(e.toDate(n),t.toDate(n))},[e,t,i,s,a,n,r])}function hZ(e,t,n,r,a){let o=e.formatRangeToParts(n.toDate(a),r.toDate(a)),i=-1;for(let e=0;e<o.length;e++){let t=o[e];if("shared"===t.source&&"literal"===t.type)i=e;else if("endRange"===t.source)break}let s="",l="";for(let e=0;e<o.length;e++)e<i?s+=o[e].value:e>i&&(l+=o[e].value);return t.format("dateRange",{startDate:s,endDate:l})}function hY(e,t){let{id:n,"aria-label":r,"aria-labelledby":a}=e;return n=mb(n),a&&r?a=[...new Set([n,...a.trim().split(/\s+/)])].join(" "):a&&(a=a.trim().split(/\s+/).join(" ")),r||a||!t||(r=t),{id:n,"aria-label":r,"aria-labelledby":a}}function hq(e,t){let n=(0,ll.useRef)(!0),r=(0,ll.useRef)(null),a=pH(e);(0,ll.useEffect)(()=>(n.current=!0,()=>{n.current=!1}),[]),(0,ll.useEffect)(()=>{let e=r.current;n.current?n.current=!1:(!e||t.some((t,n)=>!Object.is(t,e[n])))&&a(),r.current=t},t)}function hJ(e,t){var n;let r,a,o,i,s,l=fz((n=fC)&&n.__esModule?n.default:n,"@react-aria/calendar"),u=mB(e),c=hG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!1),d=hG(t.visibleRange.start,t.visibleRange.end,t.timeZone,!0);hq(()=>{t.isFocused||fS(d)},[d]);let m=(o=fz(hH(fC),"@react-aria/calendar"),"highlightedRange"in t?{start:r,end:a}=t.highlightedRange||{}:r=a=t.value??void 0,i=fA({weekday:"long",month:"long",year:"numeric",day:"numeric",era:hK(r)||hK(a),timeZone:t.timeZone}),s="anchorDate"in t?t.anchorDate:null,(0,ll.useMemo)(()=>{if(!s&&r&&a)if(hS(r,a)){let e=i.format(r.toDate(t.timeZone));return o.format("selectedDateDescription",{date:e})}else{let e=hZ(i,o,r,a,t.timeZone);return o.format("selectedRangeDescription",{dateRange:e})}return""},[r,a,s,t.timeZone,o,i]));hq(()=>{m&&fS(m,"polite",4e3)},[m]);let p=mw([!!e.errorMessage,e.isInvalid,e.validationState]);hz.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:e["aria-labelledby"],errorMessageId:p,selectedDateDescription:m});let[f,h]=(0,ll.useState)(!1),g=e.isDisabled||t.isNextVisibleRangeInvalid();g&&f&&(h(!1),t.setFocused(!0));let[y,v]=(0,ll.useState)(!1),b=e.isDisabled||t.isPreviousVisibleRangeInvalid();return b&&y&&(v(!1),t.setFocused(!0)),{calendarProps:mD(u,hY({id:e.id,"aria-label":[e["aria-label"],d].filter(Boolean).join(", "),"aria-labelledby":e["aria-labelledby"]}),{role:"application","aria-details":e["aria-details"]||void 0,"aria-describedby":e["aria-describedby"]||void 0}),nextButtonProps:{onPress:()=>t.focusNextPage(),"aria-label":l.format("next"),isDisabled:g,onFocusChange:h},prevButtonProps:{onPress:()=>t.focusPreviousPage(),"aria-label":l.format("previous"),isDisabled:b,onFocusChange:v},errorMessageProps:{id:p},title:c}}let hX={border:0,clip:"rect(0 0 0 0)",clipPath:"inset(50%)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap"};function hQ(e){let{children:t,elementType:n="div",isFocusable:r,style:a,...o}=e,{visuallyHiddenProps:i}=function(e={}){let{style:t,isFocusable:n}=e,[r,a]=(0,ll.useState)(!1),{focusWithinProps:o}=p6({isDisabled:!n,onFocusWithinChange:e=>a(e)}),i=(0,ll.useMemo)(()=>r?t:t?{...hX,...t}:hX,[r]);return{visuallyHiddenProps:{...o,style:i}}}(e);return lu().createElement(n,mD(o,i),t)}function h0(e,t,n,r){let a=pH(n),o=null==n;(0,ll.useEffect)(()=>{if(o||!e.current)return;let n=e.current;return n.addEventListener(t,a,r),()=>{n.removeEventListener(t,a,r)}},[e,t,r,o])}function h1(e,t){if(!e)return!1;let n=window.getComputedStyle(e),r=document.scrollingElement||document.documentElement,a=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return e===r&&"hidden"!==n.overflow&&(a=!0),a&&t&&(a=e.scrollHeight!==e.clientHeight||e.scrollWidth!==e.clientWidth),a}function h4(e,t){let n=e;for(h1(n,t)&&(n=n.parentElement);n&&!h1(n,t);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function h2(e,t){let n=[],r=document.scrollingElement||document.documentElement;do h1(e,t)&&n.push(e),e=e.parentElement;while(e&&e!==r);return n}function h3(e,t,n={}){let{block:r="nearest",inline:a="nearest"}=n;if(e===t)return;let o=e.scrollTop,i=e.scrollLeft,s=t.getBoundingClientRect(),l=e.getBoundingClientRect(),u=window.getComputedStyle(t),c=window.getComputedStyle(e),d=document.scrollingElement||document.documentElement,m=e===d?0:l.top,p=e===d?e.clientHeight:l.bottom,f=e===d?0:l.left,h=e===d?e.clientWidth:l.right,g=parseInt(u.scrollMarginTop,10)||0,y=parseInt(u.scrollMarginBottom,10)||0,v=parseInt(u.scrollMarginLeft,10)||0,b=parseInt(u.scrollMarginRight,10)||0,w=parseInt(c.scrollPaddingTop,10)||0,x=parseInt(c.scrollPaddingBottom,10)||0,D=parseInt(c.scrollPaddingLeft,10)||0,E=parseInt(c.scrollPaddingRight,10)||0,_=parseInt(c.borderTopWidth,10)||0,S=parseInt(c.borderBottomWidth,10)||0,k=parseInt(c.borderLeftWidth,10)||0,C=parseInt(c.borderRightWidth,10)||0,P=s.top-g,T=s.bottom+y,R=s.left-v,N=s.right+b,O=e===d?0:k+C,$=e===d?0:_+S,M=e.offsetWidth-e.clientWidth-O,A=e.offsetHeight-e.clientHeight-$,j=m+_+w,I=p-S-x-A,L=f+k+D,F=h-C-E;"rtl"!==c.direction||pn()?F-=M:L+=M;let B=P<j||T>I,V=R<L||N>F;if(B&&"start"===r)o+=P-j;else if(B&&"center"===r)o+=(P+T)/2-(j+I)/2;else if(B&&"end"===r)o+=T-I;else if(B&&"nearest"===r){let e=P-j,t=T-I;o+=Math.abs(e)<=Math.abs(t)?e:t}if(V&&"start"===a)i+=R-L;else if(V&&"center"===a)i+=(R+N)/2-(L+F)/2;else if(V&&"end"===a)i+=N-F;else if(V&&"nearest"===a){let e=R-L,t=N-F;i+=Math.abs(e)<=Math.abs(t)?e:t}e.scrollTo({left:i,top:o})}function h6(e,t={}){let{containingElement:n}=t;if(e&&e.isConnected){let t=document.scrollingElement||document.documentElement;if("hidden"===window.getComputedStyle(t).overflow){let{left:t,top:r}=e.getBoundingClientRect(),a=h2(e,!0);for(let t of a)h3(t,e);let{left:o,top:i}=e.getBoundingClientRect();if(Math.abs(t-o)>1||Math.abs(r-i)>1)for(let e of a=n?h2(n,!0):[])h3(e,n,{block:"center",inline:"center"})}else{let{left:t,top:r}=e.getBoundingClientRect();e?.scrollIntoView?.({block:"nearest"});let{left:a,top:o}=e.getBoundingClientRect();(Math.abs(t-a)>1||Math.abs(r-o)>1)&&(n?.scrollIntoView?.({block:"center",inline:"center"}),e.scrollIntoView?.({block:"nearest"}))}}}let h5=0,h9=new Map;function h8(e){let[t,n]=(0,ll.useState)();return ms(()=>{if(!e)return;let t=h9.get(e);if(t)n(t.element.id);else{let r=`react-aria-description-${h5++}`;n(r);let a=document.createElement("div");a.id=r,a.style.display="none",a.textContent=e,document.body.appendChild(a),t={refCount:0,element:a},h9.set(e,t)}return t.refCount++,()=>{t&&0==--t.refCount&&(t.element.remove(),h9.delete(e))}},[e]),{"aria-describedby":e?t:void 0}}class h7 extends fX{fromJulianDay(e){let t=super.fromJulianDay(e);return new hu(this,fY(t.era,t.year)- -543,t.month,t.day)}toJulianDay(e){return super.toJulianDay(ge(e))}getEras(){return["BE"]}getDaysInMonth(e){return super.getDaysInMonth(ge(e))}balanceDate(){}constructor(...e){super(...e),this.identifier="buddhist"}}function ge(e){let[t,n]=fq(e.year+-543);return new hu(t,n,e.month,e.day)}function gt(e,t,n,r){return e+365*t+Math.floor(t/4)+30*(n-1)+r-1}function gn(e,t){let n=Math.floor(4*(t-e)/1461),r=1+Math.floor((t-gt(e,n,1,1))/30),a=t+1-gt(e,n,r,1);return[n,r,a]}function gr(e){return Math.floor(e%4/3)}function ga(e,t){return t%13!=0?30:gr(e)+5}class go{fromJulianDay(e){let[t,n,r]=gn(1723856,e),a="AM";return t<=0&&(a="AA",t+=5500),new hu(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"AA"===e.era&&(t-=5500),gt(1723856,t,e.month,e.day)}getDaysInMonth(e){return ga(e.year,e.month)}getMonthsInYear(){return 13}getDaysInYear(e){return 365+gr(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(e){return"AA"===e.era?9999:9991}getEras(){return["AA","AM"]}constructor(){this.identifier="ethiopic"}}class gi extends go{fromJulianDay(e){let[t,n,r]=gn(1723856,e);return new hu(this,"AA",t+=5500,n,r)}getEras(){return["AA"]}getYearsInEra(){return 9999}constructor(...e){super(...e),this.identifier="ethioaa"}}class gs extends go{fromJulianDay(e){let[t,n,r]=gn(1824665,e),a="CE";return t<=0&&(a="BCE",t=1-t),new hu(this,a,t,n,r)}toJulianDay(e){let t=e.year;return"BCE"===e.era&&(t=1-t),gt(1824665,t,e.month,e.day)}getDaysInMonth(e){let t=e.year;return"BCE"===e.era&&(t=1-t),ga(t,e.month)}isInverseEra(e){return"BCE"===e.era}balanceDate(e){e.year<=0&&(e.era="BCE"===e.era?"CE":"BCE",e.year=1-e.year)}getEras(){return["BCE","CE"]}getYearsInEra(e){return"BCE"===e.era?9999:9715}constructor(...e){super(...e),this.identifier="coptic"}}let gl=765433;function gu(e){return 7>fK(7*e+1,19)}function gc(e){let t=Math.floor((235*e-234)/19),n=29*t+Math.floor((12084+13753*t)/25920);return 3>fK(3*(n+1),7)&&(n+=1),n}function gd(e){let t,n;return gc(e)+(t=gc(e-1),n=gc(e),gc(e+1)-n==356?2:+(n-t==382))}function gm(e){return gd(e+1)-gd(e)}function gp(e,t){if(t>=6&&!gu(e)&&t++,4===t||7===t||9===t||11===t||13===t)return 29;let n=function(e){let t=gm(e);switch(t>380&&(t-=30),t){case 353:return 0;case 354:return 1;case 355:return 2}}(e);return 2===t?2===n?30:29:3===t?0===n?29:30:6===t?30*!!gu(e):30}class gf{fromJulianDay(e){let t=e-347997,n=Math.floor((25920*t/gl*19+234)/235)+1,r=gd(n),a=Math.floor(t-r);for(;a<1;)a=Math.floor(t-(r=gd(--n)));let o=1,i=0;for(;i<a;)i+=gp(n,o),o++;let s=a-(i-=gp(n,--o));return new hu(this,n,o,s)}toJulianDay(e){let t=gd(e.year);for(let n=1;n<e.month;n++)t+=gp(e.year,n);return t+e.day+347997}getDaysInMonth(e){return gp(e.year,e.month)}getMonthsInYear(e){return gu(e.year)?13:12}getDaysInYear(e){return gm(e.year)}getMaximumMonthsInYear(){return 13}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9999}getEras(){return["AM"]}balanceYearMonth(e,t){t.year!==e.year&&(gu(t.year)&&!gu(e.year)&&t.month>6?e.month--:!gu(t.year)&&gu(e.year)&&t.month>6&&e.month++)}constructor(){this.identifier="hebrew"}}class gh extends fX{fromJulianDay(e){let t,n,r,a=super.fromJulianDay(e),o=a.year-78,i=e-fG(a.era,a.year,1,1);if(i<80?(o--,i+=(t=fZ(a.year-1)?31:30)+155+90+10):(t=fZ(a.year)?31:30,i-=80),i<t)n=1,r=i+1;else{let e=i-t;e<155?(n=Math.floor(e/31)+2,r=e%31+1):(e-=155,n=Math.floor(e/30)+7,r=e%30+1)}return new hu(this,o,n,r)}toJulianDay(e){let t,n,[r,a]=fq(e.year+78);return(fZ(a)?(t=31,n=fG(r,a,3,21)):(t=30,n=fG(r,a,3,22)),1===e.month)?n+e.day-1:(n+=t+31*Math.min(e.month-2,5),e.month>=8&&(n+=(e.month-7)*30),n+=e.day-1)}getDaysInMonth(e){return 1===e.month&&fZ(e.year+78)||e.month>=2&&e.month<=6?31:30}getYearsInEra(){return 9919}getEras(){return["saka"]}balanceDate(){}constructor(...e){super(...e),this.identifier="indian"}}function gg(e,t,n,r){return r+Math.ceil(29.5*(n-1))+(t-1)*354+Math.floor((3+11*t)/30)+e-1}function gy(e,t,n){let r=Math.floor((30*(n-t)+10646)/10631),a=Math.min(12,Math.ceil((n-(29+gg(t,r,1,1)))/29.5)+1),o=n-gg(t,r,a,1)+1;return new hu(e,r,a,o)}function gv(e){return(14+11*e)%30<11}class gb{fromJulianDay(e){return gy(this,1948440,e)}toJulianDay(e){return gg(1948440,e.year,e.month,e.day)}getDaysInMonth(e){let t=29+e.month%2;return 12===e.month&&gv(e.year)&&t++,t}getMonthsInYear(){return 12}getDaysInYear(e){return gv(e.year)?355:354}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 30}getYearsInEra(){return 9665}getEras(){return["AH"]}constructor(){this.identifier="islamic-civil"}}class gw extends gb{fromJulianDay(e){return gy(this,1948439,e)}toJulianDay(e){return gg(1948439,e.year,e.month,e.day)}constructor(...e){super(...e),this.identifier="islamic-tbla"}}function gx(e){return 460322+l[e-1300]}function gD(e,t){return(s[e-1300]&1<<11-(t-1))==0?29:30}function gE(e,t){let n=gx(e);for(let r=1;r<t;r++)n+=gD(e,r);return n}function g_(e){return l[e+1-1300]-l[e-1300]}class gS extends gb{constructor(){if(super(),this.identifier="islamic-umalqura",s||(s=new Uint16Array(Uint8Array.from(atob("qgpUDckO1AbqBmwDrQpVBakGkgepC9QF2gpcBS0NlQZKB1QLagutBa4ETwoXBYsGpQbVCtYCWwmdBE0KJg2VDawFtgm6AlsKKwWVCsoG6Qr0AnYJtgJWCcoKpAvSC9kF3AJtCU0FpQpSC6ULtAW2CVcFlwJLBaMGUgdlC2oFqworBZUMSg2lDcoF1gpXCasESwmlClILagt1BXYCtwhbBFUFqQW0BdoJ3QRuAjYJqgpUDbIN1QXaAlsJqwRVCkkLZAtxC7QFtQpVCiUNkg7JDtQG6QprCasEkwpJDaQNsg25CroEWworBZUKKgtVC1wFvQQ9Ah0JlQpKC1oLbQW2AjsJmwRVBqkGVAdqC2wFrQpVBSkLkgupC9QF2gpaBasKlQVJB2QHqgu1BbYCVgpNDiULUgtqC60FrgIvCZcESwalBqwG1gpdBZ0ETQoWDZUNqgW1BdoCWwmtBJUFygbkBuoK9QS2AlYJqgpUC9IL2QXqAm0JrQSVCkoLpQuyBbUJ1gSXCkcFkwZJB1ULagVrCisFiwpGDaMNygXWCtsEawJLCaUKUgtpC3UFdgG3CFsCKwVlBbQF2gntBG0BtgimClINqQ3UBdoKWwmrBFMGKQdiB6kLsgW1ClUFJQuSDckO0gbpCmsFqwRVCikNVA2qDbUJugQ7CpsETQqqCtUK2gJdCV4ELgqaDFUNsga5BroEXQotBZUKUguoC7QLuQXaAloJSgukDdEO6AZqC20FNQWVBkoNqA3UDdoGWwWdAisGFQtKC5ULqgWuCi4JjwwnBZUGqgbWCl0FnQI="),e=>e.charCodeAt(0)).buffer)),!l){l=new Uint32Array(301);let e=0;for(let t=1300;t<=1600;t++){l[t-1300]=e;for(let n=1;n<=12;n++)e+=gD(t,n)}}}fromJulianDay(e){let t=e-1948440,n=gx(1300),r=gx(1600);if(t<n||t>r)return super.fromJulianDay(e);{let e=1299,n=1,r=1;for(;r>0;){r=t-gx(++e)+1;let a=g_(e);if(r===a){n=12;break}if(r<a){let t=gD(e,n);for(n=1;r>t;)r-=t,t=gD(e,++n);break}}return new hu(this,e,n,t-gE(e,n)+1)}}toJulianDay(e){return e.year<1300||e.year>1600?super.toJulianDay(e):1948440+gE(e.year,e.month)+(e.day-1)}getDaysInMonth(e){return e.year<1300||e.year>1600?super.getDaysInMonth(e):gD(e.year,e.month)}getDaysInYear(e){return e.year<1300||e.year>1600?super.getDaysInYear(e):g_(e.year)}}let gk=[[1868,9,8],[1912,7,30],[1926,12,25],[1989,1,8],[2019,5,1]],gC=[[1912,7,29],[1926,12,24],[1989,1,7],[2019,4,30]],gP=[1867,1911,1925,1988,2018],gT=["meiji","taisho","showa","heisei","reiwa"];function gR(e){let t=gk.findIndex(([t,n,r])=>!!(e.year<t)||e.year===t&&!!(e.month<n)||e.year===t&&e.month===n&&!!(e.day<r));return -1===t?gk.length-1:0===t?0:t-1}function gN(e){let t=gP[gT.indexOf(e.era)];if(!t)throw Error("Unknown era: "+e.era);return new hu(e.year+t,e.month,e.day)}class gO extends fX{fromJulianDay(e){let t=super.fromJulianDay(e),n=gR(t);return new hu(this,gT[n],t.year-gP[n],t.month,t.day)}toJulianDay(e){return super.toJulianDay(gN(e))}balanceDate(e){let t=gN(e),n=gR(t);gT[n]!==e.era&&(e.era=gT[n],e.year=t.year-gP[n]),this.constrainDate(e)}constrainDate(e){let t=gT.indexOf(e.era),n=gC[t];if(null!=n){let[r,a,o]=n,i=r-gP[t];e.year=Math.max(1,Math.min(i,e.year)),e.year===i&&(e.month=Math.min(a,e.month),e.month===a&&(e.day=Math.min(o,e.day)))}if(1===e.year&&t>=0){let[,n,r]=gk[t];e.month=Math.max(n,e.month),e.month===n&&(e.day=Math.max(r,e.day))}}getEras(){return gT}getYearsInEra(e){let t=gT.indexOf(e.era),n=gk[t],r=gk[t+1];if(null==r)return 9999-n[0]+1;let a=r[0]-n[0];return(e.month<r[1]||e.month===r[1]&&e.day<r[2])&&a++,a}getDaysInMonth(e){return super.getDaysInMonth(gN(e))}getMinimumMonthInYear(e){let t=g$(e);return t?t[1]:1}getMinimumDayInMonth(e){let t=g$(e);return t&&e.month===t[1]?t[2]:1}constructor(...e){super(...e),this.identifier="japanese"}}function g$(e){if(1===e.year)return gk[gT.indexOf(e.era)]}let gM=[0,31,62,93,124,155,186,216,246,276,306,336];class gA{fromJulianDay(e){let t=e-1948320,n=1+Math.floor((33*t+3)/12053),r=t-(365*(n-1)+Math.floor((8*n+21)/33)),a=r<216?Math.floor(r/31):Math.floor((r-6)/30),o=r-gM[a]+1;return new hu(this,n,a+1,o)}toJulianDay(e){let t=1948319+365*(e.year-1)+Math.floor((8*e.year+21)/33);return t+=gM[e.month-1],t+=e.day}getMonthsInYear(){return 12}getDaysInMonth(e){return e.month<=6?31:e.month<=11||8>fK(25*e.year+11,33)?30:29}getMaximumMonthsInYear(){return 12}getMaximumDaysInMonth(){return 31}getEras(){return["AP"]}getYearsInEra(){return 9377}constructor(){this.identifier="persian"}}function gj(e){return"minguo"===e.era?e.year+1911:1-e.year+1911}function gI(e){let t=e-1911;return t>0?["minguo",t]:["before_minguo",1-t]}class gL extends fX{fromJulianDay(e){let t=super.fromJulianDay(e),[n,r]=gI(fY(t.era,t.year));return new hu(this,n,r,t.month,t.day)}toJulianDay(e){return super.toJulianDay(gF(e))}getEras(){return["before_minguo","minguo"]}balanceDate(e){let[t,n]=gI(gj(e));e.era=t,e.year=n}isInverseEra(e){return"before_minguo"===e.era}getDaysInMonth(e){return super.getDaysInMonth(gF(e))}getYearsInEra(e){return"before_minguo"===e.era?9999:8088}constructor(...e){super(...e),this.identifier="roc"}}function gF(e){let[t,n]=fq(gj(e));return new hu(t,n,e.month,e.day)}function gB(e){switch(e){case"buddhist":return new h7;case"ethiopic":return new go;case"ethioaa":return new gi;case"coptic":return new gs;case"hebrew":return new gf;case"indian":return new gh;case"islamic-civil":return new gb;case"islamic-tbla":return new gw;case"islamic-umalqura":return new gS;case"japanese":return new gO;case"persian":return new gA;case"roc":return new gL;default:return new fX}}function gV(e,t,n){return null!=t&&0>e.compare(t)||null!=n&&e.compare(n)>0}function gU(e,t,n,r,a){let o={};for(let e in t)o[e]=Math.floor(t[e]/2),o[e]>0&&t[e]%2==0&&o[e]--;let i=gW(e,t,n).subtract(o);return gz(e,i,t,n,r,a)}function gW(e,t,n,r,a){let o=e;if(t.years)o=hj(e.subtract({months:e.month-1}));else t.months?o=hj(e):t.weeks&&(o=hL(e,n));return gz(e,o,t,n,r,a)}function gH(e,t,n,r,a){let o={...t};o.days?o.days--:o.weeks?o.weeks--:o.months?o.months--:o.years&&o.years--;let i=gW(e,t,n).subtract(o);return gz(e,i,t,n,r,a)}function gz(e,t,n,r,a,o){if(a&&e.compare(a)>=0){let e=hW(t,gW(hx(a),n,r));e&&(t=e)}if(o&&0>=e.compare(o)){let e=hU(t,gH(hx(o),n,r));e&&(t=e)}return t}function gK(e,t,n){if(t){let n=hW(e,hx(t));n&&(e=n)}if(n){let t=hU(e,hx(n));t&&(e=t)}return e}function gG(e,t,n){if(!n)return e;for(;e.compare(t)>=0&&n(e);)e=e.subtract({days:1});return e.compare(t)>=0?e:null}let gZ="u">typeof document?lu().useInsertionEffect??lu().useLayoutEffect:()=>{};function gY(e,t,n){let[r,a]=(0,ll.useState)(e||t),o=(0,ll.useRef)(r),i=(0,ll.useRef)(void 0!==e),s=void 0!==e;(0,ll.useEffect)(()=>{i.current,i.current=s},[s]);let l=s?e:r;gZ(()=>{o.current=l});let[,u]=(0,ll.useReducer)(()=>({}),{});return[l,(0,ll.useCallback)((e,...t)=>{let r="function"==typeof e?e(o.current):e;Object.is(o.current,r)||(o.current=r,a(r),u(),n?.(r,...t))},[n])]}function gq(e){let t=(0,ll.useMemo)(()=>new fR(e.locale),[e.locale]),n=(0,ll.useMemo)(()=>t.resolvedOptions(),[t]),{locale:r,createCalendar:a,visibleDuration:o={months:1},minValue:i,maxValue:s,selectionAlignment:l,isDateUnavailable:u,pageBehavior:c="visible",firstDayOfWeek:d}=e,m=(0,ll.useMemo)(()=>a(n.calendar),[a,n.calendar]),[p,f]=gY(e.value,e.defaultValue??null,e.onChange),h=(0,ll.useMemo)(()=>p?hE(hx(p),m):null,[p,m]),g=(0,ll.useMemo)(()=>p&&"timeZone"in p?p.timeZone:n.timeZone,[p,n.timeZone]),[y,v]=gY((0,ll.useMemo)(()=>e.focusedValue?gK(hE(hx(e.focusedValue),m),i,s):void 0,[e.focusedValue,m,i,s]),(0,ll.useMemo)(()=>gK(e.defaultFocusedValue?hE(hx(e.defaultFocusedValue),m):h||hE(hN(g),m),i,s),[e.defaultFocusedValue,h,g,m,i,s]),e.onFocusChange),[b,w]=(0,ll.useState)(()=>{switch(l){case"start":return gW(y,o,r,i,s);case"end":return gH(y,o,r,i,s);default:return gU(y,o,r,i,s)}}),[x,D]=(0,ll.useState)(e.autoFocus||!1),E=(0,ll.useMemo)(()=>{let e={...o};return e.days?e.days--:e.days=-1,b.add(e)},[b,o]),[_,S]=(0,ll.useState)(m);if(!hC(m,_)){let e=hE(y,m);w(gU(e,o,r,i,s)),v(e),S(m)}function k(e){v(e=gK(e,i,s))}function C(t){if(!e.isDisabled&&!e.isReadOnly){let e=t;if(null===e)return void f(null);(e=gG(e=gK(e,i,s),b,u))&&(e=hE(e,p?.calendar||new fX),p&&"hour"in p?f(p.set(e)):f(e))}}gV(y,i,s)?v(gK(y,i,s)):0>y.compare(b)?w(gH(y,o,r,i,s)):y.compare(E)>0&&w(gW(y,o,r,i,s));let P=(0,ll.useMemo)(()=>!!h&&(!!(u&&u(h))||gV(h,i,s)),[h,u,i,s]),T=e.isInvalid||"invalid"===e.validationState||P,R=(0,ll.useMemo)(()=>"visible"===c?o:gJ(o),[c,o]);return{isDisabled:e.isDisabled??!1,isReadOnly:e.isReadOnly??!1,value:h,setValue:C,visibleRange:{start:b,end:E},minValue:i,maxValue:s,focusedDate:y,timeZone:g,validationState:T?"invalid":null,isValueInvalid:T,setFocusedDate(e){k(e)},focusNextDay(){k(y.add({days:1}))},focusPreviousDay(){k(y.subtract({days:1}))},focusNextRow(){o.days?this.focusNextPage():(o.weeks||o.months||o.years)&&k(y.add({weeks:1}))},focusPreviousRow(){o.days?this.focusPreviousPage():(o.weeks||o.months||o.years)&&k(y.subtract({weeks:1}))},focusNextPage(){let e=b.add(R);v(gK(y.add(R),i,s)),w(gW(gz(y,e,R,r,i,s),R,r))},focusPreviousPage(){let e=b.subtract(R);v(gK(y.subtract(R),i,s)),w(gW(gz(y,e,R,r,i,s),R,r))},focusSectionStart(){o.days?k(b):o.weeks?k(hL(y,r)):(o.months||o.years)&&k(hj(y))},focusSectionEnd(){o.days?k(E):o.weeks?k(hL(y,r,void 0).add({days:6})):(o.months||o.years)&&k(hI(y))},focusNextSection(e){e||o.days?o.days?this.focusNextPage():o.weeks?k(y.add({months:1})):(o.months||o.years)&&k(y.add({years:1})):k(y.add(gJ(o)))},focusPreviousSection(e){e||o.days?o.days?this.focusPreviousPage():o.weeks?k(y.subtract({months:1})):(o.months||o.years)&&k(y.subtract({years:1})):k(y.subtract(gJ(o)))},selectFocusedDate(){u&&u(y)||C(y)},selectDate(e){C(e)},isFocused:x,setFocused:D,isInvalid:e=>gV(e,i,s),isSelected(e){return null!=h&&hS(e,h)&&!this.isCellDisabled(e)&&!this.isCellUnavailable(e)},isCellFocused:e=>x&&y&&hS(e,y),isCellDisabled(t){return e.isDisabled||0>t.compare(b)||t.compare(E)>0||this.isInvalid(t)},isCellUnavailable:t=>!!e.isDateUnavailable&&e.isDateUnavailable(t),isPreviousVisibleRangeInvalid(){let e=b.subtract({days:1});return hS(e,b)||this.isInvalid(e)},isNextVisibleRangeInvalid(){let e=E.add({days:1});return hS(e,E)||this.isInvalid(e)},getDatesInWeek(e,t=b){let n=t.add({weeks:e}),a=[],o=hT(n=hL(n,r,d),r,d);for(let e=0;e<o;e++)a.push(null);for(;a.length<7;){a.push(n);let e=n.add({days:1});if(hS(n,e))break;n=e}for(;a.length<7;)a.push(null);return a}}}function gJ(e){let t={...e};for(let n in e)t[n]=1;return t}function gX(e,t){return e&&t?(0>t.compare(e)&&([e,t]=[t,e]),{start:hx(e),end:hx(t)}):null}function gQ(e,t){return(e=hE(e,t?.calendar||new fX),t&&"hour"in t)?t.set(e):e}function g0(e,t,n){let r=e.add({days:n});for(;(n<0?r.compare(t.visibleRange.start)>=0:0>=r.compare(t.visibleRange.end))&&!t.isCellUnavailable(r);)r=r.add({days:n});if(t.isCellUnavailable(r))return r.add({days:-n})}let g1=(0,ll.createContext)(null),g4=(0,ll.createContext)(null),g2=(0,ll.createContext)(null),g3=(0,ll.createContext)(null),g6=(0,ll.forwardRef)(function(e,t){[e,t]=mC(e,t,g1);let{locale:n}=fE(),r=gq({...e,locale:n,createCalendar:gB}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=hJ(e,r),u=mS({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-Calendar"});return lu().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},lu().createElement(m_,{values:[[fo,{slots:{previous:o,next:i}}],[fs,{"aria-hidden":!0,level:2,children:l}],[g2,r],[g1,e],[fl,{slots:{errorMessage:s}}]]},lu().createElement(hQ,null,lu().createElement("h2",null,a["aria-label"])),u.children,lu().createElement(hQ,null,lu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g5=(0,ll.forwardRef)(function(e,t){[e,t]=mC(e,t,g4);let{locale:n}=fE(),r=function(e){let{value:t,defaultValue:n,onChange:r,createCalendar:a,locale:o,visibleDuration:i={months:1},minValue:s,maxValue:l,...u}=e,[c,d]=gY(t,n||null,r),[m,p]=(0,ll.useState)(null),f="center";if(c&&c.start&&c.end){let e=gU(hx(c.start),i,o,s,l).add(i).subtract({days:1});c.end.compare(e)>0&&(f="start")}let h=(0,ll.useRef)(null),[g,y]=(0,ll.useState)(null),v=(0,ll.useMemo)(()=>hW(s,g?.start),[s,g]),b=(0,ll.useMemo)(()=>hU(l,g?.end),[l,g]),w=gq({...u,value:c&&c.start,createCalendar:a,locale:o,visibleDuration:i,minValue:v,maxValue:b,selectionAlignment:e.selectionAlignment||f}),x=t=>{t&&e.isDateUnavailable&&!e.allowsNonContiguousRanges?(h.current={start:g0(t,w,-1),end:g0(t,w,1)},y(h.current)):(h.current=null,y(null))},[D,E]=(0,ll.useState)(w.visibleRange);hk(w.visibleRange.start,D.start)&&hk(w.visibleRange.end,D.end)||(x(m),E(w.visibleRange));let _=e=>{e?(p(e),x(e)):(p(null),x(null))},S=m?gX(m,w.focusedDate):c&&gX(c.start,c.end),k=t=>{if(e.isReadOnly)return;let n=gG(gK(t,v,b),w.visibleRange.start,e.isDateUnavailable);if(n)if(m){let e=gX(m,n);e&&d({start:gQ(e.start,c?.start),end:gQ(e.end,c?.end)}),_(null)}else _(n)},[C,P]=(0,ll.useState)(!1),{isDateUnavailable:T}=e,R=(0,ll.useMemo)(()=>!!c&&!m&&(!!(T&&(T(c.start)||T(c.end)))||gV(c.start,s,l)||gV(c.end,s,l)),[T,c,m,s,l]),N=e.isInvalid||"invalid"===e.validationState||R;return{...w,value:c,setValue:d,anchorDate:m,setAnchorDate:_,highlightedRange:S,validationState:N?"invalid":null,isValueInvalid:N,selectFocusedDate(){k(w.focusedDate)},selectDate:k,highlightDate(e){m&&w.setFocusedDate(e)},isSelected:e=>!!(S&&e.compare(S.start)>=0&&0>=e.compare(S.end)&&!w.isCellDisabled(e)&&!w.isCellUnavailable(e)),isInvalid:e=>w.isInvalid(e)||gV(e,h.current?.start,h.current?.end),isDragging:C,setDragging:P,clearSelection(){_(null),d(null)}}}({...e,locale:n,createCalendar:gB}),{calendarProps:a,prevButtonProps:o,nextButtonProps:i,errorMessageProps:s,title:l}=function(e,t,n){let{commitBehavior:r="select",...a}=e,o=hJ(a,t),i=(0,ll.useRef)(!1),s=(0,ll.useRef)("u">typeof window?window:null);h0(s,"pointerdown",e=>{i.current=0===e.width&&0===e.height});let l={clear:()=>t.clearSelection(),reset:()=>t.setAnchorDate(null),select:()=>t.selectFocusedDate()};return h0(s,"pointerup",e=>{if(i.current){i.current=!1;return}if(t.setDragging(!1),!t.anchorDate)return;let a=e.target;n.current&&mG(n.current)&&(!mz(n.current,a)||!a.closest('button, [role="button"]'))&&l[r]()}),o.calendarProps.onBlur=e=>{n.current&&(e.relatedTarget&&mz(n.current,e.relatedTarget)||!t.anchorDate||l[r]())},h0(n,"touchmove",e=>{t.isDragging&&e.preventDefault()},{passive:!1,capture:!0}),o}(e,r,t),u=mS({...e,values:{state:r,isDisabled:e.isDisabled||!1,isInvalid:r.isValueInvalid},defaultClassName:"react-aria-RangeCalendar"});return lu().createElement("div",{...u,...a,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-invalid":r.isValueInvalid||void 0},lu().createElement(m_,{values:[[fo,{slots:{previous:o,next:i}}],[fs,{"aria-hidden":!0,level:2,children:l}],[g3,r],[g4,e],[fl,{slots:{errorMessage:s}}]]},lu().createElement(hQ,null,lu().createElement("h2",null,a["aria-label"])),u.children,lu().createElement(hQ,null,lu().createElement("button",{"aria-label":i["aria-label"],disabled:i.isDisabled,onClick:()=>r.focusNextPage(),tabIndex:-1}))))}),g9=(0,ll.createContext)(null),g8=(0,ll.forwardRef)(function(e,t){var n,r;let a=(0,ll.useContext)(g2),o=(0,ll.useContext)(g3),i=mk(g1),s=mk(g4),l=null!=a?a:o,u=l.visibleRange.start;e.offset&&(u=u.add(e.offset));let c=null!=(n=null==i?void 0:i.firstDayOfWeek)?n:null==s?void 0:s.firstDayOfWeek,{gridProps:d,headerProps:m,weekDays:p}=function(e,t){let{startDate:n=t.visibleRange.start,endDate:r=t.visibleRange.end,firstDayOfWeek:a}=e,{direction:o}=fE(),i=hG(n,r,t.timeZone,!0),{ariaLabel:s,ariaLabelledBy:l}=hz.get(t),u=hY({"aria-label":[s,i].filter(Boolean).join(", "),"aria-labelledby":l}),c=fA({weekday:e.weekdayStyle||"narrow",timeZone:t.timeZone}),{locale:d}=fE(),m=(0,ll.useMemo)(()=>{let e=hL(hN(t.timeZone),d,a);return[...Array(7).keys()].map(n=>{let r=e.add({days:n}).toDate(t.timeZone);return c.format(r)})},[d,t.timeZone,c,a]),p=hV(n,d,a);return{gridProps:mD(u,{role:"grid","aria-readonly":t.isReadOnly||void 0,"aria-disabled":t.isDisabled||void 0,"aria-multiselectable":"highlightedRange"in t||void 0,onKeyDown:e=>{switch(e.key){case"Enter":case" ":e.preventDefault(),t.selectFocusedDate();break;case"PageUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousSection(e.shiftKey);break;case"PageDown":e.preventDefault(),e.stopPropagation(),t.focusNextSection(e.shiftKey);break;case"End":e.preventDefault(),e.stopPropagation(),t.focusSectionEnd();break;case"Home":e.preventDefault(),e.stopPropagation(),t.focusSectionStart();break;case"ArrowLeft":e.preventDefault(),e.stopPropagation(),"rtl"===o?t.focusNextDay():t.focusPreviousDay();break;case"ArrowUp":e.preventDefault(),e.stopPropagation(),t.focusPreviousRow();break;case"ArrowRight":e.preventDefault(),e.stopPropagation(),"rtl"===o?t.focusPreviousDay():t.focusNextDay();break;case"ArrowDown":e.preventDefault(),e.stopPropagation(),t.focusNextRow();break;case"Escape":"setAnchorDate"in t&&(e.preventDefault(),t.setAnchorDate(null))}},onFocus:()=>t.setFocused(!0),onBlur:()=>t.setFocused(!1)}),headerProps:{"aria-hidden":!0},weekDays:m,weeksInMonth:p}}({startDate:u,endDate:hI(u),weekdayStyle:e.weekdayStyle,firstDayOfWeek:c},l);return lu().createElement(g9.Provider,{value:{headerProps:m,weekDays:p,startDate:u,firstDayOfWeek:c}},lu().createElement("table",{...mB(e),...d,ref:t,style:e.style,className:null!=(r=e.className)?r:"react-aria-CalendarGrid"},"function"!=typeof e.children?e.children:lu().createElement(lu().Fragment,null,lu().createElement(g7,null,e=>lu().createElement(ye,null,e)),lu().createElement(yt,null,e.children))))}),g7=(0,ll.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,{headerProps:o,weekDays:i}=(0,ll.useContext)(g9);return lu().createElement("thead",{...mB(e),...o,ref:t,style:r,className:a||"react-aria-CalendarGridHeader"},lu().createElement("tr",null,i.map((e,t)=>lu().cloneElement(n(e),{key:t}))))}),ye=(0,ll.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e;return lu().createElement("th",{...mB(e),ref:t,style:r,className:a||"react-aria-CalendarHeaderCell"},n)}),yt=(0,ll.forwardRef)(function(e,t){let{children:n,style:r,className:a}=e,o=(0,ll.useContext)(g2),i=(0,ll.useContext)(g3),s=null!=o?o:i,{startDate:l,firstDayOfWeek:u}=(0,ll.useContext)(g9),{locale:c}=fE(),d=hV(l,c,u);return lu().createElement("tbody",{...mB(e),ref:t,style:r,className:a||"react-aria-CalendarGridBody"},[...Array(d).keys()].map(e=>lu().createElement("tr",{key:e},s.getDatesInWeek(e,l).map((e,t)=>e?lu().cloneElement(n(e),{key:t}):lu().createElement("td",{key:t})))))}),yn=(0,ll.forwardRef)(function({date:e,...t},n){var r,a,o;let i=(0,ll.useContext)(g2),s=(0,ll.useContext)(g3),l=null!=i?i:s,{startDate:u}=null!=(r=(0,ll.useContext)(g9))?r:{startDate:l.visibleRange.start},c=(0,ll.useRef)(null),{cellProps:d,buttonProps:m,...p}=function(e,t,n){var r;let a,{date:o,isDisabled:i}=e,{errorMessageId:s,selectedDateDescription:l}=hz.get(t),u=fz((r=fC)&&r.__esModule?r.default:r,"@react-aria/calendar"),c=fA({weekday:"long",day:"numeric",month:"long",year:"numeric",era:hK(o),timeZone:t.timeZone}),d=t.isSelected(o),m=t.isCellFocused(o)&&!e.isOutsideMonth;i=i||t.isCellDisabled(o);let p=t.isCellUnavailable(o),f=!i&&!p,h=t.isValueInvalid&&!!("highlightedRange"in t?!t.anchorDate&&t.highlightedRange&&o.compare(t.highlightedRange.start)>=0&&0>=o.compare(t.highlightedRange.end):t.value&&hS(t.value,o));h&&(d=!0),o=fP(o,hk);let g=(0,ll.useMemo)(()=>o.toDate(t.timeZone),[o,t.timeZone]),y=hS(o,hN(t.timeZone)),v=(0,ll.useMemo)(()=>{let e="";return"highlightedRange"in t&&t.value&&!t.anchorDate&&(hS(o,t.value.start)||hS(o,t.value.end))&&(e=l+", "),e+=c.format(g),y?e=u.format(d?"todayDateSelected":"todayDate",{date:e}):d&&(e=u.format("dateSelected",{date:e})),t.minValue&&hS(o,t.minValue)?e+=", "+u.format("minimumDate"):t.maxValue&&hS(o,t.maxValue)&&(e+=", "+u.format("maximumDate")),e},[c,g,u,d,y,o,t,l]),b="";"anchorDate"in t&&m&&!t.isReadOnly&&f&&(b=t.anchorDate?u.format("finishRangeSelectionPrompt"):u.format("startRangeSelectionPrompt"));let w=h8(b),x=(0,ll.useRef)(!1),D=(0,ll.useRef)(!1),E=(0,ll.useRef)(void 0),{pressProps:_,isPressed:S}=pX({shouldCancelOnPointerExit:"anchorDate"in t&&!!t.anchorDate,preventFocusOnPress:!0,isDisabled:!f||t.isReadOnly,onPressStart(e){if(t.isReadOnly){t.setFocusedDate(o),t.setFocused(!0);return}if("highlightedRange"in t&&!t.anchorDate&&("mouse"===e.pointerType||"touch"===e.pointerType)){if(t.highlightedRange&&!h){if(hS(o,t.highlightedRange.start)){t.setAnchorDate(t.highlightedRange.end),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}else if(hS(o,t.highlightedRange.end)){t.setAnchorDate(t.highlightedRange.start),t.setFocusedDate(o),t.setFocused(!0),t.setDragging(!0),D.current=!0;return}}let n=()=>{t.setDragging(!0),E.current=void 0,t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0),x.current=!0};"touch"===e.pointerType?E.current=setTimeout(n,200):n()}},onPressEnd(){D.current=!1,x.current=!1,clearTimeout(E.current),E.current=void 0},onPress(){"anchorDate"in t||t.isReadOnly||(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0))},onPressUp(e){if(!t.isReadOnly&&("anchorDate"in t&&E.current&&(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0)),"anchorDate"in t))if(D.current)t.setAnchorDate(o);else if(t.anchorDate&&!x.current)t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0);else if("keyboard"!==e.pointerType||t.anchorDate)"virtual"===e.pointerType&&(t.selectDate(o),t.setFocusedDate(o),t.setFocused(!0));else{t.selectDate(o);let e=o.add({days:1});t.isInvalid(e)&&(e=o.subtract({days:1})),t.isInvalid(e)||(t.setFocusedDate(e),t.setFocused(!0))}}});i||(a=hS(o,t.focusedDate)?0:-1),(0,ll.useEffect)(()=>{m&&n.current&&(mV(n.current),"pointer"!==pu&&((e=document)=>e.activeElement)()===n.current&&h6(n.current,{containingElement:h4(n.current)}))},[m,n]);let k=fA({day:"numeric",timeZone:t.timeZone,calendar:o.calendar.identifier}),C=(0,ll.useMemo)(()=>k.formatToParts(g).find(e=>"day"===e.type).value,[k,g]);return{cellProps:{role:"gridcell","aria-disabled":!f||void 0,"aria-selected":d||void 0,"aria-invalid":h||void 0},buttonProps:mD(_,{onFocus(){i||(t.setFocusedDate(o),t.setFocused(!0))},tabIndex:a,role:"button","aria-disabled":!f||void 0,"aria-label":v,"aria-invalid":h||void 0,"aria-describedby":[h?s:void 0,w["aria-describedby"]].filter(Boolean).join(" ")||void 0,onPointerEnter(e){"highlightDate"in t&&("touch"!==e.pointerType||t.isDragging)&&f&&t.highlightDate(o)},onPointerDown(e){let t=mK(e);t instanceof HTMLElement&&"releasePointerCapture"in t&&("hasPointerCapture"in t?t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId):t.releasePointerCapture(e.pointerId))},onContextMenu(e){e.preventDefault()}}),isPressed:S,isFocused:m,isSelected:d,isDisabled:i,isUnavailable:p,isOutsideVisibleRange:0>o.compare(t.visibleRange.start)||o.compare(t.visibleRange.end)>0,isInvalid:h,formattedDate:C}}({date:e},l,c),{hoverProps:f,isHovered:h}=ft({...t,isDisabled:p.isDisabled}),{focusProps:g,isFocusVisible:y}=p5();y&&(y=p.isFocused);let v=(a=u,o=hE(o=e,a.calendar),a=hj(a),o=hj(o),a.era!==o.era||a.year!==o.year||a.month!==o.month),b=!1,w=!1;"highlightedRange"in l&&l.highlightedRange&&(b=hS(e,l.highlightedRange.start),w=hS(e,l.highlightedRange.end));let x=mS({...t,defaultChildren:p.formattedDate,defaultClassName:"react-aria-CalendarCell",values:{date:e,isHovered:h,isOutsideMonth:v,isFocusVisible:y,isSelectionStart:b,isSelectionEnd:w,...p}}),D={"data-focused":p.isFocused||void 0,"data-hovered":h||void 0,"data-pressed":p.isPressed||void 0,"data-unavailable":p.isUnavailable||void 0,"data-disabled":p.isDisabled||void 0,"data-focus-visible":y||void 0,"data-outside-visible-range":p.isOutsideVisibleRange||void 0,"data-outside-month":v||void 0,"data-selected":p.isSelected||void 0,"data-selection-start":b||void 0,"data-selection-end":w||void 0,"data-invalid":p.isInvalid||void 0};return lu().createElement("td",{...d,ref:n},lu().createElement("div",{...mD(mB(t),m,g,f,D,x),ref:c}))}),yr=(0,ll.createContext)({}),ya=(0,ll.forwardRef)(function(e,t){var n,r;[e,t]=mC(e,t,yr);let{isDisabled:a,isInvalid:o,onHoverStart:i,onHoverChange:s,onHoverEnd:l,...u}=e,{hoverProps:c,isHovered:d}=ft({onHoverStart:i,onHoverChange:s,onHoverEnd:l,isDisabled:a}),{isFocused:m,isFocusVisible:p,focusProps:f}=p5({within:!0});null!=a||(a=!!e["aria-disabled"]&&"false"!==e["aria-disabled"]),null!=o||(o=!!e["aria-invalid"]&&"false"!==e["aria-invalid"]);let h=mS({...e,values:{isHovered:d,isFocusWithin:m,isFocusVisible:p,isDisabled:a,isInvalid:o},defaultClassName:"react-aria-Group"});return lu().createElement("div",{...mD(u,f,c),...h,ref:t,role:null!=(n=e.role)?n:"group",slot:null!=(r=e.slot)?r:void 0,"data-focus-within":m||void 0,"data-hovered":d||void 0,"data-focus-visible":p||void 0,"data-disabled":a||void 0,"data-invalid":o||void 0},h.children)}),yo=(0,ll.createContext)({}),yi=fr(function(e,t){[e,t]=mC(e,t,yo);let{hoverProps:n,isHovered:r}=ft(e),{isFocused:a,isFocusVisible:o,focusProps:i}=p5({isTextInput:!0,autoFocus:e.autoFocus}),s=!!e["aria-invalid"]&&"false"!==e["aria-invalid"],l=mS({...e,values:{isHovered:r,isFocused:a,isFocusVisible:o,isDisabled:e.disabled||!1,isInvalid:s},defaultClassName:"react-aria-Input"});return lu().createElement("input",{...mD((e=>{let{onHoverStart:t,onHoverChange:n,onHoverEnd:r,...a}=e;return a})(e),i,n),...l,ref:t,"data-focused":a||void 0,"data-disabled":e.disabled||void 0,"data-hovered":r||void 0,"data-focus-visible":o||void 0,"data-invalid":s||void 0})});function ys(e,t,n,r){return e.createTreeWalker(t,n,r)}let yl=lu().createContext(null),yu="react-aria-focus-scope-restore",yc=null;function yd(e){var t,n,r,a,o,i,s,l,u,c;let d,m,p,f,{children:h,contain:g,restoreFocus:y,autoFocus:v}=e,b=(0,ll.useRef)(null),w=(0,ll.useRef)(null),x=(0,ll.useRef)([]),{parentNode:D}=(0,ll.useContext)(yl)||{},E=(0,ll.useMemo)(()=>new yk({scopeRef:x}),[x]);ms(()=>{let e=D||yC.root;if(yC.getTreeNode(e.scopeRef)&&yc&&!yg(yc,e.scopeRef)){let t=yC.getTreeNode(yc);t&&(e=t)}e.addChild(E),yC.addNode(E)},[E,D]),ms(()=>{let e=yC.getTreeNode(x);e&&(e.contain=!!g)},[g]),ms(()=>{let e=b.current?.nextSibling,t=[],n=e=>e.stopPropagation();for(;e&&e!==w.current;)t.push(e),e.addEventListener(yu,n),e=e.nextSibling;return x.current=t,()=>{for(let e of t)e.removeEventListener(yu,n)}},[h]),ms(()=>{if(n||r)return;let e=t.current,a=mW(e?e[0]:void 0),o=e=>{let n=mK(e);yf(n,t.current)?yc=t:yh(n)||(yc=null)};return a.addEventListener("focusin",o,!1),e?.forEach(e=>e.addEventListener("focusin",o,!1)),()=>{a.removeEventListener("focusin",o,!1),e?.forEach(e=>e.removeEventListener("focusin",o,!1))}},[t=x,n=y,r=g]),a=x,o=g,d=(0,ll.useRef)(void 0),m=(0,ll.useRef)(void 0),ms(()=>{let e=a.current;if(!o){m.current&&(cancelAnimationFrame(m.current),m.current=void 0);return}let t=mW(e?e[0]:void 0),n=e=>{if("Tab"!==e.key||e.altKey||e.ctrlKey||e.metaKey||!yp(a)||e.isComposing)return;let n=((e=document)=>e.activeElement)(t),r=a.current;if(!r||!yf(n,r))return;let o=yD(ym(r),{tabbable:!0},r);if(!n)return;o.currentNode=n;let i=e.shiftKey?o.previousNode():o.nextNode();i||(o.currentNode=e.shiftKey?r[r.length-1].nextElementSibling:r[0].previousElementSibling,i=e.shiftKey?o.previousNode():o.nextNode()),e.preventDefault(),i&&(yy(i,!0),i instanceof mH(i).HTMLInputElement&&i.select())},r=e=>{(!yc||yg(yc,a))&&yf(mK(e),a.current)?(yc=a,d.current=mK(e)):yp(a)&&!yh(mK(e),a)?d.current?d.current.focus():yc&&yc.current&&yb(yc.current):yp(a)&&(d.current=mK(e))},i=e=>{m.current&&cancelAnimationFrame(m.current),m.current=requestAnimationFrame(()=>{let n=pu,r=("virtual"===n||null===n)&&po()&&pa(),o=((e=document)=>e.activeElement)(t);if(!r&&o&&yp(a)&&!yh(o,a)){yc=a;let t=mK(e);t&&t.isConnected?(d.current=t,d.current?.focus()):yc.current&&yb(yc.current)}})};return t.addEventListener("keydown",n,!1),t.addEventListener("focusin",r,!1),e?.forEach(e=>e.addEventListener("focusin",r,!1)),e?.forEach(e=>e.addEventListener("focusout",i,!1)),()=>{t.removeEventListener("keydown",n,!1),t.removeEventListener("focusin",r,!1),e?.forEach(e=>e.removeEventListener("focusin",r,!1)),e?.forEach(e=>e.removeEventListener("focusout",i,!1))}},[a,o]),ms(()=>()=>{m.current&&cancelAnimationFrame(m.current)},[m]),i=x,s=y,l=g,p=(0,ll.useRef)("u">typeof document?((e=document)=>e.activeElement)(mW(i.current?i.current[0]:void 0)):null),ms(()=>{let e=i.current,t=mW(e?e[0]:void 0);if(!s||l)return;let n=()=>{(!yc||yg(yc,i))&&yf(((e=document)=>e.activeElement)(t),i.current)&&(yc=i)};return t.addEventListener("focusin",n,!1),e?.forEach(e=>e.addEventListener("focusin",n,!1)),()=>{t.removeEventListener("focusin",n,!1),e?.forEach(e=>e.removeEventListener("focusin",n,!1))}},[i,l]),ms(()=>{let e=mW(i.current?i.current[0]:void 0);if(!s)return;let t=t=>{if("Tab"!==t.key||t.altKey||t.ctrlKey||t.metaKey||!yp(i)||t.isComposing)return;let n=e.activeElement;if(!yh(n,i)||!yw(i))return;let r=yC.getTreeNode(i);if(!r)return;let a=r.nodeToRestore,o=yD(e.body,{tabbable:!0});o.currentNode=n;let s=t.shiftKey?o.previousNode():o.nextNode();if(a&&a.isConnected&&a!==e.body||(a=void 0,r.nodeToRestore=void 0),(!s||!yh(s,i))&&a){o.currentNode=a;do s=t.shiftKey?o.previousNode():o.nextNode();while(yh(s,i));(t.preventDefault(),t.stopPropagation(),s)?yy(s,!0):yh(a)?yy(a,!0):n.blur()}};return l||e.addEventListener("keydown",t,!0),()=>{l||e.removeEventListener("keydown",t,!0)}},[i,s,l]),ms(()=>{let e=mW(i.current?i.current[0]:void 0);if(!s)return;let t=yC.getTreeNode(i);if(t)return t.nodeToRestore=p.current??void 0,()=>{let t=yC.getTreeNode(i);if(!t)return;let n=t.nodeToRestore,r=((e=document)=>e.activeElement)(e);if(s&&n&&(r&&yh(r,i)||r===e.body&&yw(i))){let t=yC.clone();requestAnimationFrame(()=>{if(e.activeElement===e.body){let e=t.getTreeNode(i);for(;e;){if(e.nodeToRestore&&e.nodeToRestore.isConnected)return void yx(e.nodeToRestore);e=e.parent}for(e=t.getTreeNode(i);e;){if(e.scopeRef&&e.scopeRef.current&&yC.getTreeNode(e.scopeRef))return void yx(yv(e.scopeRef.current,!0));e=e.parent}}})}}},[i,s]),u=x,c=v,f=lu().useRef(c),(0,ll.useEffect)(()=>{f.current&&(yc=u,!yf(((e=document)=>e.activeElement)(mW(u.current?u.current[0]:void 0)),yc.current)&&u.current&&yb(u.current)),f.current=!1},[u]),(0,ll.useEffect)(()=>{let e=((e=document)=>e.activeElement)(mW(x.current?x.current[0]:void 0)),t=null;if(yf(e,x.current)){for(let n of yC.traverse())n.scopeRef&&yf(e,n.scopeRef.current)&&(t=n);t===yC.getTreeNode(x)&&(yc=t.scopeRef)}},[x]),ms(()=>()=>{let e=yC.getTreeNode(x)?.parent?.scopeRef??null;(x===yc||yg(x,yc))&&(!e||yC.getTreeNode(e))&&(yc=e),yC.removeTreeNode(x)},[x]);let _=(0,ll.useMemo)(()=>{var e;return e=x,{focusNext(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mW(n[0]??void 0)),l=n[0].previousElementSibling,u=yD(ym(n),{tabbable:a,accept:i},n);u.currentNode=yf(s,n)?s:l;let c=u.nextNode();return!c&&o&&(u.currentNode=l,c=u.nextNode()),c&&yy(c,!0),c},focusPrevious(t={}){let n=e.current,{from:r,tabbable:a,wrap:o,accept:i}=t,s=r||((e=document)=>e.activeElement)(mW(n[0]??void 0)),l=n[n.length-1].nextElementSibling,u=yD(ym(n),{tabbable:a,accept:i},n);u.currentNode=yf(s,n)?s:l;let c=u.previousNode();return!c&&o&&(u.currentNode=l,c=u.previousNode()),c&&yy(c,!0),c},focusFirst(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yD(ym(n),{tabbable:r,accept:a},n);o.currentNode=n[0].previousElementSibling;let i=o.nextNode();return i&&yy(i,!0),i},focusLast(t={}){let n=e.current,{tabbable:r,accept:a}=t,o=yD(ym(n),{tabbable:r,accept:a},n);o.currentNode=n[n.length-1].nextElementSibling;let i=o.previousNode();return i&&yy(i,!0),i}}},[]),S=(0,ll.useMemo)(()=>({focusManager:_,parentNode:E}),[E,_]);return lu().createElement(yl.Provider,{value:S},lu().createElement("span",{"data-focus-scope-start":!0,hidden:!0,ref:b}),h,lu().createElement("span",{"data-focus-scope-end":!0,hidden:!0,ref:w}))}function ym(e){return e[0].parentElement}function yp(e){let t=yC.getTreeNode(yc);for(;t&&t.scopeRef!==e;){if(t.contain)return!1;t=t.parent}return!0}function yf(e,t){return!!e&&!!t&&t.some(t=>mz(t,e))}function yh(e,t=null){if(e instanceof Element&&e.closest("[data-react-aria-top-layer]"))return!0;for(let{scopeRef:n}of yC.traverse(yC.getTreeNode(t)))if(n&&yf(e,n.current))return!0;return!1}function yg(e,t){let n=yC.getTreeNode(t)?.parent;for(;n;){if(n.scopeRef===e)return!0;n=n.parent}return!1}function yy(e,t=!1){if(null==e||t){if(null!=e)try{e.focus()}catch{}}else try{pT(e)}catch{}}function yv(e,t=!0){let n=e[0].previousElementSibling,r=ym(e),a=yD(r,{tabbable:t},e);a.currentNode=n;let o=a.nextNode();return t&&!o&&((a=yD(r=ym(e),{tabbable:!1},e)).currentNode=n,o=a.nextNode()),o}function yb(e,t=!0){yy(yv(e,t))}function yw(e){let t=yC.getTreeNode(yc);for(;t&&t.scopeRef!==e;){if(t.nodeToRestore)return!1;t=t.parent}return t?.scopeRef===e}function yx(e){e.dispatchEvent(new CustomEvent(yu,{bubbles:!0,cancelable:!0}))&&yy(e)}function yD(e,t,n){let r=t?.tabbable?m0:mQ,a=mW(e?.nodeType===Node.ELEMENT_NODE?e:null),o=ys(a,e||a,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>mz(t?.from,e)||t?.tabbable&&"INPUT"===e.tagName&&"radio"===e.getAttribute("type")&&(!function(e){if(e.checked)return!0;let t=function(e){if(!e.form)return Array.from(mW(e).querySelectorAll(`input[type="radio"][name="${CSS.escape(e.name)}"]`)).filter(e=>!e.form);let t=e.form.elements.namedItem(e.name),n=mH(e);return t instanceof n.RadioNodeList?Array.from(t).filter(e=>e instanceof n.HTMLInputElement):t instanceof n.HTMLInputElement?[t]:[]}(e);return t.length>0&&!t.some(e=>e.checked)}(e)||"INPUT"===o.currentNode.tagName&&"radio"===o.currentNode.type&&o.currentNode.name===e.name)?NodeFilter.FILTER_REJECT:r(e)&&(!n||yf(e,n))&&(!t?.accept||t.accept(e))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});return t?.from&&(o.currentNode=t.from),o}function yE(e,t={}){return{focusNext(n={}){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(mW(r)),u=yD(r,{tabbable:o,accept:s});mz(r,l)&&(u.currentNode=l);let c=u.nextNode();return!c&&i&&(u.currentNode=r,c=u.nextNode()),c&&yy(c,!0),c},focusPrevious(n=t){let r=e.current;if(!r)return null;let{from:a,tabbable:o=t.tabbable,wrap:i=t.wrap,accept:s=t.accept}=n,l=a||((e=document)=>e.activeElement)(mW(r)),u=yD(r,{tabbable:o,accept:s});if(mz(r,l))u.currentNode=l;else{let e=y_(u);return e&&yy(e,!0),e??null}let c=u.previousNode();if(!c&&i){u.currentNode=r;let e=y_(u);if(!e)return null;c=e}return c&&yy(c,!0),c??null},focusFirst(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=yD(r,{tabbable:a,accept:o}).nextNode();return i&&yy(i,!0),i},focusLast(n=t){let r=e.current;if(!r)return null;let{tabbable:a=t.tabbable,accept:o=t.accept}=n,i=y_(yD(r,{tabbable:a,accept:o}));return i&&yy(i,!0),i??null}}}function y_(e){let t,n;do(t=e.lastChild())&&(n=t);while(t);return n}class yS{constructor(){this.fastMap=new Map,this.root=new yk({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,t,n){let r=this.fastMap.get(t??null);if(!r)return;let a=new yk({scopeRef:e});r.addChild(a),a.parent=r,this.fastMap.set(e,a),n&&(a.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(null===e)return;let t=this.fastMap.get(e);if(!t)return;let n=t.parent;for(let e of this.traverse())e!==t&&t.nodeToRestore&&e.nodeToRestore&&t.scopeRef&&t.scopeRef.current&&yf(e.nodeToRestore,t.scopeRef.current)&&(e.nodeToRestore=t.nodeToRestore);let r=t.children;n&&(n.removeChild(t),r.size>0&&r.forEach(e=>n&&n.addChild(e))),this.fastMap.delete(t.scopeRef)}*traverse(e=this.root){if(null!=e.scopeRef&&(yield e),e.children.size>0)for(let t of e.children)yield*this.traverse(t)}clone(){let e=new yS;for(let t of this.traverse())e.addTreeNode(t.scopeRef,t.parent?.scopeRef??null,t.nodeToRestore);return e}}class yk{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}let yC=new yS;var yP={};function yT(e,t,n){let{direction:r}=fE(),a=(0,ll.useMemo)(()=>yE(t),[t]),o=()=>{if(!t.current)return;let e=window.event?mK(window.event):null,n=yD(t.current,{tabbable:!0});if(e&&(n.currentNode=e,e=n.previousNode()),!e){let t;do(t=n.lastChild())&&(e=t);while(t)}for(;e?.hasAttribute("data-placeholder");){let t=n.previousNode();if(t&&t.hasAttribute("data-placeholder"))e=t;else break}e&&e.focus()},{pressProps:i}=pX({preventFocusOnPress:!0,allowTextSelectionOnPress:!0,onPressStart(e){"mouse"===e.pointerType&&o()},onPress(e){("touch"===e.pointerType||"pen"===e.pointerType)&&o()}});return mD(i,{onKeyDown:o=>{if(mz(o.currentTarget,mK(o))&&(o.altKey&&("ArrowDown"===o.key||"ArrowUp"===o.key)&&"setOpen"in e&&(o.preventDefault(),o.stopPropagation(),e.setOpen(!0)),!n))switch(o.key){case"ArrowLeft":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=mK(o),n=yR(t.current,e.getBoundingClientRect().left,-1);n&&n.focus()}}else a.focusPrevious();break;case"ArrowRight":if(o.preventDefault(),o.stopPropagation(),"rtl"===r){if(t.current){let e=mK(o),n=yR(t.current,e.getBoundingClientRect().left,1);n&&n.focus()}}else a.focusNext()}}})}function yR(e,t,n){let r=yD(e,{tabbable:!0}),a=r.nextNode(),o=null,i=1/0;for(;a;){let e=a.getBoundingClientRect().left-t,s=Math.abs(e);Math.sign(e)===n&&s<i&&(o=a,i=s),a=r.nextNode()}return o}function yN(e){let{description:t,errorMessage:n,isInvalid:r,validationState:a}=e,{labelProps:o,fieldProps:i}=function(e){let{id:t,label:n,"aria-labelledby":r,"aria-label":a,labelElementType:o="label"}=e;t=mb(t);let i=mb(),s={};return n&&(r=r?`${i} ${r}`:i,s={id:i,htmlFor:"label"===o?t:void 0}),{labelProps:s,fieldProps:hY({id:t,"aria-label":a,"aria-labelledby":r})}}(e),s=mw([!!t,!!n,r,a]),l=mw([!!t,!!n,r,a]);return{labelProps:o,fieldProps:i=mD(i,{"aria-describedby":[s,l,e["aria-describedby"]].filter(Boolean).join(" ")||void 0}),descriptionProps:{id:s},errorMessageProps:{id:l}}}function yO(e,t,n){let r=pH(e=>{n&&!e.defaultPrevented&&n(t)});(0,ll.useEffect)(()=>{let t=e?.current?.form;return t?.addEventListener("reset",r),()=>{t?.removeEventListener("reset",r)}},[e])}function y$(e,t,n){let{validationBehavior:r,focus:a}=e;ms(()=>{if("native"===r&&n?.current&&!n.current.disabled){var e;let r,a=t.realtimeValidation.isInvalid?t.realtimeValidation.validationErrors.join(" ")||"Invalid value.":"";n.current.setCustomValidity(a),n.current.hasAttribute("title")||(n.current.title=""),t.realtimeValidation.isInvalid||t.updateValidation({isInvalid:!(e=n.current).validity.valid,validationDetails:{badInput:(r=e.validity).badInput,customError:r.customError,patternMismatch:r.patternMismatch,rangeOverflow:r.rangeOverflow,rangeUnderflow:r.rangeUnderflow,stepMismatch:r.stepMismatch,tooLong:r.tooLong,tooShort:r.tooShort,typeMismatch:r.typeMismatch,valueMissing:r.valueMissing,valid:r.valid},validationErrors:e.validationMessage?[e.validationMessage]:[]})}});let o=(0,ll.useRef)(!1),i=pH(()=>{o.current||t.resetValidation()}),s=pH(e=>{t.displayValidation.isInvalid||t.commitValidation();let r=n?.current?.form;!e.defaultPrevented&&n&&r&&function(e){for(let t=0;t<e.elements.length;t++){let n=e.elements[t];if(n.validity?.valid===!1)return n}return null}(r)===n.current&&(a?a():n.current?.focus(),pu="keyboard",ph("keyboard",null));e.preventDefault()}),l=pH(()=>{t.commitValidation()});(0,ll.useEffect)(()=>{let e=n?.current;if(!e)return;let t=e.form,r=t?.reset;return t&&(t.reset=()=>{o.current=!window.event||"message"===window.event.type&&mK(window.event)instanceof MessagePort,r?.call(t),o.current=!1}),e.addEventListener("invalid",s),e.addEventListener("change",l),t?.addEventListener("reset",i),()=>{e.removeEventListener("invalid",s),e.removeEventListener("change",l),t?.removeEventListener("reset",i),t&&(t.reset=r)}},[n,r])}yP={"ar-AE":{calendar:"التقويم",day:"يوم",dayPeriod:"ص/م",endDate:"تاريخ الانتهاء",era:"العصر",hour:"الساعات",minute:"الدقائق",month:"الشهر",second:"الثواني",selectedDateDescription:e=>`\u{62A}\u{627}\u{631}\u{64A}\u{62E} \u{645}\u{62D}\u{62F}\u{62F}: ${e.date}`,selectedRangeDescription:e=>`\u{627}\u{644}\u{645}\u{62F}\u{649} \u{627}\u{644}\u{632}\u{645}\u{646}\u{64A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.startDate} \u{625}\u{644}\u{649} ${e.endDate}`,selectedTimeDescription:e=>`\u{627}\u{644}\u{648}\u{642}\u{62A} \u{627}\u{644}\u{645}\u{62D}\u{62F}\u{62F}: ${e.time}`,startDate:"تاريخ البدء",timeZoneName:"التوقيت",weekday:"اليوم",year:"السنة"},"bg-BG":{calendar:"Календар",day:"ден",dayPeriod:"пр.об./сл.об.",endDate:"Крайна дата",era:"ера",hour:"час",minute:"минута",month:"месец",second:"секунда",selectedDateDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{434}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{418}\u{437}\u{431}\u{440}\u{430}\u{43D}\u{43E} \u{432}\u{440}\u{435}\u{43C}\u{435}: ${e.time}`,startDate:"Начална дата",timeZoneName:"часова зона",weekday:"ден от седмицата",year:"година"},"cs-CZ":{calendar:"Kalend\xe1ř",day:"den",dayPeriod:"č\xe1st dne",endDate:"Konečn\xe9 datum",era:"letopočet",hour:"hodina",minute:"minuta",month:"měs\xedc",second:"sekunda",selectedDateDescription:e=>`Vybran\xe9 datum: ${e.date}`,selectedRangeDescription:e=>`Vybran\xe9 obdob\xed: ${e.startDate} a\u{17E} ${e.endDate}`,selectedTimeDescription:e=>`Vybran\xfd \u{10D}as: ${e.time}`,startDate:"Poč\xe1tečn\xed datum",timeZoneName:"časov\xe9 p\xe1smo",weekday:"den v t\xfddnu",year:"rok"},"da-DK":{calendar:"Kalender",day:"dag",dayPeriod:"AM/PM",endDate:"Slutdato",era:"\xe6ra",hour:"time",minute:"minut",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt interval: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tidspunkt: ${e.time}`,startDate:"Startdato",timeZoneName:"tidszone",weekday:"ugedag",year:"\xe5r"},"de-DE":{calendar:"Kalender",day:"Tag",dayPeriod:"Tagesh\xe4lfte",endDate:"Enddatum",era:"Epoche",hour:"Stunde",minute:"Minute",month:"Monat",second:"Sekunde",selectedDateDescription:e=>`Ausgew\xe4hltes Datum: ${e.date}`,selectedRangeDescription:e=>`Ausgew\xe4hlter Bereich: ${e.startDate} bis ${e.endDate}`,selectedTimeDescription:e=>`Ausgew\xe4hlte Zeit: ${e.time}`,startDate:"Startdatum",timeZoneName:"Zeitzone",weekday:"Wochentag",year:"Jahr"},"el-GR":{calendar:"Ημερολόγιο",day:"ημέρα",dayPeriod:"π.μ./μ.μ.",endDate:"Ημερομηνία λήξης",era:"περίοδος",hour:"ώρα",minute:"λεπτό",month:"μήνας",second:"δευτερόλεπτο",selectedDateDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3B7}\u{3BC}\u{3B5}\u{3C1}\u{3BF}\u{3BC}\u{3B7}\u{3BD}\u{3AF}\u{3B1}: ${e.date}`,selectedRangeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3BF} \u{3B5}\u{3CD}\u{3C1}\u{3BF}\u{3C2}: ${e.startDate} \u{3AD}\u{3C9}\u{3C2} ${e.endDate}`,selectedTimeDescription:e=>`\u{395}\u{3C0}\u{3B9}\u{3BB}\u{3B5}\u{3B3}\u{3BC}\u{3AD}\u{3BD}\u{3B7} \u{3CE}\u{3C1}\u{3B1}: ${e.time}`,startDate:"Ημερομηνία έναρξης",timeZoneName:"ζώνη ώρας",weekday:"καθημερινή",year:"έτος"},"en-US":{era:"era",year:"year",month:"month",day:"day",hour:"hour",minute:"minute",second:"second",dayPeriod:"AM/PM",calendar:"Calendar",startDate:"Start Date",endDate:"End Date",weekday:"day of the week",timeZoneName:"time zone",selectedDateDescription:e=>`Selected Date: ${e.date}`,selectedRangeDescription:e=>`Selected Range: ${e.startDate} to ${e.endDate}`,selectedTimeDescription:e=>`Selected Time: ${e.time}`},"es-ES":{calendar:"Calendario",day:"d\xeda",dayPeriod:"a.\xa0m./p.\xa0m.",endDate:"Fecha final",era:"era",hour:"hora",minute:"minuto",month:"mes",second:"segundo",selectedDateDescription:e=>`Fecha seleccionada: ${e.date}`,selectedRangeDescription:e=>`Rango seleccionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora seleccionada: ${e.time}`,startDate:"Fecha de inicio",timeZoneName:"zona horaria",weekday:"d\xeda de la semana",year:"a\xf1o"},"et-EE":{calendar:"Kalender",day:"p\xe4ev",dayPeriod:"enne/p\xe4rast l\xf5unat",endDate:"L\xf5ppkuup\xe4ev",era:"ajastu",hour:"tund",minute:"minut",month:"kuu",second:"sekund",selectedDateDescription:e=>`Valitud kuup\xe4ev: ${e.date}`,selectedRangeDescription:e=>`Valitud vahemik: ${e.startDate} kuni ${e.endDate}`,selectedTimeDescription:e=>`Valitud aeg: ${e.time}`,startDate:"Alguskuup\xe4ev",timeZoneName:"ajav\xf6\xf6nd",weekday:"n\xe4dalap\xe4ev",year:"aasta"},"fi-FI":{calendar:"Kalenteri",day:"p\xe4iv\xe4",dayPeriod:"vuorokaudenaika",endDate:"P\xe4\xe4ttymisp\xe4iv\xe4",era:"aikakausi",hour:"tunti",minute:"minuutti",month:"kuukausi",second:"sekunti",selectedDateDescription:e=>`Valittu p\xe4iv\xe4m\xe4\xe4r\xe4: ${e.date}`,selectedRangeDescription:e=>`Valittu aikav\xe4li: ${e.startDate} \u{2013} ${e.endDate}`,selectedTimeDescription:e=>`Valittu aika: ${e.time}`,startDate:"Alkamisp\xe4iv\xe4",timeZoneName:"aikavy\xf6hyke",weekday:"viikonp\xe4iv\xe4",year:"vuosi"},"fr-FR":{calendar:"Calendrier",day:"jour",dayPeriod:"cadran",endDate:"Date de fin",era:"\xe8re",hour:"heure",minute:"minute",month:"mois",second:"seconde",selectedDateDescription:e=>`Date s\xe9lectionn\xe9e\xa0: ${e.date}`,selectedRangeDescription:e=>`Plage s\xe9lectionn\xe9e\xa0: ${e.startDate} au ${e.endDate}`,selectedTimeDescription:e=>`Heure choisie\xa0: ${e.time}`,startDate:"Date de d\xe9but",timeZoneName:"fuseau horaire",weekday:"jour de la semaine",year:"ann\xe9e"},"he-IL":{calendar:"לוח שנה",day:"יום",dayPeriod:"לפנה״צ/אחה״צ",endDate:"תאריך סיום",era:"תקופה",hour:"שעה",minute:"דקה",month:"חודש",second:"שנייה",selectedDateDescription:e=>`\u{5EA}\u{5D0}\u{5E8}\u{5D9}\u{5DA} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.date}`,selectedRangeDescription:e=>`\u{5D8}\u{5D5}\u{5D5}\u{5D7} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.startDate} \u{5E2}\u{5D3} ${e.endDate}`,selectedTimeDescription:e=>`\u{5D6}\u{5DE}\u{5DF} \u{5E0}\u{5D1}\u{5D7}\u{5E8}: ${e.time}`,startDate:"תאריך התחלה",timeZoneName:"אזור זמן",weekday:"יום בשבוע",year:"שנה"},"hr-HR":{calendar:"Kalendar",day:"dan",dayPeriod:"AM/PM",endDate:"Datum završetka",era:"era",hour:"sat",minute:"minuta",month:"mjesec",second:"sekunda",selectedDateDescription:e=>`Odabrani datum: ${e.date}`,selectedRangeDescription:e=>`Odabrani raspon: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Odabrano vrijeme: ${e.time}`,startDate:"Datum početka",timeZoneName:"vremenska zona",weekday:"dan u tjednu",year:"godina"},"hu-HU":{calendar:"Napt\xe1r",day:"nap",dayPeriod:"napszak",endDate:"Befejező d\xe1tum",era:"\xe9ra",hour:"\xf3ra",minute:"perc",month:"h\xf3nap",second:"m\xe1sodperc",selectedDateDescription:e=>`Kijel\xf6lt d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Kijel\xf6lt tartom\xe1ny: ${e.startDate}\u{2013}${e.endDate}`,selectedTimeDescription:e=>`Kijel\xf6lt id\u{151}: ${e.time}`,startDate:"Kezdő d\xe1tum",timeZoneName:"időz\xf3na",weekday:"h\xe9t napja",year:"\xe9v"},"it-IT":{calendar:"Calendario",day:"giorno",dayPeriod:"AM/PM",endDate:"Data finale",era:"era",hour:"ora",minute:"minuto",month:"mese",second:"secondo",selectedDateDescription:e=>`Data selezionata: ${e.date}`,selectedRangeDescription:e=>`Intervallo selezionato: da ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Ora selezionata: ${e.time}`,startDate:"Data iniziale",timeZoneName:"fuso orario",weekday:"giorno della settimana",year:"anno"},"ja-JP":{calendar:"カレンダー",day:"日",dayPeriod:"午前/午後",endDate:"終了日",era:"時代",hour:"時",minute:"分",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{65E5}\u{4ED8} : ${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{629E}\u{7BC4}\u{56F2} : ${e.startDate} \u{304B}\u{3089} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{629E}\u{3057}\u{305F}\u{6642}\u{9593} : ${e.time}`,startDate:"開始日",timeZoneName:"タイムゾーン",weekday:"曜日",year:"年"},"ko-KR":{calendar:"달력",day:"일",dayPeriod:"오전/오후",endDate:"종료일",era:"연호",hour:"시",minute:"분",month:"월",second:"초",selectedDateDescription:e=>`\u{C120}\u{D0DD} \u{C77C}\u{C790}: ${e.date}`,selectedRangeDescription:e=>`\u{C120}\u{D0DD} \u{BC94}\u{C704}: ${e.startDate} ~ ${e.endDate}`,selectedTimeDescription:e=>`\u{C120}\u{D0DD} \u{C2DC}\u{AC04}: ${e.time}`,startDate:"시작일",timeZoneName:"시간대",weekday:"요일",year:"년"},"lt-LT":{calendar:"Kalendorius",day:"diena",dayPeriod:"iki pietų / po pietų",endDate:"Pabaigos data",era:"era",hour:"valanda",minute:"minutė",month:"mėnuo",second:"sekundė",selectedDateDescription:e=>`Pasirinkta data: ${e.date}`,selectedRangeDescription:e=>`Pasirinktas intervalas: nuo ${e.startDate} iki ${e.endDate}`,selectedTimeDescription:e=>`Pasirinktas laikas: ${e.time}`,startDate:"Pradžios data",timeZoneName:"laiko juosta",weekday:"savaitės diena",year:"metai"},"lv-LV":{calendar:"Kalendārs",day:"diena",dayPeriod:"priekšpusdienā/pēcpusdienā",endDate:"Beigu datums",era:"ēra",hour:"stundas",minute:"minūtes",month:"mēnesis",second:"sekundes",selectedDateDescription:e=>`Atlas\u{12B}tais datums: ${e.date}`,selectedRangeDescription:e=>`Atlas\u{12B}tais diapazons: no ${e.startDate} l\u{12B}dz ${e.endDate}`,selectedTimeDescription:e=>`Atlas\u{12B}tais laiks: ${e.time}`,startDate:"Sākuma datums",timeZoneName:"laika josla",weekday:"nedēļas diena",year:"gads"},"nb-NO":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Sluttdato",era:"tidsalder",hour:"time",minute:"minutt",month:"m\xe5ned",second:"sekund",selectedDateDescription:e=>`Valgt dato: ${e.date}`,selectedRangeDescription:e=>`Valgt omr\xe5de: ${e.startDate} til ${e.endDate}`,selectedTimeDescription:e=>`Valgt tid: ${e.time}`,startDate:"Startdato",timeZoneName:"tidssone",weekday:"ukedag",year:"\xe5r"},"nl-NL":{calendar:"Kalender",day:"dag",dayPeriod:"a.m./p.m.",endDate:"Einddatum",era:"tijdperk",hour:"uur",minute:"minuut",month:"maand",second:"seconde",selectedDateDescription:e=>`Geselecteerde datum: ${e.date}`,selectedRangeDescription:e=>`Geselecteerd bereik: ${e.startDate} tot ${e.endDate}`,selectedTimeDescription:e=>`Geselecteerde tijd: ${e.time}`,startDate:"Startdatum",timeZoneName:"tijdzone",weekday:"dag van de week",year:"jaar"},"pl-PL":{calendar:"Kalendarz",day:"dzień",dayPeriod:"rano / po południu / wieczorem",endDate:"Data końcowa",era:"era",hour:"godzina",minute:"minuta",month:"miesiąc",second:"sekunda",selectedDateDescription:e=>`Wybrana data: ${e.date}`,selectedRangeDescription:e=>`Wybrany zakres: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Wybrany czas: ${e.time}`,startDate:"Data początkowa",timeZoneName:"strefa czasowa",weekday:"dzień tygodnia",year:"rok"},"pt-BR":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"AM/PM",endDate:"Data final",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data inicial",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"pt-PT":{calendar:"Calend\xe1rio",day:"dia",dayPeriod:"am/pm",endDate:"Data de T\xe9rmino",era:"era",hour:"hora",minute:"minuto",month:"m\xeas",second:"segundo",selectedDateDescription:e=>`Data selecionada: ${e.date}`,selectedRangeDescription:e=>`Intervalo selecionado: ${e.startDate} a ${e.endDate}`,selectedTimeDescription:e=>`Hora selecionada: ${e.time}`,startDate:"Data de In\xedcio",timeZoneName:"fuso hor\xe1rio",weekday:"dia da semana",year:"ano"},"ro-RO":{calendar:"Calendar",day:"zi",dayPeriod:"a.m/p.m.",endDate:"Dată final",era:"eră",hour:"oră",minute:"minut",month:"lună",second:"secundă",selectedDateDescription:e=>`Dat\u{103} selectat\u{103}: ${e.date}`,selectedRangeDescription:e=>`Interval selectat: de la ${e.startDate} p\xe2n\u{103} la ${e.endDate}`,selectedTimeDescription:e=>`Ora selectat\u{103}: ${e.time}`,startDate:"Dată \xeenceput",timeZoneName:"fus orar",weekday:"ziua din săptăm\xe2nă",year:"an"},"ru-RU":{calendar:"Календарь",day:"день",dayPeriod:"AM/PM",endDate:"Дата окончания",era:"эра",hour:"час",minute:"минута",month:"месяц",second:"секунда",selectedDateDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{430}\u{44F} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{44B}\u{439} \u{434}\u{438}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: \u{441} ${e.startDate} \u{43F}\u{43E} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{44B}\u{431}\u{440}\u{430}\u{43D}\u{43D}\u{43E}\u{435} \u{432}\u{440}\u{435}\u{43C}\u{44F}: ${e.time}`,startDate:"Дата начала",timeZoneName:"часовой пояс",weekday:"день недели",year:"год"},"sk-SK":{calendar:"Kalend\xe1r",day:"deň",dayPeriod:"AM/PM",endDate:"D\xe1tum ukončenia",era:"letopočet",hour:"hodina",minute:"min\xfata",month:"mesiac",second:"sekunda",selectedDateDescription:e=>`Vybrat\xfd d\xe1tum: ${e.date}`,selectedRangeDescription:e=>`Vybrat\xfd rozsah: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Vybrat\xfd \u{10D}as: ${e.time}`,startDate:"D\xe1tum začatia",timeZoneName:"časov\xe9 p\xe1smo",weekday:"deň t\xfdždňa",year:"rok"},"sl-SI":{calendar:"Koledar",day:"dan",dayPeriod:"dop/pop",endDate:"Datum konca",era:"doba",hour:"ura",minute:"minuta",month:"mesec",second:"sekunda",selectedDateDescription:e=>`Izbrani datum: ${e.date}`,selectedRangeDescription:e=>`Izbrano obmo\u{10D}je: ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izbrani \u{10D}as: ${e.time}`,startDate:"Datum začetka",timeZoneName:"časovni pas",weekday:"dan v tednu",year:"leto"},"sr-SP":{calendar:"Kalendar",day:"дан",dayPeriod:"пре подне/по подне",endDate:"Datum završetka",era:"ера",hour:"сат",minute:"минут",month:"месец",second:"секунд",selectedDateDescription:e=>`Izabrani datum: ${e.date}`,selectedRangeDescription:e=>`Izabrani opseg: od ${e.startDate} do ${e.endDate}`,selectedTimeDescription:e=>`Izabrano vreme: ${e.time}`,startDate:"Datum početka",timeZoneName:"временска зона",weekday:"дан у недељи",year:"година"},"sv-SE":{calendar:"Kalender",day:"dag",dayPeriod:"fm/em",endDate:"Slutdatum",era:"era",hour:"timme",minute:"minut",month:"m\xe5nad",second:"sekund",selectedDateDescription:e=>`Valt datum: ${e.date}`,selectedRangeDescription:e=>`Valt intervall: ${e.startDate} till ${e.endDate}`,selectedTimeDescription:e=>`Vald tid: ${e.time}`,startDate:"Startdatum",timeZoneName:"tidszon",weekday:"veckodag",year:"\xe5r"},"tr-TR":{calendar:"Takvim",day:"g\xfcn",dayPeriod:"\xd6\xd6/\xd6S",endDate:"Bitiş Tarihi",era:"\xe7ağ",hour:"saat",minute:"dakika",month:"ay",second:"saniye",selectedDateDescription:e=>`Se\xe7ilen Tarih: ${e.date}`,selectedRangeDescription:e=>`Se\xe7ilen Aral\u{131}k: ${e.startDate} - ${e.endDate}`,selectedTimeDescription:e=>`Se\xe7ilen Zaman: ${e.time}`,startDate:"Başlangı\xe7 Tarihi",timeZoneName:"saat dilimi",weekday:"haftanın g\xfcn\xfc",year:"yıl"},"uk-UA":{calendar:"Календар",day:"день",dayPeriod:"дп/пп",endDate:"Дата завершення",era:"ера",hour:"година",minute:"хвилина",month:"місяць",second:"секунда",selectedDateDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{430} \u{434}\u{430}\u{442}\u{430}: ${e.date}`,selectedRangeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{434}\u{456}\u{430}\u{43F}\u{430}\u{437}\u{43E}\u{43D}: ${e.startDate} \u{2014} ${e.endDate}`,selectedTimeDescription:e=>`\u{412}\u{438}\u{431}\u{440}\u{430}\u{43D}\u{438}\u{439} \u{447}\u{430}\u{441}: ${e.time}`,startDate:"Дата початку",timeZoneName:"часовий пояс",weekday:"день тижня",year:"рік"},"zh-CN":{calendar:"日历",day:"日",dayPeriod:"上午/下午",endDate:"结束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{8303}\u{56F4}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9009}\u{5B9A}\u{7684}\u{65F6}\u{95F4}\u{FF1A}${e.time}`,startDate:"开始日期",timeZoneName:"时区",weekday:"工作日",year:"年"},"zh-TW":{calendar:"日曆",day:"日",dayPeriod:"上午/下午",endDate:"結束日期",era:"纪元",hour:"小时",minute:"分钟",month:"月",second:"秒",selectedDateDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{65E5}\u{671F}\u{FF1A}${e.date}`,selectedRangeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{7BC4}\u{570D}\u{FF1A}${e.startDate} \u{81F3} ${e.endDate}`,selectedTimeDescription:e=>`\u{9078}\u{5B9A}\u{7684}\u{6642}\u{9593}\u{FF1A}${e.time}`,startDate:"開始日期",timeZoneName:"时区",weekday:"工作日",year:"年"}};let yM=new WeakMap,yA="__reactAriaDateFieldRole",yj="__reactAriaDateFieldFocusManager";function yI(e,t,n){var r;let a,{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yN({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=(0,ll.useRef)(null),{focusWithinProps:p}=p6({...e,onFocusWithin(n){m.current=t.value,e.onFocus?.(n)},onBlurWithin:n=>{t.confirmPlaceholder(),t.value!==m.current&&t.commitValidation(),e.onBlur?.(n)},onFocusWithinChange:e.onFocusChange}),f=fz((r=yP)&&r.__esModule?r.default:r,"@react-aria/datepicker"),h="hour"===t.maxGranularity?"selectedTimeDescription":"selectedDateDescription",g="hour"===t.maxGranularity?"time":"date",y=h8(t.value?f.format(h,{[g]:t.formatValue({month:"long"})}):""),v="presentation"===e[yA]?u["aria-describedby"]:[y["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,b=e[yj],w=(0,ll.useMemo)(()=>b||yE(n),[b,n]),x=yT(t,n,"presentation"===e[yA]);yM.set(t,{ariaLabel:e["aria-label"],ariaLabelledBy:[l.id,e["aria-labelledby"]].filter(Boolean).join(" ")||void 0,ariaDescribedBy:v,focusManager:w});let D=(0,ll.useRef)(e.autoFocus);a="presentation"===e[yA]?{role:"presentation"}:mD(u,{role:"group","aria-disabled":e.isDisabled||void 0,"aria-describedby":v}),(0,ll.useEffect)(()=>{D.current&&w.focusFirst(),D.current=!1},[w]),yO(e.inputRef,t.defaultValue,t.setValue),y$({...e,focus(){w.focusFirst()}},t,e.inputRef);let E={type:"hidden",name:e.name,form:e.form,value:t.value?.toString()||"",disabled:e.isDisabled};"native"===e.validationBehavior&&(E.type="text",E.hidden=!0,E.required=e.isRequired,E.onChange=()=>{});let _=mB(e);return{labelProps:{...l,onClick:()=>{w.focusFirst()}},fieldProps:mD(_,a,x,p,{onKeyDown(t){e.onKeyDown&&e.onKeyDown(t)},onKeyUp(t){e.onKeyUp&&e.onKeyUp(t)},style:{unicodeBidi:"isolate"}}),inputProps:E,descriptionProps:c,errorMessageProps:d,isInvalid:o,validationErrors:i,validationDetails:s}}var yL={};yL={"ar-AE":{rangeOverflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.maxValue} \u{623}\u{648} \u{642}\u{628}\u{644} \u{630}\u{644}\u{643}.`,rangeReversed:"تاريخ البدء يجب أن يكون قبل تاريخ الانتهاء.",rangeUnderflow:e=>`\u{64A}\u{62C}\u{628} \u{623}\u{646} \u{62A}\u{643}\u{648}\u{646} \u{627}\u{644}\u{642}\u{64A}\u{645}\u{629} ${e.minValue} \u{623}\u{648} \u{628}\u{639}\u{62F} \u{630}\u{644}\u{643}.`,unavailableDate:"البيانات المحددة غير متاحة."},"bg-BG":{rangeOverflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.maxValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{440}\u{430}\u{43D}\u{43D}\u{430}.`,rangeReversed:"Началната дата трябва да е преди крайната.",rangeUnderflow:e=>`\u{421}\u{442}\u{43E}\u{439}\u{43D}\u{43E}\u{441}\u{442}\u{442}\u{430} \u{442}\u{440}\u{44F}\u{431}\u{432}\u{430} \u{434}\u{430} \u{435} ${e.minValue} \u{438}\u{43B}\u{438} \u{43F}\u{43E}-\u{43A}\u{44A}\u{441}\u{43D}\u{43E}.`,unavailableDate:"Избраната дата не е налична."},"cs-CZ":{rangeOverflow:e=>`Hodnota mus\xed b\xfdt ${e.maxValue} nebo d\u{159}\xedv\u{11B}j\u{161}\xed.`,rangeReversed:"Datum zah\xe1jen\xed mus\xed předch\xe1zet datu ukončen\xed.",rangeUnderflow:e=>`Hodnota mus\xed b\xfdt ${e.minValue} nebo pozd\u{11B}j\u{161}\xed.`,unavailableDate:"Vybran\xe9 datum nen\xed k dispozici."},"da-DK":{rangeOverflow:e=>`V\xe6rdien skal v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen skal v\xe6re f\xf8r slutdatoen.",rangeUnderflow:e=>`V\xe6rdien skal v\xe6re ${e.minValue} eller nyere.`,unavailableDate:"Den valgte dato er ikke tilg\xe6ngelig."},"de-DE":{rangeOverflow:e=>`Der Wert muss ${e.maxValue} oder fr\xfcher sein.`,rangeReversed:"Das Startdatum muss vor dem Enddatum liegen.",rangeUnderflow:e=>`Der Wert muss ${e.minValue} oder sp\xe4ter sein.`,unavailableDate:"Das ausgew\xe4hlte Datum ist nicht verf\xfcgbar."},"el-GR":{rangeOverflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.maxValue} \u{3AE} \u{3C0}\u{3B1}\u{3BB}\u{3B1}\u{3B9}\u{3CC}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,rangeReversed:"Η ημερομηνία έναρξης πρέπει να είναι πριν από την ημερομηνία λήξης.",rangeUnderflow:e=>`\u{397} \u{3C4}\u{3B9}\u{3BC}\u{3AE} \u{3C0}\u{3C1}\u{3AD}\u{3C0}\u{3B5}\u{3B9} \u{3BD}\u{3B1} \u{3B5}\u{3AF}\u{3BD}\u{3B1}\u{3B9} ${e.minValue} \u{3AE} \u{3BC}\u{3B5}\u{3C4}\u{3B1}\u{3B3}\u{3B5}\u{3BD}\u{3AD}\u{3C3}\u{3C4}\u{3B5}\u{3C1}\u{3B7}.`,unavailableDate:"Η επιλεγμένη ημερομηνία δεν είναι διαθέσιμη."},"en-US":{rangeUnderflow:e=>`Value must be ${e.minValue} or later.`,rangeOverflow:e=>`Value must be ${e.maxValue} or earlier.`,rangeReversed:"Start date must be before end date.",unavailableDate:"Selected date unavailable."},"es-ES":{rangeOverflow:e=>`El valor debe ser ${e.maxValue} o anterior.`,rangeReversed:"La fecha de inicio debe ser anterior a la fecha de finalizaci\xf3n.",rangeUnderflow:e=>`El valor debe ser ${e.minValue} o posterior.`,unavailableDate:"Fecha seleccionada no disponible."},"et-EE":{rangeOverflow:e=>`V\xe4\xe4rtus peab olema ${e.maxValue} v\xf5i varasem.`,rangeReversed:"Alguskuup\xe4ev peab olema enne l\xf5ppkuup\xe4eva.",rangeUnderflow:e=>`V\xe4\xe4rtus peab olema ${e.minValue} v\xf5i hilisem.`,unavailableDate:"Valitud kuup\xe4ev pole saadaval."},"fi-FI":{rangeOverflow:e=>`Arvon on oltava ${e.maxValue} tai sit\xe4 aikaisempi.`,rangeReversed:"Aloitusp\xe4iv\xe4n on oltava ennen lopetusp\xe4iv\xe4\xe4.",rangeUnderflow:e=>`Arvon on oltava ${e.minValue} tai sit\xe4 my\xf6h\xe4isempi.`,unavailableDate:"Valittu p\xe4iv\xe4m\xe4\xe4r\xe4 ei ole k\xe4ytett\xe4viss\xe4."},"fr-FR":{rangeOverflow:e=>`La valeur doit \xeatre ${e.maxValue} ou ant\xe9rieure.`,rangeReversed:"La date de d\xe9but doit \xeatre ant\xe9rieure \xe0 la date de fin.",rangeUnderflow:e=>`La valeur doit \xeatre ${e.minValue} ou ult\xe9rieure.`,unavailableDate:"La date s\xe9lectionn\xe9e n’est pas disponible."},"he-IL":{rangeOverflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.maxValue} \u{5D0}\u{5D5} \u{5DE}\u{5D5}\u{5E7}\u{5D3}\u{5DD} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,rangeReversed:"תאריך ההתחלה חייב להיות לפני תאריך הסיום.",rangeUnderflow:e=>`\u{5D4}\u{5E2}\u{5E8}\u{5DA} \u{5D7}\u{5D9}\u{5D9}\u{5D1} \u{5DC}\u{5D4}\u{5D9}\u{5D5}\u{5EA} ${e.minValue} \u{5D0}\u{5D5} \u{5DE}\u{5D0}\u{5D5}\u{5D7}\u{5E8} \u{5D9}\u{5D5}\u{5EA}\u{5E8}.`,unavailableDate:"התאריך הנבחר אינו זמין."},"hr-HR":{rangeOverflow:e=>`Vrijednost mora biti ${e.maxValue} ili ranije.`,rangeReversed:"Datum početka mora biti prije datuma završetka.",rangeUnderflow:e=>`Vrijednost mora biti ${e.minValue} ili kasnije.`,unavailableDate:"Odabrani datum nije dostupan."},"hu-HU":{rangeOverflow:e=>`Az \xe9rt\xe9knek ${e.maxValue} vagy kor\xe1bbinak kell lennie.`,rangeReversed:"A kezdő d\xe1tumnak a befejező d\xe1tumn\xe1l kor\xe1bbinak kell lennie.",rangeUnderflow:e=>`Az \xe9rt\xe9knek ${e.minValue} vagy k\xe9s\u{151}bbinek kell lennie.`,unavailableDate:"A kiv\xe1lasztott d\xe1tum nem \xe9rhető el."},"it-IT":{rangeOverflow:e=>`Il valore deve essere ${e.maxValue} o precedente.`,rangeReversed:"La data di inizio deve essere antecedente alla data di fine.",rangeUnderflow:e=>`Il valore deve essere ${e.minValue} o successivo.`,unavailableDate:"Data selezionata non disponibile."},"ja-JP":{rangeOverflow:e=>`\u{5024}\u{306F} ${e.maxValue} \u{4EE5}\u{4E0B}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,rangeReversed:"開始日は終了日より前にする必要があります。",rangeUnderflow:e=>`\u{5024}\u{306F} ${e.minValue} \u{4EE5}\u{4E0A}\u{306B}\u{3059}\u{308B}\u{5FC5}\u{8981}\u{304C}\u{3042}\u{308A}\u{307E}\u{3059}\u{3002}`,unavailableDate:"選択した日付は使用できません。"},"ko-KR":{rangeOverflow:e=>`\u{AC12}\u{C740} ${e.maxValue} \u{C774}\u{C804}\u{C774}\u{C5B4}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,rangeReversed:"시작일은 종료일 이전이어야 합니다.",rangeUnderflow:e=>`\u{AC12}\u{C740} ${e.minValue} \u{C774}\u{D6C4}\u{C5EC}\u{C57C} \u{D569}\u{B2C8}\u{B2E4}.`,unavailableDate:"선택한 날짜를 사용할 수 없습니다."},"lt-LT":{rangeOverflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.maxValue} arba ankstesn\u{117}.`,rangeReversed:"Pradžios data turi būti ankstesnė nei pabaigos data.",rangeUnderflow:e=>`Reik\u{161}m\u{117} turi b\u{16B}ti ${e.minValue} arba naujesn\u{117}.`,unavailableDate:"Pasirinkta data nepasiekiama."},"lv-LV":{rangeOverflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.maxValue} vai agr\u{101}kai.`,rangeReversed:"Sākuma datumam ir jābūt pirms beigu datuma.",rangeUnderflow:e=>`V\u{113}rt\u{12B}bai ir j\u{101}b\u{16B}t ${e.minValue} vai v\u{113}l\u{101}kai.`,unavailableDate:"Atlasītais datums nav pieejams."},"nb-NO":{rangeOverflow:e=>`Verdien m\xe5 v\xe6re ${e.maxValue} eller tidligere.`,rangeReversed:"Startdatoen m\xe5 v\xe6re f\xf8r sluttdatoen.",rangeUnderflow:e=>`Verdien m\xe5 v\xe6re ${e.minValue} eller senere.`,unavailableDate:"Valgt dato utilgjengelig."},"nl-NL":{rangeOverflow:e=>`Waarde moet ${e.maxValue} of eerder zijn.`,rangeReversed:"De startdatum moet voor de einddatum liggen.",rangeUnderflow:e=>`Waarde moet ${e.minValue} of later zijn.`,unavailableDate:"Geselecteerde datum niet beschikbaar."},"pl-PL":{rangeOverflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.maxValue} lub wcze\u{15B}niejsz\u{105}.`,rangeReversed:"Data rozpoczęcia musi być wcześniejsza niż data zakończenia.",rangeUnderflow:e=>`Warto\u{15B}\u{107} musi mie\u{107} warto\u{15B}\u{107} ${e.minValue} lub p\xf3\u{17A}niejsz\u{105}.`,unavailableDate:"Wybrana data jest niedostępna."},"pt-BR":{rangeOverflow:e=>`O valor deve ser ${e.maxValue} ou anterior.`,rangeReversed:"A data inicial deve ser anterior \xe0 data final.",rangeUnderflow:e=>`O valor deve ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"pt-PT":{rangeOverflow:e=>`O valor tem de ser ${e.maxValue} ou anterior.`,rangeReversed:"A data de in\xedcio deve ser anterior \xe0 data de fim.",rangeUnderflow:e=>`O valor tem de ser ${e.minValue} ou posterior.`,unavailableDate:"Data selecionada indispon\xedvel."},"ro-RO":{rangeOverflow:e=>`Valoarea trebuie s\u{103} fie ${e.maxValue} sau anterioar\u{103}.`,rangeReversed:"Data de \xeenceput trebuie să fie anterioară datei de sf\xe2rșit.",rangeUnderflow:e=>`Valoarea trebuie s\u{103} fie ${e.minValue} sau ulterioar\u{103}.`,unavailableDate:"Data selectată nu este disponibilă."},"ru-RU":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{43F}\u{43E}\u{437}\u{436}\u{435} ${e.maxValue}.`,rangeReversed:"Дата начала должна предшествовать дате окончания.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{438}\u{435} \u{434}\u{43E}\u{43B}\u{436}\u{43D}\u{43E} \u{431}\u{44B}\u{442}\u{44C} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{44C}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Выбранная дата недоступна."},"sk-SK":{rangeOverflow:e=>`Hodnota mus\xed by\u{165} ${e.maxValue} alebo skor\u{161}ia.`,rangeReversed:"D\xe1tum začiatku mus\xed byť skorš\xed ako d\xe1tum konca.",rangeUnderflow:e=>`Hodnota mus\xed by\u{165} ${e.minValue} alebo neskor\u{161}ia.`,unavailableDate:"Vybrat\xfd d\xe1tum je nedostupn\xfd."},"sl-SI":{rangeOverflow:e=>`Vrednost mora biti ${e.maxValue} ali starej\u{161}a.`,rangeReversed:"Začetni datum mora biti pred končnim datumom.",rangeUnderflow:e=>`Vrednost mora biti ${e.minValue} ali novej\u{161}a.`,unavailableDate:"Izbrani datum ni na voljo."},"sr-SP":{rangeOverflow:e=>`Vrednost mora da bude ${e.maxValue} ili starija.`,rangeReversed:"Datum početka mora biti pre datuma završetka.",rangeUnderflow:e=>`Vrednost mora da bude ${e.minValue} ili novija.`,unavailableDate:"Izabrani datum nije dostupan."},"sv-SE":{rangeOverflow:e=>`V\xe4rdet m\xe5ste vara ${e.maxValue} eller tidigare.`,rangeReversed:"Startdatumet m\xe5ste vara f\xf6re slutdatumet.",rangeUnderflow:e=>`V\xe4rdet m\xe5ste vara ${e.minValue} eller senare.`,unavailableDate:"Det valda datumet \xe4r inte tillg\xe4ngligt."},"tr-TR":{rangeOverflow:e=>`De\u{11F}er, ${e.maxValue} veya \xf6ncesi olmal\u{131}d\u{131}r.`,rangeReversed:"Başlangı\xe7 tarihi bitiş tarihinden \xf6nce olmalıdır.",rangeUnderflow:e=>`De\u{11F}er, ${e.minValue} veya sonras\u{131} olmal\u{131}d\u{131}r.`,unavailableDate:"Se\xe7ilen tarih kullanılamıyor."},"uk-UA":{rangeOverflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{43F}\u{456}\u{437}\u{43D}\u{456}\u{448}\u{435} ${e.maxValue}.`,rangeReversed:"Дата початку має передувати даті завершення.",rangeUnderflow:e=>`\u{417}\u{43D}\u{430}\u{447}\u{435}\u{43D}\u{43D}\u{44F} \u{43C}\u{430}\u{454} \u{431}\u{443}\u{442}\u{438} \u{43D}\u{435} \u{440}\u{430}\u{43D}\u{456}\u{448}\u{435} ${e.minValue}.`,unavailableDate:"Вибрана дата недоступна."},"zh-CN":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{65E5}\u{671F}\u{3002}`,rangeReversed:"开始日期必须早于结束日期。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{987B}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{65E5}\u{671F}\u{3002}`,unavailableDate:"所选日期不可用。"},"zh-TW":{rangeOverflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.maxValue} \u{6216}\u{66F4}\u{65E9}\u{3002}`,rangeReversed:"開始日期必須在結束日期之前。",rangeUnderflow:e=>`\u{503C}\u{5FC5}\u{9808}\u{662F} ${e.minValue} \u{6216}\u{66F4}\u{665A}\u{3002}`,unavailableDate:"所選日期無法使用。"}};let yF={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!0},yB={...yF,customError:!0,valid:!1},yV={isInvalid:!1,validationDetails:yF,validationErrors:[]},yU=(0,ll.createContext)({}),yW="__reactAriaFormValidationState";function yH(e){if(e[yW]){let{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}=e[yW];return{realtimeValidation:t,displayValidation:n,updateValidation:r,resetValidation:a,commitValidation:o}}return function(e){let{isInvalid:t,validationState:n,name:r,value:a,builtinValidation:o,validate:i,validationBehavior:s="aria"}=e;n&&(t||="invalid"===n);let l=void 0!==t?{isInvalid:t,validationErrors:[],validationDetails:yB}:null,u=(0,ll.useMemo)(()=>i&&null!=a?yK(function(e,t){if("function"==typeof e){let n=e(t);if(n&&"boolean"!=typeof n)return yz(n)}return[]}(i,a)):null,[i,a]);o?.validationDetails.valid&&(o=void 0);let c=(0,ll.useContext)(yU),d=(0,ll.useMemo)(()=>r?Array.isArray(r)?r.flatMap(e=>yz(c[e])):yz(c[r]):[],[c,r]),[m,p]=(0,ll.useState)(c),[f,h]=(0,ll.useState)(!1);c!==m&&(p(c),h(!1));let g=(0,ll.useMemo)(()=>yK(f?[]:d),[f,d]),y=(0,ll.useRef)(yV),[v,b]=(0,ll.useState)(yV),w=(0,ll.useRef)(yV),[x,D]=(0,ll.useState)(!1);return(0,ll.useEffect)(()=>{if(!x)return;D(!1);let e=u||o||y.current;yG(e,w.current)||(w.current=e,b(e))}),{realtimeValidation:l||g||u||o||yV,displayValidation:"native"===s?l||g||v:l||g||u||o||v,updateValidation(e){"aria"!==s||yG(v,e)?y.current=e:b(e)},resetValidation(){yG(yV,w.current)||(w.current=yV,b(yV)),"native"===s&&D(!1),h(!0)},commitValidation(){"native"===s&&D(!0),h(!0)}}}(e)}function yz(e){return e?Array.isArray(e)?e:[e]:[]}function yK(e){return e.length?{isInvalid:!0,validationErrors:e,validationDetails:yB}:null}function yG(e,t){return e===t||!!e&&!!t&&e.isInvalid===t.isInvalid&&e.validationErrors.length===t.validationErrors.length&&e.validationErrors.every((e,n)=>e===t.validationErrors[n])&&Object.entries(e.validationDetails).every(([e,n])=>t.validationDetails[e]===n)}function yZ(...e){let t=new Set,n=!1,r={...yF};for(let a of e){for(let e of a.validationErrors)t.add(e);for(let e in n||=a.isInvalid,r)r[e]||=a.validationDetails[e]}return r.valid=!n,{isInvalid:n,validationErrors:[...t],validationDetails:r}}let yY=new fF((ee=yL)&&ee.__esModule?ee.default:ee);function yq(){let e="u">typeof navigator&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([e])}catch{e="en-US"}return e}function yJ(e,t,n,r,a){let o=null!=e&&null!=n&&e.compare(n)>0,i=null!=e&&null!=t&&0>e.compare(t),s=null!=e&&r?.(e)||!1,l=o||i||s,u=[];if(l){let e=yq(),r=new fU(e,fF.getGlobalDictionaryForPackage("@react-stately/datepicker")||yY),l=new fR(e,y0({},a)),c=l.resolvedOptions().timeZone;i&&null!=t&&u.push(r.format("rangeUnderflow",{minValue:l.format(t.toDate(c))})),o&&null!=n&&u.push(r.format("rangeOverflow",{maxValue:l.format(n.toDate(c))})),s&&u.push(r.format("unavailableDate"))}return{isInvalid:l,validationErrors:u,validationDetails:{badInput:s,customError:!1,patternMismatch:!1,rangeOverflow:o,rangeUnderflow:i,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1,valid:!l}}}let yX={year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit"},yQ={year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"};function y0(e,t){e={...t.shouldForceLeadingZeros?yQ:yX,...e};let n=t.granularity||"minute",r=Object.keys(e),a=r.indexOf(t.maxGranularity??"year");a<0&&(a=0);let o=r.indexOf(n);if(o<0&&(o=2),a>o)throw Error("maxGranularity must be greater than granularity");let i=r.slice(a,o+1).reduce((t,n)=>(t[n]=e[n],t),{});return null!=t.hourCycle&&(i.hour12=12===t.hourCycle),i.timeZone=t.timeZone||"UTC",("hour"===n||"minute"===n||"second"===n)&&t.timeZone&&!t.hideTimeZone&&(i.timeZoneName="short"),t.showEra&&0===a&&(i.era="short"),i}function y1(e){return e&&"hour"in e?e:new hc}function y4(e,t){return null===e?null:e?hE(e,t):void 0}function y2(e,t){let n=e&&"timeZone"in e?e.timeZone:void 0,r=e&&"minute"in e?"minute":"day";if(e&&t&&!(t in e))throw Error("Invalid granularity "+t+" for value "+e.toString());let[a,o]=(0,ll.useState)([r,n]);return e&&(a[0]!==r||a[1]!==n)&&o([r,n]),t||(t=e?r:a[0]),[t,e?n:a[1]]}let y3=new fF({ach:{year:"mwaka",month:"dwe",day:"nino"},af:{year:"jjjj",month:"mm",day:"dd"},am:{year:"ዓዓዓዓ",month:"ሚሜ",day:"ቀቀ"},an:{year:"aaaa",month:"mm",day:"dd"},ar:{year:"سنة",month:"شهر",day:"يوم"},ast:{year:"aaaa",month:"mm",day:"dd"},az:{year:"iiii",month:"aa",day:"gg"},be:{year:"гггг",month:"мм",day:"дд"},bg:{year:"гггг",month:"мм",day:"дд"},bn:{year:"yyyy",month:"মিমি",day:"dd"},br:{year:"bbbb",month:"mm",day:"dd"},bs:{year:"gggg",month:"mm",day:"dd"},ca:{year:"aaaa",month:"mm",day:"dd"},cak:{year:"jjjj",month:"ii",day:"q'q'"},ckb:{year:"ساڵ",month:"مانگ",day:"ڕۆژ"},cs:{year:"rrrr",month:"mm",day:"dd"},cy:{year:"bbbb",month:"mm",day:"dd"},da:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},de:{year:"jjjj",month:"mm",day:"tt"},dsb:{year:"llll",month:"mm",day:"źź"},el:{year:"εεεε",month:"μμ",day:"ηη"},en:{year:"yyyy",month:"mm",day:"dd"},eo:{year:"jjjj",month:"mm",day:"tt"},es:{year:"aaaa",month:"mm",day:"dd"},et:{year:"aaaa",month:"kk",day:"pp"},eu:{year:"uuuu",month:"hh",day:"ee"},fa:{year:"سال",month:"ماه",day:"روز"},ff:{year:"hhhh",month:"ll",day:"\xf1\xf1"},fi:{year:"vvvv",month:"kk",day:"pp"},fr:{year:"aaaa",month:"mm",day:"jj"},fy:{year:"jjjj",month:"mm",day:"dd"},ga:{year:"bbbb",month:"mm",day:"ll"},gd:{year:"bbbb",month:"mm",day:"ll"},gl:{year:"aaaa",month:"mm",day:"dd"},he:{year:"שנה",month:"חודש",day:"יום"},hr:{year:"gggg",month:"mm",day:"dd"},hsb:{year:"llll",month:"mm",day:"dd"},hu:{year:"\xe9\xe9\xe9\xe9",month:"hh",day:"nn"},ia:{year:"aaaa",month:"mm",day:"dd"},id:{year:"tttt",month:"bb",day:"hh"},is:{year:"\xe1\xe1\xe1\xe1",month:"mm",day:"dd"},it:{year:"aaaa",month:"mm",day:"gg"},ja:{year:"年",month:"月",day:"日"},ka:{year:"წწწწ",month:"თთ",day:"რრ"},kk:{year:"жжжж",month:"аа",day:"кк"},kn:{year:"ವವವವ",month:"ಮಿಮೀ",day:"ದಿದಿ"},ko:{year:"연도",month:"월",day:"일"},lb:{year:"jjjj",month:"mm",day:"dd"},lo:{year:"ປປປປ",month:"ດດ",day:"ວວ"},lt:{year:"mmmm",month:"mm",day:"dd"},lv:{year:"gggg",month:"mm",day:"dd"},meh:{year:"aaaa",month:"mm",day:"dd"},ml:{year:"വർഷം",month:"മാസം",day:"തീയതി"},ms:{year:"tttt",month:"mm",day:"hh"},nb:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},nl:{year:"jjjj",month:"mm",day:"dd"},nn:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},no:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},oc:{year:"aaaa",month:"mm",day:"jj"},pl:{year:"rrrr",month:"mm",day:"dd"},pt:{year:"aaaa",month:"mm",day:"dd"},rm:{year:"oooo",month:"mm",day:"dd"},ro:{year:"aaaa",month:"ll",day:"zz"},ru:{year:"гггг",month:"мм",day:"дд"},sc:{year:"aaaa",month:"mm",day:"dd"},scn:{year:"aaaa",month:"mm",day:"jj"},sk:{year:"rrrr",month:"mm",day:"dd"},sl:{year:"llll",month:"mm",day:"dd"},sr:{year:"гггг",month:"мм",day:"дд"},sv:{year:"\xe5\xe5\xe5\xe5",month:"mm",day:"dd"},szl:{year:"rrrr",month:"mm",day:"dd"},tg:{year:"сссс",month:"мм",day:"рр"},th:{year:"ปปปป",month:"ดด",day:"วว"},tr:{year:"yyyy",month:"aa",day:"gg"},uk:{year:"рррр",month:"мм",day:"дд"},"zh-CN":{year:"年",month:"月",day:"日"},"zh-TW":{year:"年",month:"月",day:"日"}},"en");class y6{constructor(e,t,n){if(this.era=n?.era??null,this.calendar=e,this.year=n?.year??null,this.month=n?.month??null,this.day=n?.day??null,this.hour=n?.hour??null,this.hourCycle=t,this.dayPeriod=null,this.minute=n?.minute??null,this.second=n?.second??null,this.millisecond=n?.millisecond??null,this.offset="offset"in(n??{})?n.offset:null,null!=this.hour){let[e,n]=y9(this.hour,t);this.dayPeriod=e,this.hour=n}}copy(){let e=new y6(this.calendar,this.hourCycle);return e.era=this.era,e.year=this.year,e.month=this.month,e.day=this.day,e.hour=this.hour,e.dayPeriod=this.dayPeriod,e.minute=this.minute,e.second=this.second,e.millisecond=this.millisecond,e.offset=this.offset,e}isComplete(e){return e.every(e=>null!=this[e])}validate(e,t){return t.every(t=>{if(("hour"===t||"dayPeriod"===t)&&"hour"in e){let[t,n]=y9(e.hour,this.hourCycle);return this.dayPeriod===t&&this.hour===n}return this[t]===e[t]})}isCleared(e){return e.every(e=>null===this[e])}set(e,t,n){let r=this.copy();return r[e]=t,"hour"===e&&null==r.dayPeriod&&"hour"in n&&(r.dayPeriod=y9(n.hour,this.hourCycle)[0]),"year"===e&&null==r.era&&(r.era=n.era),"second"!==e&&"literal"!==e&&"timeZoneName"!==e&&(r.offset=null),r}clear(e){let t=this.copy();return t[e]=null,"year"===e&&(t.era=null),t.offset=null,t}cycle(e,t,n,r){let a=this.copy();if(null==a[e]&&"dayPeriod"!==e&&"era"!==e){if("hour"===e&&"hour"in n){let[e,t]=y9(n.hour,this.hourCycle);a.dayPeriod=e,a.hour=t}else a[e]=n[e];return"year"===e&&null==a.era&&(a.era=n.era),a}switch(e){case"era":{let e=this.calendar.getEras(),n=e.indexOf(a.era);n=y5(n,t,0,e.length-1),a.era=e[n];break}case"year":{let r=new hu(this.calendar,this.era??n.era,this.year??n.year,this.month??1,this.day??1);a.era=(r=r.cycle(e,t,{round:"year"===e})).era,a.year=r.year;break}case"month":a.month=y5(a.month??1,t,1,this.calendar.getMaximumMonthsInYear());break;case"day":a.day=y5(a.day??1,t,1,this.calendar.getMaximumDaysInMonth());break;case"hour":{let e=r.some(e=>["year","month","day"].includes(e));if("timeZone"in n&&(!e||null!=a.year&&null!=a.month&&null!=a.day)){let e=this.toValue(n),[r,o]=y9((e=e.cycle("hour",t,{hourCycle:"h12"===this.hourCycle?12:24,round:!1})).hour,this.hourCycle);a.hour=o,a.dayPeriod=r,a.offset=e.offset}else{let e=a.hour??0,r=this.getSegmentLimits("hour");a.hour=y5(e,t,r.minValue,r.maxValue),null==a.dayPeriod&&"hour"in n&&(a.dayPeriod=y9(n.hour,this.hourCycle)[0])}break}case"dayPeriod":a.dayPeriod=y5(a.dayPeriod??0,t,0,1);break;case"minute":a.minute=y5(a.minute??0,t,0,59,!0);break;case"second":a.second=y5(a.second??0,t,0,59,!0)}return a}toValue(e){if(!("hour"in e))return e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day});{let t=this.hour;null!=t?t=function(e,t,n){switch(n){case"h11":1===t&&(e+=12);break;case"h12":12===e&&(e=0),1===t&&(e+=12);break;case"h24":e-=1}return e}(t,this.dayPeriod??0,this.hourCycle):("h12"===this.hourCycle||"h11"===this.hourCycle)&&(t=12*(1===this.dayPeriod));let n=e.set({era:this.era??e.era,year:this.year??e.year,month:this.month??e.month,day:this.day??e.day,hour:t??e.hour,minute:this.minute??e.minute,second:this.second??e.second,millisecond:this.millisecond??e.millisecond});return"offset"in n&&null!=this.offset&&n.offset!==this.offset&&(n=n.add({milliseconds:n.offset-this.offset})),n}}getSegmentLimits(e){switch(e){case"era":{let e=this.calendar.getEras();return{value:null!=this.era?e.indexOf(this.era):e.length-1,minValue:0,maxValue:e.length-1}}case"year":return{value:this.year,minValue:1,maxValue:9999};case"month":return{value:this.month,minValue:1,maxValue:this.calendar.getMaximumMonthsInYear()};case"day":return{value:this.day,minValue:1,maxValue:this.calendar.getMaximumDaysInMonth()};case"dayPeriod":return{value:this.dayPeriod,minValue:0,maxValue:1};case"hour":{let e=0,t=23;return"h12"===this.hourCycle?(e=1,t=12):"h11"===this.hourCycle&&(e=0,t=11),{value:this.hour,minValue:e,maxValue:t}}case"minute":return{value:this.minute,minValue:0,maxValue:59};case"second":return{value:this.second,minValue:0,maxValue:59}}}}function y5(e,t,n,r,a=!1){if(a){(e+=Math.sign(t))<n&&(e=r);let a=Math.abs(t);(e=t>0?Math.ceil(e/a)*a:Math.floor(e/a)*a)>r&&(e=n)}else(e+=t)<n?e=r-(n-e-1):e>r&&(e=n+(e-r-1));return e}function y9(e,t){let n=+(e>=12);switch(t){case"h11":e>=12&&(e-=12);break;case"h12":0===e?e=12:e>12&&(e-=12);break;case"h23":n=null;break;case"h24":e+=1,n=null}return[n,e]}var y8=n(9264);let y7={year:!0,month:!0,day:!0,hour:!0,minute:!0,second:!0,dayPeriod:!0,era:!0},ve={year:5,month:2,day:7,hour:2,minute:15,second:15},vt={dayperiod:"dayPeriod",relatedYear:"year",yearName:"literal",unknown:"literal"};function vn(e){let{locale:t,createCalendar:n,hideTimeZone:r,isDisabled:a=!1,isReadOnly:o=!1,isRequired:i=!1,minValue:s,maxValue:l,isDateUnavailable:u}=e,c=e.value||e.defaultValue||e.placeholderValue||null,[d,m]=y2(c,e.granularity),p=m||"UTC";if(c&&!(d in c))throw Error("Invalid granularity "+d+" for value "+c.toString());let[f,h]=(0,ll.useMemo)(()=>{let r=new fR(t,{dateStyle:"short",timeStyle:"short",hour12:null!=e.hourCycle?12===e.hourCycle:void 0}).resolvedOptions();return[n(r.calendar),r.hourCycle]},[t,e.hourCycle,n]),[g,y]=gY(e.value,e.defaultValue??null,e.onChange),[v]=(0,ll.useState)(g),b=(0,ll.useMemo)(()=>y4(g,f)??null,[g,f]),[w,x]=(0,ll.useState)(()=>new y6(f,h,b)),D="gregory"===f.identifier&&"BC"===w.era,E=(0,ll.useMemo)(()=>({granularity:d,maxGranularity:e.maxGranularity??"year",timeZone:m,hideTimeZone:r,hourCycle:e.hourCycle,showEra:D,shouldForceLeadingZeros:e.shouldForceLeadingZeros}),[e.maxGranularity,d,e.hourCycle,e.shouldForceLeadingZeros,m,r,D]),_=(0,ll.useMemo)(()=>y0({},E),[E]),S=(0,ll.useMemo)(()=>new fR(t,_),[t,_]),k=(0,ll.useMemo)(()=>S.resolvedOptions(),[S]),C=(0,ll.useMemo)(()=>(function(e,t,n,r){if(e)return y4(e,n);let a=hE(hR(r??hA()).set({hour:0,minute:0,second:0,millisecond:0}),n);return"year"===t||"month"===t||"day"===t?hx(a):r?a:hD(a)})(e.placeholderValue,d,f,m),[e.placeholderValue,d,f,m]),P=(0,ll.useMemo)(()=>{let t="h11"===h||"h12"===h,n=["era","year","month","day","hour",...t?["dayPeriod"]:[],"minute","second"],r=n.indexOf(e.maxGranularity||"era"),a=n.indexOf("hour"===d&&t?"dayPeriod":d);return n.slice(r,a+1)},[e.maxGranularity,d,h]),[T,R]=(0,ll.useState)(b),[N,O]=(0,ll.useState)(f),[$,M]=(0,ll.useState)(h);b===T&&h===$&&hC(f,N)||(w=new y6(f,h,b),R(b),O(f),M(h),x(w));let A=t=>{if(!e.isDisabled&&!e.isReadOnly)if(null==t||t instanceof y6&&t.isCleared(P))x(new y6(f,h,b)),y(null);else if(t instanceof y6){if(t.isComplete(P)){let e=t.toValue(b??C);if(t.validate(e,P)){let t=hE(e,c?.calendar||new fX);if(!g||0!==t.compare(g)){x(new y6(f,h,b)),y(t);return}}}x(t)}else t=hE(t,c?.calendar||new fX),x(new y6(f,h,b)),y(t)},j=(0,ll.useMemo)(()=>w.toValue(b??C).toDate(p),[w,p,b,C]),I=(0,ll.useMemo)(()=>(function(e,t,n,r,a,o,i){let s=["hour","minute","second"],l=n.formatToParts(e),u=new(0,y8.K)(o,{useGrouping:!1}),c=new(0,y8.K)(o,{useGrouping:!1,minimumIntegerDigits:2});for(let e of l)if("year"===e.type||"month"===e.type||"day"===e.type||"hour"===e.type){let n=t[e.type]??0;"2-digit"===r[e.type]?e.value=c.format(n):e.value=u.format(n)}let d=[];for(let e of l){var m;let n=vt[e.type]||e.type,r=y7[n];"era"===n&&1===a.getEras().length&&(r=!1);let l=y7[n]&&null==t[e.type],u=y7[n]?(m=e.value,"era"===n||"dayPeriod"===n?m:"year"===n||"month"===n||"day"===n?y3.getStringForLocale(n,o):"––"):null,c={type:n,text:l?u:e.value,...t.getSegmentLimits(n),isPlaceholder:l,placeholder:u,isEditable:r};"hour"===n?(d.push({type:"literal",text:"⁦",isPlaceholder:!1,placeholder:"",isEditable:!1}),d.push(c),n===i&&d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):s.includes(n)&&n===i?(d.push(c),d.push({type:"literal",text:"⁩",isPlaceholder:!1,placeholder:"",isEditable:!1})):d.push(c)}return d})(j,w,S,k,f,t,d),[j,S,k,w,f,t,d]),L=(e,t)=>{A(w.cycle(e,t,C,P))},F=(0,ll.useMemo)(()=>yJ(g,s,l,u,E),[g,s,l,u,E]),B=yH({...e,value:g,builtinValidation:F}),V=B.displayValidation.isInvalid,U=e.validationState||(V?"invalid":null);return{...B,value:b,defaultValue:e.defaultValue??v,dateValue:j,calendar:f,setValue:A,segments:I,dateFormatter:S,validationState:U,isInvalid:V,granularity:d,maxGranularity:e.maxGranularity??"year",isDisabled:a,isReadOnly:o,isRequired:i,increment(e){L(e,1)},decrement(e){L(e,-1)},incrementPage(e){L(e,ve[e]||1)},decrementPage(e){L(e,-(ve[e]||1))},incrementToMax(e){let t="hour"===e&&"h12"===h?11:w.getSegmentLimits(e).maxValue;A(w.set(e,t,C))},decrementToMin(e){let t="hour"===e&&"h12"===h?12:w.getSegmentLimits(e).minValue;A(w.set(e,t,C))},setSegment(e,t){A(w.set(e,t,C))},confirmPlaceholder(){if(!e.isDisabled&&!e.isReadOnly&&w.isComplete(P)){let e=hE(w.toValue(b??C),c?.calendar||new fX);g&&0===e.compare(g)||y(e),x(new y6(f,h,b))}},clearSegment(e){let t=w;"timeZoneName"!==e&&"literal"!==e&&(t=w.clear(e)),A(t)},formatValue:e=>b?new fR(t,y0(e,E)).format(j):"",getDateFormatter:(e,t)=>new fR(e,y0({},{...E,...t}))}}let vr=(0,ll.createContext)(null),va=(0,ll.createContext)(null),vo=(0,ll.createContext)(null),vi=(0,ll.forwardRef)(function(e,t){let n=(0,ll.useContext)(va),r=(0,ll.useContext)(vo);return n||r?lu().createElement(vl,{...e,ref:t}):lu().createElement(vs,{...e,ref:t})}),vs=(0,ll.forwardRef)((e,t)=>{let[n,r]=mC({slot:e.slot},t,vr),{locale:a}=fE(),o=vn({...n,locale:a,createCalendar:gB}),i=(0,ll.useRef)(null),{fieldProps:s,inputProps:l}=yI({...n,inputRef:i},o,r);return lu().createElement(m_,{values:[[va,o],[yo,{...l,ref:i}],[yr,{...s,ref:r,isInvalid:o.isInvalid}]]},lu().createElement(vl,e))}),vl=(0,ll.forwardRef)((e,t)=>{let{className:n,children:r}=e,a=(0,ll.useContext)(va),o=(0,ll.useContext)(vo),i=null!=a?a:o;return lu().createElement(lu().Fragment,null,lu().createElement(ya,{...e,ref:t,slot:e.slot||void 0,className:null!=n?n:"react-aria-DateInput",isInvalid:i.isInvalid},i.segments.map((e,t)=>(0,ll.cloneElement)(r(e),{key:t}))),lu().createElement(yi,null))});function vu({children:e}){let t=(0,ll.useMemo)(()=>({register:()=>{}}),[]);return lu().createElement(pU.Provider,{value:t},e)}lu().forwardRef(({children:e,...t},n)=>{let r=(0,ll.useRef)(!1),a=(0,ll.useContext)(pU),o=mD(a||{},{...t,register(){r.current=!0,a&&a.register()}});return o.ref=mr(n||a?.ref),pO(a,o.ref),(0,ll.useEffect)(()=>{r.current||(r.current=!0)},[]),lu().createElement(pU.Provider,{value:o},e)});let vc=(0,ll.createContext)({}),vd=lu().createContext(null);function vm(e){let t=mg(),{portalContainer:n=t?null:document.body,isExiting:r}=e,[a,o]=(0,ll.useState)(!1),i=(0,ll.useMemo)(()=>({contain:a,setContain:o}),[a,o]),{getContainer:s}=(0,ll.useContext)(vc)??{};if(!e.portalContainer&&s&&(n=s()),!n)return null;let l=e.children;return e.disableFocusManagement||(l=lu().createElement(yd,{restoreFocus:!0,contain:(e.shouldContainFocus||a)&&!r},l)),l=lu().createElement(vd.Provider,{value:i},lu().createElement(vu,null,l)),pG().createPortal(l,n)}let vp=(0,ll.createContext)(null),vf=(0,ll.createContext)(null),vh=(0,ll.forwardRef)(function(e,t){let n=e["aria-labelledby"];[e,t]=mC(e,t,vp);let{dialogProps:r,titleProps:a}=function(e,t){let n,r,{role:a="dialog"}=e,o=mw();o=e["aria-label"]?void 0:o;let i=(0,ll.useRef)(!1);return(0,ll.useEffect)(()=>{if(t.current&&!mG(t.current)){pT(t.current);let e=setTimeout(()=>{(((e=document)=>e.activeElement)()===t.current||((e=document)=>e.activeElement)()===document.body)&&(i.current=!0,t.current&&(t.current.blur(),pT(t.current)),i.current=!1)},500);return()=>{clearTimeout(e)}}},[t]),n=(0,ll.useContext)(vd),ms(()=>{r?.(!0)},[r=n?.setContain]),(0,ll.useRef)(!1),(0,ll.useEffect)(()=>{}),{dialogProps:{...mB(e,{labelable:!0}),role:a,tabIndex:-1,"aria-labelledby":e["aria-labelledby"]||o,onBlur:e=>{i.current&&e.stopPropagation()}},titleProps:{id:o}}}({...e,"aria-labelledby":n},t),o=(0,ll.useContext)(vf);r["aria-label"]||r["aria-labelledby"]||(e["aria-labelledby"]?r["aria-labelledby"]=e["aria-labelledby"]:console.warn('If a Dialog does not contain a <Heading slot="title">, it must have an aria-label or aria-labelledby attribute for accessibility.'));let i=mS({defaultClassName:"react-aria-Dialog",className:e.className,style:e.style,children:e.children,values:{close:(null==o?void 0:o.close)||(()=>{})}});return lu().createElement("section",{...mB(e),...r,...i,ref:t,slot:e.slot||void 0},lu().createElement(m_,{values:[[fs,{slots:{[mE]:{},title:{...a,level:2}}}],[fo,{slots:{[mE]:{},close:{onPress:()=>null==o?void 0:o.close()}}}]]},i.children))}),vg=(0,ll.createContext)(null),vy=(0,ll.forwardRef)(function(e,t){let n=(0,ll.useContext)(vg);return(null==n?void 0:n.isInvalid)?lu().createElement(vv,{...e,ref:t}):null}),vv=(0,ll.forwardRef)((e,t)=>{let n=(0,ll.useContext)(vg),r=mB(e),a=mS({...e,defaultClassName:"react-aria-FieldError",defaultChildren:0===n.validationErrors.length?void 0:n.validationErrors.join(" "),values:n});return null==a.children?null:lu().createElement(fu,{slot:"errorMessage",...r,...a,ref:t})}),vb=(0,ll.createContext)(null),vw=(0,ll.createContext)({}),vx=fr(function(e,t){[e,t]=mC(e,t,vw);let{elementType:n="label",...r}=e;return lu().createElement(n,{className:"react-aria-Label",...r,ref:t})}),vD=(0,ll.createContext)({placement:"bottom"}),vE="u">typeof HTMLElement&&"inert"in HTMLElement.prototype,v_=new WeakMap,vS=[];function vk(e,t=-1/0,n=1/0){return Math.min(Math.max(e,t),n)}function vC(e,t){let n=e,r=0,a=t.toString(),o=a.toLowerCase().indexOf("e-");if(o>0)r=Math.abs(Math.floor(Math.log10(Math.abs(t))))+o;else{let e=a.indexOf(".");e>=0&&(r=a.length-e)}if(r>0){let e=Math.pow(10,r);n=Math.round(n*e)/e}return n}function vP(e,t,n,r){t=Number(t),n=Number(n);let a=(e-(isNaN(t)?0:t))%r,o=vC(2*Math.abs(a)>=r?e+Math.sign(a)*(r-Math.abs(a)):e-a,r);return isNaN(t)?!isNaN(n)&&o>n&&(o=Math.floor(vC(n/r,r))*r):o<t?o=t:!isNaN(n)&&o>n&&(o=t+Math.floor(vC((n-t)/r,r))*r),o=vC(o,r)}let vT={top:"top",bottom:"top",left:"left",right:"left"},vR={top:"bottom",bottom:"top",left:"right",right:"left"},vN={top:"left",left:"top"},vO={top:"height",left:"width"},v$={width:"totalWidth",height:"totalHeight"},vM={};function vA(e,t){let n=0,r=0,a=0,o=0,i=0,s=0,l={},u=(t?.scale??1)>1;if("BODY"===e.tagName||"HTML"===e.tagName){let u=document.documentElement;a=u.clientWidth,o=u.clientHeight,n=t?.width??a,r=t?.height??o,l.top=u.scrollTop||e.scrollTop,l.left=u.scrollLeft||e.scrollLeft,t&&(i=t.offsetTop,s=t.offsetLeft)}else({width:n,height:r,top:i,left:s}=vV(e,!1)),l.top=e.scrollTop,l.left=e.scrollLeft,a=n,o=r;return pr()&&("BODY"===e.tagName||"HTML"===e.tagName)&&u&&(l.top=0,l.left=0,i=t?.pageTop??0,s=t?.pageLeft??0),{width:n,height:r,totalWidth:a,totalHeight:o,scroll:l,top:i,left:s}}function vj(e,t,n,r,a,o,i){let s=a.scroll[e]??0,l=r[vO[e]],u=i[e]+r.scroll[vT[e]]+o,c=i[e]+r.scroll[vT[e]]+l-o,d=t-s+r.scroll[vT[e]]+i[e]-r[vT[e]],m=t-s+n+r.scroll[vT[e]]+i[e]-r[vT[e]];return d<u?u-d:m>c?Math.max(c-m,u-d):0}function vI(e){if(vM[e])return vM[e];let[t,n]=e.split(" "),r=vT[t]||"right",a=vN[r];vT[n]||(n="center");let o=vO[r],i=vO[a];return vM[e]={placement:t,crossPlacement:n,axis:r,crossAxis:a,size:o,crossSize:i},vM[e]}function vL(e,t,n,r,a,o,i,s,l,u,c){let{placement:d,crossPlacement:m,axis:p,crossAxis:f,size:h,crossSize:g}=r,y={};y[f]=e[f]??0,"center"===m?y[f]+=((e[g]??0)-(n[g]??0))/2:m!==f&&(y[f]+=(e[g]??0)-(n[g]??0)),y[f]+=o;let v=e[f]-n[g]+l+u,b=e[f]+e[g]-l-u;if(y[f]=vk(y[f],v,b),d===p){let t=s?c[h]:c[v$[h]];y[vR[p]]=Math.floor(t-e[p]+a)}else y[p]=Math.floor(e[p]+e[h]+a);return y}function vF(e,t,n,r,a,o,i,s){let{placement:l,axis:u,size:c}=o;return l===u?Math.max(0,n[u]-(i.scroll[u]??0)-(e[u]+(s?t[u]:0))-(r[u]??0)-r[vR[u]]-a):Math.max(0,e[c]+e[u]+(s?t[u]:0)-n[u]-n[c]+(i.scroll[u]??0)-(r[u]??0)-r[vR[u]]-a)}function vB(e,t){let{top:n,left:r,width:a,height:o}=e.getBoundingClientRect();return t&&e instanceof e.ownerDocument.defaultView.HTMLElement&&(a=e.offsetWidth,o=e.offsetHeight),{top:n,left:r,width:a,height:o}}function vV(e,t){let{top:n,left:r,width:a,height:o}=vB(e,t),{scrollTop:i,scrollLeft:s,clientTop:l,clientLeft:u}=document.documentElement;return{top:n+i-l,left:r+s-u,width:a,height:o}}function vU(e,t,n){let r,a=window.getComputedStyle(e);if("fixed"===a.position)r=vB(e,n);else{r=vV(e,n);let a=vV(t,n),o=window.getComputedStyle(t);a.top+=(parseInt(o.borderTopWidth,10)||0)-t.scrollTop,a.left+=(parseInt(o.borderLeftWidth,10)||0)-t.scrollLeft,r.top-=a.top,r.left-=a.left}return r.top-=parseInt(a.marginTop,10)||0,r.left-=parseInt(a.marginLeft,10)||0,r}function vW(e){let t=window.getComputedStyle(e);return"none"!==t.transform||/transform|perspective/.test(t.willChange)||"none"!==t.filter||"paint"===t.contain||"backdropFilter"in t&&"none"!==t.backdropFilter||"WebkitBackdropFilter"in t&&"none"!==t.WebkitBackdropFilter}let vH=new WeakMap;function vz(e){let{ref:t,box:n,onResize:r}=e,a=pH(r);(0,ll.useEffect)(()=>{let e=t?.current;if(e)if(void 0===window.ResizeObserver)return window.addEventListener("resize",a,!1),()=>{window.removeEventListener("resize",a,!1)};else{let t=new window.ResizeObserver(e=>{e.length&&a()});return t.observe(e,{box:n}),()=>{e&&t.unobserve(e)}}},[t,n])}let vK="u">typeof document?window.visualViewport:null;function vG(e,t){if(e.button>0)return!1;let n=mK(e);if(n){let e=n.ownerDocument;if(!e||!mz(e.documentElement,n)||n.closest("[data-react-aria-top-layer]"))return!1}return!!t.current&&!e.composedPath().includes(t.current)}let vZ=[],vY=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function vq(e){return e instanceof HTMLInputElement&&!vY.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}let vJ="u">typeof document&&window.visualViewport,vX=0;function vQ(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function v0(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function v1(e,t){t||!vJ?v4(e):vJ.addEventListener("resize",()=>v4(e),{once:!0})}function v4(e){let t=document.scrollingElement||document.documentElement,n=e;for(;n&&n!==t;){let e=h4(n);if(e!==document.documentElement&&e!==document.body&&e!==n){let t=e.getBoundingClientRect(),r=n.getBoundingClientRect();if(r.top<t.top||r.bottom>t.top+n.clientHeight){let n=t.bottom;vJ&&(n=Math.min(n,vJ.offsetTop+vJ.height));let a=r.top-t.top-((n-t.top)/2-r.height/2);e.scrollTo({top:Math.max(0,Math.min(e.scrollHeight-e.clientHeight,e.scrollTop+a)),behavior:"smooth"})}}n=e.parentElement}}var v2={};function v3(e){var t;let{onDismiss:n,...r}=e,a=hY(r,fz((t=v2)&&t.__esModule?t.default:t,"@react-aria/overlays").format("dismiss"));return lu().createElement(hQ,null,lu().createElement("button",{...a,tabIndex:-1,onClick:()=>{n&&n()},style:{width:1,height:1}}))}function v6(e,t,n){ms(()=>{if(t&&e.current){if(!("getAnimations"in e.current))return void n();let t=e.current.getAnimations();if(0===t.length)return void n();let r=!1;return Promise.allSettled(t.map(e=>e.finished)).then(()=>{r||(0,pK.flushSync)(()=>{n()})}),()=>{r=!0}}},[e,t,n])}v2={"ar-AE":{dismiss:"تجاهل"},"bg-BG":{dismiss:"Отхвърляне"},"cs-CZ":{dismiss:"Odstranit"},"da-DK":{dismiss:"Luk"},"de-DE":{dismiss:"Schlie\xdfen"},"el-GR":{dismiss:"Απόρριψη"},"en-US":{dismiss:"Dismiss"},"es-ES":{dismiss:"Descartar"},"et-EE":{dismiss:"L\xf5peta"},"fi-FI":{dismiss:"Hylk\xe4\xe4"},"fr-FR":{dismiss:"Rejeter"},"he-IL":{dismiss:"התעלם"},"hr-HR":{dismiss:"Odbaci"},"hu-HU":{dismiss:"Elutas\xedt\xe1s"},"it-IT":{dismiss:"Ignora"},"ja-JP":{dismiss:"閉じる"},"ko-KR":{dismiss:"무시"},"lt-LT":{dismiss:"Atmesti"},"lv-LV":{dismiss:"Nerādīt"},"nb-NO":{dismiss:"Lukk"},"nl-NL":{dismiss:"Negeren"},"pl-PL":{dismiss:"Zignoruj"},"pt-BR":{dismiss:"Descartar"},"pt-PT":{dismiss:"Dispensar"},"ro-RO":{dismiss:"Revocare"},"ru-RU":{dismiss:"Пропустить"},"sk-SK":{dismiss:"Zrušiť"},"sl-SI":{dismiss:"Opusti"},"sr-SP":{dismiss:"Odbaci"},"sv-SE":{dismiss:"Avvisa"},"tr-TR":{dismiss:"Kapat"},"uk-UA":{dismiss:"Скасувати"},"zh-CN":{dismiss:"取消"},"zh-TW":{dismiss:"關閉"}};let v5=null,v9=new Set,v8=new Map,v7=!1,be=!1;function bt(e,t){for(let n of v9)n(e,t)}function bn(e){v7=!0,e.metaKey||!m7()&&e.altKey||e.ctrlKey||"Control"===e.key||"Shift"===e.key||"Meta"===e.key||(v5="keyboard",bt("keyboard",e))}function br(e){v5="pointer",("mousedown"===e.type||"pointerdown"===e.type)&&(v7=!0,bt("pointer",e))}function ba(e){ps(e)&&(v7=!0,v5="virtual")}function bo(e){e.target!==window&&e.target!==document&&e.isTrusted&&(v7||be||(v5="virtual",bt("virtual",e)),v7=!1,be=!1)}function bi(){v7=!1,be=!0}function bs(e){if("u"<typeof window||v8.get(mH(e)))return;let t=mH(e),n=mW(e),r=t.HTMLElement.prototype.focus;t.HTMLElement.prototype.focus=function(){v7=!0,r.apply(this,arguments)},n.addEventListener("keydown",bn,!0),n.addEventListener("keyup",bn,!0),n.addEventListener("click",ba,!0),t.addEventListener("focus",bo,!0),t.addEventListener("blur",bi,!1),"u">typeof PointerEvent?(n.addEventListener("pointerdown",br,!0),n.addEventListener("pointermove",br,!0),n.addEventListener("pointerup",br,!0)):(n.addEventListener("mousedown",br,!0),n.addEventListener("mousemove",br,!0),n.addEventListener("mouseup",br,!0)),t.addEventListener("beforeunload",()=>{bl(e)},{once:!0}),v8.set(t,{focus:r})}let bl=(e,t)=>{let n=mH(e),r=mW(e);t&&r.removeEventListener("DOMContentLoaded",t),v8.has(n)&&(n.HTMLElement.prototype.focus=v8.get(n).focus,r.removeEventListener("keydown",bn,!0),r.removeEventListener("keyup",bn,!0),r.removeEventListener("click",ba,!0),n.removeEventListener("focus",bo,!0),n.removeEventListener("blur",bi,!1),"u">typeof PointerEvent?(r.removeEventListener("pointerdown",br,!0),r.removeEventListener("pointermove",br,!0),r.removeEventListener("pointerup",br,!0)):(r.removeEventListener("mousedown",br,!0),r.removeEventListener("mousemove",br,!0),r.removeEventListener("mouseup",br,!0)),v8.delete(n))};function bu(e){let[t,n]=gY(e.isOpen,e.defaultOpen||!1,e.onOpenChange),r=(0,ll.useCallback)(()=>{n(!0)},[n]),a=(0,ll.useCallback)(()=>{n(!1)},[n]),o=(0,ll.useCallback)(()=>{n(!t)},[n,t]);return{isOpen:t,setOpen:n,open:r,close:a,toggle:o}}"u">typeof document&&("loading"!==(p=mW(void 0)).readyState?bs(void 0):p.addEventListener("DOMContentLoaded",()=>{bs(void 0)}));let bc=(0,ll.createContext)(null),bd=(0,ll.createContext)(null),bm=(0,ll.forwardRef)(function(e,t){[e,t]=mC(e,t,bc);let n=(0,ll.useContext)(vf),r=bu(e),a=null==e.isOpen&&null==e.defaultOpen&&n?n:r,o=function(e,t){let[n,r]=(0,ll.useState)(t?"open":"closed");switch(n){case"open":t||r("exiting");break;case"closed":case"exiting":t&&r("open")}let a="exiting"===n;return v6(e,a,(0,ll.useCallback)(()=>{r(e=>"exiting"===e?"closed":e)},[])),a}(t,a.isOpen)||e.isExiting||!1,i=(0,ll.useContext)(fn),{direction:s}=fE();if(i){let t=e.children;return"function"==typeof t&&(t=t({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),lu().createElement(lu().Fragment,null,t)}return!a||a.isOpen||o?lu().createElement(bp,{...e,triggerRef:e.triggerRef,state:a,popoverRef:t,isExiting:o,dir:s}):null});function bp({state:e,isExiting:t,UNSTABLE_portalContainer:n,...r}){var a,o;let i=(0,ll.useRef)(null),[s,l]=(0,ll.useState)(0),c=(0,ll.useRef)(null),d=(0,ll.useContext)(bd),m=d&&"SubmenuTrigger"===r.trigger;ms(()=>{i.current&&e.isOpen&&l(i.current.getBoundingClientRect().width)},[e.isOpen,i]);let{popoverProps:p,underlayProps:f,arrowProps:h,placement:g}=function(e,t){let{triggerRef:n,popoverRef:r,groupRef:a,isNonModal:o,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s,...l}=e,c="SubmenuTrigger"===l.trigger,{overlayProps:d,underlayProps:m}=function(e,t){let{onClose:n,shouldCloseOnBlur:r,isOpen:a,isDismissable:o=!1,isKeyboardDismissDisabled:i=!1,shouldCloseOnInteractOutside:s}=e,l=(0,ll.useRef)(void 0);(0,ll.useEffect)(()=>{if(a&&!vZ.includes(t))return vZ.push(t),()=>{let e=vZ.indexOf(t);e>=0&&vZ.splice(e,1)}},[a,t]);let u=()=>{vZ[vZ.length-1]===t&&n&&n()};!function(e){let{ref:t,onInteractOutside:n,isDisabled:r,onInteractOutsideStart:a}=e,o=(0,ll.useRef)({isPointerDown:!1,ignoreEmulatedMouseEvents:!1}),i=pH(e=>{n&&vG(e,t)&&(a&&a(e),o.current.isPointerDown=!0)}),s=pH(e=>{n&&n(e)});(0,ll.useEffect)(()=>{let e=o.current;if(r)return;let n=mW(t.current);if("u">typeof PointerEvent){let r=n=>{e.isPointerDown&&vG(n,t)&&s(n),e.isPointerDown=!1};return n.addEventListener("pointerdown",i,!0),n.addEventListener("click",r,!0),()=>{n.removeEventListener("pointerdown",i,!0),n.removeEventListener("click",r,!0)}}},[t,r])}({ref:t,onInteractOutside:o&&a?e=>{(!s||s(mK(e)))&&(vZ[vZ.length-1]===t&&e.stopPropagation(),l.current===t&&u()),l.current=void 0}:void 0,onInteractOutsideStart:e=>{let n=vZ[vZ.length-1];l.current=n,(!s||s(mK(e)))&&n===t&&e.stopPropagation()}});let{focusWithinProps:c}=p6({isDisabled:!r,onBlurWithin:e=>{!(!e.relatedTarget||yh(e.relatedTarget,yc))&&(!s||s(e.relatedTarget))&&n?.()}});return{overlayProps:{onKeyDown:e=>{"Escape"!==e.key||i||e.nativeEvent.isComposing||(e.stopPropagation(),e.preventDefault(),u())},...c},underlayProps:{}}}({isOpen:t.isOpen,onClose:t.close,shouldCloseOnBlur:!0,isDismissable:!o||c,isKeyboardDismissDisabled:i,shouldCloseOnInteractOutside:s},a??r),{overlayProps:p,arrowProps:f,placement:h,triggerAnchorPoint:g}=function(e){var t;let{direction:n}=fE(),{arrowSize:r,targetRef:a,overlayRef:o,arrowRef:i,scrollRef:s=o,placement:l="bottom",containerPadding:u=12,shouldFlip:c=!0,boundaryElement:d="u">typeof document?document.body:null,offset:m=0,crossOffset:p=0,shouldUpdatePosition:f=!0,isOpen:h=!0,onClose:g,maxHeight:y,arrowBoundaryOffset:v=0}=e,[b,w]=(0,ll.useState)(null),x=[f,l,o.current,a.current,i?.current,s.current,u,c,d,m,p,h,n,y,v,r],D=(0,ll.useRef)(vK?.scale);(0,ll.useEffect)(()=>{h&&(D.current=vK?.scale)},[h]);let E=(0,ll.useCallback)(()=>{var e;if(!1===f||!h||!o.current||!a.current||!d||vK?.scale!==D.current)return;let t=null;if(s.current&&mG(s.current)){let e=((e=document)=>e.activeElement)()?.getBoundingClientRect(),n=s.current.getBoundingClientRect();(t={type:"top",offset:(e?.top??0)-n.top}).offset>n.height/2&&(t.type="bottom",t.offset=(e?.bottom??0)-n.bottom)}let g=o.current;!y&&o.current&&(g.style.top="0px",g.style.bottom="",g.style.maxHeight=(window.visualViewport?.height??window.innerHeight)+"px");let b=function(e){let t,n,{placement:r,targetNode:a,overlayNode:o,scrollNode:i,padding:s,shouldFlip:l,boundaryElement:u,offset:c,crossOffset:d,maxHeight:m,arrowSize:p=0,arrowBoundaryOffset:f=0}=e,h="u">typeof document?window.visualViewport:null,g=o instanceof HTMLElement?function(e){let t=e.offsetParent;if(t&&t===document.body&&"static"===window.getComputedStyle(t).position&&!vW(t)&&(t=document.documentElement),null==t)for(t=e.parentElement;t&&!vW(t);)t=t.parentElement;return t||document.documentElement}(o):document.documentElement,y=g===document.documentElement,v=window.getComputedStyle(g).position,b=y?vV(a,!1):vU(a,g,!1);if(!y){let{marginTop:e,marginLeft:t}=window.getComputedStyle(a);b.top+=parseInt(e,10)||0,b.left+=parseInt(t,10)||0}let w=vV(o,!0),x={top:parseInt((t=window.getComputedStyle(o)).marginTop,10)||0,bottom:parseInt(t.marginBottom,10)||0,left:parseInt(t.marginLeft,10)||0,right:parseInt(t.marginRight,10)||0};w.width+=(x.left??0)+(x.right??0),w.height+=(x.top??0)+(x.bottom??0),i.scrollTop,i.scrollLeft,i.scrollWidth,i.scrollHeight;let D=vA(u,h),E=vA(g,h);if("BODY"!==u.tagName&&"HTML"!==u.tagName||y)n=("BODY"===u.tagName||"HTML"===u.tagName)&&y?{top:0,left:0,width:0,height:0}:vU(u,g,!1);else{let e=vB(g,!1);n={top:-(e.top-D.top),left:-(e.left-D.left),width:0,height:0}}return function(e,t,n,r,a,o,i,s,l,u,c,d,m,p,f,h,g){var y,v,b;let w,x,D,E=vI(e),{size:_,crossAxis:S,crossSize:k,placement:C,crossPlacement:P}=E,T=vL(t,i,n,E,u,c,l,d,p,f,s),R=u,N=vF(i,l,t,r,a+u,E,s,h);if(o&&n[_]>N){let e=vI(`${vR[C]} ${P}`),o=vL(t,i,n,e,u,c,l,d,p,f,s);vF(i,l,t,r,a+u,e,s,h)>N&&(E=e,T=o,R=u)}let O="bottom";"top"===E.axis?"top"===E.placement?O="top":"bottom"===E.placement&&(O="bottom"):"top"===E.crossAxis&&("top"===E.crossPlacement?O="bottom":"bottom"===E.crossPlacement&&(O="top"));let $=vj(S,T[S],n[k],i,s,a,l);T[S]+=$;let M=(y=T,v=n.height,b=O,w=(null!=y.top?y.top:s[v$.height]-(y.bottom??0)-v)-(s.scroll.top??0),x=h?l.top:0,D={top:Math.max(i.top+x,(g?.offsetTop??i.top)+x),bottom:Math.min(i.top+i.height+x,(g?.offsetTop??0)+(g?.height??0))},"top"!==b?Math.max(0,D.bottom-w-((r.top??0)+(r.bottom??0)+a)):Math.max(0,w+v-D.top-((r.top??0)+(r.bottom??0)+a)));m&&m<M&&(M=m),n.height=Math.min(n.height,M),$=vj(S,(T=vL(t,i,n,E,R,c,l,d,p,f,s))[S],n[k],i,s,a,l),T[S]+=$;let A={},j=t[S]-T[S]-r[vT[S]],I=j+.5*t[k],L=p/2+f,F="left"===vT[S]?(r.left??0)+(r.right??0):(r.top??0)+(r.bottom??0),B=n[k]-F-p/2-f,V=vk(I,t[S]+p/2-(T[S]+r[vT[S]]),t[S]+t[k]-p/2-(T[S]+r[vT[S]]));A[S]=vk(V,L,B),({placement:C,crossPlacement:P}=E),p?j=A[S]:"right"===P?j+=t[k]:"center"===P&&(j+=t[k]/2);let U="left"===C||"top"===C?n[_]:0,W={x:"top"===C||"bottom"===C?j:U,y:"left"===C||"right"===C?j:U};return{position:T,maxHeight:M,arrowOffsetLeft:A.left,arrowOffsetTop:A.top,placement:C,triggerAnchorPoint:W}}(r,b,w,x,s,l,D,E,n,c,d,!!v&&"static"!==v,m,p,f,mz(u,g),h)}({placement:(e=l,"rtl"===n?e.replace("start","right").replace("end","left"):e.replace("start","left").replace("end","right")),overlayNode:o.current,targetNode:a.current,scrollNode:s.current||o.current,padding:u,shouldFlip:c,boundaryElement:d,offset:m,crossOffset:p,maxHeight:y,arrowSize:r??(i?.current?vB(i.current,!0).width:0),arrowBoundaryOffset:v});if(!b.position)return;g.style.top="",g.style.bottom="",g.style.left="",g.style.right="",Object.keys(b.position).forEach(e=>g.style[e]=b.position[e]+"px"),g.style.maxHeight=null!=b.maxHeight?b.maxHeight+"px":"";let x=((e=document)=>e.activeElement)();if(t&&x&&s.current){let e=x.getBoundingClientRect(),n=s.current.getBoundingClientRect(),r=e[t.type]-n[t.type];s.current.scrollTop+=r-t.offset}w(b)},x);ms(E,x),ms(()=>(window.addEventListener("resize",t,!1),()=>{window.removeEventListener("resize",t,!1)}),[t=E]),vz({ref:o,onResize:E}),vz({ref:a,onResize:E});let _=(0,ll.useRef)(!1);ms(()=>{let e,t=()=>{_.current=!0,clearTimeout(e),e=setTimeout(()=>{_.current=!1},500),E()},n=()=>{_.current&&t()};return vK?.addEventListener("resize",t),vK?.addEventListener("scroll",n),()=>{vK?.removeEventListener("resize",t),vK?.removeEventListener("scroll",n)}},[E]);let S=(0,ll.useCallback)(()=>{_.current||g?.()},[g,_]);return!function(e){let{triggerRef:t,isOpen:n,onClose:r}=e;(0,ll.useEffect)(()=>{if(!n||null===r)return;let e=e=>{let n=mK(e);if(!t.current||n instanceof Node&&!mz(n,t.current)||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement)return;let a=r||vH.get(t.current);a&&a()};return window.addEventListener("scroll",e,!0),()=>{window.removeEventListener("scroll",e,!0)}},[n,r,t])}({triggerRef:a,isOpen:h,onClose:g&&S}),{overlayProps:{style:{position:b?"absolute":"fixed",top:b?void 0:0,left:b?void 0:0,zIndex:1e5,...b?.position,maxHeight:b?.maxHeight??"100vh"}},placement:b?.placement??null,triggerAnchorPoint:b?.triggerAnchorPoint??null,arrowProps:{"aria-hidden":"true",role:"presentation",style:{left:b?.arrowOffsetLeft,top:b?.arrowOffsetTop}},updatePosition:E}}({...l,targetRef:n,overlayRef:r,isOpen:t.isOpen,onClose:o&&!c?t.close:null});return!function(e={}){let{isDisabled:t}=e;ms(()=>{if(!t){let e,t,n,r,a,o,i,s;return 1==++vX&&(u=pn()?(t=vQ(document.documentElement,"overflow","hidden"),n=!1,r=document.createElement("style"),(a=pV())&&(r.nonce=a),r.textContent=`
39
39
  @layer {
40
40
  * {
41
41
  overscroll-behavior: contain;
42
42
  }
43
- }`.trim(),document.head.prepend(r),o=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&vz(t);o.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||vq(this,n)},i=mt(vY(document,"touchstart",t=>{let r=mV(t);e=hq(r)?r:hJ(r,!0),n=!1;let a=r.ownerDocument.defaultView.getSelection();a&&!a.isCollapsed&&a.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),vY(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),vY(document,"blur",e=>{let t=mV(e),n=e.relatedTarget;if(n&&vz(n))n.focus({preventScroll:!0}),vq(n,vz(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),i(),r.remove(),HTMLElement.prototype.focus=o}):mt((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?vZ(document.documentElement,"scrollbarGutter","stable"):vZ(document.documentElement,"paddingRight",`${s}px`)),vZ(document.documentElement,"overflow","hidden"))),()=>{0==--vG&&u()}}},[t])}({isDisabled:o||!t.isOpen}),(0,lr.useEffect)(()=>{if(t.isOpen&&r.current)if(o){var e,n,i=a?.current??r.current;let t=vw[vw.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}else{let t,o,i,s,l,u,c,d,m,p,f;return e=[a?.current??r.current],o=(n={shouldUseInert:!0})instanceof(t=mF(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&vv,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(mB(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=yn(mL(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&m(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)m(e),e=n.nextNode()}},m=e=>{let n=vb.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),vb.set(e,n+1))},vw.length&&vw[vw.length-1].disconnect(),d(i),(p=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>mB(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(i,{childList:!0,subtree:!0}),f={visibleNodes:l,hiddenNodes:u,observe(){p.observe(i,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},vw.push(f),()=>{for(let e of(p.disconnect(),u)){let t=vb.get(e);null!=t&&(1===t?(c(e,!1),vb.delete(e)):vb.set(e,t-1))}f===vw[vw.length-1]?(vw.pop(),vw.length&&vw[vw.length-1].observe()):vw.splice(vw.indexOf(f),1)}}},[o,t.isOpen,r,a]),{popoverProps:my(d,p),arrowProps:f,underlayProps:m,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:m?d:c},e),y=r.popoverRef,v=function(e,t=!0){let[n,r]=(0,lr.useState)(!0),a=n&&t;return mn(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),v0(e,a,(0,lr.useCallback)(()=>r(!1),[])),a}(y,!!g)||r.isEntering||!1,b=mw({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!r.isNonModal||"SubmenuTrigger"===r.trigger,[x,D]=(0,lr.useState)(!1);mn(()=>{y.current&&D(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,lr.useEffect)(()=>{var e;let t,n;x&&y.current&&!y.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=mL(e=y.current)),"virtual"===v1?pE(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&mj(e)}):mj(e))},[x,y]);let E={...p.style,...b.style},_=la().createElement("div",{...my(mA(r),p),...b,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:y,slot:r.slot||void 0,style:E,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!r.isNonModal&&la().createElement(vQ,{onDismiss:e.close}),la().createElement(vy.Provider,{value:{...h,placement:g,ref:i}},b.children),la().createElement(vQ,{onDismiss:e.close}));return m?la().createElement(vs,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):la().createElement(vs,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&la().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),la().createElement("div",{ref:c,style:{display:"contents"}},la().createElement(bi.Provider,{value:c},_)))}function bu(e){return e?.start!=null&&null!=e.end}let bc=(0,lr.createContext)(null),bd=(0,lr.createContext)(null),bm=(0,lr.createContext)(null),bp=(0,lr.createContext)(null),bf=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mD(e,t,bc);let{validationBehavior:a}=mx(vf)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=ba(e),[n,r]=gH(e.value,e.defaultValue||null,e.onChange),[a]=(0,lr.useState)(n),o=n||e.placeholderValue||null,[i,s]=yX(o,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=e.shouldCloseOnSelect??!0,[d,m]=(0,lr.useState)(null),[p,f]=(0,lr.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),o&&!(i in o))throw Error("Invalid granularity "+i+" for value "+o.toString());let h=n?.calendar.identifier==="gregory"&&"BC"===n.era,g=(0,lr.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,lr.useMemo)(()=>yK(n,y,v,b,g),[n,y,v,b,g]),x=yF({...e,value:n,builtinValidation:w}),D=x.displayValidation.isInvalid,E=e.validationState||(D?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(hg(e)):hy(e,t)),m(null),f(null),x.commitValidation()};return{...x,value:n,defaultValue:e.defaultValue??a,setValue:r,dateValue:d,timeValue:p,setDateValue:n=>{let a="function"==typeof c?c():c;u?p||a?_(n,p||yq(e.defaultValue||e.placeholderValue)):m(n):(r(n),x.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):f(e)},granularity:i,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&_(d,p||yq(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:E,isInvalid:D,formatValue:(e,t)=>l?new fS(e,yY(t,g)).format(l):"",getDateFormatter:(e,t)=>new fS(e,yY({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,lr.useRef)(null),[l,u]=mE(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:m,buttonProps:p,dialogProps:f,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r;let a=mf(),o=mf(),i=mf(),s=fB((r=yE)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:m,descriptionProps:p,errorMessageProps:f}=yk({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=y_(t,n),g=m["aria-labelledby"]||m.id,{locale:y}=fv(),v=t.formatValue(y,{month:"long"}),b=h2(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=mA(e),D=(0,lr.useMemo)(()=>yv(n),[n]),E=(0,lr.useRef)(!1),{focusWithinProps:_}=p0({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mB(document.getElementById(o),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:my(x,h,m,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...d,onClick:()=>{D.focusFirst()}},fieldProps:{...m,id:i,[yR]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[yL]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:f,buttonProps:{...b,id:a,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${a} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:o,"aria-labelledby":`${a} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...m_(e),label:u,validationBehavior:o},i,s),[b,w]=(0,lr.useState)(null),x=(0,lr.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);vB({ref:s,onResize:x});let{focusProps:D,isFocused:E,isFocusVisible:_}=p1({within:!0}),S=mw({...e,values:{state:i,isFocusWithin:E,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=mA(e);return delete k.id,la().createElement(mb,{values:[[bm,i],[g8,{...c,ref:s,isInvalid:i.isInvalid}],[y8,m],[fe,{...p,isPressed:i.isOpen}],[vh,{...d,ref:l,elementType:"span"}],[gq,h],[vu,i],[bo,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[vl,f],[fr,{slots:{description:g,errorMessage:y}}],[vd,v]]},la().createElement("div",{...D,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),bh=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mD(e,t,bd);let{validationBehavior:a}=mx(vf)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=ba(e),[n,r]=gH(e.value,e.defaultValue||null,e.onChange),[a]=(0,lr.useState)(n),[o,i]=(0,lr.useState)(()=>n||{start:null,end:null});null==n&&o.start&&o.end&&i(o={start:null,end:null});let s=n||o,l=e=>{i(s=e||{start:null,end:null}),bu(s)?r(s):r(null)},[u,c]=yX(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,m=e.shouldCloseOnSelect??!0,[p,f]=(0,lr.useState)(null),[h,g]=(0,lr.useState)(null);s&&bu(s)&&(p=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(hg(e.start)):hy(e.start,t.start),end:"timeZone"in t.end?t.end.set(hg(e.end)):hy(e.end,t.end)}),f(null),g(null),k.commitValidation()},v=n=>{let r="function"==typeof m?m():m;d?bu(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||yq(e.placeholderValue),end:h?.end||yq(e.placeholderValue)}):f(n):bu(n)?(l(n),k.commitValidation()):f(n),r&&t.setOpen(!1)},b=e=>{bu(p)&&bu(e)?y(p,e):g(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,lr.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:D,maxValue:E,isDateUnavailable:_}=e,S=(0,lr.useMemo)(()=>{var e;let t;return e=s,t=yW(yK(e?.start??null,D,E,_,x),yK(e?.end??null,D,E,_,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=yW(t,{isInvalid:!0,validationErrors:[(fM.getGlobalDictionaryForPackage("@react-stately/datepicker")||yH).getStringForLocale("rangeReversed",yz())],validationDetails:{...yM,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,D,E,_,x]),k=yF({...e,value:n,name:(0,lr.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),C=k.displayValidation.isInvalid,P=e.validationState||(C?"invalid":null);return{...k,value:s,defaultValue:e.defaultValue??a,setValue:l,dateRange:p,timeRange:h,granularity:u,hasTime:d,setDate(e,t){"start"===e?v({start:t,end:p?.end??null}):v({start:p?.start??null,end:t})},setTime(e,t){"start"===e?b({start:t,end:h?.end??null}):b({start:h?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:v,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&bu(p)&&d&&y(p,{start:h?.start||yq(e.placeholderValue),end:h?.end||yq(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:C,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let a="timeZone"in s.start?s.start.timeZone:void 0,o=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),i="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=yY(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(a||"UTC"),d=s.end.toDate(i||"UTC"),m=new fS(t,u);if(a===i&&o===l&&0!==s.start.compare(s.end)){try{let e=m.formatRangeToParts(c,d),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let a=0;a<e.length;a++)a<t?n+=e[a].value:a>t&&(r+=e[a].value);return{start:n,end:r}}catch{}r=m}else r=new fS(t,yY(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:m.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new fS(e,yY({},{...x,...t}))}}({...e,validationBehavior:o}),s=(0,lr.useRef)(null),[l,u]=mE(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:m,endFieldProps:p,buttonProps:f,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,n){var r;let a=fB((r=yE)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yk({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=u["aria-labelledby"]||u.id,{locale:p}=fv(),f=t.formatValue(p,{month:"long"}),h=h2(f?a.format("selectedRangeDescription",{startDate:f.start,endDate:f.end}):""),g={"aria-label":a.format("startDate"),"aria-labelledby":m},y={"aria-label":a.format("endDate"),"aria-labelledby":m},v=mf(),b=mf(),w=y_(t,n),x=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,D=(0,lr.useMemo)(()=>yv(n,{accept:e=>e.id!==v}),[n,v]),E={[yN]:D,[yR]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},_=mA(e),S=(0,lr.useRef)(!1),{focusWithinProps:k}=p0({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mB(document.getElementById(b),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,lr.useRef)(yj),P=(0,lr.useRef)(yj);return{groupProps:my(_,w,u,h,k,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{D.focusFirst()}},buttonProps:{...h,id:v,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${v} ${m}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:b,"aria-labelledby":`${v} ${m}`},startFieldProps:{...g,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[yL]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(yW(e,P.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...y,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[yL]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(yW(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:o,validationErrors:i,validationDetails:s}}({...m_(e),label:u,validationBehavior:o},i,s),[w,x]=(0,lr.useState)(null),D=(0,lr.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);vB({ref:s,onResize:D});let{focusProps:E,isFocused:_,isFocusVisible:S}=p1({within:!0}),k=mw({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=mA(e);return delete C.id,la().createElement(mb,{values:[[bp,i],[g8,{...c,ref:s,isInvalid:i.isInvalid}],[fe,{...f,isPressed:i.isOpen}],[vh,{...d,ref:l,elementType:"span"}],[gJ,g],[vu,i],[bo,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[vl,h],[y8,{slots:{start:m,end:p}}],[fr,{slots:{description:y,errorMessage:v}}],[vd,b]]},la().createElement("div",{...E,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function bg(e){return la().createElement(fy,e)}function by(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof ha||e instanceof hi||e instanceof hs)return t?hv(e,t):e;{let n=uG()(e).toDate(),r=new ha(n.getFullYear(),n.getMonth()+1,n.getDate());return t?hv(r,t):r}}function bv(e){if(e)return e.toDate(hR())}function bb(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function bw(e){let t=e??"",n=bb(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function bx(){let e=window.i18next.language,t=bb(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;et=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;et=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var bD=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(et||"en-US"),bE=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},b_={};for(let e=1;e<100;e++)b_[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var bS={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},bk="[1234567890一二三四五六七八九〇\\d]",bC={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},bP={},bT={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},bR={zone:bT,year:b_,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},bN={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(bT).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},bO={...bN,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},b$={},bM=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=bD){return b$[t.toLowerCase()]||(b$[t.toLowerCase()]=new e(t)),b$[t.toLowerCase()]}constructor(e=bD){this.locale=e,this.lookups={...bR},this.vars={...bN};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=bC:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(bP[e])return bP[e];if("fullwide"===e||"hanidec"===e)return{group:bk,lookup:{...bC}};let t=bS[e];if(!t)return{group:"\\d",lookup:{...bC}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),a={};for(let e=0;e<10;e++)a[String.fromCharCode(t+e)]=e;return bP[e]={group:`[${n}-${r}]`,lookup:a},bP[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,bO)bO.hasOwnProperty(n)&&(this.vars[n]=bO[n].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((n,r)=>{["","k","kuu","kuuta"].forEach((a,o)=>{e[n+a+(o<2?"\\.?":"")]=!0,t[n+a]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let a of["full","long","medium"]){let o=Intl.DateTimeFormat(this.locale,{dateStyle:a});for(let i=0;i<12;i++){let s=o.formatToParts(n[i]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===a?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let a=Intl.DateTimeFormat(this.locale,{month:"short"});for(let o=0;o<12;o++){let i=a.formatToParts(n[o]).find(r).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=o+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let n=[],r={};for(let a of["long","short"]){let o=Intl.DateTimeFormat(this.locale,{weekday:a});for(let i=0;i<7;i++){let s=o.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===a?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=i}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},a=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let o=0;o<2;o++){let i=a.formatToParts(e[o]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);n.push(s),r[s]=12*o}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},bA=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],bj={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},bI=()=>new Date;function bL(e){return function(t){let n={};for(let r=0,a=e.length;r<a;r++){let a=e[r];a&&(n[a]=t[r])}return n}}var bF=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let a=t.match(e.regex);if(!a)continue;r=!0;let o=e.handler(a);if(o){for(let[e,t]of Object.entries(o))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,a.index)+t.slice(a.index+a[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},bB=["year","month","day","hour","minute","second","millisecond","offset"],bV={};function bU(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var bW=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],bH={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...bW],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:bW,id:bW,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function bz(e,t=bD){let n=function(e){if(!bV[e]){var t,n;let r,a,o=bM.factory(e);bV[e]=new bF({doneChecker:bU,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:bL(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:bL(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:bL(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${bk}{2,4})\\s*\u5E74\\s*(${bk}{1,2})\\s*\u6708\\s*(${bk}{1,2})\\s*\u65E5$`),handler:bL(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:bL(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:bL(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=bI(),n=e[1].toLowerCase();switch(n){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let r={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===n&&(r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()),console.log("today=>",n,r),r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?bj[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=bI();return"millisecond"===n?a.setUTCMilliseconds(a.getUTCMilliseconds()+t):"second"===n?a.setUTCSeconds(a.getUTCSeconds()+t):"minute"===n?a.setUTCMinutes(a.getUTCMinutes()+t):"hour"===n?a.setUTCHours(a.getUTCHours()+t):"day"===n?a.setUTCDate(a.getUTCDate()+t):"month"===n?a.setUTCMonth(a.getUTCMonth()+t):"year"===n&&a.setUTCFullYear(a.getUTCFullYear()+t),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:o.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:bL(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:bL(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:bL(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:bL(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:bL(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:bL(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:bL(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:bL(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:bL(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:bL(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:bL(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:bL(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:bL(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:bL(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:bL(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:bL(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:bL(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:bL(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:bL(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:bL(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:bL(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:bL(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:bL(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:bL(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:bL(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:bL(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:bL(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:bL(["zone"])}],a=o.baseName.slice(0,5),bA.includes(a)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=o,function(e){let t={};for(let[r,a]of Object.entries(e))if("monthname"===r){if(a){let e=n.monthNameToInt(a);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(a,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(a){let e=n.zoneToOffset(a);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(a);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(a);"number"==typeof e&&(t.millisecond=e)}else if(bB.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=b_[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return bV[e]}(t),r=function(e,t){let n=bH[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function bK(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new bE(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new bE(t.valueOf()-60*e.offset*1e3):t}function bG(e,t=bD){let n=bz(e,t),r=n.invalid?new bE(NaN):bK(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function bZ(e,t=bD){return e instanceof Date?new bE(e.valueOf()):"number"==typeof e?new bE(e):bG(e,t)}Date.fromString=bE.fromString=bG,Date.fromAny=bE.fromAny=bZ,"u">typeof window&&(window.anyDateParser={fromString:bG,fromAny:bZ,fromObject:bK,attempt:bz});var bY=n(4397),bq=n(7657);let bJ=function(e){return null==e};function bX(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}uG().extend(uZ),uG().extend(bq),uG().extend(bY);let bQ="YYYY-MM-DDTHH:mm:ss.SSSZZ";function b0(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&uG()(e,bQ).isValid()}function b1(e){return uG()(e).isToday()}function b4(e){return b0(e)?uG()(e,bQ).toDate():null}function b2(e,t=!1){let n=uG()(e);return t&&(n=n.utc()),n.format(bQ)}function b3(e){return uG()(e).toDate()}var b6=new WeakMap;let b5=new class{register(e,t){bX(this,b6).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(bX(this,b6).has(t))return bX(this,b6).get(t)}if(e.language&&bX(this,b6).has(e.language))return bX(this,b6).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return bX(this,b6).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,b6,{writable:!0,value:new Map})}};function b9(e,t){b5.register(e,t)}function b8(e){let t=e??bx();return b5.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let b7={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function we(e,t={}){let n=bz(e,bx());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!bJ(n.day)&&bJ(n.month)&&(n=Object.assign({},tp(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tp(n,"day"),{date:n.day}));let r=uG()().set(n).toDate();return bJ(n.year)&&(t.year=!1),bJ(n.month)&&(t.month=!1),bJ(n.date)&&(t.day=!1),wt(r,t)}function wt(e,t){let n,r=t?.locale??bx(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:m}={...b7,...{noToday:"am"===a.language},...t},p={calendar:o??b8(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:m},f=uG()(e).isToday();if(f&&!d)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===a.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,p).formatToParts(e);("en"===a.language||"am"===a.language)&&"standard"==i&&c&&l&&(t=t.map(wn("-"))),"wide"==i&&(t=t.map(wn(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||f&&"for today"===s)&&(n+=`, ${wr(e)}`),n}let wn=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function wr(e){return e.toLocaleTimeString(bx(),{hour:"2-digit",minute:"2-digit"})}function wa(e,t){return wt(e,{...t,time:!0})}function wo(e,t){let n=b8("string"==typeof t?new Intl.Locale(t):t);return n?hv(e,gA(n)):e}function wi(e,t){return new Intl.DurationFormat(bx(),t).format(e)}function ws(e,t){if(null==e)return null;if("string"==typeof e){let n=bz(e,bx());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tp(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tp(n,"day"),...{date:n.day}}),uG()(t).set(n))}return uG()(e)}let wl=["years","months","days","hours","minutes","seconds"],wu={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wc={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function wd(e,t=uG()(),n){let r,a=uG()(t),o=ws(e,a);if(null==o)return null;if("string"==typeof n){let e=wu[n]??n;return{[e]:a.diff(o,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?wu[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=wl.indexOf(n);for(let a=0;a<wl.length;a++){let o=wl[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):wu[s]??s,function(e,t,n,r){let a=wl.indexOf(n),o=wl.indexOf(r),i=wl.slice(a,o+1),s={},l=e;for(let e of i){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(o,a,e,t??e)}let u=(r=function(e){let t={...wc};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[wu[n]??n]=r);return t}(i),a.diff(o,"seconds")<r.seconds?"seconds":a.diff(o,"minutes")<r.minutes?"minutes":a.diff(o,"hours")<r.hours?"hours":a.diff(o,"days")<r.days?"days":a.diff(o,"months")<r.months?"months":"years");return{[u]:a.diff(o,u)}}let wm={style:"short",localeMatcher:"lookup"};function wp(e,t=uG()(),n){let r=wd(e,t,n);return null==r?null:wi(r,"object"==typeof n&&n.formatOptions?{...wm,...n.formatOptions}:wm)}let wf=(0,lr.createContext)(null);function wh(){let e=un({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,lr.useMemo)(()=>{let t=bx();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,lr.useMemo)(()=>{let e=b8(t);return void 0!==e?gA(e):void 0},[t]),r=(0,lr.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,lr.useMemo)(()=>n?hv(hk(hR()),n):hk(hR()),[n]);return{calendar:n,intlLocale:r,today_:a}}let wg=new ha(1793,1,1);var wy={};function wv(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function wb(e={}){let{locale:t}=fv();return(0,lr.useMemo)(()=>new(0,y2.K)(t,e),[t,e])}wy={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var ww={};ww={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let wx=()=>{};function wD(e){var t;let n=(0,lr.useRef)(void 0),{value:r,textValue:a,minValue:o,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:m,onDecrementPage:p,onDecrementToMin:f,onIncrementToMax:h}=e,g=fB((t=ww)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,lr.useRef)(!1),v=(0,lr.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=pF(()=>{v()});(0,lr.useEffect)(()=>()=>b(),[]);let w=(0,lr.useRef)(!1),x=()=>{w.current=!0},D=()=>{w.current=!1},E=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,lr.useEffect)(()=>{w.current&&(fb&&fb.clear("assertive"),fw(E,"assertive"))},[E]);let _=(0,lr.useCallback)(()=>{v()},[v]),S=pF(c??wx),k=pF(m??wx),C=pF(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=pF(e=>{b(),y.current=!0,n.current=window.setTimeout(C,e)}),T=pF(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(k(),R(60))}),R=pF(e=>{b(),y.current=!0,n.current=window.setTimeout(T,e)}),N=e=>{e.preventDefault()},{addGlobalListener:O,removeAllGlobalListeners:$}=pB(),M=(0,lr.useRef)(!1),[A,j]=(0,lr.useState)(null);(0,lr.useEffect)(()=>{"touch"===A?P(600):A&&P(400)},[A]);let[I,L]=(0,lr.useState)(null);return(0,lr.useEffect)(()=>{"touch"===I?R(600):I&&R(400)},[I]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":E,"aria-valuemin":o,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":m&&(e.preventDefault(),m?.());break;case"Home":f&&(e.preventDefault(),f?.());break;case"End":h&&(e.preventDefault(),h?.())}},onFocus:x,onBlur:D},incrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(c?.(),j("mouse")):(O(window,"pointercancel",_,{capture:!0}),M.current=!1,j("touch")),O(window,"contextmenu",N)},onPressUp:e=>{v(),"touch"===e.pointerType&&(M.current=!0),$(),j(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&M.current&&c?.(),M.current=!1,j(null)},onFocus:x,onBlur:D},decrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(m?.(),L("mouse")):(O(window,"pointercancel",_,{capture:!0}),M.current=!1,L("touch"))},onPressUp:e=>{v(),"touch"===e.pointerType&&(M.current=!0),$(),L(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&M.current&&m?.(),M.current=!1,L(null)},onFocus:x,onBlur:D}}}let wE=null;var w_=n(2103);function wS(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let a=t.toString().split("."),o=n.toString().split("."),i=Math.pow(10,Math.max(a[1]&&a[1].length||0,o[1]&&o[1].length||0));t=Math.round(t*i),n=Math.round(n*i),r=("+"===e?t+n:t-n)/i}return r}let wk=(0,lr.createContext)(null),wC=(0,lr.createContext)(null),wP=(0,lr.forwardRef)(function(e,t){var n,r;[e,t]=mD(e,t,wk);let{validationBehavior:a}=mx(vf)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=fv(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:a,value:o,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===o&&(o=NaN);let m=(0,lr.useCallback)(e=>void 0===r||isNaN(r)?vx(e,t,n):vE(e,t,n,r),[r,t,n]);void 0===o||isNaN(o)||"snap"!==d||(o=m(o)),isNaN(i)||"snap"!==d||(i=m(i));let[p,f]=gH(o,isNaN(i)?NaN:i,s),[h]=(0,lr.useState)(p),[g,y]=(0,lr.useState)(()=>isNaN(p)?"":new(0,y2.K)(l,a).format(p)),v=(0,lr.useMemo)(()=>new(0,w_.d)(l,a),[l,a]),b=(0,lr.useMemo)(()=>v.getNumberingSystem(g),[v,g]),w=(0,lr.useMemo)(()=>new(0,y2.K)(l,{...a,numberingSystem:b}),[l,a,b]),x=(0,lr.useMemo)(()=>w.resolvedOptions(),[w]),D=(0,lr.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=yF({...e,value:p}),_=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,k]=(0,lr.useState)(p),[C,P]=(0,lr.useState)(l),[T,R]=(0,lr.useState)(a);Object.is(p,S)&&l===C&&a===T||(y(D(p)),k(p),P(l),R(a));let N=(0,lr.useMemo)(()=>v.parse(g),[v,g]),O=(e,r=0)=>{if(isNaN(N))return vE(isNaN(r)?0:r,t,n,_);{let r=vE(N,t,n,_);return"+"===e&&r>N||"-"===e&&r<N?r:vE(wS(e,N,_),t,n,_)}},$=(0,lr.useMemo)(()=>!u&&!c&&(isNaN(N)||void 0===n||isNaN(n)||vE(N,t,n,_)>N||wS("+",N,_)<=n),[u,c,t,n,_,N]),M=(0,lr.useMemo)(()=>!u&&!c&&(isNaN(N)||void 0===t||isNaN(t)||vE(N,t,n,_)<N||wS("-",N,_)>=t),[u,c,t,n,_,N]);return{...E,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=O("+",t);e===p&&y(D(e)),f(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(f(vE(n,t,n,_)),E.commitValidation())},decrement:()=>{let e=O("-",n);e===p&&y(D(e)),f(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),E.commitValidation())},canIncrement:$,canDecrement:M,minValue:t,maxValue:n,numberValue:N,defaultNumberValue:isNaN(i)?h:i,setNumberValue:f,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=N;if(void 0!==e&&(n=v.parse(t)),!t.length){f(NaN),y(void 0===o?"":D(p));return}if(isNaN(n))return void y(D(p));let r="snap"===d?m(n):n,a=(r=v.parse(D(r)))!==p;f(r),y(D(void 0===o?r:p)),a&&E.commitValidation()}}}({...e,locale:i,validationBehavior:o}),l=(0,lr.useRef)(null),[u,c]=mE(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:m,inputProps:p,incrementButtonProps:f,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r,a,o,i,s,l,u,c,d;let m,{id:p,decrementAriaLabel:f,incrementAriaLabel:h,isDisabled:g,isReadOnly:y,isRequired:v,minValue:b,maxValue:w,autoFocus:x,label:D,formatOptions:E,onBlur:_=()=>{},onFocus:S,onFocusChange:k,onKeyDown:C,onKeyUp:P,description:T,errorMessage:R,isWheelDisabled:N,...O}=e,{increment:$,incrementToMax:M,decrement:A,decrementToMin:j,numberValue:I,inputValue:L,commit:F,commitValidation:B}=t,V=fB((r=wy)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,lr.useCallback)(()=>{let e=n.current?.value??"";(0,pV.flushSync)(()=>{F()}),n.current?.value!==e&&fw(n.current?.value??"","assertive")},[F,n]),W=mf(p),{focusProps:H}=pS({onBlur(){U()}}),z=wb(E),K=(0,lr.useMemo)(()=>z.resolvedOptions(),[z]),G=wb({...E,currencySign:void 0}),Z=(0,lr.useMemo)(()=>isNaN(I)?"":G.format(I),[G,I]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=wD({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:M,onDecrement:A,onDecrementToMin:j,value:I,textValue:Z}),[X,Q]=(0,lr.useState)(!1),{focusWithinProps:ee}=p0({isDisabled:g,onFocusWithinChange:Q});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,lr.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);hY(t,"wheel",r?void 0:a)}({onScroll:(0,lr.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?$():e.deltaY<0&&A())},[A,$]),isDisabled:N||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";m6()?en?er="text":et&&(er="decimal"):pe()&&(en?er="numeric":et&&(er="decimal"));let ea=mA(e),eo=(0,lr.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,pV.flushSync)(()=>{F()}),B()):e.continuePropagation())},[F,B]),{isInvalid:ei,validationErrors:es,validationDetails:el}=t.displayValidation,{labelProps:eu,inputProps:ec,descriptionProps:ed,errorMessageProps:em}=function(e,t,n){let r=pF(e=>{let r=n.current;if(!r)return;let a=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":a=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":a=r.value.slice(r.selectionStart);break;default:null!=e.data&&(a=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=a&&t.validate(a)||e.preventDefault()});(0,lr.useEffect)(()=>{if(!wv()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=wv()?null:e=>{let n=mV(e).value.slice(0,mV(e).selectionStart)+e.data+mV(e).value.slice(mV(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:o,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:o=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=gH(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=pT(e,t),d=yF({...e,value:l}),{isInvalid:m,validationErrors:p,validationDetails:f}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=yk({...e,isInvalid:m,errorMessage:e.errorMessage||p}),b=mA(e,{labelable:!0}),w={type:i,pattern:e.pattern},[x]=(0,lr.useState)(l);return yC(t,e.defaultValue??x,u),yP(e,d,t),{labelProps:h,inputProps:my(b,"input"===n?w:void 0,{disabled:r,readOnly:o,required:a&&"native"===s,"aria-required":a&&"aria"===s||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(mV(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(la().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:m,validationErrors:p,validationDetails:f}}(e,n),c=(0,lr.useRef)(null);return{inputProps:my(i,{onBeforeInput:a,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;c.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:a}=c.current;n.current.value=e,n.current.setSelectionRange(r,a),t.setInputValue(e)}}}),labelProps:o,descriptionProps:s,errorMessageProps:l,...u}}({...O,...ea,name:void 0,form:void 0,label:D,autoFocus:x,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[yL]:t,value:L,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:W,type:"text",inputMode:er,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:_,onFocus:S,onFocusChange:k,onKeyDown:(0,lr.useMemo)(()=>mt(eo,C),[eo,C]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=mV(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),F(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:T,errorMessage:R},t,n);yC(n,t.defaultNumberValue,t.setNumberValue),a=t,o=e.validationBehavior,i=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,mn(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!wE&&"u">typeof document&&((wE=document.createElement("input")).type="number"),!wE))return;wE.min=null==l||isNaN(l)?"":String(l),wE.max=null==u||isNaN(u)?"":String(u),wE.step=null==c||isNaN(c)?"":String(c),wE.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&wE.validity.valid,n=e.validationMessage||wE.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:wE.validity.rangeOverflow,rangeUnderflow:wE.validity.rangeUnderflow,stepMismatch:wE.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};a.updateValidation(r),"native"!==o||wE.validity.valid||e.setCustomValidity(wE.validationMessage)});let ep=my(Y,H,ec,{role:null,"aria-roledescription":m9()?null:V.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ep["aria-required"]=void 0);let ef=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},eh=e["aria-label"]||("string"==typeof e.label?e.label:"");eh||(m=null!=e.label?eu.id:e["aria-labelledby"]);let eg=mf(),ey=mf(),ev=my(q,{"aria-label":h||V.format("increase",{fieldLabel:eh}).trim(),id:m&&!h?eg:null,"aria-labelledby":m&&!h?`${eg} ${m}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ef}),eb=my(J,{"aria-label":f||V.format("decrease",{fieldLabel:eh}).trim(),id:m&&!f?ey:null,"aria-labelledby":m&&!f?`${ey} ${m}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ef});return{groupProps:{...ee,role:"group","aria-disabled":g,"aria-invalid":ei?"true":void 0},labelProps:eu,inputProps:ep,incrementButtonProps:ev,decrementButtonProps:eb,errorMessageProps:em,descriptionProps:ed,isInvalid:ei,validationErrors:es,validationDetails:el}}({...m_(e),label:c,validationBehavior:o},s,l),b=mw({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mA(e);return delete w.id,la().createElement(mb,{values:[[wC,s],[g8,m],[ye,{...p,ref:l}],[vh,{...d,ref:u}],[fe,{slots:{increment:f,decrement:h}}],[fr,{slots:{description:g,errorMessage:y}}],[vd,v]]},la().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&la().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function wT(e,t){return Number.parseInt(wt(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wR=(0,lr.forwardRef)(function(e,t){let{className:n}=e,r=(0,lr.useContext)(gX),a=(0,lr.useContext)(gQ),o=r??a,i=(0,lr.useContext)(wf),s=hR(),l=wt(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=wT(o.visibleRange.start.toDate(s),i),c=o.maxValue?wT(o.maxValue.toDate(s),i):void 0,d=o.minValue?wT(o.minValue.toDate(s),i):void 0,m=(0,lr.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,ca.jsxs)("span",{ref:t,className:n,children:[(0,ca.jsx)("span",{children:l}),(0,ca.jsxs)(wP,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:m,value:u,children:[(0,ca.jsx)(yt,{}),(0,ca.jsxs)(g7,{children:[(0,ca.jsx)(ft,{slot:"increment",children:(0,ca.jsx)(cj,{size:8})}),(0,ca.jsx)(ft,{slot:"decrement",children:(0,ca.jsx)(c$,{size:8})})]})]})]})}),wN="-esm-form-engine__datepicker-module__inputGroup___gBam-",wO="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",w$="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",wM="-esm-form-engine__datepicker-module__invalidText___A4cv4",wA="-esm-form-engine__datepicker-module__flatButton___HcpME",wj="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",wI="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",wL="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function wF({children:e}){let t=(0,lr.useContext)(bm),n=(0,lr.useContext)(bp),r=t??n,a=uA(()=>r?.close());return(0,ca.jsx)(vc,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:a,children:e})}let wB=(0,lr.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,ca.jsx)(bs,{ref:a,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,ca.jsx)(wF,{children:(0,ca.jsxs)(o?g1:g0,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,ca.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,ca.jsx)(ft,{className:ci()(wA,wj),slot:"previous",children:(0,ca.jsx)(cW,{size:16})}),(0,ca.jsx)(wR,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,ca.jsx)(ft,{className:ci()(wA,wj),slot:"next",children:(0,ca.jsx)(cH,{size:16})})]}),(0,ca.jsx)(g2,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,ca.jsx)(g9,{className:ci()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),wV=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(bm),[r,a]=mD({slot:e.slot},t,y8),{locale:o}=fv(),i=y9({...r,locale:o,createCalendar:gA}),s=(0,lr.useRef)(null),{fieldProps:l,inputProps:u}=yO({...r,inputRef:s},i,a),c=(0,lr.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,ca.jsxs)(mb,{values:[[y7,i],[ye,{...u,ref:s}],[g8,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,ca.jsx)(g7,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,n)=>(0,lr.cloneElement)(e.children(t),{key:n}))}),(0,ca.jsx)(yt,{})]})}),wU=(0,lr.forwardRef)(function(e,t){let n=(0,lr.useContext)(bm),r=(0,lr.useContext)(bp);return(n??r).isInvalid?(0,ca.jsx)(dX,{ref:t,size:16,...e}):(0,ca.jsx)(cO,{ref:t,size:16,...e})});class wW{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let wH=new Map,wz=(0,lr.forwardRef)(function({segment:e,...t},n){let r=(0,lr.useContext)(y7),a=d8(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,lr.useRef)(""),{locale:l,direction:u}=fv(),c=function(){var e;let{locale:t}=fv(),n=fF((e=yE)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,lr.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new wW(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:m,ariaDescribedBy:p,focusManager:f}=yT.get(t),h=e.isPlaceholder?"":e.text,g=(0,lr.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=fR({month:"long",timeZone:g.timeZone}),v=fR({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=wD({value:e.value??void 0,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,lr.useMemo)(()=>new(0,w_.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&f.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=w.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:D}=(r=function(e){let{locale:t}=fv(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(wH.has(n))return wH.get(n);let r=new Intl.Collator(t,e);return wH.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,lr.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),o=(0,lr.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),i=(0,lr.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,a=(t=t.normalize("NFC")).length;for(;n+a<=e.length;n++){let o=e.slice(n,n+a);if(0===r.compare(t,o))return!0}return!1},[r]),(0,lr.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),E=fR({hour:"numeric",hour12:!0}),_=(0,lr.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),S=(0,lr.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),k=fR({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,lr.useMemo)(()=>{if("era"!==e.type)return[];let n=hv(new ha(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),a=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(a)for(let e of r)e.formatted=e.formatted.slice(a);return r},[k,t.calendar,e.type]),P=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(D(_,n))t.setSegment("dayPeriod",0);else if(D(S,n))t.setSegment("dayPeriod",1);else break;f.focusNext();break;case"era":{let e=C.find(e=>D(e.formatted,n));e&&(t.setSegment("era",e.era),f.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(r))return;let a=w.parse(r),o=a;if(void 0!==e.maxValue&&a>e.maxValue&&(o=w.parse(n)),isNaN(a))return;t.setSegment(e.type,o),void 0!==e.maxValue&&(Number(a+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",f.focusNext()):s.current=r}}};hY((0,lr.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mB(n.current,e?.anchorNode)&&e.collapse(n.current)});let T=(0,lr.useRef)("");hY(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&P(r.data)}}),hY(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=T.current),null!=r&&(D(_,r)||D(S,r))&&P(r))}),mn(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(f.focusPrevious()||f.focusNext())}},[n,f]);let R=m9()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,lr.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let N=mf(),O=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),M=hH({"aria-label":`${$}${d?`, ${d}`:""}${m?", ":""}`,"aria-labelledby":m});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let A={caretColor:"transparent"};if("rtl"===u){A.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(A.direction="ltr")}return{segmentProps:my(b,M,{id:N,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:O,suppressContentEditableWarning:O,spellCheck:O?"false":void 0,autoCorrect:O?"off":void 0,[parseInt(la().version,10)>=17?"enterKeyHint":"enterkeyhint"]:O?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!O?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(m3()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",n.current&&h0(n.current,{containingElement:hJ(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:A,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,a),{focusProps:i,isFocused:s,isFocusVisible:l}=p1(),{hoverProps:u,isHovered:c}=p5({...t,isDisabled:r.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,lr.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:e??a,style:l||i?{...i,...l}:void 0,children:u??o,"data-rac":""}},[t,n,r,a,o,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),m=(0,lr.useCallback)(e=>{e.stopPropagation()},[]);return(0,ca.jsx)("span",{...my(mA(t),o,i,u),...d,ref:a,style:o.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:m})}),wK={short:!1,size:"md"},wG=(0,lr.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:a,invalid:o,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:m,onChange:p,onChangeRaw:f,short:h,size:g,value:y,...v}={...wK,...e},{calendar:b,intlLocale:w,today_:x}=wh(),D=(0,lr.useId)(),E=!!(u??l),_=(0,lr.useMemo)(()=>by(r,b),[r,b]),S=(0,lr.useMemo)(()=>by(y,b,!0),[y,b]),k=(0,lr.useMemo)(()=>by(d,b),[d,b]),C=(0,lr.useMemo)(()=>by(m??wg,b),[m,b]),P=(0,lr.useMemo)(()=>o||s,[o,s]),T=(0,lr.useMemo)(()=>(f&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>p?.(bv(e)))),[f,p]);return(0,ca.jsx)(bg,{locale:w.toString(),children:(0,ca.jsx)("div",{className:ci()("cds--form-item",n),children:(0,ca.jsx)(mb,{values:[[wf,w]],children:(0,ca.jsxs)(bf,{className:ci()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:T,children:[(0,ca.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,ca.jsx)(vg,{className:ci()("cds--label",{"cds--label--disabled":a}),htmlFor:D,children:u??l}),(0,ca.jsxs)(g7,{className:wN,children:[(0,ca.jsx)(wV,{id:E?D:void 0,ref:t,className:ci()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__inputWrapper___uKdT1",{"-esm-form-engine__datepicker-module__inputWrapperSm___0RXJc":"sm"===g,"-esm-form-engine__datepicker-module__inputWrapperMd___4Vff1":"md"===g||!g||0===g.length,"-esm-form-engine__datepicker-module__inputWrapperLg___VCRm5":"lg"===g}),children:e=>"era"!==e.type?(0,ca.jsx)(wz,{className:wO,segment:e}):(0,ca.jsx)(la().Fragment,{})}),(0,ca.jsx)(ft,{className:ci()(wA,{[wI]:"sm"===g,[wj]:"md"===g||!g||0===g.length,[wL]:"lg"===g}),children:(0,ca.jsx)(wU,{})})]}),(0,ca.jsx)(vm,{className:wM,children:i})]}),(0,ca.jsx)(wB,{variant:"single",today_:x})]})})})})}),wZ=(0,lr.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:a,isInvalid:o,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:m,size:p="md",value:f,...h},g){let{calendar:y,intlLocale:v,today_:b}=wh(),w=(0,lr.useId)(),x=!!(s??i),D=(0,lr.useMemo)(()=>{if(f)return{start:by(f[0],y,!1),end:by(f[1],y,!1)}},[f,y]),E=(0,lr.useMemo)(()=>{if(t)return{start:by(t[0],y,!1),end:by(t[1],y,!1)}},[t,y]),_=(0,lr.useMemo)(()=>by(c??wg,y,!0),[c,y]),S=(0,lr.useMemo)(()=>by(u,y,!0),[u,y]),k=(0,lr.useMemo)(()=>n||o,[n,o]),C=(0,lr.useMemo)(()=>(m&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>d?.([bv(e.start),bv(e.end)]))),[m,d]);return(0,ca.jsx)(bg,{locale:v.toString(),children:(0,ca.jsx)("div",{className:ci()("cds--form-item",e),children:(0,ca.jsx)(mb,{values:[[wf,v]],children:(0,ca.jsx)(bh,{id:x?w:void 0,className:ci()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:D,defaultValue:E,ref:g,isDisabled:a,...h,onChange:C,children:(0,ca.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,ca.jsx)(vg,{className:ci()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,ca.jsxs)(g7,{className:wN,children:[(0,ca.jsxs)("div",{className:ci()("-esm-form-engine__datepicker-module__inputsWrapper___xXRQI",{"-esm-form-engine__datepicker-module__inputsWrapperSm___nL+b6":"sm"===p,"-esm-form-engine__datepicker-module__inputsWrapperMd___Kgcps":"md"===p||!p||0===p.length,"-esm-form-engine__datepicker-module__inputsWrapperLg___raaSN":"lg"===p}),children:[(0,ca.jsx)(vt,{className:ci()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",w$),slot:"start",children:e=>(0,ca.jsx)(wz,{className:wO,segment:e})}),(0,ca.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,ca.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,ca.jsx)(vt,{className:ci()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",w$),slot:"end",children:e=>(0,ca.jsx)(wz,{className:wO,segment:e})})]}),(0,ca.jsx)(ft,{className:ci()(wA,{[wI]:"sm"===p,[wj]:"md"===p||!p||0===p.length,[wL]:"lg"===p}),children:(0,ca.jsx)(wU,{})})]}),(0,ca.jsx)(vm,{className:wM,children:r}),(0,ca.jsx)(wB,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),wY=({diagnoses:e})=>{let{diagnosisTags:t}=un({externalModuleName:"@openmrs/esm-styleguide"});return(0,ca.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:n,uuid:r,display:a}=e,o=t[1===n?"primaryColor":"secondaryColor"];return(0,ca.jsx)(cd.Tag,{type:o,children:a},r)})})},wq={action:"-esm-form-engine__empty-card-module__action___oG778",content:"-esm-form-engine__empty-card-module__content___YUXvR",desktopHeading:"-esm-form-engine__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-form-engine__empty-card-module__tabletHeading___8mc7w",tile:"-esm-form-engine__empty-card-module__tile___3-rRO"},wJ=({width:e="64",height:t="64"})=>(0,ca.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,ca.jsx)("use",{href:"#omrs-empty-data-illustration"})}),wX=e=>{let t="tablet"===uT(),n=e.launchForm;return(0,ca.jsx)(cd.Layer,{className:wq.layer,children:(0,ca.jsxs)(cd.Tile,{className:wq.tile,children:[(0,ca.jsx)("div",{className:t?wq.tabletHeading:wq.desktopHeading,children:(0,ca.jsx)("h4",{children:e.headerTitle})}),(0,ca.jsx)(wJ,{}),(0,ca.jsx)("p",{className:wq.content,children:aj("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,ca.jsx)("p",{className:wq.action,children:n&&(0,ca.jsx)(cd.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:aj("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},wQ=({error:e,headerTitle:t})=>{let n="tablet"===uT();return(0,ca.jsx)(cd.Layer,{children:(0,ca.jsxs)(cd.Tile,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,ca.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,ca.jsx)("h4",{children:t})}),(0,ca.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[aj("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,ca.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:aj("errorCopy")})]})})},w0=wQ,w1=la().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=uO(),i=window.location??{pathname:""},s=lv(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,ca.jsxs)(cd.SideNav,{"aria-label":aj("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,ca.jsx)(lx,{name:"global-nav-menu-slot"}),n?(0,ca.jsx)(l4,{value:a,fallback:(0,ca.jsx)(lx,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,ca.jsx)(lo.Provider,{value:a,children:(0,ca.jsx)(lx,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),w4=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,lr.useState)(""),s=(0,lr.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=ui()(t,aQ,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,lr.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&a}),[n,a,r,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:m,error:p,setPage:f}=function(e,t=0,n=""){let r=ua(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=ux()(function(n,a){if(a){let e=a.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let o=`${aq}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),n&&i.append("_getpagesoffset",""+n*t),e&&i.append("_tag",e),"string"==typeof r&&""!==r&&i.append("name:contains",r),o+i.toString()},aQ);return(0,lr.useMemo)(()=>({locations:a?.length?a?.flatMap(e=>e?.data?.entry??[]):[],isLoading:o,totalResults:a?.[0]?.data?.total,hasMore:!!a?.length&&a?.[a.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[o,a,i,s,l])}(n,r,o),h=(0,lr.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,lr.useCallback)(e=>{a(),i(e.trim())},[a]),y=uj((0,lr.useCallback)(()=>{!m&&d&&f(e=>e+1)},[m,d,f])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)(cd.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:aj("searchForLocation"),id:s,placeholder:aj("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,ca.jsx)(cd.InlineNotification,{kind:"error",subtitle:aj("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:aj("error","Error")})}),(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,ca.jsx)(cd.RadioButtonSkeleton,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:h.length>0?(0,ca.jsx)(cd.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,ca.jsx)(cd.RadioButton,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,ca.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,ca.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:aj("noResultsToDisplay")})})}),m&&(0,ca.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,ca.jsx)(cd.InlineLoading,{description:aj("loading")})})]})})]})},w2=B("modalState",{modalContainer:null,modalStack:[]}),w3=0;async function w6(e,t,n={}){let r=sH(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=w3++;a=await s7({...i,name:`${t}-${s}`},{...n,domElement:e})}else C(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function w5(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function w9(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function w8(e){return e.find(e=>!w5(e))}function w7(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xe=window.getComputedStyle(document.body).overflow;function xt({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xr),document.body.style.overflow="hidden",t.style.visibility="unset");let n=w8(e);e.forEach(e=>{switch(e.state){case"NEW":{let n=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=n,e.state="MOUNTING",w6(n,e.modalName,e.props).then(r=>{w5(e)?w9(e.modalName,r):r?(e.parcel=r,t.prepend(n),w7(e,w8(w2.getState().modalStack)===e),r.mountPromise.then(()=>{w5(e)||(e.state="MOUNTED")},t=>{C(t),e.parcel=null,xn(e)})):xn(e)},t=>{C(t),xn(e)});break}case"MOUNTING":case"MOUNTED":w7(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),w9(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=w2.getState();w2.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xe,removeEventListener("keydown",xr)}function xn(e){if(w5(e))return;e.state="TO_BE_DELETED";let t=w2.getState();w2.setState({...t,modalStack:[...t.modalStack]})}function xr(e){"Escape"===e.key&&function(){let[e]=w2.getState().modalStack;e&&xn(e)}()}function xa(e){w2.subscribe(xt),w2.setState({...w2.getState(),modalContainer:e})}function xo(e,t={},n=()=>{}){let r=()=>{let e=w2.getState().modalStack.find(e=>e.onClose===n);e&&xn(e)};if(sH(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=w2.getState()).modalStack],w2.setState({...o,modalStack:i})}else C(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var xi=n(5992);let xs=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,ca.jsx)(cd.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},xl=({subject:e})=>{let[t,n]=(0,lr.useState)([]);return(0,lr.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ca.jsx)(ca.Fragment,{children:t.map(e=>(0,ca.jsx)(xs,{notification:e},e.id))})},xu=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,lr.useState)(t);return(0,ca.jsx)(cd.ActionableNotification,{kind:a||"info",actionButtonLabel:c,ariaLabel:aj("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:aj("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},xc=({subject:e})=>{let[t,n]=(0,lr.useState)([]);return(0,lr.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ca.jsx)(ca.Fragment,{children:t.map(e=>(0,ca.jsx)(xu,{notification:e},e.id))})};class xd{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"listeners",new Set)}}let xm=new xd,xp=0,xf=new xd,xh=0;function xg(e){e&&(0,lD.createRoot)(e).render((0,ca.jsx)(xl,{subject:xm}))}function xy(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,xi.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{xm.next({...e,id:xp++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function xv(e){e&&(0,lD.createRoot)(e).render((0,ca.jsx)(xc,{subject:xf}))}function xb(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,xi.A)(t))?setTimeout(()=>{xf.next({...e,id:xh++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let xw=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],xx=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],xD={container:"-esm-form-engine__numeric-observation-module__container___gS0Wg",card:"-esm-form-engine__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-form-engine__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-form-engine__numeric-observation-module__critical-value___Jynsn",cell:"-esm-form-engine__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-form-engine__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-form-engine__numeric-observation-module__critically-low___XP+HX",high:"-esm-form-engine__numeric-observation-module__high___JV9do",low:"-esm-form-engine__numeric-observation-module__low___-uDKD","label-container":"-esm-form-engine__numeric-observation-module__label-container___vTf2y","value-container":"-esm-form-engine__numeric-observation-module__value-container___xTUIC",label:"-esm-form-engine__numeric-observation-module__label___-pfmb",value:"-esm-form-engine__numeric-observation-module__value___1A4zt",units:"-esm-form-engine__numeric-observation-module__units___SzvX+","pad-right":"-esm-form-engine__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-form-engine__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-form-engine__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-form-engine__numeric-observation-module__arrow___9bvsX"},xE=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,lr.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${aY}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${aY}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=ui()(n,aQ),i=r?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:a,isLoading:o}}(a||r?void 0:o,s),d=a??u,m=(0,lr.useMemo)(()=>{if(r)return r?"--"===r?"normal":xw.includes(r)?r.toLowerCase():xx.includes(r)?r:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[r,d,e,c])??"normal",p="critically_low"===m||"critically_high"===m||"off_scale_low"===m||"off_scale_high"===m,f="normal"!==m,h=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:aj("notAvailable","Not available"),w=ci()({[xD["critically-low"]]:"critically_low"===m||"off_scale_low"===m,[xD["critically-high"]]:"critically_high"===m||"off_scale_high"===m,[xD.low]:"low"===m,[xD.high]:"high"===m,[xD["off-scale-low"]]:"off_scale_low"===m,[xD["off-scale-high"]]:"off_scale_high"===m}),x=ci()({[xD.container]:!0,[xD.card]:!0,[xD["critical-value"]]:p,[xD["abnormal-value"]]:f&&!p}),D=ci()({[xD.cell]:!0,[w]:!0});return"cell"===i?(0,ca.jsxs)("div",{className:D,children:[b,v&&t?` ${t}`:""]}):(0,ca.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,ca.jsxs)("div",{className:xD["label-container"],children:[(0,ca.jsx)("span",{id:h,className:xD.label,children:n}),f&&(0,ca.jsx)("span",{className:xD[m.replace("_","-")],title:aj("abnormalValue","Abnormal value")})]}),(0,ca.jsxs)("div",{className:xD["value-container"],children:[(0,ca.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:xD.value,children:b}),v&&t&&(0,ca.jsx)("span",{id:y,className:xD.units,children:t})]})]})},x_="-esm-form-engine__page-header-module__pageHeader___6TOjO",xS=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,ca.jsx)("div",{className:ci()(x_,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,ca.jsx)("div",{className:ci()(x_,r),...a,children:(0,ca.jsx)(xk,{title:t,illustration:n})})}},xk=({title:e,illustration:t,className:n})=>{let[r,a]=(0,lr.useState)(null);return(0,lr.useEffect)(()=>{t3("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,ca.jsxs)("div",{className:ci()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,ca.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,ca.jsx)("p",{children:aj(r.implementationName)}),(0,ca.jsx)("p",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},xC=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=uF(t,e,r,o),u="tablet"===uT(),c=aj("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,ca.jsx)(ca.Fragment,{children:e>0&&(0,ca.jsxs)("div",{className:ci()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,ca.jsxs)("div",{children:[c,a&&(0,ca.jsx)(li,{to:a,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:i??aj("seeAll","See all")})]}),(0,ca.jsx)(cd.Pagination,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>aj("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function xP(e){return xR(xO(e,"usual","official"))}function xT(e){return xP(e)}function xR(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function xN(e){return xR(e)}function xO(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function x$(e,t=uG()()){let n=uG()(t),r=ws(e,n);if(null==r)return null;let a=n.diff(r,"hours"),o=n.diff(r,"days"),i=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),u={};if(a<2)u.minutes=n.diff(r,"minutes");else if(o<2)u.hours=a;else if(i<4)u.days=o;else if(l<1){let e=n.subtract(i,"weeks").diff(r,"days");u.weeks=i,u.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");u.months=s,u.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");u.years=l,u.months=e}else u.years=l;return u}function xM(e,t=uG()()){let n=x$(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),wi(n,r)}let xA={container:"-esm-form-engine__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-form-engine__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-form-engine__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-form-engine__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-form-engine__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-form-engine__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-form-engine__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-form-engine__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-form-engine__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-form-engine__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-form-engine__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-form-engine__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-form-engine__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-form-engine__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-form-engine__patient-banner-patient-info-module__tag___InccN",gender:"-esm-form-engine__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-form-engine__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-form-engine__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-form-engine__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-form-engine__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function xj({showIdentifierLabel:e,type:t,value:n}){return(0,ca.jsx)("span",{className:xA.primaryIdentifier,children:(0,ca.jsxs)(cd.Tag,{className:xA.tag,type:"gray",children:[e&&t?.text&&(0,ca.jsxs)("span",{className:xA.label,children:[t.text,": "]}),(0,ca.jsx)("span",{className:xA.value,children:n})]})})}function xI({showIdentifierLabel:e,type:t,value:n}){return(0,ca.jsxs)(cd.FormLabel,{className:xA.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,ca.jsxs)("span",{className:xA.label,children:[t?.text,": "]}),(0,ca.jsx)("span",{className:xA.value,children:n})]})}function xL({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=un(),{primaryIdentifierCode:r}=uU(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,ca.jsx)(ca.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,ca.jsxs)(la().Fragment,{children:[(0,ca.jsx)("span",{className:xA.identifier,children:n?.coding?.[0]?.code===r?(0,ca.jsx)(xj,{showIdentifierLabel:t,type:n,value:e}):(0,ca.jsx)(xI,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,ca.jsx)("span",{className:xA.separator,children:"\xb7"})]},e)):""})}let xF={Female:c4,Male:c2,Other:c3,Unknown:c6},xB=({gender:e})=>{let t=xF[e];return t?(0,ca.jsx)(t,{fill:"#525252"}):null},xV={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function xU({patient:e,renderedFrom:t}){var n;let r,a,o=xP(e),i=e?.gender&&(a=xV[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:aj(r,n),iconKey:a}),s=(0,lr.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,ca.jsxs)("div",{className:xA.patientInfo,children:[(0,ca.jsx)("div",{className:ci()(xA.row,xA.patientNameRow),children:(0,ca.jsxs)("div",{className:xA.flexRow,children:[(0,ca.jsx)("span",{className:xA.patientName,children:o}),i&&(0,ca.jsxs)("div",{className:xA.gender,children:[(0,ca.jsx)(xB,{gender:i.iconKey}),(0,ca.jsx)("span",{children:i.displayText})]}),(0,ca.jsx)(lx,{className:xA.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,ca.jsxs)("div",{className:xA.demographics,children:[e.birthDate&&(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)("span",{children:xM(e.birthDate)}),(0,ca.jsx)("span",{className:xA.separator,children:"\xb7"}),(0,ca.jsx)("span",{children:we(e.birthDate,{time:!1})}),(0,ca.jsx)("span",{className:xA.separator,children:"\xb7"})]}),(0,ca.jsx)(xL,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,ca.jsx)(lx,{className:xA.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xW=n(8282);function xH({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,lr.useState)(!1),{extensions:i}=lb(n),s="tablet"===uT(),l=uA(()=>o(!1),a),u=(0,lr.useRef)(null),c=(0,lr.useRef)(null),d=(0,lr.useId)(),m=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,f=(0,lr.useCallback)(()=>o(e=>!e),[]),h=(0,lr.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,lr.useCallback)(e=>{if("Escape"===e.key&&a){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&a){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let a=r+("ArrowDown"===e.key?1:-1),o=a<0?t.length-1:a>=t.length?0:a;t[o]?.focus()}},[h,a]);(0,lr.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,lr.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,ca.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,ca.jsxs)("div",{"data-overflow-menu":!0,className:ci()("cds--overflow-menu",cf),ref:l,children:[(0,ca.jsxs)("button",{className:ci()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},cy),"aria-controls":p,"aria-expanded":a,"aria-haspopup":"true",id:m,onClick:f,onKeyDown:g,ref:u,children:[(0,ca.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:aj("actions","Actions")})," ",(0,ca.jsx)(xW.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,ca.jsxs)("div",{className:ci()("cds--overflow-menu-options","cds--overflow-menu--flip",ch,{[cg]:a}),"aria-labelledby":m,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,ca.jsx)("ul",{className:ci()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,ca.jsx)(lx,{name:n,state:y},n)}),(0,ca.jsx)("span",{})]})]})})}var xz=n(5570),xK=n.n(xz);function xG(e){let{patientPhotoConceptUuid:t}=un({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${aY}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=lL()(e?n:null,aQ),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let xZ=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,lj.useTranslation)();return(0,ca.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,ca.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,ca.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},xY="-esm-form-engine__patient-photo-module__avatar___thboZ";function xq({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=xG(e),[o,i]=(0,lr.useState)(null),[s,l]=(0,lr.useState)(!1),u=(0,lr.useMemo)(()=>xK().generate(e),[e]);(0,lr.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(i(e),l(!1))},n.onerror=()=>{t||(i(null),l(!1))},n.src=e,()=>{t=!0}}i(null),l(!1)},[r?.imageSrc]);let c=(0,lr.useMemo)(()=>n||(o?aj("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):aj("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,ca.jsx)(cd.SkeletonIcon,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,ca.jsx)(xZ,{"aria-label":aj("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,ca.jsx)("div",{"aria-label":c,children:(0,ca.jsx)("img",{className:xY,src:o,alt:c,title:t})}):(0,ca.jsx)("div",{"aria-label":c,children:(0,ca.jsx)("div",{className:xY,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,ca.jsx)("span",{className:"-esm-form-engine__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let xJ=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],xX=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),xQ=xX,x0=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),x1=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),x4=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),x2=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),x3=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),x6=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),x5=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),x9=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),x8=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),x7=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),De=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Dt=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Dn=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Dr=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Da=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Do=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Di=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Ds=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Dl=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),Du=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Dc=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Dd=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Dm=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Dp=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Df=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Dh=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Dg=(0,lr.memo)((0,lr.forwardRef)(function(e,t){return(0,ca.jsx)(Dw,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),Dy=x8,Dv=Ds,Db=(0,lr.memo)((0,lr.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,lr.useRef)(document.getElementById(e));return(0,lr.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,ca.jsx)(l4,{value:a.current,fallback:t,children:(0,ca.jsx)(Dw,{ref:r,pictogram:e,pictogramProps:n})})})),Dw=(0,lr.memo)((0,lr.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,size:a}=Object.assign({},{size:92},t);return(a<=26||a>144)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 92.`),a=92),(0,ca.jsx)("svg",{ref:n,className:ci()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:a,width:a,children:(0,ca.jsx)("use",{href:`#${e}`})})})),Dx=({children:e})=>"tablet"===uT()?(0,ca.jsx)(cd.Layer,{children:e}):(0,ca.jsx)(ca.Fragment,{children:e}),DD=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:a=()=>{},isLowContrast:o="error"!==r,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==r,title:c,id:d,...m}=e,[p,f]=(0,lr.useState)(n),[h,g]=(0,lr.useState)(!0),[y,v]=(0,lr.useState)(!1),b=(0,lr.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,lr.useCallback)(()=>{v(!0),b()},[b]);return(0,lr.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,lr.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,ca.jsx)(cd.ActionableNotification,{actionButtonLabel:p,"aria-label":aj("closeSnackbar","Close snackbar"),className:ci()("-esm-form-engine__snackbar-module__slideIn___senVE",{"-esm-form-engine__snackbar-module__animated___8eltL":h,"-esm-form-engine__snackbar-module__slideOut___BIIXm":y}),kind:r,lowContrast:o,onActionButtonClick:()=>{a(),w(),i&&f(i)},onClose:b,statusIconDescription:aj("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...m})},DE=({subject:e})=>{let[t,n]=(0,lr.useState)([]),r=(0,lr.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,lr.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,ca.jsx)(ca.Fragment,{children:t.map(e=>(0,ca.jsx)(DD,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},D_=new xd,DS=0;function Dk(e){e&&(0,lD.createRoot)(e).render((0,ca.jsx)(DE,{subject:D_}))}function DC(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{D_.next({...e,id:DS++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let DP=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,lr.useCallback)(()=>{s(),t()},[t,s]);return(0,ca.jsx)("div",{children:(0,ca.jsx)(cd.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},DT=({subject:e})=>{let[t,n]=(0,lr.useState)([]),r=(0,lr.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,lr.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,ca.jsx)(ca.Fragment,{children:t.map(e=>(0,ca.jsx)(DP,{toast:e,closeToast:()=>r(e)},e.id))})},DR=new xd,DN=0;function DO(e){e&&(0,lD.createRoot)(e).render((0,ca.jsx)(DT,{subject:DR}))}function D$(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,xi.A)(t))?setTimeout(()=>{DR.next({...e,id:DN++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function DM(e,t=!1){if(t)return!0;let n=DF[e];return!n||!n()}function DA(e,t){let n=DG.getState()?.workspaceGroup,r=n?.name;r&&e===r&&DJ(()=>{let r=D4(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),DG.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function Dj(e,t){let{name:n,additionalProps:r}=t;sq(n);let a=()=>{DH(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>DI(n,r),closeWorkspaceGroup:!1})};DM(e.name)?a():DQ("closing-workspace-launching-new-workspace",a,e.title??e.name)}function DI(e,t){let n=sq(e),r=DG.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void DA(r.name,()=>{DI(e,t)});let a=DG.getState().workspaceGroup?.name,o={...n,title:D0(n,t),closeWorkspace:(t={})=>DH(e,t),closeWorkspaceWithSavedChanges:t=>DH(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(DF[n]=r)},setTitle:(t,n)=>{o.title=t,o.titleNode=n,DG.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?o:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:a,additionalProps:t??{}};function i(e,t){DG.setState(n=>{let r=[e,...t??n.openWorkspaces],a=Dq(e);return{...n,openWorkspaces:r,workspaceWindowState:a}})}a&&D4(a,t);let s=DG.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==o.type);if(0===s.length)i(o);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];i({...t,additionalProps:o.additionalProps,...t.title===D0(t,t.additionalProps)&&{title:D0(o,o.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,DG.getState().openWorkspaces.filter(e=>e.type!=o.type)),Dj(u,{name:e,additionalProps:t})):i(o);else Dj(s[0],{name:e,additionalProps:t})}function DL({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Dz(t),DI(n,r),aF({to:e})}let DF={};function DB(e,t){DF[e]=t}function DV(e){return DF[e]}function DU(){let e=DG.getState();DG.setState({...e,prompt:null})}let DW={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function DH(e,t={}){t={...DW,...t};let n=()=>{let n=DG.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),a=DG.getState().workspaceGroup?.name;a&&t.closeWorkspaceGroup&&DA(a),DF[e]=()=>!1,DG.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:Dq(r?.[0])})),t?.onWorkspaceClose?.()};return DM(e,t?.ignoreChanges)?(n(),!0):(DQ("closing-workspace",n,sq(e).title??e),!1)}function Dz(e){DG.getState().context!=e&&DG.setState({context:e,openWorkspaces:[],prompt:null})}let DK={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},DG=B("workspace",DK);function DZ(){return DG}function DY(e){let t=DG.getState();DG.setState({...t,workspaceWindowState:e})}function Dq(e){return e?.preferredWindowSize??"normal"}function DJ(e=()=>{},t=()=>!0){let n=DG.getState().openWorkspaces.filter(t).every(({name:e})=>DM(e)),r=()=>{D1(),e?.()};n?r():DQ("closing-all-workspaces",r)}function DX(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=ld(DG);return(0,lr.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function DQ(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:aj("unsavedChangesTitleText","Unsaved changes"),body:aj("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:aj("discard","Discard")};break;case"closing-all-workspaces":{let e=DG.getState().openWorkspaces.filter(({name:e})=>!DM(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:aj("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:aj("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:aj("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:aj("unsavedChangesTitleText","Unsaved changes"),body:aj("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{DG.setState(e=>({...e,prompt:null})),t?.()},confirmText:aj("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}DG.setState(e=>({...e,prompt:r}))}function D0(e,t){return t?.workspaceTitle??e.title}function D1(){DG.setState(DK)}function D4(e,t={}){if(!e||"default"===e)return;let n=U(e,{});return t&&n.setState(e=>({...e,...t})),n}let D2="-esm-form-engine__action-menu-button-module__container___F68g0",D3="-esm-form-engine__action-menu-button-module__elementContainer___D1ACn",D6="-esm-form-engine__action-menu-button-module__active___HAE75";function D5({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,ca.jsxs)(ca.Fragment,{children:[e({size:16}),t?(0,ca.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,ca.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__countTag___3mn9k",children:n})]})}let D9=({getIcon:e,label:t,iconDescription:n,handler:r,type:a,tagContent:o})=>{let i=uT(),{workspaces:s,workspaceWindowState:l}=DX(),u=s?.findIndex(({type:e})=>e===a)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===i||"phone"===i?(0,ca.jsxs)(cd.Button,{className:ci()(D2,{[D6]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,ca.jsx)("span",{className:D3,children:(0,ca.jsx)(D5,{formOpenInTheBackground:d,getIcon:e,tagContent:o})}),(0,ca.jsx)("span",{children:t})]}):(0,ca.jsx)(cd.IconButton,{align:"left","aria-label":n,className:ci()(D2,{[D6]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,ca.jsx)("div",{className:D3,children:(0,ca.jsx)(D5,{formOpenInTheBackground:d,getIcon:e,tagContent:o})})})};var D8=n(8742);let D7=la().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?la().createElement(D8.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},en||(en=la().createElement("path",{d:"M2 9L2 10 5.3 10 1 14.3 1.7 15 6 10.7 6 14 7 14 7 9zM14 7L14 6 10.7 6 15 1.7 14.3 1 10 5.3 10 2 9 2 9 7z"})),e):la().createElement(D8.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},er||(er=la().createElement("path",{d:"M4 18L4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18zM30 3.416L28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"})),e)});var Ee=n(4240),Et=n(8622),En=/[\\^$.*+?()[\]{}|]/g,Er=RegExp(En.source);let Ea=function(e){return(e=e8(e))&&Er.test(e)?e.replace(En,"\\$&"):e};function Eo({contextKey:e}){let{prompt:t}=DX();return(0,lr.useEffect)(()=>{RegExp(`/${Ea(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,lr.useEffect)(()=>(Dz(e),()=>{Dz(null)}),[e]),(0,lr.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,a=RegExp(`/${Ea(e)}(/|$)`),o=new URL(r),i=a.test(o.pathname),s=DG.getState().openWorkspaces.every(({name:e})=>DM(e));i||(s?D1():(n?.(),DJ(()=>{aF({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,ca.jsxs)(cd.ComposedModal,{open:!0,onClose:DU,children:[(0,ca.jsx)(cd.ModalHeader,{title:t.title}),(0,ca.jsx)(cd.ModalBody,{children:(0,ca.jsx)("p",{className:"-esm-form-engine__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,ca.jsxs)(cd.ModalFooter,{children:[(0,ca.jsx)(cd.Button,{kind:"secondary",onClick:DU,children:t.cancelText??aj("cancel")}),(0,ca.jsx)(cd.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??aj("confirm")})]})]}):null}function Ei(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Es(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ei(Object(n),!0).forEach(function(t){Eu(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ei(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function El(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Eu(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ec(e){return(Ec=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Ed(e,t){return(Ed=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Em(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ep=function(e){var t=lr.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&Ed(i,t);var n,r,a,o=(n=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Ec(i);e=n?Reflect.construct(t,arguments,Ec(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return Em(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),Eu(Em(t=o.call(this,e)),"handleRef",function(e){t.el=e}),Eu(Em(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),Eu(Em(t),"getParcelProps",function(){var e=Es(Es({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,Es({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return lP&&lP.Consumer?lr.createElement(lP.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=lP&&lP.Consumer?lr.createElement(lP.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return lr.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],El(i.prototype,r),a&&El(i,a),i}();Eu(Ep,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function Ef({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,lr.useState)(),a=function(e){let[t,n]=(0,lr.useState)({}),[r,a]=(0,lr.useState)(e);return(0,lr.useEffect)(()=>{r!==e&&a(e)},[e]),(0,lr.useEffect)(()=>{let e,t=D4(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,lr.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let o=(0,lr.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...a,...e.additionalProps},[e,t,a]);return n?(0,ca.jsx)(Ep,{config:n,mountParcel:lt,...o},e.name):(0,ca.jsx)(cd.InlineLoading,{className:"-esm-form-engine__workspace-module__loader___jEP+q",description:`${aj("loading","Loading")} ...`})}function Eh({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,a]=(0,lr.useState)(!1),o=(0,lr.useRef)(window.innerHeight),{featureName:i}=(0,lr.useContext)(lo),s=uT();(0,lr.useEffect)(()=>{let e=()=>{a(!uR(s)&&o.current>window.innerHeight),o.current!=window.innerHeight&&(o.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[o]);let l=`action-menu-${t&&"default"!=t?t:i}-items-slot`;return(0,ca.jsx)("aside",{className:ci()("-esm-form-engine__action-menu-module__sideRail___iVmKs",{"-esm-form-engine__action-menu-module__withinWorkspace___YZfet":e,"-esm-form-engine__action-menu-module__sideRailHidden___bCdyQ":r,"-esm-form-engine__action-menu-module__sideRailVisible___+oJCY":!r}),children:(0,ca.jsx)("div",{className:"-esm-form-engine__action-menu-module__container___sf6Et",children:(0,ca.jsx)(lx,{className:"-esm-form-engine__action-menu-module__chartExtensions___l+r+Y",name:l,state:n})})})}function Eg({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:a}){let o=uT(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=DX(),u=l?.name,c=i[0],d="hidden"===s||null==c,m=c?.width??(t?"wider":"narrow"),p=(0,lr.useMemo)(()=>n||u&&!d,[u,d,n]);return l7(!d&&!uR(o)),(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("div",{className:n?"-esm-form-engine__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-form-engine__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,ca.jsx)("aside",{className:ci()(t?"-esm-form-engine__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-form-engine__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-form-engine__workspace-module__hiddenRelative___7oRNR":d,"-esm-form-engine__workspace-module__narrowWorkspace___R3CN9":"narrow"===m,"-esm-form-engine__workspace-module__widerWorkspace___L-pDK":"wider"===m,"-esm-form-engine__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===m}),children:(0,ca.jsx)("div",{className:ci()("-esm-form-engine__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-form-engine__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-form-engine__workspace-module__hiddenFixed___kBFgl":d}),children:i.map((e,t)=>(0,ca.jsx)("div",{className:ci()("-esm-form-engine__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-form-engine__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,ca.jsx)(lr.Suspense,{fallback:null,children:(0,ca.jsx)(lj.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,ca.jsx)(Ey,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,ca.jsx)(Eo,{contextKey:e})]}),p&&(0,ca.jsx)(Eh,{name:u,isWithinWorkspace:!n,actionMenuProps:a})]})}function Ey({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,lj.useTranslation)(),r=uT(),{workspaceWindowState:a,workspaceGroup:o}=DX(),i=o?.name,s="maximized"===a;(0,lr.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,lr.useContext)(lo),u=(0,lr.useCallback)(()=>{DY(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:m="",closeWorkspace:p}=(0,lr.useMemo)(()=>e??{},[e]),f=(0,lr.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)(cd.Header,{"aria-label":aj("workspaceHeader","Workspace Header"),className:"-esm-form-engine__workspace-module__header___nMH1R",children:[!uR(r)&&!c&&(0,ca.jsx)(cd.HeaderMenuButton,{"aria-label":aj("close","Close"),renderMenuIcon:(0,ca.jsx)(cC,{}),onClick:()=>p()}),(0,ca.jsx)(cd.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,ca.jsx)("div",{className:"-esm-form-engine__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,ca.jsxs)(cd.HeaderGlobalBar,{className:"-esm-form-engine__workspace-module__headerButtons___lek95",children:[(0,ca.jsx)(lx,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:f}),(0,ca.jsx)(lx,{name:`workspace-header-type-${e.type}-slot`,state:f}),(0,ca.jsx)(lx,{name:`workspace-header-${l}-slot`,state:f}),uR(r)&&(0,ca.jsxs)(ca.Fragment,{children:[(d||s)&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":s?aj("minimize","Minimize"):aj("maximize","Maximize"),onClick:u,children:s?(0,ca.jsx)(D7,{}):(0,ca.jsx)(Ee.hz,{})}),c&&!i?(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("hide","Hide"),onClick:()=>DY("hidden"),children:(0,ca.jsx)(cP,{})}):(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("close","Close"),onClick:()=>p?.(),children:(0,ca.jsx)(cK,{})})]}),"tablet"===r&&c&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("close","Close"),onClick:()=>p?.(),children:(0,ca.jsx)(Et.d3,{})})]})]}),(0,ca.jsx)("div",{className:ci()("-esm-form-engine__workspace-module__workspaceContent___FFe+u",{"-esm-form-engine__workspace-module__marginWorkspaceContent___SEV31":!!m}),children:(0,ca.jsx)(Ef,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let Ev="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),Eb=new Uint8Array(16),Ew=[];for(let e=0;e<256;++e)Ew.push((e+256).toString(16).slice(1));let Ex=function(e,t,n){if(Ev&&!t&&!e)return Ev();let r=(e=e||{}).random??e.rng?.()??function(){if(!c){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(Eb)}();if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(Ew[e[t+0]]+Ew[e[t+1]]+Ew[e[t+2]]+Ew[e[t+3]]+"-"+Ew[e[t+4]]+Ew[e[t+5]]+"-"+Ew[e[t+6]]+Ew[e[t+7]]+"-"+Ew[e[t+8]]+Ew[e[t+9]]+"-"+Ew[e[t+10]]+Ew[e[t+11]]+Ew[e[t+12]]+Ew[e[t+13]]+Ew[e[t+14]]+Ew[e[t+15]]).toLowerCase()}(r)};async function ED(e,t){let{openedGroup:n}=sX.getState();if(n){if(n.groupName===e&&ES(n.props,t))return!0;else if(!await Ek({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return sX.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function EE(e){let{openedGroup:t,openedWindows:n}=sX.getState();if(t){if(n.length>0&&!(e||await Ek({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;sX.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function E_(e,t=null,n=null,r=null){let a=sX.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=sQ(e);if(!o)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=a,{name:s}=o,l=s0(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=s1(e);if(i&&(i.groupName!==l.name||!ES(i.props,r)))return!!await Ek({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(sX.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[EN(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let r=a.openedWindows[u],o=a.openedGroup?.props??{},i=a.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=r;if(ES(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&ES(d.props,t)?((i||u!==a.openedWindows.length-1)&&sX.setState(EC.restoreWindow(a,s)),!0):!!await Ek({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(sX.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[EN(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await Ek({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(sX.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[EN(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(sX.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[EN(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await Ek({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(sX.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[EN(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function ES(e,t){return null==e||null==t||R(e,t)}function Ek(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let a=e.openedWorkspaces[r];if(a.hasUnsavedChanges&&n.push(a),t&&a.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=sX.getState(),a=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":a=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":a=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===a.length?Promise.resolve(!0):new Promise(e=>{let t=xo("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:a.map(e=>r[e.workspaceName])})})}let EC={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),a=[...e.openedWindows],o={...a[r],maximized:n};return a[r]=o,{...e,openedWindows:a}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],a=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=s1(t);if(n<0)return e;let r={...e.openedWindows[n]},a=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),o=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,a);let i=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;o.splice(n,1),t&&o.length>0&&(i=!1)}else o[n]=r;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,t,n,r){let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);if(o.window!==a.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);let i=e.openedWindows.findIndex(e=>e.windowName===a.window);if(-1==i)throw Error(`Cannot open child workspace ${n} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${n} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==i?{...e,openedWorkspaces:[...u,EN(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=s1(t);if(r<0)return e;let a={...e.openedWindows[r]},o=a.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(o<0)return e;a.openedWorkspaces[o]={...a.openedWorkspaces[o],hasUnsavedChanges:n};let i=[...e.openedWindows];return i[r]=a,{...e,openedWindows:i}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function EP(){return lm(sX,EC)}let ET=()=>(0,lr.useContext)(lP),ER=()=>Object.keys(sX.getState().registeredWorkspacesByName);function EN(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Ex()}}let EO={workspaceOuterContainer:"-esm-form-engine__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-form-engine__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-form-engine__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-form-engine__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-form-engine__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-form-engine__workspace2-module__maximized___aKCbE",hidden:"-esm-form-engine__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-form-engine__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-form-engine__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-form-engine__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-form-engine__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-form-engine__workspace2-module__header___MXXx9",headerButtons:"-esm-form-engine__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-form-engine__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-form-engine__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-form-engine__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-form-engine__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-form-engine__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-form-engine__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},E$=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=uT(),{setWindowMaximized:a,hideWindow:o,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:m,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:f}=EP(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=ET(),b=s1(h),w=s[b],x=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,lr.useEffect)(()=>{x?.hasUnsavedChanges!=n&&i(h,n??!1)},[x?.hasUnsavedChanges,n,h,i]),(0,lr.useEffect)(()=>{m[h]!==e&&p(h,e)},[m,h,e,p]),b<0||null==l||null==x)return null;let D=u[l.groupName];if(!D)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[h].window,_=c[E];if(!_)throw Error(`Cannot find registered workspace window ${E}`);let{icon:S,canMaximize:k}=_,C="closable"===D.persistence,P=!!S&&!C,{maximized:T}=w,R=_?.width??"narrow",N=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),O=b<s.length-1||f;return(0,ca.jsxs)("div",{className:ci()(EO.workspaceOuterContainer,{[EO.narrowWorkspace]:"narrow"===R,[EO.widerWorkspace]:"wider"===R,[EO.extraWideWorkspace]:"extra-wide"===R,[EO.isActionMenuOpened]:N}),children:[(0,ca.jsx)("div",{className:ci()(EO.workspaceSpacer,{[EO.hidden]:O})}),(0,ca.jsx)("div",{className:ci()(EO.workspaceMiddleContainer,{[EO.maximized]:T,[EO.hidden]:O,[EO.isRootWorkspace]:g,[EO.showActionMenu]:v}),children:(0,ca.jsxs)("div",{className:ci()(EO.workspaceInnerContainer,{[EO.maximized]:T,[EO.hidden]:O,[EO.isRootWorkspace]:g}),children:[(0,ca.jsxs)(cd.Header,{"aria-label":aj("workspaceHeader"),className:EO.header,children:[(0,ca.jsx)(cd.HeaderName,{prefix:"",children:e}),(0,ca.jsx)("div",{className:EO.overlayHeaderSpacer}),(0,ca.jsx)(cd.HeaderGlobalBar,{className:EO.headerButtons,children:uR(r)?(0,ca.jsxs)(ca.Fragment,{children:[(k||T)&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":T?aj("minimize"):aj("maximize"),onClick:()=>a(E,!T),children:T?(0,ca.jsx)(D7,{}):(0,ca.jsx)(Ee.hz,{})}),P&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("hide"),onClick:()=>o(),children:(0,ca.jsx)(cP,{})}),!C&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("close"),onClick:()=>y({closeWindow:!0}),children:(0,ca.jsx)(cK,{})})]}):(0,ca.jsxs)(ca.Fragment,{children:[P&&(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("hide"),onClick:()=>o(),children:(0,ca.jsx)(Et.d3,{})}),(0,ca.jsx)(cd.HeaderGlobalAction,{"aria-label":aj("close"),onClick:()=>{C?EE():y({closeWindow:!0})},children:(0,ca.jsx)(cK,{})})]})})]}),(0,ca.jsx)("div",{className:ci()(EO.workspaceContent),children:t})]})})]})},EM="-esm-form-engine__action-menu-button2-module__container___pahg-",EA="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",Ej="-esm-form-engine__action-menu-button2-module__active___4O4Bs",EI="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function EL({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,ca.jsxs)(ca.Fragment,{children:[e({size:16}),t?(0,ca.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,ca.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let EF=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a})=>{let o=uT(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=EP(),{extension:c}=(0,lr.useContext)(lo),d=i.findIndex(e=>e.windowName===c?.extensionId),m=i[d],p=null!=m,f=p&&(d<i.length-1||u),h=p&&!f,g=m?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)f?s(m.windowName):l();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;E_(e,t,n)}};return"tablet"===o||"phone"===o?(0,ca.jsxs)(cd.Button,{className:ci()(EM,{[Ej]:p&&!h,[EI]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,ca.jsx)("span",{className:EA,children:(0,ca.jsx)(EL,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,ca.jsx)("span",{children:t})]}):(0,ca.jsx)(cd.IconButton,{align:"left","aria-label":t,className:ci()(EM,{[Ej]:p&&!h,[EI]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,ca.jsx)("div",{className:EA,children:(0,ca.jsx)(EL,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function EB({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,ca.jsx)(cd.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?cz:cU,children:e?aj("showLess","Show less"):aj("showMore","Show more")})}let EV={contactDetails:"-esm-form-engine__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-form-engine__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-form-engine__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-form-engine__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-form-engine__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-form-engine__patient-banner-contact-details-module__relationship___CZmay"},EU=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${aY}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=lL()(t,aQ),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,lr.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsxs)("p",{className:EV.heading,children:[aj("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,ca.jsx)(cd.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,ca.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>b3(e?.startDate).getTime()-b3(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,ca.jsx)("li",{children:(0,ca.jsx)(li,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,ca.jsx)("li",{children:"--"})})(),t.length>3&&(0,ca.jsx)("li",{className:EV.link,children:(0,ca.jsx)(li,{to:`${window.spaBase}/home/patient-lists`,children:aj("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},EW=({patientId:e})=>{let{patient:t,isLoading:n}=uV(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,ca.jsx)(cd.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)("p",{className:EV.heading,children:aj("address","Address")}),(0,ca.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,ca.jsxs)("li",{children:[aj(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,ca.jsxs)("li",{children:[aj(e,e),": ",t]},`address-${e}`)):(0,ca.jsx)("li",{children:"--"})})]})},EH=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=un({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=ui()(`${aY}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,aQ);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,lr.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,lr.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?aj(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)("p",{className:EV.heading,children:aj("contactDetails","Contact Details")}),t?(0,ca.jsx)(cd.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,ca.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,ca.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,ca.jsx)("li",{children:"--"})})]})},Ez=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${aY}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:a,isValidating:o}=lL()(e?t:null,aQ),i=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?i:null,error:r,isLoading:a,isValidating:o}}(e);return(0,ca.jsxs)(ca.Fragment,{children:[(0,ca.jsx)("p",{className:EV.heading,children:aj("relationships","Relationships")}),n?(0,ca.jsx)(cd.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,ca.jsx)("ul",{children:t&&t.length>0?(0,ca.jsx)(ca.Fragment,{children:t.map(e=>(0,ca.jsxs)("li",{className:EV.relationship,children:[(0,ca.jsx)("div",{children:(0,ca.jsx)(li,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,ca.jsx)("div",{children:e.relationshipType}),(0,ca.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?aj("yearAbbreviation","yr"):aj("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,ca.jsx)("li",{children:"--"})})]})};function EK({patientId:e,deceased:t}){return(0,ca.jsxs)("div",{className:ci()(EV.contactDetails,{[EV.deceased]:t}),children:[(0,ca.jsxs)("div",{className:EV.row,children:[(0,ca.jsx)("div",{className:EV.col,children:(0,ca.jsx)(EW,{patientId:e})}),(0,ca.jsx)("div",{className:EV.col,children:(0,ca.jsx)(EH,{patientUuid:e})})]}),(0,ca.jsxs)("div",{className:EV.row,children:[(0,ca.jsx)("div",{className:EV.col,children:(0,ca.jsx)(Ez,{patientId:e})}),(0,ca.jsx)("div",{className:EV.col,children:(0,ca.jsx)(EU,{patientUuid:e})})]})]})}function EG(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}let EZ="-esm-form-engine__action-menu2-module__container___5s3CM";function EY({workspaceGroup:e,groupProps:t}){let n=uT(),{persistence:r}=e;return(0,ca.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,ca.jsxs)("div",{className:EZ,children:["closable"==r&&uR(n)&&(0,ca.jsx)(cd.IconButton,{align:"left",onClick:()=>EE(),label:aj("close"),kind:"ghost",children:(0,ca.jsx)(cK,{})}),(0,ca.jsx)(lo.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,ca.jsx)(lx,{className:EZ,name:e.name,state:{groupProps:t}})})]})})}function Eq(e){let t=new URL(e,window.location.origin).pathname,n=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,r=n.endsWith("/")?n.slice(0,-1):n,a=null;return r?r===t?a="/":t.startsWith(`${r}/`)&&(a=t.slice(r.length)):a=t,{full:t,spaRelative:a}}let EJ=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:a,showActionMenu:o})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=EP(),u=(0,lr.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:a=!1}=e;return r?!!(a||await Ek({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(a||await Ek({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let a=t.workspaceName,{openedWorkspaces:o}=n,i=o.findIndex(e=>e.workspaceName===a);-1===i||i!==o.length-1&&o.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await Ek({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:o[i+1].workspaceName})||l(a,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:i&&i.props?i.props:null,workspaceMeta:sX.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:a,windowName:n.windowName,showActionMenu:o},[t,s,i,n]);if(!e){let{registeredWorkspacesByName:e}=sX.getState(),n=e[t.workspaceName],a=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=sX.getState(),l=a?s[a]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,ca.jsxs)("div",{className:ci()(EO.workspaceOuterContainer,{[EO.narrowWorkspace]:"narrow"===u,[EO.widerWorkspace]:"wider"===u,[EO.extraWideWorkspace]:"extra-wide"===u,[EO.isActionMenuOpened]:c}),children:[(0,ca.jsx)("div",{className:EO.workspaceSpacer}),(0,ca.jsx)("div",{className:ci()(EO.workspaceMiddleContainer,{[EO.isRootWorkspace]:r,[EO.showActionMenu]:o}),children:(0,ca.jsx)("div",{className:ci()(EO.workspaceInnerContainer,{[EO.isRootWorkspace]:r}),children:(0,ca.jsx)(cd.InlineLoading,{className:EO.loader,description:`${aj("loading")} ...`})})})]})}return(0,ca.jsx)(Ep,{config:e,mountParcel:lt,...u},t.workspaceName)},EX=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,a]=(0,lr.useState)({}),{registeredWorkspacesByName:o}=sX.getState();return(0,lr.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=o[e.workspaceName];return[e.uuid,await u2(t,n)]})).then(t=>{e||a(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,ca.jsx)(ca.Fragment,{children:n.map((a,o)=>(0,ca.jsx)(EJ,{openedWorkspace:a,openedWindow:e,lifeCycle:r[a.uuid],isRootWorkspace:0===o,isLeafWorkspace:o===n.length-1,showActionMenu:t},a.uuid))})};function EQ(e){e&&(0,lD.createRoot)(e).render((0,ca.jsx)(E0,{}))}function E0(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=EP();if((0,lr.useEffect)(()=>ie("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(EE().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=Eq(t),o=Eq(n);if(null===a.spaRelative||null===o.spaRelative)return!0;let i=r.exec(a.spaRelative),s=r.exec(o.spaRelative);if(i&&s||(i=r.exec(a.full),s=r.exec(o.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,o,i)&&a(EE().then(e=>!e))}),[e,n]),!e)return null;let a=n[e.groupName],o=t.some(e=>e.maximized),{name:i}=a,s=Object.values(r).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,ca.jsxs)("div",{className:ci()("-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-form-engine__workspace-windows-and-menu-module__overlay___fqI+X":a.overlay,"-esm-form-engine__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":o}),children:[(0,ca.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,ca.jsx)(EX,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,ca.jsx)(EY,{workspaceGroup:a,groupProps:e.props})]})}function E1(e,t,n){if(null==e)return n;let r=bb(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=bb(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}a.push({canonical:t,original:e})}let o=r;for(;o;){let e=a.find(e=>e.canonical===o);if(e)return e.original;let t=o+"-",n=a.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===o){o="fr-HT";continue}let r=o.lastIndexOf("-");if(-1===r)break;let i=(o=o.slice(0,r)).lastIndexOf("-");-1!==i&&o.length-i==2&&(o=o.slice(0,i))}return n}function E4(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function E2(e){return!!e&&e.constructor===Object}var E3=n(7229);function E6(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function E5(e,t){return E3(function(e){let t=e.indexOf("-");if(t>=0){let n=E6(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return E6(e)}(t),e,{includePrerelease:!0})}async function E9(e,t={}){let n,{shouldRetry:r,getDelay:a,onError:o}=t;r=r??(e=>e<=5),a=a??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await E8(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function E8(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function E7(e,t,n,r){}function _e(e){}function _t(e){return Promise.resolve([])}function _n(e){return Promise.resolve([])}function _r(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function _a(e){return()=>{}}function _o(){return!0}}}]);
43
+ }`.trim(),document.head.prepend(r),o=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(e){let t=((e=document)=>e.activeElement)(),n=null!=t&&vq(t);o.call(this,{...e,preventScroll:!0}),e&&e.preventScroll||v1(this,n)},i=mi(v0(document,"touchstart",t=>{let r=mK(t);e=h1(r)?r:h4(r,!0),n=!1;let a=r.ownerDocument.defaultView.getSelection();a&&!a.isCollapsed&&a.containsNode(r,!0)&&(n=!0),t.composedPath().some(e=>e instanceof HTMLInputElement&&"range"===e.type)&&(n=!0),"selectionStart"in r&&"selectionEnd"in r&&r.selectionStart<r.selectionEnd&&r.ownerDocument.activeElement===r&&(n=!0)},{passive:!1,capture:!0}),v0(document,"touchmove",t=>{if(2!==t.touches.length&&!n){if(!e||e===document.documentElement||e===document.body)return void t.preventDefault();e.scrollHeight===e.clientHeight&&e.scrollWidth===e.clientWidth&&t.preventDefault()}},{passive:!1,capture:!0}),v0(document,"blur",e=>{let t=mK(e),n=e.relatedTarget;if(n&&vq(n))n.focus({preventScroll:!0}),v1(n,vq(t));else if(!n){let e=t.parentElement?.closest("[tabindex]");e?.focus({preventScroll:!0})}},!0)),()=>{t(),i(),r.remove(),HTMLElement.prototype.focus=o}):mi((s=window.innerWidth-document.documentElement.clientWidth)>0&&("scrollbarGutter"in document.documentElement.style?vQ(document.documentElement,"scrollbarGutter","stable"):vQ(document.documentElement,"paddingRight",`${s}px`)),vQ(document.documentElement,"overflow","hidden"))),()=>{0==--vX&&u()}}},[t])}({isDisabled:o||!t.isOpen}),(0,ll.useEffect)(()=>{if(t.isOpen&&r.current)if(o){var e,n,i=a?.current??r.current;let t=vS[vS.length-1];return t&&!t.visibleNodes.has(i)?(t.visibleNodes.add(i),()=>{t.visibleNodes.delete(i)}):void 0}else{let t,o,i,s,l,u,c,d,m,p,f;return e=[a?.current??r.current],o=(n={shouldUseInert:!0})instanceof(t=mH(e?.[0])).Element?{root:n}:n,i=o?.root??document.body,s=o?.shouldUseInert&&vE,l=new Set(e),u=new Set,c=(e,n)=>{s&&e instanceof t.HTMLElement?e.inert=n:n?e.setAttribute("aria-hidden","true"):(e.removeAttribute("aria-hidden"),e instanceof t.HTMLElement&&(e.inert=!1))},d=e=>{for(let t of e.querySelectorAll("[data-live-announcer], [data-react-aria-top-layer]"))l.add(t);let t=e=>{if(u.has(e)||l.has(e)||e.parentElement&&u.has(e.parentElement)&&"row"!==e.parentElement.getAttribute("role"))return NodeFilter.FILTER_REJECT;for(let t of l)if(mz(e,t))return NodeFilter.FILTER_SKIP;return NodeFilter.FILTER_ACCEPT},n=ys(mW(e),e,NodeFilter.SHOW_ELEMENT,{acceptNode:t}),r=t(e);if(r===NodeFilter.FILTER_ACCEPT&&m(e),r!==NodeFilter.FILTER_REJECT){let e=n.nextNode();for(;null!=e;)m(e),e=n.nextNode()}},m=e=>{let n=v_.get(e)??0;(s&&e instanceof t.HTMLElement?e.inert:"true"===e.getAttribute("aria-hidden"))&&0===n||(0===n&&c(e,!0),u.add(e),v_.set(e,n+1))},vS.length&&vS[vS.length-1].disconnect(),d(i),(p=new MutationObserver(e=>{for(let n of e)if("childList"===n.type&&n.target.isConnected&&![...l,...u].some(e=>mz(e,n.target)))for(let e of n.addedNodes){var t;(e instanceof HTMLElement||e instanceof SVGElement)&&("true"===(t=e).dataset.liveAnnouncer||void 0!==t.dataset.reactAriaTopLayer)?l.add(e):e instanceof Element&&d(e)}})).observe(i,{childList:!0,subtree:!0}),f={visibleNodes:l,hiddenNodes:u,observe(){p.observe(i,{childList:!0,subtree:!0})},disconnect(){p.disconnect()}},vS.push(f),()=>{for(let e of(p.disconnect(),u)){let t=v_.get(e);null!=t&&(1===t?(c(e,!1),v_.delete(e)):v_.set(e,t-1))}f===vS[vS.length-1]?(vS.pop(),vS.length&&vS[vS.length-1].observe()):vS.splice(vS.indexOf(f),1)}}},[o,t.isOpen,r,a]),{popoverProps:mD(d,p),arrowProps:f,underlayProps:m,placement:h,triggerAnchorPoint:g}}({...r,offset:null!=(a=r.offset)?a:8,arrowSize:s,groupRef:m?d:c},e),y=r.popoverRef,v=function(e,t=!0){let[n,r]=(0,ll.useState)(!0),a=n&&t;return ms(()=>{if(a&&e.current&&"getAnimations"in e.current)for(let t of e.current.getAnimations())t instanceof CSSTransition&&t.cancel()},[e,a]),v6(e,a,(0,ll.useCallback)(()=>r(!1),[])),a}(y,!!g)||r.isEntering||!1,b=mS({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:g,isEntering:v,isExiting:t}}),w=!r.isNonModal||"SubmenuTrigger"===r.trigger,[x,D]=(0,ll.useState)(!1);ms(()=>{y.current&&D(w&&!y.current.querySelector("[role=dialog]"))},[y,w]),(0,ll.useEffect)(()=>{var e;let t,n;x&&y.current&&!y.current.contains(document.activeElement)&&(n=((e=document)=>e.activeElement)(t=mW(e=y.current)),"virtual"===v5?pP(()=>{((e=document)=>e.activeElement)(t)===n&&e.isConnected&&mV(e)}):mV(e))},[x,y]);let E={...p.style,...b.style},_=lu().createElement("div",{...mD(mB(r),p),...b,role:x?"dialog":void 0,tabIndex:x?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:y,slot:r.slot||void 0,style:E,dir:r.dir,"data-trigger":r.trigger,"data-placement":g,"data-entering":v||void 0,"data-exiting":t||void 0},!r.isNonModal&&lu().createElement(v3,{onDismiss:e.close}),lu().createElement(vD.Provider,{value:{...h,placement:g,ref:i}},b.children),lu().createElement(v3,{onDismiss:e.close}));return m?lu().createElement(vm,{...r,shouldContainFocus:x,isExiting:t,portalContainer:null!=(o=null!=n?n:null==d?void 0:d.current)?o:void 0},_):lu().createElement(vm,{...r,shouldContainFocus:x,isExiting:t,portalContainer:n},!r.isNonModal&&e.isOpen&&lu().createElement("div",{"data-testid":"underlay",...f,style:{position:"fixed",inset:0}}),lu().createElement("div",{ref:c,style:{display:"contents"}},lu().createElement(bd.Provider,{value:c},_)))}function bf(e){return e?.start!=null&&null!=e.end}let bh=(0,ll.createContext)(null),bg=(0,ll.createContext)(null),by=(0,ll.createContext)(null),bv=(0,ll.createContext)(null),bb=(0,ll.forwardRef)(function(e,t){var n,r;[e,t]=mC(e,t,bh);let{validationBehavior:a}=mk(vb)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bu(e),[n,r]=gY(e.value,e.defaultValue||null,e.onChange),[a]=(0,ll.useState)(n),o=n||e.placeholderValue||null,[i,s]=y2(o,e.granularity),l=null!=n?n.toDate(s??"UTC"):null,u="hour"===i||"minute"===i||"second"===i,c=e.shouldCloseOnSelect??!0,[d,m]=(0,ll.useState)(null),[p,f]=(0,ll.useState)(null);if(n&&(d=n,"hour"in n&&(p=n)),o&&!(i in o))throw Error("Invalid granularity "+i+" for value "+o.toString());let h=n?.calendar.identifier==="gregory"&&"BC"===n.era,g=(0,ll.useMemo)(()=>({granularity:i,timeZone:s,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:h}),[i,e.hourCycle,e.shouldForceLeadingZeros,s,e.hideTimeZone,h]),{minValue:y,maxValue:v,isDateUnavailable:b}=e,w=(0,ll.useMemo)(()=>yJ(n,y,v,b,g),[n,y,v,b,g]),x=yH({...e,value:n,builtinValidation:w}),D=x.displayValidation.isInvalid,E=e.validationState||(D?"invalid":null),_=(e,t)=>{r("timeZone"in t?t.set(hx(e)):hD(e,t)),m(null),f(null),x.commitValidation()};return{...x,value:n,defaultValue:e.defaultValue??a,setValue:r,dateValue:d,timeValue:p,setDateValue:n=>{let a="function"==typeof c?c():c;u?p||a?_(n,p||y1(e.defaultValue||e.placeholderValue)):m(n):(r(n),x.commitValidation()),a&&t.setOpen(!1)},setTimeValue:e=>{d&&e?_(d,e):f(e)},granularity:i,hasTime:u,...t,setOpen(r){!r&&!n&&d&&u&&_(d,p||y1(e.defaultValue||e.placeholderValue)),t.setOpen(r)},validationState:E,isInvalid:D,formatValue:(e,t)=>l?new fR(e,y0(t,g)).format(l):"",getDateFormatter:(e,t)=>new fR(e,y0({},{...g,...t}))}}({...e,validationBehavior:o}),s=(0,ll.useRef)(null),[l,u]=mP(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,fieldProps:m,buttonProps:p,dialogProps:f,calendarProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r;let a=mb(),o=mb(),i=mb(),s=fz((r=yP)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:l,validationErrors:u,validationDetails:c}=t.displayValidation,{labelProps:d,fieldProps:m,descriptionProps:p,errorMessageProps:f}=yN({...e,labelElementType:"span",isInvalid:l,errorMessage:e.errorMessage||u}),h=yT(t,n),g=m["aria-labelledby"]||m.id,{locale:y}=fE(),v=t.formatValue(y,{month:"long"}),b=h8(v?s.format("selectedDateDescription",{date:v}):""),w=[b["aria-describedby"],m["aria-describedby"]].filter(Boolean).join(" ")||void 0,x=mB(e),D=(0,ll.useMemo)(()=>yE(n),[n]),E=(0,ll.useRef)(!1),{focusWithinProps:_}=p6({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mz(document.getElementById(o),t.relatedTarget)||(E.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{E.current||(E.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}});return{groupProps:mD(x,h,m,b,_,{role:"group","aria-disabled":e.isDisabled||null,"aria-labelledby":g,"aria-describedby":w,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...d,onClick:()=>{D.focusFirst()}},fieldProps:{...m,id:i,[yA]:"presentation","aria-describedby":w,value:t.value,defaultValue:t.defaultValue,onChange:t.setValue,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,granularity:e.granularity,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior,[yW]:t,autoFocus:e.autoFocus,name:e.name,form:e.form},descriptionProps:p,errorMessageProps:f,buttonProps:{...b,id:a,"aria-haspopup":"dialog","aria-label":s.format("calendar"),"aria-labelledby":`${a} ${g}`,"aria-describedby":w,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:o,"aria-labelledby":`${a} ${g}`},calendarProps:{autoFocus:!0,value:t.dateValue,onChange:t.setDateValue,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,defaultFocusedValue:t.dateValue?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:l,validationErrors:u,validationDetails:c}}({...mT(e),label:u,validationBehavior:o},i,s),[b,w]=(0,ll.useState)(null),x=(0,ll.useCallback)(()=>{s.current&&w(s.current.offsetWidth+"px")},[]);vz({ref:s,onResize:x});let{focusProps:D,isFocused:E,isFocusVisible:_}=p5({within:!0}),S=mS({...e,values:{state:i,isFocusWithin:E,isFocusVisible:_,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DatePicker"}),k=mB(e);return delete k.id,lu().createElement(m_,{values:[[by,i],[yr,{...c,ref:s,isInvalid:i.isInvalid}],[vr,m],[fo,{...p,isPressed:i.isOpen}],[vw,{...d,ref:l,elementType:"span"}],[g1,h],[vf,i],[bc,{trigger:"DatePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":b}}],[vp,f],[fl,{slots:{description:g,errorMessage:y}}],[vg,v]]},lu().createElement("div",{...D,...k,...S,ref:t,slot:e.slot||void 0,"data-focus-within":E||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":_||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))}),bw=(0,ll.forwardRef)(function(e,t){var n,r;[e,t]=mC(e,t,bg);let{validationBehavior:a}=mk(vb)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",i=function(e){let t=bu(e),[n,r]=gY(e.value,e.defaultValue||null,e.onChange),[a]=(0,ll.useState)(n),[o,i]=(0,ll.useState)(()=>n||{start:null,end:null});null==n&&o.start&&o.end&&i(o={start:null,end:null});let s=n||o,l=e=>{i(s=e||{start:null,end:null}),bf(s)?r(s):r(null)},[u,c]=y2(s?.start||s?.end||e.placeholderValue||null,e.granularity),d="hour"===u||"minute"===u||"second"===u,m=e.shouldCloseOnSelect??!0,[p,f]=(0,ll.useState)(null),[h,g]=(0,ll.useState)(null);s&&bf(s)&&(p=s,"hour"in s.start&&(h=s));let y=(e,t)=>{l({start:"timeZone"in t.start?t.start.set(hx(e.start)):hD(e.start,t.start),end:"timeZone"in t.end?t.end.set(hx(e.end)):hD(e.end,t.end)}),f(null),g(null),k.commitValidation()},v=n=>{let r="function"==typeof m?m():m;d?bf(n)&&(r||h?.start&&h?.end)?y(n,{start:h?.start||y1(e.placeholderValue),end:h?.end||y1(e.placeholderValue)}):f(n):bf(n)?(l(n),k.commitValidation()):f(n),r&&t.setOpen(!1)},b=e=>{bf(p)&&bf(e)?y(p,e):g(e)},w=s?.start?.calendar.identifier==="gregory"&&"BC"===s.start.era||s?.end?.calendar.identifier==="gregory"&&"BC"===s.end.era,x=(0,ll.useMemo)(()=>({granularity:u,timeZone:c,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,shouldForceLeadingZeros:e.shouldForceLeadingZeros,showEra:w}),[u,e.hourCycle,e.shouldForceLeadingZeros,c,e.hideTimeZone,w]),{minValue:D,maxValue:E,isDateUnavailable:_}=e,S=(0,ll.useMemo)(()=>{var e;let t;return e=s,t=yZ(yJ(e?.start??null,D,E,_,x),yJ(e?.end??null,D,E,_,x)),e?.end!=null&&null!=e.start&&0>e.end.compare(e.start)&&(t=yZ(t,{isInvalid:!0,validationErrors:[(fF.getGlobalDictionaryForPackage("@react-stately/datepicker")||yY).getStringForLocale("rangeReversed",yq())],validationDetails:{...yF,rangeUnderflow:!0,rangeOverflow:!0,valid:!1}})),t},[s,D,E,_,x]),k=yH({...e,value:n,name:(0,ll.useMemo)(()=>[e.startName,e.endName].filter(e=>null!=e),[e.startName,e.endName]),builtinValidation:S}),C=k.displayValidation.isInvalid,P=e.validationState||(C?"invalid":null);return{...k,value:s,defaultValue:e.defaultValue??a,setValue:l,dateRange:p,timeRange:h,granularity:u,hasTime:d,setDate(e,t){"start"===e?v({start:t,end:p?.end??null}):v({start:p?.start??null,end:t})},setTime(e,t){"start"===e?b({start:t,end:h?.end??null}):b({start:h?.start??null,end:t})},setDateTime(e,t){"start"===e?l({start:t,end:s?.end??null}):l({start:s?.start??null,end:t})},setDateRange:v,setTimeRange:b,...t,setOpen(n){!n&&!(s?.start&&s?.end)&&bf(p)&&d&&y(p,{start:h?.start||y1(e.placeholderValue),end:h?.end||y1(e.placeholderValue)}),t.setOpen(n)},validationState:P,isInvalid:C,formatValue(t,n){let r;if(!s||!s.start||!s.end)return null;let a="timeZone"in s.start?s.start.timeZone:void 0,o=e.granularity||(s.start&&"minute"in s.start?"minute":"day"),i="timeZone"in s.end?s.end.timeZone:void 0,l=e.granularity||(s.end&&"minute"in s.end?"minute":"day"),u=y0(n,{granularity:o,timeZone:a,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,showEra:"gregory"===s.start.calendar.identifier&&"BC"===s.start.era||"gregory"===s.end.calendar.identifier&&"BC"===s.end.era}),c=s.start.toDate(a||"UTC"),d=s.end.toDate(i||"UTC"),m=new fR(t,u);if(a===i&&o===l&&0!==s.start.compare(s.end)){try{let e=m.formatRangeToParts(c,d),t=-1;for(let n=0;n<e.length;n++){let r=e[n];if("shared"===r.source&&"literal"===r.type)t=n;else if("endRange"===r.source)break}let n="",r="";for(let a=0;a<e.length;a++)a<t?n+=e[a].value:a>t&&(r+=e[a].value);return{start:n,end:r}}catch{}r=m}else r=new fR(t,y0(n,{granularity:l,timeZone:i,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle}));return{start:m.format(c),end:r.format(d)}},getDateFormatter:(e,t)=>new fR(e,y0({},{...x,...t}))}}({...e,validationBehavior:o}),s=(0,ll.useRef)(null),[l,u]=mP(!e["aria-label"]&&!e["aria-labelledby"]),{groupProps:c,labelProps:d,startFieldProps:m,endFieldProps:p,buttonProps:f,dialogProps:h,calendarProps:g,descriptionProps:y,errorMessageProps:v,...b}=function(e,t,n){var r;let a=fz((r=yP)&&r.__esModule?r.default:r,"@react-aria/datepicker"),{isInvalid:o,validationErrors:i,validationDetails:s}=t.displayValidation,{labelProps:l,fieldProps:u,descriptionProps:c,errorMessageProps:d}=yN({...e,labelElementType:"span",isInvalid:o,errorMessage:e.errorMessage||i}),m=u["aria-labelledby"]||u.id,{locale:p}=fE(),f=t.formatValue(p,{month:"long"}),h=h8(f?a.format("selectedRangeDescription",{startDate:f.start,endDate:f.end}):""),g={"aria-label":a.format("startDate"),"aria-labelledby":m},y={"aria-label":a.format("endDate"),"aria-labelledby":m},v=mb(),b=mb(),w=yT(t,n),x=[h["aria-describedby"],u["aria-describedby"]].filter(Boolean).join(" ")||void 0,D=(0,ll.useMemo)(()=>yE(n,{accept:e=>e.id!==v}),[n,v]),E={[yj]:D,[yA]:"presentation","aria-describedby":x,placeholderValue:e.placeholderValue,hideTimeZone:e.hideTimeZone,hourCycle:e.hourCycle,granularity:e.granularity,shouldForceLeadingZeros:e.shouldForceLeadingZeros,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isRequired:e.isRequired,validationBehavior:e.validationBehavior},_=mB(e),S=(0,ll.useRef)(!1),{focusWithinProps:k}=p6({...e,isDisabled:t.isOpen,onBlurWithin:t=>{mz(document.getElementById(b),t.relatedTarget)||(S.current=!1,e.onBlur?.(t),e.onFocusChange?.(!1))},onFocusWithin:t=>{S.current||(S.current=!0,e.onFocus?.(t),e.onFocusChange?.(!0))}}),C=(0,ll.useRef)(yV),P=(0,ll.useRef)(yV);return{groupProps:mD(_,w,u,h,k,{role:"group","aria-disabled":e.isDisabled||null,"aria-describedby":x,onKeyDown(n){!t.isOpen&&e.onKeyDown&&e.onKeyDown(n)},onKeyUp(n){!t.isOpen&&e.onKeyUp&&e.onKeyUp(n)}}),labelProps:{...l,onClick:()=>{D.focusFirst()}},buttonProps:{...h,id:v,"aria-haspopup":"dialog","aria-label":a.format("calendar"),"aria-labelledby":`${v} ${m}`,"aria-describedby":x,"aria-expanded":t.isOpen,isDisabled:e.isDisabled||e.isReadOnly,onPress:()=>t.setOpen(!0)},dialogProps:{id:b,"aria-labelledby":`${v} ${m}`},startFieldProps:{...g,...E,value:t.value?.start??null,defaultValue:t.defaultValue?.start,onChange:e=>t.setDateTime("start",e),autoFocus:e.autoFocus,name:e.startName,form:e.form,[yW]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){C.current=e,t.updateValidation(yZ(e,P.current))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},endFieldProps:{...y,...E,value:t.value?.end??null,defaultValue:t.defaultValue?.end,onChange:e=>t.setDateTime("end",e),name:e.endName,form:e.form,[yW]:{realtimeValidation:t.realtimeValidation,displayValidation:t.displayValidation,updateValidation(e){P.current=e,t.updateValidation(yZ(C.current,e))},resetValidation:t.resetValidation,commitValidation:t.commitValidation}},descriptionProps:c,errorMessageProps:d,calendarProps:{autoFocus:!0,value:t.dateRange?.start&&t.dateRange.end?t.dateRange:null,onChange:t.setDateRange,minValue:e.minValue,maxValue:e.maxValue,isDisabled:e.isDisabled,isReadOnly:e.isReadOnly,isDateUnavailable:e.isDateUnavailable,allowsNonContiguousRanges:e.allowsNonContiguousRanges,defaultFocusedValue:t.dateRange?void 0:e.placeholderValue,isInvalid:t.isInvalid,errorMessage:"function"==typeof e.errorMessage?e.errorMessage(t.displayValidation):e.errorMessage||t.displayValidation.validationErrors.join(" "),firstDayOfWeek:e.firstDayOfWeek,pageBehavior:e.pageBehavior},isInvalid:o,validationErrors:i,validationDetails:s}}({...mT(e),label:u,validationBehavior:o},i,s),[w,x]=(0,ll.useState)(null),D=(0,ll.useCallback)(()=>{s.current&&x(s.current.offsetWidth+"px")},[]);vz({ref:s,onResize:D});let{focusProps:E,isFocused:_,isFocusVisible:S}=p5({within:!0}),k=mS({...e,values:{state:i,isFocusWithin:_,isFocusVisible:S,isDisabled:e.isDisabled||!1,isInvalid:i.isInvalid,isOpen:i.isOpen},defaultClassName:"react-aria-DateRangePicker"}),C=mB(e);return delete C.id,lu().createElement(m_,{values:[[bv,i],[yr,{...c,ref:s,isInvalid:i.isInvalid}],[fo,{...f,isPressed:i.isOpen}],[vw,{...d,ref:l,elementType:"span"}],[g4,g],[vf,i],[bc,{trigger:"DateRangePicker",triggerRef:s,placement:"bottom start",style:{"--trigger-width":w}}],[vp,h],[vr,{slots:{start:m,end:p}}],[fl,{slots:{description:y,errorMessage:v}}],[vg,b]]},lu().createElement("div",{...E,...C,...k,ref:t,slot:e.slot||void 0,"data-focus-within":_||void 0,"data-invalid":i.isInvalid||void 0,"data-focus-visible":S||void 0,"data-disabled":e.isDisabled||void 0,"data-open":i.isOpen||void 0}))});function bx(e){return lu().createElement(fD,e)}function bD(e,t,n=!1){if(null==e)return n?e:void 0;if("string"==typeof e&&!e)return n?null:void 0;if(e instanceof hu||e instanceof hd||e instanceof hm)return t?hE(e,t):e;{let n=uX()(e).toDate(),r=new hu(n.getFullYear(),n.getMonth()+1,n.getDate());return t?hE(r,t):r}}function bE(e){if(e)return e.toDate(hA())}function b_(e){if("string"==typeof e&&0!==e.trim().length)try{return new Intl.Locale(e.replace(/[_@]/g,"-")).toString()}catch{return}}function bS(e){let t=e??"",n=b_(t);if(!n)return t;try{return new Intl.DisplayNames([n],{type:"language"}).of(n)??t}catch{return t}}function bk(){let e=window.i18next.language,t=b_(e)??e;return"ht"===t&&(t="fr-HT"),t}if("u">typeof navigator){let e=navigator;et=Array.isArray(e.languages)?e.languages[0]:e.language}else if("u">typeof process){let e=process.env;et=e.LC_ALL||e.LC_MESSAGES||e.LANG||e.LANGUAGE}var bC=function(e){e=(e=e.replace(/_/g,"-")).replace(/[.:][\w-]*$/,"");try{return new Intl.Locale(e).baseName}catch{return"en-US"}}(et||"en-US"),bP=class extends Date{invalid=null;isValid(){return!Number.isNaN(this.valueOf())}},bT={};for(let e=1;e<100;e++)bT[(e<=9?"0":"")+e]=e+(e>51?1900:2e3);var bR={arab:1632,arabext:1776,bali:6992,beng:2534,deva:2406,fullwide:65296,gujr:2790,khmr:6112,knda:3302,laoo:3792,limb:6470,mlym:3430,mong:6160,mymr:4160,orya:2918,tamldec:3046,telu:3174,thai:3664,tibt:3872},bN="[1234567890一二三四五六七八九〇\\d]",bO={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,"0":0,"1":1,"2":2,"3":3,"4":4,"5":5,"6":6,"7":7,"8":8,"9":9,〇:0,一:1,二:2,三:3,四:4,五:5,六:6,七:7,八:8,九:9},b$={},bM={"Eastern Daylight Time":-240,"Eastern Standard Time":-300,"Central Daylight Time":-300,"Central Standard Time":-360,"Mountain Daylight Time":-360,"Mountain Standard Time":-420,"Pacific Daylight Time":-420,"Pacific Standard Time":-480,"Coordinated Universal Time":0,ACDT:630,ACST:570,ACT:480,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,AMST:-180,AMT:-240,ART:-180,AST:180,AWDT:540,AWST:480,AZOST:-60,AZT:240,BDT:360,BIOT:360,BIT:-720,BOT:-240,BRST:-120,BRT:-180,BTT:360,CAT:120,CCT:390,CDT:-300,CEDT:120,CEST:120,CET:60,CHADT:825,CHAST:765,CHOT:480,ChST:600,CHUT:600,CIST:-480,CIT:480,CKT:-600,CLST:-180,CLT:-240,COST:-240,COT:-300,CST:-360,CT:480,CVT:-60,CXT:420,DAVT:420,DDUT:600,DFT:60,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEDT:180,EEST:180,EET:120,EGST:0,EGT:-60,EIT:540,EST:-300,FET:180,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GIT:-540,GMT:0,GST:-120,GYT:-240,HADT:-540,HAEC:120,HAST:-600,HKT:480,HMT:300,HOVT:420,HST:-600,IBST:0,ICT:420,IDT:180,IOT:180,IRDT:270,IRKT:480,IRST:210,IST:120,JST:540,KGT:360,KOST:660,KRAT:420,KST:540,LHST:630,LINT:840,MAGT:720,MART:-510,MAWT:300,MDT:-360,MET:60,MEST:120,MHT:720,MIST:660,MIT:-510,MMT:390,MSK:180,MST:-420,MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:660,NPT:345,NST:-150,NT:-150,NUT:-660,NZDT:780,NZST:720,OMST:360,ORAT:300,PDT:-420,PET:-300,PETT:720,PGT:600,PHOT:780,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PYST:-180,PYT:-240,RET:240,ROTT:-180,SAKT:660,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SLST:330,SRET:660,SRT:-180,SST:480,SYOT:180,TAHT:-600,THA:420,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TOT:780,TVT:720,UCT:0,ULAT:480,USZ1:120,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-240,VLAT:600,VOLT:240,VOST:360,VUT:660,WAKT:720,WAST:120,WAT:60,WEDT:60,WEST:60,WET:0,WIT:420,WST:480,YAKT:540,YEKT:300},bA={zone:bM,year:bT,meridiem:{am:0,pm:12,"a.m.":0,"p.m.":12},month:{january:1,jan:1,february:2,feb:2,march:3,mar:3,april:4,apr:4,may:5,june:6,jun:6,july:7,jul:7,august:8,aug:8,september:9,sep:9,october:10,oct:10,november:11,nov:11,december:12,dec:12},dayname:{sunday:0,sun:0,monday:1,mon:1,tuesday:2,tue:2,wednesday:3,wed:3,thursday:4,thu:4,friday:5,fri:5,saturday:6,sat:6},digit:{}},bj={MONTHNAME:"january|february|march|april|may|june|july|august|september|october|november|december|jan\\.?|feb\\.?|mar\\.?|apr\\.?|may\\.?|jun\\.?|jul\\.?|aug\\.?|sep\\.?|oct\\.?|nov\\.?|dec\\.?",DAYNAME:"sunday|monday|tuesday|wednesday|thursday|friday|saturday|sun\\.?|mon\\.?|tue\\.?|wed\\.?|thu\\.?|fri\\.?|sat\\.?",ZONE:"\\(?(?:"+Object.keys(bM).join("|")+")\\)?",MERIDIEM:"am|pm|a.m.|p.m.",ORDINAL:"st|nd|rd|th|\\.",YEAR:"\\d{4}|\\d{2}",YEAR2:"\\d{2}",YEAR4:"\\d{4}",YEAR6:"-\\d{6}|\\+?\\d{5,6}",MONTH:"1[0-2]|0?[1-9]",MONTH2:"1[0-2]|0[1-9]",DAY:"3[01]|[12]\\d|0?[1-9]",DAY2:"3[01]|[12]\\d|0[1-9]",OFFSET:"(?:GMT)?[\xb1−+-](?:[01]\\d[0-5]\\d|[01]\\d:[0-5]\\d|[01]?\\d)",H24:"[01]\\d|2[0-3]",H12:"0?[1-9]|1[012]",MIN:"[0-5]\\d",SEC:"[0-5]\\d|60",MS:"\\d{9}|\\d{6}|\\d{1,3}",GAP:"[\\s/.,-]{1,}"},bI={...bj,YEAR:"*{4}|*{2}",YEAR4:"*{4}",YEAR6:"-*{6}|\\+?*{5,6}",MONTH:"*{1,2}",MONTH2:"*{2}",DAY:"*{1,2}",DAY2:"*{2}",OFFSET:"(?:GMT)?[\xb1−+-](?:*{4}|*{2}:*{2}|*{1,2})",H24:"*{2}",H12:"*{1,2}",MIN:"*{2}",SEC:"*{2}",MS:"*{9}|*{6}|*{3}"},bL={},bF=class e{locale;lookups;vars;numberingSystem;baseName;dateOptions;static factory(t=bC){return bL[t.toLowerCase()]||(bL[t.toLowerCase()]=new e(t)),bL[t.toLowerCase()]}constructor(e=bC){this.locale=e,this.lookups={...bA},this.vars={...bj};let t=new Intl.NumberFormat(this.locale);this.numberingSystem=t.resolvedOptions().numberingSystem,this.dateOptions=new Intl.DateTimeFormat(this.locale).resolvedOptions(),this.baseName=new Intl.Locale(this.locale).baseName,this.build()}toInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;if("latn"===this.numberingSystem&&!this.baseName.startsWith("zh")){let t=parseInt(e,10);if(!isNaN(t))return t}let t="";for(let n=0;n<e.length;n++)t+=String(this.lookups.digit[e[n]]);return parseInt(t,10)}millisecondToInt(e){if("number"==typeof e)return e;if("string"!=typeof e)return;let t=e.slice(0,3);return 1===t.length?100*this.toInt(t):2===t.length?10*this.toInt(t):this.toInt(t)}monthNameToInt(e){if("string"!=typeof e)return;let t=e.toLocaleLowerCase(this.locale).replace(/\.$/,"");return this.lookups.month[t]||12}h12ToInt(e,t){if("string"!=typeof e)return;let n=this.lookups.meridiem[t?.toLowerCase()]||0,r=this.toInt(e);return r<12&&12===n&&(r+=12),12===r&&0===n&&(r=0),r}zoneToOffset(e){if("string"==typeof e)return e=e.replace(/[^a-z\s]/gi,""),this.lookups.zone[e]}offsetToMinutes(e){if("string"!=typeof e)return;let t=e.match(/^(?:GMT)?([±−+-])(..?):?(..)?$/);if(t){let[,e,n,r]=t;return("-"===e||"−"===e?-1:1)*(60*this.toInt(n)+this.toInt(r||0))}return 0}build(){"latn"===this.dateOptions.numberingSystem?this.lookups.digit=bO:this.buildNumbers(),/^en/i.test(this.locale)||(this.buildMonthNames(),this.buildDaynames(),/zh/i.test(this.locale)||this.buildMeridiems())}buildNumbers(){let{group:e,lookup:t}=function(e){if(b$[e])return b$[e];if("fullwide"===e||"hanidec"===e)return{group:bN,lookup:{...bO}};let t=bR[e];if(!t)return{group:"\\d",lookup:{...bO}};let n=String.fromCharCode(t),r=String.fromCharCode(t+9),a={};for(let e=0;e<10;e++)a[String.fromCharCode(t+e)]=e;return b$[e]={group:`[${n}-${r}]`,lookup:a},b$[e]}(this.numberingSystem);for(let n in this.lookups.digit=t,bI)bI.hasOwnProperty(n)&&(this.vars[n]=bI[n].replace(/\*/g,e))}buildMonthNames(){let e={},t={};if(/^fi/i.test(this.locale))"tammi|helmi|maalis|huhti|touko|kes\xe4|hein\xe4|elo|syys|loka|marras|joulu".split("|").forEach((n,r)=>{["","k","kuu","kuuta"].forEach((a,o)=>{e[n+a+(o<2?"\\.?":"")]=!0,t[n+a]=r+1})});else{let n=[],r=e=>"month"===e.type;for(let e=0;e<12;e++)n.push(new Date(2017,e,1));for(let a of["full","long","medium"]){let o=Intl.DateTimeFormat(this.locale,{dateStyle:a});for(let i=0;i<12;i++){let s=o.formatToParts(n[i]).find(r).value.toLocaleLowerCase(this.locale);/^\d+$/.test(s)||(/^ko/i.test(this.locale)&&(s+="월"),"medium"===a?(s=s.replace(/\.$/,""),e[`${s}\\.?`]=!0):e[s]=!0,t[s]=i+1)}}let a=Intl.DateTimeFormat(this.locale,{month:"short"});for(let o=0;o<12;o++){let i=a.formatToParts(n[o]).find(r).value.toLocaleLowerCase(this.locale);i=i.replace(/\.$/,""),e[`${i}\\.?`]=!0,t[i]=o+1}}this.vars.MONTHNAME=Object.keys(e).join("|"),this.lookups.month=t}buildDaynames(){let e=[],t=e=>"weekday"===e.type;for(let t=0;t<7;t++)e.push(new Date(2017,0,t+1));let n=[],r={};for(let a of["long","short"]){let o=Intl.DateTimeFormat(this.locale,{weekday:a});for(let i=0;i<7;i++){let s=o.formatToParts(e[i]).find(t).value.toLocaleLowerCase(this.locale);"short"===a?(s=s.replace(/\.$/,""),n.push(`${s}\\.?`)):n.push(s),r[s]=i}}this.vars.DAYNAME=n.join("|"),this.lookups.dayname=r}buildMeridiems(){let e=[new Date(2017,0,1),new Date(2017,0,1,23,0,0)],t=e=>"dayPeriod"===e.type,n=[],r={},a=Intl.DateTimeFormat(this.locale,{timeStyle:"long"});for(let o=0;o<2;o++){let i=a.formatToParts(e[o]).find(t);if(!i)return;let s=i.value.toLocaleLowerCase(this.locale);n.push(s),r[s]=12*o}this.vars.MERIDIEM=n.join("|"),this.lookups.meridiem=r}compile(e){return RegExp(e.replace(/_([A-Z0-9]+)_/g,(e,t)=>{if(!this.vars[t])throw Error(`Template string contains invalid variable _${t}_`);return this.vars[t]}),"i")}},bB=["ee-TG","en-AS","en-CA","en-FM","en-GH","en-GU","en-KE","en-KY","en-MH","en-MP","en-US","en-VI","en-WS","jp-JP","sm-AS","sm-SM"],bV={y:"year",M:"month",d:"day",w:"week",h:"hour",m:"minute",s:"second",ms:"millisecond"},bU=()=>new Date;function bW(e){return function(t){let n={};for(let r=0,a=e.length;r<a;r++){let a=e[r];a&&(n[a]=t[r])}return n}}var bH=class{doneChecker;fallback;patterns;formatter;constructor({doneChecker:e,fallback:t,patterns:n,formatter:r}){this.doneChecker=e,this.fallback=t,this.patterns=n,this.formatter=r}attempt(e){if("string"!=typeof e)return this.fallback(e);let t=e.trim(),n={},r=!1;for(let e of this.patterns){let a=t.match(e.regex);if(!a)continue;r=!0;let o=e.handler(a);if(o){for(let[e,t]of Object.entries(o))e in n||void 0===t||(n[e]=t);if(t=(t=t.slice(0,a.index)+t.slice(a.index+a[0].length+1)).trim(),this.doneChecker(n,t))break}}return r?this.formatter(n):this.fallback(e)}},bz=["year","month","day","hour","minute","second","millisecond","offset"],bK={};function bG(e,t){return""===t||/^\s+$/.test(t)||"year"in e&&("month"in e||"monthname"in e)&&"day"in e&&"hour"in e&&"minute"in e&&"second"in e&&"millisecond"in e&&("zone"in e||"offset"in e)}var bZ=[[/([^\d.]+)(\d{1,2})\.(\d{2})\.(\d{2})(\D|$)/,"$1$2:$3:$4$5"],[/([^\d.]+)(\d{1,2})\.(\d{2})(\D|$)/,"$1$2:$3$4"]],bY={ar:[[/ /g," "]],bn:[[/,/g,""]],zh:[[/早上\s*([\d:]+)/,"$1am"],[/凌晨\s*([\d:]+)/,"$1am"],[/上午\s*([\d:]+)/,"$1am"],[/下午\s*([\d:]+)/,"$1pm"],[/晚上\s*([\d:]+)/,"$1pm"]],he:[[/ב/gi,""]],de:[[/ um /g," "]],pt:[[/\sde /gi," "]],es:[[/\sde /gi," "]],da:[[/\sden /gi," "],...bZ],ru:[[/ г\./g,""]],th:[[/\s*นาฬิกา\s*/i,":"],[/\s*นาที\s*/i,":"],[/\s*วินาที\s*/i," "]],ko:[[/\s*시\s*/,":"],[/\s*분\s*/,":"],[/\s*초\s*/,""],[/(오전|오후)\s*([\d:]+)/,"$2$1"],[/(\d{4})\. (\d{1,2})\. (\d{1,2})\./,"$1-$2-$3"]],fi:bZ,id:bZ,fr:[[/(\d{2}) h /,"$1:"],[/(\d{2}) min /,"$1:"],[/(\d{2}) s /,"$1"]]};function bq(e,t=bC){let n=function(e){if(!bK[e]){var t,n;let r,a,o=bF.factory(e);bK[e]=new bH({doneChecker:bG,fallback:(t=e,function(e){let n=String(e).slice(0,50);return""===n&&(n="(empty string)"),{invalid:`Unable to parse "${n}" with locale "${t}"`}}),patterns:(r=[{name:"timestampWithOffset",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? ?(_OFFSET_|Z)?$"),handler:bW(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"timestampWithZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))?\\s*(_ZONE_)$"),handler:bW(["","year","month","day","hour","minute","second","millisecond","zone"])},{name:"timestampWithOffsetAndZone",regex:o.compile("^(_YEAR4_)-(_MONTH_)-(_DAY_)[T ](_H24_):(_MIN_):(_SEC_)(?:.(_MS_))? (_OFFSET_|Z)\\s*(_ZONE_)$"),handler:bW(["","year","month","day","hour","minute","second","millisecond","offset"])},{name:"chinese",regex:o.compile(`^(${bN}{2,4})\\s*\u5E74\\s*(${bN}{1,2})\\s*\u6708\\s*(${bN}{1,2})\\s*\u65E5$`),handler:bW(["","year","month","day"])},{name:"korean",regex:o.compile("^(_YEAR_)년\\s*(_MONTH_)월\\s*(_DAY_)일$"),handler:bW(["","year","month","day"])},{name:"twitter",regex:/^(?:sun|mon|tue|wed|thu|fri|sat) (jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec) (\d{2}) (\d{2}):(\d{2}):(\d{2}) ([+-]\d{4}) (\d{4})$/i,handler:bW(["","monthname","day","hour","minute","second","offset","year"])},{name:"today",regex:/^(now|today|tomorrow|yesterday)$/i,handler:function(e){let t=bU(),n=e[1].toLowerCase();switch(n){case"tomorrow":t.setUTCDate(t.getUTCDate()+1);break;case"yesterday":t.setUTCDate(t.getUTCDate()-1)}let r={year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate()};return"now"===n&&(r.hour=t.getUTCHours(),r.minute=t.getUTCMinutes(),r.second=t.getUTCSeconds(),r.millisecond=t.getUTCMilliseconds()),console.log("today=>",n,r),r}},{name:"ago",regex:/^(\+|-|in|) ?([\d.]+) ?(years?|months?|weeks?|days?|hours?|minutes?|seconds?|milliseconds?|ms|s|m|h|w|d|M|y)( ago)?$/i,handler:function([,e,t,n,r]){t=parseFloat(t),"week"===(n=n.length<=2?bV[n]:(n=n.replace(/s$/,"")).toLowerCase())&&(n="day",t*=7),("-"===e||r)&&(t*=-1);let a=bU();return"millisecond"===n?a.setUTCMilliseconds(a.getUTCMilliseconds()+t):"second"===n?a.setUTCSeconds(a.getUTCSeconds()+t):"minute"===n?a.setUTCMinutes(a.getUTCMinutes()+t):"hour"===n?a.setUTCHours(a.getUTCHours()+t):"day"===n?a.setUTCDate(a.getUTCDate()+t):"month"===n?a.setUTCMonth(a.getUTCMonth()+t):"year"===n&&a.setUTCFullYear(a.getUTCFullYear()+t),{year:a.getUTCFullYear(),month:a.getUTCMonth()+1,day:a.getUTCDate(),hour:a.getUTCHours(),minute:a.getUTCMinutes(),second:a.getUTCSeconds(),millisecond:a.getUTCMilliseconds()}}},{name:"atSeconds",regex:/^@(\d+)$/,handler:function(e){let t=new Date(1e3*parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds()}}},{name:"microsoftJson",regex:/^\/Date\((\d+)([+-]\d{4})?\)\/$/,handler:function(e){let t=new Date(parseInt(e[1],10));return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds(),offset:e[2]}}},{name:"full24",regex:o.compile("(?:^|[\\sT])(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?(Z)?$"),handler:bW(["","hour","minute","second","millisecond","zone"])},{name:"zone24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?[\\s\\[(]*(_ZONE_)?[\\s\\])]*$"),handler:bW(["","hour","minute","second","millisecond","zone"])},{name:"hms12",regex:o.compile("(_H12_):(_MIN_):(_SEC_)\\s*(_MERIDIEM_)"),handler:bW(["","hour","minute","second","meridiem"])},{name:"hms24",regex:o.compile("(_H24_):(_MIN_):(_SEC_)(?:\\.(_MS_))?"),handler:bW(["","hour","minute","second","millisecond"])},{name:"hm12",regex:o.compile("(_H12_):(_MIN_)\\s*(_MERIDIEM_)"),handler:bW(["","hour","minute","meridiem"])},{name:"hm24",regex:o.compile("(_H24_):(_MIN_)"),handler:bW(["","hour","minute"])},{name:"h12",regex:o.compile("(_H12_)\\s*(_MERIDIEM_)"),handler:bW(["","hour","meridiem"])},{name:"8digit",regex:/^((?:19|20)\d{2})(\d{2})(\d{2})$/,handler:bW(["","year","month","day"])},{name:"yearMonthnameDay",regex:o.compile("(_YEAR4_)[\\s.-]+(_MONTHNAME_)[\\s,.-]+(_DAY_)(_ORDINAL_)?"),handler:bW(["","year","monthname","day"])},{name:"dayMonthnameYear",regex:o.compile("(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)[\\s,.-]+(_YEAR_)"),handler:bW(["","day","","monthname","year"])},{name:"monthnameDayYear",regex:o.compile("(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?[\\s,.-]+(_YEAR_)"),handler:bW(["","monthname","day","","year"])},{name:"dayMonthname",regex:o.compile("\\b(_DAY_)(_ORDINAL_)?[\\s.-]*(_MONTHNAME_)\\b"),handler:bW(["","day","","monthname"])},{name:"monthnameDay",regex:o.compile("\\b(_MONTHNAME_)[\\s.-]*(_DAY_)(_ORDINAL_)?\\b"),handler:bW(["","monthname","day"])},{name:"hmsNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_):(_SEC_)\\b"),handler:bW(["","hour","minute","second"])},{name:"hmNoMeridiem",regex:o.compile("\\b(_H12_|_H24_):(_MIN_)\\b"),handler:bW(["","hour","minute"])},{name:"ymd",regex:o.compile("(_YEAR4_)([.-])(_MONTH_)\\2+(_DAY_)"),handler:bW(["","year","","month","day"])},{name:"mdy",regex:o.compile("(_MONTH_)([/-])(_DAY_)\\2(_YEAR_)"),handler:bW(["","month","","day","year"])},{name:"dmy",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)[./\\s-]+(_YEAR_)"),handler:bW(["","day","month","year"])},{name:"yearLoose",regex:o.compile("_YEAR4_"),handler:bW(["year"])},{name:"dayMonthnameLoose",regex:o.compile("(_DAY_)[\\s.]*(_MONTHNAME_)"),handler:bW(["","day","monthname"])},{name:"monthnameDayLoose",regex:o.compile("(_MONTHNAME_)[\\s.]*(_DAY_)"),handler:bW(["","monthname","day"])},{name:"monthname",regex:o.compile("_MONTHNAME_"),handler:bW(["monthname"])},{name:"year4",regex:o.compile("_YEAR4_"),handler:bW(["year"])},{name:"md",regex:o.compile("(_MONTH_)[/-](_DAY_)"),handler:bW(["","month","day"])},{name:"dm",regex:o.compile("(_DAY_)(?:_ORDINAL_)?[./\\s-]+(_MONTH_)"),handler:bW(["","day","month"])},{name:"day",regex:o.compile("_DAY_"),handler:bW(["day"])},{name:"year2",regex:o.compile("_YEAR2_"),handler:bW(["year"])},{name:"onlyZone",regex:o.compile("_ZONE_"),handler:bW(["zone"])}],a=o.baseName.slice(0,5),bB.includes(a)?r:r.filter(e=>!["mdy","md"].includes(e.name))),formatter:(n=o,function(e){let t={};for(let[r,a]of Object.entries(e))if("monthname"===r){if(a){let e=n.monthNameToInt(a);void 0!==e&&(t.month=e)}}else if("hour"===r&&e.meridiem){let r=n.h12ToInt(a,e.meridiem);void 0!==r&&(t.hour=r)}else if("zone"===r){if(a){let e=n.zoneToOffset(a);void 0!==e&&(t.offset=e)}}else if("offset"===r){let e=n.offsetToMinutes(a);void 0!==e&&(t.offset=e)}else if("millisecond"===r){let e=n.millisecondToInt(a);"number"==typeof e&&(t.millisecond=e)}else if(bz.includes(r)){let e=n.toInt(a);"number"==typeof e&&(t[r]=e)}return t.year<100&&(t.year=bT[t.year]),t.year&&"buddhist"===n.dateOptions.calendar&&(t.year-=543),t})})}return bK[e]}(t),r=function(e,t){let n=bY[t.slice(0,2).toLowerCase()];if(!n)return e;for(let[t,r]of n)e=e.replace(t,r);return e}(e,t);return n.attempt(r)}function bJ(e){e.month&&e.day&&void 0===e.year&&(e.year=new Date().getFullYear()),60===e.second&&(e.second=59);let t=new bP(e.year,e.month-1,e.day,e.hour||0,e.minute||0,e.second||0,e.millisecond||0);return"number"==typeof e.offset?new bP(t.valueOf()-60*e.offset*1e3):t}function bX(e,t=bC){let n=bq(e,t),r=n.invalid?new bP(NaN):bJ(n);return r.isValid()||(r.invalid=`Unable to parse date "${e}"`),r}function bQ(e,t=bC){return e instanceof Date?new bP(e.valueOf()):"number"==typeof e?new bP(e):bX(e,t)}Date.fromString=bP.fromString=bX,Date.fromAny=bP.fromAny=bQ,"u">typeof window&&(window.anyDateParser={fromString:bX,fromAny:bQ,fromObject:bJ,attempt:bq});var b0=n(4397),b1=n(7657);let b4=function(e){return null==e};function b2(e,t){var n=function(e,t){if(!t.has(e))throw TypeError("attempted to get private field on non-instance");return t.get(e)}(e,t);return n.get?n.get.call(e):n.value}uX().extend(uQ),uX().extend(b1),uX().extend(b0);let b3="YYYY-MM-DDTHH:mm:ss.SSSZZ";function b6(e){return null!=e&&28===e.trim().length&&"T"===(e=e.trim())[10]&&":"===e[13]&&":"===e[16]&&"."===e[19]&&("+"===e[23]||"-"===e[23])&&uX()(e,b3).isValid()}function b5(e){return uX()(e).isToday()}function b9(e){return b6(e)?uX()(e,b3).toDate():null}function b8(e,t=!1){let n=uX()(e);return t&&(n=n.utc()),n.format(b3)}function b7(e){return uX()(e).toDate()}var we=new WeakMap;let wt=new class{register(e,t){b2(this,we).set(e,t)}getCalendar(e){if(!e)return;if(e.calendar)return e.calendar;if(e.region){let t=`${e.language}-${e.region}`;if(b2(this,we).has(t))return b2(this,we).get(t)}if(e.language&&b2(this,we).has(e.language))return b2(this,we).get(e.language);let t=new Intl.DateTimeFormat(e.toString()).resolvedOptions().calendar;return b2(this,we).set(`${e.language}${e.region?`-${e.region}`:""}`,t),t}constructor(){!function(e,t,n){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object");t.set(e,n)}(this,we,{writable:!0,value:new Map})}};function wn(e,t){wt.register(e,t)}function wr(e){let t=e??bk();return wt.getCalendar(t instanceof Intl.Locale?t:new Intl.Locale(t))}let wa={mode:"standard",time:"for today",day:!0,month:!0,year:!0,noToday:!1};function wo(e,t={}){let n=bq(e,bk());if(n.invalid)return console.warn(`Could not parse invalid date '${e}'`),null;!b4(n.day)&&b4(n.month)&&(n=Object.assign({},tp(n,"day"),{month:n.day})),n.month&&(n.month-=1),n.day&&(n=Object.assign({},tp(n,"day"),{date:n.day}));let r=uX()().set(n).toDate();return b4(n.year)&&(t.year=!1),b4(n.month)&&(t.month=!1),b4(n.date)&&(t.day=!1),wi(r,t)}function wi(e,t){let n,r=t?.locale??bk(),a=new Intl.Locale(r),{calendar:o,mode:i,time:s,day:l,month:u,year:c,noToday:d,numberingSystem:m}={...wa,...{noToday:"am"===a.language},...t},p={calendar:o??wr(a),year:c?"numeric":void 0,month:u?"short":void 0,day:l?"2-digit":void 0,numberingSystem:m},f=uX()(e).isToday();if(f&&!d)n=(n=new Intl.RelativeTimeFormat(r,{numeric:"auto"}).format(0,"day"))[0].toLocaleUpperCase(r)+n.slice(1);else{"en"===a.language&&(r="en-GB");let t=new Intl.DateTimeFormat(r,p).formatToParts(e);("en"===a.language||"am"===a.language)&&"standard"==i&&c&&l&&(t=t.map(ws("-"))),"wide"==i&&(t=t.map(ws(" — "))),"ethiopic"===p.calendar&&(t=t.filter((e,t,n)=>"era"!==e.type&&("literal"!==e.type||!(t<n.length-1)||"era"!==n[t+1].type))),n=t.map(e=>e.value).join("")}return(!0===s||f&&"for today"===s)&&(n+=`, ${wl(e)}`),n}let ws=e=>(t,n,r)=>"literal"!==t.type||" "!==t.value||n<r.length-1&&"era"===r[n+1].type?t:{type:"literal",value:e};function wl(e){return e.toLocaleTimeString(bk(),{hour:"2-digit",minute:"2-digit"})}function wu(e,t){return wi(e,{...t,time:!0})}function wc(e,t){let n=wr("string"==typeof t?new Intl.Locale(t):t);return n?hE(e,gB(n)):e}function wd(e,t){return new Intl.DurationFormat(bk(),t).format(e)}function wm(e,t){if(null==e)return null;if("string"==typeof e){let n=bq(e,bk());return n.invalid?(console.warn(`Could not interpret '${e}' as a date`),null):(n.day&&!n.month&&(n={...tp(n,"day"),...{month:n.day}}),n.month&&(n.month-=1),n.day&&(n={...tp(n,"day"),...{date:n.day}}),uX()(t).set(n))}return uX()(e)}let wp=["years","months","days","hours","minutes","seconds"],wf={second:"seconds",minute:"minutes",hour:"hours",day:"days",month:"months",year:"years"},wh={seconds:45,minutes:45,hours:22,days:26,months:11,years:1/0};function wg(e,t=uX()(),n){let r,a=uX()(t),o=wm(e,a);if(null==o)return null;if("string"==typeof n){let e=wf[n]??n;return{[e]:a.diff(o,e)}}let{thresholds:i,largestUnit:s,smallestUnit:l}=n??{};if(void 0!==s||void 0!==l){let e,t=l?wf[l]??l:void 0;return e="auto"===s||void 0===s?function(e,t,n){let r=wp.indexOf(n);for(let a=0;a<wp.length;a++){let o=wp[a];if(t.diff(e,o)>0)return a<=r?o:n}return n}(o,a,t??"seconds"):wf[s]??s,function(e,t,n,r){let a=wp.indexOf(n),o=wp.indexOf(r),i=wp.slice(a,o+1),s={},l=e;for(let e of i){let n=t.diff(l,e);s[e]=n,l=l.add(n,e)}return s}(o,a,e,t??e)}let u=(r=function(e){let t={...wh};if(e)for(let[n,r]of Object.entries(e))void 0!==r&&(t[wf[n]??n]=r);return t}(i),a.diff(o,"seconds")<r.seconds?"seconds":a.diff(o,"minutes")<r.minutes?"minutes":a.diff(o,"hours")<r.hours?"hours":a.diff(o,"days")<r.days?"days":a.diff(o,"months")<r.months?"months":"years");return{[u]:a.diff(o,u)}}let wy={style:"short",localeMatcher:"lookup"};function wv(e,t=uX()(),n){let r=wg(e,t,n);return null==r?null:wd(r,"object"==typeof n&&n.formatOptions?{...wy,...n.formatOptions}:wy)}let wb=(0,ll.createContext)(null);function ww(){let e=us({externalModuleName:"@openmrs/esm-styleguide"}).preferredDateLocale,t=(0,ll.useMemo)(()=>{let t=bk();return e[t]&&(t=e[t]),t},[window.i18next.language]),n=(0,ll.useMemo)(()=>{let e=wr(t);return void 0!==e?gB(e):void 0},[t]),r=(0,ll.useMemo)(()=>new Intl.Locale(t,{calendar:n?.identifier}),[t,n]),a=(0,ll.useMemo)(()=>n?hE(hN(hA()),n):hN(hA()),[n]);return{calendar:n,intlLocale:r,today_:a}}let wx=new hu(1793,1,1);var wD={};function wE(){return"u">typeof window&&window.InputEvent&&"function"==typeof InputEvent.prototype.getTargetRanges}function w_(e={}){let{locale:t}=fE();return(0,ll.useMemo)(()=>new(0,y8.K)(t,e),[t,e])}wD={"ar-AE":{decrease:e=>`\u{62E}\u{641}\u{636} ${e.fieldLabel}`,increase:e=>`\u{632}\u{64A}\u{627}\u{62F}\u{629} ${e.fieldLabel}`,numberField:"حقل رقمي"},"bg-BG":{decrease:e=>`\u{41D}\u{430}\u{43C}\u{430}\u{43B}\u{44F}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{441}\u{438}\u{43B}\u{432}\u{430}\u{43D}\u{435} ${e.fieldLabel}`,numberField:"Номер на полето"},"cs-CZ":{decrease:e=>`Sn\xed\u{17E}it ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}it ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"da-DK":{decrease:e=>`Reducer ${e.fieldLabel}`,increase:e=>`\xd8g ${e.fieldLabel}`,numberField:"Talfelt"},"de-DE":{decrease:e=>`${e.fieldLabel} verringern`,increase:e=>`${e.fieldLabel} erh\xf6hen`,numberField:"Nummernfeld"},"el-GR":{decrease:e=>`\u{39C}\u{3B5}\u{3AF}\u{3C9}\u{3C3}\u{3B7} ${e.fieldLabel}`,increase:e=>`\u{391}\u{3CD}\u{3BE}\u{3B7}\u{3C3}\u{3B7} ${e.fieldLabel}`,numberField:"Πεδίο αριθμού"},"en-US":{decrease:e=>`Decrease ${e.fieldLabel}`,increase:e=>`Increase ${e.fieldLabel}`,numberField:"Number field"},"es-ES":{decrease:e=>`Reducir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"et-EE":{decrease:e=>`V\xe4henda ${e.fieldLabel}`,increase:e=>`Suurenda ${e.fieldLabel}`,numberField:"Numbri v\xe4li"},"fi-FI":{decrease:e=>`V\xe4henn\xe4 ${e.fieldLabel}`,increase:e=>`Lis\xe4\xe4 ${e.fieldLabel}`,numberField:"Numerokentt\xe4"},"fr-FR":{decrease:e=>`Diminuer ${e.fieldLabel}`,increase:e=>`Augmenter ${e.fieldLabel}`,numberField:"Champ de nombre"},"he-IL":{decrease:e=>`\u{5D4}\u{5E7}\u{5D8}\u{5DF} ${e.fieldLabel}`,increase:e=>`\u{5D4}\u{5D2}\u{5D3}\u{5DC} ${e.fieldLabel}`,numberField:"שדה מספר"},"hr-HR":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"hu-HU":{decrease:e=>`${e.fieldLabel} cs\xf6kkent\xe9se`,increase:e=>`${e.fieldLabel} n\xf6vel\xe9se`,numberField:"Sz\xe1mmező"},"it-IT":{decrease:e=>`Riduci ${e.fieldLabel}`,increase:e=>`Aumenta ${e.fieldLabel}`,numberField:"Campo numero"},"ja-JP":{decrease:e=>`${e.fieldLabel}\u{3092}\u{7E2E}\u{5C0F}`,increase:e=>`${e.fieldLabel}\u{3092}\u{62E1}\u{5927}`,numberField:"数値フィールド"},"ko-KR":{decrease:e=>`${e.fieldLabel} \u{AC10}\u{C18C}`,increase:e=>`${e.fieldLabel} \u{C99D}\u{AC00}`,numberField:"번호 필드"},"lt-LT":{decrease:e=>`Suma\u{17E}inti ${e.fieldLabel}`,increase:e=>`Padidinti ${e.fieldLabel}`,numberField:"Numerio laukas"},"lv-LV":{decrease:e=>`Samazin\u{101}\u{161}ana ${e.fieldLabel}`,increase:e=>`Palielin\u{101}\u{161}ana ${e.fieldLabel}`,numberField:"Skaitļu lauks"},"nb-NO":{decrease:e=>`Reduser ${e.fieldLabel}`,increase:e=>`\xd8k ${e.fieldLabel}`,numberField:"Tallfelt"},"nl-NL":{decrease:e=>`${e.fieldLabel} verlagen`,increase:e=>`${e.fieldLabel} verhogen`,numberField:"Getalveld"},"pl-PL":{decrease:e=>`Zmniejsz ${e.fieldLabel}`,increase:e=>`Zwi\u{119}ksz ${e.fieldLabel}`,numberField:"Pole numeru"},"pt-BR":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo de n\xfamero"},"pt-PT":{decrease:e=>`Diminuir ${e.fieldLabel}`,increase:e=>`Aumentar ${e.fieldLabel}`,numberField:"Campo num\xe9rico"},"ro-RO":{decrease:e=>`Sc\u{103}dere ${e.fieldLabel}`,increase:e=>`Cre\u{219}tere ${e.fieldLabel}`,numberField:"C\xe2mp numeric"},"ru-RU":{decrease:e=>`\u{423}\u{43C}\u{435}\u{43D}\u{44C}\u{448}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,increase:e=>`\u{423}\u{432}\u{435}\u{43B}\u{438}\u{447}\u{435}\u{43D}\u{438}\u{435} ${e.fieldLabel}`,numberField:"Числовое поле"},"sk-SK":{decrease:e=>`Zn\xed\u{17E}i\u{165} ${e.fieldLabel}`,increase:e=>`Zv\xfd\u{161}i\u{165} ${e.fieldLabel}`,numberField:"Č\xedseln\xe9 pole"},"sl-SI":{decrease:e=>`Upadati ${e.fieldLabel}`,increase:e=>`Pove\u{10D}ajte ${e.fieldLabel}`,numberField:"Številčno polje"},"sr-SP":{decrease:e=>`Smanji ${e.fieldLabel}`,increase:e=>`Pove\u{107}aj ${e.fieldLabel}`,numberField:"Polje broja"},"sv-SE":{decrease:e=>`Minska ${e.fieldLabel}`,increase:e=>`\xd6ka ${e.fieldLabel}`,numberField:"Nummerf\xe4lt"},"tr-TR":{decrease:e=>`${e.fieldLabel} azalt`,increase:e=>`${e.fieldLabel} artt\u{131}r`,numberField:"Sayı alanı"},"uk-UA":{decrease:e=>`\u{417}\u{43C}\u{435}\u{43D}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,increase:e=>`\u{417}\u{431}\u{456}\u{43B}\u{44C}\u{448}\u{438}\u{442}\u{438} ${e.fieldLabel}`,numberField:"Поле номера"},"zh-CN":{decrease:e=>`\u{964D}\u{4F4E} ${e.fieldLabel}`,increase:e=>`\u{63D0}\u{9AD8} ${e.fieldLabel}`,numberField:"数字字段"},"zh-TW":{decrease:e=>`\u{7E2E}\u{5C0F} ${e.fieldLabel}`,increase:e=>`\u{653E}\u{5927} ${e.fieldLabel}`,numberField:"數字欄位"}};var wS={};wS={"ar-AE":{Empty:"فارغ"},"bg-BG":{Empty:"Изпразни"},"cs-CZ":{Empty:"Pr\xe1zdn\xe9"},"da-DK":{Empty:"Tom"},"de-DE":{Empty:"Leer"},"el-GR":{Empty:"Άδειο"},"en-US":{Empty:"Empty"},"es-ES":{Empty:"Vac\xedo"},"et-EE":{Empty:"T\xfchjenda"},"fi-FI":{Empty:"Tyhj\xe4"},"fr-FR":{Empty:"Vide"},"he-IL":{Empty:"ריק"},"hr-HR":{Empty:"Prazno"},"hu-HU":{Empty:"\xdcres"},"it-IT":{Empty:"Vuoto"},"ja-JP":{Empty:"空"},"ko-KR":{Empty:"비어 있음"},"lt-LT":{Empty:"Tuščias"},"lv-LV":{Empty:"Tukšs"},"nb-NO":{Empty:"Tom"},"nl-NL":{Empty:"Leeg"},"pl-PL":{Empty:"Pusty"},"pt-BR":{Empty:"Vazio"},"pt-PT":{Empty:"Vazio"},"ro-RO":{Empty:"Gol"},"ru-RU":{Empty:"Не заполнено"},"sk-SK":{Empty:"Pr\xe1zdne"},"sl-SI":{Empty:"Prazen"},"sr-SP":{Empty:"Prazno"},"sv-SE":{Empty:"Tomt"},"tr-TR":{Empty:"Boş"},"uk-UA":{Empty:"Пусто"},"zh-CN":{Empty:"空"},"zh-TW":{Empty:"空白"}};let wk=()=>{};function wC(e){var t;let n=(0,ll.useRef)(void 0),{value:r,textValue:a,minValue:o,maxValue:i,isDisabled:s,isReadOnly:l,isRequired:u,onIncrement:c,onIncrementPage:d,onDecrement:m,onDecrementPage:p,onDecrementToMin:f,onIncrementToMax:h}=e,g=fz((t=wS)&&t.__esModule?t.default:t,"@react-aria/spinbutton"),y=(0,ll.useRef)(!1),v=(0,ll.useCallback)(()=>{clearTimeout(n.current),y.current=!1},[]),b=pH(()=>{v()});(0,ll.useEffect)(()=>()=>b(),[]);let w=(0,ll.useRef)(!1),x=()=>{w.current=!0},D=()=>{w.current=!1},E=""===a?g.format("Empty"):(a||`${r}`).replace("-","−");(0,ll.useEffect)(()=>{w.current&&(f_&&f_.clear("assertive"),fS(E,"assertive"))},[E]);let _=(0,ll.useCallback)(()=>{v()},[v]),S=pH(c??wk),k=pH(m??wk),C=pH(()=>{(void 0===i||isNaN(i)||void 0===r||isNaN(r)||r<i)&&(S(),P(60))}),P=pH(e=>{b(),y.current=!0,n.current=window.setTimeout(C,e)}),T=pH(()=>{(void 0===o||isNaN(o)||void 0===r||isNaN(r)||r>o)&&(k(),R(60))}),R=pH(e=>{b(),y.current=!0,n.current=window.setTimeout(T,e)}),N=e=>{e.preventDefault()},{addGlobalListener:O,removeAllGlobalListeners:$}=pz(),M=(0,ll.useRef)(!1),[A,j]=(0,ll.useState)(null);(0,ll.useEffect)(()=>{"touch"===A?P(600):A&&P(400)},[A]);let[I,L]=(0,ll.useState)(null);return(0,ll.useEffect)(()=>{"touch"===I?R(600):I&&R(400)},[I]),{spinButtonProps:{role:"spinbutton","aria-valuenow":void 0===r||isNaN(r)?void 0:r,"aria-valuetext":E,"aria-valuemin":o,"aria-valuemax":i,"aria-disabled":s||void 0,"aria-readonly":l||void 0,"aria-required":u||void 0,onKeyDown:e=>{if(!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey&&!l&&!e.nativeEvent.isComposing)switch(e.key){case"PageUp":if(d){e.preventDefault(),d?.();break}case"ArrowUp":case"Up":c&&(e.preventDefault(),c?.());break;case"PageDown":if(p){e.preventDefault(),p?.();break}case"ArrowDown":case"Down":m&&(e.preventDefault(),m?.());break;case"Home":f&&(e.preventDefault(),f?.());break;case"End":h&&(e.preventDefault(),h?.())}},onFocus:x,onBlur:D},incrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(c?.(),j("mouse")):(O(window,"pointercancel",_,{capture:!0}),M.current=!1,j("touch")),O(window,"contextmenu",N)},onPressUp:e=>{v(),"touch"===e.pointerType&&(M.current=!0),$(),j(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&M.current&&c?.(),M.current=!1,j(null)},onFocus:x,onBlur:D},decrementButtonProps:{onPressStart:e=>{v(),"touch"!==e.pointerType?(m?.(),L("mouse")):(O(window,"pointercancel",_,{capture:!0}),M.current=!1,L("touch"))},onPressUp:e=>{v(),"touch"===e.pointerType&&(M.current=!0),$(),L(null)},onPressEnd:e=>{v(),"touch"===e.pointerType&&!y.current&&M.current&&m?.(),M.current=!1,L(null)},onFocus:x,onBlur:D}}}let wP=null;var wT=n(2103);function wR(e,t,n){let r="+"===e?t+n:t-n;if(t%1!=0||n%1!=0){let a=t.toString().split("."),o=n.toString().split("."),i=Math.pow(10,Math.max(a[1]&&a[1].length||0,o[1]&&o[1].length||0));t=Math.round(t*i),n=Math.round(n*i),r=("+"===e?t+n:t-n)/i}return r}let wN=(0,ll.createContext)(null),wO=(0,ll.createContext)(null),w$=(0,ll.forwardRef)(function(e,t){var n,r;[e,t]=mC(e,t,wN);let{validationBehavior:a}=mk(vb)||{},o=null!=(r=null!=(n=e.validationBehavior)?n:a)?r:"native",{locale:i}=fE(),s=function(e){let{minValue:t,maxValue:n,step:r,formatOptions:a,value:o,defaultValue:i=NaN,onChange:s,locale:l,isDisabled:u,isReadOnly:c,commitBehavior:d="snap"}=e;null===o&&(o=NaN);let m=(0,ll.useCallback)(e=>void 0===r||isNaN(r)?vk(e,t,n):vP(e,t,n,r),[r,t,n]);void 0===o||isNaN(o)||"snap"!==d||(o=m(o)),isNaN(i)||"snap"!==d||(i=m(i));let[p,f]=gY(o,isNaN(i)?NaN:i,s),[h]=(0,ll.useState)(p),[g,y]=(0,ll.useState)(()=>isNaN(p)?"":new(0,y8.K)(l,a).format(p)),v=(0,ll.useMemo)(()=>new(0,wT.d)(l,a),[l,a]),b=(0,ll.useMemo)(()=>v.getNumberingSystem(g),[v,g]),w=(0,ll.useMemo)(()=>new(0,y8.K)(l,{...a,numberingSystem:b}),[l,a,b]),x=(0,ll.useMemo)(()=>w.resolvedOptions(),[w]),D=(0,ll.useCallback)(e=>isNaN(e)||null===e?"":w.format(e),[w]),E=yH({...e,value:p}),_=void 0===r||isNaN(r)?1:r;"percent"===x.style&&(void 0===r||isNaN(r))&&(_=.01);let[S,k]=(0,ll.useState)(p),[C,P]=(0,ll.useState)(l),[T,R]=(0,ll.useState)(a);Object.is(p,S)&&l===C&&a===T||(y(D(p)),k(p),P(l),R(a));let N=(0,ll.useMemo)(()=>v.parse(g),[v,g]),O=(e,r=0)=>{if(isNaN(N))return vP(isNaN(r)?0:r,t,n,_);{let r=vP(N,t,n,_);return"+"===e&&r>N||"-"===e&&r<N?r:vP(wR(e,N,_),t,n,_)}},$=(0,ll.useMemo)(()=>!u&&!c&&(isNaN(N)||void 0===n||isNaN(n)||vP(N,t,n,_)>N||wR("+",N,_)<=n),[u,c,t,n,_,N]),M=(0,ll.useMemo)(()=>!u&&!c&&(isNaN(N)||void 0===t||isNaN(t)||vP(N,t,n,_)<N||wR("-",N,_)>=t),[u,c,t,n,_,N]);return{...E,validate:e=>v.isValidPartialNumber(e,t,n),increment:()=>{let e=O("+",t);e===p&&y(D(e)),f(e),E.commitValidation()},incrementToMax:()=>{null!=n&&(f(vP(n,t,n,_)),E.commitValidation())},decrement:()=>{let e=O("-",n);e===p&&y(D(e)),f(e),E.commitValidation()},decrementToMin:()=>{null!=t&&(f(t),E.commitValidation())},canIncrement:$,canDecrement:M,minValue:t,maxValue:n,numberValue:N,defaultNumberValue:isNaN(i)?h:i,setNumberValue:f,setInputValue:y,inputValue:g,commit:e=>{let t=void 0===e?g:e,n=N;if(void 0!==e&&(n=v.parse(t)),!t.length){f(NaN),y(void 0===o?"":D(p));return}if(isNaN(n))return void y(D(p));let r="snap"===d?m(n):n,a=(r=v.parse(D(r)))!==p;f(r),y(D(void 0===o?r:p)),a&&E.commitValidation()}}}({...e,locale:i,validationBehavior:o}),l=(0,ll.useRef)(null),[u,c]=mP(!e["aria-label"]&&!e["aria-labelledby"]),{labelProps:d,groupProps:m,inputProps:p,incrementButtonProps:f,decrementButtonProps:h,descriptionProps:g,errorMessageProps:y,...v}=function(e,t,n){var r,a,o,i,s,l,u,c,d;let m,{id:p,decrementAriaLabel:f,incrementAriaLabel:h,isDisabled:g,isReadOnly:y,isRequired:v,minValue:b,maxValue:w,autoFocus:x,label:D,formatOptions:E,onBlur:_=()=>{},onFocus:S,onFocusChange:k,onKeyDown:C,onKeyUp:P,description:T,errorMessage:R,isWheelDisabled:N,...O}=e,{increment:$,incrementToMax:M,decrement:A,decrementToMin:j,numberValue:I,inputValue:L,commit:F,commitValidation:B}=t,V=fz((r=wD)&&r.__esModule?r.default:r,"@react-aria/numberfield"),U=(0,ll.useCallback)(()=>{let e=n.current?.value??"";(0,pK.flushSync)(()=>{F()}),n.current?.value!==e&&fS(n.current?.value??"","assertive")},[F,n]),W=mb(p),{focusProps:H}=pR({onBlur(){U()}}),z=w_(E),K=(0,ll.useMemo)(()=>z.resolvedOptions(),[z]),G=w_({...E,currencySign:void 0}),Z=(0,ll.useMemo)(()=>isNaN(I)?"":G.format(I),[G,I]),{spinButtonProps:Y,incrementButtonProps:q,decrementButtonProps:J}=wC({isDisabled:g,isReadOnly:y,isRequired:v,maxValue:w,minValue:b,onIncrement:$,onIncrementToMax:M,onDecrement:A,onDecrementToMin:j,value:I,textValue:Z}),[X,Q]=(0,ll.useState)(!1),{focusWithinProps:ee}=p6({isDisabled:g,onFocusWithinChange:Q});!function(e,t){let{onScroll:n,isDisabled:r}=e,a=(0,ll.useCallback)(e=>{!e.ctrlKey&&(e.preventDefault(),e.stopPropagation(),n&&n({deltaX:e.deltaX,deltaY:e.deltaY}))},[n]);h0(t,"wheel",r?void 0:a)}({onScroll:(0,ll.useCallback)(e=>{!(Math.abs(e.deltaY)<=Math.abs(e.deltaX))&&(e.deltaY>0?$():e.deltaY<0&&A())},[A,$]),isDisabled:N||g||y||!X},n);let et=(K.maximumFractionDigits??0)>0,en=void 0===t.minValue||isNaN(t.minValue)||t.minValue<0,er="numeric";pe()?en?er="text":et&&(er="decimal"):po()&&(en?er="numeric":et&&(er="decimal"));let ea=mB(e),eo=(0,ll.useCallback)(e=>{e.nativeEvent.isComposing||("Enter"===e.key?((0,pK.flushSync)(()=>{F()}),B()):e.continuePropagation())},[F,B]),{isInvalid:ei,validationErrors:es,validationDetails:el}=t.displayValidation,{labelProps:eu,inputProps:ec,descriptionProps:ed,errorMessageProps:em}=function(e,t,n){let r=pH(e=>{let r=n.current;if(!r)return;let a=null;switch(e.inputType){case"historyUndo":case"historyRedo":case"insertLineBreak":return;case"deleteContent":case"deleteByCut":case"deleteByDrag":a=r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentForward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd+1):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteContentBackward":a=r.selectionEnd===r.selectionStart?r.value.slice(0,r.selectionStart-1)+r.value.slice(r.selectionStart):r.value.slice(0,r.selectionStart)+r.value.slice(r.selectionEnd);break;case"deleteSoftLineBackward":case"deleteHardLineBackward":a=r.value.slice(r.selectionStart);break;default:null!=e.data&&(a=r.value.slice(0,r.selectionStart)+e.data+r.value.slice(r.selectionEnd))}null!=a&&t.validate(a)||e.preventDefault()});(0,ll.useEffect)(()=>{if(!wE()||!n.current)return;let e=n.current;return e.addEventListener("beforeinput",r,!1),()=>{e.removeEventListener("beforeinput",r,!1)}},[n]);let a=wE()?null:e=>{let n=mK(e).value.slice(0,mK(e).selectionStart)+e.data+mK(e).value.slice(mK(e).selectionEnd);t.validate(n)||e.preventDefault()},{labelProps:o,inputProps:i,descriptionProps:s,errorMessageProps:l,...u}=function(e,t){let{inputElementType:n="input",isDisabled:r=!1,isRequired:a=!1,isReadOnly:o=!1,type:i="text",validationBehavior:s="aria"}=e,[l,u]=gY(e.value,e.defaultValue||"",e.onChange),{focusableProps:c}=pM(e,t),d=yH({...e,value:l}),{isInvalid:m,validationErrors:p,validationDetails:f}=d.displayValidation,{labelProps:h,fieldProps:g,descriptionProps:y,errorMessageProps:v}=yN({...e,isInvalid:m,errorMessage:e.errorMessage||p}),b=mB(e,{labelable:!0}),w={type:i,pattern:e.pattern},[x]=(0,ll.useState)(l);return yO(t,e.defaultValue??x,u),y$(e,d,t),{labelProps:h,inputProps:mD(b,"input"===n?w:void 0,{disabled:r,readOnly:o,required:a&&"native"===s,"aria-required":a&&"aria"===s||void 0,"aria-invalid":m||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:l,onChange:e=>u(mK(e).value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(lu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...c,...g}),descriptionProps:y,errorMessageProps:v,isInvalid:m,validationErrors:p,validationDetails:f}}(e,n),c=(0,ll.useRef)(null);return{inputProps:mD(i,{onBeforeInput:a,onCompositionStart(){let{value:e,selectionStart:t,selectionEnd:r}=n.current;c.current={value:e,selectionStart:t,selectionEnd:r}},onCompositionEnd(){if(n.current&&!t.validate(n.current.value)){let{value:e,selectionStart:r,selectionEnd:a}=c.current;n.current.value=e,n.current.setSelectionRange(r,a),t.setInputValue(e)}}}),labelProps:o,descriptionProps:s,errorMessageProps:l,...u}}({...O,...ea,name:void 0,form:void 0,label:D,autoFocus:x,isDisabled:g,isReadOnly:y,isRequired:v,validate:void 0,[yW]:t,value:L,defaultValue:"!",autoComplete:"off","aria-label":e["aria-label"]||void 0,"aria-labelledby":e["aria-labelledby"]||void 0,id:W,type:"text",inputMode:er,onChange:e=>{t.validate(e)&&t.setInputValue(e)},onBlur:_,onFocus:S,onFocusChange:k,onKeyDown:(0,ll.useMemo)(()=>mi(eo,C),[eo,C]),onKeyUp:P,onPaste:t=>{e.onPaste?.(t);let n=mK(t);n&&(n.selectionEnd??-1)-(n.selectionStart??0)===n.value.length&&(t.preventDefault(),F(t.clipboardData?.getData?.("text/plain")?.trim()??""))},description:T,errorMessage:R},t,n);yO(n,t.defaultNumberValue,t.setNumberValue),a=t,o=e.validationBehavior,i=e.commitBehavior,s=n,l=t.minValue,u=t.maxValue,c=e.step,d=t.numberValue,ms(()=>{let e=s.current;if("validate"!==i||a.realtimeValidation.isInvalid||!e||e.disabled||(!wP&&"u">typeof document&&((wP=document.createElement("input")).type="number"),!wP))return;wP.min=null==l||isNaN(l)?"":String(l),wP.max=null==u||isNaN(u)?"":String(u),wP.step=null==c||isNaN(c)?"":String(c),wP.value=null==d||isNaN(d)?"":String(d);let t=e.validity.valid&&wP.validity.valid,n=e.validationMessage||wP.validationMessage,r={isInvalid:!t,validationErrors:n?[n]:[],validationDetails:{badInput:e.validity.badInput,customError:e.validity.customError,patternMismatch:e.validity.patternMismatch,rangeOverflow:wP.validity.rangeOverflow,rangeUnderflow:wP.validity.rangeUnderflow,stepMismatch:wP.validity.stepMismatch,tooLong:e.validity.tooLong,tooShort:e.validity.tooShort,typeMismatch:e.validity.typeMismatch,valueMissing:e.validity.valueMissing,valid:t}};a.updateValidation(r),"native"!==o||wP.validity.valid||e.setCustomValidity(wP.validationMessage)});let ep=mD(Y,H,ec,{role:null,"aria-roledescription":pn()?null:V.format("numberField"),"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null,autoCorrect:"off",spellCheck:"false"});"native"===e.validationBehavior&&(ep["aria-required"]=void 0);let ef=e=>{((e=document)=>e.activeElement)()!==n.current&&("mouse"===e.pointerType?n.current?.focus():e.target.focus())},eh=e["aria-label"]||("string"==typeof e.label?e.label:"");eh||(m=null!=e.label?eu.id:e["aria-labelledby"]);let eg=mb(),ey=mb(),ev=mD(q,{"aria-label":h||V.format("increase",{fieldLabel:eh}).trim(),id:m&&!h?eg:null,"aria-labelledby":m&&!h?`${eg} ${m}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canIncrement,onPressStart:ef}),eb=mD(J,{"aria-label":f||V.format("decrease",{fieldLabel:eh}).trim(),id:m&&!f?ey:null,"aria-labelledby":m&&!f?`${ey} ${m}`:null,"aria-controls":W,excludeFromTabOrder:!0,preventFocusOnPress:!0,allowFocusWhenDisabled:!0,isDisabled:!t.canDecrement,onPressStart:ef});return{groupProps:{...ee,role:"group","aria-disabled":g,"aria-invalid":ei?"true":void 0},labelProps:eu,inputProps:ep,incrementButtonProps:ev,decrementButtonProps:eb,errorMessageProps:em,descriptionProps:ed,isInvalid:ei,validationErrors:es,validationDetails:el}}({...mT(e),label:c,validationBehavior:o},s,l),b=mS({...e,values:{state:s,isDisabled:e.isDisabled||!1,isInvalid:v.isInvalid||!1,isRequired:e.isRequired||!1},defaultClassName:"react-aria-NumberField"}),w=mB(e);return delete w.id,lu().createElement(m_,{values:[[wO,s],[yr,m],[yo,{...p,ref:l}],[vw,{...d,ref:u}],[fo,{slots:{increment:f,decrement:h}}],[fl,{slots:{description:g,errorMessage:y}}],[vg,v]]},lu().createElement("div",{...w,...b,ref:t,slot:e.slot||void 0,"data-disabled":e.isDisabled||void 0,"data-required":e.isRequired||void 0,"data-invalid":v.isInvalid||void 0}),e.name&&lu().createElement("input",{type:"hidden",name:e.name,value:isNaN(s.numberValue)?"":s.numberValue}))});function wM(e,t){return Number.parseInt(wi(e,{calendar:t.calendar,locale:t.baseName,day:!1,month:!1,noToday:!0,numberingSystem:"latn"}))}let wA=(0,ll.forwardRef)(function(e,t){let{className:n}=e,r=(0,ll.useContext)(g2),a=(0,ll.useContext)(g3),o=r??a,i=(0,ll.useContext)(wb),s=hA(),l=wi(o.visibleRange.start.toDate(s),{calendar:i.calendar,locale:i.baseName,day:!1,year:!1,noToday:!0}),u=wM(o.visibleRange.start.toDate(s),i),c=o.maxValue?wM(o.maxValue.toDate(s),i):void 0,d=o.minValue?wM(o.minValue.toDate(s),i):void 0,m=(0,ll.useCallback)(e=>{o.setFocusedDate(o.focusedDate.cycle("year",e-o.focusedDate.year))},[]);return o&&(0,cu.jsxs)("span",{ref:t,className:n,children:[(0,cu.jsx)("span",{children:l}),(0,cu.jsxs)(w$,{formatOptions:{useGrouping:!1},maxValue:c,minValue:d,onChange:m,value:u,children:[(0,cu.jsx)(yi,{}),(0,cu.jsxs)(ya,{children:[(0,cu.jsx)(fi,{slot:"increment",children:(0,cu.jsx)(cV,{size:8})}),(0,cu.jsx)(fi,{slot:"decrement",children:(0,cu.jsx)(cL,{size:8})})]})]})]})}),wj="-esm-form-engine__datepicker-module__inputGroup___gBam-",wI="-esm-form-engine__datepicker-module__inputSegment___wIJDZ",wL="-esm-form-engine__datepicker-module__dateInputWrapper___LiY68",wF="-esm-form-engine__datepicker-module__invalidText___A4cv4",wB="-esm-form-engine__datepicker-module__flatButton___HcpME",wV="-esm-form-engine__datepicker-module__flatButtonMd___eFpyF",wU="-esm-form-engine__datepicker-module__flatButtonSm___tsawR",wW="-esm-form-engine__datepicker-module__flatButtonLg___4HG5y";function wH({children:e}){let t=(0,ll.useContext)(by),n=(0,ll.useContext)(bv),r=t??n,a=uB(()=>r?.close());return(0,cu.jsx)(vh,{className:"-esm-form-engine__datepicker-module__dialog___DaqYi",ref:a,children:e})}let wz=(0,ll.forwardRef)(function({variant:e,today_:t,minDate:n,maxDate:r},a){let o="range"===e;return(0,cu.jsx)(bm,{ref:a,className:"-esm-form-engine__datepicker-module__popover___nAPzC",placement:"bottom start",offset:1,isNonModal:!0,children:(0,cu.jsx)(wH,{children:(0,cu.jsxs)(o?g5:g6,{...o?{minValue:n,maxValue:r,className:"cds--date-picker__calendar"}:{},children:[(0,cu.jsxs)("header",{className:"-esm-form-engine__datepicker-module__header___rPv3L",children:[(0,cu.jsx)(fi,{className:cd()(wB,wV),slot:"previous",children:(0,cu.jsx)(cZ,{size:16})}),(0,cu.jsx)(wA,{className:"-esm-form-engine__datepicker-module__monthYear___Rw4qE"}),(0,cu.jsx)(fi,{className:cd()(wB,wV),slot:"next",children:(0,cu.jsx)(cY,{size:16})})]}),(0,cu.jsx)(g8,{className:"-esm-form-engine__datepicker-module__calendarGrid___yKV-n",children:e=>(0,cu.jsx)(yn,{className:cd()("cds--date-picker__day",{"-esm-form-engine__datepicker-module__today___KzMTn":0===t.compare(e)}),date:e},e.toString())})]})})})}),wK=(0,ll.forwardRef)(function(e,t){let n=(0,ll.useContext)(by),[r,a]=mC({slot:e.slot},t,vr),{locale:o}=fE(),i=vn({...r,locale:o,createCalendar:gB}),s=(0,ll.useRef)(null),{fieldProps:l,inputProps:u}=yI({...r,inputRef:s},i,a),c=(0,ll.useCallback)(()=>{i.isDisabled||n.toggle()},[]);return(0,cu.jsxs)(m_,{values:[[va,i],[yo,{...u,ref:s}],[yr,{...l,ref:a,isInvalid:i.isInvalid}]],children:[(0,cu.jsx)(ya,{...e,id:e.id,ref:t,slot:e.slot||void 0,className:e.className,isDisabled:i.isDisabled,isInvalid:i.isInvalid,onClick:c,children:i.segments.map((t,n)=>(0,ll.cloneElement)(e.children(t),{key:n}))}),(0,cu.jsx)(yi,{})]})}),wG=(0,ll.forwardRef)(function(e,t){let n=(0,ll.useContext)(by),r=(0,ll.useContext)(bv);return(n??r).isInvalid?(0,cu.jsx)(d2,{ref:t,size:16,...e}):(0,cu.jsx)(cI,{ref:t,size:16,...e})});class wZ{constructor(e,t){this.locale=e,this.dictionary=t}of(e){return this.dictionary.getStringForLocale(e,this.locale)}}let wY=new Map,wq=(0,ll.forwardRef)(function({segment:e,...t},n){let r=(0,ll.useContext)(va),a=mr(n),{segmentProps:o}=function(e,t,n){let r,a,o,i,s=(0,ll.useRef)(""),{locale:l,direction:u}=fE(),c=function(){var e;let{locale:t}=fE(),n=fH((e=yP)&&e.__esModule?e.default:e,"@react-aria/datepicker");return(0,ll.useMemo)(()=>{try{return new Intl.DisplayNames(t,{type:"dateTimeField"})}catch{return new wZ(t,n)}},[t,n])}(),{ariaLabel:d,ariaLabelledBy:m,ariaDescribedBy:p,focusManager:f}=yM.get(t),h=e.isPlaceholder?"":e.text,g=(0,ll.useMemo)(()=>t.dateFormatter.resolvedOptions(),[t.dateFormatter]),y=fA({month:"long",timeZone:g.timeZone}),v=fA({hour:"numeric",hour12:g.hour12,timeZone:g.timeZone});if("month"!==e.type||e.isPlaceholder)"hour"!==e.type||e.isPlaceholder||(h=v.format(t.dateValue));else{let e=y.format(t.dateValue);h=e!==h?`${h} \u{2013} ${e}`:e}let{spinButtonProps:b}=wC({value:e.value??void 0,textValue:h,minValue:e.minValue,maxValue:e.maxValue,isDisabled:t.isDisabled,isReadOnly:t.isReadOnly||!e.isEditable,isRequired:t.isRequired,onIncrement:()=>{s.current="",t.increment(e.type)},onDecrement:()=>{s.current="",t.decrement(e.type)},onIncrementPage:()=>{s.current="",t.incrementPage(e.type)},onDecrementPage:()=>{s.current="",t.decrementPage(e.type)},onIncrementToMax:()=>{s.current="",t.incrementToMax(e.type)},onDecrementToMin:()=>{s.current="",t.decrementToMin(e.type)}}),w=(0,ll.useMemo)(()=>new(0,wT.d)(l,{maximumFractionDigits:0}),[l]),x=()=>{if(e.text===e.placeholder&&f.focusPrevious(),!w.isValidPartialNumber(e.text)||t.isReadOnly||e.isPlaceholder)("dayPeriod"===e.type||"era"===e.type)&&t.clearSegment(e.type);else{let n=e.text.slice(0,-1),r=w.parse(n);0===(n=0===r?"":n).length||0===r?t.clearSegment(e.type):t.setSegment(e.type,r),s.current=n}},{startsWith:D}=(r=function(e){let{locale:t}=fE(),n=t+(e?Object.entries(e).sort((e,t)=>e[0]<t[0]?-1:1).join():"");if(wY.has(n))return wY.get(n);let r=new Intl.Collator(t,e);return wY.set(n,r),r}({usage:"search",sensitivity:"base"}),a=(0,ll.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(0,t.length),t)),[r]),o=(0,ll.useCallback)((e,t)=>0===t.length||(e=e.normalize("NFC"),t=t.normalize("NFC"),0===r.compare(e.slice(-t.length),t)),[r]),i=(0,ll.useCallback)((e,t)=>{if(0===t.length)return!0;e=e.normalize("NFC");let n=0,a=(t=t.normalize("NFC")).length;for(;n+a<=e.length;n++){let o=e.slice(n,n+a);if(0===r.compare(t,o))return!0}return!1},[r]),(0,ll.useMemo)(()=>({startsWith:a,endsWith:o,contains:i}),[a,o,i])),E=fA({hour:"numeric",hour12:!0}),_=(0,ll.useMemo)(()=>{let e=new Date;return e.setHours(0),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),S=(0,ll.useMemo)(()=>{let e=new Date;return e.setHours(12),E.formatToParts(e).find(e=>"dayPeriod"===e.type).value},[E]),k=fA({year:"numeric",era:"narrow",timeZone:"UTC"}),C=(0,ll.useMemo)(()=>{if("era"!==e.type)return[];let n=hE(new hu(1,1,1),t.calendar),r=t.calendar.getEras().map(e=>{let t=n.set({year:1,month:1,day:1,era:e}).toDate("UTC");return{era:e,formatted:k.formatToParts(t).find(e=>"era"===e.type).value}}),a=function(e){e.sort();let t=e[0],n=e[e.length-1];for(let e=0;e<t.length;e++)if(t[e]!==n[e])return e;return 0}(r.map(e=>e.formatted));if(a)for(let e of r)e.formatted=e.formatted.slice(a);return r},[k,t.calendar,e.type]),P=n=>{if(t.isDisabled||t.isReadOnly)return;let r=s.current+n;switch(e.type){case"dayPeriod":if(D(_,n))t.setSegment("dayPeriod",0);else if(D(S,n))t.setSegment("dayPeriod",1);else break;f.focusNext();break;case"era":{let e=C.find(e=>D(e.formatted,n));e&&(t.setSegment("era",e.era),f.focusNext());break}case"day":case"hour":case"minute":case"second":case"month":case"year":{if(!w.isValidPartialNumber(r))return;let a=w.parse(r),o=a;if(void 0!==e.maxValue&&a>e.maxValue&&(o=w.parse(n)),isNaN(a))return;t.setSegment(e.type,o),void 0!==e.maxValue&&(Number(a+"0")>e.maxValue||r.length>=String(e.maxValue).length)?(s.current="",f.focusNext()):s.current=r}}};h0((0,ll.useRef)("u">typeof document?document:null),"selectionchange",()=>{let e=window.getSelection();e?.anchorNode&&mz(n.current,e?.anchorNode)&&e.collapse(n.current)});let T=(0,ll.useRef)("");h0(n,"beforeinput",r=>{if(n.current)switch(r.preventDefault(),r.inputType){case"deleteContentBackward":case"deleteContentForward":w.isValidPartialNumber(e.text)&&!t.isReadOnly&&x();break;case"insertCompositionText":T.current=n.current.textContent,n.current.textContent=n.current.textContent;break;default:null!=r.data&&P(r.data)}}),h0(n,"input",e=>{let{inputType:t,data:r}=e;"insertCompositionText"===t&&(n.current&&(n.current.textContent=T.current),null!=r&&(D(_,r)||D(S,r))&&P(r))}),ms(()=>{let e=n.current;return()=>{((e=document)=>e.activeElement)()===e&&(f.focusPrevious()||f.focusNext())}},[n,f]);let R=pn()||"timeZoneName"===e.type?{role:"textbox","aria-valuemax":null,"aria-valuemin":null,"aria-valuetext":null,"aria-valuenow":null}:{};e===(0,ll.useMemo)(()=>t.segments.find(e=>e.isEditable),[t.segments])||t.isInvalid||(p=void 0);let N=mb(),O=!t.isDisabled&&!t.isReadOnly&&e.isEditable,$="literal"===e.type?"":c.of(e.type),M=hY({"aria-label":`${$}${d?`, ${d}`:""}${m?", ":""}`,"aria-labelledby":m});if("literal"===e.type)return{segmentProps:{"aria-hidden":!0}};let A={caretColor:"transparent"};if("rtl"===u){A.unicodeBidi="embed";let t=g[e.type];("numeric"===t||"2-digit"===t)&&(A.direction="ltr")}return{segmentProps:mD(b,M,{id:N,...R,"aria-invalid":t.isInvalid?"true":void 0,"aria-describedby":p,"aria-readonly":t.isReadOnly||!e.isEditable?"true":void 0,"data-placeholder":e.isPlaceholder||void 0,contentEditable:O,suppressContentEditableWarning:O,spellCheck:O?"false":void 0,autoCorrect:O?"off":void 0,[parseInt(lu().version,10)>=17?"enterKeyHint":"enterkeyhint"]:O?"next":void 0,inputMode:t.isDisabled||"dayPeriod"===e.type||"era"===e.type||!O?void 0:"numeric",tabIndex:t.isDisabled?void 0:0,onKeyDown:e=>{if("a"===e.key&&(m7()?e.metaKey:e.ctrlKey)&&e.preventDefault(),!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&!e.altKey)switch(e.key){case"Backspace":case"Delete":e.preventDefault(),e.stopPropagation(),x()}},onFocus:()=>{s.current="",n.current&&h6(n.current,{containingElement:h4(n.current)});let e=window.getSelection();e?.collapse(n.current)},style:A,onPointerDown(e){e.stopPropagation()},onMouseDown(e){e.stopPropagation()}})}}(e,r,a),{focusProps:i,isFocused:s,isFocusVisible:l}=p5(),{hoverProps:u,isHovered:c}=ft({...t,isDisabled:r.isDisabled||"literal"===e.type}),d=function(e){let{className:t,style:n,children:r,defaultClassName:a,defaultChildren:o,defaultStyle:i,values:s}=e;return(0,ll.useMemo)(()=>{let e,l,u;return e="function"==typeof t?t({...s,defaultClassName:a}):t,l="function"==typeof n?n({...s,defaultStyle:i||{}}):n,u="function"==typeof r?r({...s,defaultChildren:o}):null==r?o:r,{className:e??a,style:l||i?{...i,...l}:void 0,children:u??o,"data-rac":""}},[t,n,r,a,o,i,s])}({...t,values:{...e,isReadOnly:!e.isEditable,isInvalid:r.isInvalid,isDisabled:r.isDisabled,isHovered:c,isFocused:s,isFocusVisible:l},defaultChildren:e.text}),m=(0,ll.useCallback)(e=>{e.stopPropagation()},[]);return(0,cu.jsx)("span",{...mD(mB(t),o,i,u),...d,ref:a,style:o.style,"data-placeholder":e.isPlaceholder||void 0,"data-invalid":r.isInvalid||void 0,"data-readonly":!e.isEditable||void 0,"data-disabled":r.isDisabled||void 0,"data-type":e.type,"data-hovered":c||void 0,"data-focused":s||void 0,"data-focus-visible":l||void 0,onClick:m})}),wJ={short:!1,size:"md"},wX=(0,ll.forwardRef)(function(e,t){let{className:n,defaultValue:r,isDisabled:a,invalid:o,invalidText:i,isInvalid:s,label:l,labelText:u,light:c,maxDate:d,minDate:m,onChange:p,onChangeRaw:f,short:h,size:g,value:y,...v}={...wJ,...e},{calendar:b,intlLocale:w,today_:x}=ww(),D=(0,ll.useId)(),E=!!(u??l),_=(0,ll.useMemo)(()=>bD(r,b),[r,b]),S=(0,ll.useMemo)(()=>bD(y,b,!0),[y,b]),k=(0,ll.useMemo)(()=>bD(d,b),[d,b]),C=(0,ll.useMemo)(()=>bD(m??wx,b),[m,b]),P=(0,ll.useMemo)(()=>o||s,[o,s]),T=(0,ll.useMemo)(()=>(f&&p&&console.error("An OpenmrsDatePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),f??(e=>p?.(bE(e)))),[f,p]);return(0,cu.jsx)(bx,{locale:w.toString(),children:(0,cu.jsx)("div",{className:cd()("cds--form-item",n),children:(0,cu.jsx)(m_,{values:[[wb,w]],children:(0,cu.jsxs)(bb,{className:cd()("cds--date-picker","cds--date-picker--single",{"cds--date-picker--short":h,"cds--date-picker--light":c}),defaultValue:_,isDisabled:a,isInvalid:P,maxValue:k,minValue:C,value:S,shouldForceLeadingZeros:"en"===w.language||void 0,...v,onChange:T,children:[(0,cu.jsxs)("div",{className:"cds--date-picker-container",children:[E&&(0,cu.jsx)(vx,{className:cd()("cds--label",{"cds--label--disabled":a}),htmlFor:D,children:u??l}),(0,cu.jsxs)(ya,{className:wj,children:[(0,cu.jsx)(wK,{id:E?D:void 0,ref:t,className:cd()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__inputWrapper___uKdT1",{"-esm-form-engine__datepicker-module__inputWrapperSm___0RXJc":"sm"===g,"-esm-form-engine__datepicker-module__inputWrapperMd___4Vff1":"md"===g||!g||0===g.length,"-esm-form-engine__datepicker-module__inputWrapperLg___VCRm5":"lg"===g}),children:e=>"era"!==e.type?(0,cu.jsx)(wq,{className:wI,segment:e}):(0,cu.jsx)(lu().Fragment,{})}),(0,cu.jsx)(fi,{className:cd()(wB,{[wU]:"sm"===g,[wV]:"md"===g||!g||0===g.length,[wW]:"lg"===g}),children:(0,cu.jsx)(wG,{})})]}),(0,cu.jsx)(vy,{className:wF,children:i})]}),(0,cu.jsx)(wz,{variant:"single",today_:x})]})})})})}),wQ=(0,ll.forwardRef)(function({className:e,defaultValue:t,invalid:n,invalidText:r,isDisabled:a,isInvalid:o,label:i,labelText:s,light:l,maxDate:u,minDate:c,onChange:d,onChangeRaw:m,size:p="md",value:f,...h},g){let{calendar:y,intlLocale:v,today_:b}=ww(),w=(0,ll.useId)(),x=!!(s??i),D=(0,ll.useMemo)(()=>{if(f)return{start:bD(f[0],y,!1),end:bD(f[1],y,!1)}},[f,y]),E=(0,ll.useMemo)(()=>{if(t)return{start:bD(t[0],y,!1),end:bD(t[1],y,!1)}},[t,y]),_=(0,ll.useMemo)(()=>bD(c??wx,y,!0),[c,y]),S=(0,ll.useMemo)(()=>bD(u,y,!0),[u,y]),k=(0,ll.useMemo)(()=>n||o,[n,o]),C=(0,ll.useMemo)(()=>(m&&d&&console.error("An OpenmrsDateRangePicker component was created with both onChange and onChangeRaw handlers defined. Only onChangeRaw will be used."),m??(e=>d?.([bE(e.start),bE(e.end)]))),[m,d]);return(0,cu.jsx)(bx,{locale:v.toString(),children:(0,cu.jsx)("div",{className:cd()("cds--form-item",e),children:(0,cu.jsx)(m_,{values:[[wb,v]],children:(0,cu.jsx)(bw,{id:x?w:void 0,className:cd()("cds--date-picker",{"cds--date-picker--light":l,"cds--date-picker--disabled":a}),isInvalid:k,shouldForceLeadingZeros:"en"===v.language||void 0,maxValue:S,minValue:_,value:D,defaultValue:E,ref:g,isDisabled:a,...h,onChange:C,children:(0,cu.jsxs)("div",{className:"cds--date-picker-container",children:[x&&(0,cu.jsx)(vx,{className:cd()("cds--label",{"cds--label--disabled":a}),htmlFor:w,children:s??i}),(0,cu.jsxs)(ya,{className:wj,children:[(0,cu.jsxs)("div",{className:cd()("-esm-form-engine__datepicker-module__inputsWrapper___xXRQI",{"-esm-form-engine__datepicker-module__inputsWrapperSm___nL+b6":"sm"===p,"-esm-form-engine__datepicker-module__inputsWrapperMd___Kgcps":"md"===p||!p||0===p.length,"-esm-form-engine__datepicker-module__inputsWrapperLg___raaSN":"lg"===p}),children:[(0,cu.jsx)(vi,{className:cd()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__startInput___cWw-5",wL),slot:"start",children:e=>(0,cu.jsx)(wq,{className:wI,segment:e})}),(0,cu.jsx)("div",{className:"-esm-form-engine__datepicker-module__separator___Ddb4g",children:(0,cu.jsx)("span",{"aria-hidden":"true","data-readonly":!0,children:"–"})}),(0,cu.jsx)(vi,{className:cd()("cds--date-picker-input__wrapper","-esm-form-engine__datepicker-module__endInput___xdYOl",wL),slot:"end",children:e=>(0,cu.jsx)(wq,{className:wI,segment:e})})]}),(0,cu.jsx)(fi,{className:cd()(wB,{[wU]:"sm"===p,[wV]:"md"===p||!p||0===p.length,[wW]:"lg"===p}),children:(0,cu.jsx)(wG,{})})]}),(0,cu.jsx)(vy,{className:wF,children:r}),(0,cu.jsx)(wz,{variant:"range",today_:b,minDate:_,maxDate:S})]})})})})})}),w0=({diagnoses:e})=>{let{diagnosisTags:t}=us({externalModuleName:"@openmrs/esm-styleguide"});return(0,cu.jsx)("div",{className:"-esm-form-engine__diagnosis-tags-module__container___1iigI",children:e.map(e=>{let{rank:n,uuid:r,display:a}=e,o=t[1===n?"primaryColor":"secondaryColor"];return(0,cu.jsx)(cg.Tag,{type:o,children:a},r)})})},w1={action:"-esm-form-engine__empty-card-module__action___oG778",content:"-esm-form-engine__empty-card-module__content___YUXvR",desktopHeading:"-esm-form-engine__empty-card-module__desktopHeading___EljiH",tabletHeading:"-esm-form-engine__empty-card-module__tabletHeading___8mc7w",tile:"-esm-form-engine__empty-card-module__tile___3-rRO"},w4=({width:e="64",height:t="64"})=>(0,cu.jsx)("svg",{width:e,height:t,viewBox:"0 0 64 64",children:(0,cu.jsx)("use",{href:"#omrs-empty-data-illustration"})}),w2=e=>{let t="tablet"===uM(),n=e.launchForm;return(0,cu.jsx)(cg.Layer,{className:w1.layer,children:(0,cu.jsxs)(cg.Tile,{className:w1.tile,children:[(0,cu.jsx)("div",{className:t?w1.tabletHeading:w1.desktopHeading,children:(0,cu.jsx)("h4",{children:e.headerTitle})}),(0,cu.jsx)(w4,{}),(0,cu.jsx)("p",{className:w1.content,children:aj("emptyStateText","There are no {{displayText}} to display",{displayText:e.displayText})}),(0,cu.jsx)("p",{className:w1.action,children:n&&(0,cu.jsx)(cg.Button,{onClick:()=>n(),kind:"ghost",size:t?"lg":"sm",children:aj("recordNewEntry","Record {{ displayText }}",{displayText:e.displayText})})})]})})},w3=({error:e,headerTitle:t})=>{let n="tablet"===uM();return(0,cu.jsx)(cg.Layer,{children:(0,cu.jsxs)(cg.Tile,{className:"-esm-form-engine__error-state-module__tile___mzWLn",children:[(0,cu.jsx)("div",{className:n?"-esm-form-engine__error-state-module__tabletHeading___l7Cpn":"-esm-form-engine__error-state-module__desktopHeading___p57fl",children:(0,cu.jsx)("h4",{children:t})}),(0,cu.jsxs)("p",{className:"-esm-form-engine__error-state-module__errorMessage___0fU6v",children:[aj("error","Error")," ",`${e?.response?.status}: `,e?.response?.statusText]}),(0,cu.jsx)("p",{className:"-esm-form-engine__error-state-module__errorCopy___xkVog",children:aj("errorCopy")})]})})},w6=w3,w5=lu().forwardRef((e,t)=>{let{slotName:n,basePath:r,componentContext:a,state:o}=uI(),i=window.location??{pathname:""},s=lE(n??"");return e.isChildOfHeader&&n&&s.length>0?(0,cu.jsxs)(cg.SideNav,{"aria-label":aj("leftNavigation","Left navigation"),className:"-esm-form-engine__left-nav-module__leftNav___czP9T",expanded:!0,isFixedNav:!0,ref:t,...e,children:[(0,cu.jsx)(lk,{name:"global-nav-menu-slot"}),n?(0,cu.jsx)(l9,{value:a,fallback:(0,cu.jsx)(lk,{name:n,state:{basePath:r,currentPath:i,...o}}),children:(0,cu.jsx)(lc.Provider,{value:a,children:(0,cu.jsx)(lk,{name:n,state:{basePath:r,currentPath:i,...o}})})}):null]}):null}),w9=({selectedLocationUuid:e,defaultLocationUuid:t,locationTag:n,locationsPerRequest:r=50,onChange:a})=>{let[o,i]=(0,ll.useState)(""),s=(0,ll.useId)(),{location:l}=function(e){let t=e?`/ws/fhir2/R4/Location?_id=${e}`:null,{data:n,error:r,isLoading:a}=ud()(t,aQ,{shouldRetryOnError:e=>!!e?.response?.status&&e.response.status>=500});return(0,ll.useMemo)(()=>({location:n?.data?.entry?n.data.entry[0]:null,error:t?r:null,isLoading:!!t&&a}),[n,a,r,t])}(t),{locations:u,isLoading:c,hasMore:d,loadingNewData:m,error:p,setPage:f}=function(e,t=0,n=""){let r=uu(n),{data:a,isLoading:o,isValidating:i,setSize:s,error:l}=uk()(function(n,a){if(a){let e=a.data?.link?.find(e=>"next"===e.relation);if(!e)return null;let t=new URL(e.url);return t.origin===window.location.origin?e.url:new URL(`${t.pathname}${t.search?`?${t.search}`:""}`,window.location.origin).toString()}let o=`${aq}/Location?`,i=new URLSearchParams;return i.append("_summary","data"),t&&i.append("_count",""+t),n&&i.append("_getpagesoffset",""+n*t),e&&i.append("_tag",e),"string"==typeof r&&""!==r&&i.append("name:contains",r),o+i.toString()},aQ);return(0,ll.useMemo)(()=>({locations:a?.length?a?.flatMap(e=>e?.data?.entry??[]):[],isLoading:o,totalResults:a?.[0]?.data?.total,hasMore:!!a?.length&&a?.[a.length-1]?.data?.link?.some(e=>"next"===e.relation),loadingNewData:i,error:l||null,setPage:s}),[o,a,i,s,l])}(n,r,o),h=(0,ll.useMemo)(()=>l&&!o&&t?[l,...u.filter(({resource:e})=>e.id!==t)]:u??[],[l,u,t,o]),g=(0,ll.useCallback)(e=>{a(),i(e.trim())},[a]),y=uV((0,ll.useCallback)(()=>{!m&&d&&f(e=>e+1)},[m,d,f])),v=d?Math.max(0,Math.floor(h.length-r/2)):-1;return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)(cg.Search,{"aria-describedby":p?`${s}-error`:void 0,labelText:aj("searchForLocation"),id:s,placeholder:aj("searchForLocation"),onChange:e=>g(e.target.value),size:"lg"}),p&&(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__errorNotification___NfvTe",id:`${s}-error`,children:(0,cu.jsx)(cg.InlineNotification,{kind:"error",subtitle:aj("errorLoadingLoginLocations","Unable to load login locations. Please try again or contact support if the problem persists."),title:aj("error","Error")})}),(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__searchResults___agplm",children:c?(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingContainer___EHghS",children:Array.from({length:5}).map((e,t)=>(0,cu.jsx)(cg.RadioButtonSkeleton,{className:"-esm-form-engine__location-picker-module__radioButtonSkeleton___up5rH",role:"progressbar"},t))}):(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__locationResultsContainer___06YOS",children:h.length>0?(0,cu.jsx)(cg.RadioButtonGroup,{name:"loginLocations",onChange:e=>{a(e?.toString())},orientation:"vertical",valueSelected:e,children:h.map((e,t)=>(0,cu.jsx)(cg.RadioButton,{className:"-esm-form-engine__location-picker-module__locationRadioButton___yKif7",id:e.resource.id,labelText:(0,cu.jsx)("span",{ref:t===v?y:null,children:e.resource.name}),name:e.resource.name,value:e.resource.id},e.resource.id))}):(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__emptyState___cPWp8",children:(0,cu.jsx)("p",{className:"-esm-form-engine__location-picker-module__locationNotFound___b14++",children:aj("noResultsToDisplay")})})}),m&&(0,cu.jsx)("div",{className:"-esm-form-engine__location-picker-module__loadingIcon___GVlrq",children:(0,cu.jsx)(cg.InlineLoading,{description:aj("loading")})})]})})]})},w8=B("modalState",{modalContainer:null,modalStack:[]}),w7=0;async function xe(e,t,n={}){let r=sY(t),a=null;if(e){if(!r)throw Error(`No modal named '${t}' has been registered.`);let{load:o}=r,i=await o(),s=w7++;a=await la({...i,name:`${t}-${s}`},{...n,domElement:e})}else C(`Failed to launch modal. Please notify your administrator. Modal name: ${t}`);return a}function xt(e){return"TO_BE_DELETED"===e.state||"DELETED"===e.state}function xn(e,t){t?.unmount&&(t.unmountPromise?.catch(()=>{}),t.unmount().catch(t=>{console.error(`The modal '${e}' failed to unmount`,t)}))}function xr(e){return e.find(e=>!xt(e))}function xa(e,t){e.container&&(e.container.style.visibility=t?"unset":"hidden")}let xo=window.getComputedStyle(document.body).overflow;function xi({modalStack:e,modalContainer:t}){if(t)if(e.length){t.style.visibility||(addEventListener("keydown",xl),document.body.style.overflow="hidden",t.style.visibility="unset");let n=xr(e);e.forEach(e=>{switch(e.state){case"NEW":{let n=function({size:e}){let t=document.createElement("div");return t.className=`cds--modal-container cds--modal-container--${e}`,t.setAttribute("role","dialog"),t.setAttribute("tabindex","-1"),t.setAttribute("aria-modal","true"),t}({size:e.props?.size??"md"});e.container=n,e.state="MOUNTING",xe(n,e.modalName,e.props).then(r=>{xt(e)?xn(e.modalName,r):r?(e.parcel=r,t.prepend(n),xa(e,xr(w8.getState().modalStack)===e),r.mountPromise.then(()=>{xt(e)||(e.state="MOUNTED")},t=>{C(t),e.parcel=null,xs(e)})):xs(e)},t=>{C(t),xs(e)});break}case"MOUNTING":case"MOUNTED":xa(e,e===n);break;case"TO_BE_DELETED":e.state="DELETED",e.onClose(),xn(e.modalName,e.parcel),e.container?.remove(),setTimeout(()=>{let t=w8.getState();w8.setState({...t,modalStack:t.modalStack.filter(t=>t!==e)})},0)}})}else t.style.removeProperty("visibility"),document.body.style.overflow=xo,removeEventListener("keydown",xl)}function xs(e){if(xt(e))return;e.state="TO_BE_DELETED";let t=w8.getState();w8.setState({...t,modalStack:[...t.modalStack]})}function xl(e){"Escape"===e.key&&function(){let[e]=w8.getState().modalStack;e&&xs(e)}()}function xu(e){w8.subscribe(xi),w8.setState({...w8.getState(),modalContainer:e})}function xc(e,t={},n=()=>{}){let r=()=>{let e=w8.getState().modalStack.find(e=>e.onClose===n);e&&xs(e)};if(sY(e)){var a;let o,i;a={state:"NEW",onClose:n,modalName:e,props:{close:r,...t}},i=[a,...(o=w8.getState()).modalStack],w8.setState({...o,modalStack:i})}else C(`Failed to launch modal. Please notify your administrator. Modal name: "${e}"`);return r}var xd=n(5992);let xm=({notification:e})=>{let{description:t,action:n,kind:r,critical:a,title:o,onAction:i}=e;return(0,cu.jsx)(cg.ActionableNotification,{actionButtonLabel:n,kind:r||"info",lowContrast:a,subtitle:t,title:o||"",inline:!0,onActionButtonClick:i})},xp=({subject:e})=>{let[t,n]=(0,ll.useState)([]);return(0,ll.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.action!==e.action||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,cu.jsx)(cu.Fragment,{children:t.map(e=>(0,cu.jsx)(xm,{notification:e},e.id))})},xf=({notification:e})=>{let{actionButtonLabel:t,onActionButtonClick:n=()=>{},subtitle:r,kind:a,title:o,critical:i,progressActionLabel:s,id:l,...u}=e,[c,d]=(0,ll.useState)(t);return(0,cu.jsx)(cg.ActionableNotification,{kind:a||"info",actionButtonLabel:c,ariaLabel:aj("closesActionableNotification","Closes actionable notification"),onActionButtonClick:()=>{n(),s&&d(s)},statusIconDescription:aj("actionableNotification","Actionable notification"),subtitle:r,title:o,lowContrast:i,inline:!0,...u})},xh=({subject:e})=>{let[t,n]=(0,ll.useState)([]);return(0,ll.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,cu.jsx)(cu.Fragment,{children:t.map(e=>(0,cu.jsx)(xf,{notification:e},e.id))})};class xg{subscribe(e){return this.listeners.add(e),{unsubscribe:()=>{this.listeners.delete(e)}}}next(e){for(let t of[...this.listeners])t(e)}constructor(){!function(e,t,n){t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n}(this,"listeners",new Set)}}let xy=new xg,xv=0,xb=new xg,xw=0;function xx(e){e&&(0,lC.createRoot)(e).render((0,cu.jsx)(xp,{subject:xy}))}function xD(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&(t instanceof Error||!(0,xd.A)(t)))?(e.description instanceof Error&&(e.description=e.description.toLocaleString()),setTimeout(()=>{xy.next({...e,id:xv++})},0)):console.error("showNotification must be called with an object having a 'description' property that is a non-empty string or object")}function xE(e){e&&(0,lC.createRoot)(e).render((0,cu.jsx)(xh,{subject:xb}))}function x_(e){var t;e&&("string"==typeof(t=e.actionButtonLabel)?t.trim().length>0:"object"==typeof t&&!(0,xd.A)(t))?setTimeout(()=>{xb.next({...e,id:xw++})},0):console.error("showActionableNotification must be called with an actionButtonLabel that is a non-empty string")}let xS=["NORMAL","HIGH","CRITICALLY_HIGH","OFF_SCALE_HIGH","LOW","CRITICALLY_LOW","OFF_SCALE_LOW"],xk=["critically_low","critically_high","high","low","normal","off_scale_low","off_scale_high"],xC={container:"-esm-form-engine__numeric-observation-module__container___gS0Wg",card:"-esm-form-engine__numeric-observation-module__card___w0fF5","abnormal-value":"-esm-form-engine__numeric-observation-module__abnormal-value___xuX3W","critical-value":"-esm-form-engine__numeric-observation-module__critical-value___Jynsn",cell:"-esm-form-engine__numeric-observation-module__cell___tMhBJ","critically-high":"-esm-form-engine__numeric-observation-module__critically-high___3L2wx","critically-low":"-esm-form-engine__numeric-observation-module__critically-low___XP+HX",high:"-esm-form-engine__numeric-observation-module__high___JV9do",low:"-esm-form-engine__numeric-observation-module__low___-uDKD","label-container":"-esm-form-engine__numeric-observation-module__label-container___vTf2y","value-container":"-esm-form-engine__numeric-observation-module__value-container___xTUIC",label:"-esm-form-engine__numeric-observation-module__label___-pfmb",value:"-esm-form-engine__numeric-observation-module__value___1A4zt",units:"-esm-form-engine__numeric-observation-module__units___SzvX+","pad-right":"-esm-form-engine__numeric-observation-module__pad-right___ND9XL","off-scale-low":"-esm-form-engine__numeric-observation-module__off-scale-low___gFAv9","off-scale-high":"-esm-form-engine__numeric-observation-module__off-scale-high___aSEmX",arrow:"-esm-form-engine__numeric-observation-module__arrow___9bvsX"},xP=({value:e,unit:t,label:n,interpretation:r,referenceRange:a,conceptUuid:o,variant:i="card",patientUuid:s})=>{let l=(0,ll.useId)(),{referenceRange:u,isLoading:c}=function(e,t){let n=null;e&&(n=t?`${aY}/conceptreferencerange/?patient=${t}&concept=${e}&v=full`:`${aY}/conceptreferencerange/?concept=${e}&v=full`);let{data:r,error:a,isLoading:o}=ud()(n,aQ),i=r?.data?.results?.[0];return{referenceRange:i?{hiNormal:i.hiNormal??null,hiAbsolute:i.hiAbsolute??null,hiCritical:i.hiCritical??null,lowNormal:i.lowNormal??null,lowAbsolute:i.lowAbsolute??null,lowCritical:i.lowCritical??null}:void 0,error:a,isLoading:o}}(a||r?void 0:o,s),d=a??u,m=(0,ll.useMemo)(()=>{if(r)return r?"--"===r?"normal":xS.includes(r)?r.toLowerCase():xk.includes(r)?r:"normal":void 0;if(d&&!c){if(!d||null==e||""===e)return"normal";let t="string"==typeof e?Number.parseFloat(e):e;return Number.isNaN(t)?"normal":null!==d.hiAbsolute&&void 0!==d.hiAbsolute&&t>d.hiAbsolute?"off_scale_high":null!==d.hiCritical&&void 0!==d.hiCritical&&t>=d.hiCritical?"critically_high":null!==d.hiNormal&&void 0!==d.hiNormal&&t>d.hiNormal?"high":null!==d.lowAbsolute&&void 0!==d.lowAbsolute&&t<d.lowAbsolute?"off_scale_low":null!==d.lowCritical&&void 0!==d.lowCritical&&t<=d.lowCritical?"critically_low":null!==d.lowNormal&&void 0!==d.lowNormal&&t<d.lowNormal?"low":"normal"}return"normal"},[r,d,e,c])??"normal",p="critically_low"===m||"critically_high"===m||"off_scale_low"===m||"off_scale_high"===m,f="normal"!==m,h=n?`omrs-numeric-obs-label-${n.replaceAll(/\s+/g,"-").toLowerCase()}-${l}`:void 0,g=`omrs-numeric-obs-value-${l}`,y=`omrs-numeric-obs-unit-${l}`,v=null!=e&&""!==e,b=v?e:aj("notAvailable","Not available"),w=cd()({[xC["critically-low"]]:"critically_low"===m||"off_scale_low"===m,[xC["critically-high"]]:"critically_high"===m||"off_scale_high"===m,[xC.low]:"low"===m,[xC.high]:"high"===m,[xC["off-scale-low"]]:"off_scale_low"===m,[xC["off-scale-high"]]:"off_scale_high"===m}),x=cd()({[xC.container]:!0,[xC.card]:!0,[xC["critical-value"]]:p,[xC["abnormal-value"]]:f&&!p}),D=cd()({[xC.cell]:!0,[w]:!0});return"cell"===i?(0,cu.jsxs)("div",{className:D,children:[b,v&&t?` ${t}`:""]}):(0,cu.jsxs)("section",{className:x,"data-testid":"numeric-observation-card",children:[n&&(0,cu.jsxs)("div",{className:xC["label-container"],children:[(0,cu.jsx)("span",{id:h,className:xC.label,children:n}),f&&(0,cu.jsx)("span",{className:xC[m.replace("_","-")],title:aj("abnormalValue","Abnormal value")})]}),(0,cu.jsxs)("div",{className:xC["value-container"],children:[(0,cu.jsx)("span",{id:g,"aria-labelledby":h&&y?`${h} ${y}`:h||y||void 0,className:xC.value,children:b}),v&&t&&(0,cu.jsx)("span",{id:y,className:xC.units,children:t})]})]})},xT="-esm-form-engine__page-header-module__pageHeader___6TOjO",xR=e=>{if("children"in e){let{children:t,className:n,...r}=e;return(0,cu.jsx)("div",{className:cd()(xT,n),...r,children:t})}{let{title:t,illustration:n,className:r,...a}=e;return(0,cu.jsx)("div",{className:cd()(xT,r),...a,children:(0,cu.jsx)(xN,{title:t,illustration:n})})}},xN=({title:e,illustration:t,className:n})=>{let[r,a]=(0,ll.useState)(null);return(0,ll.useEffect)(()=>{t3("@openmrs/esm-styleguide").then(e=>{a(e)})},[]),(0,cu.jsxs)("div",{className:cd()("-esm-form-engine__page-header-module__pageHeaderContent___mCImT",n),children:[t,(0,cu.jsxs)("div",{className:"-esm-form-engine__page-header-module__pageLabels___kqDS+",children:[r?.implementationName&&(0,cu.jsx)("p",{children:aj(r.implementationName)}),(0,cu.jsx)("p",{className:"-esm-form-engine__page-header-module__pageName___SbZBC",children:e})]})]})},xO=({totalItems:e,pageSize:t,onPageNumberChange:n,pageNumber:r,dashboardLinkUrl:a,currentItems:o,dashboardLinkLabel:i})=>{let{pageSizes:s,pageItemsCount:l}=uH(t,e,r,o),u="tablet"===uM(),c=aj("paginationItemsCount","{{pageItemsCount}} / {{totalItems}} items",{totalItems:e,pageItemsCount:l});return(0,cu.jsx)(cu.Fragment,{children:e>0&&(0,cu.jsxs)("div",{className:cd()({"-esm-form-engine__pagination-module__tablet___82gj1":u,"-esm-form-engine__pagination-module__desktop___6yI8e":!u}),children:[(0,cu.jsxs)("div",{children:[c,a&&(0,cu.jsx)(ld,{to:a,className:"-esm-form-engine__pagination-module__configurableLink___oIqma",children:i??aj("seeAll","See all")})]}),(0,cu.jsx)(cg.Pagination,{className:"-esm-form-engine__pagination-module__pagination___A-Lcg",page:r,pageSize:t,pageSizes:s,totalItems:e,onChange:n,pageRangeText:(e,t)=>aj("paginationOfPages","of {{count}} pages",{count:t}),size:u?"lg":"sm"})]})})};function x$(e){return xA(xI(e,"usual","official"))}function xM(e){return x$(e)}function xA(e){var t;let n;return e?e.text??(n=(t=e).given??[],(t.family?n.concat(t.family):n).join(" ")):""}function xj(e){return xA(e)}function xI(e,...t){for(let n of(0==t.length&&(t=["usual"]),t)){let t=e.name?.find(e=>{var t,r;return t=e,r=n,t.use?t.use===r:"usual"===r});if(t)return t}}function xL(e,t=uX()()){let n=uX()(t),r=wm(e,n);if(null==r)return null;let a=n.diff(r,"hours"),o=n.diff(r,"days"),i=n.diff(r,"weeks"),s=n.diff(r,"months"),l=n.diff(r,"years"),u={};if(a<2)u.minutes=n.diff(r,"minutes");else if(o<2)u.hours=a;else if(i<4)u.days=o;else if(l<1){let e=n.subtract(i,"weeks").diff(r,"days");u.weeks=i,u.days=e}else if(l<2){let e=n.subtract(s,"months").diff(r,"days");u.months=s,u.days=e}else if(l<18){let e=n.subtract(l,"year").diff(r,"months");u.years=l,u.months=e}else u.years=l;return u}function xF(e,t=uX()()){let n=xL(e,t);if(null==n)return null;let r={style:"short",localeMatcher:"lookup"};return"minutes"in n&&0===n.minutes&&(r.minutesDisplay="always"),wd(n,r)}let xB={container:"-esm-form-engine__patient-banner-patient-info-module__container___iC32K",activePatientContainer:"-esm-form-engine__patient-banner-patient-info-module__activePatientContainer___OoDPd",patientBanner:"-esm-form-engine__patient-banner-patient-info-module__patientBanner___swajU",patientName:"-esm-form-engine__patient-banner-patient-info-module__patientName___+2+Xi",patientAvatar:"-esm-form-engine__patient-banner-patient-info-module__patientAvatar___Rdf75",patientAvatarButton:"-esm-form-engine__patient-banner-patient-info-module__patientAvatarButton___A1q8c",patientInfo:"-esm-form-engine__patient-banner-patient-info-module__patientInfo___L-cOQ",demographics:"-esm-form-engine__patient-banner-patient-info-module__demographics___IDhb0",row:"-esm-form-engine__patient-banner-patient-info-module__row___TP7gU",flexRow:"-esm-form-engine__patient-banner-patient-info-module__flexRow___vNMt2",tagsSlot:"-esm-form-engine__patient-banner-patient-info-module__tagsSlot___0Dvjn",identifiers:"-esm-form-engine__patient-banner-patient-info-module__identifiers___d3GTJ",identifier:"-esm-form-engine__patient-banner-patient-info-module__identifier___kc6eq",primaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__primaryIdentifier___ZxRUU",secondaryIdentifier:"-esm-form-engine__patient-banner-patient-info-module__secondaryIdentifier___eQh8x",value:"-esm-form-engine__patient-banner-patient-info-module__value___CoAOR",tag:"-esm-form-engine__patient-banner-patient-info-module__tag___InccN",gender:"-esm-form-engine__patient-banner-patient-info-module__gender___vfinx",separator:"-esm-form-engine__patient-banner-patient-info-module__separator___3OIBl",tooltipPadding:"-esm-form-engine__patient-banner-patient-info-module__tooltipPadding___hBqWG",tooltipSmallText:"-esm-form-engine__patient-banner-patient-info-module__tooltipSmallText___bPnkq",actionsButtonText:"-esm-form-engine__patient-banner-patient-info-module__actionsButtonText___VNvm7"};function xV({showIdentifierLabel:e,type:t,value:n}){return(0,cu.jsx)("span",{className:xB.primaryIdentifier,children:(0,cu.jsxs)(cg.Tag,{className:xB.tag,type:"gray",children:[e&&t?.text&&(0,cu.jsxs)("span",{className:xB.label,children:[t.text,": "]}),(0,cu.jsx)("span",{className:xB.value,children:n})]})})}function xU({showIdentifierLabel:e,type:t,value:n}){return(0,cu.jsxs)(cg.FormLabel,{className:xB.secondaryIdentifier,id:`patient-banner-identifier-${n}`,children:[e&&(0,cu.jsxs)("span",{className:xB.label,children:[t?.text,": "]}),(0,cu.jsx)("span",{className:xB.value,children:n})]})}function xW({identifiers:e,showIdentifierLabel:t}){let{excludePatientIdentifierCodeTypes:n}=us(),{primaryIdentifierCode:r}=uG(),a=e?.filter(e=>{let t=e.type?.coding?.[0]?.code;return t&&!n?.uuids.includes(t)})??[];return(0,cu.jsx)(cu.Fragment,{children:a?.length?a.map(({value:e,type:n},o)=>(0,cu.jsxs)(lu().Fragment,{children:[(0,cu.jsx)("span",{className:xB.identifier,children:n?.coding?.[0]?.code===r?(0,cu.jsx)(xV,{showIdentifierLabel:t,type:n,value:e}):(0,cu.jsx)(xU,{showIdentifierLabel:t,type:n,value:e})}),o<a.length-1&&(0,cu.jsx)("span",{className:xB.separator,children:"\xb7"})]},e)):""})}let xH={Female:c9,Male:c8,Other:c7,Unknown:de},xz=({gender:e})=>{let t=xH[e];return t?(0,cu.jsx)(t,{fill:"#525252"}):null},xK={male:"Male",female:"Female",other:"Other",unknown:"Unknown"};function xG({patient:e,renderedFrom:t}){var n;let r,a,o=x$(e),i=e?.gender&&(a=xK[r=(n=e.gender).toLowerCase()]??"Unknown",{displayText:aj(r,n),iconKey:a}),s=(0,ll.useMemo)(()=>({patientUuid:e.id,patient:e,renderedFrom:t}),[e.id,e,t]);return(0,cu.jsxs)("div",{className:xB.patientInfo,children:[(0,cu.jsx)("div",{className:cd()(xB.row,xB.patientNameRow),children:(0,cu.jsxs)("div",{className:xB.flexRow,children:[(0,cu.jsx)("span",{className:xB.patientName,children:o}),i&&(0,cu.jsxs)("div",{className:xB.gender,children:[(0,cu.jsx)(xz,{gender:i.iconKey}),(0,cu.jsx)("span",{children:i.displayText})]}),(0,cu.jsx)(lk,{className:xB.tagsSlot,name:"patient-banner-tags-slot",state:s})]})}),(0,cu.jsxs)("div",{className:xB.demographics,children:[e.birthDate&&(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)("span",{children:xF(e.birthDate)}),(0,cu.jsx)("span",{className:xB.separator,children:"\xb7"}),(0,cu.jsx)("span",{children:wo(e.birthDate,{time:!1})}),(0,cu.jsx)("span",{className:xB.separator,children:"\xb7"})]}),(0,cu.jsx)(xW,{identifiers:e.identifier,showIdentifierLabel:!0}),(0,cu.jsx)(lk,{className:xB.extensionSlot,name:"patient-banner-bottom-slot",state:s})]})]})}var xZ=n(8282);function xY({patient:e,patientUuid:t,actionsSlotName:n,additionalActionsSlotState:r}){let[a,o]=(0,ll.useState)(!1),{extensions:i}=l_(n),s="tablet"===uM(),l=uB(()=>o(!1),a),u=(0,ll.useRef)(null),c=(0,ll.useRef)(null),d=(0,ll.useId)(),m=`patient-actions-menu-trigger-${d}`,p=`patient-actions-menu-${d}`,f=(0,ll.useCallback)(()=>o(e=>!e),[]),h=(0,ll.useCallback)(()=>{o(!1),u.current?.focus()},[]),g=(0,ll.useCallback)(e=>{if("Escape"===e.key&&a){e.stopPropagation(),h();return}if(("ArrowDown"===e.key||"ArrowUp"===e.key)&&a){e.preventDefault();let t=c.current?.querySelectorAll('[role="menuitem"]:not([disabled])');if(!t?.length)return;let n=document.activeElement?.closest?.('[role="menuitem"]')??document.activeElement,r=Array.from(t).indexOf(n);if(-1===r)return void t["ArrowDown"===e.key?0:t.length-1]?.focus();let a=r+("ArrowDown"===e.key?1:-1),o=a<0?t.length-1:a>=t.length?0:a;t[o]?.focus()}},[h,a]);(0,ll.useEffect)(()=>{if(a&&c.current){let e=c.current.querySelector('[role="menuitem"]:not([disabled])');e?.focus()}},[a]);let y=(0,ll.useMemo)(()=>({patientUuid:t,patient:e,closeMenu:h,...r}),[t,e,h,r]);return 0===i.length?null:(0,cu.jsx)("div",{className:"-esm-form-engine__patient-banner-actions-menu-module__overflowMenuContainer___FbFcO",children:(0,cu.jsxs)("div",{"data-overflow-menu":!0,className:cd()("cds--overflow-menu",cb),ref:l,children:[(0,cu.jsxs)("button",{className:cd()("cds--btn","cds--btn--ghost","cds--overflow-menu__trigger",{"cds--overflow-menu--open":a},cD),"aria-controls":p,"aria-expanded":a,"aria-haspopup":"true",id:m,onClick:f,onKeyDown:g,ref:u,children:[(0,cu.jsx)("span",{className:"-esm-form-engine__patient-banner-actions-menu-module__actionsButtonText___hk4xW",children:aj("actions","Actions")})," ",(0,cu.jsx)(xZ.CH,{size:16,style:{marginLeft:"0.5rem",fill:"#78A9FF"}})]}),(0,cu.jsxs)("div",{className:cd()("cds--overflow-menu-options","cds--overflow-menu--flip",cw,{[cx]:a}),"aria-labelledby":m,"data-floating-menu-direction":"bottom",id:p,onKeyDown:g,ref:c,role:"menu",tabIndex:-1,children:[(0,cu.jsx)("ul",{className:cd()("cds--overflow-menu-options__content",{"cds--overflow-menu-options--lg":s}),children:(0,cu.jsx)(lk,{name:n,state:y},n)}),(0,cu.jsx)("span",{})]})]})})}var xq=n(5570),xJ=n.n(xq);function xX(e){let{patientPhotoConceptUuid:t}=us({externalModuleName:"@openmrs/esm-styleguide"}),n=t?`${aY}/obs?patient=${e}&concept=${t}&v=full`:null,{data:r,error:a,isLoading:o}=lW()(e?n:null,aQ),i=r?.data?.results[0];return{data:i?{dateTime:i?.obsDatetime,imageSrc:i?.value?.links?.uri}:null,error:a,isLoading:o}}let xQ=({width:e=56,height:t=56,"aria-label":n})=>{let{t:r}=(0,lV.useTranslation)();return(0,cu.jsxs)("svg",{"aria-label":n??r("patientPhotoPlaceholder","Patient photo placeholder"),width:e,height:t,fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[(0,cu.jsx)("path",{fill:"#ffffff",d:"M0 0h56v56H0z"}),(0,cu.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"m36.75 20.134-.884-.884L19.25 35.866l.884.884 1.25-1.25H34.25a1.252 1.252 0 0 0 1.25-1.25V21.384l1.25-1.25Zm-2.5 14.116H22.634l4.87-4.87 1.487 1.486a1.25 1.25 0 0 0 1.768 0l.991-.991 2.5 2.498v1.877Zm0-3.645-1.616-1.616a1.25 1.25 0 0 0-1.768 0l-.991.991-1.486-1.486 5.861-5.86v7.971Zm-12.5 1.145v-1.875l3.125-3.123.858.859.885-.885-.86-.86a1.25 1.25 0 0 0-1.767 0l-2.241 2.242V21.75h10V20.5h-10c-.69 0-1.25.56-1.25 1.25v10h1.25Z",fill:"#8D8D8D"})]})},x0="-esm-form-engine__patient-photo-module__avatar___thboZ";function x1({patientUuid:e,patientName:t,alt:n}){let{data:r,isLoading:a}=xX(e),[o,i]=(0,ll.useState)(null),[s,l]=(0,ll.useState)(!1),u=(0,ll.useMemo)(()=>xJ().generate(e),[e]);(0,ll.useEffect)(()=>{if(r?.imageSrc){let e=new URL(r.imageSrc,window.location.origin).pathname;l(!0);let t=!1,n=new Image;return n.onload=()=>{t||(i(e),l(!1))},n.onerror=()=>{t||(i(null),l(!1))},n.src=e,()=>{t=!0}}i(null),l(!1)},[r?.imageSrc]);let c=(0,ll.useMemo)(()=>n||(o?aj("patientPhotoAlt","Profile photo of {{patientName}}",{patientName:t}):aj("patientAvatarAlt","Avatar for {{patientName}}",{patientName:t})),[n,o,t]);return a||s?(0,cu.jsx)(cg.SkeletonIcon,{className:"-esm-form-engine__patient-photo-module__skeleton___WWtyX","data-testid":"skeleton-icon"}):r?.imageSrc&&!o?(0,cu.jsx)(xQ,{"aria-label":aj("patientPhotoPlaceholder","Photo placeholder for {{patientName}}",{patientName:t})}):o?(0,cu.jsx)("div",{"aria-label":c,children:(0,cu.jsx)("img",{className:x0,src:o,alt:c,title:t})}):(0,cu.jsx)("div",{"aria-label":c,children:(0,cu.jsx)("div",{className:x0,title:t,style:{backgroundImage:u.toDataUrl(),backgroundRepeat:"no-repeat",backgroundSize:"cover"},children:(0,cu.jsx)("span",{className:"-esm-form-engine__patient-photo-module__initials___xLeEF",children:function(e,t=3){return e.split(/\s+/).filter(Boolean).slice(0,t).map(e=>e[0]).join("")}(t)})})})}let x4=["omrs-pict-appointments","omrs-pict-assessment-1","omrs-pict-assessment-2","omrs-pict-blood-bank","omrs-pict-cardiology","omrs-pict-ct-scan","omrs-pict-dentistry","omrs-pict-digital-trust","omrs-pict-emergency-department","omrs-pict-facility","omrs-pict-geriatrics","omrs-pict-gynaecology","omrs-pict-in-patient","omrs-pict-laboratory","omrs-pict-labs-2","omrs-pict-metadata-export","omrs-pict-obstetrics","omrs-pict-patient-search","omrs-pict-patients","omrs-pict-payments-desk","omrs-pict-pharmacy","omrs-pict-pharmacy-2","omrs-pict-registration","omrs-pict-service-queues","omrs-pict-stock-management","omrs-pict-transfer","omrs-pict-triage","omrs-pict-x-ray"],x2=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-appointments",pictogramProps:e})})),x3=x2,x6=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-assessment-1",pictogramProps:e})})),x5=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-assessment-2",pictogramProps:e})})),x9=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-blood-bank",pictogramProps:e})})),x8=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-cardiology",pictogramProps:e})})),x7=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-ct-scan",pictogramProps:e})})),De=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-dentistry",pictogramProps:e})})),Dt=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-digital-trust",pictogramProps:e})})),Dn=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-emergency-department",pictogramProps:e})})),Dr=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-facility",pictogramProps:e})})),Da=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-geriatrics",pictogramProps:e})})),Do=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-gynaecology",pictogramProps:e})})),Di=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-in-patient",pictogramProps:e})})),Ds=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-laboratory",pictogramProps:e})})),Dl=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-labs-2",pictogramProps:e})})),Du=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-metadata-export",pictogramProps:e})})),Dc=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-obstetrics",pictogramProps:e})})),Dd=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-patient-search",pictogramProps:e})})),Dm=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-patients",pictogramProps:e})})),Dp=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-payments-desk",pictogramProps:e})})),Df=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-pharmacy",pictogramProps:e})})),Dh=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-pharmacy-2",pictogramProps:e})})),Dg=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-registration",pictogramProps:e})})),Dy=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-service-queues",pictogramProps:e})})),Dv=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-stock-management",pictogramProps:e})})),Db=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-transfer",pictogramProps:e})})),Dw=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-triage",pictogramProps:e})})),Dx=(0,ll.memo)((0,ll.forwardRef)(function(e,t){return(0,cu.jsx)(DS,{ref:t,pictogram:"omrs-pict-x-ray",pictogramProps:e})})),DD=Dr,DE=Dm,D_=(0,ll.memo)((0,ll.forwardRef)(function({pictogram:e,fallback:t,...n},r){let a=(0,ll.useRef)(document.getElementById(e));return(0,ll.useEffect)(()=>{let t=document.getElementById("omrs-svgs-container"),n=new MutationObserver(t=>{for(let n of t)"childList"===n.type&&(a.current=document.getElementById(e))});return t&&n.observe(t,{childList:!0}),()=>n.disconnect()},[e]),(0,cu.jsx)(l9,{value:a.current,fallback:t,children:(0,cu.jsx)(DS,{ref:r,pictogram:e,pictogramProps:n})})})),DS=(0,ll.memo)((0,ll.forwardRef)(function({pictogram:e,pictogramProps:t},n){let{className:r,size:a}=Object.assign({},{size:92},t);return(a<=26||a>144)&&(console.error(`Invalid size '${a}' specified for ${e}. Defaulting to 92.`),a=92),(0,cu.jsx)("svg",{ref:n,className:cd()("-esm-form-engine__pictograms-module__pictogram___ooPKM",r),height:a,width:a,children:(0,cu.jsx)("use",{href:`#${e}`})})})),Dk=({children:e})=>"tablet"===uM()?(0,cu.jsx)(cg.Layer,{children:e}):(0,cu.jsx)(cu.Fragment,{children:e}),DC=({snackbar:e,closeSnackbar:t})=>{let{actionButtonLabel:n="",kind:r="success",onActionButtonClick:a=()=>{},isLowContrast:o="error"!==r,progressActionLabel:i,subtitle:s="",timeoutInMs:l=5e3,autoClose:u="error"!==r,title:c,id:d,...m}=e,[p,f]=(0,ll.useState)(n),[h,g]=(0,ll.useState)(!0),[y,v]=(0,ll.useState)(!1),b=(0,ll.useCallback)(()=>{setTimeout(t,250)},[t]),w=(0,ll.useCallback)(()=>{v(!0),b()},[b]);return(0,ll.useEffect)(()=>{if(u){let e=setTimeout(w,l);return()=>clearTimeout(e)}},[l,u,w]),(0,ll.useEffect)(()=>{g(!1),window.setTimeout(()=>{g(!0)},0)},[]),(0,cu.jsx)(cg.ActionableNotification,{actionButtonLabel:p,"aria-label":aj("closeSnackbar","Close snackbar"),className:cd()("-esm-form-engine__snackbar-module__slideIn___senVE",{"-esm-form-engine__snackbar-module__animated___8eltL":h,"-esm-form-engine__snackbar-module__slideOut___BIIXm":y}),kind:r,lowContrast:o,onActionButtonClick:()=>{a(),w(),i&&f(i)},onClose:b,statusIconDescription:aj("snackbarNotification","Snackbar notification"),subtitle:s,title:c,...m})},DP=({subject:e})=>{let[t,n]=(0,ll.useState)([]),r=(0,ll.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,ll.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.subtitle!==e.subtitle||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick||t.kind!==e.kind||t.title!==e.title),e]));return()=>t.unsubscribe()},[e]),(0,cu.jsx)(cu.Fragment,{children:t.map(e=>(0,cu.jsx)(DC,{snackbar:e,closeSnackbar:()=>r(e)},e.id))})},DT=new xg,DR=0;function DN(e){e&&(0,lC.createRoot)(e).render((0,cu.jsx)(DP,{subject:DT}))}function DO(e){var t;e&&"string"==typeof(t=e.title)&&t.trim().length>0?setTimeout(()=>{DT.next({...e,id:DR++})},0):console.error("showSnackbar must be called with an object having a 'title' property that is a non-empty string")}let D$=({toast:e,closeToast:t})=>{let{description:n,kind:r,critical:a,title:o,actionButtonLabel:i,onActionButtonClick:s=()=>{}}=e,l=(0,ll.useCallback)(()=>{s(),t()},[t,s]);return(0,cu.jsx)("div",{children:(0,cu.jsx)(cg.ActionableNotification,{actionButtonLabel:i,kind:r||"info",lowContrast:a,subtitle:n,title:o||"",onActionButtonClick:l,onClose:t})})},DM=({subject:e})=>{let[t,n]=(0,ll.useState)([]),r=(0,ll.useCallback)(e=>{n(t=>t.filter(t=>t!==e))},[]);return(0,ll.useEffect)(()=>{let t=e.subscribe(e=>n(t=>[...t.filter(t=>t.description!==e.description||t.kind!==e.kind||t.title!==e.title||t.actionButtonLabel!==e.actionButtonLabel||t.onActionButtonClick!==e.onActionButtonClick),e]));return()=>t.unsubscribe()},[e]),(0,cu.jsx)(cu.Fragment,{children:t.map(e=>(0,cu.jsx)(D$,{toast:e,closeToast:()=>r(e)},e.id))})},DA=new xg,Dj=0;function DI(e){e&&(0,lC.createRoot)(e).render((0,cu.jsx)(DM,{subject:DA}))}function DL(e){var t;e&&("string"==typeof(t=e.description)?t.trim().length>0:"object"==typeof t&&!(0,xd.A)(t))?setTimeout(()=>{DA.next({...e,id:Dj++})},0):console.error("showToast must be called with an object having a 'description' property that is a non-empty string or object")}function DF(e,t=!1){if(t)return!0;let n=DH[e];return!n||!n()}function DB(e,t){let n=DX.getState()?.workspaceGroup,r=n?.name;r&&e===r&&D4(()=>{let r=D9(e);r&&(r.setState({},!0),r.subscribe(()=>{})()),"function"==typeof n?.cleanup&&n.cleanup(),DX.setState(e=>({...e,workspaceGroup:void 0})),"function"==typeof t&&t()},r?e=>e.currentWorkspaceGroup===r:()=>!0)}function DV(e,t){let{name:n,additionalProps:r}=t;s1(n);let a=()=>{DY(e.name,{ignoreChanges:!0,onWorkspaceClose:()=>DU(n,r),closeWorkspaceGroup:!1})};DF(e.name)?a():D3("closing-workspace-launching-new-workspace",a,e.title??e.name)}function DU(e,t){let n=s1(e),r=DX.getState().workspaceGroup;if(r&&!r.members?.includes(e))return void DB(r.name,()=>{DU(e,t)});let a=DX.getState().workspaceGroup?.name,o={...n,title:D6(n,t),closeWorkspace:(t={})=>DY(e,t),closeWorkspaceWithSavedChanges:t=>DY(e,{ignoreChanges:!0,...t}),promptBeforeClosing:t=>{var n,r;return n=e,r=t,void(DH[n]=r)},setTitle:(t,n)=>{o.title=t,o.titleNode=n,DX.setState(t=>{let n=t.openWorkspaces.map(t=>t.name===e?o:t);return{...t,openWorkspaces:n}})},currentWorkspaceGroup:a,additionalProps:t??{}};function i(e,t){DX.setState(n=>{let r=[e,...t??n.openWorkspaces],a=D1(e);return{...n,openWorkspaces:r,workspaceWindowState:a}})}a&&D9(a,t);let s=DX.getState().openWorkspaces,l=s.findIndex(t=>t.name===e),u=s.find(e=>e.type==o.type);if(0===s.length)i(o);else if(s[0].canHide||0===l)if(l>=0){let t=s[l];i({...t,additionalProps:o.additionalProps,...t.title===D6(t,t.additionalProps)&&{title:D6(o,o.additionalProps)}},s.filter(t=>t.name!=e))}else u?(i(u,DX.getState().openWorkspaces.filter(e=>e.type!=o.type)),DV(u,{name:e,additionalProps:t})):i(o);else DV(s[0],{name:e,additionalProps:t})}function DW({targetUrl:e,contextKey:t,workspaceName:n,additionalProps:r}){Dq(t),DU(n,r),aF({to:e})}let DH={};function Dz(e,t){DH[e]=t}function DK(e){return DH[e]}function DG(){let e=DX.getState();DX.setState({...e,prompt:null})}let DZ={ignoreChanges:!1,onWorkspaceClose:()=>{},closeWorkspaceGroup:!0};function DY(e,t={}){t={...DZ,...t};let n=()=>{let n=DX.getState();n.openWorkspaces.find(t=>t.name===e);let r=n.openWorkspaces.filter(t=>t.name!=e),a=DX.getState().workspaceGroup?.name;a&&t.closeWorkspaceGroup&&DB(a),DH[e]=()=>!1,DX.setState(e=>({...e,prompt:null,openWorkspaces:r,workspaceWindowState:D1(r?.[0])})),t?.onWorkspaceClose?.()};return DF(e,t?.ignoreChanges)?(n(),!0):(D3("closing-workspace",n,s1(e).title??e),!1)}function Dq(e){DX.getState().context!=e&&DX.setState({context:e,openWorkspaces:[],prompt:null})}let DJ={context:"",openWorkspaces:[],prompt:null,workspaceWindowState:"normal",workspaceGroup:void 0},DX=B("workspace",DJ);function DQ(){return DX}function D0(e){let t=DX.getState();DX.setState({...t,workspaceWindowState:e})}function D1(e){return e?.preferredWindowSize??"normal"}function D4(e=()=>{},t=()=>!0){let n=DX.getState().openWorkspaces.filter(t).every(({name:e})=>DF(e)),r=()=>{D5(),e?.()};n?r():D3("closing-all-workspaces",r)}function D2(){let{workspaceWindowState:e,openWorkspaces:t,prompt:n,workspaceGroup:r}=lg(DX);return(0,ll.useMemo)(()=>({active:t.length>0,prompt:n,workspaceWindowState:e,workspaces:t,workspaceGroup:r}),[t,e,n,r])}function D3(e,t=()=>{},n=""){let r;switch(e){case"closing-workspace":r={title:aj("unsavedChangesTitleText","Unsaved changes"),body:aj("unsavedChangesInOpenedWorkspace","You may have unsaved changes in the opened workspace. Do you want to discard these changes?"),onConfirm:()=>{t?.()},confirmText:aj("discard","Discard")};break;case"closing-all-workspaces":{let e=DX.getState().openWorkspaces.filter(({name:e})=>!DF(e)).map(({title:e},t)=>`${t+1}. ${e}`);r={title:aj("closingAllWorkspacesPromptTitle","You have unsaved changes"),body:aj("closingAllWorkspacesPromptBody","There may be unsaved changes in the following workspaces. Do you want to discard changes in the following workspaces? {{workspaceNames}}",{workspaceNames:e.join(",")}),onConfirm:()=>{t?.()},confirmText:aj("closeAllOpenedWorkspaces","Discard changes in {{count}} workspaces",{count:e.length})};break}case"closing-workspace-launching-new-workspace":r={title:aj("unsavedChangesTitleText","Unsaved changes"),body:aj("unsavedChangesInWorkspace",'There may be unsaved changes in "{{workspaceName}}". Please save them before opening another workspace.',{workspaceName:n}),onConfirm:()=>{DX.setState(e=>({...e,prompt:null})),t?.()},confirmText:aj("openAnyway","Open anyway")};break;default:console.error(`Workspace system trying to open unknown prompt type "${e}" in function "showWorkspacePrompts"`),t?.();return}DX.setState(e=>({...e,prompt:r}))}function D6(e,t){return t?.workspaceTitle??e.title}function D5(){DX.setState(DJ)}function D9(e,t={}){if(!e||"default"===e)return;let n=U(e,{});return t&&n.setState(e=>({...e,...t})),n}let D8="-esm-form-engine__action-menu-button-module__container___F68g0",D7="-esm-form-engine__action-menu-button-module__elementContainer___D1ACn",Ee="-esm-form-engine__action-menu-button-module__active___HAE75";function Et({getIcon:e,formOpenInTheBackground:t,tagContent:n}){return(0,cu.jsxs)(cu.Fragment,{children:[e({size:16}),t?(0,cu.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__interruptedTag___CQ2Xs",children:"!"}):(0,cu.jsx)("span",{className:"-esm-form-engine__action-menu-button-module__countTag___3mn9k",children:n})]})}let En=({getIcon:e,label:t,iconDescription:n,handler:r,type:a,tagContent:o})=>{let i=uM(),{workspaces:s,workspaceWindowState:l}=D2(),u=s?.findIndex(({type:e})=>e===a)??-1,c="hidden"!==l&&0===u,d=u>0||0===u&&"hidden"===l;return"tablet"===i||"phone"===i?(0,cu.jsxs)(cg.Button,{className:cd()(D8,{[Ee]:c}),iconDescription:n,kind:"ghost",onClick:r,role:"button",tabIndex:0,size:"md",children:[(0,cu.jsx)("span",{className:D7,children:(0,cu.jsx)(Et,{formOpenInTheBackground:d,getIcon:e,tagContent:o})}),(0,cu.jsx)("span",{children:t})]}):(0,cu.jsx)(cg.IconButton,{align:"left","aria-label":n,className:cd()(D8,{[Ee]:c}),enterDelayMs:300,kind:"ghost",label:t,onClick:r,size:"md",children:(0,cu.jsx)("div",{className:D7,children:(0,cu.jsx)(Et,{formOpenInTheBackground:d,getIcon:e,tagContent:o})})})};var Er=n(8742);let Ea=lu().forwardRef(function({children:e,size:t=16,...n},r){return 16===t||"16"===t||"16px"===t?lu().createElement(Er.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 16 16",fill:"currentColor",...n},en||(en=lu().createElement("path",{d:"M2 9L2 10 5.3 10 1 14.3 1.7 15 6 10.7 6 14 7 14 7 9zM14 7L14 6 10.7 6 15 1.7 14.3 1 10 5.3 10 2 9 2 9 7z"})),e):lu().createElement(Er.A,{width:t,height:t,ref:r,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",fill:"currentColor",...n},er||(er=lu().createElement("path",{d:"M4 18L4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18zM30 3.416L28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416z"})),e)});var Eo=n(4240),Ei=n(8622),Es=/[\\^$.*+?()[\]{}|]/g,El=RegExp(Es.source);let Eu=function(e){return(e=e8(e))&&El.test(e)?e.replace(Es,"\\$&"):e};function Ec({contextKey:e}){let{prompt:t}=D2();return(0,ll.useEffect)(()=>{RegExp(`/${Eu(e)}(/|$)`).test(window.location.pathname)||console.warn(`WorkspaceContainer has provided an invalid context key: "${e}". The context key must be part of the URL path, with no initial or trailing slash.`)},[]),(0,ll.useEffect)(()=>(Dq(e),()=>{Dq(null)}),[e]),(0,ll.useEffect)(()=>{let t=t=>{let{detail:{cancelNavigation:n,newUrl:r}}=t,a=RegExp(`/${Eu(e)}(/|$)`),o=new URL(r),i=a.test(o.pathname),s=DX.getState().openWorkspaces.every(({name:e})=>DF(e));i||(s?D5():(n?.(),D4(()=>{aF({to:r})})))};return window.addEventListener("single-spa:before-routing-event",t),()=>{window.removeEventListener("single-spa:before-routing-event",t)}},[]),null!=t?(0,cu.jsxs)(cg.ComposedModal,{open:!0,onClose:DG,children:[(0,cu.jsx)(cg.ModalHeader,{title:t.title}),(0,cu.jsx)(cg.ModalBody,{children:(0,cu.jsx)("p",{className:"-esm-form-engine__workspace-notification-module__messageBody___dkytJ",children:t.body})}),(0,cu.jsxs)(cg.ModalFooter,{children:[(0,cu.jsx)(cg.Button,{kind:"secondary",onClick:DG,children:t.cancelText??aj("cancel")}),(0,cu.jsx)(cg.Button,{kind:"danger",onClick:t.onConfirm,children:t.confirmText??aj("confirm")})]})]}):null}function Ed(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Em(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ed(Object(n),!0).forEach(function(t){Ef(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ed(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Ep(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function Ef(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Eh(e){return(Eh=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function Eg(e,t){return(Eg=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function Ey(e){if(void 0===e)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var Ev=function(e){var t=ll.Component;if("function"!=typeof t&&null!==t)throw TypeError("Super expression must either be null or a function");i.prototype=Object.create(t&&t.prototype,{constructor:{value:i,writable:!0,configurable:!0}}),t&&Eg(i,t);var n,r,a,o=(n=function(){if("u"<typeof Reflect||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=Eh(i);e=n?Reflect.construct(t,arguments,Eh(this).constructor):t.apply(this,arguments);if(e&&("object"==typeof e||"function"==typeof e))return e;if(void 0!==e)throw TypeError("Derived constructors may only return object or undefined");return Ey(this)});function i(e){var t;if(function(e,t){if(!(e instanceof t))throw TypeError("Cannot call a class as a function")}(this,i),Ef(Ey(t=o.call(this,e)),"handleRef",function(e){t.el=e}),Ef(Ey(t),"addThingToDo",function(e,n){t.state.hasError&&"unmount"!==e||(t.nextThingToDo=(t.nextThingToDo||Promise.resolve()).then(function(){if(!t.unmounted||"unmount"===e)return n.apply(void 0,arguments)}).catch(function(n){throw t.nextThingToDo=Promise.resolve(),t.setState({hasError:!0}),n&&n.message&&(n.message="During '".concat(e,"', parcel threw an error: ").concat(n.message)),t.props.handleError?t.props.handleError(n):setTimeout(function(){throw n}),n}))}),Ef(Ey(t),"getParcelProps",function(){var e=Em(Em({},t.props),{},{domElement:t.el});return delete e.mountParcel,delete e.config,delete e.wrapWith,delete e.wrapStyle,delete e.appendTo,delete e.handleError,delete e.parcelDidMount,e}),t.state={hasError:!1},!e.config)throw Error("single-spa-react's Parcel component requires the 'config' prop to either be a parcel config or a loading function that returns a promise. See https://github.com/single-spa/single-spa-react");return t}return r=[{key:"componentDidMount",value:function(){var e=this;this.unmounted=!1,this.addThingToDo("mount",function(){var t,n=e.props.mountParcel||e.mountParcel;if(!n)throw Error("\n <Parcel /> was not passed a mountParcel prop, nor is it rendered where mountParcel is within the React context.\n If you are using <Parcel /> within a module that is not a single-spa application, you will need to import mountRootParcel from single-spa and pass it into <Parcel /> as a mountParcel prop \n ");return e.el?t=e.el:(e.createdDomElement=t=document.createElement(e.props.wrapWith),Object.keys(e.props.wrapStyle).forEach(function(n){t.style[n]=e.props.wrapStyle[n]}),e.props.appendTo.appendChild(t)),e.parcel=n(e.props.config,Em({domElement:t},e.getParcelProps())),e.parcel.mountPromise.then(e.props.parcelDidMount),e.parcel.mountPromise})}},{key:"componentDidUpdate",value:function(){var e=this;this.addThingToDo("update",function(){if(e.parcel&&e.parcel.update)return e.parcel.update(e.getParcelProps())})}},{key:"componentWillUnmount",value:function(){var e=this;this.addThingToDo("unmount",function(){if(e.parcel&&"MOUNTED"===e.parcel.getStatus())return e.parcel.unmount()}),this.createdDomElement&&this.createdDomElement.parentNode.removeChild(this.createdDomElement),this.unmounted=!0}},{key:"render",value:function(){var e=this;if(this.props.appendTo)return l$&&l$.Consumer?ll.createElement(l$.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):null;var t=l$&&l$.Consumer?ll.createElement(l$.Consumer,null,function(t){return e.mountParcel=t?t.mountParcel:null,null}):void 0;return ll.createElement(this.props.wrapWith,{ref:this.handleRef,style:this.props.wrapStyle,className:this.props.wrapClassName},t)}}],Ep(i.prototype,r),a&&Ep(i,a),i}();Ef(Ev,"defaultProps",{wrapWith:"div",wrapStyle:{},parcelDidMount:function(){}});function Eb({workspace:e,additionalPropsFromPage:t}){let[n,r]=(0,ll.useState)(),a=function(e){let[t,n]=(0,ll.useState)({}),[r,a]=(0,ll.useState)(e);return(0,ll.useEffect)(()=>{r!==e&&a(e)},[e]),(0,ll.useEffect)(()=>{let e,t=D9(r);return t&&(n(t.getState()),e=t.subscribe(n)),()=>{t&&e?.()}},[r]),t}(e.currentWorkspaceGroup);(0,ll.useEffect)(()=>{let t=!0;return e.load().then(e=>{t&&r(e)}),()=>{t=!1}},[e]);let o=(0,ll.useMemo)(()=>e&&{closeWorkspace:e.closeWorkspace,closeWorkspaceWithSavedChanges:e.closeWorkspaceWithSavedChanges,promptBeforeClosing:e.promptBeforeClosing,setTitle:e.setTitle,...t,...a,...e.additionalProps},[e,t,a]);return n?(0,cu.jsx)(Ev,{config:n,mountParcel:li,...o},e.name):(0,cu.jsx)(cg.InlineLoading,{className:"-esm-form-engine__workspace-module__loader___jEP+q",description:`${aj("loading","Loading")} ...`})}function Ew({isWithinWorkspace:e,name:t,actionMenuProps:n={}}){let[r,a]=(0,ll.useState)(!1),o=(0,ll.useRef)(window.innerHeight),{featureName:i}=(0,ll.useContext)(lc),s=uM();(0,ll.useEffect)(()=>{let e=()=>{a(!uA(s)&&o.current>window.innerHeight),o.current!=window.innerHeight&&(o.current=window.innerHeight)};return window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[o]);let l=`action-menu-${t&&"default"!=t?t:i}-items-slot`;return(0,cu.jsx)("aside",{className:cd()("-esm-form-engine__action-menu-module__sideRail___iVmKs",{"-esm-form-engine__action-menu-module__withinWorkspace___YZfet":e,"-esm-form-engine__action-menu-module__sideRailHidden___bCdyQ":r,"-esm-form-engine__action-menu-module__sideRailVisible___+oJCY":!r}),children:(0,cu.jsx)("div",{className:"-esm-form-engine__action-menu-module__container___sf6Et",children:(0,cu.jsx)(lk,{className:"-esm-form-engine__action-menu-module__chartExtensions___l+r+Y",name:l,state:n})})})}function Ex({contextKey:e,overlay:t,showSiderailAndBottomNav:n,additionalWorkspaceProps:r,actionMenuProps:a}){let o=uM(),{workspaces:i,workspaceWindowState:s,workspaceGroup:l}=D2(),u=l?.name,c=i[0],d="hidden"===s||null==c,m=c?.width??(t?"wider":"narrow"),p=(0,ll.useMemo)(()=>n||u&&!d,[u,d,n]);return ua(!d&&!uA(o)),(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsxs)("div",{className:n?"-esm-form-engine__workspace-module__workspaceContainerWithActionMenu___kZRyN":"-esm-form-engine__workspace-module__workspaceContainerWithoutActionMenu___1OJIb",children:[(0,cu.jsx)("aside",{className:cd()(t?"-esm-form-engine__workspace-module__workspaceOverlayOuterContainer___8RiIj":"-esm-form-engine__workspace-module__workspaceWindowSpacer___F1W-O",{"-esm-form-engine__workspace-module__hiddenRelative___7oRNR":d,"-esm-form-engine__workspace-module__narrowWorkspace___R3CN9":"narrow"===m,"-esm-form-engine__workspace-module__widerWorkspace___L-pDK":"wider"===m,"-esm-form-engine__workspace-module__extraWideWorkspace___D50Zj":"extra-wide"===m}),children:(0,cu.jsx)("div",{className:cd()("-esm-form-engine__workspace-module__workspaceFixedContainer___9E2Or",{"-esm-form-engine__workspace-module__maximizedWindow___d+PZ5":"maximized"===s,"-esm-form-engine__workspace-module__hiddenFixed___kBFgl":d}),children:i.map((e,t)=>(0,cu.jsx)("div",{className:cd()("-esm-form-engine__workspace-module__workspaceInnerContainer___VEPNB",{"-esm-form-engine__workspace-module__hiddenExtraWorkspace___E7d4h":0!==t}),children:(0,cu.jsx)(ll.Suspense,{fallback:null,children:(0,cu.jsx)(lV.I18nextProvider,{i18n:window.i18next,defaultNS:e.moduleName,children:(0,cu.jsx)(ED,{workspaceInstance:e,additionalWorkspaceProps:r})})})},`workspace-container-${e?e.name:`empty-${t}`}`))})}),(0,cu.jsx)(Ec,{contextKey:e})]}),p&&(0,cu.jsx)(Ew,{name:u,isWithinWorkspace:!n,actionMenuProps:a})]})}function ED({workspaceInstance:e,additionalWorkspaceProps:t}){let{t:n}=(0,lV.useTranslation)(),r=uM(),{workspaceWindowState:a,workspaceGroup:o}=D2(),i=o?.name,s="maximized"===a;(0,ll.useEffect)(()=>{let t=n(e.title);t!==e.title&&e.setTitle(t)},[e.title,n,e.setTitle]);let{featureName:l}=(0,ll.useContext)(lc),u=(0,ll.useCallback)(()=>{D0(s?"normal":"maximized")},[s]),{canHide:c=!1,canMaximize:d=!1,currentWorkspaceGroup:m="",closeWorkspace:p}=(0,ll.useMemo)(()=>e??{},[e]),f=(0,ll.useMemo)(()=>({...t,...e?.additionalProps}),[t,e]);return e&&(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsxs)(cg.Header,{"aria-label":aj("workspaceHeader","Workspace Header"),className:"-esm-form-engine__workspace-module__header___nMH1R",children:[!uA(r)&&!c&&(0,cu.jsx)(cg.HeaderMenuButton,{"aria-label":aj("close","Close"),renderMenuIcon:(0,cu.jsx)(cO,{}),onClick:()=>p()}),(0,cu.jsx)(cg.HeaderName,{prefix:"",children:e.titleNode??n(e.title)}),(0,cu.jsx)("div",{className:"-esm-form-engine__workspace-module__overlayHeaderSpacer___vxoMd"}),(0,cu.jsxs)(cg.HeaderGlobalBar,{className:"-esm-form-engine__workspace-module__headerButtons___lek95",children:[(0,cu.jsx)(lk,{name:`workspace-header-group-${e.currentWorkspaceGroup}-slot`,state:f}),(0,cu.jsx)(lk,{name:`workspace-header-type-${e.type}-slot`,state:f}),(0,cu.jsx)(lk,{name:`workspace-header-${l}-slot`,state:f}),uA(r)&&(0,cu.jsxs)(cu.Fragment,{children:[(d||s)&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":s?aj("minimize","Minimize"):aj("maximize","Maximize"),onClick:u,children:s?(0,cu.jsx)(Ea,{}):(0,cu.jsx)(Eo.hz,{})}),c&&!i?(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("hide","Hide"),onClick:()=>D0("hidden"),children:(0,cu.jsx)(c$,{})}):(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("close","Close"),onClick:()=>p?.(),children:(0,cu.jsx)(cJ,{})})]}),"tablet"===r&&c&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("close","Close"),onClick:()=>p?.(),children:(0,cu.jsx)(Ei.d3,{})})]})]}),(0,cu.jsx)("div",{className:cd()("-esm-form-engine__workspace-module__workspaceContent___FFe+u",{"-esm-form-engine__workspace-module__marginWorkspaceContent___SEV31":!!m}),children:(0,cu.jsx)(Eb,{workspace:e,additionalPropsFromPage:t},e.name)})]})}let EE="u">typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),E_=new Uint8Array(16),ES=[];for(let e=0;e<256;++e)ES.push((e+256).toString(16).slice(1));let Ek=function(e,t,n){if(EE&&!t&&!e)return EE();let r=(e=e||{}).random??e.rng?.()??function(){if(!c){if("u"<typeof crypto||!crypto.getRandomValues)throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");c=crypto.getRandomValues.bind(crypto)}return c(E_)}();if(r.length<16)throw Error("Random bytes length must be >= 16");if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){if((n=n||0)<0||n+16>t.length)throw RangeError(`UUID byte range ${n}:${n+15} is out of buffer bounds`);for(let e=0;e<16;++e)t[n+e]=r[e];return t}return function(e,t=0){return(ES[e[t+0]]+ES[e[t+1]]+ES[e[t+2]]+ES[e[t+3]]+"-"+ES[e[t+4]]+ES[e[t+5]]+"-"+ES[e[t+6]]+ES[e[t+7]]+"-"+ES[e[t+8]]+ES[e[t+9]]+"-"+ES[e[t+10]]+ES[e[t+11]]+ES[e[t+12]]+ES[e[t+13]]+ES[e[t+14]]+ES[e[t+15]]).toLowerCase()}(r)};async function EC(e,t){let{openedGroup:n}=s2.getState();if(n){if(n.groupName===e&&ER(n.props,t))return!0;else if(!await EN({reason:"CLOSE_WORKSPACE_GROUP",explicit:!1}))return!1}return s2.setState(n=>({...n,openedGroup:{groupName:e,props:t},openedWindows:[]})),!0}async function EP(e){let{openedGroup:t,openedWindows:n}=s2.getState();if(t){if(n.length>0&&!(e||await EN({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})))return!1;s2.setState(e=>({...e,openedGroup:null,openedWindows:[]}))}return!0}async function ET(e,t=null,n=null,r=null){let a=s2.getState();if(!a.registeredWorkspacesByName[e])throw Error(`Unable to launch workspace ${e}. Workspace is not registered`);let o=s3(e);if(!o)throw Error(`Unable to launch workspace ${e}. Workspace is not registered to a workspace window`);let{openedGroup:i}=a,{name:s}=o,l=s6(s);if(!l)throw Error(`Unable to launch workspace ${e}. Workspace window ${o.name} is not registered to a workspace group`);let u=s5(e);if(i&&(i.groupName!==l.name||!ER(i.props,r)))return!!await EN({reason:"CLOSE_WORKSPACE_GROUP",explicit:!0})&&(s2.setState({...a,openedGroup:{groupName:l.name,props:r},openedWindows:[{windowName:s,openedWorkspaces:[Ej(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0);if(u>=0){let r=a.openedWindows[u],o=a.openedGroup?.props??{},i=a.isMostRecentlyOpenedWindowHidden,{openedWorkspaces:c}=r;if(ER(r.props,n)){let d=c.find(t=>t.workspaceName===e);return d&&ER(d.props,t)?((i||u!==a.openedWindows.length-1)&&s2.setState(EO.restoreWindow(a,s)),!0):!!await EN({reason:"CLOSE_WORKSPACE",explicit:!1,windowName:s,workspaceName:e})&&(s2.setState({...a,openedGroup:{groupName:l.name,props:a?.openedGroup?.props??o},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Ej(e,t)],props:r?.props??n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return!!await EN({reason:"CLOSE_WINDOW",explicit:!1,windowName:s})&&(s2.setState({...a,openedGroup:{groupName:l.name,props:o??a?.openedGroup?.props},openedWindows:[...a.openedWindows.filter((e,t)=>t!==u),{windowName:s,openedWorkspaces:[Ej(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}return"closable"!=l.persistence?(s2.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[...a.openedWindows,{windowName:s,openedWorkspaces:[Ej(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0):!!await EN({reason:"CLOSE_OTHER_WINDOWS",explicit:!1,windowNameToSpare:o.name})&&(s2.setState({...a,openedGroup:{groupName:l.name,props:r??a?.openedGroup?.props??null},openedWindows:[{windowName:s,openedWorkspaces:[Ej(e,t)],props:n,maximized:!1}],isMostRecentlyOpenedWindowHidden:!1}),!0)}function ER(e,t){return null==e||null==t||R(e,t)}function EN(e){function t(e,t){let n=[];for(let r=e.openedWorkspaces.length-1;r>=0;r--){let a=e.openedWorkspaces[r];if(a.hasUnsavedChanges&&n.push(a),t&&a.workspaceName===t)break}return n}let{openedWindows:n,workspaceTitleByWorkspaceName:r}=s2.getState(),a=[];switch(e.reason){case"CLOSE_WORKSPACE_GROUP":a=n.flatMap(e=>t(e));break;case"CLOSE_WINDOW":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r);break}case"CLOSE_WORKSPACE":{let r=n.find(t=>t.windowName===e.windowName);if(!r)throw Error(`Window ${e.windowName} not found in opened windows.`);a=t(r,e.workspaceName);break}case"CLOSE_OTHER_WINDOWS":a=n.filter(t=>t.windowName!==e.windowNameToSpare).flatMap(e=>t(e))}return 0===a.length?Promise.resolve(!0):new Promise(e=>{let t=xc("workspace2-close-prompt",{size:"sm",onConfirm:()=>{t(),e(!0)},onCancel:()=>{t(),e(!1)},affectedWorkspaceTitles:a.map(e=>r[e.workspaceName])})})}let EO={setWindowMaximized(e,t,n){let r=e.openedWindows.findIndex(e=>e.windowName===t),a=[...e.openedWindows],o={...a[r],maximized:n};return a[r]=o,{...e,openedWindows:a}},hideWindow:e=>({...e,isMostRecentlyOpenedWindowHidden:!0}),restoreWindow(e,t){let n=e.openedWindows.findIndex(e=>e.windowName===t),r=e.openedWindows[n],a=[...e.openedWindows.filter((e,t)=>t!==n),r];return{...e,openedWindows:a,isMostRecentlyOpenedWindowHidden:!1}},closeWorkspace(e,t){let n=s5(t);if(n<0)return e;let r={...e.openedWindows[n]},a=r.openedWorkspaces.findIndex(e=>e.workspaceName===t),o=[...e.openedWindows];r.openedWorkspaces=r.openedWorkspaces.slice(0,a);let i=e.isMostRecentlyOpenedWindowHidden;if(0===r.openedWorkspaces.length){let t=n===e.openedWindows.length-1;o.splice(n,1),t&&o.length>0&&(i=!1)}else o[n]=r;return{...e,openedWindows:o,isMostRecentlyOpenedWindowHidden:i}},openChildWorkspace(e,t,n,r){let a=e.registeredWorkspacesByName[n];if(!a)throw Error(`No workspace named "${n}" registered`);let o=e.registeredWorkspacesByName[t];if(!o)throw Error(`No workspace named "${t}" registered`);if(o.window!==a.window)throw Error(`Child workspace ${n} does not belong to the same workspace window as parent workspace ${t}`);let i=e.openedWindows.findIndex(e=>e.windowName===a.window);if(-1==i)throw Error(`Cannot open child workspace ${n} as window ${a.window} is not opened`);let{openedWorkspaces:s}=e.openedWindows[i],l=s.findIndex(e=>e.workspaceName===t);if(-1===l)throw Error(`Cannot open child workspace ${n} from parent workspace ${t} as the parent is not opened within the workspace window`);let u=s.slice(0,l+1);return{openedWindows:e.openedWindows.map((e,t)=>t==i?{...e,openedWorkspaces:[...u,Ej(n,r)]}:e)}},setHasUnsavedChanges(e,t,n){let r=s5(t);if(r<0)return e;let a={...e.openedWindows[r]},o=a.openedWorkspaces.findIndex(e=>e.workspaceName===t);if(o<0)return e;a.openedWorkspaces[o]={...a.openedWorkspaces[o],hasUnsavedChanges:n};let i=[...e.openedWindows];return i[r]=a,{...e,openedWindows:i}},setWorkspaceTitle(e,t,n){let r={...e.workspaceTitleByWorkspaceName};return null===n?delete r[t]:r[t]=n,{...e,workspaceTitleByWorkspaceName:r}}};function E$(){return ly(s2,EO)}let EM=()=>(0,ll.useContext)(l$),EA=()=>Object.keys(s2.getState().registeredWorkspacesByName);function Ej(e,t){return{workspaceName:e,props:t??{},hasUnsavedChanges:!1,uuid:Ek()}}let EI={workspaceOuterContainer:"-esm-form-engine__workspace2-module__workspaceOuterContainer___jaqGm",narrowWorkspace:"-esm-form-engine__workspace2-module__narrowWorkspace___o1wsL",widerWorkspace:"-esm-form-engine__workspace2-module__widerWorkspace___gdEOi",extraWideWorkspace:"-esm-form-engine__workspace2-module__extraWideWorkspace___U9xlJ",workspaceMiddleContainer:"-esm-form-engine__workspace2-module__workspaceMiddleContainer___0AdtX",maximized:"-esm-form-engine__workspace2-module__maximized___aKCbE",hidden:"-esm-form-engine__workspace2-module__hidden___n1US5",workspaceInnerContainer:"-esm-form-engine__workspace2-module__workspaceInnerContainer___1g+qk",workspaceSpacer:"-esm-form-engine__workspace2-module__workspaceSpacer___P2T9y",loader:"-esm-form-engine__workspace2-module__loader___fCfzZ",hiddenExtraWorkspace:"-esm-form-engine__workspace2-module__hiddenExtraWorkspace___hvPSi",header:"-esm-form-engine__workspace2-module__header___MXXx9",headerButtons:"-esm-form-engine__workspace2-module__headerButtons___sJdnC",workspaceContent:"-esm-form-engine__workspace2-module__workspaceContent___6NuXT",overlayHeaderSpacer:"-esm-form-engine__workspace2-module__overlayHeaderSpacer___PLO6T",isActionMenuOpened:"-esm-form-engine__workspace2-module__isActionMenuOpened___X3Vj6",showActionMenu:"-esm-form-engine__workspace2-module__showActionMenu___HSun1",marginWorkspaceContent:"-esm-form-engine__workspace2-module__marginWorkspaceContent___DCfWz",workspaceContainerWithActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithActionMenu___G9MdI",workspaceFixedContainer:"-esm-form-engine__workspace2-module__workspaceFixedContainer___uIldI",workspaceContainerWithoutActionMenu:"-esm-form-engine__workspace2-module__workspaceContainerWithoutActionMenu___lBudZ"},EL=({title:e,children:t,hasUnsavedChanges:n=!1})=>{let r=uM(),{setWindowMaximized:a,hideWindow:o,setHasUnsavedChanges:i,openedWindows:s,openedGroup:l,registeredGroupsByName:u,registeredWindowsByName:c,registeredWorkspacesByName:d,workspaceTitleByWorkspaceName:m,setWorkspaceTitle:p,isMostRecentlyOpenedWindowHidden:f}=E$(),{workspaceName:h,isRootWorkspace:g,closeWorkspace:y,showActionMenu:v}=EM(),b=s5(h),w=s[b],x=w?.openedWorkspaces.find(e=>e.workspaceName===h);if((0,ll.useEffect)(()=>{x?.hasUnsavedChanges!=n&&i(h,n??!1)},[x?.hasUnsavedChanges,n,h,i]),(0,ll.useEffect)(()=>{m[h]!==e&&p(h,e)},[m,h,e,p]),b<0||null==l||null==x)return null;let D=u[l.groupName];if(!D)throw Error(`Cannot find registered workspace group ${l.groupName}`);let E=d[h].window,_=c[E];if(!_)throw Error(`Cannot find registered workspace window ${E}`);let{icon:S,canMaximize:k}=_,C="closable"===D.persistence,P=!!S&&!C,{maximized:T}=w,R=_?.width??"narrow",N=Object.values(c).some(e=>e.group===l.groupName&&void 0!==e.icon),O=b<s.length-1||f;return(0,cu.jsxs)("div",{className:cd()(EI.workspaceOuterContainer,{[EI.narrowWorkspace]:"narrow"===R,[EI.widerWorkspace]:"wider"===R,[EI.extraWideWorkspace]:"extra-wide"===R,[EI.isActionMenuOpened]:N}),children:[(0,cu.jsx)("div",{className:cd()(EI.workspaceSpacer,{[EI.hidden]:O})}),(0,cu.jsx)("div",{className:cd()(EI.workspaceMiddleContainer,{[EI.maximized]:T,[EI.hidden]:O,[EI.isRootWorkspace]:g,[EI.showActionMenu]:v}),children:(0,cu.jsxs)("div",{className:cd()(EI.workspaceInnerContainer,{[EI.maximized]:T,[EI.hidden]:O,[EI.isRootWorkspace]:g}),children:[(0,cu.jsxs)(cg.Header,{"aria-label":aj("workspaceHeader"),className:EI.header,children:[(0,cu.jsx)(cg.HeaderName,{prefix:"",children:e}),(0,cu.jsx)("div",{className:EI.overlayHeaderSpacer}),(0,cu.jsx)(cg.HeaderGlobalBar,{className:EI.headerButtons,children:uA(r)?(0,cu.jsxs)(cu.Fragment,{children:[(k||T)&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":T?aj("minimize"):aj("maximize"),onClick:()=>a(E,!T),children:T?(0,cu.jsx)(Ea,{}):(0,cu.jsx)(Eo.hz,{})}),P&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("hide"),onClick:()=>o(),children:(0,cu.jsx)(c$,{})}),!C&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("close"),onClick:()=>y({closeWindow:!0}),children:(0,cu.jsx)(cJ,{})})]}):(0,cu.jsxs)(cu.Fragment,{children:[P&&(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("hide"),onClick:()=>o(),children:(0,cu.jsx)(Ei.d3,{})}),(0,cu.jsx)(cg.HeaderGlobalAction,{"aria-label":aj("close"),onClick:()=>{C?EP():y({closeWindow:!0})},children:(0,cu.jsx)(cJ,{})})]})})]}),(0,cu.jsx)("div",{className:cd()(EI.workspaceContent),children:t})]})})]})},EF="-esm-form-engine__action-menu-button2-module__container___pahg-",EB="-esm-form-engine__action-menu-button2-module__elementContainer___PzOdc",EV="-esm-form-engine__action-menu-button2-module__active___4O4Bs",EU="-esm-form-engine__action-menu-button2-module__focused___+k5kD";function EW({getIcon:e,hasUnsavedChanges:t,tagContent:n}){return(0,cu.jsxs)(cu.Fragment,{children:[e({size:16}),t?(0,cu.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__interruptedTag___mS2yr",children:"!"}):(0,cu.jsx)("span",{className:"-esm-form-engine__action-menu-button2-module__countTag___rb5CW",children:n})]})}let EH=({icon:e,label:t,tagContent:n,workspaceToLaunch:r,onBeforeWorkspaceLaunch:a})=>{let o=uM(),{openedWindows:i,restoreWindow:s,hideWindow:l,isMostRecentlyOpenedWindowHidden:u}=E$(),{extension:c}=(0,ll.useContext)(lc),d=i.findIndex(e=>e.windowName===c?.extensionId),m=i[d],p=null!=m,f=p&&(d<i.length-1||u),h=p&&!f,g=m?.openedWorkspaces.some(e=>e.hasUnsavedChanges)??!1,y=async()=>{if(p)f?s(m.windowName):l();else if(await (a?.()??!0)){let{workspaceName:e,workspaceProps:t,windowProps:n}=r;ET(e,t,n)}};return"tablet"===o||"phone"===o?(0,cu.jsxs)(cg.Button,{className:cd()(EF,{[EV]:p&&!h,[EU]:h}),iconDescription:t,kind:"ghost",onClick:y,role:"button",tabIndex:0,size:"md",children:[(0,cu.jsx)("span",{className:EB,children:(0,cu.jsx)(EW,{hasUnsavedChanges:g,getIcon:e,tagContent:n})}),(0,cu.jsx)("span",{children:t})]}):(0,cu.jsx)(cg.IconButton,{align:"left","aria-label":t,className:cd()(EF,{[EV]:p&&!h,[EU]:h}),enterDelayMs:300,kind:"ghost",label:t,onClick:y,size:"md",children:(0,cu.jsx)("div",{className:EB,children:(0,cu.jsx)(EW,{hasUnsavedChanges:g,getIcon:e,tagContent:n})})})};function Ez({showContactDetails:e,toggleContactDetails:t,className:n}){return(0,cu.jsx)(cg.Button,{className:n,iconDescription:"Toggle contact details",kind:"ghost",onClick:t,renderIcon:e?cq:cG,children:e?aj("showLess","Show less"):aj("showMore","Show more")})}let EK={contactDetails:"-esm-form-engine__patient-banner-contact-details-module__contactDetails___rhdjA",deceased:"-esm-form-engine__patient-banner-contact-details-module__deceased___K4NPg",heading:"-esm-form-engine__patient-banner-contact-details-module__heading___zj6Zt",row:"-esm-form-engine__patient-banner-contact-details-module__row___+Bx+P",col:"-esm-form-engine__patient-banner-contact-details-module__col___0H31P",relationship:"-esm-form-engine__patient-banner-contact-details-module__relationship___CZmay"},EG=({patientUuid:e})=>{let{cohorts:t=[],isLoading:n}=function(e){let t=e?`${aY}/cohortm/cohortmember?patient=${e}&v=custom:(uuid,patient:ref,cohort:(uuid,name,startDate,endDate))`:null,{data:n,isLoading:r}=lW()(t,aQ),a=n?.data?.results.map(e=>({uuid:e.cohort.uuid,name:e.cohort.name,startDate:e.cohort.startDate,endDate:e.cohort.endDate}));return(0,ll.useMemo)(()=>({cohorts:a,isLoading:r}),[r,a])}(e);return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsxs)("p",{className:EK.heading,children:[aj("patientLists","Patient Lists")," (",t?.length??0,")"]}),n?(0,cu.jsx)(cg.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,cu.jsxs)("ul",{children:[(()=>{if(t?.length>0){let e=t.sort((e,t)=>b7(e?.startDate).getTime()-b7(t?.startDate).getTime()).slice(0,3);return e?.map(e=>(0,cu.jsx)("li",{children:(0,cu.jsx)(ld,{to:`${window.spaBase}/home/patient-lists/${e.uuid}`,children:e.name},e.uuid)},e.uuid))}return(0,cu.jsx)("li",{children:"--"})})(),t.length>3&&(0,cu.jsx)("li",{className:EK.link,children:(0,cu.jsx)(ld,{to:`${window.spaBase}/home/patient-lists`,children:aj("seeMoreLists","See {{count}} more lists",{count:t?.length-3})})})]})]})},EZ=({patientId:e})=>{let{patient:t,isLoading:n}=uK(e),r=t?.address?.find(e=>"home"===e.use),a=e=>e.split("#")[1];return n?(0,cu.jsx)(cg.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)("p",{className:EK.heading,children:aj("address","Address")}),(0,cu.jsx)("ul",{children:r?Object.entries(r).filter(([e])=>"id"!==e&&"use"!==e).map(([e,t])=>"extension"===e?r.extension?.[0]?.extension?.map((t,n)=>(0,cu.jsxs)("li",{children:[aj(a(t.url),a(t.url)),": ",t.valueString]},`address-${e}-${n}`)):(0,cu.jsxs)("li",{children:[aj(e,e),": ",t]},`address-${e}`)):(0,cu.jsx)("li",{children:"--"})})]})},EY=({patientUuid:e})=>{let{isLoading:t,contactAttributes:n}=(e=>{let{contactAttributeTypes:t=[]}=us({externalModuleName:"@openmrs/esm-patient-banner-app"}),{attributes:n,error:r,isLoading:a}=(e=>{let{data:t,error:n,isLoading:r}=ud()(`${aY}/patient/${e}?v=custom:(uuid,display,identifiers:(identifier,uuid,preferred,location:(uuid,name),identifierType:(uuid,name,format,formatDescription,validator)),person:(uuid,display,gender,birthdate,dead,age,deathDate,birthdateEstimated,causeOfDeath,preferredName:(uuid,preferred,givenName,middleName,familyName),attributes,preferredAddress:(uuid,preferred,address1,address2,cityVillage,longitude,stateProvince,latitude,country,postalCode,countyDistrict,address3,address4,address5,address6,address7)))`,aQ);return{isLoading:r,attributes:t?.data.person.attributes??[],error:n}})(e);return{contactAttributes:(0,ll.useMemo)(()=>n.filter(({attributeType:e})=>t?.some(t=>e.uuid===t)),[n,t]),isLoading:a,error:r}})(e),r=(0,ll.useMemo)(()=>n?[...n?.map(e=>[e.attributeType.display?aj(e.attributeType.display,e.attributeType.display):"",e.value])]:[],[n]);return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)("p",{className:EK.heading,children:aj("contactDetails","Contact Details")}),t?(0,cu.jsx)(cg.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,cu.jsx)("ul",{children:r.length?r.map(([e,t],n)=>(0,cu.jsxs)("li",{children:[e,": ",t]},`${e}-${t}-${n}`)):(0,cu.jsx)("li",{children:"--"})})]})},Eq=({patientId:e})=>{let{data:t,isLoading:n}=function(e){let t=`${aY}/relationship?v=custom:(display,uuid,personA:(age,display,birthdate,uuid),personB:(age,display,birthdate,uuid),relationshipType:(uuid,display,description,aIsToB,bIsToA))&person=${e}`,{data:n,error:r,isLoading:a,isValidating:o}=lW()(e?t:null,aQ),i=n?.data?.results?.length?function(e,t){let n=[];for(let r of t)e===r.personA.uuid?n.push({uuid:`${r.uuid}`,display:r.personB.display,relativeAge:r.personB.age,relativeUuid:r.personB.uuid,relationshipType:r.relationshipType.bIsToA}):n.push({uuid:`${r.uuid}`,display:r.personA.display,relativeAge:r.personA.age,relativeUuid:r.personA.uuid,relationshipType:r.relationshipType.aIsToB});return n}(e,n.data.results):null;return{data:n?i:null,error:r,isLoading:a,isValidating:o}}(e);return(0,cu.jsxs)(cu.Fragment,{children:[(0,cu.jsx)("p",{className:EK.heading,children:aj("relationships","Relationships")}),n?(0,cu.jsx)(cg.InlineLoading,{description:`${aj("loading","Loading")} ...`,role:"progressbar"}):(0,cu.jsx)("ul",{children:t&&t.length>0?(0,cu.jsx)(cu.Fragment,{children:t.map(e=>(0,cu.jsxs)("li",{className:EK.relationship,children:[(0,cu.jsx)("div",{children:(0,cu.jsx)(ld,{to:`${window.spaBase}/patient/${e.relativeUuid}/chart`,children:e.display})}),(0,cu.jsx)("div",{children:e.relationshipType}),(0,cu.jsx)("div",{children:`${e.relativeAge?e.relativeAge:"--"} ${e.relativeAge?1===e.relativeAge?aj("yearAbbreviation","yr"):aj("yearsAbbreviation","yrs"):""}`})]},e.uuid))}):(0,cu.jsx)("li",{children:"--"})})]})};function EJ({patientId:e,deceased:t}){return(0,cu.jsxs)("div",{className:cd()(EK.contactDetails,{[EK.deceased]:t}),children:[(0,cu.jsxs)("div",{className:EK.row,children:[(0,cu.jsx)("div",{className:EK.col,children:(0,cu.jsx)(EZ,{patientId:e})}),(0,cu.jsx)("div",{className:EK.col,children:(0,cu.jsx)(EY,{patientUuid:e})})]}),(0,cu.jsxs)("div",{className:EK.row,children:[(0,cu.jsx)("div",{className:EK.col,children:(0,cu.jsx)(Eq,{patientId:e})}),(0,cu.jsx)("div",{className:EK.col,children:(0,cu.jsx)(EG,{patientUuid:e})})]})]})}function EX(e){let t=document.querySelector("template#loading-spinner");if(t){let n=t.content.cloneNode(!0),r=Array.prototype.map.call(n.childNodes,e=>e);return e.appendChild(n),()=>r.forEach(e=>e.remove())}return()=>{}}let EQ="-esm-form-engine__action-menu2-module__container___5s3CM";function E0({workspaceGroup:e,groupProps:t}){let n=uM(),{persistence:r}=e;return(0,cu.jsx)("aside",{className:"-esm-form-engine__action-menu2-module__sideRail___qwAz4",children:(0,cu.jsxs)("div",{className:EQ,children:["closable"==r&&uA(n)&&(0,cu.jsx)(cg.IconButton,{align:"left",onClick:()=>EP(),label:aj("close"),kind:"ghost",children:(0,cu.jsx)(cJ,{})}),(0,cu.jsx)(lc.Provider,{value:{moduleName:e.moduleName,featureName:e.name},children:(0,cu.jsx)(lk,{className:EQ,name:e.name,state:{groupProps:t}})})]})})}function E1(e){let t=new URL(e,window.location.origin).pathname,n=new URL(window.getOpenmrsSpaBase?.()??"/",window.location.origin).pathname,r=n.endsWith("/")?n.slice(0,-1):n,a=null;return r?r===t?a="/":t.startsWith(`${r}/`)&&(a=t.slice(r.length)):a=t,{full:t,spaRelative:a}}let E4=({lifeCycle:e,openedWorkspace:t,openedWindow:n,isRootWorkspace:r,isLeafWorkspace:a,showActionMenu:o})=>{let{openedGroup:i,closeWorkspace:s,openChildWorkspace:l}=E$(),u=(0,ll.useMemo)(()=>t&&{closeWorkspace:async(e={})=>{let{closeWindow:r=!1,discardUnsavedChanges:a=!1}=e;return r?!!(a||await EN({reason:"CLOSE_WINDOW",explicit:!0,windowName:n.windowName}))&&(s(n.openedWorkspaces[0].workspaceName),!0):!!(a||await EN({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:t.workspaceName}))&&(s(t.workspaceName),!0)},launchChildWorkspace:async(e,r)=>{let a=t.workspaceName,{openedWorkspaces:o}=n,i=o.findIndex(e=>e.workspaceName===a);-1===i||i!==o.length-1&&o.slice(i+1).some(e=>e.hasUnsavedChanges)&&!await EN({reason:"CLOSE_WORKSPACE",explicit:!0,windowName:n.windowName,workspaceName:o[i+1].workspaceName})||l(a,e,r||{})},workspaceName:t.workspaceName,workspaceProps:t.props,windowProps:n.props,groupProps:i&&i.props?i.props:null,workspaceMeta:s2.getState().registeredWorkspacesByName[t.workspaceName]?.meta??{},isRootWorkspace:r,isLeafWorkspace:a,windowName:n.windowName,showActionMenu:o},[t,s,i,n]);if(!e){let{registeredWorkspacesByName:e}=s2.getState(),n=e[t.workspaceName],a=n&&n.window?n.window:void 0,{registeredWindowsByName:s}=s2.getState(),l=a?s[a]:void 0,u=l&&l.width?l.width:"narrow",c=Object.values(s).some(e=>e.group===i?.groupName&&void 0!==e.icon);return(0,cu.jsxs)("div",{className:cd()(EI.workspaceOuterContainer,{[EI.narrowWorkspace]:"narrow"===u,[EI.widerWorkspace]:"wider"===u,[EI.extraWideWorkspace]:"extra-wide"===u,[EI.isActionMenuOpened]:c}),children:[(0,cu.jsx)("div",{className:EI.workspaceSpacer}),(0,cu.jsx)("div",{className:cd()(EI.workspaceMiddleContainer,{[EI.isRootWorkspace]:r,[EI.showActionMenu]:o}),children:(0,cu.jsx)("div",{className:cd()(EI.workspaceInnerContainer,{[EI.isRootWorkspace]:r}),children:(0,cu.jsx)(cg.InlineLoading,{className:EI.loader,description:`${aj("loading")} ...`})})})]})}return(0,cu.jsx)(Ev,{config:e,mountParcel:li,...u},t.workspaceName)},E2=({openedWindow:e,showActionMenu:t})=>{let{openedWorkspaces:n}=e,[r,a]=(0,ll.useState)({}),{registeredWorkspacesByName:o}=s2.getState();return(0,ll.useEffect)(()=>{let e=!1;return Promise.all(n.map(async e=>{let{moduleName:t,component:n}=o[e.workspaceName];return[e.uuid,await u8(t,n)]})).then(t=>{e||a(Object.fromEntries(t))}),()=>{e=!0}},[n]),(0,cu.jsx)(cu.Fragment,{children:n.map((a,o)=>(0,cu.jsx)(E4,{openedWorkspace:a,openedWindow:e,lifeCycle:r[a.uuid],isRootWorkspace:0===o,isLeafWorkspace:o===n.length-1,showActionMenu:t},a.uuid))})};function E3(e){e&&(0,lC.createRoot)(e).render((0,cu.jsx)(E6,{}))}function E6(){let{openedGroup:e,openedWindows:t,registeredGroupsByName:n,registeredWindowsByName:r}=E$();if((0,ll.useEffect)(()=>ii("before-page-changed",t=>{let{newPage:r,cancelNavigation:a,oldUrl:o,newUrl:i}=t;if(!e)return;if(r)return void a(EP().then(e=>!e));let s=n[e.groupName],l=s?.scopePattern;l&&function(e,t,n){try{let r=new RegExp(e),a=E1(t),o=E1(n);if(null===a.spaRelative||null===o.spaRelative)return!0;let i=r.exec(a.spaRelative),s=r.exec(o.spaRelative);if(i&&s||(i=r.exec(a.full),s=r.exec(o.full)),!i||!s)return!0;if(i.length>1)return!i.slice(1).every((e,t)=>e===s[t+1]);return!1}catch{return!0}}(l,o,i)&&a(EP().then(e=>!e))}),[e,n]),!e)return null;let a=n[e.groupName],o=t.some(e=>e.maximized),{name:i}=a,s=Object.values(r).filter(e=>e.group===i&&void 0!==e.icon).sort((e,t)=>(e.order??Number.MAX_VALUE)-(t.order??Number.MAX_VALUE)).length>0;return(0,cu.jsxs)("div",{className:cd()("-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsAndMenuContainer___gN2f4",{"-esm-form-engine__workspace-windows-and-menu-module__overlay___fqI+X":a.overlay,"-esm-form-engine__workspace-windows-and-menu-module__hasMaximizedWindow___J7wBw":o}),children:[(0,cu.jsx)("div",{className:"-esm-form-engine__workspace-windows-and-menu-module__workspaceWindowsContainer___zpk7G",children:t.map(e=>(0,cu.jsx)(E2,{openedWindow:e,showActionMenu:s},e.windowName))}),s&&(0,cu.jsx)(E0,{workspaceGroup:a,groupProps:e.props})]})}function E5(e,t,n){if(null==e)return n;let r=b_(e);if(!r)return console.warn(`matchLocale: invalid requested locale tag: ${JSON.stringify(e)}`),n;let a=[];for(let e of t){let t=b_(e);if(!t){console.warn(`matchLocale: skipping invalid available locale tag: ${JSON.stringify(e)}`);continue}a.push({canonical:t,original:e})}let o=r;for(;o;){let e=a.find(e=>e.canonical===o);if(e)return e.original;let t=o+"-",n=a.find(e=>e.canonical.startsWith(t));if(n)return n.original;if("ht"===o){o="fr-HT";continue}let r=o.lastIndexOf("-");if(-1===r)break;let i=(o=o.slice(0,r)).lastIndexOf("-");-1!==i&&o.length-i==2&&(o=o.slice(0,i))}return n}function E9(e=window.localStorage){try{return e.getItem("test"),!0}catch{return!1}}function E8(e){return!!e&&e.constructor===Object}var E7=n(7229);function _e(e){let[t,n,r]=e.split(".");return`${t}.${n}.${r}`}function _t(e,t){return E7(function(e){let t=e.indexOf("-");if(t>=0){let n=_e(e.slice(0,t)),r=e.slice(t+1);return`${n}-${r}`}return _e(e)}(t),e,{includePrerelease:!0})}async function _n(e,t={}){let n,{shouldRetry:r,getDelay:a,onError:o}=t;r=r??(e=>e<=5),a=a??(e=>(function(e,t=!1){return 1e3*Math.pow(2,t?e+1:e)})(e));let i=0;do try{return await _r(a(i)),await e()}catch(e){o?.(e,i),n=e}while(r(i++));throw n}async function _r(e){if(!(e<=0))return new Promise(t=>setTimeout(t,e))}function _a(e,t,n,r){}function _o(e){}function _i(e){return Promise.resolve([])}function _s(e){return Promise.resolve([])}function _l(e){return Promise.resolve({success:!1,result:void 0,error:"No service worker has been registered. Offline-related features have been removed from the framework."})}function _u(e){return()=>{}}function _c(){return!0}}}]);